@k-msg/webhook 0.1.2 → 0.1.4

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/dist/index.mjs CHANGED
@@ -1,47 +1,66 @@
1
- var{defineProperty:P6,getOwnPropertyNames:pV,getOwnPropertyDescriptor:bV}=Object,lV=Object.prototype.hasOwnProperty;var hQ=new WeakMap,d0=($)=>{var U=hQ.get($),J;if(U)return U;if(U=P6({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")pV($).map((V)=>!lV.call(U,V)&&P6(U,V,{get:()=>$[V],enumerable:!(J=bV($,V))||J.enumerable}));return hQ.set($,U),U},oV=($,U)=>()=>(U||$((U={exports:{}}).exports,U),U.exports);var d$=($,U)=>{for(var J in U)P6($,J,{get:U[J],enumerable:!0,configurable:!0,set:(V)=>U[J]=()=>V})};var eI=($,U)=>()=>($&&(U=$($=0)),U);var rV=(($)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy($,{get:(U,J)=>(typeof require<"u"?require:U)[J]}):$)(function($){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+$+'" is not supported')});var OI={};d$(OI,{setMaxListeners:()=>iQ,once:()=>dQ,listenerCount:()=>eQ,init:()=>G$,getMaxListeners:()=>sQ,getEventListeners:()=>tQ,default:()=>$S,captureRejectionSymbol:()=>oQ,addAbortListener:()=>$Y,EventEmitter:()=>G$});function rQ($,U){var{_events:J}=$;if(U[0]??=Error("Unhandled error."),!J)throw U[0];var V=J[lQ];if(V)for(var I of pQ.call(V))I.apply($,U);var S=J.error;if(!S)throw U[0];for(var I of pQ.call(S))I.apply($,U);return!0}function dV($,U,J,V){U.then(void 0,function(I){queueMicrotask(()=>tV($,I,J,V))})}function tV($,U,J,V){if(typeof $[uQ]==="function")$[uQ](U,J,...V);else try{$[PU]=!1,$.emit("error",U)}finally{$[PU]=!0}}function nQ($,U,J){J.warned=!0;let V=Error(`Possible EventEmitter memory leak detected. ${J.length} ${String(U)} listeners added to [${$.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);V.name="MaxListenersExceededWarning",V.emitter=$,V.type=U,V.count=J.length,console.warn(V)}function mQ($,U,...J){this.removeListener($,U),U.apply(this,J)}function dQ($,U,J){var V=J?.signal;if(aQ(V,"options.signal"),V?.aborted)throw new T6(void 0,{cause:V?.reason});let{resolve:I,reject:S,promise:Y}=$newPromiseCapability(Promise),M=(E)=>{if($.removeListener(U,T),V!=null)aI(V,"abort",L);S(E)},T=(...E)=>{if(typeof $.removeListener==="function")$.removeListener("error",M);if(V!=null)aI(V,"abort",L);I(E)};if(bQ($,U,T,{once:!0}),U!=="error"&&typeof $.once==="function")$.once("error",M);function L(){aI($,U,T),aI($,"error",M),S(new T6(void 0,{cause:V?.reason}))}if(V!=null)bQ(V,"abort",L,{once:!0});return Y}function tQ($,U){return $.listeners(U)}function iQ($,...U){R6($,"setMaxListeners",0);var J;if(U&&(J=U.length))for(let V=0;V<J;V++)U[V].setMaxListeners($);else TU=$}function eQ($,U){return $.listenerCount(U)}function aI($,U,J,V){if(typeof $.removeListener==="function")$.removeListener(U,J);else $.removeEventListener(U,J,V)}function bQ($,U,J,V){if(typeof $.on==="function")if(V.once)$.once(U,J);else $.on(U,J);else $.addEventListener(U,J,V)}function wU($,U,J){let V=TypeError(`The "${$}" argument must be of type ${U}. Received ${J}`);return V.code="ERR_INVALID_ARG_TYPE",V}function aV($,U,J){let V=RangeError(`The "${$}" argument is out of range. It must be ${U}. Received ${J}`);return V.code="ERR_OUT_OF_RANGE",V}function aQ($,U){if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw wU(U,"AbortSignal",$)}function R6($,U,J,V){if(typeof $!=="number")throw wU(U,"number",$);if(J!=null&&$<J||V!=null&&$>V||(J!=null||V!=null)&&Number.isNaN($))throw aV(U,`${J!=null?`>= ${J}`:""}${J!=null&&V!=null?" && ":""}${V!=null?`<= ${V}`:""}`,$)}function II($){if(typeof $!=="function")throw TypeError("The listener must be a function")}function sV($,U){if(typeof $!=="boolean")throw wU(U,"boolean",$)}function sQ($){return $?._maxListeners??TU}function $Y($,U){if($===void 0)throw wU("signal","AbortSignal",$);if(aQ($,"signal"),typeof U!=="function")throw wU("listener","function",U);let J;if($.aborted)queueMicrotask(()=>U());else $.addEventListener("abort",U,{__proto__:null,once:!0}),J=()=>{$.removeEventListener("abort",U)};return{__proto__:null,[Symbol.dispose](){J?.()}}}var q6,PU,lQ,nV,mV,uQ,oQ,pQ,TU=10,G$=function($){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[PU]=$?.captureRejections?Boolean($?.captureRejections):U$[PU])this.emit=eV},U$,iV=function($,...U){if($==="error")return rQ(this,U);var{_events:J}=this;if(J===void 0)return!1;var V=J[$];if(V===void 0)return!1;let I=V.length>1?V.slice():V;for(let S=0,{length:Y}=I;S<Y;S++){let M=I[S];switch(U.length){case 0:M.call(this);break;case 1:M.call(this,U[0]);break;case 2:M.call(this,U[0],U[1]);break;case 3:M.call(this,U[0],U[1],U[2]);break;default:M.apply(this,U);break}}return!0},eV=function($,...U){if($==="error")return rQ(this,U);var{_events:J}=this;if(J===void 0)return!1;var V=J[$];if(V===void 0)return!1;let I=V.length>1?V.slice():V;for(let S=0,{length:Y}=I;S<Y;S++){let M=I[S],T;switch(U.length){case 0:T=M.call(this);break;case 1:T=M.call(this,U[0]);break;case 2:T=M.call(this,U[0],U[1]);break;case 3:T=M.call(this,U[0],U[1],U[2]);break;default:T=M.apply(this,U);break}if(T!==void 0&&typeof T?.then==="function"&&T.then===Promise.prototype.then)dV(this,T,$,U)}return!0},T6,$S;var t$=eI(()=>{q6=Symbol.for,PU=Symbol("kCapture"),lQ=q6("events.errorMonitor"),nV=Symbol("events.maxEventTargetListeners"),mV=Symbol("events.maxEventTargetListenersWarned"),uQ=q6("nodejs.rejection"),oQ=q6("nodejs.rejection"),pQ=Array.prototype.slice,U$=G$.prototype={};U$._events=void 0;U$._eventsCount=0;U$._maxListeners=void 0;U$.setMaxListeners=function($){return R6($,"setMaxListeners",0),this._maxListeners=$,this};U$.constructor=G$;U$.getMaxListeners=function(){return this?._maxListeners??TU};U$.emit=iV;U$.addListener=function($,U){II(U);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",$,U.listener??U);var V=J[$];if(!V)J[$]=[U],this._eventsCount++;else{V.push(U);var I=this._maxListeners??TU;if(I>0&&V.length>I&&!V.warned)nQ(this,$,V)}return this};U$.on=U$.addListener;U$.prependListener=function($,U){II(U);var J=this._events;if(!J)J=this._events={__proto__:null},this._eventsCount=0;else if(J.newListener)this.emit("newListener",$,U.listener??U);var V=J[$];if(!V)J[$]=[U],this._eventsCount++;else{V.unshift(U);var I=this._maxListeners??TU;if(I>0&&V.length>I&&!V.warned)nQ(this,$,V)}return this};U$.once=function($,U){II(U);let J=mQ.bind(this,$,U);return J.listener=U,this.addListener($,J),this};U$.prependOnceListener=function($,U){II(U);let J=mQ.bind(this,$,U);return J.listener=U,this.prependListener($,J),this};U$.removeListener=function($,U){II(U);var{_events:J}=this;if(!J)return this;var V=J[$];if(!V)return this;var I=V.length;let S=-1;for(let Y=I-1;Y>=0;Y--)if(V[Y]===U||V[Y].listener===U){S=Y;break}if(S<0)return this;if(S===0)V.shift();else V.splice(S,1);if(V.length===0)delete J[$],this._eventsCount--;return this};U$.off=U$.removeListener;U$.removeAllListeners=function($){var{_events:U}=this;if($&&U){if(U[$])delete U[$],this._eventsCount--}else this._events={__proto__:null};return this};U$.listeners=function($){var{_events:U}=this;if(!U)return[];var J=U[$];if(!J)return[];return J.map((V)=>V.listener??V)};U$.rawListeners=function($){var{_events:U}=this;if(!U)return[];var J=U[$];if(!J)return[];return J.slice()};U$.listenerCount=function($){var{_events:U}=this;if(!U)return 0;return U[$]?.length??0};U$.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};U$[PU]=!1;T6=class T6 extends Error{constructor($="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw wU("options","Object",U);super($,U);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(G$,{captureRejections:{get(){return U$[PU]},set($){sV($,"EventEmitter.captureRejections"),U$[PU]=$},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return TU},set:($)=>{R6($,"defaultMaxListeners",0),TU=$}},kMaxEventTargetListeners:{value:nV,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:mV,enumerable:!1,configurable:!1,writable:!1}});Object.assign(G$,{once:dQ,getEventListeners:tQ,getMaxListeners:sQ,setMaxListeners:iQ,EventEmitter:G$,usingDomains:!1,captureRejectionSymbol:oQ,errorMonitor:lQ,addAbortListener:$Y,init:G$,listenerCount:eQ});$S=G$});var k$={};d$(k$,{transcode:()=>$K,resolveObjectURL:()=>ez,kStringMaxLength:()=>NG,kMaxLength:()=>pI,isUtf8:()=>az,isAscii:()=>sz,default:()=>UK,constants:()=>qz,btoa:()=>vz,atob:()=>Mz,INSPECT_MAX_BYTES:()=>_G,File:()=>Pz,Buffer:()=>W0,Blob:()=>Tz});function Hz($){var U=$.length;if(U%4>0)throw Error("Invalid string. Length must be a multiple of 4");var J=$.indexOf("=");if(J===-1)J=U;var V=J===U?0:4-J%4;return[J,V]}function Fz($,U){return($+U)*3/4-U}function Lz($){var U,J=Hz($),V=J[0],I=J[1],S=new Uint8Array(Fz(V,I)),Y=0,M=I>0?V-4:V,T;for(T=0;T<M;T+=4)U=n$[$.charCodeAt(T)]<<18|n$[$.charCodeAt(T+1)]<<12|n$[$.charCodeAt(T+2)]<<6|n$[$.charCodeAt(T+3)],S[Y++]=U>>16&255,S[Y++]=U>>8&255,S[Y++]=U&255;if(I===2)U=n$[$.charCodeAt(T)]<<2|n$[$.charCodeAt(T+1)]>>4,S[Y++]=U&255;if(I===1)U=n$[$.charCodeAt(T)]<<10|n$[$.charCodeAt(T+1)]<<4|n$[$.charCodeAt(T+2)]>>2,S[Y++]=U>>8&255,S[Y++]=U&255;return S}function Ez($){return s$[$>>18&63]+s$[$>>12&63]+s$[$>>6&63]+s$[$&63]}function Zz($,U,J){var V,I=[];for(var S=U;S<J;S+=3)V=($[S]<<16&16711680)+($[S+1]<<8&65280)+($[S+2]&255),I.push(Ez(V));return I.join("")}function qG($){var U,J=$.length,V=J%3,I=[],S=16383;for(var Y=0,M=J-V;Y<M;Y+=S)I.push(Zz($,Y,Y+S>M?M:Y+S));if(V===1)U=$[J-1],I.push(s$[U>>2]+s$[U<<4&63]+"==");else if(V===2)U=($[J-2]<<8)+$[J-1],I.push(s$[U>>10]+s$[U>>4&63]+s$[U<<2&63]+"=");return I.join("")}function I6($,U,J,V,I){var S,Y,M=I*8-V-1,T=(1<<M)-1,L=T>>1,E=-7,F=J?I-1:0,Z=J?-1:1,P=$[U+F];F+=Z,S=P&(1<<-E)-1,P>>=-E,E+=M;for(;E>0;S=S*256+$[U+F],F+=Z,E-=8);Y=S&(1<<-E)-1,S>>=-E,E+=V;for(;E>0;Y=Y*256+$[U+F],F+=Z,E-=8);if(S===0)S=1-L;else if(S===T)return Y?NaN:(P?-1:1)*(1/0);else Y=Y+Math.pow(2,V),S=S-L;return(P?-1:1)*Y*Math.pow(2,S-V)}function jG($,U,J,V,I,S){var Y,M,T,L=S*8-I-1,E=(1<<L)-1,F=E>>1,Z=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=V?0:S-1,q=V?1:-1,k=U<0||U===0&&1/U<0?1:0;if(U=Math.abs(U),isNaN(U)||U===1/0)M=isNaN(U)?1:0,Y=E;else{if(Y=Math.floor(Math.log(U)/Math.LN2),U*(T=Math.pow(2,-Y))<1)Y--,T*=2;if(Y+F>=1)U+=Z/T;else U+=Z*Math.pow(2,1-F);if(U*T>=2)Y++,T/=2;if(Y+F>=E)M=0,Y=E;else if(Y+F>=1)M=(U*T-1)*Math.pow(2,I),Y=Y+F;else M=U*Math.pow(2,F-1)*Math.pow(2,I),Y=0}for(;I>=8;$[J+P]=M&255,P+=q,M/=256,I-=8);Y=Y<<I|M,L+=I;for(;L>0;$[J+P]=Y&255,P+=q,Y/=256,L-=8);$[J+P-q]|=k*128}function SU($){if($>pI)throw RangeError('The value "'+$+'" is invalid for option "size"');let U=new Uint8Array($);return Object.setPrototypeOf(U,W0.prototype),U}function VQ($,U,J){return class extends J{constructor(){super();Object.defineProperty(this,"message",{value:U.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code(V){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:V,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}function W0($,U,J){if(typeof $==="number"){if(typeof U==="string")throw TypeError('The "string" argument must be of type string. Received type number');return SQ($)}return xG($,U,J)}function xG($,U,J){if(typeof $==="string")return gz($,U);if(ArrayBuffer.isView($))return jz($);if($==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if($U($,ArrayBuffer)||$&&$U($.buffer,ArrayBuffer))return YQ($,U,J);if(typeof SharedArrayBuffer<"u"&&($U($,SharedArrayBuffer)||$&&$U($.buffer,SharedArrayBuffer)))return YQ($,U,J);if(typeof $==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let V=$.valueOf&&$.valueOf();if(V!=null&&V!==$)return W0.from(V,U,J);let I=_z($);if(I)return I;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]==="function")return W0.from($[Symbol.toPrimitive]("string"),U,J);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}function BG($){if(typeof $!=="number")throw TypeError('"size" argument must be of type number');else if($<0)throw RangeError('The value "'+$+'" is invalid for option "size"')}function kz($,U,J){if(BG($),$<=0)return SU($);if(U!==void 0)return typeof J==="string"?SU($).fill(U,J):SU($).fill(U);return SU($)}function SQ($){return BG($),SU($<0?0:WQ($)|0)}function gz($,U){if(typeof U!=="string"||U==="")U="utf8";if(!W0.isEncoding(U))throw TypeError("Unknown encoding: "+U);let J=cG($,U)|0,V=SU(J),I=V.write($,U);if(I!==J)V=V.slice(0,I);return V}function QQ($){let U=$.length<0?0:WQ($.length)|0,J=SU(U);for(let V=0;V<U;V+=1)J[V]=$[V]&255;return J}function jz($){if($U($,Uint8Array)){let U=new Uint8Array($);return YQ(U.buffer,U.byteOffset,U.byteLength)}return QQ($)}function YQ($,U,J){if(U<0||$.byteLength<U)throw RangeError('"offset" is outside of buffer bounds');if($.byteLength<U+(J||0))throw RangeError('"length" is outside of buffer bounds');let V;if(U===void 0&&J===void 0)V=new Uint8Array($);else if(J===void 0)V=new Uint8Array($,U);else V=new Uint8Array($,U,J);return Object.setPrototypeOf(V,W0.prototype),V}function _z($){if(W0.isBuffer($)){let U=WQ($.length)|0,J=SU(U);if(J.length===0)return J;return $.copy(J,0,0,U),J}if($.length!==void 0){if(typeof $.length!=="number"||Number.isNaN($.length))return SU(0);return QQ($)}if($.type==="Buffer"&&Array.isArray($.data))return QQ($.data)}function WQ($){if($>=pI)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pI.toString(16)+" bytes");return $|0}function cG($,U){if(W0.isBuffer($))return $.length;if(ArrayBuffer.isView($)||$U($,ArrayBuffer))return $.byteLength;if(typeof $!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let J=$.length,V=arguments.length>2&&arguments[2]===!0;if(!V&&J===0)return 0;let I=!1;for(;;)switch(U){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":return GQ($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return oG($).length;default:if(I)return V?-1:GQ($).length;U=(""+U).toLowerCase(),I=!0}}function Nz($,U,J){let V=!1;if(U===void 0||U<0)U=0;if(U>this.length)return"";if(J===void 0||J>this.length)J=this.length;if(J<=0)return"";if(J>>>=0,U>>>=0,J<=U)return"";if(!$)$="utf8";while(!0)switch($){case"hex":return bz(this,U,J);case"utf8":case"utf-8":return fG(this,U,J);case"ascii":return uz(this,U,J);case"latin1":case"binary":return pz(this,U,J);case"base64":return yz(this,U,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lz(this,U,J);default:if(V)throw TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),V=!0}}function xU($,U,J){let V=$[U];$[U]=$[J],$[J]=V}function wG($,U,J,V,I){if($.length===0)return-1;if(typeof J==="string")V=J,J=0;else if(J>2147483647)J=2147483647;else if(J<-2147483648)J=-2147483648;if(J=+J,Number.isNaN(J))J=I?0:$.length-1;if(J<0)J=$.length+J;if(J>=$.length)if(I)return-1;else J=$.length-1;else if(J<0)if(I)J=0;else return-1;if(typeof U==="string")U=W0.from(U,V);if(W0.isBuffer(U)){if(U.length===0)return-1;return CG($,U,J,V,I)}else if(typeof U==="number"){if(U=U&255,typeof Uint8Array.prototype.indexOf==="function")if(I)return Uint8Array.prototype.indexOf.call($,U,J);else return Uint8Array.prototype.lastIndexOf.call($,U,J);return CG($,[U],J,V,I)}throw TypeError("val must be string, number or Buffer")}function CG($,U,J,V,I){let S=1,Y=$.length,M=U.length;if(V!==void 0){if(V=String(V).toLowerCase(),V==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le"){if($.length<2||U.length<2)return-1;S=2,Y/=2,M/=2,J/=2}}function T(E,F){if(S===1)return E[F];else return E.readUInt16BE(F*S)}let L;if(I){let E=-1;for(L=J;L<Y;L++)if(T($,L)===T(U,E===-1?0:L-E)){if(E===-1)E=L;if(L-E+1===M)return E*S}else{if(E!==-1)L-=L-E;E=-1}}else{if(J+M>Y)J=Y-M;for(L=J;L>=0;L--){let E=!0;for(let F=0;F<M;F++)if(T($,L+F)!==T(U,F)){E=!1;break}if(E)return L}}return-1}function xz($,U,J,V){J=Number(J)||0;let I=$.length-J;if(!V)V=I;else if(V=Number(V),V>I)V=I;let S=U.length;if(V>S/2)V=S/2;let Y;for(Y=0;Y<V;++Y){let M=parseInt(U.substr(Y*2,2),16);if(Number.isNaN(M))return Y;$[J+Y]=M}return Y}function Bz($,U,J,V){return O6(GQ(U,$.length-J),$,J,V)}function cz($,U,J,V){return O6(mz(U),$,J,V)}function wz($,U,J,V){return O6(oG(U),$,J,V)}function fz($,U,J,V){return O6(dz(U,$.length-J),$,J,V)}function yz($,U,J){if(U===0&&J===$.length)return qG($);else return qG($.slice(U,J))}function fG($,U,J){J=Math.min($.length,J);let V=[],I=U;while(I<J){let S=$[I],Y=null,M=S>239?4:S>223?3:S>191?2:1;if(I+M<=J){let T,L,E,F;switch(M){case 1:if(S<128)Y=S;break;case 2:if(T=$[I+1],(T&192)===128){if(F=(S&31)<<6|T&63,F>127)Y=F}break;case 3:if(T=$[I+1],L=$[I+2],(T&192)===128&&(L&192)===128){if(F=(S&15)<<12|(T&63)<<6|L&63,F>2047&&(F<55296||F>57343))Y=F}break;case 4:if(T=$[I+1],L=$[I+2],E=$[I+3],(T&192)===128&&(L&192)===128&&(E&192)===128){if(F=(S&15)<<18|(T&63)<<12|(L&63)<<6|E&63,F>65535&&F<1114112)Y=F}}}if(Y===null)Y=65533,M=1;else if(Y>65535)Y-=65536,V.push(Y>>>10&1023|55296),Y=56320|Y&1023;V.push(Y),I+=M}return hz(V)}function hz($){let U=$.length;if(U<=kG)return String.fromCharCode.apply(String,$);let J="",V=0;while(V<U)J+=String.fromCharCode.apply(String,$.slice(V,V+=kG));return J}function uz($,U,J){let V="";J=Math.min($.length,J);for(let I=U;I<J;++I)V+=String.fromCharCode($[I]&127);return V}function pz($,U,J){let V="";J=Math.min($.length,J);for(let I=U;I<J;++I)V+=String.fromCharCode($[I]);return V}function bz($,U,J){let V=$.length;if(!U||U<0)U=0;if(!J||J<0||J>V)J=V;let I="";for(let S=U;S<J;++S)I+=tz[$[S]];return I}function lz($,U,J){let V=$.slice(U,J),I="";for(let S=0;S<V.length-1;S+=2)I+=String.fromCharCode(V[S]+V[S+1]*256);return I}function C$($,U,J){if($%1!==0||$<0)throw RangeError("offset is not uint");if($+U>J)throw RangeError("Trying to access beyond buffer length")}function y$($,U,J,V,I,S){if(!W0.isBuffer($))throw TypeError('"buffer" argument must be a Buffer instance');if(U>I||U<S)throw RangeError('"value" argument is out of bounds');if(J+V>$.length)throw RangeError("Index out of range")}function yG($,U,J,V,I){lG(U,V,I,$,J,7);let S=Number(U&BigInt(4294967295));$[J++]=S,S=S>>8,$[J++]=S,S=S>>8,$[J++]=S,S=S>>8,$[J++]=S;let Y=Number(U>>BigInt(32)&BigInt(4294967295));return $[J++]=Y,Y=Y>>8,$[J++]=Y,Y=Y>>8,$[J++]=Y,Y=Y>>8,$[J++]=Y,J}function hG($,U,J,V,I){lG(U,V,I,$,J,7);let S=Number(U&BigInt(4294967295));$[J+7]=S,S=S>>8,$[J+6]=S,S=S>>8,$[J+5]=S,S=S>>8,$[J+4]=S;let Y=Number(U>>BigInt(32)&BigInt(4294967295));return $[J+3]=Y,Y=Y>>8,$[J+2]=Y,Y=Y>>8,$[J+1]=Y,Y=Y>>8,$[J]=Y,J+8}function uG($,U,J,V,I,S){if(J+V>$.length)throw RangeError("Index out of range");if(J<0)throw RangeError("Index out of range")}function pG($,U,J,V,I){if(U=+U,J=J>>>0,!I)uG($,U,J,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return jG($,U,J,V,23,4),J+4}function bG($,U,J,V,I){if(U=+U,J=J>>>0,!I)uG($,U,J,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return jG($,U,J,V,52,8),J+8}function gG($){let U="",J=$.length,V=$[0]==="-"?1:0;for(;J>=V+4;J-=3)U=`_${$.slice(J-3,J)}${U}`;return`${$.slice(0,J)}${U}`}function oz($,U,J){if(aU(U,"offset"),$[U]===void 0||$[U+J]===void 0)bI(U,$.length-(J+1))}function lG($,U,J,V,I,S){if($>J||$<U){let Y=typeof U==="bigint"?"n":"",M;if(S>3)if(U===0||U===BigInt(0))M=`>= 0${Y} and < 2${Y} ** ${(S+1)*8}${Y}`;else M=`>= -(2${Y} ** ${(S+1)*8-1}${Y}) and < 2 ** ${(S+1)*8-1}${Y}`;else M=`>= ${U}${Y} and <= ${J}${Y}`;throw new JQ("value",M,$)}oz(V,I,S)}function aU($,U){if(typeof $!=="number")throw new Cz(U,"number",$)}function bI($,U,J){if(Math.floor($)!==$)throw aU($,J),new JQ(J||"offset","an integer",$);if(U<0)throw new Rz;throw new JQ(J||"offset",`>= ${J?1:0} and <= ${U}`,$)}function nz($){if($=$.split("=")[0],$=$.trim().replace(rz,""),$.length<2)return"";while($.length%4!==0)$=$+"=";return $}function GQ($,U){U=U||1/0;let J,V=$.length,I=null,S=[];for(let Y=0;Y<V;++Y){if(J=$.charCodeAt(Y),J>55295&&J<57344){if(!I){if(J>56319){if((U-=3)>-1)S.push(239,191,189);continue}else if(Y+1===V){if((U-=3)>-1)S.push(239,191,189);continue}I=J;continue}if(J<56320){if((U-=3)>-1)S.push(239,191,189);I=J;continue}J=(I-55296<<10|J-56320)+65536}else if(I){if((U-=3)>-1)S.push(239,191,189)}if(I=null,J<128){if((U-=1)<0)break;S.push(J)}else if(J<2048){if((U-=2)<0)break;S.push(J>>6|192,J&63|128)}else if(J<65536){if((U-=3)<0)break;S.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((U-=4)<0)break;S.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw Error("Invalid code point")}return S}function mz($){let U=[];for(let J=0;J<$.length;++J)U.push($.charCodeAt(J)&255);return U}function dz($,U){let J,V,I,S=[];for(let Y=0;Y<$.length;++Y){if((U-=2)<0)break;J=$.charCodeAt(Y),V=J>>8,I=J%256,S.push(I),S.push(V)}return S}function oG($){return Lz(nz($))}function O6($,U,J,V){let I;for(I=0;I<V;++I){if(I+J>=U.length||I>=$.length)break;U[I+J]=$[I]}return I}function $U($,U){return $ instanceof U||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===U.name}function ZU($){return typeof BigInt>"u"?iz:$}function iz(){throw Error("BigInt not supported")}function DQ($){return()=>{throw Error($+" is not implemented for node:buffer browser polyfill")}}var s$,n$,XQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NU,TG,RG,_G=50,pI=2147483647,NG=536870888,vz,Mz,Pz,Tz,qz,Rz,Cz,JQ,kG=4096,rz,tz,ez,az,sz=($)=>{for(let U of $)if(U.charCodeAt(0)>127)return!1;return!0},$K,UK;var g$=eI(()=>{s$=[],n$=[];for(NU=0,TG=XQ.length;NU<TG;++NU)s$[NU]=XQ[NU],n$[XQ.charCodeAt(NU)]=NU;n$[45]=62;n$[95]=63;RG=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,vz=globalThis.btoa,Mz=globalThis.atob,Pz=globalThis.File,Tz=globalThis.Blob,qz={MAX_LENGTH:pI,MAX_STRING_LENGTH:NG};Rz=VQ("ERR_BUFFER_OUT_OF_BOUNDS",function($){if($)return`${$} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),Cz=VQ("ERR_INVALID_ARG_TYPE",function($,U){return`The "${$}" argument must be of type number. Received type ${typeof U}`},TypeError),JQ=VQ("ERR_OUT_OF_RANGE",function($,U,J){let V=`The value of "${$}" is out of range.`,I=J;if(Number.isInteger(J)&&Math.abs(J)>4294967296)I=gG(String(J));else if(typeof J==="bigint"){if(I=String(J),J>BigInt(2)**BigInt(32)||J<-(BigInt(2)**BigInt(32)))I=gG(I);I+="n"}return V+=` It must be ${U}. Received ${I}`,V},RangeError);Object.defineProperty(W0.prototype,"parent",{enumerable:!0,get:function(){if(!W0.isBuffer(this))return;return this.buffer}});Object.defineProperty(W0.prototype,"offset",{enumerable:!0,get:function(){if(!W0.isBuffer(this))return;return this.byteOffset}});W0.poolSize=8192;W0.from=function($,U,J){return xG($,U,J)};Object.setPrototypeOf(W0.prototype,Uint8Array.prototype);Object.setPrototypeOf(W0,Uint8Array);W0.alloc=function($,U,J){return kz($,U,J)};W0.allocUnsafe=function($){return SQ($)};W0.allocUnsafeSlow=function($){return SQ($)};W0.isBuffer=function($){return $!=null&&$._isBuffer===!0&&$!==W0.prototype};W0.compare=function($,U){if($U($,Uint8Array))$=W0.from($,$.offset,$.byteLength);if($U(U,Uint8Array))U=W0.from(U,U.offset,U.byteLength);if(!W0.isBuffer($)||!W0.isBuffer(U))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===U)return 0;let J=$.length,V=U.length;for(let I=0,S=Math.min(J,V);I<S;++I)if($[I]!==U[I]){J=$[I],V=U[I];break}if(J<V)return-1;if(V<J)return 1;return 0};W0.isEncoding=function($){switch(String($).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};W0.concat=function($,U){if(!Array.isArray($))throw TypeError('"list" argument must be an Array of Buffers');if($.length===0)return W0.alloc(0);let J;if(U===void 0){U=0;for(J=0;J<$.length;++J)U+=$[J].length}let V=W0.allocUnsafe(U),I=0;for(J=0;J<$.length;++J){let S=$[J];if($U(S,Uint8Array))if(I+S.length>V.length){if(!W0.isBuffer(S))S=W0.from(S);S.copy(V,I)}else Uint8Array.prototype.set.call(V,S,I);else if(!W0.isBuffer(S))throw TypeError('"list" argument must be an Array of Buffers');else S.copy(V,I);I+=S.length}return V};W0.byteLength=cG;W0.prototype._isBuffer=!0;W0.prototype.swap16=function(){let $=this.length;if($%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;U<$;U+=2)xU(this,U,U+1);return this};W0.prototype.swap32=function(){let $=this.length;if($%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let U=0;U<$;U+=4)xU(this,U,U+3),xU(this,U+1,U+2);return this};W0.prototype.swap64=function(){let $=this.length;if($%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let U=0;U<$;U+=8)xU(this,U,U+7),xU(this,U+1,U+6),xU(this,U+2,U+5),xU(this,U+3,U+4);return this};W0.prototype.toString=function(){let $=this.length;if($===0)return"";if(arguments.length===0)return fG(this,0,$);return Nz.apply(this,arguments)};W0.prototype.toLocaleString=W0.prototype.toString;W0.prototype.equals=function($){if(!W0.isBuffer($))throw TypeError("Argument must be a Buffer");if(this===$)return!0;return W0.compare(this,$)===0};W0.prototype.inspect=function(){let $="",U=_G;if($=this.toString("hex",0,U).replace(/(.{2})/g,"$1 ").trim(),this.length>U)$+=" ... ";return"<Buffer "+$+">"};if(RG)W0.prototype[RG]=W0.prototype.inspect;W0.prototype.compare=function($,U,J,V,I){if($U($,Uint8Array))$=W0.from($,$.offset,$.byteLength);if(!W0.isBuffer($))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(U===void 0)U=0;if(J===void 0)J=$?$.length:0;if(V===void 0)V=0;if(I===void 0)I=this.length;if(U<0||J>$.length||V<0||I>this.length)throw RangeError("out of range index");if(V>=I&&U>=J)return 0;if(V>=I)return-1;if(U>=J)return 1;if(U>>>=0,J>>>=0,V>>>=0,I>>>=0,this===$)return 0;let S=I-V,Y=J-U,M=Math.min(S,Y),T=this.slice(V,I),L=$.slice(U,J);for(let E=0;E<M;++E)if(T[E]!==L[E]){S=T[E],Y=L[E];break}if(S<Y)return-1;if(Y<S)return 1;return 0};W0.prototype.includes=function($,U,J){return this.indexOf($,U,J)!==-1};W0.prototype.indexOf=function($,U,J){return wG(this,$,U,J,!0)};W0.prototype.lastIndexOf=function($,U,J){return wG(this,$,U,J,!1)};W0.prototype.write=function($,U,J,V){if(U===void 0)V="utf8",J=this.length,U=0;else if(J===void 0&&typeof U==="string")V=U,J=this.length,U=0;else if(isFinite(U))if(U=U>>>0,isFinite(J)){if(J=J>>>0,V===void 0)V="utf8"}else V=J,J=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let I=this.length-U;if(J===void 0||J>I)J=I;if($.length>0&&(J<0||U<0)||U>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!V)V="utf8";let S=!1;for(;;)switch(V){case"hex":return xz(this,$,U,J);case"utf8":case"utf-8":return Bz(this,$,U,J);case"ascii":case"latin1":case"binary":return cz(this,$,U,J);case"base64":return wz(this,$,U,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fz(this,$,U,J);default:if(S)throw TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),S=!0}};W0.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};W0.prototype.slice=function($,U){let J=this.length;if($=~~$,U=U===void 0?J:~~U,$<0){if($+=J,$<0)$=0}else if($>J)$=J;if(U<0){if(U+=J,U<0)U=0}else if(U>J)U=J;if(U<$)U=$;let V=this.subarray($,U);return Object.setPrototypeOf(V,W0.prototype),V};W0.prototype.readUintLE=W0.prototype.readUIntLE=function($,U,J){if($=$>>>0,U=U>>>0,!J)C$($,U,this.length);let V=this[$],I=1,S=0;while(++S<U&&(I*=256))V+=this[$+S]*I;return V};W0.prototype.readUintBE=W0.prototype.readUIntBE=function($,U,J){if($=$>>>0,U=U>>>0,!J)C$($,U,this.length);let V=this[$+--U],I=1;while(U>0&&(I*=256))V+=this[$+--U]*I;return V};W0.prototype.readUint8=W0.prototype.readUInt8=function($,U){if($=$>>>0,!U)C$($,1,this.length);return this[$]};W0.prototype.readUint16LE=W0.prototype.readUInt16LE=function($,U){if($=$>>>0,!U)C$($,2,this.length);return this[$]|this[$+1]<<8};W0.prototype.readUint16BE=W0.prototype.readUInt16BE=function($,U){if($=$>>>0,!U)C$($,2,this.length);return this[$]<<8|this[$+1]};W0.prototype.readUint32LE=W0.prototype.readUInt32LE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216};W0.prototype.readUint32BE=W0.prototype.readUInt32BE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])};W0.prototype.readBigUInt64LE=ZU(function($){$=$>>>0,aU($,"offset");let U=this[$],J=this[$+7];if(U===void 0||J===void 0)bI($,this.length-8);let V=U+this[++$]*256+this[++$]*65536+this[++$]*16777216,I=this[++$]+this[++$]*256+this[++$]*65536+J*16777216;return BigInt(V)+(BigInt(I)<<BigInt(32))});W0.prototype.readBigUInt64BE=ZU(function($){$=$>>>0,aU($,"offset");let U=this[$],J=this[$+7];if(U===void 0||J===void 0)bI($,this.length-8);let V=U*16777216+this[++$]*65536+this[++$]*256+this[++$],I=this[++$]*16777216+this[++$]*65536+this[++$]*256+J;return(BigInt(V)<<BigInt(32))+BigInt(I)});W0.prototype.readIntLE=function($,U,J){if($=$>>>0,U=U>>>0,!J)C$($,U,this.length);let V=this[$],I=1,S=0;while(++S<U&&(I*=256))V+=this[$+S]*I;if(I*=128,V>=I)V-=Math.pow(2,8*U);return V};W0.prototype.readIntBE=function($,U,J){if($=$>>>0,U=U>>>0,!J)C$($,U,this.length);let V=U,I=1,S=this[$+--V];while(V>0&&(I*=256))S+=this[$+--V]*I;if(I*=128,S>=I)S-=Math.pow(2,8*U);return S};W0.prototype.readInt8=function($,U){if($=$>>>0,!U)C$($,1,this.length);if(!(this[$]&128))return this[$];return(255-this[$]+1)*-1};W0.prototype.readInt16LE=function($,U){if($=$>>>0,!U)C$($,2,this.length);let J=this[$]|this[$+1]<<8;return J&32768?J|4294901760:J};W0.prototype.readInt16BE=function($,U){if($=$>>>0,!U)C$($,2,this.length);let J=this[$+1]|this[$]<<8;return J&32768?J|4294901760:J};W0.prototype.readInt32LE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24};W0.prototype.readInt32BE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]};W0.prototype.readBigInt64LE=ZU(function($){$=$>>>0,aU($,"offset");let U=this[$],J=this[$+7];if(U===void 0||J===void 0)bI($,this.length-8);let V=this[$+4]+this[$+5]*256+this[$+6]*65536+(J<<24);return(BigInt(V)<<BigInt(32))+BigInt(U+this[++$]*256+this[++$]*65536+this[++$]*16777216)});W0.prototype.readBigInt64BE=ZU(function($){$=$>>>0,aU($,"offset");let U=this[$],J=this[$+7];if(U===void 0||J===void 0)bI($,this.length-8);let V=(U<<24)+this[++$]*65536+this[++$]*256+this[++$];return(BigInt(V)<<BigInt(32))+BigInt(this[++$]*16777216+this[++$]*65536+this[++$]*256+J)});W0.prototype.readFloatLE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return I6(this,$,!0,23,4)};W0.prototype.readFloatBE=function($,U){if($=$>>>0,!U)C$($,4,this.length);return I6(this,$,!1,23,4)};W0.prototype.readDoubleLE=function($,U){if($=$>>>0,!U)C$($,8,this.length);return I6(this,$,!0,52,8)};W0.prototype.readDoubleBE=function($,U){if($=$>>>0,!U)C$($,8,this.length);return I6(this,$,!1,52,8)};W0.prototype.writeUintLE=W0.prototype.writeUIntLE=function($,U,J,V){if($=+$,U=U>>>0,J=J>>>0,!V){let Y=Math.pow(2,8*J)-1;y$(this,$,U,J,Y,0)}let I=1,S=0;this[U]=$&255;while(++S<J&&(I*=256))this[U+S]=$/I&255;return U+J};W0.prototype.writeUintBE=W0.prototype.writeUIntBE=function($,U,J,V){if($=+$,U=U>>>0,J=J>>>0,!V){let Y=Math.pow(2,8*J)-1;y$(this,$,U,J,Y,0)}let I=J-1,S=1;this[U+I]=$&255;while(--I>=0&&(S*=256))this[U+I]=$/S&255;return U+J};W0.prototype.writeUint8=W0.prototype.writeUInt8=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,1,255,0);return this[U]=$&255,U+1};W0.prototype.writeUint16LE=W0.prototype.writeUInt16LE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,2,65535,0);return this[U]=$&255,this[U+1]=$>>>8,U+2};W0.prototype.writeUint16BE=W0.prototype.writeUInt16BE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,2,65535,0);return this[U]=$>>>8,this[U+1]=$&255,U+2};W0.prototype.writeUint32LE=W0.prototype.writeUInt32LE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,4,4294967295,0);return this[U+3]=$>>>24,this[U+2]=$>>>16,this[U+1]=$>>>8,this[U]=$&255,U+4};W0.prototype.writeUint32BE=W0.prototype.writeUInt32BE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,4,4294967295,0);return this[U]=$>>>24,this[U+1]=$>>>16,this[U+2]=$>>>8,this[U+3]=$&255,U+4};W0.prototype.writeBigUInt64LE=ZU(function($,U=0){return yG(this,$,U,BigInt(0),BigInt("0xffffffffffffffff"))});W0.prototype.writeBigUInt64BE=ZU(function($,U=0){return hG(this,$,U,BigInt(0),BigInt("0xffffffffffffffff"))});W0.prototype.writeIntLE=function($,U,J,V){if($=+$,U=U>>>0,!V){let M=Math.pow(2,8*J-1);y$(this,$,U,J,M-1,-M)}let I=0,S=1,Y=0;this[U]=$&255;while(++I<J&&(S*=256)){if($<0&&Y===0&&this[U+I-1]!==0)Y=1;this[U+I]=($/S>>0)-Y&255}return U+J};W0.prototype.writeIntBE=function($,U,J,V){if($=+$,U=U>>>0,!V){let M=Math.pow(2,8*J-1);y$(this,$,U,J,M-1,-M)}let I=J-1,S=1,Y=0;this[U+I]=$&255;while(--I>=0&&(S*=256)){if($<0&&Y===0&&this[U+I+1]!==0)Y=1;this[U+I]=($/S>>0)-Y&255}return U+J};W0.prototype.writeInt8=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,1,127,-128);if($<0)$=255+$+1;return this[U]=$&255,U+1};W0.prototype.writeInt16LE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,2,32767,-32768);return this[U]=$&255,this[U+1]=$>>>8,U+2};W0.prototype.writeInt16BE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,2,32767,-32768);return this[U]=$>>>8,this[U+1]=$&255,U+2};W0.prototype.writeInt32LE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,4,2147483647,-2147483648);return this[U]=$&255,this[U+1]=$>>>8,this[U+2]=$>>>16,this[U+3]=$>>>24,U+4};W0.prototype.writeInt32BE=function($,U,J){if($=+$,U=U>>>0,!J)y$(this,$,U,4,2147483647,-2147483648);if($<0)$=4294967295+$+1;return this[U]=$>>>24,this[U+1]=$>>>16,this[U+2]=$>>>8,this[U+3]=$&255,U+4};W0.prototype.writeBigInt64LE=ZU(function($,U=0){return yG(this,$,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});W0.prototype.writeBigInt64BE=ZU(function($,U=0){return hG(this,$,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});W0.prototype.writeFloatLE=function($,U,J){return pG(this,$,U,!0,J)};W0.prototype.writeFloatBE=function($,U,J){return pG(this,$,U,!1,J)};W0.prototype.writeDoubleLE=function($,U,J){return bG(this,$,U,!0,J)};W0.prototype.writeDoubleBE=function($,U,J){return bG(this,$,U,!1,J)};W0.prototype.copy=function($,U,J,V){if(!W0.isBuffer($))throw TypeError("argument should be a Buffer");if(!J)J=0;if(!V&&V!==0)V=this.length;if(U>=$.length)U=$.length;if(!U)U=0;if(V>0&&V<J)V=J;if(V===J)return 0;if($.length===0||this.length===0)return 0;if(U<0)throw RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw RangeError("Index out of range");if(V<0)throw RangeError("sourceEnd out of bounds");if(V>this.length)V=this.length;if($.length-U<V-J)V=$.length-U+J;let I=V-J;if(this===$&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(U,J,V);else Uint8Array.prototype.set.call($,this.subarray(J,V),U);return I};W0.prototype.fill=function($,U,J,V){if(typeof $==="string"){if(typeof U==="string")V=U,U=0,J=this.length;else if(typeof J==="string")V=J,J=this.length;if(V!==void 0&&typeof V!=="string")throw TypeError("encoding must be a string");if(typeof V==="string"&&!W0.isEncoding(V))throw TypeError("Unknown encoding: "+V);if($.length===1){let S=$.charCodeAt(0);if(V==="utf8"&&S<128||V==="latin1")$=S}}else if(typeof $==="number")$=$&255;else if(typeof $==="boolean")$=Number($);if(U<0||this.length<U||this.length<J)throw RangeError("Out of range index");if(J<=U)return this;if(U=U>>>0,J=J===void 0?this.length:J>>>0,!$)$=0;let I;if(typeof $==="number")for(I=U;I<J;++I)this[I]=$;else{let S=W0.isBuffer($)?$:W0.from($,V),Y=S.length;if(Y===0)throw TypeError('The value "'+$+'" is invalid for argument "value"');for(I=0;I<J-U;++I)this[I+U]=S[I%Y]}return this};rz=/[^+/0-9A-Za-z-_]/g;tz=function(){let $=Array(256);for(let U=0;U<16;++U){let J=U*16;for(let V=0;V<16;++V)$[J+V]="0123456789abcdef"[U]+"0123456789abcdef"[V]}return $}();ez=DQ("resolveObjectURL"),az=DQ("isUtf8"),$K=DQ("transcode"),UK=W0});var $V={};d$($V,{types:()=>WK,promisify:()=>iG,log:()=>mG,isUndefined:()=>sU,isSymbol:()=>zK,isString:()=>V6,isRegExp:()=>X6,isPrimitive:()=>KK,isObject:()=>$I,isNumber:()=>nG,isNullOrUndefined:()=>DK,isNull:()=>G6,isFunction:()=>Q6,isError:()=>J6,isDate:()=>HQ,isBuffer:()=>AK,isBoolean:()=>LQ,isArray:()=>rG,inspect:()=>BU,inherits:()=>dG,format:()=>FQ,deprecate:()=>OK,default:()=>LK,debuglog:()=>XK,callbackifyOnRejected:()=>vQ,callbackify:()=>eG,_extend:()=>ZQ,TextEncoder:()=>aG,TextDecoder:()=>sG});function FQ($,...U){if(!V6($)){var J=[$];for(var V=0;V<U.length;V++)J.push(BU(U[V]));return J.join(" ")}var V=0,I=U.length,S=String($).replace(IK,function(M){if(M==="%%")return"%";if(V>=I)return M;switch(M){case"%s":return String(U[V++]);case"%d":return Number(U[V++]);case"%j":try{return JSON.stringify(U[V++])}catch(T){return"[Circular]"}default:return M}});for(var Y=U[V];V<I;Y=U[++V])if(G6(Y)||!$I(Y))S+=" "+Y;else S+=" "+BU(Y);return S}function OK($,U){if(typeof process>"u"||process?.noDeprecation===!0)return $;var J=!1;function V(...I){if(!J){if(process.throwDeprecation)throw Error(U);else if(process.traceDeprecation)console.trace(U);else console.error(U);J=!0}return $.apply(this,...I)}return V}function JK($,U){var J=BU.styles[U];if(J)return"\x1B["+BU.colors[J][0]+"m"+$+"\x1B["+BU.colors[J][1]+"m";else return $}function QK($,U){return $}function YK($){var U={};return $.forEach(function(J,V){U[J]=!0}),U}function Y6($,U,J){if($.customInspect&&U&&Q6(U.inspect)&&U.inspect!==BU&&!(U.constructor&&U.constructor.prototype===U)){var V=U.inspect(J,$);if(!V6(V))V=Y6($,V,J);return V}var I=GK($,U);if(I)return I;var S=Object.keys(U),Y=YK(S);if($.showHidden)S=Object.getOwnPropertyNames(U);if(J6(U)&&(S.indexOf("message")>=0||S.indexOf("description")>=0))return zQ(U);if(S.length===0){if(Q6(U)){var M=U.name?": "+U.name:"";return $.stylize("[Function"+M+"]","special")}if(X6(U))return $.stylize(RegExp.prototype.toString.call(U),"regexp");if(HQ(U))return $.stylize(Date.prototype.toString.call(U),"date");if(J6(U))return zQ(U)}var T="",L=!1,E=["{","}"];if(rG(U))L=!0,E=["[","]"];if(Q6(U)){var F=U.name?": "+U.name:"";T=" [Function"+F+"]"}if(X6(U))T=" "+RegExp.prototype.toString.call(U);if(HQ(U))T=" "+Date.prototype.toUTCString.call(U);if(J6(U))T=" "+zQ(U);if(S.length===0&&(!L||U.length==0))return E[0]+T+E[1];if(J<0)if(X6(U))return $.stylize(RegExp.prototype.toString.call(U),"regexp");else return $.stylize("[Object]","special");$.seen.push(U);var Z;if(L)Z=VK($,U,J,Y,S);else Z=S.map(function(P){return AQ($,U,J,Y,P,L)});return $.seen.pop(),SK(Z,T,E)}function GK($,U){if(sU(U))return $.stylize("undefined","undefined");if(V6(U)){var J="'"+JSON.stringify(U).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return $.stylize(J,"string")}if(nG(U))return $.stylize(""+U,"number");if(LQ(U))return $.stylize(""+U,"boolean");if(G6(U))return $.stylize("null","null")}function zQ($){return"["+Error.prototype.toString.call($)+"]"}function VK($,U,J,V,I){var S=[];for(var Y=0,M=U.length;Y<M;++Y)if(tG(U,String(Y)))S.push(AQ($,U,J,V,String(Y),!0));else S.push("");return I.forEach(function(T){if(!T.match(/^\d+$/))S.push(AQ($,U,J,V,T,!0))}),S}function AQ($,U,J,V,I,S){var Y,M,T;if(T=Object.getOwnPropertyDescriptor(U,I)||{value:U[I]},T.get)if(T.set)M=$.stylize("[Getter/Setter]","special");else M=$.stylize("[Getter]","special");else if(T.set)M=$.stylize("[Setter]","special");if(!tG(V,I))Y="["+I+"]";if(!M)if($.seen.indexOf(T.value)<0){if(G6(J))M=Y6($,T.value,null);else M=Y6($,T.value,J-1);if(M.indexOf(`
2
- `)>-1)if(S)M=M.split(`
3
- `).map(function(L){return" "+L}).join(`
4
- `).slice(2);else M=`
5
- `+M.split(`
6
- `).map(function(L){return" "+L}).join(`
7
- `)}else M=$.stylize("[Circular]","special");if(sU(Y)){if(S&&I.match(/^\d+$/))return M;if(Y=JSON.stringify(""+I),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))Y=Y.slice(1,-1),Y=$.stylize(Y,"name");else Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=$.stylize(Y,"string")}return Y+": "+M}function SK($,U,J){var V=0,I=$.reduce(function(S,Y){if(V++,Y.indexOf(`
8
- `)>=0)V++;return S+Y.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(I>60)return J[0]+(U===""?"":U+`
1
+ var{defineProperty:w4,getOwnPropertyNames:aW,getOwnPropertyDescriptor:sW}=Object,$K=Object.prototype.hasOwnProperty;var KY=new WeakMap,e$=($)=>{var I=KY.get($),D;if(I)return I;if(I=w4({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")aW($).map((X)=>!$K.call(I,X)&&w4(I,X,{get:()=>$[X],enumerable:!(D=sW($,X))||D.enumerable}));return KY.set($,I),I},UK=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports);var i0=($,I)=>{for(var D in I)w4($,D,{get:I[D],enumerable:!0,configurable:!0,set:(X)=>I[D]=()=>X})};var C6=($,I)=>()=>($&&(I=$($=0)),I);var IK=(($)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy($,{get:(I,D)=>(typeof require<"u"?require:I)[D]}):$)(function($){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+$+'" is not supported')});var fI={};i0(fI,{setMaxListeners:()=>PY,once:()=>TY,listenerCount:()=>qY,init:()=>W0,getMaxListeners:()=>gY,getEventListeners:()=>MY,default:()=>VK,captureRejectionSymbol:()=>HY,addAbortListener:()=>kY,EventEmitter:()=>W0});function ZY($,I){var{_events:D}=$;if(I[0]??=Error("Unhandled error."),!D)throw I[0];var X=D[FY];if(X)for(var U of SY.call(X))U.apply($,I);var Q=D.error;if(!Q)throw I[0];for(var U of SY.call(Q))U.apply($,I);return!0}function OK($,I,D,X){I.then(void 0,function(U){queueMicrotask(()=>JK($,U,D,X))})}function JK($,I,D,X){if(typeof $[zY]==="function")$[zY](I,D,...X);else try{$[yU]=!1,$.emit("error",I)}finally{$[yU]=!0}}function LY($,I,D){D.warned=!0;let X=Error(`Possible EventEmitter memory leak detected. ${D.length} ${String(I)} listeners added to [${$.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);X.name="MaxListenersExceededWarning",X.emitter=$,X.type=I,X.count=D.length,console.warn(X)}function EY($,I,...D){this.removeListener($,I),I.apply(this,D)}function TY($,I,D){var X=D?.signal;if(RY(X,"options.signal"),X?.aborted)throw new c4(void 0,{cause:X?.reason});let{resolve:U,reject:Q,promise:J}=$newPromiseCapability(Promise),A=(L)=>{if($.removeListener(I,T),X!=null)_6(X,"abort",Z);Q(L)},T=(...L)=>{if(typeof $.removeListener==="function")$.removeListener("error",A);if(X!=null)_6(X,"abort",Z);U(L)};if(AY($,I,T,{once:!0}),I!=="error"&&typeof $.once==="function")$.once("error",A);function Z(){_6($,I,T),_6($,"error",A),Q(new c4(void 0,{cause:X?.reason}))}if(X!=null)AY(X,"abort",Z,{once:!0});return J}function MY($,I){return $.listeners(I)}function PY($,...I){y4($,"setMaxListeners",0);var D;if(I&&(D=I.length))for(let X=0;X<D;X++)I[X].setMaxListeners($);else uU=$}function qY($,I){return $.listenerCount(I)}function _6($,I,D,X){if(typeof $.removeListener==="function")$.removeListener(I,D);else $.removeEventListener(I,D,X)}function AY($,I,D,X){if(typeof $.on==="function")if(X.once)$.once(I,D);else $.on(I,D);else $.addEventListener(I,D,X)}function sU($,I,D){let X=TypeError(`The "${$}" argument must be of type ${I}. Received ${D}`);return X.code="ERR_INVALID_ARG_TYPE",X}function YK($,I,D){let X=RangeError(`The "${$}" argument is out of range. It must be ${I}. Received ${D}`);return X.code="ERR_OUT_OF_RANGE",X}function RY($,I){if($!==void 0&&($===null||typeof $!=="object"||!("aborted"in $)))throw sU(I,"AbortSignal",$)}function y4($,I,D,X){if(typeof $!=="number")throw sU(I,"number",$);if(D!=null&&$<D||X!=null&&$>X||(D!=null||X!=null)&&Number.isNaN($))throw YK(I,`${D!=null?`>= ${D}`:""}${D!=null&&X!=null?" && ":""}${X!=null?`<= ${X}`:""}`,$)}function cI($){if(typeof $!=="function")throw TypeError("The listener must be a function")}function GK($,I){if(typeof $!=="boolean")throw sU(I,"boolean",$)}function gY($){return $?._maxListeners??uU}function kY($,I){if($===void 0)throw sU("signal","AbortSignal",$);if(RY($,"signal"),typeof I!=="function")throw sU("listener","function",I);let D;if($.aborted)queueMicrotask(()=>I());else $.addEventListener("abort",I,{__proto__:null,once:!0}),D=()=>{$.removeEventListener("abort",I)};return{__proto__:null,[Symbol.dispose](){D?.()}}}var f4,yU,FY,vK,DK,zY,HY,SY,uU=10,W0=function($){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[yU]=$?.captureRejections?Boolean($?.captureRejections):O0[yU])this.emit=QK},O0,XK=function($,...I){if($==="error")return ZY(this,I);var{_events:D}=this;if(D===void 0)return!1;var X=D[$];if(X===void 0)return!1;let U=X.length>1?X.slice():X;for(let Q=0,{length:J}=U;Q<J;Q++){let A=U[Q];switch(I.length){case 0:A.call(this);break;case 1:A.call(this,I[0]);break;case 2:A.call(this,I[0],I[1]);break;case 3:A.call(this,I[0],I[1],I[2]);break;default:A.apply(this,I);break}}return!0},QK=function($,...I){if($==="error")return ZY(this,I);var{_events:D}=this;if(D===void 0)return!1;var X=D[$];if(X===void 0)return!1;let U=X.length>1?X.slice():X;for(let Q=0,{length:J}=U;Q<J;Q++){let A=U[Q],T;switch(I.length){case 0:T=A.call(this);break;case 1:T=A.call(this,I[0]);break;case 2:T=A.call(this,I[0],I[1]);break;case 3:T=A.call(this,I[0],I[1],I[2]);break;default:T=A.apply(this,I);break}if(T!==void 0&&typeof T?.then==="function"&&T.then===Promise.prototype.then)OK(this,T,$,I)}return!0},c4,VK;var DU=C6(()=>{f4=Symbol.for,yU=Symbol("kCapture"),FY=f4("events.errorMonitor"),vK=Symbol("events.maxEventTargetListeners"),DK=Symbol("events.maxEventTargetListenersWarned"),zY=f4("nodejs.rejection"),HY=f4("nodejs.rejection"),SY=Array.prototype.slice,O0=W0.prototype={};O0._events=void 0;O0._eventsCount=0;O0._maxListeners=void 0;O0.setMaxListeners=function($){return y4($,"setMaxListeners",0),this._maxListeners=$,this};O0.constructor=W0;O0.getMaxListeners=function(){return this?._maxListeners??uU};O0.emit=XK;O0.addListener=function($,I){cI(I);var D=this._events;if(!D)D=this._events={__proto__:null},this._eventsCount=0;else if(D.newListener)this.emit("newListener",$,I.listener??I);var X=D[$];if(!X)D[$]=[I],this._eventsCount++;else{X.push(I);var U=this._maxListeners??uU;if(U>0&&X.length>U&&!X.warned)LY(this,$,X)}return this};O0.on=O0.addListener;O0.prependListener=function($,I){cI(I);var D=this._events;if(!D)D=this._events={__proto__:null},this._eventsCount=0;else if(D.newListener)this.emit("newListener",$,I.listener??I);var X=D[$];if(!X)D[$]=[I],this._eventsCount++;else{X.unshift(I);var U=this._maxListeners??uU;if(U>0&&X.length>U&&!X.warned)LY(this,$,X)}return this};O0.once=function($,I){cI(I);let D=EY.bind(this,$,I);return D.listener=I,this.addListener($,D),this};O0.prependOnceListener=function($,I){cI(I);let D=EY.bind(this,$,I);return D.listener=I,this.prependListener($,D),this};O0.removeListener=function($,I){cI(I);var{_events:D}=this;if(!D)return this;var X=D[$];if(!X)return this;var U=X.length;let Q=-1;for(let J=U-1;J>=0;J--)if(X[J]===I||X[J].listener===I){Q=J;break}if(Q<0)return this;if(Q===0)X.shift();else X.splice(Q,1);if(X.length===0)delete D[$],this._eventsCount--;return this};O0.off=O0.removeListener;O0.removeAllListeners=function($){var{_events:I}=this;if($&&I){if(I[$])delete I[$],this._eventsCount--}else this._events={__proto__:null};return this};O0.listeners=function($){var{_events:I}=this;if(!I)return[];var D=I[$];if(!D)return[];return D.map((X)=>X.listener??X)};O0.rawListeners=function($){var{_events:I}=this;if(!I)return[];var D=I[$];if(!D)return[];return D.slice()};O0.listenerCount=function($){var{_events:I}=this;if(!I)return 0;return I[$]?.length??0};O0.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};O0[yU]=!1;c4=class c4 extends Error{constructor($="The operation was aborted",I=void 0){if(I!==void 0&&typeof I!=="object")throw sU("options","Object",I);super($,I);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(W0,{captureRejections:{get(){return O0[yU]},set($){GK($,"EventEmitter.captureRejections"),O0[yU]=$},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return uU},set:($)=>{y4($,"defaultMaxListeners",0),uU=$}},kMaxEventTargetListeners:{value:vK,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:DK,enumerable:!1,configurable:!1,writable:!1}});Object.assign(W0,{once:TY,getEventListeners:MY,getMaxListeners:gY,setMaxListeners:PY,EventEmitter:W0,usingDomains:!1,captureRejectionSymbol:HY,errorMonitor:FY,addAbortListener:kY,init:W0,listenerCount:qY});VK=W0});var _0={};i0(_0,{transcode:()=>nA,resolveObjectURL:()=>bA,kStringMaxLength:()=>bV,kMaxLength:()=>Z6,isUtf8:()=>rA,isAscii:()=>oA,default:()=>dA,constants:()=>FA,btoa:()=>KA,atob:()=>zA,INSPECT_MAX_BYTES:()=>lV,File:()=>SA,Buffer:()=>V$,Blob:()=>AA});function QA($){var I=$.length;if(I%4>0)throw Error("Invalid string. Length must be a multiple of 4");var D=$.indexOf("=");if(D===-1)D=I;var X=D===I?0:4-D%4;return[D,X]}function YA($,I){return($+I)*3/4-I}function GA($){var I,D=QA($),X=D[0],U=D[1],Q=new Uint8Array(YA(X,U)),J=0,A=U>0?X-4:X,T;for(T=0;T<A;T+=4)I=IU[$.charCodeAt(T)]<<18|IU[$.charCodeAt(T+1)]<<12|IU[$.charCodeAt(T+2)]<<6|IU[$.charCodeAt(T+3)],Q[J++]=I>>16&255,Q[J++]=I>>8&255,Q[J++]=I&255;if(U===2)I=IU[$.charCodeAt(T)]<<2|IU[$.charCodeAt(T+1)]>>4,Q[J++]=I&255;if(U===1)I=IU[$.charCodeAt(T)]<<10|IU[$.charCodeAt(T+1)]<<4|IU[$.charCodeAt(T+2)]>>2,Q[J++]=I>>8&255,Q[J++]=I&255;return Q}function VA($){return WU[$>>18&63]+WU[$>>12&63]+WU[$>>6&63]+WU[$&63]}function WA($,I,D){var X,U=[];for(var Q=I;Q<D;Q+=3)X=($[Q]<<16&16711680)+($[Q+1]<<8&65280)+($[Q+2]&255),U.push(VA(X));return U.join("")}function cV($){var I,D=$.length,X=D%3,U=[],Q=16383;for(var J=0,A=D-X;J<A;J+=Q)U.push(WA($,J,J+Q>A?A:J+Q));if(X===1)I=$[D-1],U.push(WU[I>>2]+WU[I<<4&63]+"==");else if(X===2)I=($[D-2]<<8)+$[D-1],U.push(WU[I>>10]+WU[I>>4&63]+WU[I<<2&63]+"=");return U.join("")}function z4($,I,D,X,U){var Q,J,A=U*8-X-1,T=(1<<A)-1,Z=T>>1,L=-7,F=D?U-1:0,E=D?-1:1,P=$[I+F];F+=E,Q=P&(1<<-L)-1,P>>=-L,L+=A;for(;L>0;Q=Q*256+$[I+F],F+=E,L-=8);J=Q&(1<<-L)-1,Q>>=-L,L+=X;for(;L>0;J=J*256+$[I+F],F+=E,L-=8);if(Q===0)Q=1-Z;else if(Q===T)return J?NaN:(P?-1:1)*(1/0);else J=J+Math.pow(2,X),Q=Q-Z;return(P?-1:1)*J*Math.pow(2,Q-X)}function pV($,I,D,X,U,Q){var J,A,T,Z=Q*8-U-1,L=(1<<Z)-1,F=L>>1,E=U===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=X?0:Q-1,R=X?1:-1,k=I<0||I===0&&1/I<0?1:0;if(I=Math.abs(I),isNaN(I)||I===1/0)A=isNaN(I)?1:0,J=L;else{if(J=Math.floor(Math.log(I)/Math.LN2),I*(T=Math.pow(2,-J))<1)J--,T*=2;if(J+F>=1)I+=E/T;else I+=E*Math.pow(2,1-F);if(I*T>=2)J++,T/=2;if(J+F>=L)A=0,J=L;else if(J+F>=1)A=(I*T-1)*Math.pow(2,U),J=J+F;else A=I*Math.pow(2,F-1)*Math.pow(2,U),J=0}for(;U>=8;$[D+P]=A&255,P+=R,A/=256,U-=8);J=J<<U|A,Z+=U;for(;Z>0;$[D+P]=J&255,P+=R,J/=256,Z-=8);$[D+P-R]|=k*128}function ZU($){if($>Z6)throw RangeError('The value "'+$+'" is invalid for option "size"');let I=new Uint8Array($);return Object.setPrototypeOf(I,V$.prototype),I}function fQ($,I,D){return class extends D{constructor(){super();Object.defineProperty(this,"message",{value:I.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${$}]`,this.stack,delete this.name}get code(){return $}set code(X){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:X,writable:!0})}toString(){return`${this.name} [${$}]: ${this.message}`}}}function V$($,I,D){if(typeof $==="number"){if(typeof I==="string")throw TypeError('The "string" argument must be of type string. Received type number');return yQ($)}return rV($,I,D)}function rV($,I,D){if(typeof $==="string")return EA($,I);if(ArrayBuffer.isView($))return TA($);if($==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(KU($,ArrayBuffer)||$&&KU($.buffer,ArrayBuffer))return wQ($,I,D);if(typeof SharedArrayBuffer<"u"&&(KU($,SharedArrayBuffer)||$&&KU($.buffer,SharedArrayBuffer)))return wQ($,I,D);if(typeof $==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let X=$.valueOf&&$.valueOf();if(X!=null&&X!==$)return V$.from(X,I,D);let U=MA($);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]==="function")return V$.from($[Symbol.toPrimitive]("string"),I,D);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}function oV($){if(typeof $!=="number")throw TypeError('"size" argument must be of type number');else if($<0)throw RangeError('The value "'+$+'" is invalid for option "size"')}function LA($,I,D){if(oV($),$<=0)return ZU($);if(I!==void 0)return typeof D==="string"?ZU($).fill(I,D):ZU($).fill(I);return ZU($)}function yQ($){return oV($),ZU($<0?0:uQ($)|0)}function EA($,I){if(typeof I!=="string"||I==="")I="utf8";if(!V$.isEncoding(I))throw TypeError("Unknown encoding: "+I);let D=nV($,I)|0,X=ZU(D),U=X.write($,I);if(U!==D)X=X.slice(0,U);return X}function xQ($){let I=$.length<0?0:uQ($.length)|0,D=ZU(I);for(let X=0;X<I;X+=1)D[X]=$[X]&255;return D}function TA($){if(KU($,Uint8Array)){let I=new Uint8Array($);return wQ(I.buffer,I.byteOffset,I.byteLength)}return xQ($)}function wQ($,I,D){if(I<0||$.byteLength<I)throw RangeError('"offset" is outside of buffer bounds');if($.byteLength<I+(D||0))throw RangeError('"length" is outside of buffer bounds');let X;if(I===void 0&&D===void 0)X=new Uint8Array($);else if(D===void 0)X=new Uint8Array($,I);else X=new Uint8Array($,I,D);return Object.setPrototypeOf(X,V$.prototype),X}function MA($){if(V$.isBuffer($)){let I=uQ($.length)|0,D=ZU(I);if(D.length===0)return D;return $.copy(D,0,0,I),D}if($.length!==void 0){if(typeof $.length!=="number"||Number.isNaN($.length))return ZU(0);return xQ($)}if($.type==="Buffer"&&Array.isArray($.data))return xQ($.data)}function uQ($){if($>=Z6)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z6.toString(16)+" bytes");return $|0}function nV($,I){if(V$.isBuffer($))return $.length;if(ArrayBuffer.isView($)||KU($,ArrayBuffer))return $.byteLength;if(typeof $!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);let D=$.length,X=arguments.length>2&&arguments[2]===!0;if(!X&&D===0)return 0;let U=!1;for(;;)switch(I){case"ascii":case"latin1":case"binary":return D;case"utf8":case"utf-8":return cQ($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D*2;case"hex":return D>>>1;case"base64":return UW($).length;default:if(U)return X?-1:cQ($).length;I=(""+I).toLowerCase(),U=!0}}function PA($,I,D){let X=!1;if(I===void 0||I<0)I=0;if(I>this.length)return"";if(D===void 0||D>this.length)D=this.length;if(D<=0)return"";if(D>>>=0,I>>>=0,D<=I)return"";if(!$)$="utf8";while(!0)switch($){case"hex":return xA(this,I,D);case"utf8":case"utf-8":return mV(this,I,D);case"ascii":return NA(this,I,D);case"latin1":case"binary":return BA(this,I,D);case"base64":return _A(this,I,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wA(this,I,D);default:if(X)throw TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),X=!0}}function iU($,I,D){let X=$[I];$[I]=$[D],$[D]=X}function dV($,I,D,X,U){if($.length===0)return-1;if(typeof D==="string")X=D,D=0;else if(D>2147483647)D=2147483647;else if(D<-2147483648)D=-2147483648;if(D=+D,Number.isNaN(D))D=U?0:$.length-1;if(D<0)D=$.length+D;if(D>=$.length)if(U)return-1;else D=$.length-1;else if(D<0)if(U)D=0;else return-1;if(typeof I==="string")I=V$.from(I,X);if(V$.isBuffer(I)){if(I.length===0)return-1;return yV($,I,D,X,U)}else if(typeof I==="number"){if(I=I&255,typeof Uint8Array.prototype.indexOf==="function")if(U)return Uint8Array.prototype.indexOf.call($,I,D);else return Uint8Array.prototype.lastIndexOf.call($,I,D);return yV($,[I],D,X,U)}throw TypeError("val must be string, number or Buffer")}function yV($,I,D,X,U){let Q=1,J=$.length,A=I.length;if(X!==void 0){if(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le"){if($.length<2||I.length<2)return-1;Q=2,J/=2,A/=2,D/=2}}function T(L,F){if(Q===1)return L[F];else return L.readUInt16BE(F*Q)}let Z;if(U){let L=-1;for(Z=D;Z<J;Z++)if(T($,Z)===T(I,L===-1?0:Z-L)){if(L===-1)L=Z;if(Z-L+1===A)return L*Q}else{if(L!==-1)Z-=Z-L;L=-1}}else{if(D+A>J)D=J-A;for(Z=D;Z>=0;Z--){let L=!0;for(let F=0;F<A;F++)if(T($,Z+F)!==T(I,F)){L=!1;break}if(L)return Z}}return-1}function qA($,I,D,X){D=Number(D)||0;let U=$.length-D;if(!X)X=U;else if(X=Number(X),X>U)X=U;let Q=I.length;if(X>Q/2)X=Q/2;let J;for(J=0;J<X;++J){let A=parseInt(I.substr(J*2,2),16);if(Number.isNaN(A))return J;$[D+J]=A}return J}function RA($,I,D,X){return S4(cQ(I,$.length-D),$,D,X)}function gA($,I,D,X){return S4(uA(I),$,D,X)}function kA($,I,D,X){return S4(UW(I),$,D,X)}function CA($,I,D,X){return S4(hA(I,$.length-D),$,D,X)}function _A($,I,D){if(I===0&&D===$.length)return cV($);else return cV($.slice(I,D))}function mV($,I,D){D=Math.min($.length,D);let X=[],U=I;while(U<D){let Q=$[U],J=null,A=Q>239?4:Q>223?3:Q>191?2:1;if(U+A<=D){let T,Z,L,F;switch(A){case 1:if(Q<128)J=Q;break;case 2:if(T=$[U+1],(T&192)===128){if(F=(Q&31)<<6|T&63,F>127)J=F}break;case 3:if(T=$[U+1],Z=$[U+2],(T&192)===128&&(Z&192)===128){if(F=(Q&15)<<12|(T&63)<<6|Z&63,F>2047&&(F<55296||F>57343))J=F}break;case 4:if(T=$[U+1],Z=$[U+2],L=$[U+3],(T&192)===128&&(Z&192)===128&&(L&192)===128){if(F=(Q&15)<<18|(T&63)<<12|(Z&63)<<6|L&63,F>65535&&F<1114112)J=F}}}if(J===null)J=65533,A=1;else if(J>65535)J-=65536,X.push(J>>>10&1023|55296),J=56320|J&1023;X.push(J),U+=A}return jA(X)}function jA($){let I=$.length;if(I<=uV)return String.fromCharCode.apply(String,$);let D="",X=0;while(X<I)D+=String.fromCharCode.apply(String,$.slice(X,X+=uV));return D}function NA($,I,D){let X="";D=Math.min($.length,D);for(let U=I;U<D;++U)X+=String.fromCharCode($[U]&127);return X}function BA($,I,D){let X="";D=Math.min($.length,D);for(let U=I;U<D;++U)X+=String.fromCharCode($[U]);return X}function xA($,I,D){let X=$.length;if(!I||I<0)I=0;if(!D||D<0||D>X)D=X;let U="";for(let Q=I;Q<D;++Q)U+=pA[$[Q]];return U}function wA($,I,D){let X=$.slice(I,D),U="";for(let Q=0;Q<X.length-1;Q+=2)U+=String.fromCharCode(X[Q]+X[Q+1]*256);return U}function C0($,I,D){if($%1!==0||$<0)throw RangeError("offset is not uint");if($+I>D)throw RangeError("Trying to access beyond buffer length")}function n0($,I,D,X,U,Q){if(!V$.isBuffer($))throw TypeError('"buffer" argument must be a Buffer instance');if(I>U||I<Q)throw RangeError('"value" argument is out of bounds');if(D+X>$.length)throw RangeError("Index out of range")}function tV($,I,D,X,U){$W(I,X,U,$,D,7);let Q=Number(I&BigInt(4294967295));$[D++]=Q,Q=Q>>8,$[D++]=Q,Q=Q>>8,$[D++]=Q,Q=Q>>8,$[D++]=Q;let J=Number(I>>BigInt(32)&BigInt(4294967295));return $[D++]=J,J=J>>8,$[D++]=J,J=J>>8,$[D++]=J,J=J>>8,$[D++]=J,D}function iV($,I,D,X,U){$W(I,X,U,$,D,7);let Q=Number(I&BigInt(4294967295));$[D+7]=Q,Q=Q>>8,$[D+6]=Q,Q=Q>>8,$[D+5]=Q,Q=Q>>8,$[D+4]=Q;let J=Number(I>>BigInt(32)&BigInt(4294967295));return $[D+3]=J,J=J>>8,$[D+2]=J,J=J>>8,$[D+1]=J,J=J>>8,$[D]=J,D+8}function eV($,I,D,X,U,Q){if(D+X>$.length)throw RangeError("Index out of range");if(D<0)throw RangeError("Index out of range")}function aV($,I,D,X,U){if(I=+I,D=D>>>0,!U)eV($,I,D,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return pV($,I,D,X,23,4),D+4}function sV($,I,D,X,U){if(I=+I,D=D>>>0,!U)eV($,I,D,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return pV($,I,D,X,52,8),D+8}function hV($){let I="",D=$.length,X=$[0]==="-"?1:0;for(;D>=X+4;D-=3)I=`_${$.slice(D-3,D)}${I}`;return`${$.slice(0,D)}${I}`}function cA($,I,D){if(NI(I,"offset"),$[I]===void 0||$[I+D]===void 0)L6(I,$.length-(D+1))}function $W($,I,D,X,U,Q){if($>D||$<I){let J=typeof I==="bigint"?"n":"",A;if(Q>3)if(I===0||I===BigInt(0))A=`>= 0${J} and < 2${J} ** ${(Q+1)*8}${J}`;else A=`>= -(2${J} ** ${(Q+1)*8-1}${J}) and < 2 ** ${(Q+1)*8-1}${J}`;else A=`>= ${I}${J} and <= ${D}${J}`;throw new BQ("value",A,$)}cA(X,U,Q)}function NI($,I){if(typeof $!=="number")throw new ZA(I,"number",$)}function L6($,I,D){if(Math.floor($)!==$)throw NI($,D),new BQ(D||"offset","an integer",$);if(I<0)throw new HA;throw new BQ(D||"offset",`>= ${D?1:0} and <= ${I}`,$)}function yA($){if($=$.split("=")[0],$=$.trim().replace(fA,""),$.length<2)return"";while($.length%4!==0)$=$+"=";return $}function cQ($,I){I=I||1/0;let D,X=$.length,U=null,Q=[];for(let J=0;J<X;++J){if(D=$.charCodeAt(J),D>55295&&D<57344){if(!U){if(D>56319){if((I-=3)>-1)Q.push(239,191,189);continue}else if(J+1===X){if((I-=3)>-1)Q.push(239,191,189);continue}U=D;continue}if(D<56320){if((I-=3)>-1)Q.push(239,191,189);U=D;continue}D=(U-55296<<10|D-56320)+65536}else if(U){if((I-=3)>-1)Q.push(239,191,189)}if(U=null,D<128){if((I-=1)<0)break;Q.push(D)}else if(D<2048){if((I-=2)<0)break;Q.push(D>>6|192,D&63|128)}else if(D<65536){if((I-=3)<0)break;Q.push(D>>12|224,D>>6&63|128,D&63|128)}else if(D<1114112){if((I-=4)<0)break;Q.push(D>>18|240,D>>12&63|128,D>>6&63|128,D&63|128)}else throw Error("Invalid code point")}return Q}function uA($){let I=[];for(let D=0;D<$.length;++D)I.push($.charCodeAt(D)&255);return I}function hA($,I){let D,X,U,Q=[];for(let J=0;J<$.length;++J){if((I-=2)<0)break;D=$.charCodeAt(J),X=D>>8,U=D%256,Q.push(U),Q.push(X)}return Q}function UW($){return GA(yA($))}function S4($,I,D,X){let U;for(U=0;U<X;++U){if(U+D>=I.length||U>=$.length)break;I[U+D]=$[U]}return U}function KU($,I){return $ instanceof I||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===I.name}function wU($){return typeof BigInt>"u"?lA:$}function lA(){throw Error("BigInt not supported")}function hQ($){return()=>{throw Error($+" is not implemented for node:buffer browser polyfill")}}var WU,IU,NQ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tU,wV,fV,lV=50,Z6=2147483647,bV=536870888,KA,zA,SA,AA,FA,HA,ZA,BQ,uV=4096,fA,pA,bA,rA,oA=($)=>{for(let I of $)if(I.charCodeAt(0)>127)return!1;return!0},nA,dA;var j0=C6(()=>{WU=[],IU=[];for(tU=0,wV=NQ.length;tU<wV;++tU)WU[tU]=NQ[tU],IU[NQ.charCodeAt(tU)]=tU;IU[45]=62;IU[95]=63;fV=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,KA=globalThis.btoa,zA=globalThis.atob,SA=globalThis.File,AA=globalThis.Blob,FA={MAX_LENGTH:Z6,MAX_STRING_LENGTH:bV};HA=fQ("ERR_BUFFER_OUT_OF_BOUNDS",function($){if($)return`${$} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),ZA=fQ("ERR_INVALID_ARG_TYPE",function($,I){return`The "${$}" argument must be of type number. Received type ${typeof I}`},TypeError),BQ=fQ("ERR_OUT_OF_RANGE",function($,I,D){let X=`The value of "${$}" is out of range.`,U=D;if(Number.isInteger(D)&&Math.abs(D)>4294967296)U=hV(String(D));else if(typeof D==="bigint"){if(U=String(D),D>BigInt(2)**BigInt(32)||D<-(BigInt(2)**BigInt(32)))U=hV(U);U+="n"}return X+=` It must be ${I}. Received ${U}`,X},RangeError);Object.defineProperty(V$.prototype,"parent",{enumerable:!0,get:function(){if(!V$.isBuffer(this))return;return this.buffer}});Object.defineProperty(V$.prototype,"offset",{enumerable:!0,get:function(){if(!V$.isBuffer(this))return;return this.byteOffset}});V$.poolSize=8192;V$.from=function($,I,D){return rV($,I,D)};Object.setPrototypeOf(V$.prototype,Uint8Array.prototype);Object.setPrototypeOf(V$,Uint8Array);V$.alloc=function($,I,D){return LA($,I,D)};V$.allocUnsafe=function($){return yQ($)};V$.allocUnsafeSlow=function($){return yQ($)};V$.isBuffer=function($){return $!=null&&$._isBuffer===!0&&$!==V$.prototype};V$.compare=function($,I){if(KU($,Uint8Array))$=V$.from($,$.offset,$.byteLength);if(KU(I,Uint8Array))I=V$.from(I,I.offset,I.byteLength);if(!V$.isBuffer($)||!V$.isBuffer(I))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===I)return 0;let D=$.length,X=I.length;for(let U=0,Q=Math.min(D,X);U<Q;++U)if($[U]!==I[U]){D=$[U],X=I[U];break}if(D<X)return-1;if(X<D)return 1;return 0};V$.isEncoding=function($){switch(String($).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};V$.concat=function($,I){if(!Array.isArray($))throw TypeError('"list" argument must be an Array of Buffers');if($.length===0)return V$.alloc(0);let D;if(I===void 0){I=0;for(D=0;D<$.length;++D)I+=$[D].length}let X=V$.allocUnsafe(I),U=0;for(D=0;D<$.length;++D){let Q=$[D];if(KU(Q,Uint8Array))if(U+Q.length>X.length){if(!V$.isBuffer(Q))Q=V$.from(Q);Q.copy(X,U)}else Uint8Array.prototype.set.call(X,Q,U);else if(!V$.isBuffer(Q))throw TypeError('"list" argument must be an Array of Buffers');else Q.copy(X,U);U+=Q.length}return X};V$.byteLength=nV;V$.prototype._isBuffer=!0;V$.prototype.swap16=function(){let $=this.length;if($%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<$;I+=2)iU(this,I,I+1);return this};V$.prototype.swap32=function(){let $=this.length;if($%4!==0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<$;I+=4)iU(this,I,I+3),iU(this,I+1,I+2);return this};V$.prototype.swap64=function(){let $=this.length;if($%8!==0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<$;I+=8)iU(this,I,I+7),iU(this,I+1,I+6),iU(this,I+2,I+5),iU(this,I+3,I+4);return this};V$.prototype.toString=function(){let $=this.length;if($===0)return"";if(arguments.length===0)return mV(this,0,$);return PA.apply(this,arguments)};V$.prototype.toLocaleString=V$.prototype.toString;V$.prototype.equals=function($){if(!V$.isBuffer($))throw TypeError("Argument must be a Buffer");if(this===$)return!0;return V$.compare(this,$)===0};V$.prototype.inspect=function(){let $="",I=lV;if($=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I)$+=" ... ";return"<Buffer "+$+">"};if(fV)V$.prototype[fV]=V$.prototype.inspect;V$.prototype.compare=function($,I,D,X,U){if(KU($,Uint8Array))$=V$.from($,$.offset,$.byteLength);if(!V$.isBuffer($))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(I===void 0)I=0;if(D===void 0)D=$?$.length:0;if(X===void 0)X=0;if(U===void 0)U=this.length;if(I<0||D>$.length||X<0||U>this.length)throw RangeError("out of range index");if(X>=U&&I>=D)return 0;if(X>=U)return-1;if(I>=D)return 1;if(I>>>=0,D>>>=0,X>>>=0,U>>>=0,this===$)return 0;let Q=U-X,J=D-I,A=Math.min(Q,J),T=this.slice(X,U),Z=$.slice(I,D);for(let L=0;L<A;++L)if(T[L]!==Z[L]){Q=T[L],J=Z[L];break}if(Q<J)return-1;if(J<Q)return 1;return 0};V$.prototype.includes=function($,I,D){return this.indexOf($,I,D)!==-1};V$.prototype.indexOf=function($,I,D){return dV(this,$,I,D,!0)};V$.prototype.lastIndexOf=function($,I,D){return dV(this,$,I,D,!1)};V$.prototype.write=function($,I,D,X){if(I===void 0)X="utf8",D=this.length,I=0;else if(D===void 0&&typeof I==="string")X=I,D=this.length,I=0;else if(isFinite(I))if(I=I>>>0,isFinite(D)){if(D=D>>>0,X===void 0)X="utf8"}else X=D,D=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let U=this.length-I;if(D===void 0||D>U)D=U;if($.length>0&&(D<0||I<0)||I>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!X)X="utf8";let Q=!1;for(;;)switch(X){case"hex":return qA(this,$,I,D);case"utf8":case"utf-8":return RA(this,$,I,D);case"ascii":case"latin1":case"binary":return gA(this,$,I,D);case"base64":return kA(this,$,I,D);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return CA(this,$,I,D);default:if(Q)throw TypeError("Unknown encoding: "+X);X=(""+X).toLowerCase(),Q=!0}};V$.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};V$.prototype.slice=function($,I){let D=this.length;if($=~~$,I=I===void 0?D:~~I,$<0){if($+=D,$<0)$=0}else if($>D)$=D;if(I<0){if(I+=D,I<0)I=0}else if(I>D)I=D;if(I<$)I=$;let X=this.subarray($,I);return Object.setPrototypeOf(X,V$.prototype),X};V$.prototype.readUintLE=V$.prototype.readUIntLE=function($,I,D){if($=$>>>0,I=I>>>0,!D)C0($,I,this.length);let X=this[$],U=1,Q=0;while(++Q<I&&(U*=256))X+=this[$+Q]*U;return X};V$.prototype.readUintBE=V$.prototype.readUIntBE=function($,I,D){if($=$>>>0,I=I>>>0,!D)C0($,I,this.length);let X=this[$+--I],U=1;while(I>0&&(U*=256))X+=this[$+--I]*U;return X};V$.prototype.readUint8=V$.prototype.readUInt8=function($,I){if($=$>>>0,!I)C0($,1,this.length);return this[$]};V$.prototype.readUint16LE=V$.prototype.readUInt16LE=function($,I){if($=$>>>0,!I)C0($,2,this.length);return this[$]|this[$+1]<<8};V$.prototype.readUint16BE=V$.prototype.readUInt16BE=function($,I){if($=$>>>0,!I)C0($,2,this.length);return this[$]<<8|this[$+1]};V$.prototype.readUint32LE=V$.prototype.readUInt32LE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216};V$.prototype.readUint32BE=V$.prototype.readUInt32BE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])};V$.prototype.readBigUInt64LE=wU(function($){$=$>>>0,NI($,"offset");let I=this[$],D=this[$+7];if(I===void 0||D===void 0)L6($,this.length-8);let X=I+this[++$]*256+this[++$]*65536+this[++$]*16777216,U=this[++$]+this[++$]*256+this[++$]*65536+D*16777216;return BigInt(X)+(BigInt(U)<<BigInt(32))});V$.prototype.readBigUInt64BE=wU(function($){$=$>>>0,NI($,"offset");let I=this[$],D=this[$+7];if(I===void 0||D===void 0)L6($,this.length-8);let X=I*16777216+this[++$]*65536+this[++$]*256+this[++$],U=this[++$]*16777216+this[++$]*65536+this[++$]*256+D;return(BigInt(X)<<BigInt(32))+BigInt(U)});V$.prototype.readIntLE=function($,I,D){if($=$>>>0,I=I>>>0,!D)C0($,I,this.length);let X=this[$],U=1,Q=0;while(++Q<I&&(U*=256))X+=this[$+Q]*U;if(U*=128,X>=U)X-=Math.pow(2,8*I);return X};V$.prototype.readIntBE=function($,I,D){if($=$>>>0,I=I>>>0,!D)C0($,I,this.length);let X=I,U=1,Q=this[$+--X];while(X>0&&(U*=256))Q+=this[$+--X]*U;if(U*=128,Q>=U)Q-=Math.pow(2,8*I);return Q};V$.prototype.readInt8=function($,I){if($=$>>>0,!I)C0($,1,this.length);if(!(this[$]&128))return this[$];return(255-this[$]+1)*-1};V$.prototype.readInt16LE=function($,I){if($=$>>>0,!I)C0($,2,this.length);let D=this[$]|this[$+1]<<8;return D&32768?D|4294901760:D};V$.prototype.readInt16BE=function($,I){if($=$>>>0,!I)C0($,2,this.length);let D=this[$+1]|this[$]<<8;return D&32768?D|4294901760:D};V$.prototype.readInt32LE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24};V$.prototype.readInt32BE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]};V$.prototype.readBigInt64LE=wU(function($){$=$>>>0,NI($,"offset");let I=this[$],D=this[$+7];if(I===void 0||D===void 0)L6($,this.length-8);let X=this[$+4]+this[$+5]*256+this[$+6]*65536+(D<<24);return(BigInt(X)<<BigInt(32))+BigInt(I+this[++$]*256+this[++$]*65536+this[++$]*16777216)});V$.prototype.readBigInt64BE=wU(function($){$=$>>>0,NI($,"offset");let I=this[$],D=this[$+7];if(I===void 0||D===void 0)L6($,this.length-8);let X=(I<<24)+this[++$]*65536+this[++$]*256+this[++$];return(BigInt(X)<<BigInt(32))+BigInt(this[++$]*16777216+this[++$]*65536+this[++$]*256+D)});V$.prototype.readFloatLE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return z4(this,$,!0,23,4)};V$.prototype.readFloatBE=function($,I){if($=$>>>0,!I)C0($,4,this.length);return z4(this,$,!1,23,4)};V$.prototype.readDoubleLE=function($,I){if($=$>>>0,!I)C0($,8,this.length);return z4(this,$,!0,52,8)};V$.prototype.readDoubleBE=function($,I){if($=$>>>0,!I)C0($,8,this.length);return z4(this,$,!1,52,8)};V$.prototype.writeUintLE=V$.prototype.writeUIntLE=function($,I,D,X){if($=+$,I=I>>>0,D=D>>>0,!X){let J=Math.pow(2,8*D)-1;n0(this,$,I,D,J,0)}let U=1,Q=0;this[I]=$&255;while(++Q<D&&(U*=256))this[I+Q]=$/U&255;return I+D};V$.prototype.writeUintBE=V$.prototype.writeUIntBE=function($,I,D,X){if($=+$,I=I>>>0,D=D>>>0,!X){let J=Math.pow(2,8*D)-1;n0(this,$,I,D,J,0)}let U=D-1,Q=1;this[I+U]=$&255;while(--U>=0&&(Q*=256))this[I+U]=$/Q&255;return I+D};V$.prototype.writeUint8=V$.prototype.writeUInt8=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,1,255,0);return this[I]=$&255,I+1};V$.prototype.writeUint16LE=V$.prototype.writeUInt16LE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,2,65535,0);return this[I]=$&255,this[I+1]=$>>>8,I+2};V$.prototype.writeUint16BE=V$.prototype.writeUInt16BE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,2,65535,0);return this[I]=$>>>8,this[I+1]=$&255,I+2};V$.prototype.writeUint32LE=V$.prototype.writeUInt32LE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,4,4294967295,0);return this[I+3]=$>>>24,this[I+2]=$>>>16,this[I+1]=$>>>8,this[I]=$&255,I+4};V$.prototype.writeUint32BE=V$.prototype.writeUInt32BE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,4,4294967295,0);return this[I]=$>>>24,this[I+1]=$>>>16,this[I+2]=$>>>8,this[I+3]=$&255,I+4};V$.prototype.writeBigUInt64LE=wU(function($,I=0){return tV(this,$,I,BigInt(0),BigInt("0xffffffffffffffff"))});V$.prototype.writeBigUInt64BE=wU(function($,I=0){return iV(this,$,I,BigInt(0),BigInt("0xffffffffffffffff"))});V$.prototype.writeIntLE=function($,I,D,X){if($=+$,I=I>>>0,!X){let A=Math.pow(2,8*D-1);n0(this,$,I,D,A-1,-A)}let U=0,Q=1,J=0;this[I]=$&255;while(++U<D&&(Q*=256)){if($<0&&J===0&&this[I+U-1]!==0)J=1;this[I+U]=($/Q>>0)-J&255}return I+D};V$.prototype.writeIntBE=function($,I,D,X){if($=+$,I=I>>>0,!X){let A=Math.pow(2,8*D-1);n0(this,$,I,D,A-1,-A)}let U=D-1,Q=1,J=0;this[I+U]=$&255;while(--U>=0&&(Q*=256)){if($<0&&J===0&&this[I+U+1]!==0)J=1;this[I+U]=($/Q>>0)-J&255}return I+D};V$.prototype.writeInt8=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,1,127,-128);if($<0)$=255+$+1;return this[I]=$&255,I+1};V$.prototype.writeInt16LE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,2,32767,-32768);return this[I]=$&255,this[I+1]=$>>>8,I+2};V$.prototype.writeInt16BE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,2,32767,-32768);return this[I]=$>>>8,this[I+1]=$&255,I+2};V$.prototype.writeInt32LE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,4,2147483647,-2147483648);return this[I]=$&255,this[I+1]=$>>>8,this[I+2]=$>>>16,this[I+3]=$>>>24,I+4};V$.prototype.writeInt32BE=function($,I,D){if($=+$,I=I>>>0,!D)n0(this,$,I,4,2147483647,-2147483648);if($<0)$=4294967295+$+1;return this[I]=$>>>24,this[I+1]=$>>>16,this[I+2]=$>>>8,this[I+3]=$&255,I+4};V$.prototype.writeBigInt64LE=wU(function($,I=0){return tV(this,$,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V$.prototype.writeBigInt64BE=wU(function($,I=0){return iV(this,$,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V$.prototype.writeFloatLE=function($,I,D){return aV(this,$,I,!0,D)};V$.prototype.writeFloatBE=function($,I,D){return aV(this,$,I,!1,D)};V$.prototype.writeDoubleLE=function($,I,D){return sV(this,$,I,!0,D)};V$.prototype.writeDoubleBE=function($,I,D){return sV(this,$,I,!1,D)};V$.prototype.copy=function($,I,D,X){if(!V$.isBuffer($))throw TypeError("argument should be a Buffer");if(!D)D=0;if(!X&&X!==0)X=this.length;if(I>=$.length)I=$.length;if(!I)I=0;if(X>0&&X<D)X=D;if(X===D)return 0;if($.length===0||this.length===0)return 0;if(I<0)throw RangeError("targetStart out of bounds");if(D<0||D>=this.length)throw RangeError("Index out of range");if(X<0)throw RangeError("sourceEnd out of bounds");if(X>this.length)X=this.length;if($.length-I<X-D)X=$.length-I+D;let U=X-D;if(this===$&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(I,D,X);else Uint8Array.prototype.set.call($,this.subarray(D,X),I);return U};V$.prototype.fill=function($,I,D,X){if(typeof $==="string"){if(typeof I==="string")X=I,I=0,D=this.length;else if(typeof D==="string")X=D,D=this.length;if(X!==void 0&&typeof X!=="string")throw TypeError("encoding must be a string");if(typeof X==="string"&&!V$.isEncoding(X))throw TypeError("Unknown encoding: "+X);if($.length===1){let Q=$.charCodeAt(0);if(X==="utf8"&&Q<128||X==="latin1")$=Q}}else if(typeof $==="number")$=$&255;else if(typeof $==="boolean")$=Number($);if(I<0||this.length<I||this.length<D)throw RangeError("Out of range index");if(D<=I)return this;if(I=I>>>0,D=D===void 0?this.length:D>>>0,!$)$=0;let U;if(typeof $==="number")for(U=I;U<D;++U)this[U]=$;else{let Q=V$.isBuffer($)?$:V$.from($,X),J=Q.length;if(J===0)throw TypeError('The value "'+$+'" is invalid for argument "value"');for(U=0;U<D-I;++U)this[U+I]=Q[U%J]}return this};fA=/[^+/0-9A-Za-z-_]/g;pA=function(){let $=Array(256);for(let I=0;I<16;++I){let D=I*16;for(let X=0;X<16;++X)$[D+X]="0123456789abcdef"[I]+"0123456789abcdef"[X]}return $}();bA=hQ("resolveObjectURL"),rA=hQ("isUtf8"),nA=hQ("transcode"),dA=V$});var VW={};i0(VW,{types:()=>v2,promisify:()=>XW,log:()=>DW,isUndefined:()=>BI,isSymbol:()=>O2,isString:()=>E4,isRegExp:()=>A4,isPrimitive:()=>J2,isObject:()=>xI,isNumber:()=>vW,isNullOrUndefined:()=>D2,isNull:()=>L4,isFunction:()=>H4,isError:()=>F4,isDate:()=>rQ,isBuffer:()=>X2,isBoolean:()=>nQ,isArray:()=>IW,inspect:()=>eU,inherits:()=>OW,format:()=>oQ,deprecate:()=>tA,default:()=>G2,debuglog:()=>iA,callbackifyOnRejected:()=>tQ,callbackify:()=>QW,_extend:()=>mQ,TextEncoder:()=>YW,TextDecoder:()=>GW});function oQ($,...I){if(!E4($)){var D=[$];for(var X=0;X<I.length;X++)D.push(eU(I[X]));return D.join(" ")}var X=0,U=I.length,Q=String($).replace(mA,function(A){if(A==="%%")return"%";if(X>=U)return A;switch(A){case"%s":return String(I[X++]);case"%d":return Number(I[X++]);case"%j":try{return JSON.stringify(I[X++])}catch(T){return"[Circular]"}default:return A}});for(var J=I[X];X<U;J=I[++X])if(L4(J)||!xI(J))Q+=" "+J;else Q+=" "+eU(J);return Q}function tA($,I){if(typeof process>"u"||process?.noDeprecation===!0)return $;var D=!1;function X(...U){if(!D){if(process.throwDeprecation)throw Error(I);else if(process.traceDeprecation)console.trace(I);else console.error(I);D=!0}return $.apply(this,...U)}return X}function eA($,I){var D=eU.styles[I];if(D)return"\x1B["+eU.colors[D][0]+"m"+$+"\x1B["+eU.colors[D][1]+"m";else return $}function aA($,I){return $}function sA($){var I={};return $.forEach(function(D,X){I[D]=!0}),I}function Z4($,I,D){if($.customInspect&&I&&H4(I.inspect)&&I.inspect!==eU&&!(I.constructor&&I.constructor.prototype===I)){var X=I.inspect(D,$);if(!E4(X))X=Z4($,X,D);return X}var U=$2($,I);if(U)return U;var Q=Object.keys(I),J=sA(Q);if($.showHidden)Q=Object.getOwnPropertyNames(I);if(F4(I)&&(Q.indexOf("message")>=0||Q.indexOf("description")>=0))return pQ(I);if(Q.length===0){if(H4(I)){var A=I.name?": "+I.name:"";return $.stylize("[Function"+A+"]","special")}if(A4(I))return $.stylize(RegExp.prototype.toString.call(I),"regexp");if(rQ(I))return $.stylize(Date.prototype.toString.call(I),"date");if(F4(I))return pQ(I)}var T="",Z=!1,L=["{","}"];if(IW(I))Z=!0,L=["[","]"];if(H4(I)){var F=I.name?": "+I.name:"";T=" [Function"+F+"]"}if(A4(I))T=" "+RegExp.prototype.toString.call(I);if(rQ(I))T=" "+Date.prototype.toUTCString.call(I);if(F4(I))T=" "+pQ(I);if(Q.length===0&&(!Z||I.length==0))return L[0]+T+L[1];if(D<0)if(A4(I))return $.stylize(RegExp.prototype.toString.call(I),"regexp");else return $.stylize("[Object]","special");$.seen.push(I);var E;if(Z)E=U2($,I,D,J,Q);else E=Q.map(function(P){return bQ($,I,D,J,P,Z)});return $.seen.pop(),I2(E,T,L)}function $2($,I){if(BI(I))return $.stylize("undefined","undefined");if(E4(I)){var D="'"+JSON.stringify(I).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return $.stylize(D,"string")}if(vW(I))return $.stylize(""+I,"number");if(nQ(I))return $.stylize(""+I,"boolean");if(L4(I))return $.stylize("null","null")}function pQ($){return"["+Error.prototype.toString.call($)+"]"}function U2($,I,D,X,U){var Q=[];for(var J=0,A=I.length;J<A;++J)if(JW(I,String(J)))Q.push(bQ($,I,D,X,String(J),!0));else Q.push("");return U.forEach(function(T){if(!T.match(/^\d+$/))Q.push(bQ($,I,D,X,T,!0))}),Q}function bQ($,I,D,X,U,Q){var J,A,T;if(T=Object.getOwnPropertyDescriptor(I,U)||{value:I[U]},T.get)if(T.set)A=$.stylize("[Getter/Setter]","special");else A=$.stylize("[Getter]","special");else if(T.set)A=$.stylize("[Setter]","special");if(!JW(X,U))J="["+U+"]";if(!A)if($.seen.indexOf(T.value)<0){if(L4(D))A=Z4($,T.value,null);else A=Z4($,T.value,D-1);if(A.indexOf(`
2
+ `)>-1)if(Q)A=A.split(`
3
+ `).map(function(Z){return" "+Z}).join(`
4
+ `).slice(2);else A=`
5
+ `+A.split(`
6
+ `).map(function(Z){return" "+Z}).join(`
7
+ `)}else A=$.stylize("[Circular]","special");if(BI(J)){if(Q&&U.match(/^\d+$/))return A;if(J=JSON.stringify(""+U),J.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))J=J.slice(1,-1),J=$.stylize(J,"name");else J=J.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),J=$.stylize(J,"string")}return J+": "+A}function I2($,I,D){var X=0,U=$.reduce(function(Q,J){if(X++,J.indexOf(`
8
+ `)>=0)X++;return Q+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(U>60)return D[0]+(I===""?"":I+`
9
9
  `)+" "+$.join(`,
10
- `)+" "+J[1];return J[0]+U+" "+$.join(", ")+" "+J[1]}function rG($){return Array.isArray($)}function LQ($){return typeof $==="boolean"}function G6($){return $===null}function DK($){return $==null}function nG($){return typeof $==="number"}function V6($){return typeof $==="string"}function zK($){return typeof $==="symbol"}function sU($){return $===void 0}function X6($){return $I($)&&EQ($)==="[object RegExp]"}function $I($){return typeof $==="object"&&$!==null}function HQ($){return $I($)&&EQ($)==="[object Date]"}function J6($){return $I($)&&(EQ($)==="[object Error]"||$ instanceof Error)}function Q6($){return typeof $==="function"}function KK($){return $===null||typeof $==="boolean"||typeof $==="number"||typeof $==="string"||typeof $==="symbol"||typeof $>"u"}function AK($){return $ instanceof Buffer}function EQ($){return Object.prototype.toString.call($)}function KQ($){return $<10?"0"+$.toString(10):$.toString(10)}function FK(){var $=new Date,U=[KQ($.getHours()),KQ($.getMinutes()),KQ($.getSeconds())].join(":");return[$.getDate(),HK[$.getMonth()],U].join(" ")}function mG(...$){console.log("%s - %s",FK(),FQ.apply(null,$))}function dG($,U){if(U)$.super_=U,$.prototype=Object.create(U.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}})}function ZQ($,U){if(!U||!$I(U))return $;var J=Object.keys(U),V=J.length;while(V--)$[J[V]]=U[J[V]];return $}function tG($,U){return Object.prototype.hasOwnProperty.call($,U)}function vQ($,U){if(!$){var J=Error("Promise was rejected with a falsy value");J.reason=$,$=J}return U($)}function eG($){if(typeof $!=="function")throw TypeError('The "original" argument must be of type Function');function U(...J){var V=J.pop();if(typeof V!=="function")throw TypeError("The last argument must be of type Function");var I=this,S=function(...Y){return V.apply(I,...Y)};$.apply(this,J).then(function(Y){process.nextTick(S.bind(null,null,Y))},function(Y){process.nextTick(vQ.bind(null,Y,S))})}return Object.setPrototypeOf(U,Object.getPrototypeOf($)),Object.defineProperties(U,Object.getOwnPropertyDescriptors($)),U}var IK,XK,BU,WK=()=>{},HK,iG,aG,sG,LK;var UV=eI(()=>{IK=/%[sdj%]/g;XK=(($={},U={},J)=>((J=typeof process<"u"&&!1)&&(J=J.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),U=new RegExp("^"+J+"$","i"),(V)=>{if(V=V.toUpperCase(),!$[V])if(U.test(V))$[V]=function(...I){console.error("%s: %s",V,pid,FQ.apply(null,...I))};else $[V]=function(){};return $[V]}))(),BU=(($)=>($.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},$.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},$.custom=Symbol.for("nodejs.util.inspect.custom"),$))(function($,U,...J){var V={seen:[],stylize:QK};if(J.length>=1)V.depth=J[0];if(J.length>=2)V.colors=J[1];if(LQ(U))V.showHidden=U;else if(U)ZQ(V,U);if(sU(V.showHidden))V.showHidden=!1;if(sU(V.depth))V.depth=2;if(sU(V.colors))V.colors=!1;if(V.colors)V.stylize=JK;return Y6(V,$,V.depth)});HK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];iG=(($)=>($.custom=Symbol.for("nodejs.util.promisify.custom"),$))(function($){if(typeof $!=="function")throw TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&$[kCustomPromisifiedSymbol]){var U=$[kCustomPromisifiedSymbol];if(typeof U!=="function")throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,kCustomPromisifiedSymbol,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(...J){var V,I,S=new Promise(function(Y,M){V=Y,I=M});J.push(function(Y,M){if(Y)I(Y);else V(M)});try{$.apply(this,J)}catch(Y){I(Y)}return S}if(Object.setPrototypeOf(U,Object.getPrototypeOf($)),kCustomPromisifiedSymbol)Object.defineProperty(U,kCustomPromisifiedSymbol,{value:U,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(U,Object.getOwnPropertyDescriptors($))});({TextEncoder:aG,TextDecoder:sG}=globalThis),LK={TextEncoder:aG,TextDecoder:sG,promisify:iG,log:mG,inherits:dG,_extend:ZQ,callbackifyOnRejected:vQ,callbackify:eG}});var qQ=oV((bL,VV)=>{var i0=($,U)=>()=>(U||$((U={exports:{}}).exports,U),U.exports),O$=i0(($,U)=>{class J extends Error{constructor(V){if(!Array.isArray(V))throw TypeError(`Expected input to be an Array, got ${typeof V}`);let I="";for(let S=0;S<V.length;S++)I+=` ${V[S].stack}
11
- `;super(I);this.name="AggregateError",this.errors=V}}U.exports={AggregateError:J,ArrayIsArray(V){return Array.isArray(V)},ArrayPrototypeIncludes(V,I){return V.includes(I)},ArrayPrototypeIndexOf(V,I){return V.indexOf(I)},ArrayPrototypeJoin(V,I){return V.join(I)},ArrayPrototypeMap(V,I){return V.map(I)},ArrayPrototypePop(V,I){return V.pop(I)},ArrayPrototypePush(V,I){return V.push(I)},ArrayPrototypeSlice(V,I,S){return V.slice(I,S)},Error,FunctionPrototypeCall(V,I,...S){return V.call(I,...S)},FunctionPrototypeSymbolHasInstance(V,I){return Function.prototype[Symbol.hasInstance].call(V,I)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(V,I){return Object.defineProperties(V,I)},ObjectDefineProperty(V,I,S){return Object.defineProperty(V,I,S)},ObjectGetOwnPropertyDescriptor(V,I){return Object.getOwnPropertyDescriptor(V,I)},ObjectKeys(V){return Object.keys(V)},ObjectSetPrototypeOf(V,I){return Object.setPrototypeOf(V,I)},Promise,PromisePrototypeCatch(V,I){return V.catch(I)},PromisePrototypeThen(V,I,S){return V.then(I,S)},PromiseReject(V){return Promise.reject(V)},PromiseResolve(V){return Promise.resolve(V)},ReflectApply:Reflect.apply,RegExpPrototypeTest(V,I){return V.test(I)},SafeSet:Set,String,StringPrototypeSlice(V,I,S){return V.slice(I,S)},StringPrototypeToLowerCase(V){return V.toLowerCase()},StringPrototypeToUpperCase(V){return V.toUpperCase()},StringPrototypeTrim(V){return V.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(V,I,S){return V.set(I,S)},Boolean,Uint8Array}}),IV=i0(($,U)=>{U.exports={format(J,...V){return J.replace(/%([sdifj])/g,function(...[I,S]){let Y=V.shift();if(S==="f")return Y.toFixed(6);else if(S==="j")return JSON.stringify(Y);else if(S==="s"&&typeof Y==="object")return`${Y.constructor!==Object?Y.constructor.name:""} {}`.trim();else return Y.toString()})},inspect(J){switch(typeof J){case"string":if(J.includes("'")){if(!J.includes('"'))return`"${J}"`;else if(!J.includes("`")&&!J.includes("${"))return`\`${J}\``}return`'${J}'`;case"number":if(isNaN(J))return"NaN";else if(Object.is(J,-0))return String(J);return J;case"bigint":return`${String(J)}n`;case"boolean":case"undefined":return String(J);case"object":return"{}"}}}}),B$=i0(($,U)=>{var{format:J,inspect:V}=IV(),{AggregateError:I}=O$(),S=globalThis.AggregateError||I,Y=Symbol("kIsNodeError"),M=["string","function","number","object","Function","Object","boolean","bigint","symbol"],T=/^([A-Z][a-z0-9]*)+$/,L={};function E(_,g){if(!_)throw new L.ERR_INTERNAL_ASSERTION(g)}function F(_){let g="",N=_.length,x=_[0]==="-"?1:0;for(;N>=x+4;N-=3)g=`_${_.slice(N-3,N)}${g}`;return`${_.slice(0,N)}${g}`}function Z(_,g,N){if(typeof g==="function")return E(g.length<=N.length,`Code: ${_}; The provided arguments length (${N.length}) does not match the required ones (${g.length}).`),g(...N);let x=(g.match(/%[dfijoOs]/g)||[]).length;if(E(x===N.length,`Code: ${_}; The provided arguments length (${N.length}) does not match the required ones (${x}).`),N.length===0)return g;return J(g,...N)}function P(_,g,N){if(!N)N=Error;class x extends N{constructor(...w){super(Z(_,g,w))}toString(){return`${this.name} [${_}]: ${this.message}`}}Object.defineProperties(x.prototype,{name:{value:N.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${_}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),x.prototype.code=_,x.prototype[Y]=!0,L[_]=x}function q(_){let g="__node_internal_"+_.name;return Object.defineProperty(_,"name",{value:g}),_}function k(_,g){if(_&&g&&_!==g){if(Array.isArray(g.errors))return g.errors.push(_),g;let N=new S([g,_],g.message);return N.code=g.code,N}return _||g}class C extends Error{constructor(_="The operation was aborted",g=void 0){if(g!==void 0&&typeof g!=="object")throw new L.ERR_INVALID_ARG_TYPE("options","Object",g);super(_,g);this.code="ABORT_ERR",this.name="AbortError"}}P("ERR_ASSERTION","%s",Error),P("ERR_INVALID_ARG_TYPE",(_,g,N)=>{if(E(typeof _==="string","'name' must be a string"),!Array.isArray(g))g=[g];let x="The ";if(_.endsWith(" argument"))x+=`${_} `;else x+=`"${_}" ${_.includes(".")?"property":"argument"} `;x+="must be ";let w=[],o=[],Q0=[];for(let Y0 of g)if(E(typeof Y0==="string","All expected entries have to be of type string"),M.includes(Y0))w.push(Y0.toLowerCase());else if(T.test(Y0))o.push(Y0);else E(Y0!=="object",'The value "object" should be written as "Object"'),Q0.push(Y0);if(o.length>0){let Y0=w.indexOf("object");if(Y0!==-1)w.splice(w,Y0,1),o.push("Object")}if(w.length>0){switch(w.length){case 1:x+=`of type ${w[0]}`;break;case 2:x+=`one of type ${w[0]} or ${w[1]}`;break;default:{let Y0=w.pop();x+=`one of type ${w.join(", ")}, or ${Y0}`}}if(o.length>0||Q0.length>0)x+=" or "}if(o.length>0){switch(o.length){case 1:x+=`an instance of ${o[0]}`;break;case 2:x+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let Y0=o.pop();x+=`an instance of ${o.join(", ")}, or ${Y0}`}}if(Q0.length>0)x+=" or "}switch(Q0.length){case 0:break;case 1:if(Q0[0].toLowerCase()!==Q0[0])x+="an ";x+=`${Q0[0]}`;break;case 2:x+=`one of ${Q0[0]} or ${Q0[1]}`;break;default:{let Y0=Q0.pop();x+=`one of ${Q0.join(", ")}, or ${Y0}`}}if(N==null)x+=`. Received ${N}`;else if(typeof N==="function"&&N.name)x+=`. Received function ${N.name}`;else if(typeof N==="object"){var V0;if((V0=N.constructor)!==null&&V0!==void 0&&V0.name)x+=`. Received an instance of ${N.constructor.name}`;else{let Y0=V(N,{depth:-1});x+=`. Received ${Y0}`}}else{let Y0=V(N,{colors:!1});if(Y0.length>25)Y0=`${Y0.slice(0,25)}...`;x+=`. Received type ${typeof N} (${Y0})`}return x},TypeError),P("ERR_INVALID_ARG_VALUE",(_,g,N="is invalid")=>{let x=V(g);if(x.length>128)x=x.slice(0,128)+"...";return`The ${_.includes(".")?"property":"argument"} '${_}' ${N}. Received ${x}`},TypeError),P("ERR_INVALID_RETURN_VALUE",(_,g,N)=>{var x;let w=N!==null&&N!==void 0&&(x=N.constructor)!==null&&x!==void 0&&x.name?`instance of ${N.constructor.name}`:`type ${typeof N}`;return`Expected ${_} to be returned from the "${g}" function but got ${w}.`},TypeError),P("ERR_MISSING_ARGS",(..._)=>{E(_.length>0,"At least one arg needs to be specified");let g,N=_.length;switch(_=(Array.isArray(_)?_:[_]).map((x)=>`"${x}"`).join(" or "),N){case 1:g+=`The ${_[0]} argument`;break;case 2:g+=`The ${_[0]} and ${_[1]} arguments`;break;default:{let x=_.pop();g+=`The ${_.join(", ")}, and ${x} arguments`}break}return`${g} must be specified`},TypeError),P("ERR_OUT_OF_RANGE",(_,g,N)=>{E(g,'Missing "range" argument');let x;if(Number.isInteger(N)&&Math.abs(N)>4294967296)x=F(String(N));else if(typeof N==="bigint"){x=String(N);let w=BigInt(2)**BigInt(32);if(N>w||N<-w)x=F(x);x+="n"}else x=V(N);return`The value of "${_}" is out of range. It must be ${g}. Received ${x}`},RangeError),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),P("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),P("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),P("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),P("ERR_STREAM_WRITE_AFTER_END","write after end",Error),P("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),U.exports={AbortError:C,aggregateTwoErrors:q(k),hideStackFrames:q,codes:L}}),EK=i0(($,U)=>{Object.defineProperty($,"__esModule",{value:!0});var J=new WeakMap,V=new WeakMap;function I(p){let U0=J.get(p);return console.assert(U0!=null,"'this' is expected an Event object, but got",p),U0}function S(p){if(p.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",p.passiveListener);return}if(!p.event.cancelable)return;if(p.canceled=!0,typeof p.event.preventDefault==="function")p.event.preventDefault()}function Y(p,U0){J.set(this,{eventTarget:p,event:U0,eventPhase:2,currentTarget:p,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:U0.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let O=Object.keys(U0);for(let G=0;G<O.length;++G){let D=O[G];if(!(D in this))Object.defineProperty(this,D,M(D))}}if(Y.prototype={get type(){return I(this).event.type},get target(){return I(this).eventTarget},get currentTarget(){return I(this).currentTarget},composedPath(){let p=I(this).currentTarget;if(p==null)return[];return[p]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return I(this).eventPhase},stopPropagation(){let p=I(this);if(p.stopped=!0,typeof p.event.stopPropagation==="function")p.event.stopPropagation()},stopImmediatePropagation(){let p=I(this);if(p.stopped=!0,p.immediateStopped=!0,typeof p.event.stopImmediatePropagation==="function")p.event.stopImmediatePropagation()},get bubbles(){return Boolean(I(this).event.bubbles)},get cancelable(){return Boolean(I(this).event.cancelable)},preventDefault(){S(I(this))},get defaultPrevented(){return I(this).canceled},get composed(){return Boolean(I(this).event.composed)},get timeStamp(){return I(this).timeStamp},get srcElement(){return I(this).eventTarget},get cancelBubble(){return I(this).stopped},set cancelBubble(p){if(!p)return;let U0=I(this);if(U0.stopped=!0,typeof U0.event.cancelBubble==="boolean")U0.event.cancelBubble=!0},get returnValue(){return!I(this).canceled},set returnValue(p){if(!p)S(I(this))},initEvent(){}},Object.defineProperty(Y.prototype,"constructor",{value:Y,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(Y.prototype,window.Event.prototype),V.set(window.Event.prototype,Y);function M(p){return{get(){return I(this).event[p]},set(U0){I(this).event[p]=U0},configurable:!0,enumerable:!0}}function T(p){return{value(){let U0=I(this).event;return U0[p].apply(U0,arguments)},configurable:!0,enumerable:!0}}function L(p,U0){let O=Object.keys(U0);if(O.length===0)return p;function G(D,Q){p.call(this,D,Q)}G.prototype=Object.create(p.prototype,{constructor:{value:G,configurable:!0,writable:!0}});for(let D=0;D<O.length;++D){let Q=O[D];if(!(Q in p.prototype)){let W=typeof Object.getOwnPropertyDescriptor(U0,Q).value==="function";Object.defineProperty(G.prototype,Q,W?T(Q):M(Q))}}return G}function E(p){if(p==null||p===Object.prototype)return Y;let U0=V.get(p);if(U0==null)U0=L(E(Object.getPrototypeOf(p)),p),V.set(p,U0);return U0}function F(p,U0){return new(E(Object.getPrototypeOf(U0)))(p,U0)}function Z(p){return I(p).immediateStopped}function P(p,U0){I(p).eventPhase=U0}function q(p,U0){I(p).currentTarget=U0}function k(p,U0){I(p).passiveListener=U0}var C=new WeakMap,_=1,g=2,N=3;function x(p){return p!==null&&typeof p==="object"}function w(p){let U0=C.get(p);if(U0==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return U0}function o(p){return{get(){let U0=w(this).get(p);while(U0!=null){if(U0.listenerType===N)return U0.listener;U0=U0.next}return null},set(U0){if(typeof U0!=="function"&&!x(U0))U0=null;let O=w(this),G=null,D=O.get(p);while(D!=null){if(D.listenerType===N)if(G!==null)G.next=D.next;else if(D.next!==null)O.set(p,D.next);else O.delete(p);else G=D;D=D.next}if(U0!==null){let Q={listener:U0,listenerType:N,passive:!1,once:!1,next:null};if(G===null)O.set(p,Q);else G.next=Q}},configurable:!0,enumerable:!0}}function Q0(p,U0){Object.defineProperty(p,`on${U0}`,o(U0))}function V0(p){function U0(){Y0.call(this)}U0.prototype=Object.create(Y0.prototype,{constructor:{value:U0,configurable:!0,writable:!0}});for(let O=0;O<p.length;++O)Q0(U0.prototype,p[O]);return U0}function Y0(){if(this instanceof Y0){C.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return V0(arguments[0]);if(arguments.length>0){let p=Array(arguments.length);for(let U0=0;U0<arguments.length;++U0)p[U0]=arguments[U0];return V0(p)}throw TypeError("Cannot call a class as a function")}if(Y0.prototype={addEventListener(p,U0,O){if(U0==null)return;if(typeof U0!=="function"&&!x(U0))throw TypeError("'listener' should be a function or an object.");let G=w(this),D=x(O),Q=(D?Boolean(O.capture):Boolean(O))?_:g,W={listener:U0,listenerType:Q,passive:D&&Boolean(O.passive),once:D&&Boolean(O.once),next:null},A=G.get(p);if(A===void 0){G.set(p,W);return}let H=null;while(A!=null){if(A.listener===U0&&A.listenerType===Q)return;H=A,A=A.next}H.next=W},removeEventListener(p,U0,O){if(U0==null)return;let G=w(this),D=(x(O)?Boolean(O.capture):Boolean(O))?_:g,Q=null,W=G.get(p);while(W!=null){if(W.listener===U0&&W.listenerType===D){if(Q!==null)Q.next=W.next;else if(W.next!==null)G.set(p,W.next);else G.delete(p);return}Q=W,W=W.next}},dispatchEvent(p){if(p==null||typeof p.type!=="string")throw TypeError('"event.type" should be a string.');let U0=w(this),O=p.type,G=U0.get(O);if(G==null)return!0;let D=F(this,p),Q=null;while(G!=null){if(G.once)if(Q!==null)Q.next=G.next;else if(G.next!==null)U0.set(O,G.next);else U0.delete(O);else Q=G;if(k(D,G.passive?G.listener:null),typeof G.listener==="function")try{G.listener.call(this,D)}catch(W){if(typeof console<"u"&&typeof console.error==="function")console.error(W)}else if(G.listenerType!==N&&typeof G.listener.handleEvent==="function")G.listener.handleEvent(D);if(Z(D))break;G=G.next}return k(D,null),P(D,0),q(D,null),!D.defaultPrevented}},Object.defineProperty(Y0.prototype,"constructor",{value:Y0,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(Y0.prototype,window.EventTarget.prototype);$.defineEventAttribute=Q0,$.EventTarget=Y0,$.default=Y0,U.exports=Y0,U.exports.EventTarget=U.exports.default=Y0,U.exports.defineEventAttribute=Q0}),lI=i0(($,U)=>{Object.defineProperty($,"__esModule",{value:!0});var J=EK();class V extends J.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let E=Y.get(this);if(typeof E!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return E}}J.defineEventAttribute(V.prototype,"abort");function I(){let E=Object.create(V.prototype);return J.EventTarget.call(E),Y.set(E,!1),E}function S(E){if(Y.get(E)!==!1)return;Y.set(E,!0),E.dispatchEvent({type:"abort"})}var Y=new WeakMap;if(Object.defineProperties(V.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(V.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class M{constructor(){T.set(this,I())}get signal(){return L(this)}abort(){S(L(this))}}var T=new WeakMap;function L(E){let F=T.get(E);if(F==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${E===null?"null":typeof E}`);return F}if(Object.defineProperties(M.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(M.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});$.AbortController=M,$.AbortSignal=V,$.default=M,U.exports=M,U.exports.AbortController=U.exports.default=M,U.exports.AbortSignal=V}),h$=i0(($,U)=>{var J=(g$(),d0(k$)),{format:V,inspect:I}=IV(),{codes:{ERR_INVALID_ARG_TYPE:S}}=B$(),{kResistStopPropagation:Y,AggregateError:M,SymbolDispose:T}=O$(),L=globalThis.AbortSignal||lI().AbortSignal,E=globalThis.AbortController||lI().AbortController,F=Object.getPrototypeOf(async function(){}).constructor,Z=globalThis.Blob||J.Blob,P=typeof Z<"u"?function(C){return C instanceof Z}:function(C){return!1},q=(C,_)=>{if(C!==void 0&&(C===null||typeof C!=="object"||!("aborted"in C)))throw new S(_,"AbortSignal",C)},k=(C,_)=>{if(typeof C!=="function")throw new S(_,"Function",C)};U.exports={AggregateError:M,kEmptyObject:Object.freeze({}),once(C){let _=!1;return function(...g){if(_)return;_=!0,C.apply(this,g)}},createDeferredPromise:function(){let C,_;return{promise:new Promise((g,N)=>{C=g,_=N}),resolve:C,reject:_}},promisify(C){return new Promise((_,g)=>{C((N,...x)=>{if(N)return g(N);return _(...x)})})},debuglog(){return function(){}},format:V,inspect:I,types:{isAsyncFunction(C){return C instanceof F},isArrayBufferView(C){return ArrayBuffer.isView(C)}},isBlob:P,deprecate(C,_){return C},addAbortListener:(t$(),d0(OI)).addAbortListener||function(C,_){if(C===void 0)throw new S("signal","AbortSignal",C);q(C,"signal"),k(_,"listener");let g;if(C.aborted)queueMicrotask(()=>_());else C.addEventListener("abort",_,{__proto__:null,once:!0,[Y]:!0}),g=()=>{C.removeEventListener("abort",_)};return{__proto__:null,[T](){var N;(N=g)===null||N===void 0||N()}}},AbortSignalAny:L.any||function(C){if(C.length===1)return C[0];let _=new E,g=()=>_.abort();return C.forEach((N)=>{q(N,"signals"),N.addEventListener("abort",g,{once:!0})}),_.signal.addEventListener("abort",()=>{C.forEach((N)=>N.removeEventListener("abort",g))},{once:!0}),_.signal}},U.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),oI=i0(($,U)=>{var{ArrayIsArray:J,ArrayPrototypeIncludes:V,ArrayPrototypeJoin:I,ArrayPrototypeMap:S,NumberIsInteger:Y,NumberIsNaN:M,NumberMAX_SAFE_INTEGER:T,NumberMIN_SAFE_INTEGER:L,NumberParseInt:E,ObjectPrototypeHasOwnProperty:F,RegExpPrototypeExec:Z,String:P,StringPrototypeToUpperCase:q,StringPrototypeTrim:k}=O$(),{hideStackFrames:C,codes:{ERR_SOCKET_BAD_PORT:_,ERR_INVALID_ARG_TYPE:g,ERR_INVALID_ARG_VALUE:N,ERR_OUT_OF_RANGE:x,ERR_UNKNOWN_SIGNAL:w}}=B$(),{normalizeEncoding:o}=h$(),{isAsyncFunction:Q0,isArrayBufferView:V0}=h$().types,Y0={};function p(y){return y===(y|0)}function U0(y){return y===y>>>0}var O=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function D(y,r,c0){if(typeof y>"u")y=c0;if(typeof y==="string"){if(Z(O,y)===null)throw new N(r,y,G);y=E(y,8)}return A(y,r),y}var Q=C((y,r,c0=L,d=T)=>{if(typeof y!=="number")throw new g(r,"number",y);if(!Y(y))throw new x(r,"an integer",y);if(y<c0||y>d)throw new x(r,`>= ${c0} && <= ${d}`,y)}),W=C((y,r,c0=-2147483648,d=2147483647)=>{if(typeof y!=="number")throw new g(r,"number",y);if(!Y(y))throw new x(r,"an integer",y);if(y<c0||y>d)throw new x(r,`>= ${c0} && <= ${d}`,y)}),A=C((y,r,c0=!1)=>{if(typeof y!=="number")throw new g(r,"number",y);if(!Y(y))throw new x(r,"an integer",y);let d=c0?1:0,I0=4294967295;if(y<d||y>I0)throw new x(r,`>= ${d} && <= ${I0}`,y)});function H(y,r){if(typeof y!=="string")throw new g(r,"string",y)}function z(y,r,c0=void 0,d){if(typeof y!=="number")throw new g(r,"number",y);if(c0!=null&&y<c0||d!=null&&y>d||(c0!=null||d!=null)&&M(y))throw new x(r,`${c0!=null?`>= ${c0}`:""}${c0!=null&&d!=null?" && ":""}${d!=null?`<= ${d}`:""}`,y)}var X=C((y,r,c0)=>{if(!V(c0,y)){let d="must be one of: "+I(S(c0,(I0)=>typeof I0==="string"?`'${I0}'`:P(I0)),", ");throw new N(r,y,d)}});function K(y,r){if(typeof y!=="boolean")throw new g(r,"boolean",y)}function R(y,r,c0){return y==null||!F(y,r)?c0:y[r]}var v=C((y,r,c0=null)=>{let d=R(c0,"allowArray",!1),I0=R(c0,"allowFunction",!1);if(!R(c0,"nullable",!1)&&y===null||!d&&J(y)||typeof y!=="object"&&(!I0||typeof y!=="function"))throw new g(r,"Object",y)}),j=C((y,r)=>{if(y!=null&&typeof y!=="object"&&typeof y!=="function")throw new g(r,"a dictionary",y)}),c=C((y,r,c0=0)=>{if(!J(y))throw new g(r,"Array",y);if(y.length<c0){let d=`must be longer than ${c0}`;throw new N(r,y,d)}});function h(y,r){c(y,r);for(let c0=0;c0<y.length;c0++)H(y[c0],`${r}[${c0}]`)}function n(y,r){c(y,r);for(let c0=0;c0<y.length;c0++)K(y[c0],`${r}[${c0}]`)}function D0(y,r){c(y,r);for(let c0=0;c0<y.length;c0++){let d=y[c0],I0=`${r}[${c0}]`;if(d==null)throw new g(I0,"AbortSignal",d);s(d,I0)}}function i(y,r="signal"){if(H(y,r),Y0[y]===void 0){if(Y0[q(y)]!==void 0)throw new w(y+" (signals must use all capital letters)");throw new w(y)}}var l=C((y,r="buffer")=>{if(!V0(y))throw new g(r,["Buffer","TypedArray","DataView"],y)});function X0(y,r){let c0=o(r),d=y.length;if(c0==="hex"&&d%2!==0)throw new N("encoding",r,`is invalid for data of length ${d}`)}function m(y,r="Port",c0=!0){if(typeof y!=="number"&&typeof y!=="string"||typeof y==="string"&&k(y).length===0||+y!==+y>>>0||y>65535||y===0&&!c0)throw new _(r,y,c0);return y|0}var s=C((y,r)=>{if(y!==void 0&&(y===null||typeof y!=="object"||!("aborted"in y)))throw new g(r,"AbortSignal",y)}),h0=C((y,r)=>{if(typeof y!=="function")throw new g(r,"Function",y)}),f=C((y,r)=>{if(typeof y!=="function"||Q0(y))throw new g(r,"Function",y)}),u=C((y,r)=>{if(y!==void 0)throw new g(r,"undefined",y)});function J0(y,r,c0){if(!V(c0,y))throw new g(r,`('${I(c0,"|")}')`,y)}var t=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function a(y,r){if(typeof y>"u"||!Z(t,y))throw new N(r,y,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function M0(y){if(typeof y==="string")return a(y,"hints"),y;else if(J(y)){let r=y.length,c0="";if(r===0)return c0;for(let d=0;d<r;d++){let I0=y[d];if(a(I0,"hints"),c0+=I0,d!==r-1)c0+=", "}return c0}throw new N("hints",y,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}U.exports={isInt32:p,isUint32:U0,parseFileMode:D,validateArray:c,validateStringArray:h,validateBooleanArray:n,validateAbortSignalArray:D0,validateBoolean:K,validateBuffer:l,validateDictionary:j,validateEncoding:X0,validateFunction:h0,validateInt32:W,validateInteger:Q,validateNumber:z,validateObject:v,validateOneOf:X,validatePlainFunction:f,validatePort:m,validateSignalName:i,validateString:H,validateUint32:A,validateUndefined:u,validateUnion:J0,validateAbortSignal:s,validateLinkHeaderValue:M0}}),cU=i0(($,U)=>{U.exports=globalThis.process}),DU=i0(($,U)=>{var{SymbolAsyncIterator:J,SymbolIterator:V,SymbolFor:I}=O$(),S=I("nodejs.stream.destroyed"),Y=I("nodejs.stream.errored"),M=I("nodejs.stream.readable"),T=I("nodejs.stream.writable"),L=I("nodejs.stream.disturbed"),E=I("nodejs.webstream.isClosedPromise"),F=I("nodejs.webstream.controllerErrorFunction");function Z(R,v=!1){var j;return!!(R&&typeof R.pipe==="function"&&typeof R.on==="function"&&(!v||typeof R.pause==="function"&&typeof R.resume==="function")&&(!R._writableState||((j=R._readableState)===null||j===void 0?void 0:j.readable)!==!1)&&(!R._writableState||R._readableState))}function P(R){var v;return!!(R&&typeof R.write==="function"&&typeof R.on==="function"&&(!R._readableState||((v=R._writableState)===null||v===void 0?void 0:v.writable)!==!1))}function q(R){return!!(R&&typeof R.pipe==="function"&&R._readableState&&typeof R.on==="function"&&typeof R.write==="function")}function k(R){return R&&(R._readableState||R._writableState||typeof R.write==="function"&&typeof R.on==="function"||typeof R.pipe==="function"&&typeof R.on==="function")}function C(R){return!!(R&&!k(R)&&typeof R.pipeThrough==="function"&&typeof R.getReader==="function"&&typeof R.cancel==="function")}function _(R){return!!(R&&!k(R)&&typeof R.getWriter==="function"&&typeof R.abort==="function")}function g(R){return!!(R&&!k(R)&&typeof R.readable==="object"&&typeof R.writable==="object")}function N(R){return C(R)||_(R)||g(R)}function x(R,v){if(R==null)return!1;if(v===!0)return typeof R[J]==="function";if(v===!1)return typeof R[V]==="function";return typeof R[J]==="function"||typeof R[V]==="function"}function w(R){if(!k(R))return null;let{_writableState:v,_readableState:j}=R,c=v||j;return!!(R.destroyed||R[S]||c!==null&&c!==void 0&&c.destroyed)}function o(R){if(!P(R))return null;if(R.writableEnded===!0)return!0;let v=R._writableState;if(v!==null&&v!==void 0&&v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.ended)!=="boolean")return null;return v.ended}function Q0(R,v){if(!P(R))return null;if(R.writableFinished===!0)return!0;let j=R._writableState;if(j!==null&&j!==void 0&&j.errored)return!1;if(typeof(j===null||j===void 0?void 0:j.finished)!=="boolean")return null;return!!(j.finished||v===!1&&j.ended===!0&&j.length===0)}function V0(R){if(!Z(R))return null;if(R.readableEnded===!0)return!0;let v=R._readableState;if(!v||v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.ended)!=="boolean")return null;return v.ended}function Y0(R,v){if(!Z(R))return null;let j=R._readableState;if(j!==null&&j!==void 0&&j.errored)return!1;if(typeof(j===null||j===void 0?void 0:j.endEmitted)!=="boolean")return null;return!!(j.endEmitted||v===!1&&j.ended===!0&&j.length===0)}function p(R){if(R&&R[M]!=null)return R[M];if(typeof(R===null||R===void 0?void 0:R.readable)!=="boolean")return null;if(w(R))return!1;return Z(R)&&R.readable&&!Y0(R)}function U0(R){if(R&&R[T]!=null)return R[T];if(typeof(R===null||R===void 0?void 0:R.writable)!=="boolean")return null;if(w(R))return!1;return P(R)&&R.writable&&!o(R)}function O(R,v){if(!k(R))return null;if(w(R))return!0;if((v===null||v===void 0?void 0:v.readable)!==!1&&p(R))return!1;if((v===null||v===void 0?void 0:v.writable)!==!1&&U0(R))return!1;return!0}function G(R){var v,j;if(!k(R))return null;if(R.writableErrored)return R.writableErrored;return(v=(j=R._writableState)===null||j===void 0?void 0:j.errored)!==null&&v!==void 0?v:null}function D(R){var v,j;if(!k(R))return null;if(R.readableErrored)return R.readableErrored;return(v=(j=R._readableState)===null||j===void 0?void 0:j.errored)!==null&&v!==void 0?v:null}function Q(R){if(!k(R))return null;if(typeof R.closed==="boolean")return R.closed;let{_writableState:v,_readableState:j}=R;if(typeof(v===null||v===void 0?void 0:v.closed)==="boolean"||typeof(j===null||j===void 0?void 0:j.closed)==="boolean")return(v===null||v===void 0?void 0:v.closed)||(j===null||j===void 0?void 0:j.closed);if(typeof R._closed==="boolean"&&W(R))return R._closed;return null}function W(R){return typeof R._closed==="boolean"&&typeof R._defaultKeepAlive==="boolean"&&typeof R._removedConnection==="boolean"&&typeof R._removedContLen==="boolean"}function A(R){return typeof R._sent100==="boolean"&&W(R)}function H(R){var v;return typeof R._consuming==="boolean"&&typeof R._dumped==="boolean"&&((v=R.req)===null||v===void 0?void 0:v.upgradeOrConnect)===void 0}function z(R){if(!k(R))return null;let{_writableState:v,_readableState:j}=R,c=v||j;return!c&&A(R)||!!(c&&c.autoDestroy&&c.emitClose&&c.closed===!1)}function X(R){var v;return!!(R&&((v=R[L])!==null&&v!==void 0?v:R.readableDidRead||R.readableAborted))}function K(R){var v,j,c,h,n,D0,i,l,X0,m;return!!(R&&((v=(j=(c=(h=(n=(D0=R[Y])!==null&&D0!==void 0?D0:R.readableErrored)!==null&&n!==void 0?n:R.writableErrored)!==null&&h!==void 0?h:(i=R._readableState)===null||i===void 0?void 0:i.errorEmitted)!==null&&c!==void 0?c:(l=R._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&j!==void 0?j:(X0=R._readableState)===null||X0===void 0?void 0:X0.errored)!==null&&v!==void 0?v:(m=R._writableState)===null||m===void 0?void 0:m.errored))}U.exports={isDestroyed:w,kIsDestroyed:S,isDisturbed:X,kIsDisturbed:L,isErrored:K,kIsErrored:Y,isReadable:p,kIsReadable:M,kIsClosedPromise:E,kControllerErrorFunction:F,kIsWritable:T,isClosed:Q,isDuplexNodeStream:q,isFinished:O,isIterable:x,isReadableNodeStream:Z,isReadableStream:C,isReadableEnded:V0,isReadableFinished:Y0,isReadableErrored:D,isNodeStream:k,isWebStream:N,isWritable:U0,isWritableNodeStream:P,isWritableStream:_,isWritableEnded:o,isWritableFinished:Q0,isWritableErrored:G,isServerRequest:H,isServerResponse:A,willEmitClose:z,isTransformStream:g}}),vU=i0(($,U)=>{var J=cU(),{AbortError:V,codes:I}=B$(),{ERR_INVALID_ARG_TYPE:S,ERR_STREAM_PREMATURE_CLOSE:Y}=I,{kEmptyObject:M,once:T}=h$(),{validateAbortSignal:L,validateFunction:E,validateObject:F,validateBoolean:Z}=oI(),{Promise:P,PromisePrototypeThen:q,SymbolDispose:k}=O$(),{isClosed:C,isReadable:_,isReadableNodeStream:g,isReadableStream:N,isReadableFinished:x,isReadableErrored:w,isWritable:o,isWritableNodeStream:Q0,isWritableStream:V0,isWritableFinished:Y0,isWritableErrored:p,isNodeStream:U0,willEmitClose:O,kIsClosedPromise:G}=DU(),D;function Q(X){return X.setHeader&&typeof X.abort==="function"}var W=()=>{};function A(X,K,R){var v,j;if(arguments.length===2)R=K,K=M;else if(K==null)K=M;else F(K,"options");if(E(R,"callback"),L(K.signal,"options.signal"),R=T(R),N(X)||V0(X))return H(X,K,R);if(!U0(X))throw new S("stream",["ReadableStream","WritableStream","Stream"],X);let c=(v=K.readable)!==null&&v!==void 0?v:g(X),h=(j=K.writable)!==null&&j!==void 0?j:Q0(X),n=X._writableState,D0=X._readableState,i=()=>{if(!X.writable)m()},l=O(X)&&g(X)===c&&Q0(X)===h,X0=Y0(X,!1),m=()=>{if(X0=!0,X.destroyed)l=!1;if(l&&(!X.readable||c))return;if(!c||s)R.call(X)},s=x(X,!1),h0=()=>{if(s=!0,X.destroyed)l=!1;if(l&&(!X.writable||h))return;if(!h||X0)R.call(X)},f=(y)=>{R.call(X,y)},u=C(X),J0=()=>{u=!0;let y=p(X)||w(X);if(y&&typeof y!=="boolean")return R.call(X,y);if(c&&!s&&g(X,!0)){if(!x(X,!1))return R.call(X,new Y)}if(h&&!X0){if(!Y0(X,!1))return R.call(X,new Y)}R.call(X)},t=()=>{u=!0;let y=p(X)||w(X);if(y&&typeof y!=="boolean")return R.call(X,y);R.call(X)},a=()=>{X.req.on("finish",m)};if(Q(X)){if(X.on("complete",m),!l)X.on("abort",J0);if(X.req)a();else X.on("request",a)}else if(h&&!n)X.on("end",i),X.on("close",i);if(!l&&typeof X.aborted==="boolean")X.on("aborted",J0);if(X.on("end",h0),X.on("finish",m),K.error!==!1)X.on("error",f);if(X.on("close",J0),u)J.nextTick(J0);else if(n!==null&&n!==void 0&&n.errorEmitted||D0!==null&&D0!==void 0&&D0.errorEmitted){if(!l)J.nextTick(t)}else if(!c&&(!l||_(X))&&(X0||o(X)===!1))J.nextTick(t);else if(!h&&(!l||o(X))&&(s||_(X)===!1))J.nextTick(t);else if(D0&&X.req&&X.aborted)J.nextTick(t);let M0=()=>{if(R=W,X.removeListener("aborted",J0),X.removeListener("complete",m),X.removeListener("abort",J0),X.removeListener("request",a),X.req)X.req.removeListener("finish",m);X.removeListener("end",i),X.removeListener("close",i),X.removeListener("finish",m),X.removeListener("end",h0),X.removeListener("error",f),X.removeListener("close",J0)};if(K.signal&&!u){let y=()=>{let r=R;M0(),r.call(X,new V(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)J.nextTick(y);else{D=D||h$().addAbortListener;let r=D(K.signal,y),c0=R;R=T((...d)=>{r[k](),c0.apply(X,d)})}}return M0}function H(X,K,R){let v=!1,j=W;if(K.signal)if(j=()=>{v=!0,R.call(X,new V(void 0,{cause:K.signal.reason}))},K.signal.aborted)J.nextTick(j);else{D=D||h$().addAbortListener;let h=D(K.signal,j),n=R;R=T((...D0)=>{h[k](),n.apply(X,D0)})}let c=(...h)=>{if(!v)J.nextTick(()=>R.apply(X,h))};return q(X[G].promise,c,c),W}function z(X,K){var R;let v=!1;if(K===null)K=M;if((R=K)!==null&&R!==void 0&&R.cleanup)Z(K.cleanup,"cleanup"),v=K.cleanup;return new P((j,c)=>{let h=A(X,K,(n)=>{if(v)h();if(n)c(n);else j()})})}U.exports=A,U.exports.finished=z}),UI=i0(($,U)=>{var J=cU(),{aggregateTwoErrors:V,codes:{ERR_MULTIPLE_CALLBACK:I},AbortError:S}=B$(),{Symbol:Y}=O$(),{kIsDestroyed:M,isDestroyed:T,isFinished:L,isServerRequest:E}=DU(),F=Y("kDestroy"),Z=Y("kConstruct");function P(O,G,D){if(O){if(O.stack,G&&!G.errored)G.errored=O;if(D&&!D.errored)D.errored=O}}function q(O,G){let D=this._readableState,Q=this._writableState,W=Q||D;if(Q!==null&&Q!==void 0&&Q.destroyed||D!==null&&D!==void 0&&D.destroyed){if(typeof G==="function")G();return this}if(P(O,Q,D),Q)Q.destroyed=!0;if(D)D.destroyed=!0;if(!W.constructed)this.once(F,function(A){k(this,V(A,O),G)});else k(this,O,G);return this}function k(O,G,D){let Q=!1;function W(A){if(Q)return;Q=!0;let{_readableState:H,_writableState:z}=O;if(P(A,z,H),z)z.closed=!0;if(H)H.closed=!0;if(typeof D==="function")D(A);if(A)J.nextTick(C,O,A);else J.nextTick(_,O)}try{O._destroy(G||null,W)}catch(A){W(A)}}function C(O,G){g(O,G),_(O)}function _(O){let{_readableState:G,_writableState:D}=O;if(D)D.closeEmitted=!0;if(G)G.closeEmitted=!0;if(D!==null&&D!==void 0&&D.emitClose||G!==null&&G!==void 0&&G.emitClose)O.emit("close")}function g(O,G){let{_readableState:D,_writableState:Q}=O;if(Q!==null&&Q!==void 0&&Q.errorEmitted||D!==null&&D!==void 0&&D.errorEmitted)return;if(Q)Q.errorEmitted=!0;if(D)D.errorEmitted=!0;O.emit("error",G)}function N(){let O=this._readableState,G=this._writableState;if(O)O.constructed=!0,O.closed=!1,O.closeEmitted=!1,O.destroyed=!1,O.errored=null,O.errorEmitted=!1,O.reading=!1,O.ended=O.readable===!1,O.endEmitted=O.readable===!1;if(G)G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1}function x(O,G,D){let{_readableState:Q,_writableState:W}=O;if(W!==null&&W!==void 0&&W.destroyed||Q!==null&&Q!==void 0&&Q.destroyed)return this;if(Q!==null&&Q!==void 0&&Q.autoDestroy||W!==null&&W!==void 0&&W.autoDestroy)O.destroy(G);else if(G){if(G.stack,W&&!W.errored)W.errored=G;if(Q&&!Q.errored)Q.errored=G;if(D)J.nextTick(g,O,G);else g(O,G)}}function w(O,G){if(typeof O._construct!=="function")return;let{_readableState:D,_writableState:Q}=O;if(D)D.constructed=!1;if(Q)Q.constructed=!1;if(O.once(Z,G),O.listenerCount(Z)>1)return;J.nextTick(o,O)}function o(O){let G=!1;function D(Q){if(G){x(O,Q!==null&&Q!==void 0?Q:new I);return}G=!0;let{_readableState:W,_writableState:A}=O,H=A||W;if(W)W.constructed=!0;if(A)A.constructed=!0;if(H.destroyed)O.emit(F,Q);else if(Q)x(O,Q,!0);else J.nextTick(Q0,O)}try{O._construct((Q)=>{J.nextTick(D,Q)})}catch(Q){J.nextTick(D,Q)}}function Q0(O){O.emit(Z)}function V0(O){return(O===null||O===void 0?void 0:O.setHeader)&&typeof O.abort==="function"}function Y0(O){O.emit("close")}function p(O,G){O.emit("error",G),J.nextTick(Y0,O)}function U0(O,G){if(!O||T(O))return;if(!G&&!L(O))G=new S;if(E(O))O.socket=null,O.destroy(G);else if(V0(O))O.abort();else if(V0(O.req))O.req.abort();else if(typeof O.destroy==="function")O.destroy(G);else if(typeof O.close==="function")O.close();else if(G)J.nextTick(p,O,G);else J.nextTick(Y0,O);if(!O.destroyed)O[M]=!0}U.exports={construct:w,destroyer:U0,destroy:q,undestroy:N,errorOrDestroy:x}}),MQ=i0(($,U)=>{var{ArrayIsArray:J,ObjectSetPrototypeOf:V}=O$(),{EventEmitter:I}=(t$(),d0(OI));function S(M){I.call(this,M)}V(S.prototype,I.prototype),V(S,I),S.prototype.pipe=function(M,T){let L=this;function E(_){if(M.writable&&M.write(_)===!1&&L.pause)L.pause()}L.on("data",E);function F(){if(L.readable&&L.resume)L.resume()}if(M.on("drain",F),!M._isStdio&&(!T||T.end!==!1))L.on("end",P),L.on("close",q);let Z=!1;function P(){if(Z)return;Z=!0,M.end()}function q(){if(Z)return;if(Z=!0,typeof M.destroy==="function")M.destroy()}function k(_){if(C(),I.listenerCount(this,"error")===0)this.emit("error",_)}Y(L,"error",k),Y(M,"error",k);function C(){L.removeListener("data",E),M.removeListener("drain",F),L.removeListener("end",P),L.removeListener("close",q),L.removeListener("error",k),M.removeListener("error",k),L.removeListener("end",C),L.removeListener("close",C),M.removeListener("close",C)}return L.on("end",C),L.on("close",C),M.on("close",C),M.emit("pipe",L),M};function Y(M,T,L){if(typeof M.prependListener==="function")return M.prependListener(T,L);if(!M._events||!M._events[T])M.on(T,L);else if(J(M._events[T]))M._events[T].unshift(L);else M._events[T]=[L,M._events[T]]}U.exports={Stream:S,prependListener:Y}}),S6=i0(($,U)=>{var{SymbolDispose:J}=O$(),{AbortError:V,codes:I}=B$(),{isNodeStream:S,isWebStream:Y,kControllerErrorFunction:M}=DU(),T=vU(),{ERR_INVALID_ARG_TYPE:L}=I,E,F=(Z,P)=>{if(typeof Z!=="object"||!("aborted"in Z))throw new L(P,"AbortSignal",Z)};U.exports.addAbortSignal=function(Z,P){if(F(Z,"signal"),!S(P)&&!Y(P))throw new L("stream",["ReadableStream","WritableStream","Stream"],P);return U.exports.addAbortSignalNoValidate(Z,P)},U.exports.addAbortSignalNoValidate=function(Z,P){if(typeof Z!=="object"||!("aborted"in Z))return P;let q=S(P)?()=>{P.destroy(new V(void 0,{cause:Z.reason}))}:()=>{P[M](new V(void 0,{cause:Z.reason}))};if(Z.aborted)q();else{E=E||h$().addAbortListener;let k=E(Z,q);T(P,k[J])}return P}}),ZK=i0(($,U)=>{var{StringPrototypeSlice:J,SymbolIterator:V,TypedArrayPrototypeSet:I,Uint8Array:S}=O$(),{Buffer:Y}=(g$(),d0(k$)),{inspect:M}=h$();U.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(T){let L={data:T,next:null};if(this.length>0)this.tail.next=L;else this.head=L;this.tail=L,++this.length}unshift(T){let L={data:T,next:this.head};if(this.length===0)this.tail=L;this.head=L,++this.length}shift(){if(this.length===0)return;let T=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,T}clear(){this.head=this.tail=null,this.length=0}join(T){if(this.length===0)return"";let L=this.head,E=""+L.data;while((L=L.next)!==null)E+=T+L.data;return E}concat(T){if(this.length===0)return Y.alloc(0);let L=Y.allocUnsafe(T>>>0),E=this.head,F=0;while(E)I(L,E.data,F),F+=E.data.length,E=E.next;return L}consume(T,L){let E=this.head.data;if(T<E.length){let F=E.slice(0,T);return this.head.data=E.slice(T),F}if(T===E.length)return this.shift();return L?this._getString(T):this._getBuffer(T)}first(){return this.head.data}*[V](){for(let T=this.head;T;T=T.next)yield T.data}_getString(T){let L="",E=this.head,F=0;do{let Z=E.data;if(T>Z.length)L+=Z,T-=Z.length;else{if(T===Z.length)if(L+=Z,++F,E.next)this.head=E.next;else this.head=this.tail=null;else L+=J(Z,0,T),this.head=E,E.data=J(Z,T);break}++F}while((E=E.next)!==null);return this.length-=F,L}_getBuffer(T){let L=Y.allocUnsafe(T),E=T,F=this.head,Z=0;do{let P=F.data;if(T>P.length)I(L,P,E-T),T-=P.length;else{if(T===P.length)if(I(L,P,E-T),++Z,F.next)this.head=F.next;else this.head=this.tail=null;else I(L,new S(P.buffer,P.byteOffset,T),E-T),this.head=F,F.data=P.slice(T);break}++Z}while((F=F.next)!==null);return this.length-=Z,L}[Symbol.for("nodejs.util.inspect.custom")](T,L){return M(this,{...L,depth:0,customInspect:!1})}}}),W6=i0(($,U)=>{var{MathFloor:J,NumberIsInteger:V}=O$(),{validateInteger:I}=oI(),{ERR_INVALID_ARG_VALUE:S}=B$().codes,Y=16384,M=16;function T(Z,P,q){return Z.highWaterMark!=null?Z.highWaterMark:P?Z[q]:null}function L(Z){return Z?M:Y}function E(Z,P){if(I(P,"value",0),Z)M=P;else Y=P}function F(Z,P,q,k){let C=T(P,k,q);if(C!=null){if(!V(C)||C<0){let _=k?`options.${q}`:"options.highWaterMark";throw new S(_,C)}return J(C)}return L(Z.objectMode)}U.exports={getHighWaterMark:F,getDefaultHighWaterMark:L,setDefaultHighWaterMark:E}}),vK=i0(($,U)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var J=(g$(),d0(k$)),V=J.Buffer;function I(Y,M){for(var T in Y)M[T]=Y[T]}if(V.from&&V.alloc&&V.allocUnsafe&&V.allocUnsafeSlow)U.exports=J;else I(J,$),$.Buffer=S;function S(Y,M,T){return V(Y,M,T)}S.prototype=Object.create(V.prototype),I(V,S),S.from=function(Y,M,T){if(typeof Y==="number")throw TypeError("Argument must not be a number");return V(Y,M,T)},S.alloc=function(Y,M,T){if(typeof Y!=="number")throw TypeError("Argument must be a number");var L=V(Y);if(M!==void 0)if(typeof T==="string")L.fill(M,T);else L.fill(M);else L.fill(0);return L},S.allocUnsafe=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return V(Y)},S.allocUnsafeSlow=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return J.SlowBuffer(Y)}}),MK=i0(($)=>{var U=vK().Buffer,J=U.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function V(g){if(!g)return"utf8";var N;while(!0)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(N)return;g=(""+g).toLowerCase(),N=!0}}function I(g){var N=V(g);if(typeof N!=="string"&&(U.isEncoding===J||!J(g)))throw Error("Unknown encoding: "+g);return N||g}$.StringDecoder=S;function S(g){this.encoding=I(g);var N;switch(this.encoding){case"utf16le":this.text=Z,this.end=P,N=4;break;case"utf8":this.fillLast=L,N=4;break;case"base64":this.text=q,this.end=k,N=3;break;default:this.write=C,this.end=_;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=U.allocUnsafe(N)}S.prototype.write=function(g){if(g.length===0)return"";var N,x;if(this.lastNeed){if(N=this.fillLast(g),N===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;if(x<g.length)return N?N+this.text(g,x):this.text(g,x);return N||""},S.prototype.end=F,S.prototype.text=E,S.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function Y(g){if(g<=127)return 0;else if(g>>5===6)return 2;else if(g>>4===14)return 3;else if(g>>3===30)return 4;return g>>6===2?-1:-2}function M(g,N,x){var w=N.length-1;if(w<x)return 0;var o=Y(N[w]);if(o>=0){if(o>0)g.lastNeed=o-1;return o}if(--w<x||o===-2)return 0;if(o=Y(N[w]),o>=0){if(o>0)g.lastNeed=o-2;return o}if(--w<x||o===-2)return 0;if(o=Y(N[w]),o>=0){if(o>0)if(o===2)o=0;else g.lastNeed=o-3;return o}return 0}function T(g,N,x){if((N[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&N.length>1){if((N[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&N.length>2){if((N[2]&192)!==128)return g.lastNeed=2,"�"}}}function L(g){var N=this.lastTotal-this.lastNeed,x=T(this,g,N);if(x!==void 0)return x;if(this.lastNeed<=g.length)return g.copy(this.lastChar,N,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,N,0,g.length),this.lastNeed-=g.length}function E(g,N){var x=M(this,g,N);if(!this.lastNeed)return g.toString("utf8",N);this.lastTotal=x;var w=g.length-(x-this.lastNeed);return g.copy(this.lastChar,0,w),g.toString("utf8",N,w)}function F(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed)return N+"�";return N}function Z(g,N){if((g.length-N)%2===0){var x=g.toString("utf16le",N);if(x){var w=x.charCodeAt(x.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",N,g.length-1)}function P(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return N+this.lastChar.toString("utf16le",0,x)}return N}function q(g,N){var x=(g.length-N)%3;if(x===0)return g.toString("base64",N);if(this.lastNeed=3-x,this.lastTotal=3,x===1)this.lastChar[0]=g[g.length-1];else this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1];return g.toString("base64",N,g.length-x)}function k(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed)return N+this.lastChar.toString("base64",0,3-this.lastNeed);return N}function C(g){return g.toString(this.encoding)}function _(g){return g&&g.length?this.write(g):""}}),OV=i0(($,U)=>{var J=cU(),{PromisePrototypeThen:V,SymbolAsyncIterator:I,SymbolIterator:S}=O$(),{Buffer:Y}=(g$(),d0(k$)),{ERR_INVALID_ARG_TYPE:M,ERR_STREAM_NULL_VALUES:T}=B$().codes;function L(E,F,Z){let P;if(typeof F==="string"||F instanceof Y)return new E({objectMode:!0,...Z,read(){this.push(F),this.push(null)}});let q;if(F&&F[I])q=!0,P=F[I]();else if(F&&F[S])q=!1,P=F[S]();else throw new M("iterable",["Iterable"],F);let k=new E({objectMode:!0,highWaterMark:1,...Z}),C=!1;k._read=function(){if(!C)C=!0,g()},k._destroy=function(N,x){V(_(N),()=>J.nextTick(x,N),(w)=>J.nextTick(x,w||N))};async function _(N){let x=N!==void 0&&N!==null,w=typeof P.throw==="function";if(x&&w){let{value:o,done:Q0}=await P.throw(N);if(await o,Q0)return}if(typeof P.return==="function"){let{value:o}=await P.return();await o}}async function g(){for(;;){try{let{value:N,done:x}=q?await P.next():P.next();if(x)k.push(null);else{let w=N&&typeof N.then==="function"?await N:N;if(w===null)throw C=!1,new T;else if(k.push(w))continue;else C=!1}}catch(N){k.destroy(N)}break}}return k}U.exports=L}),D6=i0(($,U)=>{var J=cU(),{ArrayPrototypeIndexOf:V,NumberIsInteger:I,NumberIsNaN:S,NumberParseInt:Y,ObjectDefineProperties:M,ObjectKeys:T,ObjectSetPrototypeOf:L,Promise:E,SafeSet:F,SymbolAsyncDispose:Z,SymbolAsyncIterator:P,Symbol:q}=O$();U.exports=d,d.ReadableState=c0;var{EventEmitter:k}=(t$(),d0(OI)),{Stream:C,prependListener:_}=MQ(),{Buffer:g}=(g$(),d0(k$)),{addAbortSignal:N}=S6(),x=vU(),w=h$().debuglog("stream",(B)=>{w=B}),o=ZK(),Q0=UI(),{getHighWaterMark:V0,getDefaultHighWaterMark:Y0}=W6(),{aggregateTwoErrors:p,codes:{ERR_INVALID_ARG_TYPE:U0,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_OUT_OF_RANGE:G,ERR_STREAM_PUSH_AFTER_EOF:D,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Q},AbortError:W}=B$(),{validateObject:A}=oI(),H=q("kPaused"),{StringDecoder:z}=MK(),X=OV();L(d.prototype,C.prototype),L(d,C);var K=()=>{},{errorOrDestroy:R}=Q0,v=1,j=2,c=4,h=8,n=16,D0=32,i=64,l=128,X0=256,m=512,s=1024,h0=2048,f=4096,u=8192,J0=16384,t=32768,a=65536,M0=131072,y=262144;function r(B){return{enumerable:!1,get(){return(this.state&B)!==0},set(b){if(b)this.state|=B;else this.state&=~B}}}M(c0.prototype,{objectMode:r(v),ended:r(j),endEmitted:r(c),reading:r(h),constructed:r(n),sync:r(D0),needReadable:r(i),emittedReadable:r(l),readableListening:r(X0),resumeScheduled:r(m),errorEmitted:r(s),emitClose:r(h0),autoDestroy:r(f),destroyed:r(u),closed:r(J0),closeEmitted:r(t),multiAwaitDrain:r(a),readingMore:r(M0),dataEmitted:r(y)});function c0(B,b,e){if(typeof e!=="boolean")e=b instanceof WU();if(this.state=h0|f|n|D0,B&&B.objectMode)this.state|=v;if(e&&B&&B.readableObjectMode)this.state|=v;if(this.highWaterMark=B?V0(this,B,"readableHighWaterMark",e):Y0(!1),this.buffer=new o,this.length=0,this.pipes=[],this.flowing=null,this[H]=null,B&&B.emitClose===!1)this.state&=~h0;if(B&&B.autoDestroy===!1)this.state&=~f;if(this.errored=null,this.defaultEncoding=B&&B.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,B&&B.encoding)this.decoder=new z(B.encoding),this.encoding=B.encoding}function d(B){if(!(this instanceof d))return new d(B);let b=this instanceof WU();if(this._readableState=new c0(B,this,b),B){if(typeof B.read==="function")this._read=B.read;if(typeof B.destroy==="function")this._destroy=B.destroy;if(typeof B.construct==="function")this._construct=B.construct;if(B.signal&&!b)N(B.signal,this)}C.call(this,B),Q0.construct(this,()=>{if(this._readableState.needReadable)Z0(this,this._readableState)})}d.prototype.destroy=Q0.destroy,d.prototype._undestroy=Q0.undestroy,d.prototype._destroy=function(B,b){b(B)},d.prototype[k.captureRejectionSymbol]=function(B){this.destroy(B)},d.prototype[Z]=function(){let B;if(!this.destroyed)B=this.readableEnded?null:new W,this.destroy(B);return new E((b,e)=>x(this,($0)=>$0&&$0!==B?e($0):b(null)))},d.prototype.push=function(B,b){return I0(this,B,b,!1)},d.prototype.unshift=function(B,b){return I0(this,B,b,!0)};function I0(B,b,e,$0){w("readableAddChunk",b);let u0=B._readableState,K0;if((u0.state&v)===0){if(typeof b==="string"){if(e=e||u0.defaultEncoding,u0.encoding!==e)if($0&&u0.encoding)b=g.from(b,e).toString(u0.encoding);else b=g.from(b,e),e=""}else if(b instanceof g)e="";else if(C._isUint8Array(b))b=C._uint8ArrayToBuffer(b),e="";else if(b!=null)K0=new U0("chunk",["string","Buffer","Uint8Array"],b)}if(K0)R(B,K0);else if(b===null)u0.state&=~h,z0(B,u0);else if((u0.state&v)!==0||b&&b.length>0)if($0)if((u0.state&c)!==0)R(B,new Q);else if(u0.destroyed||u0.errored)return!1;else b0(B,u0,b,!0);else if(u0.ended)R(B,new D);else if(u0.destroyed||u0.errored)return!1;else if(u0.state&=~h,u0.decoder&&!e)if(b=u0.decoder.write(b),u0.objectMode||b.length!==0)b0(B,u0,b,!1);else Z0(B,u0);else b0(B,u0,b,!1);else if(!$0)u0.state&=~h,Z0(B,u0);return!u0.ended&&(u0.length<u0.highWaterMark||u0.length===0)}function b0(B,b,e,$0){if(b.flowing&&b.length===0&&!b.sync&&B.listenerCount("data")>0){if((b.state&a)!==0)b.awaitDrainWriters.clear();else b.awaitDrainWriters=null;b.dataEmitted=!0,B.emit("data",e)}else{if(b.length+=b.objectMode?1:e.length,$0)b.buffer.unshift(e);else b.buffer.push(e);if((b.state&i)!==0)F0(B)}Z0(B,b)}d.prototype.isPaused=function(){let B=this._readableState;return B[H]===!0||B.flowing===!1},d.prototype.setEncoding=function(B){let b=new z(B);this._readableState.decoder=b,this._readableState.encoding=this._readableState.decoder.encoding;let e=this._readableState.buffer,$0="";for(let u0 of e)$0+=b.write(u0);if(e.clear(),$0!=="")e.push($0);return this._readableState.length=$0.length,this};var A0=1073741824;function H0(B){if(B>A0)throw new G("size","<= 1GiB",B);else B--,B|=B>>>1,B|=B>>>2,B|=B>>>4,B|=B>>>8,B|=B>>>16,B++;return B}function X$(B,b){if(B<=0||b.length===0&&b.ended)return 0;if((b.state&v)!==0)return 1;if(S(B)){if(b.flowing&&b.length)return b.buffer.first().length;return b.length}if(B<=b.length)return B;return b.ended?b.length:0}d.prototype.read=function(B){if(w("read",B),B===void 0)B=NaN;else if(!I(B))B=Y(B,10);let b=this._readableState,e=B;if(B>b.highWaterMark)b.highWaterMark=H0(B);if(B!==0)b.state&=~l;if(B===0&&b.needReadable&&((b.highWaterMark!==0?b.length>=b.highWaterMark:b.length>0)||b.ended)){if(w("read: emitReadable",b.length,b.ended),b.length===0&&b.ended)q$(this);else F0(this);return null}if(B=X$(B,b),B===0&&b.ended){if(b.length===0)q$(this);return null}let $0=(b.state&i)!==0;if(w("need readable",$0),b.length===0||b.length-B<b.highWaterMark)$0=!0,w("length less than watermark",$0);if(b.ended||b.reading||b.destroyed||b.errored||!b.constructed)$0=!1,w("reading, ended or constructing",$0);else if($0){if(w("do read"),b.state|=h|D0,b.length===0)b.state|=i;try{this._read(b.highWaterMark)}catch(K0){R(this,K0)}if(b.state&=~D0,!b.reading)B=X$(e,b)}let u0;if(B>0)u0=q0(B,b);else u0=null;if(u0===null)b.needReadable=b.length<=b.highWaterMark,B=0;else if(b.length-=B,b.multiAwaitDrain)b.awaitDrainWriters.clear();else b.awaitDrainWriters=null;if(b.length===0){if(!b.ended)b.needReadable=!0;if(e!==B&&b.ended)q$(this)}if(u0!==null&&!b.errorEmitted&&!b.closeEmitted)b.dataEmitted=!0,this.emit("data",u0);return u0};function z0(B,b){if(w("onEofChunk"),b.ended)return;if(b.decoder){let e=b.decoder.end();if(e&&e.length)b.buffer.push(e),b.length+=b.objectMode?1:e.length}if(b.ended=!0,b.sync)F0(B);else b.needReadable=!1,b.emittedReadable=!0,Y$(B)}function F0(B){let b=B._readableState;if(w("emitReadable",b.needReadable,b.emittedReadable),b.needReadable=!1,!b.emittedReadable)w("emitReadable",b.flowing),b.emittedReadable=!0,J.nextTick(Y$,B)}function Y$(B){let b=B._readableState;if(w("emitReadable_",b.destroyed,b.length,b.ended),!b.destroyed&&!b.errored&&(b.length||b.ended))B.emit("readable"),b.emittedReadable=!1;b.needReadable=!b.flowing&&!b.ended&&b.length<=b.highWaterMark,T0(B)}function Z0(B,b){if(!b.readingMore&&b.constructed)b.readingMore=!0,J.nextTick(E0,B,b)}function E0(B,b){while(!b.reading&&!b.ended&&(b.length<b.highWaterMark||b.flowing&&b.length===0)){let e=b.length;if(w("maybeReadMore read 0"),B.read(0),e===b.length)break}b.readingMore=!1}d.prototype._read=function(B){throw new O("_read()")},d.prototype.pipe=function(B,b){let e=this,$0=this._readableState;if($0.pipes.length===1){if(!$0.multiAwaitDrain)$0.multiAwaitDrain=!0,$0.awaitDrainWriters=new F($0.awaitDrainWriters?[$0.awaitDrainWriters]:[])}$0.pipes.push(B),w("pipe count=%d opts=%j",$0.pipes.length,b);let u0=(!b||b.end!==!1)&&B!==J.stdout&&B!==J.stderr?L0:o0;if($0.endEmitted)J.nextTick(u0);else e.once("end",u0);B.on("unpipe",K0);function K0(a0,e0){if(w("onunpipe"),a0===e){if(e0&&e0.hasUnpiped===!1)e0.hasUnpiped=!0,B0()}}function L0(){w("onend"),B.end()}let J$,C0=!1;function B0(){if(w("cleanup"),B.removeListener("close",Q$),B.removeListener("finish",r0),J$)B.removeListener("drain",J$);if(B.removeListener("error",v0),B.removeListener("unpipe",K0),e.removeListener("end",L0),e.removeListener("end",o0),e.removeListener("data",k0),C0=!0,J$&&$0.awaitDrainWriters&&(!B._writableState||B._writableState.needDrain))J$()}function _$(){if(!C0){if($0.pipes.length===1&&$0.pipes[0]===B)w("false write response, pause",0),$0.awaitDrainWriters=B,$0.multiAwaitDrain=!1;else if($0.pipes.length>1&&$0.pipes.includes(B))w("false write response, pause",$0.awaitDrainWriters.size),$0.awaitDrainWriters.add(B);e.pause()}if(!J$)J$=N$(e,B),B.on("drain",J$)}e.on("data",k0);function k0(a0){w("ondata");let e0=B.write(a0);if(w("dest.write",e0),e0===!1)_$()}function v0(a0){if(w("onerror",a0),o0(),B.removeListener("error",v0),B.listenerCount("error")===0){let e0=B._writableState||B._readableState;if(e0&&!e0.errorEmitted)R(B,a0);else B.emit("error",a0)}}_(B,"error",v0);function Q$(){B.removeListener("finish",r0),o0()}B.once("close",Q$);function r0(){w("onfinish"),B.removeListener("close",Q$),o0()}B.once("finish",r0);function o0(){w("unpipe"),e.unpipe(B)}if(B.emit("pipe",e),B.writableNeedDrain===!0)_$();else if(!$0.flowing)w("pipe resume"),e.resume();return B};function N$(B,b){return function(){let e=B._readableState;if(e.awaitDrainWriters===b)w("pipeOnDrain",1),e.awaitDrainWriters=null;else if(e.multiAwaitDrain)w("pipeOnDrain",e.awaitDrainWriters.size),e.awaitDrainWriters.delete(b);if((!e.awaitDrainWriters||e.awaitDrainWriters.size===0)&&B.listenerCount("data"))B.resume()}}d.prototype.unpipe=function(B){let b=this._readableState,e={hasUnpiped:!1};if(b.pipes.length===0)return this;if(!B){let u0=b.pipes;b.pipes=[],this.pause();for(let K0=0;K0<u0.length;K0++)u0[K0].emit("unpipe",this,{hasUnpiped:!1});return this}let $0=V(b.pipes,B);if($0===-1)return this;if(b.pipes.splice($0,1),b.pipes.length===0)this.pause();return B.emit("unpipe",this,e),this},d.prototype.on=function(B,b){let e=C.prototype.on.call(this,B,b),$0=this._readableState;if(B==="data"){if($0.readableListening=this.listenerCount("readable")>0,$0.flowing!==!1)this.resume()}else if(B==="readable"){if(!$0.endEmitted&&!$0.readableListening){if($0.readableListening=$0.needReadable=!0,$0.flowing=!1,$0.emittedReadable=!1,w("on readable",$0.length,$0.reading),$0.length)F0(this);else if(!$0.reading)J.nextTick(g0,this)}}return e},d.prototype.addListener=d.prototype.on,d.prototype.removeListener=function(B,b){let e=C.prototype.removeListener.call(this,B,b);if(B==="readable")J.nextTick(P0,this);return e},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(B){let b=C.prototype.removeAllListeners.apply(this,arguments);if(B==="readable"||B===void 0)J.nextTick(P0,this);return b};function P0(B){let b=B._readableState;if(b.readableListening=B.listenerCount("readable")>0,b.resumeScheduled&&b[H]===!1)b.flowing=!0;else if(B.listenerCount("data")>0)B.resume();else if(!b.readableListening)b.flowing=null}function g0(B){w("readable nexttick read 0"),B.read(0)}d.prototype.resume=function(){let B=this._readableState;if(!B.flowing)w("resume"),B.flowing=!B.readableListening,x$(this,B);return B[H]=!1,this};function x$(B,b){if(!b.resumeScheduled)b.resumeScheduled=!0,J.nextTick(j0,B,b)}function j0(B,b){if(w("resume",b.reading),!b.reading)B.read(0);if(b.resumeScheduled=!1,B.emit("resume"),T0(B),b.flowing&&!b.reading)B.read(0)}d.prototype.pause=function(){if(w("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)w("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[H]=!0,this};function T0(B){let b=B._readableState;w("flow",b.flowing);while(b.flowing&&B.read()!==null);}d.prototype.wrap=function(B){let b=!1;B.on("data",($0)=>{if(!this.push($0)&&B.pause)b=!0,B.pause()}),B.on("end",()=>{this.push(null)}),B.on("error",($0)=>{R(this,$0)}),B.on("close",()=>{this.destroy()}),B.on("destroy",()=>{this.destroy()}),this._read=()=>{if(b&&B.resume)b=!1,B.resume()};let e=T(B);for(let $0=1;$0<e.length;$0++){let u0=e[$0];if(this[u0]===void 0&&typeof B[u0]==="function")this[u0]=B[u0].bind(B)}return this},d.prototype[P]=function(){return j$(this)},d.prototype.iterator=function(B){if(B!==void 0)A(B,"options");return j$(this,B)};function j$(B,b){if(typeof B.read!=="function")B=d.wrap(B,{objectMode:!0});let e=_0(B,b);return e.stream=B,e}async function*_0(B,b){let e=K;function $0(L0){if(this===B)e(),e=K;else e=L0}B.on("readable",$0);let u0,K0=x(B,{writable:!1},(L0)=>{u0=L0?p(u0,L0):null,e(),e=K});try{while(!0){let L0=B.destroyed?null:B.read();if(L0!==null)yield L0;else if(u0)throw u0;else if(u0===null)return;else await new E($0)}}catch(L0){throw u0=p(u0,L0),u0}finally{if((u0||(b===null||b===void 0?void 0:b.destroyOnReturn)!==!1)&&(u0===void 0||B._readableState.autoDestroy))Q0.destroyer(B,null);else B.off("readable",$0),K0()}}M(d.prototype,{readable:{__proto__:null,get(){let B=this._readableState;return!!B&&B.readable!==!1&&!B.destroyed&&!B.errorEmitted&&!B.endEmitted},set(B){if(this._readableState)this._readableState.readable=!!B}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(B){if(this._readableState)this._readableState.flowing=B}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(B){if(!this._readableState)return;this._readableState.destroyed=B}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),M(c0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[H]!==!1},set(B){this[H]=!!B}}}),d._fromList=q0;function q0(B,b){if(b.length===0)return null;let e;if(b.objectMode)e=b.buffer.shift();else if(!B||B>=b.length){if(b.decoder)e=b.buffer.join("");else if(b.buffer.length===1)e=b.buffer.first();else e=b.buffer.concat(b.length);b.buffer.clear()}else e=b.buffer.consume(B,b.decoder);return e}function q$(B){let b=B._readableState;if(w("endReadable",b.endEmitted),!b.endEmitted)b.ended=!0,J.nextTick(N0,b,B)}function N0(B,b){if(w("endReadableNT",B.endEmitted,B.length),!B.errored&&!B.closeEmitted&&!B.endEmitted&&B.length===0){if(B.endEmitted=!0,b.emit("end"),b.writable&&b.allowHalfOpen===!1)J.nextTick(x0,b);else if(B.autoDestroy){let e=b._writableState;if(!e||e.autoDestroy&&(e.finished||e.writable===!1))b.destroy()}}}function x0(B){if(B.writable&&!B.writableEnded&&!B.destroyed)B.end()}d.from=function(B,b){return X(d,B,b)};var R$;function R0(){if(R$===void 0)R$={};return R$}d.fromWeb=function(B,b){return R0().newStreamReadableFromReadableStream(B,b)},d.toWeb=function(B,b){return R0().newReadableStreamFromStreamReadable(B,b)},d.wrap=function(B,b){var e,$0;return new d({objectMode:(e=($0=B.readableObjectMode)!==null&&$0!==void 0?$0:B.objectMode)!==null&&e!==void 0?e:!0,...b,destroy(u0,K0){Q0.destroyer(B,u0),K0(u0)}}).wrap(B)}}),PQ=i0(($,U)=>{var J=cU(),{ArrayPrototypeSlice:V,Error:I,FunctionPrototypeSymbolHasInstance:S,ObjectDefineProperty:Y,ObjectDefineProperties:M,ObjectSetPrototypeOf:T,StringPrototypeToLowerCase:L,Symbol:E,SymbolHasInstance:F}=O$();U.exports=A,A.WritableState=Q;var{EventEmitter:Z}=(t$(),d0(OI)),P=MQ().Stream,{Buffer:q}=(g$(),d0(k$)),k=UI(),{addAbortSignal:C}=S6(),{getHighWaterMark:_,getDefaultHighWaterMark:g}=W6(),{ERR_INVALID_ARG_TYPE:N,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_MULTIPLE_CALLBACK:w,ERR_STREAM_CANNOT_PIPE:o,ERR_STREAM_DESTROYED:Q0,ERR_STREAM_ALREADY_FINISHED:V0,ERR_STREAM_NULL_VALUES:Y0,ERR_STREAM_WRITE_AFTER_END:p,ERR_UNKNOWN_ENCODING:U0}=B$().codes,{errorOrDestroy:O}=k;T(A.prototype,P.prototype),T(A,P);function G(){}var D=E("kOnFinished");function Q(f,u,J0){if(typeof J0!=="boolean")J0=u instanceof WU();if(this.objectMode=!!(f&&f.objectMode),J0)this.objectMode=this.objectMode||!!(f&&f.writableObjectMode);this.highWaterMark=f?_(this,f,"writableHighWaterMark",J0):g(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let t=!!(f&&f.decodeStrings===!1);this.decodeStrings=!t,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=R.bind(void 0,u),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,W(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!f||f.emitClose!==!1,this.autoDestroy=!f||f.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function W(f){f.buffered=[],f.bufferedIndex=0,f.allBuffers=!0,f.allNoop=!0}Q.prototype.getBuffer=function(){return V(this.buffered,this.bufferedIndex)},Y(Q.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function A(f){let u=this instanceof WU();if(!u&&!S(A,this))return new A(f);if(this._writableState=new Q(f,this,u),f){if(typeof f.write==="function")this._write=f.write;if(typeof f.writev==="function")this._writev=f.writev;if(typeof f.destroy==="function")this._destroy=f.destroy;if(typeof f.final==="function")this._final=f.final;if(typeof f.construct==="function")this._construct=f.construct;if(f.signal)C(f.signal,this)}P.call(this,f),k.construct(this,()=>{let J0=this._writableState;if(!J0.writing)h(this,J0);l(this,J0)})}Y(A,F,{__proto__:null,value:function(f){if(S(this,f))return!0;if(this!==A)return!1;return f&&f._writableState instanceof Q}}),A.prototype.pipe=function(){O(this,new o)};function H(f,u,J0,t){let a=f._writableState;if(typeof J0==="function")t=J0,J0=a.defaultEncoding;else{if(!J0)J0=a.defaultEncoding;else if(J0!=="buffer"&&!q.isEncoding(J0))throw new U0(J0);if(typeof t!=="function")t=G}if(u===null)throw new Y0;else if(!a.objectMode)if(typeof u==="string"){if(a.decodeStrings!==!1)u=q.from(u,J0),J0="buffer"}else if(u instanceof q)J0="buffer";else if(P._isUint8Array(u))u=P._uint8ArrayToBuffer(u),J0="buffer";else throw new N("chunk",["string","Buffer","Uint8Array"],u);let M0;if(a.ending)M0=new p;else if(a.destroyed)M0=new Q0("write");if(M0)return J.nextTick(t,M0),O(f,M0,!0),M0;return a.pendingcb++,z(f,a,u,J0,t)}A.prototype.write=function(f,u,J0){return H(this,f,u,J0)===!0},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){let f=this._writableState;if(f.corked){if(f.corked--,!f.writing)h(this,f)}},A.prototype.setDefaultEncoding=function(f){if(typeof f==="string")f=L(f);if(!q.isEncoding(f))throw new U0(f);return this._writableState.defaultEncoding=f,this};function z(f,u,J0,t,a){let M0=u.objectMode?1:J0.length;u.length+=M0;let y=u.length<u.highWaterMark;if(!y)u.needDrain=!0;if(u.writing||u.corked||u.errored||!u.constructed){if(u.buffered.push({chunk:J0,encoding:t,callback:a}),u.allBuffers&&t!=="buffer")u.allBuffers=!1;if(u.allNoop&&a!==G)u.allNoop=!1}else u.writelen=M0,u.writecb=a,u.writing=!0,u.sync=!0,f._write(J0,t,u.onwrite),u.sync=!1;return y&&!u.errored&&!u.destroyed}function X(f,u,J0,t,a,M0,y){if(u.writelen=t,u.writecb=y,u.writing=!0,u.sync=!0,u.destroyed)u.onwrite(new Q0("write"));else if(J0)f._writev(a,u.onwrite);else f._write(a,M0,u.onwrite);u.sync=!1}function K(f,u,J0,t){--u.pendingcb,t(J0),c(u),O(f,J0)}function R(f,u){let J0=f._writableState,t=J0.sync,a=J0.writecb;if(typeof a!=="function"){O(f,new w);return}if(J0.writing=!1,J0.writecb=null,J0.length-=J0.writelen,J0.writelen=0,u){if(u.stack,!J0.errored)J0.errored=u;if(f._readableState&&!f._readableState.errored)f._readableState.errored=u;if(t)J.nextTick(K,f,J0,u,a);else K(f,J0,u,a)}else{if(J0.buffered.length>J0.bufferedIndex)h(f,J0);if(t)if(J0.afterWriteTickInfo!==null&&J0.afterWriteTickInfo.cb===a)J0.afterWriteTickInfo.count++;else J0.afterWriteTickInfo={count:1,cb:a,stream:f,state:J0},J.nextTick(v,J0.afterWriteTickInfo);else j(f,J0,1,a)}}function v({stream:f,state:u,count:J0,cb:t}){return u.afterWriteTickInfo=null,j(f,u,J0,t)}function j(f,u,J0,t){if(!u.ending&&!f.destroyed&&u.length===0&&u.needDrain)u.needDrain=!1,f.emit("drain");while(J0-- >0)u.pendingcb--,t();if(u.destroyed)c(u);l(f,u)}function c(f){if(f.writing)return;for(let a=f.bufferedIndex;a<f.buffered.length;++a){var u;let{chunk:M0,callback:y}=f.buffered[a],r=f.objectMode?1:M0.length;f.length-=r,y((u=f.errored)!==null&&u!==void 0?u:new Q0("write"))}let J0=f[D].splice(0);for(let a=0;a<J0.length;a++){var t;J0[a]((t=f.errored)!==null&&t!==void 0?t:new Q0("end"))}W(f)}function h(f,u){if(u.corked||u.bufferProcessing||u.destroyed||!u.constructed)return;let{buffered:J0,bufferedIndex:t,objectMode:a}=u,M0=J0.length-t;if(!M0)return;let y=t;if(u.bufferProcessing=!0,M0>1&&f._writev){u.pendingcb-=M0-1;let r=u.allNoop?G:(d)=>{for(let I0=y;I0<J0.length;++I0)J0[I0].callback(d)},c0=u.allNoop&&y===0?J0:V(J0,y);c0.allBuffers=u.allBuffers,X(f,u,!0,u.length,c0,"",r),W(u)}else{do{let{chunk:r,encoding:c0,callback:d}=J0[y];J0[y++]=null;let I0=a?1:r.length;X(f,u,!1,I0,r,c0,d)}while(y<J0.length&&!u.writing);if(y===J0.length)W(u);else if(y>256)J0.splice(0,y),u.bufferedIndex=0;else u.bufferedIndex=y}u.bufferProcessing=!1}A.prototype._write=function(f,u,J0){if(this._writev)this._writev([{chunk:f,encoding:u}],J0);else throw new x("_write()")},A.prototype._writev=null,A.prototype.end=function(f,u,J0){let t=this._writableState;if(typeof f==="function")J0=f,f=null,u=null;else if(typeof u==="function")J0=u,u=null;let a;if(f!==null&&f!==void 0){let M0=H(this,f,u);if(M0 instanceof I)a=M0}if(t.corked)t.corked=1,this.uncork();if(a);else if(!t.errored&&!t.ending)t.ending=!0,l(this,t,!0),t.ended=!0;else if(t.finished)a=new V0("end");else if(t.destroyed)a=new Q0("end");if(typeof J0==="function")if(a||t.finished)J.nextTick(J0,a);else t[D].push(J0);return this};function n(f){return f.ending&&!f.destroyed&&f.constructed&&f.length===0&&!f.errored&&f.buffered.length===0&&!f.finished&&!f.writing&&!f.errorEmitted&&!f.closeEmitted}function D0(f,u){let J0=!1;function t(a){if(J0){O(f,a!==null&&a!==void 0?a:w());return}if(J0=!0,u.pendingcb--,a){let M0=u[D].splice(0);for(let y=0;y<M0.length;y++)M0[y](a);O(f,a,u.sync)}else if(n(u))u.prefinished=!0,f.emit("prefinish"),u.pendingcb++,J.nextTick(X0,f,u)}u.sync=!0,u.pendingcb++;try{f._final(t)}catch(a){t(a)}u.sync=!1}function i(f,u){if(!u.prefinished&&!u.finalCalled)if(typeof f._final==="function"&&!u.destroyed)u.finalCalled=!0,D0(f,u);else u.prefinished=!0,f.emit("prefinish")}function l(f,u,J0){if(n(u)){if(i(f,u),u.pendingcb===0){if(J0)u.pendingcb++,J.nextTick((t,a)=>{if(n(a))X0(t,a);else a.pendingcb--},f,u);else if(n(u))u.pendingcb++,X0(f,u)}}}function X0(f,u){u.pendingcb--,u.finished=!0;let J0=u[D].splice(0);for(let t=0;t<J0.length;t++)J0[t]();if(f.emit("finish"),u.autoDestroy){let t=f._readableState;if(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))f.destroy()}}M(A.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(f){if(this._writableState)this._writableState.destroyed=f}},writable:{__proto__:null,get(){let f=this._writableState;return!!f&&f.writable!==!1&&!f.destroyed&&!f.errored&&!f.ending&&!f.ended},set(f){if(this._writableState)this._writableState.writable=!!f}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let f=this._writableState;if(!f)return!1;return!f.destroyed&&!f.ending&&f.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var m=k.destroy;A.prototype.destroy=function(f,u){let J0=this._writableState;if(!J0.destroyed&&(J0.bufferedIndex<J0.buffered.length||J0[D].length))J.nextTick(c,J0);return m.call(this,f,u),this},A.prototype._undestroy=k.undestroy,A.prototype._destroy=function(f,u){u(f)},A.prototype[Z.captureRejectionSymbol]=function(f){this.destroy(f)};var s;function h0(){if(s===void 0)s={};return s}A.fromWeb=function(f,u){return h0().newStreamWritableFromWritableStream(f,u)},A.toWeb=function(f){return h0().newWritableStreamFromStreamWritable(f)}}),PK=i0(($,U)=>{var J=cU(),V=(g$(),d0(k$)),{isReadable:I,isWritable:S,isIterable:Y,isNodeStream:M,isReadableNodeStream:T,isWritableNodeStream:L,isDuplexNodeStream:E,isReadableStream:F,isWritableStream:Z}=DU(),P=vU(),{AbortError:q,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:C}}=B$(),{destroyer:_}=UI(),g=WU(),N=D6(),x=PQ(),{createDeferredPromise:w}=h$(),o=OV(),Q0=globalThis.Blob||V.Blob,V0=typeof Q0<"u"?function(D){return D instanceof Q0}:function(D){return!1},Y0=globalThis.AbortController||lI().AbortController,{FunctionPrototypeCall:p}=O$();class U0 extends g{constructor(D){super(D);if((D===null||D===void 0?void 0:D.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((D===null||D===void 0?void 0:D.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}U.exports=function D(Q,W){if(E(Q))return Q;if(T(Q))return G({readable:Q});if(L(Q))return G({writable:Q});if(M(Q))return G({writable:!1,readable:!1});if(F(Q))return G({readable:N.fromWeb(Q)});if(Z(Q))return G({writable:x.fromWeb(Q)});if(typeof Q==="function"){let{value:H,write:z,final:X,destroy:K}=O(Q);if(Y(H))return o(U0,H,{objectMode:!0,write:z,final:X,destroy:K});let R=H===null||H===void 0?void 0:H.then;if(typeof R==="function"){let v,j=p(R,H,(c)=>{if(c!=null)throw new C("nully","body",c)},(c)=>{_(v,c)});return v=new U0({objectMode:!0,readable:!1,write:z,final(c){X(async()=>{try{await j,J.nextTick(c,null)}catch(h){J.nextTick(c,h)}})},destroy:K})}throw new C("Iterable, AsyncIterable or AsyncFunction",W,H)}if(V0(Q))return D(Q.arrayBuffer());if(Y(Q))return o(U0,Q,{objectMode:!0,writable:!1});if(F(Q===null||Q===void 0?void 0:Q.readable)&&Z(Q===null||Q===void 0?void 0:Q.writable))return U0.fromWeb(Q);if(typeof(Q===null||Q===void 0?void 0:Q.writable)==="object"||typeof(Q===null||Q===void 0?void 0:Q.readable)==="object"){let H=Q!==null&&Q!==void 0&&Q.readable?T(Q===null||Q===void 0?void 0:Q.readable)?Q===null||Q===void 0?void 0:Q.readable:D(Q.readable):void 0,z=Q!==null&&Q!==void 0&&Q.writable?L(Q===null||Q===void 0?void 0:Q.writable)?Q===null||Q===void 0?void 0:Q.writable:D(Q.writable):void 0;return G({readable:H,writable:z})}let A=Q===null||Q===void 0?void 0:Q.then;if(typeof A==="function"){let H;return p(A,Q,(z)=>{if(z!=null)H.push(z);H.push(null)},(z)=>{_(H,z)}),H=new U0({objectMode:!0,writable:!1,read(){}})}throw new k(W,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Q)};function O(D){let{promise:Q,resolve:W}=w(),A=new Y0,H=A.signal;return{value:D(async function*(){while(!0){let z=Q;Q=null;let{chunk:X,done:K,cb:R}=await z;if(J.nextTick(R),K)return;if(H.aborted)throw new q(void 0,{cause:H.reason});({promise:Q,resolve:W}=w()),yield X}}(),{signal:H}),write(z,X,K){let R=W;W=null,R({chunk:z,done:!1,cb:K})},final(z){let X=W;W=null,X({done:!0,cb:z})},destroy(z,X){A.abort(),X(z)}}}function G(D){let Q=D.readable&&typeof D.readable.read!=="function"?N.wrap(D.readable):D.readable,W=D.writable,A=!!I(Q),H=!!S(W),z,X,K,R,v;function j(c){let h=R;if(R=null,h)h(c);else if(c)v.destroy(c)}if(v=new U0({readableObjectMode:!!(Q!==null&&Q!==void 0&&Q.readableObjectMode),writableObjectMode:!!(W!==null&&W!==void 0&&W.writableObjectMode),readable:A,writable:H}),H)P(W,(c)=>{if(H=!1,c)_(Q,c);j(c)}),v._write=function(c,h,n){if(W.write(c,h))n();else z=n},v._final=function(c){W.end(),X=c},W.on("drain",function(){if(z){let c=z;z=null,c()}}),W.on("finish",function(){if(X){let c=X;X=null,c()}});if(A)P(Q,(c)=>{if(A=!1,c)_(Q,c);j(c)}),Q.on("readable",function(){if(K){let c=K;K=null,c()}}),Q.on("end",function(){v.push(null)}),v._read=function(){while(!0){let c=Q.read();if(c===null){K=v._read;return}if(!v.push(c))return}};return v._destroy=function(c,h){if(!c&&R!==null)c=new q;if(K=null,z=null,X=null,R===null)h(c);else R=h,_(W,c),_(Q,c)},v}}),WU=i0(($,U)=>{var{ObjectDefineProperties:J,ObjectGetOwnPropertyDescriptor:V,ObjectKeys:I,ObjectSetPrototypeOf:S}=O$();U.exports=T;var Y=D6(),M=PQ();S(T.prototype,Y.prototype),S(T,Y);{let Z=I(M.prototype);for(let P=0;P<Z.length;P++){let q=Z[P];if(!T.prototype[q])T.prototype[q]=M.prototype[q]}}function T(Z){if(!(this instanceof T))return new T(Z);if(Y.call(this,Z),M.call(this,Z),Z){if(this.allowHalfOpen=Z.allowHalfOpen!==!1,Z.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(Z.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}J(T.prototype,{writable:{__proto__:null,...V(M.prototype,"writable")},writableHighWaterMark:{__proto__:null,...V(M.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...V(M.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...V(M.prototype,"writableBuffer")},writableLength:{__proto__:null,...V(M.prototype,"writableLength")},writableFinished:{__proto__:null,...V(M.prototype,"writableFinished")},writableCorked:{__proto__:null,...V(M.prototype,"writableCorked")},writableEnded:{__proto__:null,...V(M.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...V(M.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(Z){if(this._readableState&&this._writableState)this._readableState.destroyed=Z,this._writableState.destroyed=Z}}});var L;function E(){if(L===void 0)L={};return L}T.fromWeb=function(Z,P){return E().newStreamDuplexFromReadableWritablePair(Z,P)},T.toWeb=function(Z){return E().newReadableWritablePairFromDuplex(Z)};var F;T.from=function(Z){if(!F)F=PK();return F(Z,"body")}}),XV=i0(($,U)=>{var{ObjectSetPrototypeOf:J,Symbol:V}=O$();U.exports=T;var{ERR_METHOD_NOT_IMPLEMENTED:I}=B$().codes,S=WU(),{getHighWaterMark:Y}=W6();J(T.prototype,S.prototype),J(T,S);var M=V("kCallback");function T(F){if(!(this instanceof T))return new T(F);let Z=F?Y(this,F,"readableHighWaterMark",!0):null;if(Z===0)F={...F,highWaterMark:null,readableHighWaterMark:Z,writableHighWaterMark:F.writableHighWaterMark||0};if(S.call(this,F),this._readableState.sync=!1,this[M]=null,F){if(typeof F.transform==="function")this._transform=F.transform;if(typeof F.flush==="function")this._flush=F.flush}this.on("prefinish",E)}function L(F){if(typeof this._flush==="function"&&!this.destroyed)this._flush((Z,P)=>{if(Z){if(F)F(Z);else this.destroy(Z);return}if(P!=null)this.push(P);if(this.push(null),F)F()});else if(this.push(null),F)F()}function E(){if(this._final!==L)L.call(this)}T.prototype._final=L,T.prototype._transform=function(F,Z,P){throw new I("_transform()")},T.prototype._write=function(F,Z,P){let q=this._readableState,k=this._writableState,C=q.length;this._transform(F,Z,(_,g)=>{if(_){P(_);return}if(g!=null)this.push(g);if(k.ended||C===q.length||q.length<q.highWaterMark)P();else this[M]=P})},T.prototype._read=function(){if(this[M]){let F=this[M];this[M]=null,F()}}}),JV=i0(($,U)=>{var{ObjectSetPrototypeOf:J}=O$();U.exports=I;var V=XV();J(I.prototype,V.prototype),J(I,V);function I(S){if(!(this instanceof I))return new I(S);V.call(this,S)}I.prototype._transform=function(S,Y,M){M(null,S)}}),TQ=i0(($,U)=>{var J=cU(),{ArrayIsArray:V,Promise:I,SymbolAsyncIterator:S,SymbolDispose:Y}=O$(),M=vU(),{once:T}=h$(),L=UI(),E=WU(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:Z,ERR_INVALID_RETURN_VALUE:P,ERR_MISSING_ARGS:q,ERR_STREAM_DESTROYED:k,ERR_STREAM_PREMATURE_CLOSE:C},AbortError:_}=B$(),{validateFunction:g,validateAbortSignal:N}=oI(),{isIterable:x,isReadable:w,isReadableNodeStream:o,isNodeStream:Q0,isTransformStream:V0,isWebStream:Y0,isReadableStream:p,isReadableFinished:U0}=DU(),O=globalThis.AbortController||lI().AbortController,G,D,Q;function W(c,h,n){let D0=!1;c.on("close",()=>{D0=!0});let i=M(c,{readable:h,writable:n},(l)=>{D0=!l});return{destroy:(l)=>{if(D0)return;D0=!0,L.destroyer(c,l||new k("pipe"))},cleanup:i}}function A(c){return g(c[c.length-1],"streams[stream.length - 1]"),c.pop()}function H(c){if(x(c))return c;else if(o(c))return z(c);throw new Z("val",["Readable","Iterable","AsyncIterable"],c)}async function*z(c){if(!D)D=D6();yield*D.prototype[S].call(c)}async function X(c,h,n,{end:D0}){let i,l=null,X0=(h0)=>{if(h0)i=h0;if(l){let f=l;l=null,f()}},m=()=>new I((h0,f)=>{if(i)f(i);else l=()=>{if(i)f(i);else h0()}});h.on("drain",X0);let s=M(h,{readable:!1},X0);try{if(h.writableNeedDrain)await m();for await(let h0 of c)if(!h.write(h0))await m();if(D0)h.end(),await m();n()}catch(h0){n(i!==h0?F(i,h0):h0)}finally{s(),h.off("drain",X0)}}async function K(c,h,n,{end:D0}){if(V0(h))h=h.writable;let i=h.getWriter();try{for await(let l of c)await i.ready,i.write(l).catch(()=>{});if(await i.ready,D0)await i.close();n()}catch(l){try{await i.abort(l),n(l)}catch(X0){n(X0)}}}function R(...c){return v(c,T(A(c)))}function v(c,h,n){if(c.length===1&&V(c[0]))c=c[0];if(c.length<2)throw new q("streams");let D0=new O,i=D0.signal,l=n===null||n===void 0?void 0:n.signal,X0=[];N(l,"options.signal");function m(){a(new _)}Q=Q||h$().addAbortListener;let s;if(l)s=Q(l,m);let h0,f,u=[],J0=0;function t(d){a(d,--J0===0)}function a(d,I0){var b0;if(d&&(!h0||h0.code==="ERR_STREAM_PREMATURE_CLOSE"))h0=d;if(!h0&&!I0)return;while(u.length)u.shift()(h0);if((b0=s)===null||b0===void 0||b0[Y](),D0.abort(),I0){if(!h0)X0.forEach((A0)=>A0());J.nextTick(h,h0,f)}}let M0;for(let d=0;d<c.length;d++){let I0=c[d],b0=d<c.length-1,A0=d>0,H0=b0||(n===null||n===void 0?void 0:n.end)!==!1,X$=d===c.length-1;if(Q0(I0)){let z0=function(F0){if(F0&&F0.name!=="AbortError"&&F0.code!=="ERR_STREAM_PREMATURE_CLOSE")t(F0)};var y=z0;if(H0){let{destroy:F0,cleanup:Y$}=W(I0,b0,A0);if(u.push(F0),w(I0)&&X$)X0.push(Y$)}if(I0.on("error",z0),w(I0)&&X$)X0.push(()=>{I0.removeListener("error",z0)})}if(d===0)if(typeof I0==="function"){if(M0=I0({signal:i}),!x(M0))throw new P("Iterable, AsyncIterable or Stream","source",M0)}else if(x(I0)||o(I0)||V0(I0))M0=I0;else M0=E.from(I0);else if(typeof I0==="function"){if(V0(M0)){var r;M0=H((r=M0)===null||r===void 0?void 0:r.readable)}else M0=H(M0);if(M0=I0(M0,{signal:i}),b0){if(!x(M0,!0))throw new P("AsyncIterable",`transform[${d-1}]`,M0)}else{var c0;if(!G)G=JV();let z0=new G({objectMode:!0}),F0=(c0=M0)===null||c0===void 0?void 0:c0.then;if(typeof F0==="function")J0++,F0.call(M0,(E0)=>{if(f=E0,E0!=null)z0.write(E0);if(H0)z0.end();J.nextTick(t)},(E0)=>{z0.destroy(E0),J.nextTick(t,E0)});else if(x(M0,!0))J0++,X(M0,z0,t,{end:H0});else if(p(M0)||V0(M0)){let E0=M0.readable||M0;J0++,X(E0,z0,t,{end:H0})}else throw new P("AsyncIterable or Promise","destination",M0);M0=z0;let{destroy:Y$,cleanup:Z0}=W(M0,!1,!0);if(u.push(Y$),X$)X0.push(Z0)}}else if(Q0(I0)){if(o(M0)){J0+=2;let z0=j(M0,I0,t,{end:H0});if(w(I0)&&X$)X0.push(z0)}else if(V0(M0)||p(M0)){let z0=M0.readable||M0;J0++,X(z0,I0,t,{end:H0})}else if(x(M0))J0++,X(M0,I0,t,{end:H0});else throw new Z("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],M0);M0=I0}else if(Y0(I0)){if(o(M0))J0++,K(H(M0),I0,t,{end:H0});else if(p(M0)||x(M0))J0++,K(M0,I0,t,{end:H0});else if(V0(M0))J0++,K(M0.readable,I0,t,{end:H0});else throw new Z("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],M0);M0=I0}else M0=E.from(I0)}if(i!==null&&i!==void 0&&i.aborted||l!==null&&l!==void 0&&l.aborted)J.nextTick(m);return M0}function j(c,h,n,{end:D0}){let i=!1;if(h.on("close",()=>{if(!i)n(new C)}),c.pipe(h,{end:!1}),D0){let X0=function(){i=!0,h.end()};var l=X0;if(U0(c))J.nextTick(X0);else c.once("end",X0)}else n();return M(c,{readable:!0,writable:!1},(X0)=>{let m=c._readableState;if(X0&&X0.code==="ERR_STREAM_PREMATURE_CLOSE"&&m&&m.ended&&!m.errored&&!m.errorEmitted)c.once("end",n).once("error",n);else n(X0)}),M(h,{readable:!1,writable:!0},n)}U.exports={pipelineImpl:v,pipeline:R}}),QV=i0(($,U)=>{var{pipeline:J}=TQ(),V=WU(),{destroyer:I}=UI(),{isNodeStream:S,isReadable:Y,isWritable:M,isWebStream:T,isTransformStream:L,isWritableStream:E,isReadableStream:F}=DU(),{AbortError:Z,codes:{ERR_INVALID_ARG_VALUE:P,ERR_MISSING_ARGS:q}}=B$(),k=vU();U.exports=function(...C){if(C.length===0)throw new q("streams");if(C.length===1)return V.from(C[0]);let _=[...C];if(typeof C[0]==="function")C[0]=V.from(C[0]);if(typeof C[C.length-1]==="function"){let O=C.length-1;C[O]=V.from(C[O])}for(let O=0;O<C.length;++O){if(!S(C[O])&&!T(C[O]))continue;if(O<C.length-1&&!(Y(C[O])||F(C[O])||L(C[O])))throw new P(`streams[${O}]`,_[O],"must be readable");if(O>0&&!(M(C[O])||E(C[O])||L(C[O])))throw new P(`streams[${O}]`,_[O],"must be writable")}let g,N,x,w,o;function Q0(O){let G=w;if(w=null,G)G(O);else if(O)o.destroy(O);else if(!U0&&!p)o.destroy()}let V0=C[0],Y0=J(C,Q0),p=!!(M(V0)||E(V0)||L(V0)),U0=!!(Y(Y0)||F(Y0)||L(Y0));if(o=new V({writableObjectMode:!!(V0!==null&&V0!==void 0&&V0.writableObjectMode),readableObjectMode:!!(Y0!==null&&Y0!==void 0&&Y0.readableObjectMode),writable:p,readable:U0}),p){if(S(V0))o._write=function(G,D,Q){if(V0.write(G,D))Q();else g=Q},o._final=function(G){V0.end(),N=G},V0.on("drain",function(){if(g){let G=g;g=null,G()}});else if(T(V0)){let G=(L(V0)?V0.writable:V0).getWriter();o._write=async function(D,Q,W){try{await G.ready,G.write(D).catch(()=>{}),W()}catch(A){W(A)}},o._final=async function(D){try{await G.ready,G.close().catch(()=>{}),N=D}catch(Q){D(Q)}}}let O=L(Y0)?Y0.readable:Y0;k(O,()=>{if(N){let G=N;N=null,G()}})}if(U0){if(S(Y0))Y0.on("readable",function(){if(x){let O=x;x=null,O()}}),Y0.on("end",function(){o.push(null)}),o._read=function(){while(!0){let O=Y0.read();if(O===null){x=o._read;return}if(!o.push(O))return}};else if(T(Y0)){let O=(L(Y0)?Y0.readable:Y0).getReader();o._read=async function(){while(!0)try{let{value:G,done:D}=await O.read();if(!o.push(G))return;if(D){o.push(null);return}}catch{return}}}}return o._destroy=function(O,G){if(!O&&w!==null)O=new Z;if(x=null,g=null,N=null,w===null)G(O);else if(w=G,S(Y0))I(Y0,O)},o}}),TK=i0(($,U)=>{var J=globalThis.AbortController||lI().AbortController,{codes:{ERR_INVALID_ARG_VALUE:V,ERR_INVALID_ARG_TYPE:I,ERR_MISSING_ARGS:S,ERR_OUT_OF_RANGE:Y},AbortError:M}=B$(),{validateAbortSignal:T,validateInteger:L,validateObject:E}=oI(),F=O$().Symbol("kWeak"),Z=O$().Symbol("kResistStopPropagation"),{finished:P}=vU(),q=QV(),{addAbortSignalNoValidate:k}=S6(),{isWritable:C,isNodeStream:_}=DU(),{deprecate:g}=h$(),{ArrayPrototypePush:N,Boolean:x,MathFloor:w,Number:o,NumberIsNaN:Q0,Promise:V0,PromiseReject:Y0,PromiseResolve:p,PromisePrototypeThen:U0,Symbol:O}=O$(),G=O("kEmpty"),D=O("kEof");function Q(l,X0){if(X0!=null)E(X0,"options");if((X0===null||X0===void 0?void 0:X0.signal)!=null)T(X0.signal,"options.signal");if(_(l)&&!C(l))throw new V("stream",l,"must be writable");let m=q(this,l);if(X0!==null&&X0!==void 0&&X0.signal)k(X0.signal,m);return m}function W(l,X0){if(typeof l!=="function")throw new I("fn",["Function","AsyncFunction"],l);if(X0!=null)E(X0,"options");if((X0===null||X0===void 0?void 0:X0.signal)!=null)T(X0.signal,"options.signal");let m=1;if((X0===null||X0===void 0?void 0:X0.concurrency)!=null)m=w(X0.concurrency);let s=m-1;if((X0===null||X0===void 0?void 0:X0.highWaterMark)!=null)s=w(X0.highWaterMark);return L(m,"options.concurrency",1),L(s,"options.highWaterMark",0),s+=m,async function*(){let h0=h$().AbortSignalAny([X0===null||X0===void 0?void 0:X0.signal].filter(x)),f=this,u=[],J0={signal:h0},t,a,M0=!1,y=0;function r(){M0=!0,c0()}function c0(){y-=1,d()}function d(){if(a&&!M0&&y<m&&u.length<s)a(),a=null}async function I0(){try{for await(let b0 of f){if(M0)return;if(h0.aborted)throw new M;try{if(b0=l(b0,J0),b0===G)continue;b0=p(b0)}catch(A0){b0=Y0(A0)}if(y+=1,U0(b0,c0,r),u.push(b0),t)t(),t=null;if(!M0&&(u.length>=s||y>=m))await new V0((A0)=>{a=A0})}u.push(D)}catch(b0){let A0=Y0(b0);U0(A0,c0,r),u.push(A0)}finally{if(M0=!0,t)t(),t=null}}I0();try{while(!0){while(u.length>0){let b0=await u[0];if(b0===D)return;if(h0.aborted)throw new M;if(b0!==G)yield b0;u.shift(),d()}await new V0((b0)=>{t=b0})}}finally{if(M0=!0,a)a(),a=null}}.call(this)}function A(l=void 0){if(l!=null)E(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)T(l.signal,"options.signal");return async function*(){let X0=0;for await(let s of this){var m;if(l!==null&&l!==void 0&&(m=l.signal)!==null&&m!==void 0&&m.aborted)throw new M({cause:l.signal.reason});yield[X0++,s]}}.call(this)}async function H(l,X0=void 0){for await(let m of R.call(this,l,X0))return!0;return!1}async function z(l,X0=void 0){if(typeof l!=="function")throw new I("fn",["Function","AsyncFunction"],l);return!await H.call(this,async(...m)=>{return!await l(...m)},X0)}async function X(l,X0){for await(let m of R.call(this,l,X0))return m;return}async function K(l,X0){if(typeof l!=="function")throw new I("fn",["Function","AsyncFunction"],l);async function m(s,h0){return await l(s,h0),G}for await(let s of W.call(this,m,X0));}function R(l,X0){if(typeof l!=="function")throw new I("fn",["Function","AsyncFunction"],l);async function m(s,h0){if(await l(s,h0))return s;return G}return W.call(this,m,X0)}class v extends S{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function j(l,X0,m){var s;if(typeof l!=="function")throw new I("reducer",["Function","AsyncFunction"],l);if(m!=null)E(m,"options");if((m===null||m===void 0?void 0:m.signal)!=null)T(m.signal,"options.signal");let h0=arguments.length>1;if(m!==null&&m!==void 0&&(s=m.signal)!==null&&s!==void 0&&s.aborted){let a=new M(void 0,{cause:m.signal.reason});throw this.once("error",()=>{}),await P(this.destroy(a)),a}let f=new J,u=f.signal;if(m!==null&&m!==void 0&&m.signal){let a={once:!0,[F]:this,[Z]:!0};m.signal.addEventListener("abort",()=>f.abort(),a)}let J0=!1;try{for await(let a of this){var t;if(J0=!0,m!==null&&m!==void 0&&(t=m.signal)!==null&&t!==void 0&&t.aborted)throw new M;if(!h0)X0=a,h0=!0;else X0=await l(X0,a,{signal:u})}if(!J0&&!h0)throw new v}finally{f.abort()}return X0}async function c(l){if(l!=null)E(l,"options");if((l===null||l===void 0?void 0:l.signal)!=null)T(l.signal,"options.signal");let X0=[];for await(let s of this){var m;if(l!==null&&l!==void 0&&(m=l.signal)!==null&&m!==void 0&&m.aborted)throw new M(void 0,{cause:l.signal.reason});N(X0,s)}return X0}function h(l,X0){let m=W.call(this,l,X0);return async function*(){for await(let s of m)yield*s}.call(this)}function n(l){if(l=o(l),Q0(l))return 0;if(l<0)throw new Y("number",">= 0",l);return l}function D0(l,X0=void 0){if(X0!=null)E(X0,"options");if((X0===null||X0===void 0?void 0:X0.signal)!=null)T(X0.signal,"options.signal");return l=n(l),async function*(){var m;if(X0!==null&&X0!==void 0&&(m=X0.signal)!==null&&m!==void 0&&m.aborted)throw new M;for await(let h0 of this){var s;if(X0!==null&&X0!==void 0&&(s=X0.signal)!==null&&s!==void 0&&s.aborted)throw new M;if(l--<=0)yield h0}}.call(this)}function i(l,X0=void 0){if(X0!=null)E(X0,"options");if((X0===null||X0===void 0?void 0:X0.signal)!=null)T(X0.signal,"options.signal");return l=n(l),async function*(){var m;if(X0!==null&&X0!==void 0&&(m=X0.signal)!==null&&m!==void 0&&m.aborted)throw new M;for await(let h0 of this){var s;if(X0!==null&&X0!==void 0&&(s=X0.signal)!==null&&s!==void 0&&s.aborted)throw new M;if(l-- >0)yield h0;if(l<=0)return}}.call(this)}U.exports.streamReturningOperators={asIndexedPairs:g(A,"readable.asIndexedPairs will be removed in a future version."),drop:D0,filter:R,flatMap:h,map:W,take:i,compose:Q},U.exports.promiseReturningOperators={every:z,forEach:K,reduce:j,toArray:c,some:H,find:X}}),YV=i0(($,U)=>{var{ArrayPrototypePop:J,Promise:V}=O$(),{isIterable:I,isNodeStream:S,isWebStream:Y}=DU(),{pipelineImpl:M}=TQ(),{finished:T}=vU();GV();function L(...E){return new V((F,Z)=>{let P,q,k=E[E.length-1];if(k&&typeof k==="object"&&!S(k)&&!I(k)&&!Y(k)){let C=J(E);P=C.signal,q=C.end}M(E,(C,_)=>{if(C)Z(C);else F(_)},{signal:P,end:q})})}U.exports={finished:T,pipeline:L}}),GV=i0(($,U)=>{var{Buffer:J}=(g$(),d0(k$)),{ObjectDefineProperty:V,ObjectKeys:I,ReflectApply:S}=O$(),{promisify:{custom:Y}}=h$(),{streamReturningOperators:M,promiseReturningOperators:T}=TK(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:L}}=B$(),E=QV(),{setDefaultHighWaterMark:F,getDefaultHighWaterMark:Z}=W6(),{pipeline:P}=TQ(),{destroyer:q}=UI(),k=vU(),C=YV(),_=DU(),g=U.exports=MQ().Stream;g.isDestroyed=_.isDestroyed,g.isDisturbed=_.isDisturbed,g.isErrored=_.isErrored,g.isReadable=_.isReadable,g.isWritable=_.isWritable,g.Readable=D6();for(let x of I(M)){let w=function(...Q0){if(new.target)throw L();return g.Readable.from(S(o,this,Q0))},o=M[x];V(w,"name",{__proto__:null,value:o.name}),V(w,"length",{__proto__:null,value:o.length}),V(g.Readable.prototype,x,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}for(let x of I(T)){let w=function(...Q0){if(new.target)throw L();return S(o,this,Q0)},o=T[x];V(w,"name",{__proto__:null,value:o.name}),V(w,"length",{__proto__:null,value:o.length}),V(g.Readable.prototype,x,{__proto__:null,value:w,enumerable:!1,configurable:!0,writable:!0})}g.Writable=PQ(),g.Duplex=WU(),g.Transform=XV(),g.PassThrough=JV(),g.pipeline=P;var{addAbortSignal:N}=S6();g.addAbortSignal=N,g.finished=k,g.destroy=q,g.compose=E,g.setDefaultHighWaterMark=F,g.getDefaultHighWaterMark=Z,V(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return C}}),V(P,Y,{__proto__:null,enumerable:!0,get(){return C.pipeline}}),V(k,Y,{__proto__:null,enumerable:!0,get(){return C.finished}}),g.Stream=g,g._isUint8Array=function(x){return x instanceof Uint8Array},g._uint8ArrayToBuffer=function(x){return J.from(x.buffer,x.byteOffset,x.byteLength)}}),qK=i0(($,U)=>{var J=qQ();{let V=GV(),I=YV(),S=V.Readable.destroy;U.exports=V.Readable,U.exports._uint8ArrayToBuffer=V._uint8ArrayToBuffer,U.exports._isUint8Array=V._isUint8Array,U.exports.isDisturbed=V.isDisturbed,U.exports.isErrored=V.isErrored,U.exports.isReadable=V.isReadable,U.exports.Readable=V.Readable,U.exports.Writable=V.Writable,U.exports.Duplex=V.Duplex,U.exports.Transform=V.Transform,U.exports.PassThrough=V.PassThrough,U.exports.addAbortSignal=V.addAbortSignal,U.exports.finished=V.finished,U.exports.destroy=V.destroy,U.exports.destroy=S,U.exports.pipeline=V.pipeline,U.exports.compose=V.compose,Object.defineProperty(V,"promises",{configurable:!0,enumerable:!0,get(){return I}}),U.exports.Stream=V.Stream}U.exports.default=U.exports});VV.exports=qK()});var u$={};d$(u$,{webcrypto:()=>iH,rng:()=>SH,randomUUID:()=>mH,randomFillSync:()=>bH,randomFill:()=>pH,randomBytes:()=>wQ,publicEncrypt:()=>fH,publicDecrypt:()=>hH,pseudoRandomBytes:()=>VH,prng:()=>GH,privateEncrypt:()=>yH,privateDecrypt:()=>uH,pbkdf2Sync:()=>HH,pbkdf2:()=>AH,listCiphers:()=>RH,getRandomValues:()=>nH,getHashes:()=>KH,getDiffieHellman:()=>gH,getCurves:()=>tH,getCiphers:()=>qH,default:()=>eH,createVerify:()=>BH,createSign:()=>NH,createHmac:()=>fQ,createHash:()=>DH,createECDH:()=>wH,createDiffieHellmanGroup:()=>kH,createDiffieHellman:()=>jH,createDecipheriv:()=>TH,createDecipher:()=>MH,createCredentials:()=>lH,createCipheriv:()=>ZH,createCipher:()=>LH,constants:()=>oH,Verify:()=>cH,Sign:()=>xH,Hmac:()=>zH,Hash:()=>WH,DiffieHellmanGroup:()=>CH,DiffieHellman:()=>_H,Decipheriv:()=>PH,Decipher:()=>vH,DEFAULT_ENCODING:()=>rH,Cipheriv:()=>EH,Cipher:()=>FH});function tH(){return dH}var RK,CK,SV,kK,gK,jK=($,U,J)=>{J=$!=null?RK(CK($)):{};let V=U||!$||!$.__esModule?SV(J,"default",{value:$,enumerable:!0}):J;for(let I of kK($))if(!gK.call(V,I))SV(V,I,{get:()=>$[I],enumerable:!0});return V},G0=($,U)=>()=>(U||$((U={exports:{}}).exports,U),U.exports),z6,K6,DV,_K,CQ,kQ,c$,NK,nI,zV,xK,BK,cK,wK,KV,fK,yK,hK,uK,pK,bK,lK,oK,rK,nK,mI,A6,AV,mK,HV,FV,dK,dI,gQ,jQ,tK,LV,_Q,iK,EV,eK,ZV,vV,aK,sK,$A,UA,IA,OA,XA,JA,QA,YA,GA,VA,SA,WA,NQ,MV,DA,PV,zA,KA,AA,HA,zU,MU,TV,m$,qV,H6,FA,o$,LA,EA,ZA,RV,UU,tI,CV,vA,kV,MA,gV,PA,TA,qA,RA,xQ,CA,BQ,kA,gA,jA,_A,NA,xA,BA,cA,wA,fA,yA,hA,uA,pA,WV,bA,rI,lA,jV,_V,oA,rA,NV,nA,mA,iI,dA,tA,iA,eA,aA,sA,xV,$H,BV,cV,wV,cQ,fV,UH,yV,IH,OH,RQ,XH,JH,QH,YH,m0,GH,VH,SH,wQ,WH,DH,zH,fQ,KH,AH,HH,FH,LH,EH,ZH,vH,MH,PH,TH,qH,RH,CH,kH,gH,jH,_H,NH,xH,BH,cH,wH,fH,yH,hH,uH,pH,bH,lH,oH,rH="buffer",nH=($)=>{return crypto.getRandomValues($)},mH=()=>{return crypto.randomUUID()},dH,iH,eH;var p$=eI(()=>{RK=Object.create,{getPrototypeOf:CK,defineProperty:SV,getOwnPropertyNames:kK}=Object,gK=Object.prototype.hasOwnProperty,z6=G0(($,U)=>{U.exports=(p$(),d0(u$)).randomBytes}),K6=G0(($,U)=>{U.exports=(p$(),d0(u$)).createHash}),DV=G0(($,U)=>{U.exports=(p$(),d0(u$)).createHmac}),_K=G0(($,U)=>{U.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),CQ=G0(($,U)=>{var J=isFinite,V=Math.pow(2,30)-1;U.exports=function(I,S){if(typeof I!=="number")throw TypeError("Iterations not a number");if(I<0||!J(I))throw TypeError("Bad iterations");if(typeof S!=="number")throw TypeError("Key length not a number");if(S<0||S>V||S!==S)throw TypeError("Bad key length")}}),kQ=G0(($,U)=>{var J;if(globalThis.process&&globalThis.process.browser)J="utf-8";else if(globalThis.process&&globalThis.process.version)V=parseInt(process.version.split(".")[0].slice(1),10),J=V>=6?"utf-8":"binary";else J="utf-8";var V;U.exports=J}),c$=G0(($,U)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var J=(g$(),d0(k$)),V=J.Buffer;function I(Y,M){for(var T in Y)M[T]=Y[T]}if(V.from&&V.alloc&&V.allocUnsafe&&V.allocUnsafeSlow)U.exports=J;else I(J,$),$.Buffer=S;function S(Y,M,T){return V(Y,M,T)}S.prototype=Object.create(V.prototype),I(V,S),S.from=function(Y,M,T){if(typeof Y==="number")throw TypeError("Argument must not be a number");return V(Y,M,T)},S.alloc=function(Y,M,T){if(typeof Y!=="number")throw TypeError("Argument must be a number");var L=V(Y);if(M!==void 0)if(typeof T==="string")L.fill(M,T);else L.fill(M);else L.fill(0);return L},S.allocUnsafe=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return V(Y)},S.allocUnsafeSlow=function(Y){if(typeof Y!=="number")throw TypeError("Argument must be a number");return J.SlowBuffer(Y)}}),NK=G0(($,U)=>{var J={}.toString;U.exports=Array.isArray||function(V){return J.call(V)=="[object Array]"}}),nI=G0(($,U)=>{U.exports=TypeError}),zV=G0(($,U)=>{U.exports=Object}),xK=G0(($,U)=>{U.exports=Error}),BK=G0(($,U)=>{U.exports=EvalError}),cK=G0(($,U)=>{U.exports=RangeError}),wK=G0(($,U)=>{U.exports=ReferenceError}),KV=G0(($,U)=>{U.exports=SyntaxError}),fK=G0(($,U)=>{U.exports=URIError}),yK=G0(($,U)=>{U.exports=Math.abs}),hK=G0(($,U)=>{U.exports=Math.floor}),uK=G0(($,U)=>{U.exports=Math.max}),pK=G0(($,U)=>{U.exports=Math.min}),bK=G0(($,U)=>{U.exports=Math.pow}),lK=G0(($,U)=>{U.exports=Math.round}),oK=G0(($,U)=>{U.exports=Number.isNaN||function(J){return J!==J}}),rK=G0(($,U)=>{var J=oK();U.exports=function(V){if(J(V)||V===0)return V;return V<0?-1:1}}),nK=G0(($,U)=>{U.exports=Object.getOwnPropertyDescriptor}),mI=G0(($,U)=>{var J=nK();if(J)try{J([],"length")}catch(V){J=null}U.exports=J}),A6=G0(($,U)=>{var J=Object.defineProperty||!1;if(J)try{J({},"a",{value:1})}catch(V){J=!1}U.exports=J}),AV=G0(($,U)=>{U.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var J={},V=Symbol("test"),I=Object(V);if(typeof V==="string")return!1;if(Object.prototype.toString.call(V)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var S=42;J[V]=S;for(var Y in J)return!1;if(typeof Object.keys==="function"&&Object.keys(J).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(J).length!==0)return!1;var M=Object.getOwnPropertySymbols(J);if(M.length!==1||M[0]!==V)return!1;if(!Object.prototype.propertyIsEnumerable.call(J,V))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(J,V);if(T.value!==S||T.enumerable!==!0)return!1}return!0}}),mK=G0(($,U)=>{var J=typeof Symbol<"u"&&Symbol,V=AV();U.exports=function(){if(typeof J!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof J("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return V()}}),HV=G0(($,U)=>{U.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),FV=G0(($,U)=>{var J=zV();U.exports=J.getPrototypeOf||null}),dK=G0(($,U)=>{var J="Function.prototype.bind called on incompatible ",V=Object.prototype.toString,I=Math.max,S="[object Function]",Y=function(L,E){var F=[];for(var Z=0;Z<L.length;Z+=1)F[Z]=L[Z];for(var P=0;P<E.length;P+=1)F[P+L.length]=E[P];return F},M=function(L,E){var F=[];for(var Z=E||0,P=0;Z<L.length;Z+=1,P+=1)F[P]=L[Z];return F},T=function(L,E){var F="";for(var Z=0;Z<L.length;Z+=1)if(F+=L[Z],Z+1<L.length)F+=E;return F};U.exports=function(L){var E=this;if(typeof E!=="function"||V.apply(E)!==S)throw TypeError(J+E);var F=M(arguments,1),Z,P=function(){if(this instanceof Z){var g=E.apply(this,Y(F,arguments));if(Object(g)===g)return g;return this}return E.apply(L,Y(F,arguments))},q=I(0,E.length-F.length),k=[];for(var C=0;C<q;C++)k[C]="$"+C;if(Z=Function("binder","return function ("+T(k,",")+"){ return binder.apply(this,arguments); }")(P),E.prototype){var _=function(){};_.prototype=E.prototype,Z.prototype=new _,_.prototype=null}return Z}}),dI=G0(($,U)=>{var J=dK();U.exports=Function.prototype.bind||J}),gQ=G0(($,U)=>{U.exports=Function.prototype.call}),jQ=G0(($,U)=>{U.exports=Function.prototype.apply}),tK=G0(($,U)=>{U.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),LV=G0(($,U)=>{var J=dI(),V=jQ(),I=gQ(),S=tK();U.exports=S||J.call(I,V)}),_Q=G0(($,U)=>{var J=dI(),V=nI(),I=gQ(),S=LV();U.exports=function(Y){if(Y.length<1||typeof Y[0]!=="function")throw new V("a function is required");return S(J,I,Y)}}),iK=G0(($,U)=>{var J=_Q(),V=mI(),I;try{I=[].__proto__===Array.prototype}catch(T){if(!T||typeof T!=="object"||!("code"in T)||T.code!=="ERR_PROTO_ACCESS")throw T}var S=!!I&&V&&V(Object.prototype,"__proto__"),Y=Object,M=Y.getPrototypeOf;U.exports=S&&typeof S.get==="function"?J([S.get]):typeof M==="function"?function(T){return M(T==null?T:Y(T))}:!1}),EV=G0(($,U)=>{var J=HV(),V=FV(),I=iK();U.exports=J?function(S){return J(S)}:V?function(S){if(!S||typeof S!=="object"&&typeof S!=="function")throw TypeError("getProto: not an object");return V(S)}:I?function(S){return I(S)}:null}),eK=G0(($,U)=>{var J=Function.prototype.call,V=Object.prototype.hasOwnProperty,I=dI();U.exports=I.call(J,V)}),ZV=G0(($,U)=>{var J,V=zV(),I=xK(),S=BK(),Y=cK(),M=wK(),T=KV(),L=nI(),E=fK(),F=yK(),Z=hK(),P=uK(),q=pK(),k=bK(),C=lK(),_=rK(),g=Function,N=function(X0){try{return g('"use strict"; return ('+X0+").constructor;")()}catch(m){}},x=mI(),w=A6(),o=function(){throw new L},Q0=x?function(){try{return arguments.callee,o}catch(X0){try{return x(arguments,"callee").get}catch(m){return o}}}():o,V0=mK()(),Y0=EV(),p=FV(),U0=HV(),O=jQ(),G=gQ(),D={},Q=typeof Uint8Array>"u"||!Y0?J:Y0(Uint8Array),W={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":V0&&Y0?Y0([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":I,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?J:Float16Array,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":V0&&Y0?Y0(Y0([][Symbol.iterator]())):J,"%JSON%":typeof JSON==="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!V0||!Y0?J:Y0(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":V,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":Y,"%ReferenceError%":M,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!V0||!Y0?J:Y0(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":V0&&Y0?Y0(""[Symbol.iterator]()):J,"%Symbol%":V0?Symbol:J,"%SyntaxError%":T,"%ThrowTypeError%":Q0,"%TypedArray%":Q,"%TypeError%":L,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":E,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet,"%Function.prototype.call%":G,"%Function.prototype.apply%":O,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":p,"%Math.abs%":F,"%Math.floor%":Z,"%Math.max%":P,"%Math.min%":q,"%Math.pow%":k,"%Math.round%":C,"%Math.sign%":_,"%Reflect.getPrototypeOf%":U0};if(Y0)try{null.error}catch(X0){A=Y0(Y0(X0)),W["%Error.prototype%"]=A}var A,H=function X0(m){var s;if(m==="%AsyncFunction%")s=N("async function () {}");else if(m==="%GeneratorFunction%")s=N("function* () {}");else if(m==="%AsyncGeneratorFunction%")s=N("async function* () {}");else if(m==="%AsyncGenerator%"){var h0=X0("%AsyncGeneratorFunction%");if(h0)s=h0.prototype}else if(m==="%AsyncIteratorPrototype%"){var f=X0("%AsyncGenerator%");if(f&&Y0)s=Y0(f.prototype)}return W[m]=s,s},z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},X=dI(),K=eK(),R=X.call(G,Array.prototype.concat),v=X.call(O,Array.prototype.splice),j=X.call(G,String.prototype.replace),c=X.call(G,String.prototype.slice),h=X.call(G,RegExp.prototype.exec),n=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D0=/\\(\\)?/g,i=function(X0){var m=c(X0,0,1),s=c(X0,-1);if(m==="%"&&s!=="%")throw new T("invalid intrinsic syntax, expected closing `%`");else if(s==="%"&&m!=="%")throw new T("invalid intrinsic syntax, expected opening `%`");var h0=[];return j(X0,n,function(f,u,J0,t){h0[h0.length]=J0?j(t,D0,"$1"):u||f}),h0},l=function(X0,m){var s=X0,h0;if(K(z,s))h0=z[s],s="%"+h0[0]+"%";if(K(W,s)){var f=W[s];if(f===D)f=H(s);if(typeof f>"u"&&!m)throw new L("intrinsic "+X0+" exists, but is not available. Please file an issue!");return{alias:h0,name:s,value:f}}throw new T("intrinsic "+X0+" does not exist!")};U.exports=function(X0,m){if(typeof X0!=="string"||X0.length===0)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof m!=="boolean")throw new L('"allowMissing" argument must be a boolean');if(h(/^%?[^%]*%?$/,X0)===null)throw new T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=i(X0),h0=s.length>0?s[0]:"",f=l("%"+h0+"%",m),u=f.name,J0=f.value,t=!1,a=f.alias;if(a)h0=a[0],v(s,R([0,1],a));for(var M0=1,y=!0;M0<s.length;M0+=1){var r=s[M0],c0=c(r,0,1),d=c(r,-1);if((c0==='"'||c0==="'"||c0==="`"||(d==='"'||d==="'"||d==="`"))&&c0!==d)throw new T("property names with quotes must have matching quotes");if(r==="constructor"||!y)t=!0;if(h0+="."+r,u="%"+h0+"%",K(W,u))J0=W[u];else if(J0!=null){if(!(r in J0)){if(!m)throw new L("base intrinsic for "+X0+" exists, but the property is not available.");return}if(x&&M0+1>=s.length){var I0=x(J0,r);if(y=!!I0,y&&"get"in I0&&!("originalValue"in I0.get))J0=I0.get;else J0=J0[r]}else y=K(J0,r),J0=J0[r];if(y&&!t)W[u]=J0}}return J0}}),vV=G0(($,U)=>{var J=ZV(),V=_Q(),I=V([J("%String.prototype.indexOf%")]);U.exports=function(S,Y){var M=J(S,!!Y);if(typeof M==="function"&&I(S,".prototype.")>-1)return V([M]);return M}}),aK=G0(($,U)=>{var J=Function.prototype.toString,V=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,I,S;if(typeof V==="function"&&typeof Object.defineProperty==="function")try{I=Object.defineProperty({},"length",{get:function(){throw S}}),S={},V(function(){throw 42},null,I)}catch(x){if(x!==S)V=null}else V=null;var Y=/^\s*class\b/,M=function(x){try{var w=J.call(x);return Y.test(w)}catch(o){return!1}},T=function(x){try{if(M(x))return!1;return J.call(x),!0}catch(w){return!1}},L=Object.prototype.toString,E="[object Object]",F="[object Function]",Z="[object GeneratorFunction]",P="[object HTMLAllCollection]",q="[object HTML document.all class]",k="[object HTMLCollection]",C=typeof Symbol==="function"&&!!Symbol.toStringTag,_=!(0 in[,]),g=function(){return!1};if(typeof document==="object"){if(N=document.all,L.call(N)===L.call(document.all))g=function(x){if((_||!x)&&(typeof x>"u"||typeof x==="object"))try{var w=L.call(x);return(w===P||w===q||w===k||w===E)&&x("")==null}catch(o){}return!1}}var N;U.exports=V?function(x){if(g(x))return!0;if(!x)return!1;if(typeof x!=="function"&&typeof x!=="object")return!1;try{V(x,null,I)}catch(w){if(w!==S)return!1}return!M(x)&&T(x)}:function(x){if(g(x))return!0;if(!x)return!1;if(typeof x!=="function"&&typeof x!=="object")return!1;if(C)return T(x);if(M(x))return!1;var w=L.call(x);if(w!==F&&w!==Z&&!/^\[object HTML/.test(w))return!1;return T(x)}}),sK=G0(($,U)=>{var J=aK(),V=Object.prototype.toString,I=Object.prototype.hasOwnProperty,S=function(L,E,F){for(var Z=0,P=L.length;Z<P;Z++)if(I.call(L,Z))if(F==null)E(L[Z],Z,L);else E.call(F,L[Z],Z,L)},Y=function(L,E,F){for(var Z=0,P=L.length;Z<P;Z++)if(F==null)E(L.charAt(Z),Z,L);else E.call(F,L.charAt(Z),Z,L)},M=function(L,E,F){for(var Z in L)if(I.call(L,Z))if(F==null)E(L[Z],Z,L);else E.call(F,L[Z],Z,L)};function T(L){return V.call(L)==="[object Array]"}U.exports=function(L,E,F){if(!J(E))throw TypeError("iterator must be a function");var Z;if(arguments.length>=3)Z=F;if(T(L))S(L,E,Z);else if(typeof L==="string")Y(L,E,Z);else M(L,E,Z)}}),$A=G0(($,U)=>{U.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),UA=G0(($,U)=>{var J=$A(),V=typeof globalThis>"u"?globalThis:globalThis;U.exports=function(){var I=[];for(var S=0;S<J.length;S++)if(typeof V[J[S]]==="function")I[I.length]=J[S];return I}}),IA=G0(($,U)=>{var J=A6(),V=KV(),I=nI(),S=mI();U.exports=function(Y,M,T){if(!Y||typeof Y!=="object"&&typeof Y!=="function")throw new I("`obj` must be an object or a function`");if(typeof M!=="string"&&typeof M!=="symbol")throw new I("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new I("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new I("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new I("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new I("`loose`, if provided, must be a boolean");var L=arguments.length>3?arguments[3]:null,E=arguments.length>4?arguments[4]:null,F=arguments.length>5?arguments[5]:null,Z=arguments.length>6?arguments[6]:!1,P=!!S&&S(Y,M);if(J)J(Y,M,{configurable:F===null&&P?P.configurable:!F,enumerable:L===null&&P?P.enumerable:!L,value:T,writable:E===null&&P?P.writable:!E});else if(Z||!L&&!E&&!F)Y[M]=T;else throw new V("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),OA=G0(($,U)=>{var J=A6(),V=function(){return!!J};V.hasArrayLengthDefineBug=function(){if(!J)return null;try{return J([],"length",{value:1}).length!==1}catch(I){return!0}},U.exports=V}),XA=G0(($,U)=>{var J=ZV(),V=IA(),I=OA()(),S=mI(),Y=nI(),M=J("%Math.floor%");U.exports=function(T,L){if(typeof T!=="function")throw new Y("`fn` is not a function");if(typeof L!=="number"||L<0||L>4294967295||M(L)!==L)throw new Y("`length` must be a positive 32-bit integer");var E=arguments.length>2&&!!arguments[2],F=!0,Z=!0;if("length"in T&&S){var P=S(T,"length");if(P&&!P.configurable)F=!1;if(P&&!P.writable)Z=!1}if(F||Z||!E)if(I)V(T,"length",L,!0,!0);else V(T,"length",L);return T}}),JA=G0(($,U)=>{var J=dI(),V=jQ(),I=LV();U.exports=function(){return I(J,V,arguments)}}),QA=G0(($,U)=>{var J=XA(),V=A6(),I=_Q(),S=JA();if(U.exports=function(Y){var M=I(arguments),T=Y.length-(arguments.length-1);return J(M,1+(T>0?T:0),!0)},V)V(U.exports,"apply",{value:S});else U.exports.apply=S}),YA=G0(($,U)=>{var J=AV();U.exports=function(){return J()&&!!Symbol.toStringTag}}),GA=G0(($,U)=>{var J=sK(),V=UA(),I=QA(),S=vV(),Y=mI(),M=EV(),T=S("Object.prototype.toString"),L=YA()(),E=typeof globalThis>"u"?globalThis:globalThis,F=V(),Z=S("String.prototype.slice"),P=S("Array.prototype.indexOf",!0)||function(_,g){for(var N=0;N<_.length;N+=1)if(_[N]===g)return N;return-1},q={__proto__:null};if(L&&Y&&M)J(F,function(_){var g=new E[_];if(Symbol.toStringTag in g&&M){var N=M(g),x=Y(N,Symbol.toStringTag);if(!x&&N){var w=M(N);x=Y(w,Symbol.toStringTag)}q["$"+_]=I(x.get)}});else J(F,function(_){var g=new E[_],N=g.slice||g.set;if(N)q["$"+_]=I(N)});var k=function(_){var g=!1;return J(q,function(N,x){if(!g)try{if("$"+N(_)===x)g=Z(x,1)}catch(w){}}),g},C=function(_){var g=!1;return J(q,function(N,x){if(!g)try{N(_),g=Z(x,1)}catch(w){}}),g};U.exports=function(_){if(!_||typeof _!=="object")return!1;if(!L){var g=Z(T(_),8,-1);if(P(F,g)>-1)return g;if(g!=="Object")return!1;return C(_)}if(!Y)return null;return k(_)}}),VA=G0(($,U)=>{var J=GA();U.exports=function(V){return!!J(V)}}),SA=G0(($,U)=>{var J=nI(),V=vV(),I=V("TypedArray.prototype.buffer",!0),S=VA();U.exports=I||function(Y){if(!S(Y))throw new J("Not a Typed Array");return Y.buffer}}),WA=G0(($,U)=>{var J=c$().Buffer,V=NK(),I=SA(),S=ArrayBuffer.isView||function(L){try{return I(L),!0}catch(E){return!1}},Y=typeof Uint8Array<"u",M=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",T=M&&(J.prototype instanceof Uint8Array||J.TYPED_ARRAY_SUPPORT);U.exports=function(L,E){if(J.isBuffer(L)){if(L.constructor&&!("isBuffer"in L))return J.from(L);return L}if(typeof L==="string")return J.from(L,E);if(M&&S(L)){if(L.byteLength===0)return J.alloc(0);if(T){var F=J.from(L.buffer,L.byteOffset,L.byteLength);if(F.byteLength===L.byteLength)return F}var Z=L instanceof Uint8Array?L:new Uint8Array(L.buffer,L.byteOffset,L.byteLength),P=J.from(Z);if(P.length===L.byteLength)return P}if(Y&&L instanceof Uint8Array)return J.from(L);var q=V(L);if(q)for(var k=0;k<L.length;k+=1){var C=L[k];if(typeof C!=="number"||C<0||C>255||~~C!==C)throw RangeError("Array items must be numbers in the range 0-255.")}if(q||J.isBuffer(L)&&L.constructor&&typeof L.constructor.isBuffer==="function"&&L.constructor.isBuffer(L))return J.from(L);throw TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}}),NQ=G0(($,U)=>{var J=c$().Buffer,V=WA(),I=typeof Uint8Array<"u",S=I&&typeof ArrayBuffer<"u",Y=S&&ArrayBuffer.isView;U.exports=function(M,T,L){if(typeof M==="string"||J.isBuffer(M)||I&&M instanceof Uint8Array||Y&&Y(M))return V(M,T);throw TypeError(L+" must be a string, a Buffer, a Uint8Array, or a DataView")}}),MV=G0(($,U)=>{var J={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,rmd160:20,ripemd160:20},V={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"},I=DV(),S=c$().Buffer,Y=CQ(),M=kQ(),T=NQ();function L(E,F,Z,P,q){Y(Z,P),E=T(E,M,"Password"),F=T(F,M,"Salt");var k=(q||"sha1").toLowerCase(),C=V[k]||k,_=J[C];if(typeof _!=="number"||!_)throw TypeError("Digest algorithm not supported: "+q);var g=S.allocUnsafe(P),N=S.allocUnsafe(F.length+4);F.copy(N,0,0,F.length);var x=0,w=_,o=Math.ceil(P/w);for(var Q0=1;Q0<=o;Q0++){N.writeUInt32BE(Q0,F.length);var V0=I(C,E).update(N).digest(),Y0=V0;for(var p=1;p<Z;p++){Y0=I(C,E).update(Y0).digest();for(var U0=0;U0<w;U0++)V0[U0]^=Y0[U0]}V0.copy(g,x),x+=w}return g}U.exports=L}),DA=G0(($,U)=>{var J=c$().Buffer,V=CQ(),I=kQ(),S=MV(),Y=NQ(),M,T=globalThis.crypto&&globalThis.crypto.subtle,L={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},E=[],F;function Z(){if(F)return F;if(globalThis.process&&globalThis.process.nextTick)F=globalThis.process.nextTick;else if(globalThis.queueMicrotask)F=globalThis.queueMicrotask;else if(globalThis.setImmediate)F=globalThis.setImmediate;else F=globalThis.setTimeout;return F}function P(C,_,g,N,x){return T.importKey("raw",C,{name:"PBKDF2"},!1,["deriveBits"]).then(function(w){return T.deriveBits({name:"PBKDF2",salt:_,iterations:g,hash:{name:x}},w,N<<3)}).then(function(w){return J.from(w)})}function q(C){if(globalThis.process&&!globalThis.process.browser)return Promise.resolve(!1);if(!T||!T.importKey||!T.deriveBits)return Promise.resolve(!1);if(E[C]!==void 0)return E[C];M=M||J.alloc(8);var _=P(M,M,10,128,C).then(function(){return!0},function(){return!1});return E[C]=_,_}function k(C,_){C.then(function(g){Z()(function(){_(null,g)})},function(g){Z()(function(){_(g)})})}U.exports=function(C,_,g,N,x,w){if(typeof x==="function")w=x,x=void 0;if(V(g,N),C=Y(C,I,"Password"),_=Y(_,I,"Salt"),typeof w!=="function")throw Error("No callback provided to pbkdf2");x=x||"sha1";var o=L[x.toLowerCase()];if(!o||typeof globalThis.Promise!=="function"){Z()(function(){var Q0;try{Q0=S(C,_,g,N,x)}catch(V0){w(V0);return}w(null,Q0)});return}k(q(o).then(function(Q0){if(Q0)return P(C,_,g,N,o);return S(C,_,g,N,x)}),w)}}),PV=G0(($)=>{var U=(p$(),d0(u$)),J=CQ(),V=kQ(),I=NQ();function S(M,T,L,E,F,Z){if(J(L,E),M=I(M,V,"Password"),T=I(T,V,"Salt"),typeof F==="function")Z=F,F="sha1";if(typeof Z!=="function")throw Error("No callback provided to pbkdf2");return U.pbkdf2(M,T,L,E,F,Z)}function Y(M,T,L,E,F){return J(L,E),M=I(M,V,"Password"),T=I(T,V,"Salt"),F=F||"sha1",U.pbkdf2Sync(M,T,L,E,F)}if(!U.pbkdf2Sync||U.pbkdf2Sync.toString().indexOf("keylen, digest")===-1)$.pbkdf2Sync=MV(),$.pbkdf2=DA();else $.pbkdf2Sync=Y,$.pbkdf2=S}),zA=G0(($)=>{var U=(p$(),d0(u$));$.createCipher=$.Cipher=U.createCipher,$.createCipheriv=$.Cipheriv=U.createCipheriv,$.createDecipher=$.Decipher=U.createDecipher,$.createDecipheriv=$.Decipheriv=U.createDecipheriv,$.listCiphers=$.getCiphers=U.getCiphers}),KA=G0(($)=>{var U=(p$(),d0(u$));$.DiffieHellmanGroup=U.DiffieHellmanGroup,$.createDiffieHellmanGroup=U.createDiffieHellmanGroup,$.getDiffieHellman=U.getDiffieHellman,$.createDiffieHellman=U.createDiffieHellman,$.DiffieHellman=U.DiffieHellman}),AA=G0(($)=>{var U=(p$(),d0(u$));$.createSign=U.createSign,$.Sign=U.Sign,$.createVerify=U.createVerify,$.Verify=U.Verify}),HA=G0(($,U)=>{U.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}),zU=G0(($,U)=>{(function(J,V){function I(O,G){if(!O)throw Error(G||"Assertion failed")}function S(O,G){O.super_=G;var D=function(){};D.prototype=G.prototype,O.prototype=new D,O.prototype.constructor=O}function Y(O,G,D){if(Y.isBN(O))return O;if(this.negative=0,this.words=null,this.length=0,this.red=null,O!==null){if(G==="le"||G==="be")D=G,G=10;this._init(O||0,G||10,D||"be")}}if(typeof J==="object")J.exports=Y;else V.BN=Y;Y.BN=Y,Y.wordSize=26;var M;try{if(typeof window<"u"&&typeof window.Buffer<"u")M=window.Buffer;else M=(g$(),d0(k$)).Buffer}catch(O){}Y.isBN=function(O){if(O instanceof Y)return!0;return O!==null&&typeof O==="object"&&O.constructor.wordSize===Y.wordSize&&Array.isArray(O.words)},Y.max=function(O,G){if(O.cmp(G)>0)return O;return G},Y.min=function(O,G){if(O.cmp(G)<0)return O;return G},Y.prototype._init=function(O,G,D){if(typeof O==="number")return this._initNumber(O,G,D);if(typeof O==="object")return this._initArray(O,G,D);if(G==="hex")G=16;I(G===(G|0)&&G>=2&&G<=36),O=O.toString().replace(/\s+/g,"");var Q=0;if(O[0]==="-")Q++,this.negative=1;if(Q<O.length){if(G===16)this._parseHex(O,Q,D);else if(this._parseBase(O,G,Q),D==="le")this._initArray(this.toArray(),G,D)}},Y.prototype._initNumber=function(O,G,D){if(O<0)this.negative=1,O=-O;if(O<67108864)this.words=[O&67108863],this.length=1;else if(O<4503599627370496)this.words=[O&67108863,O/67108864&67108863],this.length=2;else I(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3;if(D!=="le")return;this._initArray(this.toArray(),G,D)},Y.prototype._initArray=function(O,G,D){if(I(typeof O.length==="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W,A,H=0;if(D==="be"){for(Q=O.length-1,W=0;Q>=0;Q-=3)if(A=O[Q]|O[Q-1]<<8|O[Q-2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}else if(D==="le"){for(Q=0,W=0;Q<O.length;Q+=3)if(A=O[Q]|O[Q+1]<<8|O[Q+2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}return this.strip()};function T(O,G){var D=O.charCodeAt(G);if(D>=65&&D<=70)return D-55;else if(D>=97&&D<=102)return D-87;else return D-48&15}function L(O,G,D){var Q=T(O,D);if(D-1>=G)Q|=T(O,D-1)<<4;return Q}Y.prototype._parseHex=function(O,G,D){this.length=Math.ceil((O.length-G)/6),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W=0,A=0,H;if(D==="be")for(Q=O.length-1;Q>=G;Q-=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8;else{var z=O.length-G;for(Q=z%2===0?G+1:G;Q<O.length;Q+=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8}this.strip()};function E(O,G,D,Q){var W=0,A=Math.min(O.length,D);for(var H=G;H<A;H++){var z=O.charCodeAt(H)-48;if(W*=Q,z>=49)W+=z-49+10;else if(z>=17)W+=z-17+10;else W+=z}return W}Y.prototype._parseBase=function(O,G,D){this.words=[0],this.length=1;for(var Q=0,W=1;W<=67108863;W*=G)Q++;Q--,W=W/G|0;var A=O.length-D,H=A%Q,z=Math.min(A,A-H)+D,X=0;for(var K=D;K<z;K+=Q)if(X=E(O,K,K+Q,G),this.imuln(W),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(H!==0){var R=1;X=E(O,K,O.length,G);for(K=0;K<H;K++)R*=G;if(this.imuln(R),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},Y.prototype.copy=function(O){O.words=Array(this.length);for(var G=0;G<this.length;G++)O.words[G]=this.words[G];O.length=this.length,O.negative=this.negative,O.red=this.red},Y.prototype.clone=function(){var O=new Y(null);return this.copy(O),O},Y.prototype._expand=function(O){while(this.length<O)this.words[this.length++]=0;return this},Y.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},Y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Z=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(O,G){O=O||10,G=G|0||1;var D;if(O===16||O==="hex"){D="";var Q=0,W=0;for(var A=0;A<this.length;A++){var H=this.words[A],z=((H<<Q|W)&16777215).toString(16);if(W=H>>>24-Q&16777215,Q+=2,Q>=26)Q-=26,A--;if(W!==0||A!==this.length-1)D=F[6-z.length]+z+D;else D=z+D}if(W!==0)D=W.toString(16)+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}if(O===(O|0)&&O>=2&&O<=36){var X=Z[O],K=P[O];D="";var R=this.clone();R.negative=0;while(!R.isZero()){var v=R.modn(K).toString(O);if(R=R.idivn(K),!R.isZero())D=F[X-v.length]+v+D;else D=v+D}if(this.isZero())D="0"+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}I(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var O=this.words[0];if(this.length===2)O+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)O+=4503599627370496+this.words[1]*67108864;else if(this.length>2)I(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-O:O},Y.prototype.toJSON=function(){return this.toString(16)},Y.prototype.toBuffer=function(O,G){return I(typeof M<"u"),this.toArrayLike(M,O,G)},Y.prototype.toArray=function(O,G){return this.toArrayLike(Array,O,G)},Y.prototype.toArrayLike=function(O,G,D){var Q=this.byteLength(),W=D||Math.max(1,Q);I(Q<=W,"byte array longer than desired length"),I(W>0,"Requested array length <= 0"),this.strip();var A=G==="le",H=new O(W),z,X,K=this.clone();if(!A){for(X=0;X<W-Q;X++)H[X]=0;for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[W-X-1]=z}else{for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[X]=z;for(;X<W;X++)H[X]=0}return H},Math.clz32)Y.prototype._countBits=function(O){return 32-Math.clz32(O)};else Y.prototype._countBits=function(O){var G=O,D=0;if(G>=4096)D+=13,G>>>=13;if(G>=64)D+=7,G>>>=7;if(G>=8)D+=4,G>>>=4;if(G>=2)D+=2,G>>>=2;return D+G};Y.prototype._zeroBits=function(O){if(O===0)return 26;var G=O,D=0;if((G&8191)===0)D+=13,G>>>=13;if((G&127)===0)D+=7,G>>>=7;if((G&15)===0)D+=4,G>>>=4;if((G&3)===0)D+=2,G>>>=2;if((G&1)===0)D++;return D},Y.prototype.bitLength=function(){var O=this.words[this.length-1],G=this._countBits(O);return(this.length-1)*26+G};function q(O){var G=Array(O.bitLength());for(var D=0;D<G.length;D++){var Q=D/26|0,W=D%26;G[D]=(O.words[Q]&1<<W)>>>W}return G}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var O=0;for(var G=0;G<this.length;G++){var D=this._zeroBits(this.words[G]);if(O+=D,D!==26)break}return O},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(O){if(this.negative!==0)return this.abs().inotn(O).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(O){if(this.testn(O-1))return this.notn(O).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(O){while(this.length<O.length)this.words[this.length++]=0;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]|O.words[G];return this.strip()},Y.prototype.ior=function(O){return I((this.negative|O.negative)===0),this.iuor(O)},Y.prototype.or=function(O){if(this.length>O.length)return this.clone().ior(O);return O.clone().ior(this)},Y.prototype.uor=function(O){if(this.length>O.length)return this.clone().iuor(O);return O.clone().iuor(this)},Y.prototype.iuand=function(O){var G;if(this.length>O.length)G=O;else G=this;for(var D=0;D<G.length;D++)this.words[D]=this.words[D]&O.words[D];return this.length=G.length,this.strip()},Y.prototype.iand=function(O){return I((this.negative|O.negative)===0),this.iuand(O)},Y.prototype.and=function(O){if(this.length>O.length)return this.clone().iand(O);return O.clone().iand(this)},Y.prototype.uand=function(O){if(this.length>O.length)return this.clone().iuand(O);return O.clone().iuand(this)},Y.prototype.iuxor=function(O){var G,D;if(this.length>O.length)G=this,D=O;else G=O,D=this;for(var Q=0;Q<D.length;Q++)this.words[Q]=G.words[Q]^D.words[Q];if(this!==G)for(;Q<G.length;Q++)this.words[Q]=G.words[Q];return this.length=G.length,this.strip()},Y.prototype.ixor=function(O){return I((this.negative|O.negative)===0),this.iuxor(O)},Y.prototype.xor=function(O){if(this.length>O.length)return this.clone().ixor(O);return O.clone().ixor(this)},Y.prototype.uxor=function(O){if(this.length>O.length)return this.clone().iuxor(O);return O.clone().iuxor(this)},Y.prototype.inotn=function(O){I(typeof O==="number"&&O>=0);var G=Math.ceil(O/26)|0,D=O%26;if(this._expand(G),D>0)G--;for(var Q=0;Q<G;Q++)this.words[Q]=~this.words[Q]&67108863;if(D>0)this.words[Q]=~this.words[Q]&67108863>>26-D;return this.strip()},Y.prototype.notn=function(O){return this.clone().inotn(O)},Y.prototype.setn=function(O,G){I(typeof O==="number"&&O>=0);var D=O/26|0,Q=O%26;if(this._expand(D+1),G)this.words[D]=this.words[D]|1<<Q;else this.words[D]=this.words[D]&~(1<<Q);return this.strip()},Y.prototype.iadd=function(O){var G;if(this.negative!==0&&O.negative===0)return this.negative=0,G=this.isub(O),this.negative^=1,this._normSign();else if(this.negative===0&&O.negative!==0)return O.negative=0,G=this.isub(O),O.negative=1,G._normSign();var D,Q;if(this.length>O.length)D=this,Q=O;else D=O,Q=this;var W=0;for(var A=0;A<Q.length;A++)G=(D.words[A]|0)+(Q.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;for(;W!==0&&A<D.length;A++)G=(D.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;if(this.length=D.length,W!==0)this.words[this.length]=W,this.length++;else if(D!==this)for(;A<D.length;A++)this.words[A]=D.words[A];return this},Y.prototype.add=function(O){var G;if(O.negative!==0&&this.negative===0)return O.negative=0,G=this.sub(O),O.negative^=1,G;else if(O.negative===0&&this.negative!==0)return this.negative=0,G=O.sub(this),this.negative=1,G;if(this.length>O.length)return this.clone().iadd(O);return O.clone().iadd(this)},Y.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var G=this.iadd(O);return O.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var D=this.cmp(O);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,W;if(D>0)Q=this,W=O;else Q=O,W=this;var A=0;for(var H=0;H<W.length;H++)G=(Q.words[H]|0)-(W.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;for(;A!==0&&H<Q.length;H++)G=(Q.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;if(A===0&&H<Q.length&&Q!==this)for(;H<Q.length;H++)this.words[H]=Q.words[H];if(this.length=Math.max(this.length,H),Q!==this)this.negative=1;return this.strip()},Y.prototype.sub=function(O){return this.clone().isub(O)};function k(O,G,D){D.negative=G.negative^O.negative;var Q=O.length+G.length|0;D.length=Q,Q=Q-1|0;var W=O.words[0]|0,A=G.words[0]|0,H=W*A,z=H&67108863,X=H/67108864|0;D.words[0]=z;for(var K=1;K<Q;K++){var R=X>>>26,v=X&67108863,j=Math.min(K,G.length-1);for(var c=Math.max(0,K-O.length+1);c<=j;c++){var h=K-c|0;W=O.words[h]|0,A=G.words[c]|0,H=W*A+v,R+=H/67108864|0,v=H&67108863}D.words[K]=v|0,X=R|0}if(X!==0)D.words[K]=X|0;else D.length--;return D.strip()}var C=function(O,G,D){var Q=O.words,W=G.words,A=D.words,H=0,z,X,K,R=Q[0]|0,v=R&8191,j=R>>>13,c=Q[1]|0,h=c&8191,n=c>>>13,D0=Q[2]|0,i=D0&8191,l=D0>>>13,X0=Q[3]|0,m=X0&8191,s=X0>>>13,h0=Q[4]|0,f=h0&8191,u=h0>>>13,J0=Q[5]|0,t=J0&8191,a=J0>>>13,M0=Q[6]|0,y=M0&8191,r=M0>>>13,c0=Q[7]|0,d=c0&8191,I0=c0>>>13,b0=Q[8]|0,A0=b0&8191,H0=b0>>>13,X$=Q[9]|0,z0=X$&8191,F0=X$>>>13,Y$=W[0]|0,Z0=Y$&8191,E0=Y$>>>13,N$=W[1]|0,P0=N$&8191,g0=N$>>>13,x$=W[2]|0,j0=x$&8191,T0=x$>>>13,j$=W[3]|0,_0=j$&8191,q0=j$>>>13,q$=W[4]|0,N0=q$&8191,x0=q$>>>13,R$=W[5]|0,R0=R$&8191,B=R$>>>13,b=W[6]|0,e=b&8191,$0=b>>>13,u0=W[7]|0,K0=u0&8191,L0=u0>>>13,J$=W[8]|0,C0=J$&8191,B0=J$>>>13,_$=W[9]|0,k0=_$&8191,v0=_$>>>13;D.negative=O.negative^G.negative,D.length=19,z=Math.imul(v,Z0),X=Math.imul(v,E0),X=X+Math.imul(j,Z0)|0,K=Math.imul(j,E0);var Q$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,z=Math.imul(h,Z0),X=Math.imul(h,E0),X=X+Math.imul(n,Z0)|0,K=Math.imul(n,E0),z=z+Math.imul(v,P0)|0,X=X+Math.imul(v,g0)|0,X=X+Math.imul(j,P0)|0,K=K+Math.imul(j,g0)|0;var r0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,z=Math.imul(i,Z0),X=Math.imul(i,E0),X=X+Math.imul(l,Z0)|0,K=Math.imul(l,E0),z=z+Math.imul(h,P0)|0,X=X+Math.imul(h,g0)|0,X=X+Math.imul(n,P0)|0,K=K+Math.imul(n,g0)|0,z=z+Math.imul(v,j0)|0,X=X+Math.imul(v,T0)|0,X=X+Math.imul(j,j0)|0,K=K+Math.imul(j,T0)|0;var o0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(o0>>>26)|0,o0&=67108863,z=Math.imul(m,Z0),X=Math.imul(m,E0),X=X+Math.imul(s,Z0)|0,K=Math.imul(s,E0),z=z+Math.imul(i,P0)|0,X=X+Math.imul(i,g0)|0,X=X+Math.imul(l,P0)|0,K=K+Math.imul(l,g0)|0,z=z+Math.imul(h,j0)|0,X=X+Math.imul(h,T0)|0,X=X+Math.imul(n,j0)|0,K=K+Math.imul(n,T0)|0,z=z+Math.imul(v,_0)|0,X=X+Math.imul(v,q0)|0,X=X+Math.imul(j,_0)|0,K=K+Math.imul(j,q0)|0;var a0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,z=Math.imul(f,Z0),X=Math.imul(f,E0),X=X+Math.imul(u,Z0)|0,K=Math.imul(u,E0),z=z+Math.imul(m,P0)|0,X=X+Math.imul(m,g0)|0,X=X+Math.imul(s,P0)|0,K=K+Math.imul(s,g0)|0,z=z+Math.imul(i,j0)|0,X=X+Math.imul(i,T0)|0,X=X+Math.imul(l,j0)|0,K=K+Math.imul(l,T0)|0,z=z+Math.imul(h,_0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(n,_0)|0,K=K+Math.imul(n,q0)|0,z=z+Math.imul(v,N0)|0,X=X+Math.imul(v,x0)|0,X=X+Math.imul(j,N0)|0,K=K+Math.imul(j,x0)|0;var e0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,z=Math.imul(t,Z0),X=Math.imul(t,E0),X=X+Math.imul(a,Z0)|0,K=Math.imul(a,E0),z=z+Math.imul(f,P0)|0,X=X+Math.imul(f,g0)|0,X=X+Math.imul(u,P0)|0,K=K+Math.imul(u,g0)|0,z=z+Math.imul(m,j0)|0,X=X+Math.imul(m,T0)|0,X=X+Math.imul(s,j0)|0,K=K+Math.imul(s,T0)|0,z=z+Math.imul(i,_0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(l,_0)|0,K=K+Math.imul(l,q0)|0,z=z+Math.imul(h,N0)|0,X=X+Math.imul(h,x0)|0,X=X+Math.imul(n,N0)|0,K=K+Math.imul(n,x0)|0,z=z+Math.imul(v,R0)|0,X=X+Math.imul(v,B)|0,X=X+Math.imul(j,R0)|0,K=K+Math.imul(j,B)|0;var S$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(S$>>>26)|0,S$&=67108863,z=Math.imul(y,Z0),X=Math.imul(y,E0),X=X+Math.imul(r,Z0)|0,K=Math.imul(r,E0),z=z+Math.imul(t,P0)|0,X=X+Math.imul(t,g0)|0,X=X+Math.imul(a,P0)|0,K=K+Math.imul(a,g0)|0,z=z+Math.imul(f,j0)|0,X=X+Math.imul(f,T0)|0,X=X+Math.imul(u,j0)|0,K=K+Math.imul(u,T0)|0,z=z+Math.imul(m,_0)|0,X=X+Math.imul(m,q0)|0,X=X+Math.imul(s,_0)|0,K=K+Math.imul(s,q0)|0,z=z+Math.imul(i,N0)|0,X=X+Math.imul(i,x0)|0,X=X+Math.imul(l,N0)|0,K=K+Math.imul(l,x0)|0,z=z+Math.imul(h,R0)|0,X=X+Math.imul(h,B)|0,X=X+Math.imul(n,R0)|0,K=K+Math.imul(n,B)|0,z=z+Math.imul(v,e)|0,X=X+Math.imul(v,$0)|0,X=X+Math.imul(j,e)|0,K=K+Math.imul(j,$0)|0;var W$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(W$>>>26)|0,W$&=67108863,z=Math.imul(d,Z0),X=Math.imul(d,E0),X=X+Math.imul(I0,Z0)|0,K=Math.imul(I0,E0),z=z+Math.imul(y,P0)|0,X=X+Math.imul(y,g0)|0,X=X+Math.imul(r,P0)|0,K=K+Math.imul(r,g0)|0,z=z+Math.imul(t,j0)|0,X=X+Math.imul(t,T0)|0,X=X+Math.imul(a,j0)|0,K=K+Math.imul(a,T0)|0,z=z+Math.imul(f,_0)|0,X=X+Math.imul(f,q0)|0,X=X+Math.imul(u,_0)|0,K=K+Math.imul(u,q0)|0,z=z+Math.imul(m,N0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(s,N0)|0,K=K+Math.imul(s,x0)|0,z=z+Math.imul(i,R0)|0,X=X+Math.imul(i,B)|0,X=X+Math.imul(l,R0)|0,K=K+Math.imul(l,B)|0,z=z+Math.imul(h,e)|0,X=X+Math.imul(h,$0)|0,X=X+Math.imul(n,e)|0,K=K+Math.imul(n,$0)|0,z=z+Math.imul(v,K0)|0,X=X+Math.imul(v,L0)|0,X=X+Math.imul(j,K0)|0,K=K+Math.imul(j,L0)|0;var D$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(D$>>>26)|0,D$&=67108863,z=Math.imul(A0,Z0),X=Math.imul(A0,E0),X=X+Math.imul(H0,Z0)|0,K=Math.imul(H0,E0),z=z+Math.imul(d,P0)|0,X=X+Math.imul(d,g0)|0,X=X+Math.imul(I0,P0)|0,K=K+Math.imul(I0,g0)|0,z=z+Math.imul(y,j0)|0,X=X+Math.imul(y,T0)|0,X=X+Math.imul(r,j0)|0,K=K+Math.imul(r,T0)|0,z=z+Math.imul(t,_0)|0,X=X+Math.imul(t,q0)|0,X=X+Math.imul(a,_0)|0,K=K+Math.imul(a,q0)|0,z=z+Math.imul(f,N0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(u,N0)|0,K=K+Math.imul(u,x0)|0,z=z+Math.imul(m,R0)|0,X=X+Math.imul(m,B)|0,X=X+Math.imul(s,R0)|0,K=K+Math.imul(s,B)|0,z=z+Math.imul(i,e)|0,X=X+Math.imul(i,$0)|0,X=X+Math.imul(l,e)|0,K=K+Math.imul(l,$0)|0,z=z+Math.imul(h,K0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(n,K0)|0,K=K+Math.imul(n,L0)|0,z=z+Math.imul(v,C0)|0,X=X+Math.imul(v,B0)|0,X=X+Math.imul(j,C0)|0,K=K+Math.imul(j,B0)|0;var z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(z$>>>26)|0,z$&=67108863,z=Math.imul(z0,Z0),X=Math.imul(z0,E0),X=X+Math.imul(F0,Z0)|0,K=Math.imul(F0,E0),z=z+Math.imul(A0,P0)|0,X=X+Math.imul(A0,g0)|0,X=X+Math.imul(H0,P0)|0,K=K+Math.imul(H0,g0)|0,z=z+Math.imul(d,j0)|0,X=X+Math.imul(d,T0)|0,X=X+Math.imul(I0,j0)|0,K=K+Math.imul(I0,T0)|0,z=z+Math.imul(y,_0)|0,X=X+Math.imul(y,q0)|0,X=X+Math.imul(r,_0)|0,K=K+Math.imul(r,q0)|0,z=z+Math.imul(t,N0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(a,N0)|0,K=K+Math.imul(a,x0)|0,z=z+Math.imul(f,R0)|0,X=X+Math.imul(f,B)|0,X=X+Math.imul(u,R0)|0,K=K+Math.imul(u,B)|0,z=z+Math.imul(m,e)|0,X=X+Math.imul(m,$0)|0,X=X+Math.imul(s,e)|0,K=K+Math.imul(s,$0)|0,z=z+Math.imul(i,K0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(l,K0)|0,K=K+Math.imul(l,L0)|0,z=z+Math.imul(h,C0)|0,X=X+Math.imul(h,B0)|0,X=X+Math.imul(n,C0)|0,K=K+Math.imul(n,B0)|0,z=z+Math.imul(v,k0)|0,X=X+Math.imul(v,v0)|0,X=X+Math.imul(j,k0)|0,K=K+Math.imul(j,v0)|0;var K$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(K$>>>26)|0,K$&=67108863,z=Math.imul(z0,P0),X=Math.imul(z0,g0),X=X+Math.imul(F0,P0)|0,K=Math.imul(F0,g0),z=z+Math.imul(A0,j0)|0,X=X+Math.imul(A0,T0)|0,X=X+Math.imul(H0,j0)|0,K=K+Math.imul(H0,T0)|0,z=z+Math.imul(d,_0)|0,X=X+Math.imul(d,q0)|0,X=X+Math.imul(I0,_0)|0,K=K+Math.imul(I0,q0)|0,z=z+Math.imul(y,N0)|0,X=X+Math.imul(y,x0)|0,X=X+Math.imul(r,N0)|0,K=K+Math.imul(r,x0)|0,z=z+Math.imul(t,R0)|0,X=X+Math.imul(t,B)|0,X=X+Math.imul(a,R0)|0,K=K+Math.imul(a,B)|0,z=z+Math.imul(f,e)|0,X=X+Math.imul(f,$0)|0,X=X+Math.imul(u,e)|0,K=K+Math.imul(u,$0)|0,z=z+Math.imul(m,K0)|0,X=X+Math.imul(m,L0)|0,X=X+Math.imul(s,K0)|0,K=K+Math.imul(s,L0)|0,z=z+Math.imul(i,C0)|0,X=X+Math.imul(i,B0)|0,X=X+Math.imul(l,C0)|0,K=K+Math.imul(l,B0)|0,z=z+Math.imul(h,k0)|0,X=X+Math.imul(h,v0)|0,X=X+Math.imul(n,k0)|0,K=K+Math.imul(n,v0)|0;var A$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(A$>>>26)|0,A$&=67108863,z=Math.imul(z0,j0),X=Math.imul(z0,T0),X=X+Math.imul(F0,j0)|0,K=Math.imul(F0,T0),z=z+Math.imul(A0,_0)|0,X=X+Math.imul(A0,q0)|0,X=X+Math.imul(H0,_0)|0,K=K+Math.imul(H0,q0)|0,z=z+Math.imul(d,N0)|0,X=X+Math.imul(d,x0)|0,X=X+Math.imul(I0,N0)|0,K=K+Math.imul(I0,x0)|0,z=z+Math.imul(y,R0)|0,X=X+Math.imul(y,B)|0,X=X+Math.imul(r,R0)|0,K=K+Math.imul(r,B)|0,z=z+Math.imul(t,e)|0,X=X+Math.imul(t,$0)|0,X=X+Math.imul(a,e)|0,K=K+Math.imul(a,$0)|0,z=z+Math.imul(f,K0)|0,X=X+Math.imul(f,L0)|0,X=X+Math.imul(u,K0)|0,K=K+Math.imul(u,L0)|0,z=z+Math.imul(m,C0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(s,C0)|0,K=K+Math.imul(s,B0)|0,z=z+Math.imul(i,k0)|0,X=X+Math.imul(i,v0)|0,X=X+Math.imul(l,k0)|0,K=K+Math.imul(l,v0)|0;var H$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(H$>>>26)|0,H$&=67108863,z=Math.imul(z0,_0),X=Math.imul(z0,q0),X=X+Math.imul(F0,_0)|0,K=Math.imul(F0,q0),z=z+Math.imul(A0,N0)|0,X=X+Math.imul(A0,x0)|0,X=X+Math.imul(H0,N0)|0,K=K+Math.imul(H0,x0)|0,z=z+Math.imul(d,R0)|0,X=X+Math.imul(d,B)|0,X=X+Math.imul(I0,R0)|0,K=K+Math.imul(I0,B)|0,z=z+Math.imul(y,e)|0,X=X+Math.imul(y,$0)|0,X=X+Math.imul(r,e)|0,K=K+Math.imul(r,$0)|0,z=z+Math.imul(t,K0)|0,X=X+Math.imul(t,L0)|0,X=X+Math.imul(a,K0)|0,K=K+Math.imul(a,L0)|0,z=z+Math.imul(f,C0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(u,C0)|0,K=K+Math.imul(u,B0)|0,z=z+Math.imul(m,k0)|0,X=X+Math.imul(m,v0)|0,X=X+Math.imul(s,k0)|0,K=K+Math.imul(s,v0)|0;var F$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(F$>>>26)|0,F$&=67108863,z=Math.imul(z0,N0),X=Math.imul(z0,x0),X=X+Math.imul(F0,N0)|0,K=Math.imul(F0,x0),z=z+Math.imul(A0,R0)|0,X=X+Math.imul(A0,B)|0,X=X+Math.imul(H0,R0)|0,K=K+Math.imul(H0,B)|0,z=z+Math.imul(d,e)|0,X=X+Math.imul(d,$0)|0,X=X+Math.imul(I0,e)|0,K=K+Math.imul(I0,$0)|0,z=z+Math.imul(y,K0)|0,X=X+Math.imul(y,L0)|0,X=X+Math.imul(r,K0)|0,K=K+Math.imul(r,L0)|0,z=z+Math.imul(t,C0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(a,C0)|0,K=K+Math.imul(a,B0)|0,z=z+Math.imul(f,k0)|0,X=X+Math.imul(f,v0)|0,X=X+Math.imul(u,k0)|0,K=K+Math.imul(u,v0)|0;var L$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(L$>>>26)|0,L$&=67108863,z=Math.imul(z0,R0),X=Math.imul(z0,B),X=X+Math.imul(F0,R0)|0,K=Math.imul(F0,B),z=z+Math.imul(A0,e)|0,X=X+Math.imul(A0,$0)|0,X=X+Math.imul(H0,e)|0,K=K+Math.imul(H0,$0)|0,z=z+Math.imul(d,K0)|0,X=X+Math.imul(d,L0)|0,X=X+Math.imul(I0,K0)|0,K=K+Math.imul(I0,L0)|0,z=z+Math.imul(y,C0)|0,X=X+Math.imul(y,B0)|0,X=X+Math.imul(r,C0)|0,K=K+Math.imul(r,B0)|0,z=z+Math.imul(t,k0)|0,X=X+Math.imul(t,v0)|0,X=X+Math.imul(a,k0)|0,K=K+Math.imul(a,v0)|0;var E$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(E$>>>26)|0,E$&=67108863,z=Math.imul(z0,e),X=Math.imul(z0,$0),X=X+Math.imul(F0,e)|0,K=Math.imul(F0,$0),z=z+Math.imul(A0,K0)|0,X=X+Math.imul(A0,L0)|0,X=X+Math.imul(H0,K0)|0,K=K+Math.imul(H0,L0)|0,z=z+Math.imul(d,C0)|0,X=X+Math.imul(d,B0)|0,X=X+Math.imul(I0,C0)|0,K=K+Math.imul(I0,B0)|0,z=z+Math.imul(y,k0)|0,X=X+Math.imul(y,v0)|0,X=X+Math.imul(r,k0)|0,K=K+Math.imul(r,v0)|0;var Z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,z=Math.imul(z0,K0),X=Math.imul(z0,L0),X=X+Math.imul(F0,K0)|0,K=Math.imul(F0,L0),z=z+Math.imul(A0,C0)|0,X=X+Math.imul(A0,B0)|0,X=X+Math.imul(H0,C0)|0,K=K+Math.imul(H0,B0)|0,z=z+Math.imul(d,k0)|0,X=X+Math.imul(d,v0)|0,X=X+Math.imul(I0,k0)|0,K=K+Math.imul(I0,v0)|0;var v$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(v$>>>26)|0,v$&=67108863,z=Math.imul(z0,C0),X=Math.imul(z0,B0),X=X+Math.imul(F0,C0)|0,K=Math.imul(F0,B0),z=z+Math.imul(A0,k0)|0,X=X+Math.imul(A0,v0)|0,X=X+Math.imul(H0,k0)|0,K=K+Math.imul(H0,v0)|0;var M$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(M$>>>26)|0,M$&=67108863,z=Math.imul(z0,k0),X=Math.imul(z0,v0),X=X+Math.imul(F0,k0)|0,K=Math.imul(F0,v0);var P$=(H+z|0)+((X&8191)<<13)|0;if(H=(K+(X>>>13)|0)+(P$>>>26)|0,P$&=67108863,A[0]=Q$,A[1]=r0,A[2]=o0,A[3]=a0,A[4]=e0,A[5]=S$,A[6]=W$,A[7]=D$,A[8]=z$,A[9]=K$,A[10]=A$,A[11]=H$,A[12]=F$,A[13]=L$,A[14]=E$,A[15]=Z$,A[16]=v$,A[17]=M$,A[18]=P$,H!==0)A[19]=H,D.length++;return D};if(!Math.imul)C=k;function _(O,G,D){D.negative=G.negative^O.negative,D.length=O.length+G.length;var Q=0,W=0;for(var A=0;A<D.length-1;A++){var H=W;W=0;var z=Q&67108863,X=Math.min(A,G.length-1);for(var K=Math.max(0,A-O.length+1);K<=X;K++){var R=A-K,v=O.words[R]|0,j=G.words[K]|0,c=v*j,h=c&67108863;H=H+(c/67108864|0)|0,h=h+z|0,z=h&67108863,H=H+(h>>>26)|0,W+=H>>>26,H&=67108863}D.words[A]=z,Q=H,H=W}if(Q!==0)D.words[A]=Q;else D.length--;return D.strip()}function g(O,G,D){var Q=new N;return Q.mulp(O,G,D)}Y.prototype.mulTo=function(O,G){var D,Q=this.length+O.length;if(this.length===10&&O.length===10)D=C(this,O,G);else if(Q<63)D=k(this,O,G);else if(Q<1024)D=_(this,O,G);else D=g(this,O,G);return D};function N(O,G){this.x=O,this.y=G}N.prototype.makeRBT=function(O){var G=Array(O),D=Y.prototype._countBits(O)-1;for(var Q=0;Q<O;Q++)G[Q]=this.revBin(Q,D,O);return G},N.prototype.revBin=function(O,G,D){if(O===0||O===D-1)return O;var Q=0;for(var W=0;W<G;W++)Q|=(O&1)<<G-W-1,O>>=1;return Q},N.prototype.permute=function(O,G,D,Q,W,A){for(var H=0;H<A;H++)Q[H]=G[O[H]],W[H]=D[O[H]]},N.prototype.transform=function(O,G,D,Q,W,A){this.permute(A,O,G,D,Q,W);for(var H=1;H<W;H<<=1){var z=H<<1,X=Math.cos(2*Math.PI/z),K=Math.sin(2*Math.PI/z);for(var R=0;R<W;R+=z){var v=X,j=K;for(var c=0;c<H;c++){var h=D[R+c],n=Q[R+c],D0=D[R+c+H],i=Q[R+c+H],l=v*D0-j*i;if(i=v*i+j*D0,D0=l,D[R+c]=h+D0,Q[R+c]=n+i,D[R+c+H]=h-D0,Q[R+c+H]=n-i,c!==z)l=X*v-K*j,j=X*j+K*v,v=l}}}},N.prototype.guessLen13b=function(O,G){var D=Math.max(G,O)|1,Q=D&1,W=0;for(D=D/2|0;D;D=D>>>1)W++;return 1<<W+1+Q},N.prototype.conjugate=function(O,G,D){if(D<=1)return;for(var Q=0;Q<D/2;Q++){var W=O[Q];O[Q]=O[D-Q-1],O[D-Q-1]=W,W=G[Q],G[Q]=-G[D-Q-1],G[D-Q-1]=-W}},N.prototype.normalize13b=function(O,G){var D=0;for(var Q=0;Q<G/2;Q++){var W=Math.round(O[2*Q+1]/G)*8192+Math.round(O[2*Q]/G)+D;if(O[Q]=W&67108863,W<67108864)D=0;else D=W/67108864|0}return O},N.prototype.convert13b=function(O,G,D,Q){var W=0;for(var A=0;A<G;A++)W=W+(O[A]|0),D[2*A]=W&8191,W=W>>>13,D[2*A+1]=W&8191,W=W>>>13;for(A=2*G;A<Q;++A)D[A]=0;I(W===0),I((W&-8192)===0)},N.prototype.stub=function(O){var G=Array(O);for(var D=0;D<O;D++)G[D]=0;return G},N.prototype.mulp=function(O,G,D){var Q=2*this.guessLen13b(O.length,G.length),W=this.makeRBT(Q),A=this.stub(Q),H=Array(Q),z=Array(Q),X=Array(Q),K=Array(Q),R=Array(Q),v=Array(Q),j=D.words;j.length=Q,this.convert13b(O.words,O.length,H,Q),this.convert13b(G.words,G.length,K,Q),this.transform(H,A,z,X,Q,W),this.transform(K,A,R,v,Q,W);for(var c=0;c<Q;c++){var h=z[c]*R[c]-X[c]*v[c];X[c]=z[c]*v[c]+X[c]*R[c],z[c]=h}return this.conjugate(z,X,Q),this.transform(z,X,j,A,Q,W),this.conjugate(j,A,Q),this.normalize13b(j,Q),D.negative=O.negative^G.negative,D.length=O.length+G.length,D.strip()},Y.prototype.mul=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),this.mulTo(O,G)},Y.prototype.mulf=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),g(this,O,G)},Y.prototype.imul=function(O){return this.clone().mulTo(O,this)},Y.prototype.imuln=function(O){I(typeof O==="number"),I(O<67108864);var G=0;for(var D=0;D<this.length;D++){var Q=(this.words[D]|0)*O,W=(Q&67108863)+(G&67108863);G>>=26,G+=Q/67108864|0,G+=W>>>26,this.words[D]=W&67108863}if(G!==0)this.words[D]=G,this.length++;return this.length=O===0?1:this.length,this},Y.prototype.muln=function(O){return this.clone().imuln(O)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(O){var G=q(O);if(G.length===0)return new Y(1);var D=this;for(var Q=0;Q<G.length;Q++,D=D.sqr())if(G[Q]!==0)break;if(++Q<G.length)for(var W=D.sqr();Q<G.length;Q++,W=W.sqr()){if(G[Q]===0)continue;D=D.mul(W)}return D},Y.prototype.iushln=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=67108863>>>26-G<<26-G,W;if(G!==0){var A=0;for(W=0;W<this.length;W++){var H=this.words[W]&Q,z=(this.words[W]|0)-H<<G;this.words[W]=z|A,A=H>>>26-G}if(A)this.words[W]=A,this.length++}if(D!==0){for(W=this.length-1;W>=0;W--)this.words[W+D]=this.words[W];for(W=0;W<D;W++)this.words[W]=0;this.length+=D}return this.strip()},Y.prototype.ishln=function(O){return I(this.negative===0),this.iushln(O)},Y.prototype.iushrn=function(O,G,D){I(typeof O==="number"&&O>=0);var Q;if(G)Q=(G-G%26)/26;else Q=0;var W=O%26,A=Math.min((O-W)/26,this.length),H=67108863^67108863>>>W<<W,z=D;if(Q-=A,Q=Math.max(0,Q),z){for(var X=0;X<A;X++)z.words[X]=this.words[X];z.length=A}if(A===0);else if(this.length>A){this.length-=A;for(X=0;X<this.length;X++)this.words[X]=this.words[X+A]}else this.words[0]=0,this.length=1;var K=0;for(X=this.length-1;X>=0&&(K!==0||X>=Q);X--){var R=this.words[X]|0;this.words[X]=K<<26-W|R>>>W,K=R&H}if(z&&K!==0)z.words[z.length++]=K;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},Y.prototype.ishrn=function(O,G,D){return I(this.negative===0),this.iushrn(O,G,D)},Y.prototype.shln=function(O){return this.clone().ishln(O)},Y.prototype.ushln=function(O){return this.clone().iushln(O)},Y.prototype.shrn=function(O){return this.clone().ishrn(O)},Y.prototype.ushrn=function(O){return this.clone().iushrn(O)},Y.prototype.testn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return!1;var W=this.words[D];return!!(W&Q)},Y.prototype.imaskn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(G!==0)D++;if(this.length=Math.min(D,this.length),G!==0){var Q=67108863^67108863>>>G<<G;this.words[this.length-1]&=Q}return this.strip()},Y.prototype.maskn=function(O){return this.clone().imaskn(O)},Y.prototype.iaddn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.isubn(-O);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<O)return this.words[0]=O-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(O),this.negative=1,this}return this._iaddn(O)},Y.prototype._iaddn=function(O){this.words[0]+=O;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},Y.prototype.isubn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},Y.prototype.addn=function(O){return this.clone().iaddn(O)},Y.prototype.subn=function(O){return this.clone().isubn(O)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(O,G,D){var Q=O.length+D,W;this._expand(Q);var A,H=0;for(W=0;W<O.length;W++){A=(this.words[W+D]|0)+H;var z=(O.words[W]|0)*G;A-=z&67108863,H=(A>>26)-(z/67108864|0),this.words[W+D]=A&67108863}for(;W<this.length-D;W++)A=(this.words[W+D]|0)+H,H=A>>26,this.words[W+D]=A&67108863;if(H===0)return this.strip();I(H===-1),H=0;for(W=0;W<this.length;W++)A=-(this.words[W]|0)+H,H=A>>26,this.words[W]=A&67108863;return this.negative=1,this.strip()},Y.prototype._wordDiv=function(O,G){var D=this.length-O.length,Q=this.clone(),W=O,A=W.words[W.length-1]|0,H=this._countBits(A);if(D=26-H,D!==0)W=W.ushln(D),Q.iushln(D),A=W.words[W.length-1]|0;var z=Q.length-W.length,X;if(G!=="mod"){X=new Y(null),X.length=z+1,X.words=Array(X.length);for(var K=0;K<X.length;K++)X.words[K]=0}var R=Q.clone()._ishlnsubmul(W,1,z);if(R.negative===0){if(Q=R,X)X.words[z]=1}for(var v=z-1;v>=0;v--){var j=(Q.words[W.length+v]|0)*67108864+(Q.words[W.length+v-1]|0);j=Math.min(j/A|0,67108863),Q._ishlnsubmul(W,j,v);while(Q.negative!==0)if(j--,Q.negative=0,Q._ishlnsubmul(W,1,v),!Q.isZero())Q.negative^=1;if(X)X.words[v]=j}if(X)X.strip();if(Q.strip(),G!=="div"&&D!==0)Q.iushrn(D);return{div:X||null,mod:Q}},Y.prototype.divmod=function(O,G,D){if(I(!O.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var Q,W,A;if(this.negative!==0&&O.negative===0){if(A=this.neg().divmod(O,G),G!=="mod")Q=A.div.neg();if(G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.iadd(O)}return{div:Q,mod:W}}if(this.negative===0&&O.negative!==0){if(A=this.divmod(O.neg(),G),G!=="mod")Q=A.div.neg();return{div:Q,mod:A.mod}}if((this.negative&O.negative)!==0){if(A=this.neg().divmod(O.neg(),G),G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.isub(O)}return{div:A.div,mod:W}}if(O.length>this.length||this.cmp(O)<0)return{div:new Y(0),mod:this};if(O.length===1){if(G==="div")return{div:this.divn(O.words[0]),mod:null};if(G==="mod")return{div:null,mod:new Y(this.modn(O.words[0]))};return{div:this.divn(O.words[0]),mod:new Y(this.modn(O.words[0]))}}return this._wordDiv(O,G)},Y.prototype.div=function(O){return this.divmod(O,"div",!1).div},Y.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},Y.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},Y.prototype.divRound=function(O){var G=this.divmod(O);if(G.mod.isZero())return G.div;var D=G.div.negative!==0?G.mod.isub(O):G.mod,Q=O.ushrn(1),W=O.andln(1),A=D.cmp(Q);if(A<0||W===1&&A===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},Y.prototype.modn=function(O){I(O<=67108863);var G=67108864%O,D=0;for(var Q=this.length-1;Q>=0;Q--)D=(G*D+(this.words[Q]|0))%O;return D},Y.prototype.idivn=function(O){I(O<=67108863);var G=0;for(var D=this.length-1;D>=0;D--){var Q=(this.words[D]|0)+G*67108864;this.words[D]=Q/O|0,G=Q%O}return this.strip()},Y.prototype.divn=function(O){return this.clone().idivn(O)},Y.prototype.egcd=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=new Y(0),H=new Y(1),z=0;while(G.isEven()&&D.isEven())G.iushrn(1),D.iushrn(1),++z;var X=D.clone(),K=G.clone();while(!G.isZero()){for(var R=0,v=1;(G.words[0]&v)===0&&R<26;++R,v<<=1);if(R>0){G.iushrn(R);while(R-- >0){if(Q.isOdd()||W.isOdd())Q.iadd(X),W.isub(K);Q.iushrn(1),W.iushrn(1)}}for(var j=0,c=1;(D.words[0]&c)===0&&j<26;++j,c<<=1);if(j>0){D.iushrn(j);while(j-- >0){if(A.isOdd()||H.isOdd())A.iadd(X),H.isub(K);A.iushrn(1),H.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(A),W.isub(H);else D.isub(G),A.isub(Q),H.isub(W)}return{a:A,b:H,gcd:D.iushln(z)}},Y.prototype._invmp=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=D.clone();while(G.cmpn(1)>0&&D.cmpn(1)>0){for(var H=0,z=1;(G.words[0]&z)===0&&H<26;++H,z<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Q.isOdd())Q.iadd(A);Q.iushrn(1)}}for(var X=0,K=1;(D.words[0]&K)===0&&X<26;++X,K<<=1);if(X>0){D.iushrn(X);while(X-- >0){if(W.isOdd())W.iadd(A);W.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(W);else D.isub(G),W.isub(Q)}var R;if(G.cmpn(1)===0)R=Q;else R=W;if(R.cmpn(0)<0)R.iadd(O);return R},Y.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var G=this.clone(),D=O.clone();G.negative=0,D.negative=0;for(var Q=0;G.isEven()&&D.isEven();Q++)G.iushrn(1),D.iushrn(1);do{while(G.isEven())G.iushrn(1);while(D.isEven())D.iushrn(1);var W=G.cmp(D);if(W<0){var A=G;G=D,D=A}else if(W===0||D.cmpn(1)===0)break;G.isub(D)}while(!0);return D.iushln(Q)},Y.prototype.invm=function(O){return this.egcd(O).a.umod(O)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(O){return this.words[0]&O},Y.prototype.bincn=function(O){I(typeof O==="number");var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return this._expand(D+1),this.words[D]|=Q,this;var W=Q;for(var A=D;W!==0&&A<this.length;A++){var H=this.words[A]|0;H+=W,W=H>>>26,H&=67108863,this.words[A]=H}if(W!==0)this.words[A]=W,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(O){var G=O<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var D;if(this.length>1)D=1;else{if(G)O=-O;I(O<=67108863,"Number is too big");var Q=this.words[0]|0;D=Q===O?0:Q<O?-1:1}if(this.negative!==0)return-D|0;return D},Y.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var G=this.ucmp(O);if(this.negative!==0)return-G|0;return G},Y.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;var G=0;for(var D=this.length-1;D>=0;D--){var Q=this.words[D]|0,W=O.words[D]|0;if(Q===W)continue;if(Q<W)G=-1;else if(Q>W)G=1;break}return G},Y.prototype.gtn=function(O){return this.cmpn(O)===1},Y.prototype.gt=function(O){return this.cmp(O)===1},Y.prototype.gten=function(O){return this.cmpn(O)>=0},Y.prototype.gte=function(O){return this.cmp(O)>=0},Y.prototype.ltn=function(O){return this.cmpn(O)===-1},Y.prototype.lt=function(O){return this.cmp(O)===-1},Y.prototype.lten=function(O){return this.cmpn(O)<=0},Y.prototype.lte=function(O){return this.cmp(O)<=0},Y.prototype.eqn=function(O){return this.cmpn(O)===0},Y.prototype.eq=function(O){return this.cmp(O)===0},Y.red=function(O){return new p(O)},Y.prototype.toRed=function(O){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},Y.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(O){return this.red=O,this},Y.prototype.forceRed=function(O){return I(!this.red,"Already a number in reduction context"),this._forceRed(O)},Y.prototype.redAdd=function(O){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},Y.prototype.redIAdd=function(O){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},Y.prototype.redSub=function(O){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},Y.prototype.redISub=function(O){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},Y.prototype.redShl=function(O){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},Y.prototype.redMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},Y.prototype.redIMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},Y.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(O){return I(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var x={k256:null,p224:null,p192:null,p25519:null};function w(O,G){this.name=O,this.p=new Y(G,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var O=new Y(null);return O.words=Array(Math.ceil(this.n/13)),O},w.prototype.ireduce=function(O){var G=O,D;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),D=G.bitLength();while(D>this.n);var Q=D<this.n?-1:G.ucmp(this.p);if(Q===0)G.words[0]=0,G.length=1;else if(Q>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},w.prototype.split=function(O,G){O.iushrn(this.n,0,G)},w.prototype.imulK=function(O){return O.imul(this.k)};function o(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(o,w),o.prototype.split=function(O,G){var D=4194303,Q=Math.min(O.length,9);for(var W=0;W<Q;W++)G.words[W]=O.words[W];if(G.length=Q,O.length<=9){O.words[0]=0,O.length=1;return}var A=O.words[9];G.words[G.length++]=A&D;for(W=10;W<O.length;W++){var H=O.words[W]|0;O.words[W-10]=(H&D)<<4|A>>>22,A=H}if(A>>>=22,O.words[W-10]=A,A===0&&O.length>10)O.length-=10;else O.length-=9},o.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;var G=0;for(var D=0;D<O.length;D++){var Q=O.words[D]|0;G+=Q*977,O.words[D]=G&67108863,G=Q*64+(G/67108864|0)}if(O.words[O.length-1]===0){if(O.length--,O.words[O.length-1]===0)O.length--}return O};function Q0(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(Q0,w);function V0(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(V0,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(Y0,w),Y0.prototype.imulK=function(O){var G=0;for(var D=0;D<O.length;D++){var Q=(O.words[D]|0)*19+G,W=Q&67108863;Q>>>=26,O.words[D]=W,G=Q}if(G!==0)O.words[O.length++]=G;return O},Y._prime=function(O){if(x[O])return x[O];var G;if(O==="k256")G=new o;else if(O==="p224")G=new Q0;else if(O==="p192")G=new V0;else if(O==="p25519")G=new Y0;else throw Error("Unknown prime "+O);return x[O]=G,G};function p(O){if(typeof O==="string"){var G=Y._prime(O);this.m=G.p,this.prime=G}else I(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}p.prototype._verify1=function(O){I(O.negative===0,"red works only with positives"),I(O.red,"red works only with red numbers")},p.prototype._verify2=function(O,G){I((O.negative|G.negative)===0,"red works only with positives"),I(O.red&&O.red===G.red,"red works only with red numbers")},p.prototype.imod=function(O){if(this.prime)return this.prime.ireduce(O)._forceRed(this);return O.umod(this.m)._forceRed(this)},p.prototype.neg=function(O){if(O.isZero())return O.clone();return this.m.sub(O)._forceRed(this)},p.prototype.add=function(O,G){this._verify2(O,G);var D=O.add(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D._forceRed(this)},p.prototype.iadd=function(O,G){this._verify2(O,G);var D=O.iadd(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D},p.prototype.sub=function(O,G){this._verify2(O,G);var D=O.sub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D._forceRed(this)},p.prototype.isub=function(O,G){this._verify2(O,G);var D=O.isub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D},p.prototype.shl=function(O,G){return this._verify1(O),this.imod(O.ushln(G))},p.prototype.imul=function(O,G){return this._verify2(O,G),this.imod(O.imul(G))},p.prototype.mul=function(O,G){return this._verify2(O,G),this.imod(O.mul(G))},p.prototype.isqr=function(O){return this.imul(O,O.clone())},p.prototype.sqr=function(O){return this.mul(O,O)},p.prototype.sqrt=function(O){if(O.isZero())return O.clone();var G=this.m.andln(3);if(I(G%2===1),G===3){var D=this.m.add(new Y(1)).iushrn(2);return this.pow(O,D)}var Q=this.m.subn(1),W=0;while(!Q.isZero()&&Q.andln(1)===0)W++,Q.iushrn(1);I(!Q.isZero());var A=new Y(1).toRed(this),H=A.redNeg(),z=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new Y(2*X*X).toRed(this);while(this.pow(X,z).cmp(H)!==0)X.redIAdd(H);var K=this.pow(X,Q),R=this.pow(O,Q.addn(1).iushrn(1)),v=this.pow(O,Q),j=W;while(v.cmp(A)!==0){var c=v;for(var h=0;c.cmp(A)!==0;h++)c=c.redSqr();I(h<j);var n=this.pow(K,new Y(1).iushln(j-h-1));R=R.redMul(n),K=n.redSqr(),v=v.redMul(K),j=h}return R},p.prototype.invm=function(O){var G=O._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(O,G){if(G.isZero())return new Y(1).toRed(this);if(G.cmpn(1)===0)return O.clone();var D=4,Q=Array(1<<D);Q[0]=new Y(1).toRed(this),Q[1]=O;for(var W=2;W<Q.length;W++)Q[W]=this.mul(Q[W-1],O);var A=Q[0],H=0,z=0,X=G.bitLength()%26;if(X===0)X=26;for(W=G.length-1;W>=0;W--){var K=G.words[W];for(var R=X-1;R>=0;R--){var v=K>>R&1;if(A!==Q[0])A=this.sqr(A);if(v===0&&H===0){z=0;continue}if(H<<=1,H|=v,z++,z!==D&&(W!==0||R!==0))continue;A=this.mul(A,Q[H]),z=0,H=0}X=26}return A},p.prototype.convertTo=function(O){var G=O.umod(this.m);return G===O?G.clone():G},p.prototype.convertFrom=function(O){var G=O.clone();return G.red=null,G},Y.mont=function(O){return new U0(O)};function U0(O){if(p.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S(U0,p),U0.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},U0.prototype.convertFrom=function(O){var G=this.imod(O.mul(this.rinv));return G.red=null,G},U0.prototype.imul=function(O,G){if(O.isZero()||G.isZero())return O.words[0]=0,O.length=1,O;var D=O.imul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.mul=function(O,G){if(O.isZero()||G.isZero())return new Y(0)._forceRed(this);var D=O.mul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.invm=function(O){var G=this.imod(O._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof U>"u"||U,$)}),MU=G0(($,U)=>{U.exports=J;function J(V,I){if(!V)throw Error(I||"Assertion failed")}J.equal=function(V,I,S){if(V!=I)throw Error(S||"Assertion failed: "+V+" != "+I)}}),TV=G0(($)=>{var U=$;function J(S,Y){if(Array.isArray(S))return S.slice();if(!S)return[];var M=[];if(typeof S!=="string"){for(var T=0;T<S.length;T++)M[T]=S[T]|0;return M}if(Y==="hex"){if(S=S.replace(/[^a-z0-9]+/ig,""),S.length%2!==0)S="0"+S;for(var T=0;T<S.length;T+=2)M.push(parseInt(S[T]+S[T+1],16))}else for(var T=0;T<S.length;T++){var L=S.charCodeAt(T),E=L>>8,F=L&255;if(E)M.push(E,F);else M.push(F)}return M}U.toArray=J;function V(S){if(S.length===1)return"0"+S;else return S}U.zero2=V;function I(S){var Y="";for(var M=0;M<S.length;M++)Y+=V(S[M].toString(16));return Y}U.toHex=I,U.encode=function(S,Y){if(Y==="hex")return I(S);else return S}}),m$=G0(($)=>{var U=$,J=zU(),V=MU(),I=TV();U.assert=V,U.toArray=I.toArray,U.zero2=I.zero2,U.toHex=I.toHex,U.encode=I.encode;function S(E,F,Z){var P=Array(Math.max(E.bitLength(),Z)+1),q;for(q=0;q<P.length;q+=1)P[q]=0;var k=1<<F+1,C=E.clone();for(q=0;q<P.length;q++){var _,g=C.andln(k-1);if(C.isOdd()){if(g>(k>>1)-1)_=(k>>1)-g;else _=g;C.isubn(_)}else _=0;P[q]=_,C.iushrn(1)}return P}U.getNAF=S;function Y(E,F){var Z=[[],[]];E=E.clone(),F=F.clone();var P=0,q=0,k;while(E.cmpn(-P)>0||F.cmpn(-q)>0){var C=E.andln(3)+P&3,_=F.andln(3)+q&3;if(C===3)C=-1;if(_===3)_=-1;var g;if((C&1)===0)g=0;else if(k=E.andln(7)+P&7,(k===3||k===5)&&_===2)g=-C;else g=C;Z[0].push(g);var N;if((_&1)===0)N=0;else if(k=F.andln(7)+q&7,(k===3||k===5)&&C===2)N=-_;else N=_;if(Z[1].push(N),2*P===g+1)P=1-P;if(2*q===N+1)q=1-q;E.iushrn(1),F.iushrn(1)}return Z}U.getJSF=Y;function M(E,F,Z){var P="_"+F;E.prototype[F]=function(){return this[P]!==void 0?this[P]:this[P]=Z.call(this)}}U.cachedProperty=M;function T(E){return typeof E==="string"?U.toArray(E,"hex"):E}U.parseBytes=T;function L(E){return new J(E,"hex","le")}U.intFromLE=L}),qV=G0(($,U)=>{var J;U.exports=function(S){if(!J)J=new V(null);return J.generate(S)};function V(S){this.rand=S}if(U.exports.Rand=V,V.prototype.generate=function(S){return this._rand(S)},V.prototype._rand=function(S){if(this.rand.getBytes)return this.rand.getBytes(S);var Y=new Uint8Array(S);for(var M=0;M<Y.length;M++)Y[M]=this.rand.getByte();return Y},typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues)V.prototype._rand=function(S){var Y=new Uint8Array(S);return self.crypto.getRandomValues(Y),Y};else if(self.msCrypto&&self.msCrypto.getRandomValues)V.prototype._rand=function(S){var Y=new Uint8Array(S);return self.msCrypto.getRandomValues(Y),Y};else if(typeof window==="object")V.prototype._rand=function(){throw Error("Not implemented yet")}}else try{if(I=(p$(),d0(u$)),typeof I.randomBytes!=="function")throw Error("Not supported");V.prototype._rand=function(S){return I.randomBytes(S)}}catch(S){}var I}),H6=G0(($,U)=>{var J=zU(),V=m$(),I=V.getNAF,S=V.getJSF,Y=V.assert;function M(L,E){this.type=L,this.p=new J(E.p,16),this.red=E.prime?J.red(E.prime):J.mont(this.p),this.zero=new J(0).toRed(this.red),this.one=new J(1).toRed(this.red),this.two=new J(2).toRed(this.red),this.n=E.n&&new J(E.n,16),this.g=E.g&&this.pointFromJSON(E.g,E.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var F=this.n&&this.p.div(this.n);if(!F||F.cmpn(100)>0)this.redN=null;else this._maxwellTrick=!0,this.redN=this.n.toRed(this.red)}U.exports=M,M.prototype.point=function(){throw Error("Not implemented")},M.prototype.validate=function(){throw Error("Not implemented")},M.prototype._fixedNafMul=function(L,E){Y(L.precomputed);var F=L._getDoubles(),Z=I(E,1,this._bitLength),P=(1<<F.step+1)-(F.step%2===0?2:1);P/=3;var q=[],k,C;for(k=0;k<Z.length;k+=F.step){C=0;for(var _=k+F.step-1;_>=k;_--)C=(C<<1)+Z[_];q.push(C)}var g=this.jpoint(null,null,null),N=this.jpoint(null,null,null);for(var x=P;x>0;x--){for(k=0;k<q.length;k++)if(C=q[k],C===x)N=N.mixedAdd(F.points[k]);else if(C===-x)N=N.mixedAdd(F.points[k].neg());g=g.add(N)}return g.toP()},M.prototype._wnafMul=function(L,E){var F=4,Z=L._getNAFPoints(F);F=Z.wnd;var P=Z.points,q=I(E,F,this._bitLength),k=this.jpoint(null,null,null);for(var C=q.length-1;C>=0;C--){for(var _=0;C>=0&&q[C]===0;C--)_++;if(C>=0)_++;if(k=k.dblp(_),C<0)break;var g=q[C];if(Y(g!==0),L.type==="affine")if(g>0)k=k.mixedAdd(P[g-1>>1]);else k=k.mixedAdd(P[-g-1>>1].neg());else if(g>0)k=k.add(P[g-1>>1]);else k=k.add(P[-g-1>>1].neg())}return L.type==="affine"?k.toP():k},M.prototype._wnafMulAdd=function(L,E,F,Z,P){var q=this._wnafT1,k=this._wnafT2,C=this._wnafT3,_=0,g,N,x;for(g=0;g<Z;g++){x=E[g];var w=x._getNAFPoints(L);q[g]=w.wnd,k[g]=w.points}for(g=Z-1;g>=1;g-=2){var o=g-1,Q0=g;if(q[o]!==1||q[Q0]!==1){C[o]=I(F[o],q[o],this._bitLength),C[Q0]=I(F[Q0],q[Q0],this._bitLength),_=Math.max(C[o].length,_),_=Math.max(C[Q0].length,_);continue}var V0=[E[o],null,null,E[Q0]];if(E[o].y.cmp(E[Q0].y)===0)V0[1]=E[o].add(E[Q0]),V0[2]=E[o].toJ().mixedAdd(E[Q0].neg());else if(E[o].y.cmp(E[Q0].y.redNeg())===0)V0[1]=E[o].toJ().mixedAdd(E[Q0]),V0[2]=E[o].add(E[Q0].neg());else V0[1]=E[o].toJ().mixedAdd(E[Q0]),V0[2]=E[o].toJ().mixedAdd(E[Q0].neg());var Y0=[-3,-1,-5,-7,0,7,5,1,3],p=S(F[o],F[Q0]);_=Math.max(p[0].length,_),C[o]=Array(_),C[Q0]=Array(_);for(N=0;N<_;N++){var U0=p[0][N]|0,O=p[1][N]|0;C[o][N]=Y0[(U0+1)*3+(O+1)],C[Q0][N]=0,k[o]=V0}}var G=this.jpoint(null,null,null),D=this._wnafT4;for(g=_;g>=0;g--){var Q=0;while(g>=0){var W=!0;for(N=0;N<Z;N++)if(D[N]=C[N][g]|0,D[N]!==0)W=!1;if(!W)break;Q++,g--}if(g>=0)Q++;if(G=G.dblp(Q),g<0)break;for(N=0;N<Z;N++){var A=D[N];if(A===0)continue;else if(A>0)x=k[N][A-1>>1];else if(A<0)x=k[N][-A-1>>1].neg();if(x.type==="affine")G=G.mixedAdd(x);else G=G.add(x)}}for(g=0;g<Z;g++)k[g]=null;if(P)return G;else return G.toP()};function T(L,E){this.curve=L,this.type=E,this.precomputed=null}M.BasePoint=T,T.prototype.eq=function(){throw Error("Not implemented")},T.prototype.validate=function(){return this.curve.validate(this)},M.prototype.decodePoint=function(L,E){L=V.toArray(L,E);var F=this.p.byteLength();if((L[0]===4||L[0]===6||L[0]===7)&&L.length-1===2*F){if(L[0]===6)Y(L[L.length-1]%2===0);else if(L[0]===7)Y(L[L.length-1]%2===1);var Z=this.point(L.slice(1,1+F),L.slice(1+F,1+2*F));return Z}else if((L[0]===2||L[0]===3)&&L.length-1===F)return this.pointFromX(L.slice(1,1+F),L[0]===3);throw Error("Unknown point format")},T.prototype.encodeCompressed=function(L){return this.encode(L,!0)},T.prototype._encode=function(L){var E=this.curve.p.byteLength(),F=this.getX().toArray("be",E);if(L)return[this.getY().isEven()?2:3].concat(F);return[4].concat(F,this.getY().toArray("be",E))},T.prototype.encode=function(L,E){return V.encode(this._encode(E),L)},T.prototype.precompute=function(L){if(this.precomputed)return this;var E={doubles:null,naf:null,beta:null};return E.naf=this._getNAFPoints(8),E.doubles=this._getDoubles(4,L),E.beta=this._getBeta(),this.precomputed=E,this},T.prototype._hasDoubles=function(L){if(!this.precomputed)return!1;var E=this.precomputed.doubles;if(!E)return!1;return E.points.length>=Math.ceil((L.bitLength()+1)/E.step)},T.prototype._getDoubles=function(L,E){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var F=[this],Z=this;for(var P=0;P<E;P+=L){for(var q=0;q<L;q++)Z=Z.dbl();F.push(Z)}return{step:L,points:F}},T.prototype._getNAFPoints=function(L){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var E=[this],F=(1<<L)-1,Z=F===1?null:this.dbl();for(var P=1;P<F;P++)E[P]=E[P-1].add(Z);return{wnd:L,points:E}},T.prototype._getBeta=function(){return null},T.prototype.dblp=function(L){var E=this;for(var F=0;F<L;F++)E=E.dbl();return E}}),FA=G0(($,U)=>{if(typeof Object.create==="function")U.exports=function(J,V){if(V)J.super_=V,J.prototype=Object.create(V.prototype,{constructor:{value:J,enumerable:!1,writable:!0,configurable:!0}})};else U.exports=function(J,V){if(V){J.super_=V;var I=function(){};I.prototype=V.prototype,J.prototype=new I,J.prototype.constructor=J}}}),o$=G0(($,U)=>{try{if(J=(UV(),d0($V)),typeof J.inherits!=="function")throw"";U.exports=J.inherits}catch(V){U.exports=FA()}var J}),LA=G0(($,U)=>{var J=m$(),V=zU(),I=o$(),S=H6(),Y=J.assert;function M(E){S.call(this,"short",E),this.a=new V(E.a,16).toRed(this.red),this.b=new V(E.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(E),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}I(M,S),U.exports=M,M.prototype._getEndomorphism=function(E){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var F,Z;if(E.beta)F=new V(E.beta,16).toRed(this.red);else{var P=this._getEndoRoots(this.p);F=P[0].cmp(P[1])<0?P[0]:P[1],F=F.toRed(this.red)}if(E.lambda)Z=new V(E.lambda,16);else{var q=this._getEndoRoots(this.n);if(this.g.mul(q[0]).x.cmp(this.g.x.redMul(F))===0)Z=q[0];else Z=q[1],Y(this.g.mul(Z).x.cmp(this.g.x.redMul(F))===0)}var k;if(E.basis)k=E.basis.map(function(C){return{a:new V(C.a,16),b:new V(C.b,16)}});else k=this._getEndoBasis(Z);return{beta:F,lambda:Z,basis:k}},M.prototype._getEndoRoots=function(E){var F=E===this.p?this.red:V.mont(E),Z=new V(2).toRed(F).redInvm(),P=Z.redNeg(),q=new V(3).toRed(F).redNeg().redSqrt().redMul(Z),k=P.redAdd(q).fromRed(),C=P.redSub(q).fromRed();return[k,C]},M.prototype._getEndoBasis=function(E){var F=this.n.ushrn(Math.floor(this.n.bitLength()/2)),Z=E,P=this.n.clone(),q=new V(1),k=new V(0),C=new V(0),_=new V(1),g,N,x,w,o,Q0,V0,Y0=0,p,U0;while(Z.cmpn(0)!==0){var O=P.div(Z);p=P.sub(O.mul(Z)),U0=C.sub(O.mul(q));var G=_.sub(O.mul(k));if(!x&&p.cmp(F)<0)g=V0.neg(),N=q,x=p.neg(),w=U0;else if(x&&++Y0===2)break;V0=p,P=Z,Z=p,C=q,q=U0,_=k,k=G}o=p.neg(),Q0=U0;var D=x.sqr().add(w.sqr()),Q=o.sqr().add(Q0.sqr());if(Q.cmp(D)>=0)o=g,Q0=N;if(x.negative)x=x.neg(),w=w.neg();if(o.negative)o=o.neg(),Q0=Q0.neg();return[{a:x,b:w},{a:o,b:Q0}]},M.prototype._endoSplit=function(E){var F=this.endo.basis,Z=F[0],P=F[1],q=P.b.mul(E).divRound(this.n),k=Z.b.neg().mul(E).divRound(this.n),C=q.mul(Z.a),_=k.mul(P.a),g=q.mul(Z.b),N=k.mul(P.b),x=E.sub(C).sub(_),w=g.add(N).neg();return{k1:x,k2:w}},M.prototype.pointFromX=function(E,F){if(E=new V(E,16),!E.red)E=E.toRed(this.red);var Z=E.redSqr().redMul(E).redIAdd(E.redMul(this.a)).redIAdd(this.b),P=Z.redSqrt();if(P.redSqr().redSub(Z).cmp(this.zero)!==0)throw Error("invalid point");var q=P.fromRed().isOdd();if(F&&!q||!F&&q)P=P.redNeg();return this.point(E,P)},M.prototype.validate=function(E){if(E.inf)return!0;var{x:F,y:Z}=E,P=this.a.redMul(F),q=F.redSqr().redMul(F).redIAdd(P).redIAdd(this.b);return Z.redSqr().redISub(q).cmpn(0)===0},M.prototype._endoWnafMulAdd=function(E,F,Z){var P=this._endoWnafT1,q=this._endoWnafT2;for(var k=0;k<E.length;k++){var C=this._endoSplit(F[k]),_=E[k],g=_._getBeta();if(C.k1.negative)C.k1.ineg(),_=_.neg(!0);if(C.k2.negative)C.k2.ineg(),g=g.neg(!0);P[k*2]=_,P[k*2+1]=g,q[k*2]=C.k1,q[k*2+1]=C.k2}var N=this._wnafMulAdd(1,P,q,k*2,Z);for(var x=0;x<k*2;x++)P[x]=null,q[x]=null;return N};function T(E,F,Z,P){if(S.BasePoint.call(this,E,"affine"),F===null&&Z===null)this.x=null,this.y=null,this.inf=!0;else{if(this.x=new V(F,16),this.y=new V(Z,16),P)this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=!1}}I(T,S.BasePoint),M.prototype.point=function(E,F,Z){return new T(this,E,F,Z)},M.prototype.pointFromJSON=function(E,F){return T.fromJSON(this,E,F)},T.prototype._getBeta=function(){if(!this.curve.endo)return;var E=this.precomputed;if(E&&E.beta)return E.beta;var F=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(E){var Z=this.curve,P=function(q){return Z.point(q.x.redMul(Z.endo.beta),q.y)};E.beta=F,F.precomputed={beta:null,naf:E.naf&&{wnd:E.naf.wnd,points:E.naf.points.map(P)},doubles:E.doubles&&{step:E.doubles.step,points:E.doubles.points.map(P)}}}return F},T.prototype.toJSON=function(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]},T.fromJSON=function(E,F,Z){if(typeof F==="string")F=JSON.parse(F);var P=E.point(F[0],F[1],Z);if(!F[2])return P;function q(C){return E.point(C[0],C[1],Z)}var k=F[2];return P.precomputed={beta:null,doubles:k.doubles&&{step:k.doubles.step,points:[P].concat(k.doubles.points.map(q))},naf:k.naf&&{wnd:k.naf.wnd,points:[P].concat(k.naf.points.map(q))}},P},T.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},T.prototype.isInfinity=function(){return this.inf},T.prototype.add=function(E){if(this.inf)return E;if(E.inf)return this;if(this.eq(E))return this.dbl();if(this.neg().eq(E))return this.curve.point(null,null);if(this.x.cmp(E.x)===0)return this.curve.point(null,null);var F=this.y.redSub(E.y);if(F.cmpn(0)!==0)F=F.redMul(this.x.redSub(E.x).redInvm());var Z=F.redSqr().redISub(this.x).redISub(E.x),P=F.redMul(this.x.redSub(Z)).redISub(this.y);return this.curve.point(Z,P)},T.prototype.dbl=function(){if(this.inf)return this;var E=this.y.redAdd(this.y);if(E.cmpn(0)===0)return this.curve.point(null,null);var F=this.curve.a,Z=this.x.redSqr(),P=E.redInvm(),q=Z.redAdd(Z).redIAdd(Z).redIAdd(F).redMul(P),k=q.redSqr().redISub(this.x.redAdd(this.x)),C=q.redMul(this.x.redSub(k)).redISub(this.y);return this.curve.point(k,C)},T.prototype.getX=function(){return this.x.fromRed()},T.prototype.getY=function(){return this.y.fromRed()},T.prototype.mul=function(E){if(E=new V(E,16),this.isInfinity())return this;else if(this._hasDoubles(E))return this.curve._fixedNafMul(this,E);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[E]);else return this.curve._wnafMul(this,E)},T.prototype.mulAdd=function(E,F,Z){var P=[this,F],q=[E,Z];if(this.curve.endo)return this.curve._endoWnafMulAdd(P,q);else return this.curve._wnafMulAdd(1,P,q,2)},T.prototype.jmulAdd=function(E,F,Z){var P=[this,F],q=[E,Z];if(this.curve.endo)return this.curve._endoWnafMulAdd(P,q,!0);else return this.curve._wnafMulAdd(1,P,q,2,!0)},T.prototype.eq=function(E){return this===E||this.inf===E.inf&&(this.inf||this.x.cmp(E.x)===0&&this.y.cmp(E.y)===0)},T.prototype.neg=function(E){if(this.inf)return this;var F=this.curve.point(this.x,this.y.redNeg());if(E&&this.precomputed){var Z=this.precomputed,P=function(q){return q.neg()};F.precomputed={naf:Z.naf&&{wnd:Z.naf.wnd,points:Z.naf.points.map(P)},doubles:Z.doubles&&{step:Z.doubles.step,points:Z.doubles.points.map(P)}}}return F},T.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var E=this.curve.jpoint(this.x,this.y,this.curve.one);return E};function L(E,F,Z,P){if(S.BasePoint.call(this,E,"jacobian"),F===null&&Z===null&&P===null)this.x=this.curve.one,this.y=this.curve.one,this.z=new V(0);else this.x=new V(F,16),this.y=new V(Z,16),this.z=new V(P,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}I(L,S.BasePoint),M.prototype.jpoint=function(E,F,Z){return new L(this,E,F,Z)},L.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var E=this.z.redInvm(),F=E.redSqr(),Z=this.x.redMul(F),P=this.y.redMul(F).redMul(E);return this.curve.point(Z,P)},L.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},L.prototype.add=function(E){if(this.isInfinity())return E;if(E.isInfinity())return this;var F=E.z.redSqr(),Z=this.z.redSqr(),P=this.x.redMul(F),q=E.x.redMul(Z),k=this.y.redMul(F.redMul(E.z)),C=E.y.redMul(Z.redMul(this.z)),_=P.redSub(q),g=k.redSub(C);if(_.cmpn(0)===0)if(g.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var N=_.redSqr(),x=N.redMul(_),w=P.redMul(N),o=g.redSqr().redIAdd(x).redISub(w).redISub(w),Q0=g.redMul(w.redISub(o)).redISub(k.redMul(x)),V0=this.z.redMul(E.z).redMul(_);return this.curve.jpoint(o,Q0,V0)},L.prototype.mixedAdd=function(E){if(this.isInfinity())return E.toJ();if(E.isInfinity())return this;var F=this.z.redSqr(),Z=this.x,P=E.x.redMul(F),q=this.y,k=E.y.redMul(F).redMul(this.z),C=Z.redSub(P),_=q.redSub(k);if(C.cmpn(0)===0)if(_.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var g=C.redSqr(),N=g.redMul(C),x=Z.redMul(g),w=_.redSqr().redIAdd(N).redISub(x).redISub(x),o=_.redMul(x.redISub(w)).redISub(q.redMul(N)),Q0=this.z.redMul(C);return this.curve.jpoint(w,o,Q0)},L.prototype.dblp=function(E){if(E===0)return this;if(this.isInfinity())return this;if(!E)return this.dbl();var F;if(this.curve.zeroA||this.curve.threeA){var Z=this;for(F=0;F<E;F++)Z=Z.dbl();return Z}var P=this.curve.a,q=this.curve.tinv,k=this.x,C=this.y,_=this.z,g=_.redSqr().redSqr(),N=C.redAdd(C);for(F=0;F<E;F++){var x=k.redSqr(),w=N.redSqr(),o=w.redSqr(),Q0=x.redAdd(x).redIAdd(x).redIAdd(P.redMul(g)),V0=k.redMul(w),Y0=Q0.redSqr().redISub(V0.redAdd(V0)),p=V0.redISub(Y0),U0=Q0.redMul(p);U0=U0.redIAdd(U0).redISub(o);var O=N.redMul(_);if(F+1<E)g=g.redMul(o);k=Y0,_=O,N=U0}return this.curve.jpoint(k,N.redMul(q),_)},L.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()},L.prototype._zeroDbl=function(){var E,F,Z;if(this.zOne){var P=this.x.redSqr(),q=this.y.redSqr(),k=q.redSqr(),C=this.x.redAdd(q).redSqr().redISub(P).redISub(k);C=C.redIAdd(C);var _=P.redAdd(P).redIAdd(P),g=_.redSqr().redISub(C).redISub(C),N=k.redIAdd(k);N=N.redIAdd(N),N=N.redIAdd(N),E=g,F=_.redMul(C.redISub(g)).redISub(N),Z=this.y.redAdd(this.y)}else{var x=this.x.redSqr(),w=this.y.redSqr(),o=w.redSqr(),Q0=this.x.redAdd(w).redSqr().redISub(x).redISub(o);Q0=Q0.redIAdd(Q0);var V0=x.redAdd(x).redIAdd(x),Y0=V0.redSqr(),p=o.redIAdd(o);p=p.redIAdd(p),p=p.redIAdd(p),E=Y0.redISub(Q0).redISub(Q0),F=V0.redMul(Q0.redISub(E)).redISub(p),Z=this.y.redMul(this.z),Z=Z.redIAdd(Z)}return this.curve.jpoint(E,F,Z)},L.prototype._threeDbl=function(){var E,F,Z;if(this.zOne){var P=this.x.redSqr(),q=this.y.redSqr(),k=q.redSqr(),C=this.x.redAdd(q).redSqr().redISub(P).redISub(k);C=C.redIAdd(C);var _=P.redAdd(P).redIAdd(P).redIAdd(this.curve.a),g=_.redSqr().redISub(C).redISub(C);E=g;var N=k.redIAdd(k);N=N.redIAdd(N),N=N.redIAdd(N),F=_.redMul(C.redISub(g)).redISub(N),Z=this.y.redAdd(this.y)}else{var x=this.z.redSqr(),w=this.y.redSqr(),o=this.x.redMul(w),Q0=this.x.redSub(x).redMul(this.x.redAdd(x));Q0=Q0.redAdd(Q0).redIAdd(Q0);var V0=o.redIAdd(o);V0=V0.redIAdd(V0);var Y0=V0.redAdd(V0);E=Q0.redSqr().redISub(Y0),Z=this.y.redAdd(this.z).redSqr().redISub(w).redISub(x);var p=w.redSqr();p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p),F=Q0.redMul(V0.redISub(E)).redISub(p)}return this.curve.jpoint(E,F,Z)},L.prototype._dbl=function(){var E=this.curve.a,F=this.x,Z=this.y,P=this.z,q=P.redSqr().redSqr(),k=F.redSqr(),C=Z.redSqr(),_=k.redAdd(k).redIAdd(k).redIAdd(E.redMul(q)),g=F.redAdd(F);g=g.redIAdd(g);var N=g.redMul(C),x=_.redSqr().redISub(N.redAdd(N)),w=N.redISub(x),o=C.redSqr();o=o.redIAdd(o),o=o.redIAdd(o),o=o.redIAdd(o);var Q0=_.redMul(w).redISub(o),V0=Z.redAdd(Z).redMul(P);return this.curve.jpoint(x,Q0,V0)},L.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var E=this.x.redSqr(),F=this.y.redSqr(),Z=this.z.redSqr(),P=F.redSqr(),q=E.redAdd(E).redIAdd(E),k=q.redSqr(),C=this.x.redAdd(F).redSqr().redISub(E).redISub(P);C=C.redIAdd(C),C=C.redAdd(C).redIAdd(C),C=C.redISub(k);var _=C.redSqr(),g=P.redIAdd(P);g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g);var N=q.redIAdd(C).redSqr().redISub(k).redISub(_).redISub(g),x=F.redMul(N);x=x.redIAdd(x),x=x.redIAdd(x);var w=this.x.redMul(_).redISub(x);w=w.redIAdd(w),w=w.redIAdd(w);var o=this.y.redMul(N.redMul(g.redISub(N)).redISub(C.redMul(_)));o=o.redIAdd(o),o=o.redIAdd(o),o=o.redIAdd(o);var Q0=this.z.redAdd(C).redSqr().redISub(Z).redISub(_);return this.curve.jpoint(w,o,Q0)},L.prototype.mul=function(E,F){return E=new V(E,F),this.curve._wnafMul(this,E)},L.prototype.eq=function(E){if(E.type==="affine")return this.eq(E.toJ());if(this===E)return!0;var F=this.z.redSqr(),Z=E.z.redSqr();if(this.x.redMul(Z).redISub(E.x.redMul(F)).cmpn(0)!==0)return!1;var P=F.redMul(this.z),q=Z.redMul(E.z);return this.y.redMul(q).redISub(E.y.redMul(P)).cmpn(0)===0},L.prototype.eqXToP=function(E){var F=this.z.redSqr(),Z=E.toRed(this.curve.red).redMul(F);if(this.x.cmp(Z)===0)return!0;var P=E.clone(),q=this.curve.redN.redMul(F);for(;;){if(P.iadd(this.curve.n),P.cmp(this.curve.p)>=0)return!1;if(Z.redIAdd(q),this.x.cmp(Z)===0)return!0}},L.prototype.inspect=function(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},L.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),EA=G0(($,U)=>{var J=zU(),V=o$(),I=H6(),S=m$();function Y(T){I.call(this,"mont",T),this.a=new J(T.a,16).toRed(this.red),this.b=new J(T.b,16).toRed(this.red),this.i4=new J(4).toRed(this.red).redInvm(),this.two=new J(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}V(Y,I),U.exports=Y,Y.prototype.validate=function(T){var L=T.normalize().x,E=L.redSqr(),F=E.redMul(L).redAdd(E.redMul(this.a)).redAdd(L),Z=F.redSqrt();return Z.redSqr().cmp(F)===0};function M(T,L,E){if(I.BasePoint.call(this,T,"projective"),L===null&&E===null)this.x=this.curve.one,this.z=this.curve.zero;else{if(this.x=new J(L,16),this.z=new J(E,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}V(M,I.BasePoint),Y.prototype.decodePoint=function(T,L){return this.point(S.toArray(T,L),1)},Y.prototype.point=function(T,L){return new M(this,T,L)},Y.prototype.pointFromJSON=function(T){return M.fromJSON(this,T)},M.prototype.precompute=function(){},M.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},M.fromJSON=function(T,L){return new M(T,L[0],L[1]||T.one)},M.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},M.prototype.isInfinity=function(){return this.z.cmpn(0)===0},M.prototype.dbl=function(){var T=this.x.redAdd(this.z),L=T.redSqr(),E=this.x.redSub(this.z),F=E.redSqr(),Z=L.redSub(F),P=L.redMul(F),q=Z.redMul(F.redAdd(this.curve.a24.redMul(Z)));return this.curve.point(P,q)},M.prototype.add=function(){throw Error("Not supported on Montgomery curve")},M.prototype.diffAdd=function(T,L){var E=this.x.redAdd(this.z),F=this.x.redSub(this.z),Z=T.x.redAdd(T.z),P=T.x.redSub(T.z),q=P.redMul(E),k=Z.redMul(F),C=L.z.redMul(q.redAdd(k).redSqr()),_=L.x.redMul(q.redISub(k).redSqr());return this.curve.point(C,_)},M.prototype.mul=function(T){var L=T.clone(),E=this,F=this.curve.point(null,null),Z=this;for(var P=[];L.cmpn(0)!==0;L.iushrn(1))P.push(L.andln(1));for(var q=P.length-1;q>=0;q--)if(P[q]===0)E=E.diffAdd(F,Z),F=F.dbl();else F=E.diffAdd(F,Z),E=E.dbl();return F},M.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},M.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},M.prototype.eq=function(T){return this.getX().cmp(T.getX())===0},M.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},M.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),ZA=G0(($,U)=>{var J=m$(),V=zU(),I=o$(),S=H6(),Y=J.assert;function M(L){this.twisted=(L.a|0)!==1,this.mOneA=this.twisted&&(L.a|0)===-1,this.extended=this.mOneA,S.call(this,"edwards",L),this.a=new V(L.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new V(L.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new V(L.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),Y(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(L.c|0)===1}I(M,S),U.exports=M,M.prototype._mulA=function(L){if(this.mOneA)return L.redNeg();else return this.a.redMul(L)},M.prototype._mulC=function(L){if(this.oneC)return L;else return this.c.redMul(L)},M.prototype.jpoint=function(L,E,F,Z){return this.point(L,E,F,Z)},M.prototype.pointFromX=function(L,E){if(L=new V(L,16),!L.red)L=L.toRed(this.red);var F=L.redSqr(),Z=this.c2.redSub(this.a.redMul(F)),P=this.one.redSub(this.c2.redMul(this.d).redMul(F)),q=Z.redMul(P.redInvm()),k=q.redSqrt();if(k.redSqr().redSub(q).cmp(this.zero)!==0)throw Error("invalid point");var C=k.fromRed().isOdd();if(E&&!C||!E&&C)k=k.redNeg();return this.point(L,k)},M.prototype.pointFromY=function(L,E){if(L=new V(L,16),!L.red)L=L.toRed(this.red);var F=L.redSqr(),Z=F.redSub(this.c2),P=F.redMul(this.d).redMul(this.c2).redSub(this.a),q=Z.redMul(P.redInvm());if(q.cmp(this.zero)===0)if(E)throw Error("invalid point");else return this.point(this.zero,L);var k=q.redSqrt();if(k.redSqr().redSub(q).cmp(this.zero)!==0)throw Error("invalid point");if(k.fromRed().isOdd()!==E)k=k.redNeg();return this.point(k,L)},M.prototype.validate=function(L){if(L.isInfinity())return!0;L.normalize();var E=L.x.redSqr(),F=L.y.redSqr(),Z=E.redMul(this.a).redAdd(F),P=this.c2.redMul(this.one.redAdd(this.d.redMul(E).redMul(F)));return Z.cmp(P)===0};function T(L,E,F,Z,P){if(S.BasePoint.call(this,L,"projective"),E===null&&F===null&&Z===null)this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0;else{if(this.x=new V(E,16),this.y=new V(F,16),this.z=Z?new V(Z,16):this.curve.one,this.t=P&&new V(P,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);if(this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t){if(this.t=this.x.redMul(this.y),!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}I(T,S.BasePoint),M.prototype.pointFromJSON=function(L){return T.fromJSON(this,L)},M.prototype.point=function(L,E,F,Z){return new T(this,L,E,F,Z)},T.fromJSON=function(L,E){return new T(L,E[0],E[1],E[2])},T.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},T.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},T.prototype._extDbl=function(){var L=this.x.redSqr(),E=this.y.redSqr(),F=this.z.redSqr();F=F.redIAdd(F);var Z=this.curve._mulA(L),P=this.x.redAdd(this.y).redSqr().redISub(L).redISub(E),q=Z.redAdd(E),k=q.redSub(F),C=Z.redSub(E),_=P.redMul(k),g=q.redMul(C),N=P.redMul(C),x=k.redMul(q);return this.curve.point(_,g,x,N)},T.prototype._projDbl=function(){var L=this.x.redAdd(this.y).redSqr(),E=this.x.redSqr(),F=this.y.redSqr(),Z,P,q,k,C,_;if(this.curve.twisted){k=this.curve._mulA(E);var g=k.redAdd(F);if(this.zOne)Z=L.redSub(E).redSub(F).redMul(g.redSub(this.curve.two)),P=g.redMul(k.redSub(F)),q=g.redSqr().redSub(g).redSub(g);else C=this.z.redSqr(),_=g.redSub(C).redISub(C),Z=L.redSub(E).redISub(F).redMul(_),P=g.redMul(k.redSub(F)),q=g.redMul(_)}else k=E.redAdd(F),C=this.curve._mulC(this.z).redSqr(),_=k.redSub(C).redSub(C),Z=this.curve._mulC(L.redISub(k)).redMul(_),P=this.curve._mulC(k).redMul(E.redISub(F)),q=k.redMul(_);return this.curve.point(Z,P,q)},T.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()},T.prototype._extAdd=function(L){var E=this.y.redSub(this.x).redMul(L.y.redSub(L.x)),F=this.y.redAdd(this.x).redMul(L.y.redAdd(L.x)),Z=this.t.redMul(this.curve.dd).redMul(L.t),P=this.z.redMul(L.z.redAdd(L.z)),q=F.redSub(E),k=P.redSub(Z),C=P.redAdd(Z),_=F.redAdd(E),g=q.redMul(k),N=C.redMul(_),x=q.redMul(_),w=k.redMul(C);return this.curve.point(g,N,w,x)},T.prototype._projAdd=function(L){var E=this.z.redMul(L.z),F=E.redSqr(),Z=this.x.redMul(L.x),P=this.y.redMul(L.y),q=this.curve.d.redMul(Z).redMul(P),k=F.redSub(q),C=F.redAdd(q),_=this.x.redAdd(this.y).redMul(L.x.redAdd(L.y)).redISub(Z).redISub(P),g=E.redMul(k).redMul(_),N,x;if(this.curve.twisted)N=E.redMul(C).redMul(P.redSub(this.curve._mulA(Z))),x=k.redMul(C);else N=E.redMul(C).redMul(P.redSub(Z)),x=this.curve._mulC(k).redMul(C);return this.curve.point(g,N,x)},T.prototype.add=function(L){if(this.isInfinity())return L;if(L.isInfinity())return this;if(this.curve.extended)return this._extAdd(L);else return this._projAdd(L)},T.prototype.mul=function(L){if(this._hasDoubles(L))return this.curve._fixedNafMul(this,L);else return this.curve._wnafMul(this,L)},T.prototype.mulAdd=function(L,E,F){return this.curve._wnafMulAdd(1,[this,E],[L,F],2,!1)},T.prototype.jmulAdd=function(L,E,F){return this.curve._wnafMulAdd(1,[this,E],[L,F],2,!0)},T.prototype.normalize=function(){if(this.zOne)return this;var L=this.z.redInvm();if(this.x=this.x.redMul(L),this.y=this.y.redMul(L),this.t)this.t=this.t.redMul(L);return this.z=this.curve.one,this.zOne=!0,this},T.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},T.prototype.getX=function(){return this.normalize(),this.x.fromRed()},T.prototype.getY=function(){return this.normalize(),this.y.fromRed()},T.prototype.eq=function(L){return this===L||this.getX().cmp(L.getX())===0&&this.getY().cmp(L.getY())===0},T.prototype.eqXToP=function(L){var E=L.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(E)===0)return!0;var F=L.clone(),Z=this.curve.redN.redMul(this.z);for(;;){if(F.iadd(this.curve.n),F.cmp(this.curve.p)>=0)return!1;if(E.redIAdd(Z),this.x.cmp(E)===0)return!0}},T.prototype.toP=T.prototype.normalize,T.prototype.mixedAdd=T.prototype.add}),RV=G0(($)=>{var U=$;U.base=H6(),U.short=LA(),U.mont=EA(),U.edwards=ZA()}),UU=G0(($)=>{var U=MU(),J=o$();$.inherits=J;function V(G,D){if((G.charCodeAt(D)&64512)!==55296)return!1;if(D<0||D+1>=G.length)return!1;return(G.charCodeAt(D+1)&64512)===56320}function I(G,D){if(Array.isArray(G))return G.slice();if(!G)return[];var Q=[];if(typeof G==="string"){if(!D){var W=0;for(var A=0;A<G.length;A++){var H=G.charCodeAt(A);if(H<128)Q[W++]=H;else if(H<2048)Q[W++]=H>>6|192,Q[W++]=H&63|128;else if(V(G,A))H=65536+((H&1023)<<10)+(G.charCodeAt(++A)&1023),Q[W++]=H>>18|240,Q[W++]=H>>12&63|128,Q[W++]=H>>6&63|128,Q[W++]=H&63|128;else Q[W++]=H>>12|224,Q[W++]=H>>6&63|128,Q[W++]=H&63|128}}else if(D==="hex"){if(G=G.replace(/[^a-z0-9]+/ig,""),G.length%2!==0)G="0"+G;for(A=0;A<G.length;A+=2)Q.push(parseInt(G[A]+G[A+1],16))}}else for(A=0;A<G.length;A++)Q[A]=G[A]|0;return Q}$.toArray=I;function S(G){var D="";for(var Q=0;Q<G.length;Q++)D+=T(G[Q].toString(16));return D}$.toHex=S;function Y(G){var D=G>>>24|G>>>8&65280|G<<8&16711680|(G&255)<<24;return D>>>0}$.htonl=Y;function M(G,D){var Q="";for(var W=0;W<G.length;W++){var A=G[W];if(D==="little")A=Y(A);Q+=L(A.toString(16))}return Q}$.toHex32=M;function T(G){if(G.length===1)return"0"+G;else return G}$.zero2=T;function L(G){if(G.length===7)return"0"+G;else if(G.length===6)return"00"+G;else if(G.length===5)return"000"+G;else if(G.length===4)return"0000"+G;else if(G.length===3)return"00000"+G;else if(G.length===2)return"000000"+G;else if(G.length===1)return"0000000"+G;else return G}$.zero8=L;function E(G,D,Q,W){var A=Q-D;U(A%4===0);var H=Array(A/4);for(var z=0,X=D;z<H.length;z++,X+=4){var K;if(W==="big")K=G[X]<<24|G[X+1]<<16|G[X+2]<<8|G[X+3];else K=G[X+3]<<24|G[X+2]<<16|G[X+1]<<8|G[X];H[z]=K>>>0}return H}$.join32=E;function F(G,D){var Q=Array(G.length*4);for(var W=0,A=0;W<G.length;W++,A+=4){var H=G[W];if(D==="big")Q[A]=H>>>24,Q[A+1]=H>>>16&255,Q[A+2]=H>>>8&255,Q[A+3]=H&255;else Q[A+3]=H>>>24,Q[A+2]=H>>>16&255,Q[A+1]=H>>>8&255,Q[A]=H&255}return Q}$.split32=F;function Z(G,D){return G>>>D|G<<32-D}$.rotr32=Z;function P(G,D){return G<<D|G>>>32-D}$.rotl32=P;function q(G,D){return G+D>>>0}$.sum32=q;function k(G,D,Q){return G+D+Q>>>0}$.sum32_3=k;function C(G,D,Q,W){return G+D+Q+W>>>0}$.sum32_4=C;function _(G,D,Q,W,A){return G+D+Q+W+A>>>0}$.sum32_5=_;function g(G,D,Q,W){var A=G[D],H=G[D+1],z=W+H>>>0,X=(z<W?1:0)+Q+A;G[D]=X>>>0,G[D+1]=z}$.sum64=g;function N(G,D,Q,W){var A=D+W>>>0,H=(A<D?1:0)+G+Q;return H>>>0}$.sum64_hi=N;function x(G,D,Q,W){var A=D+W;return A>>>0}$.sum64_lo=x;function w(G,D,Q,W,A,H,z,X){var K=0,R=D;R=R+W>>>0,K+=R<D?1:0,R=R+H>>>0,K+=R<H?1:0,R=R+X>>>0,K+=R<X?1:0;var v=G+Q+A+z+K;return v>>>0}$.sum64_4_hi=w;function o(G,D,Q,W,A,H,z,X){var K=D+W+H+X;return K>>>0}$.sum64_4_lo=o;function Q0(G,D,Q,W,A,H,z,X,K,R){var v=0,j=D;j=j+W>>>0,v+=j<D?1:0,j=j+H>>>0,v+=j<H?1:0,j=j+X>>>0,v+=j<X?1:0,j=j+R>>>0,v+=j<R?1:0;var c=G+Q+A+z+K+v;return c>>>0}$.sum64_5_hi=Q0;function V0(G,D,Q,W,A,H,z,X,K,R){var v=D+W+H+X+R;return v>>>0}$.sum64_5_lo=V0;function Y0(G,D,Q){var W=D<<32-Q|G>>>Q;return W>>>0}$.rotr64_hi=Y0;function p(G,D,Q){var W=G<<32-Q|D>>>Q;return W>>>0}$.rotr64_lo=p;function U0(G,D,Q){return G>>>Q}$.shr64_hi=U0;function O(G,D,Q){var W=G<<32-Q|D>>>Q;return W>>>0}$.shr64_lo=O}),tI=G0(($)=>{var U=UU(),J=MU();function V(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}$.BlockHash=V,V.prototype.update=function(I,S){if(I=U.toArray(I,S),!this.pending)this.pending=I;else this.pending=this.pending.concat(I);if(this.pendingTotal+=I.length,this.pending.length>=this._delta8){I=this.pending;var Y=I.length%this._delta8;if(this.pending=I.slice(I.length-Y,I.length),this.pending.length===0)this.pending=null;I=U.join32(I,0,I.length-Y,this.endian);for(var M=0;M<I.length;M+=this._delta32)this._update(I,M,M+this._delta32)}return this},V.prototype.digest=function(I){return this.update(this._pad()),J(this.pending===null),this._digest(I)},V.prototype._pad=function(){var I=this.pendingTotal,S=this._delta8,Y=S-(I+this.padLength)%S,M=Array(Y+this.padLength);M[0]=128;for(var T=1;T<Y;T++)M[T]=0;if(I<<=3,this.endian==="big"){for(var L=8;L<this.padLength;L++)M[T++]=0;M[T++]=0,M[T++]=0,M[T++]=0,M[T++]=0,M[T++]=I>>>24&255,M[T++]=I>>>16&255,M[T++]=I>>>8&255,M[T++]=I&255}else{M[T++]=I&255,M[T++]=I>>>8&255,M[T++]=I>>>16&255,M[T++]=I>>>24&255,M[T++]=0,M[T++]=0,M[T++]=0,M[T++]=0;for(L=8;L<this.padLength;L++)M[T++]=0}return M}}),CV=G0(($)=>{var U=UU(),J=U.rotr32;function V(F,Z,P,q){if(F===0)return I(Z,P,q);if(F===1||F===3)return Y(Z,P,q);if(F===2)return S(Z,P,q)}$.ft_1=V;function I(F,Z,P){return F&Z^~F&P}$.ch32=I;function S(F,Z,P){return F&Z^F&P^Z&P}$.maj32=S;function Y(F,Z,P){return F^Z^P}$.p32=Y;function M(F){return J(F,2)^J(F,13)^J(F,22)}$.s0_256=M;function T(F){return J(F,6)^J(F,11)^J(F,25)}$.s1_256=T;function L(F){return J(F,7)^J(F,18)^F>>>3}$.g0_256=L;function E(F){return J(F,17)^J(F,19)^F>>>10}$.g1_256=E}),vA=G0(($,U)=>{var J=UU(),V=tI(),I=CV(),S=J.rotl32,Y=J.sum32,M=J.sum32_5,T=I.ft_1,L=V.BlockHash,E=[1518500249,1859775393,2400959708,3395469782];function F(){if(!(this instanceof F))return new F;L.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}J.inherits(F,L),U.exports=F,F.blockSize=512,F.outSize=160,F.hmacStrength=80,F.padLength=64,F.prototype._update=function(Z,P){var q=this.W;for(var k=0;k<16;k++)q[k]=Z[P+k];for(;k<q.length;k++)q[k]=S(q[k-3]^q[k-8]^q[k-14]^q[k-16],1);var C=this.h[0],_=this.h[1],g=this.h[2],N=this.h[3],x=this.h[4];for(k=0;k<q.length;k++){var w=~~(k/20),o=M(S(C,5),T(w,_,g,N),x,q[k],E[w]);x=N,N=g,g=S(_,30),_=C,C=o}this.h[0]=Y(this.h[0],C),this.h[1]=Y(this.h[1],_),this.h[2]=Y(this.h[2],g),this.h[3]=Y(this.h[3],N),this.h[4]=Y(this.h[4],x)},F.prototype._digest=function(Z){if(Z==="hex")return J.toHex32(this.h,"big");else return J.split32(this.h,"big")}}),kV=G0(($,U)=>{var J=UU(),V=tI(),I=CV(),S=MU(),Y=J.sum32,M=J.sum32_4,T=J.sum32_5,L=I.ch32,E=I.maj32,F=I.s0_256,Z=I.s1_256,P=I.g0_256,q=I.g1_256,k=V.BlockHash,C=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function _(){if(!(this instanceof _))return new _;k.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=C,this.W=Array(64)}J.inherits(_,k),U.exports=_,_.blockSize=512,_.outSize=256,_.hmacStrength=192,_.padLength=64,_.prototype._update=function(g,N){var x=this.W;for(var w=0;w<16;w++)x[w]=g[N+w];for(;w<x.length;w++)x[w]=M(q(x[w-2]),x[w-7],P(x[w-15]),x[w-16]);var o=this.h[0],Q0=this.h[1],V0=this.h[2],Y0=this.h[3],p=this.h[4],U0=this.h[5],O=this.h[6],G=this.h[7];S(this.k.length===x.length);for(w=0;w<x.length;w++){var D=T(G,Z(p),L(p,U0,O),this.k[w],x[w]),Q=Y(F(o),E(o,Q0,V0));G=O,O=U0,U0=p,p=Y(Y0,D),Y0=V0,V0=Q0,Q0=o,o=Y(D,Q)}this.h[0]=Y(this.h[0],o),this.h[1]=Y(this.h[1],Q0),this.h[2]=Y(this.h[2],V0),this.h[3]=Y(this.h[3],Y0),this.h[4]=Y(this.h[4],p),this.h[5]=Y(this.h[5],U0),this.h[6]=Y(this.h[6],O),this.h[7]=Y(this.h[7],G)},_.prototype._digest=function(g){if(g==="hex")return J.toHex32(this.h,"big");else return J.split32(this.h,"big")}}),MA=G0(($,U)=>{var J=UU(),V=kV();function I(){if(!(this instanceof I))return new I;V.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}J.inherits(I,V),U.exports=I,I.blockSize=512,I.outSize=224,I.hmacStrength=192,I.padLength=64,I.prototype._digest=function(S){if(S==="hex")return J.toHex32(this.h.slice(0,7),"big");else return J.split32(this.h.slice(0,7),"big")}}),gV=G0(($,U)=>{var J=UU(),V=tI(),I=MU(),S=J.rotr64_hi,Y=J.rotr64_lo,M=J.shr64_hi,T=J.shr64_lo,L=J.sum64,E=J.sum64_hi,F=J.sum64_lo,Z=J.sum64_4_hi,P=J.sum64_4_lo,q=J.sum64_5_hi,k=J.sum64_5_lo,C=V.BlockHash,_=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;C.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=_,this.W=Array(160)}J.inherits(g,C),U.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function(Q,W){var A=this.W;for(var H=0;H<32;H++)A[H]=Q[W+H];for(;H<A.length;H+=2){var z=G(A[H-4],A[H-3]),X=D(A[H-4],A[H-3]),K=A[H-14],R=A[H-13],v=U0(A[H-30],A[H-29]),j=O(A[H-30],A[H-29]),c=A[H-32],h=A[H-31];A[H]=Z(z,X,K,R,v,j,c,h),A[H+1]=P(z,X,K,R,v,j,c,h)}},g.prototype._update=function(Q,W){this._prepareBlock(Q,W);var A=this.W,H=this.h[0],z=this.h[1],X=this.h[2],K=this.h[3],R=this.h[4],v=this.h[5],j=this.h[6],c=this.h[7],h=this.h[8],n=this.h[9],D0=this.h[10],i=this.h[11],l=this.h[12],X0=this.h[13],m=this.h[14],s=this.h[15];I(this.k.length===A.length);for(var h0=0;h0<A.length;h0+=2){var f=m,u=s,J0=Y0(h,n),t=p(h,n),a=N(h,n,D0,i,l,X0),M0=x(h,n,D0,i,l,X0),y=this.k[h0],r=this.k[h0+1],c0=A[h0],d=A[h0+1],I0=q(f,u,J0,t,a,M0,y,r,c0,d),b0=k(f,u,J0,t,a,M0,y,r,c0,d);f=Q0(H,z),u=V0(H,z),J0=w(H,z,X,K,R,v),t=o(H,z,X,K,R,v);var A0=E(f,u,J0,t),H0=F(f,u,J0,t);m=l,s=X0,l=D0,X0=i,D0=h,i=n,h=E(j,c,I0,b0),n=F(c,c,I0,b0),j=R,c=v,R=X,v=K,X=H,K=z,H=E(I0,b0,A0,H0),z=F(I0,b0,A0,H0)}L(this.h,0,H,z),L(this.h,2,X,K),L(this.h,4,R,v),L(this.h,6,j,c),L(this.h,8,h,n),L(this.h,10,D0,i),L(this.h,12,l,X0),L(this.h,14,m,s)},g.prototype._digest=function(Q){if(Q==="hex")return J.toHex32(this.h,"big");else return J.split32(this.h,"big")};function N(Q,W,A,H,z){var X=Q&A^~Q&z;if(X<0)X+=4294967296;return X}function x(Q,W,A,H,z,X){var K=W&H^~W&X;if(K<0)K+=4294967296;return K}function w(Q,W,A,H,z){var X=Q&A^Q&z^A&z;if(X<0)X+=4294967296;return X}function o(Q,W,A,H,z,X){var K=W&H^W&X^H&X;if(K<0)K+=4294967296;return K}function Q0(Q,W){var A=S(Q,W,28),H=S(W,Q,2),z=S(W,Q,7),X=A^H^z;if(X<0)X+=4294967296;return X}function V0(Q,W){var A=Y(Q,W,28),H=Y(W,Q,2),z=Y(W,Q,7),X=A^H^z;if(X<0)X+=4294967296;return X}function Y0(Q,W){var A=S(Q,W,14),H=S(Q,W,18),z=S(W,Q,9),X=A^H^z;if(X<0)X+=4294967296;return X}function p(Q,W){var A=Y(Q,W,14),H=Y(Q,W,18),z=Y(W,Q,9),X=A^H^z;if(X<0)X+=4294967296;return X}function U0(Q,W){var A=S(Q,W,1),H=S(Q,W,8),z=M(Q,W,7),X=A^H^z;if(X<0)X+=4294967296;return X}function O(Q,W){var A=Y(Q,W,1),H=Y(Q,W,8),z=T(Q,W,7),X=A^H^z;if(X<0)X+=4294967296;return X}function G(Q,W){var A=S(Q,W,19),H=S(W,Q,29),z=M(Q,W,6),X=A^H^z;if(X<0)X+=4294967296;return X}function D(Q,W){var A=Y(Q,W,19),H=Y(W,Q,29),z=T(Q,W,6),X=A^H^z;if(X<0)X+=4294967296;return X}}),PA=G0(($,U)=>{var J=UU(),V=gV();function I(){if(!(this instanceof I))return new I;V.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}J.inherits(I,V),U.exports=I,I.blockSize=1024,I.outSize=384,I.hmacStrength=192,I.padLength=128,I.prototype._digest=function(S){if(S==="hex")return J.toHex32(this.h.slice(0,12),"big");else return J.split32(this.h.slice(0,12),"big")}}),TA=G0(($)=>{$.sha1=vA(),$.sha224=MA(),$.sha256=kV(),$.sha384=PA(),$.sha512=gV()}),qA=G0(($)=>{var U=UU(),J=tI(),V=U.rotl32,I=U.sum32,S=U.sum32_3,Y=U.sum32_4,M=J.BlockHash;function T(){if(!(this instanceof T))return new T;M.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}U.inherits(T,M),$.ripemd160=T,T.blockSize=512,T.outSize=160,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(C,_){var g=this.h[0],N=this.h[1],x=this.h[2],w=this.h[3],o=this.h[4],Q0=g,V0=N,Y0=x,p=w,U0=o;for(var O=0;O<80;O++){var G=I(V(Y(g,L(O,N,x,w),C[Z[O]+_],E(O)),q[O]),o);g=o,o=w,w=V(x,10),x=N,N=G,G=I(V(Y(Q0,L(79-O,V0,Y0,p),C[P[O]+_],F(O)),k[O]),U0),Q0=U0,U0=p,p=V(Y0,10),Y0=V0,V0=G}G=S(this.h[1],x,p),this.h[1]=S(this.h[2],w,U0),this.h[2]=S(this.h[3],o,Q0),this.h[3]=S(this.h[4],g,V0),this.h[4]=S(this.h[0],N,Y0),this.h[0]=G},T.prototype._digest=function(C){if(C==="hex")return U.toHex32(this.h,"little");else return U.split32(this.h,"little")};function L(C,_,g,N){if(C<=15)return _^g^N;else if(C<=31)return _&g|~_&N;else if(C<=47)return(_|~g)^N;else if(C<=63)return _&N|g&~N;else return _^(g|~N)}function E(C){if(C<=15)return 0;else if(C<=31)return 1518500249;else if(C<=47)return 1859775393;else if(C<=63)return 2400959708;else return 2840853838}function F(C){if(C<=15)return 1352829926;else if(C<=31)return 1548603684;else if(C<=47)return 1836072691;else if(C<=63)return 2053994217;else return 0}var Z=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],P=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],q=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],k=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}),RA=G0(($,U)=>{var J=UU(),V=MU();function I(S,Y,M){if(!(this instanceof I))return new I(S,Y,M);this.Hash=S,this.blockSize=S.blockSize/8,this.outSize=S.outSize/8,this.inner=null,this.outer=null,this._init(J.toArray(Y,M))}U.exports=I,I.prototype._init=function(S){if(S.length>this.blockSize)S=new this.Hash().update(S).digest();V(S.length<=this.blockSize);for(var Y=S.length;Y<this.blockSize;Y++)S.push(0);for(Y=0;Y<S.length;Y++)S[Y]^=54;this.inner=new this.Hash().update(S);for(Y=0;Y<S.length;Y++)S[Y]^=106;this.outer=new this.Hash().update(S)},I.prototype.update=function(S,Y){return this.inner.update(S,Y),this},I.prototype.digest=function(S){return this.outer.update(this.inner.digest()),this.outer.digest(S)}}),xQ=G0(($)=>{var U=$;U.utils=UU(),U.common=tI(),U.sha=TA(),U.ripemd=qA(),U.hmac=RA(),U.sha1=U.sha.sha1,U.sha256=U.sha.sha256,U.sha224=U.sha.sha224,U.sha384=U.sha.sha384,U.sha512=U.sha.sha512,U.ripemd160=U.ripemd.ripemd160}),CA=G0(($,U)=>{U.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}),BQ=G0(($)=>{var U=$,J=xQ(),V=RV(),I=m$(),S=I.assert;function Y(L){if(L.type==="short")this.curve=new V.short(L);else if(L.type==="edwards")this.curve=new V.edwards(L);else this.curve=new V.mont(L);this.g=this.curve.g,this.n=this.curve.n,this.hash=L.hash,S(this.g.validate(),"Invalid curve"),S(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}U.PresetCurve=Y;function M(L,E){Object.defineProperty(U,L,{configurable:!0,enumerable:!0,get:function(){var F=new Y(E);return Object.defineProperty(U,L,{configurable:!0,enumerable:!0,value:F}),F}})}M("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:J.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),M("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:J.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),M("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:J.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),M("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:J.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),M("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:J.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),M("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:J.sha256,gRed:!1,g:["9"]}),M("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:J.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var T;try{T=CA()}catch(L){T=void 0}M("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:J.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",T]})}),kA=G0(($,U)=>{var J=xQ(),V=TV(),I=MU();function S(Y){if(!(this instanceof S))return new S(Y);this.hash=Y.hash,this.predResist=!!Y.predResist,this.outLen=this.hash.outSize,this.minEntropy=Y.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var M=V.toArray(Y.entropy,Y.entropyEnc||"hex"),T=V.toArray(Y.nonce,Y.nonceEnc||"hex"),L=V.toArray(Y.pers,Y.persEnc||"hex");I(M.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(M,T,L)}U.exports=S,S.prototype._init=function(Y,M,T){var L=Y.concat(M).concat(T);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var E=0;E<this.V.length;E++)this.K[E]=0,this.V[E]=1;this._update(L),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new J.hmac(this.hash,this.K)},S.prototype._update=function(Y){var M=this._hmac().update(this.V).update([0]);if(Y)M=M.update(Y);if(this.K=M.digest(),this.V=this._hmac().update(this.V).digest(),!Y)return;this.K=this._hmac().update(this.V).update([1]).update(Y).digest(),this.V=this._hmac().update(this.V).digest()},S.prototype.reseed=function(Y,M,T,L){if(typeof M!=="string")L=T,T=M,M=null;Y=V.toArray(Y,M),T=V.toArray(T,L),I(Y.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(Y.concat(T||[])),this._reseed=1},S.prototype.generate=function(Y,M,T,L){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");if(typeof M!=="string")L=T,T=M,M=null;if(T)T=V.toArray(T,L||"hex"),this._update(T);var E=[];while(E.length<Y)this.V=this._hmac().update(this.V).digest(),E=E.concat(this.V);var F=E.slice(0,Y);return this._update(T),this._reseed++,V.encode(F,M)}}),gA=G0(($,U)=>{var J=zU(),V=m$(),I=V.assert;function S(Y,M){if(this.ec=Y,this.priv=null,this.pub=null,M.priv)this._importPrivate(M.priv,M.privEnc);if(M.pub)this._importPublic(M.pub,M.pubEnc)}U.exports=S,S.fromPublic=function(Y,M,T){if(M instanceof S)return M;return new S(Y,{pub:M,pubEnc:T})},S.fromPrivate=function(Y,M,T){if(M instanceof S)return M;return new S(Y,{priv:M,privEnc:T})},S.prototype.validate=function(){var Y=this.getPublic();if(Y.isInfinity())return{result:!1,reason:"Invalid public key"};if(!Y.validate())return{result:!1,reason:"Public key is not a point"};if(!Y.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:"Public key * N != O"};return{result:!0,reason:null}},S.prototype.getPublic=function(Y,M){if(typeof Y==="string")M=Y,Y=null;if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!M)return this.pub;return this.pub.encode(M,Y)},S.prototype.getPrivate=function(Y){if(Y==="hex")return this.priv.toString(16,2);else return this.priv},S.prototype._importPrivate=function(Y,M){this.priv=new J(Y,M||16),this.priv=this.priv.umod(this.ec.curve.n)},S.prototype._importPublic=function(Y,M){if(Y.x||Y.y){if(this.ec.curve.type==="mont")I(Y.x,"Need x coordinate");else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")I(Y.x&&Y.y,"Need both x and y coordinate");this.pub=this.ec.curve.point(Y.x,Y.y);return}this.pub=this.ec.curve.decodePoint(Y,M)},S.prototype.derive=function(Y){if(!Y.validate())I(Y.validate(),"public point not validated");return Y.mul(this.priv).getX()},S.prototype.sign=function(Y,M,T){return this.ec.sign(Y,this,M,T)},S.prototype.verify=function(Y,M,T){return this.ec.verify(Y,M,this,void 0,T)},S.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),jA=G0(($,U)=>{var J=zU(),V=m$(),I=V.assert;function S(E,F){if(E instanceof S)return E;if(this._importDER(E,F))return;if(I(E.r&&E.s,"Signature without r or s"),this.r=new J(E.r,16),this.s=new J(E.s,16),E.recoveryParam===void 0)this.recoveryParam=null;else this.recoveryParam=E.recoveryParam}U.exports=S;function Y(){this.place=0}function M(E,F){var Z=E[F.place++];if(!(Z&128))return Z;var P=Z&15;if(P===0||P>4)return!1;if(E[F.place]===0)return!1;var q=0;for(var k=0,C=F.place;k<P;k++,C++)q<<=8,q|=E[C],q>>>=0;if(q<=127)return!1;return F.place=C,q}function T(E){var F=0,Z=E.length-1;while(!E[F]&&!(E[F+1]&128)&&F<Z)F++;if(F===0)return E;return E.slice(F)}S.prototype._importDER=function(E,F){E=V.toArray(E,F);var Z=new Y;if(E[Z.place++]!==48)return!1;var P=M(E,Z);if(P===!1)return!1;if(P+Z.place!==E.length)return!1;if(E[Z.place++]!==2)return!1;var q=M(E,Z);if(q===!1)return!1;if((E[Z.place]&128)!==0)return!1;var k=E.slice(Z.place,q+Z.place);if(Z.place+=q,E[Z.place++]!==2)return!1;var C=M(E,Z);if(C===!1)return!1;if(E.length!==C+Z.place)return!1;if((E[Z.place]&128)!==0)return!1;var _=E.slice(Z.place,C+Z.place);if(k[0]===0)if(k[1]&128)k=k.slice(1);else return!1;if(_[0]===0)if(_[1]&128)_=_.slice(1);else return!1;return this.r=new J(k),this.s=new J(_),this.recoveryParam=null,!0};function L(E,F){if(F<128){E.push(F);return}var Z=1+(Math.log(F)/Math.LN2>>>3);E.push(Z|128);while(--Z)E.push(F>>>(Z<<3)&255);E.push(F)}S.prototype.toDER=function(E){var F=this.r.toArray(),Z=this.s.toArray();if(F[0]&128)F=[0].concat(F);if(Z[0]&128)Z=[0].concat(Z);F=T(F),Z=T(Z);while(!Z[0]&&!(Z[1]&128))Z=Z.slice(1);var P=[2];L(P,F.length),P=P.concat(F),P.push(2),L(P,Z.length);var q=P.concat(Z),k=[48];return L(k,q.length),k=k.concat(q),V.encode(k,E)}}),_A=G0(($,U)=>{var J=zU(),V=kA(),I=m$(),S=BQ(),Y=qV(),M=I.assert,T=gA(),L=jA();function E(F){if(!(this instanceof E))return new E(F);if(typeof F==="string")M(Object.prototype.hasOwnProperty.call(S,F),"Unknown curve "+F),F=S[F];if(F instanceof S.PresetCurve)F={curve:F};this.curve=F.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=F.curve.g,this.g.precompute(F.curve.n.bitLength()+1),this.hash=F.hash||F.curve.hash}U.exports=E,E.prototype.keyPair=function(F){return new T(this,F)},E.prototype.keyFromPrivate=function(F,Z){return T.fromPrivate(this,F,Z)},E.prototype.keyFromPublic=function(F,Z){return T.fromPublic(this,F,Z)},E.prototype.genKeyPair=function(F){if(!F)F={};var Z=new V({hash:this.hash,pers:F.pers,persEnc:F.persEnc||"utf8",entropy:F.entropy||Y(this.hash.hmacStrength),entropyEnc:F.entropy&&F.entropyEnc||"utf8",nonce:this.n.toArray()}),P=this.n.byteLength(),q=this.n.sub(new J(2));for(;;){var k=new J(Z.generate(P));if(k.cmp(q)>0)continue;return k.iaddn(1),this.keyFromPrivate(k)}},E.prototype._truncateToN=function(F,Z,P){var q;if(J.isBN(F)||typeof F==="number")F=new J(F,16),q=F.byteLength();else if(typeof F==="object")q=F.length,F=new J(F,16);else{var k=F.toString();q=k.length+1>>>1,F=new J(k,16)}if(typeof P!=="number")P=q*8;var C=P-this.n.bitLength();if(C>0)F=F.ushrn(C);if(!Z&&F.cmp(this.n)>=0)return F.sub(this.n);else return F},E.prototype.sign=function(F,Z,P,q){if(typeof P==="object")q=P,P=null;if(!q)q={};if(typeof F!=="string"&&typeof F!=="number"&&!J.isBN(F)){M(typeof F==="object"&&F&&typeof F.length==="number","Expected message to be an array-like, a hex string, or a BN instance"),M(F.length>>>0===F.length);for(var k=0;k<F.length;k++)M((F[k]&255)===F[k])}Z=this.keyFromPrivate(Z,P),F=this._truncateToN(F,!1,q.msgBitLength),M(!F.isNeg(),"Can not sign a negative message");var C=this.n.byteLength(),_=Z.getPrivate().toArray("be",C),g=F.toArray("be",C);M(new J(g).eq(F),"Can not sign message");var N=new V({hash:this.hash,entropy:_,nonce:g,pers:q.pers,persEnc:q.persEnc||"utf8"}),x=this.n.sub(new J(1));for(var w=0;;w++){var o=q.k?q.k(w):new J(N.generate(this.n.byteLength()));if(o=this._truncateToN(o,!0),o.cmpn(1)<=0||o.cmp(x)>=0)continue;var Q0=this.g.mul(o);if(Q0.isInfinity())continue;var V0=Q0.getX(),Y0=V0.umod(this.n);if(Y0.cmpn(0)===0)continue;var p=o.invm(this.n).mul(Y0.mul(Z.getPrivate()).iadd(F));if(p=p.umod(this.n),p.cmpn(0)===0)continue;var U0=(Q0.getY().isOdd()?1:0)|(V0.cmp(Y0)!==0?2:0);if(q.canonical&&p.cmp(this.nh)>0)p=this.n.sub(p),U0^=1;return new L({r:Y0,s:p,recoveryParam:U0})}},E.prototype.verify=function(F,Z,P,q,k){if(!k)k={};F=this._truncateToN(F,!1,k.msgBitLength),P=this.keyFromPublic(P,q),Z=new L(Z,"hex");var{r:C,s:_}=Z;if(C.cmpn(1)<0||C.cmp(this.n)>=0)return!1;if(_.cmpn(1)<0||_.cmp(this.n)>=0)return!1;var g=_.invm(this.n),N=g.mul(F).umod(this.n),x=g.mul(C).umod(this.n),w;if(!this.curve._maxwellTrick){if(w=this.g.mulAdd(N,P.getPublic(),x),w.isInfinity())return!1;return w.getX().umod(this.n).cmp(C)===0}if(w=this.g.jmulAdd(N,P.getPublic(),x),w.isInfinity())return!1;return w.eqXToP(C)},E.prototype.recoverPubKey=function(F,Z,P,q){M((3&P)===P,"The recovery param is more than two bits"),Z=new L(Z,q);var k=this.n,C=new J(F),_=Z.r,g=Z.s,N=P&1,x=P>>1;if(_.cmp(this.curve.p.umod(this.curve.n))>=0&&x)throw Error("Unable to find sencond key candinate");if(x)_=this.curve.pointFromX(_.add(this.curve.n),N);else _=this.curve.pointFromX(_,N);var w=Z.r.invm(k),o=k.sub(C).mul(w).umod(k),Q0=g.mul(w).umod(k);return this.g.mulAdd(o,_,Q0)},E.prototype.getKeyRecoveryParam=function(F,Z,P,q){if(Z=new L(Z,q),Z.recoveryParam!==null)return Z.recoveryParam;for(var k=0;k<4;k++){var C;try{C=this.recoverPubKey(F,Z,k)}catch(_){continue}if(C.eq(P))return k}throw Error("Unable to find valid recovery factor")}}),NA=G0(($,U)=>{var J=m$(),V=J.assert,I=J.parseBytes,S=J.cachedProperty;function Y(M,T){if(this.eddsa=M,this._secret=I(T.secret),M.isPoint(T.pub))this._pub=T.pub;else this._pubBytes=I(T.pub)}Y.fromPublic=function(M,T){if(T instanceof Y)return T;return new Y(M,{pub:T})},Y.fromSecret=function(M,T){if(T instanceof Y)return T;return new Y(M,{secret:T})},Y.prototype.secret=function(){return this._secret},S(Y,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),S(Y,"pub",function(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())}),S(Y,"privBytes",function(){var M=this.eddsa,T=this.hash(),L=M.encodingLength-1,E=T.slice(0,M.encodingLength);return E[0]&=248,E[L]&=127,E[L]|=64,E}),S(Y,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),S(Y,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),S(Y,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),Y.prototype.sign=function(M){return V(this._secret,"KeyPair can only verify"),this.eddsa.sign(M,this)},Y.prototype.verify=function(M,T){return this.eddsa.verify(M,T,this)},Y.prototype.getSecret=function(M){return V(this._secret,"KeyPair is public only"),J.encode(this.secret(),M)},Y.prototype.getPublic=function(M){return J.encode(this.pubBytes(),M)},U.exports=Y}),xA=G0(($,U)=>{var J=zU(),V=m$(),I=V.assert,S=V.cachedProperty,Y=V.parseBytes;function M(T,L){if(this.eddsa=T,typeof L!=="object")L=Y(L);if(Array.isArray(L))I(L.length===T.encodingLength*2,"Signature has invalid size"),L={R:L.slice(0,T.encodingLength),S:L.slice(T.encodingLength)};if(I(L.R&&L.S,"Signature without R or S"),T.isPoint(L.R))this._R=L.R;if(L.S instanceof J)this._S=L.S;this._Rencoded=Array.isArray(L.R)?L.R:L.Rencoded,this._Sencoded=Array.isArray(L.S)?L.S:L.Sencoded}S(M,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),S(M,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),S(M,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),S(M,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),M.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},M.prototype.toHex=function(){return V.encode(this.toBytes(),"hex").toUpperCase()},U.exports=M}),BA=G0(($,U)=>{var J=xQ(),V=BQ(),I=m$(),S=I.assert,Y=I.parseBytes,M=NA(),T=xA();function L(E){if(S(E==="ed25519","only tested with ed25519 so far"),!(this instanceof L))return new L(E);E=V[E].curve,this.curve=E,this.g=E.g,this.g.precompute(E.n.bitLength()+1),this.pointClass=E.point().constructor,this.encodingLength=Math.ceil(E.n.bitLength()/8),this.hash=J.sha512}U.exports=L,L.prototype.sign=function(E,F){E=Y(E);var Z=this.keyFromSecret(F),P=this.hashInt(Z.messagePrefix(),E),q=this.g.mul(P),k=this.encodePoint(q),C=this.hashInt(k,Z.pubBytes(),E).mul(Z.priv()),_=P.add(C).umod(this.curve.n);return this.makeSignature({R:q,S:_,Rencoded:k})},L.prototype.verify=function(E,F,Z){if(E=Y(E),F=this.makeSignature(F),F.S().gte(F.eddsa.curve.n)||F.S().isNeg())return!1;var P=this.keyFromPublic(Z),q=this.hashInt(F.Rencoded(),P.pubBytes(),E),k=this.g.mul(F.S()),C=F.R().add(P.pub().mul(q));return C.eq(k)},L.prototype.hashInt=function(){var E=this.hash();for(var F=0;F<arguments.length;F++)E.update(arguments[F]);return I.intFromLE(E.digest()).umod(this.curve.n)},L.prototype.keyFromPublic=function(E){return M.fromPublic(this,E)},L.prototype.keyFromSecret=function(E){return M.fromSecret(this,E)},L.prototype.makeSignature=function(E){if(E instanceof T)return E;return new T(this,E)},L.prototype.encodePoint=function(E){var F=E.getY().toArray("le",this.encodingLength);return F[this.encodingLength-1]|=E.getX().isOdd()?128:0,F},L.prototype.decodePoint=function(E){E=I.parseBytes(E);var F=E.length-1,Z=E.slice(0,F).concat(E[F]&-129),P=(E[F]&128)!==0,q=I.intFromLE(Z);return this.curve.pointFromY(q,P)},L.prototype.encodeInt=function(E){return E.toArray("le",this.encodingLength)},L.prototype.decodeInt=function(E){return I.intFromLE(E)},L.prototype.isPoint=function(E){return E instanceof this.pointClass}}),cA=G0(($)=>{var U=$;U.version=HA().version,U.utils=m$(),U.rand=qV(),U.curve=RV(),U.curves=BQ(),U.ec=_A(),U.eddsa=BA()}),wA=G0(($,U)=>{(function(J,V){function I(O,G){if(!O)throw Error(G||"Assertion failed")}function S(O,G){O.super_=G;var D=function(){};D.prototype=G.prototype,O.prototype=new D,O.prototype.constructor=O}function Y(O,G,D){if(Y.isBN(O))return O;if(this.negative=0,this.words=null,this.length=0,this.red=null,O!==null){if(G==="le"||G==="be")D=G,G=10;this._init(O||0,G||10,D||"be")}}if(typeof J==="object")J.exports=Y;else V.BN=Y;Y.BN=Y,Y.wordSize=26;var M;try{if(typeof window<"u"&&typeof window.Buffer<"u")M=window.Buffer;else M=(g$(),d0(k$)).Buffer}catch(O){}Y.isBN=function(O){if(O instanceof Y)return!0;return O!==null&&typeof O==="object"&&O.constructor.wordSize===Y.wordSize&&Array.isArray(O.words)},Y.max=function(O,G){if(O.cmp(G)>0)return O;return G},Y.min=function(O,G){if(O.cmp(G)<0)return O;return G},Y.prototype._init=function(O,G,D){if(typeof O==="number")return this._initNumber(O,G,D);if(typeof O==="object")return this._initArray(O,G,D);if(G==="hex")G=16;I(G===(G|0)&&G>=2&&G<=36),O=O.toString().replace(/\s+/g,"");var Q=0;if(O[0]==="-")Q++,this.negative=1;if(Q<O.length){if(G===16)this._parseHex(O,Q,D);else if(this._parseBase(O,G,Q),D==="le")this._initArray(this.toArray(),G,D)}},Y.prototype._initNumber=function(O,G,D){if(O<0)this.negative=1,O=-O;if(O<67108864)this.words=[O&67108863],this.length=1;else if(O<4503599627370496)this.words=[O&67108863,O/67108864&67108863],this.length=2;else I(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3;if(D!=="le")return;this._initArray(this.toArray(),G,D)},Y.prototype._initArray=function(O,G,D){if(I(typeof O.length==="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W,A,H=0;if(D==="be"){for(Q=O.length-1,W=0;Q>=0;Q-=3)if(A=O[Q]|O[Q-1]<<8|O[Q-2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}else if(D==="le"){for(Q=0,W=0;Q<O.length;Q+=3)if(A=O[Q]|O[Q+1]<<8|O[Q+2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}return this.strip()};function T(O,G){var D=O.charCodeAt(G);if(D>=65&&D<=70)return D-55;else if(D>=97&&D<=102)return D-87;else return D-48&15}function L(O,G,D){var Q=T(O,D);if(D-1>=G)Q|=T(O,D-1)<<4;return Q}Y.prototype._parseHex=function(O,G,D){this.length=Math.ceil((O.length-G)/6),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W=0,A=0,H;if(D==="be")for(Q=O.length-1;Q>=G;Q-=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8;else{var z=O.length-G;for(Q=z%2===0?G+1:G;Q<O.length;Q+=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8}this.strip()};function E(O,G,D,Q){var W=0,A=Math.min(O.length,D);for(var H=G;H<A;H++){var z=O.charCodeAt(H)-48;if(W*=Q,z>=49)W+=z-49+10;else if(z>=17)W+=z-17+10;else W+=z}return W}Y.prototype._parseBase=function(O,G,D){this.words=[0],this.length=1;for(var Q=0,W=1;W<=67108863;W*=G)Q++;Q--,W=W/G|0;var A=O.length-D,H=A%Q,z=Math.min(A,A-H)+D,X=0;for(var K=D;K<z;K+=Q)if(X=E(O,K,K+Q,G),this.imuln(W),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(H!==0){var R=1;X=E(O,K,O.length,G);for(K=0;K<H;K++)R*=G;if(this.imuln(R),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},Y.prototype.copy=function(O){O.words=Array(this.length);for(var G=0;G<this.length;G++)O.words[G]=this.words[G];O.length=this.length,O.negative=this.negative,O.red=this.red},Y.prototype.clone=function(){var O=new Y(null);return this.copy(O),O},Y.prototype._expand=function(O){while(this.length<O)this.words[this.length++]=0;return this},Y.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},Y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Z=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(O,G){O=O||10,G=G|0||1;var D;if(O===16||O==="hex"){D="";var Q=0,W=0;for(var A=0;A<this.length;A++){var H=this.words[A],z=((H<<Q|W)&16777215).toString(16);if(W=H>>>24-Q&16777215,Q+=2,Q>=26)Q-=26,A--;if(W!==0||A!==this.length-1)D=F[6-z.length]+z+D;else D=z+D}if(W!==0)D=W.toString(16)+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}if(O===(O|0)&&O>=2&&O<=36){var X=Z[O],K=P[O];D="";var R=this.clone();R.negative=0;while(!R.isZero()){var v=R.modn(K).toString(O);if(R=R.idivn(K),!R.isZero())D=F[X-v.length]+v+D;else D=v+D}if(this.isZero())D="0"+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}I(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var O=this.words[0];if(this.length===2)O+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)O+=4503599627370496+this.words[1]*67108864;else if(this.length>2)I(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-O:O},Y.prototype.toJSON=function(){return this.toString(16)},Y.prototype.toBuffer=function(O,G){return I(typeof M<"u"),this.toArrayLike(M,O,G)},Y.prototype.toArray=function(O,G){return this.toArrayLike(Array,O,G)},Y.prototype.toArrayLike=function(O,G,D){var Q=this.byteLength(),W=D||Math.max(1,Q);I(Q<=W,"byte array longer than desired length"),I(W>0,"Requested array length <= 0"),this.strip();var A=G==="le",H=new O(W),z,X,K=this.clone();if(!A){for(X=0;X<W-Q;X++)H[X]=0;for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[W-X-1]=z}else{for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[X]=z;for(;X<W;X++)H[X]=0}return H},Math.clz32)Y.prototype._countBits=function(O){return 32-Math.clz32(O)};else Y.prototype._countBits=function(O){var G=O,D=0;if(G>=4096)D+=13,G>>>=13;if(G>=64)D+=7,G>>>=7;if(G>=8)D+=4,G>>>=4;if(G>=2)D+=2,G>>>=2;return D+G};Y.prototype._zeroBits=function(O){if(O===0)return 26;var G=O,D=0;if((G&8191)===0)D+=13,G>>>=13;if((G&127)===0)D+=7,G>>>=7;if((G&15)===0)D+=4,G>>>=4;if((G&3)===0)D+=2,G>>>=2;if((G&1)===0)D++;return D},Y.prototype.bitLength=function(){var O=this.words[this.length-1],G=this._countBits(O);return(this.length-1)*26+G};function q(O){var G=Array(O.bitLength());for(var D=0;D<G.length;D++){var Q=D/26|0,W=D%26;G[D]=(O.words[Q]&1<<W)>>>W}return G}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var O=0;for(var G=0;G<this.length;G++){var D=this._zeroBits(this.words[G]);if(O+=D,D!==26)break}return O},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(O){if(this.negative!==0)return this.abs().inotn(O).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(O){if(this.testn(O-1))return this.notn(O).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(O){while(this.length<O.length)this.words[this.length++]=0;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]|O.words[G];return this.strip()},Y.prototype.ior=function(O){return I((this.negative|O.negative)===0),this.iuor(O)},Y.prototype.or=function(O){if(this.length>O.length)return this.clone().ior(O);return O.clone().ior(this)},Y.prototype.uor=function(O){if(this.length>O.length)return this.clone().iuor(O);return O.clone().iuor(this)},Y.prototype.iuand=function(O){var G;if(this.length>O.length)G=O;else G=this;for(var D=0;D<G.length;D++)this.words[D]=this.words[D]&O.words[D];return this.length=G.length,this.strip()},Y.prototype.iand=function(O){return I((this.negative|O.negative)===0),this.iuand(O)},Y.prototype.and=function(O){if(this.length>O.length)return this.clone().iand(O);return O.clone().iand(this)},Y.prototype.uand=function(O){if(this.length>O.length)return this.clone().iuand(O);return O.clone().iuand(this)},Y.prototype.iuxor=function(O){var G,D;if(this.length>O.length)G=this,D=O;else G=O,D=this;for(var Q=0;Q<D.length;Q++)this.words[Q]=G.words[Q]^D.words[Q];if(this!==G)for(;Q<G.length;Q++)this.words[Q]=G.words[Q];return this.length=G.length,this.strip()},Y.prototype.ixor=function(O){return I((this.negative|O.negative)===0),this.iuxor(O)},Y.prototype.xor=function(O){if(this.length>O.length)return this.clone().ixor(O);return O.clone().ixor(this)},Y.prototype.uxor=function(O){if(this.length>O.length)return this.clone().iuxor(O);return O.clone().iuxor(this)},Y.prototype.inotn=function(O){I(typeof O==="number"&&O>=0);var G=Math.ceil(O/26)|0,D=O%26;if(this._expand(G),D>0)G--;for(var Q=0;Q<G;Q++)this.words[Q]=~this.words[Q]&67108863;if(D>0)this.words[Q]=~this.words[Q]&67108863>>26-D;return this.strip()},Y.prototype.notn=function(O){return this.clone().inotn(O)},Y.prototype.setn=function(O,G){I(typeof O==="number"&&O>=0);var D=O/26|0,Q=O%26;if(this._expand(D+1),G)this.words[D]=this.words[D]|1<<Q;else this.words[D]=this.words[D]&~(1<<Q);return this.strip()},Y.prototype.iadd=function(O){var G;if(this.negative!==0&&O.negative===0)return this.negative=0,G=this.isub(O),this.negative^=1,this._normSign();else if(this.negative===0&&O.negative!==0)return O.negative=0,G=this.isub(O),O.negative=1,G._normSign();var D,Q;if(this.length>O.length)D=this,Q=O;else D=O,Q=this;var W=0;for(var A=0;A<Q.length;A++)G=(D.words[A]|0)+(Q.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;for(;W!==0&&A<D.length;A++)G=(D.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;if(this.length=D.length,W!==0)this.words[this.length]=W,this.length++;else if(D!==this)for(;A<D.length;A++)this.words[A]=D.words[A];return this},Y.prototype.add=function(O){var G;if(O.negative!==0&&this.negative===0)return O.negative=0,G=this.sub(O),O.negative^=1,G;else if(O.negative===0&&this.negative!==0)return this.negative=0,G=O.sub(this),this.negative=1,G;if(this.length>O.length)return this.clone().iadd(O);return O.clone().iadd(this)},Y.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var G=this.iadd(O);return O.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var D=this.cmp(O);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,W;if(D>0)Q=this,W=O;else Q=O,W=this;var A=0;for(var H=0;H<W.length;H++)G=(Q.words[H]|0)-(W.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;for(;A!==0&&H<Q.length;H++)G=(Q.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;if(A===0&&H<Q.length&&Q!==this)for(;H<Q.length;H++)this.words[H]=Q.words[H];if(this.length=Math.max(this.length,H),Q!==this)this.negative=1;return this.strip()},Y.prototype.sub=function(O){return this.clone().isub(O)};function k(O,G,D){D.negative=G.negative^O.negative;var Q=O.length+G.length|0;D.length=Q,Q=Q-1|0;var W=O.words[0]|0,A=G.words[0]|0,H=W*A,z=H&67108863,X=H/67108864|0;D.words[0]=z;for(var K=1;K<Q;K++){var R=X>>>26,v=X&67108863,j=Math.min(K,G.length-1);for(var c=Math.max(0,K-O.length+1);c<=j;c++){var h=K-c|0;W=O.words[h]|0,A=G.words[c]|0,H=W*A+v,R+=H/67108864|0,v=H&67108863}D.words[K]=v|0,X=R|0}if(X!==0)D.words[K]=X|0;else D.length--;return D.strip()}var C=function(O,G,D){var Q=O.words,W=G.words,A=D.words,H=0,z,X,K,R=Q[0]|0,v=R&8191,j=R>>>13,c=Q[1]|0,h=c&8191,n=c>>>13,D0=Q[2]|0,i=D0&8191,l=D0>>>13,X0=Q[3]|0,m=X0&8191,s=X0>>>13,h0=Q[4]|0,f=h0&8191,u=h0>>>13,J0=Q[5]|0,t=J0&8191,a=J0>>>13,M0=Q[6]|0,y=M0&8191,r=M0>>>13,c0=Q[7]|0,d=c0&8191,I0=c0>>>13,b0=Q[8]|0,A0=b0&8191,H0=b0>>>13,X$=Q[9]|0,z0=X$&8191,F0=X$>>>13,Y$=W[0]|0,Z0=Y$&8191,E0=Y$>>>13,N$=W[1]|0,P0=N$&8191,g0=N$>>>13,x$=W[2]|0,j0=x$&8191,T0=x$>>>13,j$=W[3]|0,_0=j$&8191,q0=j$>>>13,q$=W[4]|0,N0=q$&8191,x0=q$>>>13,R$=W[5]|0,R0=R$&8191,B=R$>>>13,b=W[6]|0,e=b&8191,$0=b>>>13,u0=W[7]|0,K0=u0&8191,L0=u0>>>13,J$=W[8]|0,C0=J$&8191,B0=J$>>>13,_$=W[9]|0,k0=_$&8191,v0=_$>>>13;D.negative=O.negative^G.negative,D.length=19,z=Math.imul(v,Z0),X=Math.imul(v,E0),X=X+Math.imul(j,Z0)|0,K=Math.imul(j,E0);var Q$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,z=Math.imul(h,Z0),X=Math.imul(h,E0),X=X+Math.imul(n,Z0)|0,K=Math.imul(n,E0),z=z+Math.imul(v,P0)|0,X=X+Math.imul(v,g0)|0,X=X+Math.imul(j,P0)|0,K=K+Math.imul(j,g0)|0;var r0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,z=Math.imul(i,Z0),X=Math.imul(i,E0),X=X+Math.imul(l,Z0)|0,K=Math.imul(l,E0),z=z+Math.imul(h,P0)|0,X=X+Math.imul(h,g0)|0,X=X+Math.imul(n,P0)|0,K=K+Math.imul(n,g0)|0,z=z+Math.imul(v,j0)|0,X=X+Math.imul(v,T0)|0,X=X+Math.imul(j,j0)|0,K=K+Math.imul(j,T0)|0;var o0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(o0>>>26)|0,o0&=67108863,z=Math.imul(m,Z0),X=Math.imul(m,E0),X=X+Math.imul(s,Z0)|0,K=Math.imul(s,E0),z=z+Math.imul(i,P0)|0,X=X+Math.imul(i,g0)|0,X=X+Math.imul(l,P0)|0,K=K+Math.imul(l,g0)|0,z=z+Math.imul(h,j0)|0,X=X+Math.imul(h,T0)|0,X=X+Math.imul(n,j0)|0,K=K+Math.imul(n,T0)|0,z=z+Math.imul(v,_0)|0,X=X+Math.imul(v,q0)|0,X=X+Math.imul(j,_0)|0,K=K+Math.imul(j,q0)|0;var a0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,z=Math.imul(f,Z0),X=Math.imul(f,E0),X=X+Math.imul(u,Z0)|0,K=Math.imul(u,E0),z=z+Math.imul(m,P0)|0,X=X+Math.imul(m,g0)|0,X=X+Math.imul(s,P0)|0,K=K+Math.imul(s,g0)|0,z=z+Math.imul(i,j0)|0,X=X+Math.imul(i,T0)|0,X=X+Math.imul(l,j0)|0,K=K+Math.imul(l,T0)|0,z=z+Math.imul(h,_0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(n,_0)|0,K=K+Math.imul(n,q0)|0,z=z+Math.imul(v,N0)|0,X=X+Math.imul(v,x0)|0,X=X+Math.imul(j,N0)|0,K=K+Math.imul(j,x0)|0;var e0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,z=Math.imul(t,Z0),X=Math.imul(t,E0),X=X+Math.imul(a,Z0)|0,K=Math.imul(a,E0),z=z+Math.imul(f,P0)|0,X=X+Math.imul(f,g0)|0,X=X+Math.imul(u,P0)|0,K=K+Math.imul(u,g0)|0,z=z+Math.imul(m,j0)|0,X=X+Math.imul(m,T0)|0,X=X+Math.imul(s,j0)|0,K=K+Math.imul(s,T0)|0,z=z+Math.imul(i,_0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(l,_0)|0,K=K+Math.imul(l,q0)|0,z=z+Math.imul(h,N0)|0,X=X+Math.imul(h,x0)|0,X=X+Math.imul(n,N0)|0,K=K+Math.imul(n,x0)|0,z=z+Math.imul(v,R0)|0,X=X+Math.imul(v,B)|0,X=X+Math.imul(j,R0)|0,K=K+Math.imul(j,B)|0;var S$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(S$>>>26)|0,S$&=67108863,z=Math.imul(y,Z0),X=Math.imul(y,E0),X=X+Math.imul(r,Z0)|0,K=Math.imul(r,E0),z=z+Math.imul(t,P0)|0,X=X+Math.imul(t,g0)|0,X=X+Math.imul(a,P0)|0,K=K+Math.imul(a,g0)|0,z=z+Math.imul(f,j0)|0,X=X+Math.imul(f,T0)|0,X=X+Math.imul(u,j0)|0,K=K+Math.imul(u,T0)|0,z=z+Math.imul(m,_0)|0,X=X+Math.imul(m,q0)|0,X=X+Math.imul(s,_0)|0,K=K+Math.imul(s,q0)|0,z=z+Math.imul(i,N0)|0,X=X+Math.imul(i,x0)|0,X=X+Math.imul(l,N0)|0,K=K+Math.imul(l,x0)|0,z=z+Math.imul(h,R0)|0,X=X+Math.imul(h,B)|0,X=X+Math.imul(n,R0)|0,K=K+Math.imul(n,B)|0,z=z+Math.imul(v,e)|0,X=X+Math.imul(v,$0)|0,X=X+Math.imul(j,e)|0,K=K+Math.imul(j,$0)|0;var W$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(W$>>>26)|0,W$&=67108863,z=Math.imul(d,Z0),X=Math.imul(d,E0),X=X+Math.imul(I0,Z0)|0,K=Math.imul(I0,E0),z=z+Math.imul(y,P0)|0,X=X+Math.imul(y,g0)|0,X=X+Math.imul(r,P0)|0,K=K+Math.imul(r,g0)|0,z=z+Math.imul(t,j0)|0,X=X+Math.imul(t,T0)|0,X=X+Math.imul(a,j0)|0,K=K+Math.imul(a,T0)|0,z=z+Math.imul(f,_0)|0,X=X+Math.imul(f,q0)|0,X=X+Math.imul(u,_0)|0,K=K+Math.imul(u,q0)|0,z=z+Math.imul(m,N0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(s,N0)|0,K=K+Math.imul(s,x0)|0,z=z+Math.imul(i,R0)|0,X=X+Math.imul(i,B)|0,X=X+Math.imul(l,R0)|0,K=K+Math.imul(l,B)|0,z=z+Math.imul(h,e)|0,X=X+Math.imul(h,$0)|0,X=X+Math.imul(n,e)|0,K=K+Math.imul(n,$0)|0,z=z+Math.imul(v,K0)|0,X=X+Math.imul(v,L0)|0,X=X+Math.imul(j,K0)|0,K=K+Math.imul(j,L0)|0;var D$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(D$>>>26)|0,D$&=67108863,z=Math.imul(A0,Z0),X=Math.imul(A0,E0),X=X+Math.imul(H0,Z0)|0,K=Math.imul(H0,E0),z=z+Math.imul(d,P0)|0,X=X+Math.imul(d,g0)|0,X=X+Math.imul(I0,P0)|0,K=K+Math.imul(I0,g0)|0,z=z+Math.imul(y,j0)|0,X=X+Math.imul(y,T0)|0,X=X+Math.imul(r,j0)|0,K=K+Math.imul(r,T0)|0,z=z+Math.imul(t,_0)|0,X=X+Math.imul(t,q0)|0,X=X+Math.imul(a,_0)|0,K=K+Math.imul(a,q0)|0,z=z+Math.imul(f,N0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(u,N0)|0,K=K+Math.imul(u,x0)|0,z=z+Math.imul(m,R0)|0,X=X+Math.imul(m,B)|0,X=X+Math.imul(s,R0)|0,K=K+Math.imul(s,B)|0,z=z+Math.imul(i,e)|0,X=X+Math.imul(i,$0)|0,X=X+Math.imul(l,e)|0,K=K+Math.imul(l,$0)|0,z=z+Math.imul(h,K0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(n,K0)|0,K=K+Math.imul(n,L0)|0,z=z+Math.imul(v,C0)|0,X=X+Math.imul(v,B0)|0,X=X+Math.imul(j,C0)|0,K=K+Math.imul(j,B0)|0;var z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(z$>>>26)|0,z$&=67108863,z=Math.imul(z0,Z0),X=Math.imul(z0,E0),X=X+Math.imul(F0,Z0)|0,K=Math.imul(F0,E0),z=z+Math.imul(A0,P0)|0,X=X+Math.imul(A0,g0)|0,X=X+Math.imul(H0,P0)|0,K=K+Math.imul(H0,g0)|0,z=z+Math.imul(d,j0)|0,X=X+Math.imul(d,T0)|0,X=X+Math.imul(I0,j0)|0,K=K+Math.imul(I0,T0)|0,z=z+Math.imul(y,_0)|0,X=X+Math.imul(y,q0)|0,X=X+Math.imul(r,_0)|0,K=K+Math.imul(r,q0)|0,z=z+Math.imul(t,N0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(a,N0)|0,K=K+Math.imul(a,x0)|0,z=z+Math.imul(f,R0)|0,X=X+Math.imul(f,B)|0,X=X+Math.imul(u,R0)|0,K=K+Math.imul(u,B)|0,z=z+Math.imul(m,e)|0,X=X+Math.imul(m,$0)|0,X=X+Math.imul(s,e)|0,K=K+Math.imul(s,$0)|0,z=z+Math.imul(i,K0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(l,K0)|0,K=K+Math.imul(l,L0)|0,z=z+Math.imul(h,C0)|0,X=X+Math.imul(h,B0)|0,X=X+Math.imul(n,C0)|0,K=K+Math.imul(n,B0)|0,z=z+Math.imul(v,k0)|0,X=X+Math.imul(v,v0)|0,X=X+Math.imul(j,k0)|0,K=K+Math.imul(j,v0)|0;var K$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(K$>>>26)|0,K$&=67108863,z=Math.imul(z0,P0),X=Math.imul(z0,g0),X=X+Math.imul(F0,P0)|0,K=Math.imul(F0,g0),z=z+Math.imul(A0,j0)|0,X=X+Math.imul(A0,T0)|0,X=X+Math.imul(H0,j0)|0,K=K+Math.imul(H0,T0)|0,z=z+Math.imul(d,_0)|0,X=X+Math.imul(d,q0)|0,X=X+Math.imul(I0,_0)|0,K=K+Math.imul(I0,q0)|0,z=z+Math.imul(y,N0)|0,X=X+Math.imul(y,x0)|0,X=X+Math.imul(r,N0)|0,K=K+Math.imul(r,x0)|0,z=z+Math.imul(t,R0)|0,X=X+Math.imul(t,B)|0,X=X+Math.imul(a,R0)|0,K=K+Math.imul(a,B)|0,z=z+Math.imul(f,e)|0,X=X+Math.imul(f,$0)|0,X=X+Math.imul(u,e)|0,K=K+Math.imul(u,$0)|0,z=z+Math.imul(m,K0)|0,X=X+Math.imul(m,L0)|0,X=X+Math.imul(s,K0)|0,K=K+Math.imul(s,L0)|0,z=z+Math.imul(i,C0)|0,X=X+Math.imul(i,B0)|0,X=X+Math.imul(l,C0)|0,K=K+Math.imul(l,B0)|0,z=z+Math.imul(h,k0)|0,X=X+Math.imul(h,v0)|0,X=X+Math.imul(n,k0)|0,K=K+Math.imul(n,v0)|0;var A$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(A$>>>26)|0,A$&=67108863,z=Math.imul(z0,j0),X=Math.imul(z0,T0),X=X+Math.imul(F0,j0)|0,K=Math.imul(F0,T0),z=z+Math.imul(A0,_0)|0,X=X+Math.imul(A0,q0)|0,X=X+Math.imul(H0,_0)|0,K=K+Math.imul(H0,q0)|0,z=z+Math.imul(d,N0)|0,X=X+Math.imul(d,x0)|0,X=X+Math.imul(I0,N0)|0,K=K+Math.imul(I0,x0)|0,z=z+Math.imul(y,R0)|0,X=X+Math.imul(y,B)|0,X=X+Math.imul(r,R0)|0,K=K+Math.imul(r,B)|0,z=z+Math.imul(t,e)|0,X=X+Math.imul(t,$0)|0,X=X+Math.imul(a,e)|0,K=K+Math.imul(a,$0)|0,z=z+Math.imul(f,K0)|0,X=X+Math.imul(f,L0)|0,X=X+Math.imul(u,K0)|0,K=K+Math.imul(u,L0)|0,z=z+Math.imul(m,C0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(s,C0)|0,K=K+Math.imul(s,B0)|0,z=z+Math.imul(i,k0)|0,X=X+Math.imul(i,v0)|0,X=X+Math.imul(l,k0)|0,K=K+Math.imul(l,v0)|0;var H$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(H$>>>26)|0,H$&=67108863,z=Math.imul(z0,_0),X=Math.imul(z0,q0),X=X+Math.imul(F0,_0)|0,K=Math.imul(F0,q0),z=z+Math.imul(A0,N0)|0,X=X+Math.imul(A0,x0)|0,X=X+Math.imul(H0,N0)|0,K=K+Math.imul(H0,x0)|0,z=z+Math.imul(d,R0)|0,X=X+Math.imul(d,B)|0,X=X+Math.imul(I0,R0)|0,K=K+Math.imul(I0,B)|0,z=z+Math.imul(y,e)|0,X=X+Math.imul(y,$0)|0,X=X+Math.imul(r,e)|0,K=K+Math.imul(r,$0)|0,z=z+Math.imul(t,K0)|0,X=X+Math.imul(t,L0)|0,X=X+Math.imul(a,K0)|0,K=K+Math.imul(a,L0)|0,z=z+Math.imul(f,C0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(u,C0)|0,K=K+Math.imul(u,B0)|0,z=z+Math.imul(m,k0)|0,X=X+Math.imul(m,v0)|0,X=X+Math.imul(s,k0)|0,K=K+Math.imul(s,v0)|0;var F$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(F$>>>26)|0,F$&=67108863,z=Math.imul(z0,N0),X=Math.imul(z0,x0),X=X+Math.imul(F0,N0)|0,K=Math.imul(F0,x0),z=z+Math.imul(A0,R0)|0,X=X+Math.imul(A0,B)|0,X=X+Math.imul(H0,R0)|0,K=K+Math.imul(H0,B)|0,z=z+Math.imul(d,e)|0,X=X+Math.imul(d,$0)|0,X=X+Math.imul(I0,e)|0,K=K+Math.imul(I0,$0)|0,z=z+Math.imul(y,K0)|0,X=X+Math.imul(y,L0)|0,X=X+Math.imul(r,K0)|0,K=K+Math.imul(r,L0)|0,z=z+Math.imul(t,C0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(a,C0)|0,K=K+Math.imul(a,B0)|0,z=z+Math.imul(f,k0)|0,X=X+Math.imul(f,v0)|0,X=X+Math.imul(u,k0)|0,K=K+Math.imul(u,v0)|0;var L$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(L$>>>26)|0,L$&=67108863,z=Math.imul(z0,R0),X=Math.imul(z0,B),X=X+Math.imul(F0,R0)|0,K=Math.imul(F0,B),z=z+Math.imul(A0,e)|0,X=X+Math.imul(A0,$0)|0,X=X+Math.imul(H0,e)|0,K=K+Math.imul(H0,$0)|0,z=z+Math.imul(d,K0)|0,X=X+Math.imul(d,L0)|0,X=X+Math.imul(I0,K0)|0,K=K+Math.imul(I0,L0)|0,z=z+Math.imul(y,C0)|0,X=X+Math.imul(y,B0)|0,X=X+Math.imul(r,C0)|0,K=K+Math.imul(r,B0)|0,z=z+Math.imul(t,k0)|0,X=X+Math.imul(t,v0)|0,X=X+Math.imul(a,k0)|0,K=K+Math.imul(a,v0)|0;var E$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(E$>>>26)|0,E$&=67108863,z=Math.imul(z0,e),X=Math.imul(z0,$0),X=X+Math.imul(F0,e)|0,K=Math.imul(F0,$0),z=z+Math.imul(A0,K0)|0,X=X+Math.imul(A0,L0)|0,X=X+Math.imul(H0,K0)|0,K=K+Math.imul(H0,L0)|0,z=z+Math.imul(d,C0)|0,X=X+Math.imul(d,B0)|0,X=X+Math.imul(I0,C0)|0,K=K+Math.imul(I0,B0)|0,z=z+Math.imul(y,k0)|0,X=X+Math.imul(y,v0)|0,X=X+Math.imul(r,k0)|0,K=K+Math.imul(r,v0)|0;var Z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,z=Math.imul(z0,K0),X=Math.imul(z0,L0),X=X+Math.imul(F0,K0)|0,K=Math.imul(F0,L0),z=z+Math.imul(A0,C0)|0,X=X+Math.imul(A0,B0)|0,X=X+Math.imul(H0,C0)|0,K=K+Math.imul(H0,B0)|0,z=z+Math.imul(d,k0)|0,X=X+Math.imul(d,v0)|0,X=X+Math.imul(I0,k0)|0,K=K+Math.imul(I0,v0)|0;var v$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(v$>>>26)|0,v$&=67108863,z=Math.imul(z0,C0),X=Math.imul(z0,B0),X=X+Math.imul(F0,C0)|0,K=Math.imul(F0,B0),z=z+Math.imul(A0,k0)|0,X=X+Math.imul(A0,v0)|0,X=X+Math.imul(H0,k0)|0,K=K+Math.imul(H0,v0)|0;var M$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(M$>>>26)|0,M$&=67108863,z=Math.imul(z0,k0),X=Math.imul(z0,v0),X=X+Math.imul(F0,k0)|0,K=Math.imul(F0,v0);var P$=(H+z|0)+((X&8191)<<13)|0;if(H=(K+(X>>>13)|0)+(P$>>>26)|0,P$&=67108863,A[0]=Q$,A[1]=r0,A[2]=o0,A[3]=a0,A[4]=e0,A[5]=S$,A[6]=W$,A[7]=D$,A[8]=z$,A[9]=K$,A[10]=A$,A[11]=H$,A[12]=F$,A[13]=L$,A[14]=E$,A[15]=Z$,A[16]=v$,A[17]=M$,A[18]=P$,H!==0)A[19]=H,D.length++;return D};if(!Math.imul)C=k;function _(O,G,D){D.negative=G.negative^O.negative,D.length=O.length+G.length;var Q=0,W=0;for(var A=0;A<D.length-1;A++){var H=W;W=0;var z=Q&67108863,X=Math.min(A,G.length-1);for(var K=Math.max(0,A-O.length+1);K<=X;K++){var R=A-K,v=O.words[R]|0,j=G.words[K]|0,c=v*j,h=c&67108863;H=H+(c/67108864|0)|0,h=h+z|0,z=h&67108863,H=H+(h>>>26)|0,W+=H>>>26,H&=67108863}D.words[A]=z,Q=H,H=W}if(Q!==0)D.words[A]=Q;else D.length--;return D.strip()}function g(O,G,D){var Q=new N;return Q.mulp(O,G,D)}Y.prototype.mulTo=function(O,G){var D,Q=this.length+O.length;if(this.length===10&&O.length===10)D=C(this,O,G);else if(Q<63)D=k(this,O,G);else if(Q<1024)D=_(this,O,G);else D=g(this,O,G);return D};function N(O,G){this.x=O,this.y=G}N.prototype.makeRBT=function(O){var G=Array(O),D=Y.prototype._countBits(O)-1;for(var Q=0;Q<O;Q++)G[Q]=this.revBin(Q,D,O);return G},N.prototype.revBin=function(O,G,D){if(O===0||O===D-1)return O;var Q=0;for(var W=0;W<G;W++)Q|=(O&1)<<G-W-1,O>>=1;return Q},N.prototype.permute=function(O,G,D,Q,W,A){for(var H=0;H<A;H++)Q[H]=G[O[H]],W[H]=D[O[H]]},N.prototype.transform=function(O,G,D,Q,W,A){this.permute(A,O,G,D,Q,W);for(var H=1;H<W;H<<=1){var z=H<<1,X=Math.cos(2*Math.PI/z),K=Math.sin(2*Math.PI/z);for(var R=0;R<W;R+=z){var v=X,j=K;for(var c=0;c<H;c++){var h=D[R+c],n=Q[R+c],D0=D[R+c+H],i=Q[R+c+H],l=v*D0-j*i;if(i=v*i+j*D0,D0=l,D[R+c]=h+D0,Q[R+c]=n+i,D[R+c+H]=h-D0,Q[R+c+H]=n-i,c!==z)l=X*v-K*j,j=X*j+K*v,v=l}}}},N.prototype.guessLen13b=function(O,G){var D=Math.max(G,O)|1,Q=D&1,W=0;for(D=D/2|0;D;D=D>>>1)W++;return 1<<W+1+Q},N.prototype.conjugate=function(O,G,D){if(D<=1)return;for(var Q=0;Q<D/2;Q++){var W=O[Q];O[Q]=O[D-Q-1],O[D-Q-1]=W,W=G[Q],G[Q]=-G[D-Q-1],G[D-Q-1]=-W}},N.prototype.normalize13b=function(O,G){var D=0;for(var Q=0;Q<G/2;Q++){var W=Math.round(O[2*Q+1]/G)*8192+Math.round(O[2*Q]/G)+D;if(O[Q]=W&67108863,W<67108864)D=0;else D=W/67108864|0}return O},N.prototype.convert13b=function(O,G,D,Q){var W=0;for(var A=0;A<G;A++)W=W+(O[A]|0),D[2*A]=W&8191,W=W>>>13,D[2*A+1]=W&8191,W=W>>>13;for(A=2*G;A<Q;++A)D[A]=0;I(W===0),I((W&-8192)===0)},N.prototype.stub=function(O){var G=Array(O);for(var D=0;D<O;D++)G[D]=0;return G},N.prototype.mulp=function(O,G,D){var Q=2*this.guessLen13b(O.length,G.length),W=this.makeRBT(Q),A=this.stub(Q),H=Array(Q),z=Array(Q),X=Array(Q),K=Array(Q),R=Array(Q),v=Array(Q),j=D.words;j.length=Q,this.convert13b(O.words,O.length,H,Q),this.convert13b(G.words,G.length,K,Q),this.transform(H,A,z,X,Q,W),this.transform(K,A,R,v,Q,W);for(var c=0;c<Q;c++){var h=z[c]*R[c]-X[c]*v[c];X[c]=z[c]*v[c]+X[c]*R[c],z[c]=h}return this.conjugate(z,X,Q),this.transform(z,X,j,A,Q,W),this.conjugate(j,A,Q),this.normalize13b(j,Q),D.negative=O.negative^G.negative,D.length=O.length+G.length,D.strip()},Y.prototype.mul=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),this.mulTo(O,G)},Y.prototype.mulf=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),g(this,O,G)},Y.prototype.imul=function(O){return this.clone().mulTo(O,this)},Y.prototype.imuln=function(O){I(typeof O==="number"),I(O<67108864);var G=0;for(var D=0;D<this.length;D++){var Q=(this.words[D]|0)*O,W=(Q&67108863)+(G&67108863);G>>=26,G+=Q/67108864|0,G+=W>>>26,this.words[D]=W&67108863}if(G!==0)this.words[D]=G,this.length++;return this.length=O===0?1:this.length,this},Y.prototype.muln=function(O){return this.clone().imuln(O)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(O){var G=q(O);if(G.length===0)return new Y(1);var D=this;for(var Q=0;Q<G.length;Q++,D=D.sqr())if(G[Q]!==0)break;if(++Q<G.length)for(var W=D.sqr();Q<G.length;Q++,W=W.sqr()){if(G[Q]===0)continue;D=D.mul(W)}return D},Y.prototype.iushln=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=67108863>>>26-G<<26-G,W;if(G!==0){var A=0;for(W=0;W<this.length;W++){var H=this.words[W]&Q,z=(this.words[W]|0)-H<<G;this.words[W]=z|A,A=H>>>26-G}if(A)this.words[W]=A,this.length++}if(D!==0){for(W=this.length-1;W>=0;W--)this.words[W+D]=this.words[W];for(W=0;W<D;W++)this.words[W]=0;this.length+=D}return this.strip()},Y.prototype.ishln=function(O){return I(this.negative===0),this.iushln(O)},Y.prototype.iushrn=function(O,G,D){I(typeof O==="number"&&O>=0);var Q;if(G)Q=(G-G%26)/26;else Q=0;var W=O%26,A=Math.min((O-W)/26,this.length),H=67108863^67108863>>>W<<W,z=D;if(Q-=A,Q=Math.max(0,Q),z){for(var X=0;X<A;X++)z.words[X]=this.words[X];z.length=A}if(A===0);else if(this.length>A){this.length-=A;for(X=0;X<this.length;X++)this.words[X]=this.words[X+A]}else this.words[0]=0,this.length=1;var K=0;for(X=this.length-1;X>=0&&(K!==0||X>=Q);X--){var R=this.words[X]|0;this.words[X]=K<<26-W|R>>>W,K=R&H}if(z&&K!==0)z.words[z.length++]=K;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},Y.prototype.ishrn=function(O,G,D){return I(this.negative===0),this.iushrn(O,G,D)},Y.prototype.shln=function(O){return this.clone().ishln(O)},Y.prototype.ushln=function(O){return this.clone().iushln(O)},Y.prototype.shrn=function(O){return this.clone().ishrn(O)},Y.prototype.ushrn=function(O){return this.clone().iushrn(O)},Y.prototype.testn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return!1;var W=this.words[D];return!!(W&Q)},Y.prototype.imaskn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(G!==0)D++;if(this.length=Math.min(D,this.length),G!==0){var Q=67108863^67108863>>>G<<G;this.words[this.length-1]&=Q}return this.strip()},Y.prototype.maskn=function(O){return this.clone().imaskn(O)},Y.prototype.iaddn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.isubn(-O);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<O)return this.words[0]=O-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(O),this.negative=1,this}return this._iaddn(O)},Y.prototype._iaddn=function(O){this.words[0]+=O;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},Y.prototype.isubn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},Y.prototype.addn=function(O){return this.clone().iaddn(O)},Y.prototype.subn=function(O){return this.clone().isubn(O)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(O,G,D){var Q=O.length+D,W;this._expand(Q);var A,H=0;for(W=0;W<O.length;W++){A=(this.words[W+D]|0)+H;var z=(O.words[W]|0)*G;A-=z&67108863,H=(A>>26)-(z/67108864|0),this.words[W+D]=A&67108863}for(;W<this.length-D;W++)A=(this.words[W+D]|0)+H,H=A>>26,this.words[W+D]=A&67108863;if(H===0)return this.strip();I(H===-1),H=0;for(W=0;W<this.length;W++)A=-(this.words[W]|0)+H,H=A>>26,this.words[W]=A&67108863;return this.negative=1,this.strip()},Y.prototype._wordDiv=function(O,G){var D=this.length-O.length,Q=this.clone(),W=O,A=W.words[W.length-1]|0,H=this._countBits(A);if(D=26-H,D!==0)W=W.ushln(D),Q.iushln(D),A=W.words[W.length-1]|0;var z=Q.length-W.length,X;if(G!=="mod"){X=new Y(null),X.length=z+1,X.words=Array(X.length);for(var K=0;K<X.length;K++)X.words[K]=0}var R=Q.clone()._ishlnsubmul(W,1,z);if(R.negative===0){if(Q=R,X)X.words[z]=1}for(var v=z-1;v>=0;v--){var j=(Q.words[W.length+v]|0)*67108864+(Q.words[W.length+v-1]|0);j=Math.min(j/A|0,67108863),Q._ishlnsubmul(W,j,v);while(Q.negative!==0)if(j--,Q.negative=0,Q._ishlnsubmul(W,1,v),!Q.isZero())Q.negative^=1;if(X)X.words[v]=j}if(X)X.strip();if(Q.strip(),G!=="div"&&D!==0)Q.iushrn(D);return{div:X||null,mod:Q}},Y.prototype.divmod=function(O,G,D){if(I(!O.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var Q,W,A;if(this.negative!==0&&O.negative===0){if(A=this.neg().divmod(O,G),G!=="mod")Q=A.div.neg();if(G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.iadd(O)}return{div:Q,mod:W}}if(this.negative===0&&O.negative!==0){if(A=this.divmod(O.neg(),G),G!=="mod")Q=A.div.neg();return{div:Q,mod:A.mod}}if((this.negative&O.negative)!==0){if(A=this.neg().divmod(O.neg(),G),G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.isub(O)}return{div:A.div,mod:W}}if(O.length>this.length||this.cmp(O)<0)return{div:new Y(0),mod:this};if(O.length===1){if(G==="div")return{div:this.divn(O.words[0]),mod:null};if(G==="mod")return{div:null,mod:new Y(this.modn(O.words[0]))};return{div:this.divn(O.words[0]),mod:new Y(this.modn(O.words[0]))}}return this._wordDiv(O,G)},Y.prototype.div=function(O){return this.divmod(O,"div",!1).div},Y.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},Y.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},Y.prototype.divRound=function(O){var G=this.divmod(O);if(G.mod.isZero())return G.div;var D=G.div.negative!==0?G.mod.isub(O):G.mod,Q=O.ushrn(1),W=O.andln(1),A=D.cmp(Q);if(A<0||W===1&&A===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},Y.prototype.modn=function(O){I(O<=67108863);var G=67108864%O,D=0;for(var Q=this.length-1;Q>=0;Q--)D=(G*D+(this.words[Q]|0))%O;return D},Y.prototype.idivn=function(O){I(O<=67108863);var G=0;for(var D=this.length-1;D>=0;D--){var Q=(this.words[D]|0)+G*67108864;this.words[D]=Q/O|0,G=Q%O}return this.strip()},Y.prototype.divn=function(O){return this.clone().idivn(O)},Y.prototype.egcd=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=new Y(0),H=new Y(1),z=0;while(G.isEven()&&D.isEven())G.iushrn(1),D.iushrn(1),++z;var X=D.clone(),K=G.clone();while(!G.isZero()){for(var R=0,v=1;(G.words[0]&v)===0&&R<26;++R,v<<=1);if(R>0){G.iushrn(R);while(R-- >0){if(Q.isOdd()||W.isOdd())Q.iadd(X),W.isub(K);Q.iushrn(1),W.iushrn(1)}}for(var j=0,c=1;(D.words[0]&c)===0&&j<26;++j,c<<=1);if(j>0){D.iushrn(j);while(j-- >0){if(A.isOdd()||H.isOdd())A.iadd(X),H.isub(K);A.iushrn(1),H.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(A),W.isub(H);else D.isub(G),A.isub(Q),H.isub(W)}return{a:A,b:H,gcd:D.iushln(z)}},Y.prototype._invmp=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=D.clone();while(G.cmpn(1)>0&&D.cmpn(1)>0){for(var H=0,z=1;(G.words[0]&z)===0&&H<26;++H,z<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Q.isOdd())Q.iadd(A);Q.iushrn(1)}}for(var X=0,K=1;(D.words[0]&K)===0&&X<26;++X,K<<=1);if(X>0){D.iushrn(X);while(X-- >0){if(W.isOdd())W.iadd(A);W.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(W);else D.isub(G),W.isub(Q)}var R;if(G.cmpn(1)===0)R=Q;else R=W;if(R.cmpn(0)<0)R.iadd(O);return R},Y.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var G=this.clone(),D=O.clone();G.negative=0,D.negative=0;for(var Q=0;G.isEven()&&D.isEven();Q++)G.iushrn(1),D.iushrn(1);do{while(G.isEven())G.iushrn(1);while(D.isEven())D.iushrn(1);var W=G.cmp(D);if(W<0){var A=G;G=D,D=A}else if(W===0||D.cmpn(1)===0)break;G.isub(D)}while(!0);return D.iushln(Q)},Y.prototype.invm=function(O){return this.egcd(O).a.umod(O)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(O){return this.words[0]&O},Y.prototype.bincn=function(O){I(typeof O==="number");var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return this._expand(D+1),this.words[D]|=Q,this;var W=Q;for(var A=D;W!==0&&A<this.length;A++){var H=this.words[A]|0;H+=W,W=H>>>26,H&=67108863,this.words[A]=H}if(W!==0)this.words[A]=W,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(O){var G=O<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var D;if(this.length>1)D=1;else{if(G)O=-O;I(O<=67108863,"Number is too big");var Q=this.words[0]|0;D=Q===O?0:Q<O?-1:1}if(this.negative!==0)return-D|0;return D},Y.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var G=this.ucmp(O);if(this.negative!==0)return-G|0;return G},Y.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;var G=0;for(var D=this.length-1;D>=0;D--){var Q=this.words[D]|0,W=O.words[D]|0;if(Q===W)continue;if(Q<W)G=-1;else if(Q>W)G=1;break}return G},Y.prototype.gtn=function(O){return this.cmpn(O)===1},Y.prototype.gt=function(O){return this.cmp(O)===1},Y.prototype.gten=function(O){return this.cmpn(O)>=0},Y.prototype.gte=function(O){return this.cmp(O)>=0},Y.prototype.ltn=function(O){return this.cmpn(O)===-1},Y.prototype.lt=function(O){return this.cmp(O)===-1},Y.prototype.lten=function(O){return this.cmpn(O)<=0},Y.prototype.lte=function(O){return this.cmp(O)<=0},Y.prototype.eqn=function(O){return this.cmpn(O)===0},Y.prototype.eq=function(O){return this.cmp(O)===0},Y.red=function(O){return new p(O)},Y.prototype.toRed=function(O){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},Y.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(O){return this.red=O,this},Y.prototype.forceRed=function(O){return I(!this.red,"Already a number in reduction context"),this._forceRed(O)},Y.prototype.redAdd=function(O){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},Y.prototype.redIAdd=function(O){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},Y.prototype.redSub=function(O){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},Y.prototype.redISub=function(O){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},Y.prototype.redShl=function(O){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},Y.prototype.redMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},Y.prototype.redIMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},Y.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(O){return I(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var x={k256:null,p224:null,p192:null,p25519:null};function w(O,G){this.name=O,this.p=new Y(G,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var O=new Y(null);return O.words=Array(Math.ceil(this.n/13)),O},w.prototype.ireduce=function(O){var G=O,D;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),D=G.bitLength();while(D>this.n);var Q=D<this.n?-1:G.ucmp(this.p);if(Q===0)G.words[0]=0,G.length=1;else if(Q>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},w.prototype.split=function(O,G){O.iushrn(this.n,0,G)},w.prototype.imulK=function(O){return O.imul(this.k)};function o(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(o,w),o.prototype.split=function(O,G){var D=4194303,Q=Math.min(O.length,9);for(var W=0;W<Q;W++)G.words[W]=O.words[W];if(G.length=Q,O.length<=9){O.words[0]=0,O.length=1;return}var A=O.words[9];G.words[G.length++]=A&D;for(W=10;W<O.length;W++){var H=O.words[W]|0;O.words[W-10]=(H&D)<<4|A>>>22,A=H}if(A>>>=22,O.words[W-10]=A,A===0&&O.length>10)O.length-=10;else O.length-=9},o.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;var G=0;for(var D=0;D<O.length;D++){var Q=O.words[D]|0;G+=Q*977,O.words[D]=G&67108863,G=Q*64+(G/67108864|0)}if(O.words[O.length-1]===0){if(O.length--,O.words[O.length-1]===0)O.length--}return O};function Q0(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(Q0,w);function V0(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(V0,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(Y0,w),Y0.prototype.imulK=function(O){var G=0;for(var D=0;D<O.length;D++){var Q=(O.words[D]|0)*19+G,W=Q&67108863;Q>>>=26,O.words[D]=W,G=Q}if(G!==0)O.words[O.length++]=G;return O},Y._prime=function(O){if(x[O])return x[O];var G;if(O==="k256")G=new o;else if(O==="p224")G=new Q0;else if(O==="p192")G=new V0;else if(O==="p25519")G=new Y0;else throw Error("Unknown prime "+O);return x[O]=G,G};function p(O){if(typeof O==="string"){var G=Y._prime(O);this.m=G.p,this.prime=G}else I(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}p.prototype._verify1=function(O){I(O.negative===0,"red works only with positives"),I(O.red,"red works only with red numbers")},p.prototype._verify2=function(O,G){I((O.negative|G.negative)===0,"red works only with positives"),I(O.red&&O.red===G.red,"red works only with red numbers")},p.prototype.imod=function(O){if(this.prime)return this.prime.ireduce(O)._forceRed(this);return O.umod(this.m)._forceRed(this)},p.prototype.neg=function(O){if(O.isZero())return O.clone();return this.m.sub(O)._forceRed(this)},p.prototype.add=function(O,G){this._verify2(O,G);var D=O.add(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D._forceRed(this)},p.prototype.iadd=function(O,G){this._verify2(O,G);var D=O.iadd(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D},p.prototype.sub=function(O,G){this._verify2(O,G);var D=O.sub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D._forceRed(this)},p.prototype.isub=function(O,G){this._verify2(O,G);var D=O.isub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D},p.prototype.shl=function(O,G){return this._verify1(O),this.imod(O.ushln(G))},p.prototype.imul=function(O,G){return this._verify2(O,G),this.imod(O.imul(G))},p.prototype.mul=function(O,G){return this._verify2(O,G),this.imod(O.mul(G))},p.prototype.isqr=function(O){return this.imul(O,O.clone())},p.prototype.sqr=function(O){return this.mul(O,O)},p.prototype.sqrt=function(O){if(O.isZero())return O.clone();var G=this.m.andln(3);if(I(G%2===1),G===3){var D=this.m.add(new Y(1)).iushrn(2);return this.pow(O,D)}var Q=this.m.subn(1),W=0;while(!Q.isZero()&&Q.andln(1)===0)W++,Q.iushrn(1);I(!Q.isZero());var A=new Y(1).toRed(this),H=A.redNeg(),z=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new Y(2*X*X).toRed(this);while(this.pow(X,z).cmp(H)!==0)X.redIAdd(H);var K=this.pow(X,Q),R=this.pow(O,Q.addn(1).iushrn(1)),v=this.pow(O,Q),j=W;while(v.cmp(A)!==0){var c=v;for(var h=0;c.cmp(A)!==0;h++)c=c.redSqr();I(h<j);var n=this.pow(K,new Y(1).iushln(j-h-1));R=R.redMul(n),K=n.redSqr(),v=v.redMul(K),j=h}return R},p.prototype.invm=function(O){var G=O._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(O,G){if(G.isZero())return new Y(1).toRed(this);if(G.cmpn(1)===0)return O.clone();var D=4,Q=Array(1<<D);Q[0]=new Y(1).toRed(this),Q[1]=O;for(var W=2;W<Q.length;W++)Q[W]=this.mul(Q[W-1],O);var A=Q[0],H=0,z=0,X=G.bitLength()%26;if(X===0)X=26;for(W=G.length-1;W>=0;W--){var K=G.words[W];for(var R=X-1;R>=0;R--){var v=K>>R&1;if(A!==Q[0])A=this.sqr(A);if(v===0&&H===0){z=0;continue}if(H<<=1,H|=v,z++,z!==D&&(W!==0||R!==0))continue;A=this.mul(A,Q[H]),z=0,H=0}X=26}return A},p.prototype.convertTo=function(O){var G=O.umod(this.m);return G===O?G.clone():G},p.prototype.convertFrom=function(O){var G=O.clone();return G.red=null,G},Y.mont=function(O){return new U0(O)};function U0(O){if(p.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S(U0,p),U0.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},U0.prototype.convertFrom=function(O){var G=this.imod(O.mul(this.rinv));return G.red=null,G},U0.prototype.imul=function(O,G){if(O.isZero()||G.isZero())return O.words[0]=0,O.length=1,O;var D=O.imul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.mul=function(O,G){if(O.isZero()||G.isZero())return new Y(0)._forceRed(this);var D=O.mul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.invm=function(O){var G=this.imod(O._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof U>"u"||U,$)}),fA=G0(($,U)=>{var J=cA(),V=wA();U.exports=function(M){return new S(M)};var I={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};I.p224=I.secp224r1,I.p256=I.secp256r1=I.prime256v1,I.p192=I.secp192r1=I.prime192v1,I.p384=I.secp384r1,I.p521=I.secp521r1;function S(M){if(this.curveType=I[M],!this.curveType)this.curveType={name:M};this.curve=new J.ec(this.curveType.name),this.keys=void 0}S.prototype.generateKeys=function(M,T){return this.keys=this.curve.genKeyPair(),this.getPublicKey(M,T)},S.prototype.computeSecret=function(M,T,L){if(T=T||"utf8",!Buffer.isBuffer(M))M=new Buffer(M,T);var E=this.curve.keyFromPublic(M).getPublic(),F=E.mul(this.keys.getPrivate()).getX();return Y(F,L,this.curveType.byteLength)},S.prototype.getPublicKey=function(M,T){var L=this.keys.getPublic(T==="compressed",!0);if(T==="hybrid")if(L[L.length-1]%2)L[0]=7;else L[0]=6;return Y(L,M)},S.prototype.getPrivateKey=function(M){return Y(this.keys.getPrivate(),M)},S.prototype.setPublicKey=function(M,T){if(T=T||"utf8",!Buffer.isBuffer(M))M=new Buffer(M,T);return this.keys._importPublic(M),this},S.prototype.setPrivateKey=function(M,T){if(T=T||"utf8",!Buffer.isBuffer(M))M=new Buffer(M,T);var L=new V(M);return L=L.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(L),this};function Y(M,T,L){if(!Array.isArray(M))M=M.toArray();var E=new Buffer(M);if(L&&E.length<L){var F=new Buffer(L-E.length);F.fill(0),E=Buffer.concat([F,E])}if(!T)return E;else return E.toString(T)}}),yA=G0(($,U)=>{var J=(p$(),d0(u$)).createECDH;U.exports=J||fA()}),hA=G0(($,U)=>{(function(J,V){function I(O,G){if(!O)throw Error(G||"Assertion failed")}function S(O,G){O.super_=G;var D=function(){};D.prototype=G.prototype,O.prototype=new D,O.prototype.constructor=O}function Y(O,G,D){if(Y.isBN(O))return O;if(this.negative=0,this.words=null,this.length=0,this.red=null,O!==null){if(G==="le"||G==="be")D=G,G=10;this._init(O||0,G||10,D||"be")}}if(typeof J==="object")J.exports=Y;else V.BN=Y;Y.BN=Y,Y.wordSize=26;var M;try{if(typeof window<"u"&&typeof window.Buffer<"u")M=window.Buffer;else M=(g$(),d0(k$)).Buffer}catch(O){}Y.isBN=function(O){if(O instanceof Y)return!0;return O!==null&&typeof O==="object"&&O.constructor.wordSize===Y.wordSize&&Array.isArray(O.words)},Y.max=function(O,G){if(O.cmp(G)>0)return O;return G},Y.min=function(O,G){if(O.cmp(G)<0)return O;return G},Y.prototype._init=function(O,G,D){if(typeof O==="number")return this._initNumber(O,G,D);if(typeof O==="object")return this._initArray(O,G,D);if(G==="hex")G=16;I(G===(G|0)&&G>=2&&G<=36),O=O.toString().replace(/\s+/g,"");var Q=0;if(O[0]==="-")Q++,this.negative=1;if(Q<O.length){if(G===16)this._parseHex(O,Q,D);else if(this._parseBase(O,G,Q),D==="le")this._initArray(this.toArray(),G,D)}},Y.prototype._initNumber=function(O,G,D){if(O<0)this.negative=1,O=-O;if(O<67108864)this.words=[O&67108863],this.length=1;else if(O<4503599627370496)this.words=[O&67108863,O/67108864&67108863],this.length=2;else I(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3;if(D!=="le")return;this._initArray(this.toArray(),G,D)},Y.prototype._initArray=function(O,G,D){if(I(typeof O.length==="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W,A,H=0;if(D==="be"){for(Q=O.length-1,W=0;Q>=0;Q-=3)if(A=O[Q]|O[Q-1]<<8|O[Q-2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}else if(D==="le"){for(Q=0,W=0;Q<O.length;Q+=3)if(A=O[Q]|O[Q+1]<<8|O[Q+2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}return this.strip()};function T(O,G){var D=O.charCodeAt(G);if(D>=65&&D<=70)return D-55;else if(D>=97&&D<=102)return D-87;else return D-48&15}function L(O,G,D){var Q=T(O,D);if(D-1>=G)Q|=T(O,D-1)<<4;return Q}Y.prototype._parseHex=function(O,G,D){this.length=Math.ceil((O.length-G)/6),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W=0,A=0,H;if(D==="be")for(Q=O.length-1;Q>=G;Q-=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8;else{var z=O.length-G;for(Q=z%2===0?G+1:G;Q<O.length;Q+=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8}this.strip()};function E(O,G,D,Q){var W=0,A=Math.min(O.length,D);for(var H=G;H<A;H++){var z=O.charCodeAt(H)-48;if(W*=Q,z>=49)W+=z-49+10;else if(z>=17)W+=z-17+10;else W+=z}return W}Y.prototype._parseBase=function(O,G,D){this.words=[0],this.length=1;for(var Q=0,W=1;W<=67108863;W*=G)Q++;Q--,W=W/G|0;var A=O.length-D,H=A%Q,z=Math.min(A,A-H)+D,X=0;for(var K=D;K<z;K+=Q)if(X=E(O,K,K+Q,G),this.imuln(W),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(H!==0){var R=1;X=E(O,K,O.length,G);for(K=0;K<H;K++)R*=G;if(this.imuln(R),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},Y.prototype.copy=function(O){O.words=Array(this.length);for(var G=0;G<this.length;G++)O.words[G]=this.words[G];O.length=this.length,O.negative=this.negative,O.red=this.red},Y.prototype.clone=function(){var O=new Y(null);return this.copy(O),O},Y.prototype._expand=function(O){while(this.length<O)this.words[this.length++]=0;return this},Y.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},Y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Z=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(O,G){O=O||10,G=G|0||1;var D;if(O===16||O==="hex"){D="";var Q=0,W=0;for(var A=0;A<this.length;A++){var H=this.words[A],z=((H<<Q|W)&16777215).toString(16);if(W=H>>>24-Q&16777215,Q+=2,Q>=26)Q-=26,A--;if(W!==0||A!==this.length-1)D=F[6-z.length]+z+D;else D=z+D}if(W!==0)D=W.toString(16)+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}if(O===(O|0)&&O>=2&&O<=36){var X=Z[O],K=P[O];D="";var R=this.clone();R.negative=0;while(!R.isZero()){var v=R.modn(K).toString(O);if(R=R.idivn(K),!R.isZero())D=F[X-v.length]+v+D;else D=v+D}if(this.isZero())D="0"+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}I(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var O=this.words[0];if(this.length===2)O+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)O+=4503599627370496+this.words[1]*67108864;else if(this.length>2)I(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-O:O},Y.prototype.toJSON=function(){return this.toString(16)},Y.prototype.toBuffer=function(O,G){return I(typeof M<"u"),this.toArrayLike(M,O,G)},Y.prototype.toArray=function(O,G){return this.toArrayLike(Array,O,G)},Y.prototype.toArrayLike=function(O,G,D){var Q=this.byteLength(),W=D||Math.max(1,Q);I(Q<=W,"byte array longer than desired length"),I(W>0,"Requested array length <= 0"),this.strip();var A=G==="le",H=new O(W),z,X,K=this.clone();if(!A){for(X=0;X<W-Q;X++)H[X]=0;for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[W-X-1]=z}else{for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[X]=z;for(;X<W;X++)H[X]=0}return H},Math.clz32)Y.prototype._countBits=function(O){return 32-Math.clz32(O)};else Y.prototype._countBits=function(O){var G=O,D=0;if(G>=4096)D+=13,G>>>=13;if(G>=64)D+=7,G>>>=7;if(G>=8)D+=4,G>>>=4;if(G>=2)D+=2,G>>>=2;return D+G};Y.prototype._zeroBits=function(O){if(O===0)return 26;var G=O,D=0;if((G&8191)===0)D+=13,G>>>=13;if((G&127)===0)D+=7,G>>>=7;if((G&15)===0)D+=4,G>>>=4;if((G&3)===0)D+=2,G>>>=2;if((G&1)===0)D++;return D},Y.prototype.bitLength=function(){var O=this.words[this.length-1],G=this._countBits(O);return(this.length-1)*26+G};function q(O){var G=Array(O.bitLength());for(var D=0;D<G.length;D++){var Q=D/26|0,W=D%26;G[D]=(O.words[Q]&1<<W)>>>W}return G}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var O=0;for(var G=0;G<this.length;G++){var D=this._zeroBits(this.words[G]);if(O+=D,D!==26)break}return O},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(O){if(this.negative!==0)return this.abs().inotn(O).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(O){if(this.testn(O-1))return this.notn(O).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(O){while(this.length<O.length)this.words[this.length++]=0;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]|O.words[G];return this.strip()},Y.prototype.ior=function(O){return I((this.negative|O.negative)===0),this.iuor(O)},Y.prototype.or=function(O){if(this.length>O.length)return this.clone().ior(O);return O.clone().ior(this)},Y.prototype.uor=function(O){if(this.length>O.length)return this.clone().iuor(O);return O.clone().iuor(this)},Y.prototype.iuand=function(O){var G;if(this.length>O.length)G=O;else G=this;for(var D=0;D<G.length;D++)this.words[D]=this.words[D]&O.words[D];return this.length=G.length,this.strip()},Y.prototype.iand=function(O){return I((this.negative|O.negative)===0),this.iuand(O)},Y.prototype.and=function(O){if(this.length>O.length)return this.clone().iand(O);return O.clone().iand(this)},Y.prototype.uand=function(O){if(this.length>O.length)return this.clone().iuand(O);return O.clone().iuand(this)},Y.prototype.iuxor=function(O){var G,D;if(this.length>O.length)G=this,D=O;else G=O,D=this;for(var Q=0;Q<D.length;Q++)this.words[Q]=G.words[Q]^D.words[Q];if(this!==G)for(;Q<G.length;Q++)this.words[Q]=G.words[Q];return this.length=G.length,this.strip()},Y.prototype.ixor=function(O){return I((this.negative|O.negative)===0),this.iuxor(O)},Y.prototype.xor=function(O){if(this.length>O.length)return this.clone().ixor(O);return O.clone().ixor(this)},Y.prototype.uxor=function(O){if(this.length>O.length)return this.clone().iuxor(O);return O.clone().iuxor(this)},Y.prototype.inotn=function(O){I(typeof O==="number"&&O>=0);var G=Math.ceil(O/26)|0,D=O%26;if(this._expand(G),D>0)G--;for(var Q=0;Q<G;Q++)this.words[Q]=~this.words[Q]&67108863;if(D>0)this.words[Q]=~this.words[Q]&67108863>>26-D;return this.strip()},Y.prototype.notn=function(O){return this.clone().inotn(O)},Y.prototype.setn=function(O,G){I(typeof O==="number"&&O>=0);var D=O/26|0,Q=O%26;if(this._expand(D+1),G)this.words[D]=this.words[D]|1<<Q;else this.words[D]=this.words[D]&~(1<<Q);return this.strip()},Y.prototype.iadd=function(O){var G;if(this.negative!==0&&O.negative===0)return this.negative=0,G=this.isub(O),this.negative^=1,this._normSign();else if(this.negative===0&&O.negative!==0)return O.negative=0,G=this.isub(O),O.negative=1,G._normSign();var D,Q;if(this.length>O.length)D=this,Q=O;else D=O,Q=this;var W=0;for(var A=0;A<Q.length;A++)G=(D.words[A]|0)+(Q.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;for(;W!==0&&A<D.length;A++)G=(D.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;if(this.length=D.length,W!==0)this.words[this.length]=W,this.length++;else if(D!==this)for(;A<D.length;A++)this.words[A]=D.words[A];return this},Y.prototype.add=function(O){var G;if(O.negative!==0&&this.negative===0)return O.negative=0,G=this.sub(O),O.negative^=1,G;else if(O.negative===0&&this.negative!==0)return this.negative=0,G=O.sub(this),this.negative=1,G;if(this.length>O.length)return this.clone().iadd(O);return O.clone().iadd(this)},Y.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var G=this.iadd(O);return O.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var D=this.cmp(O);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,W;if(D>0)Q=this,W=O;else Q=O,W=this;var A=0;for(var H=0;H<W.length;H++)G=(Q.words[H]|0)-(W.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;for(;A!==0&&H<Q.length;H++)G=(Q.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;if(A===0&&H<Q.length&&Q!==this)for(;H<Q.length;H++)this.words[H]=Q.words[H];if(this.length=Math.max(this.length,H),Q!==this)this.negative=1;return this.strip()},Y.prototype.sub=function(O){return this.clone().isub(O)};function k(O,G,D){D.negative=G.negative^O.negative;var Q=O.length+G.length|0;D.length=Q,Q=Q-1|0;var W=O.words[0]|0,A=G.words[0]|0,H=W*A,z=H&67108863,X=H/67108864|0;D.words[0]=z;for(var K=1;K<Q;K++){var R=X>>>26,v=X&67108863,j=Math.min(K,G.length-1);for(var c=Math.max(0,K-O.length+1);c<=j;c++){var h=K-c|0;W=O.words[h]|0,A=G.words[c]|0,H=W*A+v,R+=H/67108864|0,v=H&67108863}D.words[K]=v|0,X=R|0}if(X!==0)D.words[K]=X|0;else D.length--;return D.strip()}var C=function(O,G,D){var Q=O.words,W=G.words,A=D.words,H=0,z,X,K,R=Q[0]|0,v=R&8191,j=R>>>13,c=Q[1]|0,h=c&8191,n=c>>>13,D0=Q[2]|0,i=D0&8191,l=D0>>>13,X0=Q[3]|0,m=X0&8191,s=X0>>>13,h0=Q[4]|0,f=h0&8191,u=h0>>>13,J0=Q[5]|0,t=J0&8191,a=J0>>>13,M0=Q[6]|0,y=M0&8191,r=M0>>>13,c0=Q[7]|0,d=c0&8191,I0=c0>>>13,b0=Q[8]|0,A0=b0&8191,H0=b0>>>13,X$=Q[9]|0,z0=X$&8191,F0=X$>>>13,Y$=W[0]|0,Z0=Y$&8191,E0=Y$>>>13,N$=W[1]|0,P0=N$&8191,g0=N$>>>13,x$=W[2]|0,j0=x$&8191,T0=x$>>>13,j$=W[3]|0,_0=j$&8191,q0=j$>>>13,q$=W[4]|0,N0=q$&8191,x0=q$>>>13,R$=W[5]|0,R0=R$&8191,B=R$>>>13,b=W[6]|0,e=b&8191,$0=b>>>13,u0=W[7]|0,K0=u0&8191,L0=u0>>>13,J$=W[8]|0,C0=J$&8191,B0=J$>>>13,_$=W[9]|0,k0=_$&8191,v0=_$>>>13;D.negative=O.negative^G.negative,D.length=19,z=Math.imul(v,Z0),X=Math.imul(v,E0),X=X+Math.imul(j,Z0)|0,K=Math.imul(j,E0);var Q$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,z=Math.imul(h,Z0),X=Math.imul(h,E0),X=X+Math.imul(n,Z0)|0,K=Math.imul(n,E0),z=z+Math.imul(v,P0)|0,X=X+Math.imul(v,g0)|0,X=X+Math.imul(j,P0)|0,K=K+Math.imul(j,g0)|0;var r0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,z=Math.imul(i,Z0),X=Math.imul(i,E0),X=X+Math.imul(l,Z0)|0,K=Math.imul(l,E0),z=z+Math.imul(h,P0)|0,X=X+Math.imul(h,g0)|0,X=X+Math.imul(n,P0)|0,K=K+Math.imul(n,g0)|0,z=z+Math.imul(v,j0)|0,X=X+Math.imul(v,T0)|0,X=X+Math.imul(j,j0)|0,K=K+Math.imul(j,T0)|0;var o0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(o0>>>26)|0,o0&=67108863,z=Math.imul(m,Z0),X=Math.imul(m,E0),X=X+Math.imul(s,Z0)|0,K=Math.imul(s,E0),z=z+Math.imul(i,P0)|0,X=X+Math.imul(i,g0)|0,X=X+Math.imul(l,P0)|0,K=K+Math.imul(l,g0)|0,z=z+Math.imul(h,j0)|0,X=X+Math.imul(h,T0)|0,X=X+Math.imul(n,j0)|0,K=K+Math.imul(n,T0)|0,z=z+Math.imul(v,_0)|0,X=X+Math.imul(v,q0)|0,X=X+Math.imul(j,_0)|0,K=K+Math.imul(j,q0)|0;var a0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,z=Math.imul(f,Z0),X=Math.imul(f,E0),X=X+Math.imul(u,Z0)|0,K=Math.imul(u,E0),z=z+Math.imul(m,P0)|0,X=X+Math.imul(m,g0)|0,X=X+Math.imul(s,P0)|0,K=K+Math.imul(s,g0)|0,z=z+Math.imul(i,j0)|0,X=X+Math.imul(i,T0)|0,X=X+Math.imul(l,j0)|0,K=K+Math.imul(l,T0)|0,z=z+Math.imul(h,_0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(n,_0)|0,K=K+Math.imul(n,q0)|0,z=z+Math.imul(v,N0)|0,X=X+Math.imul(v,x0)|0,X=X+Math.imul(j,N0)|0,K=K+Math.imul(j,x0)|0;var e0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,z=Math.imul(t,Z0),X=Math.imul(t,E0),X=X+Math.imul(a,Z0)|0,K=Math.imul(a,E0),z=z+Math.imul(f,P0)|0,X=X+Math.imul(f,g0)|0,X=X+Math.imul(u,P0)|0,K=K+Math.imul(u,g0)|0,z=z+Math.imul(m,j0)|0,X=X+Math.imul(m,T0)|0,X=X+Math.imul(s,j0)|0,K=K+Math.imul(s,T0)|0,z=z+Math.imul(i,_0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(l,_0)|0,K=K+Math.imul(l,q0)|0,z=z+Math.imul(h,N0)|0,X=X+Math.imul(h,x0)|0,X=X+Math.imul(n,N0)|0,K=K+Math.imul(n,x0)|0,z=z+Math.imul(v,R0)|0,X=X+Math.imul(v,B)|0,X=X+Math.imul(j,R0)|0,K=K+Math.imul(j,B)|0;var S$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(S$>>>26)|0,S$&=67108863,z=Math.imul(y,Z0),X=Math.imul(y,E0),X=X+Math.imul(r,Z0)|0,K=Math.imul(r,E0),z=z+Math.imul(t,P0)|0,X=X+Math.imul(t,g0)|0,X=X+Math.imul(a,P0)|0,K=K+Math.imul(a,g0)|0,z=z+Math.imul(f,j0)|0,X=X+Math.imul(f,T0)|0,X=X+Math.imul(u,j0)|0,K=K+Math.imul(u,T0)|0,z=z+Math.imul(m,_0)|0,X=X+Math.imul(m,q0)|0,X=X+Math.imul(s,_0)|0,K=K+Math.imul(s,q0)|0,z=z+Math.imul(i,N0)|0,X=X+Math.imul(i,x0)|0,X=X+Math.imul(l,N0)|0,K=K+Math.imul(l,x0)|0,z=z+Math.imul(h,R0)|0,X=X+Math.imul(h,B)|0,X=X+Math.imul(n,R0)|0,K=K+Math.imul(n,B)|0,z=z+Math.imul(v,e)|0,X=X+Math.imul(v,$0)|0,X=X+Math.imul(j,e)|0,K=K+Math.imul(j,$0)|0;var W$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(W$>>>26)|0,W$&=67108863,z=Math.imul(d,Z0),X=Math.imul(d,E0),X=X+Math.imul(I0,Z0)|0,K=Math.imul(I0,E0),z=z+Math.imul(y,P0)|0,X=X+Math.imul(y,g0)|0,X=X+Math.imul(r,P0)|0,K=K+Math.imul(r,g0)|0,z=z+Math.imul(t,j0)|0,X=X+Math.imul(t,T0)|0,X=X+Math.imul(a,j0)|0,K=K+Math.imul(a,T0)|0,z=z+Math.imul(f,_0)|0,X=X+Math.imul(f,q0)|0,X=X+Math.imul(u,_0)|0,K=K+Math.imul(u,q0)|0,z=z+Math.imul(m,N0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(s,N0)|0,K=K+Math.imul(s,x0)|0,z=z+Math.imul(i,R0)|0,X=X+Math.imul(i,B)|0,X=X+Math.imul(l,R0)|0,K=K+Math.imul(l,B)|0,z=z+Math.imul(h,e)|0,X=X+Math.imul(h,$0)|0,X=X+Math.imul(n,e)|0,K=K+Math.imul(n,$0)|0,z=z+Math.imul(v,K0)|0,X=X+Math.imul(v,L0)|0,X=X+Math.imul(j,K0)|0,K=K+Math.imul(j,L0)|0;var D$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(D$>>>26)|0,D$&=67108863,z=Math.imul(A0,Z0),X=Math.imul(A0,E0),X=X+Math.imul(H0,Z0)|0,K=Math.imul(H0,E0),z=z+Math.imul(d,P0)|0,X=X+Math.imul(d,g0)|0,X=X+Math.imul(I0,P0)|0,K=K+Math.imul(I0,g0)|0,z=z+Math.imul(y,j0)|0,X=X+Math.imul(y,T0)|0,X=X+Math.imul(r,j0)|0,K=K+Math.imul(r,T0)|0,z=z+Math.imul(t,_0)|0,X=X+Math.imul(t,q0)|0,X=X+Math.imul(a,_0)|0,K=K+Math.imul(a,q0)|0,z=z+Math.imul(f,N0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(u,N0)|0,K=K+Math.imul(u,x0)|0,z=z+Math.imul(m,R0)|0,X=X+Math.imul(m,B)|0,X=X+Math.imul(s,R0)|0,K=K+Math.imul(s,B)|0,z=z+Math.imul(i,e)|0,X=X+Math.imul(i,$0)|0,X=X+Math.imul(l,e)|0,K=K+Math.imul(l,$0)|0,z=z+Math.imul(h,K0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(n,K0)|0,K=K+Math.imul(n,L0)|0,z=z+Math.imul(v,C0)|0,X=X+Math.imul(v,B0)|0,X=X+Math.imul(j,C0)|0,K=K+Math.imul(j,B0)|0;var z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(z$>>>26)|0,z$&=67108863,z=Math.imul(z0,Z0),X=Math.imul(z0,E0),X=X+Math.imul(F0,Z0)|0,K=Math.imul(F0,E0),z=z+Math.imul(A0,P0)|0,X=X+Math.imul(A0,g0)|0,X=X+Math.imul(H0,P0)|0,K=K+Math.imul(H0,g0)|0,z=z+Math.imul(d,j0)|0,X=X+Math.imul(d,T0)|0,X=X+Math.imul(I0,j0)|0,K=K+Math.imul(I0,T0)|0,z=z+Math.imul(y,_0)|0,X=X+Math.imul(y,q0)|0,X=X+Math.imul(r,_0)|0,K=K+Math.imul(r,q0)|0,z=z+Math.imul(t,N0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(a,N0)|0,K=K+Math.imul(a,x0)|0,z=z+Math.imul(f,R0)|0,X=X+Math.imul(f,B)|0,X=X+Math.imul(u,R0)|0,K=K+Math.imul(u,B)|0,z=z+Math.imul(m,e)|0,X=X+Math.imul(m,$0)|0,X=X+Math.imul(s,e)|0,K=K+Math.imul(s,$0)|0,z=z+Math.imul(i,K0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(l,K0)|0,K=K+Math.imul(l,L0)|0,z=z+Math.imul(h,C0)|0,X=X+Math.imul(h,B0)|0,X=X+Math.imul(n,C0)|0,K=K+Math.imul(n,B0)|0,z=z+Math.imul(v,k0)|0,X=X+Math.imul(v,v0)|0,X=X+Math.imul(j,k0)|0,K=K+Math.imul(j,v0)|0;var K$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(K$>>>26)|0,K$&=67108863,z=Math.imul(z0,P0),X=Math.imul(z0,g0),X=X+Math.imul(F0,P0)|0,K=Math.imul(F0,g0),z=z+Math.imul(A0,j0)|0,X=X+Math.imul(A0,T0)|0,X=X+Math.imul(H0,j0)|0,K=K+Math.imul(H0,T0)|0,z=z+Math.imul(d,_0)|0,X=X+Math.imul(d,q0)|0,X=X+Math.imul(I0,_0)|0,K=K+Math.imul(I0,q0)|0,z=z+Math.imul(y,N0)|0,X=X+Math.imul(y,x0)|0,X=X+Math.imul(r,N0)|0,K=K+Math.imul(r,x0)|0,z=z+Math.imul(t,R0)|0,X=X+Math.imul(t,B)|0,X=X+Math.imul(a,R0)|0,K=K+Math.imul(a,B)|0,z=z+Math.imul(f,e)|0,X=X+Math.imul(f,$0)|0,X=X+Math.imul(u,e)|0,K=K+Math.imul(u,$0)|0,z=z+Math.imul(m,K0)|0,X=X+Math.imul(m,L0)|0,X=X+Math.imul(s,K0)|0,K=K+Math.imul(s,L0)|0,z=z+Math.imul(i,C0)|0,X=X+Math.imul(i,B0)|0,X=X+Math.imul(l,C0)|0,K=K+Math.imul(l,B0)|0,z=z+Math.imul(h,k0)|0,X=X+Math.imul(h,v0)|0,X=X+Math.imul(n,k0)|0,K=K+Math.imul(n,v0)|0;var A$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(A$>>>26)|0,A$&=67108863,z=Math.imul(z0,j0),X=Math.imul(z0,T0),X=X+Math.imul(F0,j0)|0,K=Math.imul(F0,T0),z=z+Math.imul(A0,_0)|0,X=X+Math.imul(A0,q0)|0,X=X+Math.imul(H0,_0)|0,K=K+Math.imul(H0,q0)|0,z=z+Math.imul(d,N0)|0,X=X+Math.imul(d,x0)|0,X=X+Math.imul(I0,N0)|0,K=K+Math.imul(I0,x0)|0,z=z+Math.imul(y,R0)|0,X=X+Math.imul(y,B)|0,X=X+Math.imul(r,R0)|0,K=K+Math.imul(r,B)|0,z=z+Math.imul(t,e)|0,X=X+Math.imul(t,$0)|0,X=X+Math.imul(a,e)|0,K=K+Math.imul(a,$0)|0,z=z+Math.imul(f,K0)|0,X=X+Math.imul(f,L0)|0,X=X+Math.imul(u,K0)|0,K=K+Math.imul(u,L0)|0,z=z+Math.imul(m,C0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(s,C0)|0,K=K+Math.imul(s,B0)|0,z=z+Math.imul(i,k0)|0,X=X+Math.imul(i,v0)|0,X=X+Math.imul(l,k0)|0,K=K+Math.imul(l,v0)|0;var H$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(H$>>>26)|0,H$&=67108863,z=Math.imul(z0,_0),X=Math.imul(z0,q0),X=X+Math.imul(F0,_0)|0,K=Math.imul(F0,q0),z=z+Math.imul(A0,N0)|0,X=X+Math.imul(A0,x0)|0,X=X+Math.imul(H0,N0)|0,K=K+Math.imul(H0,x0)|0,z=z+Math.imul(d,R0)|0,X=X+Math.imul(d,B)|0,X=X+Math.imul(I0,R0)|0,K=K+Math.imul(I0,B)|0,z=z+Math.imul(y,e)|0,X=X+Math.imul(y,$0)|0,X=X+Math.imul(r,e)|0,K=K+Math.imul(r,$0)|0,z=z+Math.imul(t,K0)|0,X=X+Math.imul(t,L0)|0,X=X+Math.imul(a,K0)|0,K=K+Math.imul(a,L0)|0,z=z+Math.imul(f,C0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(u,C0)|0,K=K+Math.imul(u,B0)|0,z=z+Math.imul(m,k0)|0,X=X+Math.imul(m,v0)|0,X=X+Math.imul(s,k0)|0,K=K+Math.imul(s,v0)|0;var F$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(F$>>>26)|0,F$&=67108863,z=Math.imul(z0,N0),X=Math.imul(z0,x0),X=X+Math.imul(F0,N0)|0,K=Math.imul(F0,x0),z=z+Math.imul(A0,R0)|0,X=X+Math.imul(A0,B)|0,X=X+Math.imul(H0,R0)|0,K=K+Math.imul(H0,B)|0,z=z+Math.imul(d,e)|0,X=X+Math.imul(d,$0)|0,X=X+Math.imul(I0,e)|0,K=K+Math.imul(I0,$0)|0,z=z+Math.imul(y,K0)|0,X=X+Math.imul(y,L0)|0,X=X+Math.imul(r,K0)|0,K=K+Math.imul(r,L0)|0,z=z+Math.imul(t,C0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(a,C0)|0,K=K+Math.imul(a,B0)|0,z=z+Math.imul(f,k0)|0,X=X+Math.imul(f,v0)|0,X=X+Math.imul(u,k0)|0,K=K+Math.imul(u,v0)|0;var L$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(L$>>>26)|0,L$&=67108863,z=Math.imul(z0,R0),X=Math.imul(z0,B),X=X+Math.imul(F0,R0)|0,K=Math.imul(F0,B),z=z+Math.imul(A0,e)|0,X=X+Math.imul(A0,$0)|0,X=X+Math.imul(H0,e)|0,K=K+Math.imul(H0,$0)|0,z=z+Math.imul(d,K0)|0,X=X+Math.imul(d,L0)|0,X=X+Math.imul(I0,K0)|0,K=K+Math.imul(I0,L0)|0,z=z+Math.imul(y,C0)|0,X=X+Math.imul(y,B0)|0,X=X+Math.imul(r,C0)|0,K=K+Math.imul(r,B0)|0,z=z+Math.imul(t,k0)|0,X=X+Math.imul(t,v0)|0,X=X+Math.imul(a,k0)|0,K=K+Math.imul(a,v0)|0;var E$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(E$>>>26)|0,E$&=67108863,z=Math.imul(z0,e),X=Math.imul(z0,$0),X=X+Math.imul(F0,e)|0,K=Math.imul(F0,$0),z=z+Math.imul(A0,K0)|0,X=X+Math.imul(A0,L0)|0,X=X+Math.imul(H0,K0)|0,K=K+Math.imul(H0,L0)|0,z=z+Math.imul(d,C0)|0,X=X+Math.imul(d,B0)|0,X=X+Math.imul(I0,C0)|0,K=K+Math.imul(I0,B0)|0,z=z+Math.imul(y,k0)|0,X=X+Math.imul(y,v0)|0,X=X+Math.imul(r,k0)|0,K=K+Math.imul(r,v0)|0;var Z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,z=Math.imul(z0,K0),X=Math.imul(z0,L0),X=X+Math.imul(F0,K0)|0,K=Math.imul(F0,L0),z=z+Math.imul(A0,C0)|0,X=X+Math.imul(A0,B0)|0,X=X+Math.imul(H0,C0)|0,K=K+Math.imul(H0,B0)|0,z=z+Math.imul(d,k0)|0,X=X+Math.imul(d,v0)|0,X=X+Math.imul(I0,k0)|0,K=K+Math.imul(I0,v0)|0;var v$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(v$>>>26)|0,v$&=67108863,z=Math.imul(z0,C0),X=Math.imul(z0,B0),X=X+Math.imul(F0,C0)|0,K=Math.imul(F0,B0),z=z+Math.imul(A0,k0)|0,X=X+Math.imul(A0,v0)|0,X=X+Math.imul(H0,k0)|0,K=K+Math.imul(H0,v0)|0;var M$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(M$>>>26)|0,M$&=67108863,z=Math.imul(z0,k0),X=Math.imul(z0,v0),X=X+Math.imul(F0,k0)|0,K=Math.imul(F0,v0);var P$=(H+z|0)+((X&8191)<<13)|0;if(H=(K+(X>>>13)|0)+(P$>>>26)|0,P$&=67108863,A[0]=Q$,A[1]=r0,A[2]=o0,A[3]=a0,A[4]=e0,A[5]=S$,A[6]=W$,A[7]=D$,A[8]=z$,A[9]=K$,A[10]=A$,A[11]=H$,A[12]=F$,A[13]=L$,A[14]=E$,A[15]=Z$,A[16]=v$,A[17]=M$,A[18]=P$,H!==0)A[19]=H,D.length++;return D};if(!Math.imul)C=k;function _(O,G,D){D.negative=G.negative^O.negative,D.length=O.length+G.length;var Q=0,W=0;for(var A=0;A<D.length-1;A++){var H=W;W=0;var z=Q&67108863,X=Math.min(A,G.length-1);for(var K=Math.max(0,A-O.length+1);K<=X;K++){var R=A-K,v=O.words[R]|0,j=G.words[K]|0,c=v*j,h=c&67108863;H=H+(c/67108864|0)|0,h=h+z|0,z=h&67108863,H=H+(h>>>26)|0,W+=H>>>26,H&=67108863}D.words[A]=z,Q=H,H=W}if(Q!==0)D.words[A]=Q;else D.length--;return D.strip()}function g(O,G,D){var Q=new N;return Q.mulp(O,G,D)}Y.prototype.mulTo=function(O,G){var D,Q=this.length+O.length;if(this.length===10&&O.length===10)D=C(this,O,G);else if(Q<63)D=k(this,O,G);else if(Q<1024)D=_(this,O,G);else D=g(this,O,G);return D};function N(O,G){this.x=O,this.y=G}N.prototype.makeRBT=function(O){var G=Array(O),D=Y.prototype._countBits(O)-1;for(var Q=0;Q<O;Q++)G[Q]=this.revBin(Q,D,O);return G},N.prototype.revBin=function(O,G,D){if(O===0||O===D-1)return O;var Q=0;for(var W=0;W<G;W++)Q|=(O&1)<<G-W-1,O>>=1;return Q},N.prototype.permute=function(O,G,D,Q,W,A){for(var H=0;H<A;H++)Q[H]=G[O[H]],W[H]=D[O[H]]},N.prototype.transform=function(O,G,D,Q,W,A){this.permute(A,O,G,D,Q,W);for(var H=1;H<W;H<<=1){var z=H<<1,X=Math.cos(2*Math.PI/z),K=Math.sin(2*Math.PI/z);for(var R=0;R<W;R+=z){var v=X,j=K;for(var c=0;c<H;c++){var h=D[R+c],n=Q[R+c],D0=D[R+c+H],i=Q[R+c+H],l=v*D0-j*i;if(i=v*i+j*D0,D0=l,D[R+c]=h+D0,Q[R+c]=n+i,D[R+c+H]=h-D0,Q[R+c+H]=n-i,c!==z)l=X*v-K*j,j=X*j+K*v,v=l}}}},N.prototype.guessLen13b=function(O,G){var D=Math.max(G,O)|1,Q=D&1,W=0;for(D=D/2|0;D;D=D>>>1)W++;return 1<<W+1+Q},N.prototype.conjugate=function(O,G,D){if(D<=1)return;for(var Q=0;Q<D/2;Q++){var W=O[Q];O[Q]=O[D-Q-1],O[D-Q-1]=W,W=G[Q],G[Q]=-G[D-Q-1],G[D-Q-1]=-W}},N.prototype.normalize13b=function(O,G){var D=0;for(var Q=0;Q<G/2;Q++){var W=Math.round(O[2*Q+1]/G)*8192+Math.round(O[2*Q]/G)+D;if(O[Q]=W&67108863,W<67108864)D=0;else D=W/67108864|0}return O},N.prototype.convert13b=function(O,G,D,Q){var W=0;for(var A=0;A<G;A++)W=W+(O[A]|0),D[2*A]=W&8191,W=W>>>13,D[2*A+1]=W&8191,W=W>>>13;for(A=2*G;A<Q;++A)D[A]=0;I(W===0),I((W&-8192)===0)},N.prototype.stub=function(O){var G=Array(O);for(var D=0;D<O;D++)G[D]=0;return G},N.prototype.mulp=function(O,G,D){var Q=2*this.guessLen13b(O.length,G.length),W=this.makeRBT(Q),A=this.stub(Q),H=Array(Q),z=Array(Q),X=Array(Q),K=Array(Q),R=Array(Q),v=Array(Q),j=D.words;j.length=Q,this.convert13b(O.words,O.length,H,Q),this.convert13b(G.words,G.length,K,Q),this.transform(H,A,z,X,Q,W),this.transform(K,A,R,v,Q,W);for(var c=0;c<Q;c++){var h=z[c]*R[c]-X[c]*v[c];X[c]=z[c]*v[c]+X[c]*R[c],z[c]=h}return this.conjugate(z,X,Q),this.transform(z,X,j,A,Q,W),this.conjugate(j,A,Q),this.normalize13b(j,Q),D.negative=O.negative^G.negative,D.length=O.length+G.length,D.strip()},Y.prototype.mul=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),this.mulTo(O,G)},Y.prototype.mulf=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),g(this,O,G)},Y.prototype.imul=function(O){return this.clone().mulTo(O,this)},Y.prototype.imuln=function(O){I(typeof O==="number"),I(O<67108864);var G=0;for(var D=0;D<this.length;D++){var Q=(this.words[D]|0)*O,W=(Q&67108863)+(G&67108863);G>>=26,G+=Q/67108864|0,G+=W>>>26,this.words[D]=W&67108863}if(G!==0)this.words[D]=G,this.length++;return this.length=O===0?1:this.length,this},Y.prototype.muln=function(O){return this.clone().imuln(O)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(O){var G=q(O);if(G.length===0)return new Y(1);var D=this;for(var Q=0;Q<G.length;Q++,D=D.sqr())if(G[Q]!==0)break;if(++Q<G.length)for(var W=D.sqr();Q<G.length;Q++,W=W.sqr()){if(G[Q]===0)continue;D=D.mul(W)}return D},Y.prototype.iushln=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=67108863>>>26-G<<26-G,W;if(G!==0){var A=0;for(W=0;W<this.length;W++){var H=this.words[W]&Q,z=(this.words[W]|0)-H<<G;this.words[W]=z|A,A=H>>>26-G}if(A)this.words[W]=A,this.length++}if(D!==0){for(W=this.length-1;W>=0;W--)this.words[W+D]=this.words[W];for(W=0;W<D;W++)this.words[W]=0;this.length+=D}return this.strip()},Y.prototype.ishln=function(O){return I(this.negative===0),this.iushln(O)},Y.prototype.iushrn=function(O,G,D){I(typeof O==="number"&&O>=0);var Q;if(G)Q=(G-G%26)/26;else Q=0;var W=O%26,A=Math.min((O-W)/26,this.length),H=67108863^67108863>>>W<<W,z=D;if(Q-=A,Q=Math.max(0,Q),z){for(var X=0;X<A;X++)z.words[X]=this.words[X];z.length=A}if(A===0);else if(this.length>A){this.length-=A;for(X=0;X<this.length;X++)this.words[X]=this.words[X+A]}else this.words[0]=0,this.length=1;var K=0;for(X=this.length-1;X>=0&&(K!==0||X>=Q);X--){var R=this.words[X]|0;this.words[X]=K<<26-W|R>>>W,K=R&H}if(z&&K!==0)z.words[z.length++]=K;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},Y.prototype.ishrn=function(O,G,D){return I(this.negative===0),this.iushrn(O,G,D)},Y.prototype.shln=function(O){return this.clone().ishln(O)},Y.prototype.ushln=function(O){return this.clone().iushln(O)},Y.prototype.shrn=function(O){return this.clone().ishrn(O)},Y.prototype.ushrn=function(O){return this.clone().iushrn(O)},Y.prototype.testn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return!1;var W=this.words[D];return!!(W&Q)},Y.prototype.imaskn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(G!==0)D++;if(this.length=Math.min(D,this.length),G!==0){var Q=67108863^67108863>>>G<<G;this.words[this.length-1]&=Q}return this.strip()},Y.prototype.maskn=function(O){return this.clone().imaskn(O)},Y.prototype.iaddn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.isubn(-O);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<O)return this.words[0]=O-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(O),this.negative=1,this}return this._iaddn(O)},Y.prototype._iaddn=function(O){this.words[0]+=O;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},Y.prototype.isubn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},Y.prototype.addn=function(O){return this.clone().iaddn(O)},Y.prototype.subn=function(O){return this.clone().isubn(O)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(O,G,D){var Q=O.length+D,W;this._expand(Q);var A,H=0;for(W=0;W<O.length;W++){A=(this.words[W+D]|0)+H;var z=(O.words[W]|0)*G;A-=z&67108863,H=(A>>26)-(z/67108864|0),this.words[W+D]=A&67108863}for(;W<this.length-D;W++)A=(this.words[W+D]|0)+H,H=A>>26,this.words[W+D]=A&67108863;if(H===0)return this.strip();I(H===-1),H=0;for(W=0;W<this.length;W++)A=-(this.words[W]|0)+H,H=A>>26,this.words[W]=A&67108863;return this.negative=1,this.strip()},Y.prototype._wordDiv=function(O,G){var D=this.length-O.length,Q=this.clone(),W=O,A=W.words[W.length-1]|0,H=this._countBits(A);if(D=26-H,D!==0)W=W.ushln(D),Q.iushln(D),A=W.words[W.length-1]|0;var z=Q.length-W.length,X;if(G!=="mod"){X=new Y(null),X.length=z+1,X.words=Array(X.length);for(var K=0;K<X.length;K++)X.words[K]=0}var R=Q.clone()._ishlnsubmul(W,1,z);if(R.negative===0){if(Q=R,X)X.words[z]=1}for(var v=z-1;v>=0;v--){var j=(Q.words[W.length+v]|0)*67108864+(Q.words[W.length+v-1]|0);j=Math.min(j/A|0,67108863),Q._ishlnsubmul(W,j,v);while(Q.negative!==0)if(j--,Q.negative=0,Q._ishlnsubmul(W,1,v),!Q.isZero())Q.negative^=1;if(X)X.words[v]=j}if(X)X.strip();if(Q.strip(),G!=="div"&&D!==0)Q.iushrn(D);return{div:X||null,mod:Q}},Y.prototype.divmod=function(O,G,D){if(I(!O.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var Q,W,A;if(this.negative!==0&&O.negative===0){if(A=this.neg().divmod(O,G),G!=="mod")Q=A.div.neg();if(G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.iadd(O)}return{div:Q,mod:W}}if(this.negative===0&&O.negative!==0){if(A=this.divmod(O.neg(),G),G!=="mod")Q=A.div.neg();return{div:Q,mod:A.mod}}if((this.negative&O.negative)!==0){if(A=this.neg().divmod(O.neg(),G),G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.isub(O)}return{div:A.div,mod:W}}if(O.length>this.length||this.cmp(O)<0)return{div:new Y(0),mod:this};if(O.length===1){if(G==="div")return{div:this.divn(O.words[0]),mod:null};if(G==="mod")return{div:null,mod:new Y(this.modn(O.words[0]))};return{div:this.divn(O.words[0]),mod:new Y(this.modn(O.words[0]))}}return this._wordDiv(O,G)},Y.prototype.div=function(O){return this.divmod(O,"div",!1).div},Y.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},Y.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},Y.prototype.divRound=function(O){var G=this.divmod(O);if(G.mod.isZero())return G.div;var D=G.div.negative!==0?G.mod.isub(O):G.mod,Q=O.ushrn(1),W=O.andln(1),A=D.cmp(Q);if(A<0||W===1&&A===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},Y.prototype.modn=function(O){I(O<=67108863);var G=67108864%O,D=0;for(var Q=this.length-1;Q>=0;Q--)D=(G*D+(this.words[Q]|0))%O;return D},Y.prototype.idivn=function(O){I(O<=67108863);var G=0;for(var D=this.length-1;D>=0;D--){var Q=(this.words[D]|0)+G*67108864;this.words[D]=Q/O|0,G=Q%O}return this.strip()},Y.prototype.divn=function(O){return this.clone().idivn(O)},Y.prototype.egcd=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=new Y(0),H=new Y(1),z=0;while(G.isEven()&&D.isEven())G.iushrn(1),D.iushrn(1),++z;var X=D.clone(),K=G.clone();while(!G.isZero()){for(var R=0,v=1;(G.words[0]&v)===0&&R<26;++R,v<<=1);if(R>0){G.iushrn(R);while(R-- >0){if(Q.isOdd()||W.isOdd())Q.iadd(X),W.isub(K);Q.iushrn(1),W.iushrn(1)}}for(var j=0,c=1;(D.words[0]&c)===0&&j<26;++j,c<<=1);if(j>0){D.iushrn(j);while(j-- >0){if(A.isOdd()||H.isOdd())A.iadd(X),H.isub(K);A.iushrn(1),H.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(A),W.isub(H);else D.isub(G),A.isub(Q),H.isub(W)}return{a:A,b:H,gcd:D.iushln(z)}},Y.prototype._invmp=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=D.clone();while(G.cmpn(1)>0&&D.cmpn(1)>0){for(var H=0,z=1;(G.words[0]&z)===0&&H<26;++H,z<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Q.isOdd())Q.iadd(A);Q.iushrn(1)}}for(var X=0,K=1;(D.words[0]&K)===0&&X<26;++X,K<<=1);if(X>0){D.iushrn(X);while(X-- >0){if(W.isOdd())W.iadd(A);W.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(W);else D.isub(G),W.isub(Q)}var R;if(G.cmpn(1)===0)R=Q;else R=W;if(R.cmpn(0)<0)R.iadd(O);return R},Y.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var G=this.clone(),D=O.clone();G.negative=0,D.negative=0;for(var Q=0;G.isEven()&&D.isEven();Q++)G.iushrn(1),D.iushrn(1);do{while(G.isEven())G.iushrn(1);while(D.isEven())D.iushrn(1);var W=G.cmp(D);if(W<0){var A=G;G=D,D=A}else if(W===0||D.cmpn(1)===0)break;G.isub(D)}while(!0);return D.iushln(Q)},Y.prototype.invm=function(O){return this.egcd(O).a.umod(O)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(O){return this.words[0]&O},Y.prototype.bincn=function(O){I(typeof O==="number");var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return this._expand(D+1),this.words[D]|=Q,this;var W=Q;for(var A=D;W!==0&&A<this.length;A++){var H=this.words[A]|0;H+=W,W=H>>>26,H&=67108863,this.words[A]=H}if(W!==0)this.words[A]=W,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(O){var G=O<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var D;if(this.length>1)D=1;else{if(G)O=-O;I(O<=67108863,"Number is too big");var Q=this.words[0]|0;D=Q===O?0:Q<O?-1:1}if(this.negative!==0)return-D|0;return D},Y.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var G=this.ucmp(O);if(this.negative!==0)return-G|0;return G},Y.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;var G=0;for(var D=this.length-1;D>=0;D--){var Q=this.words[D]|0,W=O.words[D]|0;if(Q===W)continue;if(Q<W)G=-1;else if(Q>W)G=1;break}return G},Y.prototype.gtn=function(O){return this.cmpn(O)===1},Y.prototype.gt=function(O){return this.cmp(O)===1},Y.prototype.gten=function(O){return this.cmpn(O)>=0},Y.prototype.gte=function(O){return this.cmp(O)>=0},Y.prototype.ltn=function(O){return this.cmpn(O)===-1},Y.prototype.lt=function(O){return this.cmp(O)===-1},Y.prototype.lten=function(O){return this.cmpn(O)<=0},Y.prototype.lte=function(O){return this.cmp(O)<=0},Y.prototype.eqn=function(O){return this.cmpn(O)===0},Y.prototype.eq=function(O){return this.cmp(O)===0},Y.red=function(O){return new p(O)},Y.prototype.toRed=function(O){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},Y.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(O){return this.red=O,this},Y.prototype.forceRed=function(O){return I(!this.red,"Already a number in reduction context"),this._forceRed(O)},Y.prototype.redAdd=function(O){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},Y.prototype.redIAdd=function(O){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},Y.prototype.redSub=function(O){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},Y.prototype.redISub=function(O){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},Y.prototype.redShl=function(O){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},Y.prototype.redMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},Y.prototype.redIMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},Y.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(O){return I(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var x={k256:null,p224:null,p192:null,p25519:null};function w(O,G){this.name=O,this.p=new Y(G,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var O=new Y(null);return O.words=Array(Math.ceil(this.n/13)),O},w.prototype.ireduce=function(O){var G=O,D;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),D=G.bitLength();while(D>this.n);var Q=D<this.n?-1:G.ucmp(this.p);if(Q===0)G.words[0]=0,G.length=1;else if(Q>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},w.prototype.split=function(O,G){O.iushrn(this.n,0,G)},w.prototype.imulK=function(O){return O.imul(this.k)};function o(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(o,w),o.prototype.split=function(O,G){var D=4194303,Q=Math.min(O.length,9);for(var W=0;W<Q;W++)G.words[W]=O.words[W];if(G.length=Q,O.length<=9){O.words[0]=0,O.length=1;return}var A=O.words[9];G.words[G.length++]=A&D;for(W=10;W<O.length;W++){var H=O.words[W]|0;O.words[W-10]=(H&D)<<4|A>>>22,A=H}if(A>>>=22,O.words[W-10]=A,A===0&&O.length>10)O.length-=10;else O.length-=9},o.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;var G=0;for(var D=0;D<O.length;D++){var Q=O.words[D]|0;G+=Q*977,O.words[D]=G&67108863,G=Q*64+(G/67108864|0)}if(O.words[O.length-1]===0){if(O.length--,O.words[O.length-1]===0)O.length--}return O};function Q0(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(Q0,w);function V0(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(V0,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(Y0,w),Y0.prototype.imulK=function(O){var G=0;for(var D=0;D<O.length;D++){var Q=(O.words[D]|0)*19+G,W=Q&67108863;Q>>>=26,O.words[D]=W,G=Q}if(G!==0)O.words[O.length++]=G;return O},Y._prime=function(O){if(x[O])return x[O];var G;if(O==="k256")G=new o;else if(O==="p224")G=new Q0;else if(O==="p192")G=new V0;else if(O==="p25519")G=new Y0;else throw Error("Unknown prime "+O);return x[O]=G,G};function p(O){if(typeof O==="string"){var G=Y._prime(O);this.m=G.p,this.prime=G}else I(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}p.prototype._verify1=function(O){I(O.negative===0,"red works only with positives"),I(O.red,"red works only with red numbers")},p.prototype._verify2=function(O,G){I((O.negative|G.negative)===0,"red works only with positives"),I(O.red&&O.red===G.red,"red works only with red numbers")},p.prototype.imod=function(O){if(this.prime)return this.prime.ireduce(O)._forceRed(this);return O.umod(this.m)._forceRed(this)},p.prototype.neg=function(O){if(O.isZero())return O.clone();return this.m.sub(O)._forceRed(this)},p.prototype.add=function(O,G){this._verify2(O,G);var D=O.add(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D._forceRed(this)},p.prototype.iadd=function(O,G){this._verify2(O,G);var D=O.iadd(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D},p.prototype.sub=function(O,G){this._verify2(O,G);var D=O.sub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D._forceRed(this)},p.prototype.isub=function(O,G){this._verify2(O,G);var D=O.isub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D},p.prototype.shl=function(O,G){return this._verify1(O),this.imod(O.ushln(G))},p.prototype.imul=function(O,G){return this._verify2(O,G),this.imod(O.imul(G))},p.prototype.mul=function(O,G){return this._verify2(O,G),this.imod(O.mul(G))},p.prototype.isqr=function(O){return this.imul(O,O.clone())},p.prototype.sqr=function(O){return this.mul(O,O)},p.prototype.sqrt=function(O){if(O.isZero())return O.clone();var G=this.m.andln(3);if(I(G%2===1),G===3){var D=this.m.add(new Y(1)).iushrn(2);return this.pow(O,D)}var Q=this.m.subn(1),W=0;while(!Q.isZero()&&Q.andln(1)===0)W++,Q.iushrn(1);I(!Q.isZero());var A=new Y(1).toRed(this),H=A.redNeg(),z=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new Y(2*X*X).toRed(this);while(this.pow(X,z).cmp(H)!==0)X.redIAdd(H);var K=this.pow(X,Q),R=this.pow(O,Q.addn(1).iushrn(1)),v=this.pow(O,Q),j=W;while(v.cmp(A)!==0){var c=v;for(var h=0;c.cmp(A)!==0;h++)c=c.redSqr();I(h<j);var n=this.pow(K,new Y(1).iushln(j-h-1));R=R.redMul(n),K=n.redSqr(),v=v.redMul(K),j=h}return R},p.prototype.invm=function(O){var G=O._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(O,G){if(G.isZero())return new Y(1).toRed(this);if(G.cmpn(1)===0)return O.clone();var D=4,Q=Array(1<<D);Q[0]=new Y(1).toRed(this),Q[1]=O;for(var W=2;W<Q.length;W++)Q[W]=this.mul(Q[W-1],O);var A=Q[0],H=0,z=0,X=G.bitLength()%26;if(X===0)X=26;for(W=G.length-1;W>=0;W--){var K=G.words[W];for(var R=X-1;R>=0;R--){var v=K>>R&1;if(A!==Q[0])A=this.sqr(A);if(v===0&&H===0){z=0;continue}if(H<<=1,H|=v,z++,z!==D&&(W!==0||R!==0))continue;A=this.mul(A,Q[H]),z=0,H=0}X=26}return A},p.prototype.convertTo=function(O){var G=O.umod(this.m);return G===O?G.clone():G},p.prototype.convertFrom=function(O){var G=O.clone();return G.red=null,G},Y.mont=function(O){return new U0(O)};function U0(O){if(p.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S(U0,p),U0.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},U0.prototype.convertFrom=function(O){var G=this.imod(O.mul(this.rinv));return G.red=null,G},U0.prototype.imul=function(O,G){if(O.isZero()||G.isZero())return O.words[0]=0,O.length=1,O;var D=O.imul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.mul=function(O,G){if(O.isZero()||G.isZero())return new Y(0)._forceRed(this);var D=O.mul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.invm=function(O){var G=this.imod(O._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof U>"u"||U,$)}),uA=G0(($)=>{var U=iI(),J=o$(),V=$;V.define=function(S,Y){return new I(S,Y)};function I(S,Y){this.name=S,this.body=Y,this.decoders={},this.encoders={}}I.prototype._createNamed=function(S){var Y;try{Y=(()=>{throw new Error("Cannot require module "+"vm");})().runInThisContext("(function "+this.name+`(entity) {
10
+ `)+" "+D[1];return D[0]+I+" "+$.join(", ")+" "+D[1]}function IW($){return Array.isArray($)}function nQ($){return typeof $==="boolean"}function L4($){return $===null}function D2($){return $==null}function vW($){return typeof $==="number"}function E4($){return typeof $==="string"}function O2($){return typeof $==="symbol"}function BI($){return $===void 0}function A4($){return xI($)&&dQ($)==="[object RegExp]"}function xI($){return typeof $==="object"&&$!==null}function rQ($){return xI($)&&dQ($)==="[object Date]"}function F4($){return xI($)&&(dQ($)==="[object Error]"||$ instanceof Error)}function H4($){return typeof $==="function"}function J2($){return $===null||typeof $==="boolean"||typeof $==="number"||typeof $==="string"||typeof $==="symbol"||typeof $>"u"}function X2($){return $ instanceof Buffer}function dQ($){return Object.prototype.toString.call($)}function lQ($){return $<10?"0"+$.toString(10):$.toString(10)}function Y2(){var $=new Date,I=[lQ($.getHours()),lQ($.getMinutes()),lQ($.getSeconds())].join(":");return[$.getDate(),Q2[$.getMonth()],I].join(" ")}function DW(...$){console.log("%s - %s",Y2(),oQ.apply(null,$))}function OW($,I){if(I)$.super_=I,$.prototype=Object.create(I.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}})}function mQ($,I){if(!I||!xI(I))return $;var D=Object.keys(I),X=D.length;while(X--)$[D[X]]=I[D[X]];return $}function JW($,I){return Object.prototype.hasOwnProperty.call($,I)}function tQ($,I){if(!$){var D=Error("Promise was rejected with a falsy value");D.reason=$,$=D}return I($)}function QW($){if(typeof $!=="function")throw TypeError('The "original" argument must be of type Function');function I(...D){var X=D.pop();if(typeof X!=="function")throw TypeError("The last argument must be of type Function");var U=this,Q=function(...J){return X.apply(U,...J)};$.apply(this,D).then(function(J){process.nextTick(Q.bind(null,null,J))},function(J){process.nextTick(tQ.bind(null,J,Q))})}return Object.setPrototypeOf(I,Object.getPrototypeOf($)),Object.defineProperties(I,Object.getOwnPropertyDescriptors($)),I}var mA,iA,eU,v2=()=>{},Q2,XW,YW,GW,G2;var WW=C6(()=>{mA=/%[sdj%]/g;iA=(($={},I={},D)=>((D=typeof process<"u"&&!1)&&(D=D.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),I=new RegExp("^"+D+"$","i"),(X)=>{if(X=X.toUpperCase(),!$[X])if(I.test(X))$[X]=function(...U){console.error("%s: %s",X,pid,oQ.apply(null,...U))};else $[X]=function(){};return $[X]}))(),eU=(($)=>($.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},$.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},$.custom=Symbol.for("nodejs.util.inspect.custom"),$))(function($,I,...D){var X={seen:[],stylize:aA};if(D.length>=1)X.depth=D[0];if(D.length>=2)X.colors=D[1];if(nQ(I))X.showHidden=I;else if(I)mQ(X,I);if(BI(X.showHidden))X.showHidden=!1;if(BI(X.depth))X.depth=2;if(BI(X.colors))X.colors=!1;if(X.colors)X.stylize=eA;return Z4(X,$,X.depth)});Q2=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];XW=(($)=>($.custom=Symbol.for("nodejs.util.promisify.custom"),$))(function($){if(typeof $!=="function")throw TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&$[kCustomPromisifiedSymbol]){var I=$[kCustomPromisifiedSymbol];if(typeof I!=="function")throw TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty(I,kCustomPromisifiedSymbol,{value:I,enumerable:!1,writable:!1,configurable:!0}),I}function I(...D){var X,U,Q=new Promise(function(J,A){X=J,U=A});D.push(function(J,A){if(J)U(J);else X(A)});try{$.apply(this,D)}catch(J){U(J)}return Q}if(Object.setPrototypeOf(I,Object.getPrototypeOf($)),kCustomPromisifiedSymbol)Object.defineProperty(I,kCustomPromisifiedSymbol,{value:I,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(I,Object.getOwnPropertyDescriptors($))});({TextEncoder:YW,TextDecoder:GW}=globalThis),G2={TextEncoder:YW,TextDecoder:GW,promisify:XW,log:DW,inherits:OW,_extend:mQ,callbackifyOnRejected:tQ,callbackify:QW}});var sQ=UK((U8,LW)=>{var s$=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),J0=s$(($,I)=>{class D extends Error{constructor(X){if(!Array.isArray(X))throw TypeError(`Expected input to be an Array, got ${typeof X}`);let U="";for(let Q=0;Q<X.length;Q++)U+=` ${X[Q].stack}
11
+ `;super(U);this.name="AggregateError",this.errors=X}}I.exports={AggregateError:D,ArrayIsArray(X){return Array.isArray(X)},ArrayPrototypeIncludes(X,U){return X.includes(U)},ArrayPrototypeIndexOf(X,U){return X.indexOf(U)},ArrayPrototypeJoin(X,U){return X.join(U)},ArrayPrototypeMap(X,U){return X.map(U)},ArrayPrototypePop(X,U){return X.pop(U)},ArrayPrototypePush(X,U){return X.push(U)},ArrayPrototypeSlice(X,U,Q){return X.slice(U,Q)},Error,FunctionPrototypeCall(X,U,...Q){return X.call(U,...Q)},FunctionPrototypeSymbolHasInstance(X,U){return Function.prototype[Symbol.hasInstance].call(X,U)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(X,U){return Object.defineProperties(X,U)},ObjectDefineProperty(X,U,Q){return Object.defineProperty(X,U,Q)},ObjectGetOwnPropertyDescriptor(X,U){return Object.getOwnPropertyDescriptor(X,U)},ObjectKeys(X){return Object.keys(X)},ObjectSetPrototypeOf(X,U){return Object.setPrototypeOf(X,U)},Promise,PromisePrototypeCatch(X,U){return X.catch(U)},PromisePrototypeThen(X,U,Q){return X.then(U,Q)},PromiseReject(X){return Promise.reject(X)},PromiseResolve(X){return Promise.resolve(X)},ReflectApply:Reflect.apply,RegExpPrototypeTest(X,U){return X.test(U)},SafeSet:Set,String,StringPrototypeSlice(X,U,Q){return X.slice(U,Q)},StringPrototypeToLowerCase(X){return X.toLowerCase()},StringPrototypeToUpperCase(X){return X.toUpperCase()},StringPrototypeTrim(X){return X.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(X,U,Q){return X.set(U,Q)},Boolean,Uint8Array}}),KW=s$(($,I)=>{I.exports={format(D,...X){return D.replace(/%([sdifj])/g,function(...[U,Q]){let J=X.shift();if(Q==="f")return J.toFixed(6);else if(Q==="j")return JSON.stringify(J);else if(Q==="s"&&typeof J==="object")return`${J.constructor!==Object?J.constructor.name:""} {}`.trim();else return J.toString()})},inspect(D){switch(typeof D){case"string":if(D.includes("'")){if(!D.includes('"'))return`"${D}"`;else if(!D.includes("`")&&!D.includes("${"))return`\`${D}\``}return`'${D}'`;case"number":if(isNaN(D))return"NaN";else if(Object.is(D,-0))return String(D);return D;case"bigint":return`${String(D)}n`;case"boolean":case"undefined":return String(D);case"object":return"{}"}}}}),p0=s$(($,I)=>{var{format:D,inspect:X}=KW(),{AggregateError:U}=J0(),Q=globalThis.AggregateError||U,J=Symbol("kIsNodeError"),A=["string","function","number","object","Function","Object","boolean","bigint","symbol"],T=/^([A-Z][a-z0-9]*)+$/,Z={};function L(j,_){if(!j)throw new Z.ERR_INTERNAL_ASSERTION(_)}function F(j){let _="",N=j.length,B=j[0]==="-"?1:0;for(;N>=B+4;N-=3)_=`_${j.slice(N-3,N)}${_}`;return`${j.slice(0,N)}${_}`}function E(j,_,N){if(typeof _==="function")return L(_.length<=N.length,`Code: ${j}; The provided arguments length (${N.length}) does not match the required ones (${_.length}).`),_(...N);let B=(_.match(/%[dfijoOs]/g)||[]).length;if(L(B===N.length,`Code: ${j}; The provided arguments length (${N.length}) does not match the required ones (${B}).`),N.length===0)return _;return D(_,...N)}function P(j,_,N){if(!N)N=Error;class B extends N{constructor(...c){super(E(j,_,c))}toString(){return`${this.name} [${j}]: ${this.message}`}}Object.defineProperties(B.prototype,{name:{value:N.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${j}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),B.prototype.code=j,B.prototype[J]=!0,Z[j]=B}function R(j){let _="__node_internal_"+j.name;return Object.defineProperty(j,"name",{value:_}),j}function k(j,_){if(j&&_&&j!==_){if(Array.isArray(_.errors))return _.errors.push(j),_;let N=new Q([_,j],_.message);return N.code=_.code,N}return j||_}class g extends Error{constructor(j="The operation was aborted",_=void 0){if(_!==void 0&&typeof _!=="object")throw new Z.ERR_INVALID_ARG_TYPE("options","Object",_);super(j,_);this.code="ABORT_ERR",this.name="AbortError"}}P("ERR_ASSERTION","%s",Error),P("ERR_INVALID_ARG_TYPE",(j,_,N)=>{if(L(typeof j==="string","'name' must be a string"),!Array.isArray(_))_=[_];let B="The ";if(j.endsWith(" argument"))B+=`${j} `;else B+=`"${j}" ${j.includes(".")?"property":"argument"} `;B+="must be ";let c=[],r=[],J$=[];for(let X$ of _)if(L(typeof X$==="string","All expected entries have to be of type string"),A.includes(X$))c.push(X$.toLowerCase());else if(T.test(X$))r.push(X$);else L(X$!=="object",'The value "object" should be written as "Object"'),J$.push(X$);if(r.length>0){let X$=c.indexOf("object");if(X$!==-1)c.splice(c,X$,1),r.push("Object")}if(c.length>0){switch(c.length){case 1:B+=`of type ${c[0]}`;break;case 2:B+=`one of type ${c[0]} or ${c[1]}`;break;default:{let X$=c.pop();B+=`one of type ${c.join(", ")}, or ${X$}`}}if(r.length>0||J$.length>0)B+=" or "}if(r.length>0){switch(r.length){case 1:B+=`an instance of ${r[0]}`;break;case 2:B+=`an instance of ${r[0]} or ${r[1]}`;break;default:{let X$=r.pop();B+=`an instance of ${r.join(", ")}, or ${X$}`}}if(J$.length>0)B+=" or "}switch(J$.length){case 0:break;case 1:if(J$[0].toLowerCase()!==J$[0])B+="an ";B+=`${J$[0]}`;break;case 2:B+=`one of ${J$[0]} or ${J$[1]}`;break;default:{let X$=J$.pop();B+=`one of ${J$.join(", ")}, or ${X$}`}}if(N==null)B+=`. Received ${N}`;else if(typeof N==="function"&&N.name)B+=`. Received function ${N.name}`;else if(typeof N==="object"){var G$;if((G$=N.constructor)!==null&&G$!==void 0&&G$.name)B+=`. Received an instance of ${N.constructor.name}`;else{let X$=X(N,{depth:-1});B+=`. Received ${X$}`}}else{let X$=X(N,{colors:!1});if(X$.length>25)X$=`${X$.slice(0,25)}...`;B+=`. Received type ${typeof N} (${X$})`}return B},TypeError),P("ERR_INVALID_ARG_VALUE",(j,_,N="is invalid")=>{let B=X(_);if(B.length>128)B=B.slice(0,128)+"...";return`The ${j.includes(".")?"property":"argument"} '${j}' ${N}. Received ${B}`},TypeError),P("ERR_INVALID_RETURN_VALUE",(j,_,N)=>{var B;let c=N!==null&&N!==void 0&&(B=N.constructor)!==null&&B!==void 0&&B.name?`instance of ${N.constructor.name}`:`type ${typeof N}`;return`Expected ${j} to be returned from the "${_}" function but got ${c}.`},TypeError),P("ERR_MISSING_ARGS",(...j)=>{L(j.length>0,"At least one arg needs to be specified");let _,N=j.length;switch(j=(Array.isArray(j)?j:[j]).map((B)=>`"${B}"`).join(" or "),N){case 1:_+=`The ${j[0]} argument`;break;case 2:_+=`The ${j[0]} and ${j[1]} arguments`;break;default:{let B=j.pop();_+=`The ${j.join(", ")}, and ${B} arguments`}break}return`${_} must be specified`},TypeError),P("ERR_OUT_OF_RANGE",(j,_,N)=>{L(_,'Missing "range" argument');let B;if(Number.isInteger(N)&&Math.abs(N)>4294967296)B=F(String(N));else if(typeof N==="bigint"){B=String(N);let c=BigInt(2)**BigInt(32);if(N>c||N<-c)B=F(B);B+="n"}else B=X(N);return`The value of "${j}" is out of range. It must be ${_}. Received ${B}`},RangeError),P("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),P("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),P("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),P("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),P("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),P("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),P("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),P("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),P("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),P("ERR_STREAM_WRITE_AFTER_END","write after end",Error),P("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),I.exports={AbortError:g,aggregateTwoErrors:R(k),hideStackFrames:R,codes:Z}}),V2=s$(($,I)=>{Object.defineProperty($,"__esModule",{value:!0});var D=new WeakMap,X=new WeakMap;function U(p){let I$=D.get(p);return console.assert(I$!=null,"'this' is expected an Event object, but got",p),I$}function Q(p){if(p.passiveListener!=null){if(typeof console<"u"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",p.passiveListener);return}if(!p.event.cancelable)return;if(p.canceled=!0,typeof p.event.preventDefault==="function")p.event.preventDefault()}function J(p,I$){D.set(this,{eventTarget:p,event:I$,eventPhase:2,currentTarget:p,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:I$.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let v=Object.keys(I$);for(let G=0;G<v.length;++G){let W=v[G];if(!(W in this))Object.defineProperty(this,W,A(W))}}if(J.prototype={get type(){return U(this).event.type},get target(){return U(this).eventTarget},get currentTarget(){return U(this).currentTarget},composedPath(){let p=U(this).currentTarget;if(p==null)return[];return[p]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return U(this).eventPhase},stopPropagation(){let p=U(this);if(p.stopped=!0,typeof p.event.stopPropagation==="function")p.event.stopPropagation()},stopImmediatePropagation(){let p=U(this);if(p.stopped=!0,p.immediateStopped=!0,typeof p.event.stopImmediatePropagation==="function")p.event.stopImmediatePropagation()},get bubbles(){return Boolean(U(this).event.bubbles)},get cancelable(){return Boolean(U(this).event.cancelable)},preventDefault(){Q(U(this))},get defaultPrevented(){return U(this).canceled},get composed(){return Boolean(U(this).event.composed)},get timeStamp(){return U(this).timeStamp},get srcElement(){return U(this).eventTarget},get cancelBubble(){return U(this).stopped},set cancelBubble(p){if(!p)return;let I$=U(this);if(I$.stopped=!0,typeof I$.event.cancelBubble==="boolean")I$.event.cancelBubble=!0},get returnValue(){return!U(this).canceled},set returnValue(p){if(!p)Q(U(this))},initEvent(){}},Object.defineProperty(J.prototype,"constructor",{value:J,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.Event<"u")Object.setPrototypeOf(J.prototype,window.Event.prototype),X.set(window.Event.prototype,J);function A(p){return{get(){return U(this).event[p]},set(I$){U(this).event[p]=I$},configurable:!0,enumerable:!0}}function T(p){return{value(){let I$=U(this).event;return I$[p].apply(I$,arguments)},configurable:!0,enumerable:!0}}function Z(p,I$){let v=Object.keys(I$);if(v.length===0)return p;function G(W,Y){p.call(this,W,Y)}G.prototype=Object.create(p.prototype,{constructor:{value:G,configurable:!0,writable:!0}});for(let W=0;W<v.length;++W){let Y=v[W];if(!(Y in p.prototype)){let V=typeof Object.getOwnPropertyDescriptor(I$,Y).value==="function";Object.defineProperty(G.prototype,Y,V?T(Y):A(Y))}}return G}function L(p){if(p==null||p===Object.prototype)return J;let I$=X.get(p);if(I$==null)I$=Z(L(Object.getPrototypeOf(p)),p),X.set(p,I$);return I$}function F(p,I$){return new(L(Object.getPrototypeOf(I$)))(p,I$)}function E(p){return U(p).immediateStopped}function P(p,I$){U(p).eventPhase=I$}function R(p,I$){U(p).currentTarget=I$}function k(p,I$){U(p).passiveListener=I$}var g=new WeakMap,j=1,_=2,N=3;function B(p){return p!==null&&typeof p==="object"}function c(p){let I$=g.get(p);if(I$==null)throw TypeError("'this' is expected an EventTarget object, but got another value.");return I$}function r(p){return{get(){let I$=c(this).get(p);while(I$!=null){if(I$.listenerType===N)return I$.listener;I$=I$.next}return null},set(I$){if(typeof I$!=="function"&&!B(I$))I$=null;let v=c(this),G=null,W=v.get(p);while(W!=null){if(W.listenerType===N)if(G!==null)G.next=W.next;else if(W.next!==null)v.set(p,W.next);else v.delete(p);else G=W;W=W.next}if(I$!==null){let Y={listener:I$,listenerType:N,passive:!1,once:!1,next:null};if(G===null)v.set(p,Y);else G.next=Y}},configurable:!0,enumerable:!0}}function J$(p,I$){Object.defineProperty(p,`on${I$}`,r(I$))}function G$(p){function I$(){X$.call(this)}I$.prototype=Object.create(X$.prototype,{constructor:{value:I$,configurable:!0,writable:!0}});for(let v=0;v<p.length;++v)J$(I$.prototype,p[v]);return I$}function X$(){if(this instanceof X$){g.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return G$(arguments[0]);if(arguments.length>0){let p=Array(arguments.length);for(let I$=0;I$<arguments.length;++I$)p[I$]=arguments[I$];return G$(p)}throw TypeError("Cannot call a class as a function")}if(X$.prototype={addEventListener(p,I$,v){if(I$==null)return;if(typeof I$!=="function"&&!B(I$))throw TypeError("'listener' should be a function or an object.");let G=c(this),W=B(v),Y=(W?Boolean(v.capture):Boolean(v))?j:_,V={listener:I$,listenerType:Y,passive:W&&Boolean(v.passive),once:W&&Boolean(v.once),next:null},S=G.get(p);if(S===void 0){G.set(p,V);return}let H=null;while(S!=null){if(S.listener===I$&&S.listenerType===Y)return;H=S,S=S.next}H.next=V},removeEventListener(p,I$,v){if(I$==null)return;let G=c(this),W=(B(v)?Boolean(v.capture):Boolean(v))?j:_,Y=null,V=G.get(p);while(V!=null){if(V.listener===I$&&V.listenerType===W){if(Y!==null)Y.next=V.next;else if(V.next!==null)G.set(p,V.next);else G.delete(p);return}Y=V,V=V.next}},dispatchEvent(p){if(p==null||typeof p.type!=="string")throw TypeError('"event.type" should be a string.');let I$=c(this),v=p.type,G=I$.get(v);if(G==null)return!0;let W=F(this,p),Y=null;while(G!=null){if(G.once)if(Y!==null)Y.next=G.next;else if(G.next!==null)I$.set(v,G.next);else I$.delete(v);else Y=G;if(k(W,G.passive?G.listener:null),typeof G.listener==="function")try{G.listener.call(this,W)}catch(V){if(typeof console<"u"&&typeof console.error==="function")console.error(V)}else if(G.listenerType!==N&&typeof G.listener.handleEvent==="function")G.listener.handleEvent(W);if(E(W))break;G=G.next}return k(W,null),P(W,0),R(W,null),!W.defaultPrevented}},Object.defineProperty(X$.prototype,"constructor",{value:X$,configurable:!0,writable:!0}),typeof window<"u"&&typeof window.EventTarget<"u")Object.setPrototypeOf(X$.prototype,window.EventTarget.prototype);$.defineEventAttribute=J$,$.EventTarget=X$,$.default=X$,I.exports=X$,I.exports.EventTarget=I.exports.default=X$,I.exports.defineEventAttribute=J$}),E6=s$(($,I)=>{Object.defineProperty($,"__esModule",{value:!0});var D=V2();class X extends D.EventTarget{constructor(){super();throw TypeError("AbortSignal cannot be constructed directly")}get aborted(){let L=J.get(this);if(typeof L!=="boolean")throw TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return L}}D.defineEventAttribute(X.prototype,"abort");function U(){let L=Object.create(X.prototype);return D.EventTarget.call(L),J.set(L,!1),L}function Q(L){if(J.get(L)!==!1)return;J.set(L,!0),L.dispatchEvent({type:"abort"})}var J=new WeakMap;if(Object.defineProperties(X.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(X.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class A{constructor(){T.set(this,U())}get signal(){return Z(this)}abort(){Q(Z(this))}}var T=new WeakMap;function Z(L){let F=T.get(L);if(F==null)throw TypeError(`Expected 'this' to be an 'AbortController' object, but got ${L===null?"null":typeof L}`);return F}if(Object.defineProperties(A.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(A.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});$.AbortController=A,$.AbortSignal=X,$.default=A,I.exports=A,I.exports.AbortController=I.exports.default=A,I.exports.AbortSignal=X}),d0=s$(($,I)=>{var D=(j0(),e$(_0)),{format:X,inspect:U}=KW(),{codes:{ERR_INVALID_ARG_TYPE:Q}}=p0(),{kResistStopPropagation:J,AggregateError:A,SymbolDispose:T}=J0(),Z=globalThis.AbortSignal||E6().AbortSignal,L=globalThis.AbortController||E6().AbortController,F=Object.getPrototypeOf(async function(){}).constructor,E=globalThis.Blob||D.Blob,P=typeof E<"u"?function(g){return g instanceof E}:function(g){return!1},R=(g,j)=>{if(g!==void 0&&(g===null||typeof g!=="object"||!("aborted"in g)))throw new Q(j,"AbortSignal",g)},k=(g,j)=>{if(typeof g!=="function")throw new Q(j,"Function",g)};I.exports={AggregateError:A,kEmptyObject:Object.freeze({}),once(g){let j=!1;return function(..._){if(j)return;j=!0,g.apply(this,_)}},createDeferredPromise:function(){let g,j;return{promise:new Promise((_,N)=>{g=_,j=N}),resolve:g,reject:j}},promisify(g){return new Promise((j,_)=>{g((N,...B)=>{if(N)return _(N);return j(...B)})})},debuglog(){return function(){}},format:X,inspect:U,types:{isAsyncFunction(g){return g instanceof F},isArrayBufferView(g){return ArrayBuffer.isView(g)}},isBlob:P,deprecate(g,j){return g},addAbortListener:(DU(),e$(fI)).addAbortListener||function(g,j){if(g===void 0)throw new Q("signal","AbortSignal",g);R(g,"signal"),k(j,"listener");let _;if(g.aborted)queueMicrotask(()=>j());else g.addEventListener("abort",j,{__proto__:null,once:!0,[J]:!0}),_=()=>{g.removeEventListener("abort",j)};return{__proto__:null,[T](){var N;(N=_)===null||N===void 0||N()}}},AbortSignalAny:Z.any||function(g){if(g.length===1)return g[0];let j=new L,_=()=>j.abort();return g.forEach((N)=>{R(N,"signals"),N.addEventListener("abort",_,{once:!0})}),j.signal.addEventListener("abort",()=>{g.forEach((N)=>N.removeEventListener("abort",_))},{once:!0}),j.signal}},I.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),T6=s$(($,I)=>{var{ArrayIsArray:D,ArrayPrototypeIncludes:X,ArrayPrototypeJoin:U,ArrayPrototypeMap:Q,NumberIsInteger:J,NumberIsNaN:A,NumberMAX_SAFE_INTEGER:T,NumberMIN_SAFE_INTEGER:Z,NumberParseInt:L,ObjectPrototypeHasOwnProperty:F,RegExpPrototypeExec:E,String:P,StringPrototypeToUpperCase:R,StringPrototypeTrim:k}=J0(),{hideStackFrames:g,codes:{ERR_SOCKET_BAD_PORT:j,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:N,ERR_OUT_OF_RANGE:B,ERR_UNKNOWN_SIGNAL:c}}=p0(),{normalizeEncoding:r}=d0(),{isAsyncFunction:J$,isArrayBufferView:G$}=d0().types,X$={};function p(y){return y===(y|0)}function I$(y){return y===y>>>0}var v=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function W(y,o,w$){if(typeof y>"u")y=w$;if(typeof y==="string"){if(E(v,y)===null)throw new N(o,y,G);y=L(y,8)}return S(y,o),y}var Y=g((y,o,w$=Z,m=T)=>{if(typeof y!=="number")throw new _(o,"number",y);if(!J(y))throw new B(o,"an integer",y);if(y<w$||y>m)throw new B(o,`>= ${w$} && <= ${m}`,y)}),V=g((y,o,w$=-2147483648,m=2147483647)=>{if(typeof y!=="number")throw new _(o,"number",y);if(!J(y))throw new B(o,"an integer",y);if(y<w$||y>m)throw new B(o,`>= ${w$} && <= ${m}`,y)}),S=g((y,o,w$=!1)=>{if(typeof y!=="number")throw new _(o,"number",y);if(!J(y))throw new B(o,"an integer",y);let m=w$?1:0,v$=4294967295;if(y<m||y>v$)throw new B(o,`>= ${m} && <= ${v$}`,y)});function H(y,o){if(typeof y!=="string")throw new _(o,"string",y)}function K(y,o,w$=void 0,m){if(typeof y!=="number")throw new _(o,"number",y);if(w$!=null&&y<w$||m!=null&&y>m||(w$!=null||m!=null)&&A(y))throw new B(o,`${w$!=null?`>= ${w$}`:""}${w$!=null&&m!=null?" && ":""}${m!=null?`<= ${m}`:""}`,y)}var O=g((y,o,w$)=>{if(!X(w$,y)){let m="must be one of: "+U(Q(w$,(v$)=>typeof v$==="string"?`'${v$}'`:P(v$)),", ");throw new N(o,y,m)}});function z(y,o){if(typeof y!=="boolean")throw new _(o,"boolean",y)}function q(y,o,w$){return y==null||!F(y,o)?w$:y[o]}var M=g((y,o,w$=null)=>{let m=q(w$,"allowArray",!1),v$=q(w$,"allowFunction",!1);if(!q(w$,"nullable",!1)&&y===null||!m&&D(y)||typeof y!=="object"&&(!v$||typeof y!=="function"))throw new _(o,"Object",y)}),C=g((y,o)=>{if(y!=null&&typeof y!=="object"&&typeof y!=="function")throw new _(o,"a dictionary",y)}),w=g((y,o,w$=0)=>{if(!D(y))throw new _(o,"Array",y);if(y.length<w$){let m=`must be longer than ${w$}`;throw new N(o,y,m)}});function u(y,o){w(y,o);for(let w$=0;w$<y.length;w$++)H(y[w$],`${o}[${w$}]`)}function n(y,o){w(y,o);for(let w$=0;w$<y.length;w$++)z(y[w$],`${o}[${w$}]`)}function W$(y,o){w(y,o);for(let w$=0;w$<y.length;w$++){let m=y[w$],v$=`${o}[${w$}]`;if(m==null)throw new _(v$,"AbortSignal",m);s(m,v$)}}function i(y,o="signal"){if(H(y,o),X$[y]===void 0){if(X$[R(y)]!==void 0)throw new c(y+" (signals must use all capital letters)");throw new c(y)}}var b=g((y,o="buffer")=>{if(!G$(y))throw new _(o,["Buffer","TypedArray","DataView"],y)});function D$(y,o){let w$=r(o),m=y.length;if(w$==="hex"&&m%2!==0)throw new N("encoding",o,`is invalid for data of length ${m}`)}function d(y,o="Port",w$=!0){if(typeof y!=="number"&&typeof y!=="string"||typeof y==="string"&&k(y).length===0||+y!==+y>>>0||y>65535||y===0&&!w$)throw new j(o,y,w$);return y|0}var s=g((y,o)=>{if(y!==void 0&&(y===null||typeof y!=="object"||!("aborted"in y)))throw new _(o,"AbortSignal",y)}),h$=g((y,o)=>{if(typeof y!=="function")throw new _(o,"Function",y)}),f=g((y,o)=>{if(typeof y!=="function"||J$(y))throw new _(o,"Function",y)}),h=g((y,o)=>{if(y!==void 0)throw new _(o,"undefined",y)});function O$(y,o,w$){if(!X(w$,y))throw new _(o,`('${U(w$,"|")}')`,y)}var t=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function a(y,o){if(typeof y>"u"||!E(t,y))throw new N(o,y,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function T$(y){if(typeof y==="string")return a(y,"hints"),y;else if(D(y)){let o=y.length,w$="";if(o===0)return w$;for(let m=0;m<o;m++){let v$=y[m];if(a(v$,"hints"),w$+=v$,m!==o-1)w$+=", "}return w$}throw new N("hints",y,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}I.exports={isInt32:p,isUint32:I$,parseFileMode:W,validateArray:w,validateStringArray:u,validateBooleanArray:n,validateAbortSignalArray:W$,validateBoolean:z,validateBuffer:b,validateDictionary:C,validateEncoding:D$,validateFunction:h$,validateInt32:V,validateInteger:Y,validateNumber:K,validateObject:M,validateOneOf:O,validatePlainFunction:f,validatePort:d,validateSignalName:i,validateString:H,validateUint32:S,validateUndefined:h,validateUnion:O$,validateAbortSignal:s,validateLinkHeaderValue:T$}}),aU=s$(($,I)=>{I.exports=globalThis.process}),EU=s$(($,I)=>{var{SymbolAsyncIterator:D,SymbolIterator:X,SymbolFor:U}=J0(),Q=U("nodejs.stream.destroyed"),J=U("nodejs.stream.errored"),A=U("nodejs.stream.readable"),T=U("nodejs.stream.writable"),Z=U("nodejs.stream.disturbed"),L=U("nodejs.webstream.isClosedPromise"),F=U("nodejs.webstream.controllerErrorFunction");function E(q,M=!1){var C;return!!(q&&typeof q.pipe==="function"&&typeof q.on==="function"&&(!M||typeof q.pause==="function"&&typeof q.resume==="function")&&(!q._writableState||((C=q._readableState)===null||C===void 0?void 0:C.readable)!==!1)&&(!q._writableState||q._readableState))}function P(q){var M;return!!(q&&typeof q.write==="function"&&typeof q.on==="function"&&(!q._readableState||((M=q._writableState)===null||M===void 0?void 0:M.writable)!==!1))}function R(q){return!!(q&&typeof q.pipe==="function"&&q._readableState&&typeof q.on==="function"&&typeof q.write==="function")}function k(q){return q&&(q._readableState||q._writableState||typeof q.write==="function"&&typeof q.on==="function"||typeof q.pipe==="function"&&typeof q.on==="function")}function g(q){return!!(q&&!k(q)&&typeof q.pipeThrough==="function"&&typeof q.getReader==="function"&&typeof q.cancel==="function")}function j(q){return!!(q&&!k(q)&&typeof q.getWriter==="function"&&typeof q.abort==="function")}function _(q){return!!(q&&!k(q)&&typeof q.readable==="object"&&typeof q.writable==="object")}function N(q){return g(q)||j(q)||_(q)}function B(q,M){if(q==null)return!1;if(M===!0)return typeof q[D]==="function";if(M===!1)return typeof q[X]==="function";return typeof q[D]==="function"||typeof q[X]==="function"}function c(q){if(!k(q))return null;let{_writableState:M,_readableState:C}=q,w=M||C;return!!(q.destroyed||q[Q]||w!==null&&w!==void 0&&w.destroyed)}function r(q){if(!P(q))return null;if(q.writableEnded===!0)return!0;let M=q._writableState;if(M!==null&&M!==void 0&&M.errored)return!1;if(typeof(M===null||M===void 0?void 0:M.ended)!=="boolean")return null;return M.ended}function J$(q,M){if(!P(q))return null;if(q.writableFinished===!0)return!0;let C=q._writableState;if(C!==null&&C!==void 0&&C.errored)return!1;if(typeof(C===null||C===void 0?void 0:C.finished)!=="boolean")return null;return!!(C.finished||M===!1&&C.ended===!0&&C.length===0)}function G$(q){if(!E(q))return null;if(q.readableEnded===!0)return!0;let M=q._readableState;if(!M||M.errored)return!1;if(typeof(M===null||M===void 0?void 0:M.ended)!=="boolean")return null;return M.ended}function X$(q,M){if(!E(q))return null;let C=q._readableState;if(C!==null&&C!==void 0&&C.errored)return!1;if(typeof(C===null||C===void 0?void 0:C.endEmitted)!=="boolean")return null;return!!(C.endEmitted||M===!1&&C.ended===!0&&C.length===0)}function p(q){if(q&&q[A]!=null)return q[A];if(typeof(q===null||q===void 0?void 0:q.readable)!=="boolean")return null;if(c(q))return!1;return E(q)&&q.readable&&!X$(q)}function I$(q){if(q&&q[T]!=null)return q[T];if(typeof(q===null||q===void 0?void 0:q.writable)!=="boolean")return null;if(c(q))return!1;return P(q)&&q.writable&&!r(q)}function v(q,M){if(!k(q))return null;if(c(q))return!0;if((M===null||M===void 0?void 0:M.readable)!==!1&&p(q))return!1;if((M===null||M===void 0?void 0:M.writable)!==!1&&I$(q))return!1;return!0}function G(q){var M,C;if(!k(q))return null;if(q.writableErrored)return q.writableErrored;return(M=(C=q._writableState)===null||C===void 0?void 0:C.errored)!==null&&M!==void 0?M:null}function W(q){var M,C;if(!k(q))return null;if(q.readableErrored)return q.readableErrored;return(M=(C=q._readableState)===null||C===void 0?void 0:C.errored)!==null&&M!==void 0?M:null}function Y(q){if(!k(q))return null;if(typeof q.closed==="boolean")return q.closed;let{_writableState:M,_readableState:C}=q;if(typeof(M===null||M===void 0?void 0:M.closed)==="boolean"||typeof(C===null||C===void 0?void 0:C.closed)==="boolean")return(M===null||M===void 0?void 0:M.closed)||(C===null||C===void 0?void 0:C.closed);if(typeof q._closed==="boolean"&&V(q))return q._closed;return null}function V(q){return typeof q._closed==="boolean"&&typeof q._defaultKeepAlive==="boolean"&&typeof q._removedConnection==="boolean"&&typeof q._removedContLen==="boolean"}function S(q){return typeof q._sent100==="boolean"&&V(q)}function H(q){var M;return typeof q._consuming==="boolean"&&typeof q._dumped==="boolean"&&((M=q.req)===null||M===void 0?void 0:M.upgradeOrConnect)===void 0}function K(q){if(!k(q))return null;let{_writableState:M,_readableState:C}=q,w=M||C;return!w&&S(q)||!!(w&&w.autoDestroy&&w.emitClose&&w.closed===!1)}function O(q){var M;return!!(q&&((M=q[Z])!==null&&M!==void 0?M:q.readableDidRead||q.readableAborted))}function z(q){var M,C,w,u,n,W$,i,b,D$,d;return!!(q&&((M=(C=(w=(u=(n=(W$=q[J])!==null&&W$!==void 0?W$:q.readableErrored)!==null&&n!==void 0?n:q.writableErrored)!==null&&u!==void 0?u:(i=q._readableState)===null||i===void 0?void 0:i.errorEmitted)!==null&&w!==void 0?w:(b=q._writableState)===null||b===void 0?void 0:b.errorEmitted)!==null&&C!==void 0?C:(D$=q._readableState)===null||D$===void 0?void 0:D$.errored)!==null&&M!==void 0?M:(d=q._writableState)===null||d===void 0?void 0:d.errored))}I.exports={isDestroyed:c,kIsDestroyed:Q,isDisturbed:O,kIsDisturbed:Z,isErrored:z,kIsErrored:J,isReadable:p,kIsReadable:A,kIsClosedPromise:L,kControllerErrorFunction:F,kIsWritable:T,isClosed:Y,isDuplexNodeStream:R,isFinished:v,isIterable:B,isReadableNodeStream:E,isReadableStream:g,isReadableEnded:G$,isReadableFinished:X$,isReadableErrored:W,isNodeStream:k,isWebStream:N,isWritable:I$,isWritableNodeStream:P,isWritableStream:j,isWritableEnded:r,isWritableFinished:J$,isWritableErrored:G,isServerRequest:H,isServerResponse:S,willEmitClose:K,isTransformStream:_}}),cU=s$(($,I)=>{var D=aU(),{AbortError:X,codes:U}=p0(),{ERR_INVALID_ARG_TYPE:Q,ERR_STREAM_PREMATURE_CLOSE:J}=U,{kEmptyObject:A,once:T}=d0(),{validateAbortSignal:Z,validateFunction:L,validateObject:F,validateBoolean:E}=T6(),{Promise:P,PromisePrototypeThen:R,SymbolDispose:k}=J0(),{isClosed:g,isReadable:j,isReadableNodeStream:_,isReadableStream:N,isReadableFinished:B,isReadableErrored:c,isWritable:r,isWritableNodeStream:J$,isWritableStream:G$,isWritableFinished:X$,isWritableErrored:p,isNodeStream:I$,willEmitClose:v,kIsClosedPromise:G}=EU(),W;function Y(O){return O.setHeader&&typeof O.abort==="function"}var V=()=>{};function S(O,z,q){var M,C;if(arguments.length===2)q=z,z=A;else if(z==null)z=A;else F(z,"options");if(L(q,"callback"),Z(z.signal,"options.signal"),q=T(q),N(O)||G$(O))return H(O,z,q);if(!I$(O))throw new Q("stream",["ReadableStream","WritableStream","Stream"],O);let w=(M=z.readable)!==null&&M!==void 0?M:_(O),u=(C=z.writable)!==null&&C!==void 0?C:J$(O),n=O._writableState,W$=O._readableState,i=()=>{if(!O.writable)d()},b=v(O)&&_(O)===w&&J$(O)===u,D$=X$(O,!1),d=()=>{if(D$=!0,O.destroyed)b=!1;if(b&&(!O.readable||w))return;if(!w||s)q.call(O)},s=B(O,!1),h$=()=>{if(s=!0,O.destroyed)b=!1;if(b&&(!O.writable||u))return;if(!u||D$)q.call(O)},f=(y)=>{q.call(O,y)},h=g(O),O$=()=>{h=!0;let y=p(O)||c(O);if(y&&typeof y!=="boolean")return q.call(O,y);if(w&&!s&&_(O,!0)){if(!B(O,!1))return q.call(O,new J)}if(u&&!D$){if(!X$(O,!1))return q.call(O,new J)}q.call(O)},t=()=>{h=!0;let y=p(O)||c(O);if(y&&typeof y!=="boolean")return q.call(O,y);q.call(O)},a=()=>{O.req.on("finish",d)};if(Y(O)){if(O.on("complete",d),!b)O.on("abort",O$);if(O.req)a();else O.on("request",a)}else if(u&&!n)O.on("end",i),O.on("close",i);if(!b&&typeof O.aborted==="boolean")O.on("aborted",O$);if(O.on("end",h$),O.on("finish",d),z.error!==!1)O.on("error",f);if(O.on("close",O$),h)D.nextTick(O$);else if(n!==null&&n!==void 0&&n.errorEmitted||W$!==null&&W$!==void 0&&W$.errorEmitted){if(!b)D.nextTick(t)}else if(!w&&(!b||j(O))&&(D$||r(O)===!1))D.nextTick(t);else if(!u&&(!b||r(O))&&(s||j(O)===!1))D.nextTick(t);else if(W$&&O.req&&O.aborted)D.nextTick(t);let T$=()=>{if(q=V,O.removeListener("aborted",O$),O.removeListener("complete",d),O.removeListener("abort",O$),O.removeListener("request",a),O.req)O.req.removeListener("finish",d);O.removeListener("end",i),O.removeListener("close",i),O.removeListener("finish",d),O.removeListener("end",h$),O.removeListener("error",f),O.removeListener("close",O$)};if(z.signal&&!h){let y=()=>{let o=q;T$(),o.call(O,new X(void 0,{cause:z.signal.reason}))};if(z.signal.aborted)D.nextTick(y);else{W=W||d0().addAbortListener;let o=W(z.signal,y),w$=q;q=T((...m)=>{o[k](),w$.apply(O,m)})}}return T$}function H(O,z,q){let M=!1,C=V;if(z.signal)if(C=()=>{M=!0,q.call(O,new X(void 0,{cause:z.signal.reason}))},z.signal.aborted)D.nextTick(C);else{W=W||d0().addAbortListener;let u=W(z.signal,C),n=q;q=T((...W$)=>{u[k](),n.apply(O,W$)})}let w=(...u)=>{if(!M)D.nextTick(()=>q.apply(O,u))};return R(O[G].promise,w,w),V}function K(O,z){var q;let M=!1;if(z===null)z=A;if((q=z)!==null&&q!==void 0&&q.cleanup)E(z.cleanup,"cleanup"),M=z.cleanup;return new P((C,w)=>{let u=S(O,z,(n)=>{if(M)u();if(n)w(n);else C()})})}I.exports=S,I.exports.finished=K}),wI=s$(($,I)=>{var D=aU(),{aggregateTwoErrors:X,codes:{ERR_MULTIPLE_CALLBACK:U},AbortError:Q}=p0(),{Symbol:J}=J0(),{kIsDestroyed:A,isDestroyed:T,isFinished:Z,isServerRequest:L}=EU(),F=J("kDestroy"),E=J("kConstruct");function P(v,G,W){if(v){if(v.stack,G&&!G.errored)G.errored=v;if(W&&!W.errored)W.errored=v}}function R(v,G){let W=this._readableState,Y=this._writableState,V=Y||W;if(Y!==null&&Y!==void 0&&Y.destroyed||W!==null&&W!==void 0&&W.destroyed){if(typeof G==="function")G();return this}if(P(v,Y,W),Y)Y.destroyed=!0;if(W)W.destroyed=!0;if(!V.constructed)this.once(F,function(S){k(this,X(S,v),G)});else k(this,v,G);return this}function k(v,G,W){let Y=!1;function V(S){if(Y)return;Y=!0;let{_readableState:H,_writableState:K}=v;if(P(S,K,H),K)K.closed=!0;if(H)H.closed=!0;if(typeof W==="function")W(S);if(S)D.nextTick(g,v,S);else D.nextTick(j,v)}try{v._destroy(G||null,V)}catch(S){V(S)}}function g(v,G){_(v,G),j(v)}function j(v){let{_readableState:G,_writableState:W}=v;if(W)W.closeEmitted=!0;if(G)G.closeEmitted=!0;if(W!==null&&W!==void 0&&W.emitClose||G!==null&&G!==void 0&&G.emitClose)v.emit("close")}function _(v,G){let{_readableState:W,_writableState:Y}=v;if(Y!==null&&Y!==void 0&&Y.errorEmitted||W!==null&&W!==void 0&&W.errorEmitted)return;if(Y)Y.errorEmitted=!0;if(W)W.errorEmitted=!0;v.emit("error",G)}function N(){let v=this._readableState,G=this._writableState;if(v)v.constructed=!0,v.closed=!1,v.closeEmitted=!1,v.destroyed=!1,v.errored=null,v.errorEmitted=!1,v.reading=!1,v.ended=v.readable===!1,v.endEmitted=v.readable===!1;if(G)G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1}function B(v,G,W){let{_readableState:Y,_writableState:V}=v;if(V!==null&&V!==void 0&&V.destroyed||Y!==null&&Y!==void 0&&Y.destroyed)return this;if(Y!==null&&Y!==void 0&&Y.autoDestroy||V!==null&&V!==void 0&&V.autoDestroy)v.destroy(G);else if(G){if(G.stack,V&&!V.errored)V.errored=G;if(Y&&!Y.errored)Y.errored=G;if(W)D.nextTick(_,v,G);else _(v,G)}}function c(v,G){if(typeof v._construct!=="function")return;let{_readableState:W,_writableState:Y}=v;if(W)W.constructed=!1;if(Y)Y.constructed=!1;if(v.once(E,G),v.listenerCount(E)>1)return;D.nextTick(r,v)}function r(v){let G=!1;function W(Y){if(G){B(v,Y!==null&&Y!==void 0?Y:new U);return}G=!0;let{_readableState:V,_writableState:S}=v,H=S||V;if(V)V.constructed=!0;if(S)S.constructed=!0;if(H.destroyed)v.emit(F,Y);else if(Y)B(v,Y,!0);else D.nextTick(J$,v)}try{v._construct((Y)=>{D.nextTick(W,Y)})}catch(Y){D.nextTick(W,Y)}}function J$(v){v.emit(E)}function G$(v){return(v===null||v===void 0?void 0:v.setHeader)&&typeof v.abort==="function"}function X$(v){v.emit("close")}function p(v,G){v.emit("error",G),D.nextTick(X$,v)}function I$(v,G){if(!v||T(v))return;if(!G&&!Z(v))G=new Q;if(L(v))v.socket=null,v.destroy(G);else if(G$(v))v.abort();else if(G$(v.req))v.req.abort();else if(typeof v.destroy==="function")v.destroy(G);else if(typeof v.close==="function")v.close();else if(G)D.nextTick(p,v,G);else D.nextTick(X$,v);if(!v.destroyed)v[A]=!0}I.exports={construct:c,destroyer:I$,destroy:R,undestroy:N,errorOrDestroy:B}}),iQ=s$(($,I)=>{var{ArrayIsArray:D,ObjectSetPrototypeOf:X}=J0(),{EventEmitter:U}=(DU(),e$(fI));function Q(A){U.call(this,A)}X(Q.prototype,U.prototype),X(Q,U),Q.prototype.pipe=function(A,T){let Z=this;function L(j){if(A.writable&&A.write(j)===!1&&Z.pause)Z.pause()}Z.on("data",L);function F(){if(Z.readable&&Z.resume)Z.resume()}if(A.on("drain",F),!A._isStdio&&(!T||T.end!==!1))Z.on("end",P),Z.on("close",R);let E=!1;function P(){if(E)return;E=!0,A.end()}function R(){if(E)return;if(E=!0,typeof A.destroy==="function")A.destroy()}function k(j){if(g(),U.listenerCount(this,"error")===0)this.emit("error",j)}J(Z,"error",k),J(A,"error",k);function g(){Z.removeListener("data",L),A.removeListener("drain",F),Z.removeListener("end",P),Z.removeListener("close",R),Z.removeListener("error",k),A.removeListener("error",k),Z.removeListener("end",g),Z.removeListener("close",g),A.removeListener("close",g)}return Z.on("end",g),Z.on("close",g),A.on("close",g),A.emit("pipe",Z),A};function J(A,T,Z){if(typeof A.prependListener==="function")return A.prependListener(T,Z);if(!A._events||!A._events[T])A.on(T,Z);else if(D(A._events[T]))A._events[T].unshift(Z);else A._events[T]=[Z,A._events[T]]}I.exports={Stream:Q,prependListener:J}}),T4=s$(($,I)=>{var{SymbolDispose:D}=J0(),{AbortError:X,codes:U}=p0(),{isNodeStream:Q,isWebStream:J,kControllerErrorFunction:A}=EU(),T=cU(),{ERR_INVALID_ARG_TYPE:Z}=U,L,F=(E,P)=>{if(typeof E!=="object"||!("aborted"in E))throw new Z(P,"AbortSignal",E)};I.exports.addAbortSignal=function(E,P){if(F(E,"signal"),!Q(P)&&!J(P))throw new Z("stream",["ReadableStream","WritableStream","Stream"],P);return I.exports.addAbortSignalNoValidate(E,P)},I.exports.addAbortSignalNoValidate=function(E,P){if(typeof E!=="object"||!("aborted"in E))return P;let R=Q(P)?()=>{P.destroy(new X(void 0,{cause:E.reason}))}:()=>{P[A](new X(void 0,{cause:E.reason}))};if(E.aborted)R();else{L=L||d0().addAbortListener;let k=L(E,R);T(P,k[D])}return P}}),W2=s$(($,I)=>{var{StringPrototypeSlice:D,SymbolIterator:X,TypedArrayPrototypeSet:U,Uint8Array:Q}=J0(),{Buffer:J}=(j0(),e$(_0)),{inspect:A}=d0();I.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(T){let Z={data:T,next:null};if(this.length>0)this.tail.next=Z;else this.head=Z;this.tail=Z,++this.length}unshift(T){let Z={data:T,next:this.head};if(this.length===0)this.tail=Z;this.head=Z,++this.length}shift(){if(this.length===0)return;let T=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,T}clear(){this.head=this.tail=null,this.length=0}join(T){if(this.length===0)return"";let Z=this.head,L=""+Z.data;while((Z=Z.next)!==null)L+=T+Z.data;return L}concat(T){if(this.length===0)return J.alloc(0);let Z=J.allocUnsafe(T>>>0),L=this.head,F=0;while(L)U(Z,L.data,F),F+=L.data.length,L=L.next;return Z}consume(T,Z){let L=this.head.data;if(T<L.length){let F=L.slice(0,T);return this.head.data=L.slice(T),F}if(T===L.length)return this.shift();return Z?this._getString(T):this._getBuffer(T)}first(){return this.head.data}*[X](){for(let T=this.head;T;T=T.next)yield T.data}_getString(T){let Z="",L=this.head,F=0;do{let E=L.data;if(T>E.length)Z+=E,T-=E.length;else{if(T===E.length)if(Z+=E,++F,L.next)this.head=L.next;else this.head=this.tail=null;else Z+=D(E,0,T),this.head=L,L.data=D(E,T);break}++F}while((L=L.next)!==null);return this.length-=F,Z}_getBuffer(T){let Z=J.allocUnsafe(T),L=T,F=this.head,E=0;do{let P=F.data;if(T>P.length)U(Z,P,L-T),T-=P.length;else{if(T===P.length)if(U(Z,P,L-T),++E,F.next)this.head=F.next;else this.head=this.tail=null;else U(Z,new Q(P.buffer,P.byteOffset,T),L-T),this.head=F,F.data=P.slice(T);break}++E}while((F=F.next)!==null);return this.length-=E,Z}[Symbol.for("nodejs.util.inspect.custom")](T,Z){return A(this,{...Z,depth:0,customInspect:!1})}}}),M4=s$(($,I)=>{var{MathFloor:D,NumberIsInteger:X}=J0(),{validateInteger:U}=T6(),{ERR_INVALID_ARG_VALUE:Q}=p0().codes,J=16384,A=16;function T(E,P,R){return E.highWaterMark!=null?E.highWaterMark:P?E[R]:null}function Z(E){return E?A:J}function L(E,P){if(U(P,"value",0),E)A=P;else J=P}function F(E,P,R,k){let g=T(P,k,R);if(g!=null){if(!X(g)||g<0){let j=k?`options.${R}`:"options.highWaterMark";throw new Q(j,g)}return D(g)}return Z(E.objectMode)}I.exports={getHighWaterMark:F,getDefaultHighWaterMark:Z,setDefaultHighWaterMark:L}}),K2=s$(($,I)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var D=(j0(),e$(_0)),X=D.Buffer;function U(J,A){for(var T in J)A[T]=J[T]}if(X.from&&X.alloc&&X.allocUnsafe&&X.allocUnsafeSlow)I.exports=D;else U(D,$),$.Buffer=Q;function Q(J,A,T){return X(J,A,T)}Q.prototype=Object.create(X.prototype),U(X,Q),Q.from=function(J,A,T){if(typeof J==="number")throw TypeError("Argument must not be a number");return X(J,A,T)},Q.alloc=function(J,A,T){if(typeof J!=="number")throw TypeError("Argument must be a number");var Z=X(J);if(A!==void 0)if(typeof T==="string")Z.fill(A,T);else Z.fill(A);else Z.fill(0);return Z},Q.allocUnsafe=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return X(J)},Q.allocUnsafeSlow=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return D.SlowBuffer(J)}}),z2=s$(($)=>{var I=K2().Buffer,D=I.isEncoding||function(_){switch(_=""+_,_&&_.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function X(_){if(!_)return"utf8";var N;while(!0)switch(_){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return _;default:if(N)return;_=(""+_).toLowerCase(),N=!0}}function U(_){var N=X(_);if(typeof N!=="string"&&(I.isEncoding===D||!D(_)))throw Error("Unknown encoding: "+_);return N||_}$.StringDecoder=Q;function Q(_){this.encoding=U(_);var N;switch(this.encoding){case"utf16le":this.text=E,this.end=P,N=4;break;case"utf8":this.fillLast=Z,N=4;break;case"base64":this.text=R,this.end=k,N=3;break;default:this.write=g,this.end=j;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(N)}Q.prototype.write=function(_){if(_.length===0)return"";var N,B;if(this.lastNeed){if(N=this.fillLast(_),N===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;if(B<_.length)return N?N+this.text(_,B):this.text(_,B);return N||""},Q.prototype.end=F,Q.prototype.text=L,Q.prototype.fillLast=function(_){if(this.lastNeed<=_.length)return _.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,this.lastTotal-this.lastNeed,0,_.length),this.lastNeed-=_.length};function J(_){if(_<=127)return 0;else if(_>>5===6)return 2;else if(_>>4===14)return 3;else if(_>>3===30)return 4;return _>>6===2?-1:-2}function A(_,N,B){var c=N.length-1;if(c<B)return 0;var r=J(N[c]);if(r>=0){if(r>0)_.lastNeed=r-1;return r}if(--c<B||r===-2)return 0;if(r=J(N[c]),r>=0){if(r>0)_.lastNeed=r-2;return r}if(--c<B||r===-2)return 0;if(r=J(N[c]),r>=0){if(r>0)if(r===2)r=0;else _.lastNeed=r-3;return r}return 0}function T(_,N,B){if((N[0]&192)!==128)return _.lastNeed=0,"�";if(_.lastNeed>1&&N.length>1){if((N[1]&192)!==128)return _.lastNeed=1,"�";if(_.lastNeed>2&&N.length>2){if((N[2]&192)!==128)return _.lastNeed=2,"�"}}}function Z(_){var N=this.lastTotal-this.lastNeed,B=T(this,_,N);if(B!==void 0)return B;if(this.lastNeed<=_.length)return _.copy(this.lastChar,N,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);_.copy(this.lastChar,N,0,_.length),this.lastNeed-=_.length}function L(_,N){var B=A(this,_,N);if(!this.lastNeed)return _.toString("utf8",N);this.lastTotal=B;var c=_.length-(B-this.lastNeed);return _.copy(this.lastChar,0,c),_.toString("utf8",N,c)}function F(_){var N=_&&_.length?this.write(_):"";if(this.lastNeed)return N+"�";return N}function E(_,N){if((_.length-N)%2===0){var B=_.toString("utf16le",N);if(B){var c=B.charCodeAt(B.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=_[_.length-1],_.toString("utf16le",N,_.length-1)}function P(_){var N=_&&_.length?this.write(_):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return N+this.lastChar.toString("utf16le",0,B)}return N}function R(_,N){var B=(_.length-N)%3;if(B===0)return _.toString("base64",N);if(this.lastNeed=3-B,this.lastTotal=3,B===1)this.lastChar[0]=_[_.length-1];else this.lastChar[0]=_[_.length-2],this.lastChar[1]=_[_.length-1];return _.toString("base64",N,_.length-B)}function k(_){var N=_&&_.length?this.write(_):"";if(this.lastNeed)return N+this.lastChar.toString("base64",0,3-this.lastNeed);return N}function g(_){return _.toString(this.encoding)}function j(_){return _&&_.length?this.write(_):""}}),zW=s$(($,I)=>{var D=aU(),{PromisePrototypeThen:X,SymbolAsyncIterator:U,SymbolIterator:Q}=J0(),{Buffer:J}=(j0(),e$(_0)),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_NULL_VALUES:T}=p0().codes;function Z(L,F,E){let P;if(typeof F==="string"||F instanceof J)return new L({objectMode:!0,...E,read(){this.push(F),this.push(null)}});let R;if(F&&F[U])R=!0,P=F[U]();else if(F&&F[Q])R=!1,P=F[Q]();else throw new A("iterable",["Iterable"],F);let k=new L({objectMode:!0,highWaterMark:1,...E}),g=!1;k._read=function(){if(!g)g=!0,_()},k._destroy=function(N,B){X(j(N),()=>D.nextTick(B,N),(c)=>D.nextTick(B,c||N))};async function j(N){let B=N!==void 0&&N!==null,c=typeof P.throw==="function";if(B&&c){let{value:r,done:J$}=await P.throw(N);if(await r,J$)return}if(typeof P.return==="function"){let{value:r}=await P.return();await r}}async function _(){for(;;){try{let{value:N,done:B}=R?await P.next():P.next();if(B)k.push(null);else{let c=N&&typeof N.then==="function"?await N:N;if(c===null)throw g=!1,new T;else if(k.push(c))continue;else g=!1}}catch(N){k.destroy(N)}break}}return k}I.exports=Z}),P4=s$(($,I)=>{var D=aU(),{ArrayPrototypeIndexOf:X,NumberIsInteger:U,NumberIsNaN:Q,NumberParseInt:J,ObjectDefineProperties:A,ObjectKeys:T,ObjectSetPrototypeOf:Z,Promise:L,SafeSet:F,SymbolAsyncDispose:E,SymbolAsyncIterator:P,Symbol:R}=J0();I.exports=m,m.ReadableState=w$;var{EventEmitter:k}=(DU(),e$(fI)),{Stream:g,prependListener:j}=iQ(),{Buffer:_}=(j0(),e$(_0)),{addAbortSignal:N}=T4(),B=cU(),c=d0().debuglog("stream",(x)=>{c=x}),r=W2(),J$=wI(),{getHighWaterMark:G$,getDefaultHighWaterMark:X$}=M4(),{aggregateTwoErrors:p,codes:{ERR_INVALID_ARG_TYPE:I$,ERR_METHOD_NOT_IMPLEMENTED:v,ERR_OUT_OF_RANGE:G,ERR_STREAM_PUSH_AFTER_EOF:W,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Y},AbortError:V}=p0(),{validateObject:S}=T6(),H=R("kPaused"),{StringDecoder:K}=z2(),O=zW();Z(m.prototype,g.prototype),Z(m,g);var z=()=>{},{errorOrDestroy:q}=J$,M=1,C=2,w=4,u=8,n=16,W$=32,i=64,b=128,D$=256,d=512,s=1024,h$=2048,f=4096,h=8192,O$=16384,t=32768,a=65536,T$=131072,y=262144;function o(x){return{enumerable:!1,get(){return(this.state&x)!==0},set(l){if(l)this.state|=x;else this.state&=~x}}}A(w$.prototype,{objectMode:o(M),ended:o(C),endEmitted:o(w),reading:o(u),constructed:o(n),sync:o(W$),needReadable:o(i),emittedReadable:o(b),readableListening:o(D$),resumeScheduled:o(d),errorEmitted:o(s),emitClose:o(h$),autoDestroy:o(f),destroyed:o(h),closed:o(O$),closeEmitted:o(t),multiAwaitDrain:o(a),readingMore:o(T$),dataEmitted:o(y)});function w$(x,l,e){if(typeof e!=="boolean")e=l instanceof LU();if(this.state=h$|f|n|W$,x&&x.objectMode)this.state|=M;if(e&&x&&x.readableObjectMode)this.state|=M;if(this.highWaterMark=x?G$(this,x,"readableHighWaterMark",e):X$(!1),this.buffer=new r,this.length=0,this.pipes=[],this.flowing=null,this[H]=null,x&&x.emitClose===!1)this.state&=~h$;if(x&&x.autoDestroy===!1)this.state&=~f;if(this.errored=null,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,x&&x.encoding)this.decoder=new K(x.encoding),this.encoding=x.encoding}function m(x){if(!(this instanceof m))return new m(x);let l=this instanceof LU();if(this._readableState=new w$(x,this,l),x){if(typeof x.read==="function")this._read=x.read;if(typeof x.destroy==="function")this._destroy=x.destroy;if(typeof x.construct==="function")this._construct=x.construct;if(x.signal&&!l)N(x.signal,this)}g.call(this,x),J$.construct(this,()=>{if(this._readableState.needReadable)L$(this,this._readableState)})}m.prototype.destroy=J$.destroy,m.prototype._undestroy=J$.undestroy,m.prototype._destroy=function(x,l){l(x)},m.prototype[k.captureRejectionSymbol]=function(x){this.destroy(x)},m.prototype[E]=function(){let x;if(!this.destroyed)x=this.readableEnded?null:new V,this.destroy(x);return new L((l,e)=>B(this,(U$)=>U$&&U$!==x?e(U$):l(null)))},m.prototype.push=function(x,l){return v$(this,x,l,!1)},m.prototype.unshift=function(x,l){return v$(this,x,l,!0)};function v$(x,l,e,U$){c("readableAddChunk",l);let p$=x._readableState,z$;if((p$.state&M)===0){if(typeof l==="string"){if(e=e||p$.defaultEncoding,p$.encoding!==e)if(U$&&p$.encoding)l=_.from(l,e).toString(p$.encoding);else l=_.from(l,e),e=""}else if(l instanceof _)e="";else if(g._isUint8Array(l))l=g._uint8ArrayToBuffer(l),e="";else if(l!=null)z$=new I$("chunk",["string","Buffer","Uint8Array"],l)}if(z$)q(x,z$);else if(l===null)p$.state&=~u,K$(x,p$);else if((p$.state&M)!==0||l&&l.length>0)if(U$)if((p$.state&w)!==0)q(x,new Y);else if(p$.destroyed||p$.errored)return!1;else r$(x,p$,l,!0);else if(p$.ended)q(x,new W);else if(p$.destroyed||p$.errored)return!1;else if(p$.state&=~u,p$.decoder&&!e)if(l=p$.decoder.write(l),p$.objectMode||l.length!==0)r$(x,p$,l,!1);else L$(x,p$);else r$(x,p$,l,!1);else if(!U$)p$.state&=~u,L$(x,p$);return!p$.ended&&(p$.length<p$.highWaterMark||p$.length===0)}function r$(x,l,e,U$){if(l.flowing&&l.length===0&&!l.sync&&x.listenerCount("data")>0){if((l.state&a)!==0)l.awaitDrainWriters.clear();else l.awaitDrainWriters=null;l.dataEmitted=!0,x.emit("data",e)}else{if(l.length+=l.objectMode?1:e.length,U$)l.buffer.unshift(e);else l.buffer.push(e);if((l.state&i)!==0)F$(x)}L$(x,l)}m.prototype.isPaused=function(){let x=this._readableState;return x[H]===!0||x.flowing===!1},m.prototype.setEncoding=function(x){let l=new K(x);this._readableState.decoder=l,this._readableState.encoding=this._readableState.decoder.encoding;let e=this._readableState.buffer,U$="";for(let p$ of e)U$+=l.write(p$);if(e.clear(),U$!=="")e.push(U$);return this._readableState.length=U$.length,this};var S$=1073741824;function A$(x){if(x>S$)throw new G("size","<= 1GiB",x);else x--,x|=x>>>1,x|=x>>>2,x|=x>>>4,x|=x>>>8,x|=x>>>16,x++;return x}function X0(x,l){if(x<=0||l.length===0&&l.ended)return 0;if((l.state&M)!==0)return 1;if(Q(x)){if(l.flowing&&l.length)return l.buffer.first().length;return l.length}if(x<=l.length)return x;return l.ended?l.length:0}m.prototype.read=function(x){if(c("read",x),x===void 0)x=NaN;else if(!U(x))x=J(x,10);let l=this._readableState,e=x;if(x>l.highWaterMark)l.highWaterMark=A$(x);if(x!==0)l.state&=~b;if(x===0&&l.needReadable&&((l.highWaterMark!==0?l.length>=l.highWaterMark:l.length>0)||l.ended)){if(c("read: emitReadable",l.length,l.ended),l.length===0&&l.ended)g0(this);else F$(this);return null}if(x=X0(x,l),x===0&&l.ended){if(l.length===0)g0(this);return null}let U$=(l.state&i)!==0;if(c("need readable",U$),l.length===0||l.length-x<l.highWaterMark)U$=!0,c("length less than watermark",U$);if(l.ended||l.reading||l.destroyed||l.errored||!l.constructed)U$=!1,c("reading, ended or constructing",U$);else if(U$){if(c("do read"),l.state|=u|W$,l.length===0)l.state|=i;try{this._read(l.highWaterMark)}catch(z$){q(this,z$)}if(l.state&=~W$,!l.reading)x=X0(e,l)}let p$;if(x>0)p$=q$(x,l);else p$=null;if(p$===null)l.needReadable=l.length<=l.highWaterMark,x=0;else if(l.length-=x,l.multiAwaitDrain)l.awaitDrainWriters.clear();else l.awaitDrainWriters=null;if(l.length===0){if(!l.ended)l.needReadable=!0;if(e!==x&&l.ended)g0(this)}if(p$!==null&&!l.errorEmitted&&!l.closeEmitted)l.dataEmitted=!0,this.emit("data",p$);return p$};function K$(x,l){if(c("onEofChunk"),l.ended)return;if(l.decoder){let e=l.decoder.end();if(e&&e.length)l.buffer.push(e),l.length+=l.objectMode?1:e.length}if(l.ended=!0,l.sync)F$(x);else l.needReadable=!1,l.emittedReadable=!0,G0(x)}function F$(x){let l=x._readableState;if(c("emitReadable",l.needReadable,l.emittedReadable),l.needReadable=!1,!l.emittedReadable)c("emitReadable",l.flowing),l.emittedReadable=!0,D.nextTick(G0,x)}function G0(x){let l=x._readableState;if(c("emitReadable_",l.destroyed,l.length,l.ended),!l.destroyed&&!l.errored&&(l.length||l.ended))x.emit("readable"),l.emittedReadable=!1;l.needReadable=!l.flowing&&!l.ended&&l.length<=l.highWaterMark,P$(x)}function L$(x,l){if(!l.readingMore&&l.constructed)l.readingMore=!0,D.nextTick(Z$,x,l)}function Z$(x,l){while(!l.reading&&!l.ended&&(l.length<l.highWaterMark||l.flowing&&l.length===0)){let e=l.length;if(c("maybeReadMore read 0"),x.read(0),e===l.length)break}l.readingMore=!1}m.prototype._read=function(x){throw new v("_read()")},m.prototype.pipe=function(x,l){let e=this,U$=this._readableState;if(U$.pipes.length===1){if(!U$.multiAwaitDrain)U$.multiAwaitDrain=!0,U$.awaitDrainWriters=new F(U$.awaitDrainWriters?[U$.awaitDrainWriters]:[])}U$.pipes.push(x),c("pipe count=%d opts=%j",U$.pipes.length,l);let p$=(!l||l.end!==!1)&&x!==D.stdout&&x!==D.stderr?H$:n$;if(U$.endEmitted)D.nextTick(p$);else e.once("end",p$);x.on("unpipe",z$);function z$(v0,$0){if(c("onunpipe"),v0===e){if($0&&$0.hasUnpiped===!1)$0.hasUnpiped=!0,x$()}}function H$(){c("onend"),x.end()}let Q0,g$=!1;function x$(){if(c("cleanup"),x.removeListener("close",Y0),x.removeListener("finish",m$),Q0)x.removeListener("drain",Q0);if(x.removeListener("error",E$),x.removeListener("unpipe",z$),e.removeListener("end",H$),e.removeListener("end",n$),e.removeListener("data",k$),g$=!0,Q0&&U$.awaitDrainWriters&&(!x._writableState||x._writableState.needDrain))Q0()}function B0(){if(!g$){if(U$.pipes.length===1&&U$.pipes[0]===x)c("false write response, pause",0),U$.awaitDrainWriters=x,U$.multiAwaitDrain=!1;else if(U$.pipes.length>1&&U$.pipes.includes(x))c("false write response, pause",U$.awaitDrainWriters.size),U$.awaitDrainWriters.add(x);e.pause()}if(!Q0)Q0=w0(e,x),x.on("drain",Q0)}e.on("data",k$);function k$(v0){c("ondata");let $0=x.write(v0);if(c("dest.write",$0),$0===!1)B0()}function E$(v0){if(c("onerror",v0),n$(),x.removeListener("error",E$),x.listenerCount("error")===0){let $0=x._writableState||x._readableState;if($0&&!$0.errorEmitted)q(x,v0);else x.emit("error",v0)}}j(x,"error",E$);function Y0(){x.removeListener("finish",m$),n$()}x.once("close",Y0);function m$(){c("onfinish"),x.removeListener("close",Y0),n$()}x.once("finish",m$);function n$(){c("unpipe"),e.unpipe(x)}if(x.emit("pipe",e),x.writableNeedDrain===!0)B0();else if(!U$.flowing)c("pipe resume"),e.resume();return x};function w0(x,l){return function(){let e=x._readableState;if(e.awaitDrainWriters===l)c("pipeOnDrain",1),e.awaitDrainWriters=null;else if(e.multiAwaitDrain)c("pipeOnDrain",e.awaitDrainWriters.size),e.awaitDrainWriters.delete(l);if((!e.awaitDrainWriters||e.awaitDrainWriters.size===0)&&x.listenerCount("data"))x.resume()}}m.prototype.unpipe=function(x){let l=this._readableState,e={hasUnpiped:!1};if(l.pipes.length===0)return this;if(!x){let p$=l.pipes;l.pipes=[],this.pause();for(let z$=0;z$<p$.length;z$++)p$[z$].emit("unpipe",this,{hasUnpiped:!1});return this}let U$=X(l.pipes,x);if(U$===-1)return this;if(l.pipes.splice(U$,1),l.pipes.length===0)this.pause();return x.emit("unpipe",this,e),this},m.prototype.on=function(x,l){let e=g.prototype.on.call(this,x,l),U$=this._readableState;if(x==="data"){if(U$.readableListening=this.listenerCount("readable")>0,U$.flowing!==!1)this.resume()}else if(x==="readable"){if(!U$.endEmitted&&!U$.readableListening){if(U$.readableListening=U$.needReadable=!0,U$.flowing=!1,U$.emittedReadable=!1,c("on readable",U$.length,U$.reading),U$.length)F$(this);else if(!U$.reading)D.nextTick(C$,this)}}return e},m.prototype.addListener=m.prototype.on,m.prototype.removeListener=function(x,l){let e=g.prototype.removeListener.call(this,x,l);if(x==="readable")D.nextTick(M$,this);return e},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(x){let l=g.prototype.removeAllListeners.apply(this,arguments);if(x==="readable"||x===void 0)D.nextTick(M$,this);return l};function M$(x){let l=x._readableState;if(l.readableListening=x.listenerCount("readable")>0,l.resumeScheduled&&l[H]===!1)l.flowing=!0;else if(x.listenerCount("data")>0)x.resume();else if(!l.readableListening)l.flowing=null}function C$(x){c("readable nexttick read 0"),x.read(0)}m.prototype.resume=function(){let x=this._readableState;if(!x.flowing)c("resume"),x.flowing=!x.readableListening,c0(this,x);return x[H]=!1,this};function c0(x,l){if(!l.resumeScheduled)l.resumeScheduled=!0,D.nextTick(_$,x,l)}function _$(x,l){if(c("resume",l.reading),!l.reading)x.read(0);if(l.resumeScheduled=!1,x.emit("resume"),P$(x),l.flowing&&!l.reading)x.read(0)}m.prototype.pause=function(){if(c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)c("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[H]=!0,this};function P$(x){let l=x._readableState;c("flow",l.flowing);while(l.flowing&&x.read()!==null);}m.prototype.wrap=function(x){let l=!1;x.on("data",(U$)=>{if(!this.push(U$)&&x.pause)l=!0,x.pause()}),x.on("end",()=>{this.push(null)}),x.on("error",(U$)=>{q(this,U$)}),x.on("close",()=>{this.destroy()}),x.on("destroy",()=>{this.destroy()}),this._read=()=>{if(l&&x.resume)l=!1,x.resume()};let e=T(x);for(let U$=1;U$<e.length;U$++){let p$=e[U$];if(this[p$]===void 0&&typeof x[p$]==="function")this[p$]=x[p$].bind(x)}return this},m.prototype[P]=function(){return N0(this)},m.prototype.iterator=function(x){if(x!==void 0)S(x,"options");return N0(this,x)};function N0(x,l){if(typeof x.read!=="function")x=m.wrap(x,{objectMode:!0});let e=j$(x,l);return e.stream=x,e}async function*j$(x,l){let e=z;function U$(H$){if(this===x)e(),e=z;else e=H$}x.on("readable",U$);let p$,z$=B(x,{writable:!1},(H$)=>{p$=H$?p(p$,H$):null,e(),e=z});try{while(!0){let H$=x.destroyed?null:x.read();if(H$!==null)yield H$;else if(p$)throw p$;else if(p$===null)return;else await new L(U$)}}catch(H$){throw p$=p(p$,H$),p$}finally{if((p$||(l===null||l===void 0?void 0:l.destroyOnReturn)!==!1)&&(p$===void 0||x._readableState.autoDestroy))J$.destroyer(x,null);else x.off("readable",U$),z$()}}A(m.prototype,{readable:{__proto__:null,get(){let x=this._readableState;return!!x&&x.readable!==!1&&!x.destroyed&&!x.errorEmitted&&!x.endEmitted},set(x){if(this._readableState)this._readableState.readable=!!x}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){if(this._readableState)this._readableState.flowing=x}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(x){if(!this._readableState)return;this._readableState.destroyed=x}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),A(w$.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[H]!==!1},set(x){this[H]=!!x}}}),m._fromList=q$;function q$(x,l){if(l.length===0)return null;let e;if(l.objectMode)e=l.buffer.shift();else if(!x||x>=l.length){if(l.decoder)e=l.buffer.join("");else if(l.buffer.length===1)e=l.buffer.first();else e=l.buffer.concat(l.length);l.buffer.clear()}else e=l.buffer.consume(x,l.decoder);return e}function g0(x){let l=x._readableState;if(c("endReadable",l.endEmitted),!l.endEmitted)l.ended=!0,D.nextTick(N$,l,x)}function N$(x,l){if(c("endReadableNT",x.endEmitted,x.length),!x.errored&&!x.closeEmitted&&!x.endEmitted&&x.length===0){if(x.endEmitted=!0,l.emit("end"),l.writable&&l.allowHalfOpen===!1)D.nextTick(B$,l);else if(x.autoDestroy){let e=l._writableState;if(!e||e.autoDestroy&&(e.finished||e.writable===!1))l.destroy()}}}function B$(x){if(x.writable&&!x.writableEnded&&!x.destroyed)x.end()}m.from=function(x,l){return O(m,x,l)};var k0;function R$(){if(k0===void 0)k0={};return k0}m.fromWeb=function(x,l){return R$().newStreamReadableFromReadableStream(x,l)},m.toWeb=function(x,l){return R$().newReadableStreamFromStreamReadable(x,l)},m.wrap=function(x,l){var e,U$;return new m({objectMode:(e=(U$=x.readableObjectMode)!==null&&U$!==void 0?U$:x.objectMode)!==null&&e!==void 0?e:!0,...l,destroy(p$,z$){J$.destroyer(x,p$),z$(p$)}}).wrap(x)}}),eQ=s$(($,I)=>{var D=aU(),{ArrayPrototypeSlice:X,Error:U,FunctionPrototypeSymbolHasInstance:Q,ObjectDefineProperty:J,ObjectDefineProperties:A,ObjectSetPrototypeOf:T,StringPrototypeToLowerCase:Z,Symbol:L,SymbolHasInstance:F}=J0();I.exports=S,S.WritableState=Y;var{EventEmitter:E}=(DU(),e$(fI)),P=iQ().Stream,{Buffer:R}=(j0(),e$(_0)),k=wI(),{addAbortSignal:g}=T4(),{getHighWaterMark:j,getDefaultHighWaterMark:_}=M4(),{ERR_INVALID_ARG_TYPE:N,ERR_METHOD_NOT_IMPLEMENTED:B,ERR_MULTIPLE_CALLBACK:c,ERR_STREAM_CANNOT_PIPE:r,ERR_STREAM_DESTROYED:J$,ERR_STREAM_ALREADY_FINISHED:G$,ERR_STREAM_NULL_VALUES:X$,ERR_STREAM_WRITE_AFTER_END:p,ERR_UNKNOWN_ENCODING:I$}=p0().codes,{errorOrDestroy:v}=k;T(S.prototype,P.prototype),T(S,P);function G(){}var W=L("kOnFinished");function Y(f,h,O$){if(typeof O$!=="boolean")O$=h instanceof LU();if(this.objectMode=!!(f&&f.objectMode),O$)this.objectMode=this.objectMode||!!(f&&f.writableObjectMode);this.highWaterMark=f?j(this,f,"writableHighWaterMark",O$):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let t=!!(f&&f.decodeStrings===!1);this.decodeStrings=!t,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=q.bind(void 0,h),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,V(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!f||f.emitClose!==!1,this.autoDestroy=!f||f.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[W]=[]}function V(f){f.buffered=[],f.bufferedIndex=0,f.allBuffers=!0,f.allNoop=!0}Y.prototype.getBuffer=function(){return X(this.buffered,this.bufferedIndex)},J(Y.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function S(f){let h=this instanceof LU();if(!h&&!Q(S,this))return new S(f);if(this._writableState=new Y(f,this,h),f){if(typeof f.write==="function")this._write=f.write;if(typeof f.writev==="function")this._writev=f.writev;if(typeof f.destroy==="function")this._destroy=f.destroy;if(typeof f.final==="function")this._final=f.final;if(typeof f.construct==="function")this._construct=f.construct;if(f.signal)g(f.signal,this)}P.call(this,f),k.construct(this,()=>{let O$=this._writableState;if(!O$.writing)u(this,O$);b(this,O$)})}J(S,F,{__proto__:null,value:function(f){if(Q(this,f))return!0;if(this!==S)return!1;return f&&f._writableState instanceof Y}}),S.prototype.pipe=function(){v(this,new r)};function H(f,h,O$,t){let a=f._writableState;if(typeof O$==="function")t=O$,O$=a.defaultEncoding;else{if(!O$)O$=a.defaultEncoding;else if(O$!=="buffer"&&!R.isEncoding(O$))throw new I$(O$);if(typeof t!=="function")t=G}if(h===null)throw new X$;else if(!a.objectMode)if(typeof h==="string"){if(a.decodeStrings!==!1)h=R.from(h,O$),O$="buffer"}else if(h instanceof R)O$="buffer";else if(P._isUint8Array(h))h=P._uint8ArrayToBuffer(h),O$="buffer";else throw new N("chunk",["string","Buffer","Uint8Array"],h);let T$;if(a.ending)T$=new p;else if(a.destroyed)T$=new J$("write");if(T$)return D.nextTick(t,T$),v(f,T$,!0),T$;return a.pendingcb++,K(f,a,h,O$,t)}S.prototype.write=function(f,h,O$){return H(this,f,h,O$)===!0},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){let f=this._writableState;if(f.corked){if(f.corked--,!f.writing)u(this,f)}},S.prototype.setDefaultEncoding=function(f){if(typeof f==="string")f=Z(f);if(!R.isEncoding(f))throw new I$(f);return this._writableState.defaultEncoding=f,this};function K(f,h,O$,t,a){let T$=h.objectMode?1:O$.length;h.length+=T$;let y=h.length<h.highWaterMark;if(!y)h.needDrain=!0;if(h.writing||h.corked||h.errored||!h.constructed){if(h.buffered.push({chunk:O$,encoding:t,callback:a}),h.allBuffers&&t!=="buffer")h.allBuffers=!1;if(h.allNoop&&a!==G)h.allNoop=!1}else h.writelen=T$,h.writecb=a,h.writing=!0,h.sync=!0,f._write(O$,t,h.onwrite),h.sync=!1;return y&&!h.errored&&!h.destroyed}function O(f,h,O$,t,a,T$,y){if(h.writelen=t,h.writecb=y,h.writing=!0,h.sync=!0,h.destroyed)h.onwrite(new J$("write"));else if(O$)f._writev(a,h.onwrite);else f._write(a,T$,h.onwrite);h.sync=!1}function z(f,h,O$,t){--h.pendingcb,t(O$),w(h),v(f,O$)}function q(f,h){let O$=f._writableState,t=O$.sync,a=O$.writecb;if(typeof a!=="function"){v(f,new c);return}if(O$.writing=!1,O$.writecb=null,O$.length-=O$.writelen,O$.writelen=0,h){if(h.stack,!O$.errored)O$.errored=h;if(f._readableState&&!f._readableState.errored)f._readableState.errored=h;if(t)D.nextTick(z,f,O$,h,a);else z(f,O$,h,a)}else{if(O$.buffered.length>O$.bufferedIndex)u(f,O$);if(t)if(O$.afterWriteTickInfo!==null&&O$.afterWriteTickInfo.cb===a)O$.afterWriteTickInfo.count++;else O$.afterWriteTickInfo={count:1,cb:a,stream:f,state:O$},D.nextTick(M,O$.afterWriteTickInfo);else C(f,O$,1,a)}}function M({stream:f,state:h,count:O$,cb:t}){return h.afterWriteTickInfo=null,C(f,h,O$,t)}function C(f,h,O$,t){if(!h.ending&&!f.destroyed&&h.length===0&&h.needDrain)h.needDrain=!1,f.emit("drain");while(O$-- >0)h.pendingcb--,t();if(h.destroyed)w(h);b(f,h)}function w(f){if(f.writing)return;for(let a=f.bufferedIndex;a<f.buffered.length;++a){var h;let{chunk:T$,callback:y}=f.buffered[a],o=f.objectMode?1:T$.length;f.length-=o,y((h=f.errored)!==null&&h!==void 0?h:new J$("write"))}let O$=f[W].splice(0);for(let a=0;a<O$.length;a++){var t;O$[a]((t=f.errored)!==null&&t!==void 0?t:new J$("end"))}V(f)}function u(f,h){if(h.corked||h.bufferProcessing||h.destroyed||!h.constructed)return;let{buffered:O$,bufferedIndex:t,objectMode:a}=h,T$=O$.length-t;if(!T$)return;let y=t;if(h.bufferProcessing=!0,T$>1&&f._writev){h.pendingcb-=T$-1;let o=h.allNoop?G:(m)=>{for(let v$=y;v$<O$.length;++v$)O$[v$].callback(m)},w$=h.allNoop&&y===0?O$:X(O$,y);w$.allBuffers=h.allBuffers,O(f,h,!0,h.length,w$,"",o),V(h)}else{do{let{chunk:o,encoding:w$,callback:m}=O$[y];O$[y++]=null;let v$=a?1:o.length;O(f,h,!1,v$,o,w$,m)}while(y<O$.length&&!h.writing);if(y===O$.length)V(h);else if(y>256)O$.splice(0,y),h.bufferedIndex=0;else h.bufferedIndex=y}h.bufferProcessing=!1}S.prototype._write=function(f,h,O$){if(this._writev)this._writev([{chunk:f,encoding:h}],O$);else throw new B("_write()")},S.prototype._writev=null,S.prototype.end=function(f,h,O$){let t=this._writableState;if(typeof f==="function")O$=f,f=null,h=null;else if(typeof h==="function")O$=h,h=null;let a;if(f!==null&&f!==void 0){let T$=H(this,f,h);if(T$ instanceof U)a=T$}if(t.corked)t.corked=1,this.uncork();if(a);else if(!t.errored&&!t.ending)t.ending=!0,b(this,t,!0),t.ended=!0;else if(t.finished)a=new G$("end");else if(t.destroyed)a=new J$("end");if(typeof O$==="function")if(a||t.finished)D.nextTick(O$,a);else t[W].push(O$);return this};function n(f){return f.ending&&!f.destroyed&&f.constructed&&f.length===0&&!f.errored&&f.buffered.length===0&&!f.finished&&!f.writing&&!f.errorEmitted&&!f.closeEmitted}function W$(f,h){let O$=!1;function t(a){if(O$){v(f,a!==null&&a!==void 0?a:c());return}if(O$=!0,h.pendingcb--,a){let T$=h[W].splice(0);for(let y=0;y<T$.length;y++)T$[y](a);v(f,a,h.sync)}else if(n(h))h.prefinished=!0,f.emit("prefinish"),h.pendingcb++,D.nextTick(D$,f,h)}h.sync=!0,h.pendingcb++;try{f._final(t)}catch(a){t(a)}h.sync=!1}function i(f,h){if(!h.prefinished&&!h.finalCalled)if(typeof f._final==="function"&&!h.destroyed)h.finalCalled=!0,W$(f,h);else h.prefinished=!0,f.emit("prefinish")}function b(f,h,O$){if(n(h)){if(i(f,h),h.pendingcb===0){if(O$)h.pendingcb++,D.nextTick((t,a)=>{if(n(a))D$(t,a);else a.pendingcb--},f,h);else if(n(h))h.pendingcb++,D$(f,h)}}}function D$(f,h){h.pendingcb--,h.finished=!0;let O$=h[W].splice(0);for(let t=0;t<O$.length;t++)O$[t]();if(f.emit("finish"),h.autoDestroy){let t=f._readableState;if(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))f.destroy()}}A(S.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(f){if(this._writableState)this._writableState.destroyed=f}},writable:{__proto__:null,get(){let f=this._writableState;return!!f&&f.writable!==!1&&!f.destroyed&&!f.errored&&!f.ending&&!f.ended},set(f){if(this._writableState)this._writableState.writable=!!f}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let f=this._writableState;if(!f)return!1;return!f.destroyed&&!f.ending&&f.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var d=k.destroy;S.prototype.destroy=function(f,h){let O$=this._writableState;if(!O$.destroyed&&(O$.bufferedIndex<O$.buffered.length||O$[W].length))D.nextTick(w,O$);return d.call(this,f,h),this},S.prototype._undestroy=k.undestroy,S.prototype._destroy=function(f,h){h(f)},S.prototype[E.captureRejectionSymbol]=function(f){this.destroy(f)};var s;function h$(){if(s===void 0)s={};return s}S.fromWeb=function(f,h){return h$().newStreamWritableFromWritableStream(f,h)},S.toWeb=function(f){return h$().newWritableStreamFromStreamWritable(f)}}),S2=s$(($,I)=>{var D=aU(),X=(j0(),e$(_0)),{isReadable:U,isWritable:Q,isIterable:J,isNodeStream:A,isReadableNodeStream:T,isWritableNodeStream:Z,isDuplexNodeStream:L,isReadableStream:F,isWritableStream:E}=EU(),P=cU(),{AbortError:R,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:g}}=p0(),{destroyer:j}=wI(),_=LU(),N=P4(),B=eQ(),{createDeferredPromise:c}=d0(),r=zW(),J$=globalThis.Blob||X.Blob,G$=typeof J$<"u"?function(W){return W instanceof J$}:function(W){return!1},X$=globalThis.AbortController||E6().AbortController,{FunctionPrototypeCall:p}=J0();class I$ extends _{constructor(W){super(W);if((W===null||W===void 0?void 0:W.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((W===null||W===void 0?void 0:W.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}I.exports=function W(Y,V){if(L(Y))return Y;if(T(Y))return G({readable:Y});if(Z(Y))return G({writable:Y});if(A(Y))return G({writable:!1,readable:!1});if(F(Y))return G({readable:N.fromWeb(Y)});if(E(Y))return G({writable:B.fromWeb(Y)});if(typeof Y==="function"){let{value:H,write:K,final:O,destroy:z}=v(Y);if(J(H))return r(I$,H,{objectMode:!0,write:K,final:O,destroy:z});let q=H===null||H===void 0?void 0:H.then;if(typeof q==="function"){let M,C=p(q,H,(w)=>{if(w!=null)throw new g("nully","body",w)},(w)=>{j(M,w)});return M=new I$({objectMode:!0,readable:!1,write:K,final(w){O(async()=>{try{await C,D.nextTick(w,null)}catch(u){D.nextTick(w,u)}})},destroy:z})}throw new g("Iterable, AsyncIterable or AsyncFunction",V,H)}if(G$(Y))return W(Y.arrayBuffer());if(J(Y))return r(I$,Y,{objectMode:!0,writable:!1});if(F(Y===null||Y===void 0?void 0:Y.readable)&&E(Y===null||Y===void 0?void 0:Y.writable))return I$.fromWeb(Y);if(typeof(Y===null||Y===void 0?void 0:Y.writable)==="object"||typeof(Y===null||Y===void 0?void 0:Y.readable)==="object"){let H=Y!==null&&Y!==void 0&&Y.readable?T(Y===null||Y===void 0?void 0:Y.readable)?Y===null||Y===void 0?void 0:Y.readable:W(Y.readable):void 0,K=Y!==null&&Y!==void 0&&Y.writable?Z(Y===null||Y===void 0?void 0:Y.writable)?Y===null||Y===void 0?void 0:Y.writable:W(Y.writable):void 0;return G({readable:H,writable:K})}let S=Y===null||Y===void 0?void 0:Y.then;if(typeof S==="function"){let H;return p(S,Y,(K)=>{if(K!=null)H.push(K);H.push(null)},(K)=>{j(H,K)}),H=new I$({objectMode:!0,writable:!1,read(){}})}throw new k(V,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Y)};function v(W){let{promise:Y,resolve:V}=c(),S=new X$,H=S.signal;return{value:W(async function*(){while(!0){let K=Y;Y=null;let{chunk:O,done:z,cb:q}=await K;if(D.nextTick(q),z)return;if(H.aborted)throw new R(void 0,{cause:H.reason});({promise:Y,resolve:V}=c()),yield O}}(),{signal:H}),write(K,O,z){let q=V;V=null,q({chunk:K,done:!1,cb:z})},final(K){let O=V;V=null,O({done:!0,cb:K})},destroy(K,O){S.abort(),O(K)}}}function G(W){let Y=W.readable&&typeof W.readable.read!=="function"?N.wrap(W.readable):W.readable,V=W.writable,S=!!U(Y),H=!!Q(V),K,O,z,q,M;function C(w){let u=q;if(q=null,u)u(w);else if(w)M.destroy(w)}if(M=new I$({readableObjectMode:!!(Y!==null&&Y!==void 0&&Y.readableObjectMode),writableObjectMode:!!(V!==null&&V!==void 0&&V.writableObjectMode),readable:S,writable:H}),H)P(V,(w)=>{if(H=!1,w)j(Y,w);C(w)}),M._write=function(w,u,n){if(V.write(w,u))n();else K=n},M._final=function(w){V.end(),O=w},V.on("drain",function(){if(K){let w=K;K=null,w()}}),V.on("finish",function(){if(O){let w=O;O=null,w()}});if(S)P(Y,(w)=>{if(S=!1,w)j(Y,w);C(w)}),Y.on("readable",function(){if(z){let w=z;z=null,w()}}),Y.on("end",function(){M.push(null)}),M._read=function(){while(!0){let w=Y.read();if(w===null){z=M._read;return}if(!M.push(w))return}};return M._destroy=function(w,u){if(!w&&q!==null)w=new R;if(z=null,K=null,O=null,q===null)u(w);else q=u,j(V,w),j(Y,w)},M}}),LU=s$(($,I)=>{var{ObjectDefineProperties:D,ObjectGetOwnPropertyDescriptor:X,ObjectKeys:U,ObjectSetPrototypeOf:Q}=J0();I.exports=T;var J=P4(),A=eQ();Q(T.prototype,J.prototype),Q(T,J);{let E=U(A.prototype);for(let P=0;P<E.length;P++){let R=E[P];if(!T.prototype[R])T.prototype[R]=A.prototype[R]}}function T(E){if(!(this instanceof T))return new T(E);if(J.call(this,E),A.call(this,E),E){if(this.allowHalfOpen=E.allowHalfOpen!==!1,E.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(E.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}D(T.prototype,{writable:{__proto__:null,...X(A.prototype,"writable")},writableHighWaterMark:{__proto__:null,...X(A.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...X(A.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...X(A.prototype,"writableBuffer")},writableLength:{__proto__:null,...X(A.prototype,"writableLength")},writableFinished:{__proto__:null,...X(A.prototype,"writableFinished")},writableCorked:{__proto__:null,...X(A.prototype,"writableCorked")},writableEnded:{__proto__:null,...X(A.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...X(A.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(E){if(this._readableState&&this._writableState)this._readableState.destroyed=E,this._writableState.destroyed=E}}});var Z;function L(){if(Z===void 0)Z={};return Z}T.fromWeb=function(E,P){return L().newStreamDuplexFromReadableWritablePair(E,P)},T.toWeb=function(E){return L().newReadableWritablePairFromDuplex(E)};var F;T.from=function(E){if(!F)F=S2();return F(E,"body")}}),SW=s$(($,I)=>{var{ObjectSetPrototypeOf:D,Symbol:X}=J0();I.exports=T;var{ERR_METHOD_NOT_IMPLEMENTED:U}=p0().codes,Q=LU(),{getHighWaterMark:J}=M4();D(T.prototype,Q.prototype),D(T,Q);var A=X("kCallback");function T(F){if(!(this instanceof T))return new T(F);let E=F?J(this,F,"readableHighWaterMark",!0):null;if(E===0)F={...F,highWaterMark:null,readableHighWaterMark:E,writableHighWaterMark:F.writableHighWaterMark||0};if(Q.call(this,F),this._readableState.sync=!1,this[A]=null,F){if(typeof F.transform==="function")this._transform=F.transform;if(typeof F.flush==="function")this._flush=F.flush}this.on("prefinish",L)}function Z(F){if(typeof this._flush==="function"&&!this.destroyed)this._flush((E,P)=>{if(E){if(F)F(E);else this.destroy(E);return}if(P!=null)this.push(P);if(this.push(null),F)F()});else if(this.push(null),F)F()}function L(){if(this._final!==Z)Z.call(this)}T.prototype._final=Z,T.prototype._transform=function(F,E,P){throw new U("_transform()")},T.prototype._write=function(F,E,P){let R=this._readableState,k=this._writableState,g=R.length;this._transform(F,E,(j,_)=>{if(j){P(j);return}if(_!=null)this.push(_);if(k.ended||g===R.length||R.length<R.highWaterMark)P();else this[A]=P})},T.prototype._read=function(){if(this[A]){let F=this[A];this[A]=null,F()}}}),AW=s$(($,I)=>{var{ObjectSetPrototypeOf:D}=J0();I.exports=U;var X=SW();D(U.prototype,X.prototype),D(U,X);function U(Q){if(!(this instanceof U))return new U(Q);X.call(this,Q)}U.prototype._transform=function(Q,J,A){A(null,Q)}}),aQ=s$(($,I)=>{var D=aU(),{ArrayIsArray:X,Promise:U,SymbolAsyncIterator:Q,SymbolDispose:J}=J0(),A=cU(),{once:T}=d0(),Z=wI(),L=LU(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:E,ERR_INVALID_RETURN_VALUE:P,ERR_MISSING_ARGS:R,ERR_STREAM_DESTROYED:k,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:j}=p0(),{validateFunction:_,validateAbortSignal:N}=T6(),{isIterable:B,isReadable:c,isReadableNodeStream:r,isNodeStream:J$,isTransformStream:G$,isWebStream:X$,isReadableStream:p,isReadableFinished:I$}=EU(),v=globalThis.AbortController||E6().AbortController,G,W,Y;function V(w,u,n){let W$=!1;w.on("close",()=>{W$=!0});let i=A(w,{readable:u,writable:n},(b)=>{W$=!b});return{destroy:(b)=>{if(W$)return;W$=!0,Z.destroyer(w,b||new k("pipe"))},cleanup:i}}function S(w){return _(w[w.length-1],"streams[stream.length - 1]"),w.pop()}function H(w){if(B(w))return w;else if(r(w))return K(w);throw new E("val",["Readable","Iterable","AsyncIterable"],w)}async function*K(w){if(!W)W=P4();yield*W.prototype[Q].call(w)}async function O(w,u,n,{end:W$}){let i,b=null,D$=(h$)=>{if(h$)i=h$;if(b){let f=b;b=null,f()}},d=()=>new U((h$,f)=>{if(i)f(i);else b=()=>{if(i)f(i);else h$()}});u.on("drain",D$);let s=A(u,{readable:!1},D$);try{if(u.writableNeedDrain)await d();for await(let h$ of w)if(!u.write(h$))await d();if(W$)u.end(),await d();n()}catch(h$){n(i!==h$?F(i,h$):h$)}finally{s(),u.off("drain",D$)}}async function z(w,u,n,{end:W$}){if(G$(u))u=u.writable;let i=u.getWriter();try{for await(let b of w)await i.ready,i.write(b).catch(()=>{});if(await i.ready,W$)await i.close();n()}catch(b){try{await i.abort(b),n(b)}catch(D$){n(D$)}}}function q(...w){return M(w,T(S(w)))}function M(w,u,n){if(w.length===1&&X(w[0]))w=w[0];if(w.length<2)throw new R("streams");let W$=new v,i=W$.signal,b=n===null||n===void 0?void 0:n.signal,D$=[];N(b,"options.signal");function d(){a(new j)}Y=Y||d0().addAbortListener;let s;if(b)s=Y(b,d);let h$,f,h=[],O$=0;function t(m){a(m,--O$===0)}function a(m,v$){var r$;if(m&&(!h$||h$.code==="ERR_STREAM_PREMATURE_CLOSE"))h$=m;if(!h$&&!v$)return;while(h.length)h.shift()(h$);if((r$=s)===null||r$===void 0||r$[J](),W$.abort(),v$){if(!h$)D$.forEach((S$)=>S$());D.nextTick(u,h$,f)}}let T$;for(let m=0;m<w.length;m++){let v$=w[m],r$=m<w.length-1,S$=m>0,A$=r$||(n===null||n===void 0?void 0:n.end)!==!1,X0=m===w.length-1;if(J$(v$)){let K$=function(F$){if(F$&&F$.name!=="AbortError"&&F$.code!=="ERR_STREAM_PREMATURE_CLOSE")t(F$)};var y=K$;if(A$){let{destroy:F$,cleanup:G0}=V(v$,r$,S$);if(h.push(F$),c(v$)&&X0)D$.push(G0)}if(v$.on("error",K$),c(v$)&&X0)D$.push(()=>{v$.removeListener("error",K$)})}if(m===0)if(typeof v$==="function"){if(T$=v$({signal:i}),!B(T$))throw new P("Iterable, AsyncIterable or Stream","source",T$)}else if(B(v$)||r(v$)||G$(v$))T$=v$;else T$=L.from(v$);else if(typeof v$==="function"){if(G$(T$)){var o;T$=H((o=T$)===null||o===void 0?void 0:o.readable)}else T$=H(T$);if(T$=v$(T$,{signal:i}),r$){if(!B(T$,!0))throw new P("AsyncIterable",`transform[${m-1}]`,T$)}else{var w$;if(!G)G=AW();let K$=new G({objectMode:!0}),F$=(w$=T$)===null||w$===void 0?void 0:w$.then;if(typeof F$==="function")O$++,F$.call(T$,(Z$)=>{if(f=Z$,Z$!=null)K$.write(Z$);if(A$)K$.end();D.nextTick(t)},(Z$)=>{K$.destroy(Z$),D.nextTick(t,Z$)});else if(B(T$,!0))O$++,O(T$,K$,t,{end:A$});else if(p(T$)||G$(T$)){let Z$=T$.readable||T$;O$++,O(Z$,K$,t,{end:A$})}else throw new P("AsyncIterable or Promise","destination",T$);T$=K$;let{destroy:G0,cleanup:L$}=V(T$,!1,!0);if(h.push(G0),X0)D$.push(L$)}}else if(J$(v$)){if(r(T$)){O$+=2;let K$=C(T$,v$,t,{end:A$});if(c(v$)&&X0)D$.push(K$)}else if(G$(T$)||p(T$)){let K$=T$.readable||T$;O$++,O(K$,v$,t,{end:A$})}else if(B(T$))O$++,O(T$,v$,t,{end:A$});else throw new E("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],T$);T$=v$}else if(X$(v$)){if(r(T$))O$++,z(H(T$),v$,t,{end:A$});else if(p(T$)||B(T$))O$++,z(T$,v$,t,{end:A$});else if(G$(T$))O$++,z(T$.readable,v$,t,{end:A$});else throw new E("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],T$);T$=v$}else T$=L.from(v$)}if(i!==null&&i!==void 0&&i.aborted||b!==null&&b!==void 0&&b.aborted)D.nextTick(d);return T$}function C(w,u,n,{end:W$}){let i=!1;if(u.on("close",()=>{if(!i)n(new g)}),w.pipe(u,{end:!1}),W$){let D$=function(){i=!0,u.end()};var b=D$;if(I$(w))D.nextTick(D$);else w.once("end",D$)}else n();return A(w,{readable:!0,writable:!1},(D$)=>{let d=w._readableState;if(D$&&D$.code==="ERR_STREAM_PREMATURE_CLOSE"&&d&&d.ended&&!d.errored&&!d.errorEmitted)w.once("end",n).once("error",n);else n(D$)}),A(u,{readable:!1,writable:!0},n)}I.exports={pipelineImpl:M,pipeline:q}}),FW=s$(($,I)=>{var{pipeline:D}=aQ(),X=LU(),{destroyer:U}=wI(),{isNodeStream:Q,isReadable:J,isWritable:A,isWebStream:T,isTransformStream:Z,isWritableStream:L,isReadableStream:F}=EU(),{AbortError:E,codes:{ERR_INVALID_ARG_VALUE:P,ERR_MISSING_ARGS:R}}=p0(),k=cU();I.exports=function(...g){if(g.length===0)throw new R("streams");if(g.length===1)return X.from(g[0]);let j=[...g];if(typeof g[0]==="function")g[0]=X.from(g[0]);if(typeof g[g.length-1]==="function"){let v=g.length-1;g[v]=X.from(g[v])}for(let v=0;v<g.length;++v){if(!Q(g[v])&&!T(g[v]))continue;if(v<g.length-1&&!(J(g[v])||F(g[v])||Z(g[v])))throw new P(`streams[${v}]`,j[v],"must be readable");if(v>0&&!(A(g[v])||L(g[v])||Z(g[v])))throw new P(`streams[${v}]`,j[v],"must be writable")}let _,N,B,c,r;function J$(v){let G=c;if(c=null,G)G(v);else if(v)r.destroy(v);else if(!I$&&!p)r.destroy()}let G$=g[0],X$=D(g,J$),p=!!(A(G$)||L(G$)||Z(G$)),I$=!!(J(X$)||F(X$)||Z(X$));if(r=new X({writableObjectMode:!!(G$!==null&&G$!==void 0&&G$.writableObjectMode),readableObjectMode:!!(X$!==null&&X$!==void 0&&X$.readableObjectMode),writable:p,readable:I$}),p){if(Q(G$))r._write=function(G,W,Y){if(G$.write(G,W))Y();else _=Y},r._final=function(G){G$.end(),N=G},G$.on("drain",function(){if(_){let G=_;_=null,G()}});else if(T(G$)){let G=(Z(G$)?G$.writable:G$).getWriter();r._write=async function(W,Y,V){try{await G.ready,G.write(W).catch(()=>{}),V()}catch(S){V(S)}},r._final=async function(W){try{await G.ready,G.close().catch(()=>{}),N=W}catch(Y){W(Y)}}}let v=Z(X$)?X$.readable:X$;k(v,()=>{if(N){let G=N;N=null,G()}})}if(I$){if(Q(X$))X$.on("readable",function(){if(B){let v=B;B=null,v()}}),X$.on("end",function(){r.push(null)}),r._read=function(){while(!0){let v=X$.read();if(v===null){B=r._read;return}if(!r.push(v))return}};else if(T(X$)){let v=(Z(X$)?X$.readable:X$).getReader();r._read=async function(){while(!0)try{let{value:G,done:W}=await v.read();if(!r.push(G))return;if(W){r.push(null);return}}catch{return}}}}return r._destroy=function(v,G){if(!v&&c!==null)v=new E;if(B=null,_=null,N=null,c===null)G(v);else if(c=G,Q(X$))U(X$,v)},r}}),A2=s$(($,I)=>{var D=globalThis.AbortController||E6().AbortController,{codes:{ERR_INVALID_ARG_VALUE:X,ERR_INVALID_ARG_TYPE:U,ERR_MISSING_ARGS:Q,ERR_OUT_OF_RANGE:J},AbortError:A}=p0(),{validateAbortSignal:T,validateInteger:Z,validateObject:L}=T6(),F=J0().Symbol("kWeak"),E=J0().Symbol("kResistStopPropagation"),{finished:P}=cU(),R=FW(),{addAbortSignalNoValidate:k}=T4(),{isWritable:g,isNodeStream:j}=EU(),{deprecate:_}=d0(),{ArrayPrototypePush:N,Boolean:B,MathFloor:c,Number:r,NumberIsNaN:J$,Promise:G$,PromiseReject:X$,PromiseResolve:p,PromisePrototypeThen:I$,Symbol:v}=J0(),G=v("kEmpty"),W=v("kEof");function Y(b,D$){if(D$!=null)L(D$,"options");if((D$===null||D$===void 0?void 0:D$.signal)!=null)T(D$.signal,"options.signal");if(j(b)&&!g(b))throw new X("stream",b,"must be writable");let d=R(this,b);if(D$!==null&&D$!==void 0&&D$.signal)k(D$.signal,d);return d}function V(b,D$){if(typeof b!=="function")throw new U("fn",["Function","AsyncFunction"],b);if(D$!=null)L(D$,"options");if((D$===null||D$===void 0?void 0:D$.signal)!=null)T(D$.signal,"options.signal");let d=1;if((D$===null||D$===void 0?void 0:D$.concurrency)!=null)d=c(D$.concurrency);let s=d-1;if((D$===null||D$===void 0?void 0:D$.highWaterMark)!=null)s=c(D$.highWaterMark);return Z(d,"options.concurrency",1),Z(s,"options.highWaterMark",0),s+=d,async function*(){let h$=d0().AbortSignalAny([D$===null||D$===void 0?void 0:D$.signal].filter(B)),f=this,h=[],O$={signal:h$},t,a,T$=!1,y=0;function o(){T$=!0,w$()}function w$(){y-=1,m()}function m(){if(a&&!T$&&y<d&&h.length<s)a(),a=null}async function v$(){try{for await(let r$ of f){if(T$)return;if(h$.aborted)throw new A;try{if(r$=b(r$,O$),r$===G)continue;r$=p(r$)}catch(S$){r$=X$(S$)}if(y+=1,I$(r$,w$,o),h.push(r$),t)t(),t=null;if(!T$&&(h.length>=s||y>=d))await new G$((S$)=>{a=S$})}h.push(W)}catch(r$){let S$=X$(r$);I$(S$,w$,o),h.push(S$)}finally{if(T$=!0,t)t(),t=null}}v$();try{while(!0){while(h.length>0){let r$=await h[0];if(r$===W)return;if(h$.aborted)throw new A;if(r$!==G)yield r$;h.shift(),m()}await new G$((r$)=>{t=r$})}}finally{if(T$=!0,a)a(),a=null}}.call(this)}function S(b=void 0){if(b!=null)L(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)T(b.signal,"options.signal");return async function*(){let D$=0;for await(let s of this){var d;if(b!==null&&b!==void 0&&(d=b.signal)!==null&&d!==void 0&&d.aborted)throw new A({cause:b.signal.reason});yield[D$++,s]}}.call(this)}async function H(b,D$=void 0){for await(let d of q.call(this,b,D$))return!0;return!1}async function K(b,D$=void 0){if(typeof b!=="function")throw new U("fn",["Function","AsyncFunction"],b);return!await H.call(this,async(...d)=>{return!await b(...d)},D$)}async function O(b,D$){for await(let d of q.call(this,b,D$))return d;return}async function z(b,D$){if(typeof b!=="function")throw new U("fn",["Function","AsyncFunction"],b);async function d(s,h$){return await b(s,h$),G}for await(let s of V.call(this,d,D$));}function q(b,D$){if(typeof b!=="function")throw new U("fn",["Function","AsyncFunction"],b);async function d(s,h$){if(await b(s,h$))return s;return G}return V.call(this,d,D$)}class M extends Q{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function C(b,D$,d){var s;if(typeof b!=="function")throw new U("reducer",["Function","AsyncFunction"],b);if(d!=null)L(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)T(d.signal,"options.signal");let h$=arguments.length>1;if(d!==null&&d!==void 0&&(s=d.signal)!==null&&s!==void 0&&s.aborted){let a=new A(void 0,{cause:d.signal.reason});throw this.once("error",()=>{}),await P(this.destroy(a)),a}let f=new D,h=f.signal;if(d!==null&&d!==void 0&&d.signal){let a={once:!0,[F]:this,[E]:!0};d.signal.addEventListener("abort",()=>f.abort(),a)}let O$=!1;try{for await(let a of this){var t;if(O$=!0,d!==null&&d!==void 0&&(t=d.signal)!==null&&t!==void 0&&t.aborted)throw new A;if(!h$)D$=a,h$=!0;else D$=await b(D$,a,{signal:h})}if(!O$&&!h$)throw new M}finally{f.abort()}return D$}async function w(b){if(b!=null)L(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)T(b.signal,"options.signal");let D$=[];for await(let s of this){var d;if(b!==null&&b!==void 0&&(d=b.signal)!==null&&d!==void 0&&d.aborted)throw new A(void 0,{cause:b.signal.reason});N(D$,s)}return D$}function u(b,D$){let d=V.call(this,b,D$);return async function*(){for await(let s of d)yield*s}.call(this)}function n(b){if(b=r(b),J$(b))return 0;if(b<0)throw new J("number",">= 0",b);return b}function W$(b,D$=void 0){if(D$!=null)L(D$,"options");if((D$===null||D$===void 0?void 0:D$.signal)!=null)T(D$.signal,"options.signal");return b=n(b),async function*(){var d;if(D$!==null&&D$!==void 0&&(d=D$.signal)!==null&&d!==void 0&&d.aborted)throw new A;for await(let h$ of this){var s;if(D$!==null&&D$!==void 0&&(s=D$.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(b--<=0)yield h$}}.call(this)}function i(b,D$=void 0){if(D$!=null)L(D$,"options");if((D$===null||D$===void 0?void 0:D$.signal)!=null)T(D$.signal,"options.signal");return b=n(b),async function*(){var d;if(D$!==null&&D$!==void 0&&(d=D$.signal)!==null&&d!==void 0&&d.aborted)throw new A;for await(let h$ of this){var s;if(D$!==null&&D$!==void 0&&(s=D$.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(b-- >0)yield h$;if(b<=0)return}}.call(this)}I.exports.streamReturningOperators={asIndexedPairs:_(S,"readable.asIndexedPairs will be removed in a future version."),drop:W$,filter:q,flatMap:u,map:V,take:i,compose:Y},I.exports.promiseReturningOperators={every:K,forEach:z,reduce:C,toArray:w,some:H,find:O}}),HW=s$(($,I)=>{var{ArrayPrototypePop:D,Promise:X}=J0(),{isIterable:U,isNodeStream:Q,isWebStream:J}=EU(),{pipelineImpl:A}=aQ(),{finished:T}=cU();ZW();function Z(...L){return new X((F,E)=>{let P,R,k=L[L.length-1];if(k&&typeof k==="object"&&!Q(k)&&!U(k)&&!J(k)){let g=D(L);P=g.signal,R=g.end}A(L,(g,j)=>{if(g)E(g);else F(j)},{signal:P,end:R})})}I.exports={finished:T,pipeline:Z}}),ZW=s$(($,I)=>{var{Buffer:D}=(j0(),e$(_0)),{ObjectDefineProperty:X,ObjectKeys:U,ReflectApply:Q}=J0(),{promisify:{custom:J}}=d0(),{streamReturningOperators:A,promiseReturningOperators:T}=A2(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:Z}}=p0(),L=FW(),{setDefaultHighWaterMark:F,getDefaultHighWaterMark:E}=M4(),{pipeline:P}=aQ(),{destroyer:R}=wI(),k=cU(),g=HW(),j=EU(),_=I.exports=iQ().Stream;_.isDestroyed=j.isDestroyed,_.isDisturbed=j.isDisturbed,_.isErrored=j.isErrored,_.isReadable=j.isReadable,_.isWritable=j.isWritable,_.Readable=P4();for(let B of U(A)){let c=function(...J$){if(new.target)throw Z();return _.Readable.from(Q(r,this,J$))},r=A[B];X(c,"name",{__proto__:null,value:r.name}),X(c,"length",{__proto__:null,value:r.length}),X(_.Readable.prototype,B,{__proto__:null,value:c,enumerable:!1,configurable:!0,writable:!0})}for(let B of U(T)){let c=function(...J$){if(new.target)throw Z();return Q(r,this,J$)},r=T[B];X(c,"name",{__proto__:null,value:r.name}),X(c,"length",{__proto__:null,value:r.length}),X(_.Readable.prototype,B,{__proto__:null,value:c,enumerable:!1,configurable:!0,writable:!0})}_.Writable=eQ(),_.Duplex=LU(),_.Transform=SW(),_.PassThrough=AW(),_.pipeline=P;var{addAbortSignal:N}=T4();_.addAbortSignal=N,_.finished=k,_.destroy=R,_.compose=L,_.setDefaultHighWaterMark=F,_.getDefaultHighWaterMark=E,X(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return g}}),X(P,J,{__proto__:null,enumerable:!0,get(){return g.pipeline}}),X(k,J,{__proto__:null,enumerable:!0,get(){return g.finished}}),_.Stream=_,_._isUint8Array=function(B){return B instanceof Uint8Array},_._uint8ArrayToBuffer=function(B){return D.from(B.buffer,B.byteOffset,B.byteLength)}}),F2=s$(($,I)=>{var D=sQ();{let X=ZW(),U=HW(),Q=X.Readable.destroy;I.exports=X.Readable,I.exports._uint8ArrayToBuffer=X._uint8ArrayToBuffer,I.exports._isUint8Array=X._isUint8Array,I.exports.isDisturbed=X.isDisturbed,I.exports.isErrored=X.isErrored,I.exports.isReadable=X.isReadable,I.exports.Readable=X.Readable,I.exports.Writable=X.Writable,I.exports.Duplex=X.Duplex,I.exports.Transform=X.Transform,I.exports.PassThrough=X.PassThrough,I.exports.addAbortSignal=X.addAbortSignal,I.exports.finished=X.finished,I.exports.destroy=X.destroy,I.exports.destroy=Q,I.exports.pipeline=X.pipeline,I.exports.compose=X.compose,Object.defineProperty(X,"promises",{configurable:!0,enumerable:!0,get(){return U}}),I.exports.Stream=X.Stream}I.exports.default=I.exports});LW.exports=F2()});var m0={};i0(m0,{webcrypto:()=>lH,rng:()=>IH,randomUUID:()=>uH,randomFillSync:()=>xH,randomFill:()=>BH,randomBytes:()=>GY,publicEncrypt:()=>CH,publicDecrypt:()=>jH,pseudoRandomBytes:()=>UH,prng:()=>$H,privateEncrypt:()=>_H,privateDecrypt:()=>NH,pbkdf2Sync:()=>QH,pbkdf2:()=>XH,listCiphers:()=>HH,getRandomValues:()=>yH,getHashes:()=>JH,getDiffieHellman:()=>EH,getCurves:()=>pH,getCiphers:()=>FH,default:()=>bH,createVerify:()=>RH,createSign:()=>PH,createHmac:()=>VY,createHash:()=>DH,createECDH:()=>kH,createDiffieHellmanGroup:()=>LH,createDiffieHellman:()=>TH,createDecipheriv:()=>AH,createDecipher:()=>zH,createCredentials:()=>wH,createCipheriv:()=>WH,createCipher:()=>GH,constants:()=>cH,Verify:()=>gH,Sign:()=>qH,Hmac:()=>OH,Hash:()=>vH,DiffieHellmanGroup:()=>ZH,DiffieHellman:()=>MH,Decipheriv:()=>SH,Decipher:()=>KH,DEFAULT_ENCODING:()=>fH,Cipheriv:()=>VH,Cipher:()=>YH});function pH(){return hH}var H2,Z2,EW,L2,E2,T2=($,I,D)=>{D=$!=null?H2(Z2($)):{};let X=I||!$||!$.__esModule?EW(D,"default",{value:$,enumerable:!0}):D;for(let U of L2($))if(!E2.call(X,U))EW(X,U,{get:()=>$[U],enumerable:!0});return X},Y$=($,I)=>()=>(I||$((I={exports:{}}).exports,I),I.exports),q4,R4,MW,M2,UY,IY,l0,P2,P6,PW,q2,R2,g2,k2,qW,C2,_2,j2,N2,B2,x2,w2,c2,f2,y2,q6,g4,RW,u2,gW,kW,h2,R6,vY,DY,p2,CW,OY,l2,_W,b2,jW,NW,r2,o2,n2,d2,m2,t2,i2,e2,a2,s2,$F,UF,IF,vF,JY,BW,DF,xW,OF,JF,XF,QF,TU,fU,wW,vU,cW,k4,YF,s0,GF,VF,WF,fW,zU,g6,yW,KF,uW,zF,hW,SF,AF,FF,HF,XY,ZF,QY,LF,EF,TF,MF,PF,qF,RF,gF,kF,CF,_F,jF,NF,BF,TW,xF,M6,wF,pW,lW,cF,fF,bW,yF,uF,k6,hF,pF,lF,bF,rF,oF,rW,nF,oW,nW,dW,YY,mW,dF,tW,mF,tF,$Y,iF,eF,aF,sF,i$,$H,UH,IH,GY,vH,DH,OH,VY,JH,XH,QH,YH,GH,VH,WH,KH,zH,SH,AH,FH,HH,ZH,LH,EH,TH,MH,PH,qH,RH,gH,kH,CH,_H,jH,NH,BH,xH,wH,cH,fH="buffer",yH=($)=>{return crypto.getRandomValues($)},uH=()=>{return crypto.randomUUID()},hH,lH,bH;var t0=C6(()=>{H2=Object.create,{getPrototypeOf:Z2,defineProperty:EW,getOwnPropertyNames:L2}=Object,E2=Object.prototype.hasOwnProperty,q4=Y$(($,I)=>{I.exports=(t0(),e$(m0)).randomBytes}),R4=Y$(($,I)=>{I.exports=(t0(),e$(m0)).createHash}),MW=Y$(($,I)=>{I.exports=(t0(),e$(m0)).createHmac}),M2=Y$(($,I)=>{I.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),UY=Y$(($,I)=>{var D=isFinite,X=Math.pow(2,30)-1;I.exports=function(U,Q){if(typeof U!=="number")throw TypeError("Iterations not a number");if(U<0||!D(U))throw TypeError("Bad iterations");if(typeof Q!=="number")throw TypeError("Key length not a number");if(Q<0||Q>X||Q!==Q)throw TypeError("Bad key length")}}),IY=Y$(($,I)=>{var D;if(globalThis.process&&globalThis.process.browser)D="utf-8";else if(globalThis.process&&globalThis.process.version)X=parseInt(process.version.split(".")[0].slice(1),10),D=X>=6?"utf-8":"binary";else D="utf-8";var X;I.exports=D}),l0=Y$(($,I)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var D=(j0(),e$(_0)),X=D.Buffer;function U(J,A){for(var T in J)A[T]=J[T]}if(X.from&&X.alloc&&X.allocUnsafe&&X.allocUnsafeSlow)I.exports=D;else U(D,$),$.Buffer=Q;function Q(J,A,T){return X(J,A,T)}Q.prototype=Object.create(X.prototype),U(X,Q),Q.from=function(J,A,T){if(typeof J==="number")throw TypeError("Argument must not be a number");return X(J,A,T)},Q.alloc=function(J,A,T){if(typeof J!=="number")throw TypeError("Argument must be a number");var Z=X(J);if(A!==void 0)if(typeof T==="string")Z.fill(A,T);else Z.fill(A);else Z.fill(0);return Z},Q.allocUnsafe=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return X(J)},Q.allocUnsafeSlow=function(J){if(typeof J!=="number")throw TypeError("Argument must be a number");return D.SlowBuffer(J)}}),P2=Y$(($,I)=>{var D={}.toString;I.exports=Array.isArray||function(X){return D.call(X)=="[object Array]"}}),P6=Y$(($,I)=>{I.exports=TypeError}),PW=Y$(($,I)=>{I.exports=Object}),q2=Y$(($,I)=>{I.exports=Error}),R2=Y$(($,I)=>{I.exports=EvalError}),g2=Y$(($,I)=>{I.exports=RangeError}),k2=Y$(($,I)=>{I.exports=ReferenceError}),qW=Y$(($,I)=>{I.exports=SyntaxError}),C2=Y$(($,I)=>{I.exports=URIError}),_2=Y$(($,I)=>{I.exports=Math.abs}),j2=Y$(($,I)=>{I.exports=Math.floor}),N2=Y$(($,I)=>{I.exports=Math.max}),B2=Y$(($,I)=>{I.exports=Math.min}),x2=Y$(($,I)=>{I.exports=Math.pow}),w2=Y$(($,I)=>{I.exports=Math.round}),c2=Y$(($,I)=>{I.exports=Number.isNaN||function(D){return D!==D}}),f2=Y$(($,I)=>{var D=c2();I.exports=function(X){if(D(X)||X===0)return X;return X<0?-1:1}}),y2=Y$(($,I)=>{I.exports=Object.getOwnPropertyDescriptor}),q6=Y$(($,I)=>{var D=y2();if(D)try{D([],"length")}catch(X){D=null}I.exports=D}),g4=Y$(($,I)=>{var D=Object.defineProperty||!1;if(D)try{D({},"a",{value:1})}catch(X){D=!1}I.exports=D}),RW=Y$(($,I)=>{I.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var D={},X=Symbol("test"),U=Object(X);if(typeof X==="string")return!1;if(Object.prototype.toString.call(X)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(U)!=="[object Symbol]")return!1;var Q=42;D[X]=Q;for(var J in D)return!1;if(typeof Object.keys==="function"&&Object.keys(D).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(D).length!==0)return!1;var A=Object.getOwnPropertySymbols(D);if(A.length!==1||A[0]!==X)return!1;if(!Object.prototype.propertyIsEnumerable.call(D,X))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var T=Object.getOwnPropertyDescriptor(D,X);if(T.value!==Q||T.enumerable!==!0)return!1}return!0}}),u2=Y$(($,I)=>{var D=typeof Symbol<"u"&&Symbol,X=RW();I.exports=function(){if(typeof D!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof D("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return X()}}),gW=Y$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),kW=Y$(($,I)=>{var D=PW();I.exports=D.getPrototypeOf||null}),h2=Y$(($,I)=>{var D="Function.prototype.bind called on incompatible ",X=Object.prototype.toString,U=Math.max,Q="[object Function]",J=function(Z,L){var F=[];for(var E=0;E<Z.length;E+=1)F[E]=Z[E];for(var P=0;P<L.length;P+=1)F[P+Z.length]=L[P];return F},A=function(Z,L){var F=[];for(var E=L||0,P=0;E<Z.length;E+=1,P+=1)F[P]=Z[E];return F},T=function(Z,L){var F="";for(var E=0;E<Z.length;E+=1)if(F+=Z[E],E+1<Z.length)F+=L;return F};I.exports=function(Z){var L=this;if(typeof L!=="function"||X.apply(L)!==Q)throw TypeError(D+L);var F=A(arguments,1),E,P=function(){if(this instanceof E){var _=L.apply(this,J(F,arguments));if(Object(_)===_)return _;return this}return L.apply(Z,J(F,arguments))},R=U(0,L.length-F.length),k=[];for(var g=0;g<R;g++)k[g]="$"+g;if(E=Function("binder","return function ("+T(k,",")+"){ return binder.apply(this,arguments); }")(P),L.prototype){var j=function(){};j.prototype=L.prototype,E.prototype=new j,j.prototype=null}return E}}),R6=Y$(($,I)=>{var D=h2();I.exports=Function.prototype.bind||D}),vY=Y$(($,I)=>{I.exports=Function.prototype.call}),DY=Y$(($,I)=>{I.exports=Function.prototype.apply}),p2=Y$(($,I)=>{I.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),CW=Y$(($,I)=>{var D=R6(),X=DY(),U=vY(),Q=p2();I.exports=Q||D.call(U,X)}),OY=Y$(($,I)=>{var D=R6(),X=P6(),U=vY(),Q=CW();I.exports=function(J){if(J.length<1||typeof J[0]!=="function")throw new X("a function is required");return Q(D,U,J)}}),l2=Y$(($,I)=>{var D=OY(),X=q6(),U;try{U=[].__proto__===Array.prototype}catch(T){if(!T||typeof T!=="object"||!("code"in T)||T.code!=="ERR_PROTO_ACCESS")throw T}var Q=!!U&&X&&X(Object.prototype,"__proto__"),J=Object,A=J.getPrototypeOf;I.exports=Q&&typeof Q.get==="function"?D([Q.get]):typeof A==="function"?function(T){return A(T==null?T:J(T))}:!1}),_W=Y$(($,I)=>{var D=gW(),X=kW(),U=l2();I.exports=D?function(Q){return D(Q)}:X?function(Q){if(!Q||typeof Q!=="object"&&typeof Q!=="function")throw TypeError("getProto: not an object");return X(Q)}:U?function(Q){return U(Q)}:null}),b2=Y$(($,I)=>{var D=Function.prototype.call,X=Object.prototype.hasOwnProperty,U=R6();I.exports=U.call(D,X)}),jW=Y$(($,I)=>{var D,X=PW(),U=q2(),Q=R2(),J=g2(),A=k2(),T=qW(),Z=P6(),L=C2(),F=_2(),E=j2(),P=N2(),R=B2(),k=x2(),g=w2(),j=f2(),_=Function,N=function(D$){try{return _('"use strict"; return ('+D$+").constructor;")()}catch(d){}},B=q6(),c=g4(),r=function(){throw new Z},J$=B?function(){try{return arguments.callee,r}catch(D$){try{return B(arguments,"callee").get}catch(d){return r}}}():r,G$=u2()(),X$=_W(),p=kW(),I$=gW(),v=DY(),G=vY(),W={},Y=typeof Uint8Array>"u"||!X$?D:X$(Uint8Array),V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?D:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?D:ArrayBuffer,"%ArrayIteratorPrototype%":G$&&X$?X$([][Symbol.iterator]()):D,"%AsyncFromSyncIteratorPrototype%":D,"%AsyncFunction%":W,"%AsyncGenerator%":W,"%AsyncGeneratorFunction%":W,"%AsyncIteratorPrototype%":W,"%Atomics%":typeof Atomics>"u"?D:Atomics,"%BigInt%":typeof BigInt>"u"?D:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?D:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?D:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?D:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":U,"%eval%":eval,"%EvalError%":Q,"%Float16Array%":typeof Float16Array>"u"?D:Float16Array,"%Float32Array%":typeof Float32Array>"u"?D:Float32Array,"%Float64Array%":typeof Float64Array>"u"?D:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?D:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":W,"%Int8Array%":typeof Int8Array>"u"?D:Int8Array,"%Int16Array%":typeof Int16Array>"u"?D:Int16Array,"%Int32Array%":typeof Int32Array>"u"?D:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G$&&X$?X$(X$([][Symbol.iterator]())):D,"%JSON%":typeof JSON==="object"?JSON:D,"%Map%":typeof Map>"u"?D:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G$||!X$?D:X$(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":X,"%Object.getOwnPropertyDescriptor%":B,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?D:Promise,"%Proxy%":typeof Proxy>"u"?D:Proxy,"%RangeError%":J,"%ReferenceError%":A,"%Reflect%":typeof Reflect>"u"?D:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?D:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G$||!X$?D:X$(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?D:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G$&&X$?X$(""[Symbol.iterator]()):D,"%Symbol%":G$?Symbol:D,"%SyntaxError%":T,"%ThrowTypeError%":J$,"%TypedArray%":Y,"%TypeError%":Z,"%Uint8Array%":typeof Uint8Array>"u"?D:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?D:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?D:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?D:Uint32Array,"%URIError%":L,"%WeakMap%":typeof WeakMap>"u"?D:WeakMap,"%WeakRef%":typeof WeakRef>"u"?D:WeakRef,"%WeakSet%":typeof WeakSet>"u"?D:WeakSet,"%Function.prototype.call%":G,"%Function.prototype.apply%":v,"%Object.defineProperty%":c,"%Object.getPrototypeOf%":p,"%Math.abs%":F,"%Math.floor%":E,"%Math.max%":P,"%Math.min%":R,"%Math.pow%":k,"%Math.round%":g,"%Math.sign%":j,"%Reflect.getPrototypeOf%":I$};if(X$)try{null.error}catch(D$){S=X$(X$(D$)),V["%Error.prototype%"]=S}var S,H=function D$(d){var s;if(d==="%AsyncFunction%")s=N("async function () {}");else if(d==="%GeneratorFunction%")s=N("function* () {}");else if(d==="%AsyncGeneratorFunction%")s=N("async function* () {}");else if(d==="%AsyncGenerator%"){var h$=D$("%AsyncGeneratorFunction%");if(h$)s=h$.prototype}else if(d==="%AsyncIteratorPrototype%"){var f=D$("%AsyncGenerator%");if(f&&X$)s=X$(f.prototype)}return V[d]=s,s},K={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=R6(),z=b2(),q=O.call(G,Array.prototype.concat),M=O.call(v,Array.prototype.splice),C=O.call(G,String.prototype.replace),w=O.call(G,String.prototype.slice),u=O.call(G,RegExp.prototype.exec),n=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W$=/\\(\\)?/g,i=function(D$){var d=w(D$,0,1),s=w(D$,-1);if(d==="%"&&s!=="%")throw new T("invalid intrinsic syntax, expected closing `%`");else if(s==="%"&&d!=="%")throw new T("invalid intrinsic syntax, expected opening `%`");var h$=[];return C(D$,n,function(f,h,O$,t){h$[h$.length]=O$?C(t,W$,"$1"):h||f}),h$},b=function(D$,d){var s=D$,h$;if(z(K,s))h$=K[s],s="%"+h$[0]+"%";if(z(V,s)){var f=V[s];if(f===W)f=H(s);if(typeof f>"u"&&!d)throw new Z("intrinsic "+D$+" exists, but is not available. Please file an issue!");return{alias:h$,name:s,value:f}}throw new T("intrinsic "+D$+" does not exist!")};I.exports=function(D$,d){if(typeof D$!=="string"||D$.length===0)throw new Z("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof d!=="boolean")throw new Z('"allowMissing" argument must be a boolean');if(u(/^%?[^%]*%?$/,D$)===null)throw new T("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=i(D$),h$=s.length>0?s[0]:"",f=b("%"+h$+"%",d),h=f.name,O$=f.value,t=!1,a=f.alias;if(a)h$=a[0],M(s,q([0,1],a));for(var T$=1,y=!0;T$<s.length;T$+=1){var o=s[T$],w$=w(o,0,1),m=w(o,-1);if((w$==='"'||w$==="'"||w$==="`"||(m==='"'||m==="'"||m==="`"))&&w$!==m)throw new T("property names with quotes must have matching quotes");if(o==="constructor"||!y)t=!0;if(h$+="."+o,h="%"+h$+"%",z(V,h))O$=V[h];else if(O$!=null){if(!(o in O$)){if(!d)throw new Z("base intrinsic for "+D$+" exists, but the property is not available.");return}if(B&&T$+1>=s.length){var v$=B(O$,o);if(y=!!v$,y&&"get"in v$&&!("originalValue"in v$.get))O$=v$.get;else O$=O$[o]}else y=z(O$,o),O$=O$[o];if(y&&!t)V[h]=O$}}return O$}}),NW=Y$(($,I)=>{var D=jW(),X=OY(),U=X([D("%String.prototype.indexOf%")]);I.exports=function(Q,J){var A=D(Q,!!J);if(typeof A==="function"&&U(Q,".prototype.")>-1)return X([A]);return A}}),r2=Y$(($,I)=>{var D=Function.prototype.toString,X=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,U,Q;if(typeof X==="function"&&typeof Object.defineProperty==="function")try{U=Object.defineProperty({},"length",{get:function(){throw Q}}),Q={},X(function(){throw 42},null,U)}catch(B){if(B!==Q)X=null}else X=null;var J=/^\s*class\b/,A=function(B){try{var c=D.call(B);return J.test(c)}catch(r){return!1}},T=function(B){try{if(A(B))return!1;return D.call(B),!0}catch(c){return!1}},Z=Object.prototype.toString,L="[object Object]",F="[object Function]",E="[object GeneratorFunction]",P="[object HTMLAllCollection]",R="[object HTML document.all class]",k="[object HTMLCollection]",g=typeof Symbol==="function"&&!!Symbol.toStringTag,j=!(0 in[,]),_=function(){return!1};if(typeof document==="object"){if(N=document.all,Z.call(N)===Z.call(document.all))_=function(B){if((j||!B)&&(typeof B>"u"||typeof B==="object"))try{var c=Z.call(B);return(c===P||c===R||c===k||c===L)&&B("")==null}catch(r){}return!1}}var N;I.exports=X?function(B){if(_(B))return!0;if(!B)return!1;if(typeof B!=="function"&&typeof B!=="object")return!1;try{X(B,null,U)}catch(c){if(c!==Q)return!1}return!A(B)&&T(B)}:function(B){if(_(B))return!0;if(!B)return!1;if(typeof B!=="function"&&typeof B!=="object")return!1;if(g)return T(B);if(A(B))return!1;var c=Z.call(B);if(c!==F&&c!==E&&!/^\[object HTML/.test(c))return!1;return T(B)}}),o2=Y$(($,I)=>{var D=r2(),X=Object.prototype.toString,U=Object.prototype.hasOwnProperty,Q=function(Z,L,F){for(var E=0,P=Z.length;E<P;E++)if(U.call(Z,E))if(F==null)L(Z[E],E,Z);else L.call(F,Z[E],E,Z)},J=function(Z,L,F){for(var E=0,P=Z.length;E<P;E++)if(F==null)L(Z.charAt(E),E,Z);else L.call(F,Z.charAt(E),E,Z)},A=function(Z,L,F){for(var E in Z)if(U.call(Z,E))if(F==null)L(Z[E],E,Z);else L.call(F,Z[E],E,Z)};function T(Z){return X.call(Z)==="[object Array]"}I.exports=function(Z,L,F){if(!D(L))throw TypeError("iterator must be a function");var E;if(arguments.length>=3)E=F;if(T(Z))Q(Z,L,E);else if(typeof Z==="string")J(Z,L,E);else A(Z,L,E)}}),n2=Y$(($,I)=>{I.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),d2=Y$(($,I)=>{var D=n2(),X=typeof globalThis>"u"?globalThis:globalThis;I.exports=function(){var U=[];for(var Q=0;Q<D.length;Q++)if(typeof X[D[Q]]==="function")U[U.length]=D[Q];return U}}),m2=Y$(($,I)=>{var D=g4(),X=qW(),U=P6(),Q=q6();I.exports=function(J,A,T){if(!J||typeof J!=="object"&&typeof J!=="function")throw new U("`obj` must be an object or a function`");if(typeof A!=="string"&&typeof A!=="symbol")throw new U("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new U("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new U("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new U("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new U("`loose`, if provided, must be a boolean");var Z=arguments.length>3?arguments[3]:null,L=arguments.length>4?arguments[4]:null,F=arguments.length>5?arguments[5]:null,E=arguments.length>6?arguments[6]:!1,P=!!Q&&Q(J,A);if(D)D(J,A,{configurable:F===null&&P?P.configurable:!F,enumerable:Z===null&&P?P.enumerable:!Z,value:T,writable:L===null&&P?P.writable:!L});else if(E||!Z&&!L&&!F)J[A]=T;else throw new X("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),t2=Y$(($,I)=>{var D=g4(),X=function(){return!!D};X.hasArrayLengthDefineBug=function(){if(!D)return null;try{return D([],"length",{value:1}).length!==1}catch(U){return!0}},I.exports=X}),i2=Y$(($,I)=>{var D=jW(),X=m2(),U=t2()(),Q=q6(),J=P6(),A=D("%Math.floor%");I.exports=function(T,Z){if(typeof T!=="function")throw new J("`fn` is not a function");if(typeof Z!=="number"||Z<0||Z>4294967295||A(Z)!==Z)throw new J("`length` must be a positive 32-bit integer");var L=arguments.length>2&&!!arguments[2],F=!0,E=!0;if("length"in T&&Q){var P=Q(T,"length");if(P&&!P.configurable)F=!1;if(P&&!P.writable)E=!1}if(F||E||!L)if(U)X(T,"length",Z,!0,!0);else X(T,"length",Z);return T}}),e2=Y$(($,I)=>{var D=R6(),X=DY(),U=CW();I.exports=function(){return U(D,X,arguments)}}),a2=Y$(($,I)=>{var D=i2(),X=g4(),U=OY(),Q=e2();if(I.exports=function(J){var A=U(arguments),T=J.length-(arguments.length-1);return D(A,1+(T>0?T:0),!0)},X)X(I.exports,"apply",{value:Q});else I.exports.apply=Q}),s2=Y$(($,I)=>{var D=RW();I.exports=function(){return D()&&!!Symbol.toStringTag}}),$F=Y$(($,I)=>{var D=o2(),X=d2(),U=a2(),Q=NW(),J=q6(),A=_W(),T=Q("Object.prototype.toString"),Z=s2()(),L=typeof globalThis>"u"?globalThis:globalThis,F=X(),E=Q("String.prototype.slice"),P=Q("Array.prototype.indexOf",!0)||function(j,_){for(var N=0;N<j.length;N+=1)if(j[N]===_)return N;return-1},R={__proto__:null};if(Z&&J&&A)D(F,function(j){var _=new L[j];if(Symbol.toStringTag in _&&A){var N=A(_),B=J(N,Symbol.toStringTag);if(!B&&N){var c=A(N);B=J(c,Symbol.toStringTag)}R["$"+j]=U(B.get)}});else D(F,function(j){var _=new L[j],N=_.slice||_.set;if(N)R["$"+j]=U(N)});var k=function(j){var _=!1;return D(R,function(N,B){if(!_)try{if("$"+N(j)===B)_=E(B,1)}catch(c){}}),_},g=function(j){var _=!1;return D(R,function(N,B){if(!_)try{N(j),_=E(B,1)}catch(c){}}),_};I.exports=function(j){if(!j||typeof j!=="object")return!1;if(!Z){var _=E(T(j),8,-1);if(P(F,_)>-1)return _;if(_!=="Object")return!1;return g(j)}if(!J)return null;return k(j)}}),UF=Y$(($,I)=>{var D=$F();I.exports=function(X){return!!D(X)}}),IF=Y$(($,I)=>{var D=P6(),X=NW(),U=X("TypedArray.prototype.buffer",!0),Q=UF();I.exports=U||function(J){if(!Q(J))throw new D("Not a Typed Array");return J.buffer}}),vF=Y$(($,I)=>{var D=l0().Buffer,X=P2(),U=IF(),Q=ArrayBuffer.isView||function(Z){try{return U(Z),!0}catch(L){return!1}},J=typeof Uint8Array<"u",A=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",T=A&&(D.prototype instanceof Uint8Array||D.TYPED_ARRAY_SUPPORT);I.exports=function(Z,L){if(D.isBuffer(Z)){if(Z.constructor&&!("isBuffer"in Z))return D.from(Z);return Z}if(typeof Z==="string")return D.from(Z,L);if(A&&Q(Z)){if(Z.byteLength===0)return D.alloc(0);if(T){var F=D.from(Z.buffer,Z.byteOffset,Z.byteLength);if(F.byteLength===Z.byteLength)return F}var E=Z instanceof Uint8Array?Z:new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),P=D.from(E);if(P.length===Z.byteLength)return P}if(J&&Z instanceof Uint8Array)return D.from(Z);var R=X(Z);if(R)for(var k=0;k<Z.length;k+=1){var g=Z[k];if(typeof g!=="number"||g<0||g>255||~~g!==g)throw RangeError("Array items must be numbers in the range 0-255.")}if(R||D.isBuffer(Z)&&Z.constructor&&typeof Z.constructor.isBuffer==="function"&&Z.constructor.isBuffer(Z))return D.from(Z);throw TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}}),JY=Y$(($,I)=>{var D=l0().Buffer,X=vF(),U=typeof Uint8Array<"u",Q=U&&typeof ArrayBuffer<"u",J=Q&&ArrayBuffer.isView;I.exports=function(A,T,Z){if(typeof A==="string"||D.isBuffer(A)||U&&A instanceof Uint8Array||J&&J(A))return X(A,T);throw TypeError(Z+" must be a string, a Buffer, a Uint8Array, or a DataView")}}),BW=Y$(($,I)=>{var D={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,rmd160:20,ripemd160:20},X={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"},U=MW(),Q=l0().Buffer,J=UY(),A=IY(),T=JY();function Z(L,F,E,P,R){J(E,P),L=T(L,A,"Password"),F=T(F,A,"Salt");var k=(R||"sha1").toLowerCase(),g=X[k]||k,j=D[g];if(typeof j!=="number"||!j)throw TypeError("Digest algorithm not supported: "+R);var _=Q.allocUnsafe(P),N=Q.allocUnsafe(F.length+4);F.copy(N,0,0,F.length);var B=0,c=j,r=Math.ceil(P/c);for(var J$=1;J$<=r;J$++){N.writeUInt32BE(J$,F.length);var G$=U(g,L).update(N).digest(),X$=G$;for(var p=1;p<E;p++){X$=U(g,L).update(X$).digest();for(var I$=0;I$<c;I$++)G$[I$]^=X$[I$]}G$.copy(_,B),B+=c}return _}I.exports=Z}),DF=Y$(($,I)=>{var D=l0().Buffer,X=UY(),U=IY(),Q=BW(),J=JY(),A,T=globalThis.crypto&&globalThis.crypto.subtle,Z={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},L=[],F;function E(){if(F)return F;if(globalThis.process&&globalThis.process.nextTick)F=globalThis.process.nextTick;else if(globalThis.queueMicrotask)F=globalThis.queueMicrotask;else if(globalThis.setImmediate)F=globalThis.setImmediate;else F=globalThis.setTimeout;return F}function P(g,j,_,N,B){return T.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then(function(c){return T.deriveBits({name:"PBKDF2",salt:j,iterations:_,hash:{name:B}},c,N<<3)}).then(function(c){return D.from(c)})}function R(g){if(globalThis.process&&!globalThis.process.browser)return Promise.resolve(!1);if(!T||!T.importKey||!T.deriveBits)return Promise.resolve(!1);if(L[g]!==void 0)return L[g];A=A||D.alloc(8);var j=P(A,A,10,128,g).then(function(){return!0},function(){return!1});return L[g]=j,j}function k(g,j){g.then(function(_){E()(function(){j(null,_)})},function(_){E()(function(){j(_)})})}I.exports=function(g,j,_,N,B,c){if(typeof B==="function")c=B,B=void 0;if(X(_,N),g=J(g,U,"Password"),j=J(j,U,"Salt"),typeof c!=="function")throw Error("No callback provided to pbkdf2");B=B||"sha1";var r=Z[B.toLowerCase()];if(!r||typeof globalThis.Promise!=="function"){E()(function(){var J$;try{J$=Q(g,j,_,N,B)}catch(G$){c(G$);return}c(null,J$)});return}k(R(r).then(function(J$){if(J$)return P(g,j,_,N,r);return Q(g,j,_,N,B)}),c)}}),xW=Y$(($)=>{var I=(t0(),e$(m0)),D=UY(),X=IY(),U=JY();function Q(A,T,Z,L,F,E){if(D(Z,L),A=U(A,X,"Password"),T=U(T,X,"Salt"),typeof F==="function")E=F,F="sha1";if(typeof E!=="function")throw Error("No callback provided to pbkdf2");return I.pbkdf2(A,T,Z,L,F,E)}function J(A,T,Z,L,F){return D(Z,L),A=U(A,X,"Password"),T=U(T,X,"Salt"),F=F||"sha1",I.pbkdf2Sync(A,T,Z,L,F)}if(!I.pbkdf2Sync||I.pbkdf2Sync.toString().indexOf("keylen, digest")===-1)$.pbkdf2Sync=BW(),$.pbkdf2=DF();else $.pbkdf2Sync=J,$.pbkdf2=Q}),OF=Y$(($)=>{var I=(t0(),e$(m0));$.createCipher=$.Cipher=I.createCipher,$.createCipheriv=$.Cipheriv=I.createCipheriv,$.createDecipher=$.Decipher=I.createDecipher,$.createDecipheriv=$.Decipheriv=I.createDecipheriv,$.listCiphers=$.getCiphers=I.getCiphers}),JF=Y$(($)=>{var I=(t0(),e$(m0));$.DiffieHellmanGroup=I.DiffieHellmanGroup,$.createDiffieHellmanGroup=I.createDiffieHellmanGroup,$.getDiffieHellman=I.getDiffieHellman,$.createDiffieHellman=I.createDiffieHellman,$.DiffieHellman=I.DiffieHellman}),XF=Y$(($)=>{var I=(t0(),e$(m0));$.createSign=I.createSign,$.Sign=I.Sign,$.createVerify=I.createVerify,$.Verify=I.Verify}),QF=Y$(($,I)=>{I.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}),TU=Y$(($,I)=>{(function(D,X){function U(v,G){if(!v)throw Error(G||"Assertion failed")}function Q(v,G){v.super_=G;var W=function(){};W.prototype=G.prototype,v.prototype=new W,v.prototype.constructor=v}function J(v,G,W){if(J.isBN(v))return v;if(this.negative=0,this.words=null,this.length=0,this.red=null,v!==null){if(G==="le"||G==="be")W=G,G=10;this._init(v||0,G||10,W||"be")}}if(typeof D==="object")D.exports=J;else X.BN=J;J.BN=J,J.wordSize=26;var A;try{if(typeof window<"u"&&typeof window.Buffer<"u")A=window.Buffer;else A=(j0(),e$(_0)).Buffer}catch(v){}J.isBN=function(v){if(v instanceof J)return!0;return v!==null&&typeof v==="object"&&v.constructor.wordSize===J.wordSize&&Array.isArray(v.words)},J.max=function(v,G){if(v.cmp(G)>0)return v;return G},J.min=function(v,G){if(v.cmp(G)<0)return v;return G},J.prototype._init=function(v,G,W){if(typeof v==="number")return this._initNumber(v,G,W);if(typeof v==="object")return this._initArray(v,G,W);if(G==="hex")G=16;U(G===(G|0)&&G>=2&&G<=36),v=v.toString().replace(/\s+/g,"");var Y=0;if(v[0]==="-")Y++,this.negative=1;if(Y<v.length){if(G===16)this._parseHex(v,Y,W);else if(this._parseBase(v,G,Y),W==="le")this._initArray(this.toArray(),G,W)}},J.prototype._initNumber=function(v,G,W){if(v<0)this.negative=1,v=-v;if(v<67108864)this.words=[v&67108863],this.length=1;else if(v<4503599627370496)this.words=[v&67108863,v/67108864&67108863],this.length=2;else U(v<9007199254740992),this.words=[v&67108863,v/67108864&67108863,1],this.length=3;if(W!=="le")return;this._initArray(this.toArray(),G,W)},J.prototype._initArray=function(v,G,W){if(U(typeof v.length==="number"),v.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(v.length/3),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V,S,H=0;if(W==="be"){for(Y=v.length-1,V=0;Y>=0;Y-=3)if(S=v[Y]|v[Y-1]<<8|v[Y-2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}else if(W==="le"){for(Y=0,V=0;Y<v.length;Y+=3)if(S=v[Y]|v[Y+1]<<8|v[Y+2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}return this.strip()};function T(v,G){var W=v.charCodeAt(G);if(W>=65&&W<=70)return W-55;else if(W>=97&&W<=102)return W-87;else return W-48&15}function Z(v,G,W){var Y=T(v,W);if(W-1>=G)Y|=T(v,W-1)<<4;return Y}J.prototype._parseHex=function(v,G,W){this.length=Math.ceil((v.length-G)/6),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V=0,S=0,H;if(W==="be")for(Y=v.length-1;Y>=G;Y-=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8;else{var K=v.length-G;for(Y=K%2===0?G+1:G;Y<v.length;Y+=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8}this.strip()};function L(v,G,W,Y){var V=0,S=Math.min(v.length,W);for(var H=G;H<S;H++){var K=v.charCodeAt(H)-48;if(V*=Y,K>=49)V+=K-49+10;else if(K>=17)V+=K-17+10;else V+=K}return V}J.prototype._parseBase=function(v,G,W){this.words=[0],this.length=1;for(var Y=0,V=1;V<=67108863;V*=G)Y++;Y--,V=V/G|0;var S=v.length-W,H=S%Y,K=Math.min(S,S-H)+W,O=0;for(var z=W;z<K;z+=Y)if(O=L(v,z,z+Y,G),this.imuln(V),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O);if(H!==0){var q=1;O=L(v,z,v.length,G);for(z=0;z<H;z++)q*=G;if(this.imuln(q),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O)}this.strip()},J.prototype.copy=function(v){v.words=Array(this.length);for(var G=0;G<this.length;G++)v.words[G]=this.words[G];v.length=this.length,v.negative=this.negative,v.red=this.red},J.prototype.clone=function(){var v=new J(null);return this.copy(v),v},J.prototype._expand=function(v){while(this.length<v)this.words[this.length++]=0;return this},J.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},J.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},J.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(J.prototype.toString=function(v,G){v=v||10,G=G|0||1;var W;if(v===16||v==="hex"){W="";var Y=0,V=0;for(var S=0;S<this.length;S++){var H=this.words[S],K=((H<<Y|V)&16777215).toString(16);if(V=H>>>24-Y&16777215,Y+=2,Y>=26)Y-=26,S--;if(V!==0||S!==this.length-1)W=F[6-K.length]+K+W;else W=K+W}if(V!==0)W=V.toString(16)+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}if(v===(v|0)&&v>=2&&v<=36){var O=E[v],z=P[v];W="";var q=this.clone();q.negative=0;while(!q.isZero()){var M=q.modn(z).toString(v);if(q=q.idivn(z),!q.isZero())W=F[O-M.length]+M+W;else W=M+W}if(this.isZero())W="0"+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}U(!1,"Base should be between 2 and 36")},J.prototype.toNumber=function(){var v=this.words[0];if(this.length===2)v+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)v+=4503599627370496+this.words[1]*67108864;else if(this.length>2)U(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-v:v},J.prototype.toJSON=function(){return this.toString(16)},J.prototype.toBuffer=function(v,G){return U(typeof A<"u"),this.toArrayLike(A,v,G)},J.prototype.toArray=function(v,G){return this.toArrayLike(Array,v,G)},J.prototype.toArrayLike=function(v,G,W){var Y=this.byteLength(),V=W||Math.max(1,Y);U(Y<=V,"byte array longer than desired length"),U(V>0,"Requested array length <= 0"),this.strip();var S=G==="le",H=new v(V),K,O,z=this.clone();if(!S){for(O=0;O<V-Y;O++)H[O]=0;for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[V-O-1]=K}else{for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[O]=K;for(;O<V;O++)H[O]=0}return H},Math.clz32)J.prototype._countBits=function(v){return 32-Math.clz32(v)};else J.prototype._countBits=function(v){var G=v,W=0;if(G>=4096)W+=13,G>>>=13;if(G>=64)W+=7,G>>>=7;if(G>=8)W+=4,G>>>=4;if(G>=2)W+=2,G>>>=2;return W+G};J.prototype._zeroBits=function(v){if(v===0)return 26;var G=v,W=0;if((G&8191)===0)W+=13,G>>>=13;if((G&127)===0)W+=7,G>>>=7;if((G&15)===0)W+=4,G>>>=4;if((G&3)===0)W+=2,G>>>=2;if((G&1)===0)W++;return W},J.prototype.bitLength=function(){var v=this.words[this.length-1],G=this._countBits(v);return(this.length-1)*26+G};function R(v){var G=Array(v.bitLength());for(var W=0;W<G.length;W++){var Y=W/26|0,V=W%26;G[W]=(v.words[Y]&1<<V)>>>V}return G}J.prototype.zeroBits=function(){if(this.isZero())return 0;var v=0;for(var G=0;G<this.length;G++){var W=this._zeroBits(this.words[G]);if(v+=W,W!==26)break}return v},J.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},J.prototype.toTwos=function(v){if(this.negative!==0)return this.abs().inotn(v).iaddn(1);return this.clone()},J.prototype.fromTwos=function(v){if(this.testn(v-1))return this.notn(v).iaddn(1).ineg();return this.clone()},J.prototype.isNeg=function(){return this.negative!==0},J.prototype.neg=function(){return this.clone().ineg()},J.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},J.prototype.iuor=function(v){while(this.length<v.length)this.words[this.length++]=0;for(var G=0;G<v.length;G++)this.words[G]=this.words[G]|v.words[G];return this.strip()},J.prototype.ior=function(v){return U((this.negative|v.negative)===0),this.iuor(v)},J.prototype.or=function(v){if(this.length>v.length)return this.clone().ior(v);return v.clone().ior(this)},J.prototype.uor=function(v){if(this.length>v.length)return this.clone().iuor(v);return v.clone().iuor(this)},J.prototype.iuand=function(v){var G;if(this.length>v.length)G=v;else G=this;for(var W=0;W<G.length;W++)this.words[W]=this.words[W]&v.words[W];return this.length=G.length,this.strip()},J.prototype.iand=function(v){return U((this.negative|v.negative)===0),this.iuand(v)},J.prototype.and=function(v){if(this.length>v.length)return this.clone().iand(v);return v.clone().iand(this)},J.prototype.uand=function(v){if(this.length>v.length)return this.clone().iuand(v);return v.clone().iuand(this)},J.prototype.iuxor=function(v){var G,W;if(this.length>v.length)G=this,W=v;else G=v,W=this;for(var Y=0;Y<W.length;Y++)this.words[Y]=G.words[Y]^W.words[Y];if(this!==G)for(;Y<G.length;Y++)this.words[Y]=G.words[Y];return this.length=G.length,this.strip()},J.prototype.ixor=function(v){return U((this.negative|v.negative)===0),this.iuxor(v)},J.prototype.xor=function(v){if(this.length>v.length)return this.clone().ixor(v);return v.clone().ixor(this)},J.prototype.uxor=function(v){if(this.length>v.length)return this.clone().iuxor(v);return v.clone().iuxor(this)},J.prototype.inotn=function(v){U(typeof v==="number"&&v>=0);var G=Math.ceil(v/26)|0,W=v%26;if(this._expand(G),W>0)G--;for(var Y=0;Y<G;Y++)this.words[Y]=~this.words[Y]&67108863;if(W>0)this.words[Y]=~this.words[Y]&67108863>>26-W;return this.strip()},J.prototype.notn=function(v){return this.clone().inotn(v)},J.prototype.setn=function(v,G){U(typeof v==="number"&&v>=0);var W=v/26|0,Y=v%26;if(this._expand(W+1),G)this.words[W]=this.words[W]|1<<Y;else this.words[W]=this.words[W]&~(1<<Y);return this.strip()},J.prototype.iadd=function(v){var G;if(this.negative!==0&&v.negative===0)return this.negative=0,G=this.isub(v),this.negative^=1,this._normSign();else if(this.negative===0&&v.negative!==0)return v.negative=0,G=this.isub(v),v.negative=1,G._normSign();var W,Y;if(this.length>v.length)W=this,Y=v;else W=v,Y=this;var V=0;for(var S=0;S<Y.length;S++)G=(W.words[S]|0)+(Y.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;for(;V!==0&&S<W.length;S++)G=(W.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;if(this.length=W.length,V!==0)this.words[this.length]=V,this.length++;else if(W!==this)for(;S<W.length;S++)this.words[S]=W.words[S];return this},J.prototype.add=function(v){var G;if(v.negative!==0&&this.negative===0)return v.negative=0,G=this.sub(v),v.negative^=1,G;else if(v.negative===0&&this.negative!==0)return this.negative=0,G=v.sub(this),this.negative=1,G;if(this.length>v.length)return this.clone().iadd(v);return v.clone().iadd(this)},J.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var G=this.iadd(v);return v.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var W=this.cmp(v);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,V;if(W>0)Y=this,V=v;else Y=v,V=this;var S=0;for(var H=0;H<V.length;H++)G=(Y.words[H]|0)-(V.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;for(;S!==0&&H<Y.length;H++)G=(Y.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;if(S===0&&H<Y.length&&Y!==this)for(;H<Y.length;H++)this.words[H]=Y.words[H];if(this.length=Math.max(this.length,H),Y!==this)this.negative=1;return this.strip()},J.prototype.sub=function(v){return this.clone().isub(v)};function k(v,G,W){W.negative=G.negative^v.negative;var Y=v.length+G.length|0;W.length=Y,Y=Y-1|0;var V=v.words[0]|0,S=G.words[0]|0,H=V*S,K=H&67108863,O=H/67108864|0;W.words[0]=K;for(var z=1;z<Y;z++){var q=O>>>26,M=O&67108863,C=Math.min(z,G.length-1);for(var w=Math.max(0,z-v.length+1);w<=C;w++){var u=z-w|0;V=v.words[u]|0,S=G.words[w]|0,H=V*S+M,q+=H/67108864|0,M=H&67108863}W.words[z]=M|0,O=q|0}if(O!==0)W.words[z]=O|0;else W.length--;return W.strip()}var g=function(v,G,W){var Y=v.words,V=G.words,S=W.words,H=0,K,O,z,q=Y[0]|0,M=q&8191,C=q>>>13,w=Y[1]|0,u=w&8191,n=w>>>13,W$=Y[2]|0,i=W$&8191,b=W$>>>13,D$=Y[3]|0,d=D$&8191,s=D$>>>13,h$=Y[4]|0,f=h$&8191,h=h$>>>13,O$=Y[5]|0,t=O$&8191,a=O$>>>13,T$=Y[6]|0,y=T$&8191,o=T$>>>13,w$=Y[7]|0,m=w$&8191,v$=w$>>>13,r$=Y[8]|0,S$=r$&8191,A$=r$>>>13,X0=Y[9]|0,K$=X0&8191,F$=X0>>>13,G0=V[0]|0,L$=G0&8191,Z$=G0>>>13,w0=V[1]|0,M$=w0&8191,C$=w0>>>13,c0=V[2]|0,_$=c0&8191,P$=c0>>>13,N0=V[3]|0,j$=N0&8191,q$=N0>>>13,g0=V[4]|0,N$=g0&8191,B$=g0>>>13,k0=V[5]|0,R$=k0&8191,x=k0>>>13,l=V[6]|0,e=l&8191,U$=l>>>13,p$=V[7]|0,z$=p$&8191,H$=p$>>>13,Q0=V[8]|0,g$=Q0&8191,x$=Q0>>>13,B0=V[9]|0,k$=B0&8191,E$=B0>>>13;W.negative=v.negative^G.negative,W.length=19,K=Math.imul(M,L$),O=Math.imul(M,Z$),O=O+Math.imul(C,L$)|0,z=Math.imul(C,Z$);var Y0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,K=Math.imul(u,L$),O=Math.imul(u,Z$),O=O+Math.imul(n,L$)|0,z=Math.imul(n,Z$),K=K+Math.imul(M,M$)|0,O=O+Math.imul(M,C$)|0,O=O+Math.imul(C,M$)|0,z=z+Math.imul(C,C$)|0;var m$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(m$>>>26)|0,m$&=67108863,K=Math.imul(i,L$),O=Math.imul(i,Z$),O=O+Math.imul(b,L$)|0,z=Math.imul(b,Z$),K=K+Math.imul(u,M$)|0,O=O+Math.imul(u,C$)|0,O=O+Math.imul(n,M$)|0,z=z+Math.imul(n,C$)|0,K=K+Math.imul(M,_$)|0,O=O+Math.imul(M,P$)|0,O=O+Math.imul(C,_$)|0,z=z+Math.imul(C,P$)|0;var n$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(n$>>>26)|0,n$&=67108863,K=Math.imul(d,L$),O=Math.imul(d,Z$),O=O+Math.imul(s,L$)|0,z=Math.imul(s,Z$),K=K+Math.imul(i,M$)|0,O=O+Math.imul(i,C$)|0,O=O+Math.imul(b,M$)|0,z=z+Math.imul(b,C$)|0,K=K+Math.imul(u,_$)|0,O=O+Math.imul(u,P$)|0,O=O+Math.imul(n,_$)|0,z=z+Math.imul(n,P$)|0,K=K+Math.imul(M,j$)|0,O=O+Math.imul(M,q$)|0,O=O+Math.imul(C,j$)|0,z=z+Math.imul(C,q$)|0;var v0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(v0>>>26)|0,v0&=67108863,K=Math.imul(f,L$),O=Math.imul(f,Z$),O=O+Math.imul(h,L$)|0,z=Math.imul(h,Z$),K=K+Math.imul(d,M$)|0,O=O+Math.imul(d,C$)|0,O=O+Math.imul(s,M$)|0,z=z+Math.imul(s,C$)|0,K=K+Math.imul(i,_$)|0,O=O+Math.imul(i,P$)|0,O=O+Math.imul(b,_$)|0,z=z+Math.imul(b,P$)|0,K=K+Math.imul(u,j$)|0,O=O+Math.imul(u,q$)|0,O=O+Math.imul(n,j$)|0,z=z+Math.imul(n,q$)|0,K=K+Math.imul(M,N$)|0,O=O+Math.imul(M,B$)|0,O=O+Math.imul(C,N$)|0,z=z+Math.imul(C,B$)|0;var $0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+($0>>>26)|0,$0&=67108863,K=Math.imul(t,L$),O=Math.imul(t,Z$),O=O+Math.imul(a,L$)|0,z=Math.imul(a,Z$),K=K+Math.imul(f,M$)|0,O=O+Math.imul(f,C$)|0,O=O+Math.imul(h,M$)|0,z=z+Math.imul(h,C$)|0,K=K+Math.imul(d,_$)|0,O=O+Math.imul(d,P$)|0,O=O+Math.imul(s,_$)|0,z=z+Math.imul(s,P$)|0,K=K+Math.imul(i,j$)|0,O=O+Math.imul(i,q$)|0,O=O+Math.imul(b,j$)|0,z=z+Math.imul(b,q$)|0,K=K+Math.imul(u,N$)|0,O=O+Math.imul(u,B$)|0,O=O+Math.imul(n,N$)|0,z=z+Math.imul(n,B$)|0,K=K+Math.imul(M,R$)|0,O=O+Math.imul(M,x)|0,O=O+Math.imul(C,R$)|0,z=z+Math.imul(C,x)|0;var K0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(K0>>>26)|0,K0&=67108863,K=Math.imul(y,L$),O=Math.imul(y,Z$),O=O+Math.imul(o,L$)|0,z=Math.imul(o,Z$),K=K+Math.imul(t,M$)|0,O=O+Math.imul(t,C$)|0,O=O+Math.imul(a,M$)|0,z=z+Math.imul(a,C$)|0,K=K+Math.imul(f,_$)|0,O=O+Math.imul(f,P$)|0,O=O+Math.imul(h,_$)|0,z=z+Math.imul(h,P$)|0,K=K+Math.imul(d,j$)|0,O=O+Math.imul(d,q$)|0,O=O+Math.imul(s,j$)|0,z=z+Math.imul(s,q$)|0,K=K+Math.imul(i,N$)|0,O=O+Math.imul(i,B$)|0,O=O+Math.imul(b,N$)|0,z=z+Math.imul(b,B$)|0,K=K+Math.imul(u,R$)|0,O=O+Math.imul(u,x)|0,O=O+Math.imul(n,R$)|0,z=z+Math.imul(n,x)|0,K=K+Math.imul(M,e)|0,O=O+Math.imul(M,U$)|0,O=O+Math.imul(C,e)|0,z=z+Math.imul(C,U$)|0;var z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(z0>>>26)|0,z0&=67108863,K=Math.imul(m,L$),O=Math.imul(m,Z$),O=O+Math.imul(v$,L$)|0,z=Math.imul(v$,Z$),K=K+Math.imul(y,M$)|0,O=O+Math.imul(y,C$)|0,O=O+Math.imul(o,M$)|0,z=z+Math.imul(o,C$)|0,K=K+Math.imul(t,_$)|0,O=O+Math.imul(t,P$)|0,O=O+Math.imul(a,_$)|0,z=z+Math.imul(a,P$)|0,K=K+Math.imul(f,j$)|0,O=O+Math.imul(f,q$)|0,O=O+Math.imul(h,j$)|0,z=z+Math.imul(h,q$)|0,K=K+Math.imul(d,N$)|0,O=O+Math.imul(d,B$)|0,O=O+Math.imul(s,N$)|0,z=z+Math.imul(s,B$)|0,K=K+Math.imul(i,R$)|0,O=O+Math.imul(i,x)|0,O=O+Math.imul(b,R$)|0,z=z+Math.imul(b,x)|0,K=K+Math.imul(u,e)|0,O=O+Math.imul(u,U$)|0,O=O+Math.imul(n,e)|0,z=z+Math.imul(n,U$)|0,K=K+Math.imul(M,z$)|0,O=O+Math.imul(M,H$)|0,O=O+Math.imul(C,z$)|0,z=z+Math.imul(C,H$)|0;var S0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(S0>>>26)|0,S0&=67108863,K=Math.imul(S$,L$),O=Math.imul(S$,Z$),O=O+Math.imul(A$,L$)|0,z=Math.imul(A$,Z$),K=K+Math.imul(m,M$)|0,O=O+Math.imul(m,C$)|0,O=O+Math.imul(v$,M$)|0,z=z+Math.imul(v$,C$)|0,K=K+Math.imul(y,_$)|0,O=O+Math.imul(y,P$)|0,O=O+Math.imul(o,_$)|0,z=z+Math.imul(o,P$)|0,K=K+Math.imul(t,j$)|0,O=O+Math.imul(t,q$)|0,O=O+Math.imul(a,j$)|0,z=z+Math.imul(a,q$)|0,K=K+Math.imul(f,N$)|0,O=O+Math.imul(f,B$)|0,O=O+Math.imul(h,N$)|0,z=z+Math.imul(h,B$)|0,K=K+Math.imul(d,R$)|0,O=O+Math.imul(d,x)|0,O=O+Math.imul(s,R$)|0,z=z+Math.imul(s,x)|0,K=K+Math.imul(i,e)|0,O=O+Math.imul(i,U$)|0,O=O+Math.imul(b,e)|0,z=z+Math.imul(b,U$)|0,K=K+Math.imul(u,z$)|0,O=O+Math.imul(u,H$)|0,O=O+Math.imul(n,z$)|0,z=z+Math.imul(n,H$)|0,K=K+Math.imul(M,g$)|0,O=O+Math.imul(M,x$)|0,O=O+Math.imul(C,g$)|0,z=z+Math.imul(C,x$)|0;var A0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(A0>>>26)|0,A0&=67108863,K=Math.imul(K$,L$),O=Math.imul(K$,Z$),O=O+Math.imul(F$,L$)|0,z=Math.imul(F$,Z$),K=K+Math.imul(S$,M$)|0,O=O+Math.imul(S$,C$)|0,O=O+Math.imul(A$,M$)|0,z=z+Math.imul(A$,C$)|0,K=K+Math.imul(m,_$)|0,O=O+Math.imul(m,P$)|0,O=O+Math.imul(v$,_$)|0,z=z+Math.imul(v$,P$)|0,K=K+Math.imul(y,j$)|0,O=O+Math.imul(y,q$)|0,O=O+Math.imul(o,j$)|0,z=z+Math.imul(o,q$)|0,K=K+Math.imul(t,N$)|0,O=O+Math.imul(t,B$)|0,O=O+Math.imul(a,N$)|0,z=z+Math.imul(a,B$)|0,K=K+Math.imul(f,R$)|0,O=O+Math.imul(f,x)|0,O=O+Math.imul(h,R$)|0,z=z+Math.imul(h,x)|0,K=K+Math.imul(d,e)|0,O=O+Math.imul(d,U$)|0,O=O+Math.imul(s,e)|0,z=z+Math.imul(s,U$)|0,K=K+Math.imul(i,z$)|0,O=O+Math.imul(i,H$)|0,O=O+Math.imul(b,z$)|0,z=z+Math.imul(b,H$)|0,K=K+Math.imul(u,g$)|0,O=O+Math.imul(u,x$)|0,O=O+Math.imul(n,g$)|0,z=z+Math.imul(n,x$)|0,K=K+Math.imul(M,k$)|0,O=O+Math.imul(M,E$)|0,O=O+Math.imul(C,k$)|0,z=z+Math.imul(C,E$)|0;var F0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(F0>>>26)|0,F0&=67108863,K=Math.imul(K$,M$),O=Math.imul(K$,C$),O=O+Math.imul(F$,M$)|0,z=Math.imul(F$,C$),K=K+Math.imul(S$,_$)|0,O=O+Math.imul(S$,P$)|0,O=O+Math.imul(A$,_$)|0,z=z+Math.imul(A$,P$)|0,K=K+Math.imul(m,j$)|0,O=O+Math.imul(m,q$)|0,O=O+Math.imul(v$,j$)|0,z=z+Math.imul(v$,q$)|0,K=K+Math.imul(y,N$)|0,O=O+Math.imul(y,B$)|0,O=O+Math.imul(o,N$)|0,z=z+Math.imul(o,B$)|0,K=K+Math.imul(t,R$)|0,O=O+Math.imul(t,x)|0,O=O+Math.imul(a,R$)|0,z=z+Math.imul(a,x)|0,K=K+Math.imul(f,e)|0,O=O+Math.imul(f,U$)|0,O=O+Math.imul(h,e)|0,z=z+Math.imul(h,U$)|0,K=K+Math.imul(d,z$)|0,O=O+Math.imul(d,H$)|0,O=O+Math.imul(s,z$)|0,z=z+Math.imul(s,H$)|0,K=K+Math.imul(i,g$)|0,O=O+Math.imul(i,x$)|0,O=O+Math.imul(b,g$)|0,z=z+Math.imul(b,x$)|0,K=K+Math.imul(u,k$)|0,O=O+Math.imul(u,E$)|0,O=O+Math.imul(n,k$)|0,z=z+Math.imul(n,E$)|0;var H0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(H0>>>26)|0,H0&=67108863,K=Math.imul(K$,_$),O=Math.imul(K$,P$),O=O+Math.imul(F$,_$)|0,z=Math.imul(F$,P$),K=K+Math.imul(S$,j$)|0,O=O+Math.imul(S$,q$)|0,O=O+Math.imul(A$,j$)|0,z=z+Math.imul(A$,q$)|0,K=K+Math.imul(m,N$)|0,O=O+Math.imul(m,B$)|0,O=O+Math.imul(v$,N$)|0,z=z+Math.imul(v$,B$)|0,K=K+Math.imul(y,R$)|0,O=O+Math.imul(y,x)|0,O=O+Math.imul(o,R$)|0,z=z+Math.imul(o,x)|0,K=K+Math.imul(t,e)|0,O=O+Math.imul(t,U$)|0,O=O+Math.imul(a,e)|0,z=z+Math.imul(a,U$)|0,K=K+Math.imul(f,z$)|0,O=O+Math.imul(f,H$)|0,O=O+Math.imul(h,z$)|0,z=z+Math.imul(h,H$)|0,K=K+Math.imul(d,g$)|0,O=O+Math.imul(d,x$)|0,O=O+Math.imul(s,g$)|0,z=z+Math.imul(s,x$)|0,K=K+Math.imul(i,k$)|0,O=O+Math.imul(i,E$)|0,O=O+Math.imul(b,k$)|0,z=z+Math.imul(b,E$)|0;var Z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,K=Math.imul(K$,j$),O=Math.imul(K$,q$),O=O+Math.imul(F$,j$)|0,z=Math.imul(F$,q$),K=K+Math.imul(S$,N$)|0,O=O+Math.imul(S$,B$)|0,O=O+Math.imul(A$,N$)|0,z=z+Math.imul(A$,B$)|0,K=K+Math.imul(m,R$)|0,O=O+Math.imul(m,x)|0,O=O+Math.imul(v$,R$)|0,z=z+Math.imul(v$,x)|0,K=K+Math.imul(y,e)|0,O=O+Math.imul(y,U$)|0,O=O+Math.imul(o,e)|0,z=z+Math.imul(o,U$)|0,K=K+Math.imul(t,z$)|0,O=O+Math.imul(t,H$)|0,O=O+Math.imul(a,z$)|0,z=z+Math.imul(a,H$)|0,K=K+Math.imul(f,g$)|0,O=O+Math.imul(f,x$)|0,O=O+Math.imul(h,g$)|0,z=z+Math.imul(h,x$)|0,K=K+Math.imul(d,k$)|0,O=O+Math.imul(d,E$)|0,O=O+Math.imul(s,k$)|0,z=z+Math.imul(s,E$)|0;var L0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(L0>>>26)|0,L0&=67108863,K=Math.imul(K$,N$),O=Math.imul(K$,B$),O=O+Math.imul(F$,N$)|0,z=Math.imul(F$,B$),K=K+Math.imul(S$,R$)|0,O=O+Math.imul(S$,x)|0,O=O+Math.imul(A$,R$)|0,z=z+Math.imul(A$,x)|0,K=K+Math.imul(m,e)|0,O=O+Math.imul(m,U$)|0,O=O+Math.imul(v$,e)|0,z=z+Math.imul(v$,U$)|0,K=K+Math.imul(y,z$)|0,O=O+Math.imul(y,H$)|0,O=O+Math.imul(o,z$)|0,z=z+Math.imul(o,H$)|0,K=K+Math.imul(t,g$)|0,O=O+Math.imul(t,x$)|0,O=O+Math.imul(a,g$)|0,z=z+Math.imul(a,x$)|0,K=K+Math.imul(f,k$)|0,O=O+Math.imul(f,E$)|0,O=O+Math.imul(h,k$)|0,z=z+Math.imul(h,E$)|0;var E0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(E0>>>26)|0,E0&=67108863,K=Math.imul(K$,R$),O=Math.imul(K$,x),O=O+Math.imul(F$,R$)|0,z=Math.imul(F$,x),K=K+Math.imul(S$,e)|0,O=O+Math.imul(S$,U$)|0,O=O+Math.imul(A$,e)|0,z=z+Math.imul(A$,U$)|0,K=K+Math.imul(m,z$)|0,O=O+Math.imul(m,H$)|0,O=O+Math.imul(v$,z$)|0,z=z+Math.imul(v$,H$)|0,K=K+Math.imul(y,g$)|0,O=O+Math.imul(y,x$)|0,O=O+Math.imul(o,g$)|0,z=z+Math.imul(o,x$)|0,K=K+Math.imul(t,k$)|0,O=O+Math.imul(t,E$)|0,O=O+Math.imul(a,k$)|0,z=z+Math.imul(a,E$)|0;var T0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(T0>>>26)|0,T0&=67108863,K=Math.imul(K$,e),O=Math.imul(K$,U$),O=O+Math.imul(F$,e)|0,z=Math.imul(F$,U$),K=K+Math.imul(S$,z$)|0,O=O+Math.imul(S$,H$)|0,O=O+Math.imul(A$,z$)|0,z=z+Math.imul(A$,H$)|0,K=K+Math.imul(m,g$)|0,O=O+Math.imul(m,x$)|0,O=O+Math.imul(v$,g$)|0,z=z+Math.imul(v$,x$)|0,K=K+Math.imul(y,k$)|0,O=O+Math.imul(y,E$)|0,O=O+Math.imul(o,k$)|0,z=z+Math.imul(o,E$)|0;var M0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(M0>>>26)|0,M0&=67108863,K=Math.imul(K$,z$),O=Math.imul(K$,H$),O=O+Math.imul(F$,z$)|0,z=Math.imul(F$,H$),K=K+Math.imul(S$,g$)|0,O=O+Math.imul(S$,x$)|0,O=O+Math.imul(A$,g$)|0,z=z+Math.imul(A$,x$)|0,K=K+Math.imul(m,k$)|0,O=O+Math.imul(m,E$)|0,O=O+Math.imul(v$,k$)|0,z=z+Math.imul(v$,E$)|0;var P0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(P0>>>26)|0,P0&=67108863,K=Math.imul(K$,g$),O=Math.imul(K$,x$),O=O+Math.imul(F$,g$)|0,z=Math.imul(F$,x$),K=K+Math.imul(S$,k$)|0,O=O+Math.imul(S$,E$)|0,O=O+Math.imul(A$,k$)|0,z=z+Math.imul(A$,E$)|0;var q0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(q0>>>26)|0,q0&=67108863,K=Math.imul(K$,k$),O=Math.imul(K$,E$),O=O+Math.imul(F$,k$)|0,z=Math.imul(F$,E$);var R0=(H+K|0)+((O&8191)<<13)|0;if(H=(z+(O>>>13)|0)+(R0>>>26)|0,R0&=67108863,S[0]=Y0,S[1]=m$,S[2]=n$,S[3]=v0,S[4]=$0,S[5]=K0,S[6]=z0,S[7]=S0,S[8]=A0,S[9]=F0,S[10]=H0,S[11]=Z0,S[12]=L0,S[13]=E0,S[14]=T0,S[15]=M0,S[16]=P0,S[17]=q0,S[18]=R0,H!==0)S[19]=H,W.length++;return W};if(!Math.imul)g=k;function j(v,G,W){W.negative=G.negative^v.negative,W.length=v.length+G.length;var Y=0,V=0;for(var S=0;S<W.length-1;S++){var H=V;V=0;var K=Y&67108863,O=Math.min(S,G.length-1);for(var z=Math.max(0,S-v.length+1);z<=O;z++){var q=S-z,M=v.words[q]|0,C=G.words[z]|0,w=M*C,u=w&67108863;H=H+(w/67108864|0)|0,u=u+K|0,K=u&67108863,H=H+(u>>>26)|0,V+=H>>>26,H&=67108863}W.words[S]=K,Y=H,H=V}if(Y!==0)W.words[S]=Y;else W.length--;return W.strip()}function _(v,G,W){var Y=new N;return Y.mulp(v,G,W)}J.prototype.mulTo=function(v,G){var W,Y=this.length+v.length;if(this.length===10&&v.length===10)W=g(this,v,G);else if(Y<63)W=k(this,v,G);else if(Y<1024)W=j(this,v,G);else W=_(this,v,G);return W};function N(v,G){this.x=v,this.y=G}N.prototype.makeRBT=function(v){var G=Array(v),W=J.prototype._countBits(v)-1;for(var Y=0;Y<v;Y++)G[Y]=this.revBin(Y,W,v);return G},N.prototype.revBin=function(v,G,W){if(v===0||v===W-1)return v;var Y=0;for(var V=0;V<G;V++)Y|=(v&1)<<G-V-1,v>>=1;return Y},N.prototype.permute=function(v,G,W,Y,V,S){for(var H=0;H<S;H++)Y[H]=G[v[H]],V[H]=W[v[H]]},N.prototype.transform=function(v,G,W,Y,V,S){this.permute(S,v,G,W,Y,V);for(var H=1;H<V;H<<=1){var K=H<<1,O=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K);for(var q=0;q<V;q+=K){var M=O,C=z;for(var w=0;w<H;w++){var u=W[q+w],n=Y[q+w],W$=W[q+w+H],i=Y[q+w+H],b=M*W$-C*i;if(i=M*i+C*W$,W$=b,W[q+w]=u+W$,Y[q+w]=n+i,W[q+w+H]=u-W$,Y[q+w+H]=n-i,w!==K)b=O*M-z*C,C=O*C+z*M,M=b}}}},N.prototype.guessLen13b=function(v,G){var W=Math.max(G,v)|1,Y=W&1,V=0;for(W=W/2|0;W;W=W>>>1)V++;return 1<<V+1+Y},N.prototype.conjugate=function(v,G,W){if(W<=1)return;for(var Y=0;Y<W/2;Y++){var V=v[Y];v[Y]=v[W-Y-1],v[W-Y-1]=V,V=G[Y],G[Y]=-G[W-Y-1],G[W-Y-1]=-V}},N.prototype.normalize13b=function(v,G){var W=0;for(var Y=0;Y<G/2;Y++){var V=Math.round(v[2*Y+1]/G)*8192+Math.round(v[2*Y]/G)+W;if(v[Y]=V&67108863,V<67108864)W=0;else W=V/67108864|0}return v},N.prototype.convert13b=function(v,G,W,Y){var V=0;for(var S=0;S<G;S++)V=V+(v[S]|0),W[2*S]=V&8191,V=V>>>13,W[2*S+1]=V&8191,V=V>>>13;for(S=2*G;S<Y;++S)W[S]=0;U(V===0),U((V&-8192)===0)},N.prototype.stub=function(v){var G=Array(v);for(var W=0;W<v;W++)G[W]=0;return G},N.prototype.mulp=function(v,G,W){var Y=2*this.guessLen13b(v.length,G.length),V=this.makeRBT(Y),S=this.stub(Y),H=Array(Y),K=Array(Y),O=Array(Y),z=Array(Y),q=Array(Y),M=Array(Y),C=W.words;C.length=Y,this.convert13b(v.words,v.length,H,Y),this.convert13b(G.words,G.length,z,Y),this.transform(H,S,K,O,Y,V),this.transform(z,S,q,M,Y,V);for(var w=0;w<Y;w++){var u=K[w]*q[w]-O[w]*M[w];O[w]=K[w]*M[w]+O[w]*q[w],K[w]=u}return this.conjugate(K,O,Y),this.transform(K,O,C,S,Y,V),this.conjugate(C,S,Y),this.normalize13b(C,Y),W.negative=v.negative^G.negative,W.length=v.length+G.length,W.strip()},J.prototype.mul=function(v){var G=new J(null);return G.words=Array(this.length+v.length),this.mulTo(v,G)},J.prototype.mulf=function(v){var G=new J(null);return G.words=Array(this.length+v.length),_(this,v,G)},J.prototype.imul=function(v){return this.clone().mulTo(v,this)},J.prototype.imuln=function(v){U(typeof v==="number"),U(v<67108864);var G=0;for(var W=0;W<this.length;W++){var Y=(this.words[W]|0)*v,V=(Y&67108863)+(G&67108863);G>>=26,G+=Y/67108864|0,G+=V>>>26,this.words[W]=V&67108863}if(G!==0)this.words[W]=G,this.length++;return this.length=v===0?1:this.length,this},J.prototype.muln=function(v){return this.clone().imuln(v)},J.prototype.sqr=function(){return this.mul(this)},J.prototype.isqr=function(){return this.imul(this.clone())},J.prototype.pow=function(v){var G=R(v);if(G.length===0)return new J(1);var W=this;for(var Y=0;Y<G.length;Y++,W=W.sqr())if(G[Y]!==0)break;if(++Y<G.length)for(var V=W.sqr();Y<G.length;Y++,V=V.sqr()){if(G[Y]===0)continue;W=W.mul(V)}return W},J.prototype.iushln=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=67108863>>>26-G<<26-G,V;if(G!==0){var S=0;for(V=0;V<this.length;V++){var H=this.words[V]&Y,K=(this.words[V]|0)-H<<G;this.words[V]=K|S,S=H>>>26-G}if(S)this.words[V]=S,this.length++}if(W!==0){for(V=this.length-1;V>=0;V--)this.words[V+W]=this.words[V];for(V=0;V<W;V++)this.words[V]=0;this.length+=W}return this.strip()},J.prototype.ishln=function(v){return U(this.negative===0),this.iushln(v)},J.prototype.iushrn=function(v,G,W){U(typeof v==="number"&&v>=0);var Y;if(G)Y=(G-G%26)/26;else Y=0;var V=v%26,S=Math.min((v-V)/26,this.length),H=67108863^67108863>>>V<<V,K=W;if(Y-=S,Y=Math.max(0,Y),K){for(var O=0;O<S;O++)K.words[O]=this.words[O];K.length=S}if(S===0);else if(this.length>S){this.length-=S;for(O=0;O<this.length;O++)this.words[O]=this.words[O+S]}else this.words[0]=0,this.length=1;var z=0;for(O=this.length-1;O>=0&&(z!==0||O>=Y);O--){var q=this.words[O]|0;this.words[O]=z<<26-V|q>>>V,z=q&H}if(K&&z!==0)K.words[K.length++]=z;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},J.prototype.ishrn=function(v,G,W){return U(this.negative===0),this.iushrn(v,G,W)},J.prototype.shln=function(v){return this.clone().ishln(v)},J.prototype.ushln=function(v){return this.clone().iushln(v)},J.prototype.shrn=function(v){return this.clone().ishrn(v)},J.prototype.ushrn=function(v){return this.clone().iushrn(v)},J.prototype.testn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return!1;var V=this.words[W];return!!(V&Y)},J.prototype.imaskn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26;if(U(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(G!==0)W++;if(this.length=Math.min(W,this.length),G!==0){var Y=67108863^67108863>>>G<<G;this.words[this.length-1]&=Y}return this.strip()},J.prototype.maskn=function(v){return this.clone().imaskn(v)},J.prototype.iaddn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.isubn(-v);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<v)return this.words[0]=v-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(v),this.negative=1,this}return this._iaddn(v)},J.prototype._iaddn=function(v){this.words[0]+=v;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},J.prototype.isubn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},J.prototype.addn=function(v){return this.clone().iaddn(v)},J.prototype.subn=function(v){return this.clone().isubn(v)},J.prototype.iabs=function(){return this.negative=0,this},J.prototype.abs=function(){return this.clone().iabs()},J.prototype._ishlnsubmul=function(v,G,W){var Y=v.length+W,V;this._expand(Y);var S,H=0;for(V=0;V<v.length;V++){S=(this.words[V+W]|0)+H;var K=(v.words[V]|0)*G;S-=K&67108863,H=(S>>26)-(K/67108864|0),this.words[V+W]=S&67108863}for(;V<this.length-W;V++)S=(this.words[V+W]|0)+H,H=S>>26,this.words[V+W]=S&67108863;if(H===0)return this.strip();U(H===-1),H=0;for(V=0;V<this.length;V++)S=-(this.words[V]|0)+H,H=S>>26,this.words[V]=S&67108863;return this.negative=1,this.strip()},J.prototype._wordDiv=function(v,G){var W=this.length-v.length,Y=this.clone(),V=v,S=V.words[V.length-1]|0,H=this._countBits(S);if(W=26-H,W!==0)V=V.ushln(W),Y.iushln(W),S=V.words[V.length-1]|0;var K=Y.length-V.length,O;if(G!=="mod"){O=new J(null),O.length=K+1,O.words=Array(O.length);for(var z=0;z<O.length;z++)O.words[z]=0}var q=Y.clone()._ishlnsubmul(V,1,K);if(q.negative===0){if(Y=q,O)O.words[K]=1}for(var M=K-1;M>=0;M--){var C=(Y.words[V.length+M]|0)*67108864+(Y.words[V.length+M-1]|0);C=Math.min(C/S|0,67108863),Y._ishlnsubmul(V,C,M);while(Y.negative!==0)if(C--,Y.negative=0,Y._ishlnsubmul(V,1,M),!Y.isZero())Y.negative^=1;if(O)O.words[M]=C}if(O)O.strip();if(Y.strip(),G!=="div"&&W!==0)Y.iushrn(W);return{div:O||null,mod:Y}},J.prototype.divmod=function(v,G,W){if(U(!v.isZero()),this.isZero())return{div:new J(0),mod:new J(0)};var Y,V,S;if(this.negative!==0&&v.negative===0){if(S=this.neg().divmod(v,G),G!=="mod")Y=S.div.neg();if(G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.iadd(v)}return{div:Y,mod:V}}if(this.negative===0&&v.negative!==0){if(S=this.divmod(v.neg(),G),G!=="mod")Y=S.div.neg();return{div:Y,mod:S.mod}}if((this.negative&v.negative)!==0){if(S=this.neg().divmod(v.neg(),G),G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.isub(v)}return{div:S.div,mod:V}}if(v.length>this.length||this.cmp(v)<0)return{div:new J(0),mod:this};if(v.length===1){if(G==="div")return{div:this.divn(v.words[0]),mod:null};if(G==="mod")return{div:null,mod:new J(this.modn(v.words[0]))};return{div:this.divn(v.words[0]),mod:new J(this.modn(v.words[0]))}}return this._wordDiv(v,G)},J.prototype.div=function(v){return this.divmod(v,"div",!1).div},J.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},J.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},J.prototype.divRound=function(v){var G=this.divmod(v);if(G.mod.isZero())return G.div;var W=G.div.negative!==0?G.mod.isub(v):G.mod,Y=v.ushrn(1),V=v.andln(1),S=W.cmp(Y);if(S<0||V===1&&S===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},J.prototype.modn=function(v){U(v<=67108863);var G=67108864%v,W=0;for(var Y=this.length-1;Y>=0;Y--)W=(G*W+(this.words[Y]|0))%v;return W},J.prototype.idivn=function(v){U(v<=67108863);var G=0;for(var W=this.length-1;W>=0;W--){var Y=(this.words[W]|0)+G*67108864;this.words[W]=Y/v|0,G=Y%v}return this.strip()},J.prototype.divn=function(v){return this.clone().idivn(v)},J.prototype.egcd=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=new J(0),H=new J(1),K=0;while(G.isEven()&&W.isEven())G.iushrn(1),W.iushrn(1),++K;var O=W.clone(),z=G.clone();while(!G.isZero()){for(var q=0,M=1;(G.words[0]&M)===0&&q<26;++q,M<<=1);if(q>0){G.iushrn(q);while(q-- >0){if(Y.isOdd()||V.isOdd())Y.iadd(O),V.isub(z);Y.iushrn(1),V.iushrn(1)}}for(var C=0,w=1;(W.words[0]&w)===0&&C<26;++C,w<<=1);if(C>0){W.iushrn(C);while(C-- >0){if(S.isOdd()||H.isOdd())S.iadd(O),H.isub(z);S.iushrn(1),H.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(S),V.isub(H);else W.isub(G),S.isub(Y),H.isub(V)}return{a:S,b:H,gcd:W.iushln(K)}},J.prototype._invmp=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=W.clone();while(G.cmpn(1)>0&&W.cmpn(1)>0){for(var H=0,K=1;(G.words[0]&K)===0&&H<26;++H,K<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Y.isOdd())Y.iadd(S);Y.iushrn(1)}}for(var O=0,z=1;(W.words[0]&z)===0&&O<26;++O,z<<=1);if(O>0){W.iushrn(O);while(O-- >0){if(V.isOdd())V.iadd(S);V.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(V);else W.isub(G),V.isub(Y)}var q;if(G.cmpn(1)===0)q=Y;else q=V;if(q.cmpn(0)<0)q.iadd(v);return q},J.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var G=this.clone(),W=v.clone();G.negative=0,W.negative=0;for(var Y=0;G.isEven()&&W.isEven();Y++)G.iushrn(1),W.iushrn(1);do{while(G.isEven())G.iushrn(1);while(W.isEven())W.iushrn(1);var V=G.cmp(W);if(V<0){var S=G;G=W,W=S}else if(V===0||W.cmpn(1)===0)break;G.isub(W)}while(!0);return W.iushln(Y)},J.prototype.invm=function(v){return this.egcd(v).a.umod(v)},J.prototype.isEven=function(){return(this.words[0]&1)===0},J.prototype.isOdd=function(){return(this.words[0]&1)===1},J.prototype.andln=function(v){return this.words[0]&v},J.prototype.bincn=function(v){U(typeof v==="number");var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return this._expand(W+1),this.words[W]|=Y,this;var V=Y;for(var S=W;V!==0&&S<this.length;S++){var H=this.words[S]|0;H+=V,V=H>>>26,H&=67108863,this.words[S]=H}if(V!==0)this.words[S]=V,this.length++;return this},J.prototype.isZero=function(){return this.length===1&&this.words[0]===0},J.prototype.cmpn=function(v){var G=v<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var W;if(this.length>1)W=1;else{if(G)v=-v;U(v<=67108863,"Number is too big");var Y=this.words[0]|0;W=Y===v?0:Y<v?-1:1}if(this.negative!==0)return-W|0;return W},J.prototype.cmp=function(v){if(this.negative!==0&&v.negative===0)return-1;if(this.negative===0&&v.negative!==0)return 1;var G=this.ucmp(v);if(this.negative!==0)return-G|0;return G},J.prototype.ucmp=function(v){if(this.length>v.length)return 1;if(this.length<v.length)return-1;var G=0;for(var W=this.length-1;W>=0;W--){var Y=this.words[W]|0,V=v.words[W]|0;if(Y===V)continue;if(Y<V)G=-1;else if(Y>V)G=1;break}return G},J.prototype.gtn=function(v){return this.cmpn(v)===1},J.prototype.gt=function(v){return this.cmp(v)===1},J.prototype.gten=function(v){return this.cmpn(v)>=0},J.prototype.gte=function(v){return this.cmp(v)>=0},J.prototype.ltn=function(v){return this.cmpn(v)===-1},J.prototype.lt=function(v){return this.cmp(v)===-1},J.prototype.lten=function(v){return this.cmpn(v)<=0},J.prototype.lte=function(v){return this.cmp(v)<=0},J.prototype.eqn=function(v){return this.cmpn(v)===0},J.prototype.eq=function(v){return this.cmp(v)===0},J.red=function(v){return new p(v)},J.prototype.toRed=function(v){return U(!this.red,"Already a number in reduction context"),U(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},J.prototype.fromRed=function(){return U(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},J.prototype._forceRed=function(v){return this.red=v,this},J.prototype.forceRed=function(v){return U(!this.red,"Already a number in reduction context"),this._forceRed(v)},J.prototype.redAdd=function(v){return U(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},J.prototype.redIAdd=function(v){return U(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},J.prototype.redSub=function(v){return U(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},J.prototype.redISub=function(v){return U(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},J.prototype.redShl=function(v){return U(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},J.prototype.redMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},J.prototype.redIMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},J.prototype.redSqr=function(){return U(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},J.prototype.redISqr=function(){return U(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},J.prototype.redSqrt=function(){return U(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},J.prototype.redInvm=function(){return U(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},J.prototype.redNeg=function(){return U(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},J.prototype.redPow=function(v){return U(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var B={k256:null,p224:null,p192:null,p25519:null};function c(v,G){this.name=v,this.p=new J(G,16),this.n=this.p.bitLength(),this.k=new J(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var v=new J(null);return v.words=Array(Math.ceil(this.n/13)),v},c.prototype.ireduce=function(v){var G=v,W;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),W=G.bitLength();while(W>this.n);var Y=W<this.n?-1:G.ucmp(this.p);if(Y===0)G.words[0]=0,G.length=1;else if(Y>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},c.prototype.split=function(v,G){v.iushrn(this.n,0,G)},c.prototype.imulK=function(v){return v.imul(this.k)};function r(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Q(r,c),r.prototype.split=function(v,G){var W=4194303,Y=Math.min(v.length,9);for(var V=0;V<Y;V++)G.words[V]=v.words[V];if(G.length=Y,v.length<=9){v.words[0]=0,v.length=1;return}var S=v.words[9];G.words[G.length++]=S&W;for(V=10;V<v.length;V++){var H=v.words[V]|0;v.words[V-10]=(H&W)<<4|S>>>22,S=H}if(S>>>=22,v.words[V-10]=S,S===0&&v.length>10)v.length-=10;else v.length-=9},r.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;var G=0;for(var W=0;W<v.length;W++){var Y=v.words[W]|0;G+=Y*977,v.words[W]=G&67108863,G=Y*64+(G/67108864|0)}if(v.words[v.length-1]===0){if(v.length--,v.words[v.length-1]===0)v.length--}return v};function J$(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Q(J$,c);function G$(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Q(G$,c);function X$(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Q(X$,c),X$.prototype.imulK=function(v){var G=0;for(var W=0;W<v.length;W++){var Y=(v.words[W]|0)*19+G,V=Y&67108863;Y>>>=26,v.words[W]=V,G=Y}if(G!==0)v.words[v.length++]=G;return v},J._prime=function(v){if(B[v])return B[v];var G;if(v==="k256")G=new r;else if(v==="p224")G=new J$;else if(v==="p192")G=new G$;else if(v==="p25519")G=new X$;else throw Error("Unknown prime "+v);return B[v]=G,G};function p(v){if(typeof v==="string"){var G=J._prime(v);this.m=G.p,this.prime=G}else U(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}p.prototype._verify1=function(v){U(v.negative===0,"red works only with positives"),U(v.red,"red works only with red numbers")},p.prototype._verify2=function(v,G){U((v.negative|G.negative)===0,"red works only with positives"),U(v.red&&v.red===G.red,"red works only with red numbers")},p.prototype.imod=function(v){if(this.prime)return this.prime.ireduce(v)._forceRed(this);return v.umod(this.m)._forceRed(this)},p.prototype.neg=function(v){if(v.isZero())return v.clone();return this.m.sub(v)._forceRed(this)},p.prototype.add=function(v,G){this._verify2(v,G);var W=v.add(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W._forceRed(this)},p.prototype.iadd=function(v,G){this._verify2(v,G);var W=v.iadd(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W},p.prototype.sub=function(v,G){this._verify2(v,G);var W=v.sub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W._forceRed(this)},p.prototype.isub=function(v,G){this._verify2(v,G);var W=v.isub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W},p.prototype.shl=function(v,G){return this._verify1(v),this.imod(v.ushln(G))},p.prototype.imul=function(v,G){return this._verify2(v,G),this.imod(v.imul(G))},p.prototype.mul=function(v,G){return this._verify2(v,G),this.imod(v.mul(G))},p.prototype.isqr=function(v){return this.imul(v,v.clone())},p.prototype.sqr=function(v){return this.mul(v,v)},p.prototype.sqrt=function(v){if(v.isZero())return v.clone();var G=this.m.andln(3);if(U(G%2===1),G===3){var W=this.m.add(new J(1)).iushrn(2);return this.pow(v,W)}var Y=this.m.subn(1),V=0;while(!Y.isZero()&&Y.andln(1)===0)V++,Y.iushrn(1);U(!Y.isZero());var S=new J(1).toRed(this),H=S.redNeg(),K=this.m.subn(1).iushrn(1),O=this.m.bitLength();O=new J(2*O*O).toRed(this);while(this.pow(O,K).cmp(H)!==0)O.redIAdd(H);var z=this.pow(O,Y),q=this.pow(v,Y.addn(1).iushrn(1)),M=this.pow(v,Y),C=V;while(M.cmp(S)!==0){var w=M;for(var u=0;w.cmp(S)!==0;u++)w=w.redSqr();U(u<C);var n=this.pow(z,new J(1).iushln(C-u-1));q=q.redMul(n),z=n.redSqr(),M=M.redMul(z),C=u}return q},p.prototype.invm=function(v){var G=v._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(v,G){if(G.isZero())return new J(1).toRed(this);if(G.cmpn(1)===0)return v.clone();var W=4,Y=Array(1<<W);Y[0]=new J(1).toRed(this),Y[1]=v;for(var V=2;V<Y.length;V++)Y[V]=this.mul(Y[V-1],v);var S=Y[0],H=0,K=0,O=G.bitLength()%26;if(O===0)O=26;for(V=G.length-1;V>=0;V--){var z=G.words[V];for(var q=O-1;q>=0;q--){var M=z>>q&1;if(S!==Y[0])S=this.sqr(S);if(M===0&&H===0){K=0;continue}if(H<<=1,H|=M,K++,K!==W&&(V!==0||q!==0))continue;S=this.mul(S,Y[H]),K=0,H=0}O=26}return S},p.prototype.convertTo=function(v){var G=v.umod(this.m);return G===v?G.clone():G},p.prototype.convertFrom=function(v){var G=v.clone();return G.red=null,G},J.mont=function(v){return new I$(v)};function I$(v){if(p.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new J(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Q(I$,p),I$.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},I$.prototype.convertFrom=function(v){var G=this.imod(v.mul(this.rinv));return G.red=null,G},I$.prototype.imul=function(v,G){if(v.isZero()||G.isZero())return v.words[0]=0,v.length=1,v;var W=v.imul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.mul=function(v,G){if(v.isZero()||G.isZero())return new J(0)._forceRed(this);var W=v.mul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.invm=function(v){var G=this.imod(v._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof I>"u"||I,$)}),fU=Y$(($,I)=>{I.exports=D;function D(X,U){if(!X)throw Error(U||"Assertion failed")}D.equal=function(X,U,Q){if(X!=U)throw Error(Q||"Assertion failed: "+X+" != "+U)}}),wW=Y$(($)=>{var I=$;function D(Q,J){if(Array.isArray(Q))return Q.slice();if(!Q)return[];var A=[];if(typeof Q!=="string"){for(var T=0;T<Q.length;T++)A[T]=Q[T]|0;return A}if(J==="hex"){if(Q=Q.replace(/[^a-z0-9]+/ig,""),Q.length%2!==0)Q="0"+Q;for(var T=0;T<Q.length;T+=2)A.push(parseInt(Q[T]+Q[T+1],16))}else for(var T=0;T<Q.length;T++){var Z=Q.charCodeAt(T),L=Z>>8,F=Z&255;if(L)A.push(L,F);else A.push(F)}return A}I.toArray=D;function X(Q){if(Q.length===1)return"0"+Q;else return Q}I.zero2=X;function U(Q){var J="";for(var A=0;A<Q.length;A++)J+=X(Q[A].toString(16));return J}I.toHex=U,I.encode=function(Q,J){if(J==="hex")return U(Q);else return Q}}),vU=Y$(($)=>{var I=$,D=TU(),X=fU(),U=wW();I.assert=X,I.toArray=U.toArray,I.zero2=U.zero2,I.toHex=U.toHex,I.encode=U.encode;function Q(L,F,E){var P=Array(Math.max(L.bitLength(),E)+1),R;for(R=0;R<P.length;R+=1)P[R]=0;var k=1<<F+1,g=L.clone();for(R=0;R<P.length;R++){var j,_=g.andln(k-1);if(g.isOdd()){if(_>(k>>1)-1)j=(k>>1)-_;else j=_;g.isubn(j)}else j=0;P[R]=j,g.iushrn(1)}return P}I.getNAF=Q;function J(L,F){var E=[[],[]];L=L.clone(),F=F.clone();var P=0,R=0,k;while(L.cmpn(-P)>0||F.cmpn(-R)>0){var g=L.andln(3)+P&3,j=F.andln(3)+R&3;if(g===3)g=-1;if(j===3)j=-1;var _;if((g&1)===0)_=0;else if(k=L.andln(7)+P&7,(k===3||k===5)&&j===2)_=-g;else _=g;E[0].push(_);var N;if((j&1)===0)N=0;else if(k=F.andln(7)+R&7,(k===3||k===5)&&g===2)N=-j;else N=j;if(E[1].push(N),2*P===_+1)P=1-P;if(2*R===N+1)R=1-R;L.iushrn(1),F.iushrn(1)}return E}I.getJSF=J;function A(L,F,E){var P="_"+F;L.prototype[F]=function(){return this[P]!==void 0?this[P]:this[P]=E.call(this)}}I.cachedProperty=A;function T(L){return typeof L==="string"?I.toArray(L,"hex"):L}I.parseBytes=T;function Z(L){return new D(L,"hex","le")}I.intFromLE=Z}),cW=Y$(($,I)=>{var D;I.exports=function(Q){if(!D)D=new X(null);return D.generate(Q)};function X(Q){this.rand=Q}if(I.exports.Rand=X,X.prototype.generate=function(Q){return this._rand(Q)},X.prototype._rand=function(Q){if(this.rand.getBytes)return this.rand.getBytes(Q);var J=new Uint8Array(Q);for(var A=0;A<J.length;A++)J[A]=this.rand.getByte();return J},typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues)X.prototype._rand=function(Q){var J=new Uint8Array(Q);return self.crypto.getRandomValues(J),J};else if(self.msCrypto&&self.msCrypto.getRandomValues)X.prototype._rand=function(Q){var J=new Uint8Array(Q);return self.msCrypto.getRandomValues(J),J};else if(typeof window==="object")X.prototype._rand=function(){throw Error("Not implemented yet")}}else try{if(U=(t0(),e$(m0)),typeof U.randomBytes!=="function")throw Error("Not supported");X.prototype._rand=function(Q){return U.randomBytes(Q)}}catch(Q){}var U}),k4=Y$(($,I)=>{var D=TU(),X=vU(),U=X.getNAF,Q=X.getJSF,J=X.assert;function A(Z,L){this.type=Z,this.p=new D(L.p,16),this.red=L.prime?D.red(L.prime):D.mont(this.p),this.zero=new D(0).toRed(this.red),this.one=new D(1).toRed(this.red),this.two=new D(2).toRed(this.red),this.n=L.n&&new D(L.n,16),this.g=L.g&&this.pointFromJSON(L.g,L.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var F=this.n&&this.p.div(this.n);if(!F||F.cmpn(100)>0)this.redN=null;else this._maxwellTrick=!0,this.redN=this.n.toRed(this.red)}I.exports=A,A.prototype.point=function(){throw Error("Not implemented")},A.prototype.validate=function(){throw Error("Not implemented")},A.prototype._fixedNafMul=function(Z,L){J(Z.precomputed);var F=Z._getDoubles(),E=U(L,1,this._bitLength),P=(1<<F.step+1)-(F.step%2===0?2:1);P/=3;var R=[],k,g;for(k=0;k<E.length;k+=F.step){g=0;for(var j=k+F.step-1;j>=k;j--)g=(g<<1)+E[j];R.push(g)}var _=this.jpoint(null,null,null),N=this.jpoint(null,null,null);for(var B=P;B>0;B--){for(k=0;k<R.length;k++)if(g=R[k],g===B)N=N.mixedAdd(F.points[k]);else if(g===-B)N=N.mixedAdd(F.points[k].neg());_=_.add(N)}return _.toP()},A.prototype._wnafMul=function(Z,L){var F=4,E=Z._getNAFPoints(F);F=E.wnd;var P=E.points,R=U(L,F,this._bitLength),k=this.jpoint(null,null,null);for(var g=R.length-1;g>=0;g--){for(var j=0;g>=0&&R[g]===0;g--)j++;if(g>=0)j++;if(k=k.dblp(j),g<0)break;var _=R[g];if(J(_!==0),Z.type==="affine")if(_>0)k=k.mixedAdd(P[_-1>>1]);else k=k.mixedAdd(P[-_-1>>1].neg());else if(_>0)k=k.add(P[_-1>>1]);else k=k.add(P[-_-1>>1].neg())}return Z.type==="affine"?k.toP():k},A.prototype._wnafMulAdd=function(Z,L,F,E,P){var R=this._wnafT1,k=this._wnafT2,g=this._wnafT3,j=0,_,N,B;for(_=0;_<E;_++){B=L[_];var c=B._getNAFPoints(Z);R[_]=c.wnd,k[_]=c.points}for(_=E-1;_>=1;_-=2){var r=_-1,J$=_;if(R[r]!==1||R[J$]!==1){g[r]=U(F[r],R[r],this._bitLength),g[J$]=U(F[J$],R[J$],this._bitLength),j=Math.max(g[r].length,j),j=Math.max(g[J$].length,j);continue}var G$=[L[r],null,null,L[J$]];if(L[r].y.cmp(L[J$].y)===0)G$[1]=L[r].add(L[J$]),G$[2]=L[r].toJ().mixedAdd(L[J$].neg());else if(L[r].y.cmp(L[J$].y.redNeg())===0)G$[1]=L[r].toJ().mixedAdd(L[J$]),G$[2]=L[r].add(L[J$].neg());else G$[1]=L[r].toJ().mixedAdd(L[J$]),G$[2]=L[r].toJ().mixedAdd(L[J$].neg());var X$=[-3,-1,-5,-7,0,7,5,1,3],p=Q(F[r],F[J$]);j=Math.max(p[0].length,j),g[r]=Array(j),g[J$]=Array(j);for(N=0;N<j;N++){var I$=p[0][N]|0,v=p[1][N]|0;g[r][N]=X$[(I$+1)*3+(v+1)],g[J$][N]=0,k[r]=G$}}var G=this.jpoint(null,null,null),W=this._wnafT4;for(_=j;_>=0;_--){var Y=0;while(_>=0){var V=!0;for(N=0;N<E;N++)if(W[N]=g[N][_]|0,W[N]!==0)V=!1;if(!V)break;Y++,_--}if(_>=0)Y++;if(G=G.dblp(Y),_<0)break;for(N=0;N<E;N++){var S=W[N];if(S===0)continue;else if(S>0)B=k[N][S-1>>1];else if(S<0)B=k[N][-S-1>>1].neg();if(B.type==="affine")G=G.mixedAdd(B);else G=G.add(B)}}for(_=0;_<E;_++)k[_]=null;if(P)return G;else return G.toP()};function T(Z,L){this.curve=Z,this.type=L,this.precomputed=null}A.BasePoint=T,T.prototype.eq=function(){throw Error("Not implemented")},T.prototype.validate=function(){return this.curve.validate(this)},A.prototype.decodePoint=function(Z,L){Z=X.toArray(Z,L);var F=this.p.byteLength();if((Z[0]===4||Z[0]===6||Z[0]===7)&&Z.length-1===2*F){if(Z[0]===6)J(Z[Z.length-1]%2===0);else if(Z[0]===7)J(Z[Z.length-1]%2===1);var E=this.point(Z.slice(1,1+F),Z.slice(1+F,1+2*F));return E}else if((Z[0]===2||Z[0]===3)&&Z.length-1===F)return this.pointFromX(Z.slice(1,1+F),Z[0]===3);throw Error("Unknown point format")},T.prototype.encodeCompressed=function(Z){return this.encode(Z,!0)},T.prototype._encode=function(Z){var L=this.curve.p.byteLength(),F=this.getX().toArray("be",L);if(Z)return[this.getY().isEven()?2:3].concat(F);return[4].concat(F,this.getY().toArray("be",L))},T.prototype.encode=function(Z,L){return X.encode(this._encode(L),Z)},T.prototype.precompute=function(Z){if(this.precomputed)return this;var L={doubles:null,naf:null,beta:null};return L.naf=this._getNAFPoints(8),L.doubles=this._getDoubles(4,Z),L.beta=this._getBeta(),this.precomputed=L,this},T.prototype._hasDoubles=function(Z){if(!this.precomputed)return!1;var L=this.precomputed.doubles;if(!L)return!1;return L.points.length>=Math.ceil((Z.bitLength()+1)/L.step)},T.prototype._getDoubles=function(Z,L){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var F=[this],E=this;for(var P=0;P<L;P+=Z){for(var R=0;R<Z;R++)E=E.dbl();F.push(E)}return{step:Z,points:F}},T.prototype._getNAFPoints=function(Z){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var L=[this],F=(1<<Z)-1,E=F===1?null:this.dbl();for(var P=1;P<F;P++)L[P]=L[P-1].add(E);return{wnd:Z,points:L}},T.prototype._getBeta=function(){return null},T.prototype.dblp=function(Z){var L=this;for(var F=0;F<Z;F++)L=L.dbl();return L}}),YF=Y$(($,I)=>{if(typeof Object.create==="function")I.exports=function(D,X){if(X)D.super_=X,D.prototype=Object.create(X.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}})};else I.exports=function(D,X){if(X){D.super_=X;var U=function(){};U.prototype=X.prototype,D.prototype=new U,D.prototype.constructor=D}}}),s0=Y$(($,I)=>{try{if(D=(WW(),e$(VW)),typeof D.inherits!=="function")throw"";I.exports=D.inherits}catch(X){I.exports=YF()}var D}),GF=Y$(($,I)=>{var D=vU(),X=TU(),U=s0(),Q=k4(),J=D.assert;function A(L){Q.call(this,"short",L),this.a=new X(L.a,16).toRed(this.red),this.b=new X(L.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(L),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}U(A,Q),I.exports=A,A.prototype._getEndomorphism=function(L){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var F,E;if(L.beta)F=new X(L.beta,16).toRed(this.red);else{var P=this._getEndoRoots(this.p);F=P[0].cmp(P[1])<0?P[0]:P[1],F=F.toRed(this.red)}if(L.lambda)E=new X(L.lambda,16);else{var R=this._getEndoRoots(this.n);if(this.g.mul(R[0]).x.cmp(this.g.x.redMul(F))===0)E=R[0];else E=R[1],J(this.g.mul(E).x.cmp(this.g.x.redMul(F))===0)}var k;if(L.basis)k=L.basis.map(function(g){return{a:new X(g.a,16),b:new X(g.b,16)}});else k=this._getEndoBasis(E);return{beta:F,lambda:E,basis:k}},A.prototype._getEndoRoots=function(L){var F=L===this.p?this.red:X.mont(L),E=new X(2).toRed(F).redInvm(),P=E.redNeg(),R=new X(3).toRed(F).redNeg().redSqrt().redMul(E),k=P.redAdd(R).fromRed(),g=P.redSub(R).fromRed();return[k,g]},A.prototype._getEndoBasis=function(L){var F=this.n.ushrn(Math.floor(this.n.bitLength()/2)),E=L,P=this.n.clone(),R=new X(1),k=new X(0),g=new X(0),j=new X(1),_,N,B,c,r,J$,G$,X$=0,p,I$;while(E.cmpn(0)!==0){var v=P.div(E);p=P.sub(v.mul(E)),I$=g.sub(v.mul(R));var G=j.sub(v.mul(k));if(!B&&p.cmp(F)<0)_=G$.neg(),N=R,B=p.neg(),c=I$;else if(B&&++X$===2)break;G$=p,P=E,E=p,g=R,R=I$,j=k,k=G}r=p.neg(),J$=I$;var W=B.sqr().add(c.sqr()),Y=r.sqr().add(J$.sqr());if(Y.cmp(W)>=0)r=_,J$=N;if(B.negative)B=B.neg(),c=c.neg();if(r.negative)r=r.neg(),J$=J$.neg();return[{a:B,b:c},{a:r,b:J$}]},A.prototype._endoSplit=function(L){var F=this.endo.basis,E=F[0],P=F[1],R=P.b.mul(L).divRound(this.n),k=E.b.neg().mul(L).divRound(this.n),g=R.mul(E.a),j=k.mul(P.a),_=R.mul(E.b),N=k.mul(P.b),B=L.sub(g).sub(j),c=_.add(N).neg();return{k1:B,k2:c}},A.prototype.pointFromX=function(L,F){if(L=new X(L,16),!L.red)L=L.toRed(this.red);var E=L.redSqr().redMul(L).redIAdd(L.redMul(this.a)).redIAdd(this.b),P=E.redSqrt();if(P.redSqr().redSub(E).cmp(this.zero)!==0)throw Error("invalid point");var R=P.fromRed().isOdd();if(F&&!R||!F&&R)P=P.redNeg();return this.point(L,P)},A.prototype.validate=function(L){if(L.inf)return!0;var{x:F,y:E}=L,P=this.a.redMul(F),R=F.redSqr().redMul(F).redIAdd(P).redIAdd(this.b);return E.redSqr().redISub(R).cmpn(0)===0},A.prototype._endoWnafMulAdd=function(L,F,E){var P=this._endoWnafT1,R=this._endoWnafT2;for(var k=0;k<L.length;k++){var g=this._endoSplit(F[k]),j=L[k],_=j._getBeta();if(g.k1.negative)g.k1.ineg(),j=j.neg(!0);if(g.k2.negative)g.k2.ineg(),_=_.neg(!0);P[k*2]=j,P[k*2+1]=_,R[k*2]=g.k1,R[k*2+1]=g.k2}var N=this._wnafMulAdd(1,P,R,k*2,E);for(var B=0;B<k*2;B++)P[B]=null,R[B]=null;return N};function T(L,F,E,P){if(Q.BasePoint.call(this,L,"affine"),F===null&&E===null)this.x=null,this.y=null,this.inf=!0;else{if(this.x=new X(F,16),this.y=new X(E,16),P)this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=!1}}U(T,Q.BasePoint),A.prototype.point=function(L,F,E){return new T(this,L,F,E)},A.prototype.pointFromJSON=function(L,F){return T.fromJSON(this,L,F)},T.prototype._getBeta=function(){if(!this.curve.endo)return;var L=this.precomputed;if(L&&L.beta)return L.beta;var F=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(L){var E=this.curve,P=function(R){return E.point(R.x.redMul(E.endo.beta),R.y)};L.beta=F,F.precomputed={beta:null,naf:L.naf&&{wnd:L.naf.wnd,points:L.naf.points.map(P)},doubles:L.doubles&&{step:L.doubles.step,points:L.doubles.points.map(P)}}}return F},T.prototype.toJSON=function(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]},T.fromJSON=function(L,F,E){if(typeof F==="string")F=JSON.parse(F);var P=L.point(F[0],F[1],E);if(!F[2])return P;function R(g){return L.point(g[0],g[1],E)}var k=F[2];return P.precomputed={beta:null,doubles:k.doubles&&{step:k.doubles.step,points:[P].concat(k.doubles.points.map(R))},naf:k.naf&&{wnd:k.naf.wnd,points:[P].concat(k.naf.points.map(R))}},P},T.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},T.prototype.isInfinity=function(){return this.inf},T.prototype.add=function(L){if(this.inf)return L;if(L.inf)return this;if(this.eq(L))return this.dbl();if(this.neg().eq(L))return this.curve.point(null,null);if(this.x.cmp(L.x)===0)return this.curve.point(null,null);var F=this.y.redSub(L.y);if(F.cmpn(0)!==0)F=F.redMul(this.x.redSub(L.x).redInvm());var E=F.redSqr().redISub(this.x).redISub(L.x),P=F.redMul(this.x.redSub(E)).redISub(this.y);return this.curve.point(E,P)},T.prototype.dbl=function(){if(this.inf)return this;var L=this.y.redAdd(this.y);if(L.cmpn(0)===0)return this.curve.point(null,null);var F=this.curve.a,E=this.x.redSqr(),P=L.redInvm(),R=E.redAdd(E).redIAdd(E).redIAdd(F).redMul(P),k=R.redSqr().redISub(this.x.redAdd(this.x)),g=R.redMul(this.x.redSub(k)).redISub(this.y);return this.curve.point(k,g)},T.prototype.getX=function(){return this.x.fromRed()},T.prototype.getY=function(){return this.y.fromRed()},T.prototype.mul=function(L){if(L=new X(L,16),this.isInfinity())return this;else if(this._hasDoubles(L))return this.curve._fixedNafMul(this,L);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[L]);else return this.curve._wnafMul(this,L)},T.prototype.mulAdd=function(L,F,E){var P=[this,F],R=[L,E];if(this.curve.endo)return this.curve._endoWnafMulAdd(P,R);else return this.curve._wnafMulAdd(1,P,R,2)},T.prototype.jmulAdd=function(L,F,E){var P=[this,F],R=[L,E];if(this.curve.endo)return this.curve._endoWnafMulAdd(P,R,!0);else return this.curve._wnafMulAdd(1,P,R,2,!0)},T.prototype.eq=function(L){return this===L||this.inf===L.inf&&(this.inf||this.x.cmp(L.x)===0&&this.y.cmp(L.y)===0)},T.prototype.neg=function(L){if(this.inf)return this;var F=this.curve.point(this.x,this.y.redNeg());if(L&&this.precomputed){var E=this.precomputed,P=function(R){return R.neg()};F.precomputed={naf:E.naf&&{wnd:E.naf.wnd,points:E.naf.points.map(P)},doubles:E.doubles&&{step:E.doubles.step,points:E.doubles.points.map(P)}}}return F},T.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var L=this.curve.jpoint(this.x,this.y,this.curve.one);return L};function Z(L,F,E,P){if(Q.BasePoint.call(this,L,"jacobian"),F===null&&E===null&&P===null)this.x=this.curve.one,this.y=this.curve.one,this.z=new X(0);else this.x=new X(F,16),this.y=new X(E,16),this.z=new X(P,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}U(Z,Q.BasePoint),A.prototype.jpoint=function(L,F,E){return new Z(this,L,F,E)},Z.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var L=this.z.redInvm(),F=L.redSqr(),E=this.x.redMul(F),P=this.y.redMul(F).redMul(L);return this.curve.point(E,P)},Z.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Z.prototype.add=function(L){if(this.isInfinity())return L;if(L.isInfinity())return this;var F=L.z.redSqr(),E=this.z.redSqr(),P=this.x.redMul(F),R=L.x.redMul(E),k=this.y.redMul(F.redMul(L.z)),g=L.y.redMul(E.redMul(this.z)),j=P.redSub(R),_=k.redSub(g);if(j.cmpn(0)===0)if(_.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var N=j.redSqr(),B=N.redMul(j),c=P.redMul(N),r=_.redSqr().redIAdd(B).redISub(c).redISub(c),J$=_.redMul(c.redISub(r)).redISub(k.redMul(B)),G$=this.z.redMul(L.z).redMul(j);return this.curve.jpoint(r,J$,G$)},Z.prototype.mixedAdd=function(L){if(this.isInfinity())return L.toJ();if(L.isInfinity())return this;var F=this.z.redSqr(),E=this.x,P=L.x.redMul(F),R=this.y,k=L.y.redMul(F).redMul(this.z),g=E.redSub(P),j=R.redSub(k);if(g.cmpn(0)===0)if(j.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var _=g.redSqr(),N=_.redMul(g),B=E.redMul(_),c=j.redSqr().redIAdd(N).redISub(B).redISub(B),r=j.redMul(B.redISub(c)).redISub(R.redMul(N)),J$=this.z.redMul(g);return this.curve.jpoint(c,r,J$)},Z.prototype.dblp=function(L){if(L===0)return this;if(this.isInfinity())return this;if(!L)return this.dbl();var F;if(this.curve.zeroA||this.curve.threeA){var E=this;for(F=0;F<L;F++)E=E.dbl();return E}var P=this.curve.a,R=this.curve.tinv,k=this.x,g=this.y,j=this.z,_=j.redSqr().redSqr(),N=g.redAdd(g);for(F=0;F<L;F++){var B=k.redSqr(),c=N.redSqr(),r=c.redSqr(),J$=B.redAdd(B).redIAdd(B).redIAdd(P.redMul(_)),G$=k.redMul(c),X$=J$.redSqr().redISub(G$.redAdd(G$)),p=G$.redISub(X$),I$=J$.redMul(p);I$=I$.redIAdd(I$).redISub(r);var v=N.redMul(j);if(F+1<L)_=_.redMul(r);k=X$,j=v,N=I$}return this.curve.jpoint(k,N.redMul(R),j)},Z.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()},Z.prototype._zeroDbl=function(){var L,F,E;if(this.zOne){var P=this.x.redSqr(),R=this.y.redSqr(),k=R.redSqr(),g=this.x.redAdd(R).redSqr().redISub(P).redISub(k);g=g.redIAdd(g);var j=P.redAdd(P).redIAdd(P),_=j.redSqr().redISub(g).redISub(g),N=k.redIAdd(k);N=N.redIAdd(N),N=N.redIAdd(N),L=_,F=j.redMul(g.redISub(_)).redISub(N),E=this.y.redAdd(this.y)}else{var B=this.x.redSqr(),c=this.y.redSqr(),r=c.redSqr(),J$=this.x.redAdd(c).redSqr().redISub(B).redISub(r);J$=J$.redIAdd(J$);var G$=B.redAdd(B).redIAdd(B),X$=G$.redSqr(),p=r.redIAdd(r);p=p.redIAdd(p),p=p.redIAdd(p),L=X$.redISub(J$).redISub(J$),F=G$.redMul(J$.redISub(L)).redISub(p),E=this.y.redMul(this.z),E=E.redIAdd(E)}return this.curve.jpoint(L,F,E)},Z.prototype._threeDbl=function(){var L,F,E;if(this.zOne){var P=this.x.redSqr(),R=this.y.redSqr(),k=R.redSqr(),g=this.x.redAdd(R).redSqr().redISub(P).redISub(k);g=g.redIAdd(g);var j=P.redAdd(P).redIAdd(P).redIAdd(this.curve.a),_=j.redSqr().redISub(g).redISub(g);L=_;var N=k.redIAdd(k);N=N.redIAdd(N),N=N.redIAdd(N),F=j.redMul(g.redISub(_)).redISub(N),E=this.y.redAdd(this.y)}else{var B=this.z.redSqr(),c=this.y.redSqr(),r=this.x.redMul(c),J$=this.x.redSub(B).redMul(this.x.redAdd(B));J$=J$.redAdd(J$).redIAdd(J$);var G$=r.redIAdd(r);G$=G$.redIAdd(G$);var X$=G$.redAdd(G$);L=J$.redSqr().redISub(X$),E=this.y.redAdd(this.z).redSqr().redISub(c).redISub(B);var p=c.redSqr();p=p.redIAdd(p),p=p.redIAdd(p),p=p.redIAdd(p),F=J$.redMul(G$.redISub(L)).redISub(p)}return this.curve.jpoint(L,F,E)},Z.prototype._dbl=function(){var L=this.curve.a,F=this.x,E=this.y,P=this.z,R=P.redSqr().redSqr(),k=F.redSqr(),g=E.redSqr(),j=k.redAdd(k).redIAdd(k).redIAdd(L.redMul(R)),_=F.redAdd(F);_=_.redIAdd(_);var N=_.redMul(g),B=j.redSqr().redISub(N.redAdd(N)),c=N.redISub(B),r=g.redSqr();r=r.redIAdd(r),r=r.redIAdd(r),r=r.redIAdd(r);var J$=j.redMul(c).redISub(r),G$=E.redAdd(E).redMul(P);return this.curve.jpoint(B,J$,G$)},Z.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var L=this.x.redSqr(),F=this.y.redSqr(),E=this.z.redSqr(),P=F.redSqr(),R=L.redAdd(L).redIAdd(L),k=R.redSqr(),g=this.x.redAdd(F).redSqr().redISub(L).redISub(P);g=g.redIAdd(g),g=g.redAdd(g).redIAdd(g),g=g.redISub(k);var j=g.redSqr(),_=P.redIAdd(P);_=_.redIAdd(_),_=_.redIAdd(_),_=_.redIAdd(_);var N=R.redIAdd(g).redSqr().redISub(k).redISub(j).redISub(_),B=F.redMul(N);B=B.redIAdd(B),B=B.redIAdd(B);var c=this.x.redMul(j).redISub(B);c=c.redIAdd(c),c=c.redIAdd(c);var r=this.y.redMul(N.redMul(_.redISub(N)).redISub(g.redMul(j)));r=r.redIAdd(r),r=r.redIAdd(r),r=r.redIAdd(r);var J$=this.z.redAdd(g).redSqr().redISub(E).redISub(j);return this.curve.jpoint(c,r,J$)},Z.prototype.mul=function(L,F){return L=new X(L,F),this.curve._wnafMul(this,L)},Z.prototype.eq=function(L){if(L.type==="affine")return this.eq(L.toJ());if(this===L)return!0;var F=this.z.redSqr(),E=L.z.redSqr();if(this.x.redMul(E).redISub(L.x.redMul(F)).cmpn(0)!==0)return!1;var P=F.redMul(this.z),R=E.redMul(L.z);return this.y.redMul(R).redISub(L.y.redMul(P)).cmpn(0)===0},Z.prototype.eqXToP=function(L){var F=this.z.redSqr(),E=L.toRed(this.curve.red).redMul(F);if(this.x.cmp(E)===0)return!0;var P=L.clone(),R=this.curve.redN.redMul(F);for(;;){if(P.iadd(this.curve.n),P.cmp(this.curve.p)>=0)return!1;if(E.redIAdd(R),this.x.cmp(E)===0)return!0}},Z.prototype.inspect=function(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},Z.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),VF=Y$(($,I)=>{var D=TU(),X=s0(),U=k4(),Q=vU();function J(T){U.call(this,"mont",T),this.a=new D(T.a,16).toRed(this.red),this.b=new D(T.b,16).toRed(this.red),this.i4=new D(4).toRed(this.red).redInvm(),this.two=new D(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}X(J,U),I.exports=J,J.prototype.validate=function(T){var Z=T.normalize().x,L=Z.redSqr(),F=L.redMul(Z).redAdd(L.redMul(this.a)).redAdd(Z),E=F.redSqrt();return E.redSqr().cmp(F)===0};function A(T,Z,L){if(U.BasePoint.call(this,T,"projective"),Z===null&&L===null)this.x=this.curve.one,this.z=this.curve.zero;else{if(this.x=new D(Z,16),this.z=new D(L,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}X(A,U.BasePoint),J.prototype.decodePoint=function(T,Z){return this.point(Q.toArray(T,Z),1)},J.prototype.point=function(T,Z){return new A(this,T,Z)},J.prototype.pointFromJSON=function(T){return A.fromJSON(this,T)},A.prototype.precompute=function(){},A.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},A.fromJSON=function(T,Z){return new A(T,Z[0],Z[1]||T.one)},A.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},A.prototype.isInfinity=function(){return this.z.cmpn(0)===0},A.prototype.dbl=function(){var T=this.x.redAdd(this.z),Z=T.redSqr(),L=this.x.redSub(this.z),F=L.redSqr(),E=Z.redSub(F),P=Z.redMul(F),R=E.redMul(F.redAdd(this.curve.a24.redMul(E)));return this.curve.point(P,R)},A.prototype.add=function(){throw Error("Not supported on Montgomery curve")},A.prototype.diffAdd=function(T,Z){var L=this.x.redAdd(this.z),F=this.x.redSub(this.z),E=T.x.redAdd(T.z),P=T.x.redSub(T.z),R=P.redMul(L),k=E.redMul(F),g=Z.z.redMul(R.redAdd(k).redSqr()),j=Z.x.redMul(R.redISub(k).redSqr());return this.curve.point(g,j)},A.prototype.mul=function(T){var Z=T.clone(),L=this,F=this.curve.point(null,null),E=this;for(var P=[];Z.cmpn(0)!==0;Z.iushrn(1))P.push(Z.andln(1));for(var R=P.length-1;R>=0;R--)if(P[R]===0)L=L.diffAdd(F,E),F=F.dbl();else F=L.diffAdd(F,E),L=L.dbl();return F},A.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},A.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},A.prototype.eq=function(T){return this.getX().cmp(T.getX())===0},A.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},A.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),WF=Y$(($,I)=>{var D=vU(),X=TU(),U=s0(),Q=k4(),J=D.assert;function A(Z){this.twisted=(Z.a|0)!==1,this.mOneA=this.twisted&&(Z.a|0)===-1,this.extended=this.mOneA,Q.call(this,"edwards",Z),this.a=new X(Z.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new X(Z.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new X(Z.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),J(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(Z.c|0)===1}U(A,Q),I.exports=A,A.prototype._mulA=function(Z){if(this.mOneA)return Z.redNeg();else return this.a.redMul(Z)},A.prototype._mulC=function(Z){if(this.oneC)return Z;else return this.c.redMul(Z)},A.prototype.jpoint=function(Z,L,F,E){return this.point(Z,L,F,E)},A.prototype.pointFromX=function(Z,L){if(Z=new X(Z,16),!Z.red)Z=Z.toRed(this.red);var F=Z.redSqr(),E=this.c2.redSub(this.a.redMul(F)),P=this.one.redSub(this.c2.redMul(this.d).redMul(F)),R=E.redMul(P.redInvm()),k=R.redSqrt();if(k.redSqr().redSub(R).cmp(this.zero)!==0)throw Error("invalid point");var g=k.fromRed().isOdd();if(L&&!g||!L&&g)k=k.redNeg();return this.point(Z,k)},A.prototype.pointFromY=function(Z,L){if(Z=new X(Z,16),!Z.red)Z=Z.toRed(this.red);var F=Z.redSqr(),E=F.redSub(this.c2),P=F.redMul(this.d).redMul(this.c2).redSub(this.a),R=E.redMul(P.redInvm());if(R.cmp(this.zero)===0)if(L)throw Error("invalid point");else return this.point(this.zero,Z);var k=R.redSqrt();if(k.redSqr().redSub(R).cmp(this.zero)!==0)throw Error("invalid point");if(k.fromRed().isOdd()!==L)k=k.redNeg();return this.point(k,Z)},A.prototype.validate=function(Z){if(Z.isInfinity())return!0;Z.normalize();var L=Z.x.redSqr(),F=Z.y.redSqr(),E=L.redMul(this.a).redAdd(F),P=this.c2.redMul(this.one.redAdd(this.d.redMul(L).redMul(F)));return E.cmp(P)===0};function T(Z,L,F,E,P){if(Q.BasePoint.call(this,Z,"projective"),L===null&&F===null&&E===null)this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0;else{if(this.x=new X(L,16),this.y=new X(F,16),this.z=E?new X(E,16):this.curve.one,this.t=P&&new X(P,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);if(this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t){if(this.t=this.x.redMul(this.y),!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}U(T,Q.BasePoint),A.prototype.pointFromJSON=function(Z){return T.fromJSON(this,Z)},A.prototype.point=function(Z,L,F,E){return new T(this,Z,L,F,E)},T.fromJSON=function(Z,L){return new T(Z,L[0],L[1],L[2])},T.prototype.inspect=function(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},T.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},T.prototype._extDbl=function(){var Z=this.x.redSqr(),L=this.y.redSqr(),F=this.z.redSqr();F=F.redIAdd(F);var E=this.curve._mulA(Z),P=this.x.redAdd(this.y).redSqr().redISub(Z).redISub(L),R=E.redAdd(L),k=R.redSub(F),g=E.redSub(L),j=P.redMul(k),_=R.redMul(g),N=P.redMul(g),B=k.redMul(R);return this.curve.point(j,_,B,N)},T.prototype._projDbl=function(){var Z=this.x.redAdd(this.y).redSqr(),L=this.x.redSqr(),F=this.y.redSqr(),E,P,R,k,g,j;if(this.curve.twisted){k=this.curve._mulA(L);var _=k.redAdd(F);if(this.zOne)E=Z.redSub(L).redSub(F).redMul(_.redSub(this.curve.two)),P=_.redMul(k.redSub(F)),R=_.redSqr().redSub(_).redSub(_);else g=this.z.redSqr(),j=_.redSub(g).redISub(g),E=Z.redSub(L).redISub(F).redMul(j),P=_.redMul(k.redSub(F)),R=_.redMul(j)}else k=L.redAdd(F),g=this.curve._mulC(this.z).redSqr(),j=k.redSub(g).redSub(g),E=this.curve._mulC(Z.redISub(k)).redMul(j),P=this.curve._mulC(k).redMul(L.redISub(F)),R=k.redMul(j);return this.curve.point(E,P,R)},T.prototype.dbl=function(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()},T.prototype._extAdd=function(Z){var L=this.y.redSub(this.x).redMul(Z.y.redSub(Z.x)),F=this.y.redAdd(this.x).redMul(Z.y.redAdd(Z.x)),E=this.t.redMul(this.curve.dd).redMul(Z.t),P=this.z.redMul(Z.z.redAdd(Z.z)),R=F.redSub(L),k=P.redSub(E),g=P.redAdd(E),j=F.redAdd(L),_=R.redMul(k),N=g.redMul(j),B=R.redMul(j),c=k.redMul(g);return this.curve.point(_,N,c,B)},T.prototype._projAdd=function(Z){var L=this.z.redMul(Z.z),F=L.redSqr(),E=this.x.redMul(Z.x),P=this.y.redMul(Z.y),R=this.curve.d.redMul(E).redMul(P),k=F.redSub(R),g=F.redAdd(R),j=this.x.redAdd(this.y).redMul(Z.x.redAdd(Z.y)).redISub(E).redISub(P),_=L.redMul(k).redMul(j),N,B;if(this.curve.twisted)N=L.redMul(g).redMul(P.redSub(this.curve._mulA(E))),B=k.redMul(g);else N=L.redMul(g).redMul(P.redSub(E)),B=this.curve._mulC(k).redMul(g);return this.curve.point(_,N,B)},T.prototype.add=function(Z){if(this.isInfinity())return Z;if(Z.isInfinity())return this;if(this.curve.extended)return this._extAdd(Z);else return this._projAdd(Z)},T.prototype.mul=function(Z){if(this._hasDoubles(Z))return this.curve._fixedNafMul(this,Z);else return this.curve._wnafMul(this,Z)},T.prototype.mulAdd=function(Z,L,F){return this.curve._wnafMulAdd(1,[this,L],[Z,F],2,!1)},T.prototype.jmulAdd=function(Z,L,F){return this.curve._wnafMulAdd(1,[this,L],[Z,F],2,!0)},T.prototype.normalize=function(){if(this.zOne)return this;var Z=this.z.redInvm();if(this.x=this.x.redMul(Z),this.y=this.y.redMul(Z),this.t)this.t=this.t.redMul(Z);return this.z=this.curve.one,this.zOne=!0,this},T.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},T.prototype.getX=function(){return this.normalize(),this.x.fromRed()},T.prototype.getY=function(){return this.normalize(),this.y.fromRed()},T.prototype.eq=function(Z){return this===Z||this.getX().cmp(Z.getX())===0&&this.getY().cmp(Z.getY())===0},T.prototype.eqXToP=function(Z){var L=Z.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(L)===0)return!0;var F=Z.clone(),E=this.curve.redN.redMul(this.z);for(;;){if(F.iadd(this.curve.n),F.cmp(this.curve.p)>=0)return!1;if(L.redIAdd(E),this.x.cmp(L)===0)return!0}},T.prototype.toP=T.prototype.normalize,T.prototype.mixedAdd=T.prototype.add}),fW=Y$(($)=>{var I=$;I.base=k4(),I.short=GF(),I.mont=VF(),I.edwards=WF()}),zU=Y$(($)=>{var I=fU(),D=s0();$.inherits=D;function X(G,W){if((G.charCodeAt(W)&64512)!==55296)return!1;if(W<0||W+1>=G.length)return!1;return(G.charCodeAt(W+1)&64512)===56320}function U(G,W){if(Array.isArray(G))return G.slice();if(!G)return[];var Y=[];if(typeof G==="string"){if(!W){var V=0;for(var S=0;S<G.length;S++){var H=G.charCodeAt(S);if(H<128)Y[V++]=H;else if(H<2048)Y[V++]=H>>6|192,Y[V++]=H&63|128;else if(X(G,S))H=65536+((H&1023)<<10)+(G.charCodeAt(++S)&1023),Y[V++]=H>>18|240,Y[V++]=H>>12&63|128,Y[V++]=H>>6&63|128,Y[V++]=H&63|128;else Y[V++]=H>>12|224,Y[V++]=H>>6&63|128,Y[V++]=H&63|128}}else if(W==="hex"){if(G=G.replace(/[^a-z0-9]+/ig,""),G.length%2!==0)G="0"+G;for(S=0;S<G.length;S+=2)Y.push(parseInt(G[S]+G[S+1],16))}}else for(S=0;S<G.length;S++)Y[S]=G[S]|0;return Y}$.toArray=U;function Q(G){var W="";for(var Y=0;Y<G.length;Y++)W+=T(G[Y].toString(16));return W}$.toHex=Q;function J(G){var W=G>>>24|G>>>8&65280|G<<8&16711680|(G&255)<<24;return W>>>0}$.htonl=J;function A(G,W){var Y="";for(var V=0;V<G.length;V++){var S=G[V];if(W==="little")S=J(S);Y+=Z(S.toString(16))}return Y}$.toHex32=A;function T(G){if(G.length===1)return"0"+G;else return G}$.zero2=T;function Z(G){if(G.length===7)return"0"+G;else if(G.length===6)return"00"+G;else if(G.length===5)return"000"+G;else if(G.length===4)return"0000"+G;else if(G.length===3)return"00000"+G;else if(G.length===2)return"000000"+G;else if(G.length===1)return"0000000"+G;else return G}$.zero8=Z;function L(G,W,Y,V){var S=Y-W;I(S%4===0);var H=Array(S/4);for(var K=0,O=W;K<H.length;K++,O+=4){var z;if(V==="big")z=G[O]<<24|G[O+1]<<16|G[O+2]<<8|G[O+3];else z=G[O+3]<<24|G[O+2]<<16|G[O+1]<<8|G[O];H[K]=z>>>0}return H}$.join32=L;function F(G,W){var Y=Array(G.length*4);for(var V=0,S=0;V<G.length;V++,S+=4){var H=G[V];if(W==="big")Y[S]=H>>>24,Y[S+1]=H>>>16&255,Y[S+2]=H>>>8&255,Y[S+3]=H&255;else Y[S+3]=H>>>24,Y[S+2]=H>>>16&255,Y[S+1]=H>>>8&255,Y[S]=H&255}return Y}$.split32=F;function E(G,W){return G>>>W|G<<32-W}$.rotr32=E;function P(G,W){return G<<W|G>>>32-W}$.rotl32=P;function R(G,W){return G+W>>>0}$.sum32=R;function k(G,W,Y){return G+W+Y>>>0}$.sum32_3=k;function g(G,W,Y,V){return G+W+Y+V>>>0}$.sum32_4=g;function j(G,W,Y,V,S){return G+W+Y+V+S>>>0}$.sum32_5=j;function _(G,W,Y,V){var S=G[W],H=G[W+1],K=V+H>>>0,O=(K<V?1:0)+Y+S;G[W]=O>>>0,G[W+1]=K}$.sum64=_;function N(G,W,Y,V){var S=W+V>>>0,H=(S<W?1:0)+G+Y;return H>>>0}$.sum64_hi=N;function B(G,W,Y,V){var S=W+V;return S>>>0}$.sum64_lo=B;function c(G,W,Y,V,S,H,K,O){var z=0,q=W;q=q+V>>>0,z+=q<W?1:0,q=q+H>>>0,z+=q<H?1:0,q=q+O>>>0,z+=q<O?1:0;var M=G+Y+S+K+z;return M>>>0}$.sum64_4_hi=c;function r(G,W,Y,V,S,H,K,O){var z=W+V+H+O;return z>>>0}$.sum64_4_lo=r;function J$(G,W,Y,V,S,H,K,O,z,q){var M=0,C=W;C=C+V>>>0,M+=C<W?1:0,C=C+H>>>0,M+=C<H?1:0,C=C+O>>>0,M+=C<O?1:0,C=C+q>>>0,M+=C<q?1:0;var w=G+Y+S+K+z+M;return w>>>0}$.sum64_5_hi=J$;function G$(G,W,Y,V,S,H,K,O,z,q){var M=W+V+H+O+q;return M>>>0}$.sum64_5_lo=G$;function X$(G,W,Y){var V=W<<32-Y|G>>>Y;return V>>>0}$.rotr64_hi=X$;function p(G,W,Y){var V=G<<32-Y|W>>>Y;return V>>>0}$.rotr64_lo=p;function I$(G,W,Y){return G>>>Y}$.shr64_hi=I$;function v(G,W,Y){var V=G<<32-Y|W>>>Y;return V>>>0}$.shr64_lo=v}),g6=Y$(($)=>{var I=zU(),D=fU();function X(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}$.BlockHash=X,X.prototype.update=function(U,Q){if(U=I.toArray(U,Q),!this.pending)this.pending=U;else this.pending=this.pending.concat(U);if(this.pendingTotal+=U.length,this.pending.length>=this._delta8){U=this.pending;var J=U.length%this._delta8;if(this.pending=U.slice(U.length-J,U.length),this.pending.length===0)this.pending=null;U=I.join32(U,0,U.length-J,this.endian);for(var A=0;A<U.length;A+=this._delta32)this._update(U,A,A+this._delta32)}return this},X.prototype.digest=function(U){return this.update(this._pad()),D(this.pending===null),this._digest(U)},X.prototype._pad=function(){var U=this.pendingTotal,Q=this._delta8,J=Q-(U+this.padLength)%Q,A=Array(J+this.padLength);A[0]=128;for(var T=1;T<J;T++)A[T]=0;if(U<<=3,this.endian==="big"){for(var Z=8;Z<this.padLength;Z++)A[T++]=0;A[T++]=0,A[T++]=0,A[T++]=0,A[T++]=0,A[T++]=U>>>24&255,A[T++]=U>>>16&255,A[T++]=U>>>8&255,A[T++]=U&255}else{A[T++]=U&255,A[T++]=U>>>8&255,A[T++]=U>>>16&255,A[T++]=U>>>24&255,A[T++]=0,A[T++]=0,A[T++]=0,A[T++]=0;for(Z=8;Z<this.padLength;Z++)A[T++]=0}return A}}),yW=Y$(($)=>{var I=zU(),D=I.rotr32;function X(F,E,P,R){if(F===0)return U(E,P,R);if(F===1||F===3)return J(E,P,R);if(F===2)return Q(E,P,R)}$.ft_1=X;function U(F,E,P){return F&E^~F&P}$.ch32=U;function Q(F,E,P){return F&E^F&P^E&P}$.maj32=Q;function J(F,E,P){return F^E^P}$.p32=J;function A(F){return D(F,2)^D(F,13)^D(F,22)}$.s0_256=A;function T(F){return D(F,6)^D(F,11)^D(F,25)}$.s1_256=T;function Z(F){return D(F,7)^D(F,18)^F>>>3}$.g0_256=Z;function L(F){return D(F,17)^D(F,19)^F>>>10}$.g1_256=L}),KF=Y$(($,I)=>{var D=zU(),X=g6(),U=yW(),Q=D.rotl32,J=D.sum32,A=D.sum32_5,T=U.ft_1,Z=X.BlockHash,L=[1518500249,1859775393,2400959708,3395469782];function F(){if(!(this instanceof F))return new F;Z.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}D.inherits(F,Z),I.exports=F,F.blockSize=512,F.outSize=160,F.hmacStrength=80,F.padLength=64,F.prototype._update=function(E,P){var R=this.W;for(var k=0;k<16;k++)R[k]=E[P+k];for(;k<R.length;k++)R[k]=Q(R[k-3]^R[k-8]^R[k-14]^R[k-16],1);var g=this.h[0],j=this.h[1],_=this.h[2],N=this.h[3],B=this.h[4];for(k=0;k<R.length;k++){var c=~~(k/20),r=A(Q(g,5),T(c,j,_,N),B,R[k],L[c]);B=N,N=_,_=Q(j,30),j=g,g=r}this.h[0]=J(this.h[0],g),this.h[1]=J(this.h[1],j),this.h[2]=J(this.h[2],_),this.h[3]=J(this.h[3],N),this.h[4]=J(this.h[4],B)},F.prototype._digest=function(E){if(E==="hex")return D.toHex32(this.h,"big");else return D.split32(this.h,"big")}}),uW=Y$(($,I)=>{var D=zU(),X=g6(),U=yW(),Q=fU(),J=D.sum32,A=D.sum32_4,T=D.sum32_5,Z=U.ch32,L=U.maj32,F=U.s0_256,E=U.s1_256,P=U.g0_256,R=U.g1_256,k=X.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function j(){if(!(this instanceof j))return new j;k.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=Array(64)}D.inherits(j,k),I.exports=j,j.blockSize=512,j.outSize=256,j.hmacStrength=192,j.padLength=64,j.prototype._update=function(_,N){var B=this.W;for(var c=0;c<16;c++)B[c]=_[N+c];for(;c<B.length;c++)B[c]=A(R(B[c-2]),B[c-7],P(B[c-15]),B[c-16]);var r=this.h[0],J$=this.h[1],G$=this.h[2],X$=this.h[3],p=this.h[4],I$=this.h[5],v=this.h[6],G=this.h[7];Q(this.k.length===B.length);for(c=0;c<B.length;c++){var W=T(G,E(p),Z(p,I$,v),this.k[c],B[c]),Y=J(F(r),L(r,J$,G$));G=v,v=I$,I$=p,p=J(X$,W),X$=G$,G$=J$,J$=r,r=J(W,Y)}this.h[0]=J(this.h[0],r),this.h[1]=J(this.h[1],J$),this.h[2]=J(this.h[2],G$),this.h[3]=J(this.h[3],X$),this.h[4]=J(this.h[4],p),this.h[5]=J(this.h[5],I$),this.h[6]=J(this.h[6],v),this.h[7]=J(this.h[7],G)},j.prototype._digest=function(_){if(_==="hex")return D.toHex32(this.h,"big");else return D.split32(this.h,"big")}}),zF=Y$(($,I)=>{var D=zU(),X=uW();function U(){if(!(this instanceof U))return new U;X.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}D.inherits(U,X),I.exports=U,U.blockSize=512,U.outSize=224,U.hmacStrength=192,U.padLength=64,U.prototype._digest=function(Q){if(Q==="hex")return D.toHex32(this.h.slice(0,7),"big");else return D.split32(this.h.slice(0,7),"big")}}),hW=Y$(($,I)=>{var D=zU(),X=g6(),U=fU(),Q=D.rotr64_hi,J=D.rotr64_lo,A=D.shr64_hi,T=D.shr64_lo,Z=D.sum64,L=D.sum64_hi,F=D.sum64_lo,E=D.sum64_4_hi,P=D.sum64_4_lo,R=D.sum64_5_hi,k=D.sum64_5_lo,g=X.BlockHash,j=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function _(){if(!(this instanceof _))return new _;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=j,this.W=Array(160)}D.inherits(_,g),I.exports=_,_.blockSize=1024,_.outSize=512,_.hmacStrength=192,_.padLength=128,_.prototype._prepareBlock=function(Y,V){var S=this.W;for(var H=0;H<32;H++)S[H]=Y[V+H];for(;H<S.length;H+=2){var K=G(S[H-4],S[H-3]),O=W(S[H-4],S[H-3]),z=S[H-14],q=S[H-13],M=I$(S[H-30],S[H-29]),C=v(S[H-30],S[H-29]),w=S[H-32],u=S[H-31];S[H]=E(K,O,z,q,M,C,w,u),S[H+1]=P(K,O,z,q,M,C,w,u)}},_.prototype._update=function(Y,V){this._prepareBlock(Y,V);var S=this.W,H=this.h[0],K=this.h[1],O=this.h[2],z=this.h[3],q=this.h[4],M=this.h[5],C=this.h[6],w=this.h[7],u=this.h[8],n=this.h[9],W$=this.h[10],i=this.h[11],b=this.h[12],D$=this.h[13],d=this.h[14],s=this.h[15];U(this.k.length===S.length);for(var h$=0;h$<S.length;h$+=2){var f=d,h=s,O$=X$(u,n),t=p(u,n),a=N(u,n,W$,i,b,D$),T$=B(u,n,W$,i,b,D$),y=this.k[h$],o=this.k[h$+1],w$=S[h$],m=S[h$+1],v$=R(f,h,O$,t,a,T$,y,o,w$,m),r$=k(f,h,O$,t,a,T$,y,o,w$,m);f=J$(H,K),h=G$(H,K),O$=c(H,K,O,z,q,M),t=r(H,K,O,z,q,M);var S$=L(f,h,O$,t),A$=F(f,h,O$,t);d=b,s=D$,b=W$,D$=i,W$=u,i=n,u=L(C,w,v$,r$),n=F(w,w,v$,r$),C=q,w=M,q=O,M=z,O=H,z=K,H=L(v$,r$,S$,A$),K=F(v$,r$,S$,A$)}Z(this.h,0,H,K),Z(this.h,2,O,z),Z(this.h,4,q,M),Z(this.h,6,C,w),Z(this.h,8,u,n),Z(this.h,10,W$,i),Z(this.h,12,b,D$),Z(this.h,14,d,s)},_.prototype._digest=function(Y){if(Y==="hex")return D.toHex32(this.h,"big");else return D.split32(this.h,"big")};function N(Y,V,S,H,K){var O=Y&S^~Y&K;if(O<0)O+=4294967296;return O}function B(Y,V,S,H,K,O){var z=V&H^~V&O;if(z<0)z+=4294967296;return z}function c(Y,V,S,H,K){var O=Y&S^Y&K^S&K;if(O<0)O+=4294967296;return O}function r(Y,V,S,H,K,O){var z=V&H^V&O^H&O;if(z<0)z+=4294967296;return z}function J$(Y,V){var S=Q(Y,V,28),H=Q(V,Y,2),K=Q(V,Y,7),O=S^H^K;if(O<0)O+=4294967296;return O}function G$(Y,V){var S=J(Y,V,28),H=J(V,Y,2),K=J(V,Y,7),O=S^H^K;if(O<0)O+=4294967296;return O}function X$(Y,V){var S=Q(Y,V,14),H=Q(Y,V,18),K=Q(V,Y,9),O=S^H^K;if(O<0)O+=4294967296;return O}function p(Y,V){var S=J(Y,V,14),H=J(Y,V,18),K=J(V,Y,9),O=S^H^K;if(O<0)O+=4294967296;return O}function I$(Y,V){var S=Q(Y,V,1),H=Q(Y,V,8),K=A(Y,V,7),O=S^H^K;if(O<0)O+=4294967296;return O}function v(Y,V){var S=J(Y,V,1),H=J(Y,V,8),K=T(Y,V,7),O=S^H^K;if(O<0)O+=4294967296;return O}function G(Y,V){var S=Q(Y,V,19),H=Q(V,Y,29),K=A(Y,V,6),O=S^H^K;if(O<0)O+=4294967296;return O}function W(Y,V){var S=J(Y,V,19),H=J(V,Y,29),K=T(Y,V,6),O=S^H^K;if(O<0)O+=4294967296;return O}}),SF=Y$(($,I)=>{var D=zU(),X=hW();function U(){if(!(this instanceof U))return new U;X.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}D.inherits(U,X),I.exports=U,U.blockSize=1024,U.outSize=384,U.hmacStrength=192,U.padLength=128,U.prototype._digest=function(Q){if(Q==="hex")return D.toHex32(this.h.slice(0,12),"big");else return D.split32(this.h.slice(0,12),"big")}}),AF=Y$(($)=>{$.sha1=KF(),$.sha224=zF(),$.sha256=uW(),$.sha384=SF(),$.sha512=hW()}),FF=Y$(($)=>{var I=zU(),D=g6(),X=I.rotl32,U=I.sum32,Q=I.sum32_3,J=I.sum32_4,A=D.BlockHash;function T(){if(!(this instanceof T))return new T;A.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}I.inherits(T,A),$.ripemd160=T,T.blockSize=512,T.outSize=160,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(g,j){var _=this.h[0],N=this.h[1],B=this.h[2],c=this.h[3],r=this.h[4],J$=_,G$=N,X$=B,p=c,I$=r;for(var v=0;v<80;v++){var G=U(X(J(_,Z(v,N,B,c),g[E[v]+j],L(v)),R[v]),r);_=r,r=c,c=X(B,10),B=N,N=G,G=U(X(J(J$,Z(79-v,G$,X$,p),g[P[v]+j],F(v)),k[v]),I$),J$=I$,I$=p,p=X(X$,10),X$=G$,G$=G}G=Q(this.h[1],B,p),this.h[1]=Q(this.h[2],c,I$),this.h[2]=Q(this.h[3],r,J$),this.h[3]=Q(this.h[4],_,G$),this.h[4]=Q(this.h[0],N,X$),this.h[0]=G},T.prototype._digest=function(g){if(g==="hex")return I.toHex32(this.h,"little");else return I.split32(this.h,"little")};function Z(g,j,_,N){if(g<=15)return j^_^N;else if(g<=31)return j&_|~j&N;else if(g<=47)return(j|~_)^N;else if(g<=63)return j&N|_&~N;else return j^(_|~N)}function L(g){if(g<=15)return 0;else if(g<=31)return 1518500249;else if(g<=47)return 1859775393;else if(g<=63)return 2400959708;else return 2840853838}function F(g){if(g<=15)return 1352829926;else if(g<=31)return 1548603684;else if(g<=47)return 1836072691;else if(g<=63)return 2053994217;else return 0}var E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],P=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],R=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],k=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}),HF=Y$(($,I)=>{var D=zU(),X=fU();function U(Q,J,A){if(!(this instanceof U))return new U(Q,J,A);this.Hash=Q,this.blockSize=Q.blockSize/8,this.outSize=Q.outSize/8,this.inner=null,this.outer=null,this._init(D.toArray(J,A))}I.exports=U,U.prototype._init=function(Q){if(Q.length>this.blockSize)Q=new this.Hash().update(Q).digest();X(Q.length<=this.blockSize);for(var J=Q.length;J<this.blockSize;J++)Q.push(0);for(J=0;J<Q.length;J++)Q[J]^=54;this.inner=new this.Hash().update(Q);for(J=0;J<Q.length;J++)Q[J]^=106;this.outer=new this.Hash().update(Q)},U.prototype.update=function(Q,J){return this.inner.update(Q,J),this},U.prototype.digest=function(Q){return this.outer.update(this.inner.digest()),this.outer.digest(Q)}}),XY=Y$(($)=>{var I=$;I.utils=zU(),I.common=g6(),I.sha=AF(),I.ripemd=FF(),I.hmac=HF(),I.sha1=I.sha.sha1,I.sha256=I.sha.sha256,I.sha224=I.sha.sha224,I.sha384=I.sha.sha384,I.sha512=I.sha.sha512,I.ripemd160=I.ripemd.ripemd160}),ZF=Y$(($,I)=>{I.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}),QY=Y$(($)=>{var I=$,D=XY(),X=fW(),U=vU(),Q=U.assert;function J(Z){if(Z.type==="short")this.curve=new X.short(Z);else if(Z.type==="edwards")this.curve=new X.edwards(Z);else this.curve=new X.mont(Z);this.g=this.curve.g,this.n=this.curve.n,this.hash=Z.hash,Q(this.g.validate(),"Invalid curve"),Q(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}I.PresetCurve=J;function A(Z,L){Object.defineProperty(I,Z,{configurable:!0,enumerable:!0,get:function(){var F=new J(L);return Object.defineProperty(I,Z,{configurable:!0,enumerable:!0,value:F}),F}})}A("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:D.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),A("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:D.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),A("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:D.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),A("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:D.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),A("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:D.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),A("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:D.sha256,gRed:!1,g:["9"]}),A("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:D.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var T;try{T=ZF()}catch(Z){T=void 0}A("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:D.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",T]})}),LF=Y$(($,I)=>{var D=XY(),X=wW(),U=fU();function Q(J){if(!(this instanceof Q))return new Q(J);this.hash=J.hash,this.predResist=!!J.predResist,this.outLen=this.hash.outSize,this.minEntropy=J.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var A=X.toArray(J.entropy,J.entropyEnc||"hex"),T=X.toArray(J.nonce,J.nonceEnc||"hex"),Z=X.toArray(J.pers,J.persEnc||"hex");U(A.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(A,T,Z)}I.exports=Q,Q.prototype._init=function(J,A,T){var Z=J.concat(A).concat(T);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var L=0;L<this.V.length;L++)this.K[L]=0,this.V[L]=1;this._update(Z),this._reseed=1,this.reseedInterval=281474976710656},Q.prototype._hmac=function(){return new D.hmac(this.hash,this.K)},Q.prototype._update=function(J){var A=this._hmac().update(this.V).update([0]);if(J)A=A.update(J);if(this.K=A.digest(),this.V=this._hmac().update(this.V).digest(),!J)return;this.K=this._hmac().update(this.V).update([1]).update(J).digest(),this.V=this._hmac().update(this.V).digest()},Q.prototype.reseed=function(J,A,T,Z){if(typeof A!=="string")Z=T,T=A,A=null;J=X.toArray(J,A),T=X.toArray(T,Z),U(J.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(J.concat(T||[])),this._reseed=1},Q.prototype.generate=function(J,A,T,Z){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");if(typeof A!=="string")Z=T,T=A,A=null;if(T)T=X.toArray(T,Z||"hex"),this._update(T);var L=[];while(L.length<J)this.V=this._hmac().update(this.V).digest(),L=L.concat(this.V);var F=L.slice(0,J);return this._update(T),this._reseed++,X.encode(F,A)}}),EF=Y$(($,I)=>{var D=TU(),X=vU(),U=X.assert;function Q(J,A){if(this.ec=J,this.priv=null,this.pub=null,A.priv)this._importPrivate(A.priv,A.privEnc);if(A.pub)this._importPublic(A.pub,A.pubEnc)}I.exports=Q,Q.fromPublic=function(J,A,T){if(A instanceof Q)return A;return new Q(J,{pub:A,pubEnc:T})},Q.fromPrivate=function(J,A,T){if(A instanceof Q)return A;return new Q(J,{priv:A,privEnc:T})},Q.prototype.validate=function(){var J=this.getPublic();if(J.isInfinity())return{result:!1,reason:"Invalid public key"};if(!J.validate())return{result:!1,reason:"Public key is not a point"};if(!J.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:"Public key * N != O"};return{result:!0,reason:null}},Q.prototype.getPublic=function(J,A){if(typeof J==="string")A=J,J=null;if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!A)return this.pub;return this.pub.encode(A,J)},Q.prototype.getPrivate=function(J){if(J==="hex")return this.priv.toString(16,2);else return this.priv},Q.prototype._importPrivate=function(J,A){this.priv=new D(J,A||16),this.priv=this.priv.umod(this.ec.curve.n)},Q.prototype._importPublic=function(J,A){if(J.x||J.y){if(this.ec.curve.type==="mont")U(J.x,"Need x coordinate");else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")U(J.x&&J.y,"Need both x and y coordinate");this.pub=this.ec.curve.point(J.x,J.y);return}this.pub=this.ec.curve.decodePoint(J,A)},Q.prototype.derive=function(J){if(!J.validate())U(J.validate(),"public point not validated");return J.mul(this.priv).getX()},Q.prototype.sign=function(J,A,T){return this.ec.sign(J,this,A,T)},Q.prototype.verify=function(J,A,T){return this.ec.verify(J,A,this,void 0,T)},Q.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),TF=Y$(($,I)=>{var D=TU(),X=vU(),U=X.assert;function Q(L,F){if(L instanceof Q)return L;if(this._importDER(L,F))return;if(U(L.r&&L.s,"Signature without r or s"),this.r=new D(L.r,16),this.s=new D(L.s,16),L.recoveryParam===void 0)this.recoveryParam=null;else this.recoveryParam=L.recoveryParam}I.exports=Q;function J(){this.place=0}function A(L,F){var E=L[F.place++];if(!(E&128))return E;var P=E&15;if(P===0||P>4)return!1;if(L[F.place]===0)return!1;var R=0;for(var k=0,g=F.place;k<P;k++,g++)R<<=8,R|=L[g],R>>>=0;if(R<=127)return!1;return F.place=g,R}function T(L){var F=0,E=L.length-1;while(!L[F]&&!(L[F+1]&128)&&F<E)F++;if(F===0)return L;return L.slice(F)}Q.prototype._importDER=function(L,F){L=X.toArray(L,F);var E=new J;if(L[E.place++]!==48)return!1;var P=A(L,E);if(P===!1)return!1;if(P+E.place!==L.length)return!1;if(L[E.place++]!==2)return!1;var R=A(L,E);if(R===!1)return!1;if((L[E.place]&128)!==0)return!1;var k=L.slice(E.place,R+E.place);if(E.place+=R,L[E.place++]!==2)return!1;var g=A(L,E);if(g===!1)return!1;if(L.length!==g+E.place)return!1;if((L[E.place]&128)!==0)return!1;var j=L.slice(E.place,g+E.place);if(k[0]===0)if(k[1]&128)k=k.slice(1);else return!1;if(j[0]===0)if(j[1]&128)j=j.slice(1);else return!1;return this.r=new D(k),this.s=new D(j),this.recoveryParam=null,!0};function Z(L,F){if(F<128){L.push(F);return}var E=1+(Math.log(F)/Math.LN2>>>3);L.push(E|128);while(--E)L.push(F>>>(E<<3)&255);L.push(F)}Q.prototype.toDER=function(L){var F=this.r.toArray(),E=this.s.toArray();if(F[0]&128)F=[0].concat(F);if(E[0]&128)E=[0].concat(E);F=T(F),E=T(E);while(!E[0]&&!(E[1]&128))E=E.slice(1);var P=[2];Z(P,F.length),P=P.concat(F),P.push(2),Z(P,E.length);var R=P.concat(E),k=[48];return Z(k,R.length),k=k.concat(R),X.encode(k,L)}}),MF=Y$(($,I)=>{var D=TU(),X=LF(),U=vU(),Q=QY(),J=cW(),A=U.assert,T=EF(),Z=TF();function L(F){if(!(this instanceof L))return new L(F);if(typeof F==="string")A(Object.prototype.hasOwnProperty.call(Q,F),"Unknown curve "+F),F=Q[F];if(F instanceof Q.PresetCurve)F={curve:F};this.curve=F.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=F.curve.g,this.g.precompute(F.curve.n.bitLength()+1),this.hash=F.hash||F.curve.hash}I.exports=L,L.prototype.keyPair=function(F){return new T(this,F)},L.prototype.keyFromPrivate=function(F,E){return T.fromPrivate(this,F,E)},L.prototype.keyFromPublic=function(F,E){return T.fromPublic(this,F,E)},L.prototype.genKeyPair=function(F){if(!F)F={};var E=new X({hash:this.hash,pers:F.pers,persEnc:F.persEnc||"utf8",entropy:F.entropy||J(this.hash.hmacStrength),entropyEnc:F.entropy&&F.entropyEnc||"utf8",nonce:this.n.toArray()}),P=this.n.byteLength(),R=this.n.sub(new D(2));for(;;){var k=new D(E.generate(P));if(k.cmp(R)>0)continue;return k.iaddn(1),this.keyFromPrivate(k)}},L.prototype._truncateToN=function(F,E,P){var R;if(D.isBN(F)||typeof F==="number")F=new D(F,16),R=F.byteLength();else if(typeof F==="object")R=F.length,F=new D(F,16);else{var k=F.toString();R=k.length+1>>>1,F=new D(k,16)}if(typeof P!=="number")P=R*8;var g=P-this.n.bitLength();if(g>0)F=F.ushrn(g);if(!E&&F.cmp(this.n)>=0)return F.sub(this.n);else return F},L.prototype.sign=function(F,E,P,R){if(typeof P==="object")R=P,P=null;if(!R)R={};if(typeof F!=="string"&&typeof F!=="number"&&!D.isBN(F)){A(typeof F==="object"&&F&&typeof F.length==="number","Expected message to be an array-like, a hex string, or a BN instance"),A(F.length>>>0===F.length);for(var k=0;k<F.length;k++)A((F[k]&255)===F[k])}E=this.keyFromPrivate(E,P),F=this._truncateToN(F,!1,R.msgBitLength),A(!F.isNeg(),"Can not sign a negative message");var g=this.n.byteLength(),j=E.getPrivate().toArray("be",g),_=F.toArray("be",g);A(new D(_).eq(F),"Can not sign message");var N=new X({hash:this.hash,entropy:j,nonce:_,pers:R.pers,persEnc:R.persEnc||"utf8"}),B=this.n.sub(new D(1));for(var c=0;;c++){var r=R.k?R.k(c):new D(N.generate(this.n.byteLength()));if(r=this._truncateToN(r,!0),r.cmpn(1)<=0||r.cmp(B)>=0)continue;var J$=this.g.mul(r);if(J$.isInfinity())continue;var G$=J$.getX(),X$=G$.umod(this.n);if(X$.cmpn(0)===0)continue;var p=r.invm(this.n).mul(X$.mul(E.getPrivate()).iadd(F));if(p=p.umod(this.n),p.cmpn(0)===0)continue;var I$=(J$.getY().isOdd()?1:0)|(G$.cmp(X$)!==0?2:0);if(R.canonical&&p.cmp(this.nh)>0)p=this.n.sub(p),I$^=1;return new Z({r:X$,s:p,recoveryParam:I$})}},L.prototype.verify=function(F,E,P,R,k){if(!k)k={};F=this._truncateToN(F,!1,k.msgBitLength),P=this.keyFromPublic(P,R),E=new Z(E,"hex");var{r:g,s:j}=E;if(g.cmpn(1)<0||g.cmp(this.n)>=0)return!1;if(j.cmpn(1)<0||j.cmp(this.n)>=0)return!1;var _=j.invm(this.n),N=_.mul(F).umod(this.n),B=_.mul(g).umod(this.n),c;if(!this.curve._maxwellTrick){if(c=this.g.mulAdd(N,P.getPublic(),B),c.isInfinity())return!1;return c.getX().umod(this.n).cmp(g)===0}if(c=this.g.jmulAdd(N,P.getPublic(),B),c.isInfinity())return!1;return c.eqXToP(g)},L.prototype.recoverPubKey=function(F,E,P,R){A((3&P)===P,"The recovery param is more than two bits"),E=new Z(E,R);var k=this.n,g=new D(F),j=E.r,_=E.s,N=P&1,B=P>>1;if(j.cmp(this.curve.p.umod(this.curve.n))>=0&&B)throw Error("Unable to find sencond key candinate");if(B)j=this.curve.pointFromX(j.add(this.curve.n),N);else j=this.curve.pointFromX(j,N);var c=E.r.invm(k),r=k.sub(g).mul(c).umod(k),J$=_.mul(c).umod(k);return this.g.mulAdd(r,j,J$)},L.prototype.getKeyRecoveryParam=function(F,E,P,R){if(E=new Z(E,R),E.recoveryParam!==null)return E.recoveryParam;for(var k=0;k<4;k++){var g;try{g=this.recoverPubKey(F,E,k)}catch(j){continue}if(g.eq(P))return k}throw Error("Unable to find valid recovery factor")}}),PF=Y$(($,I)=>{var D=vU(),X=D.assert,U=D.parseBytes,Q=D.cachedProperty;function J(A,T){if(this.eddsa=A,this._secret=U(T.secret),A.isPoint(T.pub))this._pub=T.pub;else this._pubBytes=U(T.pub)}J.fromPublic=function(A,T){if(T instanceof J)return T;return new J(A,{pub:T})},J.fromSecret=function(A,T){if(T instanceof J)return T;return new J(A,{secret:T})},J.prototype.secret=function(){return this._secret},Q(J,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),Q(J,"pub",function(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())}),Q(J,"privBytes",function(){var A=this.eddsa,T=this.hash(),Z=A.encodingLength-1,L=T.slice(0,A.encodingLength);return L[0]&=248,L[Z]&=127,L[Z]|=64,L}),Q(J,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),Q(J,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),Q(J,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),J.prototype.sign=function(A){return X(this._secret,"KeyPair can only verify"),this.eddsa.sign(A,this)},J.prototype.verify=function(A,T){return this.eddsa.verify(A,T,this)},J.prototype.getSecret=function(A){return X(this._secret,"KeyPair is public only"),D.encode(this.secret(),A)},J.prototype.getPublic=function(A){return D.encode(this.pubBytes(),A)},I.exports=J}),qF=Y$(($,I)=>{var D=TU(),X=vU(),U=X.assert,Q=X.cachedProperty,J=X.parseBytes;function A(T,Z){if(this.eddsa=T,typeof Z!=="object")Z=J(Z);if(Array.isArray(Z))U(Z.length===T.encodingLength*2,"Signature has invalid size"),Z={R:Z.slice(0,T.encodingLength),S:Z.slice(T.encodingLength)};if(U(Z.R&&Z.S,"Signature without R or S"),T.isPoint(Z.R))this._R=Z.R;if(Z.S instanceof D)this._S=Z.S;this._Rencoded=Array.isArray(Z.R)?Z.R:Z.Rencoded,this._Sencoded=Array.isArray(Z.S)?Z.S:Z.Sencoded}Q(A,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),Q(A,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),Q(A,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),Q(A,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),A.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},A.prototype.toHex=function(){return X.encode(this.toBytes(),"hex").toUpperCase()},I.exports=A}),RF=Y$(($,I)=>{var D=XY(),X=QY(),U=vU(),Q=U.assert,J=U.parseBytes,A=PF(),T=qF();function Z(L){if(Q(L==="ed25519","only tested with ed25519 so far"),!(this instanceof Z))return new Z(L);L=X[L].curve,this.curve=L,this.g=L.g,this.g.precompute(L.n.bitLength()+1),this.pointClass=L.point().constructor,this.encodingLength=Math.ceil(L.n.bitLength()/8),this.hash=D.sha512}I.exports=Z,Z.prototype.sign=function(L,F){L=J(L);var E=this.keyFromSecret(F),P=this.hashInt(E.messagePrefix(),L),R=this.g.mul(P),k=this.encodePoint(R),g=this.hashInt(k,E.pubBytes(),L).mul(E.priv()),j=P.add(g).umod(this.curve.n);return this.makeSignature({R,S:j,Rencoded:k})},Z.prototype.verify=function(L,F,E){if(L=J(L),F=this.makeSignature(F),F.S().gte(F.eddsa.curve.n)||F.S().isNeg())return!1;var P=this.keyFromPublic(E),R=this.hashInt(F.Rencoded(),P.pubBytes(),L),k=this.g.mul(F.S()),g=F.R().add(P.pub().mul(R));return g.eq(k)},Z.prototype.hashInt=function(){var L=this.hash();for(var F=0;F<arguments.length;F++)L.update(arguments[F]);return U.intFromLE(L.digest()).umod(this.curve.n)},Z.prototype.keyFromPublic=function(L){return A.fromPublic(this,L)},Z.prototype.keyFromSecret=function(L){return A.fromSecret(this,L)},Z.prototype.makeSignature=function(L){if(L instanceof T)return L;return new T(this,L)},Z.prototype.encodePoint=function(L){var F=L.getY().toArray("le",this.encodingLength);return F[this.encodingLength-1]|=L.getX().isOdd()?128:0,F},Z.prototype.decodePoint=function(L){L=U.parseBytes(L);var F=L.length-1,E=L.slice(0,F).concat(L[F]&-129),P=(L[F]&128)!==0,R=U.intFromLE(E);return this.curve.pointFromY(R,P)},Z.prototype.encodeInt=function(L){return L.toArray("le",this.encodingLength)},Z.prototype.decodeInt=function(L){return U.intFromLE(L)},Z.prototype.isPoint=function(L){return L instanceof this.pointClass}}),gF=Y$(($)=>{var I=$;I.version=QF().version,I.utils=vU(),I.rand=cW(),I.curve=fW(),I.curves=QY(),I.ec=MF(),I.eddsa=RF()}),kF=Y$(($,I)=>{(function(D,X){function U(v,G){if(!v)throw Error(G||"Assertion failed")}function Q(v,G){v.super_=G;var W=function(){};W.prototype=G.prototype,v.prototype=new W,v.prototype.constructor=v}function J(v,G,W){if(J.isBN(v))return v;if(this.negative=0,this.words=null,this.length=0,this.red=null,v!==null){if(G==="le"||G==="be")W=G,G=10;this._init(v||0,G||10,W||"be")}}if(typeof D==="object")D.exports=J;else X.BN=J;J.BN=J,J.wordSize=26;var A;try{if(typeof window<"u"&&typeof window.Buffer<"u")A=window.Buffer;else A=(j0(),e$(_0)).Buffer}catch(v){}J.isBN=function(v){if(v instanceof J)return!0;return v!==null&&typeof v==="object"&&v.constructor.wordSize===J.wordSize&&Array.isArray(v.words)},J.max=function(v,G){if(v.cmp(G)>0)return v;return G},J.min=function(v,G){if(v.cmp(G)<0)return v;return G},J.prototype._init=function(v,G,W){if(typeof v==="number")return this._initNumber(v,G,W);if(typeof v==="object")return this._initArray(v,G,W);if(G==="hex")G=16;U(G===(G|0)&&G>=2&&G<=36),v=v.toString().replace(/\s+/g,"");var Y=0;if(v[0]==="-")Y++,this.negative=1;if(Y<v.length){if(G===16)this._parseHex(v,Y,W);else if(this._parseBase(v,G,Y),W==="le")this._initArray(this.toArray(),G,W)}},J.prototype._initNumber=function(v,G,W){if(v<0)this.negative=1,v=-v;if(v<67108864)this.words=[v&67108863],this.length=1;else if(v<4503599627370496)this.words=[v&67108863,v/67108864&67108863],this.length=2;else U(v<9007199254740992),this.words=[v&67108863,v/67108864&67108863,1],this.length=3;if(W!=="le")return;this._initArray(this.toArray(),G,W)},J.prototype._initArray=function(v,G,W){if(U(typeof v.length==="number"),v.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(v.length/3),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V,S,H=0;if(W==="be"){for(Y=v.length-1,V=0;Y>=0;Y-=3)if(S=v[Y]|v[Y-1]<<8|v[Y-2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}else if(W==="le"){for(Y=0,V=0;Y<v.length;Y+=3)if(S=v[Y]|v[Y+1]<<8|v[Y+2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}return this.strip()};function T(v,G){var W=v.charCodeAt(G);if(W>=65&&W<=70)return W-55;else if(W>=97&&W<=102)return W-87;else return W-48&15}function Z(v,G,W){var Y=T(v,W);if(W-1>=G)Y|=T(v,W-1)<<4;return Y}J.prototype._parseHex=function(v,G,W){this.length=Math.ceil((v.length-G)/6),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V=0,S=0,H;if(W==="be")for(Y=v.length-1;Y>=G;Y-=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8;else{var K=v.length-G;for(Y=K%2===0?G+1:G;Y<v.length;Y+=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8}this.strip()};function L(v,G,W,Y){var V=0,S=Math.min(v.length,W);for(var H=G;H<S;H++){var K=v.charCodeAt(H)-48;if(V*=Y,K>=49)V+=K-49+10;else if(K>=17)V+=K-17+10;else V+=K}return V}J.prototype._parseBase=function(v,G,W){this.words=[0],this.length=1;for(var Y=0,V=1;V<=67108863;V*=G)Y++;Y--,V=V/G|0;var S=v.length-W,H=S%Y,K=Math.min(S,S-H)+W,O=0;for(var z=W;z<K;z+=Y)if(O=L(v,z,z+Y,G),this.imuln(V),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O);if(H!==0){var q=1;O=L(v,z,v.length,G);for(z=0;z<H;z++)q*=G;if(this.imuln(q),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O)}this.strip()},J.prototype.copy=function(v){v.words=Array(this.length);for(var G=0;G<this.length;G++)v.words[G]=this.words[G];v.length=this.length,v.negative=this.negative,v.red=this.red},J.prototype.clone=function(){var v=new J(null);return this.copy(v),v},J.prototype._expand=function(v){while(this.length<v)this.words[this.length++]=0;return this},J.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},J.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},J.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(J.prototype.toString=function(v,G){v=v||10,G=G|0||1;var W;if(v===16||v==="hex"){W="";var Y=0,V=0;for(var S=0;S<this.length;S++){var H=this.words[S],K=((H<<Y|V)&16777215).toString(16);if(V=H>>>24-Y&16777215,Y+=2,Y>=26)Y-=26,S--;if(V!==0||S!==this.length-1)W=F[6-K.length]+K+W;else W=K+W}if(V!==0)W=V.toString(16)+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}if(v===(v|0)&&v>=2&&v<=36){var O=E[v],z=P[v];W="";var q=this.clone();q.negative=0;while(!q.isZero()){var M=q.modn(z).toString(v);if(q=q.idivn(z),!q.isZero())W=F[O-M.length]+M+W;else W=M+W}if(this.isZero())W="0"+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}U(!1,"Base should be between 2 and 36")},J.prototype.toNumber=function(){var v=this.words[0];if(this.length===2)v+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)v+=4503599627370496+this.words[1]*67108864;else if(this.length>2)U(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-v:v},J.prototype.toJSON=function(){return this.toString(16)},J.prototype.toBuffer=function(v,G){return U(typeof A<"u"),this.toArrayLike(A,v,G)},J.prototype.toArray=function(v,G){return this.toArrayLike(Array,v,G)},J.prototype.toArrayLike=function(v,G,W){var Y=this.byteLength(),V=W||Math.max(1,Y);U(Y<=V,"byte array longer than desired length"),U(V>0,"Requested array length <= 0"),this.strip();var S=G==="le",H=new v(V),K,O,z=this.clone();if(!S){for(O=0;O<V-Y;O++)H[O]=0;for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[V-O-1]=K}else{for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[O]=K;for(;O<V;O++)H[O]=0}return H},Math.clz32)J.prototype._countBits=function(v){return 32-Math.clz32(v)};else J.prototype._countBits=function(v){var G=v,W=0;if(G>=4096)W+=13,G>>>=13;if(G>=64)W+=7,G>>>=7;if(G>=8)W+=4,G>>>=4;if(G>=2)W+=2,G>>>=2;return W+G};J.prototype._zeroBits=function(v){if(v===0)return 26;var G=v,W=0;if((G&8191)===0)W+=13,G>>>=13;if((G&127)===0)W+=7,G>>>=7;if((G&15)===0)W+=4,G>>>=4;if((G&3)===0)W+=2,G>>>=2;if((G&1)===0)W++;return W},J.prototype.bitLength=function(){var v=this.words[this.length-1],G=this._countBits(v);return(this.length-1)*26+G};function R(v){var G=Array(v.bitLength());for(var W=0;W<G.length;W++){var Y=W/26|0,V=W%26;G[W]=(v.words[Y]&1<<V)>>>V}return G}J.prototype.zeroBits=function(){if(this.isZero())return 0;var v=0;for(var G=0;G<this.length;G++){var W=this._zeroBits(this.words[G]);if(v+=W,W!==26)break}return v},J.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},J.prototype.toTwos=function(v){if(this.negative!==0)return this.abs().inotn(v).iaddn(1);return this.clone()},J.prototype.fromTwos=function(v){if(this.testn(v-1))return this.notn(v).iaddn(1).ineg();return this.clone()},J.prototype.isNeg=function(){return this.negative!==0},J.prototype.neg=function(){return this.clone().ineg()},J.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},J.prototype.iuor=function(v){while(this.length<v.length)this.words[this.length++]=0;for(var G=0;G<v.length;G++)this.words[G]=this.words[G]|v.words[G];return this.strip()},J.prototype.ior=function(v){return U((this.negative|v.negative)===0),this.iuor(v)},J.prototype.or=function(v){if(this.length>v.length)return this.clone().ior(v);return v.clone().ior(this)},J.prototype.uor=function(v){if(this.length>v.length)return this.clone().iuor(v);return v.clone().iuor(this)},J.prototype.iuand=function(v){var G;if(this.length>v.length)G=v;else G=this;for(var W=0;W<G.length;W++)this.words[W]=this.words[W]&v.words[W];return this.length=G.length,this.strip()},J.prototype.iand=function(v){return U((this.negative|v.negative)===0),this.iuand(v)},J.prototype.and=function(v){if(this.length>v.length)return this.clone().iand(v);return v.clone().iand(this)},J.prototype.uand=function(v){if(this.length>v.length)return this.clone().iuand(v);return v.clone().iuand(this)},J.prototype.iuxor=function(v){var G,W;if(this.length>v.length)G=this,W=v;else G=v,W=this;for(var Y=0;Y<W.length;Y++)this.words[Y]=G.words[Y]^W.words[Y];if(this!==G)for(;Y<G.length;Y++)this.words[Y]=G.words[Y];return this.length=G.length,this.strip()},J.prototype.ixor=function(v){return U((this.negative|v.negative)===0),this.iuxor(v)},J.prototype.xor=function(v){if(this.length>v.length)return this.clone().ixor(v);return v.clone().ixor(this)},J.prototype.uxor=function(v){if(this.length>v.length)return this.clone().iuxor(v);return v.clone().iuxor(this)},J.prototype.inotn=function(v){U(typeof v==="number"&&v>=0);var G=Math.ceil(v/26)|0,W=v%26;if(this._expand(G),W>0)G--;for(var Y=0;Y<G;Y++)this.words[Y]=~this.words[Y]&67108863;if(W>0)this.words[Y]=~this.words[Y]&67108863>>26-W;return this.strip()},J.prototype.notn=function(v){return this.clone().inotn(v)},J.prototype.setn=function(v,G){U(typeof v==="number"&&v>=0);var W=v/26|0,Y=v%26;if(this._expand(W+1),G)this.words[W]=this.words[W]|1<<Y;else this.words[W]=this.words[W]&~(1<<Y);return this.strip()},J.prototype.iadd=function(v){var G;if(this.negative!==0&&v.negative===0)return this.negative=0,G=this.isub(v),this.negative^=1,this._normSign();else if(this.negative===0&&v.negative!==0)return v.negative=0,G=this.isub(v),v.negative=1,G._normSign();var W,Y;if(this.length>v.length)W=this,Y=v;else W=v,Y=this;var V=0;for(var S=0;S<Y.length;S++)G=(W.words[S]|0)+(Y.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;for(;V!==0&&S<W.length;S++)G=(W.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;if(this.length=W.length,V!==0)this.words[this.length]=V,this.length++;else if(W!==this)for(;S<W.length;S++)this.words[S]=W.words[S];return this},J.prototype.add=function(v){var G;if(v.negative!==0&&this.negative===0)return v.negative=0,G=this.sub(v),v.negative^=1,G;else if(v.negative===0&&this.negative!==0)return this.negative=0,G=v.sub(this),this.negative=1,G;if(this.length>v.length)return this.clone().iadd(v);return v.clone().iadd(this)},J.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var G=this.iadd(v);return v.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var W=this.cmp(v);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,V;if(W>0)Y=this,V=v;else Y=v,V=this;var S=0;for(var H=0;H<V.length;H++)G=(Y.words[H]|0)-(V.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;for(;S!==0&&H<Y.length;H++)G=(Y.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;if(S===0&&H<Y.length&&Y!==this)for(;H<Y.length;H++)this.words[H]=Y.words[H];if(this.length=Math.max(this.length,H),Y!==this)this.negative=1;return this.strip()},J.prototype.sub=function(v){return this.clone().isub(v)};function k(v,G,W){W.negative=G.negative^v.negative;var Y=v.length+G.length|0;W.length=Y,Y=Y-1|0;var V=v.words[0]|0,S=G.words[0]|0,H=V*S,K=H&67108863,O=H/67108864|0;W.words[0]=K;for(var z=1;z<Y;z++){var q=O>>>26,M=O&67108863,C=Math.min(z,G.length-1);for(var w=Math.max(0,z-v.length+1);w<=C;w++){var u=z-w|0;V=v.words[u]|0,S=G.words[w]|0,H=V*S+M,q+=H/67108864|0,M=H&67108863}W.words[z]=M|0,O=q|0}if(O!==0)W.words[z]=O|0;else W.length--;return W.strip()}var g=function(v,G,W){var Y=v.words,V=G.words,S=W.words,H=0,K,O,z,q=Y[0]|0,M=q&8191,C=q>>>13,w=Y[1]|0,u=w&8191,n=w>>>13,W$=Y[2]|0,i=W$&8191,b=W$>>>13,D$=Y[3]|0,d=D$&8191,s=D$>>>13,h$=Y[4]|0,f=h$&8191,h=h$>>>13,O$=Y[5]|0,t=O$&8191,a=O$>>>13,T$=Y[6]|0,y=T$&8191,o=T$>>>13,w$=Y[7]|0,m=w$&8191,v$=w$>>>13,r$=Y[8]|0,S$=r$&8191,A$=r$>>>13,X0=Y[9]|0,K$=X0&8191,F$=X0>>>13,G0=V[0]|0,L$=G0&8191,Z$=G0>>>13,w0=V[1]|0,M$=w0&8191,C$=w0>>>13,c0=V[2]|0,_$=c0&8191,P$=c0>>>13,N0=V[3]|0,j$=N0&8191,q$=N0>>>13,g0=V[4]|0,N$=g0&8191,B$=g0>>>13,k0=V[5]|0,R$=k0&8191,x=k0>>>13,l=V[6]|0,e=l&8191,U$=l>>>13,p$=V[7]|0,z$=p$&8191,H$=p$>>>13,Q0=V[8]|0,g$=Q0&8191,x$=Q0>>>13,B0=V[9]|0,k$=B0&8191,E$=B0>>>13;W.negative=v.negative^G.negative,W.length=19,K=Math.imul(M,L$),O=Math.imul(M,Z$),O=O+Math.imul(C,L$)|0,z=Math.imul(C,Z$);var Y0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,K=Math.imul(u,L$),O=Math.imul(u,Z$),O=O+Math.imul(n,L$)|0,z=Math.imul(n,Z$),K=K+Math.imul(M,M$)|0,O=O+Math.imul(M,C$)|0,O=O+Math.imul(C,M$)|0,z=z+Math.imul(C,C$)|0;var m$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(m$>>>26)|0,m$&=67108863,K=Math.imul(i,L$),O=Math.imul(i,Z$),O=O+Math.imul(b,L$)|0,z=Math.imul(b,Z$),K=K+Math.imul(u,M$)|0,O=O+Math.imul(u,C$)|0,O=O+Math.imul(n,M$)|0,z=z+Math.imul(n,C$)|0,K=K+Math.imul(M,_$)|0,O=O+Math.imul(M,P$)|0,O=O+Math.imul(C,_$)|0,z=z+Math.imul(C,P$)|0;var n$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(n$>>>26)|0,n$&=67108863,K=Math.imul(d,L$),O=Math.imul(d,Z$),O=O+Math.imul(s,L$)|0,z=Math.imul(s,Z$),K=K+Math.imul(i,M$)|0,O=O+Math.imul(i,C$)|0,O=O+Math.imul(b,M$)|0,z=z+Math.imul(b,C$)|0,K=K+Math.imul(u,_$)|0,O=O+Math.imul(u,P$)|0,O=O+Math.imul(n,_$)|0,z=z+Math.imul(n,P$)|0,K=K+Math.imul(M,j$)|0,O=O+Math.imul(M,q$)|0,O=O+Math.imul(C,j$)|0,z=z+Math.imul(C,q$)|0;var v0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(v0>>>26)|0,v0&=67108863,K=Math.imul(f,L$),O=Math.imul(f,Z$),O=O+Math.imul(h,L$)|0,z=Math.imul(h,Z$),K=K+Math.imul(d,M$)|0,O=O+Math.imul(d,C$)|0,O=O+Math.imul(s,M$)|0,z=z+Math.imul(s,C$)|0,K=K+Math.imul(i,_$)|0,O=O+Math.imul(i,P$)|0,O=O+Math.imul(b,_$)|0,z=z+Math.imul(b,P$)|0,K=K+Math.imul(u,j$)|0,O=O+Math.imul(u,q$)|0,O=O+Math.imul(n,j$)|0,z=z+Math.imul(n,q$)|0,K=K+Math.imul(M,N$)|0,O=O+Math.imul(M,B$)|0,O=O+Math.imul(C,N$)|0,z=z+Math.imul(C,B$)|0;var $0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+($0>>>26)|0,$0&=67108863,K=Math.imul(t,L$),O=Math.imul(t,Z$),O=O+Math.imul(a,L$)|0,z=Math.imul(a,Z$),K=K+Math.imul(f,M$)|0,O=O+Math.imul(f,C$)|0,O=O+Math.imul(h,M$)|0,z=z+Math.imul(h,C$)|0,K=K+Math.imul(d,_$)|0,O=O+Math.imul(d,P$)|0,O=O+Math.imul(s,_$)|0,z=z+Math.imul(s,P$)|0,K=K+Math.imul(i,j$)|0,O=O+Math.imul(i,q$)|0,O=O+Math.imul(b,j$)|0,z=z+Math.imul(b,q$)|0,K=K+Math.imul(u,N$)|0,O=O+Math.imul(u,B$)|0,O=O+Math.imul(n,N$)|0,z=z+Math.imul(n,B$)|0,K=K+Math.imul(M,R$)|0,O=O+Math.imul(M,x)|0,O=O+Math.imul(C,R$)|0,z=z+Math.imul(C,x)|0;var K0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(K0>>>26)|0,K0&=67108863,K=Math.imul(y,L$),O=Math.imul(y,Z$),O=O+Math.imul(o,L$)|0,z=Math.imul(o,Z$),K=K+Math.imul(t,M$)|0,O=O+Math.imul(t,C$)|0,O=O+Math.imul(a,M$)|0,z=z+Math.imul(a,C$)|0,K=K+Math.imul(f,_$)|0,O=O+Math.imul(f,P$)|0,O=O+Math.imul(h,_$)|0,z=z+Math.imul(h,P$)|0,K=K+Math.imul(d,j$)|0,O=O+Math.imul(d,q$)|0,O=O+Math.imul(s,j$)|0,z=z+Math.imul(s,q$)|0,K=K+Math.imul(i,N$)|0,O=O+Math.imul(i,B$)|0,O=O+Math.imul(b,N$)|0,z=z+Math.imul(b,B$)|0,K=K+Math.imul(u,R$)|0,O=O+Math.imul(u,x)|0,O=O+Math.imul(n,R$)|0,z=z+Math.imul(n,x)|0,K=K+Math.imul(M,e)|0,O=O+Math.imul(M,U$)|0,O=O+Math.imul(C,e)|0,z=z+Math.imul(C,U$)|0;var z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(z0>>>26)|0,z0&=67108863,K=Math.imul(m,L$),O=Math.imul(m,Z$),O=O+Math.imul(v$,L$)|0,z=Math.imul(v$,Z$),K=K+Math.imul(y,M$)|0,O=O+Math.imul(y,C$)|0,O=O+Math.imul(o,M$)|0,z=z+Math.imul(o,C$)|0,K=K+Math.imul(t,_$)|0,O=O+Math.imul(t,P$)|0,O=O+Math.imul(a,_$)|0,z=z+Math.imul(a,P$)|0,K=K+Math.imul(f,j$)|0,O=O+Math.imul(f,q$)|0,O=O+Math.imul(h,j$)|0,z=z+Math.imul(h,q$)|0,K=K+Math.imul(d,N$)|0,O=O+Math.imul(d,B$)|0,O=O+Math.imul(s,N$)|0,z=z+Math.imul(s,B$)|0,K=K+Math.imul(i,R$)|0,O=O+Math.imul(i,x)|0,O=O+Math.imul(b,R$)|0,z=z+Math.imul(b,x)|0,K=K+Math.imul(u,e)|0,O=O+Math.imul(u,U$)|0,O=O+Math.imul(n,e)|0,z=z+Math.imul(n,U$)|0,K=K+Math.imul(M,z$)|0,O=O+Math.imul(M,H$)|0,O=O+Math.imul(C,z$)|0,z=z+Math.imul(C,H$)|0;var S0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(S0>>>26)|0,S0&=67108863,K=Math.imul(S$,L$),O=Math.imul(S$,Z$),O=O+Math.imul(A$,L$)|0,z=Math.imul(A$,Z$),K=K+Math.imul(m,M$)|0,O=O+Math.imul(m,C$)|0,O=O+Math.imul(v$,M$)|0,z=z+Math.imul(v$,C$)|0,K=K+Math.imul(y,_$)|0,O=O+Math.imul(y,P$)|0,O=O+Math.imul(o,_$)|0,z=z+Math.imul(o,P$)|0,K=K+Math.imul(t,j$)|0,O=O+Math.imul(t,q$)|0,O=O+Math.imul(a,j$)|0,z=z+Math.imul(a,q$)|0,K=K+Math.imul(f,N$)|0,O=O+Math.imul(f,B$)|0,O=O+Math.imul(h,N$)|0,z=z+Math.imul(h,B$)|0,K=K+Math.imul(d,R$)|0,O=O+Math.imul(d,x)|0,O=O+Math.imul(s,R$)|0,z=z+Math.imul(s,x)|0,K=K+Math.imul(i,e)|0,O=O+Math.imul(i,U$)|0,O=O+Math.imul(b,e)|0,z=z+Math.imul(b,U$)|0,K=K+Math.imul(u,z$)|0,O=O+Math.imul(u,H$)|0,O=O+Math.imul(n,z$)|0,z=z+Math.imul(n,H$)|0,K=K+Math.imul(M,g$)|0,O=O+Math.imul(M,x$)|0,O=O+Math.imul(C,g$)|0,z=z+Math.imul(C,x$)|0;var A0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(A0>>>26)|0,A0&=67108863,K=Math.imul(K$,L$),O=Math.imul(K$,Z$),O=O+Math.imul(F$,L$)|0,z=Math.imul(F$,Z$),K=K+Math.imul(S$,M$)|0,O=O+Math.imul(S$,C$)|0,O=O+Math.imul(A$,M$)|0,z=z+Math.imul(A$,C$)|0,K=K+Math.imul(m,_$)|0,O=O+Math.imul(m,P$)|0,O=O+Math.imul(v$,_$)|0,z=z+Math.imul(v$,P$)|0,K=K+Math.imul(y,j$)|0,O=O+Math.imul(y,q$)|0,O=O+Math.imul(o,j$)|0,z=z+Math.imul(o,q$)|0,K=K+Math.imul(t,N$)|0,O=O+Math.imul(t,B$)|0,O=O+Math.imul(a,N$)|0,z=z+Math.imul(a,B$)|0,K=K+Math.imul(f,R$)|0,O=O+Math.imul(f,x)|0,O=O+Math.imul(h,R$)|0,z=z+Math.imul(h,x)|0,K=K+Math.imul(d,e)|0,O=O+Math.imul(d,U$)|0,O=O+Math.imul(s,e)|0,z=z+Math.imul(s,U$)|0,K=K+Math.imul(i,z$)|0,O=O+Math.imul(i,H$)|0,O=O+Math.imul(b,z$)|0,z=z+Math.imul(b,H$)|0,K=K+Math.imul(u,g$)|0,O=O+Math.imul(u,x$)|0,O=O+Math.imul(n,g$)|0,z=z+Math.imul(n,x$)|0,K=K+Math.imul(M,k$)|0,O=O+Math.imul(M,E$)|0,O=O+Math.imul(C,k$)|0,z=z+Math.imul(C,E$)|0;var F0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(F0>>>26)|0,F0&=67108863,K=Math.imul(K$,M$),O=Math.imul(K$,C$),O=O+Math.imul(F$,M$)|0,z=Math.imul(F$,C$),K=K+Math.imul(S$,_$)|0,O=O+Math.imul(S$,P$)|0,O=O+Math.imul(A$,_$)|0,z=z+Math.imul(A$,P$)|0,K=K+Math.imul(m,j$)|0,O=O+Math.imul(m,q$)|0,O=O+Math.imul(v$,j$)|0,z=z+Math.imul(v$,q$)|0,K=K+Math.imul(y,N$)|0,O=O+Math.imul(y,B$)|0,O=O+Math.imul(o,N$)|0,z=z+Math.imul(o,B$)|0,K=K+Math.imul(t,R$)|0,O=O+Math.imul(t,x)|0,O=O+Math.imul(a,R$)|0,z=z+Math.imul(a,x)|0,K=K+Math.imul(f,e)|0,O=O+Math.imul(f,U$)|0,O=O+Math.imul(h,e)|0,z=z+Math.imul(h,U$)|0,K=K+Math.imul(d,z$)|0,O=O+Math.imul(d,H$)|0,O=O+Math.imul(s,z$)|0,z=z+Math.imul(s,H$)|0,K=K+Math.imul(i,g$)|0,O=O+Math.imul(i,x$)|0,O=O+Math.imul(b,g$)|0,z=z+Math.imul(b,x$)|0,K=K+Math.imul(u,k$)|0,O=O+Math.imul(u,E$)|0,O=O+Math.imul(n,k$)|0,z=z+Math.imul(n,E$)|0;var H0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(H0>>>26)|0,H0&=67108863,K=Math.imul(K$,_$),O=Math.imul(K$,P$),O=O+Math.imul(F$,_$)|0,z=Math.imul(F$,P$),K=K+Math.imul(S$,j$)|0,O=O+Math.imul(S$,q$)|0,O=O+Math.imul(A$,j$)|0,z=z+Math.imul(A$,q$)|0,K=K+Math.imul(m,N$)|0,O=O+Math.imul(m,B$)|0,O=O+Math.imul(v$,N$)|0,z=z+Math.imul(v$,B$)|0,K=K+Math.imul(y,R$)|0,O=O+Math.imul(y,x)|0,O=O+Math.imul(o,R$)|0,z=z+Math.imul(o,x)|0,K=K+Math.imul(t,e)|0,O=O+Math.imul(t,U$)|0,O=O+Math.imul(a,e)|0,z=z+Math.imul(a,U$)|0,K=K+Math.imul(f,z$)|0,O=O+Math.imul(f,H$)|0,O=O+Math.imul(h,z$)|0,z=z+Math.imul(h,H$)|0,K=K+Math.imul(d,g$)|0,O=O+Math.imul(d,x$)|0,O=O+Math.imul(s,g$)|0,z=z+Math.imul(s,x$)|0,K=K+Math.imul(i,k$)|0,O=O+Math.imul(i,E$)|0,O=O+Math.imul(b,k$)|0,z=z+Math.imul(b,E$)|0;var Z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,K=Math.imul(K$,j$),O=Math.imul(K$,q$),O=O+Math.imul(F$,j$)|0,z=Math.imul(F$,q$),K=K+Math.imul(S$,N$)|0,O=O+Math.imul(S$,B$)|0,O=O+Math.imul(A$,N$)|0,z=z+Math.imul(A$,B$)|0,K=K+Math.imul(m,R$)|0,O=O+Math.imul(m,x)|0,O=O+Math.imul(v$,R$)|0,z=z+Math.imul(v$,x)|0,K=K+Math.imul(y,e)|0,O=O+Math.imul(y,U$)|0,O=O+Math.imul(o,e)|0,z=z+Math.imul(o,U$)|0,K=K+Math.imul(t,z$)|0,O=O+Math.imul(t,H$)|0,O=O+Math.imul(a,z$)|0,z=z+Math.imul(a,H$)|0,K=K+Math.imul(f,g$)|0,O=O+Math.imul(f,x$)|0,O=O+Math.imul(h,g$)|0,z=z+Math.imul(h,x$)|0,K=K+Math.imul(d,k$)|0,O=O+Math.imul(d,E$)|0,O=O+Math.imul(s,k$)|0,z=z+Math.imul(s,E$)|0;var L0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(L0>>>26)|0,L0&=67108863,K=Math.imul(K$,N$),O=Math.imul(K$,B$),O=O+Math.imul(F$,N$)|0,z=Math.imul(F$,B$),K=K+Math.imul(S$,R$)|0,O=O+Math.imul(S$,x)|0,O=O+Math.imul(A$,R$)|0,z=z+Math.imul(A$,x)|0,K=K+Math.imul(m,e)|0,O=O+Math.imul(m,U$)|0,O=O+Math.imul(v$,e)|0,z=z+Math.imul(v$,U$)|0,K=K+Math.imul(y,z$)|0,O=O+Math.imul(y,H$)|0,O=O+Math.imul(o,z$)|0,z=z+Math.imul(o,H$)|0,K=K+Math.imul(t,g$)|0,O=O+Math.imul(t,x$)|0,O=O+Math.imul(a,g$)|0,z=z+Math.imul(a,x$)|0,K=K+Math.imul(f,k$)|0,O=O+Math.imul(f,E$)|0,O=O+Math.imul(h,k$)|0,z=z+Math.imul(h,E$)|0;var E0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(E0>>>26)|0,E0&=67108863,K=Math.imul(K$,R$),O=Math.imul(K$,x),O=O+Math.imul(F$,R$)|0,z=Math.imul(F$,x),K=K+Math.imul(S$,e)|0,O=O+Math.imul(S$,U$)|0,O=O+Math.imul(A$,e)|0,z=z+Math.imul(A$,U$)|0,K=K+Math.imul(m,z$)|0,O=O+Math.imul(m,H$)|0,O=O+Math.imul(v$,z$)|0,z=z+Math.imul(v$,H$)|0,K=K+Math.imul(y,g$)|0,O=O+Math.imul(y,x$)|0,O=O+Math.imul(o,g$)|0,z=z+Math.imul(o,x$)|0,K=K+Math.imul(t,k$)|0,O=O+Math.imul(t,E$)|0,O=O+Math.imul(a,k$)|0,z=z+Math.imul(a,E$)|0;var T0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(T0>>>26)|0,T0&=67108863,K=Math.imul(K$,e),O=Math.imul(K$,U$),O=O+Math.imul(F$,e)|0,z=Math.imul(F$,U$),K=K+Math.imul(S$,z$)|0,O=O+Math.imul(S$,H$)|0,O=O+Math.imul(A$,z$)|0,z=z+Math.imul(A$,H$)|0,K=K+Math.imul(m,g$)|0,O=O+Math.imul(m,x$)|0,O=O+Math.imul(v$,g$)|0,z=z+Math.imul(v$,x$)|0,K=K+Math.imul(y,k$)|0,O=O+Math.imul(y,E$)|0,O=O+Math.imul(o,k$)|0,z=z+Math.imul(o,E$)|0;var M0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(M0>>>26)|0,M0&=67108863,K=Math.imul(K$,z$),O=Math.imul(K$,H$),O=O+Math.imul(F$,z$)|0,z=Math.imul(F$,H$),K=K+Math.imul(S$,g$)|0,O=O+Math.imul(S$,x$)|0,O=O+Math.imul(A$,g$)|0,z=z+Math.imul(A$,x$)|0,K=K+Math.imul(m,k$)|0,O=O+Math.imul(m,E$)|0,O=O+Math.imul(v$,k$)|0,z=z+Math.imul(v$,E$)|0;var P0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(P0>>>26)|0,P0&=67108863,K=Math.imul(K$,g$),O=Math.imul(K$,x$),O=O+Math.imul(F$,g$)|0,z=Math.imul(F$,x$),K=K+Math.imul(S$,k$)|0,O=O+Math.imul(S$,E$)|0,O=O+Math.imul(A$,k$)|0,z=z+Math.imul(A$,E$)|0;var q0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(q0>>>26)|0,q0&=67108863,K=Math.imul(K$,k$),O=Math.imul(K$,E$),O=O+Math.imul(F$,k$)|0,z=Math.imul(F$,E$);var R0=(H+K|0)+((O&8191)<<13)|0;if(H=(z+(O>>>13)|0)+(R0>>>26)|0,R0&=67108863,S[0]=Y0,S[1]=m$,S[2]=n$,S[3]=v0,S[4]=$0,S[5]=K0,S[6]=z0,S[7]=S0,S[8]=A0,S[9]=F0,S[10]=H0,S[11]=Z0,S[12]=L0,S[13]=E0,S[14]=T0,S[15]=M0,S[16]=P0,S[17]=q0,S[18]=R0,H!==0)S[19]=H,W.length++;return W};if(!Math.imul)g=k;function j(v,G,W){W.negative=G.negative^v.negative,W.length=v.length+G.length;var Y=0,V=0;for(var S=0;S<W.length-1;S++){var H=V;V=0;var K=Y&67108863,O=Math.min(S,G.length-1);for(var z=Math.max(0,S-v.length+1);z<=O;z++){var q=S-z,M=v.words[q]|0,C=G.words[z]|0,w=M*C,u=w&67108863;H=H+(w/67108864|0)|0,u=u+K|0,K=u&67108863,H=H+(u>>>26)|0,V+=H>>>26,H&=67108863}W.words[S]=K,Y=H,H=V}if(Y!==0)W.words[S]=Y;else W.length--;return W.strip()}function _(v,G,W){var Y=new N;return Y.mulp(v,G,W)}J.prototype.mulTo=function(v,G){var W,Y=this.length+v.length;if(this.length===10&&v.length===10)W=g(this,v,G);else if(Y<63)W=k(this,v,G);else if(Y<1024)W=j(this,v,G);else W=_(this,v,G);return W};function N(v,G){this.x=v,this.y=G}N.prototype.makeRBT=function(v){var G=Array(v),W=J.prototype._countBits(v)-1;for(var Y=0;Y<v;Y++)G[Y]=this.revBin(Y,W,v);return G},N.prototype.revBin=function(v,G,W){if(v===0||v===W-1)return v;var Y=0;for(var V=0;V<G;V++)Y|=(v&1)<<G-V-1,v>>=1;return Y},N.prototype.permute=function(v,G,W,Y,V,S){for(var H=0;H<S;H++)Y[H]=G[v[H]],V[H]=W[v[H]]},N.prototype.transform=function(v,G,W,Y,V,S){this.permute(S,v,G,W,Y,V);for(var H=1;H<V;H<<=1){var K=H<<1,O=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K);for(var q=0;q<V;q+=K){var M=O,C=z;for(var w=0;w<H;w++){var u=W[q+w],n=Y[q+w],W$=W[q+w+H],i=Y[q+w+H],b=M*W$-C*i;if(i=M*i+C*W$,W$=b,W[q+w]=u+W$,Y[q+w]=n+i,W[q+w+H]=u-W$,Y[q+w+H]=n-i,w!==K)b=O*M-z*C,C=O*C+z*M,M=b}}}},N.prototype.guessLen13b=function(v,G){var W=Math.max(G,v)|1,Y=W&1,V=0;for(W=W/2|0;W;W=W>>>1)V++;return 1<<V+1+Y},N.prototype.conjugate=function(v,G,W){if(W<=1)return;for(var Y=0;Y<W/2;Y++){var V=v[Y];v[Y]=v[W-Y-1],v[W-Y-1]=V,V=G[Y],G[Y]=-G[W-Y-1],G[W-Y-1]=-V}},N.prototype.normalize13b=function(v,G){var W=0;for(var Y=0;Y<G/2;Y++){var V=Math.round(v[2*Y+1]/G)*8192+Math.round(v[2*Y]/G)+W;if(v[Y]=V&67108863,V<67108864)W=0;else W=V/67108864|0}return v},N.prototype.convert13b=function(v,G,W,Y){var V=0;for(var S=0;S<G;S++)V=V+(v[S]|0),W[2*S]=V&8191,V=V>>>13,W[2*S+1]=V&8191,V=V>>>13;for(S=2*G;S<Y;++S)W[S]=0;U(V===0),U((V&-8192)===0)},N.prototype.stub=function(v){var G=Array(v);for(var W=0;W<v;W++)G[W]=0;return G},N.prototype.mulp=function(v,G,W){var Y=2*this.guessLen13b(v.length,G.length),V=this.makeRBT(Y),S=this.stub(Y),H=Array(Y),K=Array(Y),O=Array(Y),z=Array(Y),q=Array(Y),M=Array(Y),C=W.words;C.length=Y,this.convert13b(v.words,v.length,H,Y),this.convert13b(G.words,G.length,z,Y),this.transform(H,S,K,O,Y,V),this.transform(z,S,q,M,Y,V);for(var w=0;w<Y;w++){var u=K[w]*q[w]-O[w]*M[w];O[w]=K[w]*M[w]+O[w]*q[w],K[w]=u}return this.conjugate(K,O,Y),this.transform(K,O,C,S,Y,V),this.conjugate(C,S,Y),this.normalize13b(C,Y),W.negative=v.negative^G.negative,W.length=v.length+G.length,W.strip()},J.prototype.mul=function(v){var G=new J(null);return G.words=Array(this.length+v.length),this.mulTo(v,G)},J.prototype.mulf=function(v){var G=new J(null);return G.words=Array(this.length+v.length),_(this,v,G)},J.prototype.imul=function(v){return this.clone().mulTo(v,this)},J.prototype.imuln=function(v){U(typeof v==="number"),U(v<67108864);var G=0;for(var W=0;W<this.length;W++){var Y=(this.words[W]|0)*v,V=(Y&67108863)+(G&67108863);G>>=26,G+=Y/67108864|0,G+=V>>>26,this.words[W]=V&67108863}if(G!==0)this.words[W]=G,this.length++;return this.length=v===0?1:this.length,this},J.prototype.muln=function(v){return this.clone().imuln(v)},J.prototype.sqr=function(){return this.mul(this)},J.prototype.isqr=function(){return this.imul(this.clone())},J.prototype.pow=function(v){var G=R(v);if(G.length===0)return new J(1);var W=this;for(var Y=0;Y<G.length;Y++,W=W.sqr())if(G[Y]!==0)break;if(++Y<G.length)for(var V=W.sqr();Y<G.length;Y++,V=V.sqr()){if(G[Y]===0)continue;W=W.mul(V)}return W},J.prototype.iushln=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=67108863>>>26-G<<26-G,V;if(G!==0){var S=0;for(V=0;V<this.length;V++){var H=this.words[V]&Y,K=(this.words[V]|0)-H<<G;this.words[V]=K|S,S=H>>>26-G}if(S)this.words[V]=S,this.length++}if(W!==0){for(V=this.length-1;V>=0;V--)this.words[V+W]=this.words[V];for(V=0;V<W;V++)this.words[V]=0;this.length+=W}return this.strip()},J.prototype.ishln=function(v){return U(this.negative===0),this.iushln(v)},J.prototype.iushrn=function(v,G,W){U(typeof v==="number"&&v>=0);var Y;if(G)Y=(G-G%26)/26;else Y=0;var V=v%26,S=Math.min((v-V)/26,this.length),H=67108863^67108863>>>V<<V,K=W;if(Y-=S,Y=Math.max(0,Y),K){for(var O=0;O<S;O++)K.words[O]=this.words[O];K.length=S}if(S===0);else if(this.length>S){this.length-=S;for(O=0;O<this.length;O++)this.words[O]=this.words[O+S]}else this.words[0]=0,this.length=1;var z=0;for(O=this.length-1;O>=0&&(z!==0||O>=Y);O--){var q=this.words[O]|0;this.words[O]=z<<26-V|q>>>V,z=q&H}if(K&&z!==0)K.words[K.length++]=z;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},J.prototype.ishrn=function(v,G,W){return U(this.negative===0),this.iushrn(v,G,W)},J.prototype.shln=function(v){return this.clone().ishln(v)},J.prototype.ushln=function(v){return this.clone().iushln(v)},J.prototype.shrn=function(v){return this.clone().ishrn(v)},J.prototype.ushrn=function(v){return this.clone().iushrn(v)},J.prototype.testn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return!1;var V=this.words[W];return!!(V&Y)},J.prototype.imaskn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26;if(U(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(G!==0)W++;if(this.length=Math.min(W,this.length),G!==0){var Y=67108863^67108863>>>G<<G;this.words[this.length-1]&=Y}return this.strip()},J.prototype.maskn=function(v){return this.clone().imaskn(v)},J.prototype.iaddn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.isubn(-v);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<v)return this.words[0]=v-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(v),this.negative=1,this}return this._iaddn(v)},J.prototype._iaddn=function(v){this.words[0]+=v;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},J.prototype.isubn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},J.prototype.addn=function(v){return this.clone().iaddn(v)},J.prototype.subn=function(v){return this.clone().isubn(v)},J.prototype.iabs=function(){return this.negative=0,this},J.prototype.abs=function(){return this.clone().iabs()},J.prototype._ishlnsubmul=function(v,G,W){var Y=v.length+W,V;this._expand(Y);var S,H=0;for(V=0;V<v.length;V++){S=(this.words[V+W]|0)+H;var K=(v.words[V]|0)*G;S-=K&67108863,H=(S>>26)-(K/67108864|0),this.words[V+W]=S&67108863}for(;V<this.length-W;V++)S=(this.words[V+W]|0)+H,H=S>>26,this.words[V+W]=S&67108863;if(H===0)return this.strip();U(H===-1),H=0;for(V=0;V<this.length;V++)S=-(this.words[V]|0)+H,H=S>>26,this.words[V]=S&67108863;return this.negative=1,this.strip()},J.prototype._wordDiv=function(v,G){var W=this.length-v.length,Y=this.clone(),V=v,S=V.words[V.length-1]|0,H=this._countBits(S);if(W=26-H,W!==0)V=V.ushln(W),Y.iushln(W),S=V.words[V.length-1]|0;var K=Y.length-V.length,O;if(G!=="mod"){O=new J(null),O.length=K+1,O.words=Array(O.length);for(var z=0;z<O.length;z++)O.words[z]=0}var q=Y.clone()._ishlnsubmul(V,1,K);if(q.negative===0){if(Y=q,O)O.words[K]=1}for(var M=K-1;M>=0;M--){var C=(Y.words[V.length+M]|0)*67108864+(Y.words[V.length+M-1]|0);C=Math.min(C/S|0,67108863),Y._ishlnsubmul(V,C,M);while(Y.negative!==0)if(C--,Y.negative=0,Y._ishlnsubmul(V,1,M),!Y.isZero())Y.negative^=1;if(O)O.words[M]=C}if(O)O.strip();if(Y.strip(),G!=="div"&&W!==0)Y.iushrn(W);return{div:O||null,mod:Y}},J.prototype.divmod=function(v,G,W){if(U(!v.isZero()),this.isZero())return{div:new J(0),mod:new J(0)};var Y,V,S;if(this.negative!==0&&v.negative===0){if(S=this.neg().divmod(v,G),G!=="mod")Y=S.div.neg();if(G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.iadd(v)}return{div:Y,mod:V}}if(this.negative===0&&v.negative!==0){if(S=this.divmod(v.neg(),G),G!=="mod")Y=S.div.neg();return{div:Y,mod:S.mod}}if((this.negative&v.negative)!==0){if(S=this.neg().divmod(v.neg(),G),G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.isub(v)}return{div:S.div,mod:V}}if(v.length>this.length||this.cmp(v)<0)return{div:new J(0),mod:this};if(v.length===1){if(G==="div")return{div:this.divn(v.words[0]),mod:null};if(G==="mod")return{div:null,mod:new J(this.modn(v.words[0]))};return{div:this.divn(v.words[0]),mod:new J(this.modn(v.words[0]))}}return this._wordDiv(v,G)},J.prototype.div=function(v){return this.divmod(v,"div",!1).div},J.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},J.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},J.prototype.divRound=function(v){var G=this.divmod(v);if(G.mod.isZero())return G.div;var W=G.div.negative!==0?G.mod.isub(v):G.mod,Y=v.ushrn(1),V=v.andln(1),S=W.cmp(Y);if(S<0||V===1&&S===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},J.prototype.modn=function(v){U(v<=67108863);var G=67108864%v,W=0;for(var Y=this.length-1;Y>=0;Y--)W=(G*W+(this.words[Y]|0))%v;return W},J.prototype.idivn=function(v){U(v<=67108863);var G=0;for(var W=this.length-1;W>=0;W--){var Y=(this.words[W]|0)+G*67108864;this.words[W]=Y/v|0,G=Y%v}return this.strip()},J.prototype.divn=function(v){return this.clone().idivn(v)},J.prototype.egcd=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=new J(0),H=new J(1),K=0;while(G.isEven()&&W.isEven())G.iushrn(1),W.iushrn(1),++K;var O=W.clone(),z=G.clone();while(!G.isZero()){for(var q=0,M=1;(G.words[0]&M)===0&&q<26;++q,M<<=1);if(q>0){G.iushrn(q);while(q-- >0){if(Y.isOdd()||V.isOdd())Y.iadd(O),V.isub(z);Y.iushrn(1),V.iushrn(1)}}for(var C=0,w=1;(W.words[0]&w)===0&&C<26;++C,w<<=1);if(C>0){W.iushrn(C);while(C-- >0){if(S.isOdd()||H.isOdd())S.iadd(O),H.isub(z);S.iushrn(1),H.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(S),V.isub(H);else W.isub(G),S.isub(Y),H.isub(V)}return{a:S,b:H,gcd:W.iushln(K)}},J.prototype._invmp=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=W.clone();while(G.cmpn(1)>0&&W.cmpn(1)>0){for(var H=0,K=1;(G.words[0]&K)===0&&H<26;++H,K<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Y.isOdd())Y.iadd(S);Y.iushrn(1)}}for(var O=0,z=1;(W.words[0]&z)===0&&O<26;++O,z<<=1);if(O>0){W.iushrn(O);while(O-- >0){if(V.isOdd())V.iadd(S);V.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(V);else W.isub(G),V.isub(Y)}var q;if(G.cmpn(1)===0)q=Y;else q=V;if(q.cmpn(0)<0)q.iadd(v);return q},J.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var G=this.clone(),W=v.clone();G.negative=0,W.negative=0;for(var Y=0;G.isEven()&&W.isEven();Y++)G.iushrn(1),W.iushrn(1);do{while(G.isEven())G.iushrn(1);while(W.isEven())W.iushrn(1);var V=G.cmp(W);if(V<0){var S=G;G=W,W=S}else if(V===0||W.cmpn(1)===0)break;G.isub(W)}while(!0);return W.iushln(Y)},J.prototype.invm=function(v){return this.egcd(v).a.umod(v)},J.prototype.isEven=function(){return(this.words[0]&1)===0},J.prototype.isOdd=function(){return(this.words[0]&1)===1},J.prototype.andln=function(v){return this.words[0]&v},J.prototype.bincn=function(v){U(typeof v==="number");var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return this._expand(W+1),this.words[W]|=Y,this;var V=Y;for(var S=W;V!==0&&S<this.length;S++){var H=this.words[S]|0;H+=V,V=H>>>26,H&=67108863,this.words[S]=H}if(V!==0)this.words[S]=V,this.length++;return this},J.prototype.isZero=function(){return this.length===1&&this.words[0]===0},J.prototype.cmpn=function(v){var G=v<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var W;if(this.length>1)W=1;else{if(G)v=-v;U(v<=67108863,"Number is too big");var Y=this.words[0]|0;W=Y===v?0:Y<v?-1:1}if(this.negative!==0)return-W|0;return W},J.prototype.cmp=function(v){if(this.negative!==0&&v.negative===0)return-1;if(this.negative===0&&v.negative!==0)return 1;var G=this.ucmp(v);if(this.negative!==0)return-G|0;return G},J.prototype.ucmp=function(v){if(this.length>v.length)return 1;if(this.length<v.length)return-1;var G=0;for(var W=this.length-1;W>=0;W--){var Y=this.words[W]|0,V=v.words[W]|0;if(Y===V)continue;if(Y<V)G=-1;else if(Y>V)G=1;break}return G},J.prototype.gtn=function(v){return this.cmpn(v)===1},J.prototype.gt=function(v){return this.cmp(v)===1},J.prototype.gten=function(v){return this.cmpn(v)>=0},J.prototype.gte=function(v){return this.cmp(v)>=0},J.prototype.ltn=function(v){return this.cmpn(v)===-1},J.prototype.lt=function(v){return this.cmp(v)===-1},J.prototype.lten=function(v){return this.cmpn(v)<=0},J.prototype.lte=function(v){return this.cmp(v)<=0},J.prototype.eqn=function(v){return this.cmpn(v)===0},J.prototype.eq=function(v){return this.cmp(v)===0},J.red=function(v){return new p(v)},J.prototype.toRed=function(v){return U(!this.red,"Already a number in reduction context"),U(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},J.prototype.fromRed=function(){return U(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},J.prototype._forceRed=function(v){return this.red=v,this},J.prototype.forceRed=function(v){return U(!this.red,"Already a number in reduction context"),this._forceRed(v)},J.prototype.redAdd=function(v){return U(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},J.prototype.redIAdd=function(v){return U(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},J.prototype.redSub=function(v){return U(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},J.prototype.redISub=function(v){return U(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},J.prototype.redShl=function(v){return U(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},J.prototype.redMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},J.prototype.redIMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},J.prototype.redSqr=function(){return U(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},J.prototype.redISqr=function(){return U(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},J.prototype.redSqrt=function(){return U(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},J.prototype.redInvm=function(){return U(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},J.prototype.redNeg=function(){return U(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},J.prototype.redPow=function(v){return U(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var B={k256:null,p224:null,p192:null,p25519:null};function c(v,G){this.name=v,this.p=new J(G,16),this.n=this.p.bitLength(),this.k=new J(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var v=new J(null);return v.words=Array(Math.ceil(this.n/13)),v},c.prototype.ireduce=function(v){var G=v,W;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),W=G.bitLength();while(W>this.n);var Y=W<this.n?-1:G.ucmp(this.p);if(Y===0)G.words[0]=0,G.length=1;else if(Y>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},c.prototype.split=function(v,G){v.iushrn(this.n,0,G)},c.prototype.imulK=function(v){return v.imul(this.k)};function r(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Q(r,c),r.prototype.split=function(v,G){var W=4194303,Y=Math.min(v.length,9);for(var V=0;V<Y;V++)G.words[V]=v.words[V];if(G.length=Y,v.length<=9){v.words[0]=0,v.length=1;return}var S=v.words[9];G.words[G.length++]=S&W;for(V=10;V<v.length;V++){var H=v.words[V]|0;v.words[V-10]=(H&W)<<4|S>>>22,S=H}if(S>>>=22,v.words[V-10]=S,S===0&&v.length>10)v.length-=10;else v.length-=9},r.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;var G=0;for(var W=0;W<v.length;W++){var Y=v.words[W]|0;G+=Y*977,v.words[W]=G&67108863,G=Y*64+(G/67108864|0)}if(v.words[v.length-1]===0){if(v.length--,v.words[v.length-1]===0)v.length--}return v};function J$(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Q(J$,c);function G$(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Q(G$,c);function X$(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Q(X$,c),X$.prototype.imulK=function(v){var G=0;for(var W=0;W<v.length;W++){var Y=(v.words[W]|0)*19+G,V=Y&67108863;Y>>>=26,v.words[W]=V,G=Y}if(G!==0)v.words[v.length++]=G;return v},J._prime=function(v){if(B[v])return B[v];var G;if(v==="k256")G=new r;else if(v==="p224")G=new J$;else if(v==="p192")G=new G$;else if(v==="p25519")G=new X$;else throw Error("Unknown prime "+v);return B[v]=G,G};function p(v){if(typeof v==="string"){var G=J._prime(v);this.m=G.p,this.prime=G}else U(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}p.prototype._verify1=function(v){U(v.negative===0,"red works only with positives"),U(v.red,"red works only with red numbers")},p.prototype._verify2=function(v,G){U((v.negative|G.negative)===0,"red works only with positives"),U(v.red&&v.red===G.red,"red works only with red numbers")},p.prototype.imod=function(v){if(this.prime)return this.prime.ireduce(v)._forceRed(this);return v.umod(this.m)._forceRed(this)},p.prototype.neg=function(v){if(v.isZero())return v.clone();return this.m.sub(v)._forceRed(this)},p.prototype.add=function(v,G){this._verify2(v,G);var W=v.add(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W._forceRed(this)},p.prototype.iadd=function(v,G){this._verify2(v,G);var W=v.iadd(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W},p.prototype.sub=function(v,G){this._verify2(v,G);var W=v.sub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W._forceRed(this)},p.prototype.isub=function(v,G){this._verify2(v,G);var W=v.isub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W},p.prototype.shl=function(v,G){return this._verify1(v),this.imod(v.ushln(G))},p.prototype.imul=function(v,G){return this._verify2(v,G),this.imod(v.imul(G))},p.prototype.mul=function(v,G){return this._verify2(v,G),this.imod(v.mul(G))},p.prototype.isqr=function(v){return this.imul(v,v.clone())},p.prototype.sqr=function(v){return this.mul(v,v)},p.prototype.sqrt=function(v){if(v.isZero())return v.clone();var G=this.m.andln(3);if(U(G%2===1),G===3){var W=this.m.add(new J(1)).iushrn(2);return this.pow(v,W)}var Y=this.m.subn(1),V=0;while(!Y.isZero()&&Y.andln(1)===0)V++,Y.iushrn(1);U(!Y.isZero());var S=new J(1).toRed(this),H=S.redNeg(),K=this.m.subn(1).iushrn(1),O=this.m.bitLength();O=new J(2*O*O).toRed(this);while(this.pow(O,K).cmp(H)!==0)O.redIAdd(H);var z=this.pow(O,Y),q=this.pow(v,Y.addn(1).iushrn(1)),M=this.pow(v,Y),C=V;while(M.cmp(S)!==0){var w=M;for(var u=0;w.cmp(S)!==0;u++)w=w.redSqr();U(u<C);var n=this.pow(z,new J(1).iushln(C-u-1));q=q.redMul(n),z=n.redSqr(),M=M.redMul(z),C=u}return q},p.prototype.invm=function(v){var G=v._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(v,G){if(G.isZero())return new J(1).toRed(this);if(G.cmpn(1)===0)return v.clone();var W=4,Y=Array(1<<W);Y[0]=new J(1).toRed(this),Y[1]=v;for(var V=2;V<Y.length;V++)Y[V]=this.mul(Y[V-1],v);var S=Y[0],H=0,K=0,O=G.bitLength()%26;if(O===0)O=26;for(V=G.length-1;V>=0;V--){var z=G.words[V];for(var q=O-1;q>=0;q--){var M=z>>q&1;if(S!==Y[0])S=this.sqr(S);if(M===0&&H===0){K=0;continue}if(H<<=1,H|=M,K++,K!==W&&(V!==0||q!==0))continue;S=this.mul(S,Y[H]),K=0,H=0}O=26}return S},p.prototype.convertTo=function(v){var G=v.umod(this.m);return G===v?G.clone():G},p.prototype.convertFrom=function(v){var G=v.clone();return G.red=null,G},J.mont=function(v){return new I$(v)};function I$(v){if(p.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new J(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Q(I$,p),I$.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},I$.prototype.convertFrom=function(v){var G=this.imod(v.mul(this.rinv));return G.red=null,G},I$.prototype.imul=function(v,G){if(v.isZero()||G.isZero())return v.words[0]=0,v.length=1,v;var W=v.imul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.mul=function(v,G){if(v.isZero()||G.isZero())return new J(0)._forceRed(this);var W=v.mul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.invm=function(v){var G=this.imod(v._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof I>"u"||I,$)}),CF=Y$(($,I)=>{var D=gF(),X=kF();I.exports=function(A){return new Q(A)};var U={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};U.p224=U.secp224r1,U.p256=U.secp256r1=U.prime256v1,U.p192=U.secp192r1=U.prime192v1,U.p384=U.secp384r1,U.p521=U.secp521r1;function Q(A){if(this.curveType=U[A],!this.curveType)this.curveType={name:A};this.curve=new D.ec(this.curveType.name),this.keys=void 0}Q.prototype.generateKeys=function(A,T){return this.keys=this.curve.genKeyPair(),this.getPublicKey(A,T)},Q.prototype.computeSecret=function(A,T,Z){if(T=T||"utf8",!Buffer.isBuffer(A))A=new Buffer(A,T);var L=this.curve.keyFromPublic(A).getPublic(),F=L.mul(this.keys.getPrivate()).getX();return J(F,Z,this.curveType.byteLength)},Q.prototype.getPublicKey=function(A,T){var Z=this.keys.getPublic(T==="compressed",!0);if(T==="hybrid")if(Z[Z.length-1]%2)Z[0]=7;else Z[0]=6;return J(Z,A)},Q.prototype.getPrivateKey=function(A){return J(this.keys.getPrivate(),A)},Q.prototype.setPublicKey=function(A,T){if(T=T||"utf8",!Buffer.isBuffer(A))A=new Buffer(A,T);return this.keys._importPublic(A),this},Q.prototype.setPrivateKey=function(A,T){if(T=T||"utf8",!Buffer.isBuffer(A))A=new Buffer(A,T);var Z=new X(A);return Z=Z.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(Z),this};function J(A,T,Z){if(!Array.isArray(A))A=A.toArray();var L=new Buffer(A);if(Z&&L.length<Z){var F=new Buffer(Z-L.length);F.fill(0),L=Buffer.concat([F,L])}if(!T)return L;else return L.toString(T)}}),_F=Y$(($,I)=>{var D=(t0(),e$(m0)).createECDH;I.exports=D||CF()}),jF=Y$(($,I)=>{(function(D,X){function U(v,G){if(!v)throw Error(G||"Assertion failed")}function Q(v,G){v.super_=G;var W=function(){};W.prototype=G.prototype,v.prototype=new W,v.prototype.constructor=v}function J(v,G,W){if(J.isBN(v))return v;if(this.negative=0,this.words=null,this.length=0,this.red=null,v!==null){if(G==="le"||G==="be")W=G,G=10;this._init(v||0,G||10,W||"be")}}if(typeof D==="object")D.exports=J;else X.BN=J;J.BN=J,J.wordSize=26;var A;try{if(typeof window<"u"&&typeof window.Buffer<"u")A=window.Buffer;else A=(j0(),e$(_0)).Buffer}catch(v){}J.isBN=function(v){if(v instanceof J)return!0;return v!==null&&typeof v==="object"&&v.constructor.wordSize===J.wordSize&&Array.isArray(v.words)},J.max=function(v,G){if(v.cmp(G)>0)return v;return G},J.min=function(v,G){if(v.cmp(G)<0)return v;return G},J.prototype._init=function(v,G,W){if(typeof v==="number")return this._initNumber(v,G,W);if(typeof v==="object")return this._initArray(v,G,W);if(G==="hex")G=16;U(G===(G|0)&&G>=2&&G<=36),v=v.toString().replace(/\s+/g,"");var Y=0;if(v[0]==="-")Y++,this.negative=1;if(Y<v.length){if(G===16)this._parseHex(v,Y,W);else if(this._parseBase(v,G,Y),W==="le")this._initArray(this.toArray(),G,W)}},J.prototype._initNumber=function(v,G,W){if(v<0)this.negative=1,v=-v;if(v<67108864)this.words=[v&67108863],this.length=1;else if(v<4503599627370496)this.words=[v&67108863,v/67108864&67108863],this.length=2;else U(v<9007199254740992),this.words=[v&67108863,v/67108864&67108863,1],this.length=3;if(W!=="le")return;this._initArray(this.toArray(),G,W)},J.prototype._initArray=function(v,G,W){if(U(typeof v.length==="number"),v.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(v.length/3),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V,S,H=0;if(W==="be"){for(Y=v.length-1,V=0;Y>=0;Y-=3)if(S=v[Y]|v[Y-1]<<8|v[Y-2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}else if(W==="le"){for(Y=0,V=0;Y<v.length;Y+=3)if(S=v[Y]|v[Y+1]<<8|v[Y+2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}return this.strip()};function T(v,G){var W=v.charCodeAt(G);if(W>=65&&W<=70)return W-55;else if(W>=97&&W<=102)return W-87;else return W-48&15}function Z(v,G,W){var Y=T(v,W);if(W-1>=G)Y|=T(v,W-1)<<4;return Y}J.prototype._parseHex=function(v,G,W){this.length=Math.ceil((v.length-G)/6),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V=0,S=0,H;if(W==="be")for(Y=v.length-1;Y>=G;Y-=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8;else{var K=v.length-G;for(Y=K%2===0?G+1:G;Y<v.length;Y+=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8}this.strip()};function L(v,G,W,Y){var V=0,S=Math.min(v.length,W);for(var H=G;H<S;H++){var K=v.charCodeAt(H)-48;if(V*=Y,K>=49)V+=K-49+10;else if(K>=17)V+=K-17+10;else V+=K}return V}J.prototype._parseBase=function(v,G,W){this.words=[0],this.length=1;for(var Y=0,V=1;V<=67108863;V*=G)Y++;Y--,V=V/G|0;var S=v.length-W,H=S%Y,K=Math.min(S,S-H)+W,O=0;for(var z=W;z<K;z+=Y)if(O=L(v,z,z+Y,G),this.imuln(V),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O);if(H!==0){var q=1;O=L(v,z,v.length,G);for(z=0;z<H;z++)q*=G;if(this.imuln(q),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O)}this.strip()},J.prototype.copy=function(v){v.words=Array(this.length);for(var G=0;G<this.length;G++)v.words[G]=this.words[G];v.length=this.length,v.negative=this.negative,v.red=this.red},J.prototype.clone=function(){var v=new J(null);return this.copy(v),v},J.prototype._expand=function(v){while(this.length<v)this.words[this.length++]=0;return this},J.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},J.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},J.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(J.prototype.toString=function(v,G){v=v||10,G=G|0||1;var W;if(v===16||v==="hex"){W="";var Y=0,V=0;for(var S=0;S<this.length;S++){var H=this.words[S],K=((H<<Y|V)&16777215).toString(16);if(V=H>>>24-Y&16777215,Y+=2,Y>=26)Y-=26,S--;if(V!==0||S!==this.length-1)W=F[6-K.length]+K+W;else W=K+W}if(V!==0)W=V.toString(16)+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}if(v===(v|0)&&v>=2&&v<=36){var O=E[v],z=P[v];W="";var q=this.clone();q.negative=0;while(!q.isZero()){var M=q.modn(z).toString(v);if(q=q.idivn(z),!q.isZero())W=F[O-M.length]+M+W;else W=M+W}if(this.isZero())W="0"+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}U(!1,"Base should be between 2 and 36")},J.prototype.toNumber=function(){var v=this.words[0];if(this.length===2)v+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)v+=4503599627370496+this.words[1]*67108864;else if(this.length>2)U(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-v:v},J.prototype.toJSON=function(){return this.toString(16)},J.prototype.toBuffer=function(v,G){return U(typeof A<"u"),this.toArrayLike(A,v,G)},J.prototype.toArray=function(v,G){return this.toArrayLike(Array,v,G)},J.prototype.toArrayLike=function(v,G,W){var Y=this.byteLength(),V=W||Math.max(1,Y);U(Y<=V,"byte array longer than desired length"),U(V>0,"Requested array length <= 0"),this.strip();var S=G==="le",H=new v(V),K,O,z=this.clone();if(!S){for(O=0;O<V-Y;O++)H[O]=0;for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[V-O-1]=K}else{for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[O]=K;for(;O<V;O++)H[O]=0}return H},Math.clz32)J.prototype._countBits=function(v){return 32-Math.clz32(v)};else J.prototype._countBits=function(v){var G=v,W=0;if(G>=4096)W+=13,G>>>=13;if(G>=64)W+=7,G>>>=7;if(G>=8)W+=4,G>>>=4;if(G>=2)W+=2,G>>>=2;return W+G};J.prototype._zeroBits=function(v){if(v===0)return 26;var G=v,W=0;if((G&8191)===0)W+=13,G>>>=13;if((G&127)===0)W+=7,G>>>=7;if((G&15)===0)W+=4,G>>>=4;if((G&3)===0)W+=2,G>>>=2;if((G&1)===0)W++;return W},J.prototype.bitLength=function(){var v=this.words[this.length-1],G=this._countBits(v);return(this.length-1)*26+G};function R(v){var G=Array(v.bitLength());for(var W=0;W<G.length;W++){var Y=W/26|0,V=W%26;G[W]=(v.words[Y]&1<<V)>>>V}return G}J.prototype.zeroBits=function(){if(this.isZero())return 0;var v=0;for(var G=0;G<this.length;G++){var W=this._zeroBits(this.words[G]);if(v+=W,W!==26)break}return v},J.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},J.prototype.toTwos=function(v){if(this.negative!==0)return this.abs().inotn(v).iaddn(1);return this.clone()},J.prototype.fromTwos=function(v){if(this.testn(v-1))return this.notn(v).iaddn(1).ineg();return this.clone()},J.prototype.isNeg=function(){return this.negative!==0},J.prototype.neg=function(){return this.clone().ineg()},J.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},J.prototype.iuor=function(v){while(this.length<v.length)this.words[this.length++]=0;for(var G=0;G<v.length;G++)this.words[G]=this.words[G]|v.words[G];return this.strip()},J.prototype.ior=function(v){return U((this.negative|v.negative)===0),this.iuor(v)},J.prototype.or=function(v){if(this.length>v.length)return this.clone().ior(v);return v.clone().ior(this)},J.prototype.uor=function(v){if(this.length>v.length)return this.clone().iuor(v);return v.clone().iuor(this)},J.prototype.iuand=function(v){var G;if(this.length>v.length)G=v;else G=this;for(var W=0;W<G.length;W++)this.words[W]=this.words[W]&v.words[W];return this.length=G.length,this.strip()},J.prototype.iand=function(v){return U((this.negative|v.negative)===0),this.iuand(v)},J.prototype.and=function(v){if(this.length>v.length)return this.clone().iand(v);return v.clone().iand(this)},J.prototype.uand=function(v){if(this.length>v.length)return this.clone().iuand(v);return v.clone().iuand(this)},J.prototype.iuxor=function(v){var G,W;if(this.length>v.length)G=this,W=v;else G=v,W=this;for(var Y=0;Y<W.length;Y++)this.words[Y]=G.words[Y]^W.words[Y];if(this!==G)for(;Y<G.length;Y++)this.words[Y]=G.words[Y];return this.length=G.length,this.strip()},J.prototype.ixor=function(v){return U((this.negative|v.negative)===0),this.iuxor(v)},J.prototype.xor=function(v){if(this.length>v.length)return this.clone().ixor(v);return v.clone().ixor(this)},J.prototype.uxor=function(v){if(this.length>v.length)return this.clone().iuxor(v);return v.clone().iuxor(this)},J.prototype.inotn=function(v){U(typeof v==="number"&&v>=0);var G=Math.ceil(v/26)|0,W=v%26;if(this._expand(G),W>0)G--;for(var Y=0;Y<G;Y++)this.words[Y]=~this.words[Y]&67108863;if(W>0)this.words[Y]=~this.words[Y]&67108863>>26-W;return this.strip()},J.prototype.notn=function(v){return this.clone().inotn(v)},J.prototype.setn=function(v,G){U(typeof v==="number"&&v>=0);var W=v/26|0,Y=v%26;if(this._expand(W+1),G)this.words[W]=this.words[W]|1<<Y;else this.words[W]=this.words[W]&~(1<<Y);return this.strip()},J.prototype.iadd=function(v){var G;if(this.negative!==0&&v.negative===0)return this.negative=0,G=this.isub(v),this.negative^=1,this._normSign();else if(this.negative===0&&v.negative!==0)return v.negative=0,G=this.isub(v),v.negative=1,G._normSign();var W,Y;if(this.length>v.length)W=this,Y=v;else W=v,Y=this;var V=0;for(var S=0;S<Y.length;S++)G=(W.words[S]|0)+(Y.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;for(;V!==0&&S<W.length;S++)G=(W.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;if(this.length=W.length,V!==0)this.words[this.length]=V,this.length++;else if(W!==this)for(;S<W.length;S++)this.words[S]=W.words[S];return this},J.prototype.add=function(v){var G;if(v.negative!==0&&this.negative===0)return v.negative=0,G=this.sub(v),v.negative^=1,G;else if(v.negative===0&&this.negative!==0)return this.negative=0,G=v.sub(this),this.negative=1,G;if(this.length>v.length)return this.clone().iadd(v);return v.clone().iadd(this)},J.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var G=this.iadd(v);return v.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var W=this.cmp(v);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,V;if(W>0)Y=this,V=v;else Y=v,V=this;var S=0;for(var H=0;H<V.length;H++)G=(Y.words[H]|0)-(V.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;for(;S!==0&&H<Y.length;H++)G=(Y.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;if(S===0&&H<Y.length&&Y!==this)for(;H<Y.length;H++)this.words[H]=Y.words[H];if(this.length=Math.max(this.length,H),Y!==this)this.negative=1;return this.strip()},J.prototype.sub=function(v){return this.clone().isub(v)};function k(v,G,W){W.negative=G.negative^v.negative;var Y=v.length+G.length|0;W.length=Y,Y=Y-1|0;var V=v.words[0]|0,S=G.words[0]|0,H=V*S,K=H&67108863,O=H/67108864|0;W.words[0]=K;for(var z=1;z<Y;z++){var q=O>>>26,M=O&67108863,C=Math.min(z,G.length-1);for(var w=Math.max(0,z-v.length+1);w<=C;w++){var u=z-w|0;V=v.words[u]|0,S=G.words[w]|0,H=V*S+M,q+=H/67108864|0,M=H&67108863}W.words[z]=M|0,O=q|0}if(O!==0)W.words[z]=O|0;else W.length--;return W.strip()}var g=function(v,G,W){var Y=v.words,V=G.words,S=W.words,H=0,K,O,z,q=Y[0]|0,M=q&8191,C=q>>>13,w=Y[1]|0,u=w&8191,n=w>>>13,W$=Y[2]|0,i=W$&8191,b=W$>>>13,D$=Y[3]|0,d=D$&8191,s=D$>>>13,h$=Y[4]|0,f=h$&8191,h=h$>>>13,O$=Y[5]|0,t=O$&8191,a=O$>>>13,T$=Y[6]|0,y=T$&8191,o=T$>>>13,w$=Y[7]|0,m=w$&8191,v$=w$>>>13,r$=Y[8]|0,S$=r$&8191,A$=r$>>>13,X0=Y[9]|0,K$=X0&8191,F$=X0>>>13,G0=V[0]|0,L$=G0&8191,Z$=G0>>>13,w0=V[1]|0,M$=w0&8191,C$=w0>>>13,c0=V[2]|0,_$=c0&8191,P$=c0>>>13,N0=V[3]|0,j$=N0&8191,q$=N0>>>13,g0=V[4]|0,N$=g0&8191,B$=g0>>>13,k0=V[5]|0,R$=k0&8191,x=k0>>>13,l=V[6]|0,e=l&8191,U$=l>>>13,p$=V[7]|0,z$=p$&8191,H$=p$>>>13,Q0=V[8]|0,g$=Q0&8191,x$=Q0>>>13,B0=V[9]|0,k$=B0&8191,E$=B0>>>13;W.negative=v.negative^G.negative,W.length=19,K=Math.imul(M,L$),O=Math.imul(M,Z$),O=O+Math.imul(C,L$)|0,z=Math.imul(C,Z$);var Y0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,K=Math.imul(u,L$),O=Math.imul(u,Z$),O=O+Math.imul(n,L$)|0,z=Math.imul(n,Z$),K=K+Math.imul(M,M$)|0,O=O+Math.imul(M,C$)|0,O=O+Math.imul(C,M$)|0,z=z+Math.imul(C,C$)|0;var m$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(m$>>>26)|0,m$&=67108863,K=Math.imul(i,L$),O=Math.imul(i,Z$),O=O+Math.imul(b,L$)|0,z=Math.imul(b,Z$),K=K+Math.imul(u,M$)|0,O=O+Math.imul(u,C$)|0,O=O+Math.imul(n,M$)|0,z=z+Math.imul(n,C$)|0,K=K+Math.imul(M,_$)|0,O=O+Math.imul(M,P$)|0,O=O+Math.imul(C,_$)|0,z=z+Math.imul(C,P$)|0;var n$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(n$>>>26)|0,n$&=67108863,K=Math.imul(d,L$),O=Math.imul(d,Z$),O=O+Math.imul(s,L$)|0,z=Math.imul(s,Z$),K=K+Math.imul(i,M$)|0,O=O+Math.imul(i,C$)|0,O=O+Math.imul(b,M$)|0,z=z+Math.imul(b,C$)|0,K=K+Math.imul(u,_$)|0,O=O+Math.imul(u,P$)|0,O=O+Math.imul(n,_$)|0,z=z+Math.imul(n,P$)|0,K=K+Math.imul(M,j$)|0,O=O+Math.imul(M,q$)|0,O=O+Math.imul(C,j$)|0,z=z+Math.imul(C,q$)|0;var v0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(v0>>>26)|0,v0&=67108863,K=Math.imul(f,L$),O=Math.imul(f,Z$),O=O+Math.imul(h,L$)|0,z=Math.imul(h,Z$),K=K+Math.imul(d,M$)|0,O=O+Math.imul(d,C$)|0,O=O+Math.imul(s,M$)|0,z=z+Math.imul(s,C$)|0,K=K+Math.imul(i,_$)|0,O=O+Math.imul(i,P$)|0,O=O+Math.imul(b,_$)|0,z=z+Math.imul(b,P$)|0,K=K+Math.imul(u,j$)|0,O=O+Math.imul(u,q$)|0,O=O+Math.imul(n,j$)|0,z=z+Math.imul(n,q$)|0,K=K+Math.imul(M,N$)|0,O=O+Math.imul(M,B$)|0,O=O+Math.imul(C,N$)|0,z=z+Math.imul(C,B$)|0;var $0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+($0>>>26)|0,$0&=67108863,K=Math.imul(t,L$),O=Math.imul(t,Z$),O=O+Math.imul(a,L$)|0,z=Math.imul(a,Z$),K=K+Math.imul(f,M$)|0,O=O+Math.imul(f,C$)|0,O=O+Math.imul(h,M$)|0,z=z+Math.imul(h,C$)|0,K=K+Math.imul(d,_$)|0,O=O+Math.imul(d,P$)|0,O=O+Math.imul(s,_$)|0,z=z+Math.imul(s,P$)|0,K=K+Math.imul(i,j$)|0,O=O+Math.imul(i,q$)|0,O=O+Math.imul(b,j$)|0,z=z+Math.imul(b,q$)|0,K=K+Math.imul(u,N$)|0,O=O+Math.imul(u,B$)|0,O=O+Math.imul(n,N$)|0,z=z+Math.imul(n,B$)|0,K=K+Math.imul(M,R$)|0,O=O+Math.imul(M,x)|0,O=O+Math.imul(C,R$)|0,z=z+Math.imul(C,x)|0;var K0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(K0>>>26)|0,K0&=67108863,K=Math.imul(y,L$),O=Math.imul(y,Z$),O=O+Math.imul(o,L$)|0,z=Math.imul(o,Z$),K=K+Math.imul(t,M$)|0,O=O+Math.imul(t,C$)|0,O=O+Math.imul(a,M$)|0,z=z+Math.imul(a,C$)|0,K=K+Math.imul(f,_$)|0,O=O+Math.imul(f,P$)|0,O=O+Math.imul(h,_$)|0,z=z+Math.imul(h,P$)|0,K=K+Math.imul(d,j$)|0,O=O+Math.imul(d,q$)|0,O=O+Math.imul(s,j$)|0,z=z+Math.imul(s,q$)|0,K=K+Math.imul(i,N$)|0,O=O+Math.imul(i,B$)|0,O=O+Math.imul(b,N$)|0,z=z+Math.imul(b,B$)|0,K=K+Math.imul(u,R$)|0,O=O+Math.imul(u,x)|0,O=O+Math.imul(n,R$)|0,z=z+Math.imul(n,x)|0,K=K+Math.imul(M,e)|0,O=O+Math.imul(M,U$)|0,O=O+Math.imul(C,e)|0,z=z+Math.imul(C,U$)|0;var z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(z0>>>26)|0,z0&=67108863,K=Math.imul(m,L$),O=Math.imul(m,Z$),O=O+Math.imul(v$,L$)|0,z=Math.imul(v$,Z$),K=K+Math.imul(y,M$)|0,O=O+Math.imul(y,C$)|0,O=O+Math.imul(o,M$)|0,z=z+Math.imul(o,C$)|0,K=K+Math.imul(t,_$)|0,O=O+Math.imul(t,P$)|0,O=O+Math.imul(a,_$)|0,z=z+Math.imul(a,P$)|0,K=K+Math.imul(f,j$)|0,O=O+Math.imul(f,q$)|0,O=O+Math.imul(h,j$)|0,z=z+Math.imul(h,q$)|0,K=K+Math.imul(d,N$)|0,O=O+Math.imul(d,B$)|0,O=O+Math.imul(s,N$)|0,z=z+Math.imul(s,B$)|0,K=K+Math.imul(i,R$)|0,O=O+Math.imul(i,x)|0,O=O+Math.imul(b,R$)|0,z=z+Math.imul(b,x)|0,K=K+Math.imul(u,e)|0,O=O+Math.imul(u,U$)|0,O=O+Math.imul(n,e)|0,z=z+Math.imul(n,U$)|0,K=K+Math.imul(M,z$)|0,O=O+Math.imul(M,H$)|0,O=O+Math.imul(C,z$)|0,z=z+Math.imul(C,H$)|0;var S0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(S0>>>26)|0,S0&=67108863,K=Math.imul(S$,L$),O=Math.imul(S$,Z$),O=O+Math.imul(A$,L$)|0,z=Math.imul(A$,Z$),K=K+Math.imul(m,M$)|0,O=O+Math.imul(m,C$)|0,O=O+Math.imul(v$,M$)|0,z=z+Math.imul(v$,C$)|0,K=K+Math.imul(y,_$)|0,O=O+Math.imul(y,P$)|0,O=O+Math.imul(o,_$)|0,z=z+Math.imul(o,P$)|0,K=K+Math.imul(t,j$)|0,O=O+Math.imul(t,q$)|0,O=O+Math.imul(a,j$)|0,z=z+Math.imul(a,q$)|0,K=K+Math.imul(f,N$)|0,O=O+Math.imul(f,B$)|0,O=O+Math.imul(h,N$)|0,z=z+Math.imul(h,B$)|0,K=K+Math.imul(d,R$)|0,O=O+Math.imul(d,x)|0,O=O+Math.imul(s,R$)|0,z=z+Math.imul(s,x)|0,K=K+Math.imul(i,e)|0,O=O+Math.imul(i,U$)|0,O=O+Math.imul(b,e)|0,z=z+Math.imul(b,U$)|0,K=K+Math.imul(u,z$)|0,O=O+Math.imul(u,H$)|0,O=O+Math.imul(n,z$)|0,z=z+Math.imul(n,H$)|0,K=K+Math.imul(M,g$)|0,O=O+Math.imul(M,x$)|0,O=O+Math.imul(C,g$)|0,z=z+Math.imul(C,x$)|0;var A0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(A0>>>26)|0,A0&=67108863,K=Math.imul(K$,L$),O=Math.imul(K$,Z$),O=O+Math.imul(F$,L$)|0,z=Math.imul(F$,Z$),K=K+Math.imul(S$,M$)|0,O=O+Math.imul(S$,C$)|0,O=O+Math.imul(A$,M$)|0,z=z+Math.imul(A$,C$)|0,K=K+Math.imul(m,_$)|0,O=O+Math.imul(m,P$)|0,O=O+Math.imul(v$,_$)|0,z=z+Math.imul(v$,P$)|0,K=K+Math.imul(y,j$)|0,O=O+Math.imul(y,q$)|0,O=O+Math.imul(o,j$)|0,z=z+Math.imul(o,q$)|0,K=K+Math.imul(t,N$)|0,O=O+Math.imul(t,B$)|0,O=O+Math.imul(a,N$)|0,z=z+Math.imul(a,B$)|0,K=K+Math.imul(f,R$)|0,O=O+Math.imul(f,x)|0,O=O+Math.imul(h,R$)|0,z=z+Math.imul(h,x)|0,K=K+Math.imul(d,e)|0,O=O+Math.imul(d,U$)|0,O=O+Math.imul(s,e)|0,z=z+Math.imul(s,U$)|0,K=K+Math.imul(i,z$)|0,O=O+Math.imul(i,H$)|0,O=O+Math.imul(b,z$)|0,z=z+Math.imul(b,H$)|0,K=K+Math.imul(u,g$)|0,O=O+Math.imul(u,x$)|0,O=O+Math.imul(n,g$)|0,z=z+Math.imul(n,x$)|0,K=K+Math.imul(M,k$)|0,O=O+Math.imul(M,E$)|0,O=O+Math.imul(C,k$)|0,z=z+Math.imul(C,E$)|0;var F0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(F0>>>26)|0,F0&=67108863,K=Math.imul(K$,M$),O=Math.imul(K$,C$),O=O+Math.imul(F$,M$)|0,z=Math.imul(F$,C$),K=K+Math.imul(S$,_$)|0,O=O+Math.imul(S$,P$)|0,O=O+Math.imul(A$,_$)|0,z=z+Math.imul(A$,P$)|0,K=K+Math.imul(m,j$)|0,O=O+Math.imul(m,q$)|0,O=O+Math.imul(v$,j$)|0,z=z+Math.imul(v$,q$)|0,K=K+Math.imul(y,N$)|0,O=O+Math.imul(y,B$)|0,O=O+Math.imul(o,N$)|0,z=z+Math.imul(o,B$)|0,K=K+Math.imul(t,R$)|0,O=O+Math.imul(t,x)|0,O=O+Math.imul(a,R$)|0,z=z+Math.imul(a,x)|0,K=K+Math.imul(f,e)|0,O=O+Math.imul(f,U$)|0,O=O+Math.imul(h,e)|0,z=z+Math.imul(h,U$)|0,K=K+Math.imul(d,z$)|0,O=O+Math.imul(d,H$)|0,O=O+Math.imul(s,z$)|0,z=z+Math.imul(s,H$)|0,K=K+Math.imul(i,g$)|0,O=O+Math.imul(i,x$)|0,O=O+Math.imul(b,g$)|0,z=z+Math.imul(b,x$)|0,K=K+Math.imul(u,k$)|0,O=O+Math.imul(u,E$)|0,O=O+Math.imul(n,k$)|0,z=z+Math.imul(n,E$)|0;var H0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(H0>>>26)|0,H0&=67108863,K=Math.imul(K$,_$),O=Math.imul(K$,P$),O=O+Math.imul(F$,_$)|0,z=Math.imul(F$,P$),K=K+Math.imul(S$,j$)|0,O=O+Math.imul(S$,q$)|0,O=O+Math.imul(A$,j$)|0,z=z+Math.imul(A$,q$)|0,K=K+Math.imul(m,N$)|0,O=O+Math.imul(m,B$)|0,O=O+Math.imul(v$,N$)|0,z=z+Math.imul(v$,B$)|0,K=K+Math.imul(y,R$)|0,O=O+Math.imul(y,x)|0,O=O+Math.imul(o,R$)|0,z=z+Math.imul(o,x)|0,K=K+Math.imul(t,e)|0,O=O+Math.imul(t,U$)|0,O=O+Math.imul(a,e)|0,z=z+Math.imul(a,U$)|0,K=K+Math.imul(f,z$)|0,O=O+Math.imul(f,H$)|0,O=O+Math.imul(h,z$)|0,z=z+Math.imul(h,H$)|0,K=K+Math.imul(d,g$)|0,O=O+Math.imul(d,x$)|0,O=O+Math.imul(s,g$)|0,z=z+Math.imul(s,x$)|0,K=K+Math.imul(i,k$)|0,O=O+Math.imul(i,E$)|0,O=O+Math.imul(b,k$)|0,z=z+Math.imul(b,E$)|0;var Z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,K=Math.imul(K$,j$),O=Math.imul(K$,q$),O=O+Math.imul(F$,j$)|0,z=Math.imul(F$,q$),K=K+Math.imul(S$,N$)|0,O=O+Math.imul(S$,B$)|0,O=O+Math.imul(A$,N$)|0,z=z+Math.imul(A$,B$)|0,K=K+Math.imul(m,R$)|0,O=O+Math.imul(m,x)|0,O=O+Math.imul(v$,R$)|0,z=z+Math.imul(v$,x)|0,K=K+Math.imul(y,e)|0,O=O+Math.imul(y,U$)|0,O=O+Math.imul(o,e)|0,z=z+Math.imul(o,U$)|0,K=K+Math.imul(t,z$)|0,O=O+Math.imul(t,H$)|0,O=O+Math.imul(a,z$)|0,z=z+Math.imul(a,H$)|0,K=K+Math.imul(f,g$)|0,O=O+Math.imul(f,x$)|0,O=O+Math.imul(h,g$)|0,z=z+Math.imul(h,x$)|0,K=K+Math.imul(d,k$)|0,O=O+Math.imul(d,E$)|0,O=O+Math.imul(s,k$)|0,z=z+Math.imul(s,E$)|0;var L0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(L0>>>26)|0,L0&=67108863,K=Math.imul(K$,N$),O=Math.imul(K$,B$),O=O+Math.imul(F$,N$)|0,z=Math.imul(F$,B$),K=K+Math.imul(S$,R$)|0,O=O+Math.imul(S$,x)|0,O=O+Math.imul(A$,R$)|0,z=z+Math.imul(A$,x)|0,K=K+Math.imul(m,e)|0,O=O+Math.imul(m,U$)|0,O=O+Math.imul(v$,e)|0,z=z+Math.imul(v$,U$)|0,K=K+Math.imul(y,z$)|0,O=O+Math.imul(y,H$)|0,O=O+Math.imul(o,z$)|0,z=z+Math.imul(o,H$)|0,K=K+Math.imul(t,g$)|0,O=O+Math.imul(t,x$)|0,O=O+Math.imul(a,g$)|0,z=z+Math.imul(a,x$)|0,K=K+Math.imul(f,k$)|0,O=O+Math.imul(f,E$)|0,O=O+Math.imul(h,k$)|0,z=z+Math.imul(h,E$)|0;var E0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(E0>>>26)|0,E0&=67108863,K=Math.imul(K$,R$),O=Math.imul(K$,x),O=O+Math.imul(F$,R$)|0,z=Math.imul(F$,x),K=K+Math.imul(S$,e)|0,O=O+Math.imul(S$,U$)|0,O=O+Math.imul(A$,e)|0,z=z+Math.imul(A$,U$)|0,K=K+Math.imul(m,z$)|0,O=O+Math.imul(m,H$)|0,O=O+Math.imul(v$,z$)|0,z=z+Math.imul(v$,H$)|0,K=K+Math.imul(y,g$)|0,O=O+Math.imul(y,x$)|0,O=O+Math.imul(o,g$)|0,z=z+Math.imul(o,x$)|0,K=K+Math.imul(t,k$)|0,O=O+Math.imul(t,E$)|0,O=O+Math.imul(a,k$)|0,z=z+Math.imul(a,E$)|0;var T0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(T0>>>26)|0,T0&=67108863,K=Math.imul(K$,e),O=Math.imul(K$,U$),O=O+Math.imul(F$,e)|0,z=Math.imul(F$,U$),K=K+Math.imul(S$,z$)|0,O=O+Math.imul(S$,H$)|0,O=O+Math.imul(A$,z$)|0,z=z+Math.imul(A$,H$)|0,K=K+Math.imul(m,g$)|0,O=O+Math.imul(m,x$)|0,O=O+Math.imul(v$,g$)|0,z=z+Math.imul(v$,x$)|0,K=K+Math.imul(y,k$)|0,O=O+Math.imul(y,E$)|0,O=O+Math.imul(o,k$)|0,z=z+Math.imul(o,E$)|0;var M0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(M0>>>26)|0,M0&=67108863,K=Math.imul(K$,z$),O=Math.imul(K$,H$),O=O+Math.imul(F$,z$)|0,z=Math.imul(F$,H$),K=K+Math.imul(S$,g$)|0,O=O+Math.imul(S$,x$)|0,O=O+Math.imul(A$,g$)|0,z=z+Math.imul(A$,x$)|0,K=K+Math.imul(m,k$)|0,O=O+Math.imul(m,E$)|0,O=O+Math.imul(v$,k$)|0,z=z+Math.imul(v$,E$)|0;var P0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(P0>>>26)|0,P0&=67108863,K=Math.imul(K$,g$),O=Math.imul(K$,x$),O=O+Math.imul(F$,g$)|0,z=Math.imul(F$,x$),K=K+Math.imul(S$,k$)|0,O=O+Math.imul(S$,E$)|0,O=O+Math.imul(A$,k$)|0,z=z+Math.imul(A$,E$)|0;var q0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(q0>>>26)|0,q0&=67108863,K=Math.imul(K$,k$),O=Math.imul(K$,E$),O=O+Math.imul(F$,k$)|0,z=Math.imul(F$,E$);var R0=(H+K|0)+((O&8191)<<13)|0;if(H=(z+(O>>>13)|0)+(R0>>>26)|0,R0&=67108863,S[0]=Y0,S[1]=m$,S[2]=n$,S[3]=v0,S[4]=$0,S[5]=K0,S[6]=z0,S[7]=S0,S[8]=A0,S[9]=F0,S[10]=H0,S[11]=Z0,S[12]=L0,S[13]=E0,S[14]=T0,S[15]=M0,S[16]=P0,S[17]=q0,S[18]=R0,H!==0)S[19]=H,W.length++;return W};if(!Math.imul)g=k;function j(v,G,W){W.negative=G.negative^v.negative,W.length=v.length+G.length;var Y=0,V=0;for(var S=0;S<W.length-1;S++){var H=V;V=0;var K=Y&67108863,O=Math.min(S,G.length-1);for(var z=Math.max(0,S-v.length+1);z<=O;z++){var q=S-z,M=v.words[q]|0,C=G.words[z]|0,w=M*C,u=w&67108863;H=H+(w/67108864|0)|0,u=u+K|0,K=u&67108863,H=H+(u>>>26)|0,V+=H>>>26,H&=67108863}W.words[S]=K,Y=H,H=V}if(Y!==0)W.words[S]=Y;else W.length--;return W.strip()}function _(v,G,W){var Y=new N;return Y.mulp(v,G,W)}J.prototype.mulTo=function(v,G){var W,Y=this.length+v.length;if(this.length===10&&v.length===10)W=g(this,v,G);else if(Y<63)W=k(this,v,G);else if(Y<1024)W=j(this,v,G);else W=_(this,v,G);return W};function N(v,G){this.x=v,this.y=G}N.prototype.makeRBT=function(v){var G=Array(v),W=J.prototype._countBits(v)-1;for(var Y=0;Y<v;Y++)G[Y]=this.revBin(Y,W,v);return G},N.prototype.revBin=function(v,G,W){if(v===0||v===W-1)return v;var Y=0;for(var V=0;V<G;V++)Y|=(v&1)<<G-V-1,v>>=1;return Y},N.prototype.permute=function(v,G,W,Y,V,S){for(var H=0;H<S;H++)Y[H]=G[v[H]],V[H]=W[v[H]]},N.prototype.transform=function(v,G,W,Y,V,S){this.permute(S,v,G,W,Y,V);for(var H=1;H<V;H<<=1){var K=H<<1,O=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K);for(var q=0;q<V;q+=K){var M=O,C=z;for(var w=0;w<H;w++){var u=W[q+w],n=Y[q+w],W$=W[q+w+H],i=Y[q+w+H],b=M*W$-C*i;if(i=M*i+C*W$,W$=b,W[q+w]=u+W$,Y[q+w]=n+i,W[q+w+H]=u-W$,Y[q+w+H]=n-i,w!==K)b=O*M-z*C,C=O*C+z*M,M=b}}}},N.prototype.guessLen13b=function(v,G){var W=Math.max(G,v)|1,Y=W&1,V=0;for(W=W/2|0;W;W=W>>>1)V++;return 1<<V+1+Y},N.prototype.conjugate=function(v,G,W){if(W<=1)return;for(var Y=0;Y<W/2;Y++){var V=v[Y];v[Y]=v[W-Y-1],v[W-Y-1]=V,V=G[Y],G[Y]=-G[W-Y-1],G[W-Y-1]=-V}},N.prototype.normalize13b=function(v,G){var W=0;for(var Y=0;Y<G/2;Y++){var V=Math.round(v[2*Y+1]/G)*8192+Math.round(v[2*Y]/G)+W;if(v[Y]=V&67108863,V<67108864)W=0;else W=V/67108864|0}return v},N.prototype.convert13b=function(v,G,W,Y){var V=0;for(var S=0;S<G;S++)V=V+(v[S]|0),W[2*S]=V&8191,V=V>>>13,W[2*S+1]=V&8191,V=V>>>13;for(S=2*G;S<Y;++S)W[S]=0;U(V===0),U((V&-8192)===0)},N.prototype.stub=function(v){var G=Array(v);for(var W=0;W<v;W++)G[W]=0;return G},N.prototype.mulp=function(v,G,W){var Y=2*this.guessLen13b(v.length,G.length),V=this.makeRBT(Y),S=this.stub(Y),H=Array(Y),K=Array(Y),O=Array(Y),z=Array(Y),q=Array(Y),M=Array(Y),C=W.words;C.length=Y,this.convert13b(v.words,v.length,H,Y),this.convert13b(G.words,G.length,z,Y),this.transform(H,S,K,O,Y,V),this.transform(z,S,q,M,Y,V);for(var w=0;w<Y;w++){var u=K[w]*q[w]-O[w]*M[w];O[w]=K[w]*M[w]+O[w]*q[w],K[w]=u}return this.conjugate(K,O,Y),this.transform(K,O,C,S,Y,V),this.conjugate(C,S,Y),this.normalize13b(C,Y),W.negative=v.negative^G.negative,W.length=v.length+G.length,W.strip()},J.prototype.mul=function(v){var G=new J(null);return G.words=Array(this.length+v.length),this.mulTo(v,G)},J.prototype.mulf=function(v){var G=new J(null);return G.words=Array(this.length+v.length),_(this,v,G)},J.prototype.imul=function(v){return this.clone().mulTo(v,this)},J.prototype.imuln=function(v){U(typeof v==="number"),U(v<67108864);var G=0;for(var W=0;W<this.length;W++){var Y=(this.words[W]|0)*v,V=(Y&67108863)+(G&67108863);G>>=26,G+=Y/67108864|0,G+=V>>>26,this.words[W]=V&67108863}if(G!==0)this.words[W]=G,this.length++;return this.length=v===0?1:this.length,this},J.prototype.muln=function(v){return this.clone().imuln(v)},J.prototype.sqr=function(){return this.mul(this)},J.prototype.isqr=function(){return this.imul(this.clone())},J.prototype.pow=function(v){var G=R(v);if(G.length===0)return new J(1);var W=this;for(var Y=0;Y<G.length;Y++,W=W.sqr())if(G[Y]!==0)break;if(++Y<G.length)for(var V=W.sqr();Y<G.length;Y++,V=V.sqr()){if(G[Y]===0)continue;W=W.mul(V)}return W},J.prototype.iushln=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=67108863>>>26-G<<26-G,V;if(G!==0){var S=0;for(V=0;V<this.length;V++){var H=this.words[V]&Y,K=(this.words[V]|0)-H<<G;this.words[V]=K|S,S=H>>>26-G}if(S)this.words[V]=S,this.length++}if(W!==0){for(V=this.length-1;V>=0;V--)this.words[V+W]=this.words[V];for(V=0;V<W;V++)this.words[V]=0;this.length+=W}return this.strip()},J.prototype.ishln=function(v){return U(this.negative===0),this.iushln(v)},J.prototype.iushrn=function(v,G,W){U(typeof v==="number"&&v>=0);var Y;if(G)Y=(G-G%26)/26;else Y=0;var V=v%26,S=Math.min((v-V)/26,this.length),H=67108863^67108863>>>V<<V,K=W;if(Y-=S,Y=Math.max(0,Y),K){for(var O=0;O<S;O++)K.words[O]=this.words[O];K.length=S}if(S===0);else if(this.length>S){this.length-=S;for(O=0;O<this.length;O++)this.words[O]=this.words[O+S]}else this.words[0]=0,this.length=1;var z=0;for(O=this.length-1;O>=0&&(z!==0||O>=Y);O--){var q=this.words[O]|0;this.words[O]=z<<26-V|q>>>V,z=q&H}if(K&&z!==0)K.words[K.length++]=z;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},J.prototype.ishrn=function(v,G,W){return U(this.negative===0),this.iushrn(v,G,W)},J.prototype.shln=function(v){return this.clone().ishln(v)},J.prototype.ushln=function(v){return this.clone().iushln(v)},J.prototype.shrn=function(v){return this.clone().ishrn(v)},J.prototype.ushrn=function(v){return this.clone().iushrn(v)},J.prototype.testn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return!1;var V=this.words[W];return!!(V&Y)},J.prototype.imaskn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26;if(U(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(G!==0)W++;if(this.length=Math.min(W,this.length),G!==0){var Y=67108863^67108863>>>G<<G;this.words[this.length-1]&=Y}return this.strip()},J.prototype.maskn=function(v){return this.clone().imaskn(v)},J.prototype.iaddn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.isubn(-v);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<v)return this.words[0]=v-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(v),this.negative=1,this}return this._iaddn(v)},J.prototype._iaddn=function(v){this.words[0]+=v;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},J.prototype.isubn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},J.prototype.addn=function(v){return this.clone().iaddn(v)},J.prototype.subn=function(v){return this.clone().isubn(v)},J.prototype.iabs=function(){return this.negative=0,this},J.prototype.abs=function(){return this.clone().iabs()},J.prototype._ishlnsubmul=function(v,G,W){var Y=v.length+W,V;this._expand(Y);var S,H=0;for(V=0;V<v.length;V++){S=(this.words[V+W]|0)+H;var K=(v.words[V]|0)*G;S-=K&67108863,H=(S>>26)-(K/67108864|0),this.words[V+W]=S&67108863}for(;V<this.length-W;V++)S=(this.words[V+W]|0)+H,H=S>>26,this.words[V+W]=S&67108863;if(H===0)return this.strip();U(H===-1),H=0;for(V=0;V<this.length;V++)S=-(this.words[V]|0)+H,H=S>>26,this.words[V]=S&67108863;return this.negative=1,this.strip()},J.prototype._wordDiv=function(v,G){var W=this.length-v.length,Y=this.clone(),V=v,S=V.words[V.length-1]|0,H=this._countBits(S);if(W=26-H,W!==0)V=V.ushln(W),Y.iushln(W),S=V.words[V.length-1]|0;var K=Y.length-V.length,O;if(G!=="mod"){O=new J(null),O.length=K+1,O.words=Array(O.length);for(var z=0;z<O.length;z++)O.words[z]=0}var q=Y.clone()._ishlnsubmul(V,1,K);if(q.negative===0){if(Y=q,O)O.words[K]=1}for(var M=K-1;M>=0;M--){var C=(Y.words[V.length+M]|0)*67108864+(Y.words[V.length+M-1]|0);C=Math.min(C/S|0,67108863),Y._ishlnsubmul(V,C,M);while(Y.negative!==0)if(C--,Y.negative=0,Y._ishlnsubmul(V,1,M),!Y.isZero())Y.negative^=1;if(O)O.words[M]=C}if(O)O.strip();if(Y.strip(),G!=="div"&&W!==0)Y.iushrn(W);return{div:O||null,mod:Y}},J.prototype.divmod=function(v,G,W){if(U(!v.isZero()),this.isZero())return{div:new J(0),mod:new J(0)};var Y,V,S;if(this.negative!==0&&v.negative===0){if(S=this.neg().divmod(v,G),G!=="mod")Y=S.div.neg();if(G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.iadd(v)}return{div:Y,mod:V}}if(this.negative===0&&v.negative!==0){if(S=this.divmod(v.neg(),G),G!=="mod")Y=S.div.neg();return{div:Y,mod:S.mod}}if((this.negative&v.negative)!==0){if(S=this.neg().divmod(v.neg(),G),G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.isub(v)}return{div:S.div,mod:V}}if(v.length>this.length||this.cmp(v)<0)return{div:new J(0),mod:this};if(v.length===1){if(G==="div")return{div:this.divn(v.words[0]),mod:null};if(G==="mod")return{div:null,mod:new J(this.modn(v.words[0]))};return{div:this.divn(v.words[0]),mod:new J(this.modn(v.words[0]))}}return this._wordDiv(v,G)},J.prototype.div=function(v){return this.divmod(v,"div",!1).div},J.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},J.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},J.prototype.divRound=function(v){var G=this.divmod(v);if(G.mod.isZero())return G.div;var W=G.div.negative!==0?G.mod.isub(v):G.mod,Y=v.ushrn(1),V=v.andln(1),S=W.cmp(Y);if(S<0||V===1&&S===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},J.prototype.modn=function(v){U(v<=67108863);var G=67108864%v,W=0;for(var Y=this.length-1;Y>=0;Y--)W=(G*W+(this.words[Y]|0))%v;return W},J.prototype.idivn=function(v){U(v<=67108863);var G=0;for(var W=this.length-1;W>=0;W--){var Y=(this.words[W]|0)+G*67108864;this.words[W]=Y/v|0,G=Y%v}return this.strip()},J.prototype.divn=function(v){return this.clone().idivn(v)},J.prototype.egcd=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=new J(0),H=new J(1),K=0;while(G.isEven()&&W.isEven())G.iushrn(1),W.iushrn(1),++K;var O=W.clone(),z=G.clone();while(!G.isZero()){for(var q=0,M=1;(G.words[0]&M)===0&&q<26;++q,M<<=1);if(q>0){G.iushrn(q);while(q-- >0){if(Y.isOdd()||V.isOdd())Y.iadd(O),V.isub(z);Y.iushrn(1),V.iushrn(1)}}for(var C=0,w=1;(W.words[0]&w)===0&&C<26;++C,w<<=1);if(C>0){W.iushrn(C);while(C-- >0){if(S.isOdd()||H.isOdd())S.iadd(O),H.isub(z);S.iushrn(1),H.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(S),V.isub(H);else W.isub(G),S.isub(Y),H.isub(V)}return{a:S,b:H,gcd:W.iushln(K)}},J.prototype._invmp=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=W.clone();while(G.cmpn(1)>0&&W.cmpn(1)>0){for(var H=0,K=1;(G.words[0]&K)===0&&H<26;++H,K<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Y.isOdd())Y.iadd(S);Y.iushrn(1)}}for(var O=0,z=1;(W.words[0]&z)===0&&O<26;++O,z<<=1);if(O>0){W.iushrn(O);while(O-- >0){if(V.isOdd())V.iadd(S);V.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(V);else W.isub(G),V.isub(Y)}var q;if(G.cmpn(1)===0)q=Y;else q=V;if(q.cmpn(0)<0)q.iadd(v);return q},J.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var G=this.clone(),W=v.clone();G.negative=0,W.negative=0;for(var Y=0;G.isEven()&&W.isEven();Y++)G.iushrn(1),W.iushrn(1);do{while(G.isEven())G.iushrn(1);while(W.isEven())W.iushrn(1);var V=G.cmp(W);if(V<0){var S=G;G=W,W=S}else if(V===0||W.cmpn(1)===0)break;G.isub(W)}while(!0);return W.iushln(Y)},J.prototype.invm=function(v){return this.egcd(v).a.umod(v)},J.prototype.isEven=function(){return(this.words[0]&1)===0},J.prototype.isOdd=function(){return(this.words[0]&1)===1},J.prototype.andln=function(v){return this.words[0]&v},J.prototype.bincn=function(v){U(typeof v==="number");var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return this._expand(W+1),this.words[W]|=Y,this;var V=Y;for(var S=W;V!==0&&S<this.length;S++){var H=this.words[S]|0;H+=V,V=H>>>26,H&=67108863,this.words[S]=H}if(V!==0)this.words[S]=V,this.length++;return this},J.prototype.isZero=function(){return this.length===1&&this.words[0]===0},J.prototype.cmpn=function(v){var G=v<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var W;if(this.length>1)W=1;else{if(G)v=-v;U(v<=67108863,"Number is too big");var Y=this.words[0]|0;W=Y===v?0:Y<v?-1:1}if(this.negative!==0)return-W|0;return W},J.prototype.cmp=function(v){if(this.negative!==0&&v.negative===0)return-1;if(this.negative===0&&v.negative!==0)return 1;var G=this.ucmp(v);if(this.negative!==0)return-G|0;return G},J.prototype.ucmp=function(v){if(this.length>v.length)return 1;if(this.length<v.length)return-1;var G=0;for(var W=this.length-1;W>=0;W--){var Y=this.words[W]|0,V=v.words[W]|0;if(Y===V)continue;if(Y<V)G=-1;else if(Y>V)G=1;break}return G},J.prototype.gtn=function(v){return this.cmpn(v)===1},J.prototype.gt=function(v){return this.cmp(v)===1},J.prototype.gten=function(v){return this.cmpn(v)>=0},J.prototype.gte=function(v){return this.cmp(v)>=0},J.prototype.ltn=function(v){return this.cmpn(v)===-1},J.prototype.lt=function(v){return this.cmp(v)===-1},J.prototype.lten=function(v){return this.cmpn(v)<=0},J.prototype.lte=function(v){return this.cmp(v)<=0},J.prototype.eqn=function(v){return this.cmpn(v)===0},J.prototype.eq=function(v){return this.cmp(v)===0},J.red=function(v){return new p(v)},J.prototype.toRed=function(v){return U(!this.red,"Already a number in reduction context"),U(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},J.prototype.fromRed=function(){return U(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},J.prototype._forceRed=function(v){return this.red=v,this},J.prototype.forceRed=function(v){return U(!this.red,"Already a number in reduction context"),this._forceRed(v)},J.prototype.redAdd=function(v){return U(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},J.prototype.redIAdd=function(v){return U(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},J.prototype.redSub=function(v){return U(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},J.prototype.redISub=function(v){return U(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},J.prototype.redShl=function(v){return U(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},J.prototype.redMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},J.prototype.redIMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},J.prototype.redSqr=function(){return U(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},J.prototype.redISqr=function(){return U(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},J.prototype.redSqrt=function(){return U(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},J.prototype.redInvm=function(){return U(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},J.prototype.redNeg=function(){return U(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},J.prototype.redPow=function(v){return U(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var B={k256:null,p224:null,p192:null,p25519:null};function c(v,G){this.name=v,this.p=new J(G,16),this.n=this.p.bitLength(),this.k=new J(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var v=new J(null);return v.words=Array(Math.ceil(this.n/13)),v},c.prototype.ireduce=function(v){var G=v,W;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),W=G.bitLength();while(W>this.n);var Y=W<this.n?-1:G.ucmp(this.p);if(Y===0)G.words[0]=0,G.length=1;else if(Y>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},c.prototype.split=function(v,G){v.iushrn(this.n,0,G)},c.prototype.imulK=function(v){return v.imul(this.k)};function r(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Q(r,c),r.prototype.split=function(v,G){var W=4194303,Y=Math.min(v.length,9);for(var V=0;V<Y;V++)G.words[V]=v.words[V];if(G.length=Y,v.length<=9){v.words[0]=0,v.length=1;return}var S=v.words[9];G.words[G.length++]=S&W;for(V=10;V<v.length;V++){var H=v.words[V]|0;v.words[V-10]=(H&W)<<4|S>>>22,S=H}if(S>>>=22,v.words[V-10]=S,S===0&&v.length>10)v.length-=10;else v.length-=9},r.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;var G=0;for(var W=0;W<v.length;W++){var Y=v.words[W]|0;G+=Y*977,v.words[W]=G&67108863,G=Y*64+(G/67108864|0)}if(v.words[v.length-1]===0){if(v.length--,v.words[v.length-1]===0)v.length--}return v};function J$(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Q(J$,c);function G$(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Q(G$,c);function X$(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Q(X$,c),X$.prototype.imulK=function(v){var G=0;for(var W=0;W<v.length;W++){var Y=(v.words[W]|0)*19+G,V=Y&67108863;Y>>>=26,v.words[W]=V,G=Y}if(G!==0)v.words[v.length++]=G;return v},J._prime=function(v){if(B[v])return B[v];var G;if(v==="k256")G=new r;else if(v==="p224")G=new J$;else if(v==="p192")G=new G$;else if(v==="p25519")G=new X$;else throw Error("Unknown prime "+v);return B[v]=G,G};function p(v){if(typeof v==="string"){var G=J._prime(v);this.m=G.p,this.prime=G}else U(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}p.prototype._verify1=function(v){U(v.negative===0,"red works only with positives"),U(v.red,"red works only with red numbers")},p.prototype._verify2=function(v,G){U((v.negative|G.negative)===0,"red works only with positives"),U(v.red&&v.red===G.red,"red works only with red numbers")},p.prototype.imod=function(v){if(this.prime)return this.prime.ireduce(v)._forceRed(this);return v.umod(this.m)._forceRed(this)},p.prototype.neg=function(v){if(v.isZero())return v.clone();return this.m.sub(v)._forceRed(this)},p.prototype.add=function(v,G){this._verify2(v,G);var W=v.add(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W._forceRed(this)},p.prototype.iadd=function(v,G){this._verify2(v,G);var W=v.iadd(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W},p.prototype.sub=function(v,G){this._verify2(v,G);var W=v.sub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W._forceRed(this)},p.prototype.isub=function(v,G){this._verify2(v,G);var W=v.isub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W},p.prototype.shl=function(v,G){return this._verify1(v),this.imod(v.ushln(G))},p.prototype.imul=function(v,G){return this._verify2(v,G),this.imod(v.imul(G))},p.prototype.mul=function(v,G){return this._verify2(v,G),this.imod(v.mul(G))},p.prototype.isqr=function(v){return this.imul(v,v.clone())},p.prototype.sqr=function(v){return this.mul(v,v)},p.prototype.sqrt=function(v){if(v.isZero())return v.clone();var G=this.m.andln(3);if(U(G%2===1),G===3){var W=this.m.add(new J(1)).iushrn(2);return this.pow(v,W)}var Y=this.m.subn(1),V=0;while(!Y.isZero()&&Y.andln(1)===0)V++,Y.iushrn(1);U(!Y.isZero());var S=new J(1).toRed(this),H=S.redNeg(),K=this.m.subn(1).iushrn(1),O=this.m.bitLength();O=new J(2*O*O).toRed(this);while(this.pow(O,K).cmp(H)!==0)O.redIAdd(H);var z=this.pow(O,Y),q=this.pow(v,Y.addn(1).iushrn(1)),M=this.pow(v,Y),C=V;while(M.cmp(S)!==0){var w=M;for(var u=0;w.cmp(S)!==0;u++)w=w.redSqr();U(u<C);var n=this.pow(z,new J(1).iushln(C-u-1));q=q.redMul(n),z=n.redSqr(),M=M.redMul(z),C=u}return q},p.prototype.invm=function(v){var G=v._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(v,G){if(G.isZero())return new J(1).toRed(this);if(G.cmpn(1)===0)return v.clone();var W=4,Y=Array(1<<W);Y[0]=new J(1).toRed(this),Y[1]=v;for(var V=2;V<Y.length;V++)Y[V]=this.mul(Y[V-1],v);var S=Y[0],H=0,K=0,O=G.bitLength()%26;if(O===0)O=26;for(V=G.length-1;V>=0;V--){var z=G.words[V];for(var q=O-1;q>=0;q--){var M=z>>q&1;if(S!==Y[0])S=this.sqr(S);if(M===0&&H===0){K=0;continue}if(H<<=1,H|=M,K++,K!==W&&(V!==0||q!==0))continue;S=this.mul(S,Y[H]),K=0,H=0}O=26}return S},p.prototype.convertTo=function(v){var G=v.umod(this.m);return G===v?G.clone():G},p.prototype.convertFrom=function(v){var G=v.clone();return G.red=null,G},J.mont=function(v){return new I$(v)};function I$(v){if(p.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new J(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Q(I$,p),I$.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},I$.prototype.convertFrom=function(v){var G=this.imod(v.mul(this.rinv));return G.red=null,G},I$.prototype.imul=function(v,G){if(v.isZero()||G.isZero())return v.words[0]=0,v.length=1,v;var W=v.imul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.mul=function(v,G){if(v.isZero()||G.isZero())return new J(0)._forceRed(this);var W=v.mul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.invm=function(v){var G=this.imod(v._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof I>"u"||I,$)}),NF=Y$(($)=>{var I=k6(),D=s0(),X=$;X.define=function(Q,J){return new U(Q,J)};function U(Q,J){this.name=Q,this.body=J,this.decoders={},this.encoders={}}U.prototype._createNamed=function(Q){var J;try{J=(()=>{throw new Error("Cannot require module "+"vm");})().runInThisContext("(function "+this.name+`(entity) {
12
12
  this._initNamed(entity);
13
- })`)}catch(M){Y=function(T){this._initNamed(T)}}return J(Y,S),Y.prototype._initNamed=function(M){S.call(this,M)},new Y(this)},I.prototype._getDecoder=function(S){if(S=S||"der",!this.decoders.hasOwnProperty(S))this.decoders[S]=this._createNamed(U.decoders[S]);return this.decoders[S]},I.prototype.decode=function(S,Y,M){return this._getDecoder(Y).decode(S,M)},I.prototype._getEncoder=function(S){if(S=S||"der",!this.encoders.hasOwnProperty(S))this.encoders[S]=this._createNamed(U.encoders[S]);return this.encoders[S]},I.prototype.encode=function(S,Y,M){return this._getEncoder(Y).encode(S,M)}}),pA=G0(($)=>{var U=o$();function J(I){this._reporterState={obj:null,path:[],options:I||{},errors:[]}}$.Reporter=J,J.prototype.isError=function(I){return I instanceof V},J.prototype.save=function(){var I=this._reporterState;return{obj:I.obj,pathLen:I.path.length}},J.prototype.restore=function(I){var S=this._reporterState;S.obj=I.obj,S.path=S.path.slice(0,I.pathLen)},J.prototype.enterKey=function(I){return this._reporterState.path.push(I)},J.prototype.exitKey=function(I){var S=this._reporterState;S.path=S.path.slice(0,I-1)},J.prototype.leaveKey=function(I,S,Y){var M=this._reporterState;if(this.exitKey(I),M.obj!==null)M.obj[S]=Y},J.prototype.path=function(){return this._reporterState.path.join("/")},J.prototype.enterObject=function(){var I=this._reporterState,S=I.obj;return I.obj={},S},J.prototype.leaveObject=function(I){var S=this._reporterState,Y=S.obj;return S.obj=I,Y},J.prototype.error=function(I){var S,Y=this._reporterState,M=I instanceof V;if(M)S=I;else S=new V(Y.path.map(function(T){return"["+JSON.stringify(T)+"]"}).join(""),I.message||I,I.stack);if(!Y.options.partial)throw S;if(!M)Y.errors.push(S);return S},J.prototype.wrapResult=function(I){var S=this._reporterState;if(!S.options.partial)return I;return{result:this.isError(I)?null:I,errors:S.errors}};function V(I,S){this.path=I,this.rethrow(S)}U(V,Error),V.prototype.rethrow=function(I){if(this.message=I+" at: "+(this.path||"(shallow)"),Error.captureStackTrace)Error.captureStackTrace(this,V);if(!this.stack)try{throw Error(this.message)}catch(S){this.stack=S.stack}return this}}),WV=G0(($)=>{var U=o$(),J=rI().Reporter,V=(g$(),d0(k$)).Buffer;function I(Y,M){if(J.call(this,M),!V.isBuffer(Y)){this.error("Input not Buffer");return}this.base=Y,this.offset=0,this.length=Y.length}U(I,J),$.DecoderBuffer=I,I.prototype.save=function(){return{offset:this.offset,reporter:J.prototype.save.call(this)}},I.prototype.restore=function(Y){var M=new I(this.base);return M.offset=Y.offset,M.length=this.offset,this.offset=Y.offset,J.prototype.restore.call(this,Y.reporter),M},I.prototype.isEmpty=function(){return this.offset===this.length},I.prototype.readUInt8=function(Y){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,!0);else return this.error(Y||"DecoderBuffer overrun")},I.prototype.skip=function(Y,M){if(!(this.offset+Y<=this.length))return this.error(M||"DecoderBuffer overrun");var T=new I(this.base);return T._reporterState=this._reporterState,T.offset=this.offset,T.length=this.offset+Y,this.offset+=Y,T},I.prototype.raw=function(Y){return this.base.slice(Y?Y.offset:this.offset,this.length)};function S(Y,M){if(Array.isArray(Y))this.length=0,this.value=Y.map(function(T){if(!(T instanceof S))T=new S(T,M);return this.length+=T.length,T},this);else if(typeof Y==="number"){if(!(0<=Y&&Y<=255))return M.error("non-byte EncoderBuffer value");this.value=Y,this.length=1}else if(typeof Y==="string")this.value=Y,this.length=V.byteLength(Y);else if(V.isBuffer(Y))this.value=Y,this.length=Y.length;else return M.error("Unsupported type: "+typeof Y)}$.EncoderBuffer=S,S.prototype.join=function(Y,M){if(!Y)Y=new V(this.length);if(!M)M=0;if(this.length===0)return Y;if(Array.isArray(this.value))this.value.forEach(function(T){T.join(Y,M),M+=T.length});else{if(typeof this.value==="number")Y[M]=this.value;else if(typeof this.value==="string")Y.write(this.value,M);else if(V.isBuffer(this.value))this.value.copy(Y,M);M+=this.length}return Y}}),bA=G0(($,U)=>{var J=rI().Reporter,V=rI().EncoderBuffer,I=rI().DecoderBuffer,S=MU(),Y=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],M=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Y),T=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function L(F,Z){var P={};if(this._baseState=P,P.enc=F,P.parent=Z||null,P.children=null,P.tag=null,P.args=null,P.reverseArgs=null,P.choice=null,P.optional=!1,P.any=!1,P.obj=!1,P.use=null,P.useDecoder=null,P.key=null,P.default=null,P.explicit=null,P.implicit=null,P.contains=null,!P.parent)P.children=[],this._wrap()}U.exports=L;var E=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];L.prototype.clone=function(){var F=this._baseState,Z={};E.forEach(function(q){Z[q]=F[q]});var P=new this.constructor(Z.parent);return P._baseState=Z,P},L.prototype._wrap=function(){var F=this._baseState;M.forEach(function(Z){this[Z]=function(){var P=new this.constructor(this);return F.children.push(P),P[Z].apply(P,arguments)}},this)},L.prototype._init=function(F){var Z=this._baseState;S(Z.parent===null),F.call(this),Z.children=Z.children.filter(function(P){return P._baseState.parent===this},this),S.equal(Z.children.length,1,"Root node can have only one child")},L.prototype._useArgs=function(F){var Z=this._baseState,P=F.filter(function(q){return q instanceof this.constructor},this);if(F=F.filter(function(q){return!(q instanceof this.constructor)},this),P.length!==0)S(Z.children===null),Z.children=P,P.forEach(function(q){q._baseState.parent=this},this);if(F.length!==0)S(Z.args===null),Z.args=F,Z.reverseArgs=F.map(function(q){if(typeof q!=="object"||q.constructor!==Object)return q;var k={};return Object.keys(q).forEach(function(C){if(C==(C|0))C|=0;var _=q[C];k[_]=C}),k})},T.forEach(function(F){L.prototype[F]=function(){var Z=this._baseState;throw Error(F+" not implemented for encoding: "+Z.enc)}}),Y.forEach(function(F){L.prototype[F]=function(){var Z=this._baseState,P=Array.prototype.slice.call(arguments);return S(Z.tag===null),Z.tag=F,this._useArgs(P),this}}),L.prototype.use=function(F){S(F);var Z=this._baseState;return S(Z.use===null),Z.use=F,this},L.prototype.optional=function(){var F=this._baseState;return F.optional=!0,this},L.prototype.def=function(F){var Z=this._baseState;return S(Z.default===null),Z.default=F,Z.optional=!0,this},L.prototype.explicit=function(F){var Z=this._baseState;return S(Z.explicit===null&&Z.implicit===null),Z.explicit=F,this},L.prototype.implicit=function(F){var Z=this._baseState;return S(Z.explicit===null&&Z.implicit===null),Z.implicit=F,this},L.prototype.obj=function(){var F=this._baseState,Z=Array.prototype.slice.call(arguments);if(F.obj=!0,Z.length!==0)this._useArgs(Z);return this},L.prototype.key=function(F){var Z=this._baseState;return S(Z.key===null),Z.key=F,this},L.prototype.any=function(){var F=this._baseState;return F.any=!0,this},L.prototype.choice=function(F){var Z=this._baseState;return S(Z.choice===null),Z.choice=F,this._useArgs(Object.keys(F).map(function(P){return F[P]})),this},L.prototype.contains=function(F){var Z=this._baseState;return S(Z.use===null),Z.contains=F,this},L.prototype._decode=function(F,Z){var P=this._baseState;if(P.parent===null)return F.wrapResult(P.children[0]._decode(F,Z));var q=P.default,k=!0,C=null;if(P.key!==null)C=F.enterKey(P.key);if(P.optional){var _=null;if(P.explicit!==null)_=P.explicit;else if(P.implicit!==null)_=P.implicit;else if(P.tag!==null)_=P.tag;if(_===null&&!P.any){var g=F.save();try{if(P.choice===null)this._decodeGeneric(P.tag,F,Z);else this._decodeChoice(F,Z);k=!0}catch(V0){k=!1}F.restore(g)}else if(k=this._peekTag(F,_,P.any),F.isError(k))return k}var N;if(P.obj&&k)N=F.enterObject();if(k){if(P.explicit!==null){var x=this._decodeTag(F,P.explicit);if(F.isError(x))return x;F=x}var w=F.offset;if(P.use===null&&P.choice===null){if(P.any)var g=F.save();var o=this._decodeTag(F,P.implicit!==null?P.implicit:P.tag,P.any);if(F.isError(o))return o;if(P.any)q=F.raw(g);else F=o}if(Z&&Z.track&&P.tag!==null)Z.track(F.path(),w,F.length,"tagged");if(Z&&Z.track&&P.tag!==null)Z.track(F.path(),F.offset,F.length,"content");if(P.any)q=q;else if(P.choice===null)q=this._decodeGeneric(P.tag,F,Z);else q=this._decodeChoice(F,Z);if(F.isError(q))return q;if(!P.any&&P.choice===null&&P.children!==null)P.children.forEach(function(V0){V0._decode(F,Z)});if(P.contains&&(P.tag==="octstr"||P.tag==="bitstr")){var Q0=new I(q);q=this._getUse(P.contains,F._reporterState.obj)._decode(Q0,Z)}}if(P.obj&&k)q=F.leaveObject(N);if(P.key!==null&&(q!==null||k===!0))F.leaveKey(C,P.key,q);else if(C!==null)F.exitKey(C);return q},L.prototype._decodeGeneric=function(F,Z,P){var q=this._baseState;if(F==="seq"||F==="set")return null;if(F==="seqof"||F==="setof")return this._decodeList(Z,F,q.args[0],P);else if(/str$/.test(F))return this._decodeStr(Z,F,P);else if(F==="objid"&&q.args)return this._decodeObjid(Z,q.args[0],q.args[1],P);else if(F==="objid")return this._decodeObjid(Z,null,null,P);else if(F==="gentime"||F==="utctime")return this._decodeTime(Z,F,P);else if(F==="null_")return this._decodeNull(Z,P);else if(F==="bool")return this._decodeBool(Z,P);else if(F==="objDesc")return this._decodeStr(Z,F,P);else if(F==="int"||F==="enum")return this._decodeInt(Z,q.args&&q.args[0],P);if(q.use!==null)return this._getUse(q.use,Z._reporterState.obj)._decode(Z,P);else return Z.error("unknown tag: "+F)},L.prototype._getUse=function(F,Z){var P=this._baseState;if(P.useDecoder=this._use(F,Z),S(P.useDecoder._baseState.parent===null),P.useDecoder=P.useDecoder._baseState.children[0],P.implicit!==P.useDecoder._baseState.implicit)P.useDecoder=P.useDecoder.clone(),P.useDecoder._baseState.implicit=P.implicit;return P.useDecoder},L.prototype._decodeChoice=function(F,Z){var P=this._baseState,q=null,k=!1;if(Object.keys(P.choice).some(function(C){var _=F.save(),g=P.choice[C];try{var N=g._decode(F,Z);if(F.isError(N))return!1;q={type:C,value:N},k=!0}catch(x){return F.restore(_),!1}return!0},this),!k)return F.error("Choice not matched");return q},L.prototype._createEncoderBuffer=function(F){return new V(F,this.reporter)},L.prototype._encode=function(F,Z,P){var q=this._baseState;if(q.default!==null&&q.default===F)return;var k=this._encodeValue(F,Z,P);if(k===void 0)return;if(this._skipDefault(k,Z,P))return;return k},L.prototype._encodeValue=function(F,Z,P){var q=this._baseState;if(q.parent===null)return q.children[0]._encode(F,Z||new J);var g=null;if(this.reporter=Z,q.optional&&F===void 0)if(q.default!==null)F=q.default;else return;var k=null,C=!1;if(q.any)g=this._createEncoderBuffer(F);else if(q.choice)g=this._encodeChoice(F,Z);else if(q.contains)k=this._getUse(q.contains,P)._encode(F,Z),C=!0;else if(q.children)k=q.children.map(function(w){if(w._baseState.tag==="null_")return w._encode(null,Z,F);if(w._baseState.key===null)return Z.error("Child should have a key");var o=Z.enterKey(w._baseState.key);if(typeof F!=="object")return Z.error("Child expected, but input is not object");var Q0=w._encode(F[w._baseState.key],Z,F);return Z.leaveKey(o),Q0},this).filter(function(w){return w}),k=this._createEncoderBuffer(k);else if(q.tag==="seqof"||q.tag==="setof"){if(!(q.args&&q.args.length===1))return Z.error("Too many args for : "+q.tag);if(!Array.isArray(F))return Z.error("seqof/setof, but data is not Array");var _=this.clone();_._baseState.implicit=null,k=this._createEncoderBuffer(F.map(function(w){var o=this._baseState;return this._getUse(o.args[0],F)._encode(w,Z)},_))}else if(q.use!==null)g=this._getUse(q.use,P)._encode(F,Z);else k=this._encodePrimitive(q.tag,F),C=!0;var g;if(!q.any&&q.choice===null){var N=q.implicit!==null?q.implicit:q.tag,x=q.implicit===null?"universal":"context";if(N===null){if(q.use===null)Z.error("Tag could be omitted only for .use()")}else if(q.use===null)g=this._encodeComposite(N,C,x,k)}if(q.explicit!==null)g=this._encodeComposite(q.explicit,!1,"context",g);return g},L.prototype._encodeChoice=function(F,Z){var P=this._baseState,q=P.choice[F.type];if(!q)S(!1,F.type+" not found in "+JSON.stringify(Object.keys(P.choice)));return q._encode(F.value,Z)},L.prototype._encodePrimitive=function(F,Z){var P=this._baseState;if(/str$/.test(F))return this._encodeStr(Z,F);else if(F==="objid"&&P.args)return this._encodeObjid(Z,P.reverseArgs[0],P.args[1]);else if(F==="objid")return this._encodeObjid(Z,null,null);else if(F==="gentime"||F==="utctime")return this._encodeTime(Z,F);else if(F==="null_")return this._encodeNull();else if(F==="int"||F==="enum")return this._encodeInt(Z,P.args&&P.reverseArgs[0]);else if(F==="bool")return this._encodeBool(Z);else if(F==="objDesc")return this._encodeStr(Z,F);else throw Error("Unsupported tag: "+F)},L.prototype._isNumstr=function(F){return/^[0-9 ]*$/.test(F)},L.prototype._isPrintstr=function(F){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(F)}}),rI=G0(($)=>{var U=$;U.Reporter=pA().Reporter,U.DecoderBuffer=WV().DecoderBuffer,U.EncoderBuffer=WV().EncoderBuffer,U.Node=bA()}),lA=G0(($)=>{var U=jV();$.tagClass={0:"universal",1:"application",2:"context",3:"private"},$.tagClassByName=U._reverse($.tagClass),$.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},$.tagByName=U._reverse($.tag)}),jV=G0(($)=>{var U=$;U._reverse=function(J){var V={};return Object.keys(J).forEach(function(I){if((I|0)==I)I=I|0;var S=J[I];V[S]=I}),V},U.der=lA()}),_V=G0(($,U)=>{var J=o$(),V=iI(),I=V.base,S=V.bignum,Y=V.constants.der;function M(F){this.enc="der",this.name=F.name,this.entity=F,this.tree=new T,this.tree._init(F.body)}U.exports=M,M.prototype.decode=function(F,Z){if(!(F instanceof I.DecoderBuffer))F=new I.DecoderBuffer(F,Z);return this.tree._decode(F,Z)};function T(F){I.Node.call(this,"der",F)}J(T,I.Node),T.prototype._peekTag=function(F,Z,P){if(F.isEmpty())return!1;var q=F.save(),k=L(F,'Failed to peek tag: "'+Z+'"');if(F.isError(k))return k;return F.restore(q),k.tag===Z||k.tagStr===Z||k.tagStr+"of"===Z||P},T.prototype._decodeTag=function(F,Z,P){var q=L(F,'Failed to decode tag of "'+Z+'"');if(F.isError(q))return q;var k=E(F,q.primitive,'Failed to get length of "'+Z+'"');if(F.isError(k))return k;if(!P&&q.tag!==Z&&q.tagStr!==Z&&q.tagStr+"of"!==Z)return F.error('Failed to match tag: "'+Z+'"');if(q.primitive||k!==null)return F.skip(k,'Failed to match body of: "'+Z+'"');var C=F.save(),_=this._skipUntilEnd(F,'Failed to skip indefinite length body: "'+this.tag+'"');if(F.isError(_))return _;return k=F.offset-C.offset,F.restore(C),F.skip(k,'Failed to match body of: "'+Z+'"')},T.prototype._skipUntilEnd=function(F,Z){while(!0){var P=L(F,Z);if(F.isError(P))return P;var q=E(F,P.primitive,Z);if(F.isError(q))return q;var k;if(P.primitive||q!==null)k=F.skip(q);else k=this._skipUntilEnd(F,Z);if(F.isError(k))return k;if(P.tagStr==="end")break}},T.prototype._decodeList=function(F,Z,P,q){var k=[];while(!F.isEmpty()){var C=this._peekTag(F,"end");if(F.isError(C))return C;var _=P.decode(F,"der",q);if(F.isError(_)&&C)break;k.push(_)}return k},T.prototype._decodeStr=function(F,Z){if(Z==="bitstr"){var P=F.readUInt8();if(F.isError(P))return P;return{unused:P,data:F.raw()}}else if(Z==="bmpstr"){var q=F.raw();if(q.length%2===1)return F.error("Decoding of string type: bmpstr length mismatch");var k="";for(var C=0;C<q.length/2;C++)k+=String.fromCharCode(q.readUInt16BE(C*2));return k}else if(Z==="numstr"){var _=F.raw().toString("ascii");if(!this._isNumstr(_))return F.error("Decoding of string type: numstr unsupported characters");return _}else if(Z==="octstr")return F.raw();else if(Z==="objDesc")return F.raw();else if(Z==="printstr"){var g=F.raw().toString("ascii");if(!this._isPrintstr(g))return F.error("Decoding of string type: printstr unsupported characters");return g}else if(/str$/.test(Z))return F.raw().toString();else return F.error("Decoding of string type: "+Z+" unsupported")},T.prototype._decodeObjid=function(F,Z,P){var q,k=[],C=0;while(!F.isEmpty()){var _=F.readUInt8();if(C<<=7,C|=_&127,(_&128)===0)k.push(C),C=0}if(_&128)k.push(C);var g=k[0]/40|0,N=k[0]%40;if(P)q=k;else q=[g,N].concat(k.slice(1));if(Z){var x=Z[q.join(" ")];if(x===void 0)x=Z[q.join(".")];if(x!==void 0)q=x}return q},T.prototype._decodeTime=function(F,Z){var P=F.raw().toString();if(Z==="gentime")var q=P.slice(0,4)|0,k=P.slice(4,6)|0,C=P.slice(6,8)|0,_=P.slice(8,10)|0,g=P.slice(10,12)|0,N=P.slice(12,14)|0;else if(Z==="utctime"){var q=P.slice(0,2)|0,k=P.slice(2,4)|0,C=P.slice(4,6)|0,_=P.slice(6,8)|0,g=P.slice(8,10)|0,N=P.slice(10,12)|0;if(q<70)q=2000+q;else q=1900+q}else return F.error("Decoding "+Z+" time is not supported yet");return Date.UTC(q,k-1,C,_,g,N,0)},T.prototype._decodeNull=function(F){return null},T.prototype._decodeBool=function(F){var Z=F.readUInt8();if(F.isError(Z))return Z;else return Z!==0},T.prototype._decodeInt=function(F,Z){var P=F.raw(),q=new S(P);if(Z)q=Z[q.toString(10)]||q;return q},T.prototype._use=function(F,Z){if(typeof F==="function")F=F(Z);return F._getDecoder("der").tree};function L(F,Z){var P=F.readUInt8(Z);if(F.isError(P))return P;var q=Y.tagClass[P>>6],k=(P&32)===0;if((P&31)===31){var C=P;P=0;while((C&128)===128){if(C=F.readUInt8(Z),F.isError(C))return C;P<<=7,P|=C&127}}else P&=31;var _=Y.tag[P];return{cls:q,primitive:k,tag:P,tagStr:_}}function E(F,Z,P){var q=F.readUInt8(P);if(F.isError(q))return q;if(!Z&&q===128)return null;if((q&128)===0)return q;var k=q&127;if(k>4)return F.error("length octect is too long");q=0;for(var C=0;C<k;C++){q<<=8;var _=F.readUInt8(P);if(F.isError(_))return _;q|=_}return q}}),oA=G0(($,U)=>{var J=o$(),V=(g$(),d0(k$)).Buffer,I=_V();function S(Y){I.call(this,Y),this.enc="pem"}J(S,I),U.exports=S,S.prototype.decode=function(Y,M){var T=Y.toString().split(/[\r\n]+/g),L=M.label.toUpperCase(),E=/^-----(BEGIN|END) ([^-]+)-----$/,F=-1,Z=-1;for(var P=0;P<T.length;P++){var q=T[P].match(E);if(q===null)continue;if(q[2]!==L)continue;if(F===-1){if(q[1]!=="BEGIN")break;F=P}else{if(q[1]!=="END")break;Z=P;break}}if(F===-1||Z===-1)throw Error("PEM section not found for: "+L);var k=T.slice(F+1,Z).join("");k.replace(/[^a-z0-9\+\/=]+/gi,"");var C=new V(k,"base64");return I.prototype.decode.call(this,C,M)}}),rA=G0(($)=>{var U=$;U.der=_V(),U.pem=oA()}),NV=G0(($,U)=>{var J=o$(),V=(g$(),d0(k$)).Buffer,I=iI(),S=I.base,Y=I.constants.der;function M(F){this.enc="der",this.name=F.name,this.entity=F,this.tree=new T,this.tree._init(F.body)}U.exports=M,M.prototype.encode=function(F,Z){return this.tree._encode(F,Z).join()};function T(F){S.Node.call(this,"der",F)}J(T,S.Node),T.prototype._encodeComposite=function(F,Z,P,q){var k=E(F,Z,P,this.reporter);if(q.length<128){var g=new V(2);return g[0]=k,g[1]=q.length,this._createEncoderBuffer([g,q])}var C=1;for(var _=q.length;_>=256;_>>=8)C++;var g=new V(2+C);g[0]=k,g[1]=128|C;for(var _=1+C,N=q.length;N>0;_--,N>>=8)g[_]=N&255;return this._createEncoderBuffer([g,q])},T.prototype._encodeStr=function(F,Z){if(Z==="bitstr")return this._createEncoderBuffer([F.unused|0,F.data]);else if(Z==="bmpstr"){var P=new V(F.length*2);for(var q=0;q<F.length;q++)P.writeUInt16BE(F.charCodeAt(q),q*2);return this._createEncoderBuffer(P)}else if(Z==="numstr"){if(!this._isNumstr(F))return this.reporter.error("Encoding of string type: numstr supports only digits and space");return this._createEncoderBuffer(F)}else if(Z==="printstr"){if(!this._isPrintstr(F))return this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");return this._createEncoderBuffer(F)}else if(/str$/.test(Z))return this._createEncoderBuffer(F);else if(Z==="objDesc")return this._createEncoderBuffer(F);else return this.reporter.error("Encoding of string type: "+Z+" unsupported")},T.prototype._encodeObjid=function(F,Z,P){if(typeof F==="string"){if(!Z)return this.reporter.error("string objid given, but no values map found");if(!Z.hasOwnProperty(F))return this.reporter.error("objid not found in values map");F=Z[F].split(/[\s\.]+/g);for(var q=0;q<F.length;q++)F[q]|=0}else if(Array.isArray(F)){F=F.slice();for(var q=0;q<F.length;q++)F[q]|=0}if(!Array.isArray(F))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(F));if(!P){if(F[1]>=40)return this.reporter.error("Second objid identifier OOB");F.splice(0,2,F[0]*40+F[1])}var k=0;for(var q=0;q<F.length;q++){var C=F[q];for(k++;C>=128;C>>=7)k++}var _=new V(k),g=_.length-1;for(var q=F.length-1;q>=0;q--){var C=F[q];_[g--]=C&127;while((C>>=7)>0)_[g--]=128|C&127}return this._createEncoderBuffer(_)};function L(F){if(F<10)return"0"+F;else return F}T.prototype._encodeTime=function(F,Z){var P,q=new Date(F);if(Z==="gentime")P=[L(q.getFullYear()),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join("");else if(Z==="utctime")P=[L(q.getFullYear()%100),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join("");else this.reporter.error("Encoding "+Z+" time is not supported yet");return this._encodeStr(P,"octstr")},T.prototype._encodeNull=function(){return this._createEncoderBuffer("")},T.prototype._encodeInt=function(F,Z){if(typeof F==="string"){if(!Z)return this.reporter.error("String int or enum given, but no values map");if(!Z.hasOwnProperty(F))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(F));F=Z[F]}if(typeof F!=="number"&&!V.isBuffer(F)){var P=F.toArray();if(!F.sign&&P[0]&128)P.unshift(0);F=new V(P)}if(V.isBuffer(F)){var q=F.length;if(F.length===0)q++;var C=new V(q);if(F.copy(C),F.length===0)C[0]=0;return this._createEncoderBuffer(C)}if(F<128)return this._createEncoderBuffer(F);if(F<256)return this._createEncoderBuffer([0,F]);var q=1;for(var k=F;k>=256;k>>=8)q++;var C=Array(q);for(var k=C.length-1;k>=0;k--)C[k]=F&255,F>>=8;if(C[0]&128)C.unshift(0);return this._createEncoderBuffer(new V(C))},T.prototype._encodeBool=function(F){return this._createEncoderBuffer(F?255:0)},T.prototype._use=function(F,Z){if(typeof F==="function")F=F(Z);return F._getEncoder("der").tree},T.prototype._skipDefault=function(F,Z,P){var q=this._baseState,k;if(q.default===null)return!1;var C=F.join();if(q.defaultBuffer===void 0)q.defaultBuffer=this._encodeValue(q.default,Z,P).join();if(C.length!==q.defaultBuffer.length)return!1;for(k=0;k<C.length;k++)if(C[k]!==q.defaultBuffer[k])return!1;return!0};function E(F,Z,P,q){var k;if(F==="seqof")F="seq";else if(F==="setof")F="set";if(Y.tagByName.hasOwnProperty(F))k=Y.tagByName[F];else if(typeof F==="number"&&(F|0)===F)k=F;else return q.error("Unknown tag: "+F);if(k>=31)return q.error("Multi-octet tag encoding unsupported");if(!Z)k|=32;return k|=Y.tagClassByName[P||"universal"]<<6,k}}),nA=G0(($,U)=>{var J=o$(),V=NV();function I(S){V.call(this,S),this.enc="pem"}J(I,V),U.exports=I,I.prototype.encode=function(S,Y){var M=V.prototype.encode.call(this,S),T=M.toString("base64"),L=["-----BEGIN "+Y.label+"-----"];for(var E=0;E<T.length;E+=64)L.push(T.slice(E,E+64));return L.push("-----END "+Y.label+"-----"),L.join(`
14
- `)}}),mA=G0(($)=>{var U=$;U.der=NV(),U.pem=nA()}),iI=G0(($)=>{var U=$;U.bignum=hA(),U.define=uA().define,U.base=rI(),U.constants=jV(),U.decoders=rA(),U.encoders=mA()}),dA=G0(($,U)=>{var J=iI(),V=J.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),I=J.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),S=J.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),Y=J.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(S),this.key("subjectPublicKey").bitstr())}),M=J.define("RelativeDistinguishedName",function(){this.setof(I)}),T=J.define("RDNSequence",function(){this.seqof(M)}),L=J.define("Name",function(){this.choice({rdnSequence:this.use(T)})}),E=J.define("Validity",function(){this.seq().obj(this.key("notBefore").use(V),this.key("notAfter").use(V))}),F=J.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),Z=J.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(S),this.key("issuer").use(L),this.key("validity").use(E),this.key("subject").use(L),this.key("subjectPublicKeyInfo").use(Y),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(F).optional())}),P=J.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(Z),this.key("signatureAlgorithm").use(S),this.key("signatureValue").bitstr())});U.exports=P}),tA=G0(($)=>{var U=iI();$.certificate=dA();var J=U.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});$.RSAPrivateKey=J;var V=U.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});$.RSAPublicKey=V;var I=U.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),S=U.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(I),this.key("subjectPublicKey").bitstr())});$.PublicKey=S;var Y=U.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(I),this.key("subjectPrivateKey").octstr())});$.PrivateKey=Y;var M=U.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});$.EncryptedPrivateKey=M;var T=U.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});$.DSAPrivateKey=T,$.DSAparam=U.define("DSAparam",function(){this.int()});var L=U.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),E=U.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(L),this.key("publicKey").optional().explicit(1).bitstr())});$.ECPrivateKey=E,$.signature=U.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),iA=G0(($,U)=>{U.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),eA=G0(($,U)=>{var J=c$().Buffer,V=qQ().Transform,I=o$();function S(L){V.call(this),this._block=J.allocUnsafe(L),this._blockSize=L,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}I(S,V),S.prototype._transform=function(L,E,F){var Z=null;try{this.update(L,E)}catch(P){Z=P}F(Z)},S.prototype._flush=function(L){var E=null;try{this.push(this.digest())}catch(F){E=F}L(E)};var Y=typeof Uint8Array<"u",M=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(J.prototype instanceof Uint8Array||J.TYPED_ARRAY_SUPPORT);function T(L,E){if(L instanceof J)return L;if(typeof L==="string")return J.from(L,E);if(M&&ArrayBuffer.isView(L)){if(L.byteLength===0)return J.alloc(0);var F=J.from(L.buffer,L.byteOffset,L.byteLength);if(F.byteLength===L.byteLength)return F}if(Y&&L instanceof Uint8Array)return J.from(L);if(J.isBuffer(L)&&L.constructor&&typeof L.constructor.isBuffer==="function"&&L.constructor.isBuffer(L))return J.from(L);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}S.prototype.update=function(L,E){if(this._finalized)throw Error("Digest already called");L=T(L,E);var F=this._block,Z=0;while(this._blockOffset+L.length-Z>=this._blockSize){for(var P=this._blockOffset;P<this._blockSize;)F[P++]=L[Z++];this._update(),this._blockOffset=0}while(Z<L.length)F[this._blockOffset++]=L[Z++];for(var q=0,k=L.length*8;k>0;++q)if(this._length[q]+=k,k=this._length[q]/4294967296|0,k>0)this._length[q]-=4294967296*k;return this},S.prototype._update=function(){throw Error("_update is not implemented")},S.prototype.digest=function(L){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var E=this._digest();if(L!==void 0)E=E.toString(L);this._block.fill(0),this._blockOffset=0;for(var F=0;F<4;++F)this._length[F]=0;return E},S.prototype._digest=function(){throw Error("_digest is not implemented")},U.exports=S}),aA=G0(($,U)=>{var J=o$(),V=eA(),I=c$().Buffer,S=Array(16);function Y(){V.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}J(Y,V),Y.prototype._update=function(){var Z=S;for(var P=0;P<16;++P)Z[P]=this._block.readInt32LE(P*4);var q=this._a,k=this._b,C=this._c,_=this._d;q=T(q,k,C,_,Z[0],3614090360,7),_=T(_,q,k,C,Z[1],3905402710,12),C=T(C,_,q,k,Z[2],606105819,17),k=T(k,C,_,q,Z[3],3250441966,22),q=T(q,k,C,_,Z[4],4118548399,7),_=T(_,q,k,C,Z[5],1200080426,12),C=T(C,_,q,k,Z[6],2821735955,17),k=T(k,C,_,q,Z[7],4249261313,22),q=T(q,k,C,_,Z[8],1770035416,7),_=T(_,q,k,C,Z[9],2336552879,12),C=T(C,_,q,k,Z[10],4294925233,17),k=T(k,C,_,q,Z[11],2304563134,22),q=T(q,k,C,_,Z[12],1804603682,7),_=T(_,q,k,C,Z[13],4254626195,12),C=T(C,_,q,k,Z[14],2792965006,17),k=T(k,C,_,q,Z[15],1236535329,22),q=L(q,k,C,_,Z[1],4129170786,5),_=L(_,q,k,C,Z[6],3225465664,9),C=L(C,_,q,k,Z[11],643717713,14),k=L(k,C,_,q,Z[0],3921069994,20),q=L(q,k,C,_,Z[5],3593408605,5),_=L(_,q,k,C,Z[10],38016083,9),C=L(C,_,q,k,Z[15],3634488961,14),k=L(k,C,_,q,Z[4],3889429448,20),q=L(q,k,C,_,Z[9],568446438,5),_=L(_,q,k,C,Z[14],3275163606,9),C=L(C,_,q,k,Z[3],4107603335,14),k=L(k,C,_,q,Z[8],1163531501,20),q=L(q,k,C,_,Z[13],2850285829,5),_=L(_,q,k,C,Z[2],4243563512,9),C=L(C,_,q,k,Z[7],1735328473,14),k=L(k,C,_,q,Z[12],2368359562,20),q=E(q,k,C,_,Z[5],4294588738,4),_=E(_,q,k,C,Z[8],2272392833,11),C=E(C,_,q,k,Z[11],1839030562,16),k=E(k,C,_,q,Z[14],4259657740,23),q=E(q,k,C,_,Z[1],2763975236,4),_=E(_,q,k,C,Z[4],1272893353,11),C=E(C,_,q,k,Z[7],4139469664,16),k=E(k,C,_,q,Z[10],3200236656,23),q=E(q,k,C,_,Z[13],681279174,4),_=E(_,q,k,C,Z[0],3936430074,11),C=E(C,_,q,k,Z[3],3572445317,16),k=E(k,C,_,q,Z[6],76029189,23),q=E(q,k,C,_,Z[9],3654602809,4),_=E(_,q,k,C,Z[12],3873151461,11),C=E(C,_,q,k,Z[15],530742520,16),k=E(k,C,_,q,Z[2],3299628645,23),q=F(q,k,C,_,Z[0],4096336452,6),_=F(_,q,k,C,Z[7],1126891415,10),C=F(C,_,q,k,Z[14],2878612391,15),k=F(k,C,_,q,Z[5],4237533241,21),q=F(q,k,C,_,Z[12],1700485571,6),_=F(_,q,k,C,Z[3],2399980690,10),C=F(C,_,q,k,Z[10],4293915773,15),k=F(k,C,_,q,Z[1],2240044497,21),q=F(q,k,C,_,Z[8],1873313359,6),_=F(_,q,k,C,Z[15],4264355552,10),C=F(C,_,q,k,Z[6],2734768916,15),k=F(k,C,_,q,Z[13],1309151649,21),q=F(q,k,C,_,Z[4],4149444226,6),_=F(_,q,k,C,Z[11],3174756917,10),C=F(C,_,q,k,Z[2],718787259,15),k=F(k,C,_,q,Z[9],3951481745,21),this._a=this._a+q|0,this._b=this._b+k|0,this._c=this._c+C|0,this._d=this._d+_|0},Y.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var Z=I.allocUnsafe(16);return Z.writeInt32LE(this._a,0),Z.writeInt32LE(this._b,4),Z.writeInt32LE(this._c,8),Z.writeInt32LE(this._d,12),Z};function M(Z,P){return Z<<P|Z>>>32-P}function T(Z,P,q,k,C,_,g){return M(Z+(P&q|~P&k)+C+_|0,g)+P|0}function L(Z,P,q,k,C,_,g){return M(Z+(P&k|q&~k)+C+_|0,g)+P|0}function E(Z,P,q,k,C,_,g){return M(Z+(P^q^k)+C+_|0,g)+P|0}function F(Z,P,q,k,C,_,g){return M(Z+(q^(P|~k))+C+_|0,g)+P|0}U.exports=Y}),sA=G0(($,U)=>{var J=c$().Buffer,V=aA();function I(S,Y,M,T){if(!J.isBuffer(S))S=J.from(S,"binary");if(Y){if(!J.isBuffer(Y))Y=J.from(Y,"binary");if(Y.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var L=M/8,E=J.alloc(L),F=J.alloc(T||0),Z=J.alloc(0);while(L>0||T>0){var P=new V;if(P.update(Z),P.update(S),Y)P.update(Y);Z=P.digest();var q=0;if(L>0){var k=E.length-L;q=Math.min(L,Z.length),Z.copy(E,k,0,q),L-=q}if(q<Z.length&&T>0){var C=F.length-T,_=Math.min(T,Z.length-q);Z.copy(F,C,q,q+_),T-=_}}return Z.fill(0),{key:E,iv:F}}U.exports=I}),xV=G0(($)=>{var U=(p$(),d0(u$));$.createCipher=$.Cipher=U.createCipher,$.createCipheriv=$.Cipheriv=U.createCipheriv,$.createDecipher=$.Decipher=U.createDecipher,$.createDecipheriv=$.Decipheriv=U.createDecipheriv,$.listCiphers=$.getCiphers=U.getCiphers}),$H=G0(($,U)=>{var J=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,V=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,I=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,S=sA(),Y=xV(),M=c$().Buffer;U.exports=function(T,L){var E=T.toString(),F=E.match(J),Z;if(!F){var P=E.match(I);Z=M.from(P[2].replace(/[\r\n]/g,""),"base64")}else{var q="aes"+F[1],k=M.from(F[2],"hex"),C=M.from(F[3].replace(/[\r\n]/g,""),"base64"),_=S(L,k.slice(0,8),parseInt(F[1],10)).key,g=[],N=Y.createDecipheriv(q,_,k);g.push(N.update(C)),g.push(N.final()),Z=M.concat(g)}var x=E.match(V)[1];return{tag:x,data:Z}}}),BV=G0(($,U)=>{var J=tA(),V=iA(),I=$H(),S=xV(),Y=PV().pbkdf2Sync,M=c$().Buffer;function T(E,F){var Z=E.algorithm.decrypt.kde.kdeparams.salt,P=parseInt(E.algorithm.decrypt.kde.kdeparams.iters.toString(),10),q=V[E.algorithm.decrypt.cipher.algo.join(".")],k=E.algorithm.decrypt.cipher.iv,C=E.subjectPrivateKey,_=parseInt(q.split("-")[1],10)/8,g=Y(F,Z,P,_,"sha1"),N=S.createDecipheriv(q,g,k),x=[];return x.push(N.update(C)),x.push(N.final()),M.concat(x)}function L(E){var F;if(typeof E==="object"&&!M.isBuffer(E))F=E.passphrase,E=E.key;if(typeof E==="string")E=M.from(E);var Z=I(E,F),P=Z.tag,q=Z.data,k,C;switch(P){case"CERTIFICATE":C=J.certificate.decode(q,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!C)C=J.PublicKey.decode(q,"der");switch(k=C.algorithm.algorithm.join("."),k){case"1.2.840.113549.1.1.1":return J.RSAPublicKey.decode(C.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return C.subjectPrivateKey=C.subjectPublicKey,{type:"ec",data:C};case"1.2.840.10040.4.1":return C.algorithm.params.pub_key=J.DSAparam.decode(C.subjectPublicKey.data,"der"),{type:"dsa",data:C.algorithm.params};default:throw Error("unknown key id "+k)}case"ENCRYPTED PRIVATE KEY":q=J.EncryptedPrivateKey.decode(q,"der"),q=T(q,F);case"PRIVATE KEY":switch(C=J.PrivateKey.decode(q,"der"),k=C.algorithm.algorithm.join("."),k){case"1.2.840.113549.1.1.1":return J.RSAPrivateKey.decode(C.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:C.algorithm.curve,privateKey:J.ECPrivateKey.decode(C.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return C.algorithm.params.priv_key=J.DSAparam.decode(C.subjectPrivateKey,"der"),{type:"dsa",params:C.algorithm.params};default:throw Error("unknown key id "+k)}case"RSA PUBLIC KEY":return J.RSAPublicKey.decode(q,"der");case"RSA PRIVATE KEY":return J.RSAPrivateKey.decode(q,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:J.DSAPrivateKey.decode(q,"der")};case"EC PRIVATE KEY":return q=J.ECPrivateKey.decode(q,"der"),{curve:q.parameters.value,privateKey:q.privateKey};default:throw Error("unknown key type "+P)}}L.signature=J.signature,U.exports=L}),cV=G0(($,U)=>{var J=K6(),V=c$().Buffer;U.exports=function(S,Y){var M=V.alloc(0),T=0,L;while(M.length<Y)L=I(T++),M=V.concat([M,J("sha1").update(S).update(L).digest()]);return M.slice(0,Y)};function I(S){var Y=V.allocUnsafe(4);return Y.writeUInt32BE(S,0),Y}}),wV=G0(($,U)=>{U.exports=function(J,V){var I=J.length,S=-1;while(++S<I)J[S]^=V[S];return J}}),cQ=G0(($,U)=>{(function(J,V){function I(O,G){if(!O)throw Error(G||"Assertion failed")}function S(O,G){O.super_=G;var D=function(){};D.prototype=G.prototype,O.prototype=new D,O.prototype.constructor=O}function Y(O,G,D){if(Y.isBN(O))return O;if(this.negative=0,this.words=null,this.length=0,this.red=null,O!==null){if(G==="le"||G==="be")D=G,G=10;this._init(O||0,G||10,D||"be")}}if(typeof J==="object")J.exports=Y;else V.BN=Y;Y.BN=Y,Y.wordSize=26;var M;try{if(typeof window<"u"&&typeof window.Buffer<"u")M=window.Buffer;else M=(g$(),d0(k$)).Buffer}catch(O){}Y.isBN=function(O){if(O instanceof Y)return!0;return O!==null&&typeof O==="object"&&O.constructor.wordSize===Y.wordSize&&Array.isArray(O.words)},Y.max=function(O,G){if(O.cmp(G)>0)return O;return G},Y.min=function(O,G){if(O.cmp(G)<0)return O;return G},Y.prototype._init=function(O,G,D){if(typeof O==="number")return this._initNumber(O,G,D);if(typeof O==="object")return this._initArray(O,G,D);if(G==="hex")G=16;I(G===(G|0)&&G>=2&&G<=36),O=O.toString().replace(/\s+/g,"");var Q=0;if(O[0]==="-")Q++,this.negative=1;if(Q<O.length){if(G===16)this._parseHex(O,Q,D);else if(this._parseBase(O,G,Q),D==="le")this._initArray(this.toArray(),G,D)}},Y.prototype._initNumber=function(O,G,D){if(O<0)this.negative=1,O=-O;if(O<67108864)this.words=[O&67108863],this.length=1;else if(O<4503599627370496)this.words=[O&67108863,O/67108864&67108863],this.length=2;else I(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3;if(D!=="le")return;this._initArray(this.toArray(),G,D)},Y.prototype._initArray=function(O,G,D){if(I(typeof O.length==="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W,A,H=0;if(D==="be"){for(Q=O.length-1,W=0;Q>=0;Q-=3)if(A=O[Q]|O[Q-1]<<8|O[Q-2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}else if(D==="le"){for(Q=0,W=0;Q<O.length;Q+=3)if(A=O[Q]|O[Q+1]<<8|O[Q+2]<<16,this.words[W]|=A<<H&67108863,this.words[W+1]=A>>>26-H&67108863,H+=24,H>=26)H-=26,W++}return this.strip()};function T(O,G){var D=O.charCodeAt(G);if(D>=65&&D<=70)return D-55;else if(D>=97&&D<=102)return D-87;else return D-48&15}function L(O,G,D){var Q=T(O,D);if(D-1>=G)Q|=T(O,D-1)<<4;return Q}Y.prototype._parseHex=function(O,G,D){this.length=Math.ceil((O.length-G)/6),this.words=Array(this.length);for(var Q=0;Q<this.length;Q++)this.words[Q]=0;var W=0,A=0,H;if(D==="be")for(Q=O.length-1;Q>=G;Q-=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8;else{var z=O.length-G;for(Q=z%2===0?G+1:G;Q<O.length;Q+=2)if(H=L(O,G,Q)<<W,this.words[A]|=H&67108863,W>=18)W-=18,A+=1,this.words[A]|=H>>>26;else W+=8}this.strip()};function E(O,G,D,Q){var W=0,A=Math.min(O.length,D);for(var H=G;H<A;H++){var z=O.charCodeAt(H)-48;if(W*=Q,z>=49)W+=z-49+10;else if(z>=17)W+=z-17+10;else W+=z}return W}Y.prototype._parseBase=function(O,G,D){this.words=[0],this.length=1;for(var Q=0,W=1;W<=67108863;W*=G)Q++;Q--,W=W/G|0;var A=O.length-D,H=A%Q,z=Math.min(A,A-H)+D,X=0;for(var K=D;K<z;K+=Q)if(X=E(O,K,K+Q,G),this.imuln(W),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(H!==0){var R=1;X=E(O,K,O.length,G);for(K=0;K<H;K++)R*=G;if(this.imuln(R),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},Y.prototype.copy=function(O){O.words=Array(this.length);for(var G=0;G<this.length;G++)O.words[G]=this.words[G];O.length=this.length,O.negative=this.negative,O.red=this.red},Y.prototype.clone=function(){var O=new Y(null);return this.copy(O),O},Y.prototype._expand=function(O){while(this.length<O)this.words[this.length++]=0;return this},Y.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},Y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],Z=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(O,G){O=O||10,G=G|0||1;var D;if(O===16||O==="hex"){D="";var Q=0,W=0;for(var A=0;A<this.length;A++){var H=this.words[A],z=((H<<Q|W)&16777215).toString(16);if(W=H>>>24-Q&16777215,Q+=2,Q>=26)Q-=26,A--;if(W!==0||A!==this.length-1)D=F[6-z.length]+z+D;else D=z+D}if(W!==0)D=W.toString(16)+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}if(O===(O|0)&&O>=2&&O<=36){var X=Z[O],K=P[O];D="";var R=this.clone();R.negative=0;while(!R.isZero()){var v=R.modn(K).toString(O);if(R=R.idivn(K),!R.isZero())D=F[X-v.length]+v+D;else D=v+D}if(this.isZero())D="0"+D;while(D.length%G!==0)D="0"+D;if(this.negative!==0)D="-"+D;return D}I(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var O=this.words[0];if(this.length===2)O+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)O+=4503599627370496+this.words[1]*67108864;else if(this.length>2)I(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-O:O},Y.prototype.toJSON=function(){return this.toString(16)},Y.prototype.toBuffer=function(O,G){return I(typeof M<"u"),this.toArrayLike(M,O,G)},Y.prototype.toArray=function(O,G){return this.toArrayLike(Array,O,G)},Y.prototype.toArrayLike=function(O,G,D){var Q=this.byteLength(),W=D||Math.max(1,Q);I(Q<=W,"byte array longer than desired length"),I(W>0,"Requested array length <= 0"),this.strip();var A=G==="le",H=new O(W),z,X,K=this.clone();if(!A){for(X=0;X<W-Q;X++)H[X]=0;for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[W-X-1]=z}else{for(X=0;!K.isZero();X++)z=K.andln(255),K.iushrn(8),H[X]=z;for(;X<W;X++)H[X]=0}return H},Math.clz32)Y.prototype._countBits=function(O){return 32-Math.clz32(O)};else Y.prototype._countBits=function(O){var G=O,D=0;if(G>=4096)D+=13,G>>>=13;if(G>=64)D+=7,G>>>=7;if(G>=8)D+=4,G>>>=4;if(G>=2)D+=2,G>>>=2;return D+G};Y.prototype._zeroBits=function(O){if(O===0)return 26;var G=O,D=0;if((G&8191)===0)D+=13,G>>>=13;if((G&127)===0)D+=7,G>>>=7;if((G&15)===0)D+=4,G>>>=4;if((G&3)===0)D+=2,G>>>=2;if((G&1)===0)D++;return D},Y.prototype.bitLength=function(){var O=this.words[this.length-1],G=this._countBits(O);return(this.length-1)*26+G};function q(O){var G=Array(O.bitLength());for(var D=0;D<G.length;D++){var Q=D/26|0,W=D%26;G[D]=(O.words[Q]&1<<W)>>>W}return G}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var O=0;for(var G=0;G<this.length;G++){var D=this._zeroBits(this.words[G]);if(O+=D,D!==26)break}return O},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(O){if(this.negative!==0)return this.abs().inotn(O).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(O){if(this.testn(O-1))return this.notn(O).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(O){while(this.length<O.length)this.words[this.length++]=0;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]|O.words[G];return this.strip()},Y.prototype.ior=function(O){return I((this.negative|O.negative)===0),this.iuor(O)},Y.prototype.or=function(O){if(this.length>O.length)return this.clone().ior(O);return O.clone().ior(this)},Y.prototype.uor=function(O){if(this.length>O.length)return this.clone().iuor(O);return O.clone().iuor(this)},Y.prototype.iuand=function(O){var G;if(this.length>O.length)G=O;else G=this;for(var D=0;D<G.length;D++)this.words[D]=this.words[D]&O.words[D];return this.length=G.length,this.strip()},Y.prototype.iand=function(O){return I((this.negative|O.negative)===0),this.iuand(O)},Y.prototype.and=function(O){if(this.length>O.length)return this.clone().iand(O);return O.clone().iand(this)},Y.prototype.uand=function(O){if(this.length>O.length)return this.clone().iuand(O);return O.clone().iuand(this)},Y.prototype.iuxor=function(O){var G,D;if(this.length>O.length)G=this,D=O;else G=O,D=this;for(var Q=0;Q<D.length;Q++)this.words[Q]=G.words[Q]^D.words[Q];if(this!==G)for(;Q<G.length;Q++)this.words[Q]=G.words[Q];return this.length=G.length,this.strip()},Y.prototype.ixor=function(O){return I((this.negative|O.negative)===0),this.iuxor(O)},Y.prototype.xor=function(O){if(this.length>O.length)return this.clone().ixor(O);return O.clone().ixor(this)},Y.prototype.uxor=function(O){if(this.length>O.length)return this.clone().iuxor(O);return O.clone().iuxor(this)},Y.prototype.inotn=function(O){I(typeof O==="number"&&O>=0);var G=Math.ceil(O/26)|0,D=O%26;if(this._expand(G),D>0)G--;for(var Q=0;Q<G;Q++)this.words[Q]=~this.words[Q]&67108863;if(D>0)this.words[Q]=~this.words[Q]&67108863>>26-D;return this.strip()},Y.prototype.notn=function(O){return this.clone().inotn(O)},Y.prototype.setn=function(O,G){I(typeof O==="number"&&O>=0);var D=O/26|0,Q=O%26;if(this._expand(D+1),G)this.words[D]=this.words[D]|1<<Q;else this.words[D]=this.words[D]&~(1<<Q);return this.strip()},Y.prototype.iadd=function(O){var G;if(this.negative!==0&&O.negative===0)return this.negative=0,G=this.isub(O),this.negative^=1,this._normSign();else if(this.negative===0&&O.negative!==0)return O.negative=0,G=this.isub(O),O.negative=1,G._normSign();var D,Q;if(this.length>O.length)D=this,Q=O;else D=O,Q=this;var W=0;for(var A=0;A<Q.length;A++)G=(D.words[A]|0)+(Q.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;for(;W!==0&&A<D.length;A++)G=(D.words[A]|0)+W,this.words[A]=G&67108863,W=G>>>26;if(this.length=D.length,W!==0)this.words[this.length]=W,this.length++;else if(D!==this)for(;A<D.length;A++)this.words[A]=D.words[A];return this},Y.prototype.add=function(O){var G;if(O.negative!==0&&this.negative===0)return O.negative=0,G=this.sub(O),O.negative^=1,G;else if(O.negative===0&&this.negative!==0)return this.negative=0,G=O.sub(this),this.negative=1,G;if(this.length>O.length)return this.clone().iadd(O);return O.clone().iadd(this)},Y.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var G=this.iadd(O);return O.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var D=this.cmp(O);if(D===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Q,W;if(D>0)Q=this,W=O;else Q=O,W=this;var A=0;for(var H=0;H<W.length;H++)G=(Q.words[H]|0)-(W.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;for(;A!==0&&H<Q.length;H++)G=(Q.words[H]|0)+A,A=G>>26,this.words[H]=G&67108863;if(A===0&&H<Q.length&&Q!==this)for(;H<Q.length;H++)this.words[H]=Q.words[H];if(this.length=Math.max(this.length,H),Q!==this)this.negative=1;return this.strip()},Y.prototype.sub=function(O){return this.clone().isub(O)};function k(O,G,D){D.negative=G.negative^O.negative;var Q=O.length+G.length|0;D.length=Q,Q=Q-1|0;var W=O.words[0]|0,A=G.words[0]|0,H=W*A,z=H&67108863,X=H/67108864|0;D.words[0]=z;for(var K=1;K<Q;K++){var R=X>>>26,v=X&67108863,j=Math.min(K,G.length-1);for(var c=Math.max(0,K-O.length+1);c<=j;c++){var h=K-c|0;W=O.words[h]|0,A=G.words[c]|0,H=W*A+v,R+=H/67108864|0,v=H&67108863}D.words[K]=v|0,X=R|0}if(X!==0)D.words[K]=X|0;else D.length--;return D.strip()}var C=function(O,G,D){var Q=O.words,W=G.words,A=D.words,H=0,z,X,K,R=Q[0]|0,v=R&8191,j=R>>>13,c=Q[1]|0,h=c&8191,n=c>>>13,D0=Q[2]|0,i=D0&8191,l=D0>>>13,X0=Q[3]|0,m=X0&8191,s=X0>>>13,h0=Q[4]|0,f=h0&8191,u=h0>>>13,J0=Q[5]|0,t=J0&8191,a=J0>>>13,M0=Q[6]|0,y=M0&8191,r=M0>>>13,c0=Q[7]|0,d=c0&8191,I0=c0>>>13,b0=Q[8]|0,A0=b0&8191,H0=b0>>>13,X$=Q[9]|0,z0=X$&8191,F0=X$>>>13,Y$=W[0]|0,Z0=Y$&8191,E0=Y$>>>13,N$=W[1]|0,P0=N$&8191,g0=N$>>>13,x$=W[2]|0,j0=x$&8191,T0=x$>>>13,j$=W[3]|0,_0=j$&8191,q0=j$>>>13,q$=W[4]|0,N0=q$&8191,x0=q$>>>13,R$=W[5]|0,R0=R$&8191,B=R$>>>13,b=W[6]|0,e=b&8191,$0=b>>>13,u0=W[7]|0,K0=u0&8191,L0=u0>>>13,J$=W[8]|0,C0=J$&8191,B0=J$>>>13,_$=W[9]|0,k0=_$&8191,v0=_$>>>13;D.negative=O.negative^G.negative,D.length=19,z=Math.imul(v,Z0),X=Math.imul(v,E0),X=X+Math.imul(j,Z0)|0,K=Math.imul(j,E0);var Q$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Q$>>>26)|0,Q$&=67108863,z=Math.imul(h,Z0),X=Math.imul(h,E0),X=X+Math.imul(n,Z0)|0,K=Math.imul(n,E0),z=z+Math.imul(v,P0)|0,X=X+Math.imul(v,g0)|0,X=X+Math.imul(j,P0)|0,K=K+Math.imul(j,g0)|0;var r0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(r0>>>26)|0,r0&=67108863,z=Math.imul(i,Z0),X=Math.imul(i,E0),X=X+Math.imul(l,Z0)|0,K=Math.imul(l,E0),z=z+Math.imul(h,P0)|0,X=X+Math.imul(h,g0)|0,X=X+Math.imul(n,P0)|0,K=K+Math.imul(n,g0)|0,z=z+Math.imul(v,j0)|0,X=X+Math.imul(v,T0)|0,X=X+Math.imul(j,j0)|0,K=K+Math.imul(j,T0)|0;var o0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(o0>>>26)|0,o0&=67108863,z=Math.imul(m,Z0),X=Math.imul(m,E0),X=X+Math.imul(s,Z0)|0,K=Math.imul(s,E0),z=z+Math.imul(i,P0)|0,X=X+Math.imul(i,g0)|0,X=X+Math.imul(l,P0)|0,K=K+Math.imul(l,g0)|0,z=z+Math.imul(h,j0)|0,X=X+Math.imul(h,T0)|0,X=X+Math.imul(n,j0)|0,K=K+Math.imul(n,T0)|0,z=z+Math.imul(v,_0)|0,X=X+Math.imul(v,q0)|0,X=X+Math.imul(j,_0)|0,K=K+Math.imul(j,q0)|0;var a0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,z=Math.imul(f,Z0),X=Math.imul(f,E0),X=X+Math.imul(u,Z0)|0,K=Math.imul(u,E0),z=z+Math.imul(m,P0)|0,X=X+Math.imul(m,g0)|0,X=X+Math.imul(s,P0)|0,K=K+Math.imul(s,g0)|0,z=z+Math.imul(i,j0)|0,X=X+Math.imul(i,T0)|0,X=X+Math.imul(l,j0)|0,K=K+Math.imul(l,T0)|0,z=z+Math.imul(h,_0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(n,_0)|0,K=K+Math.imul(n,q0)|0,z=z+Math.imul(v,N0)|0,X=X+Math.imul(v,x0)|0,X=X+Math.imul(j,N0)|0,K=K+Math.imul(j,x0)|0;var e0=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,z=Math.imul(t,Z0),X=Math.imul(t,E0),X=X+Math.imul(a,Z0)|0,K=Math.imul(a,E0),z=z+Math.imul(f,P0)|0,X=X+Math.imul(f,g0)|0,X=X+Math.imul(u,P0)|0,K=K+Math.imul(u,g0)|0,z=z+Math.imul(m,j0)|0,X=X+Math.imul(m,T0)|0,X=X+Math.imul(s,j0)|0,K=K+Math.imul(s,T0)|0,z=z+Math.imul(i,_0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(l,_0)|0,K=K+Math.imul(l,q0)|0,z=z+Math.imul(h,N0)|0,X=X+Math.imul(h,x0)|0,X=X+Math.imul(n,N0)|0,K=K+Math.imul(n,x0)|0,z=z+Math.imul(v,R0)|0,X=X+Math.imul(v,B)|0,X=X+Math.imul(j,R0)|0,K=K+Math.imul(j,B)|0;var S$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(S$>>>26)|0,S$&=67108863,z=Math.imul(y,Z0),X=Math.imul(y,E0),X=X+Math.imul(r,Z0)|0,K=Math.imul(r,E0),z=z+Math.imul(t,P0)|0,X=X+Math.imul(t,g0)|0,X=X+Math.imul(a,P0)|0,K=K+Math.imul(a,g0)|0,z=z+Math.imul(f,j0)|0,X=X+Math.imul(f,T0)|0,X=X+Math.imul(u,j0)|0,K=K+Math.imul(u,T0)|0,z=z+Math.imul(m,_0)|0,X=X+Math.imul(m,q0)|0,X=X+Math.imul(s,_0)|0,K=K+Math.imul(s,q0)|0,z=z+Math.imul(i,N0)|0,X=X+Math.imul(i,x0)|0,X=X+Math.imul(l,N0)|0,K=K+Math.imul(l,x0)|0,z=z+Math.imul(h,R0)|0,X=X+Math.imul(h,B)|0,X=X+Math.imul(n,R0)|0,K=K+Math.imul(n,B)|0,z=z+Math.imul(v,e)|0,X=X+Math.imul(v,$0)|0,X=X+Math.imul(j,e)|0,K=K+Math.imul(j,$0)|0;var W$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(W$>>>26)|0,W$&=67108863,z=Math.imul(d,Z0),X=Math.imul(d,E0),X=X+Math.imul(I0,Z0)|0,K=Math.imul(I0,E0),z=z+Math.imul(y,P0)|0,X=X+Math.imul(y,g0)|0,X=X+Math.imul(r,P0)|0,K=K+Math.imul(r,g0)|0,z=z+Math.imul(t,j0)|0,X=X+Math.imul(t,T0)|0,X=X+Math.imul(a,j0)|0,K=K+Math.imul(a,T0)|0,z=z+Math.imul(f,_0)|0,X=X+Math.imul(f,q0)|0,X=X+Math.imul(u,_0)|0,K=K+Math.imul(u,q0)|0,z=z+Math.imul(m,N0)|0,X=X+Math.imul(m,x0)|0,X=X+Math.imul(s,N0)|0,K=K+Math.imul(s,x0)|0,z=z+Math.imul(i,R0)|0,X=X+Math.imul(i,B)|0,X=X+Math.imul(l,R0)|0,K=K+Math.imul(l,B)|0,z=z+Math.imul(h,e)|0,X=X+Math.imul(h,$0)|0,X=X+Math.imul(n,e)|0,K=K+Math.imul(n,$0)|0,z=z+Math.imul(v,K0)|0,X=X+Math.imul(v,L0)|0,X=X+Math.imul(j,K0)|0,K=K+Math.imul(j,L0)|0;var D$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(D$>>>26)|0,D$&=67108863,z=Math.imul(A0,Z0),X=Math.imul(A0,E0),X=X+Math.imul(H0,Z0)|0,K=Math.imul(H0,E0),z=z+Math.imul(d,P0)|0,X=X+Math.imul(d,g0)|0,X=X+Math.imul(I0,P0)|0,K=K+Math.imul(I0,g0)|0,z=z+Math.imul(y,j0)|0,X=X+Math.imul(y,T0)|0,X=X+Math.imul(r,j0)|0,K=K+Math.imul(r,T0)|0,z=z+Math.imul(t,_0)|0,X=X+Math.imul(t,q0)|0,X=X+Math.imul(a,_0)|0,K=K+Math.imul(a,q0)|0,z=z+Math.imul(f,N0)|0,X=X+Math.imul(f,x0)|0,X=X+Math.imul(u,N0)|0,K=K+Math.imul(u,x0)|0,z=z+Math.imul(m,R0)|0,X=X+Math.imul(m,B)|0,X=X+Math.imul(s,R0)|0,K=K+Math.imul(s,B)|0,z=z+Math.imul(i,e)|0,X=X+Math.imul(i,$0)|0,X=X+Math.imul(l,e)|0,K=K+Math.imul(l,$0)|0,z=z+Math.imul(h,K0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(n,K0)|0,K=K+Math.imul(n,L0)|0,z=z+Math.imul(v,C0)|0,X=X+Math.imul(v,B0)|0,X=X+Math.imul(j,C0)|0,K=K+Math.imul(j,B0)|0;var z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(z$>>>26)|0,z$&=67108863,z=Math.imul(z0,Z0),X=Math.imul(z0,E0),X=X+Math.imul(F0,Z0)|0,K=Math.imul(F0,E0),z=z+Math.imul(A0,P0)|0,X=X+Math.imul(A0,g0)|0,X=X+Math.imul(H0,P0)|0,K=K+Math.imul(H0,g0)|0,z=z+Math.imul(d,j0)|0,X=X+Math.imul(d,T0)|0,X=X+Math.imul(I0,j0)|0,K=K+Math.imul(I0,T0)|0,z=z+Math.imul(y,_0)|0,X=X+Math.imul(y,q0)|0,X=X+Math.imul(r,_0)|0,K=K+Math.imul(r,q0)|0,z=z+Math.imul(t,N0)|0,X=X+Math.imul(t,x0)|0,X=X+Math.imul(a,N0)|0,K=K+Math.imul(a,x0)|0,z=z+Math.imul(f,R0)|0,X=X+Math.imul(f,B)|0,X=X+Math.imul(u,R0)|0,K=K+Math.imul(u,B)|0,z=z+Math.imul(m,e)|0,X=X+Math.imul(m,$0)|0,X=X+Math.imul(s,e)|0,K=K+Math.imul(s,$0)|0,z=z+Math.imul(i,K0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(l,K0)|0,K=K+Math.imul(l,L0)|0,z=z+Math.imul(h,C0)|0,X=X+Math.imul(h,B0)|0,X=X+Math.imul(n,C0)|0,K=K+Math.imul(n,B0)|0,z=z+Math.imul(v,k0)|0,X=X+Math.imul(v,v0)|0,X=X+Math.imul(j,k0)|0,K=K+Math.imul(j,v0)|0;var K$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(K$>>>26)|0,K$&=67108863,z=Math.imul(z0,P0),X=Math.imul(z0,g0),X=X+Math.imul(F0,P0)|0,K=Math.imul(F0,g0),z=z+Math.imul(A0,j0)|0,X=X+Math.imul(A0,T0)|0,X=X+Math.imul(H0,j0)|0,K=K+Math.imul(H0,T0)|0,z=z+Math.imul(d,_0)|0,X=X+Math.imul(d,q0)|0,X=X+Math.imul(I0,_0)|0,K=K+Math.imul(I0,q0)|0,z=z+Math.imul(y,N0)|0,X=X+Math.imul(y,x0)|0,X=X+Math.imul(r,N0)|0,K=K+Math.imul(r,x0)|0,z=z+Math.imul(t,R0)|0,X=X+Math.imul(t,B)|0,X=X+Math.imul(a,R0)|0,K=K+Math.imul(a,B)|0,z=z+Math.imul(f,e)|0,X=X+Math.imul(f,$0)|0,X=X+Math.imul(u,e)|0,K=K+Math.imul(u,$0)|0,z=z+Math.imul(m,K0)|0,X=X+Math.imul(m,L0)|0,X=X+Math.imul(s,K0)|0,K=K+Math.imul(s,L0)|0,z=z+Math.imul(i,C0)|0,X=X+Math.imul(i,B0)|0,X=X+Math.imul(l,C0)|0,K=K+Math.imul(l,B0)|0,z=z+Math.imul(h,k0)|0,X=X+Math.imul(h,v0)|0,X=X+Math.imul(n,k0)|0,K=K+Math.imul(n,v0)|0;var A$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(A$>>>26)|0,A$&=67108863,z=Math.imul(z0,j0),X=Math.imul(z0,T0),X=X+Math.imul(F0,j0)|0,K=Math.imul(F0,T0),z=z+Math.imul(A0,_0)|0,X=X+Math.imul(A0,q0)|0,X=X+Math.imul(H0,_0)|0,K=K+Math.imul(H0,q0)|0,z=z+Math.imul(d,N0)|0,X=X+Math.imul(d,x0)|0,X=X+Math.imul(I0,N0)|0,K=K+Math.imul(I0,x0)|0,z=z+Math.imul(y,R0)|0,X=X+Math.imul(y,B)|0,X=X+Math.imul(r,R0)|0,K=K+Math.imul(r,B)|0,z=z+Math.imul(t,e)|0,X=X+Math.imul(t,$0)|0,X=X+Math.imul(a,e)|0,K=K+Math.imul(a,$0)|0,z=z+Math.imul(f,K0)|0,X=X+Math.imul(f,L0)|0,X=X+Math.imul(u,K0)|0,K=K+Math.imul(u,L0)|0,z=z+Math.imul(m,C0)|0,X=X+Math.imul(m,B0)|0,X=X+Math.imul(s,C0)|0,K=K+Math.imul(s,B0)|0,z=z+Math.imul(i,k0)|0,X=X+Math.imul(i,v0)|0,X=X+Math.imul(l,k0)|0,K=K+Math.imul(l,v0)|0;var H$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(H$>>>26)|0,H$&=67108863,z=Math.imul(z0,_0),X=Math.imul(z0,q0),X=X+Math.imul(F0,_0)|0,K=Math.imul(F0,q0),z=z+Math.imul(A0,N0)|0,X=X+Math.imul(A0,x0)|0,X=X+Math.imul(H0,N0)|0,K=K+Math.imul(H0,x0)|0,z=z+Math.imul(d,R0)|0,X=X+Math.imul(d,B)|0,X=X+Math.imul(I0,R0)|0,K=K+Math.imul(I0,B)|0,z=z+Math.imul(y,e)|0,X=X+Math.imul(y,$0)|0,X=X+Math.imul(r,e)|0,K=K+Math.imul(r,$0)|0,z=z+Math.imul(t,K0)|0,X=X+Math.imul(t,L0)|0,X=X+Math.imul(a,K0)|0,K=K+Math.imul(a,L0)|0,z=z+Math.imul(f,C0)|0,X=X+Math.imul(f,B0)|0,X=X+Math.imul(u,C0)|0,K=K+Math.imul(u,B0)|0,z=z+Math.imul(m,k0)|0,X=X+Math.imul(m,v0)|0,X=X+Math.imul(s,k0)|0,K=K+Math.imul(s,v0)|0;var F$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(F$>>>26)|0,F$&=67108863,z=Math.imul(z0,N0),X=Math.imul(z0,x0),X=X+Math.imul(F0,N0)|0,K=Math.imul(F0,x0),z=z+Math.imul(A0,R0)|0,X=X+Math.imul(A0,B)|0,X=X+Math.imul(H0,R0)|0,K=K+Math.imul(H0,B)|0,z=z+Math.imul(d,e)|0,X=X+Math.imul(d,$0)|0,X=X+Math.imul(I0,e)|0,K=K+Math.imul(I0,$0)|0,z=z+Math.imul(y,K0)|0,X=X+Math.imul(y,L0)|0,X=X+Math.imul(r,K0)|0,K=K+Math.imul(r,L0)|0,z=z+Math.imul(t,C0)|0,X=X+Math.imul(t,B0)|0,X=X+Math.imul(a,C0)|0,K=K+Math.imul(a,B0)|0,z=z+Math.imul(f,k0)|0,X=X+Math.imul(f,v0)|0,X=X+Math.imul(u,k0)|0,K=K+Math.imul(u,v0)|0;var L$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(L$>>>26)|0,L$&=67108863,z=Math.imul(z0,R0),X=Math.imul(z0,B),X=X+Math.imul(F0,R0)|0,K=Math.imul(F0,B),z=z+Math.imul(A0,e)|0,X=X+Math.imul(A0,$0)|0,X=X+Math.imul(H0,e)|0,K=K+Math.imul(H0,$0)|0,z=z+Math.imul(d,K0)|0,X=X+Math.imul(d,L0)|0,X=X+Math.imul(I0,K0)|0,K=K+Math.imul(I0,L0)|0,z=z+Math.imul(y,C0)|0,X=X+Math.imul(y,B0)|0,X=X+Math.imul(r,C0)|0,K=K+Math.imul(r,B0)|0,z=z+Math.imul(t,k0)|0,X=X+Math.imul(t,v0)|0,X=X+Math.imul(a,k0)|0,K=K+Math.imul(a,v0)|0;var E$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(E$>>>26)|0,E$&=67108863,z=Math.imul(z0,e),X=Math.imul(z0,$0),X=X+Math.imul(F0,e)|0,K=Math.imul(F0,$0),z=z+Math.imul(A0,K0)|0,X=X+Math.imul(A0,L0)|0,X=X+Math.imul(H0,K0)|0,K=K+Math.imul(H0,L0)|0,z=z+Math.imul(d,C0)|0,X=X+Math.imul(d,B0)|0,X=X+Math.imul(I0,C0)|0,K=K+Math.imul(I0,B0)|0,z=z+Math.imul(y,k0)|0,X=X+Math.imul(y,v0)|0,X=X+Math.imul(r,k0)|0,K=K+Math.imul(r,v0)|0;var Z$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,z=Math.imul(z0,K0),X=Math.imul(z0,L0),X=X+Math.imul(F0,K0)|0,K=Math.imul(F0,L0),z=z+Math.imul(A0,C0)|0,X=X+Math.imul(A0,B0)|0,X=X+Math.imul(H0,C0)|0,K=K+Math.imul(H0,B0)|0,z=z+Math.imul(d,k0)|0,X=X+Math.imul(d,v0)|0,X=X+Math.imul(I0,k0)|0,K=K+Math.imul(I0,v0)|0;var v$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(v$>>>26)|0,v$&=67108863,z=Math.imul(z0,C0),X=Math.imul(z0,B0),X=X+Math.imul(F0,C0)|0,K=Math.imul(F0,B0),z=z+Math.imul(A0,k0)|0,X=X+Math.imul(A0,v0)|0,X=X+Math.imul(H0,k0)|0,K=K+Math.imul(H0,v0)|0;var M$=(H+z|0)+((X&8191)<<13)|0;H=(K+(X>>>13)|0)+(M$>>>26)|0,M$&=67108863,z=Math.imul(z0,k0),X=Math.imul(z0,v0),X=X+Math.imul(F0,k0)|0,K=Math.imul(F0,v0);var P$=(H+z|0)+((X&8191)<<13)|0;if(H=(K+(X>>>13)|0)+(P$>>>26)|0,P$&=67108863,A[0]=Q$,A[1]=r0,A[2]=o0,A[3]=a0,A[4]=e0,A[5]=S$,A[6]=W$,A[7]=D$,A[8]=z$,A[9]=K$,A[10]=A$,A[11]=H$,A[12]=F$,A[13]=L$,A[14]=E$,A[15]=Z$,A[16]=v$,A[17]=M$,A[18]=P$,H!==0)A[19]=H,D.length++;return D};if(!Math.imul)C=k;function _(O,G,D){D.negative=G.negative^O.negative,D.length=O.length+G.length;var Q=0,W=0;for(var A=0;A<D.length-1;A++){var H=W;W=0;var z=Q&67108863,X=Math.min(A,G.length-1);for(var K=Math.max(0,A-O.length+1);K<=X;K++){var R=A-K,v=O.words[R]|0,j=G.words[K]|0,c=v*j,h=c&67108863;H=H+(c/67108864|0)|0,h=h+z|0,z=h&67108863,H=H+(h>>>26)|0,W+=H>>>26,H&=67108863}D.words[A]=z,Q=H,H=W}if(Q!==0)D.words[A]=Q;else D.length--;return D.strip()}function g(O,G,D){var Q=new N;return Q.mulp(O,G,D)}Y.prototype.mulTo=function(O,G){var D,Q=this.length+O.length;if(this.length===10&&O.length===10)D=C(this,O,G);else if(Q<63)D=k(this,O,G);else if(Q<1024)D=_(this,O,G);else D=g(this,O,G);return D};function N(O,G){this.x=O,this.y=G}N.prototype.makeRBT=function(O){var G=Array(O),D=Y.prototype._countBits(O)-1;for(var Q=0;Q<O;Q++)G[Q]=this.revBin(Q,D,O);return G},N.prototype.revBin=function(O,G,D){if(O===0||O===D-1)return O;var Q=0;for(var W=0;W<G;W++)Q|=(O&1)<<G-W-1,O>>=1;return Q},N.prototype.permute=function(O,G,D,Q,W,A){for(var H=0;H<A;H++)Q[H]=G[O[H]],W[H]=D[O[H]]},N.prototype.transform=function(O,G,D,Q,W,A){this.permute(A,O,G,D,Q,W);for(var H=1;H<W;H<<=1){var z=H<<1,X=Math.cos(2*Math.PI/z),K=Math.sin(2*Math.PI/z);for(var R=0;R<W;R+=z){var v=X,j=K;for(var c=0;c<H;c++){var h=D[R+c],n=Q[R+c],D0=D[R+c+H],i=Q[R+c+H],l=v*D0-j*i;if(i=v*i+j*D0,D0=l,D[R+c]=h+D0,Q[R+c]=n+i,D[R+c+H]=h-D0,Q[R+c+H]=n-i,c!==z)l=X*v-K*j,j=X*j+K*v,v=l}}}},N.prototype.guessLen13b=function(O,G){var D=Math.max(G,O)|1,Q=D&1,W=0;for(D=D/2|0;D;D=D>>>1)W++;return 1<<W+1+Q},N.prototype.conjugate=function(O,G,D){if(D<=1)return;for(var Q=0;Q<D/2;Q++){var W=O[Q];O[Q]=O[D-Q-1],O[D-Q-1]=W,W=G[Q],G[Q]=-G[D-Q-1],G[D-Q-1]=-W}},N.prototype.normalize13b=function(O,G){var D=0;for(var Q=0;Q<G/2;Q++){var W=Math.round(O[2*Q+1]/G)*8192+Math.round(O[2*Q]/G)+D;if(O[Q]=W&67108863,W<67108864)D=0;else D=W/67108864|0}return O},N.prototype.convert13b=function(O,G,D,Q){var W=0;for(var A=0;A<G;A++)W=W+(O[A]|0),D[2*A]=W&8191,W=W>>>13,D[2*A+1]=W&8191,W=W>>>13;for(A=2*G;A<Q;++A)D[A]=0;I(W===0),I((W&-8192)===0)},N.prototype.stub=function(O){var G=Array(O);for(var D=0;D<O;D++)G[D]=0;return G},N.prototype.mulp=function(O,G,D){var Q=2*this.guessLen13b(O.length,G.length),W=this.makeRBT(Q),A=this.stub(Q),H=Array(Q),z=Array(Q),X=Array(Q),K=Array(Q),R=Array(Q),v=Array(Q),j=D.words;j.length=Q,this.convert13b(O.words,O.length,H,Q),this.convert13b(G.words,G.length,K,Q),this.transform(H,A,z,X,Q,W),this.transform(K,A,R,v,Q,W);for(var c=0;c<Q;c++){var h=z[c]*R[c]-X[c]*v[c];X[c]=z[c]*v[c]+X[c]*R[c],z[c]=h}return this.conjugate(z,X,Q),this.transform(z,X,j,A,Q,W),this.conjugate(j,A,Q),this.normalize13b(j,Q),D.negative=O.negative^G.negative,D.length=O.length+G.length,D.strip()},Y.prototype.mul=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),this.mulTo(O,G)},Y.prototype.mulf=function(O){var G=new Y(null);return G.words=Array(this.length+O.length),g(this,O,G)},Y.prototype.imul=function(O){return this.clone().mulTo(O,this)},Y.prototype.imuln=function(O){I(typeof O==="number"),I(O<67108864);var G=0;for(var D=0;D<this.length;D++){var Q=(this.words[D]|0)*O,W=(Q&67108863)+(G&67108863);G>>=26,G+=Q/67108864|0,G+=W>>>26,this.words[D]=W&67108863}if(G!==0)this.words[D]=G,this.length++;return this.length=O===0?1:this.length,this},Y.prototype.muln=function(O){return this.clone().imuln(O)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(O){var G=q(O);if(G.length===0)return new Y(1);var D=this;for(var Q=0;Q<G.length;Q++,D=D.sqr())if(G[Q]!==0)break;if(++Q<G.length)for(var W=D.sqr();Q<G.length;Q++,W=W.sqr()){if(G[Q]===0)continue;D=D.mul(W)}return D},Y.prototype.iushln=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=67108863>>>26-G<<26-G,W;if(G!==0){var A=0;for(W=0;W<this.length;W++){var H=this.words[W]&Q,z=(this.words[W]|0)-H<<G;this.words[W]=z|A,A=H>>>26-G}if(A)this.words[W]=A,this.length++}if(D!==0){for(W=this.length-1;W>=0;W--)this.words[W+D]=this.words[W];for(W=0;W<D;W++)this.words[W]=0;this.length+=D}return this.strip()},Y.prototype.ishln=function(O){return I(this.negative===0),this.iushln(O)},Y.prototype.iushrn=function(O,G,D){I(typeof O==="number"&&O>=0);var Q;if(G)Q=(G-G%26)/26;else Q=0;var W=O%26,A=Math.min((O-W)/26,this.length),H=67108863^67108863>>>W<<W,z=D;if(Q-=A,Q=Math.max(0,Q),z){for(var X=0;X<A;X++)z.words[X]=this.words[X];z.length=A}if(A===0);else if(this.length>A){this.length-=A;for(X=0;X<this.length;X++)this.words[X]=this.words[X+A]}else this.words[0]=0,this.length=1;var K=0;for(X=this.length-1;X>=0&&(K!==0||X>=Q);X--){var R=this.words[X]|0;this.words[X]=K<<26-W|R>>>W,K=R&H}if(z&&K!==0)z.words[z.length++]=K;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},Y.prototype.ishrn=function(O,G,D){return I(this.negative===0),this.iushrn(O,G,D)},Y.prototype.shln=function(O){return this.clone().ishln(O)},Y.prototype.ushln=function(O){return this.clone().iushln(O)},Y.prototype.shrn=function(O){return this.clone().ishrn(O)},Y.prototype.ushrn=function(O){return this.clone().iushrn(O)},Y.prototype.testn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return!1;var W=this.words[D];return!!(W&Q)},Y.prototype.imaskn=function(O){I(typeof O==="number"&&O>=0);var G=O%26,D=(O-G)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=D)return this;if(G!==0)D++;if(this.length=Math.min(D,this.length),G!==0){var Q=67108863^67108863>>>G<<G;this.words[this.length-1]&=Q}return this.strip()},Y.prototype.maskn=function(O){return this.clone().imaskn(O)},Y.prototype.iaddn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.isubn(-O);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<O)return this.words[0]=O-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(O),this.negative=1,this}return this._iaddn(O)},Y.prototype._iaddn=function(O){this.words[0]+=O;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},Y.prototype.isubn=function(O){if(I(typeof O==="number"),I(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},Y.prototype.addn=function(O){return this.clone().iaddn(O)},Y.prototype.subn=function(O){return this.clone().isubn(O)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(O,G,D){var Q=O.length+D,W;this._expand(Q);var A,H=0;for(W=0;W<O.length;W++){A=(this.words[W+D]|0)+H;var z=(O.words[W]|0)*G;A-=z&67108863,H=(A>>26)-(z/67108864|0),this.words[W+D]=A&67108863}for(;W<this.length-D;W++)A=(this.words[W+D]|0)+H,H=A>>26,this.words[W+D]=A&67108863;if(H===0)return this.strip();I(H===-1),H=0;for(W=0;W<this.length;W++)A=-(this.words[W]|0)+H,H=A>>26,this.words[W]=A&67108863;return this.negative=1,this.strip()},Y.prototype._wordDiv=function(O,G){var D=this.length-O.length,Q=this.clone(),W=O,A=W.words[W.length-1]|0,H=this._countBits(A);if(D=26-H,D!==0)W=W.ushln(D),Q.iushln(D),A=W.words[W.length-1]|0;var z=Q.length-W.length,X;if(G!=="mod"){X=new Y(null),X.length=z+1,X.words=Array(X.length);for(var K=0;K<X.length;K++)X.words[K]=0}var R=Q.clone()._ishlnsubmul(W,1,z);if(R.negative===0){if(Q=R,X)X.words[z]=1}for(var v=z-1;v>=0;v--){var j=(Q.words[W.length+v]|0)*67108864+(Q.words[W.length+v-1]|0);j=Math.min(j/A|0,67108863),Q._ishlnsubmul(W,j,v);while(Q.negative!==0)if(j--,Q.negative=0,Q._ishlnsubmul(W,1,v),!Q.isZero())Q.negative^=1;if(X)X.words[v]=j}if(X)X.strip();if(Q.strip(),G!=="div"&&D!==0)Q.iushrn(D);return{div:X||null,mod:Q}},Y.prototype.divmod=function(O,G,D){if(I(!O.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var Q,W,A;if(this.negative!==0&&O.negative===0){if(A=this.neg().divmod(O,G),G!=="mod")Q=A.div.neg();if(G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.iadd(O)}return{div:Q,mod:W}}if(this.negative===0&&O.negative!==0){if(A=this.divmod(O.neg(),G),G!=="mod")Q=A.div.neg();return{div:Q,mod:A.mod}}if((this.negative&O.negative)!==0){if(A=this.neg().divmod(O.neg(),G),G!=="div"){if(W=A.mod.neg(),D&&W.negative!==0)W.isub(O)}return{div:A.div,mod:W}}if(O.length>this.length||this.cmp(O)<0)return{div:new Y(0),mod:this};if(O.length===1){if(G==="div")return{div:this.divn(O.words[0]),mod:null};if(G==="mod")return{div:null,mod:new Y(this.modn(O.words[0]))};return{div:this.divn(O.words[0]),mod:new Y(this.modn(O.words[0]))}}return this._wordDiv(O,G)},Y.prototype.div=function(O){return this.divmod(O,"div",!1).div},Y.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},Y.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},Y.prototype.divRound=function(O){var G=this.divmod(O);if(G.mod.isZero())return G.div;var D=G.div.negative!==0?G.mod.isub(O):G.mod,Q=O.ushrn(1),W=O.andln(1),A=D.cmp(Q);if(A<0||W===1&&A===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},Y.prototype.modn=function(O){I(O<=67108863);var G=67108864%O,D=0;for(var Q=this.length-1;Q>=0;Q--)D=(G*D+(this.words[Q]|0))%O;return D},Y.prototype.idivn=function(O){I(O<=67108863);var G=0;for(var D=this.length-1;D>=0;D--){var Q=(this.words[D]|0)+G*67108864;this.words[D]=Q/O|0,G=Q%O}return this.strip()},Y.prototype.divn=function(O){return this.clone().idivn(O)},Y.prototype.egcd=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=new Y(0),H=new Y(1),z=0;while(G.isEven()&&D.isEven())G.iushrn(1),D.iushrn(1),++z;var X=D.clone(),K=G.clone();while(!G.isZero()){for(var R=0,v=1;(G.words[0]&v)===0&&R<26;++R,v<<=1);if(R>0){G.iushrn(R);while(R-- >0){if(Q.isOdd()||W.isOdd())Q.iadd(X),W.isub(K);Q.iushrn(1),W.iushrn(1)}}for(var j=0,c=1;(D.words[0]&c)===0&&j<26;++j,c<<=1);if(j>0){D.iushrn(j);while(j-- >0){if(A.isOdd()||H.isOdd())A.iadd(X),H.isub(K);A.iushrn(1),H.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(A),W.isub(H);else D.isub(G),A.isub(Q),H.isub(W)}return{a:A,b:H,gcd:D.iushln(z)}},Y.prototype._invmp=function(O){I(O.negative===0),I(!O.isZero());var G=this,D=O.clone();if(G.negative!==0)G=G.umod(O);else G=G.clone();var Q=new Y(1),W=new Y(0),A=D.clone();while(G.cmpn(1)>0&&D.cmpn(1)>0){for(var H=0,z=1;(G.words[0]&z)===0&&H<26;++H,z<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Q.isOdd())Q.iadd(A);Q.iushrn(1)}}for(var X=0,K=1;(D.words[0]&K)===0&&X<26;++X,K<<=1);if(X>0){D.iushrn(X);while(X-- >0){if(W.isOdd())W.iadd(A);W.iushrn(1)}}if(G.cmp(D)>=0)G.isub(D),Q.isub(W);else D.isub(G),W.isub(Q)}var R;if(G.cmpn(1)===0)R=Q;else R=W;if(R.cmpn(0)<0)R.iadd(O);return R},Y.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var G=this.clone(),D=O.clone();G.negative=0,D.negative=0;for(var Q=0;G.isEven()&&D.isEven();Q++)G.iushrn(1),D.iushrn(1);do{while(G.isEven())G.iushrn(1);while(D.isEven())D.iushrn(1);var W=G.cmp(D);if(W<0){var A=G;G=D,D=A}else if(W===0||D.cmpn(1)===0)break;G.isub(D)}while(!0);return D.iushln(Q)},Y.prototype.invm=function(O){return this.egcd(O).a.umod(O)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(O){return this.words[0]&O},Y.prototype.bincn=function(O){I(typeof O==="number");var G=O%26,D=(O-G)/26,Q=1<<G;if(this.length<=D)return this._expand(D+1),this.words[D]|=Q,this;var W=Q;for(var A=D;W!==0&&A<this.length;A++){var H=this.words[A]|0;H+=W,W=H>>>26,H&=67108863,this.words[A]=H}if(W!==0)this.words[A]=W,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(O){var G=O<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var D;if(this.length>1)D=1;else{if(G)O=-O;I(O<=67108863,"Number is too big");var Q=this.words[0]|0;D=Q===O?0:Q<O?-1:1}if(this.negative!==0)return-D|0;return D},Y.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var G=this.ucmp(O);if(this.negative!==0)return-G|0;return G},Y.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;var G=0;for(var D=this.length-1;D>=0;D--){var Q=this.words[D]|0,W=O.words[D]|0;if(Q===W)continue;if(Q<W)G=-1;else if(Q>W)G=1;break}return G},Y.prototype.gtn=function(O){return this.cmpn(O)===1},Y.prototype.gt=function(O){return this.cmp(O)===1},Y.prototype.gten=function(O){return this.cmpn(O)>=0},Y.prototype.gte=function(O){return this.cmp(O)>=0},Y.prototype.ltn=function(O){return this.cmpn(O)===-1},Y.prototype.lt=function(O){return this.cmp(O)===-1},Y.prototype.lten=function(O){return this.cmpn(O)<=0},Y.prototype.lte=function(O){return this.cmp(O)<=0},Y.prototype.eqn=function(O){return this.cmpn(O)===0},Y.prototype.eq=function(O){return this.cmp(O)===0},Y.red=function(O){return new p(O)},Y.prototype.toRed=function(O){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},Y.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(O){return this.red=O,this},Y.prototype.forceRed=function(O){return I(!this.red,"Already a number in reduction context"),this._forceRed(O)},Y.prototype.redAdd=function(O){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},Y.prototype.redIAdd=function(O){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},Y.prototype.redSub=function(O){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},Y.prototype.redISub=function(O){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},Y.prototype.redShl=function(O){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},Y.prototype.redMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},Y.prototype.redIMul=function(O){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},Y.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(O){return I(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var x={k256:null,p224:null,p192:null,p25519:null};function w(O,G){this.name=O,this.p=new Y(G,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}w.prototype._tmp=function(){var O=new Y(null);return O.words=Array(Math.ceil(this.n/13)),O},w.prototype.ireduce=function(O){var G=O,D;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),D=G.bitLength();while(D>this.n);var Q=D<this.n?-1:G.ucmp(this.p);if(Q===0)G.words[0]=0,G.length=1;else if(Q>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},w.prototype.split=function(O,G){O.iushrn(this.n,0,G)},w.prototype.imulK=function(O){return O.imul(this.k)};function o(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(o,w),o.prototype.split=function(O,G){var D=4194303,Q=Math.min(O.length,9);for(var W=0;W<Q;W++)G.words[W]=O.words[W];if(G.length=Q,O.length<=9){O.words[0]=0,O.length=1;return}var A=O.words[9];G.words[G.length++]=A&D;for(W=10;W<O.length;W++){var H=O.words[W]|0;O.words[W-10]=(H&D)<<4|A>>>22,A=H}if(A>>>=22,O.words[W-10]=A,A===0&&O.length>10)O.length-=10;else O.length-=9},o.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;var G=0;for(var D=0;D<O.length;D++){var Q=O.words[D]|0;G+=Q*977,O.words[D]=G&67108863,G=Q*64+(G/67108864|0)}if(O.words[O.length-1]===0){if(O.length--,O.words[O.length-1]===0)O.length--}return O};function Q0(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(Q0,w);function V0(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(V0,w);function Y0(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(Y0,w),Y0.prototype.imulK=function(O){var G=0;for(var D=0;D<O.length;D++){var Q=(O.words[D]|0)*19+G,W=Q&67108863;Q>>>=26,O.words[D]=W,G=Q}if(G!==0)O.words[O.length++]=G;return O},Y._prime=function(O){if(x[O])return x[O];var G;if(O==="k256")G=new o;else if(O==="p224")G=new Q0;else if(O==="p192")G=new V0;else if(O==="p25519")G=new Y0;else throw Error("Unknown prime "+O);return x[O]=G,G};function p(O){if(typeof O==="string"){var G=Y._prime(O);this.m=G.p,this.prime=G}else I(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}p.prototype._verify1=function(O){I(O.negative===0,"red works only with positives"),I(O.red,"red works only with red numbers")},p.prototype._verify2=function(O,G){I((O.negative|G.negative)===0,"red works only with positives"),I(O.red&&O.red===G.red,"red works only with red numbers")},p.prototype.imod=function(O){if(this.prime)return this.prime.ireduce(O)._forceRed(this);return O.umod(this.m)._forceRed(this)},p.prototype.neg=function(O){if(O.isZero())return O.clone();return this.m.sub(O)._forceRed(this)},p.prototype.add=function(O,G){this._verify2(O,G);var D=O.add(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D._forceRed(this)},p.prototype.iadd=function(O,G){this._verify2(O,G);var D=O.iadd(G);if(D.cmp(this.m)>=0)D.isub(this.m);return D},p.prototype.sub=function(O,G){this._verify2(O,G);var D=O.sub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D._forceRed(this)},p.prototype.isub=function(O,G){this._verify2(O,G);var D=O.isub(G);if(D.cmpn(0)<0)D.iadd(this.m);return D},p.prototype.shl=function(O,G){return this._verify1(O),this.imod(O.ushln(G))},p.prototype.imul=function(O,G){return this._verify2(O,G),this.imod(O.imul(G))},p.prototype.mul=function(O,G){return this._verify2(O,G),this.imod(O.mul(G))},p.prototype.isqr=function(O){return this.imul(O,O.clone())},p.prototype.sqr=function(O){return this.mul(O,O)},p.prototype.sqrt=function(O){if(O.isZero())return O.clone();var G=this.m.andln(3);if(I(G%2===1),G===3){var D=this.m.add(new Y(1)).iushrn(2);return this.pow(O,D)}var Q=this.m.subn(1),W=0;while(!Q.isZero()&&Q.andln(1)===0)W++,Q.iushrn(1);I(!Q.isZero());var A=new Y(1).toRed(this),H=A.redNeg(),z=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new Y(2*X*X).toRed(this);while(this.pow(X,z).cmp(H)!==0)X.redIAdd(H);var K=this.pow(X,Q),R=this.pow(O,Q.addn(1).iushrn(1)),v=this.pow(O,Q),j=W;while(v.cmp(A)!==0){var c=v;for(var h=0;c.cmp(A)!==0;h++)c=c.redSqr();I(h<j);var n=this.pow(K,new Y(1).iushln(j-h-1));R=R.redMul(n),K=n.redSqr(),v=v.redMul(K),j=h}return R},p.prototype.invm=function(O){var G=O._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(O,G){if(G.isZero())return new Y(1).toRed(this);if(G.cmpn(1)===0)return O.clone();var D=4,Q=Array(1<<D);Q[0]=new Y(1).toRed(this),Q[1]=O;for(var W=2;W<Q.length;W++)Q[W]=this.mul(Q[W-1],O);var A=Q[0],H=0,z=0,X=G.bitLength()%26;if(X===0)X=26;for(W=G.length-1;W>=0;W--){var K=G.words[W];for(var R=X-1;R>=0;R--){var v=K>>R&1;if(A!==Q[0])A=this.sqr(A);if(v===0&&H===0){z=0;continue}if(H<<=1,H|=v,z++,z!==D&&(W!==0||R!==0))continue;A=this.mul(A,Q[H]),z=0,H=0}X=26}return A},p.prototype.convertTo=function(O){var G=O.umod(this.m);return G===O?G.clone():G},p.prototype.convertFrom=function(O){var G=O.clone();return G.red=null,G},Y.mont=function(O){return new U0(O)};function U0(O){if(p.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S(U0,p),U0.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},U0.prototype.convertFrom=function(O){var G=this.imod(O.mul(this.rinv));return G.red=null,G},U0.prototype.imul=function(O,G){if(O.isZero()||G.isZero())return O.words[0]=0,O.length=1,O;var D=O.imul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.mul=function(O,G){if(O.isZero()||G.isZero())return new Y(0)._forceRed(this);var D=O.mul(G),Q=D.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=D.isub(Q).iushrn(this.shift),A=W;if(W.cmp(this.m)>=0)A=W.isub(this.m);else if(W.cmpn(0)<0)A=W.iadd(this.m);return A._forceRed(this)},U0.prototype.invm=function(O){var G=this.imod(O._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof U>"u"||U,$)}),fV=G0(($,U)=>{var J=cQ(),V=c$().Buffer;function I(S,Y){return V.from(S.toRed(J.mont(Y.modulus)).redPow(new J(Y.publicExponent)).fromRed().toArray())}U.exports=I}),UH=G0(($,U)=>{(function(J,V){function I(Q,W){if(!Q)throw Error(W||"Assertion failed")}function S(Q,W){Q.super_=W;var A=function(){};A.prototype=W.prototype,Q.prototype=new A,Q.prototype.constructor=Q}function Y(Q,W,A){if(Y.isBN(Q))return Q;if(this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null){if(W==="le"||W==="be")A=W,W=10;this._init(Q||0,W||10,A||"be")}}if(typeof J==="object")J.exports=Y;else V.BN=Y;Y.BN=Y,Y.wordSize=26;var M;try{if(typeof window<"u"&&typeof window.Buffer<"u")M=window.Buffer;else M=(g$(),d0(k$)).Buffer}catch(Q){}Y.isBN=function(Q){if(Q instanceof Y)return!0;return Q!==null&&typeof Q==="object"&&Q.constructor.wordSize===Y.wordSize&&Array.isArray(Q.words)},Y.max=function(Q,W){if(Q.cmp(W)>0)return Q;return W},Y.min=function(Q,W){if(Q.cmp(W)<0)return Q;return W},Y.prototype._init=function(Q,W,A){if(typeof Q==="number")return this._initNumber(Q,W,A);if(typeof Q==="object")return this._initArray(Q,W,A);if(W==="hex")W=16;I(W===(W|0)&&W>=2&&W<=36),Q=Q.toString().replace(/\s+/g,"");var H=0;if(Q[0]==="-")H++,this.negative=1;if(H<Q.length){if(W===16)this._parseHex(Q,H,A);else if(this._parseBase(Q,W,H),A==="le")this._initArray(this.toArray(),W,A)}},Y.prototype._initNumber=function(Q,W,A){if(Q<0)this.negative=1,Q=-Q;if(Q<67108864)this.words=[Q&67108863],this.length=1;else if(Q<4503599627370496)this.words=[Q&67108863,Q/67108864&67108863],this.length=2;else I(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3;if(A!=="le")return;this._initArray(this.toArray(),W,A)},Y.prototype._initArray=function(Q,W,A){if(I(typeof Q.length==="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=Array(this.length);for(var H=0;H<this.length;H++)this.words[H]=0;var z,X,K=0;if(A==="be"){for(H=Q.length-1,z=0;H>=0;H-=3)if(X=Q[H]|Q[H-1]<<8|Q[H-2]<<16,this.words[z]|=X<<K&67108863,this.words[z+1]=X>>>26-K&67108863,K+=24,K>=26)K-=26,z++}else if(A==="le"){for(H=0,z=0;H<Q.length;H+=3)if(X=Q[H]|Q[H+1]<<8|Q[H+2]<<16,this.words[z]|=X<<K&67108863,this.words[z+1]=X>>>26-K&67108863,K+=24,K>=26)K-=26,z++}return this._strip()};function T(Q,W){var A=Q.charCodeAt(W);if(A>=48&&A<=57)return A-48;else if(A>=65&&A<=70)return A-55;else if(A>=97&&A<=102)return A-87;else I(!1,"Invalid character in "+Q)}function L(Q,W,A){var H=T(Q,A);if(A-1>=W)H|=T(Q,A-1)<<4;return H}Y.prototype._parseHex=function(Q,W,A){this.length=Math.ceil((Q.length-W)/6),this.words=Array(this.length);for(var H=0;H<this.length;H++)this.words[H]=0;var z=0,X=0,K;if(A==="be")for(H=Q.length-1;H>=W;H-=2)if(K=L(Q,W,H)<<z,this.words[X]|=K&67108863,z>=18)z-=18,X+=1,this.words[X]|=K>>>26;else z+=8;else{var R=Q.length-W;for(H=R%2===0?W+1:W;H<Q.length;H+=2)if(K=L(Q,W,H)<<z,this.words[X]|=K&67108863,z>=18)z-=18,X+=1,this.words[X]|=K>>>26;else z+=8}this._strip()};function E(Q,W,A,H){var z=0,X=0,K=Math.min(Q.length,A);for(var R=W;R<K;R++){var v=Q.charCodeAt(R)-48;if(z*=H,v>=49)X=v-49+10;else if(v>=17)X=v-17+10;else X=v;I(v>=0&&X<H,"Invalid character"),z+=X}return z}Y.prototype._parseBase=function(Q,W,A){this.words=[0],this.length=1;for(var H=0,z=1;z<=67108863;z*=W)H++;H--,z=z/W|0;var X=Q.length-A,K=X%H,R=Math.min(X,X-K)+A,v=0;for(var j=A;j<R;j+=H)if(v=E(Q,j,j+H,W),this.imuln(z),this.words[0]+v<67108864)this.words[0]+=v;else this._iaddn(v);if(K!==0){var c=1;v=E(Q,j,Q.length,W);for(j=0;j<K;j++)c*=W;if(this.imuln(c),this.words[0]+v<67108864)this.words[0]+=v;else this._iaddn(v)}this._strip()},Y.prototype.copy=function(Q){Q.words=Array(this.length);for(var W=0;W<this.length;W++)Q.words[W]=this.words[W];Q.length=this.length,Q.negative=this.negative,Q.red=this.red};function F(Q,W){Q.words=W.words,Q.length=W.length,Q.negative=W.negative,Q.red=W.red}if(Y.prototype._move=function(Q){F(Q,this)},Y.prototype.clone=function(){var Q=new Y(null);return this.copy(Q),Q},Y.prototype._expand=function(Q){while(this.length<Q)this.words[this.length++]=0;return this},Y.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},Y.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{Y.prototype[Symbol.for("nodejs.util.inspect.custom")]=Z}catch(Q){Y.prototype.inspect=Z}else Y.prototype.inspect=Z;function Z(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var P=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],q=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(Y.prototype.toString=function(Q,W){Q=Q||10,W=W|0||1;var A;if(Q===16||Q==="hex"){A="";var H=0,z=0;for(var X=0;X<this.length;X++){var K=this.words[X],R=((K<<H|z)&16777215).toString(16);if(z=K>>>24-H&16777215,H+=2,H>=26)H-=26,X--;if(z!==0||X!==this.length-1)A=P[6-R.length]+R+A;else A=R+A}if(z!==0)A=z.toString(16)+A;while(A.length%W!==0)A="0"+A;if(this.negative!==0)A="-"+A;return A}if(Q===(Q|0)&&Q>=2&&Q<=36){var v=q[Q],j=k[Q];A="";var c=this.clone();c.negative=0;while(!c.isZero()){var h=c.modrn(j).toString(Q);if(c=c.idivn(j),!c.isZero())A=P[v-h.length]+h+A;else A=h+A}if(this.isZero())A="0"+A;while(A.length%W!==0)A="0"+A;if(this.negative!==0)A="-"+A;return A}I(!1,"Base should be between 2 and 36")},Y.prototype.toNumber=function(){var Q=this.words[0];if(this.length===2)Q+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Q+=4503599627370496+this.words[1]*67108864;else if(this.length>2)I(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Q:Q},Y.prototype.toJSON=function(){return this.toString(16,2)},M)Y.prototype.toBuffer=function(Q,W){return this.toArrayLike(M,Q,W)};Y.prototype.toArray=function(Q,W){return this.toArrayLike(Array,Q,W)};var C=function(Q,W){if(Q.allocUnsafe)return Q.allocUnsafe(W);return new Q(W)};if(Y.prototype.toArrayLike=function(Q,W,A){this._strip();var H=this.byteLength(),z=A||Math.max(1,H);I(H<=z,"byte array longer than desired length"),I(z>0,"Requested array length <= 0");var X=C(Q,z),K=W==="le"?"LE":"BE";return this["_toArrayLike"+K](X,H),X},Y.prototype._toArrayLikeLE=function(Q,W){var A=0,H=0;for(var z=0,X=0;z<this.length;z++){var K=this.words[z]<<X|H;if(Q[A++]=K&255,A<Q.length)Q[A++]=K>>8&255;if(A<Q.length)Q[A++]=K>>16&255;if(X===6){if(A<Q.length)Q[A++]=K>>24&255;H=0,X=0}else H=K>>>24,X+=2}if(A<Q.length){Q[A++]=H;while(A<Q.length)Q[A++]=0}},Y.prototype._toArrayLikeBE=function(Q,W){var A=Q.length-1,H=0;for(var z=0,X=0;z<this.length;z++){var K=this.words[z]<<X|H;if(Q[A--]=K&255,A>=0)Q[A--]=K>>8&255;if(A>=0)Q[A--]=K>>16&255;if(X===6){if(A>=0)Q[A--]=K>>24&255;H=0,X=0}else H=K>>>24,X+=2}if(A>=0){Q[A--]=H;while(A>=0)Q[A--]=0}},Math.clz32)Y.prototype._countBits=function(Q){return 32-Math.clz32(Q)};else Y.prototype._countBits=function(Q){var W=Q,A=0;if(W>=4096)A+=13,W>>>=13;if(W>=64)A+=7,W>>>=7;if(W>=8)A+=4,W>>>=4;if(W>=2)A+=2,W>>>=2;return A+W};Y.prototype._zeroBits=function(Q){if(Q===0)return 26;var W=Q,A=0;if((W&8191)===0)A+=13,W>>>=13;if((W&127)===0)A+=7,W>>>=7;if((W&15)===0)A+=4,W>>>=4;if((W&3)===0)A+=2,W>>>=2;if((W&1)===0)A++;return A},Y.prototype.bitLength=function(){var Q=this.words[this.length-1],W=this._countBits(Q);return(this.length-1)*26+W};function _(Q){var W=Array(Q.bitLength());for(var A=0;A<W.length;A++){var H=A/26|0,z=A%26;W[A]=Q.words[H]>>>z&1}return W}Y.prototype.zeroBits=function(){if(this.isZero())return 0;var Q=0;for(var W=0;W<this.length;W++){var A=this._zeroBits(this.words[W]);if(Q+=A,A!==26)break}return Q},Y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},Y.prototype.toTwos=function(Q){if(this.negative!==0)return this.abs().inotn(Q).iaddn(1);return this.clone()},Y.prototype.fromTwos=function(Q){if(this.testn(Q-1))return this.notn(Q).iaddn(1).ineg();return this.clone()},Y.prototype.isNeg=function(){return this.negative!==0},Y.prototype.neg=function(){return this.clone().ineg()},Y.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},Y.prototype.iuor=function(Q){while(this.length<Q.length)this.words[this.length++]=0;for(var W=0;W<Q.length;W++)this.words[W]=this.words[W]|Q.words[W];return this._strip()},Y.prototype.ior=function(Q){return I((this.negative|Q.negative)===0),this.iuor(Q)},Y.prototype.or=function(Q){if(this.length>Q.length)return this.clone().ior(Q);return Q.clone().ior(this)},Y.prototype.uor=function(Q){if(this.length>Q.length)return this.clone().iuor(Q);return Q.clone().iuor(this)},Y.prototype.iuand=function(Q){var W;if(this.length>Q.length)W=Q;else W=this;for(var A=0;A<W.length;A++)this.words[A]=this.words[A]&Q.words[A];return this.length=W.length,this._strip()},Y.prototype.iand=function(Q){return I((this.negative|Q.negative)===0),this.iuand(Q)},Y.prototype.and=function(Q){if(this.length>Q.length)return this.clone().iand(Q);return Q.clone().iand(this)},Y.prototype.uand=function(Q){if(this.length>Q.length)return this.clone().iuand(Q);return Q.clone().iuand(this)},Y.prototype.iuxor=function(Q){var W,A;if(this.length>Q.length)W=this,A=Q;else W=Q,A=this;for(var H=0;H<A.length;H++)this.words[H]=W.words[H]^A.words[H];if(this!==W)for(;H<W.length;H++)this.words[H]=W.words[H];return this.length=W.length,this._strip()},Y.prototype.ixor=function(Q){return I((this.negative|Q.negative)===0),this.iuxor(Q)},Y.prototype.xor=function(Q){if(this.length>Q.length)return this.clone().ixor(Q);return Q.clone().ixor(this)},Y.prototype.uxor=function(Q){if(this.length>Q.length)return this.clone().iuxor(Q);return Q.clone().iuxor(this)},Y.prototype.inotn=function(Q){I(typeof Q==="number"&&Q>=0);var W=Math.ceil(Q/26)|0,A=Q%26;if(this._expand(W),A>0)W--;for(var H=0;H<W;H++)this.words[H]=~this.words[H]&67108863;if(A>0)this.words[H]=~this.words[H]&67108863>>26-A;return this._strip()},Y.prototype.notn=function(Q){return this.clone().inotn(Q)},Y.prototype.setn=function(Q,W){I(typeof Q==="number"&&Q>=0);var A=Q/26|0,H=Q%26;if(this._expand(A+1),W)this.words[A]=this.words[A]|1<<H;else this.words[A]=this.words[A]&~(1<<H);return this._strip()},Y.prototype.iadd=function(Q){var W;if(this.negative!==0&&Q.negative===0)return this.negative=0,W=this.isub(Q),this.negative^=1,this._normSign();else if(this.negative===0&&Q.negative!==0)return Q.negative=0,W=this.isub(Q),Q.negative=1,W._normSign();var A,H;if(this.length>Q.length)A=this,H=Q;else A=Q,H=this;var z=0;for(var X=0;X<H.length;X++)W=(A.words[X]|0)+(H.words[X]|0)+z,this.words[X]=W&67108863,z=W>>>26;for(;z!==0&&X<A.length;X++)W=(A.words[X]|0)+z,this.words[X]=W&67108863,z=W>>>26;if(this.length=A.length,z!==0)this.words[this.length]=z,this.length++;else if(A!==this)for(;X<A.length;X++)this.words[X]=A.words[X];return this},Y.prototype.add=function(Q){var W;if(Q.negative!==0&&this.negative===0)return Q.negative=0,W=this.sub(Q),Q.negative^=1,W;else if(Q.negative===0&&this.negative!==0)return this.negative=0,W=Q.sub(this),this.negative=1,W;if(this.length>Q.length)return this.clone().iadd(Q);return Q.clone().iadd(this)},Y.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var W=this.iadd(Q);return Q.negative=1,W._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var A=this.cmp(Q);if(A===0)return this.negative=0,this.length=1,this.words[0]=0,this;var H,z;if(A>0)H=this,z=Q;else H=Q,z=this;var X=0;for(var K=0;K<z.length;K++)W=(H.words[K]|0)-(z.words[K]|0)+X,X=W>>26,this.words[K]=W&67108863;for(;X!==0&&K<H.length;K++)W=(H.words[K]|0)+X,X=W>>26,this.words[K]=W&67108863;if(X===0&&K<H.length&&H!==this)for(;K<H.length;K++)this.words[K]=H.words[K];if(this.length=Math.max(this.length,K),H!==this)this.negative=1;return this._strip()},Y.prototype.sub=function(Q){return this.clone().isub(Q)};function g(Q,W,A){A.negative=W.negative^Q.negative;var H=Q.length+W.length|0;A.length=H,H=H-1|0;var z=Q.words[0]|0,X=W.words[0]|0,K=z*X,R=K&67108863,v=K/67108864|0;A.words[0]=R;for(var j=1;j<H;j++){var c=v>>>26,h=v&67108863,n=Math.min(j,W.length-1);for(var D0=Math.max(0,j-Q.length+1);D0<=n;D0++){var i=j-D0|0;z=Q.words[i]|0,X=W.words[D0]|0,K=z*X+h,c+=K/67108864|0,h=K&67108863}A.words[j]=h|0,v=c|0}if(v!==0)A.words[j]=v|0;else A.length--;return A._strip()}var N=function(Q,W,A){var H=Q.words,z=W.words,X=A.words,K=0,R,v,j,c=H[0]|0,h=c&8191,n=c>>>13,D0=H[1]|0,i=D0&8191,l=D0>>>13,X0=H[2]|0,m=X0&8191,s=X0>>>13,h0=H[3]|0,f=h0&8191,u=h0>>>13,J0=H[4]|0,t=J0&8191,a=J0>>>13,M0=H[5]|0,y=M0&8191,r=M0>>>13,c0=H[6]|0,d=c0&8191,I0=c0>>>13,b0=H[7]|0,A0=b0&8191,H0=b0>>>13,X$=H[8]|0,z0=X$&8191,F0=X$>>>13,Y$=H[9]|0,Z0=Y$&8191,E0=Y$>>>13,N$=z[0]|0,P0=N$&8191,g0=N$>>>13,x$=z[1]|0,j0=x$&8191,T0=x$>>>13,j$=z[2]|0,_0=j$&8191,q0=j$>>>13,q$=z[3]|0,N0=q$&8191,x0=q$>>>13,R$=z[4]|0,R0=R$&8191,B=R$>>>13,b=z[5]|0,e=b&8191,$0=b>>>13,u0=z[6]|0,K0=u0&8191,L0=u0>>>13,J$=z[7]|0,C0=J$&8191,B0=J$>>>13,_$=z[8]|0,k0=_$&8191,v0=_$>>>13,Q$=z[9]|0,r0=Q$&8191,o0=Q$>>>13;A.negative=Q.negative^W.negative,A.length=19,R=Math.imul(h,P0),v=Math.imul(h,g0),v=v+Math.imul(n,P0)|0,j=Math.imul(n,g0);var a0=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(a0>>>26)|0,a0&=67108863,R=Math.imul(i,P0),v=Math.imul(i,g0),v=v+Math.imul(l,P0)|0,j=Math.imul(l,g0),R=R+Math.imul(h,j0)|0,v=v+Math.imul(h,T0)|0,v=v+Math.imul(n,j0)|0,j=j+Math.imul(n,T0)|0;var e0=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(e0>>>26)|0,e0&=67108863,R=Math.imul(m,P0),v=Math.imul(m,g0),v=v+Math.imul(s,P0)|0,j=Math.imul(s,g0),R=R+Math.imul(i,j0)|0,v=v+Math.imul(i,T0)|0,v=v+Math.imul(l,j0)|0,j=j+Math.imul(l,T0)|0,R=R+Math.imul(h,_0)|0,v=v+Math.imul(h,q0)|0,v=v+Math.imul(n,_0)|0,j=j+Math.imul(n,q0)|0;var S$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(S$>>>26)|0,S$&=67108863,R=Math.imul(f,P0),v=Math.imul(f,g0),v=v+Math.imul(u,P0)|0,j=Math.imul(u,g0),R=R+Math.imul(m,j0)|0,v=v+Math.imul(m,T0)|0,v=v+Math.imul(s,j0)|0,j=j+Math.imul(s,T0)|0,R=R+Math.imul(i,_0)|0,v=v+Math.imul(i,q0)|0,v=v+Math.imul(l,_0)|0,j=j+Math.imul(l,q0)|0,R=R+Math.imul(h,N0)|0,v=v+Math.imul(h,x0)|0,v=v+Math.imul(n,N0)|0,j=j+Math.imul(n,x0)|0;var W$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(W$>>>26)|0,W$&=67108863,R=Math.imul(t,P0),v=Math.imul(t,g0),v=v+Math.imul(a,P0)|0,j=Math.imul(a,g0),R=R+Math.imul(f,j0)|0,v=v+Math.imul(f,T0)|0,v=v+Math.imul(u,j0)|0,j=j+Math.imul(u,T0)|0,R=R+Math.imul(m,_0)|0,v=v+Math.imul(m,q0)|0,v=v+Math.imul(s,_0)|0,j=j+Math.imul(s,q0)|0,R=R+Math.imul(i,N0)|0,v=v+Math.imul(i,x0)|0,v=v+Math.imul(l,N0)|0,j=j+Math.imul(l,x0)|0,R=R+Math.imul(h,R0)|0,v=v+Math.imul(h,B)|0,v=v+Math.imul(n,R0)|0,j=j+Math.imul(n,B)|0;var D$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(D$>>>26)|0,D$&=67108863,R=Math.imul(y,P0),v=Math.imul(y,g0),v=v+Math.imul(r,P0)|0,j=Math.imul(r,g0),R=R+Math.imul(t,j0)|0,v=v+Math.imul(t,T0)|0,v=v+Math.imul(a,j0)|0,j=j+Math.imul(a,T0)|0,R=R+Math.imul(f,_0)|0,v=v+Math.imul(f,q0)|0,v=v+Math.imul(u,_0)|0,j=j+Math.imul(u,q0)|0,R=R+Math.imul(m,N0)|0,v=v+Math.imul(m,x0)|0,v=v+Math.imul(s,N0)|0,j=j+Math.imul(s,x0)|0,R=R+Math.imul(i,R0)|0,v=v+Math.imul(i,B)|0,v=v+Math.imul(l,R0)|0,j=j+Math.imul(l,B)|0,R=R+Math.imul(h,e)|0,v=v+Math.imul(h,$0)|0,v=v+Math.imul(n,e)|0,j=j+Math.imul(n,$0)|0;var z$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(z$>>>26)|0,z$&=67108863,R=Math.imul(d,P0),v=Math.imul(d,g0),v=v+Math.imul(I0,P0)|0,j=Math.imul(I0,g0),R=R+Math.imul(y,j0)|0,v=v+Math.imul(y,T0)|0,v=v+Math.imul(r,j0)|0,j=j+Math.imul(r,T0)|0,R=R+Math.imul(t,_0)|0,v=v+Math.imul(t,q0)|0,v=v+Math.imul(a,_0)|0,j=j+Math.imul(a,q0)|0,R=R+Math.imul(f,N0)|0,v=v+Math.imul(f,x0)|0,v=v+Math.imul(u,N0)|0,j=j+Math.imul(u,x0)|0,R=R+Math.imul(m,R0)|0,v=v+Math.imul(m,B)|0,v=v+Math.imul(s,R0)|0,j=j+Math.imul(s,B)|0,R=R+Math.imul(i,e)|0,v=v+Math.imul(i,$0)|0,v=v+Math.imul(l,e)|0,j=j+Math.imul(l,$0)|0,R=R+Math.imul(h,K0)|0,v=v+Math.imul(h,L0)|0,v=v+Math.imul(n,K0)|0,j=j+Math.imul(n,L0)|0;var K$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(K$>>>26)|0,K$&=67108863,R=Math.imul(A0,P0),v=Math.imul(A0,g0),v=v+Math.imul(H0,P0)|0,j=Math.imul(H0,g0),R=R+Math.imul(d,j0)|0,v=v+Math.imul(d,T0)|0,v=v+Math.imul(I0,j0)|0,j=j+Math.imul(I0,T0)|0,R=R+Math.imul(y,_0)|0,v=v+Math.imul(y,q0)|0,v=v+Math.imul(r,_0)|0,j=j+Math.imul(r,q0)|0,R=R+Math.imul(t,N0)|0,v=v+Math.imul(t,x0)|0,v=v+Math.imul(a,N0)|0,j=j+Math.imul(a,x0)|0,R=R+Math.imul(f,R0)|0,v=v+Math.imul(f,B)|0,v=v+Math.imul(u,R0)|0,j=j+Math.imul(u,B)|0,R=R+Math.imul(m,e)|0,v=v+Math.imul(m,$0)|0,v=v+Math.imul(s,e)|0,j=j+Math.imul(s,$0)|0,R=R+Math.imul(i,K0)|0,v=v+Math.imul(i,L0)|0,v=v+Math.imul(l,K0)|0,j=j+Math.imul(l,L0)|0,R=R+Math.imul(h,C0)|0,v=v+Math.imul(h,B0)|0,v=v+Math.imul(n,C0)|0,j=j+Math.imul(n,B0)|0;var A$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(A$>>>26)|0,A$&=67108863,R=Math.imul(z0,P0),v=Math.imul(z0,g0),v=v+Math.imul(F0,P0)|0,j=Math.imul(F0,g0),R=R+Math.imul(A0,j0)|0,v=v+Math.imul(A0,T0)|0,v=v+Math.imul(H0,j0)|0,j=j+Math.imul(H0,T0)|0,R=R+Math.imul(d,_0)|0,v=v+Math.imul(d,q0)|0,v=v+Math.imul(I0,_0)|0,j=j+Math.imul(I0,q0)|0,R=R+Math.imul(y,N0)|0,v=v+Math.imul(y,x0)|0,v=v+Math.imul(r,N0)|0,j=j+Math.imul(r,x0)|0,R=R+Math.imul(t,R0)|0,v=v+Math.imul(t,B)|0,v=v+Math.imul(a,R0)|0,j=j+Math.imul(a,B)|0,R=R+Math.imul(f,e)|0,v=v+Math.imul(f,$0)|0,v=v+Math.imul(u,e)|0,j=j+Math.imul(u,$0)|0,R=R+Math.imul(m,K0)|0,v=v+Math.imul(m,L0)|0,v=v+Math.imul(s,K0)|0,j=j+Math.imul(s,L0)|0,R=R+Math.imul(i,C0)|0,v=v+Math.imul(i,B0)|0,v=v+Math.imul(l,C0)|0,j=j+Math.imul(l,B0)|0,R=R+Math.imul(h,k0)|0,v=v+Math.imul(h,v0)|0,v=v+Math.imul(n,k0)|0,j=j+Math.imul(n,v0)|0;var H$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(H$>>>26)|0,H$&=67108863,R=Math.imul(Z0,P0),v=Math.imul(Z0,g0),v=v+Math.imul(E0,P0)|0,j=Math.imul(E0,g0),R=R+Math.imul(z0,j0)|0,v=v+Math.imul(z0,T0)|0,v=v+Math.imul(F0,j0)|0,j=j+Math.imul(F0,T0)|0,R=R+Math.imul(A0,_0)|0,v=v+Math.imul(A0,q0)|0,v=v+Math.imul(H0,_0)|0,j=j+Math.imul(H0,q0)|0,R=R+Math.imul(d,N0)|0,v=v+Math.imul(d,x0)|0,v=v+Math.imul(I0,N0)|0,j=j+Math.imul(I0,x0)|0,R=R+Math.imul(y,R0)|0,v=v+Math.imul(y,B)|0,v=v+Math.imul(r,R0)|0,j=j+Math.imul(r,B)|0,R=R+Math.imul(t,e)|0,v=v+Math.imul(t,$0)|0,v=v+Math.imul(a,e)|0,j=j+Math.imul(a,$0)|0,R=R+Math.imul(f,K0)|0,v=v+Math.imul(f,L0)|0,v=v+Math.imul(u,K0)|0,j=j+Math.imul(u,L0)|0,R=R+Math.imul(m,C0)|0,v=v+Math.imul(m,B0)|0,v=v+Math.imul(s,C0)|0,j=j+Math.imul(s,B0)|0,R=R+Math.imul(i,k0)|0,v=v+Math.imul(i,v0)|0,v=v+Math.imul(l,k0)|0,j=j+Math.imul(l,v0)|0,R=R+Math.imul(h,r0)|0,v=v+Math.imul(h,o0)|0,v=v+Math.imul(n,r0)|0,j=j+Math.imul(n,o0)|0;var F$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(F$>>>26)|0,F$&=67108863,R=Math.imul(Z0,j0),v=Math.imul(Z0,T0),v=v+Math.imul(E0,j0)|0,j=Math.imul(E0,T0),R=R+Math.imul(z0,_0)|0,v=v+Math.imul(z0,q0)|0,v=v+Math.imul(F0,_0)|0,j=j+Math.imul(F0,q0)|0,R=R+Math.imul(A0,N0)|0,v=v+Math.imul(A0,x0)|0,v=v+Math.imul(H0,N0)|0,j=j+Math.imul(H0,x0)|0,R=R+Math.imul(d,R0)|0,v=v+Math.imul(d,B)|0,v=v+Math.imul(I0,R0)|0,j=j+Math.imul(I0,B)|0,R=R+Math.imul(y,e)|0,v=v+Math.imul(y,$0)|0,v=v+Math.imul(r,e)|0,j=j+Math.imul(r,$0)|0,R=R+Math.imul(t,K0)|0,v=v+Math.imul(t,L0)|0,v=v+Math.imul(a,K0)|0,j=j+Math.imul(a,L0)|0,R=R+Math.imul(f,C0)|0,v=v+Math.imul(f,B0)|0,v=v+Math.imul(u,C0)|0,j=j+Math.imul(u,B0)|0,R=R+Math.imul(m,k0)|0,v=v+Math.imul(m,v0)|0,v=v+Math.imul(s,k0)|0,j=j+Math.imul(s,v0)|0,R=R+Math.imul(i,r0)|0,v=v+Math.imul(i,o0)|0,v=v+Math.imul(l,r0)|0,j=j+Math.imul(l,o0)|0;var L$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(L$>>>26)|0,L$&=67108863,R=Math.imul(Z0,_0),v=Math.imul(Z0,q0),v=v+Math.imul(E0,_0)|0,j=Math.imul(E0,q0),R=R+Math.imul(z0,N0)|0,v=v+Math.imul(z0,x0)|0,v=v+Math.imul(F0,N0)|0,j=j+Math.imul(F0,x0)|0,R=R+Math.imul(A0,R0)|0,v=v+Math.imul(A0,B)|0,v=v+Math.imul(H0,R0)|0,j=j+Math.imul(H0,B)|0,R=R+Math.imul(d,e)|0,v=v+Math.imul(d,$0)|0,v=v+Math.imul(I0,e)|0,j=j+Math.imul(I0,$0)|0,R=R+Math.imul(y,K0)|0,v=v+Math.imul(y,L0)|0,v=v+Math.imul(r,K0)|0,j=j+Math.imul(r,L0)|0,R=R+Math.imul(t,C0)|0,v=v+Math.imul(t,B0)|0,v=v+Math.imul(a,C0)|0,j=j+Math.imul(a,B0)|0,R=R+Math.imul(f,k0)|0,v=v+Math.imul(f,v0)|0,v=v+Math.imul(u,k0)|0,j=j+Math.imul(u,v0)|0,R=R+Math.imul(m,r0)|0,v=v+Math.imul(m,o0)|0,v=v+Math.imul(s,r0)|0,j=j+Math.imul(s,o0)|0;var E$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(E$>>>26)|0,E$&=67108863,R=Math.imul(Z0,N0),v=Math.imul(Z0,x0),v=v+Math.imul(E0,N0)|0,j=Math.imul(E0,x0),R=R+Math.imul(z0,R0)|0,v=v+Math.imul(z0,B)|0,v=v+Math.imul(F0,R0)|0,j=j+Math.imul(F0,B)|0,R=R+Math.imul(A0,e)|0,v=v+Math.imul(A0,$0)|0,v=v+Math.imul(H0,e)|0,j=j+Math.imul(H0,$0)|0,R=R+Math.imul(d,K0)|0,v=v+Math.imul(d,L0)|0,v=v+Math.imul(I0,K0)|0,j=j+Math.imul(I0,L0)|0,R=R+Math.imul(y,C0)|0,v=v+Math.imul(y,B0)|0,v=v+Math.imul(r,C0)|0,j=j+Math.imul(r,B0)|0,R=R+Math.imul(t,k0)|0,v=v+Math.imul(t,v0)|0,v=v+Math.imul(a,k0)|0,j=j+Math.imul(a,v0)|0,R=R+Math.imul(f,r0)|0,v=v+Math.imul(f,o0)|0,v=v+Math.imul(u,r0)|0,j=j+Math.imul(u,o0)|0;var Z$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(Z$>>>26)|0,Z$&=67108863,R=Math.imul(Z0,R0),v=Math.imul(Z0,B),v=v+Math.imul(E0,R0)|0,j=Math.imul(E0,B),R=R+Math.imul(z0,e)|0,v=v+Math.imul(z0,$0)|0,v=v+Math.imul(F0,e)|0,j=j+Math.imul(F0,$0)|0,R=R+Math.imul(A0,K0)|0,v=v+Math.imul(A0,L0)|0,v=v+Math.imul(H0,K0)|0,j=j+Math.imul(H0,L0)|0,R=R+Math.imul(d,C0)|0,v=v+Math.imul(d,B0)|0,v=v+Math.imul(I0,C0)|0,j=j+Math.imul(I0,B0)|0,R=R+Math.imul(y,k0)|0,v=v+Math.imul(y,v0)|0,v=v+Math.imul(r,k0)|0,j=j+Math.imul(r,v0)|0,R=R+Math.imul(t,r0)|0,v=v+Math.imul(t,o0)|0,v=v+Math.imul(a,r0)|0,j=j+Math.imul(a,o0)|0;var v$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(v$>>>26)|0,v$&=67108863,R=Math.imul(Z0,e),v=Math.imul(Z0,$0),v=v+Math.imul(E0,e)|0,j=Math.imul(E0,$0),R=R+Math.imul(z0,K0)|0,v=v+Math.imul(z0,L0)|0,v=v+Math.imul(F0,K0)|0,j=j+Math.imul(F0,L0)|0,R=R+Math.imul(A0,C0)|0,v=v+Math.imul(A0,B0)|0,v=v+Math.imul(H0,C0)|0,j=j+Math.imul(H0,B0)|0,R=R+Math.imul(d,k0)|0,v=v+Math.imul(d,v0)|0,v=v+Math.imul(I0,k0)|0,j=j+Math.imul(I0,v0)|0,R=R+Math.imul(y,r0)|0,v=v+Math.imul(y,o0)|0,v=v+Math.imul(r,r0)|0,j=j+Math.imul(r,o0)|0;var M$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(M$>>>26)|0,M$&=67108863,R=Math.imul(Z0,K0),v=Math.imul(Z0,L0),v=v+Math.imul(E0,K0)|0,j=Math.imul(E0,L0),R=R+Math.imul(z0,C0)|0,v=v+Math.imul(z0,B0)|0,v=v+Math.imul(F0,C0)|0,j=j+Math.imul(F0,B0)|0,R=R+Math.imul(A0,k0)|0,v=v+Math.imul(A0,v0)|0,v=v+Math.imul(H0,k0)|0,j=j+Math.imul(H0,v0)|0,R=R+Math.imul(d,r0)|0,v=v+Math.imul(d,o0)|0,v=v+Math.imul(I0,r0)|0,j=j+Math.imul(I0,o0)|0;var P$=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(P$>>>26)|0,P$&=67108863,R=Math.imul(Z0,C0),v=Math.imul(Z0,B0),v=v+Math.imul(E0,C0)|0,j=Math.imul(E0,B0),R=R+Math.imul(z0,k0)|0,v=v+Math.imul(z0,v0)|0,v=v+Math.imul(F0,k0)|0,j=j+Math.imul(F0,v0)|0,R=R+Math.imul(A0,r0)|0,v=v+Math.imul(A0,o0)|0,v=v+Math.imul(H0,r0)|0,j=j+Math.imul(H0,o0)|0;var Z6=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(Z6>>>26)|0,Z6&=67108863,R=Math.imul(Z0,k0),v=Math.imul(Z0,v0),v=v+Math.imul(E0,k0)|0,j=Math.imul(E0,v0),R=R+Math.imul(z0,r0)|0,v=v+Math.imul(z0,o0)|0,v=v+Math.imul(F0,r0)|0,j=j+Math.imul(F0,o0)|0;var v6=(K+R|0)+((v&8191)<<13)|0;K=(j+(v>>>13)|0)+(v6>>>26)|0,v6&=67108863,R=Math.imul(Z0,r0),v=Math.imul(Z0,o0),v=v+Math.imul(E0,r0)|0,j=Math.imul(E0,o0);var M6=(K+R|0)+((v&8191)<<13)|0;if(K=(j+(v>>>13)|0)+(M6>>>26)|0,M6&=67108863,X[0]=a0,X[1]=e0,X[2]=S$,X[3]=W$,X[4]=D$,X[5]=z$,X[6]=K$,X[7]=A$,X[8]=H$,X[9]=F$,X[10]=L$,X[11]=E$,X[12]=Z$,X[13]=v$,X[14]=M$,X[15]=P$,X[16]=Z6,X[17]=v6,X[18]=M6,K!==0)X[19]=K,A.length++;return A};if(!Math.imul)N=g;function x(Q,W,A){A.negative=W.negative^Q.negative,A.length=Q.length+W.length;var H=0,z=0;for(var X=0;X<A.length-1;X++){var K=z;z=0;var R=H&67108863,v=Math.min(X,W.length-1);for(var j=Math.max(0,X-Q.length+1);j<=v;j++){var c=X-j,h=Q.words[c]|0,n=W.words[j]|0,D0=h*n,i=D0&67108863;K=K+(D0/67108864|0)|0,i=i+R|0,R=i&67108863,K=K+(i>>>26)|0,z+=K>>>26,K&=67108863}A.words[X]=R,H=K,K=z}if(H!==0)A.words[X]=H;else A.length--;return A._strip()}function w(Q,W,A){return x(Q,W,A)}Y.prototype.mulTo=function(Q,W){var A,H=this.length+Q.length;if(this.length===10&&Q.length===10)A=N(this,Q,W);else if(H<63)A=g(this,Q,W);else if(H<1024)A=x(this,Q,W);else A=w(this,Q,W);return A};function o(Q,W){this.x=Q,this.y=W}o.prototype.makeRBT=function(Q){var W=Array(Q),A=Y.prototype._countBits(Q)-1;for(var H=0;H<Q;H++)W[H]=this.revBin(H,A,Q);return W},o.prototype.revBin=function(Q,W,A){if(Q===0||Q===A-1)return Q;var H=0;for(var z=0;z<W;z++)H|=(Q&1)<<W-z-1,Q>>=1;return H},o.prototype.permute=function(Q,W,A,H,z,X){for(var K=0;K<X;K++)H[K]=W[Q[K]],z[K]=A[Q[K]]},o.prototype.transform=function(Q,W,A,H,z,X){this.permute(X,Q,W,A,H,z);for(var K=1;K<z;K<<=1){var R=K<<1,v=Math.cos(2*Math.PI/R),j=Math.sin(2*Math.PI/R);for(var c=0;c<z;c+=R){var h=v,n=j;for(var D0=0;D0<K;D0++){var i=A[c+D0],l=H[c+D0],X0=A[c+D0+K],m=H[c+D0+K],s=h*X0-n*m;if(m=h*m+n*X0,X0=s,A[c+D0]=i+X0,H[c+D0]=l+m,A[c+D0+K]=i-X0,H[c+D0+K]=l-m,D0!==R)s=v*h-j*n,n=v*n+j*h,h=s}}}},o.prototype.guessLen13b=function(Q,W){var A=Math.max(W,Q)|1,H=A&1,z=0;for(A=A/2|0;A;A=A>>>1)z++;return 1<<z+1+H},o.prototype.conjugate=function(Q,W,A){if(A<=1)return;for(var H=0;H<A/2;H++){var z=Q[H];Q[H]=Q[A-H-1],Q[A-H-1]=z,z=W[H],W[H]=-W[A-H-1],W[A-H-1]=-z}},o.prototype.normalize13b=function(Q,W){var A=0;for(var H=0;H<W/2;H++){var z=Math.round(Q[2*H+1]/W)*8192+Math.round(Q[2*H]/W)+A;if(Q[H]=z&67108863,z<67108864)A=0;else A=z/67108864|0}return Q},o.prototype.convert13b=function(Q,W,A,H){var z=0;for(var X=0;X<W;X++)z=z+(Q[X]|0),A[2*X]=z&8191,z=z>>>13,A[2*X+1]=z&8191,z=z>>>13;for(X=2*W;X<H;++X)A[X]=0;I(z===0),I((z&-8192)===0)},o.prototype.stub=function(Q){var W=Array(Q);for(var A=0;A<Q;A++)W[A]=0;return W},o.prototype.mulp=function(Q,W,A){var H=2*this.guessLen13b(Q.length,W.length),z=this.makeRBT(H),X=this.stub(H),K=Array(H),R=Array(H),v=Array(H),j=Array(H),c=Array(H),h=Array(H),n=A.words;n.length=H,this.convert13b(Q.words,Q.length,K,H),this.convert13b(W.words,W.length,j,H),this.transform(K,X,R,v,H,z),this.transform(j,X,c,h,H,z);for(var D0=0;D0<H;D0++){var i=R[D0]*c[D0]-v[D0]*h[D0];v[D0]=R[D0]*h[D0]+v[D0]*c[D0],R[D0]=i}return this.conjugate(R,v,H),this.transform(R,v,n,X,H,z),this.conjugate(n,X,H),this.normalize13b(n,H),A.negative=Q.negative^W.negative,A.length=Q.length+W.length,A._strip()},Y.prototype.mul=function(Q){var W=new Y(null);return W.words=Array(this.length+Q.length),this.mulTo(Q,W)},Y.prototype.mulf=function(Q){var W=new Y(null);return W.words=Array(this.length+Q.length),w(this,Q,W)},Y.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},Y.prototype.imuln=function(Q){var W=Q<0;if(W)Q=-Q;I(typeof Q==="number"),I(Q<67108864);var A=0;for(var H=0;H<this.length;H++){var z=(this.words[H]|0)*Q,X=(z&67108863)+(A&67108863);A>>=26,A+=z/67108864|0,A+=X>>>26,this.words[H]=X&67108863}if(A!==0)this.words[H]=A,this.length++;return this.length=Q===0?1:this.length,W?this.ineg():this},Y.prototype.muln=function(Q){return this.clone().imuln(Q)},Y.prototype.sqr=function(){return this.mul(this)},Y.prototype.isqr=function(){return this.imul(this.clone())},Y.prototype.pow=function(Q){var W=_(Q);if(W.length===0)return new Y(1);var A=this;for(var H=0;H<W.length;H++,A=A.sqr())if(W[H]!==0)break;if(++H<W.length)for(var z=A.sqr();H<W.length;H++,z=z.sqr()){if(W[H]===0)continue;A=A.mul(z)}return A},Y.prototype.iushln=function(Q){I(typeof Q==="number"&&Q>=0);var W=Q%26,A=(Q-W)/26,H=67108863>>>26-W<<26-W,z;if(W!==0){var X=0;for(z=0;z<this.length;z++){var K=this.words[z]&H,R=(this.words[z]|0)-K<<W;this.words[z]=R|X,X=K>>>26-W}if(X)this.words[z]=X,this.length++}if(A!==0){for(z=this.length-1;z>=0;z--)this.words[z+A]=this.words[z];for(z=0;z<A;z++)this.words[z]=0;this.length+=A}return this._strip()},Y.prototype.ishln=function(Q){return I(this.negative===0),this.iushln(Q)},Y.prototype.iushrn=function(Q,W,A){I(typeof Q==="number"&&Q>=0);var H;if(W)H=(W-W%26)/26;else H=0;var z=Q%26,X=Math.min((Q-z)/26,this.length),K=67108863^67108863>>>z<<z,R=A;if(H-=X,H=Math.max(0,H),R){for(var v=0;v<X;v++)R.words[v]=this.words[v];R.length=X}if(X===0);else if(this.length>X){this.length-=X;for(v=0;v<this.length;v++)this.words[v]=this.words[v+X]}else this.words[0]=0,this.length=1;var j=0;for(v=this.length-1;v>=0&&(j!==0||v>=H);v--){var c=this.words[v]|0;this.words[v]=j<<26-z|c>>>z,j=c&K}if(R&&j!==0)R.words[R.length++]=j;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},Y.prototype.ishrn=function(Q,W,A){return I(this.negative===0),this.iushrn(Q,W,A)},Y.prototype.shln=function(Q){return this.clone().ishln(Q)},Y.prototype.ushln=function(Q){return this.clone().iushln(Q)},Y.prototype.shrn=function(Q){return this.clone().ishrn(Q)},Y.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},Y.prototype.testn=function(Q){I(typeof Q==="number"&&Q>=0);var W=Q%26,A=(Q-W)/26,H=1<<W;if(this.length<=A)return!1;var z=this.words[A];return!!(z&H)},Y.prototype.imaskn=function(Q){I(typeof Q==="number"&&Q>=0);var W=Q%26,A=(Q-W)/26;if(I(this.negative===0,"imaskn works only with positive numbers"),this.length<=A)return this;if(W!==0)A++;if(this.length=Math.min(A,this.length),W!==0){var H=67108863^67108863>>>W<<W;this.words[this.length-1]&=H}return this._strip()},Y.prototype.maskn=function(Q){return this.clone().imaskn(Q)},Y.prototype.iaddn=function(Q){if(I(typeof Q==="number"),I(Q<67108864),Q<0)return this.isubn(-Q);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=Q)return this.words[0]=Q-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Q),this.negative=1,this}return this._iaddn(Q)},Y.prototype._iaddn=function(Q){this.words[0]+=Q;for(var W=0;W<this.length&&this.words[W]>=67108864;W++)if(this.words[W]-=67108864,W===this.length-1)this.words[W+1]=1;else this.words[W+1]++;return this.length=Math.max(this.length,W+1),this},Y.prototype.isubn=function(Q){if(I(typeof Q==="number"),I(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var W=0;W<this.length&&this.words[W]<0;W++)this.words[W]+=67108864,this.words[W+1]-=1;return this._strip()},Y.prototype.addn=function(Q){return this.clone().iaddn(Q)},Y.prototype.subn=function(Q){return this.clone().isubn(Q)},Y.prototype.iabs=function(){return this.negative=0,this},Y.prototype.abs=function(){return this.clone().iabs()},Y.prototype._ishlnsubmul=function(Q,W,A){var H=Q.length+A,z;this._expand(H);var X,K=0;for(z=0;z<Q.length;z++){X=(this.words[z+A]|0)+K;var R=(Q.words[z]|0)*W;X-=R&67108863,K=(X>>26)-(R/67108864|0),this.words[z+A]=X&67108863}for(;z<this.length-A;z++)X=(this.words[z+A]|0)+K,K=X>>26,this.words[z+A]=X&67108863;if(K===0)return this._strip();I(K===-1),K=0;for(z=0;z<this.length;z++)X=-(this.words[z]|0)+K,K=X>>26,this.words[z]=X&67108863;return this.negative=1,this._strip()},Y.prototype._wordDiv=function(Q,W){var A=this.length-Q.length,H=this.clone(),z=Q,X=z.words[z.length-1]|0,K=this._countBits(X);if(A=26-K,A!==0)z=z.ushln(A),H.iushln(A),X=z.words[z.length-1]|0;var R=H.length-z.length,v;if(W!=="mod"){v=new Y(null),v.length=R+1,v.words=Array(v.length);for(var j=0;j<v.length;j++)v.words[j]=0}var c=H.clone()._ishlnsubmul(z,1,R);if(c.negative===0){if(H=c,v)v.words[R]=1}for(var h=R-1;h>=0;h--){var n=(H.words[z.length+h]|0)*67108864+(H.words[z.length+h-1]|0);n=Math.min(n/X|0,67108863),H._ishlnsubmul(z,n,h);while(H.negative!==0)if(n--,H.negative=0,H._ishlnsubmul(z,1,h),!H.isZero())H.negative^=1;if(v)v.words[h]=n}if(v)v._strip();if(H._strip(),W!=="div"&&A!==0)H.iushrn(A);return{div:v||null,mod:H}},Y.prototype.divmod=function(Q,W,A){if(I(!Q.isZero()),this.isZero())return{div:new Y(0),mod:new Y(0)};var H,z,X;if(this.negative!==0&&Q.negative===0){if(X=this.neg().divmod(Q,W),W!=="mod")H=X.div.neg();if(W!=="div"){if(z=X.mod.neg(),A&&z.negative!==0)z.iadd(Q)}return{div:H,mod:z}}if(this.negative===0&&Q.negative!==0){if(X=this.divmod(Q.neg(),W),W!=="mod")H=X.div.neg();return{div:H,mod:X.mod}}if((this.negative&Q.negative)!==0){if(X=this.neg().divmod(Q.neg(),W),W!=="div"){if(z=X.mod.neg(),A&&z.negative!==0)z.isub(Q)}return{div:X.div,mod:z}}if(Q.length>this.length||this.cmp(Q)<0)return{div:new Y(0),mod:this};if(Q.length===1){if(W==="div")return{div:this.divn(Q.words[0]),mod:null};if(W==="mod")return{div:null,mod:new Y(this.modrn(Q.words[0]))};return{div:this.divn(Q.words[0]),mod:new Y(this.modrn(Q.words[0]))}}return this._wordDiv(Q,W)},Y.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},Y.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},Y.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},Y.prototype.divRound=function(Q){var W=this.divmod(Q);if(W.mod.isZero())return W.div;var A=W.div.negative!==0?W.mod.isub(Q):W.mod,H=Q.ushrn(1),z=Q.andln(1),X=A.cmp(H);if(X<0||z===1&&X===0)return W.div;return W.div.negative!==0?W.div.isubn(1):W.div.iaddn(1)},Y.prototype.modrn=function(Q){var W=Q<0;if(W)Q=-Q;I(Q<=67108863);var A=67108864%Q,H=0;for(var z=this.length-1;z>=0;z--)H=(A*H+(this.words[z]|0))%Q;return W?-H:H},Y.prototype.modn=function(Q){return this.modrn(Q)},Y.prototype.idivn=function(Q){var W=Q<0;if(W)Q=-Q;I(Q<=67108863);var A=0;for(var H=this.length-1;H>=0;H--){var z=(this.words[H]|0)+A*67108864;this.words[H]=z/Q|0,A=z%Q}return this._strip(),W?this.ineg():this},Y.prototype.divn=function(Q){return this.clone().idivn(Q)},Y.prototype.egcd=function(Q){I(Q.negative===0),I(!Q.isZero());var W=this,A=Q.clone();if(W.negative!==0)W=W.umod(Q);else W=W.clone();var H=new Y(1),z=new Y(0),X=new Y(0),K=new Y(1),R=0;while(W.isEven()&&A.isEven())W.iushrn(1),A.iushrn(1),++R;var v=A.clone(),j=W.clone();while(!W.isZero()){for(var c=0,h=1;(W.words[0]&h)===0&&c<26;++c,h<<=1);if(c>0){W.iushrn(c);while(c-- >0){if(H.isOdd()||z.isOdd())H.iadd(v),z.isub(j);H.iushrn(1),z.iushrn(1)}}for(var n=0,D0=1;(A.words[0]&D0)===0&&n<26;++n,D0<<=1);if(n>0){A.iushrn(n);while(n-- >0){if(X.isOdd()||K.isOdd())X.iadd(v),K.isub(j);X.iushrn(1),K.iushrn(1)}}if(W.cmp(A)>=0)W.isub(A),H.isub(X),z.isub(K);else A.isub(W),X.isub(H),K.isub(z)}return{a:X,b:K,gcd:A.iushln(R)}},Y.prototype._invmp=function(Q){I(Q.negative===0),I(!Q.isZero());var W=this,A=Q.clone();if(W.negative!==0)W=W.umod(Q);else W=W.clone();var H=new Y(1),z=new Y(0),X=A.clone();while(W.cmpn(1)>0&&A.cmpn(1)>0){for(var K=0,R=1;(W.words[0]&R)===0&&K<26;++K,R<<=1);if(K>0){W.iushrn(K);while(K-- >0){if(H.isOdd())H.iadd(X);H.iushrn(1)}}for(var v=0,j=1;(A.words[0]&j)===0&&v<26;++v,j<<=1);if(v>0){A.iushrn(v);while(v-- >0){if(z.isOdd())z.iadd(X);z.iushrn(1)}}if(W.cmp(A)>=0)W.isub(A),H.isub(z);else A.isub(W),z.isub(H)}var c;if(W.cmpn(1)===0)c=H;else c=z;if(c.cmpn(0)<0)c.iadd(Q);return c},Y.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var W=this.clone(),A=Q.clone();W.negative=0,A.negative=0;for(var H=0;W.isEven()&&A.isEven();H++)W.iushrn(1),A.iushrn(1);do{while(W.isEven())W.iushrn(1);while(A.isEven())A.iushrn(1);var z=W.cmp(A);if(z<0){var X=W;W=A,A=X}else if(z===0||A.cmpn(1)===0)break;W.isub(A)}while(!0);return A.iushln(H)},Y.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},Y.prototype.isEven=function(){return(this.words[0]&1)===0},Y.prototype.isOdd=function(){return(this.words[0]&1)===1},Y.prototype.andln=function(Q){return this.words[0]&Q},Y.prototype.bincn=function(Q){I(typeof Q==="number");var W=Q%26,A=(Q-W)/26,H=1<<W;if(this.length<=A)return this._expand(A+1),this.words[A]|=H,this;var z=H;for(var X=A;z!==0&&X<this.length;X++){var K=this.words[X]|0;K+=z,z=K>>>26,K&=67108863,this.words[X]=K}if(z!==0)this.words[X]=z,this.length++;return this},Y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},Y.prototype.cmpn=function(Q){var W=Q<0;if(this.negative!==0&&!W)return-1;if(this.negative===0&&W)return 1;this._strip();var A;if(this.length>1)A=1;else{if(W)Q=-Q;I(Q<=67108863,"Number is too big");var H=this.words[0]|0;A=H===Q?0:H<Q?-1:1}if(this.negative!==0)return-A|0;return A},Y.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var W=this.ucmp(Q);if(this.negative!==0)return-W|0;return W},Y.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;var W=0;for(var A=this.length-1;A>=0;A--){var H=this.words[A]|0,z=Q.words[A]|0;if(H===z)continue;if(H<z)W=-1;else if(H>z)W=1;break}return W},Y.prototype.gtn=function(Q){return this.cmpn(Q)===1},Y.prototype.gt=function(Q){return this.cmp(Q)===1},Y.prototype.gten=function(Q){return this.cmpn(Q)>=0},Y.prototype.gte=function(Q){return this.cmp(Q)>=0},Y.prototype.ltn=function(Q){return this.cmpn(Q)===-1},Y.prototype.lt=function(Q){return this.cmp(Q)===-1},Y.prototype.lten=function(Q){return this.cmpn(Q)<=0},Y.prototype.lte=function(Q){return this.cmp(Q)<=0},Y.prototype.eqn=function(Q){return this.cmpn(Q)===0},Y.prototype.eq=function(Q){return this.cmp(Q)===0},Y.red=function(Q){return new G(Q)},Y.prototype.toRed=function(Q){return I(!this.red,"Already a number in reduction context"),I(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},Y.prototype.fromRed=function(){return I(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},Y.prototype._forceRed=function(Q){return this.red=Q,this},Y.prototype.forceRed=function(Q){return I(!this.red,"Already a number in reduction context"),this._forceRed(Q)},Y.prototype.redAdd=function(Q){return I(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},Y.prototype.redIAdd=function(Q){return I(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},Y.prototype.redSub=function(Q){return I(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},Y.prototype.redISub=function(Q){return I(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},Y.prototype.redShl=function(Q){return I(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},Y.prototype.redMul=function(Q){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},Y.prototype.redIMul=function(Q){return I(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},Y.prototype.redSqr=function(){return I(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},Y.prototype.redISqr=function(){return I(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},Y.prototype.redSqrt=function(){return I(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},Y.prototype.redInvm=function(){return I(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},Y.prototype.redNeg=function(){return I(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},Y.prototype.redPow=function(Q){return I(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var Q0={k256:null,p224:null,p192:null,p25519:null};function V0(Q,W){this.name=Q,this.p=new Y(W,16),this.n=this.p.bitLength(),this.k=new Y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V0.prototype._tmp=function(){var Q=new Y(null);return Q.words=Array(Math.ceil(this.n/13)),Q},V0.prototype.ireduce=function(Q){var W=Q,A;do this.split(W,this.tmp),W=this.imulK(W),W=W.iadd(this.tmp),A=W.bitLength();while(A>this.n);var H=A<this.n?-1:W.ucmp(this.p);if(H===0)W.words[0]=0,W.length=1;else if(H>0)W.isub(this.p);else if(W.strip!==void 0)W.strip();else W._strip();return W},V0.prototype.split=function(Q,W){Q.iushrn(this.n,0,W)},V0.prototype.imulK=function(Q){return Q.imul(this.k)};function Y0(){V0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}S(Y0,V0),Y0.prototype.split=function(Q,W){var A=4194303,H=Math.min(Q.length,9);for(var z=0;z<H;z++)W.words[z]=Q.words[z];if(W.length=H,Q.length<=9){Q.words[0]=0,Q.length=1;return}var X=Q.words[9];W.words[W.length++]=X&A;for(z=10;z<Q.length;z++){var K=Q.words[z]|0;Q.words[z-10]=(K&A)<<4|X>>>22,X=K}if(X>>>=22,Q.words[z-10]=X,X===0&&Q.length>10)Q.length-=10;else Q.length-=9},Y0.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;var W=0;for(var A=0;A<Q.length;A++){var H=Q.words[A]|0;W+=H*977,Q.words[A]=W&67108863,W=H*64+(W/67108864|0)}if(Q.words[Q.length-1]===0){if(Q.length--,Q.words[Q.length-1]===0)Q.length--}return Q};function p(){V0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}S(p,V0);function U0(){V0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}S(U0,V0);function O(){V0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}S(O,V0),O.prototype.imulK=function(Q){var W=0;for(var A=0;A<Q.length;A++){var H=(Q.words[A]|0)*19+W,z=H&67108863;H>>>=26,Q.words[A]=z,W=H}if(W!==0)Q.words[Q.length++]=W;return Q},Y._prime=function(Q){if(Q0[Q])return Q0[Q];var W;if(Q==="k256")W=new Y0;else if(Q==="p224")W=new p;else if(Q==="p192")W=new U0;else if(Q==="p25519")W=new O;else throw Error("Unknown prime "+Q);return Q0[Q]=W,W};function G(Q){if(typeof Q==="string"){var W=Y._prime(Q);this.m=W.p,this.prime=W}else I(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}G.prototype._verify1=function(Q){I(Q.negative===0,"red works only with positives"),I(Q.red,"red works only with red numbers")},G.prototype._verify2=function(Q,W){I((Q.negative|W.negative)===0,"red works only with positives"),I(Q.red&&Q.red===W.red,"red works only with red numbers")},G.prototype.imod=function(Q){if(this.prime)return this.prime.ireduce(Q)._forceRed(this);return F(Q,Q.umod(this.m)._forceRed(this)),Q},G.prototype.neg=function(Q){if(Q.isZero())return Q.clone();return this.m.sub(Q)._forceRed(this)},G.prototype.add=function(Q,W){this._verify2(Q,W);var A=Q.add(W);if(A.cmp(this.m)>=0)A.isub(this.m);return A._forceRed(this)},G.prototype.iadd=function(Q,W){this._verify2(Q,W);var A=Q.iadd(W);if(A.cmp(this.m)>=0)A.isub(this.m);return A},G.prototype.sub=function(Q,W){this._verify2(Q,W);var A=Q.sub(W);if(A.cmpn(0)<0)A.iadd(this.m);return A._forceRed(this)},G.prototype.isub=function(Q,W){this._verify2(Q,W);var A=Q.isub(W);if(A.cmpn(0)<0)A.iadd(this.m);return A},G.prototype.shl=function(Q,W){return this._verify1(Q),this.imod(Q.ushln(W))},G.prototype.imul=function(Q,W){return this._verify2(Q,W),this.imod(Q.imul(W))},G.prototype.mul=function(Q,W){return this._verify2(Q,W),this.imod(Q.mul(W))},G.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},G.prototype.sqr=function(Q){return this.mul(Q,Q)},G.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var W=this.m.andln(3);if(I(W%2===1),W===3){var A=this.m.add(new Y(1)).iushrn(2);return this.pow(Q,A)}var H=this.m.subn(1),z=0;while(!H.isZero()&&H.andln(1)===0)z++,H.iushrn(1);I(!H.isZero());var X=new Y(1).toRed(this),K=X.redNeg(),R=this.m.subn(1).iushrn(1),v=this.m.bitLength();v=new Y(2*v*v).toRed(this);while(this.pow(v,R).cmp(K)!==0)v.redIAdd(K);var j=this.pow(v,H),c=this.pow(Q,H.addn(1).iushrn(1)),h=this.pow(Q,H),n=z;while(h.cmp(X)!==0){var D0=h;for(var i=0;D0.cmp(X)!==0;i++)D0=D0.redSqr();I(i<n);var l=this.pow(j,new Y(1).iushln(n-i-1));c=c.redMul(l),j=l.redSqr(),h=h.redMul(j),n=i}return c},G.prototype.invm=function(Q){var W=Q._invmp(this.m);if(W.negative!==0)return W.negative=0,this.imod(W).redNeg();else return this.imod(W)},G.prototype.pow=function(Q,W){if(W.isZero())return new Y(1).toRed(this);if(W.cmpn(1)===0)return Q.clone();var A=4,H=Array(1<<A);H[0]=new Y(1).toRed(this),H[1]=Q;for(var z=2;z<H.length;z++)H[z]=this.mul(H[z-1],Q);var X=H[0],K=0,R=0,v=W.bitLength()%26;if(v===0)v=26;for(z=W.length-1;z>=0;z--){var j=W.words[z];for(var c=v-1;c>=0;c--){var h=j>>c&1;if(X!==H[0])X=this.sqr(X);if(h===0&&K===0){R=0;continue}if(K<<=1,K|=h,R++,R!==A&&(z!==0||c!==0))continue;X=this.mul(X,H[K]),R=0,K=0}v=26}return X},G.prototype.convertTo=function(Q){var W=Q.umod(this.m);return W===Q?W.clone():W},G.prototype.convertFrom=function(Q){var W=Q.clone();return W.red=null,W},Y.mont=function(Q){return new D(Q)};function D(Q){if(G.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new Y(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}S(D,G),D.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},D.prototype.convertFrom=function(Q){var W=this.imod(Q.mul(this.rinv));return W.red=null,W},D.prototype.imul=function(Q,W){if(Q.isZero()||W.isZero())return Q.words[0]=0,Q.length=1,Q;var A=Q.imul(W),H=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=A.isub(H).iushrn(this.shift),X=z;if(z.cmp(this.m)>=0)X=z.isub(this.m);else if(z.cmpn(0)<0)X=z.iadd(this.m);return X._forceRed(this)},D.prototype.mul=function(Q,W){if(Q.isZero()||W.isZero())return new Y(0)._forceRed(this);var A=Q.mul(W),H=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),z=A.isub(H).iushrn(this.shift),X=z;if(z.cmp(this.m)>=0)X=z.isub(this.m);else if(z.cmpn(0)<0)X=z.iadd(this.m);return X._forceRed(this)},D.prototype.invm=function(Q){var W=this.imod(Q._invmp(this.m).mul(this.r2));return W._forceRed(this)}})(typeof U>"u"||U,$)}),yV=G0(($,U)=>{var J=UH(),V=z6(),I=c$().Buffer;function S(T){var L=T.modulus.byteLength(),E;do E=new J(V(L));while(E.cmp(T.modulus)>=0||!E.umod(T.prime1)||!E.umod(T.prime2));return E}function Y(T){var L=S(T),E=L.toRed(J.mont(T.modulus)).redPow(new J(T.publicExponent)).fromRed();return{blinder:E,unblinder:L.invm(T.modulus)}}function M(T,L){var E=Y(L),F=L.modulus.byteLength(),Z=new J(T).mul(E.blinder).umod(L.modulus),P=Z.toRed(J.mont(L.prime1)),q=Z.toRed(J.mont(L.prime2)),k=L.coefficient,C=L.prime1,_=L.prime2,g=P.redPow(L.exponent1).fromRed(),N=q.redPow(L.exponent2).fromRed(),x=g.isub(N).imul(k).umod(C).imul(_);return N.iadd(x).imul(E.unblinder).umod(L.modulus).toArrayLike(I,"be",F)}M.getr=S,U.exports=M}),IH=G0(($,U)=>{var J=BV(),V=z6(),I=K6(),S=cV(),Y=wV(),M=cQ(),T=fV(),L=yV(),E=c$().Buffer;U.exports=function(q,k,C){var _;if(q.padding)_=q.padding;else if(C)_=1;else _=4;var g=J(q),N;if(_===4)N=F(g,k);else if(_===1)N=Z(g,k,C);else if(_===3){if(N=new M(k),N.cmp(g.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(C)return L(N,g);else return T(N,g)};function F(q,k){var C=q.modulus.byteLength(),_=k.length,g=I("sha1").update(E.alloc(0)).digest(),N=g.length,x=2*N;if(_>C-x-2)throw Error("message too long");var w=E.alloc(C-_-x-2),o=C-N-1,Q0=V(N),V0=Y(E.concat([g,w,E.alloc(1,1),k],o),S(Q0,o)),Y0=Y(Q0,S(V0,N));return new M(E.concat([E.alloc(1),Y0,V0],C))}function Z(q,k,C){var _=k.length,g=q.modulus.byteLength();if(_>g-11)throw Error("message too long");var N;if(C)N=E.alloc(g-_-3,255);else N=P(g-_-3);return new M(E.concat([E.from([0,C?1:2]),N,E.alloc(1),k],g))}function P(q){var k=E.allocUnsafe(q),C=0,_=V(q*2),g=0,N;while(C<q){if(g===_.length)_=V(q*2),g=0;if(N=_[g++],N)k[C++]=N}return k}}),OH=G0(($,U)=>{var J=BV(),V=cV(),I=wV(),S=cQ(),Y=yV(),M=K6(),T=fV(),L=c$().Buffer;U.exports=function(P,q,k){var C;if(P.padding)C=P.padding;else if(k)C=1;else C=4;var _=J(P),g=_.modulus.byteLength();if(q.length>g||new S(q).cmp(_.modulus)>=0)throw Error("decryption error");var N;if(k)N=T(new S(q),_);else N=Y(q,_);var x=L.alloc(g-N.length);if(N=L.concat([x,N],g),C===4)return E(_,N);else if(C===1)return F(_,N,k);else if(C===3)return N;else throw Error("unknown padding")};function E(P,q){var k=P.modulus.byteLength(),C=M("sha1").update(L.alloc(0)).digest(),_=C.length;if(q[0]!==0)throw Error("decryption error");var g=q.slice(1,_+1),N=q.slice(_+1),x=I(g,V(N,_)),w=I(N,V(x,k-_-1));if(Z(C,w.slice(0,_)))throw Error("decryption error");var o=_;while(w[o]===0)o++;if(w[o++]!==1)throw Error("decryption error");return w.slice(o)}function F(P,q,k){var C=q.slice(0,2),_=2,g=0;while(q[_++]!==0)if(_>=q.length){g++;break}var N=q.slice(2,_-1);if(C.toString("hex")!=="0002"&&!k||C.toString("hex")!=="0001"&&k)g++;if(N.length<8)g++;if(g)throw Error("decryption error");return q.slice(_)}function Z(P,q){P=L.from(P),q=L.from(q);var k=0,C=P.length;if(P.length!==q.length)k++,C=Math.min(P.length,q.length);var _=-1;while(++_<C)k+=P[_]^q[_];return k}}),RQ=G0(($)=>{$.publicEncrypt=IH(),$.privateDecrypt=OH(),$.privateEncrypt=function(U,J){return $.publicEncrypt(U,J,!0)},$.publicDecrypt=function(U,J){return $.privateDecrypt(U,J,!0)}}),XH=G0(($)=>{var U=(p$(),d0(u$));if(typeof U.publicEncrypt!=="function")U=RQ();if($.publicEncrypt=U.publicEncrypt,$.privateDecrypt=U.privateDecrypt,typeof U.privateEncrypt!=="function")$.privateEncrypt=RQ().privateEncrypt;else $.privateEncrypt=U.privateEncrypt;if(typeof U.publicDecrypt!=="function")$.publicDecrypt=RQ().publicDecrypt;else $.publicDecrypt=U.publicDecrypt}),JH=G0(($)=>{var U=c$(),J=z6(),V=U.Buffer,I=U.kMaxLength,S=globalThis.crypto||globalThis.msCrypto,Y=Math.pow(2,32)-1;function M(Z,P){if(typeof Z!=="number"||Z!==Z)throw TypeError("offset must be a number");if(Z>Y||Z<0)throw TypeError("offset must be a uint32");if(Z>I||Z>P)throw RangeError("offset out of range")}function T(Z,P,q){if(typeof Z!=="number"||Z!==Z)throw TypeError("size must be a number");if(Z>Y||Z<0)throw TypeError("size must be a uint32");if(Z+P>q||Z>I)throw RangeError("buffer too small")}S&&S.getRandomValues,$.randomFill=L,$.randomFillSync=F;function L(Z,P,q,k){if(!V.isBuffer(Z)&&!(Z instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof P==="function")k=P,P=0,q=Z.length;else if(typeof q==="function")k=q,q=Z.length-P;else if(typeof k!=="function")throw TypeError('"cb" argument must be a function');return M(P,Z.length),T(q,P,Z.length),E(Z,P,q,k)}function E(Z,P,q,k){if(!1)var C,_;if(k){J(q,function(N,x){if(N)return k(N);x.copy(Z,P),k(null,Z)});return}var g=J(q);return g.copy(Z,P),Z}function F(Z,P,q){if(typeof P>"u")P=0;if(!V.isBuffer(Z)&&!(Z instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(M(P,Z.length),q===void 0)q=Z.length-P;return T(q,P,Z.length),E(Z,P,q)}}),QH=G0(($,U)=>{var J=(p$(),d0(u$));if(typeof J.randomFill==="function"&&typeof J.randomFillSync==="function")$.randomFill=J.randomFill,$.randomFillSync=J.randomFillSync;else U.exports=JH()}),YH=G0(($)=>{$.randomBytes=$.rng=$.pseudoRandomBytes=$.prng=z6(),$.createHash=$.Hash=K6(),$.createHmac=$.Hmac=DV();var U=_K(),J=Object.keys(U),V=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(J);$.getHashes=function(){return V};var I=PV();$.pbkdf2=I.pbkdf2,$.pbkdf2Sync=I.pbkdf2Sync;var S=zA();$.Cipher=S.Cipher,$.createCipher=S.createCipher,$.Cipheriv=S.Cipheriv,$.createCipheriv=S.createCipheriv,$.Decipher=S.Decipher,$.createDecipher=S.createDecipher,$.Decipheriv=S.Decipheriv,$.createDecipheriv=S.createDecipheriv,$.getCiphers=S.getCiphers,$.listCiphers=S.listCiphers;var Y=KA();$.DiffieHellmanGroup=Y.DiffieHellmanGroup,$.createDiffieHellmanGroup=Y.createDiffieHellmanGroup,$.getDiffieHellman=Y.getDiffieHellman,$.createDiffieHellman=Y.createDiffieHellman,$.DiffieHellman=Y.DiffieHellman;var M=AA();$.createSign=M.createSign,$.Sign=M.Sign,$.createVerify=M.createVerify,$.Verify=M.Verify,$.createECDH=yA();var T=XH();$.publicEncrypt=T.publicEncrypt,$.privateEncrypt=T.privateEncrypt,$.publicDecrypt=T.publicDecrypt,$.privateDecrypt=T.privateDecrypt;var L=QH();$.randomFill=L.randomFill,$.randomFillSync=L.randomFillSync,$.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
13
+ })`)}catch(A){J=function(T){this._initNamed(T)}}return D(J,Q),J.prototype._initNamed=function(A){Q.call(this,A)},new J(this)},U.prototype._getDecoder=function(Q){if(Q=Q||"der",!this.decoders.hasOwnProperty(Q))this.decoders[Q]=this._createNamed(I.decoders[Q]);return this.decoders[Q]},U.prototype.decode=function(Q,J,A){return this._getDecoder(J).decode(Q,A)},U.prototype._getEncoder=function(Q){if(Q=Q||"der",!this.encoders.hasOwnProperty(Q))this.encoders[Q]=this._createNamed(I.encoders[Q]);return this.encoders[Q]},U.prototype.encode=function(Q,J,A){return this._getEncoder(J).encode(Q,A)}}),BF=Y$(($)=>{var I=s0();function D(U){this._reporterState={obj:null,path:[],options:U||{},errors:[]}}$.Reporter=D,D.prototype.isError=function(U){return U instanceof X},D.prototype.save=function(){var U=this._reporterState;return{obj:U.obj,pathLen:U.path.length}},D.prototype.restore=function(U){var Q=this._reporterState;Q.obj=U.obj,Q.path=Q.path.slice(0,U.pathLen)},D.prototype.enterKey=function(U){return this._reporterState.path.push(U)},D.prototype.exitKey=function(U){var Q=this._reporterState;Q.path=Q.path.slice(0,U-1)},D.prototype.leaveKey=function(U,Q,J){var A=this._reporterState;if(this.exitKey(U),A.obj!==null)A.obj[Q]=J},D.prototype.path=function(){return this._reporterState.path.join("/")},D.prototype.enterObject=function(){var U=this._reporterState,Q=U.obj;return U.obj={},Q},D.prototype.leaveObject=function(U){var Q=this._reporterState,J=Q.obj;return Q.obj=U,J},D.prototype.error=function(U){var Q,J=this._reporterState,A=U instanceof X;if(A)Q=U;else Q=new X(J.path.map(function(T){return"["+JSON.stringify(T)+"]"}).join(""),U.message||U,U.stack);if(!J.options.partial)throw Q;if(!A)J.errors.push(Q);return Q},D.prototype.wrapResult=function(U){var Q=this._reporterState;if(!Q.options.partial)return U;return{result:this.isError(U)?null:U,errors:Q.errors}};function X(U,Q){this.path=U,this.rethrow(Q)}I(X,Error),X.prototype.rethrow=function(U){if(this.message=U+" at: "+(this.path||"(shallow)"),Error.captureStackTrace)Error.captureStackTrace(this,X);if(!this.stack)try{throw Error(this.message)}catch(Q){this.stack=Q.stack}return this}}),TW=Y$(($)=>{var I=s0(),D=M6().Reporter,X=(j0(),e$(_0)).Buffer;function U(J,A){if(D.call(this,A),!X.isBuffer(J)){this.error("Input not Buffer");return}this.base=J,this.offset=0,this.length=J.length}I(U,D),$.DecoderBuffer=U,U.prototype.save=function(){return{offset:this.offset,reporter:D.prototype.save.call(this)}},U.prototype.restore=function(J){var A=new U(this.base);return A.offset=J.offset,A.length=this.offset,this.offset=J.offset,D.prototype.restore.call(this,J.reporter),A},U.prototype.isEmpty=function(){return this.offset===this.length},U.prototype.readUInt8=function(J){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,!0);else return this.error(J||"DecoderBuffer overrun")},U.prototype.skip=function(J,A){if(!(this.offset+J<=this.length))return this.error(A||"DecoderBuffer overrun");var T=new U(this.base);return T._reporterState=this._reporterState,T.offset=this.offset,T.length=this.offset+J,this.offset+=J,T},U.prototype.raw=function(J){return this.base.slice(J?J.offset:this.offset,this.length)};function Q(J,A){if(Array.isArray(J))this.length=0,this.value=J.map(function(T){if(!(T instanceof Q))T=new Q(T,A);return this.length+=T.length,T},this);else if(typeof J==="number"){if(!(0<=J&&J<=255))return A.error("non-byte EncoderBuffer value");this.value=J,this.length=1}else if(typeof J==="string")this.value=J,this.length=X.byteLength(J);else if(X.isBuffer(J))this.value=J,this.length=J.length;else return A.error("Unsupported type: "+typeof J)}$.EncoderBuffer=Q,Q.prototype.join=function(J,A){if(!J)J=new X(this.length);if(!A)A=0;if(this.length===0)return J;if(Array.isArray(this.value))this.value.forEach(function(T){T.join(J,A),A+=T.length});else{if(typeof this.value==="number")J[A]=this.value;else if(typeof this.value==="string")J.write(this.value,A);else if(X.isBuffer(this.value))this.value.copy(J,A);A+=this.length}return J}}),xF=Y$(($,I)=>{var D=M6().Reporter,X=M6().EncoderBuffer,U=M6().DecoderBuffer,Q=fU(),J=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],A=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(J),T=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function Z(F,E){var P={};if(this._baseState=P,P.enc=F,P.parent=E||null,P.children=null,P.tag=null,P.args=null,P.reverseArgs=null,P.choice=null,P.optional=!1,P.any=!1,P.obj=!1,P.use=null,P.useDecoder=null,P.key=null,P.default=null,P.explicit=null,P.implicit=null,P.contains=null,!P.parent)P.children=[],this._wrap()}I.exports=Z;var L=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Z.prototype.clone=function(){var F=this._baseState,E={};L.forEach(function(R){E[R]=F[R]});var P=new this.constructor(E.parent);return P._baseState=E,P},Z.prototype._wrap=function(){var F=this._baseState;A.forEach(function(E){this[E]=function(){var P=new this.constructor(this);return F.children.push(P),P[E].apply(P,arguments)}},this)},Z.prototype._init=function(F){var E=this._baseState;Q(E.parent===null),F.call(this),E.children=E.children.filter(function(P){return P._baseState.parent===this},this),Q.equal(E.children.length,1,"Root node can have only one child")},Z.prototype._useArgs=function(F){var E=this._baseState,P=F.filter(function(R){return R instanceof this.constructor},this);if(F=F.filter(function(R){return!(R instanceof this.constructor)},this),P.length!==0)Q(E.children===null),E.children=P,P.forEach(function(R){R._baseState.parent=this},this);if(F.length!==0)Q(E.args===null),E.args=F,E.reverseArgs=F.map(function(R){if(typeof R!=="object"||R.constructor!==Object)return R;var k={};return Object.keys(R).forEach(function(g){if(g==(g|0))g|=0;var j=R[g];k[j]=g}),k})},T.forEach(function(F){Z.prototype[F]=function(){var E=this._baseState;throw Error(F+" not implemented for encoding: "+E.enc)}}),J.forEach(function(F){Z.prototype[F]=function(){var E=this._baseState,P=Array.prototype.slice.call(arguments);return Q(E.tag===null),E.tag=F,this._useArgs(P),this}}),Z.prototype.use=function(F){Q(F);var E=this._baseState;return Q(E.use===null),E.use=F,this},Z.prototype.optional=function(){var F=this._baseState;return F.optional=!0,this},Z.prototype.def=function(F){var E=this._baseState;return Q(E.default===null),E.default=F,E.optional=!0,this},Z.prototype.explicit=function(F){var E=this._baseState;return Q(E.explicit===null&&E.implicit===null),E.explicit=F,this},Z.prototype.implicit=function(F){var E=this._baseState;return Q(E.explicit===null&&E.implicit===null),E.implicit=F,this},Z.prototype.obj=function(){var F=this._baseState,E=Array.prototype.slice.call(arguments);if(F.obj=!0,E.length!==0)this._useArgs(E);return this},Z.prototype.key=function(F){var E=this._baseState;return Q(E.key===null),E.key=F,this},Z.prototype.any=function(){var F=this._baseState;return F.any=!0,this},Z.prototype.choice=function(F){var E=this._baseState;return Q(E.choice===null),E.choice=F,this._useArgs(Object.keys(F).map(function(P){return F[P]})),this},Z.prototype.contains=function(F){var E=this._baseState;return Q(E.use===null),E.contains=F,this},Z.prototype._decode=function(F,E){var P=this._baseState;if(P.parent===null)return F.wrapResult(P.children[0]._decode(F,E));var R=P.default,k=!0,g=null;if(P.key!==null)g=F.enterKey(P.key);if(P.optional){var j=null;if(P.explicit!==null)j=P.explicit;else if(P.implicit!==null)j=P.implicit;else if(P.tag!==null)j=P.tag;if(j===null&&!P.any){var _=F.save();try{if(P.choice===null)this._decodeGeneric(P.tag,F,E);else this._decodeChoice(F,E);k=!0}catch(G$){k=!1}F.restore(_)}else if(k=this._peekTag(F,j,P.any),F.isError(k))return k}var N;if(P.obj&&k)N=F.enterObject();if(k){if(P.explicit!==null){var B=this._decodeTag(F,P.explicit);if(F.isError(B))return B;F=B}var c=F.offset;if(P.use===null&&P.choice===null){if(P.any)var _=F.save();var r=this._decodeTag(F,P.implicit!==null?P.implicit:P.tag,P.any);if(F.isError(r))return r;if(P.any)R=F.raw(_);else F=r}if(E&&E.track&&P.tag!==null)E.track(F.path(),c,F.length,"tagged");if(E&&E.track&&P.tag!==null)E.track(F.path(),F.offset,F.length,"content");if(P.any)R=R;else if(P.choice===null)R=this._decodeGeneric(P.tag,F,E);else R=this._decodeChoice(F,E);if(F.isError(R))return R;if(!P.any&&P.choice===null&&P.children!==null)P.children.forEach(function(G$){G$._decode(F,E)});if(P.contains&&(P.tag==="octstr"||P.tag==="bitstr")){var J$=new U(R);R=this._getUse(P.contains,F._reporterState.obj)._decode(J$,E)}}if(P.obj&&k)R=F.leaveObject(N);if(P.key!==null&&(R!==null||k===!0))F.leaveKey(g,P.key,R);else if(g!==null)F.exitKey(g);return R},Z.prototype._decodeGeneric=function(F,E,P){var R=this._baseState;if(F==="seq"||F==="set")return null;if(F==="seqof"||F==="setof")return this._decodeList(E,F,R.args[0],P);else if(/str$/.test(F))return this._decodeStr(E,F,P);else if(F==="objid"&&R.args)return this._decodeObjid(E,R.args[0],R.args[1],P);else if(F==="objid")return this._decodeObjid(E,null,null,P);else if(F==="gentime"||F==="utctime")return this._decodeTime(E,F,P);else if(F==="null_")return this._decodeNull(E,P);else if(F==="bool")return this._decodeBool(E,P);else if(F==="objDesc")return this._decodeStr(E,F,P);else if(F==="int"||F==="enum")return this._decodeInt(E,R.args&&R.args[0],P);if(R.use!==null)return this._getUse(R.use,E._reporterState.obj)._decode(E,P);else return E.error("unknown tag: "+F)},Z.prototype._getUse=function(F,E){var P=this._baseState;if(P.useDecoder=this._use(F,E),Q(P.useDecoder._baseState.parent===null),P.useDecoder=P.useDecoder._baseState.children[0],P.implicit!==P.useDecoder._baseState.implicit)P.useDecoder=P.useDecoder.clone(),P.useDecoder._baseState.implicit=P.implicit;return P.useDecoder},Z.prototype._decodeChoice=function(F,E){var P=this._baseState,R=null,k=!1;if(Object.keys(P.choice).some(function(g){var j=F.save(),_=P.choice[g];try{var N=_._decode(F,E);if(F.isError(N))return!1;R={type:g,value:N},k=!0}catch(B){return F.restore(j),!1}return!0},this),!k)return F.error("Choice not matched");return R},Z.prototype._createEncoderBuffer=function(F){return new X(F,this.reporter)},Z.prototype._encode=function(F,E,P){var R=this._baseState;if(R.default!==null&&R.default===F)return;var k=this._encodeValue(F,E,P);if(k===void 0)return;if(this._skipDefault(k,E,P))return;return k},Z.prototype._encodeValue=function(F,E,P){var R=this._baseState;if(R.parent===null)return R.children[0]._encode(F,E||new D);var _=null;if(this.reporter=E,R.optional&&F===void 0)if(R.default!==null)F=R.default;else return;var k=null,g=!1;if(R.any)_=this._createEncoderBuffer(F);else if(R.choice)_=this._encodeChoice(F,E);else if(R.contains)k=this._getUse(R.contains,P)._encode(F,E),g=!0;else if(R.children)k=R.children.map(function(c){if(c._baseState.tag==="null_")return c._encode(null,E,F);if(c._baseState.key===null)return E.error("Child should have a key");var r=E.enterKey(c._baseState.key);if(typeof F!=="object")return E.error("Child expected, but input is not object");var J$=c._encode(F[c._baseState.key],E,F);return E.leaveKey(r),J$},this).filter(function(c){return c}),k=this._createEncoderBuffer(k);else if(R.tag==="seqof"||R.tag==="setof"){if(!(R.args&&R.args.length===1))return E.error("Too many args for : "+R.tag);if(!Array.isArray(F))return E.error("seqof/setof, but data is not Array");var j=this.clone();j._baseState.implicit=null,k=this._createEncoderBuffer(F.map(function(c){var r=this._baseState;return this._getUse(r.args[0],F)._encode(c,E)},j))}else if(R.use!==null)_=this._getUse(R.use,P)._encode(F,E);else k=this._encodePrimitive(R.tag,F),g=!0;var _;if(!R.any&&R.choice===null){var N=R.implicit!==null?R.implicit:R.tag,B=R.implicit===null?"universal":"context";if(N===null){if(R.use===null)E.error("Tag could be omitted only for .use()")}else if(R.use===null)_=this._encodeComposite(N,g,B,k)}if(R.explicit!==null)_=this._encodeComposite(R.explicit,!1,"context",_);return _},Z.prototype._encodeChoice=function(F,E){var P=this._baseState,R=P.choice[F.type];if(!R)Q(!1,F.type+" not found in "+JSON.stringify(Object.keys(P.choice)));return R._encode(F.value,E)},Z.prototype._encodePrimitive=function(F,E){var P=this._baseState;if(/str$/.test(F))return this._encodeStr(E,F);else if(F==="objid"&&P.args)return this._encodeObjid(E,P.reverseArgs[0],P.args[1]);else if(F==="objid")return this._encodeObjid(E,null,null);else if(F==="gentime"||F==="utctime")return this._encodeTime(E,F);else if(F==="null_")return this._encodeNull();else if(F==="int"||F==="enum")return this._encodeInt(E,P.args&&P.reverseArgs[0]);else if(F==="bool")return this._encodeBool(E);else if(F==="objDesc")return this._encodeStr(E,F);else throw Error("Unsupported tag: "+F)},Z.prototype._isNumstr=function(F){return/^[0-9 ]*$/.test(F)},Z.prototype._isPrintstr=function(F){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(F)}}),M6=Y$(($)=>{var I=$;I.Reporter=BF().Reporter,I.DecoderBuffer=TW().DecoderBuffer,I.EncoderBuffer=TW().EncoderBuffer,I.Node=xF()}),wF=Y$(($)=>{var I=pW();$.tagClass={0:"universal",1:"application",2:"context",3:"private"},$.tagClassByName=I._reverse($.tagClass),$.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},$.tagByName=I._reverse($.tag)}),pW=Y$(($)=>{var I=$;I._reverse=function(D){var X={};return Object.keys(D).forEach(function(U){if((U|0)==U)U=U|0;var Q=D[U];X[Q]=U}),X},I.der=wF()}),lW=Y$(($,I)=>{var D=s0(),X=k6(),U=X.base,Q=X.bignum,J=X.constants.der;function A(F){this.enc="der",this.name=F.name,this.entity=F,this.tree=new T,this.tree._init(F.body)}I.exports=A,A.prototype.decode=function(F,E){if(!(F instanceof U.DecoderBuffer))F=new U.DecoderBuffer(F,E);return this.tree._decode(F,E)};function T(F){U.Node.call(this,"der",F)}D(T,U.Node),T.prototype._peekTag=function(F,E,P){if(F.isEmpty())return!1;var R=F.save(),k=Z(F,'Failed to peek tag: "'+E+'"');if(F.isError(k))return k;return F.restore(R),k.tag===E||k.tagStr===E||k.tagStr+"of"===E||P},T.prototype._decodeTag=function(F,E,P){var R=Z(F,'Failed to decode tag of "'+E+'"');if(F.isError(R))return R;var k=L(F,R.primitive,'Failed to get length of "'+E+'"');if(F.isError(k))return k;if(!P&&R.tag!==E&&R.tagStr!==E&&R.tagStr+"of"!==E)return F.error('Failed to match tag: "'+E+'"');if(R.primitive||k!==null)return F.skip(k,'Failed to match body of: "'+E+'"');var g=F.save(),j=this._skipUntilEnd(F,'Failed to skip indefinite length body: "'+this.tag+'"');if(F.isError(j))return j;return k=F.offset-g.offset,F.restore(g),F.skip(k,'Failed to match body of: "'+E+'"')},T.prototype._skipUntilEnd=function(F,E){while(!0){var P=Z(F,E);if(F.isError(P))return P;var R=L(F,P.primitive,E);if(F.isError(R))return R;var k;if(P.primitive||R!==null)k=F.skip(R);else k=this._skipUntilEnd(F,E);if(F.isError(k))return k;if(P.tagStr==="end")break}},T.prototype._decodeList=function(F,E,P,R){var k=[];while(!F.isEmpty()){var g=this._peekTag(F,"end");if(F.isError(g))return g;var j=P.decode(F,"der",R);if(F.isError(j)&&g)break;k.push(j)}return k},T.prototype._decodeStr=function(F,E){if(E==="bitstr"){var P=F.readUInt8();if(F.isError(P))return P;return{unused:P,data:F.raw()}}else if(E==="bmpstr"){var R=F.raw();if(R.length%2===1)return F.error("Decoding of string type: bmpstr length mismatch");var k="";for(var g=0;g<R.length/2;g++)k+=String.fromCharCode(R.readUInt16BE(g*2));return k}else if(E==="numstr"){var j=F.raw().toString("ascii");if(!this._isNumstr(j))return F.error("Decoding of string type: numstr unsupported characters");return j}else if(E==="octstr")return F.raw();else if(E==="objDesc")return F.raw();else if(E==="printstr"){var _=F.raw().toString("ascii");if(!this._isPrintstr(_))return F.error("Decoding of string type: printstr unsupported characters");return _}else if(/str$/.test(E))return F.raw().toString();else return F.error("Decoding of string type: "+E+" unsupported")},T.prototype._decodeObjid=function(F,E,P){var R,k=[],g=0;while(!F.isEmpty()){var j=F.readUInt8();if(g<<=7,g|=j&127,(j&128)===0)k.push(g),g=0}if(j&128)k.push(g);var _=k[0]/40|0,N=k[0]%40;if(P)R=k;else R=[_,N].concat(k.slice(1));if(E){var B=E[R.join(" ")];if(B===void 0)B=E[R.join(".")];if(B!==void 0)R=B}return R},T.prototype._decodeTime=function(F,E){var P=F.raw().toString();if(E==="gentime")var R=P.slice(0,4)|0,k=P.slice(4,6)|0,g=P.slice(6,8)|0,j=P.slice(8,10)|0,_=P.slice(10,12)|0,N=P.slice(12,14)|0;else if(E==="utctime"){var R=P.slice(0,2)|0,k=P.slice(2,4)|0,g=P.slice(4,6)|0,j=P.slice(6,8)|0,_=P.slice(8,10)|0,N=P.slice(10,12)|0;if(R<70)R=2000+R;else R=1900+R}else return F.error("Decoding "+E+" time is not supported yet");return Date.UTC(R,k-1,g,j,_,N,0)},T.prototype._decodeNull=function(F){return null},T.prototype._decodeBool=function(F){var E=F.readUInt8();if(F.isError(E))return E;else return E!==0},T.prototype._decodeInt=function(F,E){var P=F.raw(),R=new Q(P);if(E)R=E[R.toString(10)]||R;return R},T.prototype._use=function(F,E){if(typeof F==="function")F=F(E);return F._getDecoder("der").tree};function Z(F,E){var P=F.readUInt8(E);if(F.isError(P))return P;var R=J.tagClass[P>>6],k=(P&32)===0;if((P&31)===31){var g=P;P=0;while((g&128)===128){if(g=F.readUInt8(E),F.isError(g))return g;P<<=7,P|=g&127}}else P&=31;var j=J.tag[P];return{cls:R,primitive:k,tag:P,tagStr:j}}function L(F,E,P){var R=F.readUInt8(P);if(F.isError(R))return R;if(!E&&R===128)return null;if((R&128)===0)return R;var k=R&127;if(k>4)return F.error("length octect is too long");R=0;for(var g=0;g<k;g++){R<<=8;var j=F.readUInt8(P);if(F.isError(j))return j;R|=j}return R}}),cF=Y$(($,I)=>{var D=s0(),X=(j0(),e$(_0)).Buffer,U=lW();function Q(J){U.call(this,J),this.enc="pem"}D(Q,U),I.exports=Q,Q.prototype.decode=function(J,A){var T=J.toString().split(/[\r\n]+/g),Z=A.label.toUpperCase(),L=/^-----(BEGIN|END) ([^-]+)-----$/,F=-1,E=-1;for(var P=0;P<T.length;P++){var R=T[P].match(L);if(R===null)continue;if(R[2]!==Z)continue;if(F===-1){if(R[1]!=="BEGIN")break;F=P}else{if(R[1]!=="END")break;E=P;break}}if(F===-1||E===-1)throw Error("PEM section not found for: "+Z);var k=T.slice(F+1,E).join("");k.replace(/[^a-z0-9\+\/=]+/gi,"");var g=new X(k,"base64");return U.prototype.decode.call(this,g,A)}}),fF=Y$(($)=>{var I=$;I.der=lW(),I.pem=cF()}),bW=Y$(($,I)=>{var D=s0(),X=(j0(),e$(_0)).Buffer,U=k6(),Q=U.base,J=U.constants.der;function A(F){this.enc="der",this.name=F.name,this.entity=F,this.tree=new T,this.tree._init(F.body)}I.exports=A,A.prototype.encode=function(F,E){return this.tree._encode(F,E).join()};function T(F){Q.Node.call(this,"der",F)}D(T,Q.Node),T.prototype._encodeComposite=function(F,E,P,R){var k=L(F,E,P,this.reporter);if(R.length<128){var _=new X(2);return _[0]=k,_[1]=R.length,this._createEncoderBuffer([_,R])}var g=1;for(var j=R.length;j>=256;j>>=8)g++;var _=new X(2+g);_[0]=k,_[1]=128|g;for(var j=1+g,N=R.length;N>0;j--,N>>=8)_[j]=N&255;return this._createEncoderBuffer([_,R])},T.prototype._encodeStr=function(F,E){if(E==="bitstr")return this._createEncoderBuffer([F.unused|0,F.data]);else if(E==="bmpstr"){var P=new X(F.length*2);for(var R=0;R<F.length;R++)P.writeUInt16BE(F.charCodeAt(R),R*2);return this._createEncoderBuffer(P)}else if(E==="numstr"){if(!this._isNumstr(F))return this.reporter.error("Encoding of string type: numstr supports only digits and space");return this._createEncoderBuffer(F)}else if(E==="printstr"){if(!this._isPrintstr(F))return this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");return this._createEncoderBuffer(F)}else if(/str$/.test(E))return this._createEncoderBuffer(F);else if(E==="objDesc")return this._createEncoderBuffer(F);else return this.reporter.error("Encoding of string type: "+E+" unsupported")},T.prototype._encodeObjid=function(F,E,P){if(typeof F==="string"){if(!E)return this.reporter.error("string objid given, but no values map found");if(!E.hasOwnProperty(F))return this.reporter.error("objid not found in values map");F=E[F].split(/[\s\.]+/g);for(var R=0;R<F.length;R++)F[R]|=0}else if(Array.isArray(F)){F=F.slice();for(var R=0;R<F.length;R++)F[R]|=0}if(!Array.isArray(F))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(F));if(!P){if(F[1]>=40)return this.reporter.error("Second objid identifier OOB");F.splice(0,2,F[0]*40+F[1])}var k=0;for(var R=0;R<F.length;R++){var g=F[R];for(k++;g>=128;g>>=7)k++}var j=new X(k),_=j.length-1;for(var R=F.length-1;R>=0;R--){var g=F[R];j[_--]=g&127;while((g>>=7)>0)j[_--]=128|g&127}return this._createEncoderBuffer(j)};function Z(F){if(F<10)return"0"+F;else return F}T.prototype._encodeTime=function(F,E){var P,R=new Date(F);if(E==="gentime")P=[Z(R.getFullYear()),Z(R.getUTCMonth()+1),Z(R.getUTCDate()),Z(R.getUTCHours()),Z(R.getUTCMinutes()),Z(R.getUTCSeconds()),"Z"].join("");else if(E==="utctime")P=[Z(R.getFullYear()%100),Z(R.getUTCMonth()+1),Z(R.getUTCDate()),Z(R.getUTCHours()),Z(R.getUTCMinutes()),Z(R.getUTCSeconds()),"Z"].join("");else this.reporter.error("Encoding "+E+" time is not supported yet");return this._encodeStr(P,"octstr")},T.prototype._encodeNull=function(){return this._createEncoderBuffer("")},T.prototype._encodeInt=function(F,E){if(typeof F==="string"){if(!E)return this.reporter.error("String int or enum given, but no values map");if(!E.hasOwnProperty(F))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(F));F=E[F]}if(typeof F!=="number"&&!X.isBuffer(F)){var P=F.toArray();if(!F.sign&&P[0]&128)P.unshift(0);F=new X(P)}if(X.isBuffer(F)){var R=F.length;if(F.length===0)R++;var g=new X(R);if(F.copy(g),F.length===0)g[0]=0;return this._createEncoderBuffer(g)}if(F<128)return this._createEncoderBuffer(F);if(F<256)return this._createEncoderBuffer([0,F]);var R=1;for(var k=F;k>=256;k>>=8)R++;var g=Array(R);for(var k=g.length-1;k>=0;k--)g[k]=F&255,F>>=8;if(g[0]&128)g.unshift(0);return this._createEncoderBuffer(new X(g))},T.prototype._encodeBool=function(F){return this._createEncoderBuffer(F?255:0)},T.prototype._use=function(F,E){if(typeof F==="function")F=F(E);return F._getEncoder("der").tree},T.prototype._skipDefault=function(F,E,P){var R=this._baseState,k;if(R.default===null)return!1;var g=F.join();if(R.defaultBuffer===void 0)R.defaultBuffer=this._encodeValue(R.default,E,P).join();if(g.length!==R.defaultBuffer.length)return!1;for(k=0;k<g.length;k++)if(g[k]!==R.defaultBuffer[k])return!1;return!0};function L(F,E,P,R){var k;if(F==="seqof")F="seq";else if(F==="setof")F="set";if(J.tagByName.hasOwnProperty(F))k=J.tagByName[F];else if(typeof F==="number"&&(F|0)===F)k=F;else return R.error("Unknown tag: "+F);if(k>=31)return R.error("Multi-octet tag encoding unsupported");if(!E)k|=32;return k|=J.tagClassByName[P||"universal"]<<6,k}}),yF=Y$(($,I)=>{var D=s0(),X=bW();function U(Q){X.call(this,Q),this.enc="pem"}D(U,X),I.exports=U,U.prototype.encode=function(Q,J){var A=X.prototype.encode.call(this,Q),T=A.toString("base64"),Z=["-----BEGIN "+J.label+"-----"];for(var L=0;L<T.length;L+=64)Z.push(T.slice(L,L+64));return Z.push("-----END "+J.label+"-----"),Z.join(`
14
+ `)}}),uF=Y$(($)=>{var I=$;I.der=bW(),I.pem=yF()}),k6=Y$(($)=>{var I=$;I.bignum=jF(),I.define=NF().define,I.base=M6(),I.constants=pW(),I.decoders=fF(),I.encoders=uF()}),hF=Y$(($,I)=>{var D=k6(),X=D.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),U=D.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Q=D.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),J=D.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Q),this.key("subjectPublicKey").bitstr())}),A=D.define("RelativeDistinguishedName",function(){this.setof(U)}),T=D.define("RDNSequence",function(){this.seqof(A)}),Z=D.define("Name",function(){this.choice({rdnSequence:this.use(T)})}),L=D.define("Validity",function(){this.seq().obj(this.key("notBefore").use(X),this.key("notAfter").use(X))}),F=D.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),E=D.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Q),this.key("issuer").use(Z),this.key("validity").use(L),this.key("subject").use(Z),this.key("subjectPublicKeyInfo").use(J),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(F).optional())}),P=D.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(E),this.key("signatureAlgorithm").use(Q),this.key("signatureValue").bitstr())});I.exports=P}),pF=Y$(($)=>{var I=k6();$.certificate=hF();var D=I.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});$.RSAPrivateKey=D;var X=I.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});$.RSAPublicKey=X;var U=I.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),Q=I.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(U),this.key("subjectPublicKey").bitstr())});$.PublicKey=Q;var J=I.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(U),this.key("subjectPrivateKey").octstr())});$.PrivateKey=J;var A=I.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});$.EncryptedPrivateKey=A;var T=I.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});$.DSAPrivateKey=T,$.DSAparam=I.define("DSAparam",function(){this.int()});var Z=I.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),L=I.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(Z),this.key("publicKey").optional().explicit(1).bitstr())});$.ECPrivateKey=L,$.signature=I.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),lF=Y$(($,I)=>{I.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),bF=Y$(($,I)=>{var D=l0().Buffer,X=sQ().Transform,U=s0();function Q(Z){X.call(this),this._block=D.allocUnsafe(Z),this._blockSize=Z,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}U(Q,X),Q.prototype._transform=function(Z,L,F){var E=null;try{this.update(Z,L)}catch(P){E=P}F(E)},Q.prototype._flush=function(Z){var L=null;try{this.push(this.digest())}catch(F){L=F}Z(L)};var J=typeof Uint8Array<"u",A=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(D.prototype instanceof Uint8Array||D.TYPED_ARRAY_SUPPORT);function T(Z,L){if(Z instanceof D)return Z;if(typeof Z==="string")return D.from(Z,L);if(A&&ArrayBuffer.isView(Z)){if(Z.byteLength===0)return D.alloc(0);var F=D.from(Z.buffer,Z.byteOffset,Z.byteLength);if(F.byteLength===Z.byteLength)return F}if(J&&Z instanceof Uint8Array)return D.from(Z);if(D.isBuffer(Z)&&Z.constructor&&typeof Z.constructor.isBuffer==="function"&&Z.constructor.isBuffer(Z))return D.from(Z);throw TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Q.prototype.update=function(Z,L){if(this._finalized)throw Error("Digest already called");Z=T(Z,L);var F=this._block,E=0;while(this._blockOffset+Z.length-E>=this._blockSize){for(var P=this._blockOffset;P<this._blockSize;)F[P++]=Z[E++];this._update(),this._blockOffset=0}while(E<Z.length)F[this._blockOffset++]=Z[E++];for(var R=0,k=Z.length*8;k>0;++R)if(this._length[R]+=k,k=this._length[R]/4294967296|0,k>0)this._length[R]-=4294967296*k;return this},Q.prototype._update=function(){throw Error("_update is not implemented")},Q.prototype.digest=function(Z){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var L=this._digest();if(Z!==void 0)L=L.toString(Z);this._block.fill(0),this._blockOffset=0;for(var F=0;F<4;++F)this._length[F]=0;return L},Q.prototype._digest=function(){throw Error("_digest is not implemented")},I.exports=Q}),rF=Y$(($,I)=>{var D=s0(),X=bF(),U=l0().Buffer,Q=Array(16);function J(){X.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}D(J,X),J.prototype._update=function(){var E=Q;for(var P=0;P<16;++P)E[P]=this._block.readInt32LE(P*4);var R=this._a,k=this._b,g=this._c,j=this._d;R=T(R,k,g,j,E[0],3614090360,7),j=T(j,R,k,g,E[1],3905402710,12),g=T(g,j,R,k,E[2],606105819,17),k=T(k,g,j,R,E[3],3250441966,22),R=T(R,k,g,j,E[4],4118548399,7),j=T(j,R,k,g,E[5],1200080426,12),g=T(g,j,R,k,E[6],2821735955,17),k=T(k,g,j,R,E[7],4249261313,22),R=T(R,k,g,j,E[8],1770035416,7),j=T(j,R,k,g,E[9],2336552879,12),g=T(g,j,R,k,E[10],4294925233,17),k=T(k,g,j,R,E[11],2304563134,22),R=T(R,k,g,j,E[12],1804603682,7),j=T(j,R,k,g,E[13],4254626195,12),g=T(g,j,R,k,E[14],2792965006,17),k=T(k,g,j,R,E[15],1236535329,22),R=Z(R,k,g,j,E[1],4129170786,5),j=Z(j,R,k,g,E[6],3225465664,9),g=Z(g,j,R,k,E[11],643717713,14),k=Z(k,g,j,R,E[0],3921069994,20),R=Z(R,k,g,j,E[5],3593408605,5),j=Z(j,R,k,g,E[10],38016083,9),g=Z(g,j,R,k,E[15],3634488961,14),k=Z(k,g,j,R,E[4],3889429448,20),R=Z(R,k,g,j,E[9],568446438,5),j=Z(j,R,k,g,E[14],3275163606,9),g=Z(g,j,R,k,E[3],4107603335,14),k=Z(k,g,j,R,E[8],1163531501,20),R=Z(R,k,g,j,E[13],2850285829,5),j=Z(j,R,k,g,E[2],4243563512,9),g=Z(g,j,R,k,E[7],1735328473,14),k=Z(k,g,j,R,E[12],2368359562,20),R=L(R,k,g,j,E[5],4294588738,4),j=L(j,R,k,g,E[8],2272392833,11),g=L(g,j,R,k,E[11],1839030562,16),k=L(k,g,j,R,E[14],4259657740,23),R=L(R,k,g,j,E[1],2763975236,4),j=L(j,R,k,g,E[4],1272893353,11),g=L(g,j,R,k,E[7],4139469664,16),k=L(k,g,j,R,E[10],3200236656,23),R=L(R,k,g,j,E[13],681279174,4),j=L(j,R,k,g,E[0],3936430074,11),g=L(g,j,R,k,E[3],3572445317,16),k=L(k,g,j,R,E[6],76029189,23),R=L(R,k,g,j,E[9],3654602809,4),j=L(j,R,k,g,E[12],3873151461,11),g=L(g,j,R,k,E[15],530742520,16),k=L(k,g,j,R,E[2],3299628645,23),R=F(R,k,g,j,E[0],4096336452,6),j=F(j,R,k,g,E[7],1126891415,10),g=F(g,j,R,k,E[14],2878612391,15),k=F(k,g,j,R,E[5],4237533241,21),R=F(R,k,g,j,E[12],1700485571,6),j=F(j,R,k,g,E[3],2399980690,10),g=F(g,j,R,k,E[10],4293915773,15),k=F(k,g,j,R,E[1],2240044497,21),R=F(R,k,g,j,E[8],1873313359,6),j=F(j,R,k,g,E[15],4264355552,10),g=F(g,j,R,k,E[6],2734768916,15),k=F(k,g,j,R,E[13],1309151649,21),R=F(R,k,g,j,E[4],4149444226,6),j=F(j,R,k,g,E[11],3174756917,10),g=F(g,j,R,k,E[2],718787259,15),k=F(k,g,j,R,E[9],3951481745,21),this._a=this._a+R|0,this._b=this._b+k|0,this._c=this._c+g|0,this._d=this._d+j|0},J.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var E=U.allocUnsafe(16);return E.writeInt32LE(this._a,0),E.writeInt32LE(this._b,4),E.writeInt32LE(this._c,8),E.writeInt32LE(this._d,12),E};function A(E,P){return E<<P|E>>>32-P}function T(E,P,R,k,g,j,_){return A(E+(P&R|~P&k)+g+j|0,_)+P|0}function Z(E,P,R,k,g,j,_){return A(E+(P&k|R&~k)+g+j|0,_)+P|0}function L(E,P,R,k,g,j,_){return A(E+(P^R^k)+g+j|0,_)+P|0}function F(E,P,R,k,g,j,_){return A(E+(R^(P|~k))+g+j|0,_)+P|0}I.exports=J}),oF=Y$(($,I)=>{var D=l0().Buffer,X=rF();function U(Q,J,A,T){if(!D.isBuffer(Q))Q=D.from(Q,"binary");if(J){if(!D.isBuffer(J))J=D.from(J,"binary");if(J.length!==8)throw RangeError("salt should be Buffer with 8 byte length")}var Z=A/8,L=D.alloc(Z),F=D.alloc(T||0),E=D.alloc(0);while(Z>0||T>0){var P=new X;if(P.update(E),P.update(Q),J)P.update(J);E=P.digest();var R=0;if(Z>0){var k=L.length-Z;R=Math.min(Z,E.length),E.copy(L,k,0,R),Z-=R}if(R<E.length&&T>0){var g=F.length-T,j=Math.min(T,E.length-R);E.copy(F,g,R,R+j),T-=j}}return E.fill(0),{key:L,iv:F}}I.exports=U}),rW=Y$(($)=>{var I=(t0(),e$(m0));$.createCipher=$.Cipher=I.createCipher,$.createCipheriv=$.Cipheriv=I.createCipheriv,$.createDecipher=$.Decipher=I.createDecipher,$.createDecipheriv=$.Decipheriv=I.createDecipheriv,$.listCiphers=$.getCiphers=I.getCiphers}),nF=Y$(($,I)=>{var D=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,X=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,U=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,Q=oF(),J=rW(),A=l0().Buffer;I.exports=function(T,Z){var L=T.toString(),F=L.match(D),E;if(!F){var P=L.match(U);E=A.from(P[2].replace(/[\r\n]/g,""),"base64")}else{var R="aes"+F[1],k=A.from(F[2],"hex"),g=A.from(F[3].replace(/[\r\n]/g,""),"base64"),j=Q(Z,k.slice(0,8),parseInt(F[1],10)).key,_=[],N=J.createDecipheriv(R,j,k);_.push(N.update(g)),_.push(N.final()),E=A.concat(_)}var B=L.match(X)[1];return{tag:B,data:E}}}),oW=Y$(($,I)=>{var D=pF(),X=lF(),U=nF(),Q=rW(),J=xW().pbkdf2Sync,A=l0().Buffer;function T(L,F){var E=L.algorithm.decrypt.kde.kdeparams.salt,P=parseInt(L.algorithm.decrypt.kde.kdeparams.iters.toString(),10),R=X[L.algorithm.decrypt.cipher.algo.join(".")],k=L.algorithm.decrypt.cipher.iv,g=L.subjectPrivateKey,j=parseInt(R.split("-")[1],10)/8,_=J(F,E,P,j,"sha1"),N=Q.createDecipheriv(R,_,k),B=[];return B.push(N.update(g)),B.push(N.final()),A.concat(B)}function Z(L){var F;if(typeof L==="object"&&!A.isBuffer(L))F=L.passphrase,L=L.key;if(typeof L==="string")L=A.from(L);var E=U(L,F),P=E.tag,R=E.data,k,g;switch(P){case"CERTIFICATE":g=D.certificate.decode(R,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!g)g=D.PublicKey.decode(R,"der");switch(k=g.algorithm.algorithm.join("."),k){case"1.2.840.113549.1.1.1":return D.RSAPublicKey.decode(g.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return g.subjectPrivateKey=g.subjectPublicKey,{type:"ec",data:g};case"1.2.840.10040.4.1":return g.algorithm.params.pub_key=D.DSAparam.decode(g.subjectPublicKey.data,"der"),{type:"dsa",data:g.algorithm.params};default:throw Error("unknown key id "+k)}case"ENCRYPTED PRIVATE KEY":R=D.EncryptedPrivateKey.decode(R,"der"),R=T(R,F);case"PRIVATE KEY":switch(g=D.PrivateKey.decode(R,"der"),k=g.algorithm.algorithm.join("."),k){case"1.2.840.113549.1.1.1":return D.RSAPrivateKey.decode(g.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:g.algorithm.curve,privateKey:D.ECPrivateKey.decode(g.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return g.algorithm.params.priv_key=D.DSAparam.decode(g.subjectPrivateKey,"der"),{type:"dsa",params:g.algorithm.params};default:throw Error("unknown key id "+k)}case"RSA PUBLIC KEY":return D.RSAPublicKey.decode(R,"der");case"RSA PRIVATE KEY":return D.RSAPrivateKey.decode(R,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:D.DSAPrivateKey.decode(R,"der")};case"EC PRIVATE KEY":return R=D.ECPrivateKey.decode(R,"der"),{curve:R.parameters.value,privateKey:R.privateKey};default:throw Error("unknown key type "+P)}}Z.signature=D.signature,I.exports=Z}),nW=Y$(($,I)=>{var D=R4(),X=l0().Buffer;I.exports=function(Q,J){var A=X.alloc(0),T=0,Z;while(A.length<J)Z=U(T++),A=X.concat([A,D("sha1").update(Q).update(Z).digest()]);return A.slice(0,J)};function U(Q){var J=X.allocUnsafe(4);return J.writeUInt32BE(Q,0),J}}),dW=Y$(($,I)=>{I.exports=function(D,X){var U=D.length,Q=-1;while(++Q<U)D[Q]^=X[Q];return D}}),YY=Y$(($,I)=>{(function(D,X){function U(v,G){if(!v)throw Error(G||"Assertion failed")}function Q(v,G){v.super_=G;var W=function(){};W.prototype=G.prototype,v.prototype=new W,v.prototype.constructor=v}function J(v,G,W){if(J.isBN(v))return v;if(this.negative=0,this.words=null,this.length=0,this.red=null,v!==null){if(G==="le"||G==="be")W=G,G=10;this._init(v||0,G||10,W||"be")}}if(typeof D==="object")D.exports=J;else X.BN=J;J.BN=J,J.wordSize=26;var A;try{if(typeof window<"u"&&typeof window.Buffer<"u")A=window.Buffer;else A=(j0(),e$(_0)).Buffer}catch(v){}J.isBN=function(v){if(v instanceof J)return!0;return v!==null&&typeof v==="object"&&v.constructor.wordSize===J.wordSize&&Array.isArray(v.words)},J.max=function(v,G){if(v.cmp(G)>0)return v;return G},J.min=function(v,G){if(v.cmp(G)<0)return v;return G},J.prototype._init=function(v,G,W){if(typeof v==="number")return this._initNumber(v,G,W);if(typeof v==="object")return this._initArray(v,G,W);if(G==="hex")G=16;U(G===(G|0)&&G>=2&&G<=36),v=v.toString().replace(/\s+/g,"");var Y=0;if(v[0]==="-")Y++,this.negative=1;if(Y<v.length){if(G===16)this._parseHex(v,Y,W);else if(this._parseBase(v,G,Y),W==="le")this._initArray(this.toArray(),G,W)}},J.prototype._initNumber=function(v,G,W){if(v<0)this.negative=1,v=-v;if(v<67108864)this.words=[v&67108863],this.length=1;else if(v<4503599627370496)this.words=[v&67108863,v/67108864&67108863],this.length=2;else U(v<9007199254740992),this.words=[v&67108863,v/67108864&67108863,1],this.length=3;if(W!=="le")return;this._initArray(this.toArray(),G,W)},J.prototype._initArray=function(v,G,W){if(U(typeof v.length==="number"),v.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(v.length/3),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V,S,H=0;if(W==="be"){for(Y=v.length-1,V=0;Y>=0;Y-=3)if(S=v[Y]|v[Y-1]<<8|v[Y-2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}else if(W==="le"){for(Y=0,V=0;Y<v.length;Y+=3)if(S=v[Y]|v[Y+1]<<8|v[Y+2]<<16,this.words[V]|=S<<H&67108863,this.words[V+1]=S>>>26-H&67108863,H+=24,H>=26)H-=26,V++}return this.strip()};function T(v,G){var W=v.charCodeAt(G);if(W>=65&&W<=70)return W-55;else if(W>=97&&W<=102)return W-87;else return W-48&15}function Z(v,G,W){var Y=T(v,W);if(W-1>=G)Y|=T(v,W-1)<<4;return Y}J.prototype._parseHex=function(v,G,W){this.length=Math.ceil((v.length-G)/6),this.words=Array(this.length);for(var Y=0;Y<this.length;Y++)this.words[Y]=0;var V=0,S=0,H;if(W==="be")for(Y=v.length-1;Y>=G;Y-=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8;else{var K=v.length-G;for(Y=K%2===0?G+1:G;Y<v.length;Y+=2)if(H=Z(v,G,Y)<<V,this.words[S]|=H&67108863,V>=18)V-=18,S+=1,this.words[S]|=H>>>26;else V+=8}this.strip()};function L(v,G,W,Y){var V=0,S=Math.min(v.length,W);for(var H=G;H<S;H++){var K=v.charCodeAt(H)-48;if(V*=Y,K>=49)V+=K-49+10;else if(K>=17)V+=K-17+10;else V+=K}return V}J.prototype._parseBase=function(v,G,W){this.words=[0],this.length=1;for(var Y=0,V=1;V<=67108863;V*=G)Y++;Y--,V=V/G|0;var S=v.length-W,H=S%Y,K=Math.min(S,S-H)+W,O=0;for(var z=W;z<K;z+=Y)if(O=L(v,z,z+Y,G),this.imuln(V),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O);if(H!==0){var q=1;O=L(v,z,v.length,G);for(z=0;z<H;z++)q*=G;if(this.imuln(q),this.words[0]+O<67108864)this.words[0]+=O;else this._iaddn(O)}this.strip()},J.prototype.copy=function(v){v.words=Array(this.length);for(var G=0;G<this.length;G++)v.words[G]=this.words[G];v.length=this.length,v.negative=this.negative,v.red=this.red},J.prototype.clone=function(){var v=new J(null);return this.copy(v),v},J.prototype._expand=function(v){while(this.length<v)this.words[this.length++]=0;return this},J.prototype.strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},J.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},J.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var F=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],E=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],P=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(J.prototype.toString=function(v,G){v=v||10,G=G|0||1;var W;if(v===16||v==="hex"){W="";var Y=0,V=0;for(var S=0;S<this.length;S++){var H=this.words[S],K=((H<<Y|V)&16777215).toString(16);if(V=H>>>24-Y&16777215,Y+=2,Y>=26)Y-=26,S--;if(V!==0||S!==this.length-1)W=F[6-K.length]+K+W;else W=K+W}if(V!==0)W=V.toString(16)+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}if(v===(v|0)&&v>=2&&v<=36){var O=E[v],z=P[v];W="";var q=this.clone();q.negative=0;while(!q.isZero()){var M=q.modn(z).toString(v);if(q=q.idivn(z),!q.isZero())W=F[O-M.length]+M+W;else W=M+W}if(this.isZero())W="0"+W;while(W.length%G!==0)W="0"+W;if(this.negative!==0)W="-"+W;return W}U(!1,"Base should be between 2 and 36")},J.prototype.toNumber=function(){var v=this.words[0];if(this.length===2)v+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)v+=4503599627370496+this.words[1]*67108864;else if(this.length>2)U(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-v:v},J.prototype.toJSON=function(){return this.toString(16)},J.prototype.toBuffer=function(v,G){return U(typeof A<"u"),this.toArrayLike(A,v,G)},J.prototype.toArray=function(v,G){return this.toArrayLike(Array,v,G)},J.prototype.toArrayLike=function(v,G,W){var Y=this.byteLength(),V=W||Math.max(1,Y);U(Y<=V,"byte array longer than desired length"),U(V>0,"Requested array length <= 0"),this.strip();var S=G==="le",H=new v(V),K,O,z=this.clone();if(!S){for(O=0;O<V-Y;O++)H[O]=0;for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[V-O-1]=K}else{for(O=0;!z.isZero();O++)K=z.andln(255),z.iushrn(8),H[O]=K;for(;O<V;O++)H[O]=0}return H},Math.clz32)J.prototype._countBits=function(v){return 32-Math.clz32(v)};else J.prototype._countBits=function(v){var G=v,W=0;if(G>=4096)W+=13,G>>>=13;if(G>=64)W+=7,G>>>=7;if(G>=8)W+=4,G>>>=4;if(G>=2)W+=2,G>>>=2;return W+G};J.prototype._zeroBits=function(v){if(v===0)return 26;var G=v,W=0;if((G&8191)===0)W+=13,G>>>=13;if((G&127)===0)W+=7,G>>>=7;if((G&15)===0)W+=4,G>>>=4;if((G&3)===0)W+=2,G>>>=2;if((G&1)===0)W++;return W},J.prototype.bitLength=function(){var v=this.words[this.length-1],G=this._countBits(v);return(this.length-1)*26+G};function R(v){var G=Array(v.bitLength());for(var W=0;W<G.length;W++){var Y=W/26|0,V=W%26;G[W]=(v.words[Y]&1<<V)>>>V}return G}J.prototype.zeroBits=function(){if(this.isZero())return 0;var v=0;for(var G=0;G<this.length;G++){var W=this._zeroBits(this.words[G]);if(v+=W,W!==26)break}return v},J.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},J.prototype.toTwos=function(v){if(this.negative!==0)return this.abs().inotn(v).iaddn(1);return this.clone()},J.prototype.fromTwos=function(v){if(this.testn(v-1))return this.notn(v).iaddn(1).ineg();return this.clone()},J.prototype.isNeg=function(){return this.negative!==0},J.prototype.neg=function(){return this.clone().ineg()},J.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},J.prototype.iuor=function(v){while(this.length<v.length)this.words[this.length++]=0;for(var G=0;G<v.length;G++)this.words[G]=this.words[G]|v.words[G];return this.strip()},J.prototype.ior=function(v){return U((this.negative|v.negative)===0),this.iuor(v)},J.prototype.or=function(v){if(this.length>v.length)return this.clone().ior(v);return v.clone().ior(this)},J.prototype.uor=function(v){if(this.length>v.length)return this.clone().iuor(v);return v.clone().iuor(this)},J.prototype.iuand=function(v){var G;if(this.length>v.length)G=v;else G=this;for(var W=0;W<G.length;W++)this.words[W]=this.words[W]&v.words[W];return this.length=G.length,this.strip()},J.prototype.iand=function(v){return U((this.negative|v.negative)===0),this.iuand(v)},J.prototype.and=function(v){if(this.length>v.length)return this.clone().iand(v);return v.clone().iand(this)},J.prototype.uand=function(v){if(this.length>v.length)return this.clone().iuand(v);return v.clone().iuand(this)},J.prototype.iuxor=function(v){var G,W;if(this.length>v.length)G=this,W=v;else G=v,W=this;for(var Y=0;Y<W.length;Y++)this.words[Y]=G.words[Y]^W.words[Y];if(this!==G)for(;Y<G.length;Y++)this.words[Y]=G.words[Y];return this.length=G.length,this.strip()},J.prototype.ixor=function(v){return U((this.negative|v.negative)===0),this.iuxor(v)},J.prototype.xor=function(v){if(this.length>v.length)return this.clone().ixor(v);return v.clone().ixor(this)},J.prototype.uxor=function(v){if(this.length>v.length)return this.clone().iuxor(v);return v.clone().iuxor(this)},J.prototype.inotn=function(v){U(typeof v==="number"&&v>=0);var G=Math.ceil(v/26)|0,W=v%26;if(this._expand(G),W>0)G--;for(var Y=0;Y<G;Y++)this.words[Y]=~this.words[Y]&67108863;if(W>0)this.words[Y]=~this.words[Y]&67108863>>26-W;return this.strip()},J.prototype.notn=function(v){return this.clone().inotn(v)},J.prototype.setn=function(v,G){U(typeof v==="number"&&v>=0);var W=v/26|0,Y=v%26;if(this._expand(W+1),G)this.words[W]=this.words[W]|1<<Y;else this.words[W]=this.words[W]&~(1<<Y);return this.strip()},J.prototype.iadd=function(v){var G;if(this.negative!==0&&v.negative===0)return this.negative=0,G=this.isub(v),this.negative^=1,this._normSign();else if(this.negative===0&&v.negative!==0)return v.negative=0,G=this.isub(v),v.negative=1,G._normSign();var W,Y;if(this.length>v.length)W=this,Y=v;else W=v,Y=this;var V=0;for(var S=0;S<Y.length;S++)G=(W.words[S]|0)+(Y.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;for(;V!==0&&S<W.length;S++)G=(W.words[S]|0)+V,this.words[S]=G&67108863,V=G>>>26;if(this.length=W.length,V!==0)this.words[this.length]=V,this.length++;else if(W!==this)for(;S<W.length;S++)this.words[S]=W.words[S];return this},J.prototype.add=function(v){var G;if(v.negative!==0&&this.negative===0)return v.negative=0,G=this.sub(v),v.negative^=1,G;else if(v.negative===0&&this.negative!==0)return this.negative=0,G=v.sub(this),this.negative=1,G;if(this.length>v.length)return this.clone().iadd(v);return v.clone().iadd(this)},J.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var G=this.iadd(v);return v.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var W=this.cmp(v);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Y,V;if(W>0)Y=this,V=v;else Y=v,V=this;var S=0;for(var H=0;H<V.length;H++)G=(Y.words[H]|0)-(V.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;for(;S!==0&&H<Y.length;H++)G=(Y.words[H]|0)+S,S=G>>26,this.words[H]=G&67108863;if(S===0&&H<Y.length&&Y!==this)for(;H<Y.length;H++)this.words[H]=Y.words[H];if(this.length=Math.max(this.length,H),Y!==this)this.negative=1;return this.strip()},J.prototype.sub=function(v){return this.clone().isub(v)};function k(v,G,W){W.negative=G.negative^v.negative;var Y=v.length+G.length|0;W.length=Y,Y=Y-1|0;var V=v.words[0]|0,S=G.words[0]|0,H=V*S,K=H&67108863,O=H/67108864|0;W.words[0]=K;for(var z=1;z<Y;z++){var q=O>>>26,M=O&67108863,C=Math.min(z,G.length-1);for(var w=Math.max(0,z-v.length+1);w<=C;w++){var u=z-w|0;V=v.words[u]|0,S=G.words[w]|0,H=V*S+M,q+=H/67108864|0,M=H&67108863}W.words[z]=M|0,O=q|0}if(O!==0)W.words[z]=O|0;else W.length--;return W.strip()}var g=function(v,G,W){var Y=v.words,V=G.words,S=W.words,H=0,K,O,z,q=Y[0]|0,M=q&8191,C=q>>>13,w=Y[1]|0,u=w&8191,n=w>>>13,W$=Y[2]|0,i=W$&8191,b=W$>>>13,D$=Y[3]|0,d=D$&8191,s=D$>>>13,h$=Y[4]|0,f=h$&8191,h=h$>>>13,O$=Y[5]|0,t=O$&8191,a=O$>>>13,T$=Y[6]|0,y=T$&8191,o=T$>>>13,w$=Y[7]|0,m=w$&8191,v$=w$>>>13,r$=Y[8]|0,S$=r$&8191,A$=r$>>>13,X0=Y[9]|0,K$=X0&8191,F$=X0>>>13,G0=V[0]|0,L$=G0&8191,Z$=G0>>>13,w0=V[1]|0,M$=w0&8191,C$=w0>>>13,c0=V[2]|0,_$=c0&8191,P$=c0>>>13,N0=V[3]|0,j$=N0&8191,q$=N0>>>13,g0=V[4]|0,N$=g0&8191,B$=g0>>>13,k0=V[5]|0,R$=k0&8191,x=k0>>>13,l=V[6]|0,e=l&8191,U$=l>>>13,p$=V[7]|0,z$=p$&8191,H$=p$>>>13,Q0=V[8]|0,g$=Q0&8191,x$=Q0>>>13,B0=V[9]|0,k$=B0&8191,E$=B0>>>13;W.negative=v.negative^G.negative,W.length=19,K=Math.imul(M,L$),O=Math.imul(M,Z$),O=O+Math.imul(C,L$)|0,z=Math.imul(C,Z$);var Y0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,K=Math.imul(u,L$),O=Math.imul(u,Z$),O=O+Math.imul(n,L$)|0,z=Math.imul(n,Z$),K=K+Math.imul(M,M$)|0,O=O+Math.imul(M,C$)|0,O=O+Math.imul(C,M$)|0,z=z+Math.imul(C,C$)|0;var m$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(m$>>>26)|0,m$&=67108863,K=Math.imul(i,L$),O=Math.imul(i,Z$),O=O+Math.imul(b,L$)|0,z=Math.imul(b,Z$),K=K+Math.imul(u,M$)|0,O=O+Math.imul(u,C$)|0,O=O+Math.imul(n,M$)|0,z=z+Math.imul(n,C$)|0,K=K+Math.imul(M,_$)|0,O=O+Math.imul(M,P$)|0,O=O+Math.imul(C,_$)|0,z=z+Math.imul(C,P$)|0;var n$=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(n$>>>26)|0,n$&=67108863,K=Math.imul(d,L$),O=Math.imul(d,Z$),O=O+Math.imul(s,L$)|0,z=Math.imul(s,Z$),K=K+Math.imul(i,M$)|0,O=O+Math.imul(i,C$)|0,O=O+Math.imul(b,M$)|0,z=z+Math.imul(b,C$)|0,K=K+Math.imul(u,_$)|0,O=O+Math.imul(u,P$)|0,O=O+Math.imul(n,_$)|0,z=z+Math.imul(n,P$)|0,K=K+Math.imul(M,j$)|0,O=O+Math.imul(M,q$)|0,O=O+Math.imul(C,j$)|0,z=z+Math.imul(C,q$)|0;var v0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(v0>>>26)|0,v0&=67108863,K=Math.imul(f,L$),O=Math.imul(f,Z$),O=O+Math.imul(h,L$)|0,z=Math.imul(h,Z$),K=K+Math.imul(d,M$)|0,O=O+Math.imul(d,C$)|0,O=O+Math.imul(s,M$)|0,z=z+Math.imul(s,C$)|0,K=K+Math.imul(i,_$)|0,O=O+Math.imul(i,P$)|0,O=O+Math.imul(b,_$)|0,z=z+Math.imul(b,P$)|0,K=K+Math.imul(u,j$)|0,O=O+Math.imul(u,q$)|0,O=O+Math.imul(n,j$)|0,z=z+Math.imul(n,q$)|0,K=K+Math.imul(M,N$)|0,O=O+Math.imul(M,B$)|0,O=O+Math.imul(C,N$)|0,z=z+Math.imul(C,B$)|0;var $0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+($0>>>26)|0,$0&=67108863,K=Math.imul(t,L$),O=Math.imul(t,Z$),O=O+Math.imul(a,L$)|0,z=Math.imul(a,Z$),K=K+Math.imul(f,M$)|0,O=O+Math.imul(f,C$)|0,O=O+Math.imul(h,M$)|0,z=z+Math.imul(h,C$)|0,K=K+Math.imul(d,_$)|0,O=O+Math.imul(d,P$)|0,O=O+Math.imul(s,_$)|0,z=z+Math.imul(s,P$)|0,K=K+Math.imul(i,j$)|0,O=O+Math.imul(i,q$)|0,O=O+Math.imul(b,j$)|0,z=z+Math.imul(b,q$)|0,K=K+Math.imul(u,N$)|0,O=O+Math.imul(u,B$)|0,O=O+Math.imul(n,N$)|0,z=z+Math.imul(n,B$)|0,K=K+Math.imul(M,R$)|0,O=O+Math.imul(M,x)|0,O=O+Math.imul(C,R$)|0,z=z+Math.imul(C,x)|0;var K0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(K0>>>26)|0,K0&=67108863,K=Math.imul(y,L$),O=Math.imul(y,Z$),O=O+Math.imul(o,L$)|0,z=Math.imul(o,Z$),K=K+Math.imul(t,M$)|0,O=O+Math.imul(t,C$)|0,O=O+Math.imul(a,M$)|0,z=z+Math.imul(a,C$)|0,K=K+Math.imul(f,_$)|0,O=O+Math.imul(f,P$)|0,O=O+Math.imul(h,_$)|0,z=z+Math.imul(h,P$)|0,K=K+Math.imul(d,j$)|0,O=O+Math.imul(d,q$)|0,O=O+Math.imul(s,j$)|0,z=z+Math.imul(s,q$)|0,K=K+Math.imul(i,N$)|0,O=O+Math.imul(i,B$)|0,O=O+Math.imul(b,N$)|0,z=z+Math.imul(b,B$)|0,K=K+Math.imul(u,R$)|0,O=O+Math.imul(u,x)|0,O=O+Math.imul(n,R$)|0,z=z+Math.imul(n,x)|0,K=K+Math.imul(M,e)|0,O=O+Math.imul(M,U$)|0,O=O+Math.imul(C,e)|0,z=z+Math.imul(C,U$)|0;var z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(z0>>>26)|0,z0&=67108863,K=Math.imul(m,L$),O=Math.imul(m,Z$),O=O+Math.imul(v$,L$)|0,z=Math.imul(v$,Z$),K=K+Math.imul(y,M$)|0,O=O+Math.imul(y,C$)|0,O=O+Math.imul(o,M$)|0,z=z+Math.imul(o,C$)|0,K=K+Math.imul(t,_$)|0,O=O+Math.imul(t,P$)|0,O=O+Math.imul(a,_$)|0,z=z+Math.imul(a,P$)|0,K=K+Math.imul(f,j$)|0,O=O+Math.imul(f,q$)|0,O=O+Math.imul(h,j$)|0,z=z+Math.imul(h,q$)|0,K=K+Math.imul(d,N$)|0,O=O+Math.imul(d,B$)|0,O=O+Math.imul(s,N$)|0,z=z+Math.imul(s,B$)|0,K=K+Math.imul(i,R$)|0,O=O+Math.imul(i,x)|0,O=O+Math.imul(b,R$)|0,z=z+Math.imul(b,x)|0,K=K+Math.imul(u,e)|0,O=O+Math.imul(u,U$)|0,O=O+Math.imul(n,e)|0,z=z+Math.imul(n,U$)|0,K=K+Math.imul(M,z$)|0,O=O+Math.imul(M,H$)|0,O=O+Math.imul(C,z$)|0,z=z+Math.imul(C,H$)|0;var S0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(S0>>>26)|0,S0&=67108863,K=Math.imul(S$,L$),O=Math.imul(S$,Z$),O=O+Math.imul(A$,L$)|0,z=Math.imul(A$,Z$),K=K+Math.imul(m,M$)|0,O=O+Math.imul(m,C$)|0,O=O+Math.imul(v$,M$)|0,z=z+Math.imul(v$,C$)|0,K=K+Math.imul(y,_$)|0,O=O+Math.imul(y,P$)|0,O=O+Math.imul(o,_$)|0,z=z+Math.imul(o,P$)|0,K=K+Math.imul(t,j$)|0,O=O+Math.imul(t,q$)|0,O=O+Math.imul(a,j$)|0,z=z+Math.imul(a,q$)|0,K=K+Math.imul(f,N$)|0,O=O+Math.imul(f,B$)|0,O=O+Math.imul(h,N$)|0,z=z+Math.imul(h,B$)|0,K=K+Math.imul(d,R$)|0,O=O+Math.imul(d,x)|0,O=O+Math.imul(s,R$)|0,z=z+Math.imul(s,x)|0,K=K+Math.imul(i,e)|0,O=O+Math.imul(i,U$)|0,O=O+Math.imul(b,e)|0,z=z+Math.imul(b,U$)|0,K=K+Math.imul(u,z$)|0,O=O+Math.imul(u,H$)|0,O=O+Math.imul(n,z$)|0,z=z+Math.imul(n,H$)|0,K=K+Math.imul(M,g$)|0,O=O+Math.imul(M,x$)|0,O=O+Math.imul(C,g$)|0,z=z+Math.imul(C,x$)|0;var A0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(A0>>>26)|0,A0&=67108863,K=Math.imul(K$,L$),O=Math.imul(K$,Z$),O=O+Math.imul(F$,L$)|0,z=Math.imul(F$,Z$),K=K+Math.imul(S$,M$)|0,O=O+Math.imul(S$,C$)|0,O=O+Math.imul(A$,M$)|0,z=z+Math.imul(A$,C$)|0,K=K+Math.imul(m,_$)|0,O=O+Math.imul(m,P$)|0,O=O+Math.imul(v$,_$)|0,z=z+Math.imul(v$,P$)|0,K=K+Math.imul(y,j$)|0,O=O+Math.imul(y,q$)|0,O=O+Math.imul(o,j$)|0,z=z+Math.imul(o,q$)|0,K=K+Math.imul(t,N$)|0,O=O+Math.imul(t,B$)|0,O=O+Math.imul(a,N$)|0,z=z+Math.imul(a,B$)|0,K=K+Math.imul(f,R$)|0,O=O+Math.imul(f,x)|0,O=O+Math.imul(h,R$)|0,z=z+Math.imul(h,x)|0,K=K+Math.imul(d,e)|0,O=O+Math.imul(d,U$)|0,O=O+Math.imul(s,e)|0,z=z+Math.imul(s,U$)|0,K=K+Math.imul(i,z$)|0,O=O+Math.imul(i,H$)|0,O=O+Math.imul(b,z$)|0,z=z+Math.imul(b,H$)|0,K=K+Math.imul(u,g$)|0,O=O+Math.imul(u,x$)|0,O=O+Math.imul(n,g$)|0,z=z+Math.imul(n,x$)|0,K=K+Math.imul(M,k$)|0,O=O+Math.imul(M,E$)|0,O=O+Math.imul(C,k$)|0,z=z+Math.imul(C,E$)|0;var F0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(F0>>>26)|0,F0&=67108863,K=Math.imul(K$,M$),O=Math.imul(K$,C$),O=O+Math.imul(F$,M$)|0,z=Math.imul(F$,C$),K=K+Math.imul(S$,_$)|0,O=O+Math.imul(S$,P$)|0,O=O+Math.imul(A$,_$)|0,z=z+Math.imul(A$,P$)|0,K=K+Math.imul(m,j$)|0,O=O+Math.imul(m,q$)|0,O=O+Math.imul(v$,j$)|0,z=z+Math.imul(v$,q$)|0,K=K+Math.imul(y,N$)|0,O=O+Math.imul(y,B$)|0,O=O+Math.imul(o,N$)|0,z=z+Math.imul(o,B$)|0,K=K+Math.imul(t,R$)|0,O=O+Math.imul(t,x)|0,O=O+Math.imul(a,R$)|0,z=z+Math.imul(a,x)|0,K=K+Math.imul(f,e)|0,O=O+Math.imul(f,U$)|0,O=O+Math.imul(h,e)|0,z=z+Math.imul(h,U$)|0,K=K+Math.imul(d,z$)|0,O=O+Math.imul(d,H$)|0,O=O+Math.imul(s,z$)|0,z=z+Math.imul(s,H$)|0,K=K+Math.imul(i,g$)|0,O=O+Math.imul(i,x$)|0,O=O+Math.imul(b,g$)|0,z=z+Math.imul(b,x$)|0,K=K+Math.imul(u,k$)|0,O=O+Math.imul(u,E$)|0,O=O+Math.imul(n,k$)|0,z=z+Math.imul(n,E$)|0;var H0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(H0>>>26)|0,H0&=67108863,K=Math.imul(K$,_$),O=Math.imul(K$,P$),O=O+Math.imul(F$,_$)|0,z=Math.imul(F$,P$),K=K+Math.imul(S$,j$)|0,O=O+Math.imul(S$,q$)|0,O=O+Math.imul(A$,j$)|0,z=z+Math.imul(A$,q$)|0,K=K+Math.imul(m,N$)|0,O=O+Math.imul(m,B$)|0,O=O+Math.imul(v$,N$)|0,z=z+Math.imul(v$,B$)|0,K=K+Math.imul(y,R$)|0,O=O+Math.imul(y,x)|0,O=O+Math.imul(o,R$)|0,z=z+Math.imul(o,x)|0,K=K+Math.imul(t,e)|0,O=O+Math.imul(t,U$)|0,O=O+Math.imul(a,e)|0,z=z+Math.imul(a,U$)|0,K=K+Math.imul(f,z$)|0,O=O+Math.imul(f,H$)|0,O=O+Math.imul(h,z$)|0,z=z+Math.imul(h,H$)|0,K=K+Math.imul(d,g$)|0,O=O+Math.imul(d,x$)|0,O=O+Math.imul(s,g$)|0,z=z+Math.imul(s,x$)|0,K=K+Math.imul(i,k$)|0,O=O+Math.imul(i,E$)|0,O=O+Math.imul(b,k$)|0,z=z+Math.imul(b,E$)|0;var Z0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,K=Math.imul(K$,j$),O=Math.imul(K$,q$),O=O+Math.imul(F$,j$)|0,z=Math.imul(F$,q$),K=K+Math.imul(S$,N$)|0,O=O+Math.imul(S$,B$)|0,O=O+Math.imul(A$,N$)|0,z=z+Math.imul(A$,B$)|0,K=K+Math.imul(m,R$)|0,O=O+Math.imul(m,x)|0,O=O+Math.imul(v$,R$)|0,z=z+Math.imul(v$,x)|0,K=K+Math.imul(y,e)|0,O=O+Math.imul(y,U$)|0,O=O+Math.imul(o,e)|0,z=z+Math.imul(o,U$)|0,K=K+Math.imul(t,z$)|0,O=O+Math.imul(t,H$)|0,O=O+Math.imul(a,z$)|0,z=z+Math.imul(a,H$)|0,K=K+Math.imul(f,g$)|0,O=O+Math.imul(f,x$)|0,O=O+Math.imul(h,g$)|0,z=z+Math.imul(h,x$)|0,K=K+Math.imul(d,k$)|0,O=O+Math.imul(d,E$)|0,O=O+Math.imul(s,k$)|0,z=z+Math.imul(s,E$)|0;var L0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(L0>>>26)|0,L0&=67108863,K=Math.imul(K$,N$),O=Math.imul(K$,B$),O=O+Math.imul(F$,N$)|0,z=Math.imul(F$,B$),K=K+Math.imul(S$,R$)|0,O=O+Math.imul(S$,x)|0,O=O+Math.imul(A$,R$)|0,z=z+Math.imul(A$,x)|0,K=K+Math.imul(m,e)|0,O=O+Math.imul(m,U$)|0,O=O+Math.imul(v$,e)|0,z=z+Math.imul(v$,U$)|0,K=K+Math.imul(y,z$)|0,O=O+Math.imul(y,H$)|0,O=O+Math.imul(o,z$)|0,z=z+Math.imul(o,H$)|0,K=K+Math.imul(t,g$)|0,O=O+Math.imul(t,x$)|0,O=O+Math.imul(a,g$)|0,z=z+Math.imul(a,x$)|0,K=K+Math.imul(f,k$)|0,O=O+Math.imul(f,E$)|0,O=O+Math.imul(h,k$)|0,z=z+Math.imul(h,E$)|0;var E0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(E0>>>26)|0,E0&=67108863,K=Math.imul(K$,R$),O=Math.imul(K$,x),O=O+Math.imul(F$,R$)|0,z=Math.imul(F$,x),K=K+Math.imul(S$,e)|0,O=O+Math.imul(S$,U$)|0,O=O+Math.imul(A$,e)|0,z=z+Math.imul(A$,U$)|0,K=K+Math.imul(m,z$)|0,O=O+Math.imul(m,H$)|0,O=O+Math.imul(v$,z$)|0,z=z+Math.imul(v$,H$)|0,K=K+Math.imul(y,g$)|0,O=O+Math.imul(y,x$)|0,O=O+Math.imul(o,g$)|0,z=z+Math.imul(o,x$)|0,K=K+Math.imul(t,k$)|0,O=O+Math.imul(t,E$)|0,O=O+Math.imul(a,k$)|0,z=z+Math.imul(a,E$)|0;var T0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(T0>>>26)|0,T0&=67108863,K=Math.imul(K$,e),O=Math.imul(K$,U$),O=O+Math.imul(F$,e)|0,z=Math.imul(F$,U$),K=K+Math.imul(S$,z$)|0,O=O+Math.imul(S$,H$)|0,O=O+Math.imul(A$,z$)|0,z=z+Math.imul(A$,H$)|0,K=K+Math.imul(m,g$)|0,O=O+Math.imul(m,x$)|0,O=O+Math.imul(v$,g$)|0,z=z+Math.imul(v$,x$)|0,K=K+Math.imul(y,k$)|0,O=O+Math.imul(y,E$)|0,O=O+Math.imul(o,k$)|0,z=z+Math.imul(o,E$)|0;var M0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(M0>>>26)|0,M0&=67108863,K=Math.imul(K$,z$),O=Math.imul(K$,H$),O=O+Math.imul(F$,z$)|0,z=Math.imul(F$,H$),K=K+Math.imul(S$,g$)|0,O=O+Math.imul(S$,x$)|0,O=O+Math.imul(A$,g$)|0,z=z+Math.imul(A$,x$)|0,K=K+Math.imul(m,k$)|0,O=O+Math.imul(m,E$)|0,O=O+Math.imul(v$,k$)|0,z=z+Math.imul(v$,E$)|0;var P0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(P0>>>26)|0,P0&=67108863,K=Math.imul(K$,g$),O=Math.imul(K$,x$),O=O+Math.imul(F$,g$)|0,z=Math.imul(F$,x$),K=K+Math.imul(S$,k$)|0,O=O+Math.imul(S$,E$)|0,O=O+Math.imul(A$,k$)|0,z=z+Math.imul(A$,E$)|0;var q0=(H+K|0)+((O&8191)<<13)|0;H=(z+(O>>>13)|0)+(q0>>>26)|0,q0&=67108863,K=Math.imul(K$,k$),O=Math.imul(K$,E$),O=O+Math.imul(F$,k$)|0,z=Math.imul(F$,E$);var R0=(H+K|0)+((O&8191)<<13)|0;if(H=(z+(O>>>13)|0)+(R0>>>26)|0,R0&=67108863,S[0]=Y0,S[1]=m$,S[2]=n$,S[3]=v0,S[4]=$0,S[5]=K0,S[6]=z0,S[7]=S0,S[8]=A0,S[9]=F0,S[10]=H0,S[11]=Z0,S[12]=L0,S[13]=E0,S[14]=T0,S[15]=M0,S[16]=P0,S[17]=q0,S[18]=R0,H!==0)S[19]=H,W.length++;return W};if(!Math.imul)g=k;function j(v,G,W){W.negative=G.negative^v.negative,W.length=v.length+G.length;var Y=0,V=0;for(var S=0;S<W.length-1;S++){var H=V;V=0;var K=Y&67108863,O=Math.min(S,G.length-1);for(var z=Math.max(0,S-v.length+1);z<=O;z++){var q=S-z,M=v.words[q]|0,C=G.words[z]|0,w=M*C,u=w&67108863;H=H+(w/67108864|0)|0,u=u+K|0,K=u&67108863,H=H+(u>>>26)|0,V+=H>>>26,H&=67108863}W.words[S]=K,Y=H,H=V}if(Y!==0)W.words[S]=Y;else W.length--;return W.strip()}function _(v,G,W){var Y=new N;return Y.mulp(v,G,W)}J.prototype.mulTo=function(v,G){var W,Y=this.length+v.length;if(this.length===10&&v.length===10)W=g(this,v,G);else if(Y<63)W=k(this,v,G);else if(Y<1024)W=j(this,v,G);else W=_(this,v,G);return W};function N(v,G){this.x=v,this.y=G}N.prototype.makeRBT=function(v){var G=Array(v),W=J.prototype._countBits(v)-1;for(var Y=0;Y<v;Y++)G[Y]=this.revBin(Y,W,v);return G},N.prototype.revBin=function(v,G,W){if(v===0||v===W-1)return v;var Y=0;for(var V=0;V<G;V++)Y|=(v&1)<<G-V-1,v>>=1;return Y},N.prototype.permute=function(v,G,W,Y,V,S){for(var H=0;H<S;H++)Y[H]=G[v[H]],V[H]=W[v[H]]},N.prototype.transform=function(v,G,W,Y,V,S){this.permute(S,v,G,W,Y,V);for(var H=1;H<V;H<<=1){var K=H<<1,O=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K);for(var q=0;q<V;q+=K){var M=O,C=z;for(var w=0;w<H;w++){var u=W[q+w],n=Y[q+w],W$=W[q+w+H],i=Y[q+w+H],b=M*W$-C*i;if(i=M*i+C*W$,W$=b,W[q+w]=u+W$,Y[q+w]=n+i,W[q+w+H]=u-W$,Y[q+w+H]=n-i,w!==K)b=O*M-z*C,C=O*C+z*M,M=b}}}},N.prototype.guessLen13b=function(v,G){var W=Math.max(G,v)|1,Y=W&1,V=0;for(W=W/2|0;W;W=W>>>1)V++;return 1<<V+1+Y},N.prototype.conjugate=function(v,G,W){if(W<=1)return;for(var Y=0;Y<W/2;Y++){var V=v[Y];v[Y]=v[W-Y-1],v[W-Y-1]=V,V=G[Y],G[Y]=-G[W-Y-1],G[W-Y-1]=-V}},N.prototype.normalize13b=function(v,G){var W=0;for(var Y=0;Y<G/2;Y++){var V=Math.round(v[2*Y+1]/G)*8192+Math.round(v[2*Y]/G)+W;if(v[Y]=V&67108863,V<67108864)W=0;else W=V/67108864|0}return v},N.prototype.convert13b=function(v,G,W,Y){var V=0;for(var S=0;S<G;S++)V=V+(v[S]|0),W[2*S]=V&8191,V=V>>>13,W[2*S+1]=V&8191,V=V>>>13;for(S=2*G;S<Y;++S)W[S]=0;U(V===0),U((V&-8192)===0)},N.prototype.stub=function(v){var G=Array(v);for(var W=0;W<v;W++)G[W]=0;return G},N.prototype.mulp=function(v,G,W){var Y=2*this.guessLen13b(v.length,G.length),V=this.makeRBT(Y),S=this.stub(Y),H=Array(Y),K=Array(Y),O=Array(Y),z=Array(Y),q=Array(Y),M=Array(Y),C=W.words;C.length=Y,this.convert13b(v.words,v.length,H,Y),this.convert13b(G.words,G.length,z,Y),this.transform(H,S,K,O,Y,V),this.transform(z,S,q,M,Y,V);for(var w=0;w<Y;w++){var u=K[w]*q[w]-O[w]*M[w];O[w]=K[w]*M[w]+O[w]*q[w],K[w]=u}return this.conjugate(K,O,Y),this.transform(K,O,C,S,Y,V),this.conjugate(C,S,Y),this.normalize13b(C,Y),W.negative=v.negative^G.negative,W.length=v.length+G.length,W.strip()},J.prototype.mul=function(v){var G=new J(null);return G.words=Array(this.length+v.length),this.mulTo(v,G)},J.prototype.mulf=function(v){var G=new J(null);return G.words=Array(this.length+v.length),_(this,v,G)},J.prototype.imul=function(v){return this.clone().mulTo(v,this)},J.prototype.imuln=function(v){U(typeof v==="number"),U(v<67108864);var G=0;for(var W=0;W<this.length;W++){var Y=(this.words[W]|0)*v,V=(Y&67108863)+(G&67108863);G>>=26,G+=Y/67108864|0,G+=V>>>26,this.words[W]=V&67108863}if(G!==0)this.words[W]=G,this.length++;return this.length=v===0?1:this.length,this},J.prototype.muln=function(v){return this.clone().imuln(v)},J.prototype.sqr=function(){return this.mul(this)},J.prototype.isqr=function(){return this.imul(this.clone())},J.prototype.pow=function(v){var G=R(v);if(G.length===0)return new J(1);var W=this;for(var Y=0;Y<G.length;Y++,W=W.sqr())if(G[Y]!==0)break;if(++Y<G.length)for(var V=W.sqr();Y<G.length;Y++,V=V.sqr()){if(G[Y]===0)continue;W=W.mul(V)}return W},J.prototype.iushln=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=67108863>>>26-G<<26-G,V;if(G!==0){var S=0;for(V=0;V<this.length;V++){var H=this.words[V]&Y,K=(this.words[V]|0)-H<<G;this.words[V]=K|S,S=H>>>26-G}if(S)this.words[V]=S,this.length++}if(W!==0){for(V=this.length-1;V>=0;V--)this.words[V+W]=this.words[V];for(V=0;V<W;V++)this.words[V]=0;this.length+=W}return this.strip()},J.prototype.ishln=function(v){return U(this.negative===0),this.iushln(v)},J.prototype.iushrn=function(v,G,W){U(typeof v==="number"&&v>=0);var Y;if(G)Y=(G-G%26)/26;else Y=0;var V=v%26,S=Math.min((v-V)/26,this.length),H=67108863^67108863>>>V<<V,K=W;if(Y-=S,Y=Math.max(0,Y),K){for(var O=0;O<S;O++)K.words[O]=this.words[O];K.length=S}if(S===0);else if(this.length>S){this.length-=S;for(O=0;O<this.length;O++)this.words[O]=this.words[O+S]}else this.words[0]=0,this.length=1;var z=0;for(O=this.length-1;O>=0&&(z!==0||O>=Y);O--){var q=this.words[O]|0;this.words[O]=z<<26-V|q>>>V,z=q&H}if(K&&z!==0)K.words[K.length++]=z;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},J.prototype.ishrn=function(v,G,W){return U(this.negative===0),this.iushrn(v,G,W)},J.prototype.shln=function(v){return this.clone().ishln(v)},J.prototype.ushln=function(v){return this.clone().iushln(v)},J.prototype.shrn=function(v){return this.clone().ishrn(v)},J.prototype.ushrn=function(v){return this.clone().iushrn(v)},J.prototype.testn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return!1;var V=this.words[W];return!!(V&Y)},J.prototype.imaskn=function(v){U(typeof v==="number"&&v>=0);var G=v%26,W=(v-G)/26;if(U(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(G!==0)W++;if(this.length=Math.min(W,this.length),G!==0){var Y=67108863^67108863>>>G<<G;this.words[this.length-1]&=Y}return this.strip()},J.prototype.maskn=function(v){return this.clone().imaskn(v)},J.prototype.iaddn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.isubn(-v);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<v)return this.words[0]=v-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(v),this.negative=1,this}return this._iaddn(v)},J.prototype._iaddn=function(v){this.words[0]+=v;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)if(this.words[G]-=67108864,G===this.length-1)this.words[G+1]=1;else this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},J.prototype.isubn=function(v){if(U(typeof v==="number"),U(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},J.prototype.addn=function(v){return this.clone().iaddn(v)},J.prototype.subn=function(v){return this.clone().isubn(v)},J.prototype.iabs=function(){return this.negative=0,this},J.prototype.abs=function(){return this.clone().iabs()},J.prototype._ishlnsubmul=function(v,G,W){var Y=v.length+W,V;this._expand(Y);var S,H=0;for(V=0;V<v.length;V++){S=(this.words[V+W]|0)+H;var K=(v.words[V]|0)*G;S-=K&67108863,H=(S>>26)-(K/67108864|0),this.words[V+W]=S&67108863}for(;V<this.length-W;V++)S=(this.words[V+W]|0)+H,H=S>>26,this.words[V+W]=S&67108863;if(H===0)return this.strip();U(H===-1),H=0;for(V=0;V<this.length;V++)S=-(this.words[V]|0)+H,H=S>>26,this.words[V]=S&67108863;return this.negative=1,this.strip()},J.prototype._wordDiv=function(v,G){var W=this.length-v.length,Y=this.clone(),V=v,S=V.words[V.length-1]|0,H=this._countBits(S);if(W=26-H,W!==0)V=V.ushln(W),Y.iushln(W),S=V.words[V.length-1]|0;var K=Y.length-V.length,O;if(G!=="mod"){O=new J(null),O.length=K+1,O.words=Array(O.length);for(var z=0;z<O.length;z++)O.words[z]=0}var q=Y.clone()._ishlnsubmul(V,1,K);if(q.negative===0){if(Y=q,O)O.words[K]=1}for(var M=K-1;M>=0;M--){var C=(Y.words[V.length+M]|0)*67108864+(Y.words[V.length+M-1]|0);C=Math.min(C/S|0,67108863),Y._ishlnsubmul(V,C,M);while(Y.negative!==0)if(C--,Y.negative=0,Y._ishlnsubmul(V,1,M),!Y.isZero())Y.negative^=1;if(O)O.words[M]=C}if(O)O.strip();if(Y.strip(),G!=="div"&&W!==0)Y.iushrn(W);return{div:O||null,mod:Y}},J.prototype.divmod=function(v,G,W){if(U(!v.isZero()),this.isZero())return{div:new J(0),mod:new J(0)};var Y,V,S;if(this.negative!==0&&v.negative===0){if(S=this.neg().divmod(v,G),G!=="mod")Y=S.div.neg();if(G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.iadd(v)}return{div:Y,mod:V}}if(this.negative===0&&v.negative!==0){if(S=this.divmod(v.neg(),G),G!=="mod")Y=S.div.neg();return{div:Y,mod:S.mod}}if((this.negative&v.negative)!==0){if(S=this.neg().divmod(v.neg(),G),G!=="div"){if(V=S.mod.neg(),W&&V.negative!==0)V.isub(v)}return{div:S.div,mod:V}}if(v.length>this.length||this.cmp(v)<0)return{div:new J(0),mod:this};if(v.length===1){if(G==="div")return{div:this.divn(v.words[0]),mod:null};if(G==="mod")return{div:null,mod:new J(this.modn(v.words[0]))};return{div:this.divn(v.words[0]),mod:new J(this.modn(v.words[0]))}}return this._wordDiv(v,G)},J.prototype.div=function(v){return this.divmod(v,"div",!1).div},J.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},J.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},J.prototype.divRound=function(v){var G=this.divmod(v);if(G.mod.isZero())return G.div;var W=G.div.negative!==0?G.mod.isub(v):G.mod,Y=v.ushrn(1),V=v.andln(1),S=W.cmp(Y);if(S<0||V===1&&S===0)return G.div;return G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},J.prototype.modn=function(v){U(v<=67108863);var G=67108864%v,W=0;for(var Y=this.length-1;Y>=0;Y--)W=(G*W+(this.words[Y]|0))%v;return W},J.prototype.idivn=function(v){U(v<=67108863);var G=0;for(var W=this.length-1;W>=0;W--){var Y=(this.words[W]|0)+G*67108864;this.words[W]=Y/v|0,G=Y%v}return this.strip()},J.prototype.divn=function(v){return this.clone().idivn(v)},J.prototype.egcd=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=new J(0),H=new J(1),K=0;while(G.isEven()&&W.isEven())G.iushrn(1),W.iushrn(1),++K;var O=W.clone(),z=G.clone();while(!G.isZero()){for(var q=0,M=1;(G.words[0]&M)===0&&q<26;++q,M<<=1);if(q>0){G.iushrn(q);while(q-- >0){if(Y.isOdd()||V.isOdd())Y.iadd(O),V.isub(z);Y.iushrn(1),V.iushrn(1)}}for(var C=0,w=1;(W.words[0]&w)===0&&C<26;++C,w<<=1);if(C>0){W.iushrn(C);while(C-- >0){if(S.isOdd()||H.isOdd())S.iadd(O),H.isub(z);S.iushrn(1),H.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(S),V.isub(H);else W.isub(G),S.isub(Y),H.isub(V)}return{a:S,b:H,gcd:W.iushln(K)}},J.prototype._invmp=function(v){U(v.negative===0),U(!v.isZero());var G=this,W=v.clone();if(G.negative!==0)G=G.umod(v);else G=G.clone();var Y=new J(1),V=new J(0),S=W.clone();while(G.cmpn(1)>0&&W.cmpn(1)>0){for(var H=0,K=1;(G.words[0]&K)===0&&H<26;++H,K<<=1);if(H>0){G.iushrn(H);while(H-- >0){if(Y.isOdd())Y.iadd(S);Y.iushrn(1)}}for(var O=0,z=1;(W.words[0]&z)===0&&O<26;++O,z<<=1);if(O>0){W.iushrn(O);while(O-- >0){if(V.isOdd())V.iadd(S);V.iushrn(1)}}if(G.cmp(W)>=0)G.isub(W),Y.isub(V);else W.isub(G),V.isub(Y)}var q;if(G.cmpn(1)===0)q=Y;else q=V;if(q.cmpn(0)<0)q.iadd(v);return q},J.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var G=this.clone(),W=v.clone();G.negative=0,W.negative=0;for(var Y=0;G.isEven()&&W.isEven();Y++)G.iushrn(1),W.iushrn(1);do{while(G.isEven())G.iushrn(1);while(W.isEven())W.iushrn(1);var V=G.cmp(W);if(V<0){var S=G;G=W,W=S}else if(V===0||W.cmpn(1)===0)break;G.isub(W)}while(!0);return W.iushln(Y)},J.prototype.invm=function(v){return this.egcd(v).a.umod(v)},J.prototype.isEven=function(){return(this.words[0]&1)===0},J.prototype.isOdd=function(){return(this.words[0]&1)===1},J.prototype.andln=function(v){return this.words[0]&v},J.prototype.bincn=function(v){U(typeof v==="number");var G=v%26,W=(v-G)/26,Y=1<<G;if(this.length<=W)return this._expand(W+1),this.words[W]|=Y,this;var V=Y;for(var S=W;V!==0&&S<this.length;S++){var H=this.words[S]|0;H+=V,V=H>>>26,H&=67108863,this.words[S]=H}if(V!==0)this.words[S]=V,this.length++;return this},J.prototype.isZero=function(){return this.length===1&&this.words[0]===0},J.prototype.cmpn=function(v){var G=v<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var W;if(this.length>1)W=1;else{if(G)v=-v;U(v<=67108863,"Number is too big");var Y=this.words[0]|0;W=Y===v?0:Y<v?-1:1}if(this.negative!==0)return-W|0;return W},J.prototype.cmp=function(v){if(this.negative!==0&&v.negative===0)return-1;if(this.negative===0&&v.negative!==0)return 1;var G=this.ucmp(v);if(this.negative!==0)return-G|0;return G},J.prototype.ucmp=function(v){if(this.length>v.length)return 1;if(this.length<v.length)return-1;var G=0;for(var W=this.length-1;W>=0;W--){var Y=this.words[W]|0,V=v.words[W]|0;if(Y===V)continue;if(Y<V)G=-1;else if(Y>V)G=1;break}return G},J.prototype.gtn=function(v){return this.cmpn(v)===1},J.prototype.gt=function(v){return this.cmp(v)===1},J.prototype.gten=function(v){return this.cmpn(v)>=0},J.prototype.gte=function(v){return this.cmp(v)>=0},J.prototype.ltn=function(v){return this.cmpn(v)===-1},J.prototype.lt=function(v){return this.cmp(v)===-1},J.prototype.lten=function(v){return this.cmpn(v)<=0},J.prototype.lte=function(v){return this.cmp(v)<=0},J.prototype.eqn=function(v){return this.cmpn(v)===0},J.prototype.eq=function(v){return this.cmp(v)===0},J.red=function(v){return new p(v)},J.prototype.toRed=function(v){return U(!this.red,"Already a number in reduction context"),U(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},J.prototype.fromRed=function(){return U(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},J.prototype._forceRed=function(v){return this.red=v,this},J.prototype.forceRed=function(v){return U(!this.red,"Already a number in reduction context"),this._forceRed(v)},J.prototype.redAdd=function(v){return U(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},J.prototype.redIAdd=function(v){return U(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},J.prototype.redSub=function(v){return U(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},J.prototype.redISub=function(v){return U(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},J.prototype.redShl=function(v){return U(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},J.prototype.redMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},J.prototype.redIMul=function(v){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},J.prototype.redSqr=function(){return U(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},J.prototype.redISqr=function(){return U(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},J.prototype.redSqrt=function(){return U(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},J.prototype.redInvm=function(){return U(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},J.prototype.redNeg=function(){return U(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},J.prototype.redPow=function(v){return U(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var B={k256:null,p224:null,p192:null,p25519:null};function c(v,G){this.name=v,this.p=new J(G,16),this.n=this.p.bitLength(),this.k=new J(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var v=new J(null);return v.words=Array(Math.ceil(this.n/13)),v},c.prototype.ireduce=function(v){var G=v,W;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),W=G.bitLength();while(W>this.n);var Y=W<this.n?-1:G.ucmp(this.p);if(Y===0)G.words[0]=0,G.length=1;else if(Y>0)G.isub(this.p);else if(G.strip!==void 0)G.strip();else G._strip();return G},c.prototype.split=function(v,G){v.iushrn(this.n,0,G)},c.prototype.imulK=function(v){return v.imul(this.k)};function r(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Q(r,c),r.prototype.split=function(v,G){var W=4194303,Y=Math.min(v.length,9);for(var V=0;V<Y;V++)G.words[V]=v.words[V];if(G.length=Y,v.length<=9){v.words[0]=0,v.length=1;return}var S=v.words[9];G.words[G.length++]=S&W;for(V=10;V<v.length;V++){var H=v.words[V]|0;v.words[V-10]=(H&W)<<4|S>>>22,S=H}if(S>>>=22,v.words[V-10]=S,S===0&&v.length>10)v.length-=10;else v.length-=9},r.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;var G=0;for(var W=0;W<v.length;W++){var Y=v.words[W]|0;G+=Y*977,v.words[W]=G&67108863,G=Y*64+(G/67108864|0)}if(v.words[v.length-1]===0){if(v.length--,v.words[v.length-1]===0)v.length--}return v};function J$(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Q(J$,c);function G$(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Q(G$,c);function X$(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Q(X$,c),X$.prototype.imulK=function(v){var G=0;for(var W=0;W<v.length;W++){var Y=(v.words[W]|0)*19+G,V=Y&67108863;Y>>>=26,v.words[W]=V,G=Y}if(G!==0)v.words[v.length++]=G;return v},J._prime=function(v){if(B[v])return B[v];var G;if(v==="k256")G=new r;else if(v==="p224")G=new J$;else if(v==="p192")G=new G$;else if(v==="p25519")G=new X$;else throw Error("Unknown prime "+v);return B[v]=G,G};function p(v){if(typeof v==="string"){var G=J._prime(v);this.m=G.p,this.prime=G}else U(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}p.prototype._verify1=function(v){U(v.negative===0,"red works only with positives"),U(v.red,"red works only with red numbers")},p.prototype._verify2=function(v,G){U((v.negative|G.negative)===0,"red works only with positives"),U(v.red&&v.red===G.red,"red works only with red numbers")},p.prototype.imod=function(v){if(this.prime)return this.prime.ireduce(v)._forceRed(this);return v.umod(this.m)._forceRed(this)},p.prototype.neg=function(v){if(v.isZero())return v.clone();return this.m.sub(v)._forceRed(this)},p.prototype.add=function(v,G){this._verify2(v,G);var W=v.add(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W._forceRed(this)},p.prototype.iadd=function(v,G){this._verify2(v,G);var W=v.iadd(G);if(W.cmp(this.m)>=0)W.isub(this.m);return W},p.prototype.sub=function(v,G){this._verify2(v,G);var W=v.sub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W._forceRed(this)},p.prototype.isub=function(v,G){this._verify2(v,G);var W=v.isub(G);if(W.cmpn(0)<0)W.iadd(this.m);return W},p.prototype.shl=function(v,G){return this._verify1(v),this.imod(v.ushln(G))},p.prototype.imul=function(v,G){return this._verify2(v,G),this.imod(v.imul(G))},p.prototype.mul=function(v,G){return this._verify2(v,G),this.imod(v.mul(G))},p.prototype.isqr=function(v){return this.imul(v,v.clone())},p.prototype.sqr=function(v){return this.mul(v,v)},p.prototype.sqrt=function(v){if(v.isZero())return v.clone();var G=this.m.andln(3);if(U(G%2===1),G===3){var W=this.m.add(new J(1)).iushrn(2);return this.pow(v,W)}var Y=this.m.subn(1),V=0;while(!Y.isZero()&&Y.andln(1)===0)V++,Y.iushrn(1);U(!Y.isZero());var S=new J(1).toRed(this),H=S.redNeg(),K=this.m.subn(1).iushrn(1),O=this.m.bitLength();O=new J(2*O*O).toRed(this);while(this.pow(O,K).cmp(H)!==0)O.redIAdd(H);var z=this.pow(O,Y),q=this.pow(v,Y.addn(1).iushrn(1)),M=this.pow(v,Y),C=V;while(M.cmp(S)!==0){var w=M;for(var u=0;w.cmp(S)!==0;u++)w=w.redSqr();U(u<C);var n=this.pow(z,new J(1).iushln(C-u-1));q=q.redMul(n),z=n.redSqr(),M=M.redMul(z),C=u}return q},p.prototype.invm=function(v){var G=v._invmp(this.m);if(G.negative!==0)return G.negative=0,this.imod(G).redNeg();else return this.imod(G)},p.prototype.pow=function(v,G){if(G.isZero())return new J(1).toRed(this);if(G.cmpn(1)===0)return v.clone();var W=4,Y=Array(1<<W);Y[0]=new J(1).toRed(this),Y[1]=v;for(var V=2;V<Y.length;V++)Y[V]=this.mul(Y[V-1],v);var S=Y[0],H=0,K=0,O=G.bitLength()%26;if(O===0)O=26;for(V=G.length-1;V>=0;V--){var z=G.words[V];for(var q=O-1;q>=0;q--){var M=z>>q&1;if(S!==Y[0])S=this.sqr(S);if(M===0&&H===0){K=0;continue}if(H<<=1,H|=M,K++,K!==W&&(V!==0||q!==0))continue;S=this.mul(S,Y[H]),K=0,H=0}O=26}return S},p.prototype.convertTo=function(v){var G=v.umod(this.m);return G===v?G.clone():G},p.prototype.convertFrom=function(v){var G=v.clone();return G.red=null,G},J.mont=function(v){return new I$(v)};function I$(v){if(p.call(this,v),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new J(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Q(I$,p),I$.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},I$.prototype.convertFrom=function(v){var G=this.imod(v.mul(this.rinv));return G.red=null,G},I$.prototype.imul=function(v,G){if(v.isZero()||G.isZero())return v.words[0]=0,v.length=1,v;var W=v.imul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.mul=function(v,G){if(v.isZero()||G.isZero())return new J(0)._forceRed(this);var W=v.mul(G),Y=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),V=W.isub(Y).iushrn(this.shift),S=V;if(V.cmp(this.m)>=0)S=V.isub(this.m);else if(V.cmpn(0)<0)S=V.iadd(this.m);return S._forceRed(this)},I$.prototype.invm=function(v){var G=this.imod(v._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof I>"u"||I,$)}),mW=Y$(($,I)=>{var D=YY(),X=l0().Buffer;function U(Q,J){return X.from(Q.toRed(D.mont(J.modulus)).redPow(new D(J.publicExponent)).fromRed().toArray())}I.exports=U}),dF=Y$(($,I)=>{(function(D,X){function U(Y,V){if(!Y)throw Error(V||"Assertion failed")}function Q(Y,V){Y.super_=V;var S=function(){};S.prototype=V.prototype,Y.prototype=new S,Y.prototype.constructor=Y}function J(Y,V,S){if(J.isBN(Y))return Y;if(this.negative=0,this.words=null,this.length=0,this.red=null,Y!==null){if(V==="le"||V==="be")S=V,V=10;this._init(Y||0,V||10,S||"be")}}if(typeof D==="object")D.exports=J;else X.BN=J;J.BN=J,J.wordSize=26;var A;try{if(typeof window<"u"&&typeof window.Buffer<"u")A=window.Buffer;else A=(j0(),e$(_0)).Buffer}catch(Y){}J.isBN=function(Y){if(Y instanceof J)return!0;return Y!==null&&typeof Y==="object"&&Y.constructor.wordSize===J.wordSize&&Array.isArray(Y.words)},J.max=function(Y,V){if(Y.cmp(V)>0)return Y;return V},J.min=function(Y,V){if(Y.cmp(V)<0)return Y;return V},J.prototype._init=function(Y,V,S){if(typeof Y==="number")return this._initNumber(Y,V,S);if(typeof Y==="object")return this._initArray(Y,V,S);if(V==="hex")V=16;U(V===(V|0)&&V>=2&&V<=36),Y=Y.toString().replace(/\s+/g,"");var H=0;if(Y[0]==="-")H++,this.negative=1;if(H<Y.length){if(V===16)this._parseHex(Y,H,S);else if(this._parseBase(Y,V,H),S==="le")this._initArray(this.toArray(),V,S)}},J.prototype._initNumber=function(Y,V,S){if(Y<0)this.negative=1,Y=-Y;if(Y<67108864)this.words=[Y&67108863],this.length=1;else if(Y<4503599627370496)this.words=[Y&67108863,Y/67108864&67108863],this.length=2;else U(Y<9007199254740992),this.words=[Y&67108863,Y/67108864&67108863,1],this.length=3;if(S!=="le")return;this._initArray(this.toArray(),V,S)},J.prototype._initArray=function(Y,V,S){if(U(typeof Y.length==="number"),Y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Y.length/3),this.words=Array(this.length);for(var H=0;H<this.length;H++)this.words[H]=0;var K,O,z=0;if(S==="be"){for(H=Y.length-1,K=0;H>=0;H-=3)if(O=Y[H]|Y[H-1]<<8|Y[H-2]<<16,this.words[K]|=O<<z&67108863,this.words[K+1]=O>>>26-z&67108863,z+=24,z>=26)z-=26,K++}else if(S==="le"){for(H=0,K=0;H<Y.length;H+=3)if(O=Y[H]|Y[H+1]<<8|Y[H+2]<<16,this.words[K]|=O<<z&67108863,this.words[K+1]=O>>>26-z&67108863,z+=24,z>=26)z-=26,K++}return this._strip()};function T(Y,V){var S=Y.charCodeAt(V);if(S>=48&&S<=57)return S-48;else if(S>=65&&S<=70)return S-55;else if(S>=97&&S<=102)return S-87;else U(!1,"Invalid character in "+Y)}function Z(Y,V,S){var H=T(Y,S);if(S-1>=V)H|=T(Y,S-1)<<4;return H}J.prototype._parseHex=function(Y,V,S){this.length=Math.ceil((Y.length-V)/6),this.words=Array(this.length);for(var H=0;H<this.length;H++)this.words[H]=0;var K=0,O=0,z;if(S==="be")for(H=Y.length-1;H>=V;H-=2)if(z=Z(Y,V,H)<<K,this.words[O]|=z&67108863,K>=18)K-=18,O+=1,this.words[O]|=z>>>26;else K+=8;else{var q=Y.length-V;for(H=q%2===0?V+1:V;H<Y.length;H+=2)if(z=Z(Y,V,H)<<K,this.words[O]|=z&67108863,K>=18)K-=18,O+=1,this.words[O]|=z>>>26;else K+=8}this._strip()};function L(Y,V,S,H){var K=0,O=0,z=Math.min(Y.length,S);for(var q=V;q<z;q++){var M=Y.charCodeAt(q)-48;if(K*=H,M>=49)O=M-49+10;else if(M>=17)O=M-17+10;else O=M;U(M>=0&&O<H,"Invalid character"),K+=O}return K}J.prototype._parseBase=function(Y,V,S){this.words=[0],this.length=1;for(var H=0,K=1;K<=67108863;K*=V)H++;H--,K=K/V|0;var O=Y.length-S,z=O%H,q=Math.min(O,O-z)+S,M=0;for(var C=S;C<q;C+=H)if(M=L(Y,C,C+H,V),this.imuln(K),this.words[0]+M<67108864)this.words[0]+=M;else this._iaddn(M);if(z!==0){var w=1;M=L(Y,C,Y.length,V);for(C=0;C<z;C++)w*=V;if(this.imuln(w),this.words[0]+M<67108864)this.words[0]+=M;else this._iaddn(M)}this._strip()},J.prototype.copy=function(Y){Y.words=Array(this.length);for(var V=0;V<this.length;V++)Y.words[V]=this.words[V];Y.length=this.length,Y.negative=this.negative,Y.red=this.red};function F(Y,V){Y.words=V.words,Y.length=V.length,Y.negative=V.negative,Y.red=V.red}if(J.prototype._move=function(Y){F(Y,this)},J.prototype.clone=function(){var Y=new J(null);return this.copy(Y),Y},J.prototype._expand=function(Y){while(this.length<Y)this.words[this.length++]=0;return this},J.prototype._strip=function(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},J.prototype._normSign=function(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol<"u"&&typeof Symbol.for==="function")try{J.prototype[Symbol.for("nodejs.util.inspect.custom")]=E}catch(Y){J.prototype.inspect=E}else J.prototype.inspect=E;function E(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var P=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],R=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],k=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(J.prototype.toString=function(Y,V){Y=Y||10,V=V|0||1;var S;if(Y===16||Y==="hex"){S="";var H=0,K=0;for(var O=0;O<this.length;O++){var z=this.words[O],q=((z<<H|K)&16777215).toString(16);if(K=z>>>24-H&16777215,H+=2,H>=26)H-=26,O--;if(K!==0||O!==this.length-1)S=P[6-q.length]+q+S;else S=q+S}if(K!==0)S=K.toString(16)+S;while(S.length%V!==0)S="0"+S;if(this.negative!==0)S="-"+S;return S}if(Y===(Y|0)&&Y>=2&&Y<=36){var M=R[Y],C=k[Y];S="";var w=this.clone();w.negative=0;while(!w.isZero()){var u=w.modrn(C).toString(Y);if(w=w.idivn(C),!w.isZero())S=P[M-u.length]+u+S;else S=u+S}if(this.isZero())S="0"+S;while(S.length%V!==0)S="0"+S;if(this.negative!==0)S="-"+S;return S}U(!1,"Base should be between 2 and 36")},J.prototype.toNumber=function(){var Y=this.words[0];if(this.length===2)Y+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)Y+=4503599627370496+this.words[1]*67108864;else if(this.length>2)U(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-Y:Y},J.prototype.toJSON=function(){return this.toString(16,2)},A)J.prototype.toBuffer=function(Y,V){return this.toArrayLike(A,Y,V)};J.prototype.toArray=function(Y,V){return this.toArrayLike(Array,Y,V)};var g=function(Y,V){if(Y.allocUnsafe)return Y.allocUnsafe(V);return new Y(V)};if(J.prototype.toArrayLike=function(Y,V,S){this._strip();var H=this.byteLength(),K=S||Math.max(1,H);U(H<=K,"byte array longer than desired length"),U(K>0,"Requested array length <= 0");var O=g(Y,K),z=V==="le"?"LE":"BE";return this["_toArrayLike"+z](O,H),O},J.prototype._toArrayLikeLE=function(Y,V){var S=0,H=0;for(var K=0,O=0;K<this.length;K++){var z=this.words[K]<<O|H;if(Y[S++]=z&255,S<Y.length)Y[S++]=z>>8&255;if(S<Y.length)Y[S++]=z>>16&255;if(O===6){if(S<Y.length)Y[S++]=z>>24&255;H=0,O=0}else H=z>>>24,O+=2}if(S<Y.length){Y[S++]=H;while(S<Y.length)Y[S++]=0}},J.prototype._toArrayLikeBE=function(Y,V){var S=Y.length-1,H=0;for(var K=0,O=0;K<this.length;K++){var z=this.words[K]<<O|H;if(Y[S--]=z&255,S>=0)Y[S--]=z>>8&255;if(S>=0)Y[S--]=z>>16&255;if(O===6){if(S>=0)Y[S--]=z>>24&255;H=0,O=0}else H=z>>>24,O+=2}if(S>=0){Y[S--]=H;while(S>=0)Y[S--]=0}},Math.clz32)J.prototype._countBits=function(Y){return 32-Math.clz32(Y)};else J.prototype._countBits=function(Y){var V=Y,S=0;if(V>=4096)S+=13,V>>>=13;if(V>=64)S+=7,V>>>=7;if(V>=8)S+=4,V>>>=4;if(V>=2)S+=2,V>>>=2;return S+V};J.prototype._zeroBits=function(Y){if(Y===0)return 26;var V=Y,S=0;if((V&8191)===0)S+=13,V>>>=13;if((V&127)===0)S+=7,V>>>=7;if((V&15)===0)S+=4,V>>>=4;if((V&3)===0)S+=2,V>>>=2;if((V&1)===0)S++;return S},J.prototype.bitLength=function(){var Y=this.words[this.length-1],V=this._countBits(Y);return(this.length-1)*26+V};function j(Y){var V=Array(Y.bitLength());for(var S=0;S<V.length;S++){var H=S/26|0,K=S%26;V[S]=Y.words[H]>>>K&1}return V}J.prototype.zeroBits=function(){if(this.isZero())return 0;var Y=0;for(var V=0;V<this.length;V++){var S=this._zeroBits(this.words[V]);if(Y+=S,S!==26)break}return Y},J.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},J.prototype.toTwos=function(Y){if(this.negative!==0)return this.abs().inotn(Y).iaddn(1);return this.clone()},J.prototype.fromTwos=function(Y){if(this.testn(Y-1))return this.notn(Y).iaddn(1).ineg();return this.clone()},J.prototype.isNeg=function(){return this.negative!==0},J.prototype.neg=function(){return this.clone().ineg()},J.prototype.ineg=function(){if(!this.isZero())this.negative^=1;return this},J.prototype.iuor=function(Y){while(this.length<Y.length)this.words[this.length++]=0;for(var V=0;V<Y.length;V++)this.words[V]=this.words[V]|Y.words[V];return this._strip()},J.prototype.ior=function(Y){return U((this.negative|Y.negative)===0),this.iuor(Y)},J.prototype.or=function(Y){if(this.length>Y.length)return this.clone().ior(Y);return Y.clone().ior(this)},J.prototype.uor=function(Y){if(this.length>Y.length)return this.clone().iuor(Y);return Y.clone().iuor(this)},J.prototype.iuand=function(Y){var V;if(this.length>Y.length)V=Y;else V=this;for(var S=0;S<V.length;S++)this.words[S]=this.words[S]&Y.words[S];return this.length=V.length,this._strip()},J.prototype.iand=function(Y){return U((this.negative|Y.negative)===0),this.iuand(Y)},J.prototype.and=function(Y){if(this.length>Y.length)return this.clone().iand(Y);return Y.clone().iand(this)},J.prototype.uand=function(Y){if(this.length>Y.length)return this.clone().iuand(Y);return Y.clone().iuand(this)},J.prototype.iuxor=function(Y){var V,S;if(this.length>Y.length)V=this,S=Y;else V=Y,S=this;for(var H=0;H<S.length;H++)this.words[H]=V.words[H]^S.words[H];if(this!==V)for(;H<V.length;H++)this.words[H]=V.words[H];return this.length=V.length,this._strip()},J.prototype.ixor=function(Y){return U((this.negative|Y.negative)===0),this.iuxor(Y)},J.prototype.xor=function(Y){if(this.length>Y.length)return this.clone().ixor(Y);return Y.clone().ixor(this)},J.prototype.uxor=function(Y){if(this.length>Y.length)return this.clone().iuxor(Y);return Y.clone().iuxor(this)},J.prototype.inotn=function(Y){U(typeof Y==="number"&&Y>=0);var V=Math.ceil(Y/26)|0,S=Y%26;if(this._expand(V),S>0)V--;for(var H=0;H<V;H++)this.words[H]=~this.words[H]&67108863;if(S>0)this.words[H]=~this.words[H]&67108863>>26-S;return this._strip()},J.prototype.notn=function(Y){return this.clone().inotn(Y)},J.prototype.setn=function(Y,V){U(typeof Y==="number"&&Y>=0);var S=Y/26|0,H=Y%26;if(this._expand(S+1),V)this.words[S]=this.words[S]|1<<H;else this.words[S]=this.words[S]&~(1<<H);return this._strip()},J.prototype.iadd=function(Y){var V;if(this.negative!==0&&Y.negative===0)return this.negative=0,V=this.isub(Y),this.negative^=1,this._normSign();else if(this.negative===0&&Y.negative!==0)return Y.negative=0,V=this.isub(Y),Y.negative=1,V._normSign();var S,H;if(this.length>Y.length)S=this,H=Y;else S=Y,H=this;var K=0;for(var O=0;O<H.length;O++)V=(S.words[O]|0)+(H.words[O]|0)+K,this.words[O]=V&67108863,K=V>>>26;for(;K!==0&&O<S.length;O++)V=(S.words[O]|0)+K,this.words[O]=V&67108863,K=V>>>26;if(this.length=S.length,K!==0)this.words[this.length]=K,this.length++;else if(S!==this)for(;O<S.length;O++)this.words[O]=S.words[O];return this},J.prototype.add=function(Y){var V;if(Y.negative!==0&&this.negative===0)return Y.negative=0,V=this.sub(Y),Y.negative^=1,V;else if(Y.negative===0&&this.negative!==0)return this.negative=0,V=Y.sub(this),this.negative=1,V;if(this.length>Y.length)return this.clone().iadd(Y);return Y.clone().iadd(this)},J.prototype.isub=function(Y){if(Y.negative!==0){Y.negative=0;var V=this.iadd(Y);return Y.negative=1,V._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Y),this.negative=1,this._normSign();var S=this.cmp(Y);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var H,K;if(S>0)H=this,K=Y;else H=Y,K=this;var O=0;for(var z=0;z<K.length;z++)V=(H.words[z]|0)-(K.words[z]|0)+O,O=V>>26,this.words[z]=V&67108863;for(;O!==0&&z<H.length;z++)V=(H.words[z]|0)+O,O=V>>26,this.words[z]=V&67108863;if(O===0&&z<H.length&&H!==this)for(;z<H.length;z++)this.words[z]=H.words[z];if(this.length=Math.max(this.length,z),H!==this)this.negative=1;return this._strip()},J.prototype.sub=function(Y){return this.clone().isub(Y)};function _(Y,V,S){S.negative=V.negative^Y.negative;var H=Y.length+V.length|0;S.length=H,H=H-1|0;var K=Y.words[0]|0,O=V.words[0]|0,z=K*O,q=z&67108863,M=z/67108864|0;S.words[0]=q;for(var C=1;C<H;C++){var w=M>>>26,u=M&67108863,n=Math.min(C,V.length-1);for(var W$=Math.max(0,C-Y.length+1);W$<=n;W$++){var i=C-W$|0;K=Y.words[i]|0,O=V.words[W$]|0,z=K*O+u,w+=z/67108864|0,u=z&67108863}S.words[C]=u|0,M=w|0}if(M!==0)S.words[C]=M|0;else S.length--;return S._strip()}var N=function(Y,V,S){var H=Y.words,K=V.words,O=S.words,z=0,q,M,C,w=H[0]|0,u=w&8191,n=w>>>13,W$=H[1]|0,i=W$&8191,b=W$>>>13,D$=H[2]|0,d=D$&8191,s=D$>>>13,h$=H[3]|0,f=h$&8191,h=h$>>>13,O$=H[4]|0,t=O$&8191,a=O$>>>13,T$=H[5]|0,y=T$&8191,o=T$>>>13,w$=H[6]|0,m=w$&8191,v$=w$>>>13,r$=H[7]|0,S$=r$&8191,A$=r$>>>13,X0=H[8]|0,K$=X0&8191,F$=X0>>>13,G0=H[9]|0,L$=G0&8191,Z$=G0>>>13,w0=K[0]|0,M$=w0&8191,C$=w0>>>13,c0=K[1]|0,_$=c0&8191,P$=c0>>>13,N0=K[2]|0,j$=N0&8191,q$=N0>>>13,g0=K[3]|0,N$=g0&8191,B$=g0>>>13,k0=K[4]|0,R$=k0&8191,x=k0>>>13,l=K[5]|0,e=l&8191,U$=l>>>13,p$=K[6]|0,z$=p$&8191,H$=p$>>>13,Q0=K[7]|0,g$=Q0&8191,x$=Q0>>>13,B0=K[8]|0,k$=B0&8191,E$=B0>>>13,Y0=K[9]|0,m$=Y0&8191,n$=Y0>>>13;S.negative=Y.negative^V.negative,S.length=19,q=Math.imul(u,M$),M=Math.imul(u,C$),M=M+Math.imul(n,M$)|0,C=Math.imul(n,C$);var v0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(v0>>>26)|0,v0&=67108863,q=Math.imul(i,M$),M=Math.imul(i,C$),M=M+Math.imul(b,M$)|0,C=Math.imul(b,C$),q=q+Math.imul(u,_$)|0,M=M+Math.imul(u,P$)|0,M=M+Math.imul(n,_$)|0,C=C+Math.imul(n,P$)|0;var $0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+($0>>>26)|0,$0&=67108863,q=Math.imul(d,M$),M=Math.imul(d,C$),M=M+Math.imul(s,M$)|0,C=Math.imul(s,C$),q=q+Math.imul(i,_$)|0,M=M+Math.imul(i,P$)|0,M=M+Math.imul(b,_$)|0,C=C+Math.imul(b,P$)|0,q=q+Math.imul(u,j$)|0,M=M+Math.imul(u,q$)|0,M=M+Math.imul(n,j$)|0,C=C+Math.imul(n,q$)|0;var K0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(K0>>>26)|0,K0&=67108863,q=Math.imul(f,M$),M=Math.imul(f,C$),M=M+Math.imul(h,M$)|0,C=Math.imul(h,C$),q=q+Math.imul(d,_$)|0,M=M+Math.imul(d,P$)|0,M=M+Math.imul(s,_$)|0,C=C+Math.imul(s,P$)|0,q=q+Math.imul(i,j$)|0,M=M+Math.imul(i,q$)|0,M=M+Math.imul(b,j$)|0,C=C+Math.imul(b,q$)|0,q=q+Math.imul(u,N$)|0,M=M+Math.imul(u,B$)|0,M=M+Math.imul(n,N$)|0,C=C+Math.imul(n,B$)|0;var z0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(z0>>>26)|0,z0&=67108863,q=Math.imul(t,M$),M=Math.imul(t,C$),M=M+Math.imul(a,M$)|0,C=Math.imul(a,C$),q=q+Math.imul(f,_$)|0,M=M+Math.imul(f,P$)|0,M=M+Math.imul(h,_$)|0,C=C+Math.imul(h,P$)|0,q=q+Math.imul(d,j$)|0,M=M+Math.imul(d,q$)|0,M=M+Math.imul(s,j$)|0,C=C+Math.imul(s,q$)|0,q=q+Math.imul(i,N$)|0,M=M+Math.imul(i,B$)|0,M=M+Math.imul(b,N$)|0,C=C+Math.imul(b,B$)|0,q=q+Math.imul(u,R$)|0,M=M+Math.imul(u,x)|0,M=M+Math.imul(n,R$)|0,C=C+Math.imul(n,x)|0;var S0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(S0>>>26)|0,S0&=67108863,q=Math.imul(y,M$),M=Math.imul(y,C$),M=M+Math.imul(o,M$)|0,C=Math.imul(o,C$),q=q+Math.imul(t,_$)|0,M=M+Math.imul(t,P$)|0,M=M+Math.imul(a,_$)|0,C=C+Math.imul(a,P$)|0,q=q+Math.imul(f,j$)|0,M=M+Math.imul(f,q$)|0,M=M+Math.imul(h,j$)|0,C=C+Math.imul(h,q$)|0,q=q+Math.imul(d,N$)|0,M=M+Math.imul(d,B$)|0,M=M+Math.imul(s,N$)|0,C=C+Math.imul(s,B$)|0,q=q+Math.imul(i,R$)|0,M=M+Math.imul(i,x)|0,M=M+Math.imul(b,R$)|0,C=C+Math.imul(b,x)|0,q=q+Math.imul(u,e)|0,M=M+Math.imul(u,U$)|0,M=M+Math.imul(n,e)|0,C=C+Math.imul(n,U$)|0;var A0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(A0>>>26)|0,A0&=67108863,q=Math.imul(m,M$),M=Math.imul(m,C$),M=M+Math.imul(v$,M$)|0,C=Math.imul(v$,C$),q=q+Math.imul(y,_$)|0,M=M+Math.imul(y,P$)|0,M=M+Math.imul(o,_$)|0,C=C+Math.imul(o,P$)|0,q=q+Math.imul(t,j$)|0,M=M+Math.imul(t,q$)|0,M=M+Math.imul(a,j$)|0,C=C+Math.imul(a,q$)|0,q=q+Math.imul(f,N$)|0,M=M+Math.imul(f,B$)|0,M=M+Math.imul(h,N$)|0,C=C+Math.imul(h,B$)|0,q=q+Math.imul(d,R$)|0,M=M+Math.imul(d,x)|0,M=M+Math.imul(s,R$)|0,C=C+Math.imul(s,x)|0,q=q+Math.imul(i,e)|0,M=M+Math.imul(i,U$)|0,M=M+Math.imul(b,e)|0,C=C+Math.imul(b,U$)|0,q=q+Math.imul(u,z$)|0,M=M+Math.imul(u,H$)|0,M=M+Math.imul(n,z$)|0,C=C+Math.imul(n,H$)|0;var F0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(F0>>>26)|0,F0&=67108863,q=Math.imul(S$,M$),M=Math.imul(S$,C$),M=M+Math.imul(A$,M$)|0,C=Math.imul(A$,C$),q=q+Math.imul(m,_$)|0,M=M+Math.imul(m,P$)|0,M=M+Math.imul(v$,_$)|0,C=C+Math.imul(v$,P$)|0,q=q+Math.imul(y,j$)|0,M=M+Math.imul(y,q$)|0,M=M+Math.imul(o,j$)|0,C=C+Math.imul(o,q$)|0,q=q+Math.imul(t,N$)|0,M=M+Math.imul(t,B$)|0,M=M+Math.imul(a,N$)|0,C=C+Math.imul(a,B$)|0,q=q+Math.imul(f,R$)|0,M=M+Math.imul(f,x)|0,M=M+Math.imul(h,R$)|0,C=C+Math.imul(h,x)|0,q=q+Math.imul(d,e)|0,M=M+Math.imul(d,U$)|0,M=M+Math.imul(s,e)|0,C=C+Math.imul(s,U$)|0,q=q+Math.imul(i,z$)|0,M=M+Math.imul(i,H$)|0,M=M+Math.imul(b,z$)|0,C=C+Math.imul(b,H$)|0,q=q+Math.imul(u,g$)|0,M=M+Math.imul(u,x$)|0,M=M+Math.imul(n,g$)|0,C=C+Math.imul(n,x$)|0;var H0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(H0>>>26)|0,H0&=67108863,q=Math.imul(K$,M$),M=Math.imul(K$,C$),M=M+Math.imul(F$,M$)|0,C=Math.imul(F$,C$),q=q+Math.imul(S$,_$)|0,M=M+Math.imul(S$,P$)|0,M=M+Math.imul(A$,_$)|0,C=C+Math.imul(A$,P$)|0,q=q+Math.imul(m,j$)|0,M=M+Math.imul(m,q$)|0,M=M+Math.imul(v$,j$)|0,C=C+Math.imul(v$,q$)|0,q=q+Math.imul(y,N$)|0,M=M+Math.imul(y,B$)|0,M=M+Math.imul(o,N$)|0,C=C+Math.imul(o,B$)|0,q=q+Math.imul(t,R$)|0,M=M+Math.imul(t,x)|0,M=M+Math.imul(a,R$)|0,C=C+Math.imul(a,x)|0,q=q+Math.imul(f,e)|0,M=M+Math.imul(f,U$)|0,M=M+Math.imul(h,e)|0,C=C+Math.imul(h,U$)|0,q=q+Math.imul(d,z$)|0,M=M+Math.imul(d,H$)|0,M=M+Math.imul(s,z$)|0,C=C+Math.imul(s,H$)|0,q=q+Math.imul(i,g$)|0,M=M+Math.imul(i,x$)|0,M=M+Math.imul(b,g$)|0,C=C+Math.imul(b,x$)|0,q=q+Math.imul(u,k$)|0,M=M+Math.imul(u,E$)|0,M=M+Math.imul(n,k$)|0,C=C+Math.imul(n,E$)|0;var Z0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(Z0>>>26)|0,Z0&=67108863,q=Math.imul(L$,M$),M=Math.imul(L$,C$),M=M+Math.imul(Z$,M$)|0,C=Math.imul(Z$,C$),q=q+Math.imul(K$,_$)|0,M=M+Math.imul(K$,P$)|0,M=M+Math.imul(F$,_$)|0,C=C+Math.imul(F$,P$)|0,q=q+Math.imul(S$,j$)|0,M=M+Math.imul(S$,q$)|0,M=M+Math.imul(A$,j$)|0,C=C+Math.imul(A$,q$)|0,q=q+Math.imul(m,N$)|0,M=M+Math.imul(m,B$)|0,M=M+Math.imul(v$,N$)|0,C=C+Math.imul(v$,B$)|0,q=q+Math.imul(y,R$)|0,M=M+Math.imul(y,x)|0,M=M+Math.imul(o,R$)|0,C=C+Math.imul(o,x)|0,q=q+Math.imul(t,e)|0,M=M+Math.imul(t,U$)|0,M=M+Math.imul(a,e)|0,C=C+Math.imul(a,U$)|0,q=q+Math.imul(f,z$)|0,M=M+Math.imul(f,H$)|0,M=M+Math.imul(h,z$)|0,C=C+Math.imul(h,H$)|0,q=q+Math.imul(d,g$)|0,M=M+Math.imul(d,x$)|0,M=M+Math.imul(s,g$)|0,C=C+Math.imul(s,x$)|0,q=q+Math.imul(i,k$)|0,M=M+Math.imul(i,E$)|0,M=M+Math.imul(b,k$)|0,C=C+Math.imul(b,E$)|0,q=q+Math.imul(u,m$)|0,M=M+Math.imul(u,n$)|0,M=M+Math.imul(n,m$)|0,C=C+Math.imul(n,n$)|0;var L0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(L0>>>26)|0,L0&=67108863,q=Math.imul(L$,_$),M=Math.imul(L$,P$),M=M+Math.imul(Z$,_$)|0,C=Math.imul(Z$,P$),q=q+Math.imul(K$,j$)|0,M=M+Math.imul(K$,q$)|0,M=M+Math.imul(F$,j$)|0,C=C+Math.imul(F$,q$)|0,q=q+Math.imul(S$,N$)|0,M=M+Math.imul(S$,B$)|0,M=M+Math.imul(A$,N$)|0,C=C+Math.imul(A$,B$)|0,q=q+Math.imul(m,R$)|0,M=M+Math.imul(m,x)|0,M=M+Math.imul(v$,R$)|0,C=C+Math.imul(v$,x)|0,q=q+Math.imul(y,e)|0,M=M+Math.imul(y,U$)|0,M=M+Math.imul(o,e)|0,C=C+Math.imul(o,U$)|0,q=q+Math.imul(t,z$)|0,M=M+Math.imul(t,H$)|0,M=M+Math.imul(a,z$)|0,C=C+Math.imul(a,H$)|0,q=q+Math.imul(f,g$)|0,M=M+Math.imul(f,x$)|0,M=M+Math.imul(h,g$)|0,C=C+Math.imul(h,x$)|0,q=q+Math.imul(d,k$)|0,M=M+Math.imul(d,E$)|0,M=M+Math.imul(s,k$)|0,C=C+Math.imul(s,E$)|0,q=q+Math.imul(i,m$)|0,M=M+Math.imul(i,n$)|0,M=M+Math.imul(b,m$)|0,C=C+Math.imul(b,n$)|0;var E0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(E0>>>26)|0,E0&=67108863,q=Math.imul(L$,j$),M=Math.imul(L$,q$),M=M+Math.imul(Z$,j$)|0,C=Math.imul(Z$,q$),q=q+Math.imul(K$,N$)|0,M=M+Math.imul(K$,B$)|0,M=M+Math.imul(F$,N$)|0,C=C+Math.imul(F$,B$)|0,q=q+Math.imul(S$,R$)|0,M=M+Math.imul(S$,x)|0,M=M+Math.imul(A$,R$)|0,C=C+Math.imul(A$,x)|0,q=q+Math.imul(m,e)|0,M=M+Math.imul(m,U$)|0,M=M+Math.imul(v$,e)|0,C=C+Math.imul(v$,U$)|0,q=q+Math.imul(y,z$)|0,M=M+Math.imul(y,H$)|0,M=M+Math.imul(o,z$)|0,C=C+Math.imul(o,H$)|0,q=q+Math.imul(t,g$)|0,M=M+Math.imul(t,x$)|0,M=M+Math.imul(a,g$)|0,C=C+Math.imul(a,x$)|0,q=q+Math.imul(f,k$)|0,M=M+Math.imul(f,E$)|0,M=M+Math.imul(h,k$)|0,C=C+Math.imul(h,E$)|0,q=q+Math.imul(d,m$)|0,M=M+Math.imul(d,n$)|0,M=M+Math.imul(s,m$)|0,C=C+Math.imul(s,n$)|0;var T0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(T0>>>26)|0,T0&=67108863,q=Math.imul(L$,N$),M=Math.imul(L$,B$),M=M+Math.imul(Z$,N$)|0,C=Math.imul(Z$,B$),q=q+Math.imul(K$,R$)|0,M=M+Math.imul(K$,x)|0,M=M+Math.imul(F$,R$)|0,C=C+Math.imul(F$,x)|0,q=q+Math.imul(S$,e)|0,M=M+Math.imul(S$,U$)|0,M=M+Math.imul(A$,e)|0,C=C+Math.imul(A$,U$)|0,q=q+Math.imul(m,z$)|0,M=M+Math.imul(m,H$)|0,M=M+Math.imul(v$,z$)|0,C=C+Math.imul(v$,H$)|0,q=q+Math.imul(y,g$)|0,M=M+Math.imul(y,x$)|0,M=M+Math.imul(o,g$)|0,C=C+Math.imul(o,x$)|0,q=q+Math.imul(t,k$)|0,M=M+Math.imul(t,E$)|0,M=M+Math.imul(a,k$)|0,C=C+Math.imul(a,E$)|0,q=q+Math.imul(f,m$)|0,M=M+Math.imul(f,n$)|0,M=M+Math.imul(h,m$)|0,C=C+Math.imul(h,n$)|0;var M0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(M0>>>26)|0,M0&=67108863,q=Math.imul(L$,R$),M=Math.imul(L$,x),M=M+Math.imul(Z$,R$)|0,C=Math.imul(Z$,x),q=q+Math.imul(K$,e)|0,M=M+Math.imul(K$,U$)|0,M=M+Math.imul(F$,e)|0,C=C+Math.imul(F$,U$)|0,q=q+Math.imul(S$,z$)|0,M=M+Math.imul(S$,H$)|0,M=M+Math.imul(A$,z$)|0,C=C+Math.imul(A$,H$)|0,q=q+Math.imul(m,g$)|0,M=M+Math.imul(m,x$)|0,M=M+Math.imul(v$,g$)|0,C=C+Math.imul(v$,x$)|0,q=q+Math.imul(y,k$)|0,M=M+Math.imul(y,E$)|0,M=M+Math.imul(o,k$)|0,C=C+Math.imul(o,E$)|0,q=q+Math.imul(t,m$)|0,M=M+Math.imul(t,n$)|0,M=M+Math.imul(a,m$)|0,C=C+Math.imul(a,n$)|0;var P0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(P0>>>26)|0,P0&=67108863,q=Math.imul(L$,e),M=Math.imul(L$,U$),M=M+Math.imul(Z$,e)|0,C=Math.imul(Z$,U$),q=q+Math.imul(K$,z$)|0,M=M+Math.imul(K$,H$)|0,M=M+Math.imul(F$,z$)|0,C=C+Math.imul(F$,H$)|0,q=q+Math.imul(S$,g$)|0,M=M+Math.imul(S$,x$)|0,M=M+Math.imul(A$,g$)|0,C=C+Math.imul(A$,x$)|0,q=q+Math.imul(m,k$)|0,M=M+Math.imul(m,E$)|0,M=M+Math.imul(v$,k$)|0,C=C+Math.imul(v$,E$)|0,q=q+Math.imul(y,m$)|0,M=M+Math.imul(y,n$)|0,M=M+Math.imul(o,m$)|0,C=C+Math.imul(o,n$)|0;var q0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(q0>>>26)|0,q0&=67108863,q=Math.imul(L$,z$),M=Math.imul(L$,H$),M=M+Math.imul(Z$,z$)|0,C=Math.imul(Z$,H$),q=q+Math.imul(K$,g$)|0,M=M+Math.imul(K$,x$)|0,M=M+Math.imul(F$,g$)|0,C=C+Math.imul(F$,x$)|0,q=q+Math.imul(S$,k$)|0,M=M+Math.imul(S$,E$)|0,M=M+Math.imul(A$,k$)|0,C=C+Math.imul(A$,E$)|0,q=q+Math.imul(m,m$)|0,M=M+Math.imul(m,n$)|0,M=M+Math.imul(v$,m$)|0,C=C+Math.imul(v$,n$)|0;var R0=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(R0>>>26)|0,R0&=67108863,q=Math.imul(L$,g$),M=Math.imul(L$,x$),M=M+Math.imul(Z$,g$)|0,C=Math.imul(Z$,x$),q=q+Math.imul(K$,k$)|0,M=M+Math.imul(K$,E$)|0,M=M+Math.imul(F$,k$)|0,C=C+Math.imul(F$,E$)|0,q=q+Math.imul(S$,m$)|0,M=M+Math.imul(S$,n$)|0,M=M+Math.imul(A$,m$)|0,C=C+Math.imul(A$,n$)|0;var N4=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(N4>>>26)|0,N4&=67108863,q=Math.imul(L$,k$),M=Math.imul(L$,E$),M=M+Math.imul(Z$,k$)|0,C=Math.imul(Z$,E$),q=q+Math.imul(K$,m$)|0,M=M+Math.imul(K$,n$)|0,M=M+Math.imul(F$,m$)|0,C=C+Math.imul(F$,n$)|0;var B4=(z+q|0)+((M&8191)<<13)|0;z=(C+(M>>>13)|0)+(B4>>>26)|0,B4&=67108863,q=Math.imul(L$,m$),M=Math.imul(L$,n$),M=M+Math.imul(Z$,m$)|0,C=Math.imul(Z$,n$);var x4=(z+q|0)+((M&8191)<<13)|0;if(z=(C+(M>>>13)|0)+(x4>>>26)|0,x4&=67108863,O[0]=v0,O[1]=$0,O[2]=K0,O[3]=z0,O[4]=S0,O[5]=A0,O[6]=F0,O[7]=H0,O[8]=Z0,O[9]=L0,O[10]=E0,O[11]=T0,O[12]=M0,O[13]=P0,O[14]=q0,O[15]=R0,O[16]=N4,O[17]=B4,O[18]=x4,z!==0)O[19]=z,S.length++;return S};if(!Math.imul)N=_;function B(Y,V,S){S.negative=V.negative^Y.negative,S.length=Y.length+V.length;var H=0,K=0;for(var O=0;O<S.length-1;O++){var z=K;K=0;var q=H&67108863,M=Math.min(O,V.length-1);for(var C=Math.max(0,O-Y.length+1);C<=M;C++){var w=O-C,u=Y.words[w]|0,n=V.words[C]|0,W$=u*n,i=W$&67108863;z=z+(W$/67108864|0)|0,i=i+q|0,q=i&67108863,z=z+(i>>>26)|0,K+=z>>>26,z&=67108863}S.words[O]=q,H=z,z=K}if(H!==0)S.words[O]=H;else S.length--;return S._strip()}function c(Y,V,S){return B(Y,V,S)}J.prototype.mulTo=function(Y,V){var S,H=this.length+Y.length;if(this.length===10&&Y.length===10)S=N(this,Y,V);else if(H<63)S=_(this,Y,V);else if(H<1024)S=B(this,Y,V);else S=c(this,Y,V);return S};function r(Y,V){this.x=Y,this.y=V}r.prototype.makeRBT=function(Y){var V=Array(Y),S=J.prototype._countBits(Y)-1;for(var H=0;H<Y;H++)V[H]=this.revBin(H,S,Y);return V},r.prototype.revBin=function(Y,V,S){if(Y===0||Y===S-1)return Y;var H=0;for(var K=0;K<V;K++)H|=(Y&1)<<V-K-1,Y>>=1;return H},r.prototype.permute=function(Y,V,S,H,K,O){for(var z=0;z<O;z++)H[z]=V[Y[z]],K[z]=S[Y[z]]},r.prototype.transform=function(Y,V,S,H,K,O){this.permute(O,Y,V,S,H,K);for(var z=1;z<K;z<<=1){var q=z<<1,M=Math.cos(2*Math.PI/q),C=Math.sin(2*Math.PI/q);for(var w=0;w<K;w+=q){var u=M,n=C;for(var W$=0;W$<z;W$++){var i=S[w+W$],b=H[w+W$],D$=S[w+W$+z],d=H[w+W$+z],s=u*D$-n*d;if(d=u*d+n*D$,D$=s,S[w+W$]=i+D$,H[w+W$]=b+d,S[w+W$+z]=i-D$,H[w+W$+z]=b-d,W$!==q)s=M*u-C*n,n=M*n+C*u,u=s}}}},r.prototype.guessLen13b=function(Y,V){var S=Math.max(V,Y)|1,H=S&1,K=0;for(S=S/2|0;S;S=S>>>1)K++;return 1<<K+1+H},r.prototype.conjugate=function(Y,V,S){if(S<=1)return;for(var H=0;H<S/2;H++){var K=Y[H];Y[H]=Y[S-H-1],Y[S-H-1]=K,K=V[H],V[H]=-V[S-H-1],V[S-H-1]=-K}},r.prototype.normalize13b=function(Y,V){var S=0;for(var H=0;H<V/2;H++){var K=Math.round(Y[2*H+1]/V)*8192+Math.round(Y[2*H]/V)+S;if(Y[H]=K&67108863,K<67108864)S=0;else S=K/67108864|0}return Y},r.prototype.convert13b=function(Y,V,S,H){var K=0;for(var O=0;O<V;O++)K=K+(Y[O]|0),S[2*O]=K&8191,K=K>>>13,S[2*O+1]=K&8191,K=K>>>13;for(O=2*V;O<H;++O)S[O]=0;U(K===0),U((K&-8192)===0)},r.prototype.stub=function(Y){var V=Array(Y);for(var S=0;S<Y;S++)V[S]=0;return V},r.prototype.mulp=function(Y,V,S){var H=2*this.guessLen13b(Y.length,V.length),K=this.makeRBT(H),O=this.stub(H),z=Array(H),q=Array(H),M=Array(H),C=Array(H),w=Array(H),u=Array(H),n=S.words;n.length=H,this.convert13b(Y.words,Y.length,z,H),this.convert13b(V.words,V.length,C,H),this.transform(z,O,q,M,H,K),this.transform(C,O,w,u,H,K);for(var W$=0;W$<H;W$++){var i=q[W$]*w[W$]-M[W$]*u[W$];M[W$]=q[W$]*u[W$]+M[W$]*w[W$],q[W$]=i}return this.conjugate(q,M,H),this.transform(q,M,n,O,H,K),this.conjugate(n,O,H),this.normalize13b(n,H),S.negative=Y.negative^V.negative,S.length=Y.length+V.length,S._strip()},J.prototype.mul=function(Y){var V=new J(null);return V.words=Array(this.length+Y.length),this.mulTo(Y,V)},J.prototype.mulf=function(Y){var V=new J(null);return V.words=Array(this.length+Y.length),c(this,Y,V)},J.prototype.imul=function(Y){return this.clone().mulTo(Y,this)},J.prototype.imuln=function(Y){var V=Y<0;if(V)Y=-Y;U(typeof Y==="number"),U(Y<67108864);var S=0;for(var H=0;H<this.length;H++){var K=(this.words[H]|0)*Y,O=(K&67108863)+(S&67108863);S>>=26,S+=K/67108864|0,S+=O>>>26,this.words[H]=O&67108863}if(S!==0)this.words[H]=S,this.length++;return this.length=Y===0?1:this.length,V?this.ineg():this},J.prototype.muln=function(Y){return this.clone().imuln(Y)},J.prototype.sqr=function(){return this.mul(this)},J.prototype.isqr=function(){return this.imul(this.clone())},J.prototype.pow=function(Y){var V=j(Y);if(V.length===0)return new J(1);var S=this;for(var H=0;H<V.length;H++,S=S.sqr())if(V[H]!==0)break;if(++H<V.length)for(var K=S.sqr();H<V.length;H++,K=K.sqr()){if(V[H]===0)continue;S=S.mul(K)}return S},J.prototype.iushln=function(Y){U(typeof Y==="number"&&Y>=0);var V=Y%26,S=(Y-V)/26,H=67108863>>>26-V<<26-V,K;if(V!==0){var O=0;for(K=0;K<this.length;K++){var z=this.words[K]&H,q=(this.words[K]|0)-z<<V;this.words[K]=q|O,O=z>>>26-V}if(O)this.words[K]=O,this.length++}if(S!==0){for(K=this.length-1;K>=0;K--)this.words[K+S]=this.words[K];for(K=0;K<S;K++)this.words[K]=0;this.length+=S}return this._strip()},J.prototype.ishln=function(Y){return U(this.negative===0),this.iushln(Y)},J.prototype.iushrn=function(Y,V,S){U(typeof Y==="number"&&Y>=0);var H;if(V)H=(V-V%26)/26;else H=0;var K=Y%26,O=Math.min((Y-K)/26,this.length),z=67108863^67108863>>>K<<K,q=S;if(H-=O,H=Math.max(0,H),q){for(var M=0;M<O;M++)q.words[M]=this.words[M];q.length=O}if(O===0);else if(this.length>O){this.length-=O;for(M=0;M<this.length;M++)this.words[M]=this.words[M+O]}else this.words[0]=0,this.length=1;var C=0;for(M=this.length-1;M>=0&&(C!==0||M>=H);M--){var w=this.words[M]|0;this.words[M]=C<<26-K|w>>>K,C=w&z}if(q&&C!==0)q.words[q.length++]=C;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},J.prototype.ishrn=function(Y,V,S){return U(this.negative===0),this.iushrn(Y,V,S)},J.prototype.shln=function(Y){return this.clone().ishln(Y)},J.prototype.ushln=function(Y){return this.clone().iushln(Y)},J.prototype.shrn=function(Y){return this.clone().ishrn(Y)},J.prototype.ushrn=function(Y){return this.clone().iushrn(Y)},J.prototype.testn=function(Y){U(typeof Y==="number"&&Y>=0);var V=Y%26,S=(Y-V)/26,H=1<<V;if(this.length<=S)return!1;var K=this.words[S];return!!(K&H)},J.prototype.imaskn=function(Y){U(typeof Y==="number"&&Y>=0);var V=Y%26,S=(Y-V)/26;if(U(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(V!==0)S++;if(this.length=Math.min(S,this.length),V!==0){var H=67108863^67108863>>>V<<V;this.words[this.length-1]&=H}return this._strip()},J.prototype.maskn=function(Y){return this.clone().imaskn(Y)},J.prototype.iaddn=function(Y){if(U(typeof Y==="number"),U(Y<67108864),Y<0)return this.isubn(-Y);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=Y)return this.words[0]=Y-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(Y),this.negative=1,this}return this._iaddn(Y)},J.prototype._iaddn=function(Y){this.words[0]+=Y;for(var V=0;V<this.length&&this.words[V]>=67108864;V++)if(this.words[V]-=67108864,V===this.length-1)this.words[V+1]=1;else this.words[V+1]++;return this.length=Math.max(this.length,V+1),this},J.prototype.isubn=function(Y){if(U(typeof Y==="number"),U(Y<67108864),Y<0)return this.iaddn(-Y);if(this.negative!==0)return this.negative=0,this.iaddn(Y),this.negative=1,this;if(this.words[0]-=Y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var V=0;V<this.length&&this.words[V]<0;V++)this.words[V]+=67108864,this.words[V+1]-=1;return this._strip()},J.prototype.addn=function(Y){return this.clone().iaddn(Y)},J.prototype.subn=function(Y){return this.clone().isubn(Y)},J.prototype.iabs=function(){return this.negative=0,this},J.prototype.abs=function(){return this.clone().iabs()},J.prototype._ishlnsubmul=function(Y,V,S){var H=Y.length+S,K;this._expand(H);var O,z=0;for(K=0;K<Y.length;K++){O=(this.words[K+S]|0)+z;var q=(Y.words[K]|0)*V;O-=q&67108863,z=(O>>26)-(q/67108864|0),this.words[K+S]=O&67108863}for(;K<this.length-S;K++)O=(this.words[K+S]|0)+z,z=O>>26,this.words[K+S]=O&67108863;if(z===0)return this._strip();U(z===-1),z=0;for(K=0;K<this.length;K++)O=-(this.words[K]|0)+z,z=O>>26,this.words[K]=O&67108863;return this.negative=1,this._strip()},J.prototype._wordDiv=function(Y,V){var S=this.length-Y.length,H=this.clone(),K=Y,O=K.words[K.length-1]|0,z=this._countBits(O);if(S=26-z,S!==0)K=K.ushln(S),H.iushln(S),O=K.words[K.length-1]|0;var q=H.length-K.length,M;if(V!=="mod"){M=new J(null),M.length=q+1,M.words=Array(M.length);for(var C=0;C<M.length;C++)M.words[C]=0}var w=H.clone()._ishlnsubmul(K,1,q);if(w.negative===0){if(H=w,M)M.words[q]=1}for(var u=q-1;u>=0;u--){var n=(H.words[K.length+u]|0)*67108864+(H.words[K.length+u-1]|0);n=Math.min(n/O|0,67108863),H._ishlnsubmul(K,n,u);while(H.negative!==0)if(n--,H.negative=0,H._ishlnsubmul(K,1,u),!H.isZero())H.negative^=1;if(M)M.words[u]=n}if(M)M._strip();if(H._strip(),V!=="div"&&S!==0)H.iushrn(S);return{div:M||null,mod:H}},J.prototype.divmod=function(Y,V,S){if(U(!Y.isZero()),this.isZero())return{div:new J(0),mod:new J(0)};var H,K,O;if(this.negative!==0&&Y.negative===0){if(O=this.neg().divmod(Y,V),V!=="mod")H=O.div.neg();if(V!=="div"){if(K=O.mod.neg(),S&&K.negative!==0)K.iadd(Y)}return{div:H,mod:K}}if(this.negative===0&&Y.negative!==0){if(O=this.divmod(Y.neg(),V),V!=="mod")H=O.div.neg();return{div:H,mod:O.mod}}if((this.negative&Y.negative)!==0){if(O=this.neg().divmod(Y.neg(),V),V!=="div"){if(K=O.mod.neg(),S&&K.negative!==0)K.isub(Y)}return{div:O.div,mod:K}}if(Y.length>this.length||this.cmp(Y)<0)return{div:new J(0),mod:this};if(Y.length===1){if(V==="div")return{div:this.divn(Y.words[0]),mod:null};if(V==="mod")return{div:null,mod:new J(this.modrn(Y.words[0]))};return{div:this.divn(Y.words[0]),mod:new J(this.modrn(Y.words[0]))}}return this._wordDiv(Y,V)},J.prototype.div=function(Y){return this.divmod(Y,"div",!1).div},J.prototype.mod=function(Y){return this.divmod(Y,"mod",!1).mod},J.prototype.umod=function(Y){return this.divmod(Y,"mod",!0).mod},J.prototype.divRound=function(Y){var V=this.divmod(Y);if(V.mod.isZero())return V.div;var S=V.div.negative!==0?V.mod.isub(Y):V.mod,H=Y.ushrn(1),K=Y.andln(1),O=S.cmp(H);if(O<0||K===1&&O===0)return V.div;return V.div.negative!==0?V.div.isubn(1):V.div.iaddn(1)},J.prototype.modrn=function(Y){var V=Y<0;if(V)Y=-Y;U(Y<=67108863);var S=67108864%Y,H=0;for(var K=this.length-1;K>=0;K--)H=(S*H+(this.words[K]|0))%Y;return V?-H:H},J.prototype.modn=function(Y){return this.modrn(Y)},J.prototype.idivn=function(Y){var V=Y<0;if(V)Y=-Y;U(Y<=67108863);var S=0;for(var H=this.length-1;H>=0;H--){var K=(this.words[H]|0)+S*67108864;this.words[H]=K/Y|0,S=K%Y}return this._strip(),V?this.ineg():this},J.prototype.divn=function(Y){return this.clone().idivn(Y)},J.prototype.egcd=function(Y){U(Y.negative===0),U(!Y.isZero());var V=this,S=Y.clone();if(V.negative!==0)V=V.umod(Y);else V=V.clone();var H=new J(1),K=new J(0),O=new J(0),z=new J(1),q=0;while(V.isEven()&&S.isEven())V.iushrn(1),S.iushrn(1),++q;var M=S.clone(),C=V.clone();while(!V.isZero()){for(var w=0,u=1;(V.words[0]&u)===0&&w<26;++w,u<<=1);if(w>0){V.iushrn(w);while(w-- >0){if(H.isOdd()||K.isOdd())H.iadd(M),K.isub(C);H.iushrn(1),K.iushrn(1)}}for(var n=0,W$=1;(S.words[0]&W$)===0&&n<26;++n,W$<<=1);if(n>0){S.iushrn(n);while(n-- >0){if(O.isOdd()||z.isOdd())O.iadd(M),z.isub(C);O.iushrn(1),z.iushrn(1)}}if(V.cmp(S)>=0)V.isub(S),H.isub(O),K.isub(z);else S.isub(V),O.isub(H),z.isub(K)}return{a:O,b:z,gcd:S.iushln(q)}},J.prototype._invmp=function(Y){U(Y.negative===0),U(!Y.isZero());var V=this,S=Y.clone();if(V.negative!==0)V=V.umod(Y);else V=V.clone();var H=new J(1),K=new J(0),O=S.clone();while(V.cmpn(1)>0&&S.cmpn(1)>0){for(var z=0,q=1;(V.words[0]&q)===0&&z<26;++z,q<<=1);if(z>0){V.iushrn(z);while(z-- >0){if(H.isOdd())H.iadd(O);H.iushrn(1)}}for(var M=0,C=1;(S.words[0]&C)===0&&M<26;++M,C<<=1);if(M>0){S.iushrn(M);while(M-- >0){if(K.isOdd())K.iadd(O);K.iushrn(1)}}if(V.cmp(S)>=0)V.isub(S),H.isub(K);else S.isub(V),K.isub(H)}var w;if(V.cmpn(1)===0)w=H;else w=K;if(w.cmpn(0)<0)w.iadd(Y);return w},J.prototype.gcd=function(Y){if(this.isZero())return Y.abs();if(Y.isZero())return this.abs();var V=this.clone(),S=Y.clone();V.negative=0,S.negative=0;for(var H=0;V.isEven()&&S.isEven();H++)V.iushrn(1),S.iushrn(1);do{while(V.isEven())V.iushrn(1);while(S.isEven())S.iushrn(1);var K=V.cmp(S);if(K<0){var O=V;V=S,S=O}else if(K===0||S.cmpn(1)===0)break;V.isub(S)}while(!0);return S.iushln(H)},J.prototype.invm=function(Y){return this.egcd(Y).a.umod(Y)},J.prototype.isEven=function(){return(this.words[0]&1)===0},J.prototype.isOdd=function(){return(this.words[0]&1)===1},J.prototype.andln=function(Y){return this.words[0]&Y},J.prototype.bincn=function(Y){U(typeof Y==="number");var V=Y%26,S=(Y-V)/26,H=1<<V;if(this.length<=S)return this._expand(S+1),this.words[S]|=H,this;var K=H;for(var O=S;K!==0&&O<this.length;O++){var z=this.words[O]|0;z+=K,K=z>>>26,z&=67108863,this.words[O]=z}if(K!==0)this.words[O]=K,this.length++;return this},J.prototype.isZero=function(){return this.length===1&&this.words[0]===0},J.prototype.cmpn=function(Y){var V=Y<0;if(this.negative!==0&&!V)return-1;if(this.negative===0&&V)return 1;this._strip();var S;if(this.length>1)S=1;else{if(V)Y=-Y;U(Y<=67108863,"Number is too big");var H=this.words[0]|0;S=H===Y?0:H<Y?-1:1}if(this.negative!==0)return-S|0;return S},J.prototype.cmp=function(Y){if(this.negative!==0&&Y.negative===0)return-1;if(this.negative===0&&Y.negative!==0)return 1;var V=this.ucmp(Y);if(this.negative!==0)return-V|0;return V},J.prototype.ucmp=function(Y){if(this.length>Y.length)return 1;if(this.length<Y.length)return-1;var V=0;for(var S=this.length-1;S>=0;S--){var H=this.words[S]|0,K=Y.words[S]|0;if(H===K)continue;if(H<K)V=-1;else if(H>K)V=1;break}return V},J.prototype.gtn=function(Y){return this.cmpn(Y)===1},J.prototype.gt=function(Y){return this.cmp(Y)===1},J.prototype.gten=function(Y){return this.cmpn(Y)>=0},J.prototype.gte=function(Y){return this.cmp(Y)>=0},J.prototype.ltn=function(Y){return this.cmpn(Y)===-1},J.prototype.lt=function(Y){return this.cmp(Y)===-1},J.prototype.lten=function(Y){return this.cmpn(Y)<=0},J.prototype.lte=function(Y){return this.cmp(Y)<=0},J.prototype.eqn=function(Y){return this.cmpn(Y)===0},J.prototype.eq=function(Y){return this.cmp(Y)===0},J.red=function(Y){return new G(Y)},J.prototype.toRed=function(Y){return U(!this.red,"Already a number in reduction context"),U(this.negative===0,"red works only with positives"),Y.convertTo(this)._forceRed(Y)},J.prototype.fromRed=function(){return U(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},J.prototype._forceRed=function(Y){return this.red=Y,this},J.prototype.forceRed=function(Y){return U(!this.red,"Already a number in reduction context"),this._forceRed(Y)},J.prototype.redAdd=function(Y){return U(this.red,"redAdd works only with red numbers"),this.red.add(this,Y)},J.prototype.redIAdd=function(Y){return U(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Y)},J.prototype.redSub=function(Y){return U(this.red,"redSub works only with red numbers"),this.red.sub(this,Y)},J.prototype.redISub=function(Y){return U(this.red,"redISub works only with red numbers"),this.red.isub(this,Y)},J.prototype.redShl=function(Y){return U(this.red,"redShl works only with red numbers"),this.red.shl(this,Y)},J.prototype.redMul=function(Y){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.mul(this,Y)},J.prototype.redIMul=function(Y){return U(this.red,"redMul works only with red numbers"),this.red._verify2(this,Y),this.red.imul(this,Y)},J.prototype.redSqr=function(){return U(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},J.prototype.redISqr=function(){return U(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},J.prototype.redSqrt=function(){return U(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},J.prototype.redInvm=function(){return U(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},J.prototype.redNeg=function(){return U(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},J.prototype.redPow=function(Y){return U(this.red&&!Y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Y)};var J$={k256:null,p224:null,p192:null,p25519:null};function G$(Y,V){this.name=Y,this.p=new J(V,16),this.n=this.p.bitLength(),this.k=new J(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}G$.prototype._tmp=function(){var Y=new J(null);return Y.words=Array(Math.ceil(this.n/13)),Y},G$.prototype.ireduce=function(Y){var V=Y,S;do this.split(V,this.tmp),V=this.imulK(V),V=V.iadd(this.tmp),S=V.bitLength();while(S>this.n);var H=S<this.n?-1:V.ucmp(this.p);if(H===0)V.words[0]=0,V.length=1;else if(H>0)V.isub(this.p);else if(V.strip!==void 0)V.strip();else V._strip();return V},G$.prototype.split=function(Y,V){Y.iushrn(this.n,0,V)},G$.prototype.imulK=function(Y){return Y.imul(this.k)};function X$(){G$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}Q(X$,G$),X$.prototype.split=function(Y,V){var S=4194303,H=Math.min(Y.length,9);for(var K=0;K<H;K++)V.words[K]=Y.words[K];if(V.length=H,Y.length<=9){Y.words[0]=0,Y.length=1;return}var O=Y.words[9];V.words[V.length++]=O&S;for(K=10;K<Y.length;K++){var z=Y.words[K]|0;Y.words[K-10]=(z&S)<<4|O>>>22,O=z}if(O>>>=22,Y.words[K-10]=O,O===0&&Y.length>10)Y.length-=10;else Y.length-=9},X$.prototype.imulK=function(Y){Y.words[Y.length]=0,Y.words[Y.length+1]=0,Y.length+=2;var V=0;for(var S=0;S<Y.length;S++){var H=Y.words[S]|0;V+=H*977,Y.words[S]=V&67108863,V=H*64+(V/67108864|0)}if(Y.words[Y.length-1]===0){if(Y.length--,Y.words[Y.length-1]===0)Y.length--}return Y};function p(){G$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}Q(p,G$);function I$(){G$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}Q(I$,G$);function v(){G$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}Q(v,G$),v.prototype.imulK=function(Y){var V=0;for(var S=0;S<Y.length;S++){var H=(Y.words[S]|0)*19+V,K=H&67108863;H>>>=26,Y.words[S]=K,V=H}if(V!==0)Y.words[Y.length++]=V;return Y},J._prime=function(Y){if(J$[Y])return J$[Y];var V;if(Y==="k256")V=new X$;else if(Y==="p224")V=new p;else if(Y==="p192")V=new I$;else if(Y==="p25519")V=new v;else throw Error("Unknown prime "+Y);return J$[Y]=V,V};function G(Y){if(typeof Y==="string"){var V=J._prime(Y);this.m=V.p,this.prime=V}else U(Y.gtn(1),"modulus must be greater than 1"),this.m=Y,this.prime=null}G.prototype._verify1=function(Y){U(Y.negative===0,"red works only with positives"),U(Y.red,"red works only with red numbers")},G.prototype._verify2=function(Y,V){U((Y.negative|V.negative)===0,"red works only with positives"),U(Y.red&&Y.red===V.red,"red works only with red numbers")},G.prototype.imod=function(Y){if(this.prime)return this.prime.ireduce(Y)._forceRed(this);return F(Y,Y.umod(this.m)._forceRed(this)),Y},G.prototype.neg=function(Y){if(Y.isZero())return Y.clone();return this.m.sub(Y)._forceRed(this)},G.prototype.add=function(Y,V){this._verify2(Y,V);var S=Y.add(V);if(S.cmp(this.m)>=0)S.isub(this.m);return S._forceRed(this)},G.prototype.iadd=function(Y,V){this._verify2(Y,V);var S=Y.iadd(V);if(S.cmp(this.m)>=0)S.isub(this.m);return S},G.prototype.sub=function(Y,V){this._verify2(Y,V);var S=Y.sub(V);if(S.cmpn(0)<0)S.iadd(this.m);return S._forceRed(this)},G.prototype.isub=function(Y,V){this._verify2(Y,V);var S=Y.isub(V);if(S.cmpn(0)<0)S.iadd(this.m);return S},G.prototype.shl=function(Y,V){return this._verify1(Y),this.imod(Y.ushln(V))},G.prototype.imul=function(Y,V){return this._verify2(Y,V),this.imod(Y.imul(V))},G.prototype.mul=function(Y,V){return this._verify2(Y,V),this.imod(Y.mul(V))},G.prototype.isqr=function(Y){return this.imul(Y,Y.clone())},G.prototype.sqr=function(Y){return this.mul(Y,Y)},G.prototype.sqrt=function(Y){if(Y.isZero())return Y.clone();var V=this.m.andln(3);if(U(V%2===1),V===3){var S=this.m.add(new J(1)).iushrn(2);return this.pow(Y,S)}var H=this.m.subn(1),K=0;while(!H.isZero()&&H.andln(1)===0)K++,H.iushrn(1);U(!H.isZero());var O=new J(1).toRed(this),z=O.redNeg(),q=this.m.subn(1).iushrn(1),M=this.m.bitLength();M=new J(2*M*M).toRed(this);while(this.pow(M,q).cmp(z)!==0)M.redIAdd(z);var C=this.pow(M,H),w=this.pow(Y,H.addn(1).iushrn(1)),u=this.pow(Y,H),n=K;while(u.cmp(O)!==0){var W$=u;for(var i=0;W$.cmp(O)!==0;i++)W$=W$.redSqr();U(i<n);var b=this.pow(C,new J(1).iushln(n-i-1));w=w.redMul(b),C=b.redSqr(),u=u.redMul(C),n=i}return w},G.prototype.invm=function(Y){var V=Y._invmp(this.m);if(V.negative!==0)return V.negative=0,this.imod(V).redNeg();else return this.imod(V)},G.prototype.pow=function(Y,V){if(V.isZero())return new J(1).toRed(this);if(V.cmpn(1)===0)return Y.clone();var S=4,H=Array(1<<S);H[0]=new J(1).toRed(this),H[1]=Y;for(var K=2;K<H.length;K++)H[K]=this.mul(H[K-1],Y);var O=H[0],z=0,q=0,M=V.bitLength()%26;if(M===0)M=26;for(K=V.length-1;K>=0;K--){var C=V.words[K];for(var w=M-1;w>=0;w--){var u=C>>w&1;if(O!==H[0])O=this.sqr(O);if(u===0&&z===0){q=0;continue}if(z<<=1,z|=u,q++,q!==S&&(K!==0||w!==0))continue;O=this.mul(O,H[z]),q=0,z=0}M=26}return O},G.prototype.convertTo=function(Y){var V=Y.umod(this.m);return V===Y?V.clone():V},G.prototype.convertFrom=function(Y){var V=Y.clone();return V.red=null,V},J.mont=function(Y){return new W(Y)};function W(Y){if(G.call(this,Y),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new J(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Q(W,G),W.prototype.convertTo=function(Y){return this.imod(Y.ushln(this.shift))},W.prototype.convertFrom=function(Y){var V=this.imod(Y.mul(this.rinv));return V.red=null,V},W.prototype.imul=function(Y,V){if(Y.isZero()||V.isZero())return Y.words[0]=0,Y.length=1,Y;var S=Y.imul(V),H=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=S.isub(H).iushrn(this.shift),O=K;if(K.cmp(this.m)>=0)O=K.isub(this.m);else if(K.cmpn(0)<0)O=K.iadd(this.m);return O._forceRed(this)},W.prototype.mul=function(Y,V){if(Y.isZero()||V.isZero())return new J(0)._forceRed(this);var S=Y.mul(V),H=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=S.isub(H).iushrn(this.shift),O=K;if(K.cmp(this.m)>=0)O=K.isub(this.m);else if(K.cmpn(0)<0)O=K.iadd(this.m);return O._forceRed(this)},W.prototype.invm=function(Y){var V=this.imod(Y._invmp(this.m).mul(this.r2));return V._forceRed(this)}})(typeof I>"u"||I,$)}),tW=Y$(($,I)=>{var D=dF(),X=q4(),U=l0().Buffer;function Q(T){var Z=T.modulus.byteLength(),L;do L=new D(X(Z));while(L.cmp(T.modulus)>=0||!L.umod(T.prime1)||!L.umod(T.prime2));return L}function J(T){var Z=Q(T),L=Z.toRed(D.mont(T.modulus)).redPow(new D(T.publicExponent)).fromRed();return{blinder:L,unblinder:Z.invm(T.modulus)}}function A(T,Z){var L=J(Z),F=Z.modulus.byteLength(),E=new D(T).mul(L.blinder).umod(Z.modulus),P=E.toRed(D.mont(Z.prime1)),R=E.toRed(D.mont(Z.prime2)),k=Z.coefficient,g=Z.prime1,j=Z.prime2,_=P.redPow(Z.exponent1).fromRed(),N=R.redPow(Z.exponent2).fromRed(),B=_.isub(N).imul(k).umod(g).imul(j);return N.iadd(B).imul(L.unblinder).umod(Z.modulus).toArrayLike(U,"be",F)}A.getr=Q,I.exports=A}),mF=Y$(($,I)=>{var D=oW(),X=q4(),U=R4(),Q=nW(),J=dW(),A=YY(),T=mW(),Z=tW(),L=l0().Buffer;I.exports=function(R,k,g){var j;if(R.padding)j=R.padding;else if(g)j=1;else j=4;var _=D(R),N;if(j===4)N=F(_,k);else if(j===1)N=E(_,k,g);else if(j===3){if(N=new A(k),N.cmp(_.modulus)>=0)throw Error("data too long for modulus")}else throw Error("unknown padding");if(g)return Z(N,_);else return T(N,_)};function F(R,k){var g=R.modulus.byteLength(),j=k.length,_=U("sha1").update(L.alloc(0)).digest(),N=_.length,B=2*N;if(j>g-B-2)throw Error("message too long");var c=L.alloc(g-j-B-2),r=g-N-1,J$=X(N),G$=J(L.concat([_,c,L.alloc(1,1),k],r),Q(J$,r)),X$=J(J$,Q(G$,N));return new A(L.concat([L.alloc(1),X$,G$],g))}function E(R,k,g){var j=k.length,_=R.modulus.byteLength();if(j>_-11)throw Error("message too long");var N;if(g)N=L.alloc(_-j-3,255);else N=P(_-j-3);return new A(L.concat([L.from([0,g?1:2]),N,L.alloc(1),k],_))}function P(R){var k=L.allocUnsafe(R),g=0,j=X(R*2),_=0,N;while(g<R){if(_===j.length)j=X(R*2),_=0;if(N=j[_++],N)k[g++]=N}return k}}),tF=Y$(($,I)=>{var D=oW(),X=nW(),U=dW(),Q=YY(),J=tW(),A=R4(),T=mW(),Z=l0().Buffer;I.exports=function(P,R,k){var g;if(P.padding)g=P.padding;else if(k)g=1;else g=4;var j=D(P),_=j.modulus.byteLength();if(R.length>_||new Q(R).cmp(j.modulus)>=0)throw Error("decryption error");var N;if(k)N=T(new Q(R),j);else N=J(R,j);var B=Z.alloc(_-N.length);if(N=Z.concat([B,N],_),g===4)return L(j,N);else if(g===1)return F(j,N,k);else if(g===3)return N;else throw Error("unknown padding")};function L(P,R){var k=P.modulus.byteLength(),g=A("sha1").update(Z.alloc(0)).digest(),j=g.length;if(R[0]!==0)throw Error("decryption error");var _=R.slice(1,j+1),N=R.slice(j+1),B=U(_,X(N,j)),c=U(N,X(B,k-j-1));if(E(g,c.slice(0,j)))throw Error("decryption error");var r=j;while(c[r]===0)r++;if(c[r++]!==1)throw Error("decryption error");return c.slice(r)}function F(P,R,k){var g=R.slice(0,2),j=2,_=0;while(R[j++]!==0)if(j>=R.length){_++;break}var N=R.slice(2,j-1);if(g.toString("hex")!=="0002"&&!k||g.toString("hex")!=="0001"&&k)_++;if(N.length<8)_++;if(_)throw Error("decryption error");return R.slice(j)}function E(P,R){P=Z.from(P),R=Z.from(R);var k=0,g=P.length;if(P.length!==R.length)k++,g=Math.min(P.length,R.length);var j=-1;while(++j<g)k+=P[j]^R[j];return k}}),$Y=Y$(($)=>{$.publicEncrypt=mF(),$.privateDecrypt=tF(),$.privateEncrypt=function(I,D){return $.publicEncrypt(I,D,!0)},$.publicDecrypt=function(I,D){return $.privateDecrypt(I,D,!0)}}),iF=Y$(($)=>{var I=(t0(),e$(m0));if(typeof I.publicEncrypt!=="function")I=$Y();if($.publicEncrypt=I.publicEncrypt,$.privateDecrypt=I.privateDecrypt,typeof I.privateEncrypt!=="function")$.privateEncrypt=$Y().privateEncrypt;else $.privateEncrypt=I.privateEncrypt;if(typeof I.publicDecrypt!=="function")$.publicDecrypt=$Y().publicDecrypt;else $.publicDecrypt=I.publicDecrypt}),eF=Y$(($)=>{var I=l0(),D=q4(),X=I.Buffer,U=I.kMaxLength,Q=globalThis.crypto||globalThis.msCrypto,J=Math.pow(2,32)-1;function A(E,P){if(typeof E!=="number"||E!==E)throw TypeError("offset must be a number");if(E>J||E<0)throw TypeError("offset must be a uint32");if(E>U||E>P)throw RangeError("offset out of range")}function T(E,P,R){if(typeof E!=="number"||E!==E)throw TypeError("size must be a number");if(E>J||E<0)throw TypeError("size must be a uint32");if(E+P>R||E>U)throw RangeError("buffer too small")}Q&&Q.getRandomValues,$.randomFill=Z,$.randomFillSync=F;function Z(E,P,R,k){if(!X.isBuffer(E)&&!(E instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof P==="function")k=P,P=0,R=E.length;else if(typeof R==="function")k=R,R=E.length-P;else if(typeof k!=="function")throw TypeError('"cb" argument must be a function');return A(P,E.length),T(R,P,E.length),L(E,P,R,k)}function L(E,P,R,k){if(!1)var g,j;if(k){D(R,function(N,B){if(N)return k(N);B.copy(E,P),k(null,E)});return}var _=D(R);return _.copy(E,P),E}function F(E,P,R){if(typeof P>"u")P=0;if(!X.isBuffer(E)&&!(E instanceof globalThis.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if(A(P,E.length),R===void 0)R=E.length-P;return T(R,P,E.length),L(E,P,R)}}),aF=Y$(($,I)=>{var D=(t0(),e$(m0));if(typeof D.randomFill==="function"&&typeof D.randomFillSync==="function")$.randomFill=D.randomFill,$.randomFillSync=D.randomFillSync;else I.exports=eF()}),sF=Y$(($)=>{$.randomBytes=$.rng=$.pseudoRandomBytes=$.prng=q4(),$.createHash=$.Hash=R4(),$.createHmac=$.Hmac=MW();var I=M2(),D=Object.keys(I),X=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(D);$.getHashes=function(){return X};var U=xW();$.pbkdf2=U.pbkdf2,$.pbkdf2Sync=U.pbkdf2Sync;var Q=OF();$.Cipher=Q.Cipher,$.createCipher=Q.createCipher,$.Cipheriv=Q.Cipheriv,$.createCipheriv=Q.createCipheriv,$.Decipher=Q.Decipher,$.createDecipher=Q.createDecipher,$.Decipheriv=Q.Decipheriv,$.createDecipheriv=Q.createDecipheriv,$.getCiphers=Q.getCiphers,$.listCiphers=Q.listCiphers;var J=JF();$.DiffieHellmanGroup=J.DiffieHellmanGroup,$.createDiffieHellmanGroup=J.createDiffieHellmanGroup,$.getDiffieHellman=J.getDiffieHellman,$.createDiffieHellman=J.createDiffieHellman,$.DiffieHellman=J.DiffieHellman;var A=XF();$.createSign=A.createSign,$.Sign=A.Sign,$.createVerify=A.createVerify,$.Verify=A.Verify,$.createECDH=_F();var T=iF();$.publicEncrypt=T.publicEncrypt,$.privateEncrypt=T.privateEncrypt,$.publicDecrypt=T.publicDecrypt,$.privateDecrypt=T.privateDecrypt;var Z=aF();$.randomFill=Z.randomFill,$.randomFillSync=Z.randomFillSync,$.createCredentials=function(){throw Error(`sorry, createCredentials is not implemented yet
15
15
  we accept pull requests
16
- https://github.com/browserify/crypto-browserify`)},$.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),m0=jK(YH(),1),GH=m0.prng,VH=m0.pseudoRandomBytes,SH=m0.rng,wQ=m0.randomBytes,WH=m0.Hash,DH=m0.createHash,zH=m0.Hmac,fQ=m0.createHmac,KH=m0.getHashes,AH=m0.pbkdf2,HH=m0.pbkdf2Sync,FH=m0.Cipher,LH=m0.createCipher,EH=m0.Cipheriv,ZH=m0.createCipheriv,vH=m0.Decipher,MH=m0.createDecipher,PH=m0.Decipheriv,TH=m0.createDecipheriv,qH=m0.getCiphers,RH=m0.listCiphers,CH=m0.DiffieHellmanGroup,kH=m0.createDiffieHellmanGroup,gH=m0.getDiffieHellman,jH=m0.createDiffieHellman,_H=m0.DiffieHellman,NH=m0.createSign,xH=m0.Sign,BH=m0.createVerify,cH=m0.Verify,wH=m0.createECDH,fH=m0.publicEncrypt,yH=m0.privateEncrypt,hH=m0.publicDecrypt,uH=m0.privateDecrypt,pH=m0.randomFill,bH=m0.randomFillSync,lH=m0.createCredentials,oH=m0.constants,dH=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];iH=crypto,eH=crypto});t$();class UY extends G${config;pendingJobs=new Map;activeBatches=new Map;batchProcessor=null;defaultConfig={maxBatchSize:100,batchTimeoutMs:5000,maxConcurrentBatches:10,enablePrioritization:!0,priorityLevels:3};constructor($={}){super();this.config={...this.defaultConfig,...$},this.startBatchProcessor()}async addJob($){let U=$.endpoint.id;if(!this.pendingJobs.has(U))this.pendingJobs.set(U,[]);let J=this.pendingJobs.get(U);if(this.config.enablePrioritization)this.insertJobByPriority(J,$);else J.push($);if(J.length>=this.config.maxBatchSize)await this.processBatchForEndpoint(U);this.emit("jobAdded",{endpointId:U,jobId:$.id,queueSize:J.length})}async processBatchForEndpoint($){let U=this.pendingJobs.get($);if(!U||U.length===0)return null;if(this.activeBatches.size>=this.config.maxConcurrentBatches)return this.emit("batchSkipped",{endpointId:$,reason:"max_concurrent_batches"}),null;let J=U.splice(0,this.config.maxBatchSize),V=this.createBatch($,J);this.activeBatches.set(V.id,V);try{this.emit("batchStarted",{batchId:V.id,endpointId:$,jobCount:J.length}),await this.executeBatch(V,J),V.status="completed",this.emit("batchCompleted",{batchId:V.id,endpointId:$,success:!0})}catch(I){V.status="failed",this.emit("batchFailed",{batchId:V.id,endpointId:$,error:I instanceof Error?I.message:"Unknown error"}),this.requeueFailedJobs(J)}finally{this.activeBatches.delete(V.id)}return V}async processAllBatches(){let $=[],U=Array.from(this.pendingJobs.keys());for(let J of U){let V=await this.processBatchForEndpoint(J);if(V)$.push(V)}return $}getBatchStats(){let $=Array.from(this.pendingJobs.keys()),U=$.reduce((J,V)=>{return J+(this.pendingJobs.get(V)?.length||0)},0);return{pendingJobsCount:U,activeBatchesCount:this.activeBatches.size,endpointsWithPendingJobs:$.length,averageQueueSize:$.length>0?U/$.length:0}}getPendingJobCount($){return this.pendingJobs.get($)?.length||0}startBatchProcessor(){this.batchProcessor=setInterval(async()=>{try{await this.processAllBatches()}catch($){this.emit("processorError",$)}},this.config.batchTimeoutMs)}insertJobByPriority($,U){let J=0;for(let V=0;V<$.length;V++){if($[V].priority<=U.priority){J=V;break}J=V+1}$.splice(J,0,U)}createBatch($,U){return{id:`batch_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,endpointId:$,events:U.map((J)=>J.event),createdAt:new Date,scheduledAt:new Date,status:"processing"}}async executeBatch($,U){if(!U[0]?.endpoint)throw Error("No endpoint found for batch");let V=U.map((I)=>this.executeJob(I));try{let I=await Promise.allSettled(V),S=I.filter((M)=>M.status==="fulfilled").length,Y=I.length-S;if(this.emit("batchExecuted",{batchId:$.id,endpointId:$.endpointId,total:I.length,successful:S,failed:Y}),Y>0)throw Error(`Batch partially failed: ${Y}/${I.length} jobs failed`)}catch(I){throw this.emit("batchExecutionError",{batchId:$.id,endpointId:$.endpointId,error:I instanceof Error?I.message:"Unknown error"}),I}}async executeJob($){let U={id:`delivery_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,endpointId:$.endpoint.id,eventId:$.event.id,url:$.endpoint.url,httpMethod:"POST",headers:{"Content-Type":"application/json"},payload:JSON.stringify($.event),attempts:[],status:"pending",createdAt:new Date},J=Math.random()>0.1;return U.attempts.push({attemptNumber:1,timestamp:new Date,httpStatus:J?200:500,responseBody:J?"OK":"Internal Server Error",error:J?void 0:"Server error",latencyMs:Math.floor(Math.random()*1000)+100}),U.status=J?"success":"failed",U.completedAt=new Date,U}requeueFailedJobs($){for(let U of $)if(U.attempts++,U.attempts<U.maxAttempts){let I=1000*2**(U.attempts-1);U.nextRetryAt=new Date(Date.now()+I),U.scheduledAt=U.nextRetryAt,setTimeout(()=>{this.addJob(U).catch((S)=>{this.emit("requeueError",{jobId:U.id,error:S instanceof Error?S.message:"Unknown error"})})},I)}else this.emit("jobExhausted",{jobId:U.id,endpointId:U.endpoint.id,attempts:U.attempts})}async shutdown(){if(this.batchProcessor)clearInterval(this.batchProcessor),this.batchProcessor=null;let $=30000,U=Date.now();while(this.activeBatches.size>0&&Date.now()-U<$)await new Promise((J)=>setTimeout(J,100));this.emit("shutdown",{pendingJobs:this.getBatchStats().pendingJobsCount,activeBatches:this.activeBatches.size})}}t$();class IY extends G${config;endpointHealth=new Map;circuitBreakers=new Map;connectionCounts=new Map;roundRobinIndex=0;healthCheckInterval=null;defaultConfig={strategy:"round-robin",healthCheckInterval:30000,healthCheckTimeoutMs:5000,weights:{}};constructor($={}){super();this.config={...this.defaultConfig,...$},this.startHealthChecks()}async registerEndpoint($){let U={endpointId:$.id,isHealthy:!0,consecutiveFailures:0,lastHealthCheckAt:new Date,averageResponseTime:0,activeConnections:0};this.endpointHealth.set($.id,U),this.connectionCounts.set($.id,0),await this.checkEndpointHealth($),this.emit("endpointRegistered",{endpointId:$.id,isHealthy:U.isHealthy})}async unregisterEndpoint($){this.endpointHealth.delete($),this.circuitBreakers.delete($),this.connectionCounts.delete($),this.emit("endpointUnregistered",{endpointId:$})}async selectEndpoint($){let U=$.filter((V)=>{let I=this.endpointHealth.get(V.id),S=this.circuitBreakers.get(V.id);return I?.isHealthy&&V.status==="active"&&S?.state!=="open"});if(U.length===0){let V=this.tryHalfOpenEndpoint($);if(V)return V;return this.emit("noHealthyEndpoints",{totalEndpoints:$.length}),null}let J;switch(this.config.strategy){case"round-robin":J=this.selectRoundRobin(U);break;case"least-connections":J=this.selectLeastConnections(U);break;case"weighted":J=this.selectWeighted(U);break;case"random":J=this.selectRandom(U);break;default:J=U[0]}return this.incrementConnections(J.id),this.emit("endpointSelected",{endpointId:J.id,strategy:this.config.strategy,availableEndpoints:U.length}),J}async onRequestComplete($,U,J){this.decrementConnections($);let V=this.endpointHealth.get($);if(V){if(V.averageResponseTime===0)V.averageResponseTime=J;else V.averageResponseTime=V.averageResponseTime*0.8+J*0.2;if(U){V.consecutiveFailures=0,V.isHealthy=!0;let I=this.circuitBreakers.get($);if(I){if(I.state==="half-open")I.state="closed",I.failureCount=0,this.emit("circuitBreakerClosed",{endpointId:$})}}else{if(V.consecutiveFailures++,V.consecutiveFailures>=3)V.isHealthy=!1,this.emit("endpointUnhealthy",{endpointId:$,consecutiveFailures:V.consecutiveFailures});this.updateCircuitBreaker($,!1)}}this.emit("requestCompleted",{endpointId:$,success:U,responseTime:J,averageResponseTime:V?.averageResponseTime})}getEndpointHealth($){return this.endpointHealth.get($)||null}getAllEndpointHealth(){return Array.from(this.endpointHealth.values())}getStats(){let $=Array.from(this.endpointHealth.values()),U=Array.from(this.connectionCounts.values()).reduce((I,S)=>I+S,0),J=Array.from(this.circuitBreakers.values()).filter((I)=>I.state==="open").length,V=$.length>0?$.reduce((I,S)=>I+S.averageResponseTime,0)/$.length:0;return{totalEndpoints:$.length,healthyEndpoints:$.filter((I)=>I.isHealthy).length,activeConnections:U,circuitBreakersOpen:J,averageResponseTime:V}}selectRoundRobin($){let U=$[this.roundRobinIndex%$.length];return this.roundRobinIndex=(this.roundRobinIndex+1)%$.length,U}selectLeastConnections($){return $.reduce((U,J)=>{let V=this.connectionCounts.get(U.id)||0;return(this.connectionCounts.get(J.id)||0)<V?J:U})}selectWeighted($){let U=this.config.weights||{},J=$.reduce((I,S)=>{return I+(U[S.id]||1)},0),V=Math.random()*J;for(let I of $){let S=U[I.id]||1;if(V-=S,V<=0)return I}return $[0]}selectRandom($){let U=Math.floor(Math.random()*$.length);return $[U]}tryHalfOpenEndpoint($){let U=new Date;for(let J of $){let V=this.circuitBreakers.get(J.id);if(V?.state==="open"&&V.nextRetryTime&&U>=V.nextRetryTime)return V.state="half-open",this.emit("circuitBreakerHalfOpen",{endpointId:J.id}),J}return null}updateCircuitBreaker($,U){let J=this.circuitBreakers.get($);if(!J)J={endpointId:$,state:"closed",failureCount:0},this.circuitBreakers.set($,J);if(!U){if(J.failureCount++,J.lastFailureTime=new Date,J.failureCount>=5&&J.state==="closed")J.state="open",J.nextRetryTime=new Date(Date.now()+60000),this.emit("circuitBreakerOpened",{endpointId:$,failureCount:J.failureCount,nextRetryTime:J.nextRetryTime})}}incrementConnections($){let U=this.connectionCounts.get($)||0;this.connectionCounts.set($,U+1);let J=this.endpointHealth.get($);if(J)J.activeConnections=U+1}decrementConnections($){let U=this.connectionCounts.get($)||0,J=Math.max(0,U-1);this.connectionCounts.set($,J);let V=this.endpointHealth.get($);if(V)V.activeConnections=J}async checkEndpointHealth($){let U=Date.now();try{let J=await fetch($.url,{method:"HEAD",signal:AbortSignal.timeout(this.config.healthCheckTimeoutMs)}),V=Date.now()-U,I=J.ok;await this.onRequestComplete($.id,I,V),this.emit("healthCheckCompleted",{endpointId:$.id,success:I,responseTime:V,httpStatus:J.status})}catch(J){let V=Date.now()-U;await this.onRequestComplete($.id,!1,V),this.emit("healthCheckFailed",{endpointId:$.id,error:J instanceof Error?J.message:"Unknown error",responseTime:V})}}startHealthChecks(){this.healthCheckInterval=setInterval(async()=>{let $=Array.from(this.endpointHealth.keys());for(let U of $)if(this.endpointHealth.get(U)){let V={id:U,url:`https://webhook.example.com/${U}`,active:!0,events:[],createdAt:new Date,updatedAt:new Date,status:"active"};await this.checkEndpointHealth(V)}},this.config.healthCheckInterval)}async shutdown(){if(this.healthCheckInterval)clearInterval(this.healthCheckInterval),this.healthCheckInterval=null;this.emit("shutdown",{totalEndpoints:this.endpointHealth.size,activeConnections:Array.from(this.connectionCounts.values()).reduce(($,U)=>$+U,0)})}}t$();var fU=(()=>({}));function i$($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}function OY($,U){var J="",V=0,I=-1,S=0,Y;for(var M=0;M<=$.length;++M){if(M<$.length)Y=$.charCodeAt(M);else if(Y===47)break;else Y=47;if(Y===47){if(I===M-1||S===1);else if(I!==M-1&&S===2){if(J.length<2||V!==2||J.charCodeAt(J.length-1)!==46||J.charCodeAt(J.length-2)!==46){if(J.length>2){var T=J.lastIndexOf("/");if(T!==J.length-1){if(T===-1)J="",V=0;else J=J.slice(0,T),V=J.length-1-J.lastIndexOf("/");I=M,S=0;continue}}else if(J.length===2||J.length===1){J="",V=0,I=M,S=0;continue}}if(U){if(J.length>0)J+="/..";else J="..";V=2}}else{if(J.length>0)J+="/"+$.slice(I+1,M);else J=$.slice(I+1,M);V=M-I-1}I=M,S=0}else if(Y===46&&S!==-1)++S;else S=-1}return J}function US($,U){var J=U.dir||U.root,V=U.base||(U.name||"")+(U.ext||"");if(!J)return V;if(J===U.root)return J+V;return J+$+V}function C6(){var $="",U=!1,J;for(var V=arguments.length-1;V>=-1&&!U;V--){var I;if(V>=0)I=arguments[V];else{if(J===void 0)J=process.cwd();I=J}if(i$(I),I.length===0)continue;$=I+"/"+$,U=I.charCodeAt(0)===47}if($=OY($,!U),U)if($.length>0)return"/"+$;else return"/";else if($.length>0)return $;else return"."}function XY($){if(i$($),$.length===0)return".";var U=$.charCodeAt(0)===47,J=$.charCodeAt($.length-1)===47;if($=OY($,!U),$.length===0&&!U)$=".";if($.length>0&&J)$+="/";if(U)return"/"+$;return $}function IS($){return i$($),$.length>0&&$.charCodeAt(0)===47}function sI(){if(arguments.length===0)return".";var $;for(var U=0;U<arguments.length;++U){var J=arguments[U];if(i$(J),J.length>0)if($===void 0)$=J;else $+="/"+J}if($===void 0)return".";return XY($)}function OS($,U){if(i$($),i$(U),$===U)return"";if($=C6($),U=C6(U),$===U)return"";var J=1;for(;J<$.length;++J)if($.charCodeAt(J)!==47)break;var V=$.length,I=V-J,S=1;for(;S<U.length;++S)if(U.charCodeAt(S)!==47)break;var Y=U.length,M=Y-S,T=I<M?I:M,L=-1,E=0;for(;E<=T;++E){if(E===T){if(M>T){if(U.charCodeAt(S+E)===47)return U.slice(S+E+1);else if(E===0)return U.slice(S+E)}else if(I>T){if($.charCodeAt(J+E)===47)L=E;else if(E===0)L=0}break}var F=$.charCodeAt(J+E),Z=U.charCodeAt(S+E);if(F!==Z)break;else if(F===47)L=E}var P="";for(E=J+L+1;E<=V;++E)if(E===V||$.charCodeAt(E)===47)if(P.length===0)P+="..";else P+="/..";if(P.length>0)return P+U.slice(S+L);else{if(S+=L,U.charCodeAt(S)===47)++S;return U.slice(S)}}function XS($){return $}function IU($){if(i$($),$.length===0)return".";var U=$.charCodeAt(0),J=U===47,V=-1,I=!0;for(var S=$.length-1;S>=1;--S)if(U=$.charCodeAt(S),U===47){if(!I){V=S;break}}else I=!1;if(V===-1)return J?"/":".";if(J&&V===1)return"//";return $.slice(0,V)}function JS($,U){if(U!==void 0&&typeof U!=="string")throw TypeError('"ext" argument must be a string');i$($);var J=0,V=-1,I=!0,S;if(U!==void 0&&U.length>0&&U.length<=$.length){if(U.length===$.length&&U===$)return"";var Y=U.length-1,M=-1;for(S=$.length-1;S>=0;--S){var T=$.charCodeAt(S);if(T===47){if(!I){J=S+1;break}}else{if(M===-1)I=!1,M=S+1;if(Y>=0)if(T===U.charCodeAt(Y)){if(--Y===-1)V=S}else Y=-1,V=M}}if(J===V)V=M;else if(V===-1)V=$.length;return $.slice(J,V)}else{for(S=$.length-1;S>=0;--S)if($.charCodeAt(S)===47){if(!I){J=S+1;break}}else if(V===-1)I=!1,V=S+1;if(V===-1)return"";return $.slice(J,V)}}function QS($){i$($);var U=-1,J=0,V=-1,I=!0,S=0;for(var Y=$.length-1;Y>=0;--Y){var M=$.charCodeAt(Y);if(M===47){if(!I){J=Y+1;break}continue}if(V===-1)I=!1,V=Y+1;if(M===46){if(U===-1)U=Y;else if(S!==1)S=1}else if(U!==-1)S=-1}if(U===-1||V===-1||S===0||S===1&&U===V-1&&U===J+1)return"";return $.slice(U,V)}function YS($){if($===null||typeof $!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return US("/",$)}function GS($){i$($);var U={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return U;var J=$.charCodeAt(0),V=J===47,I;if(V)U.root="/",I=1;else I=0;var S=-1,Y=0,M=-1,T=!0,L=$.length-1,E=0;for(;L>=I;--L){if(J=$.charCodeAt(L),J===47){if(!T){Y=L+1;break}continue}if(M===-1)T=!1,M=L+1;if(J===46){if(S===-1)S=L;else if(E!==1)E=1}else if(S!==-1)E=-1}if(S===-1||M===-1||E===0||E===1&&S===M-1&&S===Y+1){if(M!==-1)if(Y===0&&V)U.base=U.name=$.slice(1,M);else U.base=U.name=$.slice(Y,M)}else{if(Y===0&&V)U.name=$.slice(1,S),U.base=$.slice(1,M);else U.name=$.slice(Y,S),U.base=$.slice(Y,M);U.ext=$.slice(S,M)}if(Y>0)U.dir=$.slice(0,Y-1);else if(V)U.dir="/";return U}var VS="/",SS=":",O2=(($)=>($.posix=$,$))({resolve:C6,normalize:XY,isAbsolute:IS,join:sI,relative:OS,_makeLong:XS,dirname:IU,basename:JS,extname:QS,format:YS,parse:GS,sep:VS,delimiter:SS,win32:null,posix:null});class JY extends G${config;queues=new Map;highPriorityQueue=[];mediumPriorityQueue=[];lowPriorityQueue=[];delayedJobs=new Map;totalJobs=0;defaultConfig={maxQueueSize:1e4,persistToDisk:!1,compressionEnabled:!1,ttlMs:86400000};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.queues.set("high",this.highPriorityQueue),this.queues.set("medium",this.mediumPriorityQueue),this.queues.set("low",this.lowPriorityQueue),this.config.persistToDisk&&this.config.diskPath)this.loadFromDisk().catch((U)=>{this.emit("diskLoadError",U)});this.startTTLCleanup()}async enqueue($){if(this.totalJobs>=this.config.maxQueueSize)return this.emit("queueFull",{totalJobs:this.totalJobs,maxSize:this.config.maxQueueSize}),!1;if($.scheduledAt>new Date)return await this.scheduleDelayedJob($),!0;let U=this.getQueueName($.priority),J=this.queues.get(U);if(!J)throw Error(`Invalid queue name: ${U}`);if(J.push($),this.totalJobs++,this.emit("jobEnqueued",{jobId:$.id,priority:$.priority,queueName:U,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((V)=>{this.emit("diskSaveError",V)});return!0}async dequeue(){for(let[$,U]of this.queues.entries())if(U.length>0){let J=U.shift();if(this.totalJobs--,this.emit("jobDequeued",{jobId:J.id,queueName:$,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((V)=>{this.emit("diskSaveError",V)});return J}return null}async dequeueFromPriority($){let U=this.getQueueName($),J=this.queues.get(U);if(!J||J.length===0)return null;let V=J.shift();return this.totalJobs--,this.emit("jobDequeued",{jobId:V.id,queueName:U,totalJobs:this.totalJobs}),V}peek(){for(let $ of this.queues.values())if($.length>0)return $[0];return null}async removeJob($){for(let[J,V]of this.queues.entries()){let I=V.findIndex((S)=>S.id===$);if(I!==-1){if(V.splice(I,1),this.totalJobs--,this.emit("jobRemoved",{jobId:$,queueName:J,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((S)=>{this.emit("diskSaveError",S)});return!0}}let U=this.delayedJobs.get($);if(U)return clearTimeout(U),this.delayedJobs.delete($),this.emit("delayedJobCanceled",{jobId:$}),!0;return!1}getStats(){return{totalJobs:this.totalJobs,highPriorityJobs:this.highPriorityQueue.length,mediumPriorityJobs:this.mediumPriorityQueue.length,lowPriorityJobs:this.lowPriorityQueue.length,delayedJobs:this.delayedJobs.size,queueUtilization:this.totalJobs/this.config.maxQueueSize*100}}async clear(){for(let $ of this.queues.values())$.length=0;for(let $ of this.delayedJobs.values())clearTimeout($);if(this.delayedJobs.clear(),this.totalJobs=0,this.emit("queueCleared"),this.config.persistToDisk)await this.saveToDisk().catch(($)=>{this.emit("diskSaveError",$)})}async cleanupExpiredJobs(){let $=new Date,U=0;for(let[J,V]of this.queues.entries()){let I=V.length;for(let S=V.length-1;S>=0;S--){let Y=V[S],M=$.getTime()-Y.createdAt.getTime();if(M>this.config.ttlMs)V.splice(S,1),this.totalJobs--,U++,this.emit("jobExpired",{jobId:Y.id,queueName:J,age:M})}}if(U>0){if(this.emit("expiredJobsCleanup",{removedCount:U,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((J)=>{this.emit("diskSaveError",J)})}return U}getQueueName($){if($>=8)return"high";if($>=5)return"medium";return"low"}async scheduleDelayedJob($){let U=$.scheduledAt.getTime()-Date.now(),J=setTimeout(async()=>{if(this.delayedJobs.delete($.id),await this.enqueue({...$,scheduledAt:new Date}))this.emit("delayedJobActivated",{jobId:$.id})},U);this.delayedJobs.set($.id,J),this.emit("jobScheduled",{jobId:$.id,scheduledAt:$.scheduledAt,delay:U})}startTTLCleanup(){setInterval(async()=>{try{await this.cleanupExpiredJobs()}catch($){this.emit("cleanupError",$)}},300000)}async saveToDisk(){if(!this.config.diskPath)return;try{let $={queues:{high:this.highPriorityQueue,medium:this.mediumPriorityQueue,low:this.lowPriorityQueue},totalJobs:this.totalJobs,timestamp:new Date().toISOString()},U=JSON.stringify($,null,2),J=sI(this.config.diskPath,"webhook-queue.json");await fU.mkdir(IU(J),{recursive:!0}),await fU.writeFile(J,U,"utf8"),this.emit("diskSaved",{filePath:J,totalJobs:this.totalJobs})}catch($){throw this.emit("diskSaveError",$),$}}async loadFromDisk(){if(!this.config.diskPath)return;try{let $=sI(this.config.diskPath,"webhook-queue.json"),U=await fU.readFile($,"utf8"),J=JSON.parse(U);this.highPriorityQueue.length=0,this.mediumPriorityQueue.length=0,this.lowPriorityQueue.length=0,this.highPriorityQueue.push(...J.queues.high||[]),this.mediumPriorityQueue.push(...J.queues.medium||[]),this.lowPriorityQueue.push(...J.queues.low||[]),this.totalJobs=J.totalJobs||0,this.emit("diskLoaded",{filePath:$,totalJobs:this.totalJobs,timestamp:J.timestamp})}catch($){if($.code!=="ENOENT")this.emit("diskLoadError",$)}}async shutdown(){for(let $ of this.delayedJobs.values())clearTimeout($);if(this.delayedJobs.clear(),this.config.persistToDisk)await this.saveToDisk().catch(($)=>{this.emit("diskSaveError",$)});this.emit("shutdown",{totalJobs:this.totalJobs})}}t$();var KU=(()=>({}));class QY extends G${config;deliveries=new Map;indexByEndpoint=new Map;indexByStatus=new Map;indexByDate=new Map;cleanupInterval=null;defaultConfig={type:"memory",retentionDays:30,enableCompression:!1,maxMemoryUsage:104857600};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.startCleanupTask(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((U)=>{this.emit("loadError",U)})}async saveDelivery($){let U=this.deliveries.get($.id);if(U)this.removeFromIndexes(U);if(this.config.type==="memory"&&this.config.maxMemoryUsage)await this.checkMemoryUsage();if(this.deliveries.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.appendToFile($);this.emit("deliverySaved",{deliveryId:$.id,endpointId:$.endpointId,status:$.status})}async getDelivery($){return this.deliveries.get($)||null}async searchDeliveries($={},U={page:1,limit:100}){let J=null;if($.endpointId){let L=this.indexByEndpoint.get($.endpointId);J=L?new Set(L):new Set}if($.status){let L=this.indexByStatus.get($.status);if(J)J=new Set(Array.from(J).filter((E)=>L?.has(E)));else J=L?new Set(L):new Set}if($.createdAfter||$.createdBefore){let L=this.getDeliveryIdsByDateRange($.createdAfter,$.createdBefore);if(J)J=new Set(Array.from(J).filter((E)=>L.has(E)));else J=L}if(!J)J=new Set(this.deliveries.keys());let V=Array.from(J).map((L)=>this.deliveries.get(L)).filter((L)=>this.matchesFilter(L,$));V.sort((L,E)=>{if(U.sortBy==="createdAt"||!U.sortBy){let q=E.createdAt.getTime()-L.createdAt.getTime();return U.sortOrder==="asc"?-q:q}let F=this.getFieldValue(L,U.sortBy),Z=this.getFieldValue(E,U.sortBy),P=0;if(F<Z)P=-1;else if(F>Z)P=1;return U.sortOrder==="desc"?-P:P});let I=V.length,S=Math.ceil(I/U.limit),Y=(U.page-1)*U.limit,M=Y+U.limit;return{items:V.slice(Y,M),totalCount:I,page:U.page,totalPages:S,hasNext:U.page<S,hasPrevious:U.page>1}}async getDeliveriesByEndpoint($,U=100){let J=this.indexByEndpoint.get($);if(!J)return[];return Array.from(J).map((V)=>this.deliveries.get(V)).sort((V,I)=>I.createdAt.getTime()-V.createdAt.getTime()).slice(0,U)}async getFailedDeliveries($,U=100){let J={status:"failed",endpointId:$};return(await this.searchDeliveries(J,{page:1,limit:U})).items}async getDeliveryStats($,U){let J={endpointId:$,createdAfter:U?.start,createdBefore:U?.end},I=(await this.searchDeliveries(J,{page:1,limit:1e4})).items,S=I.filter((P)=>P.status==="success"),Y=I.filter((P)=>P.status==="failed"),M=I.filter((P)=>P.status==="pending"),T=I.filter((P)=>P.status==="exhausted"),L=I.filter((P)=>P.completedAt),E=L.reduce((P,q)=>{let k=q.attempts[q.attempts.length-1];return P+(k?.latencyMs||0)},0),F=L.length>0?E/L.length:0,Z={};for(let P of[...Y,...T]){let q=P.attempts[P.attempts.length-1];if(q?.error)Z[q.error]=(Z[q.error]||0)+1;else if(q?.httpStatus){let k=`HTTP ${q.httpStatus}`;Z[k]=(Z[k]||0)+1}}return{totalDeliveries:I.length,successfulDeliveries:S.length,failedDeliveries:Y.length,pendingDeliveries:M.length,exhaustedDeliveries:T.length,averageLatency:F,successRate:I.length>0?S.length/I.length*100:0,errorBreakdown:Z}}async cleanupOldDeliveries(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let U=Array.from(this.deliveries.values()).filter((J)=>J.createdAt<$);for(let J of U)this.removeFromIndexes(J),this.deliveries.delete(J.id);if(U.length>0){if(this.emit("oldDeliveriesCleanup",{removedCount:U.length,cutoffDate:$}),this.config.type==="file")await this.saveToFile()}return U.length}getStorageStats(){let $=this.estimateMemoryUsage();return{totalDeliveries:this.deliveries.size,memoryUsage:$,indexSizes:{byEndpoint:this.indexByEndpoint.size,byStatus:this.indexByStatus.size,byDate:this.indexByDate.size}}}initializeIndexes(){let $=["pending","success","failed","exhausted"];for(let U of $)this.indexByStatus.set(U,new Set)}addToIndexes($){if(!this.indexByEndpoint.has($.endpointId))this.indexByEndpoint.set($.endpointId,new Set);this.indexByEndpoint.get($.endpointId).add($.id);let U=this.indexByStatus.get($.status);if(U)U.add($.id);let J=$.createdAt.toISOString().split("T")[0];if(!this.indexByDate.has(J))this.indexByDate.set(J,new Set);this.indexByDate.get(J).add($.id)}removeFromIndexes($){let U=this.indexByEndpoint.get($.endpointId);if(U){if(U.delete($.id),U.size===0)this.indexByEndpoint.delete($.endpointId)}let J=this.indexByStatus.get($.status);if(J)J.delete($.id);let V=$.createdAt.toISOString().split("T")[0],I=this.indexByDate.get(V);if(I){if(I.delete($.id),I.size===0)this.indexByDate.delete(V)}}getDeliveryIdsByDateRange($,U){let J=new Set;for(let[V,I]of this.indexByDate.entries()){let S=new Date(V);if($&&S<$)continue;if(U&&S>U)continue;I.forEach((Y)=>{J.add(Y)})}return J}matchesFilter($,U){if(U.eventId&&$.eventId!==U.eventId)return!1;if(U.httpStatusCode&&U.httpStatusCode.length>0){let J=$.attempts[$.attempts.length-1];if(!J?.httpStatus||!U.httpStatusCode.includes(J.httpStatus))return!1}if(U.hasError!==void 0){let J=$.attempts.some((V)=>V.error);if(U.hasError!==J)return!1}if(U.completedAfter&&(!$.completedAt||$.completedAt<U.completedAfter))return!1;if(U.completedBefore&&(!$.completedAt||$.completedAt>U.completedBefore))return!1;return!0}getFieldValue($,U){return U.split(".").reduce((J,V)=>J?.[V],$)}estimateMemoryUsage(){let $=0;for(let U of this.deliveries.values())$+=JSON.stringify(U).length*2;return $}async checkMemoryUsage(){if(!this.config.maxMemoryUsage)return;let $=this.estimateMemoryUsage();if($>this.config.maxMemoryUsage){let U=Array.from(this.deliveries.values()).sort((I,S)=>I.createdAt.getTime()-S.createdAt.getTime()),J=0,V=this.config.maxMemoryUsage*0.8;for(let I of U){if(this.estimateMemoryUsage()<=V)break;this.removeFromIndexes(I),this.deliveries.delete(I.id),J++}if(J>0)this.emit("memoryCleanup",{removedCount:J,previousUsage:$,currentUsage:this.estimateMemoryUsage()})}}startCleanupTask(){this.cleanupInterval=setInterval(async()=>{try{await this.cleanupOldDeliveries(),await this.checkMemoryUsage()}catch($){this.emit("cleanupError",$)}},3600000)}async appendToFile($){if(!this.config.filePath)return;try{let U=JSON.stringify($)+`
17
- `;await KU.appendFile(this.config.filePath,U,"utf8")}catch(U){this.emit("appendError",U)}}async loadFromFile(){if(!this.config.filePath)return;try{let U=(await KU.readFile(this.config.filePath,"utf8")).trim().split(`
18
- `).filter((J)=>J.trim());for(let J of U)try{let V=JSON.parse(J),I={...V,createdAt:new Date(V.createdAt),completedAt:V.completedAt?new Date(V.completedAt):void 0,nextRetryAt:V.nextRetryAt?new Date(V.nextRetryAt):void 0,attempts:V.attempts.map((S)=>({...S,timestamp:new Date(S.timestamp)}))};this.deliveries.set(I.id,I),this.addToIndexes(I)}catch(V){this.emit("parseError",{line:J,error:V})}this.emit("dataLoaded",{filePath:this.config.filePath,deliveryCount:this.deliveries.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $=Array.from(this.deliveries.values()).map((U)=>JSON.stringify(U)).join(`
19
- `);await KU.mkdir(IU(this.config.filePath),{recursive:!0}),await KU.writeFile(this.config.filePath,$+`
20
- `,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,deliveryCount:this.deliveries.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null;if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{deliveryCount:this.deliveries.size})}}t$();var eU=(()=>({}));var p0={};d$(p0,{xid:()=>HD,void:()=>yD,uuidv7:()=>VD,uuidv6:()=>GD,uuidv4:()=>YD,uuid:()=>QD,url:()=>SD,uppercase:()=>RI,unknown:()=>dO,union:()=>tJ,undefined:()=>wD,ulid:()=>AD,uint64:()=>BD,uint32:()=>_D,tuple:()=>rD,trim:()=>NI,treeifyError:()=>f6,transform:()=>aJ,toUpperCase:()=>BI,toLowerCase:()=>xI,toJSONSchema:()=>AJ,templateLiteral:()=>$z,symbol:()=>cD,superRefine:()=>vG,success:()=>aD,stringbool:()=>Jz,stringFormat:()=>RD,string:()=>TJ,strictObject:()=>bD,startsWith:()=>kI,size:()=>PI,setErrorMap:()=>Vz,set:()=>dD,safeParseAsync:()=>PJ,safeParse:()=>MJ,registry:()=>LO,regexes:()=>XU,regex:()=>TI,refine:()=>ZG,record:()=>eY,readonly:()=>AG,property:()=>QJ,promise:()=>Uz,prettifyError:()=>y6,preprocess:()=>Yz,prefault:()=>GG,positive:()=>IJ,pipe:()=>eO,partialRecord:()=>nD,parseAsync:()=>vJ,parse:()=>ZJ,overwrite:()=>YU,optional:()=>tO,object:()=>pD,number:()=>wY,nullish:()=>eD,nullable:()=>iO,null:()=>pY,normalize:()=>_I,nonpositive:()=>XJ,nonoptional:()=>VG,nonnegative:()=>JJ,never:()=>nJ,negative:()=>OJ,nativeEnum:()=>tD,nanoid:()=>DD,nan:()=>sD,multipleOf:()=>jU,minSize:()=>_U,minLength:()=>FU,mime:()=>jI,maxSize:()=>nU,maxLength:()=>mU,map:()=>mD,lte:()=>r$,lt:()=>JU,lowercase:()=>qI,looseObject:()=>lD,locales:()=>ZI,literal:()=>IG,length:()=>dU,lazy:()=>LG,ksuid:()=>FD,keyof:()=>uD,jwt:()=>qD,json:()=>Qz,iso:()=>nO,ipv6:()=>ED,ipv4:()=>LD,intersection:()=>tY,int64:()=>xD,int32:()=>jD,int:()=>qJ,instanceof:()=>Xz,includes:()=>CI,hostname:()=>CD,guid:()=>JD,gte:()=>f$,gt:()=>QU,globalRegistry:()=>a$,getErrorMap:()=>Sz,function:()=>KJ,formatError:()=>KI,float64:()=>gD,float32:()=>kD,flattenError:()=>zI,file:()=>iD,enum:()=>$G,endsWith:()=>gI,emoji:()=>WD,email:()=>XD,e164:()=>TD,discriminatedUnion:()=>oD,date:()=>hD,custom:()=>Oz,cuid2:()=>KD,cuid:()=>zD,core:()=>GU,config:()=>V$,coerce:()=>OQ,clone:()=>w$,cidrv6:()=>vD,cidrv4:()=>ZD,check:()=>Iz,catch:()=>DG,boolean:()=>fY,bigint:()=>ND,base64url:()=>PD,base64:()=>MD,array:()=>mJ,any:()=>fD,_default:()=>QG,_ZodString:()=>RJ,ZodXID:()=>BJ,ZodVoid:()=>rY,ZodUnknown:()=>lY,ZodUnion:()=>dJ,ZodUndefined:()=>hY,ZodUUID:()=>VU,ZodURL:()=>kJ,ZodULID:()=>xJ,ZodType:()=>n0,ZodTuple:()=>iY,ZodTransform:()=>eJ,ZodTemplateLiteral:()=>HG,ZodSymbol:()=>yY,ZodSuccess:()=>SG,ZodStringFormat:()=>$$,ZodString:()=>fI,ZodSet:()=>sY,ZodRecord:()=>iJ,ZodRealError:()=>tU,ZodReadonly:()=>KG,ZodPromise:()=>EG,ZodPrefault:()=>YG,ZodPipe:()=>UQ,ZodOptional:()=>sJ,ZodObject:()=>sO,ZodNumberFormat:()=>iU,ZodNumber:()=>yI,ZodNullable:()=>XG,ZodNull:()=>uY,ZodNonOptional:()=>$Q,ZodNever:()=>oY,ZodNanoID:()=>jJ,ZodNaN:()=>zG,ZodMap:()=>aY,ZodLiteral:()=>UG,ZodLazy:()=>FG,ZodKSUID:()=>cJ,ZodJWT:()=>lJ,ZodIssueCode:()=>Gz,ZodIntersection:()=>dY,ZodISOTime:()=>oO,ZodISODuration:()=>rO,ZodISODateTime:()=>bO,ZodISODate:()=>lO,ZodIPv6:()=>fJ,ZodIPv4:()=>wJ,ZodGUID:()=>mO,ZodFirstPartyTypeKind:()=>IQ,ZodFile:()=>OG,ZodError:()=>ID,ZodEnum:()=>wI,ZodEmoji:()=>gJ,ZodEmail:()=>CJ,ZodE164:()=>bJ,ZodDiscriminatedUnion:()=>mY,ZodDefault:()=>JG,ZodDate:()=>aO,ZodCustomStringFormat:()=>oJ,ZodCustom:()=>$6,ZodCatch:()=>WG,ZodCUID2:()=>NJ,ZodCUID:()=>_J,ZodCIDRv6:()=>hJ,ZodCIDRv4:()=>yJ,ZodBoolean:()=>hI,ZodBigIntFormat:()=>rJ,ZodBigInt:()=>uI,ZodBase64URL:()=>pJ,ZodBase64:()=>uJ,ZodArray:()=>nY,ZodAny:()=>bY,TimePrecision:()=>g4,NEVER:()=>k6,$output:()=>q4,$input:()=>R4,$brand:()=>g6});var GU={};d$(GU,{version:()=>B1,util:()=>y0,treeifyError:()=>f6,toJSONSchema:()=>AJ,toDotPath:()=>SY,safeParseAsync:()=>u6,safeParse:()=>h6,registry:()=>LO,regexes:()=>XU,prettifyError:()=>y6,parseAsync:()=>QO,parse:()=>XO,locales:()=>ZI,isValidJWT:()=>kY,isValidBase64URL:()=>CY,isValidBase64:()=>UX,globalRegistry:()=>a$,globalConfig:()=>XI,function:()=>KJ,formatError:()=>KI,flattenError:()=>zI,config:()=>V$,clone:()=>w$,_xid:()=>jO,_void:()=>a4,_uuidv7:()=>PO,_uuidv6:()=>MO,_uuidv4:()=>vO,_uuid:()=>ZO,_url:()=>TO,_uppercase:()=>RI,_unknown:()=>rU,_union:()=>BW,_undefined:()=>d4,_ulid:()=>gO,_uint64:()=>n4,_uint32:()=>u4,_tuple:()=>YJ,_trim:()=>NI,_transform:()=>lW,_toUpperCase:()=>BI,_toLowerCase:()=>xI,_templateLiteral:()=>aW,_symbol:()=>m4,_superRefine:()=>WJ,_success:()=>dW,_stringbool:()=>DJ,_stringFormat:()=>uO,_string:()=>C4,_startsWith:()=>kI,_size:()=>PI,_set:()=>hW,_safeParseAsync:()=>GO,_safeParse:()=>YO,_regex:()=>TI,_refine:()=>SJ,_record:()=>fW,_readonly:()=>eW,_property:()=>QJ,_promise:()=>$D,_positive:()=>IJ,_pipe:()=>iW,_parseAsync:()=>JO,_parse:()=>OO,_overwrite:()=>YU,_optional:()=>oW,_number:()=>B4,_nullable:()=>rW,_null:()=>t4,_normalize:()=>_I,_nonpositive:()=>XJ,_nonoptional:()=>mW,_nonnegative:()=>JJ,_never:()=>e4,_negative:()=>OJ,_nativeEnum:()=>pW,_nanoid:()=>RO,_nan:()=>UJ,_multipleOf:()=>jU,_minSize:()=>_U,_minLength:()=>FU,_min:()=>f$,_mime:()=>jI,_maxSize:()=>nU,_maxLength:()=>mU,_max:()=>r$,_map:()=>yW,_lte:()=>r$,_lt:()=>JU,_lowercase:()=>qI,_literal:()=>bW,_length:()=>dU,_lazy:()=>sW,_ksuid:()=>_O,_jwt:()=>hO,_isoTime:()=>N4,_isoDuration:()=>x4,_isoDateTime:()=>j4,_isoDate:()=>_4,_ipv6:()=>xO,_ipv4:()=>NO,_intersection:()=>wW,_int64:()=>r4,_int32:()=>h4,_int:()=>w4,_includes:()=>CI,_guid:()=>MI,_gte:()=>f$,_gt:()=>QU,_float64:()=>y4,_float32:()=>f4,_file:()=>GJ,_enum:()=>uW,_endsWith:()=>gI,_emoji:()=>qO,_email:()=>EO,_e164:()=>yO,_discriminatedUnion:()=>cW,_default:()=>nW,_date:()=>s4,_custom:()=>VJ,_cuid2:()=>kO,_cuid:()=>CO,_coercedString:()=>k4,_coercedNumber:()=>c4,_coercedDate:()=>$J,_coercedBoolean:()=>b4,_coercedBigint:()=>o4,_cidrv6:()=>cO,_cidrv4:()=>BO,_check:()=>NY,_catch:()=>tW,_boolean:()=>p4,_bigint:()=>l4,_base64url:()=>fO,_base64:()=>wO,_array:()=>cI,_any:()=>i4,TimePrecision:()=>g4,NEVER:()=>k6,JSONSchemaGenerator:()=>pO,JSONSchema:()=>xY,Doc:()=>DO,$output:()=>q4,$input:()=>R4,$constructor:()=>O0,$brand:()=>g6,$ZodXID:()=>r1,$ZodVoid:()=>KX,$ZodUnknown:()=>oU,$ZodUnion:()=>FO,$ZodUndefined:()=>SX,$ZodUUID:()=>f1,$ZodURL:()=>h1,$ZodULID:()=>o1,$ZodType:()=>l0,$ZodTuple:()=>gU,$ZodTransform:()=>FI,$ZodTemplateLiteral:()=>BX,$ZodSymbol:()=>VX,$ZodSuccess:()=>jX,$ZodStringFormat:()=>s0,$ZodString:()=>kU,$ZodSet:()=>vX,$ZodRegistry:()=>vI,$ZodRecord:()=>EX,$ZodRealError:()=>bU,$ZodReadonly:()=>xX,$ZodPromise:()=>cX,$ZodPrefault:()=>kX,$ZodPipe:()=>LI,$ZodOptional:()=>qX,$ZodObject:()=>HX,$ZodNumberFormat:()=>YX,$ZodNumber:()=>AO,$ZodNullable:()=>RX,$ZodNull:()=>WX,$ZodNonOptional:()=>gX,$ZodNever:()=>zX,$ZodNanoID:()=>p1,$ZodNaN:()=>NX,$ZodMap:()=>ZX,$ZodLiteral:()=>PX,$ZodLazy:()=>wX,$ZodKSUID:()=>n1,$ZodJWT:()=>JX,$ZodIntersection:()=>LX,$ZodISOTime:()=>t1,$ZodISODuration:()=>i1,$ZodISODateTime:()=>m1,$ZodISODate:()=>d1,$ZodIPv6:()=>a1,$ZodIPv4:()=>e1,$ZodGUID:()=>w1,$ZodFunction:()=>zJ,$ZodFile:()=>TX,$ZodError:()=>DI,$ZodEnum:()=>MX,$ZodEmoji:()=>u1,$ZodEmail:()=>y1,$ZodE164:()=>XX,$ZodDiscriminatedUnion:()=>FX,$ZodDefault:()=>CX,$ZodDate:()=>AX,$ZodCustomStringFormat:()=>QX,$ZodCustom:()=>fX,$ZodCheckUpperCase:()=>C1,$ZodCheckStringFormat:()=>lU,$ZodCheckStartsWith:()=>g1,$ZodCheckSizeEquals:()=>v1,$ZodCheckRegex:()=>q1,$ZodCheckProperty:()=>_1,$ZodCheckOverwrite:()=>x1,$ZodCheckNumberFormat:()=>F1,$ZodCheckMultipleOf:()=>H1,$ZodCheckMinSize:()=>Z1,$ZodCheckMinLength:()=>P1,$ZodCheckMimeType:()=>N1,$ZodCheckMaxSize:()=>E1,$ZodCheckMaxLength:()=>M1,$ZodCheckLowerCase:()=>R1,$ZodCheckLessThan:()=>SO,$ZodCheckLengthEquals:()=>T1,$ZodCheckIncludes:()=>k1,$ZodCheckGreaterThan:()=>WO,$ZodCheckEndsWith:()=>j1,$ZodCheckBigIntFormat:()=>L1,$ZodCheck:()=>I$,$ZodCatch:()=>_X,$ZodCUID2:()=>l1,$ZodCUID:()=>b1,$ZodCIDRv6:()=>$X,$ZodCIDRv4:()=>s1,$ZodBoolean:()=>AI,$ZodBigIntFormat:()=>GX,$ZodBigInt:()=>HO,$ZodBase64URL:()=>OX,$ZodBase64:()=>IX,$ZodAsyncError:()=>OU,$ZodArray:()=>HI,$ZodAny:()=>DX});var k6=Object.freeze({status:"aborted"});function O0($,U,J){function V(M,T){var L;Object.defineProperty(M,"_zod",{value:M._zod??{},enumerable:!1}),(L=M._zod).traits??(L.traits=new Set),M._zod.traits.add($),U(M,T);for(let E in Y.prototype)if(!(E in M))Object.defineProperty(M,E,{value:Y.prototype[E].bind(M)});M._zod.constr=Y,M._zod.def=T}let I=J?.Parent??Object;class S extends I{}Object.defineProperty(S,"name",{value:$});function Y(M){var T;let L=J?.Parent?new S:this;V(L,M),(T=L._zod).deferred??(T.deferred=[]);for(let E of L._zod.deferred)E();return L}return Object.defineProperty(Y,"init",{value:V}),Object.defineProperty(Y,Symbol.hasInstance,{value:(M)=>{if(J?.Parent&&M instanceof J.Parent)return!0;return M?._zod?.traits?.has($)}}),Object.defineProperty(Y,"name",{value:$}),Y}var g6=Symbol("zod_brand");class OU extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}var XI={};function V$($){if($)Object.assign(XI,$);return XI}var y0={};d$(y0,{unwrapMessage:()=>JI,stringifyPrimitive:()=>f0,required:()=>gS,randomString:()=>ZS,propertyKeyTypes:()=>VI,promiseAllObject:()=>ES,primitiveTypes:()=>x6,prefixIssues:()=>b$,pick:()=>TS,partial:()=>kS,optionalKeys:()=>B6,omit:()=>qS,objectClone:()=>HS,numKeys:()=>vS,nullish:()=>AU,normalizeParams:()=>w0,mergeDefs:()=>HU,merge:()=>CS,jsonStringifyReplacer:()=>hU,joinValues:()=>S0,issue:()=>pU,isPlainObject:()=>uU,isObject:()=>yU,getSizableOrigin:()=>SI,getParsedType:()=>MS,getLengthableOrigin:()=>WI,getEnumValues:()=>QI,getElementAtPath:()=>LS,floatSafeRemainder:()=>_6,finalizeIssue:()=>l$,extend:()=>RS,escapeRegex:()=>e$,esc:()=>UO,defineLazy:()=>t0,createTransparentProxy:()=>PS,cloneDef:()=>FS,clone:()=>w$,cleanRegex:()=>GI,cleanEnum:()=>jS,captureStackTrace:()=>IO,cached:()=>YI,assignProp:()=>qU,assertNotEqual:()=>DS,assertNever:()=>KS,assertIs:()=>zS,assertEqual:()=>WS,assert:()=>AS,allowsEval:()=>N6,aborted:()=>RU,NUMBER_FORMAT_RANGES:()=>c6,Class:()=>GY,BIGINT_FORMAT_RANGES:()=>w6});function WS($){return $}function DS($){return $}function zS($){}function KS($){throw Error()}function AS($){}function QI($){let U=Object.values($).filter((V)=>typeof V==="number");return Object.entries($).filter(([V,I])=>U.indexOf(+V)===-1).map(([V,I])=>I)}function S0($,U="|"){return $.map((J)=>f0(J)).join(U)}function hU($,U){if(typeof U==="bigint")return U.toString();return U}function YI($){return{get value(){{let J=$();return Object.defineProperty(this,"value",{value:J}),J}throw Error("cached value already set")}}}function AU($){return $===null||$===void 0}function GI($){let U=$.startsWith("^")?1:0,J=$.endsWith("$")?$.length-1:$.length;return $.slice(U,J)}function _6($,U){let J=($.toString().split(".")[1]||"").length,V=U.toString(),I=(V.split(".")[1]||"").length;if(I===0&&/\d?e-\d?/.test(V)){let T=V.match(/\d?e-(\d?)/);if(T?.[1])I=Number.parseInt(T[1])}let S=J>I?J:I,Y=Number.parseInt($.toFixed(S).replace(".","")),M=Number.parseInt(U.toFixed(S).replace(".",""));return Y%M/10**S}var YY=Symbol("evaluating");function t0($,U,J){let V=void 0;Object.defineProperty($,U,{get(){if(V===YY)return;if(V===void 0)V=YY,V=J();return V},set(I){Object.defineProperty($,U,{value:I})},configurable:!0})}function HS($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function qU($,U,J){Object.defineProperty($,U,{value:J,writable:!0,enumerable:!0,configurable:!0})}function HU(...$){let U={};for(let J of $){let V=Object.getOwnPropertyDescriptors(J);Object.assign(U,V)}return Object.defineProperties({},U)}function FS($){return HU($._zod.def)}function LS($,U){if(!U)return $;return U.reduce((J,V)=>J?.[V],$)}function ES($){let U=Object.keys($),J=U.map((V)=>$[V]);return Promise.all(J).then((V)=>{let I={};for(let S=0;S<U.length;S++)I[U[S]]=V[S];return I})}function ZS($=10){let J="";for(let V=0;V<$;V++)J+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return J}function UO($){return JSON.stringify($)}var IO="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function yU($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var N6=YI(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function uU($){if(yU($)===!1)return!1;let U=$.constructor;if(U===void 0)return!0;let J=U.prototype;if(yU(J)===!1)return!1;if(Object.prototype.hasOwnProperty.call(J,"isPrototypeOf")===!1)return!1;return!0}function vS($){let U=0;for(let J in $)if(Object.prototype.hasOwnProperty.call($,J))U++;return U}var MS=($)=>{let U=typeof $;switch(U){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${U}`)}},VI=new Set(["string","number","symbol"]),x6=new Set(["string","number","bigint","boolean","symbol","undefined"]);function e$($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w$($,U,J){let V=new $._zod.constr(U??$._zod.def);if(!U||J?.parent)V._zod.parent=$;return V}function w0($){let U=$;if(!U)return{};if(typeof U==="string")return{error:()=>U};if(U?.message!==void 0){if(U?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");U.error=U.message}if(delete U.message,typeof U.error==="string")return{...U,error:()=>U.error};return U}function PS($){let U;return new Proxy({},{get(J,V,I){return U??(U=$()),Reflect.get(U,V,I)},set(J,V,I,S){return U??(U=$()),Reflect.set(U,V,I,S)},has(J,V){return U??(U=$()),Reflect.has(U,V)},deleteProperty(J,V){return U??(U=$()),Reflect.deleteProperty(U,V)},ownKeys(J){return U??(U=$()),Reflect.ownKeys(U)},getOwnPropertyDescriptor(J,V){return U??(U=$()),Reflect.getOwnPropertyDescriptor(U,V)},defineProperty(J,V,I){return U??(U=$()),Reflect.defineProperty(U,V,I)}})}function f0($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function B6($){return Object.keys($).filter((U)=>{return $[U]._zod.optin==="optional"&&$[U]._zod.optout==="optional"})}var c6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},w6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function TS($,U){let J=$._zod.def,V=HU($._zod.def,{get shape(){let I={};for(let S in U){if(!(S in J.shape))throw Error(`Unrecognized key: "${S}"`);if(!U[S])continue;I[S]=J.shape[S]}return qU(this,"shape",I),I},checks:[]});return w$($,V)}function qS($,U){let J=$._zod.def,V=HU($._zod.def,{get shape(){let I={...$._zod.def.shape};for(let S in U){if(!(S in J.shape))throw Error(`Unrecognized key: "${S}"`);if(!U[S])continue;delete I[S]}return qU(this,"shape",I),I},checks:[]});return w$($,V)}function RS($,U){if(!uU(U))throw Error("Invalid input to extend: expected a plain object");let J=HU($._zod.def,{get shape(){let V={...$._zod.def.shape,...U};return qU(this,"shape",V),V},checks:[]});return w$($,J)}function CS($,U){let J=HU($._zod.def,{get shape(){let V={...$._zod.def.shape,...U._zod.def.shape};return qU(this,"shape",V),V},get catchall(){return U._zod.def.catchall},checks:[]});return w$($,J)}function kS($,U,J){let V=HU(U._zod.def,{get shape(){let I=U._zod.def.shape,S={...I};if(J)for(let Y in J){if(!(Y in I))throw Error(`Unrecognized key: "${Y}"`);if(!J[Y])continue;S[Y]=$?new $({type:"optional",innerType:I[Y]}):I[Y]}else for(let Y in I)S[Y]=$?new $({type:"optional",innerType:I[Y]}):I[Y];return qU(this,"shape",S),S},checks:[]});return w$(U,V)}function gS($,U,J){let V=HU(U._zod.def,{get shape(){let I=U._zod.def.shape,S={...I};if(J)for(let Y in J){if(!(Y in S))throw Error(`Unrecognized key: "${Y}"`);if(!J[Y])continue;S[Y]=new $({type:"nonoptional",innerType:I[Y]})}else for(let Y in I)S[Y]=new $({type:"nonoptional",innerType:I[Y]});return qU(this,"shape",S),S},checks:[]});return w$(U,V)}function RU($,U=0){for(let J=U;J<$.issues.length;J++)if($.issues[J]?.continue!==!0)return!0;return!1}function b$($,U){return U.map((J)=>{var V;return(V=J).path??(V.path=[]),J.path.unshift($),J})}function JI($){return typeof $==="string"?$:$?.message}function l$($,U,J){let V={...$,path:$.path??[]};if(!$.message){let I=JI($.inst?._zod.def?.error?.($))??JI(U?.error?.($))??JI(J.customError?.($))??JI(J.localeError?.($))??"Invalid input";V.message=I}if(delete V.inst,delete V.continue,!U?.reportInput)delete V.input;return V}function SI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function WI($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function pU(...$){let[U,J,V]=$;if(typeof U==="string")return{message:U,code:"custom",input:J,inst:V};return{...U}}function jS($){return Object.entries($).filter(([U,J])=>{return Number.isNaN(Number.parseInt(U,10))}).map((U)=>U[1])}class GY{constructor(...$){}}var VY=($,U)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:U,enumerable:!1}),$.message=JSON.stringify(U,hU,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},DI=O0("$ZodError",VY),bU=O0("$ZodError",VY,{Parent:Error});function zI($,U=(J)=>J.message){let J={},V=[];for(let I of $.issues)if(I.path.length>0)J[I.path[0]]=J[I.path[0]]||[],J[I.path[0]].push(U(I));else V.push(U(I));return{formErrors:V,fieldErrors:J}}function KI($,U){let J=U||function(S){return S.message},V={_errors:[]},I=(S)=>{for(let Y of S.issues)if(Y.code==="invalid_union"&&Y.errors.length)Y.errors.map((M)=>I({issues:M}));else if(Y.code==="invalid_key")I({issues:Y.issues});else if(Y.code==="invalid_element")I({issues:Y.issues});else if(Y.path.length===0)V._errors.push(J(Y));else{let M=V,T=0;while(T<Y.path.length){let L=Y.path[T];if(T!==Y.path.length-1)M[L]=M[L]||{_errors:[]};else M[L]=M[L]||{_errors:[]},M[L]._errors.push(J(Y));M=M[L],T++}}};return I($),V}function f6($,U){let J=U||function(S){return S.message},V={errors:[]},I=(S,Y=[])=>{var M,T;for(let L of S.issues)if(L.code==="invalid_union"&&L.errors.length)L.errors.map((E)=>I({issues:E},L.path));else if(L.code==="invalid_key")I({issues:L.issues},L.path);else if(L.code==="invalid_element")I({issues:L.issues},L.path);else{let E=[...Y,...L.path];if(E.length===0){V.errors.push(J(L));continue}let F=V,Z=0;while(Z<E.length){let P=E[Z],q=Z===E.length-1;if(typeof P==="string")F.properties??(F.properties={}),(M=F.properties)[P]??(M[P]={errors:[]}),F=F.properties[P];else F.items??(F.items=[]),(T=F.items)[P]??(T[P]={errors:[]}),F=F.items[P];if(q)F.errors.push(J(L));Z++}}};return I($),V}function SY($){let U=[],J=$.map((V)=>typeof V==="object"?V.key:V);for(let V of J)if(typeof V==="number")U.push(`[${V}]`);else if(typeof V==="symbol")U.push(`[${JSON.stringify(String(V))}]`);else if(/[^\w$]/.test(V))U.push(`[${JSON.stringify(V)}]`);else{if(U.length)U.push(".");U.push(V)}return U.join("")}function y6($){let U=[],J=[...$.issues].sort((V,I)=>(V.path??[]).length-(I.path??[]).length);for(let V of J)if(U.push(`✖ ${V.message}`),V.path?.length)U.push(` → at ${SY(V.path)}`);return U.join(`
21
- `)}var OO=($)=>(U,J,V,I)=>{let S=V?Object.assign(V,{async:!1}):{async:!1},Y=U._zod.run({value:J,issues:[]},S);if(Y instanceof Promise)throw new OU;if(Y.issues.length){let M=new(I?.Err??$)(Y.issues.map((T)=>l$(T,S,V$())));throw IO(M,I?.callee),M}return Y.value},XO=OO(bU),JO=($)=>async(U,J,V,I)=>{let S=V?Object.assign(V,{async:!0}):{async:!0},Y=U._zod.run({value:J,issues:[]},S);if(Y instanceof Promise)Y=await Y;if(Y.issues.length){let M=new(I?.Err??$)(Y.issues.map((T)=>l$(T,S,V$())));throw IO(M,I?.callee),M}return Y.value},QO=JO(bU),YO=($)=>(U,J,V)=>{let I=V?{...V,async:!1}:{async:!1},S=U._zod.run({value:J,issues:[]},I);if(S instanceof Promise)throw new OU;return S.issues.length?{success:!1,error:new($??DI)(S.issues.map((Y)=>l$(Y,I,V$())))}:{success:!0,data:S.value}},h6=YO(bU),GO=($)=>async(U,J,V)=>{let I=V?Object.assign(V,{async:!0}):{async:!0},S=U._zod.run({value:J,issues:[]},I);if(S instanceof Promise)S=await S;return S.issues.length?{success:!1,error:new $(S.issues.map((Y)=>l$(Y,I,V$())))}:{success:!0,data:S.value}},u6=GO(bU);var XU={};d$(XU,{xid:()=>o6,uuid7:()=>cS,uuid6:()=>BS,uuid4:()=>xS,uuid:()=>CU,uppercase:()=>A1,unicodeEmail:()=>yS,undefined:()=>z1,ulid:()=>l6,time:()=>J1,string:()=>Y1,rfc5322Email:()=>fS,number:()=>S1,null:()=>D1,nanoid:()=>n6,lowercase:()=>K1,ksuid:()=>r6,ipv6:()=>a6,ipv4:()=>e6,integer:()=>V1,idnEmail:()=>hS,html5Email:()=>wS,hostname:()=>I1,guid:()=>d6,extendedDuration:()=>NS,emoji:()=>i6,email:()=>t6,e164:()=>O1,duration:()=>m6,domain:()=>pS,datetime:()=>Q1,date:()=>X1,cuid2:()=>b6,cuid:()=>p6,cidrv6:()=>$1,cidrv4:()=>s6,browserEmail:()=>uS,boolean:()=>W1,bigint:()=>G1,base64url:()=>VO,base64:()=>U1});var p6=/^[cC][^\s-]{8,}$/,b6=/^[0-9a-z]+$/,l6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,o6=/^[0-9a-vA-V]{20}$/,r6=/^[A-Za-z0-9]{27}$/,n6=/^[a-zA-Z0-9_-]{21}$/,m6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,NS=/^[-+]?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)?)??$/,d6=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,CU=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},xS=CU(4),BS=CU(6),cS=CU(7),t6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fS=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,yS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,hS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,uS=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function i6(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}var e6=/^(?:(?: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])$/,a6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,s6=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,$1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,U1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,VO=/^[A-Za-z0-9_-]*$/,I1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,pS=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,O1=/^\+(?:[0-9]){6,14}[0-9]$/,WY="(?:(?:\\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])))",X1=new RegExp(`^${WY}$`);function DY($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function J1($){return new RegExp(`^${DY($)}$`)}function Q1($){let U=DY({precision:$.precision}),J=["Z"];if($.local)J.push("");if($.offset)J.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let V=`${U}(?:${J.join("|")})`;return new RegExp(`^${WY}T(?:${V})$`)}var Y1=($)=>{let U=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${U}$`)},G1=/^\d+n?$/,V1=/^\d+$/,S1=/^-?\d+(?:\.\d+)?/i,W1=/true|false/i,D1=/null/i;var z1=/undefined/i;var K1=/^[^A-Z]*$/,A1=/^[^a-z]*$/;var I$=O0("$ZodCheck",($,U)=>{var J;$._zod??($._zod={}),$._zod.def=U,(J=$._zod).onattach??(J.onattach=[])}),KY={number:"number",bigint:"bigint",object:"date"},SO=O0("$ZodCheckLessThan",($,U)=>{I$.init($,U);let J=KY[typeof U.value];$._zod.onattach.push((V)=>{let I=V._zod.bag,S=(U.inclusive?I.maximum:I.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(U.value<S)if(U.inclusive)I.maximum=U.value;else I.exclusiveMaximum=U.value}),$._zod.check=(V)=>{if(U.inclusive?V.value<=U.value:V.value<U.value)return;V.issues.push({origin:J,code:"too_big",maximum:U.value,input:V.value,inclusive:U.inclusive,inst:$,continue:!U.abort})}}),WO=O0("$ZodCheckGreaterThan",($,U)=>{I$.init($,U);let J=KY[typeof U.value];$._zod.onattach.push((V)=>{let I=V._zod.bag,S=(U.inclusive?I.minimum:I.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(U.value>S)if(U.inclusive)I.minimum=U.value;else I.exclusiveMinimum=U.value}),$._zod.check=(V)=>{if(U.inclusive?V.value>=U.value:V.value>U.value)return;V.issues.push({origin:J,code:"too_small",minimum:U.value,input:V.value,inclusive:U.inclusive,inst:$,continue:!U.abort})}}),H1=O0("$ZodCheckMultipleOf",($,U)=>{I$.init($,U),$._zod.onattach.push((J)=>{var V;(V=J._zod.bag).multipleOf??(V.multipleOf=U.value)}),$._zod.check=(J)=>{if(typeof J.value!==typeof U.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof J.value==="bigint"?J.value%U.value===BigInt(0):_6(J.value,U.value)===0)return;J.issues.push({origin:typeof J.value,code:"not_multiple_of",divisor:U.value,input:J.value,inst:$,continue:!U.abort})}}),F1=O0("$ZodCheckNumberFormat",($,U)=>{I$.init($,U),U.format=U.format||"float64";let J=U.format?.includes("int"),V=J?"int":"number",[I,S]=c6[U.format];$._zod.onattach.push((Y)=>{let M=Y._zod.bag;if(M.format=U.format,M.minimum=I,M.maximum=S,J)M.pattern=V1}),$._zod.check=(Y)=>{let M=Y.value;if(J){if(!Number.isInteger(M)){Y.issues.push({expected:V,format:U.format,code:"invalid_type",continue:!1,input:M,inst:$});return}if(!Number.isSafeInteger(M)){if(M>0)Y.issues.push({input:M,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:V,continue:!U.abort});else Y.issues.push({input:M,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:V,continue:!U.abort});return}}if(M<I)Y.issues.push({origin:"number",input:M,code:"too_small",minimum:I,inclusive:!0,inst:$,continue:!U.abort});if(M>S)Y.issues.push({origin:"number",input:M,code:"too_big",maximum:S,inst:$})}}),L1=O0("$ZodCheckBigIntFormat",($,U)=>{I$.init($,U);let[J,V]=w6[U.format];$._zod.onattach.push((I)=>{let S=I._zod.bag;S.format=U.format,S.minimum=J,S.maximum=V}),$._zod.check=(I)=>{let S=I.value;if(S<J)I.issues.push({origin:"bigint",input:S,code:"too_small",minimum:J,inclusive:!0,inst:$,continue:!U.abort});if(S>V)I.issues.push({origin:"bigint",input:S,code:"too_big",maximum:V,inst:$})}}),E1=O0("$ZodCheckMaxSize",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.size!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag.maximum??Number.POSITIVE_INFINITY;if(U.maximum<I)V._zod.bag.maximum=U.maximum}),$._zod.check=(V)=>{let I=V.value;if(I.size<=U.maximum)return;V.issues.push({origin:SI(I),code:"too_big",maximum:U.maximum,input:I,inst:$,continue:!U.abort})}}),Z1=O0("$ZodCheckMinSize",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.size!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(U.minimum>I)V._zod.bag.minimum=U.minimum}),$._zod.check=(V)=>{let I=V.value;if(I.size>=U.minimum)return;V.issues.push({origin:SI(I),code:"too_small",minimum:U.minimum,input:I,inst:$,continue:!U.abort})}}),v1=O0("$ZodCheckSizeEquals",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.size!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag;I.minimum=U.size,I.maximum=U.size,I.size=U.size}),$._zod.check=(V)=>{let I=V.value,S=I.size;if(S===U.size)return;let Y=S>U.size;V.issues.push({origin:SI(I),...Y?{code:"too_big",maximum:U.size}:{code:"too_small",minimum:U.size},inclusive:!0,exact:!0,input:V.value,inst:$,continue:!U.abort})}}),M1=O0("$ZodCheckMaxLength",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.length!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag.maximum??Number.POSITIVE_INFINITY;if(U.maximum<I)V._zod.bag.maximum=U.maximum}),$._zod.check=(V)=>{let I=V.value;if(I.length<=U.maximum)return;let Y=WI(I);V.issues.push({origin:Y,code:"too_big",maximum:U.maximum,inclusive:!0,input:I,inst:$,continue:!U.abort})}}),P1=O0("$ZodCheckMinLength",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.length!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(U.minimum>I)V._zod.bag.minimum=U.minimum}),$._zod.check=(V)=>{let I=V.value;if(I.length>=U.minimum)return;let Y=WI(I);V.issues.push({origin:Y,code:"too_small",minimum:U.minimum,inclusive:!0,input:I,inst:$,continue:!U.abort})}}),T1=O0("$ZodCheckLengthEquals",($,U)=>{var J;I$.init($,U),(J=$._zod.def).when??(J.when=(V)=>{let I=V.value;return!AU(I)&&I.length!==void 0}),$._zod.onattach.push((V)=>{let I=V._zod.bag;I.minimum=U.length,I.maximum=U.length,I.length=U.length}),$._zod.check=(V)=>{let I=V.value,S=I.length;if(S===U.length)return;let Y=WI(I),M=S>U.length;V.issues.push({origin:Y,...M?{code:"too_big",maximum:U.length}:{code:"too_small",minimum:U.length},inclusive:!0,exact:!0,input:V.value,inst:$,continue:!U.abort})}}),lU=O0("$ZodCheckStringFormat",($,U)=>{var J,V;if(I$.init($,U),$._zod.onattach.push((I)=>{let S=I._zod.bag;if(S.format=U.format,U.pattern)S.patterns??(S.patterns=new Set),S.patterns.add(U.pattern)}),U.pattern)(J=$._zod).check??(J.check=(I)=>{if(U.pattern.lastIndex=0,U.pattern.test(I.value))return;I.issues.push({origin:"string",code:"invalid_format",format:U.format,input:I.value,...U.pattern?{pattern:U.pattern.toString()}:{},inst:$,continue:!U.abort})});else(V=$._zod).check??(V.check=()=>{})}),q1=O0("$ZodCheckRegex",($,U)=>{lU.init($,U),$._zod.check=(J)=>{if(U.pattern.lastIndex=0,U.pattern.test(J.value))return;J.issues.push({origin:"string",code:"invalid_format",format:"regex",input:J.value,pattern:U.pattern.toString(),inst:$,continue:!U.abort})}}),R1=O0("$ZodCheckLowerCase",($,U)=>{U.pattern??(U.pattern=K1),lU.init($,U)}),C1=O0("$ZodCheckUpperCase",($,U)=>{U.pattern??(U.pattern=A1),lU.init($,U)}),k1=O0("$ZodCheckIncludes",($,U)=>{I$.init($,U);let J=e$(U.includes),V=new RegExp(typeof U.position==="number"?`^.{${U.position}}${J}`:J);U.pattern=V,$._zod.onattach.push((I)=>{let S=I._zod.bag;S.patterns??(S.patterns=new Set),S.patterns.add(V)}),$._zod.check=(I)=>{if(I.value.includes(U.includes,U.position))return;I.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:U.includes,input:I.value,inst:$,continue:!U.abort})}}),g1=O0("$ZodCheckStartsWith",($,U)=>{I$.init($,U);let J=new RegExp(`^${e$(U.prefix)}.*`);U.pattern??(U.pattern=J),$._zod.onattach.push((V)=>{let I=V._zod.bag;I.patterns??(I.patterns=new Set),I.patterns.add(J)}),$._zod.check=(V)=>{if(V.value.startsWith(U.prefix))return;V.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:U.prefix,input:V.value,inst:$,continue:!U.abort})}}),j1=O0("$ZodCheckEndsWith",($,U)=>{I$.init($,U);let J=new RegExp(`.*${e$(U.suffix)}$`);U.pattern??(U.pattern=J),$._zod.onattach.push((V)=>{let I=V._zod.bag;I.patterns??(I.patterns=new Set),I.patterns.add(J)}),$._zod.check=(V)=>{if(V.value.endsWith(U.suffix))return;V.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:U.suffix,input:V.value,inst:$,continue:!U.abort})}});function zY($,U,J){if($.issues.length)U.issues.push(...b$(J,$.issues))}var _1=O0("$ZodCheckProperty",($,U)=>{I$.init($,U),$._zod.check=(J)=>{let V=U.schema._zod.run({value:J.value[U.property],issues:[]},{});if(V instanceof Promise)return V.then((I)=>zY(I,J,U.property));zY(V,J,U.property);return}}),N1=O0("$ZodCheckMimeType",($,U)=>{I$.init($,U);let J=new Set(U.mime);$._zod.onattach.push((V)=>{V._zod.bag.mime=U.mime}),$._zod.check=(V)=>{if(J.has(V.value.type))return;V.issues.push({code:"invalid_value",values:U.mime,input:V.value.type,inst:$,continue:!U.abort})}}),x1=O0("$ZodCheckOverwrite",($,U)=>{I$.init($,U),$._zod.check=(J)=>{J.value=U.tx(J.value)}});class DO{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let J=$.split(`
22
- `).filter((S)=>S),V=Math.min(...J.map((S)=>S.length-S.trimStart().length)),I=J.map((S)=>S.slice(V)).map((S)=>" ".repeat(this.indent*2)+S);for(let S of I)this.content.push(S)}compile(){let $=Function,U=this?.args,V=[...(this?.content??[""]).map((I)=>` ${I}`)];return new $(...U,V.join(`
23
- `))}}var B1={major:4,minor:0,patch:15};var l0=O0("$ZodType",($,U)=>{var J;$??($={}),$._zod.def=U,$._zod.bag=$._zod.bag||{},$._zod.version=B1;let V=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))V.unshift($);for(let I of V)for(let S of I._zod.onattach)S($);if(V.length===0)(J=$._zod).deferred??(J.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let I=(S,Y,M)=>{let T=RU(S),L;for(let E of Y){if(E._zod.def.when){if(!E._zod.def.when(S))continue}else if(T)continue;let F=S.issues.length,Z=E._zod.check(S);if(Z instanceof Promise&&M?.async===!1)throw new OU;if(L||Z instanceof Promise)L=(L??Promise.resolve()).then(async()=>{if(await Z,S.issues.length===F)return;if(!T)T=RU(S,F)});else{if(S.issues.length===F)continue;if(!T)T=RU(S,F)}}if(L)return L.then(()=>{return S});return S};$._zod.run=(S,Y)=>{let M=$._zod.parse(S,Y);if(M instanceof Promise){if(Y.async===!1)throw new OU;return M.then((T)=>I(T,V,Y))}return I(M,V,Y)}}$["~standard"]={validate:(I)=>{try{let S=h6($,I);return S.success?{value:S.data}:{issues:S.error?.issues}}catch(S){return u6($,I).then((Y)=>Y.success?{value:Y.data}:{issues:Y.error?.issues})}},vendor:"zod",version:1}}),kU=O0("$ZodString",($,U)=>{l0.init($,U),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??Y1($._zod.bag),$._zod.parse=(J,V)=>{if(U.coerce)try{J.value=String(J.value)}catch(I){}if(typeof J.value==="string")return J;return J.issues.push({expected:"string",code:"invalid_type",input:J.value,inst:$}),J}}),s0=O0("$ZodStringFormat",($,U)=>{lU.init($,U),kU.init($,U)}),w1=O0("$ZodGUID",($,U)=>{U.pattern??(U.pattern=d6),s0.init($,U)}),f1=O0("$ZodUUID",($,U)=>{if(U.version){let V={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[U.version];if(V===void 0)throw Error(`Invalid UUID version: "${U.version}"`);U.pattern??(U.pattern=CU(V))}else U.pattern??(U.pattern=CU());s0.init($,U)}),y1=O0("$ZodEmail",($,U)=>{U.pattern??(U.pattern=t6),s0.init($,U)}),h1=O0("$ZodURL",($,U)=>{s0.init($,U),$._zod.check=(J)=>{try{let V=J.value.trim(),I=new URL(V);if(U.hostname){if(U.hostname.lastIndex=0,!U.hostname.test(I.hostname))J.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I1.source,input:J.value,inst:$,continue:!U.abort})}if(U.protocol){if(U.protocol.lastIndex=0,!U.protocol.test(I.protocol.endsWith(":")?I.protocol.slice(0,-1):I.protocol))J.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:U.protocol.source,input:J.value,inst:$,continue:!U.abort})}if(U.normalize)J.value=I.href;else J.value=V;return}catch(V){J.issues.push({code:"invalid_format",format:"url",input:J.value,inst:$,continue:!U.abort})}}}),u1=O0("$ZodEmoji",($,U)=>{U.pattern??(U.pattern=i6()),s0.init($,U)}),p1=O0("$ZodNanoID",($,U)=>{U.pattern??(U.pattern=n6),s0.init($,U)}),b1=O0("$ZodCUID",($,U)=>{U.pattern??(U.pattern=p6),s0.init($,U)}),l1=O0("$ZodCUID2",($,U)=>{U.pattern??(U.pattern=b6),s0.init($,U)}),o1=O0("$ZodULID",($,U)=>{U.pattern??(U.pattern=l6),s0.init($,U)}),r1=O0("$ZodXID",($,U)=>{U.pattern??(U.pattern=o6),s0.init($,U)}),n1=O0("$ZodKSUID",($,U)=>{U.pattern??(U.pattern=r6),s0.init($,U)}),m1=O0("$ZodISODateTime",($,U)=>{U.pattern??(U.pattern=Q1(U)),s0.init($,U)}),d1=O0("$ZodISODate",($,U)=>{U.pattern??(U.pattern=X1),s0.init($,U)}),t1=O0("$ZodISOTime",($,U)=>{U.pattern??(U.pattern=J1(U)),s0.init($,U)}),i1=O0("$ZodISODuration",($,U)=>{U.pattern??(U.pattern=m6),s0.init($,U)}),e1=O0("$ZodIPv4",($,U)=>{U.pattern??(U.pattern=e6),s0.init($,U),$._zod.onattach.push((J)=>{let V=J._zod.bag;V.format="ipv4"})}),a1=O0("$ZodIPv6",($,U)=>{U.pattern??(U.pattern=a6),s0.init($,U),$._zod.onattach.push((J)=>{let V=J._zod.bag;V.format="ipv6"}),$._zod.check=(J)=>{try{new URL(`http://[${J.value}]`)}catch{J.issues.push({code:"invalid_format",format:"ipv6",input:J.value,inst:$,continue:!U.abort})}}}),s1=O0("$ZodCIDRv4",($,U)=>{U.pattern??(U.pattern=s6),s0.init($,U)}),$X=O0("$ZodCIDRv6",($,U)=>{U.pattern??(U.pattern=$1),s0.init($,U),$._zod.check=(J)=>{let[V,I]=J.value.split("/");try{if(!I)throw Error();let S=Number(I);if(`${S}`!==I)throw Error();if(S<0||S>128)throw Error();new URL(`http://[${V}]`)}catch{J.issues.push({code:"invalid_format",format:"cidrv6",input:J.value,inst:$,continue:!U.abort})}}});function UX($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var IX=O0("$ZodBase64",($,U)=>{U.pattern??(U.pattern=U1),s0.init($,U),$._zod.onattach.push((J)=>{J._zod.bag.contentEncoding="base64"}),$._zod.check=(J)=>{if(UX(J.value))return;J.issues.push({code:"invalid_format",format:"base64",input:J.value,inst:$,continue:!U.abort})}});function CY($){if(!VO.test($))return!1;let U=$.replace(/[-_]/g,(V)=>V==="-"?"+":"/"),J=U.padEnd(Math.ceil(U.length/4)*4,"=");return UX(J)}var OX=O0("$ZodBase64URL",($,U)=>{U.pattern??(U.pattern=VO),s0.init($,U),$._zod.onattach.push((J)=>{J._zod.bag.contentEncoding="base64url"}),$._zod.check=(J)=>{if(CY(J.value))return;J.issues.push({code:"invalid_format",format:"base64url",input:J.value,inst:$,continue:!U.abort})}}),XX=O0("$ZodE164",($,U)=>{U.pattern??(U.pattern=O1),s0.init($,U)});function kY($,U=null){try{let J=$.split(".");if(J.length!==3)return!1;let[V]=J;if(!V)return!1;let I=JSON.parse(atob(V));if("typ"in I&&I?.typ!=="JWT")return!1;if(!I.alg)return!1;if(U&&(!("alg"in I)||I.alg!==U))return!1;return!0}catch{return!1}}var JX=O0("$ZodJWT",($,U)=>{s0.init($,U),$._zod.check=(J)=>{if(kY(J.value,U.alg))return;J.issues.push({code:"invalid_format",format:"jwt",input:J.value,inst:$,continue:!U.abort})}}),QX=O0("$ZodCustomStringFormat",($,U)=>{s0.init($,U),$._zod.check=(J)=>{if(U.fn(J.value))return;J.issues.push({code:"invalid_format",format:U.format,input:J.value,inst:$,continue:!U.abort})}}),AO=O0("$ZodNumber",($,U)=>{l0.init($,U),$._zod.pattern=$._zod.bag.pattern??S1,$._zod.parse=(J,V)=>{if(U.coerce)try{J.value=Number(J.value)}catch(Y){}let I=J.value;if(typeof I==="number"&&!Number.isNaN(I)&&Number.isFinite(I))return J;let S=typeof I==="number"?Number.isNaN(I)?"NaN":!Number.isFinite(I)?"Infinity":void 0:void 0;return J.issues.push({expected:"number",code:"invalid_type",input:I,inst:$,...S?{received:S}:{}}),J}}),YX=O0("$ZodNumber",($,U)=>{F1.init($,U),AO.init($,U)}),AI=O0("$ZodBoolean",($,U)=>{l0.init($,U),$._zod.pattern=W1,$._zod.parse=(J,V)=>{if(U.coerce)try{J.value=Boolean(J.value)}catch(S){}let I=J.value;if(typeof I==="boolean")return J;return J.issues.push({expected:"boolean",code:"invalid_type",input:I,inst:$}),J}}),HO=O0("$ZodBigInt",($,U)=>{l0.init($,U),$._zod.pattern=G1,$._zod.parse=(J,V)=>{if(U.coerce)try{J.value=BigInt(J.value)}catch(I){}if(typeof J.value==="bigint")return J;return J.issues.push({expected:"bigint",code:"invalid_type",input:J.value,inst:$}),J}}),GX=O0("$ZodBigInt",($,U)=>{L1.init($,U),HO.init($,U)}),VX=O0("$ZodSymbol",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(typeof I==="symbol")return J;return J.issues.push({expected:"symbol",code:"invalid_type",input:I,inst:$}),J}}),SX=O0("$ZodUndefined",($,U)=>{l0.init($,U),$._zod.pattern=z1,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(J,V)=>{let I=J.value;if(typeof I>"u")return J;return J.issues.push({expected:"undefined",code:"invalid_type",input:I,inst:$}),J}}),WX=O0("$ZodNull",($,U)=>{l0.init($,U),$._zod.pattern=D1,$._zod.values=new Set([null]),$._zod.parse=(J,V)=>{let I=J.value;if(I===null)return J;return J.issues.push({expected:"null",code:"invalid_type",input:I,inst:$}),J}}),DX=O0("$ZodAny",($,U)=>{l0.init($,U),$._zod.parse=(J)=>J}),oU=O0("$ZodUnknown",($,U)=>{l0.init($,U),$._zod.parse=(J)=>J}),zX=O0("$ZodNever",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{return J.issues.push({expected:"never",code:"invalid_type",input:J.value,inst:$}),J}}),KX=O0("$ZodVoid",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(typeof I>"u")return J;return J.issues.push({expected:"void",code:"invalid_type",input:I,inst:$}),J}}),AX=O0("$ZodDate",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{if(U.coerce)try{J.value=new Date(J.value)}catch(M){}let I=J.value,S=I instanceof Date;if(S&&!Number.isNaN(I.getTime()))return J;return J.issues.push({expected:"date",code:"invalid_type",input:I,...S?{received:"Invalid Date"}:{},inst:$}),J}});function HY($,U,J){if($.issues.length)U.issues.push(...b$(J,$.issues));U.value[J]=$.value}var HI=O0("$ZodArray",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(!Array.isArray(I))return J.issues.push({expected:"array",code:"invalid_type",input:I,inst:$}),J;J.value=Array(I.length);let S=[];for(let Y=0;Y<I.length;Y++){let M=I[Y],T=U.element._zod.run({value:M,issues:[]},V);if(T instanceof Promise)S.push(T.then((L)=>HY(L,J,Y)));else HY(T,J,Y)}if(S.length)return Promise.all(S).then(()=>J);return J}});function zO($,U,J,V){if($.issues.length)U.issues.push(...b$(J,$.issues));if($.value===void 0){if(J in V)U.value[J]=void 0}else U.value[J]=$.value}var HX=O0("$ZodObject",($,U)=>{l0.init($,U);let J=YI(()=>{let F=Object.keys(U.shape);for(let P of F)if(!(U.shape[P]instanceof l0))throw Error(`Invalid element at key "${P}": expected a Zod schema`);let Z=B6(U.shape);return{shape:U.shape,keys:F,keySet:new Set(F),numKeys:F.length,optionalKeys:new Set(Z)}});t0($._zod,"propValues",()=>{let F=U.shape,Z={};for(let P in F){let q=F[P]._zod;if(q.values){Z[P]??(Z[P]=new Set);for(let k of q.values)Z[P].add(k)}}return Z});let V=(F)=>{let Z=new DO(["shape","payload","ctx"]),P=J.value,q=(g)=>{let N=UO(g);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};Z.write("const input = payload.value;");let k=Object.create(null),C=0;for(let g of P.keys)k[g]=`key_${C++}`;Z.write("const newResult = {}");for(let g of P.keys){let N=k[g],x=UO(g);Z.write(`const ${N} = ${q(g)};`),Z.write(`
24
- if (${N}.issues.length) {
25
- payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
16
+ https://github.com/browserify/crypto-browserify`)},$.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),i$=T2(sF(),1),$H=i$.prng,UH=i$.pseudoRandomBytes,IH=i$.rng,GY=i$.randomBytes,vH=i$.Hash,DH=i$.createHash,OH=i$.Hmac,VY=i$.createHmac,JH=i$.getHashes,XH=i$.pbkdf2,QH=i$.pbkdf2Sync,YH=i$.Cipher,GH=i$.createCipher,VH=i$.Cipheriv,WH=i$.createCipheriv,KH=i$.Decipher,zH=i$.createDecipher,SH=i$.Decipheriv,AH=i$.createDecipheriv,FH=i$.getCiphers,HH=i$.listCiphers,ZH=i$.DiffieHellmanGroup,LH=i$.createDiffieHellmanGroup,EH=i$.getDiffieHellman,TH=i$.createDiffieHellman,MH=i$.DiffieHellman,PH=i$.createSign,qH=i$.Sign,RH=i$.createVerify,gH=i$.Verify,kH=i$.createECDH,CH=i$.publicEncrypt,_H=i$.privateEncrypt,jH=i$.publicDecrypt,NH=i$.privateDecrypt,BH=i$.randomFill,xH=i$.randomFillSync,wH=i$.createCredentials,cH=i$.constants,hH=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];lH=crypto,bH=crypto});DU();class CY extends W0{config;pendingJobs=new Map;activeBatches=new Map;batchProcessor=null;defaultConfig={maxBatchSize:100,batchTimeoutMs:5000,maxConcurrentBatches:10,enablePrioritization:!0,priorityLevels:3};constructor($={}){super();this.config={...this.defaultConfig,...$},this.startBatchProcessor()}async addJob($){let I=$.endpoint.id;if(!this.pendingJobs.has(I))this.pendingJobs.set(I,[]);let D=this.pendingJobs.get(I);if(this.config.enablePrioritization)this.insertJobByPriority(D,$);else D.push($);if(D.length>=this.config.maxBatchSize)await this.processBatchForEndpoint(I);this.emit("jobAdded",{endpointId:I,jobId:$.id,queueSize:D.length})}async processBatchForEndpoint($){let I=this.pendingJobs.get($);if(!I||I.length===0)return null;if(this.activeBatches.size>=this.config.maxConcurrentBatches)return this.emit("batchSkipped",{endpointId:$,reason:"max_concurrent_batches"}),null;let D=I.splice(0,this.config.maxBatchSize),X=this.createBatch($,D);this.activeBatches.set(X.id,X);try{this.emit("batchStarted",{batchId:X.id,endpointId:$,jobCount:D.length}),await this.executeBatch(X,D),X.status="completed",this.emit("batchCompleted",{batchId:X.id,endpointId:$,success:!0})}catch(U){X.status="failed",this.emit("batchFailed",{batchId:X.id,endpointId:$,error:U instanceof Error?U.message:"Unknown error"}),this.requeueFailedJobs(D)}finally{this.activeBatches.delete(X.id)}return X}async processAllBatches(){let $=[],I=Array.from(this.pendingJobs.keys());for(let D of I){let X=await this.processBatchForEndpoint(D);if(X)$.push(X)}return $}getBatchStats(){let $=Array.from(this.pendingJobs.keys()),I=$.reduce((D,X)=>{return D+(this.pendingJobs.get(X)?.length||0)},0);return{pendingJobsCount:I,activeBatchesCount:this.activeBatches.size,endpointsWithPendingJobs:$.length,averageQueueSize:$.length>0?I/$.length:0}}getPendingJobCount($){return this.pendingJobs.get($)?.length||0}startBatchProcessor(){this.batchProcessor=setInterval(async()=>{try{await this.processAllBatches()}catch($){this.emit("processorError",$)}},this.config.batchTimeoutMs)}insertJobByPriority($,I){let D=0;for(let X=0;X<$.length;X++){if($[X].priority<=I.priority){D=X;break}D=X+1}$.splice(D,0,I)}createBatch($,I){return{id:`batch_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,endpointId:$,events:I.map((D)=>D.event),createdAt:new Date,scheduledAt:new Date,status:"processing"}}async executeBatch($,I){if(!I[0]?.endpoint)throw Error("No endpoint found for batch");let X=I.map((U)=>this.executeJob(U));try{let U=await Promise.allSettled(X),Q=U.filter((A)=>A.status==="fulfilled").length,J=U.length-Q;if(this.emit("batchExecuted",{batchId:$.id,endpointId:$.endpointId,total:U.length,successful:Q,failed:J}),J>0)throw Error(`Batch partially failed: ${J}/${U.length} jobs failed`)}catch(U){throw this.emit("batchExecutionError",{batchId:$.id,endpointId:$.endpointId,error:U instanceof Error?U.message:"Unknown error"}),U}}async executeJob($){let I={id:`delivery_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,endpointId:$.endpoint.id,eventId:$.event.id,url:$.endpoint.url,httpMethod:"POST",headers:{"Content-Type":"application/json"},payload:JSON.stringify($.event),attempts:[],status:"pending",createdAt:new Date},D=Math.random()>0.1;return I.attempts.push({attemptNumber:1,timestamp:new Date,httpStatus:D?200:500,responseBody:D?"OK":"Internal Server Error",error:D?void 0:"Server error",latencyMs:Math.floor(Math.random()*1000)+100}),I.status=D?"success":"failed",I.completedAt=new Date,I}requeueFailedJobs($){for(let I of $)if(I.attempts++,I.attempts<I.maxAttempts){let U=1000*2**(I.attempts-1);I.nextRetryAt=new Date(Date.now()+U),I.scheduledAt=I.nextRetryAt,setTimeout(()=>{this.addJob(I).catch((Q)=>{this.emit("requeueError",{jobId:I.id,error:Q instanceof Error?Q.message:"Unknown error"})})},U)}else this.emit("jobExhausted",{jobId:I.id,endpointId:I.endpoint.id,attempts:I.attempts})}async shutdown(){if(this.batchProcessor)clearInterval(this.batchProcessor),this.batchProcessor=null;let $=30000,I=Date.now();while(this.activeBatches.size>0&&Date.now()-I<$)await new Promise((D)=>setTimeout(D,100));this.emit("shutdown",{pendingJobs:this.getBatchStats().pendingJobsCount,activeBatches:this.activeBatches.size})}}DU();class _Y extends W0{config;endpointHealth=new Map;circuitBreakers=new Map;connectionCounts=new Map;roundRobinIndex=0;healthCheckInterval=null;defaultConfig={strategy:"round-robin",healthCheckInterval:30000,healthCheckTimeoutMs:5000,weights:{}};constructor($={}){super();this.config={...this.defaultConfig,...$},this.startHealthChecks()}async registerEndpoint($){let I={endpointId:$.id,isHealthy:!0,consecutiveFailures:0,lastHealthCheckAt:new Date,averageResponseTime:0,activeConnections:0};this.endpointHealth.set($.id,I),this.connectionCounts.set($.id,0),await this.checkEndpointHealth($),this.emit("endpointRegistered",{endpointId:$.id,isHealthy:I.isHealthy})}async unregisterEndpoint($){this.endpointHealth.delete($),this.circuitBreakers.delete($),this.connectionCounts.delete($),this.emit("endpointUnregistered",{endpointId:$})}async selectEndpoint($){let I=$.filter((X)=>{let U=this.endpointHealth.get(X.id),Q=this.circuitBreakers.get(X.id);return U?.isHealthy&&X.status==="active"&&Q?.state!=="open"});if(I.length===0){let X=this.tryHalfOpenEndpoint($);if(X)return X;return this.emit("noHealthyEndpoints",{totalEndpoints:$.length}),null}let D;switch(this.config.strategy){case"round-robin":D=this.selectRoundRobin(I);break;case"least-connections":D=this.selectLeastConnections(I);break;case"weighted":D=this.selectWeighted(I);break;case"random":D=this.selectRandom(I);break;default:D=I[0]}return this.incrementConnections(D.id),this.emit("endpointSelected",{endpointId:D.id,strategy:this.config.strategy,availableEndpoints:I.length}),D}async onRequestComplete($,I,D){this.decrementConnections($);let X=this.endpointHealth.get($);if(X){if(X.averageResponseTime===0)X.averageResponseTime=D;else X.averageResponseTime=X.averageResponseTime*0.8+D*0.2;if(I){X.consecutiveFailures=0,X.isHealthy=!0;let U=this.circuitBreakers.get($);if(U){if(U.state==="half-open")U.state="closed",U.failureCount=0,this.emit("circuitBreakerClosed",{endpointId:$})}}else{if(X.consecutiveFailures++,X.consecutiveFailures>=3)X.isHealthy=!1,this.emit("endpointUnhealthy",{endpointId:$,consecutiveFailures:X.consecutiveFailures});this.updateCircuitBreaker($,!1)}}this.emit("requestCompleted",{endpointId:$,success:I,responseTime:D,averageResponseTime:X?.averageResponseTime})}getEndpointHealth($){return this.endpointHealth.get($)||null}getAllEndpointHealth(){return Array.from(this.endpointHealth.values())}getStats(){let $=Array.from(this.endpointHealth.values()),I=Array.from(this.connectionCounts.values()).reduce((U,Q)=>U+Q,0),D=Array.from(this.circuitBreakers.values()).filter((U)=>U.state==="open").length,X=$.length>0?$.reduce((U,Q)=>U+Q.averageResponseTime,0)/$.length:0;return{totalEndpoints:$.length,healthyEndpoints:$.filter((U)=>U.isHealthy).length,activeConnections:I,circuitBreakersOpen:D,averageResponseTime:X}}selectRoundRobin($){let I=$[this.roundRobinIndex%$.length];return this.roundRobinIndex=(this.roundRobinIndex+1)%$.length,I}selectLeastConnections($){return $.reduce((I,D)=>{let X=this.connectionCounts.get(I.id)||0;return(this.connectionCounts.get(D.id)||0)<X?D:I})}selectWeighted($){let I=this.config.weights||{},D=$.reduce((U,Q)=>{return U+(I[Q.id]||1)},0),X=Math.random()*D;for(let U of $){let Q=I[U.id]||1;if(X-=Q,X<=0)return U}return $[0]}selectRandom($){let I=Math.floor(Math.random()*$.length);return $[I]}tryHalfOpenEndpoint($){let I=new Date;for(let D of $){let X=this.circuitBreakers.get(D.id);if(X?.state==="open"&&X.nextRetryTime&&I>=X.nextRetryTime)return X.state="half-open",this.emit("circuitBreakerHalfOpen",{endpointId:D.id}),D}return null}updateCircuitBreaker($,I){let D=this.circuitBreakers.get($);if(!D)D={endpointId:$,state:"closed",failureCount:0},this.circuitBreakers.set($,D);if(!I){if(D.failureCount++,D.lastFailureTime=new Date,D.failureCount>=5&&D.state==="closed")D.state="open",D.nextRetryTime=new Date(Date.now()+60000),this.emit("circuitBreakerOpened",{endpointId:$,failureCount:D.failureCount,nextRetryTime:D.nextRetryTime})}}incrementConnections($){let I=this.connectionCounts.get($)||0;this.connectionCounts.set($,I+1);let D=this.endpointHealth.get($);if(D)D.activeConnections=I+1}decrementConnections($){let I=this.connectionCounts.get($)||0,D=Math.max(0,I-1);this.connectionCounts.set($,D);let X=this.endpointHealth.get($);if(X)X.activeConnections=D}async checkEndpointHealth($){let I=Date.now();try{let D=await fetch($.url,{method:"HEAD",signal:AbortSignal.timeout(this.config.healthCheckTimeoutMs)}),X=Date.now()-I,U=D.ok;await this.onRequestComplete($.id,U,X),this.emit("healthCheckCompleted",{endpointId:$.id,success:U,responseTime:X,httpStatus:D.status})}catch(D){let X=Date.now()-I;await this.onRequestComplete($.id,!1,X),this.emit("healthCheckFailed",{endpointId:$.id,error:D instanceof Error?D.message:"Unknown error",responseTime:X})}}startHealthChecks(){this.healthCheckInterval=setInterval(async()=>{let $=Array.from(this.endpointHealth.keys());for(let I of $)if(this.endpointHealth.get(I)){let X={id:I,url:`https://webhook.example.com/${I}`,active:!0,events:[],createdAt:new Date,updatedAt:new Date,status:"active"};await this.checkEndpointHealth(X)}},this.config.healthCheckInterval)}async shutdown(){if(this.healthCheckInterval)clearInterval(this.healthCheckInterval),this.healthCheckInterval=null;this.emit("shutdown",{totalEndpoints:this.endpointHealth.size,activeConnections:Array.from(this.connectionCounts.values()).reduce(($,I)=>$+I,0)})}}DU();var $I=(()=>({}));function JU($){if(typeof $!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify($))}function jY($,I){var D="",X=0,U=-1,Q=0,J;for(var A=0;A<=$.length;++A){if(A<$.length)J=$.charCodeAt(A);else if(J===47)break;else J=47;if(J===47){if(U===A-1||Q===1);else if(U!==A-1&&Q===2){if(D.length<2||X!==2||D.charCodeAt(D.length-1)!==46||D.charCodeAt(D.length-2)!==46){if(D.length>2){var T=D.lastIndexOf("/");if(T!==D.length-1){if(T===-1)D="",X=0;else D=D.slice(0,T),X=D.length-1-D.lastIndexOf("/");U=A,Q=0;continue}}else if(D.length===2||D.length===1){D="",X=0,U=A,Q=0;continue}}if(I){if(D.length>0)D+="/..";else D="..";X=2}}else{if(D.length>0)D+="/"+$.slice(U+1,A);else D=$.slice(U+1,A);X=A-U-1}U=A,Q=0}else if(J===46&&Q!==-1)++Q;else Q=-1}return D}function WK($,I){var D=I.dir||I.root,X=I.base||(I.name||"")+(I.ext||"");if(!D)return X;if(D===I.root)return D+X;return D+$+X}function u4(){var $="",I=!1,D;for(var X=arguments.length-1;X>=-1&&!I;X--){var U;if(X>=0)U=arguments[X];else{if(D===void 0)D=process.cwd();U=D}if(JU(U),U.length===0)continue;$=U+"/"+$,I=U.charCodeAt(0)===47}if($=jY($,!I),I)if($.length>0)return"/"+$;else return"/";else if($.length>0)return $;else return"."}function NY($){if(JU($),$.length===0)return".";var I=$.charCodeAt(0)===47,D=$.charCodeAt($.length-1)===47;if($=jY($,!I),$.length===0&&!I)$=".";if($.length>0&&D)$+="/";if(I)return"/"+$;return $}function KK($){return JU($),$.length>0&&$.charCodeAt(0)===47}function j6(){if(arguments.length===0)return".";var $;for(var I=0;I<arguments.length;++I){var D=arguments[I];if(JU(D),D.length>0)if($===void 0)$=D;else $+="/"+D}if($===void 0)return".";return NY($)}function zK($,I){if(JU($),JU(I),$===I)return"";if($=u4($),I=u4(I),$===I)return"";var D=1;for(;D<$.length;++D)if($.charCodeAt(D)!==47)break;var X=$.length,U=X-D,Q=1;for(;Q<I.length;++Q)if(I.charCodeAt(Q)!==47)break;var J=I.length,A=J-Q,T=U<A?U:A,Z=-1,L=0;for(;L<=T;++L){if(L===T){if(A>T){if(I.charCodeAt(Q+L)===47)return I.slice(Q+L+1);else if(L===0)return I.slice(Q+L)}else if(U>T){if($.charCodeAt(D+L)===47)Z=L;else if(L===0)Z=0}break}var F=$.charCodeAt(D+L),E=I.charCodeAt(Q+L);if(F!==E)break;else if(F===47)Z=L}var P="";for(L=D+Z+1;L<=X;++L)if(L===X||$.charCodeAt(L)===47)if(P.length===0)P+="..";else P+="/..";if(P.length>0)return P+I.slice(Q+Z);else{if(Q+=Z,I.charCodeAt(Q)===47)++Q;return I.slice(Q)}}function SK($){return $}function SU($){if(JU($),$.length===0)return".";var I=$.charCodeAt(0),D=I===47,X=-1,U=!0;for(var Q=$.length-1;Q>=1;--Q)if(I=$.charCodeAt(Q),I===47){if(!U){X=Q;break}}else U=!1;if(X===-1)return D?"/":".";if(D&&X===1)return"//";return $.slice(0,X)}function AK($,I){if(I!==void 0&&typeof I!=="string")throw TypeError('"ext" argument must be a string');JU($);var D=0,X=-1,U=!0,Q;if(I!==void 0&&I.length>0&&I.length<=$.length){if(I.length===$.length&&I===$)return"";var J=I.length-1,A=-1;for(Q=$.length-1;Q>=0;--Q){var T=$.charCodeAt(Q);if(T===47){if(!U){D=Q+1;break}}else{if(A===-1)U=!1,A=Q+1;if(J>=0)if(T===I.charCodeAt(J)){if(--J===-1)X=Q}else J=-1,X=A}}if(D===X)X=A;else if(X===-1)X=$.length;return $.slice(D,X)}else{for(Q=$.length-1;Q>=0;--Q)if($.charCodeAt(Q)===47){if(!U){D=Q+1;break}}else if(X===-1)U=!1,X=Q+1;if(X===-1)return"";return $.slice(D,X)}}function FK($){JU($);var I=-1,D=0,X=-1,U=!0,Q=0;for(var J=$.length-1;J>=0;--J){var A=$.charCodeAt(J);if(A===47){if(!U){D=J+1;break}continue}if(X===-1)U=!1,X=J+1;if(A===46){if(I===-1)I=J;else if(Q!==1)Q=1}else if(I!==-1)Q=-1}if(I===-1||X===-1||Q===0||Q===1&&I===X-1&&I===D+1)return"";return $.slice(I,X)}function HK($){if($===null||typeof $!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof $);return WK("/",$)}function ZK($){JU($);var I={root:"",dir:"",base:"",ext:"",name:""};if($.length===0)return I;var D=$.charCodeAt(0),X=D===47,U;if(X)I.root="/",U=1;else U=0;var Q=-1,J=0,A=-1,T=!0,Z=$.length-1,L=0;for(;Z>=U;--Z){if(D=$.charCodeAt(Z),D===47){if(!T){J=Z+1;break}continue}if(A===-1)T=!1,A=Z+1;if(D===46){if(Q===-1)Q=Z;else if(L!==1)L=1}else if(Q!==-1)L=-1}if(Q===-1||A===-1||L===0||L===1&&Q===A-1&&Q===J+1){if(A!==-1)if(J===0&&X)I.base=I.name=$.slice(1,A);else I.base=I.name=$.slice(J,A)}else{if(J===0&&X)I.name=$.slice(1,Q),I.base=$.slice(1,A);else I.name=$.slice(J,Q),I.base=$.slice(J,A);I.ext=$.slice(Q,A)}if(J>0)I.dir=$.slice(0,J-1);else if(X)I.dir="/";return I}var LK="/",EK=":",tH=(($)=>($.posix=$,$))({resolve:u4,normalize:NY,isAbsolute:KK,join:j6,relative:zK,_makeLong:SK,dirname:SU,basename:AK,extname:FK,format:HK,parse:ZK,sep:LK,delimiter:EK,win32:null,posix:null});class BY extends W0{config;queues=new Map;highPriorityQueue=[];mediumPriorityQueue=[];lowPriorityQueue=[];delayedJobs=new Map;totalJobs=0;defaultConfig={maxQueueSize:1e4,persistToDisk:!1,compressionEnabled:!1,ttlMs:86400000};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.queues.set("high",this.highPriorityQueue),this.queues.set("medium",this.mediumPriorityQueue),this.queues.set("low",this.lowPriorityQueue),this.config.persistToDisk&&this.config.diskPath)this.loadFromDisk().catch((I)=>{this.emit("diskLoadError",I)});this.startTTLCleanup()}async enqueue($){if(this.totalJobs>=this.config.maxQueueSize)return this.emit("queueFull",{totalJobs:this.totalJobs,maxSize:this.config.maxQueueSize}),!1;if($.scheduledAt>new Date)return await this.scheduleDelayedJob($),!0;let I=this.getQueueName($.priority),D=this.queues.get(I);if(!D)throw Error(`Invalid queue name: ${I}`);if(D.push($),this.totalJobs++,this.emit("jobEnqueued",{jobId:$.id,priority:$.priority,queueName:I,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((X)=>{this.emit("diskSaveError",X)});return!0}async dequeue(){for(let[$,I]of this.queues.entries())if(I.length>0){let D=I.shift();if(this.totalJobs--,this.emit("jobDequeued",{jobId:D.id,queueName:$,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((X)=>{this.emit("diskSaveError",X)});return D}return null}async dequeueFromPriority($){let I=this.getQueueName($),D=this.queues.get(I);if(!D||D.length===0)return null;let X=D.shift();return this.totalJobs--,this.emit("jobDequeued",{jobId:X.id,queueName:I,totalJobs:this.totalJobs}),X}peek(){for(let $ of this.queues.values())if($.length>0)return $[0];return null}async removeJob($){for(let[D,X]of this.queues.entries()){let U=X.findIndex((Q)=>Q.id===$);if(U!==-1){if(X.splice(U,1),this.totalJobs--,this.emit("jobRemoved",{jobId:$,queueName:D,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((Q)=>{this.emit("diskSaveError",Q)});return!0}}let I=this.delayedJobs.get($);if(I)return clearTimeout(I),this.delayedJobs.delete($),this.emit("delayedJobCanceled",{jobId:$}),!0;return!1}getStats(){return{totalJobs:this.totalJobs,highPriorityJobs:this.highPriorityQueue.length,mediumPriorityJobs:this.mediumPriorityQueue.length,lowPriorityJobs:this.lowPriorityQueue.length,delayedJobs:this.delayedJobs.size,queueUtilization:this.totalJobs/this.config.maxQueueSize*100}}async clear(){for(let $ of this.queues.values())$.length=0;for(let $ of this.delayedJobs.values())clearTimeout($);if(this.delayedJobs.clear(),this.totalJobs=0,this.emit("queueCleared"),this.config.persistToDisk)await this.saveToDisk().catch(($)=>{this.emit("diskSaveError",$)})}async cleanupExpiredJobs(){let $=new Date,I=0;for(let[D,X]of this.queues.entries()){let U=X.length;for(let Q=X.length-1;Q>=0;Q--){let J=X[Q],A=$.getTime()-J.createdAt.getTime();if(A>this.config.ttlMs)X.splice(Q,1),this.totalJobs--,I++,this.emit("jobExpired",{jobId:J.id,queueName:D,age:A})}}if(I>0){if(this.emit("expiredJobsCleanup",{removedCount:I,totalJobs:this.totalJobs}),this.config.persistToDisk)await this.saveToDisk().catch((D)=>{this.emit("diskSaveError",D)})}return I}getQueueName($){if($>=8)return"high";if($>=5)return"medium";return"low"}async scheduleDelayedJob($){let I=$.scheduledAt.getTime()-Date.now(),D=setTimeout(async()=>{if(this.delayedJobs.delete($.id),await this.enqueue({...$,scheduledAt:new Date}))this.emit("delayedJobActivated",{jobId:$.id})},I);this.delayedJobs.set($.id,D),this.emit("jobScheduled",{jobId:$.id,scheduledAt:$.scheduledAt,delay:I})}startTTLCleanup(){setInterval(async()=>{try{await this.cleanupExpiredJobs()}catch($){this.emit("cleanupError",$)}},300000)}async saveToDisk(){if(!this.config.diskPath)return;try{let $={queues:{high:this.highPriorityQueue,medium:this.mediumPriorityQueue,low:this.lowPriorityQueue},totalJobs:this.totalJobs,timestamp:new Date().toISOString()},I=JSON.stringify($,null,2),D=j6(this.config.diskPath,"webhook-queue.json");await $I.mkdir(SU(D),{recursive:!0}),await $I.writeFile(D,I,"utf8"),this.emit("diskSaved",{filePath:D,totalJobs:this.totalJobs})}catch($){throw this.emit("diskSaveError",$),$}}async loadFromDisk(){if(!this.config.diskPath)return;try{let $=j6(this.config.diskPath,"webhook-queue.json"),I=await $I.readFile($,"utf8"),D=JSON.parse(I);this.highPriorityQueue.length=0,this.mediumPriorityQueue.length=0,this.lowPriorityQueue.length=0,this.highPriorityQueue.push(...D.queues.high||[]),this.mediumPriorityQueue.push(...D.queues.medium||[]),this.lowPriorityQueue.push(...D.queues.low||[]),this.totalJobs=D.totalJobs||0,this.emit("diskLoaded",{filePath:$,totalJobs:this.totalJobs,timestamp:D.timestamp})}catch($){if($.code!=="ENOENT")this.emit("diskLoadError",$)}}async shutdown(){for(let $ of this.delayedJobs.values())clearTimeout($);if(this.delayedJobs.clear(),this.config.persistToDisk)await this.saveToDisk().catch(($)=>{this.emit("diskSaveError",$)});this.emit("shutdown",{totalJobs:this.totalJobs})}}DU();var MU=(()=>({}));class xY extends W0{config;deliveries=new Map;indexByEndpoint=new Map;indexByStatus=new Map;indexByDate=new Map;cleanupInterval=null;defaultConfig={type:"memory",retentionDays:30,enableCompression:!1,maxMemoryUsage:104857600};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.startCleanupTask(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((I)=>{this.emit("loadError",I)})}async saveDelivery($){let I=this.deliveries.get($.id);if(I)this.removeFromIndexes(I);if(this.config.type==="memory"&&this.config.maxMemoryUsage)await this.checkMemoryUsage();if(this.deliveries.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.appendToFile($);this.emit("deliverySaved",{deliveryId:$.id,endpointId:$.endpointId,status:$.status})}async getDelivery($){return this.deliveries.get($)||null}async searchDeliveries($={},I={page:1,limit:100}){let D=null;if($.endpointId){let Z=this.indexByEndpoint.get($.endpointId);D=Z?new Set(Z):new Set}if($.status){let Z=this.indexByStatus.get($.status);if(D)D=new Set(Array.from(D).filter((L)=>Z?.has(L)));else D=Z?new Set(Z):new Set}if($.createdAfter||$.createdBefore){let Z=this.getDeliveryIdsByDateRange($.createdAfter,$.createdBefore);if(D)D=new Set(Array.from(D).filter((L)=>Z.has(L)));else D=Z}if(!D)D=new Set(this.deliveries.keys());let X=Array.from(D).map((Z)=>this.deliveries.get(Z)).filter((Z)=>this.matchesFilter(Z,$));X.sort((Z,L)=>{if(I.sortBy==="createdAt"||!I.sortBy){let R=L.createdAt.getTime()-Z.createdAt.getTime();return I.sortOrder==="asc"?-R:R}let F=this.getFieldValue(Z,I.sortBy),E=this.getFieldValue(L,I.sortBy),P=0;if(F<E)P=-1;else if(F>E)P=1;return I.sortOrder==="desc"?-P:P});let U=X.length,Q=Math.ceil(U/I.limit),J=(I.page-1)*I.limit,A=J+I.limit;return{items:X.slice(J,A),totalCount:U,page:I.page,totalPages:Q,hasNext:I.page<Q,hasPrevious:I.page>1}}async getDeliveriesByEndpoint($,I=100){let D=this.indexByEndpoint.get($);if(!D)return[];return Array.from(D).map((X)=>this.deliveries.get(X)).sort((X,U)=>U.createdAt.getTime()-X.createdAt.getTime()).slice(0,I)}async getFailedDeliveries($,I=100){let D={status:"failed",endpointId:$};return(await this.searchDeliveries(D,{page:1,limit:I})).items}async getDeliveryStats($,I){let D={endpointId:$,createdAfter:I?.start,createdBefore:I?.end},U=(await this.searchDeliveries(D,{page:1,limit:1e4})).items,Q=U.filter((P)=>P.status==="success"),J=U.filter((P)=>P.status==="failed"),A=U.filter((P)=>P.status==="pending"),T=U.filter((P)=>P.status==="exhausted"),Z=U.filter((P)=>P.completedAt),L=Z.reduce((P,R)=>{let k=R.attempts[R.attempts.length-1];return P+(k?.latencyMs||0)},0),F=Z.length>0?L/Z.length:0,E={};for(let P of[...J,...T]){let R=P.attempts[P.attempts.length-1];if(R?.error)E[R.error]=(E[R.error]||0)+1;else if(R?.httpStatus){let k=`HTTP ${R.httpStatus}`;E[k]=(E[k]||0)+1}}return{totalDeliveries:U.length,successfulDeliveries:Q.length,failedDeliveries:J.length,pendingDeliveries:A.length,exhaustedDeliveries:T.length,averageLatency:F,successRate:U.length>0?Q.length/U.length*100:0,errorBreakdown:E}}async cleanupOldDeliveries(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let I=Array.from(this.deliveries.values()).filter((D)=>D.createdAt<$);for(let D of I)this.removeFromIndexes(D),this.deliveries.delete(D.id);if(I.length>0){if(this.emit("oldDeliveriesCleanup",{removedCount:I.length,cutoffDate:$}),this.config.type==="file")await this.saveToFile()}return I.length}getStorageStats(){let $=this.estimateMemoryUsage();return{totalDeliveries:this.deliveries.size,memoryUsage:$,indexSizes:{byEndpoint:this.indexByEndpoint.size,byStatus:this.indexByStatus.size,byDate:this.indexByDate.size}}}initializeIndexes(){let $=["pending","success","failed","exhausted"];for(let I of $)this.indexByStatus.set(I,new Set)}addToIndexes($){if(!this.indexByEndpoint.has($.endpointId))this.indexByEndpoint.set($.endpointId,new Set);this.indexByEndpoint.get($.endpointId).add($.id);let I=this.indexByStatus.get($.status);if(I)I.add($.id);let D=$.createdAt.toISOString().split("T")[0];if(!this.indexByDate.has(D))this.indexByDate.set(D,new Set);this.indexByDate.get(D).add($.id)}removeFromIndexes($){let I=this.indexByEndpoint.get($.endpointId);if(I){if(I.delete($.id),I.size===0)this.indexByEndpoint.delete($.endpointId)}let D=this.indexByStatus.get($.status);if(D)D.delete($.id);let X=$.createdAt.toISOString().split("T")[0],U=this.indexByDate.get(X);if(U){if(U.delete($.id),U.size===0)this.indexByDate.delete(X)}}getDeliveryIdsByDateRange($,I){let D=new Set;for(let[X,U]of this.indexByDate.entries()){let Q=new Date(X);if($&&Q<$)continue;if(I&&Q>I)continue;U.forEach((J)=>{D.add(J)})}return D}matchesFilter($,I){if(I.eventId&&$.eventId!==I.eventId)return!1;if(I.httpStatusCode&&I.httpStatusCode.length>0){let D=$.attempts[$.attempts.length-1];if(!D?.httpStatus||!I.httpStatusCode.includes(D.httpStatus))return!1}if(I.hasError!==void 0){let D=$.attempts.some((X)=>X.error);if(I.hasError!==D)return!1}if(I.completedAfter&&(!$.completedAt||$.completedAt<I.completedAfter))return!1;if(I.completedBefore&&(!$.completedAt||$.completedAt>I.completedBefore))return!1;return!0}getFieldValue($,I){return I.split(".").reduce((D,X)=>D?.[X],$)}estimateMemoryUsage(){let $=0;for(let I of this.deliveries.values())$+=JSON.stringify(I).length*2;return $}async checkMemoryUsage(){if(!this.config.maxMemoryUsage)return;let $=this.estimateMemoryUsage();if($>this.config.maxMemoryUsage){let I=Array.from(this.deliveries.values()).sort((U,Q)=>U.createdAt.getTime()-Q.createdAt.getTime()),D=0,X=this.config.maxMemoryUsage*0.8;for(let U of I){if(this.estimateMemoryUsage()<=X)break;this.removeFromIndexes(U),this.deliveries.delete(U.id),D++}if(D>0)this.emit("memoryCleanup",{removedCount:D,previousUsage:$,currentUsage:this.estimateMemoryUsage()})}}startCleanupTask(){this.cleanupInterval=setInterval(async()=>{try{await this.cleanupOldDeliveries(),await this.checkMemoryUsage()}catch($){this.emit("cleanupError",$)}},3600000)}async appendToFile($){if(!this.config.filePath)return;try{let I=JSON.stringify($)+`
17
+ `;await MU.appendFile(this.config.filePath,I,"utf8")}catch(I){this.emit("appendError",I)}}async loadFromFile(){if(!this.config.filePath)return;try{let I=(await MU.readFile(this.config.filePath,"utf8")).trim().split(`
18
+ `).filter((D)=>D.trim());for(let D of I)try{let X=JSON.parse(D),U={...X,createdAt:new Date(X.createdAt),completedAt:X.completedAt?new Date(X.completedAt):void 0,nextRetryAt:X.nextRetryAt?new Date(X.nextRetryAt):void 0,attempts:X.attempts.map((Q)=>({...Q,timestamp:new Date(Q.timestamp)}))};this.deliveries.set(U.id,U),this.addToIndexes(U)}catch(X){this.emit("parseError",{line:D,error:X})}this.emit("dataLoaded",{filePath:this.config.filePath,deliveryCount:this.deliveries.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $=Array.from(this.deliveries.values()).map((I)=>JSON.stringify(I)).join(`
19
+ `);await MU.mkdir(SU(this.config.filePath),{recursive:!0}),await MU.writeFile(this.config.filePath,$+`
20
+ `,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,deliveryCount:this.deliveries.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null;if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{deliveryCount:this.deliveries.size})}}DU();var jI=(()=>({}));var b$={};i0(b$,{xor:()=>XV,xid:()=>_G,void:()=>UV,uuidv7:()=>TG,uuidv6:()=>EG,uuidv4:()=>LG,uuid:()=>ZG,util:()=>y$,url:()=>MG,uppercase:()=>WI,unknown:()=>dU,union:()=>J4,undefined:()=>sG,ulid:()=>CG,uint64:()=>eG,uint32:()=>mG,tuple:()=>IQ,trim:()=>HI,treeifyError:()=>e4,transform:()=>Q4,toUpperCase:()=>LI,toLowerCase:()=>ZI,toJSONSchema:()=>Bv,templateLiteral:()=>LV,symbol:()=>aG,superRefine:()=>CQ,success:()=>FV,stringbool:()=>kV,stringFormat:()=>pG,string:()=>uv,strictObject:()=>OV,startsWith:()=>zI,slugify:()=>EI,size:()=>rU,setErrorMap:()=>aS,set:()=>WV,safeParseAsync:()=>_X,safeParse:()=>CX,safeEncodeAsync:()=>fX,safeEncode:()=>wX,safeDecodeAsync:()=>yX,safeDecode:()=>cX,registry:()=>Dv,regexes:()=>UU,regex:()=>GI,refine:()=>kQ,record:()=>vQ,readonly:()=>TQ,property:()=>Cv,promise:()=>EV,prettifyError:()=>a4,preprocess:()=>_V,prefault:()=>SQ,positive:()=>qv,pipe:()=>V6,partialRecord:()=>YV,parseAsync:()=>kX,parse:()=>gX,overwrite:()=>OU,optional:()=>Y6,object:()=>DV,number:()=>hX,nullish:()=>AV,nullable:()=>G6,null:()=>oX,normalize:()=>FI,nonpositive:()=>gv,nonoptional:()=>AQ,nonnegative:()=>kv,never:()=>O4,negative:()=>Rv,nativeEnum:()=>KV,nanoid:()=>RG,nan:()=>HV,multipleOf:()=>kU,minSize:()=>GU,minLength:()=>FU,mime:()=>AI,meta:()=>RV,maxSize:()=>CU,maxLength:()=>oU,map:()=>VV,mac:()=>BG,lte:()=>a0,lt:()=>QU,lowercase:()=>VI,looseRecord:()=>GV,looseObject:()=>JV,locales:()=>D6,literal:()=>zV,length:()=>nU,lazy:()=>qQ,ksuid:()=>jG,keyof:()=>vV,jwt:()=>hG,json:()=>CV,iso:()=>PI,ipv6:()=>xG,ipv4:()=>NG,intersection:()=>$Q,int64:()=>iG,int32:()=>dG,int:()=>hv,instanceof:()=>gV,includes:()=>KI,httpUrl:()=>PG,hostname:()=>lG,hex:()=>bG,hash:()=>rG,guid:()=>HG,gte:()=>u0,gt:()=>YU,globalRegistry:()=>x0,getErrorMap:()=>sS,function:()=>TV,fromJSONSchema:()=>NV,formatError:()=>dI,float64:()=>nG,float32:()=>oG,flattenError:()=>nI,file:()=>SV,exactOptional:()=>GQ,enum:()=>X4,endsWith:()=>SI,encodeAsync:()=>BX,encode:()=>jX,emoji:()=>qG,email:()=>FG,e164:()=>uG,discriminatedUnion:()=>QV,describe:()=>qV,decodeAsync:()=>xX,decode:()=>NX,date:()=>IV,custom:()=>PV,cuid2:()=>kG,cuid:()=>gG,core:()=>HU,config:()=>V0,coerce:()=>jQ,codec:()=>ZV,clone:()=>y0,cidrv6:()=>cG,cidrv4:()=>wG,check:()=>MV,catch:()=>ZQ,boolean:()=>pX,bigint:()=>tG,base64url:()=>yG,base64:()=>fG,array:()=>z6,any:()=>$V,_function:()=>TV,_default:()=>KQ,_ZodString:()=>pv,ZodXor:()=>eX,ZodXID:()=>mv,ZodVoid:()=>tX,ZodUnknown:()=>dX,ZodUnion:()=>A6,ZodUndefined:()=>bX,ZodUUID:()=>VU,ZodURL:()=>W6,ZodULID:()=>dv,ZodType:()=>d$,ZodTuple:()=>UQ,ZodTransform:()=>QQ,ZodTemplateLiteral:()=>MQ,ZodSymbol:()=>lX,ZodSuccess:()=>FQ,ZodStringFormat:()=>I0,ZodString:()=>RI,ZodSet:()=>OQ,ZodRecord:()=>F6,ZodRealError:()=>o0,ZodReadonly:()=>EQ,ZodPromise:()=>RQ,ZodPrefault:()=>zQ,ZodPipe:()=>V4,ZodOptional:()=>Y4,ZodObject:()=>S6,ZodNumberFormat:()=>mU,ZodNumber:()=>kI,ZodNullable:()=>VQ,ZodNull:()=>rX,ZodNonOptional:()=>G4,ZodNever:()=>mX,ZodNanoID:()=>rv,ZodNaN:()=>LQ,ZodMap:()=>DQ,ZodMAC:()=>uX,ZodLiteral:()=>JQ,ZodLazy:()=>PQ,ZodKSUID:()=>tv,ZodJWT:()=>v4,ZodIssueCode:()=>eS,ZodIntersection:()=>sX,ZodISOTime:()=>fv,ZodISODuration:()=>yv,ZodISODateTime:()=>wv,ZodISODate:()=>cv,ZodIPv6:()=>ev,ZodIPv4:()=>iv,ZodGUID:()=>Q6,ZodFunction:()=>gQ,ZodFirstPartyTypeKind:()=>_Q,ZodFile:()=>XQ,ZodExactOptional:()=>YQ,ZodError:()=>tS,ZodEnum:()=>qI,ZodEmoji:()=>bv,ZodEmail:()=>lv,ZodE164:()=>I4,ZodDiscriminatedUnion:()=>aX,ZodDefault:()=>WQ,ZodDate:()=>K6,ZodCustomStringFormat:()=>gI,ZodCustom:()=>H6,ZodCodec:()=>W4,ZodCatch:()=>HQ,ZodCUID2:()=>nv,ZodCUID:()=>ov,ZodCIDRv6:()=>sv,ZodCIDRv4:()=>av,ZodBoolean:()=>CI,ZodBigIntFormat:()=>D4,ZodBigInt:()=>_I,ZodBase64URL:()=>U4,ZodBase64:()=>$4,ZodArray:()=>iX,ZodAny:()=>nX,TimePrecision:()=>IJ,NEVER:()=>h4,$output:()=>iO,$input:()=>eO,$brand:()=>p4});var HU={};i0(HU,{version:()=>d1,util:()=>y$,treeifyError:()=>e4,toJSONSchema:()=>Bv,toDotPath:()=>hY,safeParseAsync:()=>$1,safeParse:()=>s4,safeEncodeAsync:()=>$z,safeEncode:()=>aK,safeDecodeAsync:()=>Uz,safeDecode:()=>sK,registry:()=>Dv,regexes:()=>UU,process:()=>a$,prettifyError:()=>a4,parseAsync:()=>c6,parse:()=>w6,meta:()=>cJ,locales:()=>D6,isValidJWT:()=>OG,isValidBase64URL:()=>DG,isValidBase64:()=>SD,initializeContext:()=>_U,globalRegistry:()=>x0,globalConfig:()=>yI,formatError:()=>dI,flattenError:()=>nI,finalize:()=>NU,extractDefs:()=>jU,encodeAsync:()=>iK,encode:()=>mK,describe:()=>wJ,decodeAsync:()=>eK,decode:()=>tK,createToJSONSchemaMethod:()=>yJ,createStandardJSONSchemaMethod:()=>MI,config:()=>V0,clone:()=>y0,_xor:()=>qS,_xid:()=>Sv,_void:()=>RJ,_uuidv7:()=>Yv,_uuidv6:()=>Qv,_uuidv4:()=>Xv,_uuid:()=>Jv,_url:()=>J6,_uppercase:()=>WI,_unknown:()=>PJ,_union:()=>PS,_undefined:()=>EJ,_ulid:()=>zv,_uint64:()=>ZJ,_uint32:()=>KJ,_tuple:()=>kS,_trim:()=>HI,_transform:()=>wS,_toUpperCase:()=>LI,_toLowerCase:()=>ZI,_templateLiteral:()=>rS,_symbol:()=>LJ,_superRefine:()=>xJ,_success:()=>hS,_stringbool:()=>fJ,_stringFormat:()=>TI,_string:()=>sO,_startsWith:()=>zI,_slugify:()=>EI,_size:()=>rU,_set:()=>jS,_safeParseAsync:()=>XI,_safeParse:()=>JI,_safeEncodeAsync:()=>b6,_safeEncode:()=>p6,_safeDecodeAsync:()=>r6,_safeDecode:()=>l6,_regex:()=>GI,_refine:()=>BJ,_record:()=>CS,_readonly:()=>bS,_property:()=>Cv,_promise:()=>nS,_positive:()=>qv,_pipe:()=>lS,_parseAsync:()=>OI,_parse:()=>DI,_overwrite:()=>OU,_optional:()=>cS,_number:()=>XJ,_nullable:()=>fS,_null:()=>TJ,_normalize:()=>FI,_nonpositive:()=>gv,_nonoptional:()=>uS,_nonnegative:()=>kv,_never:()=>qJ,_negative:()=>Rv,_nativeEnum:()=>BS,_nanoid:()=>Vv,_nan:()=>CJ,_multipleOf:()=>kU,_minSize:()=>GU,_minLength:()=>FU,_min:()=>u0,_mime:()=>AI,_maxSize:()=>CU,_maxLength:()=>oU,_max:()=>a0,_map:()=>_S,_mac:()=>UJ,_lte:()=>a0,_lt:()=>QU,_lowercase:()=>VI,_literal:()=>xS,_length:()=>nU,_lazy:()=>oS,_ksuid:()=>Av,_jwt:()=>Pv,_isoTime:()=>OJ,_isoDuration:()=>JJ,_isoDateTime:()=>vJ,_isoDate:()=>DJ,_ipv6:()=>Hv,_ipv4:()=>Fv,_intersection:()=>gS,_int64:()=>HJ,_int32:()=>WJ,_int:()=>YJ,_includes:()=>KI,_guid:()=>O6,_gte:()=>u0,_gt:()=>YU,_float64:()=>VJ,_float32:()=>GJ,_file:()=>jJ,_enum:()=>NS,_endsWith:()=>SI,_encodeAsync:()=>u6,_encode:()=>f6,_emoji:()=>Gv,_email:()=>Ov,_e164:()=>Mv,_discriminatedUnion:()=>RS,_default:()=>yS,_decodeAsync:()=>h6,_decode:()=>y6,_date:()=>gJ,_custom:()=>NJ,_cuid2:()=>Kv,_cuid:()=>Wv,_coercedString:()=>$J,_coercedNumber:()=>QJ,_coercedDate:()=>kJ,_coercedBoolean:()=>SJ,_coercedBigint:()=>FJ,_cidrv6:()=>Lv,_cidrv4:()=>Zv,_check:()=>zG,_catch:()=>pS,_boolean:()=>zJ,_bigint:()=>AJ,_base64url:()=>Tv,_base64:()=>Ev,_array:()=>_J,_any:()=>MJ,TimePrecision:()=>IJ,NEVER:()=>h4,JSONSchemaGenerator:()=>TX,JSONSchema:()=>SG,Doc:()=>m6,$output:()=>iO,$input:()=>eO,$constructor:()=>$$,$brand:()=>p4,$ZodXor:()=>BD,$ZodXID:()=>DD,$ZodVoid:()=>CD,$ZodUnknown:()=>gD,$ZodUnion:()=>aI,$ZodUndefined:()=>PD,$ZodUUID:()=>i1,$ZodURL:()=>a1,$ZodULID:()=>vD,$ZodType:()=>o$,$ZodTuple:()=>Iv,$ZodTransform:()=>lD,$ZodTemplateLiteral:()=>sD,$ZodSymbol:()=>MD,$ZodSuccess:()=>mD,$ZodStringFormat:()=>U0,$ZodString:()=>bU,$ZodSet:()=>yD,$ZodRegistry:()=>aO,$ZodRecord:()=>cD,$ZodRealError:()=>r0,$ZodReadonly:()=>aD,$ZodPromise:()=>UO,$ZodPrefault:()=>nD,$ZodPipe:()=>eD,$ZodOptional:()=>vv,$ZodObjectJIT:()=>ND,$ZodObject:()=>QG,$ZodNumberFormat:()=>ED,$ZodNumber:()=>$v,$ZodNullable:()=>rD,$ZodNull:()=>qD,$ZodNonOptional:()=>dD,$ZodNever:()=>kD,$ZodNanoID:()=>$D,$ZodNaN:()=>iD,$ZodMap:()=>fD,$ZodMAC:()=>WD,$ZodLiteral:()=>hD,$ZodLazy:()=>IO,$ZodKSUID:()=>OD,$ZodJWT:()=>ZD,$ZodIntersection:()=>wD,$ZodISOTime:()=>QD,$ZodISODuration:()=>YD,$ZodISODateTime:()=>JD,$ZodISODate:()=>XD,$ZodIPv6:()=>VD,$ZodIPv4:()=>GD,$ZodGUID:()=>t1,$ZodFunction:()=>$O,$ZodFile:()=>pD,$ZodExactOptional:()=>bD,$ZodError:()=>oI,$ZodEnum:()=>uD,$ZodEncodeError:()=>hU,$ZodEmoji:()=>s1,$ZodEmail:()=>e1,$ZodE164:()=>HD,$ZodDiscriminatedUnion:()=>xD,$ZodDefault:()=>oD,$ZodDate:()=>_D,$ZodCustomStringFormat:()=>LD,$ZodCustom:()=>vO,$ZodCodec:()=>sI,$ZodCheckUpperCase:()=>h1,$ZodCheckStringFormat:()=>QI,$ZodCheckStartsWith:()=>l1,$ZodCheckSizeEquals:()=>x1,$ZodCheckRegex:()=>y1,$ZodCheckProperty:()=>r1,$ZodCheckOverwrite:()=>n1,$ZodCheckNumberFormat:()=>_1,$ZodCheckMultipleOf:()=>C1,$ZodCheckMinSize:()=>B1,$ZodCheckMinLength:()=>c1,$ZodCheckMimeType:()=>o1,$ZodCheckMaxSize:()=>N1,$ZodCheckMaxLength:()=>w1,$ZodCheckLowerCase:()=>u1,$ZodCheckLessThan:()=>n6,$ZodCheckLengthEquals:()=>f1,$ZodCheckIncludes:()=>p1,$ZodCheckGreaterThan:()=>d6,$ZodCheckEndsWith:()=>b1,$ZodCheckBigIntFormat:()=>j1,$ZodCheck:()=>D0,$ZodCatch:()=>tD,$ZodCUID2:()=>ID,$ZodCUID:()=>UD,$ZodCIDRv6:()=>zD,$ZodCIDRv4:()=>KD,$ZodBoolean:()=>eI,$ZodBigIntFormat:()=>TD,$ZodBigInt:()=>Uv,$ZodBase64URL:()=>FD,$ZodBase64:()=>AD,$ZodAsyncError:()=>XU,$ZodArray:()=>jD,$ZodAny:()=>RD});var h4=Object.freeze({status:"aborted"});function $$($,I,D){function X(A,T){if(!A._zod)Object.defineProperty(A,"_zod",{value:{def:T,constr:J,traits:new Set},enumerable:!1});if(A._zod.traits.has($))return;A._zod.traits.add($),I(A,T);let Z=J.prototype,L=Object.keys(Z);for(let F=0;F<L.length;F++){let E=L[F];if(!(E in A))A[E]=Z[E].bind(A)}}let U=D?.Parent??Object;class Q extends U{}Object.defineProperty(Q,"name",{value:$});function J(A){var T;let Z=D?.Parent?new Q:this;X(Z,A),(T=Z._zod).deferred??(T.deferred=[]);for(let L of Z._zod.deferred)L();return Z}return Object.defineProperty(J,"init",{value:X}),Object.defineProperty(J,Symbol.hasInstance,{value:(A)=>{if(D?.Parent&&A instanceof D.Parent)return!0;return A?._zod?.traits?.has($)}}),Object.defineProperty(J,"name",{value:$}),J}var p4=Symbol("zod_brand");class XU extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class hU extends Error{constructor($){super(`Encountered unidirectional transform during encode: ${$}`);this.name="ZodEncodeError"}}var yI={};function V0($){if($)Object.assign(yI,$);return yI}var y$={};i0(y$,{unwrapMessage:()=>uI,uint8ArrayToHex:()=>nK,uint8ArrayToBase64url:()=>rK,uint8ArrayToBase64:()=>fY,stringifyPrimitive:()=>c$,slugify:()=>r4,shallowClone:()=>n4,safeExtend:()=>yK,required:()=>pK,randomString:()=>jK,propertyKeyTypes:()=>lI,promiseAllObject:()=>_K,primitiveTypes:()=>d4,prefixIssues:()=>e0,pick:()=>wK,partial:()=>hK,parsedType:()=>f$,optionalKeys:()=>m4,omit:()=>cK,objectClone:()=>gK,numKeys:()=>NK,nullish:()=>PU,normalizeParams:()=>u$,mergeDefs:()=>AU,merge:()=>uK,jsonStringifyReplacer:()=>UI,joinValues:()=>Q$,issue:()=>vI,isPlainObject:()=>RU,isObject:()=>pU,hexToUint8Array:()=>oK,getSizableOrigin:()=>bI,getParsedType:()=>BK,getLengthableOrigin:()=>rI,getEnumValues:()=>hI,getElementAtPath:()=>CK,floatSafeRemainder:()=>b4,finalizeIssue:()=>b0,extend:()=>fK,escapeRegex:()=>$U,esc:()=>B6,defineLazy:()=>t$,createTransparentProxy:()=>xK,cloneDef:()=>kK,clone:()=>y0,cleanRegex:()=>pI,cleanEnum:()=>lK,captureStackTrace:()=>x6,cached:()=>II,base64urlToUint8Array:()=>bK,base64ToUint8Array:()=>cY,assignProp:()=>qU,assertNotEqual:()=>MK,assertNever:()=>qK,assertIs:()=>PK,assertEqual:()=>TK,assert:()=>RK,allowsEval:()=>o4,aborted:()=>gU,NUMBER_FORMAT_RANGES:()=>t4,Class:()=>yY,BIGINT_FORMAT_RANGES:()=>i4});function TK($){return $}function MK($){return $}function PK($){}function qK($){throw Error("Unexpected value in exhaustive check")}function RK($){}function hI($){let I=Object.values($).filter((X)=>typeof X==="number");return Object.entries($).filter(([X,U])=>I.indexOf(+X)===-1).map(([X,U])=>U)}function Q$($,I="|"){return $.map((D)=>c$(D)).join(I)}function UI($,I){if(typeof I==="bigint")return I.toString();return I}function II($){return{get value(){{let D=$();return Object.defineProperty(this,"value",{value:D}),D}throw Error("cached value already set")}}}function PU($){return $===null||$===void 0}function pI($){let I=$.startsWith("^")?1:0,D=$.endsWith("$")?$.length-1:$.length;return $.slice(I,D)}function b4($,I){let D=($.toString().split(".")[1]||"").length,X=I.toString(),U=(X.split(".")[1]||"").length;if(U===0&&/\d?e-\d?/.test(X)){let T=X.match(/\d?e-(\d?)/);if(T?.[1])U=Number.parseInt(T[1])}let Q=D>U?D:U,J=Number.parseInt($.toFixed(Q).replace(".","")),A=Number.parseInt(I.toFixed(Q).replace(".",""));return J%A/10**Q}var wY=Symbol("evaluating");function t$($,I,D){let X=void 0;Object.defineProperty($,I,{get(){if(X===wY)return;if(X===void 0)X=wY,X=D();return X},set(U){Object.defineProperty($,I,{value:U})},configurable:!0})}function gK($){return Object.create(Object.getPrototypeOf($),Object.getOwnPropertyDescriptors($))}function qU($,I,D){Object.defineProperty($,I,{value:D,writable:!0,enumerable:!0,configurable:!0})}function AU(...$){let I={};for(let D of $){let X=Object.getOwnPropertyDescriptors(D);Object.assign(I,X)}return Object.defineProperties({},I)}function kK($){return AU($._zod.def)}function CK($,I){if(!I)return $;return I.reduce((D,X)=>D?.[X],$)}function _K($){let I=Object.keys($),D=I.map((X)=>$[X]);return Promise.all(D).then((X)=>{let U={};for(let Q=0;Q<I.length;Q++)U[I[Q]]=X[Q];return U})}function jK($=10){let D="";for(let X=0;X<$;X++)D+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return D}function B6($){return JSON.stringify($)}function r4($){return $.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var x6="captureStackTrace"in Error?Error.captureStackTrace:(...$)=>{};function pU($){return typeof $==="object"&&$!==null&&!Array.isArray($)}var o4=II(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch($){return!1}});function RU($){if(pU($)===!1)return!1;let I=$.constructor;if(I===void 0)return!0;if(typeof I!=="function")return!0;let D=I.prototype;if(pU(D)===!1)return!1;if(Object.prototype.hasOwnProperty.call(D,"isPrototypeOf")===!1)return!1;return!0}function n4($){if(RU($))return{...$};if(Array.isArray($))return[...$];return $}function NK($){let I=0;for(let D in $)if(Object.prototype.hasOwnProperty.call($,D))I++;return I}var BK=($)=>{let I=typeof $;switch(I){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN($)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray($))return"array";if($===null)return"null";if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return"promise";if(typeof Map<"u"&&$ instanceof Map)return"map";if(typeof Set<"u"&&$ instanceof Set)return"set";if(typeof Date<"u"&&$ instanceof Date)return"date";if(typeof File<"u"&&$ instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${I}`)}},lI=new Set(["string","number","symbol"]),d4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $U($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y0($,I,D){let X=new $._zod.constr(I??$._zod.def);if(!I||D?.parent)X._zod.parent=$;return X}function u$($){let I=$;if(!I)return{};if(typeof I==="string")return{error:()=>I};if(I?.message!==void 0){if(I?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");I.error=I.message}if(delete I.message,typeof I.error==="string")return{...I,error:()=>I.error};return I}function xK($){let I;return new Proxy({},{get(D,X,U){return I??(I=$()),Reflect.get(I,X,U)},set(D,X,U,Q){return I??(I=$()),Reflect.set(I,X,U,Q)},has(D,X){return I??(I=$()),Reflect.has(I,X)},deleteProperty(D,X){return I??(I=$()),Reflect.deleteProperty(I,X)},ownKeys(D){return I??(I=$()),Reflect.ownKeys(I)},getOwnPropertyDescriptor(D,X){return I??(I=$()),Reflect.getOwnPropertyDescriptor(I,X)},defineProperty(D,X,U){return I??(I=$()),Reflect.defineProperty(I,X,U)}})}function c$($){if(typeof $==="bigint")return $.toString()+"n";if(typeof $==="string")return`"${$}"`;return`${$}`}function m4($){return Object.keys($).filter((I)=>{return $[I]._zod.optin==="optional"&&$[I]._zod.optout==="optional"})}var t4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},i4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function wK($,I){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let Q=AU($._zod.def,{get shape(){let J={};for(let A in I){if(!(A in D.shape))throw Error(`Unrecognized key: "${A}"`);if(!I[A])continue;J[A]=D.shape[A]}return qU(this,"shape",J),J},checks:[]});return y0($,Q)}function cK($,I){let D=$._zod.def,X=D.checks;if(X&&X.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let Q=AU($._zod.def,{get shape(){let J={...$._zod.def.shape};for(let A in I){if(!(A in D.shape))throw Error(`Unrecognized key: "${A}"`);if(!I[A])continue;delete J[A]}return qU(this,"shape",J),J},checks:[]});return y0($,Q)}function fK($,I){if(!RU(I))throw Error("Invalid input to extend: expected a plain object");let D=$._zod.def.checks;if(D&&D.length>0){let Q=$._zod.def.shape;for(let J in I)if(Object.getOwnPropertyDescriptor(Q,J)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let U=AU($._zod.def,{get shape(){let Q={...$._zod.def.shape,...I};return qU(this,"shape",Q),Q}});return y0($,U)}function yK($,I){if(!RU(I))throw Error("Invalid input to safeExtend: expected a plain object");let D=AU($._zod.def,{get shape(){let X={...$._zod.def.shape,...I};return qU(this,"shape",X),X}});return y0($,D)}function uK($,I){let D=AU($._zod.def,{get shape(){let X={...$._zod.def.shape,...I._zod.def.shape};return qU(this,"shape",X),X},get catchall(){return I._zod.def.catchall},checks:[]});return y0($,D)}function hK($,I,D){let U=I._zod.def.checks;if(U&&U.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let J=AU(I._zod.def,{get shape(){let A=I._zod.def.shape,T={...A};if(D)for(let Z in D){if(!(Z in A))throw Error(`Unrecognized key: "${Z}"`);if(!D[Z])continue;T[Z]=$?new $({type:"optional",innerType:A[Z]}):A[Z]}else for(let Z in A)T[Z]=$?new $({type:"optional",innerType:A[Z]}):A[Z];return qU(this,"shape",T),T},checks:[]});return y0(I,J)}function pK($,I,D){let X=AU(I._zod.def,{get shape(){let U=I._zod.def.shape,Q={...U};if(D)for(let J in D){if(!(J in Q))throw Error(`Unrecognized key: "${J}"`);if(!D[J])continue;Q[J]=new $({type:"nonoptional",innerType:U[J]})}else for(let J in U)Q[J]=new $({type:"nonoptional",innerType:U[J]});return qU(this,"shape",Q),Q}});return y0(I,X)}function gU($,I=0){if($.aborted===!0)return!0;for(let D=I;D<$.issues.length;D++)if($.issues[D]?.continue!==!0)return!0;return!1}function e0($,I){return I.map((D)=>{var X;return(X=D).path??(X.path=[]),D.path.unshift($),D})}function uI($){return typeof $==="string"?$:$?.message}function b0($,I,D){let X={...$,path:$.path??[]};if(!$.message){let U=uI($.inst?._zod.def?.error?.($))??uI(I?.error?.($))??uI(D.customError?.($))??uI(D.localeError?.($))??"Invalid input";X.message=U}if(delete X.inst,delete X.continue,!I?.reportInput)delete X.input;return X}function bI($){if($ instanceof Set)return"set";if($ instanceof Map)return"map";if($ instanceof File)return"file";return"unknown"}function rI($){if(Array.isArray($))return"array";if(typeof $==="string")return"string";return"unknown"}function f$($){let I=typeof $;switch(I){case"number":return Number.isNaN($)?"nan":"number";case"object":{if($===null)return"null";if(Array.isArray($))return"array";let D=$;if(D&&Object.getPrototypeOf(D)!==Object.prototype&&"constructor"in D&&D.constructor)return D.constructor.name}}return I}function vI(...$){let[I,D,X]=$;if(typeof I==="string")return{message:I,code:"custom",input:D,inst:X};return{...I}}function lK($){return Object.entries($).filter(([I,D])=>{return Number.isNaN(Number.parseInt(I,10))}).map((I)=>I[1])}function cY($){let I=atob($),D=new Uint8Array(I.length);for(let X=0;X<I.length;X++)D[X]=I.charCodeAt(X);return D}function fY($){let I="";for(let D=0;D<$.length;D++)I+=String.fromCharCode($[D]);return btoa(I)}function bK($){let I=$.replace(/-/g,"+").replace(/_/g,"/"),D="=".repeat((4-I.length%4)%4);return cY(I+D)}function rK($){return fY($).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function oK($){let I=$.replace(/^0x/,"");if(I.length%2!==0)throw Error("Invalid hex string length");let D=new Uint8Array(I.length/2);for(let X=0;X<I.length;X+=2)D[X/2]=Number.parseInt(I.slice(X,X+2),16);return D}function nK($){return Array.from($).map((I)=>I.toString(16).padStart(2,"0")).join("")}class yY{constructor(...$){}}var uY=($,I)=>{$.name="$ZodError",Object.defineProperty($,"_zod",{value:$._zod,enumerable:!1}),Object.defineProperty($,"issues",{value:I,enumerable:!1}),$.message=JSON.stringify(I,UI,2),Object.defineProperty($,"toString",{value:()=>$.message,enumerable:!1})},oI=$$("$ZodError",uY),r0=$$("$ZodError",uY,{Parent:Error});function nI($,I=(D)=>D.message){let D={},X=[];for(let U of $.issues)if(U.path.length>0)D[U.path[0]]=D[U.path[0]]||[],D[U.path[0]].push(I(U));else X.push(I(U));return{formErrors:X,fieldErrors:D}}function dI($,I=(D)=>D.message){let D={_errors:[]},X=(U)=>{for(let Q of U.issues)if(Q.code==="invalid_union"&&Q.errors.length)Q.errors.map((J)=>X({issues:J}));else if(Q.code==="invalid_key")X({issues:Q.issues});else if(Q.code==="invalid_element")X({issues:Q.issues});else if(Q.path.length===0)D._errors.push(I(Q));else{let J=D,A=0;while(A<Q.path.length){let T=Q.path[A];if(A!==Q.path.length-1)J[T]=J[T]||{_errors:[]};else J[T]=J[T]||{_errors:[]},J[T]._errors.push(I(Q));J=J[T],A++}}};return X($),D}function e4($,I=(D)=>D.message){let D={errors:[]},X=(U,Q=[])=>{var J,A;for(let T of U.issues)if(T.code==="invalid_union"&&T.errors.length)T.errors.map((Z)=>X({issues:Z},T.path));else if(T.code==="invalid_key")X({issues:T.issues},T.path);else if(T.code==="invalid_element")X({issues:T.issues},T.path);else{let Z=[...Q,...T.path];if(Z.length===0){D.errors.push(I(T));continue}let L=D,F=0;while(F<Z.length){let E=Z[F],P=F===Z.length-1;if(typeof E==="string")L.properties??(L.properties={}),(J=L.properties)[E]??(J[E]={errors:[]}),L=L.properties[E];else L.items??(L.items=[]),(A=L.items)[E]??(A[E]={errors:[]}),L=L.items[E];if(P)L.errors.push(I(T));F++}}};return X($),D}function hY($){let I=[],D=$.map((X)=>typeof X==="object"?X.key:X);for(let X of D)if(typeof X==="number")I.push(`[${X}]`);else if(typeof X==="symbol")I.push(`[${JSON.stringify(String(X))}]`);else if(/[^\w$]/.test(X))I.push(`[${JSON.stringify(X)}]`);else{if(I.length)I.push(".");I.push(X)}return I.join("")}function a4($){let I=[],D=[...$.issues].sort((X,U)=>(X.path??[]).length-(U.path??[]).length);for(let X of D)if(I.push(`✖ ${X.message}`),X.path?.length)I.push(` → at ${hY(X.path)}`);return I.join(`
21
+ `)}var DI=($)=>(I,D,X,U)=>{let Q=X?Object.assign(X,{async:!1}):{async:!1},J=I._zod.run({value:D,issues:[]},Q);if(J instanceof Promise)throw new XU;if(J.issues.length){let A=new(U?.Err??$)(J.issues.map((T)=>b0(T,Q,V0())));throw x6(A,U?.callee),A}return J.value},w6=DI(r0),OI=($)=>async(I,D,X,U)=>{let Q=X?Object.assign(X,{async:!0}):{async:!0},J=I._zod.run({value:D,issues:[]},Q);if(J instanceof Promise)J=await J;if(J.issues.length){let A=new(U?.Err??$)(J.issues.map((T)=>b0(T,Q,V0())));throw x6(A,U?.callee),A}return J.value},c6=OI(r0),JI=($)=>(I,D,X)=>{let U=X?{...X,async:!1}:{async:!1},Q=I._zod.run({value:D,issues:[]},U);if(Q instanceof Promise)throw new XU;return Q.issues.length?{success:!1,error:new($??oI)(Q.issues.map((J)=>b0(J,U,V0())))}:{success:!0,data:Q.value}},s4=JI(r0),XI=($)=>async(I,D,X)=>{let U=X?Object.assign(X,{async:!0}):{async:!0},Q=I._zod.run({value:D,issues:[]},U);if(Q instanceof Promise)Q=await Q;return Q.issues.length?{success:!1,error:new $(Q.issues.map((J)=>b0(J,U,V0())))}:{success:!0,data:Q.value}},$1=XI(r0),f6=($)=>(I,D,X)=>{let U=X?Object.assign(X,{direction:"backward"}):{direction:"backward"};return DI($)(I,D,U)},mK=f6(r0),y6=($)=>(I,D,X)=>{return DI($)(I,D,X)},tK=y6(r0),u6=($)=>async(I,D,X)=>{let U=X?Object.assign(X,{direction:"backward"}):{direction:"backward"};return OI($)(I,D,U)},iK=u6(r0),h6=($)=>async(I,D,X)=>{return OI($)(I,D,X)},eK=h6(r0),p6=($)=>(I,D,X)=>{let U=X?Object.assign(X,{direction:"backward"}):{direction:"backward"};return JI($)(I,D,U)},aK=p6(r0),l6=($)=>(I,D,X)=>{return JI($)(I,D,X)},sK=l6(r0),b6=($)=>async(I,D,X)=>{let U=X?Object.assign(X,{direction:"backward"}):{direction:"backward"};return XI($)(I,D,U)},$z=b6(r0),r6=($)=>async(I,D,X)=>{return XI($)(I,D,X)},Uz=r6(r0);var UU={};i0(UU,{xid:()=>D1,uuid7:()=>Oz,uuid6:()=>Dz,uuid4:()=>vz,uuid:()=>lU,uppercase:()=>k1,unicodeEmail:()=>pY,undefined:()=>R1,ulid:()=>v1,time:()=>Z1,string:()=>E1,sha512_hex:()=>Rz,sha512_base64url:()=>kz,sha512_base64:()=>gz,sha384_hex:()=>Mz,sha384_base64url:()=>qz,sha384_base64:()=>Pz,sha256_hex:()=>Lz,sha256_base64url:()=>Tz,sha256_base64:()=>Ez,sha1_hex:()=>Fz,sha1_base64url:()=>Zz,sha1_base64:()=>Hz,rfc5322Email:()=>Xz,number:()=>mI,null:()=>q1,nanoid:()=>J1,md5_hex:()=>zz,md5_base64url:()=>Az,md5_base64:()=>Sz,mac:()=>K1,lowercase:()=>g1,ksuid:()=>O1,ipv6:()=>W1,ipv4:()=>V1,integer:()=>M1,idnEmail:()=>Qz,html5Email:()=>Jz,hostname:()=>Vz,hex:()=>Kz,guid:()=>Q1,extendedDuration:()=>Iz,emoji:()=>G1,email:()=>Y1,e164:()=>F1,duration:()=>X1,domain:()=>Wz,datetime:()=>L1,date:()=>H1,cuid2:()=>I1,cuid:()=>U1,cidrv6:()=>S1,cidrv4:()=>z1,browserEmail:()=>Yz,boolean:()=>P1,bigint:()=>T1,base64url:()=>o6,base64:()=>A1});var U1=/^[cC][^\s-]{8,}$/,I1=/^[0-9a-z]+$/,v1=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,D1=/^[0-9a-vA-V]{20}$/,O1=/^[A-Za-z0-9]{27}$/,J1=/^[a-zA-Z0-9_-]{21}$/,X1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Iz=/^[-+]?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)?)??$/,Q1=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,lU=($)=>{if(!$)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${$}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},vz=lU(4),Dz=lU(6),Oz=lU(7),Y1=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Xz=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,pY=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Qz=pY,Yz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Gz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function G1(){return new RegExp(Gz,"u")}var V1=/^(?:(?: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])$/,W1=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,K1=($)=>{let I=$U($??":");return new RegExp(`^(?:[0-9A-F]{2}${I}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${I}){5}[0-9a-f]{2}$`)},z1=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,S1=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,A1=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,o6=/^[A-Za-z0-9_-]*$/,Vz=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Wz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,F1=/^\+[1-9]\d{6,14}$/,lY="(?:(?:\\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])))",H1=new RegExp(`^${lY}$`);function bY($){return typeof $.precision==="number"?$.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":$.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${$.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Z1($){return new RegExp(`^${bY($)}$`)}function L1($){let I=bY({precision:$.precision}),D=["Z"];if($.local)D.push("");if($.offset)D.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let X=`${I}(?:${D.join("|")})`;return new RegExp(`^${lY}T(?:${X})$`)}var E1=($)=>{let I=$?`[\\s\\S]{${$?.minimum??0},${$?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${I}$`)},T1=/^-?\d+n?$/,M1=/^-?\d+$/,mI=/^-?\d+(?:\.\d+)?$/,P1=/^(?:true|false)$/i,q1=/^null$/i;var R1=/^undefined$/i;var g1=/^[^A-Z]*$/,k1=/^[^a-z]*$/,Kz=/^[0-9a-fA-F]*$/;function tI($,I){return new RegExp(`^[A-Za-z0-9+/]{${$}}${I}$`)}function iI($){return new RegExp(`^[A-Za-z0-9_-]{${$}}$`)}var zz=/^[0-9a-fA-F]{32}$/,Sz=tI(22,"=="),Az=iI(22),Fz=/^[0-9a-fA-F]{40}$/,Hz=tI(27,"="),Zz=iI(27),Lz=/^[0-9a-fA-F]{64}$/,Ez=tI(43,"="),Tz=iI(43),Mz=/^[0-9a-fA-F]{96}$/,Pz=tI(64,""),qz=iI(64),Rz=/^[0-9a-fA-F]{128}$/,gz=tI(86,"=="),kz=iI(86);var D0=$$("$ZodCheck",($,I)=>{var D;$._zod??($._zod={}),$._zod.def=I,(D=$._zod).onattach??(D.onattach=[])}),oY={number:"number",bigint:"bigint",object:"date"},n6=$$("$ZodCheckLessThan",($,I)=>{D0.init($,I);let D=oY[typeof I.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,Q=(I.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(I.value<Q)if(I.inclusive)U.maximum=I.value;else U.exclusiveMaximum=I.value}),$._zod.check=(X)=>{if(I.inclusive?X.value<=I.value:X.value<I.value)return;X.issues.push({origin:D,code:"too_big",maximum:typeof I.value==="object"?I.value.getTime():I.value,input:X.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),d6=$$("$ZodCheckGreaterThan",($,I)=>{D0.init($,I);let D=oY[typeof I.value];$._zod.onattach.push((X)=>{let U=X._zod.bag,Q=(I.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(I.value>Q)if(I.inclusive)U.minimum=I.value;else U.exclusiveMinimum=I.value}),$._zod.check=(X)=>{if(I.inclusive?X.value>=I.value:X.value>I.value)return;X.issues.push({origin:D,code:"too_small",minimum:typeof I.value==="object"?I.value.getTime():I.value,input:X.value,inclusive:I.inclusive,inst:$,continue:!I.abort})}}),C1=$$("$ZodCheckMultipleOf",($,I)=>{D0.init($,I),$._zod.onattach.push((D)=>{var X;(X=D._zod.bag).multipleOf??(X.multipleOf=I.value)}),$._zod.check=(D)=>{if(typeof D.value!==typeof I.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof D.value==="bigint"?D.value%I.value===BigInt(0):b4(D.value,I.value)===0)return;D.issues.push({origin:typeof D.value,code:"not_multiple_of",divisor:I.value,input:D.value,inst:$,continue:!I.abort})}}),_1=$$("$ZodCheckNumberFormat",($,I)=>{D0.init($,I),I.format=I.format||"float64";let D=I.format?.includes("int"),X=D?"int":"number",[U,Q]=t4[I.format];$._zod.onattach.push((J)=>{let A=J._zod.bag;if(A.format=I.format,A.minimum=U,A.maximum=Q,D)A.pattern=M1}),$._zod.check=(J)=>{let A=J.value;if(D){if(!Number.isInteger(A)){J.issues.push({expected:X,format:I.format,code:"invalid_type",continue:!1,input:A,inst:$});return}if(!Number.isSafeInteger(A)){if(A>0)J.issues.push({input:A,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!I.abort});else J.issues.push({input:A,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:$,origin:X,inclusive:!0,continue:!I.abort});return}}if(A<U)J.issues.push({origin:"number",input:A,code:"too_small",minimum:U,inclusive:!0,inst:$,continue:!I.abort});if(A>Q)J.issues.push({origin:"number",input:A,code:"too_big",maximum:Q,inclusive:!0,inst:$,continue:!I.abort})}}),j1=$$("$ZodCheckBigIntFormat",($,I)=>{D0.init($,I);let[D,X]=i4[I.format];$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.format=I.format,Q.minimum=D,Q.maximum=X}),$._zod.check=(U)=>{let Q=U.value;if(Q<D)U.issues.push({origin:"bigint",input:Q,code:"too_small",minimum:D,inclusive:!0,inst:$,continue:!I.abort});if(Q>X)U.issues.push({origin:"bigint",input:Q,code:"too_big",maximum:X,inclusive:!0,inst:$,continue:!I.abort})}}),N1=$$("$ZodCheckMaxSize",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)X._zod.bag.maximum=I.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.size<=I.maximum)return;X.issues.push({origin:bI(U),code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),B1=$$("$ZodCheckMinSize",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)X._zod.bag.minimum=I.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.size>=I.minimum)return;X.issues.push({origin:bI(U),code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),x1=$$("$ZodCheckSizeEquals",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.size!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=I.size,U.maximum=I.size,U.size=I.size}),$._zod.check=(X)=>{let U=X.value,Q=U.size;if(Q===I.size)return;let J=Q>I.size;X.issues.push({origin:bI(U),...J?{code:"too_big",maximum:I.size}:{code:"too_small",minimum:I.size},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!I.abort})}}),w1=$$("$ZodCheckMaxLength",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.maximum??Number.POSITIVE_INFINITY;if(I.maximum<U)X._zod.bag.maximum=I.maximum}),$._zod.check=(X)=>{let U=X.value;if(U.length<=I.maximum)return;let J=rI(U);X.issues.push({origin:J,code:"too_big",maximum:I.maximum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),c1=$$("$ZodCheckMinLength",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(I.minimum>U)X._zod.bag.minimum=I.minimum}),$._zod.check=(X)=>{let U=X.value;if(U.length>=I.minimum)return;let J=rI(U);X.issues.push({origin:J,code:"too_small",minimum:I.minimum,inclusive:!0,input:U,inst:$,continue:!I.abort})}}),f1=$$("$ZodCheckLengthEquals",($,I)=>{var D;D0.init($,I),(D=$._zod.def).when??(D.when=(X)=>{let U=X.value;return!PU(U)&&U.length!==void 0}),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.minimum=I.length,U.maximum=I.length,U.length=I.length}),$._zod.check=(X)=>{let U=X.value,Q=U.length;if(Q===I.length)return;let J=rI(U),A=Q>I.length;X.issues.push({origin:J,...A?{code:"too_big",maximum:I.length}:{code:"too_small",minimum:I.length},inclusive:!0,exact:!0,input:X.value,inst:$,continue:!I.abort})}}),QI=$$("$ZodCheckStringFormat",($,I)=>{var D,X;if(D0.init($,I),$._zod.onattach.push((U)=>{let Q=U._zod.bag;if(Q.format=I.format,I.pattern)Q.patterns??(Q.patterns=new Set),Q.patterns.add(I.pattern)}),I.pattern)(D=$._zod).check??(D.check=(U)=>{if(I.pattern.lastIndex=0,I.pattern.test(U.value))return;U.issues.push({origin:"string",code:"invalid_format",format:I.format,input:U.value,...I.pattern?{pattern:I.pattern.toString()}:{},inst:$,continue:!I.abort})});else(X=$._zod).check??(X.check=()=>{})}),y1=$$("$ZodCheckRegex",($,I)=>{QI.init($,I),$._zod.check=(D)=>{if(I.pattern.lastIndex=0,I.pattern.test(D.value))return;D.issues.push({origin:"string",code:"invalid_format",format:"regex",input:D.value,pattern:I.pattern.toString(),inst:$,continue:!I.abort})}}),u1=$$("$ZodCheckLowerCase",($,I)=>{I.pattern??(I.pattern=g1),QI.init($,I)}),h1=$$("$ZodCheckUpperCase",($,I)=>{I.pattern??(I.pattern=k1),QI.init($,I)}),p1=$$("$ZodCheckIncludes",($,I)=>{D0.init($,I);let D=$U(I.includes),X=new RegExp(typeof I.position==="number"?`^.{${I.position}}${D}`:D);I.pattern=X,$._zod.onattach.push((U)=>{let Q=U._zod.bag;Q.patterns??(Q.patterns=new Set),Q.patterns.add(X)}),$._zod.check=(U)=>{if(U.value.includes(I.includes,I.position))return;U.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:I.includes,input:U.value,inst:$,continue:!I.abort})}}),l1=$$("$ZodCheckStartsWith",($,I)=>{D0.init($,I);let D=new RegExp(`^${$U(I.prefix)}.*`);I.pattern??(I.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.startsWith(I.prefix))return;X.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:I.prefix,input:X.value,inst:$,continue:!I.abort})}}),b1=$$("$ZodCheckEndsWith",($,I)=>{D0.init($,I);let D=new RegExp(`.*${$U(I.suffix)}$`);I.pattern??(I.pattern=D),$._zod.onattach.push((X)=>{let U=X._zod.bag;U.patterns??(U.patterns=new Set),U.patterns.add(D)}),$._zod.check=(X)=>{if(X.value.endsWith(I.suffix))return;X.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:I.suffix,input:X.value,inst:$,continue:!I.abort})}});function rY($,I,D){if($.issues.length)I.issues.push(...e0(D,$.issues))}var r1=$$("$ZodCheckProperty",($,I)=>{D0.init($,I),$._zod.check=(D)=>{let X=I.schema._zod.run({value:D.value[I.property],issues:[]},{});if(X instanceof Promise)return X.then((U)=>rY(U,D,I.property));rY(X,D,I.property);return}}),o1=$$("$ZodCheckMimeType",($,I)=>{D0.init($,I);let D=new Set(I.mime);$._zod.onattach.push((X)=>{X._zod.bag.mime=I.mime}),$._zod.check=(X)=>{if(D.has(X.value.type))return;X.issues.push({code:"invalid_value",values:I.mime,input:X.value.type,inst:$,continue:!I.abort})}}),n1=$$("$ZodCheckOverwrite",($,I)=>{D0.init($,I),$._zod.check=(D)=>{D.value=I.tx(D.value)}});class m6{constructor($=[]){if(this.content=[],this.indent=0,this)this.args=$}indented($){this.indent+=1,$(this),this.indent-=1}write($){if(typeof $==="function"){$(this,{execution:"sync"}),$(this,{execution:"async"});return}let D=$.split(`
22
+ `).filter((Q)=>Q),X=Math.min(...D.map((Q)=>Q.length-Q.trimStart().length)),U=D.map((Q)=>Q.slice(X)).map((Q)=>" ".repeat(this.indent*2)+Q);for(let Q of U)this.content.push(Q)}compile(){let $=Function,I=this?.args,X=[...(this?.content??[""]).map((U)=>` ${U}`)];return new $(...I,X.join(`
23
+ `))}}var d1={major:4,minor:3,patch:6};var o$=$$("$ZodType",($,I)=>{var D;$??($={}),$._zod.def=I,$._zod.bag=$._zod.bag||{},$._zod.version=d1;let X=[...$._zod.def.checks??[]];if($._zod.traits.has("$ZodCheck"))X.unshift($);for(let U of X)for(let Q of U._zod.onattach)Q($);if(X.length===0)(D=$._zod).deferred??(D.deferred=[]),$._zod.deferred?.push(()=>{$._zod.run=$._zod.parse});else{let U=(J,A,T)=>{let Z=gU(J),L;for(let F of A){if(F._zod.def.when){if(!F._zod.def.when(J))continue}else if(Z)continue;let E=J.issues.length,P=F._zod.check(J);if(P instanceof Promise&&T?.async===!1)throw new XU;if(L||P instanceof Promise)L=(L??Promise.resolve()).then(async()=>{if(await P,J.issues.length===E)return;if(!Z)Z=gU(J,E)});else{if(J.issues.length===E)continue;if(!Z)Z=gU(J,E)}}if(L)return L.then(()=>{return J});return J},Q=(J,A,T)=>{if(gU(J))return J.aborted=!0,J;let Z=U(A,X,T);if(Z instanceof Promise){if(T.async===!1)throw new XU;return Z.then((L)=>$._zod.parse(L,T))}return $._zod.parse(Z,T)};$._zod.run=(J,A)=>{if(A.skipChecks)return $._zod.parse(J,A);if(A.direction==="backward"){let Z=$._zod.parse({value:J.value,issues:[]},{...A,skipChecks:!0});if(Z instanceof Promise)return Z.then((L)=>{return Q(L,J,A)});return Q(Z,J,A)}let T=$._zod.parse(J,A);if(T instanceof Promise){if(A.async===!1)throw new XU;return T.then((Z)=>U(Z,X,A))}return U(T,X,A)}}t$($,"~standard",()=>({validate:(U)=>{try{let Q=s4($,U);return Q.success?{value:Q.data}:{issues:Q.error?.issues}}catch(Q){return $1($,U).then((J)=>J.success?{value:J.data}:{issues:J.error?.issues})}},vendor:"zod",version:1}))}),bU=$$("$ZodString",($,I)=>{o$.init($,I),$._zod.pattern=[...$?._zod.bag?.patterns??[]].pop()??E1($._zod.bag),$._zod.parse=(D,X)=>{if(I.coerce)try{D.value=String(D.value)}catch(U){}if(typeof D.value==="string")return D;return D.issues.push({expected:"string",code:"invalid_type",input:D.value,inst:$}),D}}),U0=$$("$ZodStringFormat",($,I)=>{QI.init($,I),bU.init($,I)}),t1=$$("$ZodGUID",($,I)=>{I.pattern??(I.pattern=Q1),U0.init($,I)}),i1=$$("$ZodUUID",($,I)=>{if(I.version){let X={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[I.version];if(X===void 0)throw Error(`Invalid UUID version: "${I.version}"`);I.pattern??(I.pattern=lU(X))}else I.pattern??(I.pattern=lU());U0.init($,I)}),e1=$$("$ZodEmail",($,I)=>{I.pattern??(I.pattern=Y1),U0.init($,I)}),a1=$$("$ZodURL",($,I)=>{U0.init($,I),$._zod.check=(D)=>{try{let X=D.value.trim(),U=new URL(X);if(I.hostname){if(I.hostname.lastIndex=0,!I.hostname.test(U.hostname))D.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I.hostname.source,input:D.value,inst:$,continue:!I.abort})}if(I.protocol){if(I.protocol.lastIndex=0,!I.protocol.test(U.protocol.endsWith(":")?U.protocol.slice(0,-1):U.protocol))D.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:I.protocol.source,input:D.value,inst:$,continue:!I.abort})}if(I.normalize)D.value=U.href;else D.value=X;return}catch(X){D.issues.push({code:"invalid_format",format:"url",input:D.value,inst:$,continue:!I.abort})}}}),s1=$$("$ZodEmoji",($,I)=>{I.pattern??(I.pattern=G1()),U0.init($,I)}),$D=$$("$ZodNanoID",($,I)=>{I.pattern??(I.pattern=J1),U0.init($,I)}),UD=$$("$ZodCUID",($,I)=>{I.pattern??(I.pattern=U1),U0.init($,I)}),ID=$$("$ZodCUID2",($,I)=>{I.pattern??(I.pattern=I1),U0.init($,I)}),vD=$$("$ZodULID",($,I)=>{I.pattern??(I.pattern=v1),U0.init($,I)}),DD=$$("$ZodXID",($,I)=>{I.pattern??(I.pattern=D1),U0.init($,I)}),OD=$$("$ZodKSUID",($,I)=>{I.pattern??(I.pattern=O1),U0.init($,I)}),JD=$$("$ZodISODateTime",($,I)=>{I.pattern??(I.pattern=L1(I)),U0.init($,I)}),XD=$$("$ZodISODate",($,I)=>{I.pattern??(I.pattern=H1),U0.init($,I)}),QD=$$("$ZodISOTime",($,I)=>{I.pattern??(I.pattern=Z1(I)),U0.init($,I)}),YD=$$("$ZodISODuration",($,I)=>{I.pattern??(I.pattern=X1),U0.init($,I)}),GD=$$("$ZodIPv4",($,I)=>{I.pattern??(I.pattern=V1),U0.init($,I),$._zod.bag.format="ipv4"}),VD=$$("$ZodIPv6",($,I)=>{I.pattern??(I.pattern=W1),U0.init($,I),$._zod.bag.format="ipv6",$._zod.check=(D)=>{try{new URL(`http://[${D.value}]`)}catch{D.issues.push({code:"invalid_format",format:"ipv6",input:D.value,inst:$,continue:!I.abort})}}}),WD=$$("$ZodMAC",($,I)=>{I.pattern??(I.pattern=K1(I.delimiter)),U0.init($,I),$._zod.bag.format="mac"}),KD=$$("$ZodCIDRv4",($,I)=>{I.pattern??(I.pattern=z1),U0.init($,I)}),zD=$$("$ZodCIDRv6",($,I)=>{I.pattern??(I.pattern=S1),U0.init($,I),$._zod.check=(D)=>{let X=D.value.split("/");try{if(X.length!==2)throw Error();let[U,Q]=X;if(!Q)throw Error();let J=Number(Q);if(`${J}`!==Q)throw Error();if(J<0||J>128)throw Error();new URL(`http://[${U}]`)}catch{D.issues.push({code:"invalid_format",format:"cidrv6",input:D.value,inst:$,continue:!I.abort})}}});function SD($){if($==="")return!0;if($.length%4!==0)return!1;try{return atob($),!0}catch{return!1}}var AD=$$("$ZodBase64",($,I)=>{I.pattern??(I.pattern=A1),U0.init($,I),$._zod.bag.contentEncoding="base64",$._zod.check=(D)=>{if(SD(D.value))return;D.issues.push({code:"invalid_format",format:"base64",input:D.value,inst:$,continue:!I.abort})}});function DG($){if(!o6.test($))return!1;let I=$.replace(/[-_]/g,(X)=>X==="-"?"+":"/"),D=I.padEnd(Math.ceil(I.length/4)*4,"=");return SD(D)}var FD=$$("$ZodBase64URL",($,I)=>{I.pattern??(I.pattern=o6),U0.init($,I),$._zod.bag.contentEncoding="base64url",$._zod.check=(D)=>{if(DG(D.value))return;D.issues.push({code:"invalid_format",format:"base64url",input:D.value,inst:$,continue:!I.abort})}}),HD=$$("$ZodE164",($,I)=>{I.pattern??(I.pattern=F1),U0.init($,I)});function OG($,I=null){try{let D=$.split(".");if(D.length!==3)return!1;let[X]=D;if(!X)return!1;let U=JSON.parse(atob(X));if("typ"in U&&U?.typ!=="JWT")return!1;if(!U.alg)return!1;if(I&&(!("alg"in U)||U.alg!==I))return!1;return!0}catch{return!1}}var ZD=$$("$ZodJWT",($,I)=>{U0.init($,I),$._zod.check=(D)=>{if(OG(D.value,I.alg))return;D.issues.push({code:"invalid_format",format:"jwt",input:D.value,inst:$,continue:!I.abort})}}),LD=$$("$ZodCustomStringFormat",($,I)=>{U0.init($,I),$._zod.check=(D)=>{if(I.fn(D.value))return;D.issues.push({code:"invalid_format",format:I.format,input:D.value,inst:$,continue:!I.abort})}}),$v=$$("$ZodNumber",($,I)=>{o$.init($,I),$._zod.pattern=$._zod.bag.pattern??mI,$._zod.parse=(D,X)=>{if(I.coerce)try{D.value=Number(D.value)}catch(J){}let U=D.value;if(typeof U==="number"&&!Number.isNaN(U)&&Number.isFinite(U))return D;let Q=typeof U==="number"?Number.isNaN(U)?"NaN":!Number.isFinite(U)?"Infinity":void 0:void 0;return D.issues.push({expected:"number",code:"invalid_type",input:U,inst:$,...Q?{received:Q}:{}}),D}}),ED=$$("$ZodNumberFormat",($,I)=>{_1.init($,I),$v.init($,I)}),eI=$$("$ZodBoolean",($,I)=>{o$.init($,I),$._zod.pattern=P1,$._zod.parse=(D,X)=>{if(I.coerce)try{D.value=Boolean(D.value)}catch(Q){}let U=D.value;if(typeof U==="boolean")return D;return D.issues.push({expected:"boolean",code:"invalid_type",input:U,inst:$}),D}}),Uv=$$("$ZodBigInt",($,I)=>{o$.init($,I),$._zod.pattern=T1,$._zod.parse=(D,X)=>{if(I.coerce)try{D.value=BigInt(D.value)}catch(U){}if(typeof D.value==="bigint")return D;return D.issues.push({expected:"bigint",code:"invalid_type",input:D.value,inst:$}),D}}),TD=$$("$ZodBigIntFormat",($,I)=>{j1.init($,I),Uv.init($,I)}),MD=$$("$ZodSymbol",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(typeof U==="symbol")return D;return D.issues.push({expected:"symbol",code:"invalid_type",input:U,inst:$}),D}}),PD=$$("$ZodUndefined",($,I)=>{o$.init($,I),$._zod.pattern=R1,$._zod.values=new Set([void 0]),$._zod.optin="optional",$._zod.optout="optional",$._zod.parse=(D,X)=>{let U=D.value;if(typeof U>"u")return D;return D.issues.push({expected:"undefined",code:"invalid_type",input:U,inst:$}),D}}),qD=$$("$ZodNull",($,I)=>{o$.init($,I),$._zod.pattern=q1,$._zod.values=new Set([null]),$._zod.parse=(D,X)=>{let U=D.value;if(U===null)return D;return D.issues.push({expected:"null",code:"invalid_type",input:U,inst:$}),D}}),RD=$$("$ZodAny",($,I)=>{o$.init($,I),$._zod.parse=(D)=>D}),gD=$$("$ZodUnknown",($,I)=>{o$.init($,I),$._zod.parse=(D)=>D}),kD=$$("$ZodNever",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{return D.issues.push({expected:"never",code:"invalid_type",input:D.value,inst:$}),D}}),CD=$$("$ZodVoid",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(typeof U>"u")return D;return D.issues.push({expected:"void",code:"invalid_type",input:U,inst:$}),D}}),_D=$$("$ZodDate",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{if(I.coerce)try{D.value=new Date(D.value)}catch(A){}let U=D.value,Q=U instanceof Date;if(Q&&!Number.isNaN(U.getTime()))return D;return D.issues.push({expected:"date",code:"invalid_type",input:U,...Q?{received:"Invalid Date"}:{},inst:$}),D}});function dY($,I,D){if($.issues.length)I.issues.push(...e0(D,$.issues));I.value[D]=$.value}var jD=$$("$ZodArray",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(!Array.isArray(U))return D.issues.push({expected:"array",code:"invalid_type",input:U,inst:$}),D;D.value=Array(U.length);let Q=[];for(let J=0;J<U.length;J++){let A=U[J],T=I.element._zod.run({value:A,issues:[]},X);if(T instanceof Promise)Q.push(T.then((Z)=>dY(Z,D,J)));else dY(T,D,J)}if(Q.length)return Promise.all(Q).then(()=>D);return D}});function s6($,I,D,X,U){if($.issues.length){if(U&&!(D in X))return;I.issues.push(...e0(D,$.issues))}if($.value===void 0){if(D in X)I.value[D]=void 0}else I.value[D]=$.value}function JG($){let I=Object.keys($.shape);for(let X of I)if(!$.shape?.[X]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${X}": expected a Zod schema`);let D=m4($.shape);return{...$,keys:I,keySet:new Set(I),numKeys:I.length,optionalKeys:new Set(D)}}function XG($,I,D,X,U,Q){let J=[],A=U.keySet,T=U.catchall._zod,Z=T.def.type,L=T.optout==="optional";for(let F in I){if(A.has(F))continue;if(Z==="never"){J.push(F);continue}let E=T.run({value:I[F],issues:[]},X);if(E instanceof Promise)$.push(E.then((P)=>s6(P,D,F,I,L)));else s6(E,D,F,I,L)}if(J.length)D.issues.push({code:"unrecognized_keys",keys:J,input:I,inst:Q});if(!$.length)return D;return Promise.all($).then(()=>{return D})}var QG=$$("$ZodObject",($,I)=>{if(o$.init($,I),!Object.getOwnPropertyDescriptor(I,"shape")?.get){let A=I.shape;Object.defineProperty(I,"shape",{get:()=>{let T={...A};return Object.defineProperty(I,"shape",{value:T}),T}})}let X=II(()=>JG(I));t$($._zod,"propValues",()=>{let A=I.shape,T={};for(let Z in A){let L=A[Z]._zod;if(L.values){T[Z]??(T[Z]=new Set);for(let F of L.values)T[Z].add(F)}}return T});let U=pU,Q=I.catchall,J;$._zod.parse=(A,T)=>{J??(J=X.value);let Z=A.value;if(!U(Z))return A.issues.push({expected:"object",code:"invalid_type",input:Z,inst:$}),A;A.value={};let L=[],F=J.shape;for(let E of J.keys){let P=F[E],R=P._zod.optout==="optional",k=P._zod.run({value:Z[E],issues:[]},T);if(k instanceof Promise)L.push(k.then((g)=>s6(g,A,E,Z,R)));else s6(k,A,E,Z,R)}if(!Q)return L.length?Promise.all(L).then(()=>A):A;return XG(L,Z,A,T,X.value,$)}}),ND=$$("$ZodObjectJIT",($,I)=>{QG.init($,I);let D=$._zod.parse,X=II(()=>JG(I)),U=(E)=>{let P=new m6(["shape","payload","ctx"]),R=X.value,k=(N)=>{let B=B6(N);return`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`};P.write("const input = payload.value;");let g=Object.create(null),j=0;for(let N of R.keys)g[N]=`key_${j++}`;P.write("const newResult = {};");for(let N of R.keys){let B=g[N],c=B6(N),J$=E[N]?._zod?.optout==="optional";if(P.write(`const ${B} = ${k(N)};`),J$)P.write(`
24
+ if (${B}.issues.length) {
25
+ if (${c} in input) {
26
+ payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
27
+ ...iss,
28
+ path: iss.path ? [${c}, ...iss.path] : [${c}]
29
+ })));
30
+ }
31
+ }
32
+
33
+ if (${B}.value === undefined) {
34
+ if (${c} in input) {
35
+ newResult[${c}] = undefined;
36
+ }
37
+ } else {
38
+ newResult[${c}] = ${B}.value;
39
+ }
40
+
41
+ `);else P.write(`
42
+ if (${B}.issues.length) {
43
+ payload.issues = payload.issues.concat(${B}.issues.map(iss => ({
26
44
  ...iss,
27
- path: iss.path ? [${x}, ...iss.path] : [${x}]
45
+ path: iss.path ? [${c}, ...iss.path] : [${c}]
28
46
  })));
29
47
  }
30
48
 
31
- if (${N}.value === undefined) {
32
- if (${x} in input) {
33
- newResult[${x}] = undefined;
49
+ if (${B}.value === undefined) {
50
+ if (${c} in input) {
51
+ newResult[${c}] = undefined;
34
52
  }
35
53
  } else {
36
- newResult[${x}] = ${N}.value;
54
+ newResult[${c}] = ${B}.value;
37
55
  }
38
- `)}Z.write("payload.value = newResult;"),Z.write("return payload;");let _=Z.compile();return(g,N)=>_(F,g,N)},I,S=yU,Y=!XI.jitless,T=Y&&N6.value,L=U.catchall,E;$._zod.parse=(F,Z)=>{E??(E=J.value);let P=F.value;if(!S(P))return F.issues.push({expected:"object",code:"invalid_type",input:P,inst:$}),F;let q=[];if(Y&&T&&Z?.async===!1&&Z.jitless!==!0){if(!I)I=V(U.shape);F=I(F,Z)}else{F.value={};let N=E.shape;for(let x of E.keys){let o=N[x]._zod.run({value:P[x],issues:[]},Z);if(o instanceof Promise)q.push(o.then((Q0)=>zO(Q0,F,x,P)));else zO(o,F,x,P)}}if(!L)return q.length?Promise.all(q).then(()=>F):F;let k=[],C=E.keySet,_=L._zod,g=_.def.type;for(let N of Object.keys(P)){if(C.has(N))continue;if(g==="never"){k.push(N);continue}let x=_.run({value:P[N],issues:[]},Z);if(x instanceof Promise)q.push(x.then((w)=>zO(w,F,N,P)));else zO(x,F,N,P)}if(k.length)F.issues.push({code:"unrecognized_keys",keys:k,input:P,inst:$});if(!q.length)return F;return Promise.all(q).then(()=>{return F})}});function FY($,U,J,V){for(let S of $)if(S.issues.length===0)return U.value=S.value,U;let I=$.filter((S)=>!RU(S));if(I.length===1)return U.value=I[0].value,I[0];return U.issues.push({code:"invalid_union",input:U.value,inst:J,errors:$.map((S)=>S.issues.map((Y)=>l$(Y,V,V$())))}),U}var FO=O0("$ZodUnion",($,U)=>{l0.init($,U),t0($._zod,"optin",()=>U.options.some((I)=>I._zod.optin==="optional")?"optional":void 0),t0($._zod,"optout",()=>U.options.some((I)=>I._zod.optout==="optional")?"optional":void 0),t0($._zod,"values",()=>{if(U.options.every((I)=>I._zod.values))return new Set(U.options.flatMap((I)=>Array.from(I._zod.values)));return}),t0($._zod,"pattern",()=>{if(U.options.every((I)=>I._zod.pattern)){let I=U.options.map((S)=>S._zod.pattern);return new RegExp(`^(${I.map((S)=>GI(S.source)).join("|")})$`)}return});let J=U.options.length===1,V=U.options[0]._zod.run;$._zod.parse=(I,S)=>{if(J)return V(I,S);let Y=!1,M=[];for(let T of U.options){let L=T._zod.run({value:I.value,issues:[]},S);if(L instanceof Promise)M.push(L),Y=!0;else{if(L.issues.length===0)return L;M.push(L)}}if(!Y)return FY(M,I,$,S);return Promise.all(M).then((T)=>{return FY(T,I,$,S)})}}),FX=O0("$ZodDiscriminatedUnion",($,U)=>{FO.init($,U);let J=$._zod.parse;t0($._zod,"propValues",()=>{let I={};for(let S of U.options){let Y=S._zod.propValues;if(!Y||Object.keys(Y).length===0)throw Error(`Invalid discriminated union option at index "${U.options.indexOf(S)}"`);for(let[M,T]of Object.entries(Y)){if(!I[M])I[M]=new Set;for(let L of T)I[M].add(L)}}return I});let V=YI(()=>{let I=U.options,S=new Map;for(let Y of I){let M=Y._zod.propValues?.[U.discriminator];if(!M||M.size===0)throw Error(`Invalid discriminated union option at index "${U.options.indexOf(Y)}"`);for(let T of M){if(S.has(T))throw Error(`Duplicate discriminator value "${String(T)}"`);S.set(T,Y)}}return S});$._zod.parse=(I,S)=>{let Y=I.value;if(!yU(Y))return I.issues.push({code:"invalid_type",expected:"object",input:Y,inst:$}),I;let M=V.value.get(Y?.[U.discriminator]);if(M)return M._zod.run(I,S);if(U.unionFallback)return J(I,S);return I.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:U.discriminator,input:Y,path:[U.discriminator],inst:$}),I}}),LX=O0("$ZodIntersection",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value,S=U.left._zod.run({value:I,issues:[]},V),Y=U.right._zod.run({value:I,issues:[]},V);if(S instanceof Promise||Y instanceof Promise)return Promise.all([S,Y]).then(([T,L])=>{return LY(J,T,L)});return LY(J,S,Y)}});function c1($,U){if($===U)return{valid:!0,data:$};if($ instanceof Date&&U instanceof Date&&+$===+U)return{valid:!0,data:$};if(uU($)&&uU(U)){let J=Object.keys(U),V=Object.keys($).filter((S)=>J.indexOf(S)!==-1),I={...$,...U};for(let S of V){let Y=c1($[S],U[S]);if(!Y.valid)return{valid:!1,mergeErrorPath:[S,...Y.mergeErrorPath]};I[S]=Y.data}return{valid:!0,data:I}}if(Array.isArray($)&&Array.isArray(U)){if($.length!==U.length)return{valid:!1,mergeErrorPath:[]};let J=[];for(let V=0;V<$.length;V++){let I=$[V],S=U[V],Y=c1(I,S);if(!Y.valid)return{valid:!1,mergeErrorPath:[V,...Y.mergeErrorPath]};J.push(Y.data)}return{valid:!0,data:J}}return{valid:!1,mergeErrorPath:[]}}function LY($,U,J){if(U.issues.length)$.issues.push(...U.issues);if(J.issues.length)$.issues.push(...J.issues);if(RU($))return $;let V=c1(U.value,J.value);if(!V.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(V.mergeErrorPath)}`);return $.value=V.data,$}var gU=O0("$ZodTuple",($,U)=>{l0.init($,U);let J=U.items,V=J.length-[...J].reverse().findIndex((I)=>I._zod.optin!=="optional");$._zod.parse=(I,S)=>{let Y=I.value;if(!Array.isArray(Y))return I.issues.push({input:Y,inst:$,expected:"tuple",code:"invalid_type"}),I;I.value=[];let M=[];if(!U.rest){let L=Y.length>J.length,E=Y.length<V-1;if(L||E)return I.issues.push({...L?{code:"too_big",maximum:J.length}:{code:"too_small",minimum:J.length},input:Y,inst:$,origin:"array"}),I}let T=-1;for(let L of J){if(T++,T>=Y.length){if(T>=V)continue}let E=L._zod.run({value:Y[T],issues:[]},S);if(E instanceof Promise)M.push(E.then((F)=>KO(F,I,T)));else KO(E,I,T)}if(U.rest){let L=Y.slice(J.length);for(let E of L){T++;let F=U.rest._zod.run({value:E,issues:[]},S);if(F instanceof Promise)M.push(F.then((Z)=>KO(Z,I,T)));else KO(F,I,T)}}if(M.length)return Promise.all(M).then(()=>I);return I}});function KO($,U,J){if($.issues.length)U.issues.push(...b$(J,$.issues));U.value[J]=$.value}var EX=O0("$ZodRecord",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(!uU(I))return J.issues.push({expected:"record",code:"invalid_type",input:I,inst:$}),J;let S=[];if(U.keyType._zod.values){let Y=U.keyType._zod.values;J.value={};for(let T of Y)if(typeof T==="string"||typeof T==="number"||typeof T==="symbol"){let L=U.valueType._zod.run({value:I[T],issues:[]},V);if(L instanceof Promise)S.push(L.then((E)=>{if(E.issues.length)J.issues.push(...b$(T,E.issues));J.value[T]=E.value}));else{if(L.issues.length)J.issues.push(...b$(T,L.issues));J.value[T]=L.value}}let M;for(let T in I)if(!Y.has(T))M=M??[],M.push(T);if(M&&M.length>0)J.issues.push({code:"unrecognized_keys",input:I,inst:$,keys:M})}else{J.value={};for(let Y of Reflect.ownKeys(I)){if(Y==="__proto__")continue;let M=U.keyType._zod.run({value:Y,issues:[]},V);if(M instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(M.issues.length){J.issues.push({code:"invalid_key",origin:"record",issues:M.issues.map((L)=>l$(L,V,V$())),input:Y,path:[Y],inst:$}),J.value[M.value]=M.value;continue}let T=U.valueType._zod.run({value:I[Y],issues:[]},V);if(T instanceof Promise)S.push(T.then((L)=>{if(L.issues.length)J.issues.push(...b$(Y,L.issues));J.value[M.value]=L.value}));else{if(T.issues.length)J.issues.push(...b$(Y,T.issues));J.value[M.value]=T.value}}}if(S.length)return Promise.all(S).then(()=>J);return J}}),ZX=O0("$ZodMap",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(!(I instanceof Map))return J.issues.push({expected:"map",code:"invalid_type",input:I,inst:$}),J;let S=[];J.value=new Map;for(let[Y,M]of I){let T=U.keyType._zod.run({value:Y,issues:[]},V),L=U.valueType._zod.run({value:M,issues:[]},V);if(T instanceof Promise||L instanceof Promise)S.push(Promise.all([T,L]).then(([E,F])=>{EY(E,F,J,Y,I,$,V)}));else EY(T,L,J,Y,I,$,V)}if(S.length)return Promise.all(S).then(()=>J);return J}});function EY($,U,J,V,I,S,Y){if($.issues.length)if(VI.has(typeof V))J.issues.push(...b$(V,$.issues));else J.issues.push({code:"invalid_key",origin:"map",input:I,inst:S,issues:$.issues.map((M)=>l$(M,Y,V$()))});if(U.issues.length)if(VI.has(typeof V))J.issues.push(...b$(V,U.issues));else J.issues.push({origin:"map",code:"invalid_element",input:I,inst:S,key:V,issues:U.issues.map((M)=>l$(M,Y,V$()))});J.value.set($.value,U.value)}var vX=O0("$ZodSet",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(!(I instanceof Set))return J.issues.push({input:I,inst:$,expected:"set",code:"invalid_type"}),J;let S=[];J.value=new Set;for(let Y of I){let M=U.valueType._zod.run({value:Y,issues:[]},V);if(M instanceof Promise)S.push(M.then((T)=>ZY(T,J)));else ZY(M,J)}if(S.length)return Promise.all(S).then(()=>J);return J}});function ZY($,U){if($.issues.length)U.issues.push(...$.issues);U.value.add($.value)}var MX=O0("$ZodEnum",($,U)=>{l0.init($,U);let J=QI(U.entries),V=new Set(J);$._zod.values=V,$._zod.pattern=new RegExp(`^(${J.filter((I)=>VI.has(typeof I)).map((I)=>typeof I==="string"?e$(I):I.toString()).join("|")})$`),$._zod.parse=(I,S)=>{let Y=I.value;if(V.has(Y))return I;return I.issues.push({code:"invalid_value",values:J,input:Y,inst:$}),I}}),PX=O0("$ZodLiteral",($,U)=>{if(l0.init($,U),U.values.length===0)throw Error("Cannot create literal schema with no valid values");$._zod.values=new Set(U.values),$._zod.pattern=new RegExp(`^(${U.values.map((J)=>typeof J==="string"?e$(J):J?e$(J.toString()):String(J)).join("|")})$`),$._zod.parse=(J,V)=>{let I=J.value;if($._zod.values.has(I))return J;return J.issues.push({code:"invalid_value",values:U.values,input:I,inst:$}),J}}),TX=O0("$ZodFile",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=J.value;if(I instanceof File)return J;return J.issues.push({expected:"file",code:"invalid_type",input:I,inst:$}),J}}),FI=O0("$ZodTransform",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=U.transform(J.value,J);if(V.async)return(I instanceof Promise?I:Promise.resolve(I)).then((Y)=>{return J.value=Y,J});if(I instanceof Promise)throw new OU;return J.value=I,J}});function vY($,U){if($.issues.length&&U===void 0)return{issues:[],value:void 0};return $}var qX=O0("$ZodOptional",($,U)=>{l0.init($,U),$._zod.optin="optional",$._zod.optout="optional",t0($._zod,"values",()=>{return U.innerType._zod.values?new Set([...U.innerType._zod.values,void 0]):void 0}),t0($._zod,"pattern",()=>{let J=U.innerType._zod.pattern;return J?new RegExp(`^(${GI(J.source)})?$`):void 0}),$._zod.parse=(J,V)=>{if(U.innerType._zod.optin==="optional"){let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>vY(S,J.value));return vY(I,J.value)}if(J.value===void 0)return J;return U.innerType._zod.run(J,V)}}),RX=O0("$ZodNullable",($,U)=>{l0.init($,U),t0($._zod,"optin",()=>U.innerType._zod.optin),t0($._zod,"optout",()=>U.innerType._zod.optout),t0($._zod,"pattern",()=>{let J=U.innerType._zod.pattern;return J?new RegExp(`^(${GI(J.source)}|null)$`):void 0}),t0($._zod,"values",()=>{return U.innerType._zod.values?new Set([...U.innerType._zod.values,null]):void 0}),$._zod.parse=(J,V)=>{if(J.value===null)return J;return U.innerType._zod.run(J,V)}}),CX=O0("$ZodDefault",($,U)=>{l0.init($,U),$._zod.optin="optional",t0($._zod,"values",()=>U.innerType._zod.values),$._zod.parse=(J,V)=>{if(J.value===void 0)return J.value=U.defaultValue,J;let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>MY(S,U));return MY(I,U)}});function MY($,U){if($.value===void 0)$.value=U.defaultValue;return $}var kX=O0("$ZodPrefault",($,U)=>{l0.init($,U),$._zod.optin="optional",t0($._zod,"values",()=>U.innerType._zod.values),$._zod.parse=(J,V)=>{if(J.value===void 0)J.value=U.defaultValue;return U.innerType._zod.run(J,V)}}),gX=O0("$ZodNonOptional",($,U)=>{l0.init($,U),t0($._zod,"values",()=>{let J=U.innerType._zod.values;return J?new Set([...J].filter((V)=>V!==void 0)):void 0}),$._zod.parse=(J,V)=>{let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>PY(S,$));return PY(I,$)}});function PY($,U){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:U});return $}var jX=O0("$ZodSuccess",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>{return J.value=S.issues.length===0,J});return J.value=I.issues.length===0,J}}),_X=O0("$ZodCatch",($,U)=>{l0.init($,U),t0($._zod,"optin",()=>U.innerType._zod.optin),t0($._zod,"optout",()=>U.innerType._zod.optout),t0($._zod,"values",()=>U.innerType._zod.values),$._zod.parse=(J,V)=>{let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>{if(J.value=S.value,S.issues.length)J.value=U.catchValue({...J,error:{issues:S.issues.map((Y)=>l$(Y,V,V$()))},input:J.value}),J.issues=[];return J});if(J.value=I.value,I.issues.length)J.value=U.catchValue({...J,error:{issues:I.issues.map((S)=>l$(S,V,V$()))},input:J.value}),J.issues=[];return J}}),NX=O0("$ZodNaN",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{if(typeof J.value!=="number"||!Number.isNaN(J.value))return J.issues.push({input:J.value,inst:$,expected:"nan",code:"invalid_type"}),J;return J}}),LI=O0("$ZodPipe",($,U)=>{l0.init($,U),t0($._zod,"values",()=>U.in._zod.values),t0($._zod,"optin",()=>U.in._zod.optin),t0($._zod,"optout",()=>U.out._zod.optout),t0($._zod,"propValues",()=>U.in._zod.propValues),$._zod.parse=(J,V)=>{let I=U.in._zod.run(J,V);if(I instanceof Promise)return I.then((S)=>TY(S,U,V));return TY(I,U,V)}});function TY($,U,J){if($.issues.length)return $;return U.out._zod.run({value:$.value,issues:$.issues},J)}var xX=O0("$ZodReadonly",($,U)=>{l0.init($,U),t0($._zod,"propValues",()=>U.innerType._zod.propValues),t0($._zod,"values",()=>U.innerType._zod.values),t0($._zod,"optin",()=>U.innerType._zod.optin),t0($._zod,"optout",()=>U.innerType._zod.optout),$._zod.parse=(J,V)=>{let I=U.innerType._zod.run(J,V);if(I instanceof Promise)return I.then(qY);return qY(I)}});function qY($){return $.value=Object.freeze($.value),$}var BX=O0("$ZodTemplateLiteral",($,U)=>{l0.init($,U);let J=[];for(let V of U.parts)if(V instanceof l0){if(!V._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...V._zod.traits].shift()}`);let I=V._zod.pattern instanceof RegExp?V._zod.pattern.source:V._zod.pattern;if(!I)throw Error(`Invalid template literal part: ${V._zod.traits}`);let S=I.startsWith("^")?1:0,Y=I.endsWith("$")?I.length-1:I.length;J.push(I.slice(S,Y))}else if(V===null||x6.has(typeof V))J.push(e$(`${V}`));else throw Error(`Invalid template literal part: ${V}`);$._zod.pattern=new RegExp(`^${J.join("")}$`),$._zod.parse=(V,I)=>{if(typeof V.value!=="string")return V.issues.push({input:V.value,inst:$,expected:"template_literal",code:"invalid_type"}),V;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(V.value))return V.issues.push({input:V.value,inst:$,code:"invalid_format",format:U.format??"template_literal",pattern:$._zod.pattern.source}),V;return V}}),cX=O0("$ZodPromise",($,U)=>{l0.init($,U),$._zod.parse=(J,V)=>{return Promise.resolve(J.value).then((I)=>U.innerType._zod.run({value:I,issues:[]},V))}}),wX=O0("$ZodLazy",($,U)=>{l0.init($,U),t0($._zod,"innerType",()=>U.getter()),t0($._zod,"pattern",()=>$._zod.innerType._zod.pattern),t0($._zod,"propValues",()=>$._zod.innerType._zod.propValues),t0($._zod,"optin",()=>$._zod.innerType._zod.optin??void 0),t0($._zod,"optout",()=>$._zod.innerType._zod.optout??void 0),$._zod.parse=(J,V)=>{return $._zod.innerType._zod.run(J,V)}}),fX=O0("$ZodCustom",($,U)=>{I$.init($,U),l0.init($,U),$._zod.parse=(J,V)=>{return J},$._zod.check=(J)=>{let V=J.value,I=U.fn(V);if(I instanceof Promise)return I.then((S)=>RY(S,J,V,$));RY(I,J,V,$);return}});function RY($,U,J,V){if(!$){let I={code:"custom",input:J,inst:V,path:[...V._zod.def.path??[]],continue:!V._zod.def.abort};if(V._zod.def.params)I.params=V._zod.def.params;U.issues.push(pU(I))}}var ZI={};d$(ZI,{zhTW:()=>P4,zhCN:()=>M4,yo:()=>T4,vi:()=>v4,ur:()=>Z4,ua:()=>E4,tr:()=>L4,th:()=>F4,ta:()=>H4,sv:()=>A4,sl:()=>K4,ru:()=>z4,pt:()=>D4,ps:()=>S4,pl:()=>W4,ota:()=>V4,no:()=>G4,nl:()=>Y4,ms:()=>Q4,mk:()=>J4,ko:()=>X4,kh:()=>O4,ja:()=>I4,it:()=>U4,is:()=>$4,id:()=>sX,hu:()=>aX,he:()=>eX,frCA:()=>iX,fr:()=>tX,fi:()=>dX,fa:()=>mX,es:()=>nX,eo:()=>rX,en:()=>EI,de:()=>oX,da:()=>lX,cs:()=>bX,ca:()=>pX,be:()=>uX,az:()=>hX,ar:()=>yX});var bS=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return(I)=>{switch(I.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${I.expected}، ولكن تم إدخال ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${f0(I.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return` أكبر من اللازم: يفترض أن تكون ${I.origin??"القيمة"} ${S} ${I.maximum.toString()} ${Y.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${I.origin??"القيمة"} ${S} ${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`أصغر من اللازم: يفترض لـ ${I.origin} أن يكون ${S} ${I.minimum.toString()} ${Y.unit}`;return`أصغر من اللازم: يفترض لـ ${I.origin} أن يكون ${S} ${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${I.prefix}"`;if(S.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${S.suffix}"`;if(S.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${S.includes}"`;if(S.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${S.pattern}`;return`${V[S.format]??I.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${I.divisor}`;case"unrecognized_keys":return`معرف${I.keys.length>1?"ات":""} غريب${I.keys.length>1?"ة":""}: ${S0(I.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${I.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${I.origin}`;default:return"مدخل غير مقبول"}}};function yX(){return{localeError:bS()}}var lS=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${I.expected}, daxil olan ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Yanlış dəyər: gözlənilən ${f0(I.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Çox böyük: gözlənilən ${I.origin??"dəyər"} ${S}${I.maximum.toString()} ${Y.unit??"element"}`;return`Çox böyük: gözlənilən ${I.origin??"dəyər"} ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Çox kiçik: gözlənilən ${I.origin} ${S}${I.minimum.toString()} ${Y.unit}`;return`Çox kiçik: gözlənilən ${I.origin} ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Yanlış mətn: "${S.prefix}" ilə başlamalıdır`;if(S.format==="ends_with")return`Yanlış mətn: "${S.suffix}" ilə bitməlidir`;if(S.format==="includes")return`Yanlış mətn: "${S.includes}" daxil olmalıdır`;if(S.format==="regex")return`Yanlış mətn: ${S.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${V[S.format]??I.format}`}case"not_multiple_of":return`Yanlış ədəd: ${I.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${I.keys.length>1?"lar":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`${I.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${I.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function hX(){return{localeError:lS()}}function jY($,U,J,V){let I=Math.abs($),S=I%10,Y=I%100;if(Y>=11&&Y<=19)return V;if(S===1)return U;if(S>=2&&S<=4)return J;return V}var oS=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"лік";case"object":{if(Array.isArray(I))return"масіў";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return(I)=>{switch(I.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${I.expected}, атрымана ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Няправільны ўвод: чакалася ${f0(I.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y){let M=Number(I.maximum),T=jY(M,Y.unit.one,Y.unit.few,Y.unit.many);return`Занадта вялікі: чакалася, што ${I.origin??"значэнне"} павінна ${Y.verb} ${S}${I.maximum.toString()} ${T}`}return`Занадта вялікі: чакалася, што ${I.origin??"значэнне"} павінна быць ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y){let M=Number(I.minimum),T=jY(M,Y.unit.one,Y.unit.few,Y.unit.many);return`Занадта малы: чакалася, што ${I.origin} павінна ${Y.verb} ${S}${I.minimum.toString()} ${T}`}return`Занадта малы: чакалася, што ${I.origin} павінна быць ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${S.prefix}"`;if(S.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${S.suffix}"`;if(S.format==="includes")return`Няправільны радок: павінен змяшчаць "${S.includes}"`;if(S.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${S.pattern}`;return`Няправільны ${V[S.format]??I.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${I.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${I.keys.length>1?"ключы":"ключ"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${I.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${I.origin}`;default:return"Няправільны ўвод"}}};function uX(){return{localeError:oS()}}var rS=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(I)=>{switch(I.code){case"invalid_type":return`Tipus invàlid: s'esperava ${I.expected}, s'ha rebut ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Valor invàlid: s'esperava ${f0(I.values[0])}`;return`Opció invàlida: s'esperava una de ${S0(I.values," o ")}`;case"too_big":{let S=I.inclusive?"com a màxim":"menys de",Y=U(I.origin);if(Y)return`Massa gran: s'esperava que ${I.origin??"el valor"} contingués ${S} ${I.maximum.toString()} ${Y.unit??"elements"}`;return`Massa gran: s'esperava que ${I.origin??"el valor"} fos ${S} ${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?"com a mínim":"més de",Y=U(I.origin);if(Y)return`Massa petit: s'esperava que ${I.origin} contingués ${S} ${I.minimum.toString()} ${Y.unit}`;return`Massa petit: s'esperava que ${I.origin} fos ${S} ${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Format invàlid: ha de començar amb "${S.prefix}"`;if(S.format==="ends_with")return`Format invàlid: ha d'acabar amb "${S.suffix}"`;if(S.format==="includes")return`Format invàlid: ha d'incloure "${S.includes}"`;if(S.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${S.pattern}`;return`Format invàlid per a ${V[S.format]??I.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${I.divisor}`;case"unrecognized_keys":return`Clau${I.keys.length>1?"s":""} no reconeguda${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${I.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${I.origin}`;default:return"Entrada invàlida"}}};function pX(){return{localeError:rS()}}var nS=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(I))return"pole";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return(I)=>{switch(I.code){case"invalid_type":return`Neplatný vstup: očekáváno ${I.expected}, obdrženo ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Neplatný vstup: očekáváno ${f0(I.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Hodnota je příliš velká: ${I.origin??"hodnota"} musí mít ${S}${I.maximum.toString()} ${Y.unit??"prvků"}`;return`Hodnota je příliš velká: ${I.origin??"hodnota"} musí být ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Hodnota je příliš malá: ${I.origin??"hodnota"} musí mít ${S}${I.minimum.toString()} ${Y.unit??"prvků"}`;return`Hodnota je příliš malá: ${I.origin??"hodnota"} musí být ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Neplatný řetězec: musí začínat na "${S.prefix}"`;if(S.format==="ends_with")return`Neplatný řetězec: musí končit na "${S.suffix}"`;if(S.format==="includes")return`Neplatný řetězec: musí obsahovat "${S.includes}"`;if(S.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${S.pattern}`;return`Neplatný formát ${V[S.format]??I.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${I.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${S0(I.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${I.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${I.origin}`;default:return"Neplatný vstup"}}};function bX(){return{localeError:nS()}}var mS=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},U={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function J(Y){return $[Y]??null}function V(Y){return U[Y]??Y}let I=(Y)=>{let M=typeof Y;switch(M){case"number":return Number.isNaN(Y)?"NaN":"tal";case"object":{if(Array.isArray(Y))return"liste";if(Y===null)return"null";if(Object.getPrototypeOf(Y)!==Object.prototype&&Y.constructor)return Y.constructor.name;return"objekt"}}return M},S={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return(Y)=>{switch(Y.code){case"invalid_type":return`Ugyldigt input: forventede ${V(Y.expected)}, fik ${V(I(Y.input))}`;case"invalid_value":if(Y.values.length===1)return`Ugyldig værdi: forventede ${f0(Y.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${S0(Y.values,"|")}`;case"too_big":{let M=Y.inclusive?"<=":"<",T=J(Y.origin),L=V(Y.origin);if(T)return`For stor: forventede ${L??"value"} ${T.verb} ${M} ${Y.maximum.toString()} ${T.unit??"elementer"}`;return`For stor: forventede ${L??"value"} havde ${M} ${Y.maximum.toString()}`}case"too_small":{let M=Y.inclusive?">=":">",T=J(Y.origin),L=V(Y.origin);if(T)return`For lille: forventede ${L} ${T.verb} ${M} ${Y.minimum.toString()} ${T.unit}`;return`For lille: forventede ${L} havde ${M} ${Y.minimum.toString()}`}case"invalid_format":{let M=Y;if(M.format==="starts_with")return`Ugyldig streng: skal starte med "${M.prefix}"`;if(M.format==="ends_with")return`Ugyldig streng: skal ende med "${M.suffix}"`;if(M.format==="includes")return`Ugyldig streng: skal indeholde "${M.includes}"`;if(M.format==="regex")return`Ugyldig streng: skal matche mønsteret ${M.pattern}`;return`Ugyldig ${S[M.format]??Y.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${Y.divisor}`;case"unrecognized_keys":return`${Y.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${S0(Y.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${Y.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${Y.origin}`;default:return"Ugyldigt input"}}};function lX(){return{localeError:mS()}}var dS=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"Zahl";case"object":{if(Array.isArray(I))return"Array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return(I)=>{switch(I.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${I.expected}, erhalten ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Ungültige Eingabe: erwartet ${f0(I.values[0])}`;return`Ungültige Option: erwartet eine von ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Zu groß: erwartet, dass ${I.origin??"Wert"} ${S}${I.maximum.toString()} ${Y.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${I.origin??"Wert"} ${S}${I.maximum.toString()} ist`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Zu klein: erwartet, dass ${I.origin} ${S}${I.minimum.toString()} ${Y.unit} hat`;return`Zu klein: erwartet, dass ${I.origin} ${S}${I.minimum.toString()} ist`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Ungültiger String: muss mit "${S.prefix}" beginnen`;if(S.format==="ends_with")return`Ungültiger String: muss mit "${S.suffix}" enden`;if(S.format==="includes")return`Ungültiger String: muss "${S.includes}" enthalten`;if(S.format==="regex")return`Ungültiger String: muss dem Muster ${S.pattern} entsprechen`;return`Ungültig: ${V[S.format]??I.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${I.divisor} sein`;case"unrecognized_keys":return`${I.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${I.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${I.origin}`;default:return"Ungültige Eingabe"}}};function oX(){return{localeError:dS()}}var tS=($)=>{let U=typeof $;switch(U){case"number":return Number.isNaN($)?"NaN":"number";case"object":{if(Array.isArray($))return"array";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return U},iS=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function U(V){return $[V]??null}let J={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return(V)=>{switch(V.code){case"invalid_type":return`Invalid input: expected ${V.expected}, received ${tS(V.input)}`;case"invalid_value":if(V.values.length===1)return`Invalid input: expected ${f0(V.values[0])}`;return`Invalid option: expected one of ${S0(V.values,"|")}`;case"too_big":{let I=V.inclusive?"<=":"<",S=U(V.origin);if(S)return`Too big: expected ${V.origin??"value"} to have ${I}${V.maximum.toString()} ${S.unit??"elements"}`;return`Too big: expected ${V.origin??"value"} to be ${I}${V.maximum.toString()}`}case"too_small":{let I=V.inclusive?">=":">",S=U(V.origin);if(S)return`Too small: expected ${V.origin} to have ${I}${V.minimum.toString()} ${S.unit}`;return`Too small: expected ${V.origin} to be ${I}${V.minimum.toString()}`}case"invalid_format":{let I=V;if(I.format==="starts_with")return`Invalid string: must start with "${I.prefix}"`;if(I.format==="ends_with")return`Invalid string: must end with "${I.suffix}"`;if(I.format==="includes")return`Invalid string: must include "${I.includes}"`;if(I.format==="regex")return`Invalid string: must match pattern ${I.pattern}`;return`Invalid ${J[I.format]??V.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${V.divisor}`;case"unrecognized_keys":return`Unrecognized key${V.keys.length>1?"s":""}: ${S0(V.keys,", ")}`;case"invalid_key":return`Invalid key in ${V.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${V.origin}`;default:return"Invalid input"}}};function EI(){return{localeError:iS()}}var eS=($)=>{let U=typeof $;switch(U){case"number":return Number.isNaN($)?"NaN":"nombro";case"object":{if(Array.isArray($))return"tabelo";if($===null)return"senvalora";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return U},aS=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function U(V){return $[V]??null}let J={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return(V)=>{switch(V.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${V.expected}, riceviĝis ${eS(V.input)}`;case"invalid_value":if(V.values.length===1)return`Nevalida enigo: atendiĝis ${f0(V.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${S0(V.values,"|")}`;case"too_big":{let I=V.inclusive?"<=":"<",S=U(V.origin);if(S)return`Tro granda: atendiĝis ke ${V.origin??"valoro"} havu ${I}${V.maximum.toString()} ${S.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${V.origin??"valoro"} havu ${I}${V.maximum.toString()}`}case"too_small":{let I=V.inclusive?">=":">",S=U(V.origin);if(S)return`Tro malgranda: atendiĝis ke ${V.origin} havu ${I}${V.minimum.toString()} ${S.unit}`;return`Tro malgranda: atendiĝis ke ${V.origin} estu ${I}${V.minimum.toString()}`}case"invalid_format":{let I=V;if(I.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${I.prefix}"`;if(I.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${I.suffix}"`;if(I.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${I.includes}"`;if(I.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${I.pattern}`;return`Nevalida ${J[I.format]??V.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${V.divisor}`;case"unrecognized_keys":return`Nekonata${V.keys.length>1?"j":""} ŝlosilo${V.keys.length>1?"j":""}: ${S0(V.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${V.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${V.origin}`;default:return"Nevalida enigo"}}};function rX(){return{localeError:aS()}}var sS=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"número";case"object":{if(Array.isArray(I))return"arreglo";if(I===null)return"nulo";if(Object.getPrototypeOf(I)!==Object.prototype)return I.constructor.name}}return S},V={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(I)=>{switch(I.code){case"invalid_type":return`Entrada inválida: se esperaba ${I.expected}, recibido ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Entrada inválida: se esperaba ${f0(I.values[0])}`;return`Opción inválida: se esperaba una de ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Demasiado grande: se esperaba que ${I.origin??"valor"} tuviera ${S}${I.maximum.toString()} ${Y.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${I.origin??"valor"} fuera ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Demasiado pequeño: se esperaba que ${I.origin} tuviera ${S}${I.minimum.toString()} ${Y.unit}`;return`Demasiado pequeño: se esperaba que ${I.origin} fuera ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Cadena inválida: debe comenzar con "${S.prefix}"`;if(S.format==="ends_with")return`Cadena inválida: debe terminar en "${S.suffix}"`;if(S.format==="includes")return`Cadena inválida: debe incluir "${S.includes}"`;if(S.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${S.pattern}`;return`Inválido ${V[S.format]??I.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${I.divisor}`;case"unrecognized_keys":return`Llave${I.keys.length>1?"s":""} desconocida${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Llave inválida en ${I.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${I.origin}`;default:return"Entrada inválida"}}};function nX(){return{localeError:sS()}}var $W=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"عدد";case"object":{if(Array.isArray(I))return"آرایه";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return(I)=>{switch(I.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${I.expected} می‌بود، ${J(I.input)} دریافت شد`;case"invalid_value":if(I.values.length===1)return`ورودی نامعتبر: می‌بایست ${f0(I.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${S0(I.values,"|")} می‌بود`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`خیلی بزرگ: ${I.origin??"مقدار"} باید ${S}${I.maximum.toString()} ${Y.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${I.origin??"مقدار"} باید ${S}${I.maximum.toString()} باشد`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`خیلی کوچک: ${I.origin} باید ${S}${I.minimum.toString()} ${Y.unit} باشد`;return`خیلی کوچک: ${I.origin} باید ${S}${I.minimum.toString()} باشد`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`رشته نامعتبر: باید با "${S.prefix}" شروع شود`;if(S.format==="ends_with")return`رشته نامعتبر: باید با "${S.suffix}" تمام شود`;if(S.format==="includes")return`رشته نامعتبر: باید شامل "${S.includes}" باشد`;if(S.format==="regex")return`رشته نامعتبر: باید با الگوی ${S.pattern} مطابقت داشته باشد`;return`${V[S.format]??I.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${I.divisor} باشد`;case"unrecognized_keys":return`کلید${I.keys.length>1?"های":""} ناشناس: ${S0(I.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${I.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${I.origin}`;default:return"ورودی نامعتبر"}}};function mX(){return{localeError:$W()}}var UW=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return(I)=>{switch(I.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${I.expected}, oli ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Virheellinen syöte: täytyy olla ${f0(I.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Liian suuri: ${Y.subject} täytyy olla ${S}${I.maximum.toString()} ${Y.unit}`.trim();return`Liian suuri: arvon täytyy olla ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Liian pieni: ${Y.subject} täytyy olla ${S}${I.minimum.toString()} ${Y.unit}`.trim();return`Liian pieni: arvon täytyy olla ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${S.prefix}"`;if(S.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${S.suffix}"`;if(S.format==="includes")return`Virheellinen syöte: täytyy sisältää "${S.includes}"`;if(S.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${S.pattern}`;return`Virheellinen ${V[S.format]??I.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${I.divisor} monikerta`;case"unrecognized_keys":return`${I.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S0(I.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function dX(){return{localeError:UW()}}var IW=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"nombre";case"object":{if(Array.isArray(I))return"tableau";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(I)=>{switch(I.code){case"invalid_type":return`Entrée invalide : ${I.expected} attendu, ${J(I.input)} reçu`;case"invalid_value":if(I.values.length===1)return`Entrée invalide : ${f0(I.values[0])} attendu`;return`Option invalide : une valeur parmi ${S0(I.values,"|")} attendue`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Trop grand : ${I.origin??"valeur"} doit ${Y.verb} ${S}${I.maximum.toString()} ${Y.unit??"élément(s)"}`;return`Trop grand : ${I.origin??"valeur"} doit être ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Trop petit : ${I.origin} doit ${Y.verb} ${S}${I.minimum.toString()} ${Y.unit}`;return`Trop petit : ${I.origin} doit être ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Chaîne invalide : doit commencer par "${S.prefix}"`;if(S.format==="ends_with")return`Chaîne invalide : doit se terminer par "${S.suffix}"`;if(S.format==="includes")return`Chaîne invalide : doit inclure "${S.includes}"`;if(S.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${S.pattern}`;return`${V[S.format]??I.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${I.divisor}`;case"unrecognized_keys":return`Clé${I.keys.length>1?"s":""} non reconnue${I.keys.length>1?"s":""} : ${S0(I.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${I.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${I.origin}`;default:return"Entrée invalide"}}};function tX(){return{localeError:IW()}}var OW=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return(I)=>{switch(I.code){case"invalid_type":return`Entrée invalide : attendu ${I.expected}, reçu ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Entrée invalide : attendu ${f0(I.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"≤":"<",Y=U(I.origin);if(Y)return`Trop grand : attendu que ${I.origin??"la valeur"} ait ${S}${I.maximum.toString()} ${Y.unit}`;return`Trop grand : attendu que ${I.origin??"la valeur"} soit ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?"≥":">",Y=U(I.origin);if(Y)return`Trop petit : attendu que ${I.origin} ait ${S}${I.minimum.toString()} ${Y.unit}`;return`Trop petit : attendu que ${I.origin} soit ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Chaîne invalide : doit commencer par "${S.prefix}"`;if(S.format==="ends_with")return`Chaîne invalide : doit se terminer par "${S.suffix}"`;if(S.format==="includes")return`Chaîne invalide : doit inclure "${S.includes}"`;if(S.format==="regex")return`Chaîne invalide : doit correspondre au motif ${S.pattern}`;return`${V[S.format]??I.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${I.divisor}`;case"unrecognized_keys":return`Clé${I.keys.length>1?"s":""} non reconnue${I.keys.length>1?"s":""} : ${S0(I.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${I.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${I.origin}`;default:return"Entrée invalide"}}};function iX(){return{localeError:OW()}}var XW=()=>{let $={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return(I)=>{switch(I.code){case"invalid_type":return`קלט לא תקין: צריך ${I.expected}, התקבל ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`קלט לא תקין: צריך ${f0(I.values[0])}`;return`קלט לא תקין: צריך אחת מהאפשרויות ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`גדול מדי: ${I.origin??"value"} צריך להיות ${S}${I.maximum.toString()} ${Y.unit??"elements"}`;return`גדול מדי: ${I.origin??"value"} צריך להיות ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`קטן מדי: ${I.origin} צריך להיות ${S}${I.minimum.toString()} ${Y.unit}`;return`קטן מדי: ${I.origin} צריך להיות ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`מחרוזת לא תקינה: חייבת להתחיל ב"${S.prefix}"`;if(S.format==="ends_with")return`מחרוזת לא תקינה: חייבת להסתיים ב "${S.suffix}"`;if(S.format==="includes")return`מחרוזת לא תקינה: חייבת לכלול "${S.includes}"`;if(S.format==="regex")return`מחרוזת לא תקינה: חייבת להתאים לתבנית ${S.pattern}`;return`${V[S.format]??I.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${I.divisor}`;case"unrecognized_keys":return`מפתח${I.keys.length>1?"ות":""} לא מזוה${I.keys.length>1?"ים":"ה"}: ${S0(I.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${I.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${I.origin}`;default:return"קלט לא תקין"}}};function eX(){return{localeError:XW()}}var JW=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"szám";case"object":{if(Array.isArray(I))return"tömb";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return(I)=>{switch(I.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${I.expected}, a kapott érték ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Érvénytelen bemenet: a várt érték ${f0(I.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Túl nagy: ${I.origin??"érték"} mérete túl nagy ${S}${I.maximum.toString()} ${Y.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${I.origin??"érték"} túl nagy: ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Túl kicsi: a bemeneti érték ${I.origin} mérete túl kicsi ${S}${I.minimum.toString()} ${Y.unit}`;return`Túl kicsi: a bemeneti érték ${I.origin} túl kicsi ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Érvénytelen string: "${S.prefix}" értékkel kell kezdődnie`;if(S.format==="ends_with")return`Érvénytelen string: "${S.suffix}" értékkel kell végződnie`;if(S.format==="includes")return`Érvénytelen string: "${S.includes}" értéket kell tartalmaznia`;if(S.format==="regex")return`Érvénytelen string: ${S.pattern} mintának kell megfelelnie`;return`Érvénytelen ${V[S.format]??I.format}`}case"not_multiple_of":return`Érvénytelen szám: ${I.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${I.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${I.origin}`;default:return"Érvénytelen bemenet"}}};function aX(){return{localeError:JW()}}var QW=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`Input tidak valid: diharapkan ${I.expected}, diterima ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Input tidak valid: diharapkan ${f0(I.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Terlalu besar: diharapkan ${I.origin??"value"} memiliki ${S}${I.maximum.toString()} ${Y.unit??"elemen"}`;return`Terlalu besar: diharapkan ${I.origin??"value"} menjadi ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Terlalu kecil: diharapkan ${I.origin} memiliki ${S}${I.minimum.toString()} ${Y.unit}`;return`Terlalu kecil: diharapkan ${I.origin} menjadi ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`String tidak valid: harus dimulai dengan "${S.prefix}"`;if(S.format==="ends_with")return`String tidak valid: harus berakhir dengan "${S.suffix}"`;if(S.format==="includes")return`String tidak valid: harus menyertakan "${S.includes}"`;if(S.format==="regex")return`String tidak valid: harus sesuai pola ${S.pattern}`;return`${V[S.format]??I.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${I.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${I.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${I.origin}`;default:return"Input tidak valid"}}};function sX(){return{localeError:QW()}}var YW=($)=>{let U=typeof $;switch(U){case"number":return Number.isNaN($)?"NaN":"númer";case"object":{if(Array.isArray($))return"fylki";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return U},GW=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function U(V){return $[V]??null}let J={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return(V)=>{switch(V.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${YW(V.input)} þar sem á að vera ${V.expected}`;case"invalid_value":if(V.values.length===1)return`Rangt gildi: gert ráð fyrir ${f0(V.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${S0(V.values,"|")}`;case"too_big":{let I=V.inclusive?"<=":"<",S=U(V.origin);if(S)return`Of stórt: gert er ráð fyrir að ${V.origin??"gildi"} hafi ${I}${V.maximum.toString()} ${S.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${V.origin??"gildi"} sé ${I}${V.maximum.toString()}`}case"too_small":{let I=V.inclusive?">=":">",S=U(V.origin);if(S)return`Of lítið: gert er ráð fyrir að ${V.origin} hafi ${I}${V.minimum.toString()} ${S.unit}`;return`Of lítið: gert er ráð fyrir að ${V.origin} sé ${I}${V.minimum.toString()}`}case"invalid_format":{let I=V;if(I.format==="starts_with")return`Ógildur strengur: verður að byrja á "${I.prefix}"`;if(I.format==="ends_with")return`Ógildur strengur: verður að enda á "${I.suffix}"`;if(I.format==="includes")return`Ógildur strengur: verður að innihalda "${I.includes}"`;if(I.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${I.pattern}`;return`Rangt ${J[I.format]??V.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${V.divisor}`;case"unrecognized_keys":return`Óþekkt ${V.keys.length>1?"ir lyklar":"ur lykill"}: ${S0(V.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${V.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${V.origin}`;default:return"Rangt gildi"}}};function $4(){return{localeError:GW()}}var VW=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"numero";case"object":{if(Array.isArray(I))return"vettore";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`Input non valido: atteso ${I.expected}, ricevuto ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Input non valido: atteso ${f0(I.values[0])}`;return`Opzione non valida: atteso uno tra ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Troppo grande: ${I.origin??"valore"} deve avere ${S}${I.maximum.toString()} ${Y.unit??"elementi"}`;return`Troppo grande: ${I.origin??"valore"} deve essere ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Troppo piccolo: ${I.origin} deve avere ${S}${I.minimum.toString()} ${Y.unit}`;return`Troppo piccolo: ${I.origin} deve essere ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Stringa non valida: deve iniziare con "${S.prefix}"`;if(S.format==="ends_with")return`Stringa non valida: deve terminare con "${S.suffix}"`;if(S.format==="includes")return`Stringa non valida: deve includere "${S.includes}"`;if(S.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${S.pattern}`;return`Invalid ${V[S.format]??I.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${I.divisor}`;case"unrecognized_keys":return`Chiav${I.keys.length>1?"i":"e"} non riconosciut${I.keys.length>1?"e":"a"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${I.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${I.origin}`;default:return"Input non valido"}}};function U4(){return{localeError:VW()}}var SW=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"数値";case"object":{if(Array.isArray(I))return"配列";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return(I)=>{switch(I.code){case"invalid_type":return`無効な入力: ${I.expected}が期待されましたが、${J(I.input)}が入力されました`;case"invalid_value":if(I.values.length===1)return`無効な入力: ${f0(I.values[0])}が期待されました`;return`無効な選択: ${S0(I.values,"、")}のいずれかである必要があります`;case"too_big":{let S=I.inclusive?"以下である":"より小さい",Y=U(I.origin);if(Y)return`大きすぎる値: ${I.origin??"値"}は${I.maximum.toString()}${Y.unit??"要素"}${S}必要があります`;return`大きすぎる値: ${I.origin??"値"}は${I.maximum.toString()}${S}必要があります`}case"too_small":{let S=I.inclusive?"以上である":"より大きい",Y=U(I.origin);if(Y)return`小さすぎる値: ${I.origin}は${I.minimum.toString()}${Y.unit}${S}必要があります`;return`小さすぎる値: ${I.origin}は${I.minimum.toString()}${S}必要があります`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`無効な文字列: "${S.prefix}"で始まる必要があります`;if(S.format==="ends_with")return`無効な文字列: "${S.suffix}"で終わる必要があります`;if(S.format==="includes")return`無効な文字列: "${S.includes}"を含む必要があります`;if(S.format==="regex")return`無効な文字列: パターン${S.pattern}に一致する必要があります`;return`無効な${V[S.format]??I.format}`}case"not_multiple_of":return`無効な数値: ${I.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${I.keys.length>1?"群":""}: ${S0(I.keys,"、")}`;case"invalid_key":return`${I.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${I.origin}内の無効な値`;default:return"無効な入力"}}};function I4(){return{localeError:SW()}}var WW=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(I))return"អារេ (Array)";if(I===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return(I)=>{switch(I.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${I.expected} ប៉ុន្តែទទួលបាន ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${f0(I.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`ធំពេក៖ ត្រូវការ ${I.origin??"តម្លៃ"} ${S} ${I.maximum.toString()} ${Y.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${I.origin??"តម្លៃ"} ${S} ${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`តូចពេក៖ ត្រូវការ ${I.origin} ${S} ${I.minimum.toString()} ${Y.unit}`;return`តូចពេក៖ ត្រូវការ ${I.origin} ${S} ${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${S.prefix}"`;if(S.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${S.suffix}"`;if(S.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${S.includes}"`;if(S.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${S.pattern}`;return`មិនត្រឹមត្រូវ៖ ${V[S.format]??I.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${I.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${S0(I.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${I.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${I.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function O4(){return{localeError:WW()}}var DW=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return(I)=>{switch(I.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${I.expected}, 받은 타입은 ${J(I.input)}입니다`;case"invalid_value":if(I.values.length===1)return`잘못된 입력: 값은 ${f0(I.values[0])} 이어야 합니다`;return`잘못된 옵션: ${S0(I.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let S=I.inclusive?"이하":"미만",Y=S==="미만"?"이어야 합니다":"여야 합니다",M=U(I.origin),T=M?.unit??"요소";if(M)return`${I.origin??"값"}이 너무 큽니다: ${I.maximum.toString()}${T} ${S}${Y}`;return`${I.origin??"값"}이 너무 큽니다: ${I.maximum.toString()} ${S}${Y}`}case"too_small":{let S=I.inclusive?"이상":"초과",Y=S==="이상"?"이어야 합니다":"여야 합니다",M=U(I.origin),T=M?.unit??"요소";if(M)return`${I.origin??"값"}이 너무 작습니다: ${I.minimum.toString()}${T} ${S}${Y}`;return`${I.origin??"값"}이 너무 작습니다: ${I.minimum.toString()} ${S}${Y}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`잘못된 문자열: "${S.prefix}"(으)로 시작해야 합니다`;if(S.format==="ends_with")return`잘못된 문자열: "${S.suffix}"(으)로 끝나야 합니다`;if(S.format==="includes")return`잘못된 문자열: "${S.includes}"을(를) 포함해야 합니다`;if(S.format==="regex")return`잘못된 문자열: 정규식 ${S.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${V[S.format]??I.format}`}case"not_multiple_of":return`잘못된 숫자: ${I.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${S0(I.keys,", ")}`;case"invalid_key":return`잘못된 키: ${I.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${I.origin}`;default:return"잘못된 입력"}}};function X4(){return{localeError:DW()}}var zW=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"број";case"object":{if(Array.isArray(I))return"низа";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return(I)=>{switch(I.code){case"invalid_type":return`Грешен внес: се очекува ${I.expected}, примено ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Invalid input: expected ${f0(I.values[0])}`;return`Грешана опција: се очекува една ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Премногу голем: се очекува ${I.origin??"вредноста"} да има ${S}${I.maximum.toString()} ${Y.unit??"елементи"}`;return`Премногу голем: се очекува ${I.origin??"вредноста"} да биде ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Премногу мал: се очекува ${I.origin} да има ${S}${I.minimum.toString()} ${Y.unit}`;return`Премногу мал: се очекува ${I.origin} да биде ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Неважечка низа: мора да започнува со "${S.prefix}"`;if(S.format==="ends_with")return`Неважечка низа: мора да завршува со "${S.suffix}"`;if(S.format==="includes")return`Неважечка низа: мора да вклучува "${S.includes}"`;if(S.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${S.pattern}`;return`Invalid ${V[S.format]??I.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${I.divisor}`;case"unrecognized_keys":return`${I.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${I.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${I.origin}`;default:return"Грешен внес"}}};function J4(){return{localeError:zW()}}var KW=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"nombor";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`Input tidak sah: dijangka ${I.expected}, diterima ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Input tidak sah: dijangka ${f0(I.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Terlalu besar: dijangka ${I.origin??"nilai"} ${Y.verb} ${S}${I.maximum.toString()} ${Y.unit??"elemen"}`;return`Terlalu besar: dijangka ${I.origin??"nilai"} adalah ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Terlalu kecil: dijangka ${I.origin} ${Y.verb} ${S}${I.minimum.toString()} ${Y.unit}`;return`Terlalu kecil: dijangka ${I.origin} adalah ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`String tidak sah: mesti bermula dengan "${S.prefix}"`;if(S.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${S.suffix}"`;if(S.format==="includes")return`String tidak sah: mesti mengandungi "${S.includes}"`;if(S.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${S.pattern}`;return`${V[S.format]??I.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${I.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S0(I.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${I.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${I.origin}`;default:return"Input tidak sah"}}};function Q4(){return{localeError:KW()}}var AW=()=>{let $={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"getal";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return(I)=>{switch(I.code){case"invalid_type":return`Ongeldige invoer: verwacht ${I.expected}, ontving ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Ongeldige invoer: verwacht ${f0(I.values[0])}`;return`Ongeldige optie: verwacht één van ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Te lang: verwacht dat ${I.origin??"waarde"} ${S}${I.maximum.toString()} ${Y.unit??"elementen"} bevat`;return`Te lang: verwacht dat ${I.origin??"waarde"} ${S}${I.maximum.toString()} is`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Te kort: verwacht dat ${I.origin} ${S}${I.minimum.toString()} ${Y.unit} bevat`;return`Te kort: verwacht dat ${I.origin} ${S}${I.minimum.toString()} is`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Ongeldige tekst: moet met "${S.prefix}" beginnen`;if(S.format==="ends_with")return`Ongeldige tekst: moet op "${S.suffix}" eindigen`;if(S.format==="includes")return`Ongeldige tekst: moet "${S.includes}" bevatten`;if(S.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${S.pattern}`;return`Ongeldig: ${V[S.format]??I.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${I.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${I.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${I.origin}`;default:return"Ongeldige invoer"}}};function Y4(){return{localeError:AW()}}var HW=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"tall";case"object":{if(Array.isArray(I))return"liste";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`Ugyldig input: forventet ${I.expected}, fikk ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Ugyldig verdi: forventet ${f0(I.values[0])}`;return`Ugyldig valg: forventet en av ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`For stor(t): forventet ${I.origin??"value"} til å ha ${S}${I.maximum.toString()} ${Y.unit??"elementer"}`;return`For stor(t): forventet ${I.origin??"value"} til å ha ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`For lite(n): forventet ${I.origin} til å ha ${S}${I.minimum.toString()} ${Y.unit}`;return`For lite(n): forventet ${I.origin} til å ha ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Ugyldig streng: må starte med "${S.prefix}"`;if(S.format==="ends_with")return`Ugyldig streng: må ende med "${S.suffix}"`;if(S.format==="includes")return`Ugyldig streng: må inneholde "${S.includes}"`;if(S.format==="regex")return`Ugyldig streng: må matche mønsteret ${S.pattern}`;return`Ugyldig ${V[S.format]??I.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${I.divisor}`;case"unrecognized_keys":return`${I.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${I.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${I.origin}`;default:return"Ugyldig input"}}};function G4(){return{localeError:HW()}}var FW=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"numara";case"object":{if(Array.isArray(I))return"saf";if(I===null)return"gayb";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return(I)=>{switch(I.code){case"invalid_type":return`Fâsit giren: umulan ${I.expected}, alınan ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Fâsit giren: umulan ${f0(I.values[0])}`;return`Fâsit tercih: mûteberler ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Fazla büyük: ${I.origin??"value"}, ${S}${I.maximum.toString()} ${Y.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${I.origin??"value"}, ${S}${I.maximum.toString()} olmalıydı.`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Fazla küçük: ${I.origin}, ${S}${I.minimum.toString()} ${Y.unit} sahip olmalıydı.`;return`Fazla küçük: ${I.origin}, ${S}${I.minimum.toString()} olmalıydı.`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Fâsit metin: "${S.prefix}" ile başlamalı.`;if(S.format==="ends_with")return`Fâsit metin: "${S.suffix}" ile bitmeli.`;if(S.format==="includes")return`Fâsit metin: "${S.includes}" ihtivâ etmeli.`;if(S.format==="regex")return`Fâsit metin: ${S.pattern} nakşına uymalı.`;return`Fâsit ${V[S.format]??I.format}`}case"not_multiple_of":return`Fâsit sayı: ${I.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`${I.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${I.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function V4(){return{localeError:FW()}}var LW=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"عدد";case"object":{if(Array.isArray(I))return"ارې";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return(I)=>{switch(I.code){case"invalid_type":return`ناسم ورودي: باید ${I.expected} وای, مګر ${J(I.input)} ترلاسه شو`;case"invalid_value":if(I.values.length===1)return`ناسم ورودي: باید ${f0(I.values[0])} وای`;return`ناسم انتخاب: باید یو له ${S0(I.values,"|")} څخه وای`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`ډیر لوی: ${I.origin??"ارزښت"} باید ${S}${I.maximum.toString()} ${Y.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${I.origin??"ارزښت"} باید ${S}${I.maximum.toString()} وي`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`ډیر کوچنی: ${I.origin} باید ${S}${I.minimum.toString()} ${Y.unit} ولري`;return`ډیر کوچنی: ${I.origin} باید ${S}${I.minimum.toString()} وي`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`ناسم متن: باید د "${S.prefix}" سره پیل شي`;if(S.format==="ends_with")return`ناسم متن: باید د "${S.suffix}" سره پای ته ورسيږي`;if(S.format==="includes")return`ناسم متن: باید "${S.includes}" ولري`;if(S.format==="regex")return`ناسم متن: باید د ${S.pattern} سره مطابقت ولري`;return`${V[S.format]??I.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${I.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${I.keys.length>1?"کلیډونه":"کلیډ"}: ${S0(I.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${I.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${I.origin} کې`;default:return"ناسمه ورودي"}}};function S4(){return{localeError:LW()}}var EW=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"liczba";case"object":{if(Array.isArray(I))return"tablica";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return(I)=>{switch(I.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${I.expected}, otrzymano ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${f0(I.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Za duża wartość: oczekiwano, że ${I.origin??"wartość"} będzie mieć ${S}${I.maximum.toString()} ${Y.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${I.origin??"wartość"} będzie wynosić ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Za mała wartość: oczekiwano, że ${I.origin??"wartość"} będzie mieć ${S}${I.minimum.toString()} ${Y.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${I.origin??"wartość"} będzie wynosić ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${S.prefix}"`;if(S.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${S.suffix}"`;if(S.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${S.includes}"`;if(S.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${S.pattern}`;return`Nieprawidłow(y/a/e) ${V[S.format]??I.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${I.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${I.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${I.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function W4(){return{localeError:EW()}}var ZW=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"número";case"object":{if(Array.isArray(I))return"array";if(I===null)return"nulo";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return(I)=>{switch(I.code){case"invalid_type":return`Tipo inválido: esperado ${I.expected}, recebido ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Entrada inválida: esperado ${f0(I.values[0])}`;return`Opção inválida: esperada uma das ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Muito grande: esperado que ${I.origin??"valor"} tivesse ${S}${I.maximum.toString()} ${Y.unit??"elementos"}`;return`Muito grande: esperado que ${I.origin??"valor"} fosse ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Muito pequeno: esperado que ${I.origin} tivesse ${S}${I.minimum.toString()} ${Y.unit}`;return`Muito pequeno: esperado que ${I.origin} fosse ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Texto inválido: deve começar com "${S.prefix}"`;if(S.format==="ends_with")return`Texto inválido: deve terminar com "${S.suffix}"`;if(S.format==="includes")return`Texto inválido: deve incluir "${S.includes}"`;if(S.format==="regex")return`Texto inválido: deve corresponder ao padrão ${S.pattern}`;return`${V[S.format]??I.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${I.divisor}`;case"unrecognized_keys":return`Chave${I.keys.length>1?"s":""} desconhecida${I.keys.length>1?"s":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Chave inválida em ${I.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${I.origin}`;default:return"Campo inválido"}}};function D4(){return{localeError:ZW()}}function _Y($,U,J,V){let I=Math.abs($),S=I%10,Y=I%100;if(Y>=11&&Y<=19)return V;if(S===1)return U;if(S>=2&&S<=4)return J;return V}var vW=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"число";case"object":{if(Array.isArray(I))return"массив";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return(I)=>{switch(I.code){case"invalid_type":return`Неверный ввод: ожидалось ${I.expected}, получено ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Неверный ввод: ожидалось ${f0(I.values[0])}`;return`Неверный вариант: ожидалось одно из ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y){let M=Number(I.maximum),T=_Y(M,Y.unit.one,Y.unit.few,Y.unit.many);return`Слишком большое значение: ожидалось, что ${I.origin??"значение"} будет иметь ${S}${I.maximum.toString()} ${T}`}return`Слишком большое значение: ожидалось, что ${I.origin??"значение"} будет ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y){let M=Number(I.minimum),T=_Y(M,Y.unit.one,Y.unit.few,Y.unit.many);return`Слишком маленькое значение: ожидалось, что ${I.origin} будет иметь ${S}${I.minimum.toString()} ${T}`}return`Слишком маленькое значение: ожидалось, что ${I.origin} будет ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Неверная строка: должна начинаться с "${S.prefix}"`;if(S.format==="ends_with")return`Неверная строка: должна заканчиваться на "${S.suffix}"`;if(S.format==="includes")return`Неверная строка: должна содержать "${S.includes}"`;if(S.format==="regex")return`Неверная строка: должна соответствовать шаблону ${S.pattern}`;return`Неверный ${V[S.format]??I.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${I.divisor}`;case"unrecognized_keys":return`Нераспознанн${I.keys.length>1?"ые":"ый"} ключ${I.keys.length>1?"и":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${I.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${I.origin}`;default:return"Неверные входные данные"}}};function z4(){return{localeError:vW()}}var MW=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"število";case"object":{if(Array.isArray(I))return"tabela";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return(I)=>{switch(I.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${I.expected}, prejeto ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Neveljaven vnos: pričakovano ${f0(I.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Preveliko: pričakovano, da bo ${I.origin??"vrednost"} imelo ${S}${I.maximum.toString()} ${Y.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${I.origin??"vrednost"} ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Premajhno: pričakovano, da bo ${I.origin} imelo ${S}${I.minimum.toString()} ${Y.unit}`;return`Premajhno: pričakovano, da bo ${I.origin} ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Neveljaven niz: mora se začeti z "${S.prefix}"`;if(S.format==="ends_with")return`Neveljaven niz: mora se končati z "${S.suffix}"`;if(S.format==="includes")return`Neveljaven niz: mora vsebovati "${S.includes}"`;if(S.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${S.pattern}`;return`Neveljaven ${V[S.format]??I.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${I.divisor}`;case"unrecognized_keys":return`Neprepoznan${I.keys.length>1?"i ključi":" ključ"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${I.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${I.origin}`;default:return"Neveljaven vnos"}}};function K4(){return{localeError:MW()}}var PW=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"antal";case"object":{if(Array.isArray(I))return"lista";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return(I)=>{switch(I.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${I.expected}, fick ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Ogiltig inmatning: förväntat ${f0(I.values[0])}`;return`Ogiltigt val: förväntade en av ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`För stor(t): förväntade ${I.origin??"värdet"} att ha ${S}${I.maximum.toString()} ${Y.unit??"element"}`;return`För stor(t): förväntat ${I.origin??"värdet"} att ha ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`För lite(t): förväntade ${I.origin??"värdet"} att ha ${S}${I.minimum.toString()} ${Y.unit}`;return`För lite(t): förväntade ${I.origin??"värdet"} att ha ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Ogiltig sträng: måste börja med "${S.prefix}"`;if(S.format==="ends_with")return`Ogiltig sträng: måste sluta med "${S.suffix}"`;if(S.format==="includes")return`Ogiltig sträng: måste innehålla "${S.includes}"`;if(S.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${S.pattern}"`;return`Ogiltig(t) ${V[S.format]??I.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${I.divisor}`;case"unrecognized_keys":return`${I.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${S0(I.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${I.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${I.origin??"värdet"}`;default:return"Ogiltig input"}}};function A4(){return{localeError:PW()}}var TW=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(I))return"அணி";if(I===null)return"வெறுமை";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return(I)=>{switch(I.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${I.expected}, பெறப்பட்டது ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${f0(I.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${S0(I.values,"|")} இல் ஒன்று`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${I.origin??"மதிப்பு"} ${S}${I.maximum.toString()} ${Y.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${I.origin??"மதிப்பு"} ${S}${I.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${I.origin} ${S}${I.minimum.toString()} ${Y.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${I.origin} ${S}${I.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`தவறான சரம்: "${S.prefix}" இல் தொடங்க வேண்டும்`;if(S.format==="ends_with")return`தவறான சரம்: "${S.suffix}" இல் முடிவடைய வேண்டும்`;if(S.format==="includes")return`தவறான சரம்: "${S.includes}" ஐ உள்ளடக்க வேண்டும்`;if(S.format==="regex")return`தவறான சரம்: ${S.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${V[S.format]??I.format}`}case"not_multiple_of":return`தவறான எண்: ${I.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${I.keys.length>1?"கள்":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`${I.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${I.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function H4(){return{localeError:TW()}}var qW=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(I))return"อาร์เรย์ (Array)";if(I===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return(I)=>{switch(I.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${I.expected} แต่ได้รับ ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${f0(I.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"ไม่เกิน":"น้อยกว่า",Y=U(I.origin);if(Y)return`เกินกำหนด: ${I.origin??"ค่า"} ควรมี${S} ${I.maximum.toString()} ${Y.unit??"รายการ"}`;return`เกินกำหนด: ${I.origin??"ค่า"} ควรมี${S} ${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?"อย่างน้อย":"มากกว่า",Y=U(I.origin);if(Y)return`น้อยกว่ากำหนด: ${I.origin} ควรมี${S} ${I.minimum.toString()} ${Y.unit}`;return`น้อยกว่ากำหนด: ${I.origin} ควรมี${S} ${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${S.prefix}"`;if(S.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${S.suffix}"`;if(S.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${S.includes}" อยู่ในข้อความ`;if(S.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${S.pattern}`;return`รูปแบบไม่ถูกต้อง: ${V[S.format]??I.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${I.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${S0(I.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${I.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${I.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function F4(){return{localeError:qW()}}var RW=($)=>{let U=typeof $;switch(U){case"number":return Number.isNaN($)?"NaN":"number";case"object":{if(Array.isArray($))return"array";if($===null)return"null";if(Object.getPrototypeOf($)!==Object.prototype&&$.constructor)return $.constructor.name}}return U},CW=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function U(V){return $[V]??null}let J={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return(V)=>{switch(V.code){case"invalid_type":return`Geçersiz değer: beklenen ${V.expected}, alınan ${RW(V.input)}`;case"invalid_value":if(V.values.length===1)return`Geçersiz değer: beklenen ${f0(V.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${S0(V.values,"|")}`;case"too_big":{let I=V.inclusive?"<=":"<",S=U(V.origin);if(S)return`Çok büyük: beklenen ${V.origin??"değer"} ${I}${V.maximum.toString()} ${S.unit??"öğe"}`;return`Çok büyük: beklenen ${V.origin??"değer"} ${I}${V.maximum.toString()}`}case"too_small":{let I=V.inclusive?">=":">",S=U(V.origin);if(S)return`Çok küçük: beklenen ${V.origin} ${I}${V.minimum.toString()} ${S.unit}`;return`Çok küçük: beklenen ${V.origin} ${I}${V.minimum.toString()}`}case"invalid_format":{let I=V;if(I.format==="starts_with")return`Geçersiz metin: "${I.prefix}" ile başlamalı`;if(I.format==="ends_with")return`Geçersiz metin: "${I.suffix}" ile bitmeli`;if(I.format==="includes")return`Geçersiz metin: "${I.includes}" içermeli`;if(I.format==="regex")return`Geçersiz metin: ${I.pattern} desenine uymalı`;return`Geçersiz ${J[I.format]??V.format}`}case"not_multiple_of":return`Geçersiz sayı: ${V.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${V.keys.length>1?"lar":""}: ${S0(V.keys,", ")}`;case"invalid_key":return`${V.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${V.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function L4(){return{localeError:CW()}}var kW=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"число";case"object":{if(Array.isArray(I))return"масив";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return(I)=>{switch(I.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${I.expected}, отримано ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Неправильні вхідні дані: очікується ${f0(I.values[0])}`;return`Неправильна опція: очікується одне з ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Занадто велике: очікується, що ${I.origin??"значення"} ${Y.verb} ${S}${I.maximum.toString()} ${Y.unit??"елементів"}`;return`Занадто велике: очікується, що ${I.origin??"значення"} буде ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Занадто мале: очікується, що ${I.origin} ${Y.verb} ${S}${I.minimum.toString()} ${Y.unit}`;return`Занадто мале: очікується, що ${I.origin} буде ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Неправильний рядок: повинен починатися з "${S.prefix}"`;if(S.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${S.suffix}"`;if(S.format==="includes")return`Неправильний рядок: повинен містити "${S.includes}"`;if(S.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${S.pattern}`;return`Неправильний ${V[S.format]??I.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${I.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${I.keys.length>1?"і":""}: ${S0(I.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${I.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${I.origin}`;default:return"Неправильні вхідні дані"}}};function E4(){return{localeError:kW()}}var gW=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"نمبر";case"object":{if(Array.isArray(I))return"آرے";if(I===null)return"نل";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return(I)=>{switch(I.code){case"invalid_type":return`غلط ان پٹ: ${I.expected} متوقع تھا، ${J(I.input)} موصول ہوا`;case"invalid_value":if(I.values.length===1)return`غلط ان پٹ: ${f0(I.values[0])} متوقع تھا`;return`غلط آپشن: ${S0(I.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`بہت بڑا: ${I.origin??"ویلیو"} کے ${S}${I.maximum.toString()} ${Y.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${I.origin??"ویلیو"} کا ${S}${I.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`بہت چھوٹا: ${I.origin} کے ${S}${I.minimum.toString()} ${Y.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${I.origin} کا ${S}${I.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`غلط سٹرنگ: "${S.prefix}" سے شروع ہونا چاہیے`;if(S.format==="ends_with")return`غلط سٹرنگ: "${S.suffix}" پر ختم ہونا چاہیے`;if(S.format==="includes")return`غلط سٹرنگ: "${S.includes}" شامل ہونا چاہیے`;if(S.format==="regex")return`غلط سٹرنگ: پیٹرن ${S.pattern} سے میچ ہونا چاہیے`;return`غلط ${V[S.format]??I.format}`}case"not_multiple_of":return`غلط نمبر: ${I.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${I.keys.length>1?"ز":""}: ${S0(I.keys,"، ")}`;case"invalid_key":return`${I.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${I.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function Z4(){return{localeError:gW()}}var jW=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"số";case"object":{if(Array.isArray(I))return"mảng";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return(I)=>{switch(I.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${I.expected}, nhận được ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${f0(I.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Quá lớn: mong đợi ${I.origin??"giá trị"} ${Y.verb} ${S}${I.maximum.toString()} ${Y.unit??"phần tử"}`;return`Quá lớn: mong đợi ${I.origin??"giá trị"} ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Quá nhỏ: mong đợi ${I.origin} ${Y.verb} ${S}${I.minimum.toString()} ${Y.unit}`;return`Quá nhỏ: mong đợi ${I.origin} ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${S.prefix}"`;if(S.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${S.suffix}"`;if(S.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${S.includes}"`;if(S.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${S.pattern}`;return`${V[S.format]??I.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${I.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${S0(I.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${I.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${I.origin}`;default:return"Đầu vào không hợp lệ"}}};function v4(){return{localeError:jW()}}var _W=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(I))return"数组";if(I===null)return"空值(null)";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return(I)=>{switch(I.code){case"invalid_type":return`无效输入:期望 ${I.expected},实际接收 ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`无效输入:期望 ${f0(I.values[0])}`;return`无效选项:期望以下之一 ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`数值过大:期望 ${I.origin??"值"} ${S}${I.maximum.toString()} ${Y.unit??"个元素"}`;return`数值过大:期望 ${I.origin??"值"} ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`数值过小:期望 ${I.origin} ${S}${I.minimum.toString()} ${Y.unit}`;return`数值过小:期望 ${I.origin} ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`无效字符串:必须以 "${S.prefix}" 开头`;if(S.format==="ends_with")return`无效字符串:必须以 "${S.suffix}" 结尾`;if(S.format==="includes")return`无效字符串:必须包含 "${S.includes}"`;if(S.format==="regex")return`无效字符串:必须满足正则表达式 ${S.pattern}`;return`无效${V[S.format]??I.format}`}case"not_multiple_of":return`无效数字:必须是 ${I.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${S0(I.keys,", ")}`;case"invalid_key":return`${I.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${I.origin} 中包含无效值(value)`;default:return"无效输入"}}};function M4(){return{localeError:_W()}}var NW=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"number";case"object":{if(Array.isArray(I))return"array";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return(I)=>{switch(I.code){case"invalid_type":return`無效的輸入值:預期為 ${I.expected},但收到 ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`無效的輸入值:預期為 ${f0(I.values[0])}`;return`無效的選項:預期為以下其中之一 ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`數值過大:預期 ${I.origin??"值"} 應為 ${S}${I.maximum.toString()} ${Y.unit??"個元素"}`;return`數值過大:預期 ${I.origin??"值"} 應為 ${S}${I.maximum.toString()}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`數值過小:預期 ${I.origin} 應為 ${S}${I.minimum.toString()} ${Y.unit}`;return`數值過小:預期 ${I.origin} 應為 ${S}${I.minimum.toString()}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`無效的字串:必須以 "${S.prefix}" 開頭`;if(S.format==="ends_with")return`無效的字串:必須以 "${S.suffix}" 結尾`;if(S.format==="includes")return`無效的字串:必須包含 "${S.includes}"`;if(S.format==="regex")return`無效的字串:必須符合格式 ${S.pattern}`;return`無效的 ${V[S.format]??I.format}`}case"not_multiple_of":return`無效的數字:必須為 ${I.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${I.keys.length>1?"們":""}:${S0(I.keys,"、")}`;case"invalid_key":return`${I.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${I.origin} 中有無效的值`;default:return"無效的輸入值"}}};function P4(){return{localeError:NW()}}var xW=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function U(I){return $[I]??null}let J=(I)=>{let S=typeof I;switch(S){case"number":return Number.isNaN(I)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(I))return"akopọ";if(I===null)return"null";if(Object.getPrototypeOf(I)!==Object.prototype&&I.constructor)return I.constructor.name}}return S},V={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return(I)=>{switch(I.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${I.expected}, àmọ̀ a rí ${J(I.input)}`;case"invalid_value":if(I.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${f0(I.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${S0(I.values,"|")}`;case"too_big":{let S=I.inclusive?"<=":"<",Y=U(I.origin);if(Y)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${I.origin??"iye"} ${Y.verb} ${S}${I.maximum} ${Y.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${S}${I.maximum}`}case"too_small":{let S=I.inclusive?">=":">",Y=U(I.origin);if(Y)return`Kéré ju: a ní láti jẹ́ pé ${I.origin} ${Y.verb} ${S}${I.minimum} ${Y.unit}`;return`Kéré ju: a ní láti jẹ́ ${S}${I.minimum}`}case"invalid_format":{let S=I;if(S.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${S.prefix}"`;if(S.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${S.suffix}"`;if(S.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${S.includes}"`;if(S.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${S.pattern}`;return`Aṣìṣe: ${V[S.format]??I.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${I.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${S0(I.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${I.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${I.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function T4(){return{localeError:xW()}}var q4=Symbol("ZodOutput"),R4=Symbol("ZodInput");class vI{constructor(){this._map=new Map,this._idmap=new Map}add($,...U){let J=U[0];if(this._map.set($,J),J&&typeof J==="object"&&"id"in J){if(this._idmap.has(J.id))throw Error(`ID ${J.id} already exists in the registry`);this._idmap.set(J.id,$)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove($){let U=this._map.get($);if(U&&typeof U==="object"&&"id"in U)this._idmap.delete(U.id);return this._map.delete($),this}get($){let U=$._zod.parent;if(U){let J={...this.get(U)??{}};delete J.id;let V={...J,...this._map.get($)};return Object.keys(V).length?V:void 0}return this._map.get($)}has($){return this._map.has($)}}function LO(){return new vI}var a$=LO();function C4($,U){return new $({type:"string",...w0(U)})}function k4($,U){return new $({type:"string",coerce:!0,...w0(U)})}function EO($,U){return new $({type:"string",format:"email",check:"string_format",abort:!1,...w0(U)})}function MI($,U){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...w0(U)})}function ZO($,U){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...w0(U)})}function vO($,U){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...w0(U)})}function MO($,U){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...w0(U)})}function PO($,U){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...w0(U)})}function TO($,U){return new $({type:"string",format:"url",check:"string_format",abort:!1,...w0(U)})}function qO($,U){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...w0(U)})}function RO($,U){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...w0(U)})}function CO($,U){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...w0(U)})}function kO($,U){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...w0(U)})}function gO($,U){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...w0(U)})}function jO($,U){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...w0(U)})}function _O($,U){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...w0(U)})}function NO($,U){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...w0(U)})}function xO($,U){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...w0(U)})}function BO($,U){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...w0(U)})}function cO($,U){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...w0(U)})}function wO($,U){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...w0(U)})}function fO($,U){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...w0(U)})}function yO($,U){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...w0(U)})}function hO($,U){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...w0(U)})}var g4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function j4($,U){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...w0(U)})}function _4($,U){return new $({type:"string",format:"date",check:"string_format",...w0(U)})}function N4($,U){return new $({type:"string",format:"time",check:"string_format",precision:null,...w0(U)})}function x4($,U){return new $({type:"string",format:"duration",check:"string_format",...w0(U)})}function B4($,U){return new $({type:"number",checks:[],...w0(U)})}function c4($,U){return new $({type:"number",coerce:!0,checks:[],...w0(U)})}function w4($,U){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...w0(U)})}function f4($,U){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...w0(U)})}function y4($,U){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...w0(U)})}function h4($,U){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...w0(U)})}function u4($,U){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...w0(U)})}function p4($,U){return new $({type:"boolean",...w0(U)})}function b4($,U){return new $({type:"boolean",coerce:!0,...w0(U)})}function l4($,U){return new $({type:"bigint",...w0(U)})}function o4($,U){return new $({type:"bigint",coerce:!0,...w0(U)})}function r4($,U){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...w0(U)})}function n4($,U){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...w0(U)})}function m4($,U){return new $({type:"symbol",...w0(U)})}function d4($,U){return new $({type:"undefined",...w0(U)})}function t4($,U){return new $({type:"null",...w0(U)})}function i4($){return new $({type:"any"})}function rU($){return new $({type:"unknown"})}function e4($,U){return new $({type:"never",...w0(U)})}function a4($,U){return new $({type:"void",...w0(U)})}function s4($,U){return new $({type:"date",...w0(U)})}function $J($,U){return new $({type:"date",coerce:!0,...w0(U)})}function UJ($,U){return new $({type:"nan",...w0(U)})}function JU($,U){return new SO({check:"less_than",...w0(U),value:$,inclusive:!1})}function r$($,U){return new SO({check:"less_than",...w0(U),value:$,inclusive:!0})}function QU($,U){return new WO({check:"greater_than",...w0(U),value:$,inclusive:!1})}function f$($,U){return new WO({check:"greater_than",...w0(U),value:$,inclusive:!0})}function IJ($){return QU(0,$)}function OJ($){return JU(0,$)}function XJ($){return r$(0,$)}function JJ($){return f$(0,$)}function jU($,U){return new H1({check:"multiple_of",...w0(U),value:$})}function nU($,U){return new E1({check:"max_size",...w0(U),maximum:$})}function _U($,U){return new Z1({check:"min_size",...w0(U),minimum:$})}function PI($,U){return new v1({check:"size_equals",...w0(U),size:$})}function mU($,U){return new M1({check:"max_length",...w0(U),maximum:$})}function FU($,U){return new P1({check:"min_length",...w0(U),minimum:$})}function dU($,U){return new T1({check:"length_equals",...w0(U),length:$})}function TI($,U){return new q1({check:"string_format",format:"regex",...w0(U),pattern:$})}function qI($){return new R1({check:"string_format",format:"lowercase",...w0($)})}function RI($){return new C1({check:"string_format",format:"uppercase",...w0($)})}function CI($,U){return new k1({check:"string_format",format:"includes",...w0(U),includes:$})}function kI($,U){return new g1({check:"string_format",format:"starts_with",...w0(U),prefix:$})}function gI($,U){return new j1({check:"string_format",format:"ends_with",...w0(U),suffix:$})}function QJ($,U,J){return new _1({check:"property",property:$,schema:U,...w0(J)})}function jI($,U){return new N1({check:"mime_type",mime:$,...w0(U)})}function YU($){return new x1({check:"overwrite",tx:$})}function _I($){return YU((U)=>U.normalize($))}function NI(){return YU(($)=>$.trim())}function xI(){return YU(($)=>$.toLowerCase())}function BI(){return YU(($)=>$.toUpperCase())}function cI($,U,J){return new $({type:"array",element:U,...w0(J)})}function BW($,U,J){return new $({type:"union",options:U,...w0(J)})}function cW($,U,J,V){return new $({type:"union",options:J,discriminator:U,...w0(V)})}function wW($,U,J){return new $({type:"intersection",left:U,right:J})}function YJ($,U,J,V){let I=J instanceof l0;return new $({type:"tuple",items:U,rest:I?J:null,...w0(I?V:J)})}function fW($,U,J,V){return new $({type:"record",keyType:U,valueType:J,...w0(V)})}function yW($,U,J,V){return new $({type:"map",keyType:U,valueType:J,...w0(V)})}function hW($,U,J){return new $({type:"set",valueType:U,...w0(J)})}function uW($,U,J){let V=Array.isArray(U)?Object.fromEntries(U.map((I)=>[I,I])):U;return new $({type:"enum",entries:V,...w0(J)})}function pW($,U,J){return new $({type:"enum",entries:U,...w0(J)})}function bW($,U,J){return new $({type:"literal",values:Array.isArray(U)?U:[U],...w0(J)})}function GJ($,U){return new $({type:"file",...w0(U)})}function lW($,U){return new $({type:"transform",transform:U})}function oW($,U){return new $({type:"optional",innerType:U})}function rW($,U){return new $({type:"nullable",innerType:U})}function nW($,U,J){return new $({type:"default",innerType:U,get defaultValue(){return typeof J==="function"?J():J}})}function mW($,U,J){return new $({type:"nonoptional",innerType:U,...w0(J)})}function dW($,U){return new $({type:"success",innerType:U})}function tW($,U,J){return new $({type:"catch",innerType:U,catchValue:typeof J==="function"?J:()=>J})}function iW($,U,J){return new $({type:"pipe",in:U,out:J})}function eW($,U){return new $({type:"readonly",innerType:U})}function aW($,U,J){return new $({type:"template_literal",parts:U,...w0(J)})}function sW($,U){return new $({type:"lazy",getter:U})}function $D($,U){return new $({type:"promise",innerType:U})}function VJ($,U,J){let V=w0(J);return V.abort??(V.abort=!0),new $({type:"custom",check:"custom",fn:U,...V})}function SJ($,U,J){return new $({type:"custom",check:"custom",fn:U,...w0(J)})}function WJ($){let U=NY((J)=>{return J.addIssue=(V)=>{if(typeof V==="string")J.issues.push(pU(V,J.value,U._zod.def));else{let I=V;if(I.fatal)I.continue=!1;I.code??(I.code="custom"),I.input??(I.input=J.value),I.inst??(I.inst=U),I.continue??(I.continue=!U._zod.def.abort),J.issues.push(pU(I))}},$(J.value,J)});return U}function NY($,U){let J=new I$({check:"custom",...w0(U)});return J._zod.check=$,J}function DJ($,U){let J=w0(U),V=J.truthy??["true","1","yes","on","y","enabled"],I=J.falsy??["false","0","no","off","n","disabled"];if(J.case!=="sensitive")V=V.map((q)=>typeof q==="string"?q.toLowerCase():q),I=I.map((q)=>typeof q==="string"?q.toLowerCase():q);let S=new Set(V),Y=new Set(I),M=$.Pipe??LI,T=$.Boolean??AI,L=$.String??kU,F=new($.Transform??FI)({type:"transform",transform:(q,k)=>{let C=q;if(J.case!=="sensitive")C=C.toLowerCase();if(S.has(C))return!0;else if(Y.has(C))return!1;else return k.issues.push({code:"invalid_value",expected:"stringbool",values:[...S,...Y],input:k.value,inst:F,continue:!1}),{}},error:J.error}),Z=new M({type:"pipe",in:new L({type:"string",error:J.error}),out:F,error:J.error});return new M({type:"pipe",in:Z,out:new T({type:"boolean",error:J.error}),error:J.error})}function uO($,U,J,V={}){let I=w0(V),S={...w0(V),check:"string_format",type:"string",format:U,fn:typeof J==="function"?J:(M)=>J.test(M),...I};if(J instanceof RegExp)S.pattern=J;return new $(S)}class zJ{constructor($){this._def=$,this.def=$}implement($){if(typeof $!=="function")throw Error("implement() must be called with a function");let U=(...J)=>{let V=this._def.input?XO(this._def.input,J,void 0,{callee:U}):J;if(!Array.isArray(V))throw Error("Invalid arguments schema: not an array or tuple schema.");let I=$(...V);return this._def.output?XO(this._def.output,I,void 0,{callee:U}):I};return U}implementAsync($){if(typeof $!=="function")throw Error("implement() must be called with a function");let U=async(...J)=>{let V=this._def.input?await QO(this._def.input,J,void 0,{callee:U}):J;if(!Array.isArray(V))throw Error("Invalid arguments schema: not an array or tuple schema.");let I=await $(...V);return this._def.output?QO(this._def.output,I,void 0,{callee:U}):I};return U}input(...$){let U=this.constructor;if(Array.isArray($[0]))return new U({type:"function",input:new gU({type:"tuple",items:$[0],rest:$[1]}),output:this._def.output});return new U({type:"function",input:$[0],output:this._def.output})}output($){return new this.constructor({type:"function",input:this._def.input,output:$})}}function KJ($){return new zJ({type:"function",input:Array.isArray($?.input)?YJ(gU,$?.input):$?.input??cI(HI,rU(oU)),output:$?.output??rU(oU)})}class pO{constructor($){this.counter=0,this.metadataRegistry=$?.metadata??a$,this.target=$?.target??"draft-2020-12",this.unrepresentable=$?.unrepresentable??"throw",this.override=$?.override??(()=>{}),this.io=$?.io??"output",this.seen=new Map}process($,U={path:[],schemaPath:[]}){var J;let V=$._zod.def,I={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},S=this.seen.get($);if(S){if(S.count++,U.schemaPath.includes($))S.cycle=U.path;return S.schema}let Y={schema:{},count:1,cycle:void 0,path:U.path};this.seen.set($,Y);let M=$._zod.toJSONSchema?.();if(M)Y.schema=M;else{let E={...U,schemaPath:[...U.schemaPath,$],path:U.path},F=$._zod.parent;if(F)Y.ref=F,this.process(F,E),this.seen.get(F).isParent=!0;else{let Z=Y.schema;switch(V.type){case"string":{let P=Z;P.type="string";let{minimum:q,maximum:k,format:C,patterns:_,contentEncoding:g}=$._zod.bag;if(typeof q==="number")P.minLength=q;if(typeof k==="number")P.maxLength=k;if(C){if(P.format=I[C]??C,P.format==="")delete P.format}if(g)P.contentEncoding=g;if(_&&_.size>0){let N=[..._];if(N.length===1)P.pattern=N[0].source;else if(N.length>1)Y.schema.allOf=[...N.map((x)=>({...this.target==="draft-7"||this.target==="draft-4"?{type:"string"}:{},pattern:x.source}))]}break}case"number":{let P=Z,{minimum:q,maximum:k,format:C,multipleOf:_,exclusiveMaximum:g,exclusiveMinimum:N}=$._zod.bag;if(typeof C==="string"&&C.includes("int"))P.type="integer";else P.type="number";if(typeof N==="number")if(this.target==="draft-4")P.minimum=N,P.exclusiveMinimum=!0;else P.exclusiveMinimum=N;if(typeof q==="number"){if(P.minimum=q,typeof N==="number"&&this.target!=="draft-4")if(N>=q)delete P.minimum;else delete P.exclusiveMinimum}if(typeof g==="number")if(this.target==="draft-4")P.maximum=g,P.exclusiveMaximum=!0;else P.exclusiveMaximum=g;if(typeof k==="number"){if(P.maximum=k,typeof g==="number"&&this.target!=="draft-4")if(g<=k)delete P.maximum;else delete P.exclusiveMaximum}if(typeof _==="number")P.multipleOf=_;break}case"boolean":{let P=Z;P.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema");break}case"null":{Z.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema");break}case"never":{Z.not={};break}case"date":{if(this.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema");break}case"array":{let P=Z,{minimum:q,maximum:k}=$._zod.bag;if(typeof q==="number")P.minItems=q;if(typeof k==="number")P.maxItems=k;P.type="array",P.items=this.process(V.element,{...E,path:[...E.path,"items"]});break}case"object":{let P=Z;P.type="object",P.properties={};let q=V.shape;for(let _ in q)P.properties[_]=this.process(q[_],{...E,path:[...E.path,"properties",_]});let k=new Set(Object.keys(q)),C=new Set([...k].filter((_)=>{let g=V.shape[_]._zod;if(this.io==="input")return g.optin===void 0;else return g.optout===void 0}));if(C.size>0)P.required=Array.from(C);if(V.catchall?._zod.def.type==="never")P.additionalProperties=!1;else if(!V.catchall){if(this.io==="output")P.additionalProperties=!1}else if(V.catchall)P.additionalProperties=this.process(V.catchall,{...E,path:[...E.path,"additionalProperties"]});break}case"union":{let P=Z;P.anyOf=V.options.map((q,k)=>this.process(q,{...E,path:[...E.path,"anyOf",k]}));break}case"intersection":{let P=Z,q=this.process(V.left,{...E,path:[...E.path,"allOf",0]}),k=this.process(V.right,{...E,path:[...E.path,"allOf",1]}),C=(g)=>("allOf"in g)&&Object.keys(g).length===1,_=[...C(q)?q.allOf:[q],...C(k)?k.allOf:[k]];P.allOf=_;break}case"tuple":{let P=Z;P.type="array";let q=V.items.map((_,g)=>this.process(_,{...E,path:[...E.path,"prefixItems",g]}));if(this.target==="draft-2020-12")P.prefixItems=q;else P.items=q;if(V.rest){let _=this.process(V.rest,{...E,path:[...E.path,"items"]});if(this.target==="draft-2020-12")P.items=_;else P.additionalItems=_}if(V.rest)P.items=this.process(V.rest,{...E,path:[...E.path,"items"]});let{minimum:k,maximum:C}=$._zod.bag;if(typeof k==="number")P.minItems=k;if(typeof C==="number")P.maxItems=C;break}case"record":{let P=Z;if(P.type="object",this.target!=="draft-4")P.propertyNames=this.process(V.keyType,{...E,path:[...E.path,"propertyNames"]});P.additionalProperties=this.process(V.valueType,{...E,path:[...E.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema");break}case"enum":{let P=Z,q=QI(V.entries);if(q.every((k)=>typeof k==="number"))P.type="number";if(q.every((k)=>typeof k==="string"))P.type="string";P.enum=q;break}case"literal":{let P=Z,q=[];for(let k of V.values)if(k===void 0){if(this.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof k==="bigint")if(this.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else q.push(Number(k));else q.push(k);if(q.length===0);else if(q.length===1){let k=q[0];if(P.type=k===null?"null":typeof k,this.target==="draft-4")P.enum=[k];else P.const=k}else{if(q.every((k)=>typeof k==="number"))P.type="number";if(q.every((k)=>typeof k==="string"))P.type="string";if(q.every((k)=>typeof k==="boolean"))P.type="string";if(q.every((k)=>k===null))P.type="null";P.enum=q}break}case"file":{let P=Z,q={type:"string",format:"binary",contentEncoding:"binary"},{minimum:k,maximum:C,mime:_}=$._zod.bag;if(k!==void 0)q.minLength=k;if(C!==void 0)q.maxLength=C;if(_)if(_.length===1)q.contentMediaType=_[0],Object.assign(P,q);else P.anyOf=_.map((g)=>{return{...q,contentMediaType:g}});else Object.assign(P,q);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let P=this.process(V.innerType,E);Z.anyOf=[P,{type:"null"}];break}case"nonoptional":{this.process(V.innerType,E),Y.ref=V.innerType;break}case"success":{let P=Z;P.type="boolean";break}case"default":{this.process(V.innerType,E),Y.ref=V.innerType,Z.default=JSON.parse(JSON.stringify(V.defaultValue));break}case"prefault":{if(this.process(V.innerType,E),Y.ref=V.innerType,this.io==="input")Z._prefault=JSON.parse(JSON.stringify(V.defaultValue));break}case"catch":{this.process(V.innerType,E),Y.ref=V.innerType;let P;try{P=V.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}Z.default=P;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let P=Z,q=$._zod.pattern;if(!q)throw Error("Pattern not found in template literal");P.type="string",P.pattern=q.source;break}case"pipe":{let P=this.io==="input"?V.in._zod.def.type==="transform"?V.out:V.in:V.out;this.process(P,E),Y.ref=P;break}case"readonly":{this.process(V.innerType,E),Y.ref=V.innerType,Z.readOnly=!0;break}case"promise":{this.process(V.innerType,E),Y.ref=V.innerType;break}case"optional":{this.process(V.innerType,E),Y.ref=V.innerType;break}case"lazy":{let P=$._zod.innerType;this.process(P,E),Y.ref=P;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let T=this.metadataRegistry.get($);if(T)Object.assign(Y.schema,T);if(this.io==="input"&&T$($))delete Y.schema.examples,delete Y.schema.default;if(this.io==="input"&&Y.schema._prefault)(J=Y.schema).default??(J.default=Y.schema._prefault);return delete Y.schema._prefault,this.seen.get($).schema}emit($,U){let J={cycles:U?.cycles??"ref",reused:U?.reused??"inline",external:U?.external??void 0},V=this.seen.get($);if(!V)throw Error("Unprocessed schema. This is a bug in Zod.");let I=(L)=>{let E=this.target==="draft-2020-12"?"$defs":"definitions";if(J.external){let q=J.external.registry.get(L[0])?.id,k=J.external.uri??((_)=>_);if(q)return{ref:k(q)};let C=L[1].defId??L[1].schema.id??`schema${this.counter++}`;return L[1].defId=C,{defId:C,ref:`${k("__shared")}#/${E}/${C}`}}if(L[1]===V)return{ref:"#"};let Z=`${"#"}/${E}/`,P=L[1].schema.id??`__schema${this.counter++}`;return{defId:P,ref:Z+P}},S=(L)=>{if(L[1].schema.$ref)return;let E=L[1],{ref:F,defId:Z}=I(L);if(E.def={...E.schema},Z)E.defId=Z;let P=E.schema;for(let q in P)delete P[q];P.$ref=F};if(J.cycles==="throw")for(let L of this.seen.entries()){let E=L[1];if(E.cycle)throw Error(`Cycle detected: #/${E.cycle?.join("/")}/<root>
56
+
57
+ `)}P.write("payload.value = newResult;"),P.write("return payload;");let _=P.compile();return(N,B)=>_(E,N,B)},Q,J=pU,A=!yI.jitless,Z=A&&o4.value,L=I.catchall,F;$._zod.parse=(E,P)=>{F??(F=X.value);let R=E.value;if(!J(R))return E.issues.push({expected:"object",code:"invalid_type",input:R,inst:$}),E;if(A&&Z&&P?.async===!1&&P.jitless!==!0){if(!Q)Q=U(I.shape);if(E=Q(E,P),!L)return E;return XG([],R,E,P,F,$)}return D(E,P)}});function mY($,I,D,X){for(let Q of $)if(Q.issues.length===0)return I.value=Q.value,I;let U=$.filter((Q)=>!gU(Q));if(U.length===1)return I.value=U[0].value,U[0];return I.issues.push({code:"invalid_union",input:I.value,inst:D,errors:$.map((Q)=>Q.issues.map((J)=>b0(J,X,V0())))}),I}var aI=$$("$ZodUnion",($,I)=>{o$.init($,I),t$($._zod,"optin",()=>I.options.some((U)=>U._zod.optin==="optional")?"optional":void 0),t$($._zod,"optout",()=>I.options.some((U)=>U._zod.optout==="optional")?"optional":void 0),t$($._zod,"values",()=>{if(I.options.every((U)=>U._zod.values))return new Set(I.options.flatMap((U)=>Array.from(U._zod.values)));return}),t$($._zod,"pattern",()=>{if(I.options.every((U)=>U._zod.pattern)){let U=I.options.map((Q)=>Q._zod.pattern);return new RegExp(`^(${U.map((Q)=>pI(Q.source)).join("|")})$`)}return});let D=I.options.length===1,X=I.options[0]._zod.run;$._zod.parse=(U,Q)=>{if(D)return X(U,Q);let J=!1,A=[];for(let T of I.options){let Z=T._zod.run({value:U.value,issues:[]},Q);if(Z instanceof Promise)A.push(Z),J=!0;else{if(Z.issues.length===0)return Z;A.push(Z)}}if(!J)return mY(A,U,$,Q);return Promise.all(A).then((T)=>{return mY(T,U,$,Q)})}});function tY($,I,D,X){let U=$.filter((Q)=>Q.issues.length===0);if(U.length===1)return I.value=U[0].value,I;if(U.length===0)I.issues.push({code:"invalid_union",input:I.value,inst:D,errors:$.map((Q)=>Q.issues.map((J)=>b0(J,X,V0())))});else I.issues.push({code:"invalid_union",input:I.value,inst:D,errors:[],inclusive:!1});return I}var BD=$$("$ZodXor",($,I)=>{aI.init($,I),I.inclusive=!1;let D=I.options.length===1,X=I.options[0]._zod.run;$._zod.parse=(U,Q)=>{if(D)return X(U,Q);let J=!1,A=[];for(let T of I.options){let Z=T._zod.run({value:U.value,issues:[]},Q);if(Z instanceof Promise)A.push(Z),J=!0;else A.push(Z)}if(!J)return tY(A,U,$,Q);return Promise.all(A).then((T)=>{return tY(T,U,$,Q)})}}),xD=$$("$ZodDiscriminatedUnion",($,I)=>{I.inclusive=!1,aI.init($,I);let D=$._zod.parse;t$($._zod,"propValues",()=>{let U={};for(let Q of I.options){let J=Q._zod.propValues;if(!J||Object.keys(J).length===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(Q)}"`);for(let[A,T]of Object.entries(J)){if(!U[A])U[A]=new Set;for(let Z of T)U[A].add(Z)}}return U});let X=II(()=>{let U=I.options,Q=new Map;for(let J of U){let A=J._zod.propValues?.[I.discriminator];if(!A||A.size===0)throw Error(`Invalid discriminated union option at index "${I.options.indexOf(J)}"`);for(let T of A){if(Q.has(T))throw Error(`Duplicate discriminator value "${String(T)}"`);Q.set(T,J)}}return Q});$._zod.parse=(U,Q)=>{let J=U.value;if(!pU(J))return U.issues.push({code:"invalid_type",expected:"object",input:J,inst:$}),U;let A=X.value.get(J?.[I.discriminator]);if(A)return A._zod.run(U,Q);if(I.unionFallback)return D(U,Q);return U.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:I.discriminator,input:J,path:[I.discriminator],inst:$}),U}}),wD=$$("$ZodIntersection",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value,Q=I.left._zod.run({value:U,issues:[]},X),J=I.right._zod.run({value:U,issues:[]},X);if(Q instanceof Promise||J instanceof Promise)return Promise.all([Q,J]).then(([T,Z])=>{return iY(D,T,Z)});return iY(D,Q,J)}});function m1($,I){if($===I)return{valid:!0,data:$};if($ instanceof Date&&I instanceof Date&&+$===+I)return{valid:!0,data:$};if(RU($)&&RU(I)){let D=Object.keys(I),X=Object.keys($).filter((Q)=>D.indexOf(Q)!==-1),U={...$,...I};for(let Q of X){let J=m1($[Q],I[Q]);if(!J.valid)return{valid:!1,mergeErrorPath:[Q,...J.mergeErrorPath]};U[Q]=J.data}return{valid:!0,data:U}}if(Array.isArray($)&&Array.isArray(I)){if($.length!==I.length)return{valid:!1,mergeErrorPath:[]};let D=[];for(let X=0;X<$.length;X++){let U=$[X],Q=I[X],J=m1(U,Q);if(!J.valid)return{valid:!1,mergeErrorPath:[X,...J.mergeErrorPath]};D.push(J.data)}return{valid:!0,data:D}}return{valid:!1,mergeErrorPath:[]}}function iY($,I,D){let X=new Map,U;for(let A of I.issues)if(A.code==="unrecognized_keys"){U??(U=A);for(let T of A.keys){if(!X.has(T))X.set(T,{});X.get(T).l=!0}}else $.issues.push(A);for(let A of D.issues)if(A.code==="unrecognized_keys")for(let T of A.keys){if(!X.has(T))X.set(T,{});X.get(T).r=!0}else $.issues.push(A);let Q=[...X].filter(([,A])=>A.l&&A.r).map(([A])=>A);if(Q.length&&U)$.issues.push({...U,keys:Q});if(gU($))return $;let J=m1(I.value,D.value);if(!J.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(J.mergeErrorPath)}`);return $.value=J.data,$}var Iv=$$("$ZodTuple",($,I)=>{o$.init($,I);let D=I.items;$._zod.parse=(X,U)=>{let Q=X.value;if(!Array.isArray(Q))return X.issues.push({input:Q,inst:$,expected:"tuple",code:"invalid_type"}),X;X.value=[];let J=[],A=[...D].reverse().findIndex((L)=>L._zod.optin!=="optional"),T=A===-1?0:D.length-A;if(!I.rest){let L=Q.length>D.length,F=Q.length<T-1;if(L||F)return X.issues.push({...L?{code:"too_big",maximum:D.length,inclusive:!0}:{code:"too_small",minimum:D.length},input:Q,inst:$,origin:"array"}),X}let Z=-1;for(let L of D){if(Z++,Z>=Q.length){if(Z>=T)continue}let F=L._zod.run({value:Q[Z],issues:[]},U);if(F instanceof Promise)J.push(F.then((E)=>t6(E,X,Z)));else t6(F,X,Z)}if(I.rest){let L=Q.slice(D.length);for(let F of L){Z++;let E=I.rest._zod.run({value:F,issues:[]},U);if(E instanceof Promise)J.push(E.then((P)=>t6(P,X,Z)));else t6(E,X,Z)}}if(J.length)return Promise.all(J).then(()=>X);return X}});function t6($,I,D){if($.issues.length)I.issues.push(...e0(D,$.issues));I.value[D]=$.value}var cD=$$("$ZodRecord",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(!RU(U))return D.issues.push({expected:"record",code:"invalid_type",input:U,inst:$}),D;let Q=[],J=I.keyType._zod.values;if(J){D.value={};let A=new Set;for(let Z of J)if(typeof Z==="string"||typeof Z==="number"||typeof Z==="symbol"){A.add(typeof Z==="number"?Z.toString():Z);let L=I.valueType._zod.run({value:U[Z],issues:[]},X);if(L instanceof Promise)Q.push(L.then((F)=>{if(F.issues.length)D.issues.push(...e0(Z,F.issues));D.value[Z]=F.value}));else{if(L.issues.length)D.issues.push(...e0(Z,L.issues));D.value[Z]=L.value}}let T;for(let Z in U)if(!A.has(Z))T=T??[],T.push(Z);if(T&&T.length>0)D.issues.push({code:"unrecognized_keys",input:U,inst:$,keys:T})}else{D.value={};for(let A of Reflect.ownKeys(U)){if(A==="__proto__")continue;let T=I.keyType._zod.run({value:A,issues:[]},X);if(T instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof A==="string"&&mI.test(A)&&T.issues.length){let F=I.keyType._zod.run({value:Number(A),issues:[]},X);if(F instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(F.issues.length===0)T=F}if(T.issues.length){if(I.mode==="loose")D.value[A]=U[A];else D.issues.push({code:"invalid_key",origin:"record",issues:T.issues.map((F)=>b0(F,X,V0())),input:A,path:[A],inst:$});continue}let L=I.valueType._zod.run({value:U[A],issues:[]},X);if(L instanceof Promise)Q.push(L.then((F)=>{if(F.issues.length)D.issues.push(...e0(A,F.issues));D.value[T.value]=F.value}));else{if(L.issues.length)D.issues.push(...e0(A,L.issues));D.value[T.value]=L.value}}}if(Q.length)return Promise.all(Q).then(()=>D);return D}}),fD=$$("$ZodMap",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Map))return D.issues.push({expected:"map",code:"invalid_type",input:U,inst:$}),D;let Q=[];D.value=new Map;for(let[J,A]of U){let T=I.keyType._zod.run({value:J,issues:[]},X),Z=I.valueType._zod.run({value:A,issues:[]},X);if(T instanceof Promise||Z instanceof Promise)Q.push(Promise.all([T,Z]).then(([L,F])=>{eY(L,F,D,J,U,$,X)}));else eY(T,Z,D,J,U,$,X)}if(Q.length)return Promise.all(Q).then(()=>D);return D}});function eY($,I,D,X,U,Q,J){if($.issues.length)if(lI.has(typeof X))D.issues.push(...e0(X,$.issues));else D.issues.push({code:"invalid_key",origin:"map",input:U,inst:Q,issues:$.issues.map((A)=>b0(A,J,V0()))});if(I.issues.length)if(lI.has(typeof X))D.issues.push(...e0(X,I.issues));else D.issues.push({origin:"map",code:"invalid_element",input:U,inst:Q,key:X,issues:I.issues.map((A)=>b0(A,J,V0()))});D.value.set($.value,I.value)}var yD=$$("$ZodSet",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(!(U instanceof Set))return D.issues.push({input:U,inst:$,expected:"set",code:"invalid_type"}),D;let Q=[];D.value=new Set;for(let J of U){let A=I.valueType._zod.run({value:J,issues:[]},X);if(A instanceof Promise)Q.push(A.then((T)=>aY(T,D)));else aY(A,D)}if(Q.length)return Promise.all(Q).then(()=>D);return D}});function aY($,I){if($.issues.length)I.issues.push(...$.issues);I.value.add($.value)}var uD=$$("$ZodEnum",($,I)=>{o$.init($,I);let D=hI(I.entries),X=new Set(D);$._zod.values=X,$._zod.pattern=new RegExp(`^(${D.filter((U)=>lI.has(typeof U)).map((U)=>typeof U==="string"?$U(U):U.toString()).join("|")})$`),$._zod.parse=(U,Q)=>{let J=U.value;if(X.has(J))return U;return U.issues.push({code:"invalid_value",values:D,input:J,inst:$}),U}}),hD=$$("$ZodLiteral",($,I)=>{if(o$.init($,I),I.values.length===0)throw Error("Cannot create literal schema with no valid values");let D=new Set(I.values);$._zod.values=D,$._zod.pattern=new RegExp(`^(${I.values.map((X)=>typeof X==="string"?$U(X):X?$U(X.toString()):String(X)).join("|")})$`),$._zod.parse=(X,U)=>{let Q=X.value;if(D.has(Q))return X;return X.issues.push({code:"invalid_value",values:I.values,input:Q,inst:$}),X}}),pD=$$("$ZodFile",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{let U=D.value;if(U instanceof File)return D;return D.issues.push({expected:"file",code:"invalid_type",input:U,inst:$}),D}}),lD=$$("$ZodTransform",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new hU($.constructor.name);let U=I.transform(D.value,D);if(X.async)return(U instanceof Promise?U:Promise.resolve(U)).then((J)=>{return D.value=J,D});if(U instanceof Promise)throw new XU;return D.value=U,D}});function sY($,I){if($.issues.length&&I===void 0)return{issues:[],value:void 0};return $}var vv=$$("$ZodOptional",($,I)=>{o$.init($,I),$._zod.optin="optional",$._zod.optout="optional",t$($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,void 0]):void 0}),t$($._zod,"pattern",()=>{let D=I.innerType._zod.pattern;return D?new RegExp(`^(${pI(D.source)})?$`):void 0}),$._zod.parse=(D,X)=>{if(I.innerType._zod.optin==="optional"){let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>sY(Q,D.value));return sY(U,D.value)}if(D.value===void 0)return D;return I.innerType._zod.run(D,X)}}),bD=$$("$ZodExactOptional",($,I)=>{vv.init($,I),t$($._zod,"values",()=>I.innerType._zod.values),t$($._zod,"pattern",()=>I.innerType._zod.pattern),$._zod.parse=(D,X)=>{return I.innerType._zod.run(D,X)}}),rD=$$("$ZodNullable",($,I)=>{o$.init($,I),t$($._zod,"optin",()=>I.innerType._zod.optin),t$($._zod,"optout",()=>I.innerType._zod.optout),t$($._zod,"pattern",()=>{let D=I.innerType._zod.pattern;return D?new RegExp(`^(${pI(D.source)}|null)$`):void 0}),t$($._zod,"values",()=>{return I.innerType._zod.values?new Set([...I.innerType._zod.values,null]):void 0}),$._zod.parse=(D,X)=>{if(D.value===null)return D;return I.innerType._zod.run(D,X)}}),oD=$$("$ZodDefault",($,I)=>{o$.init($,I),$._zod.optin="optional",t$($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return I.innerType._zod.run(D,X);if(D.value===void 0)return D.value=I.defaultValue,D;let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>$G(Q,I));return $G(U,I)}});function $G($,I){if($.value===void 0)$.value=I.defaultValue;return $}var nD=$$("$ZodPrefault",($,I)=>{o$.init($,I),$._zod.optin="optional",t$($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return I.innerType._zod.run(D,X);if(D.value===void 0)D.value=I.defaultValue;return I.innerType._zod.run(D,X)}}),dD=$$("$ZodNonOptional",($,I)=>{o$.init($,I),t$($._zod,"values",()=>{let D=I.innerType._zod.values;return D?new Set([...D].filter((X)=>X!==void 0)):void 0}),$._zod.parse=(D,X)=>{let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>UG(Q,$));return UG(U,$)}});function UG($,I){if(!$.issues.length&&$.value===void 0)$.issues.push({code:"invalid_type",expected:"nonoptional",input:$.value,inst:I});return $}var mD=$$("$ZodSuccess",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new hU("ZodSuccess");let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>{return D.value=Q.issues.length===0,D});return D.value=U.issues.length===0,D}}),tD=$$("$ZodCatch",($,I)=>{o$.init($,I),t$($._zod,"optin",()=>I.innerType._zod.optin),t$($._zod,"optout",()=>I.innerType._zod.optout),t$($._zod,"values",()=>I.innerType._zod.values),$._zod.parse=(D,X)=>{if(X.direction==="backward")return I.innerType._zod.run(D,X);let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>{if(D.value=Q.value,Q.issues.length)D.value=I.catchValue({...D,error:{issues:Q.issues.map((J)=>b0(J,X,V0()))},input:D.value}),D.issues=[];return D});if(D.value=U.value,U.issues.length)D.value=I.catchValue({...D,error:{issues:U.issues.map((Q)=>b0(Q,X,V0()))},input:D.value}),D.issues=[];return D}}),iD=$$("$ZodNaN",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{if(typeof D.value!=="number"||!Number.isNaN(D.value))return D.issues.push({input:D.value,inst:$,expected:"nan",code:"invalid_type"}),D;return D}}),eD=$$("$ZodPipe",($,I)=>{o$.init($,I),t$($._zod,"values",()=>I.in._zod.values),t$($._zod,"optin",()=>I.in._zod.optin),t$($._zod,"optout",()=>I.out._zod.optout),t$($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(D,X)=>{if(X.direction==="backward"){let Q=I.out._zod.run(D,X);if(Q instanceof Promise)return Q.then((J)=>i6(J,I.in,X));return i6(Q,I.in,X)}let U=I.in._zod.run(D,X);if(U instanceof Promise)return U.then((Q)=>i6(Q,I.out,X));return i6(U,I.out,X)}});function i6($,I,D){if($.issues.length)return $.aborted=!0,$;return I._zod.run({value:$.value,issues:$.issues},D)}var sI=$$("$ZodCodec",($,I)=>{o$.init($,I),t$($._zod,"values",()=>I.in._zod.values),t$($._zod,"optin",()=>I.in._zod.optin),t$($._zod,"optout",()=>I.out._zod.optout),t$($._zod,"propValues",()=>I.in._zod.propValues),$._zod.parse=(D,X)=>{if((X.direction||"forward")==="forward"){let Q=I.in._zod.run(D,X);if(Q instanceof Promise)return Q.then((J)=>e6(J,I,X));return e6(Q,I,X)}else{let Q=I.out._zod.run(D,X);if(Q instanceof Promise)return Q.then((J)=>e6(J,I,X));return e6(Q,I,X)}}});function e6($,I,D){if($.issues.length)return $.aborted=!0,$;if((D.direction||"forward")==="forward"){let U=I.transform($.value,$);if(U instanceof Promise)return U.then((Q)=>a6($,Q,I.out,D));return a6($,U,I.out,D)}else{let U=I.reverseTransform($.value,$);if(U instanceof Promise)return U.then((Q)=>a6($,Q,I.in,D));return a6($,U,I.in,D)}}function a6($,I,D,X){if($.issues.length)return $.aborted=!0,$;return D._zod.run({value:I,issues:$.issues},X)}var aD=$$("$ZodReadonly",($,I)=>{o$.init($,I),t$($._zod,"propValues",()=>I.innerType._zod.propValues),t$($._zod,"values",()=>I.innerType._zod.values),t$($._zod,"optin",()=>I.innerType?._zod?.optin),t$($._zod,"optout",()=>I.innerType?._zod?.optout),$._zod.parse=(D,X)=>{if(X.direction==="backward")return I.innerType._zod.run(D,X);let U=I.innerType._zod.run(D,X);if(U instanceof Promise)return U.then(IG);return IG(U)}});function IG($){return $.value=Object.freeze($.value),$}var sD=$$("$ZodTemplateLiteral",($,I)=>{o$.init($,I);let D=[];for(let X of I.parts)if(typeof X==="object"&&X!==null){if(!X._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...X._zod.traits].shift()}`);let U=X._zod.pattern instanceof RegExp?X._zod.pattern.source:X._zod.pattern;if(!U)throw Error(`Invalid template literal part: ${X._zod.traits}`);let Q=U.startsWith("^")?1:0,J=U.endsWith("$")?U.length-1:U.length;D.push(U.slice(Q,J))}else if(X===null||d4.has(typeof X))D.push($U(`${X}`));else throw Error(`Invalid template literal part: ${X}`);$._zod.pattern=new RegExp(`^${D.join("")}$`),$._zod.parse=(X,U)=>{if(typeof X.value!=="string")return X.issues.push({input:X.value,inst:$,expected:"string",code:"invalid_type"}),X;if($._zod.pattern.lastIndex=0,!$._zod.pattern.test(X.value))return X.issues.push({input:X.value,inst:$,code:"invalid_format",format:I.format??"template_literal",pattern:$._zod.pattern.source}),X;return X}}),$O=$$("$ZodFunction",($,I)=>{return o$.init($,I),$._def=I,$._zod.def=I,$.implement=(D)=>{if(typeof D!=="function")throw Error("implement() must be called with a function");return function(...X){let U=$._def.input?w6($._def.input,X):X,Q=Reflect.apply(D,this,U);if($._def.output)return w6($._def.output,Q);return Q}},$.implementAsync=(D)=>{if(typeof D!=="function")throw Error("implementAsync() must be called with a function");return async function(...X){let U=$._def.input?await c6($._def.input,X):X,Q=await Reflect.apply(D,this,U);if($._def.output)return await c6($._def.output,Q);return Q}},$._zod.parse=(D,X)=>{if(typeof D.value!=="function")return D.issues.push({code:"invalid_type",expected:"function",input:D.value,inst:$}),D;if($._def.output&&$._def.output._zod.def.type==="promise")D.value=$.implementAsync(D.value);else D.value=$.implement(D.value);return D},$.input=(...D)=>{let X=$.constructor;if(Array.isArray(D[0]))return new X({type:"function",input:new Iv({type:"tuple",items:D[0],rest:D[1]}),output:$._def.output});return new X({type:"function",input:D[0],output:$._def.output})},$.output=(D)=>{return new $.constructor({type:"function",input:$._def.input,output:D})},$}),UO=$$("$ZodPromise",($,I)=>{o$.init($,I),$._zod.parse=(D,X)=>{return Promise.resolve(D.value).then((U)=>I.innerType._zod.run({value:U,issues:[]},X))}}),IO=$$("$ZodLazy",($,I)=>{o$.init($,I),t$($._zod,"innerType",()=>I.getter()),t$($._zod,"pattern",()=>$._zod.innerType?._zod?.pattern),t$($._zod,"propValues",()=>$._zod.innerType?._zod?.propValues),t$($._zod,"optin",()=>$._zod.innerType?._zod?.optin??void 0),t$($._zod,"optout",()=>$._zod.innerType?._zod?.optout??void 0),$._zod.parse=(D,X)=>{return $._zod.innerType._zod.run(D,X)}}),vO=$$("$ZodCustom",($,I)=>{D0.init($,I),o$.init($,I),$._zod.parse=(D,X)=>{return D},$._zod.check=(D)=>{let X=D.value,U=I.fn(X);if(U instanceof Promise)return U.then((Q)=>vG(Q,D,X,$));vG(U,D,X,$);return}});function vG($,I,D,X){if(!$){let U={code:"custom",input:D,inst:X,path:[...X._zod.def.path??[]],continue:!X._zod.def.abort};if(X._zod.def.params)U.params=X._zod.def.params;I.issues.push(vI(U))}}var D6={};i0(D6,{zhTW:()=>mO,zhCN:()=>dO,yo:()=>tO,vi:()=>nO,uz:()=>oO,ur:()=>rO,uk:()=>v6,ua:()=>bO,tr:()=>lO,th:()=>pO,ta:()=>hO,sv:()=>uO,sl:()=>yO,ru:()=>fO,pt:()=>cO,ps:()=>xO,pl:()=>wO,ota:()=>BO,no:()=>NO,nl:()=>jO,ms:()=>_O,mk:()=>CO,lt:()=>kO,ko:()=>gO,km:()=>U6,kh:()=>RO,ka:()=>qO,ja:()=>PO,it:()=>MO,is:()=>TO,id:()=>EO,hy:()=>LO,hu:()=>ZO,he:()=>HO,frCA:()=>FO,fr:()=>AO,fi:()=>SO,fa:()=>zO,es:()=>KO,eo:()=>WO,en:()=>$6,de:()=>VO,da:()=>GO,cs:()=>YO,ca:()=>QO,bg:()=>XO,be:()=>JO,az:()=>OO,ar:()=>DO});var _z=()=>{let $={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function I(U){return $[U]??null}let D={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${U.expected}، ولكن تم إدخال ${A}`;return`مدخلات غير مقبولة: يفترض إدخال ${Q}، ولكن تم إدخال ${A}`}case"invalid_value":if(U.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${c$(U.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return` أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${Q} ${U.maximum.toString()} ${J.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${U.origin??"القيمة"} ${Q} ${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${Q} ${U.minimum.toString()} ${J.unit}`;return`أصغر من اللازم: يفترض لـ ${U.origin} أن يكون ${Q} ${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${U.prefix}"`;if(Q.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${Q.suffix}"`;if(Q.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${Q.includes}"`;if(Q.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${Q.pattern}`;return`${D[Q.format]??U.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${U.divisor}`;case"unrecognized_keys":return`معرف${U.keys.length>1?"ات":""} غريب${U.keys.length>1?"ة":""}: ${Q$(U.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${U.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${U.origin}`;default:return"مدخل غير مقبول"}}};function DO(){return{localeError:_z()}}var jz=()=>{let $={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function I(U){return $[U]??null}let D={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Yanlış dəyər: gözlənilən instanceof ${U.expected}, daxil olan ${A}`;return`Yanlış dəyər: gözlənilən ${Q}, daxil olan ${A}`}case"invalid_value":if(U.values.length===1)return`Yanlış dəyər: gözlənilən ${c$(U.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${Q}${U.maximum.toString()} ${J.unit??"element"}`;return`Çox böyük: gözlənilən ${U.origin??"dəyər"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Çox kiçik: gözlənilən ${U.origin} ${Q}${U.minimum.toString()} ${J.unit}`;return`Çox kiçik: gözlənilən ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Yanlış mətn: "${Q.prefix}" ilə başlamalıdır`;if(Q.format==="ends_with")return`Yanlış mətn: "${Q.suffix}" ilə bitməlidir`;if(Q.format==="includes")return`Yanlış mətn: "${Q.includes}" daxil olmalıdır`;if(Q.format==="regex")return`Yanlış mətn: ${Q.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${D[Q.format]??U.format}`}case"not_multiple_of":return`Yanlış ədəd: ${U.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${U.keys.length>1?"lar":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${U.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function OO(){return{localeError:jz()}}function YG($,I,D,X){let U=Math.abs($),Q=U%10,J=U%100;if(J>=11&&J<=19)return X;if(Q===1)return I;if(Q>=2&&Q<=4)return D;return X}var Nz=()=>{let $={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function I(U){return $[U]??null}let D={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},X={nan:"NaN",number:"лік",array:"масіў"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Няправільны ўвод: чакаўся instanceof ${U.expected}, атрымана ${A}`;return`Няправільны ўвод: чакаўся ${Q}, атрымана ${A}`}case"invalid_value":if(U.values.length===1)return`Няправільны ўвод: чакалася ${c$(U.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J){let A=Number(U.maximum),T=YG(A,J.unit.one,J.unit.few,J.unit.many);return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна ${J.verb} ${Q}${U.maximum.toString()} ${T}`}return`Занадта вялікі: чакалася, што ${U.origin??"значэнне"} павінна быць ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J){let A=Number(U.minimum),T=YG(A,J.unit.one,J.unit.few,J.unit.many);return`Занадта малы: чакалася, што ${U.origin} павінна ${J.verb} ${Q}${U.minimum.toString()} ${T}`}return`Занадта малы: чакалася, што ${U.origin} павінна быць ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${Q.prefix}"`;if(Q.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${Q.suffix}"`;if(Q.format==="includes")return`Няправільны радок: павінен змяшчаць "${Q.includes}"`;if(Q.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${Q.pattern}`;return`Няправільны ${D[Q.format]??U.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${U.keys.length>1?"ключы":"ключ"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${U.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${U.origin}`;default:return"Няправільны ўвод"}}};function JO(){return{localeError:Nz()}}var Bz=()=>{let $={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function I(U){return $[U]??null}let D={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Невалиден вход: очакван instanceof ${U.expected}, получен ${A}`;return`Невалиден вход: очакван ${Q}, получен ${A}`}case"invalid_value":if(U.values.length===1)return`Невалиден вход: очакван ${c$(U.values[0])}`;return`Невалидна опция: очаквано едно от ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Твърде голямо: очаква се ${U.origin??"стойност"} да съдържа ${Q}${U.maximum.toString()} ${J.unit??"елемента"}`;return`Твърде голямо: очаква се ${U.origin??"стойност"} да бъде ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Твърде малко: очаква се ${U.origin} да съдържа ${Q}${U.minimum.toString()} ${J.unit}`;return`Твърде малко: очаква се ${U.origin} да бъде ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Невалиден низ: трябва да започва с "${Q.prefix}"`;if(Q.format==="ends_with")return`Невалиден низ: трябва да завършва с "${Q.suffix}"`;if(Q.format==="includes")return`Невалиден низ: трябва да включва "${Q.includes}"`;if(Q.format==="regex")return`Невалиден низ: трябва да съвпада с ${Q.pattern}`;let J="Невалиден";if(Q.format==="emoji")J="Невалидно";if(Q.format==="datetime")J="Невалидно";if(Q.format==="date")J="Невалидна";if(Q.format==="time")J="Невалидно";if(Q.format==="duration")J="Невалидна";return`${J} ${D[Q.format]??U.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${U.divisor}`;case"unrecognized_keys":return`Неразпознат${U.keys.length>1?"и":""} ключ${U.keys.length>1?"ове":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${U.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${U.origin}`;default:return"Невалиден вход"}}};function XO(){return{localeError:Bz()}}var xz=()=>{let $={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function I(U){return $[U]??null}let D={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipus invàlid: s'esperava instanceof ${U.expected}, s'ha rebut ${A}`;return`Tipus invàlid: s'esperava ${Q}, s'ha rebut ${A}`}case"invalid_value":if(U.values.length===1)return`Valor invàlid: s'esperava ${c$(U.values[0])}`;return`Opció invàlida: s'esperava una de ${Q$(U.values," o ")}`;case"too_big":{let Q=U.inclusive?"com a màxim":"menys de",J=I(U.origin);if(J)return`Massa gran: s'esperava que ${U.origin??"el valor"} contingués ${Q} ${U.maximum.toString()} ${J.unit??"elements"}`;return`Massa gran: s'esperava que ${U.origin??"el valor"} fos ${Q} ${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?"com a mínim":"més de",J=I(U.origin);if(J)return`Massa petit: s'esperava que ${U.origin} contingués ${Q} ${U.minimum.toString()} ${J.unit}`;return`Massa petit: s'esperava que ${U.origin} fos ${Q} ${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Format invàlid: ha de començar amb "${Q.prefix}"`;if(Q.format==="ends_with")return`Format invàlid: ha d'acabar amb "${Q.suffix}"`;if(Q.format==="includes")return`Format invàlid: ha d'incloure "${Q.includes}"`;if(Q.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${Q.pattern}`;return`Format invàlid per a ${D[Q.format]??U.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${U.divisor}`;case"unrecognized_keys":return`Clau${U.keys.length>1?"s":""} no reconeguda${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${U.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${U.origin}`;default:return"Entrada invàlida"}}};function QO(){return{localeError:xz()}}var wz=()=>{let $={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function I(U){return $[U]??null}let D={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},X={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neplatný vstup: očekáváno instanceof ${U.expected}, obdrženo ${A}`;return`Neplatný vstup: očekáváno ${Q}, obdrženo ${A}`}case"invalid_value":if(U.values.length===1)return`Neplatný vstup: očekáváno ${c$(U.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí mít ${Q}${U.maximum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš velká: ${U.origin??"hodnota"} musí být ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí mít ${Q}${U.minimum.toString()} ${J.unit??"prvků"}`;return`Hodnota je příliš malá: ${U.origin??"hodnota"} musí být ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Neplatný řetězec: musí začínat na "${Q.prefix}"`;if(Q.format==="ends_with")return`Neplatný řetězec: musí končit na "${Q.suffix}"`;if(Q.format==="includes")return`Neplatný řetězec: musí obsahovat "${Q.includes}"`;if(Q.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${Q.pattern}`;return`Neplatný formát ${D[Q.format]??U.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${U.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${Q$(U.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${U.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${U.origin}`;default:return"Neplatný vstup"}}};function YO(){return{localeError:wz()}}var cz=()=>{let $={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function I(U){return $[U]??null}let D={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},X={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldigt input: forventede instanceof ${U.expected}, fik ${A}`;return`Ugyldigt input: forventede ${Q}, fik ${A}`}case"invalid_value":if(U.values.length===1)return`Ugyldig værdi: forventede ${c$(U.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin),A=X[U.origin]??U.origin;if(J)return`For stor: forventede ${A??"value"} ${J.verb} ${Q} ${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor: forventede ${A??"value"} havde ${Q} ${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin),A=X[U.origin]??U.origin;if(J)return`For lille: forventede ${A} ${J.verb} ${Q} ${U.minimum.toString()} ${J.unit}`;return`For lille: forventede ${A} havde ${Q} ${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ugyldig streng: skal starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: skal ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: skal indeholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: skal matche mønsteret ${Q.pattern}`;return`Ugyldig ${D[Q.format]??U.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${U.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${U.origin}`;default:return"Ugyldigt input"}}};function GO(){return{localeError:cz()}}var fz=()=>{let $={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function I(U){return $[U]??null}let D={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},X={nan:"NaN",number:"Zahl",array:"Array"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ungültige Eingabe: erwartet instanceof ${U.expected}, erhalten ${A}`;return`Ungültige Eingabe: erwartet ${Q}, erhalten ${A}`}case"invalid_value":if(U.values.length===1)return`Ungültige Eingabe: erwartet ${c$(U.values[0])}`;return`Ungültige Option: erwartet eine von ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${Q}${U.maximum.toString()} ${J.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${U.origin??"Wert"} ${Q}${U.maximum.toString()} ist`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Zu klein: erwartet, dass ${U.origin} ${Q}${U.minimum.toString()} ${J.unit} hat`;return`Zu klein: erwartet, dass ${U.origin} ${Q}${U.minimum.toString()} ist`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ungültiger String: muss mit "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ungültiger String: muss mit "${Q.suffix}" enden`;if(Q.format==="includes")return`Ungültiger String: muss "${Q.includes}" enthalten`;if(Q.format==="regex")return`Ungültiger String: muss dem Muster ${Q.pattern} entsprechen`;return`Ungültig: ${D[Q.format]??U.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${U.divisor} sein`;case"unrecognized_keys":return`${U.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${U.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${U.origin}`;default:return"Ungültige Eingabe"}}};function VO(){return{localeError:fz()}}var yz=()=>{let $={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function I(U){return $[U]??null}let D={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;return`Invalid input: expected ${Q}, received ${A}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${c$(U.values[0])}`;return`Invalid option: expected one of ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Too big: expected ${U.origin??"value"} to have ${Q}${U.maximum.toString()} ${J.unit??"elements"}`;return`Too big: expected ${U.origin??"value"} to be ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Too small: expected ${U.origin} to have ${Q}${U.minimum.toString()} ${J.unit}`;return`Too small: expected ${U.origin} to be ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Invalid string: must start with "${Q.prefix}"`;if(Q.format==="ends_with")return`Invalid string: must end with "${Q.suffix}"`;if(Q.format==="includes")return`Invalid string: must include "${Q.includes}"`;if(Q.format==="regex")return`Invalid string: must match pattern ${Q.pattern}`;return`Invalid ${D[Q.format]??U.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${U.divisor}`;case"unrecognized_keys":return`Unrecognized key${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Invalid key in ${U.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${U.origin}`;default:return"Invalid input"}}};function $6(){return{localeError:yz()}}var uz=()=>{let $={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function I(U){return $[U]??null}let D={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},X={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nevalida enigo: atendiĝis instanceof ${U.expected}, riceviĝis ${A}`;return`Nevalida enigo: atendiĝis ${Q}, riceviĝis ${A}`}case"invalid_value":if(U.values.length===1)return`Nevalida enigo: atendiĝis ${c$(U.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${Q}${U.maximum.toString()} ${J.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${U.origin??"valoro"} havu ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Tro malgranda: atendiĝis ke ${U.origin} havu ${Q}${U.minimum.toString()} ${J.unit}`;return`Tro malgranda: atendiĝis ke ${U.origin} estu ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${Q.prefix}"`;if(Q.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${Q.suffix}"`;if(Q.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${Q.includes}"`;if(Q.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${Q.pattern}`;return`Nevalida ${D[Q.format]??U.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${U.divisor}`;case"unrecognized_keys":return`Nekonata${U.keys.length>1?"j":""} ŝlosilo${U.keys.length>1?"j":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${U.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${U.origin}`;default:return"Nevalida enigo"}}};function WO(){return{localeError:uz()}}var hz=()=>{let $={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function I(U){return $[U]??null}let D={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},X={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrada inválida: se esperaba instanceof ${U.expected}, recibido ${A}`;return`Entrada inválida: se esperaba ${Q}, recibido ${A}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: se esperaba ${c$(U.values[0])}`;return`Opción inválida: se esperaba una de ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin),A=X[U.origin]??U.origin;if(J)return`Demasiado grande: se esperaba que ${A??"valor"} tuviera ${Q}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${A??"valor"} fuera ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin),A=X[U.origin]??U.origin;if(J)return`Demasiado pequeño: se esperaba que ${A} tuviera ${Q}${U.minimum.toString()} ${J.unit}`;return`Demasiado pequeño: se esperaba que ${A} fuera ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Cadena inválida: debe comenzar con "${Q.prefix}"`;if(Q.format==="ends_with")return`Cadena inválida: debe terminar en "${Q.suffix}"`;if(Q.format==="includes")return`Cadena inválida: debe incluir "${Q.includes}"`;if(Q.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${Q.pattern}`;return`Inválido ${D[Q.format]??U.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Llave${U.keys.length>1?"s":""} desconocida${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Llave inválida en ${X[U.origin]??U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${X[U.origin]??U.origin}`;default:return"Entrada inválida"}}};function KO(){return{localeError:hz()}}var pz=()=>{let $={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function I(U){return $[U]??null}let D={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},X={nan:"NaN",number:"عدد",array:"آرایه"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ورودی نامعتبر: می‌بایست instanceof ${U.expected} می‌بود، ${A} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${Q} می‌بود، ${A} دریافت شد`}case"invalid_value":if(U.values.length===1)return`ورودی نامعتبر: می‌بایست ${c$(U.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${Q$(U.values,"|")} می‌بود`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${Q}${U.maximum.toString()} ${J.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${U.origin??"مقدار"} باید ${Q}${U.maximum.toString()} باشد`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`خیلی کوچک: ${U.origin} باید ${Q}${U.minimum.toString()} ${J.unit} باشد`;return`خیلی کوچک: ${U.origin} باید ${Q}${U.minimum.toString()} باشد`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`رشته نامعتبر: باید با "${Q.prefix}" شروع شود`;if(Q.format==="ends_with")return`رشته نامعتبر: باید با "${Q.suffix}" تمام شود`;if(Q.format==="includes")return`رشته نامعتبر: باید شامل "${Q.includes}" باشد`;if(Q.format==="regex")return`رشته نامعتبر: باید با الگوی ${Q.pattern} مطابقت داشته باشد`;return`${D[Q.format]??U.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${U.divisor} باشد`;case"unrecognized_keys":return`کلید${U.keys.length>1?"های":""} ناشناس: ${Q$(U.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${U.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${U.origin}`;default:return"ورودی نامعتبر"}}};function zO(){return{localeError:pz()}}var lz=()=>{let $={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function I(U){return $[U]??null}let D={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Virheellinen tyyppi: odotettiin instanceof ${U.expected}, oli ${A}`;return`Virheellinen tyyppi: odotettiin ${Q}, oli ${A}`}case"invalid_value":if(U.values.length===1)return`Virheellinen syöte: täytyy olla ${c$(U.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Liian suuri: ${J.subject} täytyy olla ${Q}${U.maximum.toString()} ${J.unit}`.trim();return`Liian suuri: arvon täytyy olla ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Liian pieni: ${J.subject} täytyy olla ${Q}${U.minimum.toString()} ${J.unit}`.trim();return`Liian pieni: arvon täytyy olla ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${Q.prefix}"`;if(Q.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${Q.suffix}"`;if(Q.format==="includes")return`Virheellinen syöte: täytyy sisältää "${Q.includes}"`;if(Q.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${Q.pattern}`;return`Virheellinen ${D[Q.format]??U.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${U.divisor} monikerta`;case"unrecognized_keys":return`${U.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Q$(U.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function SO(){return{localeError:lz()}}var bz=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(U){return $[U]??null}let D={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},X={nan:"NaN",number:"nombre",array:"tableau"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : instanceof ${U.expected} attendu, ${A} reçu`;return`Entrée invalide : ${Q} attendu, ${A} reçu`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : ${c$(U.values[0])} attendu`;return`Option invalide : une valeur parmi ${Q$(U.values,"|")} attendue`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Trop grand : ${U.origin??"valeur"} doit ${J.verb} ${Q}${U.maximum.toString()} ${J.unit??"élément(s)"}`;return`Trop grand : ${U.origin??"valeur"} doit être ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Trop petit : ${U.origin} doit ${J.verb} ${Q}${U.minimum.toString()} ${J.unit}`;return`Trop petit : ${U.origin} doit être ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Chaîne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Chaîne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Chaîne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${Q.pattern}`;return`${D[Q.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${Q$(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function AO(){return{localeError:bz()}}var rz=()=>{let $={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function I(U){return $[U]??null}let D={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Entrée invalide : attendu instanceof ${U.expected}, reçu ${A}`;return`Entrée invalide : attendu ${Q}, reçu ${A}`}case"invalid_value":if(U.values.length===1)return`Entrée invalide : attendu ${c$(U.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"≤":"<",J=I(U.origin);if(J)return`Trop grand : attendu que ${U.origin??"la valeur"} ait ${Q}${U.maximum.toString()} ${J.unit}`;return`Trop grand : attendu que ${U.origin??"la valeur"} soit ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?"≥":">",J=I(U.origin);if(J)return`Trop petit : attendu que ${U.origin} ait ${Q}${U.minimum.toString()} ${J.unit}`;return`Trop petit : attendu que ${U.origin} soit ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Chaîne invalide : doit commencer par "${Q.prefix}"`;if(Q.format==="ends_with")return`Chaîne invalide : doit se terminer par "${Q.suffix}"`;if(Q.format==="includes")return`Chaîne invalide : doit inclure "${Q.includes}"`;if(Q.format==="regex")return`Chaîne invalide : doit correspondre au motif ${Q.pattern}`;return`${D[Q.format]??U.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${U.divisor}`;case"unrecognized_keys":return`Clé${U.keys.length>1?"s":""} non reconnue${U.keys.length>1?"s":""} : ${Q$(U.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${U.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${U.origin}`;default:return"Entrée invalide"}}};function FO(){return{localeError:rz()}}var oz=()=>{let $={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},I={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},D=(Z)=>Z?$[Z]:void 0,X=(Z)=>{let L=D(Z);if(L)return L.label;return Z??$.unknown.label},U=(Z)=>`ה${X(Z)}`,Q=(Z)=>{return(D(Z)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות"},J=(Z)=>{if(!Z)return null;return I[Z]??null},A={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},T={nan:"NaN"};return(Z)=>{switch(Z.code){case"invalid_type":{let L=Z.expected,F=T[L??""]??X(L),E=f$(Z.input),P=T[E]??$[E]?.label??E;if(/^[A-Z]/.test(Z.expected))return`קלט לא תקין: צריך להיות instanceof ${Z.expected}, התקבל ${P}`;return`קלט לא תקין: צריך להיות ${F}, התקבל ${P}`}case"invalid_value":{if(Z.values.length===1)return`ערך לא תקין: הערך חייב להיות ${c$(Z.values[0])}`;let L=Z.values.map((P)=>c$(P));if(Z.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${L[0]} או ${L[1]}`;let F=L[L.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${L.slice(0,-1).join(", ")} או ${F}`}case"too_big":{let L=J(Z.origin),F=U(Z.origin??"value");if(Z.origin==="string")return`${L?.longLabel??"ארוך"} מדי: ${F} צריכה להכיל ${Z.maximum.toString()} ${L?.unit??""} ${Z.inclusive?"או פחות":"לכל היותר"}`.trim();if(Z.origin==="number"){let R=Z.inclusive?`קטן או שווה ל-${Z.maximum}`:`קטן מ-${Z.maximum}`;return`גדול מדי: ${F} צריך להיות ${R}`}if(Z.origin==="array"||Z.origin==="set"){let R=Z.origin==="set"?"צריכה":"צריך",k=Z.inclusive?`${Z.maximum} ${L?.unit??""} או פחות`:`פחות מ-${Z.maximum} ${L?.unit??""}`;return`גדול מדי: ${F} ${R} להכיל ${k}`.trim()}let E=Z.inclusive?"<=":"<",P=Q(Z.origin??"value");if(L?.unit)return`${L.longLabel} מדי: ${F} ${P} ${E}${Z.maximum.toString()} ${L.unit}`;return`${L?.longLabel??"גדול"} מדי: ${F} ${P} ${E}${Z.maximum.toString()}`}case"too_small":{let L=J(Z.origin),F=U(Z.origin??"value");if(Z.origin==="string")return`${L?.shortLabel??"קצר"} מדי: ${F} צריכה להכיל ${Z.minimum.toString()} ${L?.unit??""} ${Z.inclusive?"או יותר":"לפחות"}`.trim();if(Z.origin==="number"){let R=Z.inclusive?`גדול או שווה ל-${Z.minimum}`:`גדול מ-${Z.minimum}`;return`קטן מדי: ${F} צריך להיות ${R}`}if(Z.origin==="array"||Z.origin==="set"){let R=Z.origin==="set"?"צריכה":"צריך";if(Z.minimum===1&&Z.inclusive){let g=Z.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${F} ${R} להכיל ${g}`}let k=Z.inclusive?`${Z.minimum} ${L?.unit??""} או יותר`:`יותר מ-${Z.minimum} ${L?.unit??""}`;return`קטן מדי: ${F} ${R} להכיל ${k}`.trim()}let E=Z.inclusive?">=":">",P=Q(Z.origin??"value");if(L?.unit)return`${L.shortLabel} מדי: ${F} ${P} ${E}${Z.minimum.toString()} ${L.unit}`;return`${L?.shortLabel??"קטן"} מדי: ${F} ${P} ${E}${Z.minimum.toString()}`}case"invalid_format":{let L=Z;if(L.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${L.prefix}"`;if(L.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${L.suffix}"`;if(L.format==="includes")return`המחרוזת חייבת לכלול "${L.includes}"`;if(L.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${L.pattern}`;let F=A[L.format],E=F?.label??L.format,R=(F?.gender??"m")==="f"?"תקינה":"תקין";return`${E} לא ${R}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${Z.divisor}`;case"unrecognized_keys":return`מפתח${Z.keys.length>1?"ות":""} לא מזוה${Z.keys.length>1?"ים":"ה"}: ${Q$(Z.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${U(Z.origin??"array")}`;default:return"קלט לא תקין"}}};function HO(){return{localeError:oz()}}var nz=()=>{let $={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function I(U){return $[U]??null}let D={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},X={nan:"NaN",number:"szám",array:"tömb"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Érvénytelen bemenet: a várt érték instanceof ${U.expected}, a kapott érték ${A}`;return`Érvénytelen bemenet: a várt érték ${Q}, a kapott érték ${A}`}case"invalid_value":if(U.values.length===1)return`Érvénytelen bemenet: a várt érték ${c$(U.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Túl nagy: ${U.origin??"érték"} mérete túl nagy ${Q}${U.maximum.toString()} ${J.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${U.origin??"érték"} túl nagy: ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Túl kicsi: a bemeneti érték ${U.origin} mérete túl kicsi ${Q}${U.minimum.toString()} ${J.unit}`;return`Túl kicsi: a bemeneti érték ${U.origin} túl kicsi ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Érvénytelen string: "${Q.prefix}" értékkel kell kezdődnie`;if(Q.format==="ends_with")return`Érvénytelen string: "${Q.suffix}" értékkel kell végződnie`;if(Q.format==="includes")return`Érvénytelen string: "${Q.includes}" értéket kell tartalmaznia`;if(Q.format==="regex")return`Érvénytelen string: ${Q.pattern} mintának kell megfelelnie`;return`Érvénytelen ${D[Q.format]??U.format}`}case"not_multiple_of":return`Érvénytelen szám: ${U.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${U.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${U.origin}`;default:return"Érvénytelen bemenet"}}};function ZO(){return{localeError:nz()}}function GG($,I,D){return Math.abs($)===1?I:D}function YI($){if(!$)return"";let I=["ա","ե","ը","ի","ո","ու","օ"],D=$[$.length-1];return $+(I.includes(D)?"ն":"ը")}var dz=()=>{let $={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function I(U){return $[U]??null}let D={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},X={nan:"NaN",number:"թիվ",array:"զանգված"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${U.expected}, ստացվել է ${A}`;return`Սխալ մուտքագրում․ սպասվում էր ${Q}, ստացվել է ${A}`}case"invalid_value":if(U.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${c$(U.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J){let A=Number(U.maximum),T=GG(A,J.unit.one,J.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${YI(U.origin??"արժեք")} կունենա ${Q}${U.maximum.toString()} ${T}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${YI(U.origin??"արժեք")} լինի ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J){let A=Number(U.minimum),T=GG(A,J.unit.one,J.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${YI(U.origin)} կունենա ${Q}${U.minimum.toString()} ${T}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${YI(U.origin)} լինի ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${Q.prefix}"-ով`;if(Q.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${Q.suffix}"-ով`;if(Q.format==="includes")return`Սխալ տող․ պետք է պարունակի "${Q.includes}"`;if(Q.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${Q.pattern} ձևաչափին`;return`Սխալ ${D[Q.format]??U.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${U.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${U.keys.length>1?"ներ":""}. ${Q$(U.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${YI(U.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${YI(U.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function LO(){return{localeError:dz()}}var mz=()=>{let $={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function I(U){return $[U]??null}let D={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak valid: diharapkan instanceof ${U.expected}, diterima ${A}`;return`Input tidak valid: diharapkan ${Q}, diterima ${A}`}case"invalid_value":if(U.values.length===1)return`Input tidak valid: diharapkan ${c$(U.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Terlalu besar: diharapkan ${U.origin??"value"} memiliki ${Q}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: diharapkan ${U.origin??"value"} menjadi ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Terlalu kecil: diharapkan ${U.origin} memiliki ${Q}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: diharapkan ${U.origin} menjadi ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`String tidak valid: harus dimulai dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak valid: harus berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak valid: harus menyertakan "${Q.includes}"`;if(Q.format==="regex")return`String tidak valid: harus sesuai pola ${Q.pattern}`;return`${D[Q.format]??U.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${U.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${U.origin}`;default:return"Input tidak valid"}}};function EO(){return{localeError:mz()}}var tz=()=>{let $={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function I(U){return $[U]??null}let D={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},X={nan:"NaN",number:"númer",array:"fylki"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Rangt gildi: Þú slóst inn ${A} þar sem á að vera instanceof ${U.expected}`;return`Rangt gildi: Þú slóst inn ${A} þar sem á að vera ${Q}`}case"invalid_value":if(U.values.length===1)return`Rangt gildi: gert ráð fyrir ${c$(U.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} hafi ${Q}${U.maximum.toString()} ${J.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${U.origin??"gildi"} sé ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Of lítið: gert er ráð fyrir að ${U.origin} hafi ${Q}${U.minimum.toString()} ${J.unit}`;return`Of lítið: gert er ráð fyrir að ${U.origin} sé ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ógildur strengur: verður að byrja á "${Q.prefix}"`;if(Q.format==="ends_with")return`Ógildur strengur: verður að enda á "${Q.suffix}"`;if(Q.format==="includes")return`Ógildur strengur: verður að innihalda "${Q.includes}"`;if(Q.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${Q.pattern}`;return`Rangt ${D[Q.format]??U.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${U.divisor}`;case"unrecognized_keys":return`Óþekkt ${U.keys.length>1?"ir lyklar":"ur lykill"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${U.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${U.origin}`;default:return"Rangt gildi"}}};function TO(){return{localeError:tz()}}var iz=()=>{let $={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function I(U){return $[U]??null}let D={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},X={nan:"NaN",number:"numero",array:"vettore"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input non valido: atteso instanceof ${U.expected}, ricevuto ${A}`;return`Input non valido: atteso ${Q}, ricevuto ${A}`}case"invalid_value":if(U.values.length===1)return`Input non valido: atteso ${c$(U.values[0])}`;return`Opzione non valida: atteso uno tra ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Troppo grande: ${U.origin??"valore"} deve avere ${Q}${U.maximum.toString()} ${J.unit??"elementi"}`;return`Troppo grande: ${U.origin??"valore"} deve essere ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Troppo piccolo: ${U.origin} deve avere ${Q}${U.minimum.toString()} ${J.unit}`;return`Troppo piccolo: ${U.origin} deve essere ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Stringa non valida: deve iniziare con "${Q.prefix}"`;if(Q.format==="ends_with")return`Stringa non valida: deve terminare con "${Q.suffix}"`;if(Q.format==="includes")return`Stringa non valida: deve includere "${Q.includes}"`;if(Q.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${Q.pattern}`;return`Invalid ${D[Q.format]??U.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${U.divisor}`;case"unrecognized_keys":return`Chiav${U.keys.length>1?"i":"e"} non riconosciut${U.keys.length>1?"e":"a"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${U.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${U.origin}`;default:return"Input non valido"}}};function MO(){return{localeError:iz()}}var ez=()=>{let $={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function I(U){return $[U]??null}let D={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},X={nan:"NaN",number:"数値",array:"配列"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無効な入力: instanceof ${U.expected}が期待されましたが、${A}が入力されました`;return`無効な入力: ${Q}が期待されましたが、${A}が入力されました`}case"invalid_value":if(U.values.length===1)return`無効な入力: ${c$(U.values[0])}が期待されました`;return`無効な選択: ${Q$(U.values,"、")}のいずれかである必要があります`;case"too_big":{let Q=U.inclusive?"以下である":"より小さい",J=I(U.origin);if(J)return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${J.unit??"要素"}${Q}必要があります`;return`大きすぎる値: ${U.origin??"値"}は${U.maximum.toString()}${Q}必要があります`}case"too_small":{let Q=U.inclusive?"以上である":"より大きい",J=I(U.origin);if(J)return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${J.unit}${Q}必要があります`;return`小さすぎる値: ${U.origin}は${U.minimum.toString()}${Q}必要があります`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`無効な文字列: "${Q.prefix}"で始まる必要があります`;if(Q.format==="ends_with")return`無効な文字列: "${Q.suffix}"で終わる必要があります`;if(Q.format==="includes")return`無効な文字列: "${Q.includes}"を含む必要があります`;if(Q.format==="regex")return`無効な文字列: パターン${Q.pattern}に一致する必要があります`;return`無効な${D[Q.format]??U.format}`}case"not_multiple_of":return`無効な数値: ${U.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${U.keys.length>1?"群":""}: ${Q$(U.keys,"、")}`;case"invalid_key":return`${U.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${U.origin}内の無効な値`;default:return"無効な入力"}}};function PO(){return{localeError:ez()}}var az=()=>{let $={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function I(U){return $[U]??null}let D={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},X={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${U.expected}, მიღებული ${A}`;return`არასწორი შეყვანა: მოსალოდნელი ${Q}, მიღებული ${A}`}case"invalid_value":if(U.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${c$(U.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Q$(U.values,"|")}-დან`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} ${J.verb} ${Q}${U.maximum.toString()} ${J.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${U.origin??"მნიშვნელობა"} იყოს ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} ${J.verb} ${Q}${U.minimum.toString()} ${J.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${U.origin} იყოს ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`არასწორი სტრინგი: უნდა იწყებოდეს "${Q.prefix}"-ით`;if(Q.format==="ends_with")return`არასწორი სტრინგი: უნდა მთავრდებოდეს "${Q.suffix}"-ით`;if(Q.format==="includes")return`არასწორი სტრინგი: უნდა შეიცავდეს "${Q.includes}"-ს`;if(Q.format==="regex")return`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${Q.pattern}`;return`არასწორი ${D[Q.format]??U.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${U.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${U.keys.length>1?"ები":"ი"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${U.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${U.origin}-ში`;default:return"არასწორი შეყვანა"}}};function qO(){return{localeError:az()}}var sz=()=>{let $={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function I(U){return $[U]??null}let D={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},X={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${U.expected} ប៉ុន្តែទទួលបាន ${A}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Q} ប៉ុន្តែទទួលបាន ${A}`}case"invalid_value":if(U.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${c$(U.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${Q} ${U.maximum.toString()} ${J.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${U.origin??"តម្លៃ"} ${Q} ${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`តូចពេក៖ ត្រូវការ ${U.origin} ${Q} ${U.minimum.toString()} ${J.unit}`;return`តូចពេក៖ ត្រូវការ ${U.origin} ${Q} ${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${Q.prefix}"`;if(Q.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${Q.suffix}"`;if(Q.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${Q.includes}"`;if(Q.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${Q.pattern}`;return`មិនត្រឹមត្រូវ៖ ${D[Q.format]??U.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${U.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${Q$(U.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${U.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function U6(){return{localeError:sz()}}function RO(){return U6()}var $S=()=>{let $={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function I(U){return $[U]??null}let D={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`잘못된 입력: 예상 타입은 instanceof ${U.expected}, 받은 타입은 ${A}입니다`;return`잘못된 입력: 예상 타입은 ${Q}, 받은 타입은 ${A}입니다`}case"invalid_value":if(U.values.length===1)return`잘못된 입력: 값은 ${c$(U.values[0])} 이어야 합니다`;return`잘못된 옵션: ${Q$(U.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let Q=U.inclusive?"이하":"미만",J=Q==="미만"?"이어야 합니다":"여야 합니다",A=I(U.origin),T=A?.unit??"요소";if(A)return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()}${T} ${Q}${J}`;return`${U.origin??"값"}이 너무 큽니다: ${U.maximum.toString()} ${Q}${J}`}case"too_small":{let Q=U.inclusive?"이상":"초과",J=Q==="이상"?"이어야 합니다":"여야 합니다",A=I(U.origin),T=A?.unit??"요소";if(A)return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()}${T} ${Q}${J}`;return`${U.origin??"값"}이 너무 작습니다: ${U.minimum.toString()} ${Q}${J}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`잘못된 문자열: "${Q.prefix}"(으)로 시작해야 합니다`;if(Q.format==="ends_with")return`잘못된 문자열: "${Q.suffix}"(으)로 끝나야 합니다`;if(Q.format==="includes")return`잘못된 문자열: "${Q.includes}"을(를) 포함해야 합니다`;if(Q.format==="regex")return`잘못된 문자열: 정규식 ${Q.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${D[Q.format]??U.format}`}case"not_multiple_of":return`잘못된 숫자: ${U.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${Q$(U.keys,", ")}`;case"invalid_key":return`잘못된 키: ${U.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${U.origin}`;default:return"잘못된 입력"}}};function gO(){return{localeError:$S()}}var I6=($)=>{return $.charAt(0).toUpperCase()+$.slice(1)};function VG($){let I=Math.abs($),D=I%10,X=I%100;if(X>=11&&X<=19||D===0)return"many";if(D===1)return"one";return"few"}var US=()=>{let $={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function I(U,Q,J,A){let T=$[U]??null;if(T===null)return T;return{unit:T.unit[Q],verb:T.verb[A][J?"inclusive":"notInclusive"]}}let D={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},X={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Gautas tipas ${A}, o tikėtasi - instanceof ${U.expected}`;return`Gautas tipas ${A}, o tikėtasi - ${Q}`}case"invalid_value":if(U.values.length===1)return`Privalo būti ${c$(U.values[0])}`;return`Privalo būti vienas iš ${Q$(U.values,"|")} pasirinkimų`;case"too_big":{let Q=X[U.origin]??U.origin,J=I(U.origin,VG(Number(U.maximum)),U.inclusive??!1,"smaller");if(J?.verb)return`${I6(Q??U.origin??"reikšmė")} ${J.verb} ${U.maximum.toString()} ${J.unit??"elementų"}`;let A=U.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${I6(Q??U.origin??"reikšmė")} turi būti ${A} ${U.maximum.toString()} ${J?.unit}`}case"too_small":{let Q=X[U.origin]??U.origin,J=I(U.origin,VG(Number(U.minimum)),U.inclusive??!1,"bigger");if(J?.verb)return`${I6(Q??U.origin??"reikšmė")} ${J.verb} ${U.minimum.toString()} ${J.unit??"elementų"}`;let A=U.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${I6(Q??U.origin??"reikšmė")} turi būti ${A} ${U.minimum.toString()} ${J?.unit}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Eilutė privalo prasidėti "${Q.prefix}"`;if(Q.format==="ends_with")return`Eilutė privalo pasibaigti "${Q.suffix}"`;if(Q.format==="includes")return`Eilutė privalo įtraukti "${Q.includes}"`;if(Q.format==="regex")return`Eilutė privalo atitikti ${Q.pattern}`;return`Neteisingas ${D[Q.format]??U.format}`}case"not_multiple_of":return`Skaičius privalo būti ${U.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${U.keys.length>1?"i":"as"} rakt${U.keys.length>1?"ai":"as"}: ${Q$(U.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let Q=X[U.origin]??U.origin;return`${I6(Q??U.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function kO(){return{localeError:US()}}var IS=()=>{let $={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function I(U){return $[U]??null}let D={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},X={nan:"NaN",number:"број",array:"низа"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Грешен внес: се очекува instanceof ${U.expected}, примено ${A}`;return`Грешен внес: се очекува ${Q}, примено ${A}`}case"invalid_value":if(U.values.length===1)return`Invalid input: expected ${c$(U.values[0])}`;return`Грешана опција: се очекува една ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Премногу голем: се очекува ${U.origin??"вредноста"} да има ${Q}${U.maximum.toString()} ${J.unit??"елементи"}`;return`Премногу голем: се очекува ${U.origin??"вредноста"} да биде ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Премногу мал: се очекува ${U.origin} да има ${Q}${U.minimum.toString()} ${J.unit}`;return`Премногу мал: се очекува ${U.origin} да биде ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Неважечка низа: мора да започнува со "${Q.prefix}"`;if(Q.format==="ends_with")return`Неважечка низа: мора да завршува со "${Q.suffix}"`;if(Q.format==="includes")return`Неважечка низа: мора да вклучува "${Q.includes}"`;if(Q.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${Q.pattern}`;return`Invalid ${D[Q.format]??U.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${U.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${U.origin}`;default:return"Грешен внес"}}};function CO(){return{localeError:IS()}}var vS=()=>{let $={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function I(U){return $[U]??null}let D={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},X={nan:"NaN",number:"nombor"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Input tidak sah: dijangka instanceof ${U.expected}, diterima ${A}`;return`Input tidak sah: dijangka ${Q}, diterima ${A}`}case"invalid_value":if(U.values.length===1)return`Input tidak sah: dijangka ${c$(U.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Terlalu besar: dijangka ${U.origin??"nilai"} ${J.verb} ${Q}${U.maximum.toString()} ${J.unit??"elemen"}`;return`Terlalu besar: dijangka ${U.origin??"nilai"} adalah ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Terlalu kecil: dijangka ${U.origin} ${J.verb} ${Q}${U.minimum.toString()} ${J.unit}`;return`Terlalu kecil: dijangka ${U.origin} adalah ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`String tidak sah: mesti bermula dengan "${Q.prefix}"`;if(Q.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${Q.suffix}"`;if(Q.format==="includes")return`String tidak sah: mesti mengandungi "${Q.includes}"`;if(Q.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${Q.pattern}`;return`${D[Q.format]??U.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${U.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Q$(U.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${U.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${U.origin}`;default:return"Input tidak sah"}}};function _O(){return{localeError:vS()}}var DS=()=>{let $={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function I(U){return $[U]??null}let D={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},X={nan:"NaN",number:"getal"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ongeldige invoer: verwacht instanceof ${U.expected}, ontving ${A}`;return`Ongeldige invoer: verwacht ${Q}, ontving ${A}`}case"invalid_value":if(U.values.length===1)return`Ongeldige invoer: verwacht ${c$(U.values[0])}`;return`Ongeldige optie: verwacht één van ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin),A=U.origin==="date"?"laat":U.origin==="string"?"lang":"groot";if(J)return`Te ${A}: verwacht dat ${U.origin??"waarde"} ${Q}${U.maximum.toString()} ${J.unit??"elementen"} ${J.verb}`;return`Te ${A}: verwacht dat ${U.origin??"waarde"} ${Q}${U.maximum.toString()} is`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin),A=U.origin==="date"?"vroeg":U.origin==="string"?"kort":"klein";if(J)return`Te ${A}: verwacht dat ${U.origin} ${Q}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Te ${A}: verwacht dat ${U.origin} ${Q}${U.minimum.toString()} is`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ongeldige tekst: moet met "${Q.prefix}" beginnen`;if(Q.format==="ends_with")return`Ongeldige tekst: moet op "${Q.suffix}" eindigen`;if(Q.format==="includes")return`Ongeldige tekst: moet "${Q.includes}" bevatten`;if(Q.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${Q.pattern}`;return`Ongeldig: ${D[Q.format]??U.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${U.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${U.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${U.origin}`;default:return"Ongeldige invoer"}}};function jO(){return{localeError:DS()}}var OS=()=>{let $={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function I(U){return $[U]??null}let D={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},X={nan:"NaN",number:"tall",array:"liste"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ugyldig input: forventet instanceof ${U.expected}, fikk ${A}`;return`Ugyldig input: forventet ${Q}, fikk ${A}`}case"invalid_value":if(U.values.length===1)return`Ugyldig verdi: forventet ${c$(U.values[0])}`;return`Ugyldig valg: forventet en av ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`For stor(t): forventet ${U.origin??"value"} til å ha ${Q}${U.maximum.toString()} ${J.unit??"elementer"}`;return`For stor(t): forventet ${U.origin??"value"} til å ha ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`For lite(n): forventet ${U.origin} til å ha ${Q}${U.minimum.toString()} ${J.unit}`;return`For lite(n): forventet ${U.origin} til å ha ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ugyldig streng: må starte med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ugyldig streng: må ende med "${Q.suffix}"`;if(Q.format==="includes")return`Ugyldig streng: må inneholde "${Q.includes}"`;if(Q.format==="regex")return`Ugyldig streng: må matche mønsteret ${Q.pattern}`;return`Ugyldig ${D[Q.format]??U.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${U.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${U.origin}`;default:return"Ugyldig input"}}};function NO(){return{localeError:OS()}}var JS=()=>{let $={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function I(U){return $[U]??null}let D={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},X={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Fâsit giren: umulan instanceof ${U.expected}, alınan ${A}`;return`Fâsit giren: umulan ${Q}, alınan ${A}`}case"invalid_value":if(U.values.length===1)return`Fâsit giren: umulan ${c$(U.values[0])}`;return`Fâsit tercih: mûteberler ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Fazla büyük: ${U.origin??"value"}, ${Q}${U.maximum.toString()} ${J.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${U.origin??"value"}, ${Q}${U.maximum.toString()} olmalıydı.`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Fazla küçük: ${U.origin}, ${Q}${U.minimum.toString()} ${J.unit} sahip olmalıydı.`;return`Fazla küçük: ${U.origin}, ${Q}${U.minimum.toString()} olmalıydı.`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Fâsit metin: "${Q.prefix}" ile başlamalı.`;if(Q.format==="ends_with")return`Fâsit metin: "${Q.suffix}" ile bitmeli.`;if(Q.format==="includes")return`Fâsit metin: "${Q.includes}" ihtivâ etmeli.`;if(Q.format==="regex")return`Fâsit metin: ${Q.pattern} nakşına uymalı.`;return`Fâsit ${D[Q.format]??U.format}`}case"not_multiple_of":return`Fâsit sayı: ${U.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${U.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function BO(){return{localeError:JS()}}var XS=()=>{let $={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function I(U){return $[U]??null}let D={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},X={nan:"NaN",number:"عدد",array:"ارې"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ناسم ورودي: باید instanceof ${U.expected} وای, مګر ${A} ترلاسه شو`;return`ناسم ورودي: باید ${Q} وای, مګر ${A} ترلاسه شو`}case"invalid_value":if(U.values.length===1)return`ناسم ورودي: باید ${c$(U.values[0])} وای`;return`ناسم انتخاب: باید یو له ${Q$(U.values,"|")} څخه وای`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`ډیر لوی: ${U.origin??"ارزښت"} باید ${Q}${U.maximum.toString()} ${J.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${U.origin??"ارزښت"} باید ${Q}${U.maximum.toString()} وي`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`ډیر کوچنی: ${U.origin} باید ${Q}${U.minimum.toString()} ${J.unit} ولري`;return`ډیر کوچنی: ${U.origin} باید ${Q}${U.minimum.toString()} وي`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`ناسم متن: باید د "${Q.prefix}" سره پیل شي`;if(Q.format==="ends_with")return`ناسم متن: باید د "${Q.suffix}" سره پای ته ورسيږي`;if(Q.format==="includes")return`ناسم متن: باید "${Q.includes}" ولري`;if(Q.format==="regex")return`ناسم متن: باید د ${Q.pattern} سره مطابقت ولري`;return`${D[Q.format]??U.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${U.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${U.keys.length>1?"کلیډونه":"کلیډ"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${U.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${U.origin} کې`;default:return"ناسمه ورودي"}}};function xO(){return{localeError:XS()}}var QS=()=>{let $={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function I(U){return $[U]??null}let D={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},X={nan:"NaN",number:"liczba",array:"tablica"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${U.expected}, otrzymano ${A}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${Q}, otrzymano ${A}`}case"invalid_value":if(U.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${c$(U.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Za duża wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${Q}${U.maximum.toString()} ${J.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Za mała wartość: oczekiwano, że ${U.origin??"wartość"} będzie mieć ${Q}${U.minimum.toString()} ${J.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${U.origin??"wartość"} będzie wynosić ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${Q.prefix}"`;if(Q.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${Q.suffix}"`;if(Q.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${Q.includes}"`;if(Q.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${Q.pattern}`;return`Nieprawidłow(y/a/e) ${D[Q.format]??U.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${U.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${U.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${U.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function wO(){return{localeError:QS()}}var YS=()=>{let $={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function I(U){return $[U]??null}let D={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},X={nan:"NaN",number:"número",null:"nulo"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Tipo inválido: esperado instanceof ${U.expected}, recebido ${A}`;return`Tipo inválido: esperado ${Q}, recebido ${A}`}case"invalid_value":if(U.values.length===1)return`Entrada inválida: esperado ${c$(U.values[0])}`;return`Opção inválida: esperada uma das ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Muito grande: esperado que ${U.origin??"valor"} tivesse ${Q}${U.maximum.toString()} ${J.unit??"elementos"}`;return`Muito grande: esperado que ${U.origin??"valor"} fosse ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Muito pequeno: esperado que ${U.origin} tivesse ${Q}${U.minimum.toString()} ${J.unit}`;return`Muito pequeno: esperado que ${U.origin} fosse ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Texto inválido: deve começar com "${Q.prefix}"`;if(Q.format==="ends_with")return`Texto inválido: deve terminar com "${Q.suffix}"`;if(Q.format==="includes")return`Texto inválido: deve incluir "${Q.includes}"`;if(Q.format==="regex")return`Texto inválido: deve corresponder ao padrão ${Q.pattern}`;return`${D[Q.format]??U.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${U.divisor}`;case"unrecognized_keys":return`Chave${U.keys.length>1?"s":""} desconhecida${U.keys.length>1?"s":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Chave inválida em ${U.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${U.origin}`;default:return"Campo inválido"}}};function cO(){return{localeError:YS()}}function WG($,I,D,X){let U=Math.abs($),Q=U%10,J=U%100;if(J>=11&&J<=19)return X;if(Q===1)return I;if(Q>=2&&Q<=4)return D;return X}var GS=()=>{let $={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function I(U){return $[U]??null}let D={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},X={nan:"NaN",number:"число",array:"массив"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неверный ввод: ожидалось instanceof ${U.expected}, получено ${A}`;return`Неверный ввод: ожидалось ${Q}, получено ${A}`}case"invalid_value":if(U.values.length===1)return`Неверный ввод: ожидалось ${c$(U.values[0])}`;return`Неверный вариант: ожидалось одно из ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J){let A=Number(U.maximum),T=WG(A,J.unit.one,J.unit.few,J.unit.many);return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет иметь ${Q}${U.maximum.toString()} ${T}`}return`Слишком большое значение: ожидалось, что ${U.origin??"значение"} будет ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J){let A=Number(U.minimum),T=WG(A,J.unit.one,J.unit.few,J.unit.many);return`Слишком маленькое значение: ожидалось, что ${U.origin} будет иметь ${Q}${U.minimum.toString()} ${T}`}return`Слишком маленькое значение: ожидалось, что ${U.origin} будет ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Неверная строка: должна начинаться с "${Q.prefix}"`;if(Q.format==="ends_with")return`Неверная строка: должна заканчиваться на "${Q.suffix}"`;if(Q.format==="includes")return`Неверная строка: должна содержать "${Q.includes}"`;if(Q.format==="regex")return`Неверная строка: должна соответствовать шаблону ${Q.pattern}`;return`Неверный ${D[Q.format]??U.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${U.divisor}`;case"unrecognized_keys":return`Нераспознанн${U.keys.length>1?"ые":"ый"} ключ${U.keys.length>1?"и":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${U.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${U.origin}`;default:return"Неверные входные данные"}}};function fO(){return{localeError:GS()}}var VS=()=>{let $={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function I(U){return $[U]??null}let D={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},X={nan:"NaN",number:"število",array:"tabela"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Neveljaven vnos: pričakovano instanceof ${U.expected}, prejeto ${A}`;return`Neveljaven vnos: pričakovano ${Q}, prejeto ${A}`}case"invalid_value":if(U.values.length===1)return`Neveljaven vnos: pričakovano ${c$(U.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} imelo ${Q}${U.maximum.toString()} ${J.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${U.origin??"vrednost"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Premajhno: pričakovano, da bo ${U.origin} imelo ${Q}${U.minimum.toString()} ${J.unit}`;return`Premajhno: pričakovano, da bo ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Neveljaven niz: mora se začeti z "${Q.prefix}"`;if(Q.format==="ends_with")return`Neveljaven niz: mora se končati z "${Q.suffix}"`;if(Q.format==="includes")return`Neveljaven niz: mora vsebovati "${Q.includes}"`;if(Q.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${Q.pattern}`;return`Neveljaven ${D[Q.format]??U.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${U.divisor}`;case"unrecognized_keys":return`Neprepoznan${U.keys.length>1?"i ključi":" ključ"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${U.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${U.origin}`;default:return"Neveljaven vnos"}}};function yO(){return{localeError:VS()}}var WS=()=>{let $={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function I(U){return $[U]??null}let D={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},X={nan:"NaN",number:"antal",array:"lista"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ogiltig inmatning: förväntat instanceof ${U.expected}, fick ${A}`;return`Ogiltig inmatning: förväntat ${Q}, fick ${A}`}case"invalid_value":if(U.values.length===1)return`Ogiltig inmatning: förväntat ${c$(U.values[0])}`;return`Ogiltigt val: förväntade en av ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`För stor(t): förväntade ${U.origin??"värdet"} att ha ${Q}${U.maximum.toString()} ${J.unit??"element"}`;return`För stor(t): förväntat ${U.origin??"värdet"} att ha ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${Q}${U.minimum.toString()} ${J.unit}`;return`För lite(t): förväntade ${U.origin??"värdet"} att ha ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ogiltig sträng: måste börja med "${Q.prefix}"`;if(Q.format==="ends_with")return`Ogiltig sträng: måste sluta med "${Q.suffix}"`;if(Q.format==="includes")return`Ogiltig sträng: måste innehålla "${Q.includes}"`;if(Q.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${Q.pattern}"`;return`Ogiltig(t) ${D[Q.format]??U.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${U.divisor}`;case"unrecognized_keys":return`${U.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${U.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${U.origin??"värdet"}`;default:return"Ogiltig input"}}};function uO(){return{localeError:WS()}}var KS=()=>{let $={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function I(U){return $[U]??null}let D={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},X={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${U.expected}, பெறப்பட்டது ${A}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Q}, பெறப்பட்டது ${A}`}case"invalid_value":if(U.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${c$(U.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Q$(U.values,"|")} இல் ஒன்று`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${Q}${U.maximum.toString()} ${J.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${U.origin??"மதிப்பு"} ${Q}${U.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${Q}${U.minimum.toString()} ${J.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${U.origin} ${Q}${U.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`தவறான சரம்: "${Q.prefix}" இல் தொடங்க வேண்டும்`;if(Q.format==="ends_with")return`தவறான சரம்: "${Q.suffix}" இல் முடிவடைய வேண்டும்`;if(Q.format==="includes")return`தவறான சரம்: "${Q.includes}" ஐ உள்ளடக்க வேண்டும்`;if(Q.format==="regex")return`தவறான சரம்: ${Q.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${D[Q.format]??U.format}`}case"not_multiple_of":return`தவறான எண்: ${U.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${U.keys.length>1?"கள்":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${U.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function hO(){return{localeError:KS()}}var zS=()=>{let $={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function I(U){return $[U]??null}let D={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},X={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${U.expected} แต่ได้รับ ${A}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${Q} แต่ได้รับ ${A}`}case"invalid_value":if(U.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${c$(U.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"ไม่เกิน":"น้อยกว่า",J=I(U.origin);if(J)return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${Q} ${U.maximum.toString()} ${J.unit??"รายการ"}`;return`เกินกำหนด: ${U.origin??"ค่า"} ควรมี${Q} ${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?"อย่างน้อย":"มากกว่า",J=I(U.origin);if(J)return`น้อยกว่ากำหนด: ${U.origin} ควรมี${Q} ${U.minimum.toString()} ${J.unit}`;return`น้อยกว่ากำหนด: ${U.origin} ควรมี${Q} ${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${Q.prefix}"`;if(Q.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${Q.suffix}"`;if(Q.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${Q.includes}" อยู่ในข้อความ`;if(Q.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${Q.pattern}`;return`รูปแบบไม่ถูกต้อง: ${D[Q.format]??U.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${U.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${Q$(U.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${U.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${U.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function pO(){return{localeError:zS()}}var SS=()=>{let $={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function I(U){return $[U]??null}let D={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Geçersiz değer: beklenen instanceof ${U.expected}, alınan ${A}`;return`Geçersiz değer: beklenen ${Q}, alınan ${A}`}case"invalid_value":if(U.values.length===1)return`Geçersiz değer: beklenen ${c$(U.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Çok büyük: beklenen ${U.origin??"değer"} ${Q}${U.maximum.toString()} ${J.unit??"öğe"}`;return`Çok büyük: beklenen ${U.origin??"değer"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Çok küçük: beklenen ${U.origin} ${Q}${U.minimum.toString()} ${J.unit}`;return`Çok küçük: beklenen ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Geçersiz metin: "${Q.prefix}" ile başlamalı`;if(Q.format==="ends_with")return`Geçersiz metin: "${Q.suffix}" ile bitmeli`;if(Q.format==="includes")return`Geçersiz metin: "${Q.includes}" içermeli`;if(Q.format==="regex")return`Geçersiz metin: ${Q.pattern} desenine uymalı`;return`Geçersiz ${D[Q.format]??U.format}`}case"not_multiple_of":return`Geçersiz sayı: ${U.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${U.keys.length>1?"lar":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${U.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function lO(){return{localeError:SS()}}var AS=()=>{let $={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function I(U){return $[U]??null}let D={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},X={nan:"NaN",number:"число",array:"масив"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Неправильні вхідні дані: очікується instanceof ${U.expected}, отримано ${A}`;return`Неправильні вхідні дані: очікується ${Q}, отримано ${A}`}case"invalid_value":if(U.values.length===1)return`Неправильні вхідні дані: очікується ${c$(U.values[0])}`;return`Неправильна опція: очікується одне з ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Занадто велике: очікується, що ${U.origin??"значення"} ${J.verb} ${Q}${U.maximum.toString()} ${J.unit??"елементів"}`;return`Занадто велике: очікується, що ${U.origin??"значення"} буде ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Занадто мале: очікується, що ${U.origin} ${J.verb} ${Q}${U.minimum.toString()} ${J.unit}`;return`Занадто мале: очікується, що ${U.origin} буде ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Неправильний рядок: повинен починатися з "${Q.prefix}"`;if(Q.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${Q.suffix}"`;if(Q.format==="includes")return`Неправильний рядок: повинен містити "${Q.includes}"`;if(Q.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${Q.pattern}`;return`Неправильний ${D[Q.format]??U.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${U.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${U.keys.length>1?"і":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${U.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${U.origin}`;default:return"Неправильні вхідні дані"}}};function v6(){return{localeError:AS()}}function bO(){return v6()}var FS=()=>{let $={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function I(U){return $[U]??null}let D={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},X={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`غلط ان پٹ: instanceof ${U.expected} متوقع تھا، ${A} موصول ہوا`;return`غلط ان پٹ: ${Q} متوقع تھا، ${A} موصول ہوا`}case"invalid_value":if(U.values.length===1)return`غلط ان پٹ: ${c$(U.values[0])} متوقع تھا`;return`غلط آپشن: ${Q$(U.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`بہت بڑا: ${U.origin??"ویلیو"} کے ${Q}${U.maximum.toString()} ${J.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${U.origin??"ویلیو"} کا ${Q}${U.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`بہت چھوٹا: ${U.origin} کے ${Q}${U.minimum.toString()} ${J.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${U.origin} کا ${Q}${U.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`غلط سٹرنگ: "${Q.prefix}" سے شروع ہونا چاہیے`;if(Q.format==="ends_with")return`غلط سٹرنگ: "${Q.suffix}" پر ختم ہونا چاہیے`;if(Q.format==="includes")return`غلط سٹرنگ: "${Q.includes}" شامل ہونا چاہیے`;if(Q.format==="regex")return`غلط سٹرنگ: پیٹرن ${Q.pattern} سے میچ ہونا چاہیے`;return`غلط ${D[Q.format]??U.format}`}case"not_multiple_of":return`غلط نمبر: ${U.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${U.keys.length>1?"ز":""}: ${Q$(U.keys,"، ")}`;case"invalid_key":return`${U.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${U.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function rO(){return{localeError:FS()}}var HS=()=>{let $={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function I(U){return $[U]??null}let D={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},X={nan:"NaN",number:"raqam",array:"massiv"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${U.expected}, qabul qilingan ${A}`;return`Noto‘g‘ri kirish: kutilgan ${Q}, qabul qilingan ${A}`}case"invalid_value":if(U.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${c$(U.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Juda katta: kutilgan ${U.origin??"qiymat"} ${Q}${U.maximum.toString()} ${J.unit} ${J.verb}`;return`Juda katta: kutilgan ${U.origin??"qiymat"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Juda kichik: kutilgan ${U.origin} ${Q}${U.minimum.toString()} ${J.unit} ${J.verb}`;return`Juda kichik: kutilgan ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Noto‘g‘ri satr: "${Q.prefix}" bilan boshlanishi kerak`;if(Q.format==="ends_with")return`Noto‘g‘ri satr: "${Q.suffix}" bilan tugashi kerak`;if(Q.format==="includes")return`Noto‘g‘ri satr: "${Q.includes}" ni o‘z ichiga olishi kerak`;if(Q.format==="regex")return`Noto‘g‘ri satr: ${Q.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${D[Q.format]??U.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${U.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${U.keys.length>1?"lar":""}: ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${U.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function oO(){return{localeError:HS()}}var ZS=()=>{let $={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function I(U){return $[U]??null}let D={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},X={nan:"NaN",number:"số",array:"mảng"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${U.expected}, nhận được ${A}`;return`Đầu vào không hợp lệ: mong đợi ${Q}, nhận được ${A}`}case"invalid_value":if(U.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${c$(U.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${J.verb} ${Q}${U.maximum.toString()} ${J.unit??"phần tử"}`;return`Quá lớn: mong đợi ${U.origin??"giá trị"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Quá nhỏ: mong đợi ${U.origin} ${J.verb} ${Q}${U.minimum.toString()} ${J.unit}`;return`Quá nhỏ: mong đợi ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${Q.prefix}"`;if(Q.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${Q.suffix}"`;if(Q.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${Q.includes}"`;if(Q.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${Q.pattern}`;return`${D[Q.format]??U.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${U.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${Q$(U.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${U.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${U.origin}`;default:return"Đầu vào không hợp lệ"}}};function nO(){return{localeError:ZS()}}var LS=()=>{let $={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function I(U){return $[U]??null}let D={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},X={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`无效输入:期望 instanceof ${U.expected},实际接收 ${A}`;return`无效输入:期望 ${Q},实际接收 ${A}`}case"invalid_value":if(U.values.length===1)return`无效输入:期望 ${c$(U.values[0])}`;return`无效选项:期望以下之一 ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`数值过大:期望 ${U.origin??"值"} ${Q}${U.maximum.toString()} ${J.unit??"个元素"}`;return`数值过大:期望 ${U.origin??"值"} ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`数值过小:期望 ${U.origin} ${Q}${U.minimum.toString()} ${J.unit}`;return`数值过小:期望 ${U.origin} ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`无效字符串:必须以 "${Q.prefix}" 开头`;if(Q.format==="ends_with")return`无效字符串:必须以 "${Q.suffix}" 结尾`;if(Q.format==="includes")return`无效字符串:必须包含 "${Q.includes}"`;if(Q.format==="regex")return`无效字符串:必须满足正则表达式 ${Q.pattern}`;return`无效${D[Q.format]??U.format}`}case"not_multiple_of":return`无效数字:必须是 ${U.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${Q$(U.keys,", ")}`;case"invalid_key":return`${U.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${U.origin} 中包含无效值(value)`;default:return"无效输入"}}};function dO(){return{localeError:LS()}}var ES=()=>{let $={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function I(U){return $[U]??null}let D={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},X={nan:"NaN"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`無效的輸入值:預期為 instanceof ${U.expected},但收到 ${A}`;return`無效的輸入值:預期為 ${Q},但收到 ${A}`}case"invalid_value":if(U.values.length===1)return`無效的輸入值:預期為 ${c$(U.values[0])}`;return`無效的選項:預期為以下其中之一 ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`數值過大:預期 ${U.origin??"值"} 應為 ${Q}${U.maximum.toString()} ${J.unit??"個元素"}`;return`數值過大:預期 ${U.origin??"值"} 應為 ${Q}${U.maximum.toString()}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`數值過小:預期 ${U.origin} 應為 ${Q}${U.minimum.toString()} ${J.unit}`;return`數值過小:預期 ${U.origin} 應為 ${Q}${U.minimum.toString()}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`無效的字串:必須以 "${Q.prefix}" 開頭`;if(Q.format==="ends_with")return`無效的字串:必須以 "${Q.suffix}" 結尾`;if(Q.format==="includes")return`無效的字串:必須包含 "${Q.includes}"`;if(Q.format==="regex")return`無效的字串:必須符合格式 ${Q.pattern}`;return`無效的 ${D[Q.format]??U.format}`}case"not_multiple_of":return`無效的數字:必須為 ${U.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${U.keys.length>1?"們":""}:${Q$(U.keys,"、")}`;case"invalid_key":return`${U.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${U.origin} 中有無效的值`;default:return"無效的輸入值"}}};function mO(){return{localeError:ES()}}var TS=()=>{let $={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function I(U){return $[U]??null}let D={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},X={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(U)=>{switch(U.code){case"invalid_type":{let Q=X[U.expected]??U.expected,J=f$(U.input),A=X[J]??J;if(/^[A-Z]/.test(U.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${U.expected}, àmọ̀ a rí ${A}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${Q}, àmọ̀ a rí ${A}`}case"invalid_value":if(U.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${c$(U.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${Q$(U.values,"|")}`;case"too_big":{let Q=U.inclusive?"<=":"<",J=I(U.origin);if(J)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${U.origin??"iye"} ${J.verb} ${Q}${U.maximum} ${J.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${Q}${U.maximum}`}case"too_small":{let Q=U.inclusive?">=":">",J=I(U.origin);if(J)return`Kéré ju: a ní láti jẹ́ pé ${U.origin} ${J.verb} ${Q}${U.minimum} ${J.unit}`;return`Kéré ju: a ní láti jẹ́ ${Q}${U.minimum}`}case"invalid_format":{let Q=U;if(Q.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${Q.prefix}"`;if(Q.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${Q.suffix}"`;if(Q.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${Q.includes}"`;if(Q.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${Q.pattern}`;return`Aṣìṣe: ${D[Q.format]??U.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${U.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${Q$(U.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${U.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${U.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function tO(){return{localeError:TS()}}var KG,iO=Symbol("ZodOutput"),eO=Symbol("ZodInput");class aO{constructor(){this._map=new WeakMap,this._idmap=new Map}add($,...I){let D=I[0];if(this._map.set($,D),D&&typeof D==="object"&&"id"in D)this._idmap.set(D.id,$);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove($){let I=this._map.get($);if(I&&typeof I==="object"&&"id"in I)this._idmap.delete(I.id);return this._map.delete($),this}get($){let I=$._zod.parent;if(I){let D={...this.get(I)??{}};delete D.id;let X={...D,...this._map.get($)};return Object.keys(X).length?X:void 0}return this._map.get($)}has($){return this._map.has($)}}function Dv(){return new aO}(KG=globalThis).__zod_globalRegistry??(KG.__zod_globalRegistry=Dv());var x0=globalThis.__zod_globalRegistry;function sO($,I){return new $({type:"string",...u$(I)})}function $J($,I){return new $({type:"string",coerce:!0,...u$(I)})}function Ov($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...u$(I)})}function O6($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...u$(I)})}function Jv($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...u$(I)})}function Xv($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...u$(I)})}function Qv($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...u$(I)})}function Yv($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...u$(I)})}function J6($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...u$(I)})}function Gv($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...u$(I)})}function Vv($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...u$(I)})}function Wv($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...u$(I)})}function Kv($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...u$(I)})}function zv($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...u$(I)})}function Sv($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...u$(I)})}function Av($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...u$(I)})}function Fv($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...u$(I)})}function Hv($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...u$(I)})}function UJ($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...u$(I)})}function Zv($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...u$(I)})}function Lv($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...u$(I)})}function Ev($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...u$(I)})}function Tv($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...u$(I)})}function Mv($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...u$(I)})}function Pv($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...u$(I)})}var IJ={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function vJ($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...u$(I)})}function DJ($,I){return new $({type:"string",format:"date",check:"string_format",...u$(I)})}function OJ($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...u$(I)})}function JJ($,I){return new $({type:"string",format:"duration",check:"string_format",...u$(I)})}function XJ($,I){return new $({type:"number",checks:[],...u$(I)})}function QJ($,I){return new $({type:"number",coerce:!0,checks:[],...u$(I)})}function YJ($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...u$(I)})}function GJ($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...u$(I)})}function VJ($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...u$(I)})}function WJ($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...u$(I)})}function KJ($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...u$(I)})}function zJ($,I){return new $({type:"boolean",...u$(I)})}function SJ($,I){return new $({type:"boolean",coerce:!0,...u$(I)})}function AJ($,I){return new $({type:"bigint",...u$(I)})}function FJ($,I){return new $({type:"bigint",coerce:!0,...u$(I)})}function HJ($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...u$(I)})}function ZJ($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...u$(I)})}function LJ($,I){return new $({type:"symbol",...u$(I)})}function EJ($,I){return new $({type:"undefined",...u$(I)})}function TJ($,I){return new $({type:"null",...u$(I)})}function MJ($){return new $({type:"any"})}function PJ($){return new $({type:"unknown"})}function qJ($,I){return new $({type:"never",...u$(I)})}function RJ($,I){return new $({type:"void",...u$(I)})}function gJ($,I){return new $({type:"date",...u$(I)})}function kJ($,I){return new $({type:"date",coerce:!0,...u$(I)})}function CJ($,I){return new $({type:"nan",...u$(I)})}function QU($,I){return new n6({check:"less_than",...u$(I),value:$,inclusive:!1})}function a0($,I){return new n6({check:"less_than",...u$(I),value:$,inclusive:!0})}function YU($,I){return new d6({check:"greater_than",...u$(I),value:$,inclusive:!1})}function u0($,I){return new d6({check:"greater_than",...u$(I),value:$,inclusive:!0})}function qv($){return YU(0,$)}function Rv($){return QU(0,$)}function gv($){return a0(0,$)}function kv($){return u0(0,$)}function kU($,I){return new C1({check:"multiple_of",...u$(I),value:$})}function CU($,I){return new N1({check:"max_size",...u$(I),maximum:$})}function GU($,I){return new B1({check:"min_size",...u$(I),minimum:$})}function rU($,I){return new x1({check:"size_equals",...u$(I),size:$})}function oU($,I){return new w1({check:"max_length",...u$(I),maximum:$})}function FU($,I){return new c1({check:"min_length",...u$(I),minimum:$})}function nU($,I){return new f1({check:"length_equals",...u$(I),length:$})}function GI($,I){return new y1({check:"string_format",format:"regex",...u$(I),pattern:$})}function VI($){return new u1({check:"string_format",format:"lowercase",...u$($)})}function WI($){return new h1({check:"string_format",format:"uppercase",...u$($)})}function KI($,I){return new p1({check:"string_format",format:"includes",...u$(I),includes:$})}function zI($,I){return new l1({check:"string_format",format:"starts_with",...u$(I),prefix:$})}function SI($,I){return new b1({check:"string_format",format:"ends_with",...u$(I),suffix:$})}function Cv($,I,D){return new r1({check:"property",property:$,schema:I,...u$(D)})}function AI($,I){return new o1({check:"mime_type",mime:$,...u$(I)})}function OU($){return new n1({check:"overwrite",tx:$})}function FI($){return OU((I)=>I.normalize($))}function HI(){return OU(($)=>$.trim())}function ZI(){return OU(($)=>$.toLowerCase())}function LI(){return OU(($)=>$.toUpperCase())}function EI(){return OU(($)=>r4($))}function _J($,I,D){return new $({type:"array",element:I,...u$(D)})}function PS($,I,D){return new $({type:"union",options:I,...u$(D)})}function qS($,I,D){return new $({type:"union",options:I,inclusive:!1,...u$(D)})}function RS($,I,D,X){return new $({type:"union",options:D,discriminator:I,...u$(X)})}function gS($,I,D){return new $({type:"intersection",left:I,right:D})}function kS($,I,D,X){let U=D instanceof o$;return new $({type:"tuple",items:I,rest:U?D:null,...u$(U?X:D)})}function CS($,I,D,X){return new $({type:"record",keyType:I,valueType:D,...u$(X)})}function _S($,I,D,X){return new $({type:"map",keyType:I,valueType:D,...u$(X)})}function jS($,I,D){return new $({type:"set",valueType:I,...u$(D)})}function NS($,I,D){let X=Array.isArray(I)?Object.fromEntries(I.map((U)=>[U,U])):I;return new $({type:"enum",entries:X,...u$(D)})}function BS($,I,D){return new $({type:"enum",entries:I,...u$(D)})}function xS($,I,D){return new $({type:"literal",values:Array.isArray(I)?I:[I],...u$(D)})}function jJ($,I){return new $({type:"file",...u$(I)})}function wS($,I){return new $({type:"transform",transform:I})}function cS($,I){return new $({type:"optional",innerType:I})}function fS($,I){return new $({type:"nullable",innerType:I})}function yS($,I,D){return new $({type:"default",innerType:I,get defaultValue(){return typeof D==="function"?D():n4(D)}})}function uS($,I,D){return new $({type:"nonoptional",innerType:I,...u$(D)})}function hS($,I){return new $({type:"success",innerType:I})}function pS($,I,D){return new $({type:"catch",innerType:I,catchValue:typeof D==="function"?D:()=>D})}function lS($,I,D){return new $({type:"pipe",in:I,out:D})}function bS($,I){return new $({type:"readonly",innerType:I})}function rS($,I,D){return new $({type:"template_literal",parts:I,...u$(D)})}function oS($,I){return new $({type:"lazy",getter:I})}function nS($,I){return new $({type:"promise",innerType:I})}function NJ($,I,D){let X=u$(D);return X.abort??(X.abort=!0),new $({type:"custom",check:"custom",fn:I,...X})}function BJ($,I,D){return new $({type:"custom",check:"custom",fn:I,...u$(D)})}function xJ($){let I=zG((D)=>{return D.addIssue=(X)=>{if(typeof X==="string")D.issues.push(vI(X,D.value,I._zod.def));else{let U=X;if(U.fatal)U.continue=!1;U.code??(U.code="custom"),U.input??(U.input=D.value),U.inst??(U.inst=I),U.continue??(U.continue=!I._zod.def.abort),D.issues.push(vI(U))}},$(D.value,D)});return I}function zG($,I){let D=new D0({check:"custom",...u$(I)});return D._zod.check=$,D}function wJ($){let I=new D0({check:"describe"});return I._zod.onattach=[(D)=>{let X=x0.get(D)??{};x0.add(D,{...X,description:$})}],I._zod.check=()=>{},I}function cJ($){let I=new D0({check:"meta"});return I._zod.onattach=[(D)=>{let X=x0.get(D)??{};x0.add(D,{...X,...$})}],I._zod.check=()=>{},I}function fJ($,I){let D=u$(I),X=D.truthy??["true","1","yes","on","y","enabled"],U=D.falsy??["false","0","no","off","n","disabled"];if(D.case!=="sensitive")X=X.map((P)=>typeof P==="string"?P.toLowerCase():P),U=U.map((P)=>typeof P==="string"?P.toLowerCase():P);let Q=new Set(X),J=new Set(U),A=$.Codec??sI,T=$.Boolean??eI,L=new($.String??bU)({type:"string",error:D.error}),F=new T({type:"boolean",error:D.error}),E=new A({type:"pipe",in:L,out:F,transform:(P,R)=>{let k=P;if(D.case!=="sensitive")k=k.toLowerCase();if(Q.has(k))return!0;else if(J.has(k))return!1;else return R.issues.push({code:"invalid_value",expected:"stringbool",values:[...Q,...J],input:R.value,inst:E,continue:!1}),{}},reverseTransform:(P,R)=>{if(P===!0)return X[0]||"true";else return U[0]||"false"},error:D.error});return E}function TI($,I,D,X={}){let U=u$(X),Q={...u$(X),check:"string_format",type:"string",format:I,fn:typeof D==="function"?D:(A)=>D.test(A),...U};if(D instanceof RegExp)Q.pattern=D;return new $(Q)}function _U($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??x0,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,cycles:$?.cycles??"ref",reused:$?.reused??"inline",external:$?.external??void 0}}function a$($,I,D={path:[],schemaPath:[]}){var X;let U=$._zod.def,Q=I.seen.get($);if(Q){if(Q.count++,D.schemaPath.includes($))Q.cycle=D.path;return Q.schema}let J={schema:{},count:1,cycle:void 0,path:D.path};I.seen.set($,J);let A=$._zod.toJSONSchema?.();if(A)J.schema=A;else{let L={...D,schemaPath:[...D.schemaPath,$],path:D.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,J.schema,L);else{let E=J.schema,P=I.processors[U.type];if(!P)throw Error(`[toJSONSchema]: Non-representable type encountered: ${U.type}`);P($,I,E,L)}let F=$._zod.parent;if(F){if(!J.ref)J.ref=F;a$(F,I,L),I.seen.get(F).isParent=!0}}let T=I.metadataRegistry.get($);if(T)Object.assign(J.schema,T);if(I.io==="input"&&h0($))delete J.schema.examples,delete J.schema.default;if(I.io==="input"&&J.schema._prefault)(X=J.schema).default??(X.default=J.schema._prefault);return delete J.schema._prefault,I.seen.get($).schema}function jU($,I){let D=$.seen.get(I);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=new Map;for(let J of $.seen.entries()){let A=$.metadataRegistry.get(J[0])?.id;if(A){let T=X.get(A);if(T&&T!==J[0])throw Error(`Duplicate schema id "${A}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);X.set(A,J[0])}}let U=(J)=>{let A=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let F=$.external.registry.get(J[0])?.id,E=$.external.uri??((R)=>R);if(F)return{ref:E(F)};let P=J[1].defId??J[1].schema.id??`schema${$.counter++}`;return J[1].defId=P,{defId:P,ref:`${E("__shared")}#/${A}/${P}`}}if(J[1]===D)return{ref:"#"};let Z=`${"#"}/${A}/`,L=J[1].schema.id??`__schema${$.counter++}`;return{defId:L,ref:Z+L}},Q=(J)=>{if(J[1].schema.$ref)return;let A=J[1],{ref:T,defId:Z}=U(J);if(A.def={...A.schema},Z)A.defId=Z;let L=A.schema;for(let F in L)delete L[F];L.$ref=T};if($.cycles==="throw")for(let J of $.seen.entries()){let A=J[1];if(A.cycle)throw Error(`Cycle detected: #/${A.cycle?.join("/")}/<root>
39
58
 
40
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let L of this.seen.entries()){let E=L[1];if($===L[0]){S(L);continue}if(J.external){let Z=J.external.registry.get(L[0])?.id;if($!==L[0]&&Z){S(L);continue}}if(this.metadataRegistry.get(L[0])?.id){S(L);continue}if(E.cycle){S(L);continue}if(E.count>1){if(J.reused==="ref"){S(L);continue}}}let Y=(L,E)=>{let F=this.seen.get(L),Z=F.def??F.schema,P={...Z};if(F.ref===null)return;let q=F.ref;if(F.ref=null,q){Y(q,E);let k=this.seen.get(q).schema;if(k.$ref&&(E.target==="draft-7"||E.target==="draft-4"))Z.allOf=Z.allOf??[],Z.allOf.push(k);else Object.assign(Z,k),Object.assign(Z,P)}if(!F.isParent)this.override({zodSchema:L,jsonSchema:Z,path:F.path??[]})};for(let L of[...this.seen.entries()].reverse())Y(L[0],{target:this.target});let M={};if(this.target==="draft-2020-12")M.$schema="https://json-schema.org/draft/2020-12/schema";else if(this.target==="draft-7")M.$schema="http://json-schema.org/draft-07/schema#";else if(this.target==="draft-4")M.$schema="http://json-schema.org/draft-04/schema#";else console.warn(`Invalid target: ${this.target}`);if(J.external?.uri){let L=J.external.registry.get($)?.id;if(!L)throw Error("Schema is missing an `id` property");M.$id=J.external.uri(L)}Object.assign(M,V.def);let T=J.external?.defs??{};for(let L of this.seen.entries()){let E=L[1];if(E.def&&E.defId)T[E.defId]=E.def}if(J.external);else if(Object.keys(T).length>0)if(this.target==="draft-2020-12")M.$defs=T;else M.definitions=T;try{return JSON.parse(JSON.stringify(M))}catch(L){throw Error("Error converting schema to JSON.")}}}function AJ($,U){if($ instanceof vI){let V=new pO(U),I={};for(let M of $._idmap.entries()){let[T,L]=M;V.process(L)}let S={},Y={registry:$,uri:U?.uri,defs:I};for(let M of $._idmap.entries()){let[T,L]=M;S[T]=V.emit(L,{...U,external:Y})}if(Object.keys(I).length>0){let M=V.target==="draft-2020-12"?"$defs":"definitions";S.__shared={[M]:I}}return{schemas:S}}let J=new pO(U);return J.process($),J.emit($,U)}function T$($,U){let J=U??{seen:new Set};if(J.seen.has($))return!1;J.seen.add($);let I=$._zod.def;switch(I.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return T$(I.element,J);case"object":{for(let S in I.shape)if(T$(I.shape[S],J))return!0;return!1}case"union":{for(let S of I.options)if(T$(S,J))return!0;return!1}case"intersection":return T$(I.left,J)||T$(I.right,J);case"tuple":{for(let S of I.items)if(T$(S,J))return!0;if(I.rest&&T$(I.rest,J))return!0;return!1}case"record":return T$(I.keyType,J)||T$(I.valueType,J);case"map":return T$(I.keyType,J)||T$(I.valueType,J);case"set":return T$(I.valueType,J);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return T$(I.innerType,J);case"lazy":return T$(I.getter(),J);case"default":return T$(I.innerType,J);case"prefault":return T$(I.innerType,J);case"custom":return!1;case"transform":return!0;case"pipe":return T$(I.in,J)||T$(I.out,J);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${I.type}`)}var xY={};var nO={};d$(nO,{time:()=>LJ,duration:()=>EJ,datetime:()=>HJ,date:()=>FJ,ZodISOTime:()=>oO,ZodISODuration:()=>rO,ZodISODateTime:()=>bO,ZodISODate:()=>lO});var bO=O0("ZodISODateTime",($,U)=>{m1.init($,U),$$.init($,U)});function HJ($){return j4(bO,$)}var lO=O0("ZodISODate",($,U)=>{d1.init($,U),$$.init($,U)});function FJ($){return _4(lO,$)}var oO=O0("ZodISOTime",($,U)=>{t1.init($,U),$$.init($,U)});function LJ($){return N4(oO,$)}var rO=O0("ZodISODuration",($,U)=>{i1.init($,U),$$.init($,U)});function EJ($){return x4(rO,$)}var cY=($,U)=>{DI.init($,U),$.name="ZodError",Object.defineProperties($,{format:{value:(J)=>KI($,J)},flatten:{value:(J)=>zI($,J)},addIssue:{value:(J)=>{$.issues.push(J),$.message=JSON.stringify($.issues,hU,2)}},addIssues:{value:(J)=>{$.issues.push(...J),$.message=JSON.stringify($.issues,hU,2)}},isEmpty:{get(){return $.issues.length===0}}})},ID=O0("ZodError",cY),tU=O0("ZodError",cY,{Parent:Error});var ZJ=OO(tU),vJ=JO(tU),MJ=YO(tU),PJ=GO(tU);var n0=O0("ZodType",($,U)=>{return l0.init($,U),$.def=U,Object.defineProperty($,"_def",{value:U}),$.check=(...J)=>{return $.clone({...U,checks:[...U.checks??[],...J.map((V)=>typeof V==="function"?{_zod:{check:V,def:{check:"custom"},onattach:[]}}:V)]})},$.clone=(J,V)=>w$($,J,V),$.brand=()=>$,$.register=(J,V)=>{return J.add($,V),$},$.parse=(J,V)=>ZJ($,J,V,{callee:$.parse}),$.safeParse=(J,V)=>MJ($,J,V),$.parseAsync=async(J,V)=>vJ($,J,V,{callee:$.parseAsync}),$.safeParseAsync=async(J,V)=>PJ($,J,V),$.spa=$.safeParseAsync,$.refine=(J,V)=>$.check(ZG(J,V)),$.superRefine=(J)=>$.check(vG(J)),$.overwrite=(J)=>$.check(YU(J)),$.optional=()=>tO($),$.nullable=()=>iO($),$.nullish=()=>tO(iO($)),$.nonoptional=(J)=>VG($,J),$.array=()=>mJ($),$.or=(J)=>tJ([$,J]),$.and=(J)=>tY($,J),$.transform=(J)=>eO($,aJ(J)),$.default=(J)=>QG($,J),$.prefault=(J)=>GG($,J),$.catch=(J)=>DG($,J),$.pipe=(J)=>eO($,J),$.readonly=()=>AG($),$.describe=(J)=>{let V=$.clone();return a$.add(V,{description:J}),V},Object.defineProperty($,"description",{get(){return a$.get($)?.description},configurable:!0}),$.meta=(...J)=>{if(J.length===0)return a$.get($);let V=$.clone();return a$.add(V,J[0]),V},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$}),RJ=O0("_ZodString",($,U)=>{kU.init($,U),n0.init($,U);let J=$._zod.bag;$.format=J.format??null,$.minLength=J.minimum??null,$.maxLength=J.maximum??null,$.regex=(...V)=>$.check(TI(...V)),$.includes=(...V)=>$.check(CI(...V)),$.startsWith=(...V)=>$.check(kI(...V)),$.endsWith=(...V)=>$.check(gI(...V)),$.min=(...V)=>$.check(FU(...V)),$.max=(...V)=>$.check(mU(...V)),$.length=(...V)=>$.check(dU(...V)),$.nonempty=(...V)=>$.check(FU(1,...V)),$.lowercase=(V)=>$.check(qI(V)),$.uppercase=(V)=>$.check(RI(V)),$.trim=()=>$.check(NI()),$.normalize=(...V)=>$.check(_I(...V)),$.toLowerCase=()=>$.check(xI()),$.toUpperCase=()=>$.check(BI())}),fI=O0("ZodString",($,U)=>{kU.init($,U),RJ.init($,U),$.email=(J)=>$.check(EO(CJ,J)),$.url=(J)=>$.check(TO(kJ,J)),$.jwt=(J)=>$.check(hO(lJ,J)),$.emoji=(J)=>$.check(qO(gJ,J)),$.guid=(J)=>$.check(MI(mO,J)),$.uuid=(J)=>$.check(ZO(VU,J)),$.uuidv4=(J)=>$.check(vO(VU,J)),$.uuidv6=(J)=>$.check(MO(VU,J)),$.uuidv7=(J)=>$.check(PO(VU,J)),$.nanoid=(J)=>$.check(RO(jJ,J)),$.guid=(J)=>$.check(MI(mO,J)),$.cuid=(J)=>$.check(CO(_J,J)),$.cuid2=(J)=>$.check(kO(NJ,J)),$.ulid=(J)=>$.check(gO(xJ,J)),$.base64=(J)=>$.check(wO(uJ,J)),$.base64url=(J)=>$.check(fO(pJ,J)),$.xid=(J)=>$.check(jO(BJ,J)),$.ksuid=(J)=>$.check(_O(cJ,J)),$.ipv4=(J)=>$.check(NO(wJ,J)),$.ipv6=(J)=>$.check(xO(fJ,J)),$.cidrv4=(J)=>$.check(BO(yJ,J)),$.cidrv6=(J)=>$.check(cO(hJ,J)),$.e164=(J)=>$.check(yO(bJ,J)),$.datetime=(J)=>$.check(HJ(J)),$.date=(J)=>$.check(FJ(J)),$.time=(J)=>$.check(LJ(J)),$.duration=(J)=>$.check(EJ(J))});function TJ($){return C4(fI,$)}var $$=O0("ZodStringFormat",($,U)=>{s0.init($,U),RJ.init($,U)}),CJ=O0("ZodEmail",($,U)=>{y1.init($,U),$$.init($,U)});function XD($){return EO(CJ,$)}var mO=O0("ZodGUID",($,U)=>{w1.init($,U),$$.init($,U)});function JD($){return MI(mO,$)}var VU=O0("ZodUUID",($,U)=>{f1.init($,U),$$.init($,U)});function QD($){return ZO(VU,$)}function YD($){return vO(VU,$)}function GD($){return MO(VU,$)}function VD($){return PO(VU,$)}var kJ=O0("ZodURL",($,U)=>{h1.init($,U),$$.init($,U)});function SD($){return TO(kJ,$)}var gJ=O0("ZodEmoji",($,U)=>{u1.init($,U),$$.init($,U)});function WD($){return qO(gJ,$)}var jJ=O0("ZodNanoID",($,U)=>{p1.init($,U),$$.init($,U)});function DD($){return RO(jJ,$)}var _J=O0("ZodCUID",($,U)=>{b1.init($,U),$$.init($,U)});function zD($){return CO(_J,$)}var NJ=O0("ZodCUID2",($,U)=>{l1.init($,U),$$.init($,U)});function KD($){return kO(NJ,$)}var xJ=O0("ZodULID",($,U)=>{o1.init($,U),$$.init($,U)});function AD($){return gO(xJ,$)}var BJ=O0("ZodXID",($,U)=>{r1.init($,U),$$.init($,U)});function HD($){return jO(BJ,$)}var cJ=O0("ZodKSUID",($,U)=>{n1.init($,U),$$.init($,U)});function FD($){return _O(cJ,$)}var wJ=O0("ZodIPv4",($,U)=>{e1.init($,U),$$.init($,U)});function LD($){return NO(wJ,$)}var fJ=O0("ZodIPv6",($,U)=>{a1.init($,U),$$.init($,U)});function ED($){return xO(fJ,$)}var yJ=O0("ZodCIDRv4",($,U)=>{s1.init($,U),$$.init($,U)});function ZD($){return BO(yJ,$)}var hJ=O0("ZodCIDRv6",($,U)=>{$X.init($,U),$$.init($,U)});function vD($){return cO(hJ,$)}var uJ=O0("ZodBase64",($,U)=>{IX.init($,U),$$.init($,U)});function MD($){return wO(uJ,$)}var pJ=O0("ZodBase64URL",($,U)=>{OX.init($,U),$$.init($,U)});function PD($){return fO(pJ,$)}var bJ=O0("ZodE164",($,U)=>{XX.init($,U),$$.init($,U)});function TD($){return yO(bJ,$)}var lJ=O0("ZodJWT",($,U)=>{JX.init($,U),$$.init($,U)});function qD($){return hO(lJ,$)}var oJ=O0("ZodCustomStringFormat",($,U)=>{QX.init($,U),$$.init($,U)});function RD($,U,J={}){return uO(oJ,$,U,J)}function CD($){return uO(oJ,"hostname",XU.hostname,$)}var yI=O0("ZodNumber",($,U)=>{AO.init($,U),n0.init($,U),$.gt=(V,I)=>$.check(QU(V,I)),$.gte=(V,I)=>$.check(f$(V,I)),$.min=(V,I)=>$.check(f$(V,I)),$.lt=(V,I)=>$.check(JU(V,I)),$.lte=(V,I)=>$.check(r$(V,I)),$.max=(V,I)=>$.check(r$(V,I)),$.int=(V)=>$.check(qJ(V)),$.safe=(V)=>$.check(qJ(V)),$.positive=(V)=>$.check(QU(0,V)),$.nonnegative=(V)=>$.check(f$(0,V)),$.negative=(V)=>$.check(JU(0,V)),$.nonpositive=(V)=>$.check(r$(0,V)),$.multipleOf=(V,I)=>$.check(jU(V,I)),$.step=(V,I)=>$.check(jU(V,I)),$.finite=()=>$;let J=$._zod.bag;$.minValue=Math.max(J.minimum??Number.NEGATIVE_INFINITY,J.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(J.maximum??Number.POSITIVE_INFINITY,J.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(J.format??"").includes("int")||Number.isSafeInteger(J.multipleOf??0.5),$.isFinite=!0,$.format=J.format??null});function wY($){return B4(yI,$)}var iU=O0("ZodNumberFormat",($,U)=>{YX.init($,U),yI.init($,U)});function qJ($){return w4(iU,$)}function kD($){return f4(iU,$)}function gD($){return y4(iU,$)}function jD($){return h4(iU,$)}function _D($){return u4(iU,$)}var hI=O0("ZodBoolean",($,U)=>{AI.init($,U),n0.init($,U)});function fY($){return p4(hI,$)}var uI=O0("ZodBigInt",($,U)=>{HO.init($,U),n0.init($,U),$.gte=(V,I)=>$.check(f$(V,I)),$.min=(V,I)=>$.check(f$(V,I)),$.gt=(V,I)=>$.check(QU(V,I)),$.gte=(V,I)=>$.check(f$(V,I)),$.min=(V,I)=>$.check(f$(V,I)),$.lt=(V,I)=>$.check(JU(V,I)),$.lte=(V,I)=>$.check(r$(V,I)),$.max=(V,I)=>$.check(r$(V,I)),$.positive=(V)=>$.check(QU(BigInt(0),V)),$.negative=(V)=>$.check(JU(BigInt(0),V)),$.nonpositive=(V)=>$.check(r$(BigInt(0),V)),$.nonnegative=(V)=>$.check(f$(BigInt(0),V)),$.multipleOf=(V,I)=>$.check(jU(V,I));let J=$._zod.bag;$.minValue=J.minimum??null,$.maxValue=J.maximum??null,$.format=J.format??null});function ND($){return l4(uI,$)}var rJ=O0("ZodBigIntFormat",($,U)=>{GX.init($,U),uI.init($,U)});function xD($){return r4(rJ,$)}function BD($){return n4(rJ,$)}var yY=O0("ZodSymbol",($,U)=>{VX.init($,U),n0.init($,U)});function cD($){return m4(yY,$)}var hY=O0("ZodUndefined",($,U)=>{SX.init($,U),n0.init($,U)});function wD($){return d4(hY,$)}var uY=O0("ZodNull",($,U)=>{WX.init($,U),n0.init($,U)});function pY($){return t4(uY,$)}var bY=O0("ZodAny",($,U)=>{DX.init($,U),n0.init($,U)});function fD(){return i4(bY)}var lY=O0("ZodUnknown",($,U)=>{oU.init($,U),n0.init($,U)});function dO(){return rU(lY)}var oY=O0("ZodNever",($,U)=>{zX.init($,U),n0.init($,U)});function nJ($){return e4(oY,$)}var rY=O0("ZodVoid",($,U)=>{KX.init($,U),n0.init($,U)});function yD($){return a4(rY,$)}var aO=O0("ZodDate",($,U)=>{AX.init($,U),n0.init($,U),$.min=(V,I)=>$.check(f$(V,I)),$.max=(V,I)=>$.check(r$(V,I));let J=$._zod.bag;$.minDate=J.minimum?new Date(J.minimum):null,$.maxDate=J.maximum?new Date(J.maximum):null});function hD($){return s4(aO,$)}var nY=O0("ZodArray",($,U)=>{HI.init($,U),n0.init($,U),$.element=U.element,$.min=(J,V)=>$.check(FU(J,V)),$.nonempty=(J)=>$.check(FU(1,J)),$.max=(J,V)=>$.check(mU(J,V)),$.length=(J,V)=>$.check(dU(J,V)),$.unwrap=()=>$.element});function mJ($,U){return cI(nY,$,U)}function uD($){let U=$._zod.def.shape;return IG(Object.keys(U))}var sO=O0("ZodObject",($,U)=>{HX.init($,U),n0.init($,U),y0.defineLazy($,"shape",()=>U.shape),$.keyof=()=>$G(Object.keys($._zod.def.shape)),$.catchall=(J)=>$.clone({...$._zod.def,catchall:J}),$.passthrough=()=>$.clone({...$._zod.def,catchall:dO()}),$.loose=()=>$.clone({...$._zod.def,catchall:dO()}),$.strict=()=>$.clone({...$._zod.def,catchall:nJ()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(J)=>{return y0.extend($,J)},$.merge=(J)=>y0.merge($,J),$.pick=(J)=>y0.pick($,J),$.omit=(J)=>y0.omit($,J),$.partial=(...J)=>y0.partial(sJ,$,J[0]),$.required=(...J)=>y0.required($Q,$,J[0])});function pD($,U){let J={type:"object",get shape(){return y0.assignProp(this,"shape",$?y0.objectClone($):{}),this.shape},...y0.normalizeParams(U)};return new sO(J)}function bD($,U){return new sO({type:"object",get shape(){return y0.assignProp(this,"shape",y0.objectClone($)),this.shape},catchall:nJ(),...y0.normalizeParams(U)})}function lD($,U){return new sO({type:"object",get shape(){return y0.assignProp(this,"shape",y0.objectClone($)),this.shape},catchall:dO(),...y0.normalizeParams(U)})}var dJ=O0("ZodUnion",($,U)=>{FO.init($,U),n0.init($,U),$.options=U.options});function tJ($,U){return new dJ({type:"union",options:$,...y0.normalizeParams(U)})}var mY=O0("ZodDiscriminatedUnion",($,U)=>{dJ.init($,U),FX.init($,U)});function oD($,U,J){return new mY({type:"union",options:U,discriminator:$,...y0.normalizeParams(J)})}var dY=O0("ZodIntersection",($,U)=>{LX.init($,U),n0.init($,U)});function tY($,U){return new dY({type:"intersection",left:$,right:U})}var iY=O0("ZodTuple",($,U)=>{gU.init($,U),n0.init($,U),$.rest=(J)=>$.clone({...$._zod.def,rest:J})});function rD($,U,J){let V=U instanceof l0,I=V?J:U;return new iY({type:"tuple",items:$,rest:V?U:null,...y0.normalizeParams(I)})}var iJ=O0("ZodRecord",($,U)=>{EX.init($,U),n0.init($,U),$.keyType=U.keyType,$.valueType=U.valueType});function eY($,U,J){return new iJ({type:"record",keyType:$,valueType:U,...y0.normalizeParams(J)})}function nD($,U,J){let V=w$($);return V._zod.values=void 0,new iJ({type:"record",keyType:V,valueType:U,...y0.normalizeParams(J)})}var aY=O0("ZodMap",($,U)=>{ZX.init($,U),n0.init($,U),$.keyType=U.keyType,$.valueType=U.valueType});function mD($,U,J){return new aY({type:"map",keyType:$,valueType:U,...y0.normalizeParams(J)})}var sY=O0("ZodSet",($,U)=>{vX.init($,U),n0.init($,U),$.min=(...J)=>$.check(_U(...J)),$.nonempty=(J)=>$.check(_U(1,J)),$.max=(...J)=>$.check(nU(...J)),$.size=(...J)=>$.check(PI(...J))});function dD($,U){return new sY({type:"set",valueType:$,...y0.normalizeParams(U)})}var wI=O0("ZodEnum",($,U)=>{MX.init($,U),n0.init($,U),$.enum=U.entries,$.options=Object.values(U.entries);let J=new Set(Object.keys(U.entries));$.extract=(V,I)=>{let S={};for(let Y of V)if(J.has(Y))S[Y]=U.entries[Y];else throw Error(`Key ${Y} not found in enum`);return new wI({...U,checks:[],...y0.normalizeParams(I),entries:S})},$.exclude=(V,I)=>{let S={...U.entries};for(let Y of V)if(J.has(Y))delete S[Y];else throw Error(`Key ${Y} not found in enum`);return new wI({...U,checks:[],...y0.normalizeParams(I),entries:S})}});function $G($,U){let J=Array.isArray($)?Object.fromEntries($.map((V)=>[V,V])):$;return new wI({type:"enum",entries:J,...y0.normalizeParams(U)})}function tD($,U){return new wI({type:"enum",entries:$,...y0.normalizeParams(U)})}var UG=O0("ZodLiteral",($,U)=>{PX.init($,U),n0.init($,U),$.values=new Set(U.values),Object.defineProperty($,"value",{get(){if(U.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return U.values[0]}})});function IG($,U){return new UG({type:"literal",values:Array.isArray($)?$:[$],...y0.normalizeParams(U)})}var OG=O0("ZodFile",($,U)=>{TX.init($,U),n0.init($,U),$.min=(J,V)=>$.check(_U(J,V)),$.max=(J,V)=>$.check(nU(J,V)),$.mime=(J,V)=>$.check(jI(Array.isArray(J)?J:[J],V))});function iD($){return GJ(OG,$)}var eJ=O0("ZodTransform",($,U)=>{FI.init($,U),n0.init($,U),$._zod.parse=(J,V)=>{J.addIssue=(S)=>{if(typeof S==="string")J.issues.push(y0.issue(S,J.value,U));else{let Y=S;if(Y.fatal)Y.continue=!1;Y.code??(Y.code="custom"),Y.input??(Y.input=J.value),Y.inst??(Y.inst=$),J.issues.push(y0.issue(Y))}};let I=U.transform(J.value,J);if(I instanceof Promise)return I.then((S)=>{return J.value=S,J});return J.value=I,J}});function aJ($){return new eJ({type:"transform",transform:$})}var sJ=O0("ZodOptional",($,U)=>{qX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function tO($){return new sJ({type:"optional",innerType:$})}var XG=O0("ZodNullable",($,U)=>{RX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function iO($){return new XG({type:"nullable",innerType:$})}function eD($){return tO(iO($))}var JG=O0("ZodDefault",($,U)=>{CX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function QG($,U){return new JG({type:"default",innerType:$,get defaultValue(){return typeof U==="function"?U():U}})}var YG=O0("ZodPrefault",($,U)=>{kX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function GG($,U){return new YG({type:"prefault",innerType:$,get defaultValue(){return typeof U==="function"?U():U}})}var $Q=O0("ZodNonOptional",($,U)=>{gX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function VG($,U){return new $Q({type:"nonoptional",innerType:$,...y0.normalizeParams(U)})}var SG=O0("ZodSuccess",($,U)=>{jX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function aD($){return new SG({type:"success",innerType:$})}var WG=O0("ZodCatch",($,U)=>{_X.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function DG($,U){return new WG({type:"catch",innerType:$,catchValue:typeof U==="function"?U:()=>U})}var zG=O0("ZodNaN",($,U)=>{NX.init($,U),n0.init($,U)});function sD($){return UJ(zG,$)}var UQ=O0("ZodPipe",($,U)=>{LI.init($,U),n0.init($,U),$.in=U.in,$.out=U.out});function eO($,U){return new UQ({type:"pipe",in:$,out:U})}var KG=O0("ZodReadonly",($,U)=>{xX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function AG($){return new KG({type:"readonly",innerType:$})}var HG=O0("ZodTemplateLiteral",($,U)=>{BX.init($,U),n0.init($,U)});function $z($,U){return new HG({type:"template_literal",parts:$,...y0.normalizeParams(U)})}var FG=O0("ZodLazy",($,U)=>{wX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.getter()});function LG($){return new FG({type:"lazy",getter:$})}var EG=O0("ZodPromise",($,U)=>{cX.init($,U),n0.init($,U),$.unwrap=()=>$._zod.def.innerType});function Uz($){return new EG({type:"promise",innerType:$})}var $6=O0("ZodCustom",($,U)=>{fX.init($,U),n0.init($,U)});function Iz($){let U=new I$({check:"custom"});return U._zod.check=$,U}function Oz($,U){return VJ($6,$??(()=>!0),U)}function ZG($,U={}){return SJ($6,$,U)}function vG($){return WJ($)}function Xz($,U={error:`Input not instance of ${$.name}`}){let J=new $6({type:"custom",check:"custom",fn:(V)=>V instanceof $,abort:!0,...y0.normalizeParams(U)});return J._zod.bag.Class=$,J}var Jz=(...$)=>DJ({Pipe:UQ,Boolean:hI,String:fI,Transform:eJ},...$);function Qz($){let U=LG(()=>{return tJ([TJ($),wY(),fY(),pY(),mJ(U),eY(TJ(),U)])});return U}function Yz($,U){return eO(aJ($),U)}var Gz={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Vz($){V$({customError:$})}function Sz(){return V$().customError}var IQ;(function($){})(IQ||(IQ={}));var OQ={};d$(OQ,{string:()=>Wz,number:()=>Dz,date:()=>Az,boolean:()=>zz,bigint:()=>Kz});function Wz($){return k4(fI,$)}function Dz($){return c4(yI,$)}function zz($){return b4(hI,$)}function Kz($){return o4(uI,$)}function Az($){return $J(aO,$)}V$(EI());var LU;((x)=>{x.MESSAGE_SENT="message.sent";x.MESSAGE_DELIVERED="message.delivered";x.MESSAGE_FAILED="message.failed";x.MESSAGE_CLICKED="message.clicked";x.MESSAGE_READ="message.read";x.TEMPLATE_CREATED="template.created";x.TEMPLATE_APPROVED="template.approved";x.TEMPLATE_REJECTED="template.rejected";x.TEMPLATE_UPDATED="template.updated";x.TEMPLATE_DELETED="template.deleted";x.CHANNEL_CREATED="channel.created";x.CHANNEL_VERIFIED="channel.verified";x.SENDER_NUMBER_ADDED="sender_number.added";x.SENDER_NUMBER_VERIFIED="sender_number.verified";x.QUOTA_WARNING="system.quota_warning";x.QUOTA_EXCEEDED="system.quota_exceeded";x.PROVIDER_ERROR="system.provider_error";x.SYSTEM_MAINTENANCE="system.maintenance";x.ANOMALY_DETECTED="analytics.anomaly_detected";x.THRESHOLD_EXCEEDED="analytics.threshold_exceeded"})(LU||={});var jL=p0.object({id:p0.string(),type:p0.string(),timestamp:p0.date(),data:p0.any(),metadata:p0.object({providerId:p0.string().optional(),channelId:p0.string().optional(),templateId:p0.string().optional(),messageId:p0.string().optional(),userId:p0.string().optional(),organizationId:p0.string().optional(),correlationId:p0.string().optional(),retryCount:p0.number().optional()}),version:p0.string()}),_L=p0.object({id:p0.string(),url:p0.string().url(),name:p0.string().optional(),description:p0.string().optional(),active:p0.boolean(),events:p0.array(p0.string()),headers:p0.record(p0.string(),p0.string()).optional(),secret:p0.string().optional(),retryConfig:p0.object({maxRetries:p0.number().min(0).max(10),retryDelayMs:p0.number().min(1000),backoffMultiplier:p0.number().min(1).max(5)}).optional(),filters:p0.object({providerId:p0.array(p0.string()).optional(),channelId:p0.array(p0.string()).optional(),templateId:p0.array(p0.string()).optional()}).optional(),createdAt:p0.date(),updatedAt:p0.date(),lastTriggeredAt:p0.date().optional(),status:p0.enum(["active","inactive","error","suspended"])}),NL=p0.object({id:p0.string(),endpointId:p0.string(),eventId:p0.string(),url:p0.string().url(),httpMethod:p0.enum(["POST","PUT","PATCH"]),headers:p0.record(p0.string(),p0.string()),payload:p0.string(),attempts:p0.array(p0.object({attemptNumber:p0.number(),timestamp:p0.date(),httpStatus:p0.number().optional(),responseBody:p0.string().optional(),responseHeaders:p0.record(p0.string(),p0.string()).optional(),error:p0.string().optional(),latencyMs:p0.number()})),status:p0.enum(["pending","success","failed","exhausted"]),createdAt:p0.date(),completedAt:p0.date().optional(),nextRetryAt:p0.date().optional()});class MG extends G${config;endpoints=new Map;indexByUrl=new Map;indexByEvent=new Map;indexByStatus=new Map;defaultConfig={type:"memory",retentionDays:90,enableEncryption:!1};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((U)=>{this.emit("loadError",U)})}async addEndpoint($){if(this.indexByUrl.has($.url)){if(this.indexByUrl.get($.url)!==$.id)throw Error(`Endpoint with URL ${$.url} already exists with different ID`)}let U=this.endpoints.get($.id);if(U)this.removeFromIndexes(U);if(this.endpoints.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.saveToFile();this.emit("endpointAdded",{endpointId:$.id,url:$.url})}async updateEndpoint($,U){let J=this.endpoints.get($);if(!J)throw Error(`Endpoint ${$} not found`);if(U.url&&U.url!==J.url){if(this.indexByUrl.has(U.url)){if(this.indexByUrl.get(U.url)!==$)throw Error(`Endpoint with URL ${U.url} already exists`)}}this.removeFromIndexes(J);let V={...J,...U,updatedAt:new Date};if(this.endpoints.set($,V),this.addToIndexes(V),this.config.type==="file")await this.saveToFile();return this.emit("endpointUpdated",{endpointId:$,changes:Object.keys(U),oldUrl:J.url,newUrl:V.url}),V}async removeEndpoint($){let U=this.endpoints.get($);if(!U)return!1;if(this.removeFromIndexes(U),this.endpoints.delete($),this.config.type==="file")await this.saveToFile();return this.emit("endpointRemoved",{endpointId:$,url:U.url}),!0}async getEndpoint($){return this.endpoints.get($)||null}async getEndpointByUrl($){let U=this.indexByUrl.get($);return U?this.endpoints.get(U)||null:null}async searchEndpoints($={},U={page:1,limit:100}){let J=null;if($.status){let L=this.indexByStatus.get($.status);J=L?new Set(L):new Set}if($.events&&$.events.length>0){let L=new Set;for(let E of $.events){let F=this.indexByEvent.get(E);if(F)F.forEach((Z)=>{L.add(Z)})}if(J)J=new Set(Array.from(J).filter((E)=>L.has(E)));else J=L}if(!J)J=new Set(this.endpoints.keys());let V=Array.from(J).map((L)=>this.endpoints.get(L)).filter((L)=>this.matchesFilter(L,$));if(U.sortBy)V.sort((L,E)=>{let F=this.getFieldValue(L,U.sortBy),Z=this.getFieldValue(E,U.sortBy),P=0;if(F<Z)P=-1;else if(F>Z)P=1;return U.sortOrder==="desc"?-P:P});let I=V.length,S=Math.ceil(I/U.limit),Y=(U.page-1)*U.limit,M=Y+U.limit;return{items:V.slice(Y,M),totalCount:I,page:U.page,totalPages:S,hasNext:U.page<S,hasPrevious:U.page>1}}async getActiveEndpointsForEvent($){let U=this.indexByEvent.get($);if(!U)return[];return Array.from(U).map((J)=>this.endpoints.get(J)).filter((J)=>J.status==="active")}getStats(){let $=this.endpoints.size,U=this.indexByStatus.get("active")?.size||0,J=this.indexByStatus.get("inactive")?.size||0,V=this.indexByStatus.get("error")?.size||0,I=this.indexByStatus.get("suspended")?.size||0,S={};for(let[Y,M]of this.indexByEvent.entries())S[Y]=M.size;return{totalEndpoints:$,activeEndpoints:U,inactiveEndpoints:J,errorEndpoints:V,suspendedEndpoints:I,eventSubscriptions:S}}async cleanupExpiredEndpoints(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let U=Array.from(this.endpoints.values()).filter((J)=>{return J.status==="inactive"&&(!J.lastTriggeredAt||J.lastTriggeredAt<$)});for(let J of U)await this.removeEndpoint(J.id);if(U.length>0)this.emit("expiredEndpointsCleanup",{removedCount:U.length,cutoffDate:$});return U.length}initializeIndexes(){let $=Object.values(LU);for(let J of $)this.indexByEvent.set(J,new Set);let U=["active","inactive","error","suspended"];for(let J of U)this.indexByStatus.set(J,new Set)}addToIndexes($){this.indexByUrl.set($.url,$.id);let U=this.indexByStatus.get($.status);if(U)U.add($.id);for(let J of $.events){let V=this.indexByEvent.get(J);if(V)V.add($.id)}}removeFromIndexes($){this.indexByUrl.delete($.url);let U=this.indexByStatus.get($.status);if(U)U.delete($.id);for(let J of $.events){let V=this.indexByEvent.get(J);if(V)V.delete($.id)}}matchesFilter($,U){if(U.providerId&&U.providerId.length>0){if(!U.providerId.some((V)=>$.filters?.providerId?.includes(V)))return!1}if(U.channelId&&U.channelId.length>0){if(!U.channelId.some((V)=>$.filters?.channelId?.includes(V)))return!1}if(U.createdAfter&&$.createdAt<U.createdAfter)return!1;if(U.createdBefore&&$.createdAt>U.createdBefore)return!1;if(U.lastTriggeredAfter&&(!$.lastTriggeredAt||$.lastTriggeredAt<U.lastTriggeredAfter))return!1;if(U.lastTriggeredBefore&&(!$.lastTriggeredAt||$.lastTriggeredAt>U.lastTriggeredBefore))return!1;return!0}getFieldValue($,U){return U.split(".").reduce((J,V)=>J?.[V],$)}async loadFromFile(){if(!this.config.filePath)return;try{let $=await eU.readFile(this.config.filePath,"utf8"),U=JSON.parse($);for(let J of U.endpoints||[]){let V={...J,createdAt:new Date(J.createdAt),updatedAt:new Date(J.updatedAt),lastTriggeredAt:J.lastTriggeredAt?new Date(J.lastTriggeredAt):void 0};this.endpoints.set(V.id,V),this.addToIndexes(V)}this.emit("dataLoaded",{filePath:this.config.filePath,endpointCount:this.endpoints.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $={endpoints:Array.from(this.endpoints.values()),savedAt:new Date().toISOString()},U=JSON.stringify($,null,2);await eU.mkdir(IU(this.config.filePath),{recursive:!0}),await eU.writeFile(this.config.filePath,U,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,endpointCount:this.endpoints.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{endpointCount:this.endpoints.size})}}t$();var EU=(()=>({}));class PG extends G${config;events=new Map;indexByType=new Map;indexByDate=new Map;indexByProvider=new Map;indexByChannel=new Map;cleanupInterval=null;defaultConfig={type:"memory",retentionDays:7,enableCompression:!1,maxMemoryUsage:52428800};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.startCleanupTask(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((U)=>{this.emit("loadError",U)})}async saveEvent($){if(this.events.has($.id)){this.emit("duplicateEvent",{eventId:$.id});return}if(this.config.type==="memory"&&this.config.maxMemoryUsage)await this.checkMemoryUsage();if(this.events.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.appendToFile($);this.emit("eventSaved",{eventId:$.id,type:$.type,providerId:$.metadata.providerId})}async getEvent($){return this.events.get($)||null}async searchEvents($={},U={page:1,limit:100}){let J=null;if($.type&&$.type.length>0){let L=new Set;for(let E of $.type){let F=this.indexByType.get(E);if(F)F.forEach((Z)=>{L.add(Z)})}J=L}if($.providerId&&$.providerId.length>0){let L=new Set;for(let E of $.providerId){let F=this.indexByProvider.get(E);if(F)F.forEach((Z)=>{L.add(Z)})}if(J)J=new Set(Array.from(J).filter((E)=>L.has(E)));else J=L}if($.channelId&&$.channelId.length>0){let L=new Set;for(let E of $.channelId){let F=this.indexByChannel.get(E);if(F)F.forEach((Z)=>{L.add(Z)})}if(J)J=new Set(Array.from(J).filter((E)=>L.has(E)));else J=L}if($.createdAfter||$.createdBefore){let L=this.getEventIdsByDateRange($.createdAfter,$.createdBefore);if(J)J=new Set(Array.from(J).filter((E)=>L.has(E)));else J=L}if(!J)J=new Set(this.events.keys());let V=Array.from(J).map((L)=>this.events.get(L)).filter((L)=>this.matchesFilter(L,$));V.sort((L,E)=>{if(U.sortBy==="timestamp"||!U.sortBy){let q=E.timestamp.getTime()-L.timestamp.getTime();return U.sortOrder==="asc"?-q:q}let F=this.getFieldValue(L,U.sortBy),Z=this.getFieldValue(E,U.sortBy),P=0;if(F<Z)P=-1;else if(F>Z)P=1;return U.sortOrder==="desc"?-P:P});let I=V.length,S=Math.ceil(I/U.limit),Y=(U.page-1)*U.limit,M=Y+U.limit;return{items:V.slice(Y,M),totalCount:I,page:U.page,totalPages:S,hasNext:U.page<S,hasPrevious:U.page>1}}async getEventsByType($,U=100){let J=this.indexByType.get($);if(!J)return[];return Array.from(J).map((V)=>this.events.get(V)).sort((V,I)=>I.timestamp.getTime()-V.timestamp.getTime()).slice(0,U)}async getEventStats($){let U={createdAfter:$?.start,createdBefore:$?.end},V=(await this.searchEvents(U,{page:1,limit:1e4})).items,I={};for(let T of Object.values(LU))I[T]=0;let S={},Y={},M={};for(let T of V){if(I[T.type]++,T.metadata.providerId)S[T.metadata.providerId]=(S[T.metadata.providerId]||0)+1;if(T.metadata.channelId)Y[T.metadata.channelId]=(Y[T.metadata.channelId]||0)+1;let L=T.timestamp.toISOString().substring(0,13);M[L]=(M[L]||0)+1}return{totalEvents:V.length,eventsByType:I,eventsByProvider:S,eventsByChannel:Y,eventsPerHour:M}}async cleanupOldEvents(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let U=Array.from(this.events.values()).filter((J)=>J.timestamp<$);for(let J of U)this.removeFromIndexes(J),this.events.delete(J.id);if(U.length>0){if(this.emit("oldEventsCleanup",{removedCount:U.length,cutoffDate:$}),this.config.type==="file")await this.saveToFile()}return U.length}async cleanupDuplicateEvents(){let $=new Map;for(let J of this.events.values()){let V=this.generateContentKey(J);if(!$.has(V))$.set(V,[]);$.get(V).push(J)}let U=0;for(let[J,V]of $.entries())if(V.length>1){V.sort((I,S)=>S.timestamp.getTime()-I.timestamp.getTime());for(let I=1;I<V.length;I++){let S=V[I];this.removeFromIndexes(S),this.events.delete(S.id),U++}}if(U>0){if(this.emit("duplicateEventsCleanup",{removedCount:U}),this.config.type==="file")await this.saveToFile()}return U}getStorageStats(){let $=this.estimateMemoryUsage();return{totalEvents:this.events.size,memoryUsage:$,indexSizes:{byType:this.indexByType.size,byDate:this.indexByDate.size,byProvider:this.indexByProvider.size,byChannel:this.indexByChannel.size}}}initializeIndexes(){let $=Object.values(LU);for(let U of $)this.indexByType.set(U,new Set)}addToIndexes($){let U=this.indexByType.get($.type);if(U)U.add($.id);let J=$.timestamp.toISOString().split("T")[0];if(!this.indexByDate.has(J))this.indexByDate.set(J,new Set);if(this.indexByDate.get(J).add($.id),$.metadata.providerId){if(!this.indexByProvider.has($.metadata.providerId))this.indexByProvider.set($.metadata.providerId,new Set);this.indexByProvider.get($.metadata.providerId).add($.id)}if($.metadata.channelId){if(!this.indexByChannel.has($.metadata.channelId))this.indexByChannel.set($.metadata.channelId,new Set);this.indexByChannel.get($.metadata.channelId).add($.id)}}removeFromIndexes($){let U=this.indexByType.get($.type);if(U)U.delete($.id);let J=$.timestamp.toISOString().split("T")[0],V=this.indexByDate.get(J);if(V){if(V.delete($.id),V.size===0)this.indexByDate.delete(J)}if($.metadata.providerId){let I=this.indexByProvider.get($.metadata.providerId);if(I){if(I.delete($.id),I.size===0)this.indexByProvider.delete($.metadata.providerId)}}if($.metadata.channelId){let I=this.indexByChannel.get($.metadata.channelId);if(I){if(I.delete($.id),I.size===0)this.indexByChannel.delete($.metadata.channelId)}}}getEventIdsByDateRange($,U){let J=new Set;for(let[V,I]of this.indexByDate.entries()){let S=new Date(V);if($&&S<$)continue;if(U&&S>U)continue;I.forEach((Y)=>{J.add(Y)})}return J}matchesFilter($,U){if(U.templateId&&U.templateId.length>0){if(!$.metadata.templateId||!U.templateId.includes($.metadata.templateId))return!1}if(U.messageId&&U.messageId.length>0){if(!$.metadata.messageId||!U.messageId.includes($.metadata.messageId))return!1}if(U.userId&&U.userId.length>0){if(!$.metadata.userId||!U.userId.includes($.metadata.userId))return!1}if(U.organizationId&&U.organizationId.length>0){if(!$.metadata.organizationId||!U.organizationId.includes($.metadata.organizationId))return!1}return!0}getFieldValue($,U){return U.split(".").reduce((J,V)=>J?.[V],$)}estimateMemoryUsage(){let $=0;for(let U of this.events.values())$+=JSON.stringify(U).length*2;return $}async checkMemoryUsage(){if(!this.config.maxMemoryUsage)return;let $=this.estimateMemoryUsage();if($>this.config.maxMemoryUsage){let U=Array.from(this.events.values()).sort((I,S)=>I.timestamp.getTime()-S.timestamp.getTime()),J=0,V=this.config.maxMemoryUsage*0.8;for(let I of U){if(this.estimateMemoryUsage()<=V)break;this.removeFromIndexes(I),this.events.delete(I.id),J++}if(J>0)this.emit("memoryCleanup",{removedCount:J,previousUsage:$,currentUsage:this.estimateMemoryUsage()})}}generateContentKey($){return`${$.type}_${$.metadata.messageId||""}_${$.metadata.templateId||""}_${JSON.stringify($.data)}`}startCleanupTask(){this.cleanupInterval=setInterval(async()=>{try{await this.cleanupOldEvents(),await this.cleanupDuplicateEvents()}catch($){this.emit("cleanupError",$)}},3600000)}async appendToFile($){if(!this.config.filePath)return;try{let U=JSON.stringify($)+`
41
- `;await EU.appendFile(this.config.filePath,U,"utf8")}catch(U){this.emit("appendError",U)}}async loadFromFile(){if(!this.config.filePath)return;try{let U=(await EU.readFile(this.config.filePath,"utf8")).trim().split(`
42
- `).filter((J)=>J.trim());for(let J of U)try{let V=JSON.parse(J),I={...V,timestamp:new Date(V.timestamp)};this.events.set(I.id,I),this.addToIndexes(I)}catch(V){this.emit("parseError",{line:J,error:V})}this.emit("dataLoaded",{filePath:this.config.filePath,eventCount:this.events.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $=Array.from(this.events.values()).map((U)=>JSON.stringify(U)).join(`
43
- `);await EU.mkdir(IU(this.config.filePath),{recursive:!0}),await EU.writeFile(this.config.filePath,$+`
44
- `,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,eventCount:this.events.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null;if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{eventCount:this.events.size})}}class U6{config;constructor($){this.config={maxRetries:$.maxRetries,baseDelayMs:$.retryDelayMs,maxDelayMs:$.maxDelayMs||300000,backoffMultiplier:$.backoffMultiplier||2,jitter:$.jitter!==!1}}calculateNextRetry($){if($>=this.config.maxRetries)throw Error(`Maximum retry attempts (${this.config.maxRetries}) exceeded`);let U=this.config.baseDelayMs*this.config.backoffMultiplier**$;if(U=Math.min(U,this.config.maxDelayMs),this.config.jitter)U=U*(0.5+Math.random()*0.5);return new Date(Date.now()+U)}shouldRetry($,U){if($>=this.config.maxRetries)return!1;if(U)return this.isRetryableError(U);return!0}isRetryableError($){let U=$.message.toLowerCase();return["timeout","network","connection","econnreset","enotfound","econnrefused","socket hang up"].some((V)=>U.includes(V))}shouldRetryStatus($){if($>=400&&$<500)return[408,429].includes($);if($>=500)return!0;return!1}calculateRetryStats($){if($.length===0)return{totalAttempts:0,successfulAttempts:0,failedAttempts:0,averageDelayMs:0,totalTimeMs:0};let U=$.filter((Y)=>Y.success).length,J=$.length-U,V=0;for(let Y=1;Y<$.length;Y++)V+=$[Y].timestamp.getTime()-$[Y-1].timestamp.getTime();let I=$.length>1?V/($.length-1):0,S=$.length>0?$[$.length-1].timestamp.getTime()-$[0].timestamp.getTime():0;return{totalAttempts:$.length,successfulAttempts:U,failedAttempts:J,averageDelayMs:I,totalTimeMs:S}}updateConfig($){this.config={...this.config,...$}}getConfig(){return{...this.config}}getBackoffDelay($){let U=this.config.baseDelayMs*this.config.backoffMultiplier**$;return Math.min(U,this.config.maxDelayMs)}}p$();class F6{config;constructor($){this.config={algorithm:$.algorithm||"sha256",header:$.signatureHeader||"X-Webhook-Signature",prefix:$.signaturePrefix||"sha256="}}generateSignature($,U){let J=fQ(this.config.algorithm,U);J.update($,"utf8");let V=J.digest("hex");return this.config.prefix?`${this.config.prefix}${V}`:V}verifySignature($,U,J){try{let V=this.generateSignature($,J);return this.constantTimeCompare(U,V)}catch(V){return console.error("Signature verification failed:",V),!1}}extractSignature($){let U=this.config.header.toLowerCase();for(let[J,V]of Object.entries($))if(J.toLowerCase()===U)return V;return null}createSecurityHeaders($,U){let J=this.generateSignature($,U),V=Math.floor(Date.now()/1000).toString();return{[this.config.header]:J,"X-Webhook-Timestamp":V,"X-Webhook-ID":this.generateWebhookId(),"User-Agent":"K-Message-Webhook/1.0"}}verifyTimestamp($,U=300){try{let J=parseInt($,10),V=Math.floor(Date.now()/1000);return Math.abs(V-J)<=U}catch(J){return!1}}generateWebhookId(){return`wh_${wQ(16).toString("hex")}`}constantTimeCompare($,U){if($.length!==U.length)return!1;let J=0;for(let V=0;V<$.length;V++)J|=$.charCodeAt(V)^U.charCodeAt(V);return J===0}updateConfig($){this.config={...this.config,...$}}getConfig(){return{...this.config}}}class yQ{async fetch($,U){return fetch($,U)}}class hV{responses=new Map;setMockResponse($,U){this.responses.set($,U)}async fetch($,U){if($.includes("webhook.example.com")||$.includes("test-")){await new Promise((V)=>setTimeout(V,Math.random()*10+5));let J=this.responses.get($);if(J)return J;return new Response(JSON.stringify({status:"ok"}),{status:200,statusText:"OK",headers:{"content-type":"application/json"}})}return fetch($,U)}}class L6{config;httpClient;constructor($,U){this.config=$,this.httpClient=U||new yQ}async dispatch($,U){let J={id:this.generateDeliveryId(),endpointId:U.id,eventId:$.id,url:U.url,httpMethod:"POST",headers:this.buildHeaders(U,$),payload:JSON.stringify($),attempts:[],status:"pending",createdAt:new Date};return await this.executeDelivery(J,U),J}async executeDelivery($,U){let J=U.retryConfig?.maxRetries||this.config.maxRetries;for(let V=1;V<=J+1;V++){let I=await this.makeHttpRequest($,U,V);if($.attempts.push(I),I.httpStatus&&I.httpStatus>=200&&I.httpStatus<300){$.status="success",$.completedAt=new Date;return}if(V<=J){let S=this.calculateRetryDelay(V,U);await this.sleep(S)}}$.status="exhausted",$.completedAt=new Date}async makeHttpRequest($,U,J){let V=Date.now(),I={attemptNumber:J,timestamp:new Date,latencyMs:0};try{let S=await this.httpClient.fetch($.url,{method:$.httpMethod,headers:$.headers,body:$.payload,signal:AbortSignal.timeout(this.config.timeoutMs)});I.httpStatus=S.status,I.responseBody=await S.text();let Y={};if(S.headers.forEach((M,T)=>{Y[T]=M}),I.responseHeaders=Y,I.latencyMs=Date.now()-V,!S.ok)I.error=`HTTP ${S.status}: ${S.statusText}`}catch(S){I.latencyMs=Date.now()-V,I.error=S instanceof Error?S.message:"Unknown error"}return I}buildHeaders($,U){let J={"Content-Type":"application/json","X-Webhook-ID":U.id,"X-Webhook-Event":U.type,"X-Webhook-Timestamp":U.timestamp.toISOString(),"User-Agent":"K-Message-Webhook/1.0"};if($.headers)Object.assign(J,$.headers);if($.secret){let V=this.generateSignature(JSON.stringify(U),$.secret);J["X-Webhook-Signature"]=V}return J}generateSignature($,U){return`sha256=${Buffer.from($+U).toString("base64")}`}calculateRetryDelay($,U){let J=U.retryConfig?.retryDelayMs||this.config.retryDelayMs,V=U.retryConfig?.backoffMultiplier||2;return J*V**($-1)}sleep($){return new Promise((U)=>setTimeout(U,$))}generateDeliveryId(){return`delivery_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}async shutdown(){}}class E6{endpoints=new Map;deliveries=new Map;async addEndpoint($){this.endpoints.set($.id,$)}async updateEndpoint($,U){if(!this.endpoints.has($))throw Error(`Endpoint ${$} not found`);this.endpoints.set($,U)}async removeEndpoint($){this.endpoints.delete($)}async getEndpoint($){return this.endpoints.get($)||null}async listEndpoints(){return Array.from(this.endpoints.values())}async addDelivery($){this.deliveries.set($.id,$)}async getDeliveries($,U,J,V,I=100){let S=Array.from(this.deliveries.values());if($)S=S.filter((Y)=>Y.endpointId===$);if(U)S=S.filter((Y)=>Y.createdAt>=U.start&&Y.createdAt<=U.end);if(V)S=S.filter((Y)=>Y.status===V);return S.sort((Y,M)=>M.createdAt.getTime()-Y.createdAt.getTime()).slice(0,I)}async getFailedDeliveries($,U){return this.getDeliveries($,void 0,U,"failed")}}class uV{config;dispatcher;registry;securityManager;retryManager;eventQueue=[];batchProcessor=null;constructor($,U){this.config=$,this.dispatcher=new L6($,U),this.registry=new E6,this.securityManager=new F6($),this.retryManager=new U6($),this.startBatchProcessor()}async registerEndpoint($){await this.validateEndpointUrl($.url);let U={...$,id:this.generateEndpointId(),createdAt:new Date,updatedAt:new Date,status:"active"};return await this.registry.addEndpoint(U),await this.testEndpoint(U.id),U}async updateEndpoint($,U){let J=await this.registry.getEndpoint($);if(!J)throw Error(`Webhook endpoint ${$} not found`);if(U.url&&U.url!==J.url)await this.validateEndpointUrl(U.url);let V={...J,...U,updatedAt:new Date};return await this.registry.updateEndpoint($,V),V}async deleteEndpoint($){await this.registry.removeEndpoint($)}async getEndpoint($){return this.registry.getEndpoint($)}async listEndpoints(){return this.registry.listEndpoints()}async emit($){if(!this.config.enabledEvents.includes($.type))return;if(this.validateEvent($),this.eventQueue.push($),this.eventQueue.length>=this.config.batchSize)await this.processBatch()}async emitSync($){this.validateEvent($);let U=await this.getMatchingEndpoints($),J=[];for(let V of U){let I=await this.dispatcher.dispatch($,V);J.push(I)}return J}async testEndpoint($){let U=await this.registry.getEndpoint($);if(!U)throw Error(`Webhook endpoint ${$} not found`);let J={id:`test_${Date.now()}`,type:"system.maintenance",timestamp:new Date,data:{test:!0,message:"This is a test webhook"},metadata:{correlationId:`test_${$}`},version:"1.0"},V=Date.now();try{let I=await this.dispatcher.dispatch(J,U),S=Date.now();return{endpointId:$,url:U.url,success:I.status==="success",httpStatus:I.attempts[0]?.httpStatus,responseTime:S-V,testedAt:new Date}}catch(I){let S=Date.now();return{endpointId:$,url:U.url,success:!1,responseTime:S-V,error:I instanceof Error?I.message:"Unknown error",testedAt:new Date}}}async getStats($,U){let J=await this.registry.getDeliveries($,U),V=J.filter((T)=>T.status==="success"),I=J.filter((T)=>T.status==="failed"||T.status==="exhausted"),S=J.reduce((T,L)=>{let E=L.attempts[L.attempts.length-1];return T+(E?.latencyMs||0)},0),Y={},M={};for(let T of J)if(T.status==="failed"||T.status==="exhausted"){let L=T.attempts[T.attempts.length-1],E=L?.error||`HTTP ${L?.httpStatus||"Unknown"}`;M[E]=(M[E]||0)+1}return{endpointId:$,timeRange:U,totalDeliveries:J.length,successfulDeliveries:V.length,failedDeliveries:I.length,averageLatencyMs:J.length>0?S/J.length:0,successRate:J.length>0?V.length/J.length*100:0,eventBreakdown:Y,errorBreakdown:M}}async retryFailed($,U){let J=await this.registry.getFailedDeliveries($,U),V=0;for(let I of J){let S=I.attempts.length;if(this.retryManager.shouldRetry(S))setTimeout(async()=>{let Y=await this.registry.getEndpoint(I.endpointId);if(Y)await this.dispatcher.dispatch(JSON.parse(I.payload),Y)},this.retryManager.getBackoffDelay(S)),V++}return V}async pauseEndpoint($){await this.updateEndpoint($,{status:"suspended"})}async resumeEndpoint($){await this.updateEndpoint($,{status:"active"})}async getDeliveries($,U,J,V=100){return this.registry.getDeliveries($,void 0,U,J,V)}async processBatch(){if(this.eventQueue.length===0)return;let $=this.eventQueue.splice(0,this.config.batchSize);try{for(let U of $){let J=await this.getMatchingEndpoints(U);for(let V of J)this.dispatcher.dispatch(U,V).catch((I)=>{console.error(`Failed to dispatch webhook to ${V.url}:`,I)})}}catch(U){console.error("Batch processing failed:",U),this.eventQueue.unshift(...$)}}async getMatchingEndpoints($){return(await this.registry.listEndpoints()).filter((J)=>{if(J.status!=="active")return!1;if(!J.events.includes($.type))return!1;if(J.filters){if(J.filters.providerId&&$.metadata.providerId){if(!J.filters.providerId.includes($.metadata.providerId))return!1}if(J.filters.channelId&&$.metadata.channelId){if(!J.filters.channelId.includes($.metadata.channelId))return!1}if(J.filters.templateId&&$.metadata.templateId){if(!J.filters.templateId.includes($.metadata.templateId))return!1}}return!0})}validateEvent($){if(!$.id)throw Error("Event ID is required");if(!$.type)throw Error("Event type is required");if(!$.timestamp)throw Error("Event timestamp is required");if(!$.version)throw Error("Event version is required")}async validateEndpointUrl($){try{if(new URL($).protocol!=="https:"&&!$.includes("localhost")&&!$.includes("127.0.0.1"))throw Error("Webhook URL must use HTTPS")}catch(U){if(U instanceof Error)throw U;throw Error("Invalid webhook URL")}}generateEndpointId(){return`webhook_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}startBatchProcessor(){this.batchProcessor=setInterval(async()=>{try{await this.processBatch()}catch($){console.error("Batch processor error:",$)}},this.config.batchTimeoutMs)}async shutdown(){if(this.batchProcessor)clearInterval(this.batchProcessor),this.batchProcessor=null;if(this.eventQueue.length>0)await this.processBatch();await this.dispatcher.shutdown()}}export{uV as WebhookService,E6 as WebhookRegistry,LU as WebhookEventType,L6 as WebhookDispatcher,F6 as SecurityManager,U6 as RetryManager,JY as QueueManager,hV as MockHttpClient,IY as LoadBalancer,PG as EventStore,MG as EndpointManager,QY as DeliveryStore,yQ as DefaultHttpClient,UY as BatchDispatcher};
59
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let J of $.seen.entries()){let A=J[1];if(I===J[0]){Q(J);continue}if($.external){let Z=$.external.registry.get(J[0])?.id;if(I!==J[0]&&Z){Q(J);continue}}if($.metadataRegistry.get(J[0])?.id){Q(J);continue}if(A.cycle){Q(J);continue}if(A.count>1){if($.reused==="ref"){Q(J);continue}}}}function NU($,I){let D=$.seen.get(I);if(!D)throw Error("Unprocessed schema. This is a bug in Zod.");let X=(J)=>{let A=$.seen.get(J);if(A.ref===null)return;let T=A.def??A.schema,Z={...T},L=A.ref;if(A.ref=null,L){X(L);let E=$.seen.get(L),P=E.schema;if(P.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))T.allOf=T.allOf??[],T.allOf.push(P);else Object.assign(T,P);if(Object.assign(T,Z),J._zod.parent===L)for(let k in T){if(k==="$ref"||k==="allOf")continue;if(!(k in Z))delete T[k]}if(P.$ref&&E.def)for(let k in T){if(k==="$ref"||k==="allOf")continue;if(k in E.def&&JSON.stringify(T[k])===JSON.stringify(E.def[k]))delete T[k]}}let F=J._zod.parent;if(F&&F!==L){X(F);let E=$.seen.get(F);if(E?.schema.$ref){if(T.$ref=E.schema.$ref,E.def)for(let P in T){if(P==="$ref"||P==="allOf")continue;if(P in E.def&&JSON.stringify(T[P])===JSON.stringify(E.def[P]))delete T[P]}}}$.override({zodSchema:J,jsonSchema:T,path:A.path??[]})};for(let J of[...$.seen.entries()].reverse())X(J[0]);let U={};if($.target==="draft-2020-12")U.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")U.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")U.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let J=$.external.registry.get(I)?.id;if(!J)throw Error("Schema is missing an `id` property");U.$id=$.external.uri(J)}Object.assign(U,D.def??D.schema);let Q=$.external?.defs??{};for(let J of $.seen.entries()){let A=J[1];if(A.def&&A.defId)Q[A.defId]=A.def}if($.external);else if(Object.keys(Q).length>0)if($.target==="draft-2020-12")U.$defs=Q;else U.definitions=Q;try{let J=JSON.parse(JSON.stringify(U));return Object.defineProperty(J,"~standard",{value:{...I["~standard"],jsonSchema:{input:MI(I,"input",$.processors),output:MI(I,"output",$.processors)}},enumerable:!1,writable:!1}),J}catch(J){throw Error("Error converting schema to JSON.")}}function h0($,I){let D=I??{seen:new Set};if(D.seen.has($))return!1;D.seen.add($);let X=$._zod.def;if(X.type==="transform")return!0;if(X.type==="array")return h0(X.element,D);if(X.type==="set")return h0(X.valueType,D);if(X.type==="lazy")return h0(X.getter(),D);if(X.type==="promise"||X.type==="optional"||X.type==="nonoptional"||X.type==="nullable"||X.type==="readonly"||X.type==="default"||X.type==="prefault")return h0(X.innerType,D);if(X.type==="intersection")return h0(X.left,D)||h0(X.right,D);if(X.type==="record"||X.type==="map")return h0(X.keyType,D)||h0(X.valueType,D);if(X.type==="pipe")return h0(X.in,D)||h0(X.out,D);if(X.type==="object"){for(let U in X.shape)if(h0(X.shape[U],D))return!0;return!1}if(X.type==="union"){for(let U of X.options)if(h0(U,D))return!0;return!1}if(X.type==="tuple"){for(let U of X.items)if(h0(U,D))return!0;if(X.rest&&h0(X.rest,D))return!0;return!1}return!1}var yJ=($,I={})=>(D)=>{let X=_U({...D,processors:I});return a$($,X),jU(X,$),NU(X,$)},MI=($,I,D={})=>(X)=>{let{libraryOptions:U,target:Q}=X??{},J=_U({...U??{},target:Q,io:I,processors:D});return a$($,J),jU(J,$),NU(J,$)};var dS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uJ=($,I,D,X)=>{let U=D;U.type="string";let{minimum:Q,maximum:J,format:A,patterns:T,contentEncoding:Z}=$._zod.bag;if(typeof Q==="number")U.minLength=Q;if(typeof J==="number")U.maxLength=J;if(A){if(U.format=dS[A]??A,U.format==="")delete U.format;if(A==="time")delete U.format}if(Z)U.contentEncoding=Z;if(T&&T.size>0){let L=[...T];if(L.length===1)U.pattern=L[0].source;else if(L.length>1)U.allOf=[...L.map((F)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:F.source}))]}},hJ=($,I,D,X)=>{let U=D,{minimum:Q,maximum:J,format:A,multipleOf:T,exclusiveMaximum:Z,exclusiveMinimum:L}=$._zod.bag;if(typeof A==="string"&&A.includes("int"))U.type="integer";else U.type="number";if(typeof L==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.minimum=L,U.exclusiveMinimum=!0;else U.exclusiveMinimum=L;if(typeof Q==="number"){if(U.minimum=Q,typeof L==="number"&&I.target!=="draft-04")if(L>=Q)delete U.minimum;else delete U.exclusiveMinimum}if(typeof Z==="number")if(I.target==="draft-04"||I.target==="openapi-3.0")U.maximum=Z,U.exclusiveMaximum=!0;else U.exclusiveMaximum=Z;if(typeof J==="number"){if(U.maximum=J,typeof Z==="number"&&I.target!=="draft-04")if(Z<=J)delete U.maximum;else delete U.exclusiveMaximum}if(typeof T==="number")U.multipleOf=T},pJ=($,I,D,X)=>{D.type="boolean"},lJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},bJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},rJ=($,I,D,X)=>{if(I.target==="openapi-3.0")D.type="string",D.nullable=!0,D.enum=[null];else D.type="null"},oJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},nJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},dJ=($,I,D,X)=>{D.not={}},mJ=($,I,D,X)=>{},tJ=($,I,D,X)=>{},iJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},eJ=($,I,D,X)=>{let U=$._zod.def,Q=hI(U.entries);if(Q.every((J)=>typeof J==="number"))D.type="number";if(Q.every((J)=>typeof J==="string"))D.type="string";D.enum=Q},aJ=($,I,D,X)=>{let U=$._zod.def,Q=[];for(let J of U.values)if(J===void 0){if(I.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof J==="bigint")if(I.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else Q.push(Number(J));else Q.push(J);if(Q.length===0);else if(Q.length===1){let J=Q[0];if(D.type=J===null?"null":typeof J,I.target==="draft-04"||I.target==="openapi-3.0")D.enum=[J];else D.const=J}else{if(Q.every((J)=>typeof J==="number"))D.type="number";if(Q.every((J)=>typeof J==="string"))D.type="string";if(Q.every((J)=>typeof J==="boolean"))D.type="boolean";if(Q.every((J)=>J===null))D.type="null";D.enum=Q}},sJ=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},$X=($,I,D,X)=>{let U=D,Q=$._zod.pattern;if(!Q)throw Error("Pattern not found in template literal");U.type="string",U.pattern=Q.source},UX=($,I,D,X)=>{let U=D,Q={type:"string",format:"binary",contentEncoding:"binary"},{minimum:J,maximum:A,mime:T}=$._zod.bag;if(J!==void 0)Q.minLength=J;if(A!==void 0)Q.maxLength=A;if(T)if(T.length===1)Q.contentMediaType=T[0],Object.assign(U,Q);else Object.assign(U,Q),U.anyOf=T.map((Z)=>({contentMediaType:Z}));else Object.assign(U,Q)},IX=($,I,D,X)=>{D.type="boolean"},vX=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},DX=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},OX=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},JX=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},XX=($,I,D,X)=>{if(I.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},QX=($,I,D,X)=>{let U=D,Q=$._zod.def,{minimum:J,maximum:A}=$._zod.bag;if(typeof J==="number")U.minItems=J;if(typeof A==="number")U.maxItems=A;U.type="array",U.items=a$(Q.element,I,{...X,path:[...X.path,"items"]})},YX=($,I,D,X)=>{let U=D,Q=$._zod.def;U.type="object",U.properties={};let J=Q.shape;for(let Z in J)U.properties[Z]=a$(J[Z],I,{...X,path:[...X.path,"properties",Z]});let A=new Set(Object.keys(J)),T=new Set([...A].filter((Z)=>{let L=Q.shape[Z]._zod;if(I.io==="input")return L.optin===void 0;else return L.optout===void 0}));if(T.size>0)U.required=Array.from(T);if(Q.catchall?._zod.def.type==="never")U.additionalProperties=!1;else if(!Q.catchall){if(I.io==="output")U.additionalProperties=!1}else if(Q.catchall)U.additionalProperties=a$(Q.catchall,I,{...X,path:[...X.path,"additionalProperties"]})},jv=($,I,D,X)=>{let U=$._zod.def,Q=U.inclusive===!1,J=U.options.map((A,T)=>a$(A,I,{...X,path:[...X.path,Q?"oneOf":"anyOf",T]}));if(Q)D.oneOf=J;else D.anyOf=J},GX=($,I,D,X)=>{let U=$._zod.def,Q=a$(U.left,I,{...X,path:[...X.path,"allOf",0]}),J=a$(U.right,I,{...X,path:[...X.path,"allOf",1]}),A=(Z)=>("allOf"in Z)&&Object.keys(Z).length===1,T=[...A(Q)?Q.allOf:[Q],...A(J)?J.allOf:[J]];D.allOf=T},VX=($,I,D,X)=>{let U=D,Q=$._zod.def;U.type="array";let J=I.target==="draft-2020-12"?"prefixItems":"items",A=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",T=Q.items.map((E,P)=>a$(E,I,{...X,path:[...X.path,J,P]})),Z=Q.rest?a$(Q.rest,I,{...X,path:[...X.path,A,...I.target==="openapi-3.0"?[Q.items.length]:[]]}):null;if(I.target==="draft-2020-12"){if(U.prefixItems=T,Z)U.items=Z}else if(I.target==="openapi-3.0"){if(U.items={anyOf:T},Z)U.items.anyOf.push(Z);if(U.minItems=T.length,!Z)U.maxItems=T.length}else if(U.items=T,Z)U.additionalItems=Z;let{minimum:L,maximum:F}=$._zod.bag;if(typeof L==="number")U.minItems=L;if(typeof F==="number")U.maxItems=F},WX=($,I,D,X)=>{let U=D,Q=$._zod.def;U.type="object";let J=Q.keyType,T=J._zod.bag?.patterns;if(Q.mode==="loose"&&T&&T.size>0){let L=a$(Q.valueType,I,{...X,path:[...X.path,"patternProperties","*"]});U.patternProperties={};for(let F of T)U.patternProperties[F.source]=L}else{if(I.target==="draft-07"||I.target==="draft-2020-12")U.propertyNames=a$(Q.keyType,I,{...X,path:[...X.path,"propertyNames"]});U.additionalProperties=a$(Q.valueType,I,{...X,path:[...X.path,"additionalProperties"]})}let Z=J._zod.values;if(Z){let L=[...Z].filter((F)=>typeof F==="string"||typeof F==="number");if(L.length>0)U.required=L}},KX=($,I,D,X)=>{let U=$._zod.def,Q=a$(U.innerType,I,X),J=I.seen.get($);if(I.target==="openapi-3.0")J.ref=U.innerType,D.nullable=!0;else D.anyOf=[Q,{type:"null"}]},zX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType},SX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType,D.default=JSON.parse(JSON.stringify(U.defaultValue))},AX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);if(Q.ref=U.innerType,I.io==="input")D._prefault=JSON.parse(JSON.stringify(U.defaultValue))},FX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType;let J;try{J=U.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}D.default=J},HX=($,I,D,X)=>{let U=$._zod.def,Q=I.io==="input"?U.in._zod.def.type==="transform"?U.out:U.in:U.out;a$(Q,I,X);let J=I.seen.get($);J.ref=Q},ZX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType,D.readOnly=!0},LX=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType},Nv=($,I,D,X)=>{let U=$._zod.def;a$(U.innerType,I,X);let Q=I.seen.get($);Q.ref=U.innerType},EX=($,I,D,X)=>{let U=$._zod.innerType;a$(U,I,X);let Q=I.seen.get($);Q.ref=U},_v={string:uJ,number:hJ,boolean:pJ,bigint:lJ,symbol:bJ,null:rJ,undefined:oJ,void:nJ,never:dJ,any:mJ,unknown:tJ,date:iJ,enum:eJ,literal:aJ,nan:sJ,template_literal:$X,file:UX,success:IX,custom:vX,function:DX,transform:OX,map:JX,set:XX,array:QX,object:YX,union:jv,intersection:GX,tuple:VX,record:WX,nullable:KX,nonoptional:zX,default:SX,prefault:AX,catch:FX,pipe:HX,readonly:ZX,promise:LX,optional:Nv,lazy:EX};function Bv($,I){if("_idmap"in $){let X=$,U=_U({...I,processors:_v}),Q={};for(let T of X._idmap.entries()){let[Z,L]=T;a$(L,U)}let J={},A={registry:X,uri:I?.uri,defs:Q};U.external=A;for(let T of X._idmap.entries()){let[Z,L]=T;jU(U,L),J[Z]=NU(U,L)}if(Object.keys(Q).length>0){let T=U.target==="draft-2020-12"?"$defs":"definitions";J.__shared={[T]:Q}}return{schemas:J}}let D=_U({...I,processors:_v});return a$($,D),jU(D,$),NU(D,$)}class TX{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=_U({processors:_v,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return a$($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}jU(this.ctx,$);let D=NU(this.ctx,$),{"~standard":X,...U}=D;return U}}var SG={};var X6={};i0(X6,{xor:()=>XV,xid:()=>_G,void:()=>UV,uuidv7:()=>TG,uuidv6:()=>EG,uuidv4:()=>LG,uuid:()=>ZG,url:()=>MG,unknown:()=>dU,union:()=>J4,undefined:()=>sG,ulid:()=>CG,uint64:()=>eG,uint32:()=>mG,tuple:()=>IQ,transform:()=>Q4,templateLiteral:()=>LV,symbol:()=>aG,superRefine:()=>CQ,success:()=>FV,stringbool:()=>kV,stringFormat:()=>pG,string:()=>uv,strictObject:()=>OV,set:()=>WV,refine:()=>kQ,record:()=>vQ,readonly:()=>TQ,promise:()=>EV,preprocess:()=>_V,prefault:()=>SQ,pipe:()=>V6,partialRecord:()=>YV,optional:()=>Y6,object:()=>DV,number:()=>hX,nullish:()=>AV,nullable:()=>G6,null:()=>oX,nonoptional:()=>AQ,never:()=>O4,nativeEnum:()=>KV,nanoid:()=>RG,nan:()=>HV,meta:()=>RV,map:()=>VV,mac:()=>BG,looseRecord:()=>GV,looseObject:()=>JV,literal:()=>zV,lazy:()=>qQ,ksuid:()=>jG,keyof:()=>vV,jwt:()=>hG,json:()=>CV,ipv6:()=>xG,ipv4:()=>NG,intersection:()=>$Q,int64:()=>iG,int32:()=>dG,int:()=>hv,instanceof:()=>gV,httpUrl:()=>PG,hostname:()=>lG,hex:()=>bG,hash:()=>rG,guid:()=>HG,function:()=>TV,float64:()=>nG,float32:()=>oG,file:()=>SV,exactOptional:()=>GQ,enum:()=>X4,emoji:()=>qG,email:()=>FG,e164:()=>uG,discriminatedUnion:()=>QV,describe:()=>qV,date:()=>IV,custom:()=>PV,cuid2:()=>kG,cuid:()=>gG,codec:()=>ZV,cidrv6:()=>cG,cidrv4:()=>wG,check:()=>MV,catch:()=>ZQ,boolean:()=>pX,bigint:()=>tG,base64url:()=>yG,base64:()=>fG,array:()=>z6,any:()=>$V,_function:()=>TV,_default:()=>KQ,_ZodString:()=>pv,ZodXor:()=>eX,ZodXID:()=>mv,ZodVoid:()=>tX,ZodUnknown:()=>dX,ZodUnion:()=>A6,ZodUndefined:()=>bX,ZodUUID:()=>VU,ZodURL:()=>W6,ZodULID:()=>dv,ZodType:()=>d$,ZodTuple:()=>UQ,ZodTransform:()=>QQ,ZodTemplateLiteral:()=>MQ,ZodSymbol:()=>lX,ZodSuccess:()=>FQ,ZodStringFormat:()=>I0,ZodString:()=>RI,ZodSet:()=>OQ,ZodRecord:()=>F6,ZodReadonly:()=>EQ,ZodPromise:()=>RQ,ZodPrefault:()=>zQ,ZodPipe:()=>V4,ZodOptional:()=>Y4,ZodObject:()=>S6,ZodNumberFormat:()=>mU,ZodNumber:()=>kI,ZodNullable:()=>VQ,ZodNull:()=>rX,ZodNonOptional:()=>G4,ZodNever:()=>mX,ZodNanoID:()=>rv,ZodNaN:()=>LQ,ZodMap:()=>DQ,ZodMAC:()=>uX,ZodLiteral:()=>JQ,ZodLazy:()=>PQ,ZodKSUID:()=>tv,ZodJWT:()=>v4,ZodIntersection:()=>sX,ZodIPv6:()=>ev,ZodIPv4:()=>iv,ZodGUID:()=>Q6,ZodFunction:()=>gQ,ZodFile:()=>XQ,ZodExactOptional:()=>YQ,ZodEnum:()=>qI,ZodEmoji:()=>bv,ZodEmail:()=>lv,ZodE164:()=>I4,ZodDiscriminatedUnion:()=>aX,ZodDefault:()=>WQ,ZodDate:()=>K6,ZodCustomStringFormat:()=>gI,ZodCustom:()=>H6,ZodCodec:()=>W4,ZodCatch:()=>HQ,ZodCUID2:()=>nv,ZodCUID:()=>ov,ZodCIDRv6:()=>sv,ZodCIDRv4:()=>av,ZodBoolean:()=>CI,ZodBigIntFormat:()=>D4,ZodBigInt:()=>_I,ZodBase64URL:()=>U4,ZodBase64:()=>$4,ZodArray:()=>iX,ZodAny:()=>nX});var xv={};i0(xv,{uppercase:()=>WI,trim:()=>HI,toUpperCase:()=>LI,toLowerCase:()=>ZI,startsWith:()=>zI,slugify:()=>EI,size:()=>rU,regex:()=>GI,property:()=>Cv,positive:()=>qv,overwrite:()=>OU,normalize:()=>FI,nonpositive:()=>gv,nonnegative:()=>kv,negative:()=>Rv,multipleOf:()=>kU,minSize:()=>GU,minLength:()=>FU,mime:()=>AI,maxSize:()=>CU,maxLength:()=>oU,lte:()=>a0,lt:()=>QU,lowercase:()=>VI,length:()=>nU,includes:()=>KI,gte:()=>u0,gt:()=>YU,endsWith:()=>SI});var PI={};i0(PI,{time:()=>qX,duration:()=>RX,datetime:()=>MX,date:()=>PX,ZodISOTime:()=>fv,ZodISODuration:()=>yv,ZodISODateTime:()=>wv,ZodISODate:()=>cv});var wv=$$("ZodISODateTime",($,I)=>{JD.init($,I),I0.init($,I)});function MX($){return vJ(wv,$)}var cv=$$("ZodISODate",($,I)=>{XD.init($,I),I0.init($,I)});function PX($){return DJ(cv,$)}var fv=$$("ZodISOTime",($,I)=>{QD.init($,I),I0.init($,I)});function qX($){return OJ(fv,$)}var yv=$$("ZodISODuration",($,I)=>{YD.init($,I),I0.init($,I)});function RX($){return JJ(yv,$)}var AG=($,I)=>{oI.init($,I),$.name="ZodError",Object.defineProperties($,{format:{value:(D)=>dI($,D)},flatten:{value:(D)=>nI($,D)},addIssue:{value:(D)=>{$.issues.push(D),$.message=JSON.stringify($.issues,UI,2)}},addIssues:{value:(D)=>{$.issues.push(...D),$.message=JSON.stringify($.issues,UI,2)}},isEmpty:{get(){return $.issues.length===0}}})},tS=$$("ZodError",AG),o0=$$("ZodError",AG,{Parent:Error});var gX=DI(o0),kX=OI(o0),CX=JI(o0),_X=XI(o0),jX=f6(o0),NX=y6(o0),BX=u6(o0),xX=h6(o0),wX=p6(o0),cX=l6(o0),fX=b6(o0),yX=r6(o0);var d$=$$("ZodType",($,I)=>{return o$.init($,I),Object.assign($["~standard"],{jsonSchema:{input:MI($,"input"),output:MI($,"output")}}),$.toJSONSchema=yJ($,{}),$.def=I,$.type=I.type,Object.defineProperty($,"_def",{value:I}),$.check=(...D)=>{return $.clone(y$.mergeDefs(I,{checks:[...I.checks??[],...D.map((X)=>typeof X==="function"?{_zod:{check:X,def:{check:"custom"},onattach:[]}}:X)]}),{parent:!0})},$.with=$.check,$.clone=(D,X)=>y0($,D,X),$.brand=()=>$,$.register=(D,X)=>{return D.add($,X),$},$.parse=(D,X)=>gX($,D,X,{callee:$.parse}),$.safeParse=(D,X)=>CX($,D,X),$.parseAsync=async(D,X)=>kX($,D,X,{callee:$.parseAsync}),$.safeParseAsync=async(D,X)=>_X($,D,X),$.spa=$.safeParseAsync,$.encode=(D,X)=>jX($,D,X),$.decode=(D,X)=>NX($,D,X),$.encodeAsync=async(D,X)=>BX($,D,X),$.decodeAsync=async(D,X)=>xX($,D,X),$.safeEncode=(D,X)=>wX($,D,X),$.safeDecode=(D,X)=>cX($,D,X),$.safeEncodeAsync=async(D,X)=>fX($,D,X),$.safeDecodeAsync=async(D,X)=>yX($,D,X),$.refine=(D,X)=>$.check(kQ(D,X)),$.superRefine=(D)=>$.check(CQ(D)),$.overwrite=(D)=>$.check(OU(D)),$.optional=()=>Y6($),$.exactOptional=()=>GQ($),$.nullable=()=>G6($),$.nullish=()=>Y6(G6($)),$.nonoptional=(D)=>AQ($,D),$.array=()=>z6($),$.or=(D)=>J4([$,D]),$.and=(D)=>$Q($,D),$.transform=(D)=>V6($,Q4(D)),$.default=(D)=>KQ($,D),$.prefault=(D)=>SQ($,D),$.catch=(D)=>ZQ($,D),$.pipe=(D)=>V6($,D),$.readonly=()=>TQ($),$.describe=(D)=>{let X=$.clone();return x0.add(X,{description:D}),X},Object.defineProperty($,"description",{get(){return x0.get($)?.description},configurable:!0}),$.meta=(...D)=>{if(D.length===0)return x0.get($);let X=$.clone();return x0.add(X,D[0]),X},$.isOptional=()=>$.safeParse(void 0).success,$.isNullable=()=>$.safeParse(null).success,$.apply=(D)=>D($),$}),pv=$$("_ZodString",($,I)=>{bU.init($,I),d$.init($,I),$._zod.processJSONSchema=(X,U,Q)=>uJ($,X,U,Q);let D=$._zod.bag;$.format=D.format??null,$.minLength=D.minimum??null,$.maxLength=D.maximum??null,$.regex=(...X)=>$.check(GI(...X)),$.includes=(...X)=>$.check(KI(...X)),$.startsWith=(...X)=>$.check(zI(...X)),$.endsWith=(...X)=>$.check(SI(...X)),$.min=(...X)=>$.check(FU(...X)),$.max=(...X)=>$.check(oU(...X)),$.length=(...X)=>$.check(nU(...X)),$.nonempty=(...X)=>$.check(FU(1,...X)),$.lowercase=(X)=>$.check(VI(X)),$.uppercase=(X)=>$.check(WI(X)),$.trim=()=>$.check(HI()),$.normalize=(...X)=>$.check(FI(...X)),$.toLowerCase=()=>$.check(ZI()),$.toUpperCase=()=>$.check(LI()),$.slugify=()=>$.check(EI())}),RI=$$("ZodString",($,I)=>{bU.init($,I),pv.init($,I),$.email=(D)=>$.check(Ov(lv,D)),$.url=(D)=>$.check(J6(W6,D)),$.jwt=(D)=>$.check(Pv(v4,D)),$.emoji=(D)=>$.check(Gv(bv,D)),$.guid=(D)=>$.check(O6(Q6,D)),$.uuid=(D)=>$.check(Jv(VU,D)),$.uuidv4=(D)=>$.check(Xv(VU,D)),$.uuidv6=(D)=>$.check(Qv(VU,D)),$.uuidv7=(D)=>$.check(Yv(VU,D)),$.nanoid=(D)=>$.check(Vv(rv,D)),$.guid=(D)=>$.check(O6(Q6,D)),$.cuid=(D)=>$.check(Wv(ov,D)),$.cuid2=(D)=>$.check(Kv(nv,D)),$.ulid=(D)=>$.check(zv(dv,D)),$.base64=(D)=>$.check(Ev($4,D)),$.base64url=(D)=>$.check(Tv(U4,D)),$.xid=(D)=>$.check(Sv(mv,D)),$.ksuid=(D)=>$.check(Av(tv,D)),$.ipv4=(D)=>$.check(Fv(iv,D)),$.ipv6=(D)=>$.check(Hv(ev,D)),$.cidrv4=(D)=>$.check(Zv(av,D)),$.cidrv6=(D)=>$.check(Lv(sv,D)),$.e164=(D)=>$.check(Mv(I4,D)),$.datetime=(D)=>$.check(MX(D)),$.date=(D)=>$.check(PX(D)),$.time=(D)=>$.check(qX(D)),$.duration=(D)=>$.check(RX(D))});function uv($){return sO(RI,$)}var I0=$$("ZodStringFormat",($,I)=>{U0.init($,I),pv.init($,I)}),lv=$$("ZodEmail",($,I)=>{e1.init($,I),I0.init($,I)});function FG($){return Ov(lv,$)}var Q6=$$("ZodGUID",($,I)=>{t1.init($,I),I0.init($,I)});function HG($){return O6(Q6,$)}var VU=$$("ZodUUID",($,I)=>{i1.init($,I),I0.init($,I)});function ZG($){return Jv(VU,$)}function LG($){return Xv(VU,$)}function EG($){return Qv(VU,$)}function TG($){return Yv(VU,$)}var W6=$$("ZodURL",($,I)=>{a1.init($,I),I0.init($,I)});function MG($){return J6(W6,$)}function PG($){return J6(W6,{protocol:/^https?$/,hostname:UU.domain,...y$.normalizeParams($)})}var bv=$$("ZodEmoji",($,I)=>{s1.init($,I),I0.init($,I)});function qG($){return Gv(bv,$)}var rv=$$("ZodNanoID",($,I)=>{$D.init($,I),I0.init($,I)});function RG($){return Vv(rv,$)}var ov=$$("ZodCUID",($,I)=>{UD.init($,I),I0.init($,I)});function gG($){return Wv(ov,$)}var nv=$$("ZodCUID2",($,I)=>{ID.init($,I),I0.init($,I)});function kG($){return Kv(nv,$)}var dv=$$("ZodULID",($,I)=>{vD.init($,I),I0.init($,I)});function CG($){return zv(dv,$)}var mv=$$("ZodXID",($,I)=>{DD.init($,I),I0.init($,I)});function _G($){return Sv(mv,$)}var tv=$$("ZodKSUID",($,I)=>{OD.init($,I),I0.init($,I)});function jG($){return Av(tv,$)}var iv=$$("ZodIPv4",($,I)=>{GD.init($,I),I0.init($,I)});function NG($){return Fv(iv,$)}var uX=$$("ZodMAC",($,I)=>{WD.init($,I),I0.init($,I)});function BG($){return UJ(uX,$)}var ev=$$("ZodIPv6",($,I)=>{VD.init($,I),I0.init($,I)});function xG($){return Hv(ev,$)}var av=$$("ZodCIDRv4",($,I)=>{KD.init($,I),I0.init($,I)});function wG($){return Zv(av,$)}var sv=$$("ZodCIDRv6",($,I)=>{zD.init($,I),I0.init($,I)});function cG($){return Lv(sv,$)}var $4=$$("ZodBase64",($,I)=>{AD.init($,I),I0.init($,I)});function fG($){return Ev($4,$)}var U4=$$("ZodBase64URL",($,I)=>{FD.init($,I),I0.init($,I)});function yG($){return Tv(U4,$)}var I4=$$("ZodE164",($,I)=>{HD.init($,I),I0.init($,I)});function uG($){return Mv(I4,$)}var v4=$$("ZodJWT",($,I)=>{ZD.init($,I),I0.init($,I)});function hG($){return Pv(v4,$)}var gI=$$("ZodCustomStringFormat",($,I)=>{LD.init($,I),I0.init($,I)});function pG($,I,D={}){return TI(gI,$,I,D)}function lG($){return TI(gI,"hostname",UU.hostname,$)}function bG($){return TI(gI,"hex",UU.hex,$)}function rG($,I){let D=I?.enc??"hex",X=`${$}_${D}`,U=UU[X];if(!U)throw Error(`Unrecognized hash format: ${X}`);return TI(gI,X,U,I)}var kI=$$("ZodNumber",($,I)=>{$v.init($,I),d$.init($,I),$._zod.processJSONSchema=(X,U,Q)=>hJ($,X,U,Q),$.gt=(X,U)=>$.check(YU(X,U)),$.gte=(X,U)=>$.check(u0(X,U)),$.min=(X,U)=>$.check(u0(X,U)),$.lt=(X,U)=>$.check(QU(X,U)),$.lte=(X,U)=>$.check(a0(X,U)),$.max=(X,U)=>$.check(a0(X,U)),$.int=(X)=>$.check(hv(X)),$.safe=(X)=>$.check(hv(X)),$.positive=(X)=>$.check(YU(0,X)),$.nonnegative=(X)=>$.check(u0(0,X)),$.negative=(X)=>$.check(QU(0,X)),$.nonpositive=(X)=>$.check(a0(0,X)),$.multipleOf=(X,U)=>$.check(kU(X,U)),$.step=(X,U)=>$.check(kU(X,U)),$.finite=()=>$;let D=$._zod.bag;$.minValue=Math.max(D.minimum??Number.NEGATIVE_INFINITY,D.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,$.maxValue=Math.min(D.maximum??Number.POSITIVE_INFINITY,D.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,$.isInt=(D.format??"").includes("int")||Number.isSafeInteger(D.multipleOf??0.5),$.isFinite=!0,$.format=D.format??null});function hX($){return XJ(kI,$)}var mU=$$("ZodNumberFormat",($,I)=>{ED.init($,I),kI.init($,I)});function hv($){return YJ(mU,$)}function oG($){return GJ(mU,$)}function nG($){return VJ(mU,$)}function dG($){return WJ(mU,$)}function mG($){return KJ(mU,$)}var CI=$$("ZodBoolean",($,I)=>{eI.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>pJ($,D,X,U)});function pX($){return zJ(CI,$)}var _I=$$("ZodBigInt",($,I)=>{Uv.init($,I),d$.init($,I),$._zod.processJSONSchema=(X,U,Q)=>lJ($,X,U,Q),$.gte=(X,U)=>$.check(u0(X,U)),$.min=(X,U)=>$.check(u0(X,U)),$.gt=(X,U)=>$.check(YU(X,U)),$.gte=(X,U)=>$.check(u0(X,U)),$.min=(X,U)=>$.check(u0(X,U)),$.lt=(X,U)=>$.check(QU(X,U)),$.lte=(X,U)=>$.check(a0(X,U)),$.max=(X,U)=>$.check(a0(X,U)),$.positive=(X)=>$.check(YU(BigInt(0),X)),$.negative=(X)=>$.check(QU(BigInt(0),X)),$.nonpositive=(X)=>$.check(a0(BigInt(0),X)),$.nonnegative=(X)=>$.check(u0(BigInt(0),X)),$.multipleOf=(X,U)=>$.check(kU(X,U));let D=$._zod.bag;$.minValue=D.minimum??null,$.maxValue=D.maximum??null,$.format=D.format??null});function tG($){return AJ(_I,$)}var D4=$$("ZodBigIntFormat",($,I)=>{TD.init($,I),_I.init($,I)});function iG($){return HJ(D4,$)}function eG($){return ZJ(D4,$)}var lX=$$("ZodSymbol",($,I)=>{MD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>bJ($,D,X,U)});function aG($){return LJ(lX,$)}var bX=$$("ZodUndefined",($,I)=>{PD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>oJ($,D,X,U)});function sG($){return EJ(bX,$)}var rX=$$("ZodNull",($,I)=>{qD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>rJ($,D,X,U)});function oX($){return TJ(rX,$)}var nX=$$("ZodAny",($,I)=>{RD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>mJ($,D,X,U)});function $V(){return MJ(nX)}var dX=$$("ZodUnknown",($,I)=>{gD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>tJ($,D,X,U)});function dU(){return PJ(dX)}var mX=$$("ZodNever",($,I)=>{kD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>dJ($,D,X,U)});function O4($){return qJ(mX,$)}var tX=$$("ZodVoid",($,I)=>{CD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>nJ($,D,X,U)});function UV($){return RJ(tX,$)}var K6=$$("ZodDate",($,I)=>{_D.init($,I),d$.init($,I),$._zod.processJSONSchema=(X,U,Q)=>iJ($,X,U,Q),$.min=(X,U)=>$.check(u0(X,U)),$.max=(X,U)=>$.check(a0(X,U));let D=$._zod.bag;$.minDate=D.minimum?new Date(D.minimum):null,$.maxDate=D.maximum?new Date(D.maximum):null});function IV($){return gJ(K6,$)}var iX=$$("ZodArray",($,I)=>{jD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>QX($,D,X,U),$.element=I.element,$.min=(D,X)=>$.check(FU(D,X)),$.nonempty=(D)=>$.check(FU(1,D)),$.max=(D,X)=>$.check(oU(D,X)),$.length=(D,X)=>$.check(nU(D,X)),$.unwrap=()=>$.element});function z6($,I){return _J(iX,$,I)}function vV($){let I=$._zod.def.shape;return X4(Object.keys(I))}var S6=$$("ZodObject",($,I)=>{ND.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>YX($,D,X,U),y$.defineLazy($,"shape",()=>{return I.shape}),$.keyof=()=>X4(Object.keys($._zod.def.shape)),$.catchall=(D)=>$.clone({...$._zod.def,catchall:D}),$.passthrough=()=>$.clone({...$._zod.def,catchall:dU()}),$.loose=()=>$.clone({...$._zod.def,catchall:dU()}),$.strict=()=>$.clone({...$._zod.def,catchall:O4()}),$.strip=()=>$.clone({...$._zod.def,catchall:void 0}),$.extend=(D)=>{return y$.extend($,D)},$.safeExtend=(D)=>{return y$.safeExtend($,D)},$.merge=(D)=>y$.merge($,D),$.pick=(D)=>y$.pick($,D),$.omit=(D)=>y$.omit($,D),$.partial=(...D)=>y$.partial(Y4,$,D[0]),$.required=(...D)=>y$.required(G4,$,D[0])});function DV($,I){let D={type:"object",shape:$??{},...y$.normalizeParams(I)};return new S6(D)}function OV($,I){return new S6({type:"object",shape:$,catchall:O4(),...y$.normalizeParams(I)})}function JV($,I){return new S6({type:"object",shape:$,catchall:dU(),...y$.normalizeParams(I)})}var A6=$$("ZodUnion",($,I)=>{aI.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>jv($,D,X,U),$.options=I.options});function J4($,I){return new A6({type:"union",options:$,...y$.normalizeParams(I)})}var eX=$$("ZodXor",($,I)=>{A6.init($,I),BD.init($,I),$._zod.processJSONSchema=(D,X,U)=>jv($,D,X,U),$.options=I.options});function XV($,I){return new eX({type:"union",options:$,inclusive:!1,...y$.normalizeParams(I)})}var aX=$$("ZodDiscriminatedUnion",($,I)=>{A6.init($,I),xD.init($,I)});function QV($,I,D){return new aX({type:"union",options:I,discriminator:$,...y$.normalizeParams(D)})}var sX=$$("ZodIntersection",($,I)=>{wD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>GX($,D,X,U)});function $Q($,I){return new sX({type:"intersection",left:$,right:I})}var UQ=$$("ZodTuple",($,I)=>{Iv.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>VX($,D,X,U),$.rest=(D)=>$.clone({...$._zod.def,rest:D})});function IQ($,I,D){let X=I instanceof o$,U=X?D:I;return new UQ({type:"tuple",items:$,rest:X?I:null,...y$.normalizeParams(U)})}var F6=$$("ZodRecord",($,I)=>{cD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>WX($,D,X,U),$.keyType=I.keyType,$.valueType=I.valueType});function vQ($,I,D){return new F6({type:"record",keyType:$,valueType:I,...y$.normalizeParams(D)})}function YV($,I,D){let X=y0($);return X._zod.values=void 0,new F6({type:"record",keyType:X,valueType:I,...y$.normalizeParams(D)})}function GV($,I,D){return new F6({type:"record",keyType:$,valueType:I,mode:"loose",...y$.normalizeParams(D)})}var DQ=$$("ZodMap",($,I)=>{fD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>JX($,D,X,U),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...D)=>$.check(GU(...D)),$.nonempty=(D)=>$.check(GU(1,D)),$.max=(...D)=>$.check(CU(...D)),$.size=(...D)=>$.check(rU(...D))});function VV($,I,D){return new DQ({type:"map",keyType:$,valueType:I,...y$.normalizeParams(D)})}var OQ=$$("ZodSet",($,I)=>{yD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>XX($,D,X,U),$.min=(...D)=>$.check(GU(...D)),$.nonempty=(D)=>$.check(GU(1,D)),$.max=(...D)=>$.check(CU(...D)),$.size=(...D)=>$.check(rU(...D))});function WV($,I){return new OQ({type:"set",valueType:$,...y$.normalizeParams(I)})}var qI=$$("ZodEnum",($,I)=>{uD.init($,I),d$.init($,I),$._zod.processJSONSchema=(X,U,Q)=>eJ($,X,U,Q),$.enum=I.entries,$.options=Object.values(I.entries);let D=new Set(Object.keys(I.entries));$.extract=(X,U)=>{let Q={};for(let J of X)if(D.has(J))Q[J]=I.entries[J];else throw Error(`Key ${J} not found in enum`);return new qI({...I,checks:[],...y$.normalizeParams(U),entries:Q})},$.exclude=(X,U)=>{let Q={...I.entries};for(let J of X)if(D.has(J))delete Q[J];else throw Error(`Key ${J} not found in enum`);return new qI({...I,checks:[],...y$.normalizeParams(U),entries:Q})}});function X4($,I){let D=Array.isArray($)?Object.fromEntries($.map((X)=>[X,X])):$;return new qI({type:"enum",entries:D,...y$.normalizeParams(I)})}function KV($,I){return new qI({type:"enum",entries:$,...y$.normalizeParams(I)})}var JQ=$$("ZodLiteral",($,I)=>{hD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>aJ($,D,X,U),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function zV($,I){return new JQ({type:"literal",values:Array.isArray($)?$:[$],...y$.normalizeParams(I)})}var XQ=$$("ZodFile",($,I)=>{pD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>UX($,D,X,U),$.min=(D,X)=>$.check(GU(D,X)),$.max=(D,X)=>$.check(CU(D,X)),$.mime=(D,X)=>$.check(AI(Array.isArray(D)?D:[D],X))});function SV($){return jJ(XQ,$)}var QQ=$$("ZodTransform",($,I)=>{lD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>OX($,D,X,U),$._zod.parse=(D,X)=>{if(X.direction==="backward")throw new hU($.constructor.name);D.addIssue=(Q)=>{if(typeof Q==="string")D.issues.push(y$.issue(Q,D.value,I));else{let J=Q;if(J.fatal)J.continue=!1;J.code??(J.code="custom"),J.input??(J.input=D.value),J.inst??(J.inst=$),D.issues.push(y$.issue(J))}};let U=I.transform(D.value,D);if(U instanceof Promise)return U.then((Q)=>{return D.value=Q,D});return D.value=U,D}});function Q4($){return new QQ({type:"transform",transform:$})}var Y4=$$("ZodOptional",($,I)=>{vv.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>Nv($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function Y6($){return new Y4({type:"optional",innerType:$})}var YQ=$$("ZodExactOptional",($,I)=>{bD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>Nv($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function GQ($){return new YQ({type:"optional",innerType:$})}var VQ=$$("ZodNullable",($,I)=>{rD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>KX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function G6($){return new VQ({type:"nullable",innerType:$})}function AV($){return Y6(G6($))}var WQ=$$("ZodDefault",($,I)=>{oD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>SX($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function KQ($,I){return new WQ({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():y$.shallowClone(I)}})}var zQ=$$("ZodPrefault",($,I)=>{nD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>AX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function SQ($,I){return new zQ({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():y$.shallowClone(I)}})}var G4=$$("ZodNonOptional",($,I)=>{dD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>zX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function AQ($,I){return new G4({type:"nonoptional",innerType:$,...y$.normalizeParams(I)})}var FQ=$$("ZodSuccess",($,I)=>{mD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>IX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function FV($){return new FQ({type:"success",innerType:$})}var HQ=$$("ZodCatch",($,I)=>{tD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>FX($,D,X,U),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function ZQ($,I){return new HQ({type:"catch",innerType:$,catchValue:typeof I==="function"?I:()=>I})}var LQ=$$("ZodNaN",($,I)=>{iD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>sJ($,D,X,U)});function HV($){return CJ(LQ,$)}var V4=$$("ZodPipe",($,I)=>{eD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>HX($,D,X,U),$.in=I.in,$.out=I.out});function V6($,I){return new V4({type:"pipe",in:$,out:I})}var W4=$$("ZodCodec",($,I)=>{V4.init($,I),sI.init($,I)});function ZV($,I,D){return new W4({type:"pipe",in:$,out:I,transform:D.decode,reverseTransform:D.encode})}var EQ=$$("ZodReadonly",($,I)=>{aD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>ZX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function TQ($){return new EQ({type:"readonly",innerType:$})}var MQ=$$("ZodTemplateLiteral",($,I)=>{sD.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>$X($,D,X,U)});function LV($,I){return new MQ({type:"template_literal",parts:$,...y$.normalizeParams(I)})}var PQ=$$("ZodLazy",($,I)=>{IO.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>EX($,D,X,U),$.unwrap=()=>$._zod.def.getter()});function qQ($){return new PQ({type:"lazy",getter:$})}var RQ=$$("ZodPromise",($,I)=>{UO.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>LX($,D,X,U),$.unwrap=()=>$._zod.def.innerType});function EV($){return new RQ({type:"promise",innerType:$})}var gQ=$$("ZodFunction",($,I)=>{$O.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>DX($,D,X,U)});function TV($){return new gQ({type:"function",input:Array.isArray($?.input)?IQ($?.input):$?.input??z6(dU()),output:$?.output??dU()})}var H6=$$("ZodCustom",($,I)=>{vO.init($,I),d$.init($,I),$._zod.processJSONSchema=(D,X,U)=>vX($,D,X,U)});function MV($){let I=new D0({check:"custom"});return I._zod.check=$,I}function PV($,I){return NJ(H6,$??(()=>!0),I)}function kQ($,I={}){return BJ(H6,$,I)}function CQ($){return xJ($)}var qV=wJ,RV=cJ;function gV($,I={}){let D=new H6({type:"custom",check:"custom",fn:(X)=>X instanceof $,abort:!0,...y$.normalizeParams(I)});return D._zod.bag.Class=$,D._zod.check=(X)=>{if(!(X.value instanceof $))X.issues.push({code:"invalid_type",expected:$.name,input:X.value,inst:D,path:[...D._zod.def.path??[]]})},D}var kV=(...$)=>fJ({Codec:W4,Boolean:CI,String:RI},...$);function CV($){let I=qQ(()=>{return J4([uv($),hX(),pX(),oX(),z6(I),vQ(uv(),I)])});return I}function _V($,I){return V6(Q4($),I)}var eS={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function aS($){V0({customError:$})}function sS(){return V0().customError}var _Q;(function($){})(_Q||(_Q={}));var l$={...X6,...xv,iso:PI},$A=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function UA($,I){let D=$.$schema;if(D==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(D==="http://json-schema.org/draft-07/schema#")return"draft-7";if(D==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function IA($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let D=$.slice(1).split("/").filter(Boolean);if(D.length===0)return I.rootSchema;let X=I.version==="draft-2020-12"?"$defs":"definitions";if(D[0]===X){let U=D[1];if(!U||!I.defs[U])throw Error(`Reference not found: ${$}`);return I.defs[U]}throw Error(`Reference not found: ${$}`)}function jV($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return l$.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let U=$.$ref;if(I.refs.has(U))return I.refs.get(U);if(I.processing.has(U))return l$.lazy(()=>{if(!I.refs.has(U))throw Error(`Circular reference not resolved: ${U}`);return I.refs.get(U)});I.processing.add(U);let Q=IA(U,I),J=f0(Q,I);return I.refs.set(U,J),I.processing.delete(U),J}if($.enum!==void 0){let U=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&U.length===1&&U[0]===null)return l$.null();if(U.length===0)return l$.never();if(U.length===1)return l$.literal(U[0]);if(U.every((J)=>typeof J==="string"))return l$.enum(U);let Q=U.map((J)=>l$.literal(J));if(Q.length<2)return Q[0];return l$.union([Q[0],Q[1],...Q.slice(2)])}if($.const!==void 0)return l$.literal($.const);let D=$.type;if(Array.isArray(D)){let U=D.map((Q)=>{let J={...$,type:Q};return jV(J,I)});if(U.length===0)return l$.never();if(U.length===1)return U[0];return l$.union(U)}if(!D)return l$.any();let X;switch(D){case"string":{let U=l$.string();if($.format){let Q=$.format;if(Q==="email")U=U.check(l$.email());else if(Q==="uri"||Q==="uri-reference")U=U.check(l$.url());else if(Q==="uuid"||Q==="guid")U=U.check(l$.uuid());else if(Q==="date-time")U=U.check(l$.iso.datetime());else if(Q==="date")U=U.check(l$.iso.date());else if(Q==="time")U=U.check(l$.iso.time());else if(Q==="duration")U=U.check(l$.iso.duration());else if(Q==="ipv4")U=U.check(l$.ipv4());else if(Q==="ipv6")U=U.check(l$.ipv6());else if(Q==="mac")U=U.check(l$.mac());else if(Q==="cidr")U=U.check(l$.cidrv4());else if(Q==="cidr-v6")U=U.check(l$.cidrv6());else if(Q==="base64")U=U.check(l$.base64());else if(Q==="base64url")U=U.check(l$.base64url());else if(Q==="e164")U=U.check(l$.e164());else if(Q==="jwt")U=U.check(l$.jwt());else if(Q==="emoji")U=U.check(l$.emoji());else if(Q==="nanoid")U=U.check(l$.nanoid());else if(Q==="cuid")U=U.check(l$.cuid());else if(Q==="cuid2")U=U.check(l$.cuid2());else if(Q==="ulid")U=U.check(l$.ulid());else if(Q==="xid")U=U.check(l$.xid());else if(Q==="ksuid")U=U.check(l$.ksuid())}if(typeof $.minLength==="number")U=U.min($.minLength);if(typeof $.maxLength==="number")U=U.max($.maxLength);if($.pattern)U=U.regex(new RegExp($.pattern));X=U;break}case"number":case"integer":{let U=D==="integer"?l$.number().int():l$.number();if(typeof $.minimum==="number")U=U.min($.minimum);if(typeof $.maximum==="number")U=U.max($.maximum);if(typeof $.exclusiveMinimum==="number")U=U.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")U=U.gt($.minimum);if(typeof $.exclusiveMaximum==="number")U=U.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")U=U.lt($.maximum);if(typeof $.multipleOf==="number")U=U.multipleOf($.multipleOf);X=U;break}case"boolean":{X=l$.boolean();break}case"null":{X=l$.null();break}case"object":{let U={},Q=$.properties||{},J=new Set($.required||[]);for(let[T,Z]of Object.entries(Q)){let L=f0(Z,I);U[T]=J.has(T)?L:L.optional()}if($.propertyNames){let T=f0($.propertyNames,I),Z=$.additionalProperties&&typeof $.additionalProperties==="object"?f0($.additionalProperties,I):l$.any();if(Object.keys(U).length===0){X=l$.record(T,Z);break}let L=l$.object(U).passthrough(),F=l$.looseRecord(T,Z);X=l$.intersection(L,F);break}if($.patternProperties){let T=$.patternProperties,Z=Object.keys(T),L=[];for(let E of Z){let P=f0(T[E],I),R=l$.string().regex(new RegExp(E));L.push(l$.looseRecord(R,P))}let F=[];if(Object.keys(U).length>0)F.push(l$.object(U).passthrough());if(F.push(...L),F.length===0)X=l$.object({}).passthrough();else if(F.length===1)X=F[0];else{let E=l$.intersection(F[0],F[1]);for(let P=2;P<F.length;P++)E=l$.intersection(E,F[P]);X=E}break}let A=l$.object(U);if($.additionalProperties===!1)X=A.strict();else if(typeof $.additionalProperties==="object")X=A.catchall(f0($.additionalProperties,I));else X=A.passthrough();break}case"array":{let{prefixItems:U,items:Q}=$;if(U&&Array.isArray(U)){let J=U.map((T)=>f0(T,I)),A=Q&&typeof Q==="object"&&!Array.isArray(Q)?f0(Q,I):void 0;if(A)X=l$.tuple(J).rest(A);else X=l$.tuple(J);if(typeof $.minItems==="number")X=X.check(l$.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(l$.maxLength($.maxItems))}else if(Array.isArray(Q)){let J=Q.map((T)=>f0(T,I)),A=$.additionalItems&&typeof $.additionalItems==="object"?f0($.additionalItems,I):void 0;if(A)X=l$.tuple(J).rest(A);else X=l$.tuple(J);if(typeof $.minItems==="number")X=X.check(l$.minLength($.minItems));if(typeof $.maxItems==="number")X=X.check(l$.maxLength($.maxItems))}else if(Q!==void 0){let J=f0(Q,I),A=l$.array(J);if(typeof $.minItems==="number")A=A.min($.minItems);if(typeof $.maxItems==="number")A=A.max($.maxItems);X=A}else X=l$.array(l$.any());break}default:throw Error(`Unsupported type: ${D}`)}if($.description)X=X.describe($.description);if($.default!==void 0)X=X.default($.default);return X}function f0($,I){if(typeof $==="boolean")return $?l$.any():l$.never();let D=jV($,I),X=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let A=$.anyOf.map((Z)=>f0(Z,I)),T=l$.union(A);D=X?l$.intersection(D,T):T}if($.oneOf&&Array.isArray($.oneOf)){let A=$.oneOf.map((Z)=>f0(Z,I)),T=l$.xor(A);D=X?l$.intersection(D,T):T}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)D=X?D:l$.any();else{let A=X?D:f0($.allOf[0],I),T=X?0:1;for(let Z=T;Z<$.allOf.length;Z++)A=l$.intersection(A,f0($.allOf[Z],I));D=A}if($.nullable===!0&&I.version==="openapi-3.0")D=l$.nullable(D);if($.readOnly===!0)D=l$.readonly(D);let U={},Q=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let A of Q)if(A in $)U[A]=$[A];let J=["contentEncoding","contentMediaType","contentSchema"];for(let A of J)if(A in $)U[A]=$[A];for(let A of Object.keys($))if(!$A.has(A))U[A]=$[A];if(Object.keys(U).length>0)I.registry.add(D,U);return D}function NV($,I){if(typeof $==="boolean")return $?l$.any():l$.never();let D=UA($,I?.defaultTarget),X=$.$defs||$.definitions||{},U={version:D,defs:X,refs:new Map,processing:new Set,rootSchema:$,registry:I?.registry??x0};return f0($,U)}var jQ={};i0(jQ,{string:()=>vA,number:()=>DA,date:()=>XA,boolean:()=>OA,bigint:()=>JA});function vA($){return $J(RI,$)}function DA($){return QJ(kI,$)}function OA($){return SJ(CI,$)}function JA($){return FJ(_I,$)}function XA($){return kJ(K6,$)}V0($6());var BU;((B)=>{B.MESSAGE_SENT="message.sent";B.MESSAGE_DELIVERED="message.delivered";B.MESSAGE_FAILED="message.failed";B.MESSAGE_CLICKED="message.clicked";B.MESSAGE_READ="message.read";B.TEMPLATE_CREATED="template.created";B.TEMPLATE_APPROVED="template.approved";B.TEMPLATE_REJECTED="template.rejected";B.TEMPLATE_UPDATED="template.updated";B.TEMPLATE_DELETED="template.deleted";B.CHANNEL_CREATED="channel.created";B.CHANNEL_VERIFIED="channel.verified";B.SENDER_NUMBER_ADDED="sender_number.added";B.SENDER_NUMBER_VERIFIED="sender_number.verified";B.QUOTA_WARNING="system.quota_warning";B.QUOTA_EXCEEDED="system.quota_exceeded";B.PROVIDER_ERROR="system.provider_error";B.SYSTEM_MAINTENANCE="system.maintenance";B.ANOMALY_DETECTED="analytics.anomaly_detected";B.THRESHOLD_EXCEEDED="analytics.threshold_exceeded"})(BU||={});var bE=b$.object({id:b$.string(),type:b$.string(),timestamp:b$.date(),data:b$.any(),metadata:b$.object({providerId:b$.string().optional(),channelId:b$.string().optional(),templateId:b$.string().optional(),messageId:b$.string().optional(),userId:b$.string().optional(),organizationId:b$.string().optional(),correlationId:b$.string().optional(),retryCount:b$.number().optional()}),version:b$.string()}),rE=b$.object({id:b$.string(),url:b$.string().url(),name:b$.string().optional(),description:b$.string().optional(),active:b$.boolean(),events:b$.array(b$.string()),headers:b$.record(b$.string(),b$.string()).optional(),secret:b$.string().optional(),retryConfig:b$.object({maxRetries:b$.number().min(0).max(10),retryDelayMs:b$.number().min(1000),backoffMultiplier:b$.number().min(1).max(5)}).optional(),filters:b$.object({providerId:b$.array(b$.string()).optional(),channelId:b$.array(b$.string()).optional(),templateId:b$.array(b$.string()).optional()}).optional(),createdAt:b$.date(),updatedAt:b$.date(),lastTriggeredAt:b$.date().optional(),status:b$.enum(["active","inactive","error","suspended"])}),oE=b$.object({id:b$.string(),endpointId:b$.string(),eventId:b$.string(),url:b$.string().url(),httpMethod:b$.enum(["POST","PUT","PATCH"]),headers:b$.record(b$.string(),b$.string()),payload:b$.string(),attempts:b$.array(b$.object({attemptNumber:b$.number(),timestamp:b$.date(),httpStatus:b$.number().optional(),responseBody:b$.string().optional(),responseHeaders:b$.record(b$.string(),b$.string()).optional(),error:b$.string().optional(),latencyMs:b$.number()})),status:b$.enum(["pending","success","failed","exhausted"]),createdAt:b$.date(),completedAt:b$.date().optional(),nextRetryAt:b$.date().optional()});class BV extends W0{config;endpoints=new Map;indexByUrl=new Map;indexByEvent=new Map;indexByStatus=new Map;defaultConfig={type:"memory",retentionDays:90,enableEncryption:!1};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((I)=>{this.emit("loadError",I)})}async addEndpoint($){if(this.indexByUrl.has($.url)){if(this.indexByUrl.get($.url)!==$.id)throw Error(`Endpoint with URL ${$.url} already exists with different ID`)}let I=this.endpoints.get($.id);if(I)this.removeFromIndexes(I);if(this.endpoints.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.saveToFile();this.emit("endpointAdded",{endpointId:$.id,url:$.url})}async updateEndpoint($,I){let D=this.endpoints.get($);if(!D)throw Error(`Endpoint ${$} not found`);if(I.url&&I.url!==D.url){if(this.indexByUrl.has(I.url)){if(this.indexByUrl.get(I.url)!==$)throw Error(`Endpoint with URL ${I.url} already exists`)}}this.removeFromIndexes(D);let X={...D,...I,updatedAt:new Date};if(this.endpoints.set($,X),this.addToIndexes(X),this.config.type==="file")await this.saveToFile();return this.emit("endpointUpdated",{endpointId:$,changes:Object.keys(I),oldUrl:D.url,newUrl:X.url}),X}async removeEndpoint($){let I=this.endpoints.get($);if(!I)return!1;if(this.removeFromIndexes(I),this.endpoints.delete($),this.config.type==="file")await this.saveToFile();return this.emit("endpointRemoved",{endpointId:$,url:I.url}),!0}async getEndpoint($){return this.endpoints.get($)||null}async getEndpointByUrl($){let I=this.indexByUrl.get($);return I?this.endpoints.get(I)||null:null}async searchEndpoints($={},I={page:1,limit:100}){let D=null;if($.status){let Z=this.indexByStatus.get($.status);D=Z?new Set(Z):new Set}if($.events&&$.events.length>0){let Z=new Set;for(let L of $.events){let F=this.indexByEvent.get(L);if(F)F.forEach((E)=>{Z.add(E)})}if(D)D=new Set(Array.from(D).filter((L)=>Z.has(L)));else D=Z}if(!D)D=new Set(this.endpoints.keys());let X=Array.from(D).map((Z)=>this.endpoints.get(Z)).filter((Z)=>this.matchesFilter(Z,$));if(I.sortBy)X.sort((Z,L)=>{let F=this.getFieldValue(Z,I.sortBy),E=this.getFieldValue(L,I.sortBy),P=0;if(F<E)P=-1;else if(F>E)P=1;return I.sortOrder==="desc"?-P:P});let U=X.length,Q=Math.ceil(U/I.limit),J=(I.page-1)*I.limit,A=J+I.limit;return{items:X.slice(J,A),totalCount:U,page:I.page,totalPages:Q,hasNext:I.page<Q,hasPrevious:I.page>1}}async getActiveEndpointsForEvent($){let I=this.indexByEvent.get($);if(!I)return[];return Array.from(I).map((D)=>this.endpoints.get(D)).filter((D)=>D.status==="active")}getStats(){let $=this.endpoints.size,I=this.indexByStatus.get("active")?.size||0,D=this.indexByStatus.get("inactive")?.size||0,X=this.indexByStatus.get("error")?.size||0,U=this.indexByStatus.get("suspended")?.size||0,Q={};for(let[J,A]of this.indexByEvent.entries())Q[J]=A.size;return{totalEndpoints:$,activeEndpoints:I,inactiveEndpoints:D,errorEndpoints:X,suspendedEndpoints:U,eventSubscriptions:Q}}async cleanupExpiredEndpoints(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let I=Array.from(this.endpoints.values()).filter((D)=>{return D.status==="inactive"&&(!D.lastTriggeredAt||D.lastTriggeredAt<$)});for(let D of I)await this.removeEndpoint(D.id);if(I.length>0)this.emit("expiredEndpointsCleanup",{removedCount:I.length,cutoffDate:$});return I.length}initializeIndexes(){let $=Object.values(BU);for(let D of $)this.indexByEvent.set(D,new Set);let I=["active","inactive","error","suspended"];for(let D of I)this.indexByStatus.set(D,new Set)}addToIndexes($){this.indexByUrl.set($.url,$.id);let I=this.indexByStatus.get($.status);if(I)I.add($.id);for(let D of $.events){let X=this.indexByEvent.get(D);if(X)X.add($.id)}}removeFromIndexes($){this.indexByUrl.delete($.url);let I=this.indexByStatus.get($.status);if(I)I.delete($.id);for(let D of $.events){let X=this.indexByEvent.get(D);if(X)X.delete($.id)}}matchesFilter($,I){if(I.providerId&&I.providerId.length>0){if(!I.providerId.some((X)=>$.filters?.providerId?.includes(X)))return!1}if(I.channelId&&I.channelId.length>0){if(!I.channelId.some((X)=>$.filters?.channelId?.includes(X)))return!1}if(I.createdAfter&&$.createdAt<I.createdAfter)return!1;if(I.createdBefore&&$.createdAt>I.createdBefore)return!1;if(I.lastTriggeredAfter&&(!$.lastTriggeredAt||$.lastTriggeredAt<I.lastTriggeredAfter))return!1;if(I.lastTriggeredBefore&&(!$.lastTriggeredAt||$.lastTriggeredAt>I.lastTriggeredBefore))return!1;return!0}getFieldValue($,I){return I.split(".").reduce((D,X)=>D?.[X],$)}async loadFromFile(){if(!this.config.filePath)return;try{let $=await jI.readFile(this.config.filePath,"utf8"),I=JSON.parse($);for(let D of I.endpoints||[]){let X={...D,createdAt:new Date(D.createdAt),updatedAt:new Date(D.updatedAt),lastTriggeredAt:D.lastTriggeredAt?new Date(D.lastTriggeredAt):void 0};this.endpoints.set(X.id,X),this.addToIndexes(X)}this.emit("dataLoaded",{filePath:this.config.filePath,endpointCount:this.endpoints.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $={endpoints:Array.from(this.endpoints.values()),savedAt:new Date().toISOString()},I=JSON.stringify($,null,2);await jI.mkdir(SU(this.config.filePath),{recursive:!0}),await jI.writeFile(this.config.filePath,I,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,endpointCount:this.endpoints.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{endpointCount:this.endpoints.size})}}DU();var xU=(()=>({}));class xV extends W0{config;events=new Map;indexByType=new Map;indexByDate=new Map;indexByProvider=new Map;indexByChannel=new Map;cleanupInterval=null;defaultConfig={type:"memory",retentionDays:7,enableCompression:!1,maxMemoryUsage:52428800};constructor($={}){super();if(this.config={...this.defaultConfig,...$},this.initializeIndexes(),this.startCleanupTask(),this.config.type==="file"&&this.config.filePath)this.loadFromFile().catch((I)=>{this.emit("loadError",I)})}async saveEvent($){if(this.events.has($.id)){this.emit("duplicateEvent",{eventId:$.id});return}if(this.config.type==="memory"&&this.config.maxMemoryUsage)await this.checkMemoryUsage();if(this.events.set($.id,$),this.addToIndexes($),this.config.type==="file")await this.appendToFile($);this.emit("eventSaved",{eventId:$.id,type:$.type,providerId:$.metadata.providerId})}async getEvent($){return this.events.get($)||null}async searchEvents($={},I={page:1,limit:100}){let D=null;if($.type&&$.type.length>0){let Z=new Set;for(let L of $.type){let F=this.indexByType.get(L);if(F)F.forEach((E)=>{Z.add(E)})}D=Z}if($.providerId&&$.providerId.length>0){let Z=new Set;for(let L of $.providerId){let F=this.indexByProvider.get(L);if(F)F.forEach((E)=>{Z.add(E)})}if(D)D=new Set(Array.from(D).filter((L)=>Z.has(L)));else D=Z}if($.channelId&&$.channelId.length>0){let Z=new Set;for(let L of $.channelId){let F=this.indexByChannel.get(L);if(F)F.forEach((E)=>{Z.add(E)})}if(D)D=new Set(Array.from(D).filter((L)=>Z.has(L)));else D=Z}if($.createdAfter||$.createdBefore){let Z=this.getEventIdsByDateRange($.createdAfter,$.createdBefore);if(D)D=new Set(Array.from(D).filter((L)=>Z.has(L)));else D=Z}if(!D)D=new Set(this.events.keys());let X=Array.from(D).map((Z)=>this.events.get(Z)).filter((Z)=>this.matchesFilter(Z,$));X.sort((Z,L)=>{if(I.sortBy==="timestamp"||!I.sortBy){let R=L.timestamp.getTime()-Z.timestamp.getTime();return I.sortOrder==="asc"?-R:R}let F=this.getFieldValue(Z,I.sortBy),E=this.getFieldValue(L,I.sortBy),P=0;if(F<E)P=-1;else if(F>E)P=1;return I.sortOrder==="desc"?-P:P});let U=X.length,Q=Math.ceil(U/I.limit),J=(I.page-1)*I.limit,A=J+I.limit;return{items:X.slice(J,A),totalCount:U,page:I.page,totalPages:Q,hasNext:I.page<Q,hasPrevious:I.page>1}}async getEventsByType($,I=100){let D=this.indexByType.get($);if(!D)return[];return Array.from(D).map((X)=>this.events.get(X)).sort((X,U)=>U.timestamp.getTime()-X.timestamp.getTime()).slice(0,I)}async getEventStats($){let I={createdAfter:$?.start,createdBefore:$?.end},X=(await this.searchEvents(I,{page:1,limit:1e4})).items,U={};for(let T of Object.values(BU))U[T]=0;let Q={},J={},A={};for(let T of X){if(U[T.type]++,T.metadata.providerId)Q[T.metadata.providerId]=(Q[T.metadata.providerId]||0)+1;if(T.metadata.channelId)J[T.metadata.channelId]=(J[T.metadata.channelId]||0)+1;let Z=T.timestamp.toISOString().substring(0,13);A[Z]=(A[Z]||0)+1}return{totalEvents:X.length,eventsByType:U,eventsByProvider:Q,eventsByChannel:J,eventsPerHour:A}}async cleanupOldEvents(){if(!this.config.retentionDays)return 0;let $=new Date;$.setDate($.getDate()-this.config.retentionDays);let I=Array.from(this.events.values()).filter((D)=>D.timestamp<$);for(let D of I)this.removeFromIndexes(D),this.events.delete(D.id);if(I.length>0){if(this.emit("oldEventsCleanup",{removedCount:I.length,cutoffDate:$}),this.config.type==="file")await this.saveToFile()}return I.length}async cleanupDuplicateEvents(){let $=new Map;for(let D of this.events.values()){let X=this.generateContentKey(D);if(!$.has(X))$.set(X,[]);$.get(X).push(D)}let I=0;for(let[D,X]of $.entries())if(X.length>1){X.sort((U,Q)=>Q.timestamp.getTime()-U.timestamp.getTime());for(let U=1;U<X.length;U++){let Q=X[U];this.removeFromIndexes(Q),this.events.delete(Q.id),I++}}if(I>0){if(this.emit("duplicateEventsCleanup",{removedCount:I}),this.config.type==="file")await this.saveToFile()}return I}getStorageStats(){let $=this.estimateMemoryUsage();return{totalEvents:this.events.size,memoryUsage:$,indexSizes:{byType:this.indexByType.size,byDate:this.indexByDate.size,byProvider:this.indexByProvider.size,byChannel:this.indexByChannel.size}}}initializeIndexes(){let $=Object.values(BU);for(let I of $)this.indexByType.set(I,new Set)}addToIndexes($){let I=this.indexByType.get($.type);if(I)I.add($.id);let D=$.timestamp.toISOString().split("T")[0];if(!this.indexByDate.has(D))this.indexByDate.set(D,new Set);if(this.indexByDate.get(D).add($.id),$.metadata.providerId){if(!this.indexByProvider.has($.metadata.providerId))this.indexByProvider.set($.metadata.providerId,new Set);this.indexByProvider.get($.metadata.providerId).add($.id)}if($.metadata.channelId){if(!this.indexByChannel.has($.metadata.channelId))this.indexByChannel.set($.metadata.channelId,new Set);this.indexByChannel.get($.metadata.channelId).add($.id)}}removeFromIndexes($){let I=this.indexByType.get($.type);if(I)I.delete($.id);let D=$.timestamp.toISOString().split("T")[0],X=this.indexByDate.get(D);if(X){if(X.delete($.id),X.size===0)this.indexByDate.delete(D)}if($.metadata.providerId){let U=this.indexByProvider.get($.metadata.providerId);if(U){if(U.delete($.id),U.size===0)this.indexByProvider.delete($.metadata.providerId)}}if($.metadata.channelId){let U=this.indexByChannel.get($.metadata.channelId);if(U){if(U.delete($.id),U.size===0)this.indexByChannel.delete($.metadata.channelId)}}}getEventIdsByDateRange($,I){let D=new Set;for(let[X,U]of this.indexByDate.entries()){let Q=new Date(X);if($&&Q<$)continue;if(I&&Q>I)continue;U.forEach((J)=>{D.add(J)})}return D}matchesFilter($,I){if(I.templateId&&I.templateId.length>0){if(!$.metadata.templateId||!I.templateId.includes($.metadata.templateId))return!1}if(I.messageId&&I.messageId.length>0){if(!$.metadata.messageId||!I.messageId.includes($.metadata.messageId))return!1}if(I.userId&&I.userId.length>0){if(!$.metadata.userId||!I.userId.includes($.metadata.userId))return!1}if(I.organizationId&&I.organizationId.length>0){if(!$.metadata.organizationId||!I.organizationId.includes($.metadata.organizationId))return!1}return!0}getFieldValue($,I){return I.split(".").reduce((D,X)=>D?.[X],$)}estimateMemoryUsage(){let $=0;for(let I of this.events.values())$+=JSON.stringify(I).length*2;return $}async checkMemoryUsage(){if(!this.config.maxMemoryUsage)return;let $=this.estimateMemoryUsage();if($>this.config.maxMemoryUsage){let I=Array.from(this.events.values()).sort((U,Q)=>U.timestamp.getTime()-Q.timestamp.getTime()),D=0,X=this.config.maxMemoryUsage*0.8;for(let U of I){if(this.estimateMemoryUsage()<=X)break;this.removeFromIndexes(U),this.events.delete(U.id),D++}if(D>0)this.emit("memoryCleanup",{removedCount:D,previousUsage:$,currentUsage:this.estimateMemoryUsage()})}}generateContentKey($){return`${$.type}_${$.metadata.messageId||""}_${$.metadata.templateId||""}_${JSON.stringify($.data)}`}startCleanupTask(){this.cleanupInterval=setInterval(async()=>{try{await this.cleanupOldEvents(),await this.cleanupDuplicateEvents()}catch($){this.emit("cleanupError",$)}},3600000)}async appendToFile($){if(!this.config.filePath)return;try{let I=JSON.stringify($)+`
60
+ `;await xU.appendFile(this.config.filePath,I,"utf8")}catch(I){this.emit("appendError",I)}}async loadFromFile(){if(!this.config.filePath)return;try{let I=(await xU.readFile(this.config.filePath,"utf8")).trim().split(`
61
+ `).filter((D)=>D.trim());for(let D of I)try{let X=JSON.parse(D),U={...X,timestamp:new Date(X.timestamp)};this.events.set(U.id,U),this.addToIndexes(U)}catch(X){this.emit("parseError",{line:D,error:X})}this.emit("dataLoaded",{filePath:this.config.filePath,eventCount:this.events.size})}catch($){if($.code!=="ENOENT")this.emit("loadError",$)}}async saveToFile(){if(!this.config.filePath)return;try{let $=Array.from(this.events.values()).map((I)=>JSON.stringify(I)).join(`
62
+ `);await xU.mkdir(SU(this.config.filePath),{recursive:!0}),await xU.writeFile(this.config.filePath,$+`
63
+ `,"utf8"),this.emit("dataSaved",{filePath:this.config.filePath,eventCount:this.events.size})}catch($){throw this.emit("saveError",$),$}}async shutdown(){if(this.cleanupInterval)clearInterval(this.cleanupInterval),this.cleanupInterval=null;if(this.config.type==="file")await this.saveToFile().catch(($)=>{this.emit("saveError",$)});this.emit("shutdown",{eventCount:this.events.size})}}class K4{config;constructor($){this.config={maxRetries:$.maxRetries,baseDelayMs:$.retryDelayMs,maxDelayMs:$.maxDelayMs||300000,backoffMultiplier:$.backoffMultiplier||2,jitter:$.jitter!==!1}}calculateNextRetry($){if($>=this.config.maxRetries)throw Error(`Maximum retry attempts (${this.config.maxRetries}) exceeded`);let I=this.config.baseDelayMs*this.config.backoffMultiplier**$;if(I=Math.min(I,this.config.maxDelayMs),this.config.jitter)I=I*(0.5+Math.random()*0.5);return new Date(Date.now()+I)}shouldRetry($,I){if($>=this.config.maxRetries)return!1;if(I)return this.isRetryableError(I);return!0}isRetryableError($){let I=$.message.toLowerCase();return["timeout","network","connection","econnreset","enotfound","econnrefused","socket hang up"].some((X)=>I.includes(X))}shouldRetryStatus($){if($>=400&&$<500)return[408,429].includes($);if($>=500)return!0;return!1}calculateRetryStats($){if($.length===0)return{totalAttempts:0,successfulAttempts:0,failedAttempts:0,averageDelayMs:0,totalTimeMs:0};let I=$.filter((J)=>J.success).length,D=$.length-I,X=0;for(let J=1;J<$.length;J++)X+=$[J].timestamp.getTime()-$[J-1].timestamp.getTime();let U=$.length>1?X/($.length-1):0,Q=$.length>0?$[$.length-1].timestamp.getTime()-$[0].timestamp.getTime():0;return{totalAttempts:$.length,successfulAttempts:I,failedAttempts:D,averageDelayMs:U,totalTimeMs:Q}}updateConfig($){this.config={...this.config,...$}}getConfig(){return{...this.config}}getBackoffDelay($){let I=this.config.baseDelayMs*this.config.backoffMultiplier**$;return Math.min(I,this.config.maxDelayMs)}}t0();class C4{config;constructor($){this.config={algorithm:$.algorithm||"sha256",header:$.signatureHeader||"X-Webhook-Signature",prefix:$.signaturePrefix||"sha256="}}generateSignature($,I){let D=VY(this.config.algorithm,I);D.update($,"utf8");let X=D.digest("hex");return this.config.prefix?`${this.config.prefix}${X}`:X}verifySignature($,I,D){try{let X=this.generateSignature($,D);return this.constantTimeCompare(I,X)}catch(X){return console.error("Signature verification failed:",X),!1}}extractSignature($){let I=this.config.header.toLowerCase();for(let[D,X]of Object.entries($))if(D.toLowerCase()===I)return X;return null}createSecurityHeaders($,I){let D=this.generateSignature($,I),X=Math.floor(Date.now()/1000).toString();return{[this.config.header]:D,"X-Webhook-Timestamp":X,"X-Webhook-ID":this.generateWebhookId(),"User-Agent":"K-Message-Webhook/1.0"}}verifyTimestamp($,I=300){try{let D=parseInt($,10),X=Math.floor(Date.now()/1000);return Math.abs(X-D)<=I}catch(D){return!1}}generateWebhookId(){return`wh_${GY(16).toString("hex")}`}constantTimeCompare($,I){if($.length!==I.length)return!1;let D=0;for(let X=0;X<$.length;X++)D|=$.charCodeAt(X)^I.charCodeAt(X);return D===0}updateConfig($){this.config={...this.config,...$}}getConfig(){return{...this.config}}}class WY{async fetch($,I){return fetch($,I)}}class iW{responses=new Map;setMockResponse($,I){this.responses.set($,I)}async fetch($,I){if($.includes("webhook.example.com")||$.includes("test-")){await new Promise((X)=>setTimeout(X,Math.random()*10+5));let D=this.responses.get($);if(D)return D;return new Response(JSON.stringify({status:"ok"}),{status:200,statusText:"OK",headers:{"content-type":"application/json"}})}return fetch($,I)}}class _4{config;httpClient;constructor($,I){this.config=$,this.httpClient=I||new WY}async dispatch($,I){let D={id:this.generateDeliveryId(),endpointId:I.id,eventId:$.id,url:I.url,httpMethod:"POST",headers:this.buildHeaders(I,$),payload:JSON.stringify($),attempts:[],status:"pending",createdAt:new Date};return await this.executeDelivery(D,I),D}async executeDelivery($,I){let D=I.retryConfig?.maxRetries||this.config.maxRetries;for(let X=1;X<=D+1;X++){let U=await this.makeHttpRequest($,I,X);if($.attempts.push(U),U.httpStatus&&U.httpStatus>=200&&U.httpStatus<300){$.status="success",$.completedAt=new Date;return}if(X<=D){let Q=this.calculateRetryDelay(X,I);await this.sleep(Q)}}$.status="exhausted",$.completedAt=new Date}async makeHttpRequest($,I,D){let X=Date.now(),U={attemptNumber:D,timestamp:new Date,latencyMs:0};try{let Q=await this.httpClient.fetch($.url,{method:$.httpMethod,headers:$.headers,body:$.payload,signal:AbortSignal.timeout(this.config.timeoutMs)});U.httpStatus=Q.status,U.responseBody=await Q.text();let J={};if(Q.headers.forEach((A,T)=>{J[T]=A}),U.responseHeaders=J,U.latencyMs=Date.now()-X,!Q.ok)U.error=`HTTP ${Q.status}: ${Q.statusText}`}catch(Q){U.latencyMs=Date.now()-X,U.error=Q instanceof Error?Q.message:"Unknown error"}return U}buildHeaders($,I){let D={"Content-Type":"application/json","X-Webhook-ID":I.id,"X-Webhook-Event":I.type,"X-Webhook-Timestamp":I.timestamp.toISOString(),"User-Agent":"K-Message-Webhook/1.0"};if($.headers)Object.assign(D,$.headers);if($.secret){let X=this.generateSignature(JSON.stringify(I),$.secret);D["X-Webhook-Signature"]=X}return D}generateSignature($,I){return`sha256=${Buffer.from($+I).toString("base64")}`}calculateRetryDelay($,I){let D=I.retryConfig?.retryDelayMs||this.config.retryDelayMs,X=I.retryConfig?.backoffMultiplier||2;return D*X**($-1)}sleep($){return new Promise((I)=>setTimeout(I,$))}generateDeliveryId(){return`delivery_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}async shutdown(){}}class j4{endpoints=new Map;deliveries=new Map;async addEndpoint($){this.endpoints.set($.id,$)}async updateEndpoint($,I){if(!this.endpoints.has($))throw Error(`Endpoint ${$} not found`);this.endpoints.set($,I)}async removeEndpoint($){this.endpoints.delete($)}async getEndpoint($){return this.endpoints.get($)||null}async listEndpoints(){return Array.from(this.endpoints.values())}async addDelivery($){this.deliveries.set($.id,$)}async getDeliveries($,I,D,X,U=100){let Q=Array.from(this.deliveries.values());if($)Q=Q.filter((J)=>J.endpointId===$);if(I)Q=Q.filter((J)=>J.createdAt>=I.start&&J.createdAt<=I.end);if(X)Q=Q.filter((J)=>J.status===X);return Q.sort((J,A)=>A.createdAt.getTime()-J.createdAt.getTime()).slice(0,U)}async getFailedDeliveries($,I){return this.getDeliveries($,void 0,I,"failed")}}class eW{config;dispatcher;registry;securityManager;retryManager;eventQueue=[];batchProcessor=null;constructor($,I){this.config=$,this.dispatcher=new _4($,I),this.registry=new j4,this.securityManager=new C4($),this.retryManager=new K4($),this.startBatchProcessor()}async registerEndpoint($){await this.validateEndpointUrl($.url);let I={...$,id:this.generateEndpointId(),createdAt:new Date,updatedAt:new Date,status:"active"};return await this.registry.addEndpoint(I),await this.testEndpoint(I.id),I}async updateEndpoint($,I){let D=await this.registry.getEndpoint($);if(!D)throw Error(`Webhook endpoint ${$} not found`);if(I.url&&I.url!==D.url)await this.validateEndpointUrl(I.url);let X={...D,...I,updatedAt:new Date};return await this.registry.updateEndpoint($,X),X}async deleteEndpoint($){await this.registry.removeEndpoint($)}async getEndpoint($){return this.registry.getEndpoint($)}async listEndpoints(){return this.registry.listEndpoints()}async emit($){if(!this.config.enabledEvents.includes($.type))return;if(this.validateEvent($),this.eventQueue.push($),this.eventQueue.length>=this.config.batchSize)await this.processBatch()}async emitSync($){this.validateEvent($);let I=await this.getMatchingEndpoints($),D=[];for(let X of I){let U=await this.dispatcher.dispatch($,X);D.push(U)}return D}async testEndpoint($){let I=await this.registry.getEndpoint($);if(!I)throw Error(`Webhook endpoint ${$} not found`);let D={id:`test_${Date.now()}`,type:"system.maintenance",timestamp:new Date,data:{test:!0,message:"This is a test webhook"},metadata:{correlationId:`test_${$}`},version:"1.0"},X=Date.now();try{let U=await this.dispatcher.dispatch(D,I),Q=Date.now();return{endpointId:$,url:I.url,success:U.status==="success",httpStatus:U.attempts[0]?.httpStatus,responseTime:Q-X,testedAt:new Date}}catch(U){let Q=Date.now();return{endpointId:$,url:I.url,success:!1,responseTime:Q-X,error:U instanceof Error?U.message:"Unknown error",testedAt:new Date}}}async getStats($,I){let D=await this.registry.getDeliveries($,I),X=D.filter((T)=>T.status==="success"),U=D.filter((T)=>T.status==="failed"||T.status==="exhausted"),Q=D.reduce((T,Z)=>{let L=Z.attempts[Z.attempts.length-1];return T+(L?.latencyMs||0)},0),J={},A={};for(let T of D)if(T.status==="failed"||T.status==="exhausted"){let Z=T.attempts[T.attempts.length-1],L=Z?.error||`HTTP ${Z?.httpStatus||"Unknown"}`;A[L]=(A[L]||0)+1}return{endpointId:$,timeRange:I,totalDeliveries:D.length,successfulDeliveries:X.length,failedDeliveries:U.length,averageLatencyMs:D.length>0?Q/D.length:0,successRate:D.length>0?X.length/D.length*100:0,eventBreakdown:J,errorBreakdown:A}}async retryFailed($,I){let D=await this.registry.getFailedDeliveries($,I),X=0;for(let U of D){let Q=U.attempts.length;if(this.retryManager.shouldRetry(Q))setTimeout(async()=>{let J=await this.registry.getEndpoint(U.endpointId);if(J)await this.dispatcher.dispatch(JSON.parse(U.payload),J)},this.retryManager.getBackoffDelay(Q)),X++}return X}async pauseEndpoint($){await this.updateEndpoint($,{status:"suspended"})}async resumeEndpoint($){await this.updateEndpoint($,{status:"active"})}async getDeliveries($,I,D,X=100){return this.registry.getDeliveries($,void 0,I,D,X)}async processBatch(){if(this.eventQueue.length===0)return;let $=this.eventQueue.splice(0,this.config.batchSize);try{for(let I of $){let D=await this.getMatchingEndpoints(I);for(let X of D)this.dispatcher.dispatch(I,X).catch((U)=>{console.error(`Failed to dispatch webhook to ${X.url}:`,U)})}}catch(I){console.error("Batch processing failed:",I),this.eventQueue.unshift(...$)}}async getMatchingEndpoints($){return(await this.registry.listEndpoints()).filter((D)=>{if(D.status!=="active")return!1;if(!D.events.includes($.type))return!1;if(D.filters){if(D.filters.providerId&&$.metadata.providerId){if(!D.filters.providerId.includes($.metadata.providerId))return!1}if(D.filters.channelId&&$.metadata.channelId){if(!D.filters.channelId.includes($.metadata.channelId))return!1}if(D.filters.templateId&&$.metadata.templateId){if(!D.filters.templateId.includes($.metadata.templateId))return!1}}return!0})}validateEvent($){if(!$.id)throw Error("Event ID is required");if(!$.type)throw Error("Event type is required");if(!$.timestamp)throw Error("Event timestamp is required");if(!$.version)throw Error("Event version is required")}async validateEndpointUrl($){try{if(new URL($).protocol!=="https:"&&!$.includes("localhost")&&!$.includes("127.0.0.1"))throw Error("Webhook URL must use HTTPS")}catch(I){if(I instanceof Error)throw I;throw Error("Invalid webhook URL")}}generateEndpointId(){return`webhook_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}startBatchProcessor(){this.batchProcessor=setInterval(async()=>{try{await this.processBatch()}catch($){console.error("Batch processor error:",$)}},this.config.batchTimeoutMs)}async shutdown(){if(this.batchProcessor)clearInterval(this.batchProcessor),this.batchProcessor=null;if(this.eventQueue.length>0)await this.processBatch();await this.dispatcher.shutdown()}}export{eW as WebhookService,j4 as WebhookRegistry,BU as WebhookEventType,_4 as WebhookDispatcher,C4 as SecurityManager,K4 as RetryManager,BY as QueueManager,iW as MockHttpClient,_Y as LoadBalancer,xV as EventStore,BV as EndpointManager,xY as DeliveryStore,WY as DefaultHttpClient,CY as BatchDispatcher};
45
64
 
46
- //# debugId=A7EC4C5E04FFE5B164756E2164756E21
65
+ //# debugId=701718161099EDD364756E2164756E21
47
66
  //# sourceMappingURL=index.mjs.map