@adland/embed 0.1.3 → 0.2.1

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.
@@ -1,7 +1,7 @@
1
1
  (function(){'use strict';globalThis.process||(globalThis.process={env:{}});
2
- var JO=Object.create;var Cp=Object.defineProperty;var YO=Object.getOwnPropertyDescriptor;var XO=Object.getOwnPropertyNames;var QO=Object.getPrototypeOf,eN=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Cp(e,r,{get:t[r],enumerable:true});},DE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of XO(t))!eN.call(e,n)&&n!==r&&Cp(e,n,{get:()=>t[n],enumerable:!(o=YO(t,n))||o.enumerable});return e};var Ko=(e,t,r)=>(r=e!=null?JO(QO(e)):{},DE(t||!e||!e.__esModule?Cp(r,"default",{value:e,enumerable:true}):r,e)),jE=e=>DE(Cp({},"__esModule",{value:true}),e);var vI=Wr(Xm=>{Xm.byteLength=Kz;Xm.toByteArray=Yz;Xm.fromByteArray=eL;var So=[],On=[],Wz=typeof Uint8Array<"u"?Uint8Array:Array,yw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ca=0,bI=yw.length;ca<bI;++ca)So[ca]=yw[ca],On[yw.charCodeAt(ca)]=ca;var ca,bI;On[45]=62;On[95]=63;function xI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function Kz(e){var t=xI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function Jz(e,t,r){return (t+r)*3/4-r}function Yz(e){var t,r=xI(e),o=r[0],n=r[1],i=new Wz(Jz(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=On[e.charCodeAt(c)]<<18|On[e.charCodeAt(c+1)]<<12|On[e.charCodeAt(c+2)]<<6|On[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=On[e.charCodeAt(c)]<<2|On[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=On[e.charCodeAt(c)]<<10|On[e.charCodeAt(c+1)]<<4|On[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function Xz(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function Qz(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(Xz(o));return n.join("")}function eL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(Qz(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(So[t>>2]+So[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),n.join("")}});var wI=Wr(bw=>{bw.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,f=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+e[t+d],d+=g,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=o;f>0;s=s*256+e[t+d],d+=g,f-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};bw.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,f=(1<<u)-1,d=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,v=o?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=v,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=v,s/=256,u-=8);e[r+h-v]|=E*128;};});var Rl=Wr(Cc=>{var xw=vI(),Pc=wI(),_I=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Cc.Buffer=V;Cc.SlowBuffer=sL;Cc.INSPECT_MAX_BYTES=50;var Qm=2147483647;Cc.kMaxLength=Qm;V.TYPED_ARRAY_SUPPORT=tL();!V.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function tL(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(V.prototype,"parent",{enumerable:true,get:function(){if(V.isBuffer(this))return this.buffer}});Object.defineProperty(V.prototype,"offset",{enumerable:true,get:function(){if(V.isBuffer(this))return this.byteOffset}});function ii(e){if(e>Qm)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,V.prototype),t}function V(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ew(e)}return AI(e,t,r)}V.poolSize=8192;function AI(e,t,r){if(typeof e=="string")return nL(e,t);if(ArrayBuffer.isView(e))return oL(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Io(e,ArrayBuffer)||e&&Io(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Io(e,SharedArrayBuffer)||e&&Io(e.buffer,SharedArrayBuffer)))return ww(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return V.from(o,t,r);let n=iL(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return V.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}V.from=function(e,t,r){return AI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function kI(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function rL(e,t,r){return kI(e),e<=0?ii(e):t!==void 0?typeof r=="string"?ii(e).fill(t,r):ii(e).fill(t):ii(e)}V.alloc=function(e,t,r){return rL(e,t,r)};function Ew(e){return kI(e),ii(e<0?0:Sw(e)|0)}V.allocUnsafe=function(e){return Ew(e)};V.allocUnsafeSlow=function(e){return Ew(e)};function nL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=RI(e,t)|0,o=ii(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function vw(e){let t=e.length<0?0:Sw(e.length)|0,r=ii(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function oL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return ww(t.buffer,t.byteOffset,t.byteLength)}return vw(e)}function ww(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,V.prototype),o}function iL(e){if(V.isBuffer(e)){let t=Sw(e.length)|0,r=ii(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Aw(e.length)?ii(0):vw(e);if(e.type==="Buffer"&&Array.isArray(e.data))return vw(e.data)}function Sw(e){if(e>=Qm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qm.toString(16)+" bytes");return e|0}function sL(e){return +e!=e&&(e=0),V.alloc(+e)}V.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==V.prototype};V.compare=function(t,r){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),Io(r,Uint8Array)&&(r=V.from(r,r.offset,r.byteLength)),!V.isBuffer(t)||!V.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};V.isEncoding=function(t){switch(String(t).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 true;default:return false}};V.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return V.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=V.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(Io(s,Uint8Array))i+s.length>n.length?(V.isBuffer(s)||(s=V.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(V.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function RI(e,t){if(V.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Io(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return _w(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return LI(e).length;default:if(n)return o?-1:_w(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=RI;function aL(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return yL(this,t,r);case "utf8":case "utf-8":return $I(this,t,r);case "ascii":return hL(this,t,r);case "latin1":case "binary":return gL(this,t,r);case "base64":return pL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return bL(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function ua(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}V.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)ua(this,r,r+1);return this};V.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)ua(this,r,r+3),ua(this,r+1,r+2);return this};V.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)ua(this,r,r+7),ua(this,r+1,r+6),ua(this,r+2,r+5),ua(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?$I(this,0,t):aL.apply(this,arguments)};V.prototype.toLocaleString=V.prototype.toString;V.prototype.equals=function(t){if(!V.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:V.compare(this,t)===0};V.prototype.inspect=function(){let t="",r=Cc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};_I&&(V.prototype[_I]=V.prototype.inspect);V.prototype.compare=function(t,r,o,n,i){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),!V.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),f=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==f[d]){s=u[d],a=f[d];break}return s<a?-1:a<s?1:0};function TI(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Aw(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=V.from(t,o)),V.isBuffer(t))return t.length===0?-1:EI(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):EI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function EI(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(f,d){return i===1?f[d]:f.readUInt16BE(d*i)}let u;if(n){let f=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*i}else f!==-1&&(u-=u-f),f=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let f=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){f=false;break}if(f)return u}return -1}V.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};V.prototype.indexOf=function(t,r,o){return TI(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return TI(this,t,r,o,false)};function cL(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(Aw(a))return s;e[r+s]=a;}return s}function uL(e,t,r,o){return eh(_w(t,e.length-r),e,r,o)}function fL(e,t,r,o){return eh(_L(t),e,r,o)}function lL(e,t,r,o){return eh(LI(t),e,r,o)}function dL(e,t,r,o){return eh(EL(t,e.length-r),e,r,o)}V.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return cL(this,t,r,o);case "utf8":case "utf-8":return uL(this,t,r,o);case "ascii":case "latin1":case "binary":return fL(this,t,r,o);case "base64":return lL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return dL(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};V.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function pL(e,t,r){return t===0&&r===e.length?xw.fromByteArray(e):xw.fromByteArray(e.slice(t,r))}function $I(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,f,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],f=e[n+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return mL(o)}var SI=4096;function mL(e){let t=e.length;if(t<=SI)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=SI));return r}function hL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function gL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function yL(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=SL[e[i]];return n}function bL(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}V.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,V.prototype),n};function sr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};V.prototype.readUintBE=V.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};V.prototype.readUint8=V.prototype.readUInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]};V.prototype.readUint16LE=V.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]|this[t+1]<<8};V.prototype.readUint16BE=V.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]<<8|this[t+1]};V.prototype.readUint32LE=V.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};V.prototype.readUint32BE=V.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};V.prototype.readBigUInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});V.prototype.readBigUInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});V.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};V.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};V.prototype.readInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};V.prototype.readInt16LE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};V.prototype.readInt16BE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};V.prototype.readInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};V.prototype.readInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};V.prototype.readBigInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});V.prototype.readBigInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});V.prototype.readFloatLE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,true,23,4)};V.prototype.readFloatBE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,false,23,4)};V.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,true,52,8)};V.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,false,52,8)};function en(e,t,r,o,n,i){if(!V.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};V.prototype.writeUintBE=V.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};V.prototype.writeUint8=V.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,255,0),this[r]=t&255,r+1};V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function OI(e,t,r,o,n){zI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function NI(e,t,r,o,n){zI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}V.prototype.writeBigUInt64LE=Ki(function(t,r=0){return OI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Ki(function(t,r=0){return NI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};V.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};V.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};V.prototype.writeBigInt64LE=Ki(function(t,r=0){return OI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Ki(function(t,r=0){return NI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function PI(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function BI(e,t,r,o,n){return t=+t,r=r>>>0,n||PI(e,t,r,4),Pc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return BI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return BI(this,t,r,false,o)};function CI(e,t,r,o,n){return t=+t,r=r>>>0,n||PI(e,t,r,8),Pc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return CI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return CI(this,t,r,false,o)};V.prototype.copy=function(t,r,o,n){if(!V.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};V.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!V.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=V.isBuffer(t)?t:V.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var Nc={};function Iw(e,t,r){Nc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}Iw("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Iw("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Iw("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=II(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=II(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function II(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function xL(e,t,r){Bc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&kl(t,e.length-(r+1));}function zI(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new Nc.ERR_OUT_OF_RANGE("value",a,e)}xL(o,n,i);}function Bc(e,t){if(typeof e!="number")throw new Nc.ERR_INVALID_ARG_TYPE(t,"number",e)}function kl(e,t,r){throw Math.floor(e)!==e?(Bc(e,r),new Nc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new Nc.ERR_BUFFER_OUT_OF_BOUNDS:new Nc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var vL=/[^+/0-9A-Za-z-_]/g;function wL(e){if(e=e.split("=")[0],e=e.trim().replace(vL,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function _w(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function _L(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function EL(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function LI(e){return xw.toByteArray(wL(e))}function eh(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Io(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Aw(e){return e!==e}var SL=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function Ki(e){return typeof BigInt>"u"?IL:e}function IL(){throw new Error("BigInt not supported")}});var fa,UI=F(()=>{fa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function AL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function la(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!AL(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function MI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");la(e.outputLen),la(e.blockLen);}function si(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function th(e,t){Ao(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function DI(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Nn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function rh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function eo(e,t){return e<<32-t|e>>>t}function RL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function TL(e){for(let t=0;t<e.length;t++)e[t]=RL(e[t]);return e}function jI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function da(e){return typeof e=="string"&&(e=jI(e)),Ao(e),e}function Rw(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Ao(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Tl(e){let t=o=>e().update(da(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function zc(e=32){if(fa&&typeof fa.getRandomValues=="function")return fa.getRandomValues(new Uint8Array(e));if(fa&&typeof fa.randomBytes=="function")return Uint8Array.from(fa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var kL,kw,Ji,ai=F(()=>{UI();kL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;kw=kL?e=>e:TL;Ji=class{};});function $L(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function FI(e,t,r){return e&t^~e&r}function HI(e,t,r){return e&t^e&r^t&r}var $l,ci,pr,VI=F(()=>{ai();$l=class extends Ji{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=rh(this.buffer);}update(t){si(this),t=da(t),Ao(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=rh(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){si(this),th(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Nn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;$L(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=rh(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,f[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},ci=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function OL(e,t=false){return t?{h:Number(e&nh),l:Number(e>>ZI&nh)}:{h:Number(e>>ZI&nh)|0,l:Number(e&nh)|0}}function oh(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=OL(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function ko(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var nh,ZI,Tw,$w,pa,ma,Ol,Nl,GI,qI,WI,KI,JI,YI,XI,QI,eA,tA,Ow=F(()=>{nh=BigInt(4294967295),ZI=BigInt(32);Tw=(e,t,r)=>e>>>r,$w=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ma=(e,t,r)=>e<<32-r|t>>>r,Ol=(e,t,r)=>e<<64-r|t>>>r-32,Nl=(e,t,r)=>e>>>r-32|t<<64-r,GI=(e,t,r)=>e<<r|t>>>32-r,qI=(e,t,r)=>t<<r|e>>>32-r,WI=(e,t,r)=>t<<r-32|e>>>64-r,KI=(e,t,r)=>e<<r-32|t>>>64-r;JI=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),YI=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,XI=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),QI=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,eA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),tA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var PL,Yi,ih,rA,BL,CL,Xi,Qi,Nw,ha,nA,sh=F(()=>{VI();Ow();ai();PL=Uint32Array.from([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]),Yi=new Uint32Array(64),ih=class extends $l{constructor(t=32){super(64,t,8,false),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)Yi[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Yi[d-15],h=Yi[d-2],v=eo(g,7)^eo(g,18)^g>>>3,E=eo(h,17)^eo(h,19)^h>>>10;Yi[d]=E+Yi[d-7]+v+Yi[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){let g=eo(a,6)^eo(a,11)^eo(a,25),h=f+g+FI(a,c,u)+PL[d]+Yi[d]|0,E=(eo(o,2)^eo(o,13)^eo(o,22))+HI(o,n,i)|0;f=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+E|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(o,n,i,s,a,c,u,f);}roundClean(){Nn(Yi);}destroy(){this.set(0,0,0,0,0,0,0,0),Nn(this.buffer);}},rA=oh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),BL=rA[0],CL=rA[1],Xi=new Uint32Array(80),Qi=new Uint32Array(80),Nw=class extends $l{constructor(t=64){super(128,t,16,false),this.Ah=pr[0]|0,this.Al=pr[1]|0,this.Bh=pr[2]|0,this.Bl=pr[3]|0,this.Ch=pr[4]|0,this.Cl=pr[5]|0,this.Dh=pr[6]|0,this.Dl=pr[7]|0,this.Eh=pr[8]|0,this.El=pr[9]|0,this.Fh=pr[10]|0,this.Fl=pr[11]|0,this.Gh=pr[12]|0,this.Gl=pr[13]|0,this.Hh=pr[14]|0,this.Hl=pr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:h,Gl:v,Hh:E,Hl:R}=this;return [t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R]}set(t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=v|0,this.Hh=E|0,this.Hl=R|0;}process(t,r){for(let O=0;O<16;O++,r+=4)Xi[O]=t.getUint32(r),Qi[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=Xi[O-15]|0,P=Qi[O-15]|0,L=pa(I,P,1)^pa(I,P,8)^Tw(I,P,7),C=ma(I,P,1)^ma(I,P,8)^$w(I,P,7),D=Xi[O-2]|0,q=Qi[O-2]|0,H=pa(D,q,19)^Ol(D,q,61)^Tw(D,q,6),Z=ma(D,q,19)^Nl(D,q,61)^$w(D,q,6),re=XI(C,Z,Qi[O-7],Qi[O-16]),S=QI(re,L,H,Xi[O-7],Xi[O-16]);Xi[O]=S|0,Qi[O]=re|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:h,Fl:v,Gh:E,Gl:R,Hh:$,Hl:N}=this;for(let O=0;O<80;O++){let I=pa(d,g,14)^pa(d,g,18)^Ol(d,g,41),P=ma(d,g,14)^ma(d,g,18)^Nl(d,g,41),L=d&h^~d&E,C=g&v^~g&R,D=eA(N,P,C,CL[O],Qi[O]),q=tA(D,$,I,L,BL[O],Xi[O]),H=D|0,Z=pa(o,n,28)^Ol(o,n,34)^Ol(o,n,39),re=ma(o,n,28)^Nl(o,n,34)^Nl(o,n,39),S=o&i^o&a^i&a,l=n&s^n&c^s&c;$=E|0,N=R|0,E=h|0,R=v|0,h=d|0,v=g|0,{h:d,l:g}=ko(u|0,f|0,q|0,H|0),u=a|0,f=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=JI(H,re,l);o=YI(m,q,Z,S),n=m|0;}(({h:o,l:n}=ko(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=ko(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=ko(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:f}=ko(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=ko(this.Eh|0,this.El|0,d|0,g|0),{h,l:v}=ko(this.Fh|0,this.Fl|0,h|0,v|0),{h:E,l:R}=ko(this.Gh|0,this.Gl|0,E|0,R|0),{h:$,l:N}=ko(this.Hh|0,this.Hl|0,$|0,N|0),this.set(o,n,i,s,a,c,u,f,d,g,h,v,E,R,$,N);}roundClean(){Nn(Xi,Qi);}destroy(){Nn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ha=Tl(()=>new ih),nA=Tl(()=>new Nw);});function Lc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fi(e){if(!Lc(e))throw new Error("Uint8Array expected")}function Ro(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Pl(e){let t=e.toString(16);return t.length&1?"0"+t:t}function sA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?zw:BigInt("0x"+e)}function es(e){if(fi(e),aA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=zL[e[r]];return t}function oA(e){if(e>=ui._0&&e<=ui._9)return e-ui._0;if(e>=ui.A&&e<=ui.F)return e-(ui.A-10);if(e>=ui.a&&e<=ui.f)return e-(ui.a-10)}function Bl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(aA)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=oA(e.charCodeAt(i)),a=oA(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function tn(e){return sA(es(e))}function ga(e){return fi(e),sA(es(Uint8Array.from(e).reverse()))}function To(e,t){return Bl(e.toString(16).padStart(t*2,"0"))}function Uc(e,t){return To(e,t).reverse()}function Ge(e,t,r){let o;if(typeof t=="string")try{o=Bl(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Lc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ar(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];fi(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function ah(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ya(e,t,r){return Pw(e)&&Pw(t)&&Pw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!ya(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function cA(e){let t;for(t=0;e>zw;e>>=Cw,t+=1);return t}function uA(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=Bw(e),n=Bw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=Bw(0))=>{n=a(iA([0]),d),o=a(),d.length!==0&&(n=a(iA([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ar(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function to(e,t,r={}){let o=(n,i,s)=>{let a=LL[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function Mc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var zw,Cw,aA,zL,ui,Pw,ba,Bw,iA,LL,xa=F(()=>{zw=BigInt(0),Cw=BigInt(1);aA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",zL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ui={_0:48,_9:57,A:65,F:70,a:97,f:102};Pw=e=>typeof e=="bigint"&&zw<=e;ba=e=>(Cw<<BigInt(e))-Cw,Bw=e=>new Uint8Array(e),iA=e=>Uint8Array.from(e);LL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Lc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function Le(e,t){let r=e%t;return r>=jr?r:t+r}function at(e,t,r){let o=e;for(;t-- >jr;)o*=o,o%=r;return o}function ch(e,t){if(e===jr)throw new Error("invert: expected non-zero number");if(t<=jr)throw new Error("invert: expected positive modulus, got "+t);let r=Le(e,t),o=t,n=jr,s=cr;for(;r!==jr;){let u=o/r,f=o%r,d=n-s*u;o=r,r=f,n=s,s=d;}if(o!==cr)throw new Error("invert: does not exist");return Le(n,t)}function mA(e,t){let r=(e.ORDER+cr)/lA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function ML(e,t){let r=(e.ORDER-dA)/pA,o=e.mul(t,va),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,va),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function DL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%va===jr;)t/=va,r++;let o=va,n=di(e);for(;fA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return mA;let i=n.pow(o,t),s=(t+cr)/va;return function(c,u){if(c.is0(u))return u;if(fA(c,u)!==1)throw new Error("Cannot find square root");let f=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let v=1,E=c.sqr(g);for(;!c.eql(E,c.ONE);)if(v++,E=c.sqr(E),v===f)throw new Error("Cannot find square root");let R=cr<<BigInt(f-v-1),$=c.pow(d,R);f=v,d=c.sqr($),g=c.mul(g,d),h=c.mul(h,$);}return h}}function jL(e){return e%lA===UL?mA:e%pA===dA?ML:DL(e)}function uh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=FL.reduce((o,n)=>(o[n]="function",o),t);return to(e,r)}function HL(e,t,r){if(r<jr)throw new Error("invalid exponent, negatives unsupported");if(r===jr)return e.ONE;if(r===cr)return t;let o=e.ONE,n=t;for(;r>jr;)r&cr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=cr;return o}function li(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function fA(e,t){let r=(e.ORDER-cr)/va,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function Lw(e,t){t!==void 0&&la(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function di(e,t,r=false,o={}){if(e<=jr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=Lw(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:ba(n),ZERO:jr,ONE:cr,create:c=>Le(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return jr<=c&&c<e},is0:c=>c===jr,isOdd:c=>(c&cr)===cr,neg:c=>Le(-c,e),eql:(c,u)=>c===u,sqr:c=>Le(c*c,e),add:(c,u)=>Le(c+u,e),sub:(c,u)=>Le(c-u,e),mul:(c,u)=>Le(c*u,e),pow:(c,u)=>HL(a,c,u),div:(c,u)=>Le(c*ch(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ch(c,e),sqrt:o.sqrt||(c=>(s||(s=jL(e)),s(a,c))),toBytes:c=>r?Uc(c,i):To(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?ga(c):tn(c)},invertBatch:c=>li(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function gA(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function Uw(e){let t=gA(e);return t+Math.ceil(t/2)}function yA(e,t,r=false){let o=e.length,n=gA(t),i=Uw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?ga(e):tn(e),a=Le(s,t-cr)+cr;return r?Uc(a,n):To(a,n)}var jr,cr,va,UL,lA,dA,pA,hA,FL,wa=F(()=>{ai();xa();jr=BigInt(0),cr=BigInt(1),va=BigInt(2),UL=BigInt(3),lA=BigInt(4),dA=BigInt(5),pA=BigInt(8);hA=(e,t)=>(Le(e,t)&cr)===cr,FL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function Mw(e,t){let r=t.negate();return e?r:t}function vA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Dw(e,t){vA(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=ba(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function xA(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Hw);let u=t*o,f=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function VL(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function ZL(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Fw(e){return wA.get(e)||1}function fh(e,t){return {constTimeNegate:Mw,hasPrecomputes(r){return Fw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>bA;)o&Hw&&(n=n.add(i)),i=i.double(),o>>=Hw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Dw(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let f=1;f<i;f++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=Dw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:v}=xA(n,c,a);n=u,d?s=s.add(Mw(h,o[v])):i=i.add(Mw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Dw(r,t);for(let a=0;a<s.windows&&n!==bA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=xA(n,a,s);if(n=c,!f){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=jw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&jw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Fw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Fw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){vA(o,t),wA.set(r,o),jw.delete(r);}}}function lh(e,t,r,o){VL(r,e),ZL(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=cA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=ba(c),f=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){f.fill(s);for(let E=0;E<i;E++){let R=o[E],$=Number(R>>BigInt(h)&u);f[$]=f[$].add(r[E]);}let v=s;for(let E=f.length-1,R=s;E>0;E--)R=R.add(f[E]),v=v.add(R);if(g=g.add(v),h!==0)for(let E=0;E<c;E++)g=g.double();}return g}function Cl(e){return uh(e.Fp),to(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Lw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var bA,Hw,jw,wA,Vw=F(()=>{wa();xa();bA=BigInt(0),Hw=BigInt(1);jw=new WeakMap,wA=new WeakMap;});function ts(e,t){if(zl(e),zl(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function JL(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function zl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function YL(e,t,r,o){fi(e),fi(t),zl(r),t.length>255&&(t=o(ar(ah("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ar(t,ts(t.length,1)),c=ts(0,i),u=ts(r,2),f=new Array(s),d=o(ar(c,e,u,ts(0,1),a));f[0]=o(ar(d,ts(1,1),a));for(let h=1;h<=s;h++){let v=[JL(d,f[h-1]),ts(h+1,1),a];f[h]=o(ar(...v));}return ar(...f).slice(0,r)}function XL(e,t,r,o,n){if(fi(e),fi(t),zl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(ah("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(ts(r,2)).update(t).update(ts(t.length,1)).digest()}function SA(e,t,r){to(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;fi(e),zl(t);let u=typeof c=="string"?ah(c):c,f=o.toString(2).length,d=Math.ceil((f+n)/8),g=t*i*d,h;if(a==="xmd")h=YL(e,u,g,s);else if(a==="xof")h=XL(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let v=new Array(t);for(let E=0;E<t;E++){let R=new Array(i);for(let $=0;$<i;$++){let N=d*($+E*i),O=h.subarray(N,N+d);R[$]=Le(KL(O),o);}v[E]=R;}return v}function IA(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,f]=li(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,f)),{x:o,y:n}}}function AA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=SA(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=SA(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var KL,kA=F(()=>{wa();xa();KL=tn;});var OA=Wr(()=>{});var qw=Wr((NA,Gw)=>{(function(e,t){function r(S,l){if(!S)throw new Error(l||"Assertion failed")}function o(S,l){S.super_=l;var m=function(){};m.prototype=l.prototype,S.prototype=new m,S.prototype.constructor=S;}function n(S,l,m){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(S||0,l||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=OA().Buffer;}catch{}n.isBN=function(l){return l instanceof n?true:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,m){return l.cmp(m)>0?l:m},n.min=function(l,m){return l.cmp(m)<0?l:m},n.prototype._init=function(l,m,y){if(typeof l=="number")return this._initNumber(l,m,y);if(typeof l=="object")return this._initArray(l,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var b=0;l[0]==="-"&&(b++,this.negative=1),b<l.length&&(m===16?this._parseHex(l,b,y):(this._parseBase(l,m,b),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(l,m,y){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(l,m,y){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x,_,k=0;if(y==="be")for(b=l.length-1,x=0;b>=0;b-=3)_=l[b]|l[b-1]<<8|l[b-2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);else if(y==="le")for(b=0,x=0;b<l.length;b+=3)_=l[b]|l[b+1]<<8|l[b+2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);return this._strip()};function s(S,l){var m=S.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+S);}function a(S,l,m){var y=s(S,m);return m-1>=l&&(y|=s(S,m-1)<<4),y}n.prototype._parseHex=function(l,m,y){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x=0,_=0,k;if(y==="be")for(b=l.length-1;b>=m;b-=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;else {var w=l.length-m;for(b=w%2===0?m+1:m;b<l.length;b+=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;}this._strip();};function c(S,l,m,y){for(var b=0,x=0,_=Math.min(S.length,m),k=l;k<_;k++){var w=S.charCodeAt(k)-48;b*=y,w>=49?x=w-49+10:w>=17?x=w-17+10:x=w,r(w>=0&&x<y,"Invalid character"),b+=x;}return b}n.prototype._parseBase=function(l,m,y){this.words=[0],this.length=1;for(var b=0,x=1;x<=67108863;x*=m)b++;b--,x=x/m|0;for(var _=l.length-y,k=_%b,w=Math.min(_,_-k)+y,p=0,A=y;A<w;A+=b)p=c(l,A,A+b,m),this.imuln(x),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(k!==0){var G=1;for(p=c(l,A,l.length,m),A=0;A<k;A++)G*=m;this.imuln(G),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red;};function u(S,l){S.words=l.words,S.length=l.length,S.negative=l.negative,S.red=l.red;}if(n.prototype._move=function(l){u(l,this);},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f;}catch{n.prototype.inspect=f;}else n.prototype.inspect=f;function f(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],g=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(l,m){l=l||10,m=m|0||1;var y;if(l===16||l==="hex"){y="";for(var b=0,x=0,_=0;_<this.length;_++){var k=this.words[_],w=((k<<b|x)&16777215).toString(16);x=k>>>24-b&16777215,b+=2,b>=26&&(b-=26,_--),x!==0||_!==this.length-1?y=d[6-w.length]+w+y:y=w+y;}for(x!==0&&(y=x.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(l===(l|0)&&l>=2&&l<=36){var p=g[l],A=h[l];y="";var G=this.clone();for(G.negative=0;!G.isZero();){var K=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=K+y:y=d[p-K.length]+K+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(l,m){return this.toArrayLike(i,l,m)}),n.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var v=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};n.prototype.toArrayLike=function(l,m,y){this._strip();var b=this.byteLength(),x=y||Math.max(1,b);r(b<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0");var _=v(l,x),k=m==="le"?"LE":"BE";return this["_toArrayLike"+k](_,b),_},n.prototype._toArrayLikeLE=function(l,m){for(var y=0,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y++]=k&255,y<l.length&&(l[y++]=k>>8&255),y<l.length&&(l[y++]=k>>16&255),_===6?(y<l.length&&(l[y++]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y<l.length)for(l[y++]=b;y<l.length;)l[y++]=0;},n.prototype._toArrayLikeBE=function(l,m){for(var y=l.length-1,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y--]=k&255,y>=0&&(l[y--]=k>>8&255),y>=0&&(l[y--]=k>>16&255),_===6?(y>=0&&(l[y--]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y>=0)for(l[y--]=b;y>=0;)l[y--]=0;},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var m=l,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return (this.length-1)*26+m};function E(S){for(var l=new Array(S.bitLength()),m=0;m<l.length;m++){var y=m/26|0,b=m%26;l[m]=S.words[y]>>>b&1;}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(l+=y,y!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},n.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&l.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var m,y;this.length>l.length?(m=this,y=l):(m=l,y=this);for(var b=0;b<y.length;b++)this.words[b]=m.words[b]^y.words[b];if(this!==m)for(;b<m.length;b++)this.words[b]=m.words[b];return this.length=m.length,this._strip()},n.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,y=l%26;this._expand(m),y>0&&m--;for(var b=0;b<m;b++)this.words[b]=~this.words[b]&67108863;for(y>0&&(this.words[b]=~this.words[b]&67108863>>26-y,b++);b<this.length;b++)this.words[b]=0;return this._strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var y=l/26|0,b=l%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this._strip()},n.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var y,b;this.length>l.length?(y=this,b=l):(y=l,b=this);for(var x=0,_=0;_<b.length;_++)m=(y.words[_]|0)+(b.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;for(;x!==0&&_<y.length;_++)m=(y.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;if(this.length=y.length,x!==0)this.words[this.length]=x,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var y=this.cmp(l);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,x;y>0?(b=this,x=l):(b=l,x=this);for(var _=0,k=0;k<x.length;k++)m=(b.words[k]|0)-(x.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;for(;_!==0&&k<b.length;k++)m=(b.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;if(_===0&&k<b.length&&b!==this)for(;k<b.length;k++)this.words[k]=b.words[k];return this.length=Math.max(this.length,k),b!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function R(S,l,m){m.negative=l.negative^S.negative;var y=S.length+l.length|0;m.length=y,y=y-1|0;var b=S.words[0]|0,x=l.words[0]|0,_=b*x,k=_&67108863,w=_/67108864|0;m.words[0]=k;for(var p=1;p<y;p++){for(var A=w>>>26,G=w&67108863,K=Math.min(p,l.length-1),Q=Math.max(0,p-S.length+1);Q<=K;Q++){var ae=p-Q|0;b=S.words[ae]|0,x=l.words[Q]|0,_=b*x+G,A+=_/67108864|0,G=_&67108863;}m.words[p]=G|0,w=A|0;}return w!==0?m.words[p]=w|0:m.length--,m._strip()}var $=function(l,m,y){var b=l.words,x=m.words,_=y.words,k=0,w,p,A,G=b[0]|0,K=G&8191,Q=G>>>13,ae=b[1]|0,he=ae&8191,ye=ae>>>13,We=b[2]|0,Se=We&8191,_e=We>>>13,tr=b[3]|0,Ce=tr&8191,je=tr>>>13,Li=b[4]|0,pt=Li&8191,gt=Li>>>13,Bp=b[5]|0,yt=Bp&8191,bt=Bp>>>13,AE=b[6]|0,At=AE&8191,kt=AE>>>13,kE=b[7]|0,Rt=kE&8191,Tt=kE>>>13,RE=b[8]|0,$t=RE&8191,Ot=RE>>>13,TE=b[9]|0,Nt=TE&8191,Pt=TE>>>13,$E=x[0]|0,Bt=$E&8191,Ct=$E>>>13,OE=x[1]|0,zt=OE&8191,Lt=OE>>>13,NE=x[2]|0,Ut=NE&8191,Mt=NE>>>13,PE=x[3]|0,Dt=PE&8191,jt=PE>>>13,BE=x[4]|0,Ft=BE&8191,Ht=BE>>>13,CE=x[5]|0,Vt=CE&8191,Zt=CE>>>13,zE=x[6]|0,Gt=zE&8191,qt=zE>>>13,LE=x[7]|0,Wt=LE&8191,Kt=LE>>>13,UE=x[8]|0,Jt=UE&8191,Yt=UE>>>13,ME=x[9]|0,Xt=ME&8191,Qt=ME>>>13;y.negative=l.negative^m.negative,y.length=19,w=Math.imul(K,Bt),p=Math.imul(K,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(jy>>>26)|0,jy&=67108863,w=Math.imul(he,Bt),p=Math.imul(he,Ct),p=p+Math.imul(ye,Bt)|0,A=Math.imul(ye,Ct),w=w+Math.imul(K,zt)|0,p=p+Math.imul(K,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Fy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=67108863,w=Math.imul(Se,Bt),p=Math.imul(Se,Ct),p=p+Math.imul(_e,Bt)|0,A=Math.imul(_e,Ct),w=w+Math.imul(he,zt)|0,p=p+Math.imul(he,Lt)|0,p=p+Math.imul(ye,zt)|0,A=A+Math.imul(ye,Lt)|0,w=w+Math.imul(K,Ut)|0,p=p+Math.imul(K,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Hy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Hy>>>26)|0,Hy&=67108863,w=Math.imul(Ce,Bt),p=Math.imul(Ce,Ct),p=p+Math.imul(je,Bt)|0,A=Math.imul(je,Ct),w=w+Math.imul(Se,zt)|0,p=p+Math.imul(Se,Lt)|0,p=p+Math.imul(_e,zt)|0,A=A+Math.imul(_e,Lt)|0,w=w+Math.imul(he,Ut)|0,p=p+Math.imul(he,Mt)|0,p=p+Math.imul(ye,Ut)|0,A=A+Math.imul(ye,Mt)|0,w=w+Math.imul(K,Dt)|0,p=p+Math.imul(K,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Vy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Vy>>>26)|0,Vy&=67108863,w=Math.imul(pt,Bt),p=Math.imul(pt,Ct),p=p+Math.imul(gt,Bt)|0,A=Math.imul(gt,Ct),w=w+Math.imul(Ce,zt)|0,p=p+Math.imul(Ce,Lt)|0,p=p+Math.imul(je,zt)|0,A=A+Math.imul(je,Lt)|0,w=w+Math.imul(Se,Ut)|0,p=p+Math.imul(Se,Mt)|0,p=p+Math.imul(_e,Ut)|0,A=A+Math.imul(_e,Mt)|0,w=w+Math.imul(he,Dt)|0,p=p+Math.imul(he,jt)|0,p=p+Math.imul(ye,Dt)|0,A=A+Math.imul(ye,jt)|0,w=w+Math.imul(K,Ft)|0,p=p+Math.imul(K,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Zy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=67108863,w=Math.imul(yt,Bt),p=Math.imul(yt,Ct),p=p+Math.imul(bt,Bt)|0,A=Math.imul(bt,Ct),w=w+Math.imul(pt,zt)|0,p=p+Math.imul(pt,Lt)|0,p=p+Math.imul(gt,zt)|0,A=A+Math.imul(gt,Lt)|0,w=w+Math.imul(Ce,Ut)|0,p=p+Math.imul(Ce,Mt)|0,p=p+Math.imul(je,Ut)|0,A=A+Math.imul(je,Mt)|0,w=w+Math.imul(Se,Dt)|0,p=p+Math.imul(Se,jt)|0,p=p+Math.imul(_e,Dt)|0,A=A+Math.imul(_e,jt)|0,w=w+Math.imul(he,Ft)|0,p=p+Math.imul(he,Ht)|0,p=p+Math.imul(ye,Ft)|0,A=A+Math.imul(ye,Ht)|0,w=w+Math.imul(K,Vt)|0,p=p+Math.imul(K,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var Gy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=67108863,w=Math.imul(At,Bt),p=Math.imul(At,Ct),p=p+Math.imul(kt,Bt)|0,A=Math.imul(kt,Ct),w=w+Math.imul(yt,zt)|0,p=p+Math.imul(yt,Lt)|0,p=p+Math.imul(bt,zt)|0,A=A+Math.imul(bt,Lt)|0,w=w+Math.imul(pt,Ut)|0,p=p+Math.imul(pt,Mt)|0,p=p+Math.imul(gt,Ut)|0,A=A+Math.imul(gt,Mt)|0,w=w+Math.imul(Ce,Dt)|0,p=p+Math.imul(Ce,jt)|0,p=p+Math.imul(je,Dt)|0,A=A+Math.imul(je,jt)|0,w=w+Math.imul(Se,Ft)|0,p=p+Math.imul(Se,Ht)|0,p=p+Math.imul(_e,Ft)|0,A=A+Math.imul(_e,Ht)|0,w=w+Math.imul(he,Vt)|0,p=p+Math.imul(he,Zt)|0,p=p+Math.imul(ye,Vt)|0,A=A+Math.imul(ye,Zt)|0,w=w+Math.imul(K,Gt)|0,p=p+Math.imul(K,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=67108863,w=Math.imul(Rt,Bt),p=Math.imul(Rt,Ct),p=p+Math.imul(Tt,Bt)|0,A=Math.imul(Tt,Ct),w=w+Math.imul(At,zt)|0,p=p+Math.imul(At,Lt)|0,p=p+Math.imul(kt,zt)|0,A=A+Math.imul(kt,Lt)|0,w=w+Math.imul(yt,Ut)|0,p=p+Math.imul(yt,Mt)|0,p=p+Math.imul(bt,Ut)|0,A=A+Math.imul(bt,Mt)|0,w=w+Math.imul(pt,Dt)|0,p=p+Math.imul(pt,jt)|0,p=p+Math.imul(gt,Dt)|0,A=A+Math.imul(gt,jt)|0,w=w+Math.imul(Ce,Ft)|0,p=p+Math.imul(Ce,Ht)|0,p=p+Math.imul(je,Ft)|0,A=A+Math.imul(je,Ht)|0,w=w+Math.imul(Se,Vt)|0,p=p+Math.imul(Se,Zt)|0,p=p+Math.imul(_e,Vt)|0,A=A+Math.imul(_e,Zt)|0,w=w+Math.imul(he,Gt)|0,p=p+Math.imul(he,qt)|0,p=p+Math.imul(ye,Gt)|0,A=A+Math.imul(ye,qt)|0,w=w+Math.imul(K,Wt)|0,p=p+Math.imul(K,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var Wy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=67108863,w=Math.imul($t,Bt),p=Math.imul($t,Ct),p=p+Math.imul(Ot,Bt)|0,A=Math.imul(Ot,Ct),w=w+Math.imul(Rt,zt)|0,p=p+Math.imul(Rt,Lt)|0,p=p+Math.imul(Tt,zt)|0,A=A+Math.imul(Tt,Lt)|0,w=w+Math.imul(At,Ut)|0,p=p+Math.imul(At,Mt)|0,p=p+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Mt)|0,w=w+Math.imul(yt,Dt)|0,p=p+Math.imul(yt,jt)|0,p=p+Math.imul(bt,Dt)|0,A=A+Math.imul(bt,jt)|0,w=w+Math.imul(pt,Ft)|0,p=p+Math.imul(pt,Ht)|0,p=p+Math.imul(gt,Ft)|0,A=A+Math.imul(gt,Ht)|0,w=w+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Zt)|0,p=p+Math.imul(je,Vt)|0,A=A+Math.imul(je,Zt)|0,w=w+Math.imul(Se,Gt)|0,p=p+Math.imul(Se,qt)|0,p=p+Math.imul(_e,Gt)|0,A=A+Math.imul(_e,qt)|0,w=w+Math.imul(he,Wt)|0,p=p+Math.imul(he,Kt)|0,p=p+Math.imul(ye,Wt)|0,A=A+Math.imul(ye,Kt)|0,w=w+Math.imul(K,Jt)|0,p=p+Math.imul(K,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var Ky=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=67108863,w=Math.imul(Nt,Bt),p=Math.imul(Nt,Ct),p=p+Math.imul(Pt,Bt)|0,A=Math.imul(Pt,Ct),w=w+Math.imul($t,zt)|0,p=p+Math.imul($t,Lt)|0,p=p+Math.imul(Ot,zt)|0,A=A+Math.imul(Ot,Lt)|0,w=w+Math.imul(Rt,Ut)|0,p=p+Math.imul(Rt,Mt)|0,p=p+Math.imul(Tt,Ut)|0,A=A+Math.imul(Tt,Mt)|0,w=w+Math.imul(At,Dt)|0,p=p+Math.imul(At,jt)|0,p=p+Math.imul(kt,Dt)|0,A=A+Math.imul(kt,jt)|0,w=w+Math.imul(yt,Ft)|0,p=p+Math.imul(yt,Ht)|0,p=p+Math.imul(bt,Ft)|0,A=A+Math.imul(bt,Ht)|0,w=w+Math.imul(pt,Vt)|0,p=p+Math.imul(pt,Zt)|0,p=p+Math.imul(gt,Vt)|0,A=A+Math.imul(gt,Zt)|0,w=w+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ce,qt)|0,p=p+Math.imul(je,Gt)|0,A=A+Math.imul(je,qt)|0,w=w+Math.imul(Se,Wt)|0,p=p+Math.imul(Se,Kt)|0,p=p+Math.imul(_e,Wt)|0,A=A+Math.imul(_e,Kt)|0,w=w+Math.imul(he,Jt)|0,p=p+Math.imul(he,Yt)|0,p=p+Math.imul(ye,Jt)|0,A=A+Math.imul(ye,Yt)|0,w=w+Math.imul(K,Xt)|0,p=p+Math.imul(K,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var Jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=67108863,w=Math.imul(Nt,zt),p=Math.imul(Nt,Lt),p=p+Math.imul(Pt,zt)|0,A=Math.imul(Pt,Lt),w=w+Math.imul($t,Ut)|0,p=p+Math.imul($t,Mt)|0,p=p+Math.imul(Ot,Ut)|0,A=A+Math.imul(Ot,Mt)|0,w=w+Math.imul(Rt,Dt)|0,p=p+Math.imul(Rt,jt)|0,p=p+Math.imul(Tt,Dt)|0,A=A+Math.imul(Tt,jt)|0,w=w+Math.imul(At,Ft)|0,p=p+Math.imul(At,Ht)|0,p=p+Math.imul(kt,Ft)|0,A=A+Math.imul(kt,Ht)|0,w=w+Math.imul(yt,Vt)|0,p=p+Math.imul(yt,Zt)|0,p=p+Math.imul(bt,Vt)|0,A=A+Math.imul(bt,Zt)|0,w=w+Math.imul(pt,Gt)|0,p=p+Math.imul(pt,qt)|0,p=p+Math.imul(gt,Gt)|0,A=A+Math.imul(gt,qt)|0,w=w+Math.imul(Ce,Wt)|0,p=p+Math.imul(Ce,Kt)|0,p=p+Math.imul(je,Wt)|0,A=A+Math.imul(je,Kt)|0,w=w+Math.imul(Se,Jt)|0,p=p+Math.imul(Se,Yt)|0,p=p+Math.imul(_e,Jt)|0,A=A+Math.imul(_e,Yt)|0,w=w+Math.imul(he,Xt)|0,p=p+Math.imul(he,Qt)|0,p=p+Math.imul(ye,Xt)|0,A=A+Math.imul(ye,Qt)|0;var Yy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=67108863,w=Math.imul(Nt,Ut),p=Math.imul(Nt,Mt),p=p+Math.imul(Pt,Ut)|0,A=Math.imul(Pt,Mt),w=w+Math.imul($t,Dt)|0,p=p+Math.imul($t,jt)|0,p=p+Math.imul(Ot,Dt)|0,A=A+Math.imul(Ot,jt)|0,w=w+Math.imul(Rt,Ft)|0,p=p+Math.imul(Rt,Ht)|0,p=p+Math.imul(Tt,Ft)|0,A=A+Math.imul(Tt,Ht)|0,w=w+Math.imul(At,Vt)|0,p=p+Math.imul(At,Zt)|0,p=p+Math.imul(kt,Vt)|0,A=A+Math.imul(kt,Zt)|0,w=w+Math.imul(yt,Gt)|0,p=p+Math.imul(yt,qt)|0,p=p+Math.imul(bt,Gt)|0,A=A+Math.imul(bt,qt)|0,w=w+Math.imul(pt,Wt)|0,p=p+Math.imul(pt,Kt)|0,p=p+Math.imul(gt,Wt)|0,A=A+Math.imul(gt,Kt)|0,w=w+Math.imul(Ce,Jt)|0,p=p+Math.imul(Ce,Yt)|0,p=p+Math.imul(je,Jt)|0,A=A+Math.imul(je,Yt)|0,w=w+Math.imul(Se,Xt)|0,p=p+Math.imul(Se,Qt)|0,p=p+Math.imul(_e,Xt)|0,A=A+Math.imul(_e,Qt)|0;var Xy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=67108863,w=Math.imul(Nt,Dt),p=Math.imul(Nt,jt),p=p+Math.imul(Pt,Dt)|0,A=Math.imul(Pt,jt),w=w+Math.imul($t,Ft)|0,p=p+Math.imul($t,Ht)|0,p=p+Math.imul(Ot,Ft)|0,A=A+Math.imul(Ot,Ht)|0,w=w+Math.imul(Rt,Vt)|0,p=p+Math.imul(Rt,Zt)|0,p=p+Math.imul(Tt,Vt)|0,A=A+Math.imul(Tt,Zt)|0,w=w+Math.imul(At,Gt)|0,p=p+Math.imul(At,qt)|0,p=p+Math.imul(kt,Gt)|0,A=A+Math.imul(kt,qt)|0,w=w+Math.imul(yt,Wt)|0,p=p+Math.imul(yt,Kt)|0,p=p+Math.imul(bt,Wt)|0,A=A+Math.imul(bt,Kt)|0,w=w+Math.imul(pt,Jt)|0,p=p+Math.imul(pt,Yt)|0,p=p+Math.imul(gt,Jt)|0,A=A+Math.imul(gt,Yt)|0,w=w+Math.imul(Ce,Xt)|0,p=p+Math.imul(Ce,Qt)|0,p=p+Math.imul(je,Xt)|0,A=A+Math.imul(je,Qt)|0;var Qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=67108863,w=Math.imul(Nt,Ft),p=Math.imul(Nt,Ht),p=p+Math.imul(Pt,Ft)|0,A=Math.imul(Pt,Ht),w=w+Math.imul($t,Vt)|0,p=p+Math.imul($t,Zt)|0,p=p+Math.imul(Ot,Vt)|0,A=A+Math.imul(Ot,Zt)|0,w=w+Math.imul(Rt,Gt)|0,p=p+Math.imul(Rt,qt)|0,p=p+Math.imul(Tt,Gt)|0,A=A+Math.imul(Tt,qt)|0,w=w+Math.imul(At,Wt)|0,p=p+Math.imul(At,Kt)|0,p=p+Math.imul(kt,Wt)|0,A=A+Math.imul(kt,Kt)|0,w=w+Math.imul(yt,Jt)|0,p=p+Math.imul(yt,Yt)|0,p=p+Math.imul(bt,Jt)|0,A=A+Math.imul(bt,Yt)|0,w=w+Math.imul(pt,Xt)|0,p=p+Math.imul(pt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,Qt)|0;var eb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=67108863,w=Math.imul(Nt,Vt),p=Math.imul(Nt,Zt),p=p+Math.imul(Pt,Vt)|0,A=Math.imul(Pt,Zt),w=w+Math.imul($t,Gt)|0,p=p+Math.imul($t,qt)|0,p=p+Math.imul(Ot,Gt)|0,A=A+Math.imul(Ot,qt)|0,w=w+Math.imul(Rt,Wt)|0,p=p+Math.imul(Rt,Kt)|0,p=p+Math.imul(Tt,Wt)|0,A=A+Math.imul(Tt,Kt)|0,w=w+Math.imul(At,Jt)|0,p=p+Math.imul(At,Yt)|0,p=p+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,Yt)|0,w=w+Math.imul(yt,Xt)|0,p=p+Math.imul(yt,Qt)|0,p=p+Math.imul(bt,Xt)|0,A=A+Math.imul(bt,Qt)|0;var tb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=67108863,w=Math.imul(Nt,Gt),p=Math.imul(Nt,qt),p=p+Math.imul(Pt,Gt)|0,A=Math.imul(Pt,qt),w=w+Math.imul($t,Wt)|0,p=p+Math.imul($t,Kt)|0,p=p+Math.imul(Ot,Wt)|0,A=A+Math.imul(Ot,Kt)|0,w=w+Math.imul(Rt,Jt)|0,p=p+Math.imul(Rt,Yt)|0,p=p+Math.imul(Tt,Jt)|0,A=A+Math.imul(Tt,Yt)|0,w=w+Math.imul(At,Xt)|0,p=p+Math.imul(At,Qt)|0,p=p+Math.imul(kt,Xt)|0,A=A+Math.imul(kt,Qt)|0;var rb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=67108863,w=Math.imul(Nt,Wt),p=Math.imul(Nt,Kt),p=p+Math.imul(Pt,Wt)|0,A=Math.imul(Pt,Kt),w=w+Math.imul($t,Jt)|0,p=p+Math.imul($t,Yt)|0,p=p+Math.imul(Ot,Jt)|0,A=A+Math.imul(Ot,Yt)|0,w=w+Math.imul(Rt,Xt)|0,p=p+Math.imul(Rt,Qt)|0,p=p+Math.imul(Tt,Xt)|0,A=A+Math.imul(Tt,Qt)|0;var nb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=67108863,w=Math.imul(Nt,Jt),p=Math.imul(Nt,Yt),p=p+Math.imul(Pt,Jt)|0,A=Math.imul(Pt,Yt),w=w+Math.imul($t,Xt)|0,p=p+Math.imul($t,Qt)|0,p=p+Math.imul(Ot,Xt)|0,A=A+Math.imul(Ot,Qt)|0;var ob=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,w=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var ib=(k+w|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,_[0]=jy,_[1]=Fy,_[2]=Hy,_[3]=Vy,_[4]=Zy,_[5]=Gy,_[6]=qy,_[7]=Wy,_[8]=Ky,_[9]=Jy,_[10]=Yy,_[11]=Xy,_[12]=Qy,_[13]=eb,_[14]=tb,_[15]=rb,_[16]=nb,_[17]=ob,_[18]=ib,k!==0&&(_[19]=k,y.length++),y};Math.imul||($=R);function N(S,l,m){m.negative=l.negative^S.negative,m.length=S.length+l.length;for(var y=0,b=0,x=0;x<m.length-1;x++){var _=b;b=0;for(var k=y&67108863,w=Math.min(x,l.length-1),p=Math.max(0,x-S.length+1);p<=w;p++){var A=x-p,G=S.words[A]|0,K=l.words[p]|0,Q=G*K,ae=Q&67108863;_=_+(Q/67108864|0)|0,ae=ae+k|0,k=ae&67108863,_=_+(ae>>>26)|0,b+=_>>>26,_&=67108863;}m.words[x]=k,y=_,_=b;}return y!==0?m.words[x]=y:m.length--,m._strip()}function O(S,l,m){return N(S,l,m)}n.prototype.mulTo=function(l,m){var y,b=this.length+l.length;return this.length===10&&l.length===10?y=$(this,l,m):b<63?y=R(this,l,m):b<1024?y=N(this,l,m):y=O(this,l,m),y};n.prototype.mul=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},n.prototype.mulf=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),O(this,l,m)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var y=0,b=0;b<this.length;b++){var x=(this.words[b]|0)*l,_=(x&67108863)+(y&67108863);y>>=26,y+=x/67108864|0,y+=_>>>26,this.words[b]=_&67108863;}return y!==0&&(this.words[b]=y,this.length++),l===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var m=E(l);if(m.length===0)return new n(1);for(var y=this,b=0;b<m.length&&m[b]===0;b++,y=y.sqr());if(++b<m.length)for(var x=y.sqr();b<m.length;b++,x=x.sqr())m[b]!==0&&(y=y.mul(x));return y},n.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=67108863>>>26-m<<26-m,x;if(m!==0){var _=0;for(x=0;x<this.length;x++){var k=this.words[x]&b,w=(this.words[x]|0)-k<<m;this.words[x]=w|_,_=k>>>26-m;}_&&(this.words[x]=_,this.length++);}if(y!==0){for(x=this.length-1;x>=0;x--)this.words[x+y]=this.words[x];for(x=0;x<y;x++)this.words[x]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,m,y){r(typeof l=="number"&&l>=0);var b;m?b=(m-m%26)/26:b=0;var x=l%26,_=Math.min((l-x)/26,this.length),k=67108863^67108863>>>x<<x,w=y;if(b-=_,b=Math.max(0,b),w){for(var p=0;p<_;p++)w.words[p]=this.words[p];w.length=_;}if(_!==0)if(this.length>_)for(this.length-=_,p=0;p<this.length;p++)this.words[p]=this.words[p+_];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=b);p--){var G=this.words[p]|0;this.words[p]=A<<26-x|G>>>x,A=G&k;}return w&&A!==0&&(w.words[w.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(l,m,y){return r(this.negative===0),this.iushrn(l,m,y)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return false;var x=this.words[y];return !!(x&b)},n.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var b=67108863^67108863>>>m<<m;this.words[this.length-1]&=b;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,m,y){var b=l.length+y,x;this._expand(b);var _,k=0;for(x=0;x<l.length;x++){_=(this.words[x+y]|0)+k;var w=(l.words[x]|0)*m;_-=w&67108863,k=(_>>26)-(w/67108864|0),this.words[x+y]=_&67108863;}for(;x<this.length-y;x++)_=(this.words[x+y]|0)+k,k=_>>26,this.words[x+y]=_&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,x=0;x<this.length;x++)_=-(this.words[x]|0)+k,k=_>>26,this.words[x]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(l,m){var y=this.length-l.length,b=this.clone(),x=l,_=x.words[x.length-1]|0,k=this._countBits(_);y=26-k,y!==0&&(x=x.ushln(y),b.iushln(y),_=x.words[x.length-1]|0);var w=b.length-x.length,p;if(m!=="mod"){p=new n(null),p.length=w+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var G=b.clone()._ishlnsubmul(x,1,w);G.negative===0&&(b=G,p&&(p.words[w]=1));for(var K=w-1;K>=0;K--){var Q=(b.words[x.length+K]|0)*67108864+(b.words[x.length+K-1]|0);for(Q=Math.min(Q/_|0,67108863),b._ishlnsubmul(x,Q,K);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(x,1,K),b.isZero()||(b.negative^=1);p&&(p.words[K]=Q);}return p&&p._strip(),b._strip(),m!=="div"&&y!==0&&b.iushrn(y),{div:p||null,mod:b}},n.prototype.divmod=function(l,m,y){if(r(!l.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var b,x,_;return this.negative!==0&&l.negative===0?(_=this.neg().divmod(l,m),m!=="mod"&&(b=_.div.neg()),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.iadd(l)),{div:b,mod:x}):this.negative===0&&l.negative!==0?(_=this.divmod(l.neg(),m),m!=="mod"&&(b=_.div.neg()),{div:b,mod:_.mod}):(this.negative&l.negative)!==0?(_=this.neg().divmod(l.neg(),m),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.isub(l)),{div:_.div,mod:x}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modrn(l.words[0]))}:this._wordDiv(l,m)},n.prototype.div=function(l){return this.divmod(l,"div",false).div},n.prototype.mod=function(l){return this.divmod(l,"mod",false).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",true).mod},n.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var y=m.mod.abs(),b=l.abs().iushrn(1),x=l.words[0]&1,_=y.cmp(b);if(_<0||x===1&&_===0)return m.div;var k=new n(1);return k.negative=this.negative^l.negative,m.div.iadd(k)},n.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=(1<<26)%l,b=0,x=this.length-1;x>=0;x--)b=(y*b+(this.words[x]|0))%l;return m?-b:b},n.prototype.modn=function(l){return this.modrn(l)},n.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var x=(this.words[b]|0)+y*67108864;this.words[b]=x/l|0,y=x%l;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=new n(0),k=new n(1),w=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++w;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var G=0,K=1;(m.words[0]&K)===0&&G<26;++G,K<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(b.isOdd()||x.isOdd())&&(b.iadd(p),x.isub(A)),b.iushrn(1),x.iushrn(1);for(var Q=0,ae=1;(y.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(_.isOdd()||k.isOdd())&&(_.iadd(p),k.isub(A)),_.iushrn(1),k.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(_),x.isub(k)):(y.isub(m),_.isub(b),k.isub(x));}return {a:_,b:k,gcd:y.iushln(w)}},n.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var k=0,w=1;(m.words[0]&w)===0&&k<26;++k,w<<=1);if(k>0)for(m.iushrn(k);k-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(_),x.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(x)):(y.isub(m),x.isub(b));}var G;return m.cmpn(1)===0?G=b:G=x,G.cmpn(0)<0&&G.iadd(l),G},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),y=l.clone();m.negative=0,y.negative=0;for(var b=0;m.isEven()&&y.isEven();b++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var x=m.cmp(y);if(x<0){var _=m;m=y,y=_;}else if(x===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(b)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var x=b,_=y;x!==0&&_<this.length;_++){var k=this.words[_]|0;k+=x,x=k>>>26,k&=67108863,this.words[_]=k;}return x!==0&&(this.words[_]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(l=-l),r(l<=67108863,"Number is too big");var b=this.words[0]|0;y=b===l?0:b<l?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return -1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,x=l.words[y]|0;if(b!==x){b<x?m=-1:b>x&&(m=1);break}}return m},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Z(l)},n.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var P={k256:null,p224:null,p192:null,p25519:null};function L(S,l){this.name=S,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}L.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},L.prototype.ireduce=function(l){var m=l,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var b=y<this.n?-1:m.ucmp(this.p);return b===0?(m.words[0]=0,m.length=1):b>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},L.prototype.split=function(l,m){l.iushrn(this.n,0,m);},L.prototype.imulK=function(l){return l.imul(this.k)};function C(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(C,L),C.prototype.split=function(l,m){for(var y=4194303,b=Math.min(l.length,9),x=0;x<b;x++)m.words[x]=l.words[x];if(m.length=b,l.length<=9){l.words[0]=0,l.length=1;return}var _=l.words[9];for(m.words[m.length++]=_&y,x=10;x<l.length;x++){var k=l.words[x]|0;l.words[x-10]=(k&y)<<4|_>>>22,_=k;}_>>>=22,l.words[x-10]=_,_===0&&l.length>10?l.length-=10:l.length-=9;},C.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,y=0;y<l.length;y++){var b=l.words[y]|0;m+=b*977,l.words[y]=m&67108863,m=b*64+(m/67108864|0);}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function D(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(D,L);function q(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(q,L);function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(H,L),H.prototype.imulK=function(l){for(var m=0,y=0;y<l.length;y++){var b=(l.words[y]|0)*19+m,x=b&67108863;b>>>=26,l.words[y]=x,m=b;}return m!==0&&(l.words[l.length++]=m),l},n._prime=function(l){if(P[l])return P[l];var m;if(l==="k256")m=new C;else if(l==="p224")m=new D;else if(l==="p192")m=new q;else if(l==="p25519")m=new H;else throw new Error("Unknown prime "+l);return P[l]=m,m};function Z(S){if(typeof S=="string"){var l=n._prime(S);this.m=l.p,this.prime=l;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}Z.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers");},Z.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers");},Z.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(u(l,l.umod(this.m)._forceRed(this)),l)},Z.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Z.prototype.add=function(l,m){this._verify2(l,m);var y=l.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Z.prototype.iadd=function(l,m){this._verify2(l,m);var y=l.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},Z.prototype.sub=function(l,m){this._verify2(l,m);var y=l.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Z.prototype.isub=function(l,m){this._verify2(l,m);var y=l.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},Z.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},Z.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},Z.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},Z.prototype.isqr=function(l){return this.imul(l,l.clone())},Z.prototype.sqr=function(l){return this.mul(l,l)},Z.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(l,y)}for(var b=this.m.subn(1),x=0;!b.isZero()&&b.andln(1)===0;)x++,b.iushrn(1);r(!b.isZero());var _=new n(1).toRed(this),k=_.redNeg(),w=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,w).cmp(k)!==0;)p.redIAdd(k);for(var A=this.pow(p,b),G=this.pow(l,b.addn(1).iushrn(1)),K=this.pow(l,b),Q=x;K.cmp(_)!==0;){for(var ae=K,he=0;ae.cmp(_)!==0;he++)ae=ae.redSqr();r(he<Q);var ye=this.pow(A,new n(1).iushln(Q-he-1));G=G.redMul(ye),A=ye.redSqr(),K=K.redMul(A),Q=he;}return G},Z.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Z.prototype.pow=function(l,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var y=4,b=new Array(1<<y);b[0]=new n(1).toRed(this),b[1]=l;for(var x=2;x<b.length;x++)b[x]=this.mul(b[x-1],l);var _=b[0],k=0,w=0,p=m.bitLength()%26;for(p===0&&(p=26),x=m.length-1;x>=0;x--){for(var A=m.words[x],G=p-1;G>=0;G--){var K=A>>G&1;if(_!==b[0]&&(_=this.sqr(_)),K===0&&k===0){w=0;continue}k<<=1,k|=K,w++,!(w!==y&&(x!==0||G!==0))&&(_=this.mul(_,b[k]),w=0,k=0);}p=26;}return _},Z.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},Z.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},n.mont=function(l){return new re(l)};function re(S){Z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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);}o(re,Z),re.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},re.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},re.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var y=l.imul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new n(0)._forceRed(this);var y=l.mul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Gw>"u"||Gw,NA);});var CA=Wr((Ww,BA)=>{var dh=Rl(),Oo=dh.Buffer;function PA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?BA.exports=dh:(PA(dh,Ww),Ww.Buffer=Ea);function Ea(e,t,r){return Oo(e,t,r)}Ea.prototype=Object.create(Oo.prototype);PA(Oo,Ea);Ea.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};Ea.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Oo(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};Ea.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};Ea.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return dh.SlowBuffer(e)};});var LA=Wr((kY,zA)=>{var ph=CA().Buffer;function sU(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function f(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=ph.from(h)),!ph.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var v=0,E=0,R=0,$=h.length;R!==$&&h[R]===0;)R++,v++;for(var N=($-R)*u+1>>>0,O=new Uint8Array(N);R!==$;){for(var I=h[R],P=0,L=N-1;(I!==0||P<E)&&L!==-1;L--,P++)I+=256*O[L]>>>0,O[L]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");E=P,R++;}for(var C=N-E;C!==N&&O[C]===0;)C++;for(var D=a.repeat(v);C<N;++C)D+=e.charAt(O[C]);return D}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return ph.alloc(0);for(var v=0,E=0,R=0;h[v]===a;)E++,v++;for(var $=(h.length-v)*c+1>>>0,N=new Uint8Array($);v<h.length;){var O=h.charCodeAt(v);if(O>255)return;var I=t[O];if(I===255)return;for(var P=0,L=$-1;(I!==0||P<R)&&L!==-1;L--,P++)I+=s*N[L]>>>0,N[L]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");R=P,v++;}for(var C=$-R;C!==$&&N[C]===0;)C++;var D=ph.allocUnsafe(E+($-C));D.fill(0,0,E);for(var q=E;C!==$;)D[q++]=N[C++];return D}function g(h){var v=d(h);if(v)return v;throw new Error("Non-base"+s+" character")}return {encode:f,decodeUnsafe:d,decode:g}}zA.exports=sU;});var Kw=Wr((RY,UA)=>{var aU=LA(),cU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";UA.exports=aU(cU);});var MA=Wr(Xw=>{function pi(e,t,r){return t<=e&&e<=r}function bh(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function uU(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function fU(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var mh=-1;function Yw(e){this.tokens=[].slice.call(e);}Yw.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():mh},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var Dc=-1;function Jw(e,t){if(e)throw TypeError("Decoder error");return t||65533}var hh="utf-8";function gh(e,t){if(!(this instanceof gh))return new gh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}gh.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=bh(r),this._streaming||(this._decoder=new lU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new Yw(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==Dc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===Dc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),fU(i)}};function yh(e,t){if(!(this instanceof yh))return new yh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}yh.prototype={encode:function(t,r){t=t?String(t):"",r=bh(r),this._streaming||(this._encoder=new dU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new Yw(uU(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==Dc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==Dc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function lU(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===mh&&n!==0)return n=0,Jw(t);if(c===mh)return Dc;if(n===0){if(pi(c,0,127))return c;if(pi(c,194,223))n=1,r=c-192;else if(pi(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(pi(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return Jw(t);return r=r<<6*n,null}if(!pi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Jw(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function dU(e){e.fatal;this.handler=function(r,o){if(o===mh)return Dc;if(pi(o,0,127))return o;var n,i;pi(o,128,2047)?(n=1,i=192):pi(o,2048,65535)?(n=2,i=224):pi(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}Xw.TextEncoder=yh;Xw.TextDecoder=gh;});var VA=Wr(Ke=>{var pU=Ke&&Ke.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),mU=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),No=Ke&&Ke.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},hU=Ke&&Ke.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&pU(t,e,r);return mU(t,e),t},DA=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:true});Ke.deserializeUnchecked=Ke.deserialize=Ke.serialize=Ke.BinaryReader=Ke.BinaryWriter=Ke.BorshError=Ke.baseDecode=Ke.baseEncode=void 0;var rs=DA(qw()),jA=DA(Kw()),gU=hU(MA()),yU=typeof TextDecoder!="function"?gU.TextDecoder:TextDecoder,bU=new yU("utf-8",{fatal:true});function xU(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),jA.default.encode(Buffer.from(e))}Ke.baseEncode=xU;function vU(e){return Buffer.from(jA.default.decode(e))}Ke.baseDecode=vU;var Qw=1024,mr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Ke.BorshError=mr;var xh=class{constructor(){this.buf=Buffer.alloc(Qw),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(Qw)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(Qw)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Ke.BinaryWriter=xh;function Po(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new mr("Reached the end of buffer when deserializing")}throw i}};}var Hr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new rs.default(t,"le")}readU128(){let t=this.readBuffer(16);return new rs.default(t,"le")}readU256(){let t=this.readBuffer(32);return new rs.default(t,"le")}readU512(){let t=this.readBuffer(64);return new rs.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new mr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return bU.decode(r)}catch(o){throw new mr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};No([Po],Hr.prototype,"readU8",null);No([Po],Hr.prototype,"readU16",null);No([Po],Hr.prototype,"readU32",null);No([Po],Hr.prototype,"readU64",null);No([Po],Hr.prototype,"readU128",null);No([Po],Hr.prototype,"readU256",null);No([Po],Hr.prototype,"readU512",null);No([Po],Hr.prototype,"readString",null);No([Po],Hr.prototype,"readFixedArray",null);No([Po],Hr.prototype,"readArray",null);Ke.BinaryReader=Hr;function FA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sa(e,t,r,o,n){try{if(typeof o=="string")n[`write${FA(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new mr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new mr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)Sa(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Sa(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),Sa(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Sa(e,t,s,o.key,n),Sa(e,t,i,o.value,n);});break}default:throw new mr(`FieldType ${o} unrecognized`)}else HA(e,r,n);}catch(i){throw i instanceof mr&&i.addToFieldPath(t),i}}function HA(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new mr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{Sa(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),Sa(e,s,t[s],a,r);break}}}else throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function wU(e,t,r=xh){let o=new r;return HA(e,t,o),o.toArray()}Ke.serialize=wU;function Ia(e,t,r,o){try{if(typeof r=="string")return o[`read${FA(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(Ia(e,null,r[0],o));return n}else return o.readArray(()=>Ia(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Ia(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=Ia(e,t,r.key,o),c=Ia(e,t,r.value,o);n.set(a,c);}return n}return e_(e,r,o)}catch(n){throw n instanceof mr&&n.addToFieldPath(t),n}}function e_(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new mr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=Ia(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new mr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=Ia(e,i,s,r);return new t({[i]:a})}throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function _U(e,t,r,o=Hr){let n=new o(r),i=e_(e,t,n);if(n.offset<r.length)throw new mr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Ke.deserialize=_U;function EU(e,t,r,o=Hr){let n=new o(r);return e_(e,t,n)}Ke.deserializeUnchecked=EU;});var o_=Wr(M=>{Object.defineProperty(M,"__esModule",{value:true});M.s16=M.s8=M.nu64be=M.u48be=M.u40be=M.u32be=M.u24be=M.u16be=M.nu64=M.u48=M.u40=M.u32=M.u24=M.u16=M.u8=M.offset=M.greedy=M.Constant=M.UTF8=M.CString=M.Blob=M.Boolean=M.BitField=M.BitStructure=M.VariantLayout=M.Union=M.UnionLayoutDiscriminator=M.UnionDiscriminator=M.Structure=M.Sequence=M.DoubleBE=M.Double=M.FloatBE=M.Float=M.NearInt64BE=M.NearInt64=M.NearUInt64BE=M.NearUInt64=M.IntBE=M.Int=M.UIntBE=M.UInt=M.OffsetLayout=M.GreedyCount=M.ExternalLayout=M.bindConstructorLayout=M.nameWithProperty=M.Layout=M.uint8ArrayToBuffer=M.checkUint8Array=void 0;M.constant=M.utf8=M.cstr=M.blob=M.unionLayoutDiscriminator=M.union=M.seq=M.bits=M.struct=M.f64be=M.f64=M.f32be=M.f32=M.ns64be=M.s48be=M.s40be=M.s32be=M.s24be=M.s16be=M.ns64=M.s48=M.s40=M.s32=M.s24=void 0;var r_=Rl();function Hc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=Hc;function Fe(e){return Hc(e),r_.Buffer.from(e.buffer,e.byteOffset,e.length)}M.uint8ArrayToBuffer=Fe;var Ze=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};M.Layout=Ze;function n_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=n_;function SU(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof Ze))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}M.bindConstructorLayout=SU;var Ir=class extends Ze{isCount(){throw new Error("ExternalLayout is abstract")}};M.ExternalLayout=Ir;var vh=class extends Ir{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){Hc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};M.GreedyCount=vh;var Ul=class extends Ir{constructor(t,r=0,o){if(!(t instanceof Ze))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof rn||this.layout instanceof yn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};M.OffsetLayout=Ul;var rn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntLE(t,o,this.span),this.span}};M.UInt=rn;var yn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntBE(t,o,this.span),this.span}};M.UIntBE=yn;var mi=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntLE(t,o,this.span),this.span}};M.Int=mi;var ns=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntBE(t,o,this.span),this.span}};M.IntBE=ns;var t_=Math.pow(2,32);function Lh(e){let t=Math.floor(e/t_),r=e-t*t_;return {hi32:t,lo32:r}}function Uh(e,t){return e*t_+t}var wh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=wh;var _h=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=_h;var Eh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Eh;var Sh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=Sh;var Ih=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatLE(r)}encode(t,r,o=0){return Fe(r).writeFloatLE(t,o),4}};M.Float=Ih;var Ah=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatBE(r)}encode(t,r,o=0){return Fe(r).writeFloatBE(t,o),4}};M.FloatBE=Ah;var kh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleLE(r)}encode(t,r,o=0){return Fe(r).writeDoubleLE(t,o),8}};M.Double=kh;var Rh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleBE(r)}encode(t,r,o=0){return Fe(r).writeDoubleBE(t,o),8}};M.DoubleBE=Rh;var Th=class extends Ze{constructor(t,r,o){if(!(t instanceof Ze))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof Ir&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof Ir)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof Ir&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof Ir&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof Ir&&this.count.encode(t.length,r,o),i}};M.Sequence=Th;var $h=class extends Ze{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof Ze,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){Hc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};M.Structure=$h;var Ml=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};M.UnionDiscriminator=Ml;var Fc=class extends Ml{constructor(t,r){if(!(t instanceof Ir&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};M.UnionLayoutDiscriminator=Fc;var Dl=class extends Ze{constructor(t,r,o){let n;if(t instanceof rn||t instanceof yn)n=new Fc(new Ul(t));else if(t instanceof Ir&&t.isCount())n=new Fc(t);else if(t instanceof Ml)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Ze))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof rn||t instanceof yn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof rn||t instanceof yn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new Oh(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};M.Union=Dl;var Oh=class extends Ze{constructor(t,r,o,n){if(!(t instanceof Dl))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof Ze))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};M.VariantLayout=Oh;function jc(e){return 0>e&&(e+=4294967296),e}var jl=class extends Ze{constructor(t,r,o){if(!(t instanceof rn||t instanceof yn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=jc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Fl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Nh(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};M.BitStructure=jl;var Fl=class{constructor(t,r,o){if(!(t instanceof jl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=jc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return jc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==jc(t&this.valueMask))throw new TypeError(n_("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=jc(t<<this.start);this.container._packedSetValue(jc(r&~this.wordMask)|o);}};M.BitField=Fl;var Nh=class extends Fl{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};M.Boolean=Nh;var Ph=class extends Ze{constructor(t,r){if(!(t instanceof Ir&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof Ir||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Fe(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof Ir&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(n_("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Fe(t);return Fe(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof Ir&&this.length.encode(n,r,o),n}};M.Blob=Ph;var Bh=class extends Ze{constructor(t){super(-1,t);}getSpan(t,r=0){Hc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Fe(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=r_.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Fe(r);return n.copy(s,o),s[o+i]=0,i+1}};M.CString=Bh;var Ch=class extends Ze{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return Hc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Fe(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=r_.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Fe(r),o),i}};M.UTF8=Ch;var zh=class extends Ze{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};M.Constant=zh;M.greedy=((e,t)=>new vh(e,t));M.offset=((e,t,r)=>new Ul(e,t,r));M.u8=(e=>new rn(1,e));M.u16=(e=>new rn(2,e));M.u24=(e=>new rn(3,e));M.u32=(e=>new rn(4,e));M.u40=(e=>new rn(5,e));M.u48=(e=>new rn(6,e));M.nu64=(e=>new wh(e));M.u16be=(e=>new yn(2,e));M.u24be=(e=>new yn(3,e));M.u32be=(e=>new yn(4,e));M.u40be=(e=>new yn(5,e));M.u48be=(e=>new yn(6,e));M.nu64be=(e=>new _h(e));M.s8=(e=>new mi(1,e));M.s16=(e=>new mi(2,e));M.s24=(e=>new mi(3,e));M.s32=(e=>new mi(4,e));M.s40=(e=>new mi(5,e));M.s48=(e=>new mi(6,e));M.ns64=(e=>new Eh(e));M.s16be=(e=>new ns(2,e));M.s24be=(e=>new ns(3,e));M.s32be=(e=>new ns(4,e));M.s40be=(e=>new ns(5,e));M.s48be=(e=>new ns(6,e));M.ns64be=(e=>new Sh(e));M.f32=(e=>new Ih(e));M.f32be=(e=>new Ah(e));M.f64=(e=>new kh(e));M.f64be=(e=>new Rh(e));M.struct=((e,t,r)=>new $h(e,t,r));M.bits=((e,t,r)=>new jl(e,t,r));M.seq=((e,t,r)=>new Th(e,t,r));M.union=((e,t,r)=>new Dl(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Fc(e,t));M.blob=((e,t)=>new Ph(e,t));M.cstr=(e=>new Bh(e));M.utf8=((e,t)=>new Ch(e,t));M.constant=((e,t)=>new zh(e,t));});function Zl(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(Uj)}var Fh,Uj,h_=F(()=>{Uj=new Uint8Array(16);});var uk,fk=F(()=>{uk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function Mj(e){return typeof e=="string"&&uk.test(e)}var is,Gl=F(()=>{fk();is=Mj;});function Dj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]).toLowerCase();if(!is(r))throw TypeError("Stringified UUID is invalid");return r}var hr,Hh,ss,ql=F(()=>{Gl();hr=[];for(Hh=0;Hh<256;++Hh)hr.push((Hh+256).toString(16).substr(1));ss=Dj;});function jj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||lk,s=e.clockseq!==void 0?e.clockseq:g_;if(i==null||s==null){var a=e.random||(e.rng||Zl)();i==null&&(i=lk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=g_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:b_+1,f=c-y_+(u-b_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>y_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y_=c,b_=u,g_=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||ss(n)}var lk,g_,y_,b_,dk,pk=F(()=>{h_();ql();y_=0,b_=0;dk=jj;});function Fj(e){if(!is(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Vh,x_=F(()=>{Gl();Vh=Fj;});function Hj(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Zh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=Hj(n)),typeof i=="string"&&(i=Vh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return ss(c)}try{o.name=e;}catch{}return o.DNS=Vj,o.URL=Zj,o}var Vj,Zj,v_=F(()=>{ql();x_();Vj="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Zj="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function Gj(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return qj(Wj(Kj(e),e.length*8))}function qj(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function mk(e){return (e+64>>>9<<4)+14+1}function Wj(e,t){e[t>>5]|=128<<t%32,e[mk(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,f=i;r=kr(r,o,n,i,e[s],7,-680876936),i=kr(i,r,o,n,e[s+1],12,-389564586),n=kr(n,i,r,o,e[s+2],17,606105819),o=kr(o,n,i,r,e[s+3],22,-1044525330),r=kr(r,o,n,i,e[s+4],7,-176418897),i=kr(i,r,o,n,e[s+5],12,1200080426),n=kr(n,i,r,o,e[s+6],17,-1473231341),o=kr(o,n,i,r,e[s+7],22,-45705983),r=kr(r,o,n,i,e[s+8],7,1770035416),i=kr(i,r,o,n,e[s+9],12,-1958414417),n=kr(n,i,r,o,e[s+10],17,-42063),o=kr(o,n,i,r,e[s+11],22,-1990404162),r=kr(r,o,n,i,e[s+12],7,1804603682),i=kr(i,r,o,n,e[s+13],12,-40341101),n=kr(n,i,r,o,e[s+14],17,-1502002290),o=kr(o,n,i,r,e[s+15],22,1236535329),r=Rr(r,o,n,i,e[s+1],5,-165796510),i=Rr(i,r,o,n,e[s+6],9,-1069501632),n=Rr(n,i,r,o,e[s+11],14,643717713),o=Rr(o,n,i,r,e[s],20,-373897302),r=Rr(r,o,n,i,e[s+5],5,-701558691),i=Rr(i,r,o,n,e[s+10],9,38016083),n=Rr(n,i,r,o,e[s+15],14,-660478335),o=Rr(o,n,i,r,e[s+4],20,-405537848),r=Rr(r,o,n,i,e[s+9],5,568446438),i=Rr(i,r,o,n,e[s+14],9,-1019803690),n=Rr(n,i,r,o,e[s+3],14,-187363961),o=Rr(o,n,i,r,e[s+8],20,1163531501),r=Rr(r,o,n,i,e[s+13],5,-1444681467),i=Rr(i,r,o,n,e[s+2],9,-51403784),n=Rr(n,i,r,o,e[s+7],14,1735328473),o=Rr(o,n,i,r,e[s+12],20,-1926607734),r=Tr(r,o,n,i,e[s+5],4,-378558),i=Tr(i,r,o,n,e[s+8],11,-2022574463),n=Tr(n,i,r,o,e[s+11],16,1839030562),o=Tr(o,n,i,r,e[s+14],23,-35309556),r=Tr(r,o,n,i,e[s+1],4,-1530992060),i=Tr(i,r,o,n,e[s+4],11,1272893353),n=Tr(n,i,r,o,e[s+7],16,-155497632),o=Tr(o,n,i,r,e[s+10],23,-1094730640),r=Tr(r,o,n,i,e[s+13],4,681279174),i=Tr(i,r,o,n,e[s],11,-358537222),n=Tr(n,i,r,o,e[s+3],16,-722521979),o=Tr(o,n,i,r,e[s+6],23,76029189),r=Tr(r,o,n,i,e[s+9],4,-640364487),i=Tr(i,r,o,n,e[s+12],11,-421815835),n=Tr(n,i,r,o,e[s+15],16,530742520),o=Tr(o,n,i,r,e[s+2],23,-995338651),r=$r(r,o,n,i,e[s],6,-198630844),i=$r(i,r,o,n,e[s+7],10,1126891415),n=$r(n,i,r,o,e[s+14],15,-1416354905),o=$r(o,n,i,r,e[s+5],21,-57434055),r=$r(r,o,n,i,e[s+12],6,1700485571),i=$r(i,r,o,n,e[s+3],10,-1894986606),n=$r(n,i,r,o,e[s+10],15,-1051523),o=$r(o,n,i,r,e[s+1],21,-2054922799),r=$r(r,o,n,i,e[s+8],6,1873313359),i=$r(i,r,o,n,e[s+15],10,-30611744),n=$r(n,i,r,o,e[s+6],15,-1560198380),o=$r(o,n,i,r,e[s+13],21,1309151649),r=$r(r,o,n,i,e[s+4],6,-145523070),i=$r(i,r,o,n,e[s+11],10,-1120210379),n=$r(n,i,r,o,e[s+2],15,718787259),o=$r(o,n,i,r,e[s+9],21,-343485551),r=as(r,a),o=as(o,c),n=as(n,u),i=as(i,f);}return [r,o,n,i]}function Kj(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(mk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function as(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function Jj(e,t){return e<<t|e>>>32-t}function Gh(e,t,r,o,n,i){return as(Jj(as(as(t,e),as(o,i)),n),r)}function kr(e,t,r,o,n,i,s){return Gh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Gh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Gh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Gh(r^(t|~o),e,t,n,i,s)}var hk,gk=F(()=>{hk=Gj;});var Yj,yk,bk=F(()=>{v_();gk();Yj=Zh("v3",48,hk),yk=Yj;});function Xj(e,t,r){e=e||{};var o=e.random||(e.rng||Zl)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return ss(o)}var xk,vk=F(()=>{h_();ql();xk=Xj;});function Qj(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function w_(e,t){return e<<t|e>>>32-t}function e7(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),f=0;f<16;++f)u[f]=e[c*64+f*4]<<24|e[c*64+f*4+1]<<16|e[c*64+f*4+2]<<8|e[c*64+f*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var v=16;v<80;++v)g[v]=w_(g[v-3]^g[v-8]^g[v-14]^g[v-16],1);for(var E=r[0],R=r[1],$=r[2],N=r[3],O=r[4],I=0;I<80;++I){var P=Math.floor(I/20),L=w_(E,5)+Qj(P,R,$,N)+O+t[P]+g[I]>>>0;O=N,N=$,$=w_(R,30)>>>0,R=E,E=L;}r[0]=r[0]+E>>>0,r[1]=r[1]+R>>>0,r[2]=r[2]+$>>>0,r[3]=r[3]+N>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var wk,_k=F(()=>{wk=e7;});var t7,Ek,Sk=F(()=>{v_();_k();t7=Zh("v5",80,wk),Ek=t7;});var Ik,Ak=F(()=>{Ik="00000000-0000-0000-0000-000000000000";});function r7(e){if(!is(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var kk,Rk=F(()=>{Gl();kk=r7;});var __={};Er(__,{NIL:()=>Ik,parse:()=>Vh,stringify:()=>ss,v1:()=>dk,v3:()=>yk,v4:()=>xk,v5:()=>Ek,validate:()=>is,version:()=>kk});var E_=F(()=>{pk();bk();vk();Sk();Ak();Rk();Gl();ql();x_();});var $k=Wr((RX,Tk)=>{var n7=(E_(),jE(__)).v4,o7=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return n7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};Tk.exports=o7;});var Nk=Wr((TX,Ok)=>{var i7=(E_(),jE(__)).v4,s7=$k(),Wl=function(e,t){if(!(this instanceof Wl))return new Wl(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return i7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};Ok.exports=Wl;Wl.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=s7(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(f){if(u){o(f);return}throw f}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,f){n._parseResponse(u,f,o);}),i};Wl.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var Bk=Wr(($X,S_)=>{var a7=Object.prototype.hasOwnProperty,Vr="~";function Kl(){}Object.create&&(Kl.prototype=Object.create(null),new Kl().__proto__||(Vr=false));function c7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Pk(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new c7(r,o||e,n),s=Vr?Vr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function qh(e,t){--e._eventsCount===0?e._events=new Kl:delete e._events[t];}function Or(){this._events=new Kl,this._eventsCount=0;}Or.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)a7.call(r,o)&&t.push(Vr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Or.prototype.listeners=function(t){var r=Vr?Vr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Or.prototype.listenerCount=function(t){var r=Vr?Vr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Or.prototype.emit=function(t,r,o,n,i,s){var a=Vr?Vr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];c.fn.apply(c.context,f);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!f)for(h=1,f=new Array(u-1);h<u;h++)f[h-1]=arguments[h];c[d].fn.apply(c[d].context,f);}}return true};Or.prototype.on=function(t,r,o){return Pk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Pk(this,t,r,o,true)};Or.prototype.removeListener=function(t,r,o,n){var i=Vr?Vr+t:t;if(!this._events[i])return this;if(!r)return qh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&qh(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:qh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&qh(this,r)):(this._events=new Kl,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof S_<"u"&&(S_.exports=Or);});function y7(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],d=zk(u,f,1)^r[a],g=Lk(u,f,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=Mk[s],c=zk(n,i,a),u=Lk(n,i,a),f=Uk[s];n=e[f],i=e[f+1],e[f]=c,e[f+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=h7[o],e[1]^=g7[o];}Nn(r);}var f7,Yl,l7,d7,p7,m7,Uk,Mk,Dk,jk,h7,g7,zk,Lk,I_,b7,Ra,Wh=F(()=>{Ow();ai();f7=BigInt(0),Yl=BigInt(1),l7=BigInt(2),d7=BigInt(7),p7=BigInt(256),m7=BigInt(113),Uk=[],Mk=[],Dk=[];for(let e=0,t=Yl,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Uk.push(2*(5*o+r)),Mk.push((e+1)*(e+2)/2%64);let n=f7;for(let i=0;i<7;i++)t=(t<<Yl^(t>>d7)*m7)%p7,t&l7&&(n^=Yl<<(Yl<<BigInt(i))-Yl);Dk.push(n);}jk=oh(Dk,true),h7=jk[0],g7=jk[1],zk=(e,t,r)=>r>32?WI(e,t,r):GI(e,t,r),Lk=(e,t,r)=>r>32?KI(e,t,r):qI(e,t,r);I_=class e extends Ji{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,la(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=DI(this.state);}clone(){return this._cloneInto()}keccak(){kw(this.state32),y7(this.state32,this.rounds),kw(this.state32),this.posOut=0,this.pos=0;}update(t){si(this),t=da(t),Ao(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){si(this,false),Ao(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return la(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(th(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Nn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},b7=(e,t,r)=>Tl(()=>new I_(t,e,r)),Ra=b7(1,136,256/8);});var Kh,A_,Fk=F(()=>{ai();Kh=class extends Ji{constructor(t,r){super(),this.finished=false,this.destroyed=false,MI(t);let o=da(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Nn(i);}update(t){return si(this),this.iHash.update(t),this}digestInto(t){si(this),Ao(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},A_=(e,t,r)=>new Kh(e,t).update(r).digest();A_.create=(e,t)=>new Kh(e,t);});function Hk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function x7(e){let t=Cl(e);to(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function k_(e,t){return es(To(e,t))}function v7(e){let t=x7(e),{Fp:r}=t,o=di(t.n,t.nBitLength),n=t.toBytes||((O,I,P)=>{let L=I.toAffine();return ar(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),i=t.fromBytes||(O=>{let I=O.subarray(1),P=r.fromBytes(I.subarray(0,r.BYTES)),L=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return {x:P,y:L}});function s(O){let{a:I,b:P}=t,L=r.sqr(O),C=r.mul(L,O);return r.add(r.add(C,r.mul(O,I)),P)}function a(O,I){let P=r.sqr(I),L=s(O);return r.eql(P,L)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,Xl),T_),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(O){return ya(O,Je,t.n)}function d(O){let{allowedPrivateKeyLengths:I,nByteLength:P,wrapPrivateKey:L,n:C}=t;if(I&&typeof O!="bigint"){if(Lc(O)&&(O=es(O)),typeof O!="string"||!I.includes(O.length))throw new Error("invalid private key");O=O.padStart(P*2,"0");}let D;try{D=typeof O=="bigint"?O:tn(Ge("private key",O,P));}catch{throw new Error("invalid private key, expected hex or "+P+" bytes, got "+typeof O)}return L&&(D=Le(D,C)),Dr("private key",D,Je,C),D}function g(O){if(!(O instanceof E))throw new Error("ProjectivePoint expected")}let h=Mc((O,I)=>{let{px:P,py:L,pz:C}=O;if(r.eql(C,r.ONE))return {x:P,y:L};let D=O.is0();I==null&&(I=D?r.ONE:r.inv(C));let q=r.mul(P,I),H=r.mul(L,I),Z=r.mul(C,I);if(D)return {x:r.ZERO,y:r.ZERO};if(!r.eql(Z,r.ONE))throw new Error("invZ was invalid");return {x:q,y:H}}),v=Mc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:I,y:P}=O.toAffine();if(!r.isValid(I)||!r.isValid(P))throw new Error("bad point: x or y not FE");if(!a(I,P))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class E{constructor(I,P,L){if(I==null||!r.isValid(I))throw new Error("x required");if(P==null||!r.isValid(P)||r.is0(P))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=I,this.py=P,this.pz=L,Object.freeze(this);}static fromAffine(I){let{x:P,y:L}=I||{};if(!I||!r.isValid(P)||!r.isValid(L))throw new Error("invalid affine point");if(I instanceof E)throw new Error("projective point not allowed");let C=D=>r.eql(D,r.ZERO);return C(P)&&C(L)?E.ZERO:new E(P,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){let P=li(r,I.map(L=>L.pz));return I.map((L,C)=>L.toAffine(P[C])).map(E.fromAffine)}static fromHex(I){let P=E.fromAffine(i(Ge("pointHex",I)));return P.assertValidity(),P}static fromPrivateKey(I){return E.BASE.multiply(d(I))}static msm(I,P){return lh(E,o,I,P)}_setWindowSize(I){N.setWindowSize(this,I);}assertValidity(){v(this);}hasEvenY(){let{y:I}=this.toAffine();if(r.isOdd)return !r.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.eql(r.mul(P,H),r.mul(D,C)),re=r.eql(r.mul(L,H),r.mul(q,C));return Z&&re}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:I,b:P}=t,L=r.mul(P,Xl),{px:C,py:D,pz:q}=this,H=r.ZERO,Z=r.ZERO,re=r.ZERO,S=r.mul(C,C),l=r.mul(D,D),m=r.mul(q,q),y=r.mul(C,D);return y=r.add(y,y),re=r.mul(C,q),re=r.add(re,re),H=r.mul(I,re),Z=r.mul(L,m),Z=r.add(H,Z),H=r.sub(l,Z),Z=r.add(l,Z),Z=r.mul(H,Z),H=r.mul(y,H),re=r.mul(L,re),m=r.mul(I,m),y=r.sub(S,m),y=r.mul(I,y),y=r.add(y,re),re=r.add(S,S),S=r.add(re,S),S=r.add(S,m),S=r.mul(S,y),Z=r.add(Z,S),m=r.mul(D,q),m=r.add(m,m),S=r.mul(m,y),H=r.sub(H,S),re=r.mul(m,l),re=r.add(re,re),re=r.add(re,re),new E(H,Z,re)}add(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.ZERO,re=r.ZERO,S=r.ZERO,l=t.a,m=r.mul(t.b,Xl),y=r.mul(P,D),b=r.mul(L,q),x=r.mul(C,H),_=r.add(P,L),k=r.add(D,q);_=r.mul(_,k),k=r.add(y,b),_=r.sub(_,k),k=r.add(P,C);let w=r.add(D,H);return k=r.mul(k,w),w=r.add(y,x),k=r.sub(k,w),w=r.add(L,C),Z=r.add(q,H),w=r.mul(w,Z),Z=r.add(b,x),w=r.sub(w,Z),S=r.mul(l,k),Z=r.mul(m,x),S=r.add(Z,S),Z=r.sub(b,S),S=r.add(b,S),re=r.mul(Z,S),b=r.add(y,y),b=r.add(b,y),x=r.mul(l,x),k=r.mul(m,k),b=r.add(b,x),x=r.sub(y,x),x=r.mul(l,x),k=r.add(k,x),y=r.mul(b,k),re=r.add(re,y),y=r.mul(w,k),Z=r.mul(_,Z),Z=r.sub(Z,y),y=r.mul(_,b),S=r.mul(w,S),S=r.add(S,y),new E(Z,re,S)}subtract(I){return this.add(I.negate())}is0(){return this.equals(E.ZERO)}wNAF(I){return N.wNAFCached(this,I,E.normalizeZ)}multiplyUnsafe(I){let{endo:P,n:L}=t;Dr("scalar",I,oo,L);let C=E.ZERO;if(I===oo)return C;if(this.is0()||I===Je)return this;if(!P||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,I,E.normalizeZ);let{k1neg:D,k1:q,k2neg:H,k2:Z}=P.splitScalar(I),re=C,S=C,l=this;for(;q>oo||Z>oo;)q&Je&&(re=re.add(l)),Z&Je&&(S=S.add(l)),l=l.double(),q>>=Je,Z>>=Je;return D&&(re=re.negate()),H&&(S=S.negate()),S=new E(r.mul(S.px,P.beta),S.py,S.pz),re.add(S)}multiply(I){let{endo:P,n:L}=t;Dr("scalar",I,Je,L);let C,D;if(P){let{k1neg:q,k1:H,k2neg:Z,k2:re}=P.splitScalar(I),{p:S,f:l}=this.wNAF(H),{p:m,f:y}=this.wNAF(re);S=N.constTimeNegate(q,S),m=N.constTimeNegate(Z,m),m=new E(r.mul(m.px,P.beta),m.py,m.pz),C=S.add(m),D=l.add(y);}else {let{p:q,f:H}=this.wNAF(I);C=q,D=H;}return E.normalizeZ([C,D])[0]}multiplyAndAddUnsafe(I,P,L){let C=E.BASE,D=(H,Z)=>Z===oo||Z===Je||!H.equals(C)?H.multiplyUnsafe(Z):H.multiply(Z),q=D(this,P).add(D(I,L));return q.is0()?void 0:q}toAffine(I){return h(this,I)}isTorsionFree(){let{h:I,isTorsionFree:P}=t;if(I===Je)return true;if(P)return P(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:I,clearCofactor:P}=t;return I===Je?this:P?P(E,this):this.multiplyUnsafe(t.h)}toRawBytes(I=true){return Ro("isCompressed",I),this.assertValidity(),n(E,this,I)}toHex(I=true){return Ro("isCompressed",I),es(this.toRawBytes(I))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:R,nBitLength:$}=t,N=fh(E,R?Math.ceil($/2):$);return {CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function w7(e){let t=Cl(e);return to(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Vk(e){let t=w7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Le(m,o)}function u(m){return ch(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=v7({...t,toBytes(m,y,b){let x=y.toAffine(),_=r.toBytes(x.x),k=ar;return Ro("isCompressed",b),b?k(Uint8Array.from([y.hasEvenY()?2:3]),_):k(Uint8Array.from([4]),_,r.toBytes(x.y))},fromBytes(m){let y=m.length,b=m[0],x=m.subarray(1);if(y===s&&(b===2||b===3)){let _=tn(x);if(!ya(_,Je,r.ORDER))throw new Error("Point is not on curve");let k=g(_),w;try{w=r.sqrt(k);}catch(G){let K=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+K)}let p=(w&Je)===Je;return (b&1)===1!==p&&(w=r.neg(w)),{x:_,y:w}}else if(y===a&&b===4){let _=r.fromBytes(x.subarray(0,r.BYTES)),k=r.fromBytes(x.subarray(r.BYTES,2*r.BYTES));return {x:_,y:k}}else {let _=s,k=a;throw new Error("invalid Point, expected length of "+_+", or uncompressed "+k+", got "+y)}}});function v(m){let y=o>>Je;return m>y}function E(m){return v(m)?c(-m):m}let R=(m,y,b)=>tn(m.slice(y,b));class ${constructor(y,b,x){Dr("r",y,Je,o),Dr("s",b,Je,o),this.r=y,this.s=b,x!=null&&(this.recovery=x),Object.freeze(this);}static fromCompact(y){let b=n;return y=Ge("compactSignature",y,b*2),new $(R(y,0,b),R(y,b,2*b))}static fromDER(y){let{r:b,s:x}=hi.toSig(Ge("DER",y));return new $(b,x)}assertValidity(){}addRecoveryBit(y){return new $(this.r,this.s,y)}recoverPublicKey(y){let{r:b,s:x,recovery:_}=this,k=C(Ge("msgHash",y));if(_==null||![0,1,2,3].includes(_))throw new Error("recovery id invalid");let w=_===2||_===3?b+t.n:b;if(w>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(_&1)===0?"02":"03",A=f.fromHex(p+k_(w,r.BYTES)),G=u(w),K=c(-k*G),Q=c(x*G),ae=f.BASE.multiplyAndAddUnsafe(A,K,Q);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bl(this.toDERHex())}toDERHex(){return hi.hexFromSig(this)}toCompactRawBytes(){return Bl(this.toCompactHex())}toCompactHex(){let y=n;return k_(this.r,y)+k_(this.s,y)}}let N={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Uw(t.n);return yA(t.randomBytes(m),t.n)},precompute(m=8,y=f.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return f.fromPrivateKey(m).toRawBytes(y)}function I(m){if(typeof m=="bigint")return false;if(m instanceof f)return true;let b=Ge("key",m).length,x=r.BYTES,_=x+1,k=2*x+1;if(!(t.allowedPrivateKeyLengths||n===_))return b===_||b===k}function P(m,y,b=true){if(I(m)===true)throw new Error("first arg must be private key");if(I(y)===false)throw new Error("second arg must be public key");return f.fromHex(y).multiply(d(m)).toRawBytes(b)}let L=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=tn(m),b=m.length*8-i;return b>0?y>>BigInt(b):y},C=t.bits2int_modN||function(m){return c(L(m))},D=ba(i);function q(m){return Dr("num < 2^"+i,m,oo,D),To(m,n)}function H(m,y,b=Z){if(["recovered","canonical"].some(ye=>ye in b))throw new Error("sign() legacy options not supported");let{hash:x,randomBytes:_}=t,{lowS:k,prehash:w,extraEntropy:p}=b;k==null&&(k=true),m=Ge("msgHash",m),Hk(b),w&&(m=Ge("prehashed msgHash",x(m)));let A=C(m),G=d(y),K=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?_(r.BYTES):p;K.push(Ge("extraEntropy",ye));}let Q=ar(...K),ae=A;function he(ye){let We=L(ye);if(!h(We))return;let Se=u(We),_e=f.BASE.multiply(We).toAffine(),tr=c(_e.x);if(tr===oo)return;let Ce=c(Se*c(ae+tr*G));if(Ce===oo)return;let je=(_e.x===tr?0:2)|Number(_e.y&Je),Li=Ce;return k&&v(Ce)&&(Li=E(Ce),je^=1),new $(tr,Li,je)}return {seed:Q,k2sig:he}}let Z={lowS:t.lowS,prehash:false},re={lowS:t.lowS,prehash:false};function S(m,y,b=Z){let{seed:x,k2sig:_}=H(m,y,b),k=t;return uA(k.hash.outputLen,k.nByteLength,k.hmac)(x,_)}f.BASE._setWindowSize(8);function l(m,y,b,x=re){let _=m;y=Ge("msgHash",y),b=Ge("publicKey",b);let{lowS:k,prehash:w,format:p}=x;if(Hk(x),"strict"in x)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof _=="string"||Lc(_),G=!A&&!p&&typeof _=="object"&&_!==null&&typeof _.r=="bigint"&&typeof _.s=="bigint";if(!A&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let K,Q;try{if(G&&(K=new $(_.r,_.s)),A){try{p!=="compact"&&(K=$.fromDER(_));}catch(je){if(!(je instanceof hi.Err))throw je}!K&&p!=="der"&&(K=$.fromCompact(_));}Q=f.fromHex(b);}catch{return false}if(!K||k&&K.hasHighS())return false;w&&(y=t.hash(y));let{r:ae,s:he}=K,ye=C(y),We=u(he),Se=c(ye*We),_e=c(ae*We),tr=f.BASE.multiplyAndAddUnsafe(Q,Se,_e)?.toAffine();return tr?c(tr.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:P,sign:S,verify:l,ProjectivePoint:f,Signature:$,utils:N}}function _7(e,t){let r=e.ORDER,o=oo;for(let v=r-Je;v%cs===oo;v/=cs)o+=Je;let n=o,i=cs<<n-Je-Je,s=i*cs,a=(r-Je)/s,c=(a-Je)/cs,u=s-Je,f=i,d=e.pow(t,a),g=e.pow(t,(a+Je)/cs),h=(v,E)=>{let R=d,$=e.pow(E,u),N=e.sqr($);N=e.mul(N,E);let O=e.mul(v,N);O=e.pow(O,c),O=e.mul(O,$),$=e.mul(O,E),N=e.mul(O,v);let I=e.mul(N,$);O=e.pow(I,f);let P=e.eql(O,e.ONE);$=e.mul(N,g),O=e.mul(I,R),N=e.cmov($,N,P),I=e.cmov(O,I,P);for(let L=n;L>Je;L--){let C=L-cs;C=cs<<C-Je;let D=e.pow(I,C),q=e.eql(D,e.ONE);$=e.mul(N,R),R=e.mul(R,R),D=e.mul(I,R),N=e.cmov($,N,q),I=e.cmov(D,I,q);}return {isValid:P,value:N}};if(e.ORDER%T_===Xl){let v=(e.ORDER-Xl)/T_,E=e.sqrt(e.neg(t));h=(R,$)=>{let N=e.sqr($),O=e.mul(R,$);N=e.mul(N,O);let I=e.pow(N,v);I=e.mul(I,O);let P=e.mul(I,E),L=e.mul(e.sqr(I),$),C=e.eql(L,R),D=e.cmov(P,I,C);return {isValid:C,value:D}};}return h}function Zk(e,t){if(uh(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=_7(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,f,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),f=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),f=e.cmov(f,s,g),d=e.cmov(d,h,g);let v=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,v);let E=li(e,[a],true)[0];return f=e.mul(f,E),{x:f,y:d}}}var R_,hi,oo,Je,cs,Xl,T_,$_=F(()=>{Vw();wa();xa();R_=class extends Error{constructor(t=""){super(t);}},hi={Err:R_,_tlv:{encode:(e,t)=>{let{Err:r}=hi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=Pl(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Pl(n.length/2|128):"";return Pl(e)+i+n+t},decode(e,t){let{Err:r}=hi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)s=s<<8|f;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=hi;if(e<oo)throw new t("integer: negative integers are not allowed");let r=Pl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=hi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return tn(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=hi,n=Ge("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l:f}=o.decode(2,c);if(f.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=hi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};oo=BigInt(0),Je=BigInt(1),cs=BigInt(2),Xl=BigInt(3),T_=BigInt(4);});function E7(e){return {hash:e,hmac:(t,...r)=>A_(e,t,Rw(...r)),randomBytes:zc}}function Gk(e,t){let r=o=>Vk({...e,...E7(o)});return {...r(t),create:r}}var qk=F(()=>{Fk();ai();$_();});var eR={};Er(eR,{encodeToCurve:()=>O7,hashToCurve:()=>$7,schnorr:()=>k7,secp256k1:()=>bn,secp256k1_hasher:()=>L_});function Jk(e){let t=td,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,f=u*u*e%t,d=at(f,r,t)*f%t,g=at(d,r,t)*f%t,h=at(g,Yh,t)*u%t,v=at(h,n,t)*h%t,E=at(v,i,t)*v%t,R=at(E,a,t)*E%t,$=at(R,c,t)*R%t,N=at($,a,t)*E%t,O=at(N,r,t)*f%t,I=at(O,s,t)*v%t,P=at(I,o,t)*u%t,L=at(P,Yh,t);if(!us.eql(us.sqr(L),e))throw new Error("Cannot find square root");return L}function Xh(e,...t){let r=Kk[e];if(r===void 0){let o=ha(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Kk[e]=r;}return ha(ar(r,...t))}function P_(e){let t=bn.utils.normPrivateKeyToScalar(e),r=z_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ed(-t),bytes:C_(r)}}function Yk(e){Dr("x",e,Ql,td);let t=O_(e*e),r=O_(t*e+BigInt(7)),o=Jk(r);o%Yh!==B_&&(o=O_(-o));let n=new z_(e,o,Ql);return n.assertValidity(),n}function Xk(...e){return ed(qc(Xh("BIP0340/challenge",...e)))}function I7(e){return P_(e).bytes}function A7(e,t,r=zc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=P_(t),s=Ge("auxRand",r,32),a=N_(i^qc(Xh("BIP0340/aux",s))),c=Xh("BIP0340/nonce",a,n,o),u=ed(qc(c));if(u===B_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=P_(u),g=Xk(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(N_(ed(d+g*i)),32),!Qk(h,o,n))throw new Error("sign: Invalid signature produced");return h}function Qk(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=Yk(qc(i)),a=qc(o.subarray(0,32));if(!ya(a,Ql,td))return !1;let c=qc(o.subarray(32,64));if(!ya(c,Ql,Jh))return !1;let u=Xk(N_(a),C_(s),n),f=S7(s,c,ed(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var td,Jh,B_,Ql,Yh,Wk,us,bn,Kk,C_,N_,O_,ed,z_,S7,qc,k7,R7,T7,L_,$7,O7,rd=F(()=>{sh();ai();qk();kA();wa();xa();$_();td=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),B_=BigInt(0),Ql=BigInt(1),Yh=BigInt(2),Wk=(e,t)=>(e+t/Yh)/t;us=di(td,void 0,void 0,{sqrt:Jk}),bn=Gk({a:B_,b:BigInt(7),Fp:us,n:Jh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Jh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-Ql*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Wk(i*e,t),c=Wk(-o*e,t),u=Le(e-a*r-c*n,t),f=Le(-a*o-c*i,t),d=u>s,g=f>s;if(d&&(u=t-u),g&&(f=t-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:f}}}},ha),Kk={};C_=e=>e.toRawBytes(true).slice(1),N_=e=>To(e,32),O_=e=>Le(e,td),ed=e=>Le(e,Jh),z_=bn.ProjectivePoint,S7=(e,t,r)=>z_.BASE.multiplyAndAddUnsafe(e,t,r);qc=tn;k7={getPublicKey:I7,sign:A7,verify:Qk,utils:{randomPrivateKey:bn.utils.randomPrivateKey,lift_x:Yk,pointToBytes:C_,numberToBytesBE:To,bytesToNumberBE:tn,taggedHash:Xh,mod:Le}},R7=IA(us,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),T7=Zk(us,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:us.create(BigInt("-11"))}),L_=AA(bn.ProjectivePoint,e=>{let{x:t,y:r}=T7(us.create(e[0]));return R7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:us.ORDER,m:1,k:128,expand:"xmd",hash:ha}),$7=L_.hashToCurve,O7=L_.encodeToCurve;});var lT,dT=F(()=>{lT="1.2.3";});var _t,ru=F(()=>{dT();_t=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${lT}`].join(`
3
- `);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function _n(e,t){return e.exec(t)?.groups}var T6,$6,w0,Sd=F(()=>{T6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,$6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,w0=/^\(.+?\).*?$/;});function _0(e){let t=e.type;if(pT.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=_0(i),n<r-1&&(t+=", ");}let o=_n(pT,e.type);return t+=`)${o?.array||""}`,_0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var pT,mT=F(()=>{Sd();pT=/^tuple(?<array>(\[(\d*)\])*)$/;});function bi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=_0(n),o!==r-1&&(t+=", ");}return t}var O6=F(()=>{mT();});function Ba(e){return e.type==="function"?`function ${e.name}(${bi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${bi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${bi(e.inputs)})`:e.type==="error"?`error ${e.name}(${bi(e.inputs)})`:e.type==="constructor"?`constructor(${bi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var hT=F(()=>{O6();});function yT(e){return gT.test(e)}function bT(e){return _n(gT,e)}function vT(e){return xT.test(e)}function wT(e){return _n(xT,e)}function ET(e){return _T.test(e)}function ST(e){return _n(_T,e)}function ds(e){return IT.test(e)}function AT(e){return _n(IT,e)}function RT(e){return kT.test(e)}function TT(e){return _n(kT,e)}function OT(e){return $T.test(e)}function NT(e){return _n($T,e)}function PT(e){return oH.test(e)}var gT,xT,_T,IT,kT,$T,oH,N6,BT,E0,nu=F(()=>{Sd();gT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;xT=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;_T=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;IT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;kT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;$T=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;oH=/^receive\(\) external payable$/;N6=new Set(["memory","indexed","storage","calldata"]),BT=new Set(["indexed"]),E0=new Set(["calldata","memory","storage"]);});var Id,Ad,S0,I0=F(()=>{ru();Id=class extends _t{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},Ad=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},S0=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var kd,Rd,Td,$d,Od,Nd,A0=F(()=>{ru();kd=class extends _t{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Rd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Td=class extends _t{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},$d=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Od=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Nd=class extends _t{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var ao,Pd,Bd,P6=F(()=>{ru();ao=class extends _t{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Pd=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Bd=class extends _t{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Cd,CT=F(()=>{ru();Cd=class extends _t{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var zd,zT=F(()=>{ru();zd=class extends _t{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function LT(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var k0,UT=F(()=>{k0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Ld(e,t={}){if(ET(e))return iH(e,t);if(vT(e))return sH(e,t);if(yT(e))return aH(e,t);if(RT(e))return cH(e,t);if(OT(e))return uH(e);if(PT(e))return {type:"receive",stateMutability:"payable"};throw new Pd({signature:e})}function iH(e,t={}){let r=ST(e);if(!r)throw new ao({signature:e,type:"function"});let o=nn(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(co(o[a],{modifiers:E0,structs:t,type:"function"}));let s=[];if(r.returns){let a=nn(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(co(a[u],{modifiers:E0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function sH(e,t={}){let r=wT(e);if(!r)throw new ao({signature:e,type:"event"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{modifiers:BT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function aH(e,t={}){let r=bT(e);if(!r)throw new ao({signature:e,type:"error"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function cH(e,t={}){let r=TT(e);if(!r)throw new ao({signature:e,type:"constructor"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function uH(e){let t=NT(e);if(!t)throw new ao({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function co(e,t){let r=LT(e,t?.type,t?.structs);if(k0.has(r))return k0.get(r);let o=w0.test(e),n=_n(o?lH:fH,e);if(!n)throw new Rd({param:e});if(n.name&&mH(n.name))throw new Td({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=nn(n.type),g=[],h=d.length;for(let v=0;v<h;v++)g.push(co(d[v],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(dH.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!B6(c))throw new S0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new $d({param:e,type:t?.type,modifier:n.modifier});if(E0.has(n.modifier)&&!hH(c,!!n.array))throw new Od({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return k0.set(r,f),f}function nn(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?nn(a,[...t,r.trim()]):nn(a,t,`${r}${s}`,o);case "(":return nn(a,t,`${r}${s}`,o+1);case ")":return nn(a,t,`${r}${s}`,o-1);default:return nn(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new zd({current:r,depth:o});return t.push(r.trim()),t}function B6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||T6.test(e)||$6.test(e)}function mH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||T6.test(e)||$6.test(e)||pH.test(e)}function hH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var fH,lH,dH,pH,ou=F(()=>{Sd();I0();A0();P6();zT();UT();nu();fH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,lH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,dH=/^u?int$/;pH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function iu(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!ds(a))continue;let c=AT(a);if(!c)throw new ao({signature:a,type:"struct"});let u=c.properties.split(";"),f=[],d=u.length;for(let g=0;g<d;g++){let v=u[g].trim();if(!v)continue;let E=co(v,{type:"struct"});f.push(E);}if(!f.length)throw new Bd({signature:a});t[c.name]=f;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=MT(c,t);}return o}function MT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(w0.test(s.type))o.push(s);else {let c=_n(gH,s.type);if(!c?.type)throw new Nd({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new Cd({type:f});o.push({...s,type:`tuple${u??""}`,components:MT(t[f],t,new Set([...r,f]))});}else if(B6(f))o.push(s);else throw new Ad({type:f})}}return o}var gH,R0=F(()=>{Sd();I0();A0();P6();CT();nu();ou();gH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function ps(e){let t=iu(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];ds(i)||r.push(Ld(i,t));}return r}var DT=F(()=>{nu();R0();ou();});function Ud(e){let t;if(typeof e=="string")t=Ld(e);else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!ds(i)){t=Ld(i,r);break}}}if(!t)throw new Id({signature:e});return t}var jT=F(()=>{I0();nu();R0();ou();});function Md(e){let t=[];if(typeof e=="string"){let r=nn(e),o=r.length;for(let n=0;n<o;n++)t.push(co(r[n],{modifiers:N6}));}else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(ds(i))continue;let s=nn(i),a=s.length;for(let c=0;c<a;c++)t.push(co(s[c],{modifiers:N6,structs:r}));}}if(t.length===0)throw new kd({params:e});return t}var FT=F(()=>{A0();nu();R0();ou();ou();});var su=F(()=>{hT();O6();DT();jT();FT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new T0(e.type);return `${e.name}(${Dd(e.inputs,{includeName:t})})`}function Dd(e,{includeName:t=false}={}){return e?e.map(r=>yH(r,{includeName:t})).join(t?", ":","):""}function yH(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Dd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var xi=F(()=>{Et();});function St(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var uo=F(()=>{});function $e(e){return St(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var on=F(()=>{uo();});var C6,VT=F(()=>{C6="2.55.16";});function ZT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ZT(e.cause,t):t?null:e}var z6,z,Te=F(()=>{VT();z6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${C6}`},z=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=z6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...z6.version?[`Version: ${z6.version}`]:[]].join(`
4
- `);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=C6;}walk(t){return ZT(this,t)}};});var $0,jd,au,Cn,O0,N0,P0,B0,Fd,cu,C0,z0,Hd,fo,uu,L0,U0,M0,vi,ms,D0,j0,fu,T0,Et=F(()=>{xi();on();Te();$0=class extends z{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
2
+ var eN=Object.create;var Cp=Object.defineProperty;var tN=Object.getOwnPropertyDescriptor;var rN=Object.getOwnPropertyNames;var nN=Object.getPrototypeOf,oN=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Cp(e,r,{get:t[r],enumerable:true});},FE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rN(t))!oN.call(e,n)&&n!==r&&Cp(e,n,{get:()=>t[n],enumerable:!(o=tN(t,n))||o.enumerable});return e};var Ko=(e,t,r)=>(r=e!=null?eN(nN(e)):{},FE(t||!e||!e.__esModule?Cp(r,"default",{value:e,enumerable:true}):r,e)),HE=e=>FE(Cp({},"__esModule",{value:true}),e);var wI=Wr(Xm=>{Xm.byteLength=eL;Xm.toByteArray=rL;Xm.fromByteArray=iL;var So=[],On=[],Qz=typeof Uint8Array<"u"?Uint8Array:Array,xw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ca=0,xI=xw.length;ca<xI;++ca)So[ca]=xw[ca],On[xw.charCodeAt(ca)]=ca;var ca,xI;On[45]=62;On[95]=63;function vI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function eL(e){var t=vI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function tL(e,t,r){return (t+r)*3/4-r}function rL(e){var t,r=vI(e),o=r[0],n=r[1],i=new Qz(tL(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=On[e.charCodeAt(c)]<<18|On[e.charCodeAt(c+1)]<<12|On[e.charCodeAt(c+2)]<<6|On[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=On[e.charCodeAt(c)]<<2|On[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=On[e.charCodeAt(c)]<<10|On[e.charCodeAt(c+1)]<<4|On[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function nL(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function oL(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(nL(o));return n.join("")}function iL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(oL(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(So[t>>2]+So[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),n.join("")}});var _I=Wr(vw=>{vw.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,f=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+e[t+d],d+=g,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=o;f>0;s=s*256+e[t+d],d+=g,f-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};vw.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,f=(1<<u)-1,d=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,v=o?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=v,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=v,s/=256,u-=8);e[r+h-v]|=E*128;};});var Rl=Wr(Cc=>{var ww=wI(),Pc=_I(),EI=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Cc.Buffer=V;Cc.SlowBuffer=lL;Cc.INSPECT_MAX_BYTES=50;var Qm=2147483647;Cc.kMaxLength=Qm;V.TYPED_ARRAY_SUPPORT=sL();!V.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function sL(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(V.prototype,"parent",{enumerable:true,get:function(){if(V.isBuffer(this))return this.buffer}});Object.defineProperty(V.prototype,"offset",{enumerable:true,get:function(){if(V.isBuffer(this))return this.byteOffset}});function ii(e){if(e>Qm)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,V.prototype),t}function V(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Iw(e)}return kI(e,t,r)}V.poolSize=8192;function kI(e,t,r){if(typeof e=="string")return cL(e,t);if(ArrayBuffer.isView(e))return uL(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Io(e,ArrayBuffer)||e&&Io(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Io(e,SharedArrayBuffer)||e&&Io(e.buffer,SharedArrayBuffer)))return Ew(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return V.from(o,t,r);let n=fL(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return V.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}V.from=function(e,t,r){return kI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function RI(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function aL(e,t,r){return RI(e),e<=0?ii(e):t!==void 0?typeof r=="string"?ii(e).fill(t,r):ii(e).fill(t):ii(e)}V.alloc=function(e,t,r){return aL(e,t,r)};function Iw(e){return RI(e),ii(e<0?0:Aw(e)|0)}V.allocUnsafe=function(e){return Iw(e)};V.allocUnsafeSlow=function(e){return Iw(e)};function cL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=TI(e,t)|0,o=ii(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function _w(e){let t=e.length<0?0:Aw(e.length)|0,r=ii(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function uL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return Ew(t.buffer,t.byteOffset,t.byteLength)}return _w(e)}function Ew(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,V.prototype),o}function fL(e){if(V.isBuffer(e)){let t=Aw(e.length)|0,r=ii(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Rw(e.length)?ii(0):_w(e);if(e.type==="Buffer"&&Array.isArray(e.data))return _w(e.data)}function Aw(e){if(e>=Qm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qm.toString(16)+" bytes");return e|0}function lL(e){return +e!=e&&(e=0),V.alloc(+e)}V.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==V.prototype};V.compare=function(t,r){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),Io(r,Uint8Array)&&(r=V.from(r,r.offset,r.byteLength)),!V.isBuffer(t)||!V.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};V.isEncoding=function(t){switch(String(t).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 true;default:return false}};V.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return V.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=V.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(Io(s,Uint8Array))i+s.length>n.length?(V.isBuffer(s)||(s=V.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(V.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function TI(e,t){if(V.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Io(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return Sw(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return UI(e).length;default:if(n)return o?-1:Sw(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=TI;function dL(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return _L(this,t,r);case "utf8":case "utf-8":return OI(this,t,r);case "ascii":return vL(this,t,r);case "latin1":case "binary":return wL(this,t,r);case "base64":return bL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return EL(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function ua(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}V.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)ua(this,r,r+1);return this};V.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)ua(this,r,r+3),ua(this,r+1,r+2);return this};V.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)ua(this,r,r+7),ua(this,r+1,r+6),ua(this,r+2,r+5),ua(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?OI(this,0,t):dL.apply(this,arguments)};V.prototype.toLocaleString=V.prototype.toString;V.prototype.equals=function(t){if(!V.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:V.compare(this,t)===0};V.prototype.inspect=function(){let t="",r=Cc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};EI&&(V.prototype[EI]=V.prototype.inspect);V.prototype.compare=function(t,r,o,n,i){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),!V.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),f=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==f[d]){s=u[d],a=f[d];break}return s<a?-1:a<s?1:0};function $I(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Rw(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=V.from(t,o)),V.isBuffer(t))return t.length===0?-1:SI(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):SI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function SI(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(f,d){return i===1?f[d]:f.readUInt16BE(d*i)}let u;if(n){let f=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*i}else f!==-1&&(u-=u-f),f=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let f=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){f=false;break}if(f)return u}return -1}V.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};V.prototype.indexOf=function(t,r,o){return $I(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return $I(this,t,r,o,false)};function pL(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(Rw(a))return s;e[r+s]=a;}return s}function mL(e,t,r,o){return eh(Sw(t,e.length-r),e,r,o)}function hL(e,t,r,o){return eh(kL(t),e,r,o)}function gL(e,t,r,o){return eh(UI(t),e,r,o)}function yL(e,t,r,o){return eh(RL(t,e.length-r),e,r,o)}V.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return pL(this,t,r,o);case "utf8":case "utf-8":return mL(this,t,r,o);case "ascii":case "latin1":case "binary":return hL(this,t,r,o);case "base64":return gL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return yL(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};V.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function bL(e,t,r){return t===0&&r===e.length?ww.fromByteArray(e):ww.fromByteArray(e.slice(t,r))}function OI(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,f,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],f=e[n+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return xL(o)}var II=4096;function xL(e){let t=e.length;if(t<=II)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=II));return r}function vL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function wL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function _L(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=TL[e[i]];return n}function EL(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}V.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,V.prototype),n};function sr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};V.prototype.readUintBE=V.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};V.prototype.readUint8=V.prototype.readUInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]};V.prototype.readUint16LE=V.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]|this[t+1]<<8};V.prototype.readUint16BE=V.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]<<8|this[t+1]};V.prototype.readUint32LE=V.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};V.prototype.readUint32BE=V.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};V.prototype.readBigUInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});V.prototype.readBigUInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});V.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};V.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};V.prototype.readInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};V.prototype.readInt16LE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};V.prototype.readInt16BE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};V.prototype.readInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};V.prototype.readInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};V.prototype.readBigInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});V.prototype.readBigInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});V.prototype.readFloatLE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,true,23,4)};V.prototype.readFloatBE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,false,23,4)};V.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,true,52,8)};V.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,false,52,8)};function en(e,t,r,o,n,i){if(!V.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};V.prototype.writeUintBE=V.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};V.prototype.writeUint8=V.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,255,0),this[r]=t&255,r+1};V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function NI(e,t,r,o,n){LI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function PI(e,t,r,o,n){LI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}V.prototype.writeBigUInt64LE=Ki(function(t,r=0){return NI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Ki(function(t,r=0){return PI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};V.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};V.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};V.prototype.writeBigInt64LE=Ki(function(t,r=0){return NI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Ki(function(t,r=0){return PI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function BI(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function CI(e,t,r,o,n){return t=+t,r=r>>>0,n||BI(e,t,r,4),Pc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return CI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return CI(this,t,r,false,o)};function zI(e,t,r,o,n){return t=+t,r=r>>>0,n||BI(e,t,r,8),Pc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return zI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return zI(this,t,r,false,o)};V.prototype.copy=function(t,r,o,n){if(!V.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};V.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!V.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=V.isBuffer(t)?t:V.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var Nc={};function kw(e,t,r){Nc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}kw("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);kw("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);kw("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=AI(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=AI(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function AI(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function SL(e,t,r){Bc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&kl(t,e.length-(r+1));}function LI(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new Nc.ERR_OUT_OF_RANGE("value",a,e)}SL(o,n,i);}function Bc(e,t){if(typeof e!="number")throw new Nc.ERR_INVALID_ARG_TYPE(t,"number",e)}function kl(e,t,r){throw Math.floor(e)!==e?(Bc(e,r),new Nc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new Nc.ERR_BUFFER_OUT_OF_BOUNDS:new Nc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var IL=/[^+/0-9A-Za-z-_]/g;function AL(e){if(e=e.split("=")[0],e=e.trim().replace(IL,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function Sw(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function kL(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function RL(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function UI(e){return ww.toByteArray(AL(e))}function eh(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Io(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Rw(e){return e!==e}var TL=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function Ki(e){return typeof BigInt>"u"?$L:e}function $L(){throw new Error("BigInt not supported")}});var fa,MI=F(()=>{fa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function OL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function la(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!OL(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function DI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");la(e.outputLen),la(e.blockLen);}function si(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function th(e,t){Ao(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function jI(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Nn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function rh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function eo(e,t){return e<<32-t|e>>>t}function PL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function BL(e){for(let t=0;t<e.length;t++)e[t]=PL(e[t]);return e}function FI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function da(e){return typeof e=="string"&&(e=FI(e)),Ao(e),e}function $w(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Ao(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Tl(e){let t=o=>e().update(da(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function zc(e=32){if(fa&&typeof fa.getRandomValues=="function")return fa.getRandomValues(new Uint8Array(e));if(fa&&typeof fa.randomBytes=="function")return Uint8Array.from(fa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var NL,Tw,Ji,ai=F(()=>{MI();NL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;Tw=NL?e=>e:BL;Ji=class{};});function CL(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function HI(e,t,r){return e&t^~e&r}function VI(e,t,r){return e&t^e&r^t&r}var $l,ci,pr,ZI=F(()=>{ai();$l=class extends Ji{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=rh(this.buffer);}update(t){si(this),t=da(t),Ao(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=rh(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){si(this),th(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Nn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;CL(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=rh(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,f[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},ci=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function zL(e,t=false){return t?{h:Number(e&nh),l:Number(e>>GI&nh)}:{h:Number(e>>GI&nh)|0,l:Number(e&nh)|0}}function oh(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=zL(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function ko(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var nh,GI,Ow,Nw,pa,ma,Ol,Nl,qI,WI,KI,JI,YI,XI,QI,eA,tA,rA,Pw=F(()=>{nh=BigInt(4294967295),GI=BigInt(32);Ow=(e,t,r)=>e>>>r,Nw=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ma=(e,t,r)=>e<<32-r|t>>>r,Ol=(e,t,r)=>e<<64-r|t>>>r-32,Nl=(e,t,r)=>e>>>r-32|t<<64-r,qI=(e,t,r)=>e<<r|t>>>32-r,WI=(e,t,r)=>t<<r|e>>>32-r,KI=(e,t,r)=>t<<r-32|e>>>64-r,JI=(e,t,r)=>e<<r-32|t>>>64-r;YI=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),XI=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,QI=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),eA=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,tA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),rA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var UL,Yi,ih,nA,ML,DL,Xi,Qi,Bw,ha,oA,sh=F(()=>{ZI();Pw();ai();UL=Uint32Array.from([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]),Yi=new Uint32Array(64),ih=class extends $l{constructor(t=32){super(64,t,8,false),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)Yi[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Yi[d-15],h=Yi[d-2],v=eo(g,7)^eo(g,18)^g>>>3,E=eo(h,17)^eo(h,19)^h>>>10;Yi[d]=E+Yi[d-7]+v+Yi[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){let g=eo(a,6)^eo(a,11)^eo(a,25),h=f+g+HI(a,c,u)+UL[d]+Yi[d]|0,E=(eo(o,2)^eo(o,13)^eo(o,22))+VI(o,n,i)|0;f=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+E|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(o,n,i,s,a,c,u,f);}roundClean(){Nn(Yi);}destroy(){this.set(0,0,0,0,0,0,0,0),Nn(this.buffer);}},nA=oh(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),ML=nA[0],DL=nA[1],Xi=new Uint32Array(80),Qi=new Uint32Array(80),Bw=class extends $l{constructor(t=64){super(128,t,16,false),this.Ah=pr[0]|0,this.Al=pr[1]|0,this.Bh=pr[2]|0,this.Bl=pr[3]|0,this.Ch=pr[4]|0,this.Cl=pr[5]|0,this.Dh=pr[6]|0,this.Dl=pr[7]|0,this.Eh=pr[8]|0,this.El=pr[9]|0,this.Fh=pr[10]|0,this.Fl=pr[11]|0,this.Gh=pr[12]|0,this.Gl=pr[13]|0,this.Hh=pr[14]|0,this.Hl=pr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:h,Gl:v,Hh:E,Hl:R}=this;return [t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R]}set(t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=v|0,this.Hh=E|0,this.Hl=R|0;}process(t,r){for(let O=0;O<16;O++,r+=4)Xi[O]=t.getUint32(r),Qi[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=Xi[O-15]|0,P=Qi[O-15]|0,L=pa(I,P,1)^pa(I,P,8)^Ow(I,P,7),C=ma(I,P,1)^ma(I,P,8)^Nw(I,P,7),D=Xi[O-2]|0,q=Qi[O-2]|0,H=pa(D,q,19)^Ol(D,q,61)^Ow(D,q,6),Z=ma(D,q,19)^Nl(D,q,61)^Nw(D,q,6),re=QI(C,Z,Qi[O-7],Qi[O-16]),S=eA(re,L,H,Xi[O-7],Xi[O-16]);Xi[O]=S|0,Qi[O]=re|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:h,Fl:v,Gh:E,Gl:R,Hh:$,Hl:N}=this;for(let O=0;O<80;O++){let I=pa(d,g,14)^pa(d,g,18)^Ol(d,g,41),P=ma(d,g,14)^ma(d,g,18)^Nl(d,g,41),L=d&h^~d&E,C=g&v^~g&R,D=tA(N,P,C,DL[O],Qi[O]),q=rA(D,$,I,L,ML[O],Xi[O]),H=D|0,Z=pa(o,n,28)^Ol(o,n,34)^Ol(o,n,39),re=ma(o,n,28)^Nl(o,n,34)^Nl(o,n,39),S=o&i^o&a^i&a,l=n&s^n&c^s&c;$=E|0,N=R|0,E=h|0,R=v|0,h=d|0,v=g|0,{h:d,l:g}=ko(u|0,f|0,q|0,H|0),u=a|0,f=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=YI(H,re,l);o=XI(m,q,Z,S),n=m|0;}(({h:o,l:n}=ko(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=ko(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=ko(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:f}=ko(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=ko(this.Eh|0,this.El|0,d|0,g|0),{h,l:v}=ko(this.Fh|0,this.Fl|0,h|0,v|0),{h:E,l:R}=ko(this.Gh|0,this.Gl|0,E|0,R|0),{h:$,l:N}=ko(this.Hh|0,this.Hl|0,$|0,N|0),this.set(o,n,i,s,a,c,u,f,d,g,h,v,E,R,$,N);}roundClean(){Nn(Xi,Qi);}destroy(){Nn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ha=Tl(()=>new ih),oA=Tl(()=>new Bw);});function Lc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fi(e){if(!Lc(e))throw new Error("Uint8Array expected")}function Ro(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Pl(e){let t=e.toString(16);return t.length&1?"0"+t:t}function aA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Uw:BigInt("0x"+e)}function es(e){if(fi(e),cA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=jL[e[r]];return t}function iA(e){if(e>=ui._0&&e<=ui._9)return e-ui._0;if(e>=ui.A&&e<=ui.F)return e-(ui.A-10);if(e>=ui.a&&e<=ui.f)return e-(ui.a-10)}function Bl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(cA)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=iA(e.charCodeAt(i)),a=iA(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function tn(e){return aA(es(e))}function ga(e){return fi(e),aA(es(Uint8Array.from(e).reverse()))}function To(e,t){return Bl(e.toString(16).padStart(t*2,"0"))}function Uc(e,t){return To(e,t).reverse()}function Ge(e,t,r){let o;if(typeof t=="string")try{o=Bl(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Lc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ar(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];fi(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function ah(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ya(e,t,r){return Cw(e)&&Cw(t)&&Cw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!ya(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function uA(e){let t;for(t=0;e>Uw;e>>=Lw,t+=1);return t}function fA(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=zw(e),n=zw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=zw(0))=>{n=a(sA([0]),d),o=a(),d.length!==0&&(n=a(sA([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ar(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function to(e,t,r={}){let o=(n,i,s)=>{let a=FL[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function Mc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var Uw,Lw,cA,jL,ui,Cw,ba,zw,sA,FL,xa=F(()=>{Uw=BigInt(0),Lw=BigInt(1);cA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",jL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ui={_0:48,_9:57,A:65,F:70,a:97,f:102};Cw=e=>typeof e=="bigint"&&Uw<=e;ba=e=>(Lw<<BigInt(e))-Lw,zw=e=>new Uint8Array(e),sA=e=>Uint8Array.from(e);FL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Lc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function Le(e,t){let r=e%t;return r>=jr?r:t+r}function at(e,t,r){let o=e;for(;t-- >jr;)o*=o,o%=r;return o}function ch(e,t){if(e===jr)throw new Error("invert: expected non-zero number");if(t<=jr)throw new Error("invert: expected positive modulus, got "+t);let r=Le(e,t),o=t,n=jr,s=cr;for(;r!==jr;){let u=o/r,f=o%r,d=n-s*u;o=r,r=f,n=s,s=d;}if(o!==cr)throw new Error("invert: does not exist");return Le(n,t)}function hA(e,t){let r=(e.ORDER+cr)/dA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function VL(e,t){let r=(e.ORDER-pA)/mA,o=e.mul(t,va),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,va),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function ZL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%va===jr;)t/=va,r++;let o=va,n=di(e);for(;lA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return hA;let i=n.pow(o,t),s=(t+cr)/va;return function(c,u){if(c.is0(u))return u;if(lA(c,u)!==1)throw new Error("Cannot find square root");let f=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let v=1,E=c.sqr(g);for(;!c.eql(E,c.ONE);)if(v++,E=c.sqr(E),v===f)throw new Error("Cannot find square root");let R=cr<<BigInt(f-v-1),$=c.pow(d,R);f=v,d=c.sqr($),g=c.mul(g,d),h=c.mul(h,$);}return h}}function GL(e){return e%dA===HL?hA:e%mA===pA?VL:ZL(e)}function uh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=qL.reduce((o,n)=>(o[n]="function",o),t);return to(e,r)}function WL(e,t,r){if(r<jr)throw new Error("invalid exponent, negatives unsupported");if(r===jr)return e.ONE;if(r===cr)return t;let o=e.ONE,n=t;for(;r>jr;)r&cr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=cr;return o}function li(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function lA(e,t){let r=(e.ORDER-cr)/va,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function Mw(e,t){t!==void 0&&la(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function di(e,t,r=false,o={}){if(e<=jr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=Mw(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:ba(n),ZERO:jr,ONE:cr,create:c=>Le(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return jr<=c&&c<e},is0:c=>c===jr,isOdd:c=>(c&cr)===cr,neg:c=>Le(-c,e),eql:(c,u)=>c===u,sqr:c=>Le(c*c,e),add:(c,u)=>Le(c+u,e),sub:(c,u)=>Le(c-u,e),mul:(c,u)=>Le(c*u,e),pow:(c,u)=>WL(a,c,u),div:(c,u)=>Le(c*ch(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ch(c,e),sqrt:o.sqrt||(c=>(s||(s=GL(e)),s(a,c))),toBytes:c=>r?Uc(c,i):To(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?ga(c):tn(c)},invertBatch:c=>li(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function yA(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function Dw(e){let t=yA(e);return t+Math.ceil(t/2)}function bA(e,t,r=false){let o=e.length,n=yA(t),i=Dw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?ga(e):tn(e),a=Le(s,t-cr)+cr;return r?Uc(a,n):To(a,n)}var jr,cr,va,HL,dA,pA,mA,gA,qL,wa=F(()=>{ai();xa();jr=BigInt(0),cr=BigInt(1),va=BigInt(2),HL=BigInt(3),dA=BigInt(4),pA=BigInt(5),mA=BigInt(8);gA=(e,t)=>(Le(e,t)&cr)===cr,qL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function jw(e,t){let r=t.negate();return e?r:t}function wA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Fw(e,t){wA(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=ba(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function vA(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Zw);let u=t*o,f=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function KL(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function JL(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Vw(e){return _A.get(e)||1}function fh(e,t){return {constTimeNegate:jw,hasPrecomputes(r){return Vw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>xA;)o&Zw&&(n=n.add(i)),i=i.double(),o>>=Zw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Fw(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let f=1;f<i;f++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=Fw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:v}=vA(n,c,a);n=u,d?s=s.add(jw(h,o[v])):i=i.add(jw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Fw(r,t);for(let a=0;a<s.windows&&n!==xA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=vA(n,a,s);if(n=c,!f){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=Hw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&Hw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Vw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Vw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){wA(o,t),_A.set(r,o),Hw.delete(r);}}}function lh(e,t,r,o){KL(r,e),JL(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=uA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=ba(c),f=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){f.fill(s);for(let E=0;E<i;E++){let R=o[E],$=Number(R>>BigInt(h)&u);f[$]=f[$].add(r[E]);}let v=s;for(let E=f.length-1,R=s;E>0;E--)R=R.add(f[E]),v=v.add(R);if(g=g.add(v),h!==0)for(let E=0;E<c;E++)g=g.double();}return g}function Cl(e){return uh(e.Fp),to(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Mw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var xA,Zw,Hw,_A,Gw=F(()=>{wa();xa();xA=BigInt(0),Zw=BigInt(1);Hw=new WeakMap,_A=new WeakMap;});function ts(e,t){if(zl(e),zl(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function tU(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function zl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function rU(e,t,r,o){fi(e),fi(t),zl(r),t.length>255&&(t=o(ar(ah("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ar(t,ts(t.length,1)),c=ts(0,i),u=ts(r,2),f=new Array(s),d=o(ar(c,e,u,ts(0,1),a));f[0]=o(ar(d,ts(1,1),a));for(let h=1;h<=s;h++){let v=[tU(d,f[h-1]),ts(h+1,1),a];f[h]=o(ar(...v));}return ar(...f).slice(0,r)}function nU(e,t,r,o,n){if(fi(e),fi(t),zl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(ah("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(ts(r,2)).update(t).update(ts(t.length,1)).digest()}function IA(e,t,r){to(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;fi(e),zl(t);let u=typeof c=="string"?ah(c):c,f=o.toString(2).length,d=Math.ceil((f+n)/8),g=t*i*d,h;if(a==="xmd")h=rU(e,u,g,s);else if(a==="xof")h=nU(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let v=new Array(t);for(let E=0;E<t;E++){let R=new Array(i);for(let $=0;$<i;$++){let N=d*($+E*i),O=h.subarray(N,N+d);R[$]=Le(eU(O),o);}v[E]=R;}return v}function AA(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,f]=li(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,f)),{x:o,y:n}}}function kA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=IA(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=IA(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var eU,RA=F(()=>{wa();xa();eU=tn;});var NA=Wr(()=>{});var Kw=Wr((PA,Ww)=>{(function(e,t){function r(S,l){if(!S)throw new Error(l||"Assertion failed")}function o(S,l){S.super_=l;var m=function(){};m.prototype=l.prototype,S.prototype=new m,S.prototype.constructor=S;}function n(S,l,m){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(S||0,l||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=NA().Buffer;}catch{}n.isBN=function(l){return l instanceof n?true:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,m){return l.cmp(m)>0?l:m},n.min=function(l,m){return l.cmp(m)<0?l:m},n.prototype._init=function(l,m,y){if(typeof l=="number")return this._initNumber(l,m,y);if(typeof l=="object")return this._initArray(l,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var b=0;l[0]==="-"&&(b++,this.negative=1),b<l.length&&(m===16?this._parseHex(l,b,y):(this._parseBase(l,m,b),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(l,m,y){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(l,m,y){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x,_,k=0;if(y==="be")for(b=l.length-1,x=0;b>=0;b-=3)_=l[b]|l[b-1]<<8|l[b-2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);else if(y==="le")for(b=0,x=0;b<l.length;b+=3)_=l[b]|l[b+1]<<8|l[b+2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);return this._strip()};function s(S,l){var m=S.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+S);}function a(S,l,m){var y=s(S,m);return m-1>=l&&(y|=s(S,m-1)<<4),y}n.prototype._parseHex=function(l,m,y){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x=0,_=0,k;if(y==="be")for(b=l.length-1;b>=m;b-=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;else {var w=l.length-m;for(b=w%2===0?m+1:m;b<l.length;b+=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;}this._strip();};function c(S,l,m,y){for(var b=0,x=0,_=Math.min(S.length,m),k=l;k<_;k++){var w=S.charCodeAt(k)-48;b*=y,w>=49?x=w-49+10:w>=17?x=w-17+10:x=w,r(w>=0&&x<y,"Invalid character"),b+=x;}return b}n.prototype._parseBase=function(l,m,y){this.words=[0],this.length=1;for(var b=0,x=1;x<=67108863;x*=m)b++;b--,x=x/m|0;for(var _=l.length-y,k=_%b,w=Math.min(_,_-k)+y,p=0,A=y;A<w;A+=b)p=c(l,A,A+b,m),this.imuln(x),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(k!==0){var G=1;for(p=c(l,A,l.length,m),A=0;A<k;A++)G*=m;this.imuln(G),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red;};function u(S,l){S.words=l.words,S.length=l.length,S.negative=l.negative,S.red=l.red;}if(n.prototype._move=function(l){u(l,this);},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f;}catch{n.prototype.inspect=f;}else n.prototype.inspect=f;function f(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],g=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(l,m){l=l||10,m=m|0||1;var y;if(l===16||l==="hex"){y="";for(var b=0,x=0,_=0;_<this.length;_++){var k=this.words[_],w=((k<<b|x)&16777215).toString(16);x=k>>>24-b&16777215,b+=2,b>=26&&(b-=26,_--),x!==0||_!==this.length-1?y=d[6-w.length]+w+y:y=w+y;}for(x!==0&&(y=x.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(l===(l|0)&&l>=2&&l<=36){var p=g[l],A=h[l];y="";var G=this.clone();for(G.negative=0;!G.isZero();){var K=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=K+y:y=d[p-K.length]+K+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(l,m){return this.toArrayLike(i,l,m)}),n.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var v=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};n.prototype.toArrayLike=function(l,m,y){this._strip();var b=this.byteLength(),x=y||Math.max(1,b);r(b<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0");var _=v(l,x),k=m==="le"?"LE":"BE";return this["_toArrayLike"+k](_,b),_},n.prototype._toArrayLikeLE=function(l,m){for(var y=0,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y++]=k&255,y<l.length&&(l[y++]=k>>8&255),y<l.length&&(l[y++]=k>>16&255),_===6?(y<l.length&&(l[y++]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y<l.length)for(l[y++]=b;y<l.length;)l[y++]=0;},n.prototype._toArrayLikeBE=function(l,m){for(var y=l.length-1,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y--]=k&255,y>=0&&(l[y--]=k>>8&255),y>=0&&(l[y--]=k>>16&255),_===6?(y>=0&&(l[y--]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y>=0)for(l[y--]=b;y>=0;)l[y--]=0;},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var m=l,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return (this.length-1)*26+m};function E(S){for(var l=new Array(S.bitLength()),m=0;m<l.length;m++){var y=m/26|0,b=m%26;l[m]=S.words[y]>>>b&1;}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(l+=y,y!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},n.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&l.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var m,y;this.length>l.length?(m=this,y=l):(m=l,y=this);for(var b=0;b<y.length;b++)this.words[b]=m.words[b]^y.words[b];if(this!==m)for(;b<m.length;b++)this.words[b]=m.words[b];return this.length=m.length,this._strip()},n.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,y=l%26;this._expand(m),y>0&&m--;for(var b=0;b<m;b++)this.words[b]=~this.words[b]&67108863;for(y>0&&(this.words[b]=~this.words[b]&67108863>>26-y,b++);b<this.length;b++)this.words[b]=0;return this._strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var y=l/26|0,b=l%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this._strip()},n.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var y,b;this.length>l.length?(y=this,b=l):(y=l,b=this);for(var x=0,_=0;_<b.length;_++)m=(y.words[_]|0)+(b.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;for(;x!==0&&_<y.length;_++)m=(y.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;if(this.length=y.length,x!==0)this.words[this.length]=x,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var y=this.cmp(l);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,x;y>0?(b=this,x=l):(b=l,x=this);for(var _=0,k=0;k<x.length;k++)m=(b.words[k]|0)-(x.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;for(;_!==0&&k<b.length;k++)m=(b.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;if(_===0&&k<b.length&&b!==this)for(;k<b.length;k++)this.words[k]=b.words[k];return this.length=Math.max(this.length,k),b!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function R(S,l,m){m.negative=l.negative^S.negative;var y=S.length+l.length|0;m.length=y,y=y-1|0;var b=S.words[0]|0,x=l.words[0]|0,_=b*x,k=_&67108863,w=_/67108864|0;m.words[0]=k;for(var p=1;p<y;p++){for(var A=w>>>26,G=w&67108863,K=Math.min(p,l.length-1),Q=Math.max(0,p-S.length+1);Q<=K;Q++){var ae=p-Q|0;b=S.words[ae]|0,x=l.words[Q]|0,_=b*x+G,A+=_/67108864|0,G=_&67108863;}m.words[p]=G|0,w=A|0;}return w!==0?m.words[p]=w|0:m.length--,m._strip()}var $=function(l,m,y){var b=l.words,x=m.words,_=y.words,k=0,w,p,A,G=b[0]|0,K=G&8191,Q=G>>>13,ae=b[1]|0,he=ae&8191,ye=ae>>>13,We=b[2]|0,Se=We&8191,_e=We>>>13,tr=b[3]|0,Ce=tr&8191,je=tr>>>13,Li=b[4]|0,pt=Li&8191,gt=Li>>>13,Bp=b[5]|0,yt=Bp&8191,bt=Bp>>>13,RE=b[6]|0,At=RE&8191,kt=RE>>>13,TE=b[7]|0,Rt=TE&8191,Tt=TE>>>13,$E=b[8]|0,$t=$E&8191,Ot=$E>>>13,OE=b[9]|0,Nt=OE&8191,Pt=OE>>>13,NE=x[0]|0,Bt=NE&8191,Ct=NE>>>13,PE=x[1]|0,zt=PE&8191,Lt=PE>>>13,BE=x[2]|0,Ut=BE&8191,Mt=BE>>>13,CE=x[3]|0,Dt=CE&8191,jt=CE>>>13,zE=x[4]|0,Ft=zE&8191,Ht=zE>>>13,LE=x[5]|0,Vt=LE&8191,Zt=LE>>>13,UE=x[6]|0,Gt=UE&8191,qt=UE>>>13,ME=x[7]|0,Wt=ME&8191,Kt=ME>>>13,DE=x[8]|0,Jt=DE&8191,Yt=DE>>>13,jE=x[9]|0,Xt=jE&8191,Qt=jE>>>13;y.negative=l.negative^m.negative,y.length=19,w=Math.imul(K,Bt),p=Math.imul(K,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(jy>>>26)|0,jy&=67108863,w=Math.imul(he,Bt),p=Math.imul(he,Ct),p=p+Math.imul(ye,Bt)|0,A=Math.imul(ye,Ct),w=w+Math.imul(K,zt)|0,p=p+Math.imul(K,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Fy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=67108863,w=Math.imul(Se,Bt),p=Math.imul(Se,Ct),p=p+Math.imul(_e,Bt)|0,A=Math.imul(_e,Ct),w=w+Math.imul(he,zt)|0,p=p+Math.imul(he,Lt)|0,p=p+Math.imul(ye,zt)|0,A=A+Math.imul(ye,Lt)|0,w=w+Math.imul(K,Ut)|0,p=p+Math.imul(K,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Hy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Hy>>>26)|0,Hy&=67108863,w=Math.imul(Ce,Bt),p=Math.imul(Ce,Ct),p=p+Math.imul(je,Bt)|0,A=Math.imul(je,Ct),w=w+Math.imul(Se,zt)|0,p=p+Math.imul(Se,Lt)|0,p=p+Math.imul(_e,zt)|0,A=A+Math.imul(_e,Lt)|0,w=w+Math.imul(he,Ut)|0,p=p+Math.imul(he,Mt)|0,p=p+Math.imul(ye,Ut)|0,A=A+Math.imul(ye,Mt)|0,w=w+Math.imul(K,Dt)|0,p=p+Math.imul(K,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Vy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Vy>>>26)|0,Vy&=67108863,w=Math.imul(pt,Bt),p=Math.imul(pt,Ct),p=p+Math.imul(gt,Bt)|0,A=Math.imul(gt,Ct),w=w+Math.imul(Ce,zt)|0,p=p+Math.imul(Ce,Lt)|0,p=p+Math.imul(je,zt)|0,A=A+Math.imul(je,Lt)|0,w=w+Math.imul(Se,Ut)|0,p=p+Math.imul(Se,Mt)|0,p=p+Math.imul(_e,Ut)|0,A=A+Math.imul(_e,Mt)|0,w=w+Math.imul(he,Dt)|0,p=p+Math.imul(he,jt)|0,p=p+Math.imul(ye,Dt)|0,A=A+Math.imul(ye,jt)|0,w=w+Math.imul(K,Ft)|0,p=p+Math.imul(K,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Zy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=67108863,w=Math.imul(yt,Bt),p=Math.imul(yt,Ct),p=p+Math.imul(bt,Bt)|0,A=Math.imul(bt,Ct),w=w+Math.imul(pt,zt)|0,p=p+Math.imul(pt,Lt)|0,p=p+Math.imul(gt,zt)|0,A=A+Math.imul(gt,Lt)|0,w=w+Math.imul(Ce,Ut)|0,p=p+Math.imul(Ce,Mt)|0,p=p+Math.imul(je,Ut)|0,A=A+Math.imul(je,Mt)|0,w=w+Math.imul(Se,Dt)|0,p=p+Math.imul(Se,jt)|0,p=p+Math.imul(_e,Dt)|0,A=A+Math.imul(_e,jt)|0,w=w+Math.imul(he,Ft)|0,p=p+Math.imul(he,Ht)|0,p=p+Math.imul(ye,Ft)|0,A=A+Math.imul(ye,Ht)|0,w=w+Math.imul(K,Vt)|0,p=p+Math.imul(K,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var Gy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=67108863,w=Math.imul(At,Bt),p=Math.imul(At,Ct),p=p+Math.imul(kt,Bt)|0,A=Math.imul(kt,Ct),w=w+Math.imul(yt,zt)|0,p=p+Math.imul(yt,Lt)|0,p=p+Math.imul(bt,zt)|0,A=A+Math.imul(bt,Lt)|0,w=w+Math.imul(pt,Ut)|0,p=p+Math.imul(pt,Mt)|0,p=p+Math.imul(gt,Ut)|0,A=A+Math.imul(gt,Mt)|0,w=w+Math.imul(Ce,Dt)|0,p=p+Math.imul(Ce,jt)|0,p=p+Math.imul(je,Dt)|0,A=A+Math.imul(je,jt)|0,w=w+Math.imul(Se,Ft)|0,p=p+Math.imul(Se,Ht)|0,p=p+Math.imul(_e,Ft)|0,A=A+Math.imul(_e,Ht)|0,w=w+Math.imul(he,Vt)|0,p=p+Math.imul(he,Zt)|0,p=p+Math.imul(ye,Vt)|0,A=A+Math.imul(ye,Zt)|0,w=w+Math.imul(K,Gt)|0,p=p+Math.imul(K,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=67108863,w=Math.imul(Rt,Bt),p=Math.imul(Rt,Ct),p=p+Math.imul(Tt,Bt)|0,A=Math.imul(Tt,Ct),w=w+Math.imul(At,zt)|0,p=p+Math.imul(At,Lt)|0,p=p+Math.imul(kt,zt)|0,A=A+Math.imul(kt,Lt)|0,w=w+Math.imul(yt,Ut)|0,p=p+Math.imul(yt,Mt)|0,p=p+Math.imul(bt,Ut)|0,A=A+Math.imul(bt,Mt)|0,w=w+Math.imul(pt,Dt)|0,p=p+Math.imul(pt,jt)|0,p=p+Math.imul(gt,Dt)|0,A=A+Math.imul(gt,jt)|0,w=w+Math.imul(Ce,Ft)|0,p=p+Math.imul(Ce,Ht)|0,p=p+Math.imul(je,Ft)|0,A=A+Math.imul(je,Ht)|0,w=w+Math.imul(Se,Vt)|0,p=p+Math.imul(Se,Zt)|0,p=p+Math.imul(_e,Vt)|0,A=A+Math.imul(_e,Zt)|0,w=w+Math.imul(he,Gt)|0,p=p+Math.imul(he,qt)|0,p=p+Math.imul(ye,Gt)|0,A=A+Math.imul(ye,qt)|0,w=w+Math.imul(K,Wt)|0,p=p+Math.imul(K,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var Wy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=67108863,w=Math.imul($t,Bt),p=Math.imul($t,Ct),p=p+Math.imul(Ot,Bt)|0,A=Math.imul(Ot,Ct),w=w+Math.imul(Rt,zt)|0,p=p+Math.imul(Rt,Lt)|0,p=p+Math.imul(Tt,zt)|0,A=A+Math.imul(Tt,Lt)|0,w=w+Math.imul(At,Ut)|0,p=p+Math.imul(At,Mt)|0,p=p+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Mt)|0,w=w+Math.imul(yt,Dt)|0,p=p+Math.imul(yt,jt)|0,p=p+Math.imul(bt,Dt)|0,A=A+Math.imul(bt,jt)|0,w=w+Math.imul(pt,Ft)|0,p=p+Math.imul(pt,Ht)|0,p=p+Math.imul(gt,Ft)|0,A=A+Math.imul(gt,Ht)|0,w=w+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Zt)|0,p=p+Math.imul(je,Vt)|0,A=A+Math.imul(je,Zt)|0,w=w+Math.imul(Se,Gt)|0,p=p+Math.imul(Se,qt)|0,p=p+Math.imul(_e,Gt)|0,A=A+Math.imul(_e,qt)|0,w=w+Math.imul(he,Wt)|0,p=p+Math.imul(he,Kt)|0,p=p+Math.imul(ye,Wt)|0,A=A+Math.imul(ye,Kt)|0,w=w+Math.imul(K,Jt)|0,p=p+Math.imul(K,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var Ky=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=67108863,w=Math.imul(Nt,Bt),p=Math.imul(Nt,Ct),p=p+Math.imul(Pt,Bt)|0,A=Math.imul(Pt,Ct),w=w+Math.imul($t,zt)|0,p=p+Math.imul($t,Lt)|0,p=p+Math.imul(Ot,zt)|0,A=A+Math.imul(Ot,Lt)|0,w=w+Math.imul(Rt,Ut)|0,p=p+Math.imul(Rt,Mt)|0,p=p+Math.imul(Tt,Ut)|0,A=A+Math.imul(Tt,Mt)|0,w=w+Math.imul(At,Dt)|0,p=p+Math.imul(At,jt)|0,p=p+Math.imul(kt,Dt)|0,A=A+Math.imul(kt,jt)|0,w=w+Math.imul(yt,Ft)|0,p=p+Math.imul(yt,Ht)|0,p=p+Math.imul(bt,Ft)|0,A=A+Math.imul(bt,Ht)|0,w=w+Math.imul(pt,Vt)|0,p=p+Math.imul(pt,Zt)|0,p=p+Math.imul(gt,Vt)|0,A=A+Math.imul(gt,Zt)|0,w=w+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ce,qt)|0,p=p+Math.imul(je,Gt)|0,A=A+Math.imul(je,qt)|0,w=w+Math.imul(Se,Wt)|0,p=p+Math.imul(Se,Kt)|0,p=p+Math.imul(_e,Wt)|0,A=A+Math.imul(_e,Kt)|0,w=w+Math.imul(he,Jt)|0,p=p+Math.imul(he,Yt)|0,p=p+Math.imul(ye,Jt)|0,A=A+Math.imul(ye,Yt)|0,w=w+Math.imul(K,Xt)|0,p=p+Math.imul(K,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var Jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=67108863,w=Math.imul(Nt,zt),p=Math.imul(Nt,Lt),p=p+Math.imul(Pt,zt)|0,A=Math.imul(Pt,Lt),w=w+Math.imul($t,Ut)|0,p=p+Math.imul($t,Mt)|0,p=p+Math.imul(Ot,Ut)|0,A=A+Math.imul(Ot,Mt)|0,w=w+Math.imul(Rt,Dt)|0,p=p+Math.imul(Rt,jt)|0,p=p+Math.imul(Tt,Dt)|0,A=A+Math.imul(Tt,jt)|0,w=w+Math.imul(At,Ft)|0,p=p+Math.imul(At,Ht)|0,p=p+Math.imul(kt,Ft)|0,A=A+Math.imul(kt,Ht)|0,w=w+Math.imul(yt,Vt)|0,p=p+Math.imul(yt,Zt)|0,p=p+Math.imul(bt,Vt)|0,A=A+Math.imul(bt,Zt)|0,w=w+Math.imul(pt,Gt)|0,p=p+Math.imul(pt,qt)|0,p=p+Math.imul(gt,Gt)|0,A=A+Math.imul(gt,qt)|0,w=w+Math.imul(Ce,Wt)|0,p=p+Math.imul(Ce,Kt)|0,p=p+Math.imul(je,Wt)|0,A=A+Math.imul(je,Kt)|0,w=w+Math.imul(Se,Jt)|0,p=p+Math.imul(Se,Yt)|0,p=p+Math.imul(_e,Jt)|0,A=A+Math.imul(_e,Yt)|0,w=w+Math.imul(he,Xt)|0,p=p+Math.imul(he,Qt)|0,p=p+Math.imul(ye,Xt)|0,A=A+Math.imul(ye,Qt)|0;var Yy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=67108863,w=Math.imul(Nt,Ut),p=Math.imul(Nt,Mt),p=p+Math.imul(Pt,Ut)|0,A=Math.imul(Pt,Mt),w=w+Math.imul($t,Dt)|0,p=p+Math.imul($t,jt)|0,p=p+Math.imul(Ot,Dt)|0,A=A+Math.imul(Ot,jt)|0,w=w+Math.imul(Rt,Ft)|0,p=p+Math.imul(Rt,Ht)|0,p=p+Math.imul(Tt,Ft)|0,A=A+Math.imul(Tt,Ht)|0,w=w+Math.imul(At,Vt)|0,p=p+Math.imul(At,Zt)|0,p=p+Math.imul(kt,Vt)|0,A=A+Math.imul(kt,Zt)|0,w=w+Math.imul(yt,Gt)|0,p=p+Math.imul(yt,qt)|0,p=p+Math.imul(bt,Gt)|0,A=A+Math.imul(bt,qt)|0,w=w+Math.imul(pt,Wt)|0,p=p+Math.imul(pt,Kt)|0,p=p+Math.imul(gt,Wt)|0,A=A+Math.imul(gt,Kt)|0,w=w+Math.imul(Ce,Jt)|0,p=p+Math.imul(Ce,Yt)|0,p=p+Math.imul(je,Jt)|0,A=A+Math.imul(je,Yt)|0,w=w+Math.imul(Se,Xt)|0,p=p+Math.imul(Se,Qt)|0,p=p+Math.imul(_e,Xt)|0,A=A+Math.imul(_e,Qt)|0;var Xy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=67108863,w=Math.imul(Nt,Dt),p=Math.imul(Nt,jt),p=p+Math.imul(Pt,Dt)|0,A=Math.imul(Pt,jt),w=w+Math.imul($t,Ft)|0,p=p+Math.imul($t,Ht)|0,p=p+Math.imul(Ot,Ft)|0,A=A+Math.imul(Ot,Ht)|0,w=w+Math.imul(Rt,Vt)|0,p=p+Math.imul(Rt,Zt)|0,p=p+Math.imul(Tt,Vt)|0,A=A+Math.imul(Tt,Zt)|0,w=w+Math.imul(At,Gt)|0,p=p+Math.imul(At,qt)|0,p=p+Math.imul(kt,Gt)|0,A=A+Math.imul(kt,qt)|0,w=w+Math.imul(yt,Wt)|0,p=p+Math.imul(yt,Kt)|0,p=p+Math.imul(bt,Wt)|0,A=A+Math.imul(bt,Kt)|0,w=w+Math.imul(pt,Jt)|0,p=p+Math.imul(pt,Yt)|0,p=p+Math.imul(gt,Jt)|0,A=A+Math.imul(gt,Yt)|0,w=w+Math.imul(Ce,Xt)|0,p=p+Math.imul(Ce,Qt)|0,p=p+Math.imul(je,Xt)|0,A=A+Math.imul(je,Qt)|0;var Qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=67108863,w=Math.imul(Nt,Ft),p=Math.imul(Nt,Ht),p=p+Math.imul(Pt,Ft)|0,A=Math.imul(Pt,Ht),w=w+Math.imul($t,Vt)|0,p=p+Math.imul($t,Zt)|0,p=p+Math.imul(Ot,Vt)|0,A=A+Math.imul(Ot,Zt)|0,w=w+Math.imul(Rt,Gt)|0,p=p+Math.imul(Rt,qt)|0,p=p+Math.imul(Tt,Gt)|0,A=A+Math.imul(Tt,qt)|0,w=w+Math.imul(At,Wt)|0,p=p+Math.imul(At,Kt)|0,p=p+Math.imul(kt,Wt)|0,A=A+Math.imul(kt,Kt)|0,w=w+Math.imul(yt,Jt)|0,p=p+Math.imul(yt,Yt)|0,p=p+Math.imul(bt,Jt)|0,A=A+Math.imul(bt,Yt)|0,w=w+Math.imul(pt,Xt)|0,p=p+Math.imul(pt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,Qt)|0;var eb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=67108863,w=Math.imul(Nt,Vt),p=Math.imul(Nt,Zt),p=p+Math.imul(Pt,Vt)|0,A=Math.imul(Pt,Zt),w=w+Math.imul($t,Gt)|0,p=p+Math.imul($t,qt)|0,p=p+Math.imul(Ot,Gt)|0,A=A+Math.imul(Ot,qt)|0,w=w+Math.imul(Rt,Wt)|0,p=p+Math.imul(Rt,Kt)|0,p=p+Math.imul(Tt,Wt)|0,A=A+Math.imul(Tt,Kt)|0,w=w+Math.imul(At,Jt)|0,p=p+Math.imul(At,Yt)|0,p=p+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,Yt)|0,w=w+Math.imul(yt,Xt)|0,p=p+Math.imul(yt,Qt)|0,p=p+Math.imul(bt,Xt)|0,A=A+Math.imul(bt,Qt)|0;var tb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=67108863,w=Math.imul(Nt,Gt),p=Math.imul(Nt,qt),p=p+Math.imul(Pt,Gt)|0,A=Math.imul(Pt,qt),w=w+Math.imul($t,Wt)|0,p=p+Math.imul($t,Kt)|0,p=p+Math.imul(Ot,Wt)|0,A=A+Math.imul(Ot,Kt)|0,w=w+Math.imul(Rt,Jt)|0,p=p+Math.imul(Rt,Yt)|0,p=p+Math.imul(Tt,Jt)|0,A=A+Math.imul(Tt,Yt)|0,w=w+Math.imul(At,Xt)|0,p=p+Math.imul(At,Qt)|0,p=p+Math.imul(kt,Xt)|0,A=A+Math.imul(kt,Qt)|0;var rb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=67108863,w=Math.imul(Nt,Wt),p=Math.imul(Nt,Kt),p=p+Math.imul(Pt,Wt)|0,A=Math.imul(Pt,Kt),w=w+Math.imul($t,Jt)|0,p=p+Math.imul($t,Yt)|0,p=p+Math.imul(Ot,Jt)|0,A=A+Math.imul(Ot,Yt)|0,w=w+Math.imul(Rt,Xt)|0,p=p+Math.imul(Rt,Qt)|0,p=p+Math.imul(Tt,Xt)|0,A=A+Math.imul(Tt,Qt)|0;var nb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=67108863,w=Math.imul(Nt,Jt),p=Math.imul(Nt,Yt),p=p+Math.imul(Pt,Jt)|0,A=Math.imul(Pt,Yt),w=w+Math.imul($t,Xt)|0,p=p+Math.imul($t,Qt)|0,p=p+Math.imul(Ot,Xt)|0,A=A+Math.imul(Ot,Qt)|0;var ob=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,w=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var ib=(k+w|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,_[0]=jy,_[1]=Fy,_[2]=Hy,_[3]=Vy,_[4]=Zy,_[5]=Gy,_[6]=qy,_[7]=Wy,_[8]=Ky,_[9]=Jy,_[10]=Yy,_[11]=Xy,_[12]=Qy,_[13]=eb,_[14]=tb,_[15]=rb,_[16]=nb,_[17]=ob,_[18]=ib,k!==0&&(_[19]=k,y.length++),y};Math.imul||($=R);function N(S,l,m){m.negative=l.negative^S.negative,m.length=S.length+l.length;for(var y=0,b=0,x=0;x<m.length-1;x++){var _=b;b=0;for(var k=y&67108863,w=Math.min(x,l.length-1),p=Math.max(0,x-S.length+1);p<=w;p++){var A=x-p,G=S.words[A]|0,K=l.words[p]|0,Q=G*K,ae=Q&67108863;_=_+(Q/67108864|0)|0,ae=ae+k|0,k=ae&67108863,_=_+(ae>>>26)|0,b+=_>>>26,_&=67108863;}m.words[x]=k,y=_,_=b;}return y!==0?m.words[x]=y:m.length--,m._strip()}function O(S,l,m){return N(S,l,m)}n.prototype.mulTo=function(l,m){var y,b=this.length+l.length;return this.length===10&&l.length===10?y=$(this,l,m):b<63?y=R(this,l,m):b<1024?y=N(this,l,m):y=O(this,l,m),y};n.prototype.mul=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},n.prototype.mulf=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),O(this,l,m)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var y=0,b=0;b<this.length;b++){var x=(this.words[b]|0)*l,_=(x&67108863)+(y&67108863);y>>=26,y+=x/67108864|0,y+=_>>>26,this.words[b]=_&67108863;}return y!==0&&(this.words[b]=y,this.length++),l===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var m=E(l);if(m.length===0)return new n(1);for(var y=this,b=0;b<m.length&&m[b]===0;b++,y=y.sqr());if(++b<m.length)for(var x=y.sqr();b<m.length;b++,x=x.sqr())m[b]!==0&&(y=y.mul(x));return y},n.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=67108863>>>26-m<<26-m,x;if(m!==0){var _=0;for(x=0;x<this.length;x++){var k=this.words[x]&b,w=(this.words[x]|0)-k<<m;this.words[x]=w|_,_=k>>>26-m;}_&&(this.words[x]=_,this.length++);}if(y!==0){for(x=this.length-1;x>=0;x--)this.words[x+y]=this.words[x];for(x=0;x<y;x++)this.words[x]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,m,y){r(typeof l=="number"&&l>=0);var b;m?b=(m-m%26)/26:b=0;var x=l%26,_=Math.min((l-x)/26,this.length),k=67108863^67108863>>>x<<x,w=y;if(b-=_,b=Math.max(0,b),w){for(var p=0;p<_;p++)w.words[p]=this.words[p];w.length=_;}if(_!==0)if(this.length>_)for(this.length-=_,p=0;p<this.length;p++)this.words[p]=this.words[p+_];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=b);p--){var G=this.words[p]|0;this.words[p]=A<<26-x|G>>>x,A=G&k;}return w&&A!==0&&(w.words[w.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(l,m,y){return r(this.negative===0),this.iushrn(l,m,y)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return false;var x=this.words[y];return !!(x&b)},n.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var b=67108863^67108863>>>m<<m;this.words[this.length-1]&=b;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,m,y){var b=l.length+y,x;this._expand(b);var _,k=0;for(x=0;x<l.length;x++){_=(this.words[x+y]|0)+k;var w=(l.words[x]|0)*m;_-=w&67108863,k=(_>>26)-(w/67108864|0),this.words[x+y]=_&67108863;}for(;x<this.length-y;x++)_=(this.words[x+y]|0)+k,k=_>>26,this.words[x+y]=_&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,x=0;x<this.length;x++)_=-(this.words[x]|0)+k,k=_>>26,this.words[x]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(l,m){var y=this.length-l.length,b=this.clone(),x=l,_=x.words[x.length-1]|0,k=this._countBits(_);y=26-k,y!==0&&(x=x.ushln(y),b.iushln(y),_=x.words[x.length-1]|0);var w=b.length-x.length,p;if(m!=="mod"){p=new n(null),p.length=w+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var G=b.clone()._ishlnsubmul(x,1,w);G.negative===0&&(b=G,p&&(p.words[w]=1));for(var K=w-1;K>=0;K--){var Q=(b.words[x.length+K]|0)*67108864+(b.words[x.length+K-1]|0);for(Q=Math.min(Q/_|0,67108863),b._ishlnsubmul(x,Q,K);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(x,1,K),b.isZero()||(b.negative^=1);p&&(p.words[K]=Q);}return p&&p._strip(),b._strip(),m!=="div"&&y!==0&&b.iushrn(y),{div:p||null,mod:b}},n.prototype.divmod=function(l,m,y){if(r(!l.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var b,x,_;return this.negative!==0&&l.negative===0?(_=this.neg().divmod(l,m),m!=="mod"&&(b=_.div.neg()),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.iadd(l)),{div:b,mod:x}):this.negative===0&&l.negative!==0?(_=this.divmod(l.neg(),m),m!=="mod"&&(b=_.div.neg()),{div:b,mod:_.mod}):(this.negative&l.negative)!==0?(_=this.neg().divmod(l.neg(),m),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.isub(l)),{div:_.div,mod:x}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modrn(l.words[0]))}:this._wordDiv(l,m)},n.prototype.div=function(l){return this.divmod(l,"div",false).div},n.prototype.mod=function(l){return this.divmod(l,"mod",false).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",true).mod},n.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var y=m.mod.abs(),b=l.abs().iushrn(1),x=l.words[0]&1,_=y.cmp(b);if(_<0||x===1&&_===0)return m.div;var k=new n(1);return k.negative=this.negative^l.negative,m.div.iadd(k)},n.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=(1<<26)%l,b=0,x=this.length-1;x>=0;x--)b=(y*b+(this.words[x]|0))%l;return m?-b:b},n.prototype.modn=function(l){return this.modrn(l)},n.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var x=(this.words[b]|0)+y*67108864;this.words[b]=x/l|0,y=x%l;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=new n(0),k=new n(1),w=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++w;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var G=0,K=1;(m.words[0]&K)===0&&G<26;++G,K<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(b.isOdd()||x.isOdd())&&(b.iadd(p),x.isub(A)),b.iushrn(1),x.iushrn(1);for(var Q=0,ae=1;(y.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(_.isOdd()||k.isOdd())&&(_.iadd(p),k.isub(A)),_.iushrn(1),k.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(_),x.isub(k)):(y.isub(m),_.isub(b),k.isub(x));}return {a:_,b:k,gcd:y.iushln(w)}},n.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var k=0,w=1;(m.words[0]&w)===0&&k<26;++k,w<<=1);if(k>0)for(m.iushrn(k);k-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(_),x.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(x)):(y.isub(m),x.isub(b));}var G;return m.cmpn(1)===0?G=b:G=x,G.cmpn(0)<0&&G.iadd(l),G},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),y=l.clone();m.negative=0,y.negative=0;for(var b=0;m.isEven()&&y.isEven();b++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var x=m.cmp(y);if(x<0){var _=m;m=y,y=_;}else if(x===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(b)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var x=b,_=y;x!==0&&_<this.length;_++){var k=this.words[_]|0;k+=x,x=k>>>26,k&=67108863,this.words[_]=k;}return x!==0&&(this.words[_]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(l=-l),r(l<=67108863,"Number is too big");var b=this.words[0]|0;y=b===l?0:b<l?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return -1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,x=l.words[y]|0;if(b!==x){b<x?m=-1:b>x&&(m=1);break}}return m},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Z(l)},n.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var P={k256:null,p224:null,p192:null,p25519:null};function L(S,l){this.name=S,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}L.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},L.prototype.ireduce=function(l){var m=l,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var b=y<this.n?-1:m.ucmp(this.p);return b===0?(m.words[0]=0,m.length=1):b>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},L.prototype.split=function(l,m){l.iushrn(this.n,0,m);},L.prototype.imulK=function(l){return l.imul(this.k)};function C(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(C,L),C.prototype.split=function(l,m){for(var y=4194303,b=Math.min(l.length,9),x=0;x<b;x++)m.words[x]=l.words[x];if(m.length=b,l.length<=9){l.words[0]=0,l.length=1;return}var _=l.words[9];for(m.words[m.length++]=_&y,x=10;x<l.length;x++){var k=l.words[x]|0;l.words[x-10]=(k&y)<<4|_>>>22,_=k;}_>>>=22,l.words[x-10]=_,_===0&&l.length>10?l.length-=10:l.length-=9;},C.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,y=0;y<l.length;y++){var b=l.words[y]|0;m+=b*977,l.words[y]=m&67108863,m=b*64+(m/67108864|0);}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function D(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(D,L);function q(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(q,L);function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(H,L),H.prototype.imulK=function(l){for(var m=0,y=0;y<l.length;y++){var b=(l.words[y]|0)*19+m,x=b&67108863;b>>>=26,l.words[y]=x,m=b;}return m!==0&&(l.words[l.length++]=m),l},n._prime=function(l){if(P[l])return P[l];var m;if(l==="k256")m=new C;else if(l==="p224")m=new D;else if(l==="p192")m=new q;else if(l==="p25519")m=new H;else throw new Error("Unknown prime "+l);return P[l]=m,m};function Z(S){if(typeof S=="string"){var l=n._prime(S);this.m=l.p,this.prime=l;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}Z.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers");},Z.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers");},Z.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(u(l,l.umod(this.m)._forceRed(this)),l)},Z.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Z.prototype.add=function(l,m){this._verify2(l,m);var y=l.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Z.prototype.iadd=function(l,m){this._verify2(l,m);var y=l.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},Z.prototype.sub=function(l,m){this._verify2(l,m);var y=l.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Z.prototype.isub=function(l,m){this._verify2(l,m);var y=l.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},Z.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},Z.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},Z.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},Z.prototype.isqr=function(l){return this.imul(l,l.clone())},Z.prototype.sqr=function(l){return this.mul(l,l)},Z.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(l,y)}for(var b=this.m.subn(1),x=0;!b.isZero()&&b.andln(1)===0;)x++,b.iushrn(1);r(!b.isZero());var _=new n(1).toRed(this),k=_.redNeg(),w=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,w).cmp(k)!==0;)p.redIAdd(k);for(var A=this.pow(p,b),G=this.pow(l,b.addn(1).iushrn(1)),K=this.pow(l,b),Q=x;K.cmp(_)!==0;){for(var ae=K,he=0;ae.cmp(_)!==0;he++)ae=ae.redSqr();r(he<Q);var ye=this.pow(A,new n(1).iushln(Q-he-1));G=G.redMul(ye),A=ye.redSqr(),K=K.redMul(A),Q=he;}return G},Z.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Z.prototype.pow=function(l,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var y=4,b=new Array(1<<y);b[0]=new n(1).toRed(this),b[1]=l;for(var x=2;x<b.length;x++)b[x]=this.mul(b[x-1],l);var _=b[0],k=0,w=0,p=m.bitLength()%26;for(p===0&&(p=26),x=m.length-1;x>=0;x--){for(var A=m.words[x],G=p-1;G>=0;G--){var K=A>>G&1;if(_!==b[0]&&(_=this.sqr(_)),K===0&&k===0){w=0;continue}k<<=1,k|=K,w++,!(w!==y&&(x!==0||G!==0))&&(_=this.mul(_,b[k]),w=0,k=0);}p=26;}return _},Z.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},Z.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},n.mont=function(l){return new re(l)};function re(S){Z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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);}o(re,Z),re.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},re.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},re.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var y=l.imul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new n(0)._forceRed(this);var y=l.mul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Ww>"u"||Ww,PA);});var zA=Wr((Jw,CA)=>{var dh=Rl(),Oo=dh.Buffer;function BA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?CA.exports=dh:(BA(dh,Jw),Jw.Buffer=Ea);function Ea(e,t,r){return Oo(e,t,r)}Ea.prototype=Object.create(Oo.prototype);BA(Oo,Ea);Ea.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};Ea.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Oo(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};Ea.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};Ea.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return dh.SlowBuffer(e)};});var UA=Wr((NY,LA)=>{var ph=zA().Buffer;function lU(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function f(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=ph.from(h)),!ph.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var v=0,E=0,R=0,$=h.length;R!==$&&h[R]===0;)R++,v++;for(var N=($-R)*u+1>>>0,O=new Uint8Array(N);R!==$;){for(var I=h[R],P=0,L=N-1;(I!==0||P<E)&&L!==-1;L--,P++)I+=256*O[L]>>>0,O[L]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");E=P,R++;}for(var C=N-E;C!==N&&O[C]===0;)C++;for(var D=a.repeat(v);C<N;++C)D+=e.charAt(O[C]);return D}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return ph.alloc(0);for(var v=0,E=0,R=0;h[v]===a;)E++,v++;for(var $=(h.length-v)*c+1>>>0,N=new Uint8Array($);v<h.length;){var O=h.charCodeAt(v);if(O>255)return;var I=t[O];if(I===255)return;for(var P=0,L=$-1;(I!==0||P<R)&&L!==-1;L--,P++)I+=s*N[L]>>>0,N[L]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");R=P,v++;}for(var C=$-R;C!==$&&N[C]===0;)C++;var D=ph.allocUnsafe(E+($-C));D.fill(0,0,E);for(var q=E;C!==$;)D[q++]=N[C++];return D}function g(h){var v=d(h);if(v)return v;throw new Error("Non-base"+s+" character")}return {encode:f,decodeUnsafe:d,decode:g}}LA.exports=lU;});var Yw=Wr((PY,MA)=>{var dU=UA(),pU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";MA.exports=dU(pU);});var DA=Wr(e_=>{function pi(e,t,r){return t<=e&&e<=r}function bh(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function mU(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function hU(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var mh=-1;function Qw(e){this.tokens=[].slice.call(e);}Qw.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():mh},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var Dc=-1;function Xw(e,t){if(e)throw TypeError("Decoder error");return t||65533}var hh="utf-8";function gh(e,t){if(!(this instanceof gh))return new gh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}gh.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=bh(r),this._streaming||(this._decoder=new gU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new Qw(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==Dc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===Dc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),hU(i)}};function yh(e,t){if(!(this instanceof yh))return new yh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}yh.prototype={encode:function(t,r){t=t?String(t):"",r=bh(r),this._streaming||(this._encoder=new yU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new Qw(mU(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==Dc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==Dc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function gU(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===mh&&n!==0)return n=0,Xw(t);if(c===mh)return Dc;if(n===0){if(pi(c,0,127))return c;if(pi(c,194,223))n=1,r=c-192;else if(pi(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(pi(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return Xw(t);return r=r<<6*n,null}if(!pi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Xw(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function yU(e){e.fatal;this.handler=function(r,o){if(o===mh)return Dc;if(pi(o,0,127))return o;var n,i;pi(o,128,2047)?(n=1,i=192):pi(o,2048,65535)?(n=2,i=224):pi(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}e_.TextEncoder=yh;e_.TextDecoder=gh;});var ZA=Wr(Ke=>{var bU=Ke&&Ke.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),xU=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),No=Ke&&Ke.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},vU=Ke&&Ke.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&bU(t,e,r);return xU(t,e),t},jA=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:true});Ke.deserializeUnchecked=Ke.deserialize=Ke.serialize=Ke.BinaryReader=Ke.BinaryWriter=Ke.BorshError=Ke.baseDecode=Ke.baseEncode=void 0;var rs=jA(Kw()),FA=jA(Yw()),wU=vU(DA()),_U=typeof TextDecoder!="function"?wU.TextDecoder:TextDecoder,EU=new _U("utf-8",{fatal:true});function SU(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),FA.default.encode(Buffer.from(e))}Ke.baseEncode=SU;function IU(e){return Buffer.from(FA.default.decode(e))}Ke.baseDecode=IU;var t_=1024,mr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Ke.BorshError=mr;var xh=class{constructor(){this.buf=Buffer.alloc(t_),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(t_)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(t_)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Ke.BinaryWriter=xh;function Po(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new mr("Reached the end of buffer when deserializing")}throw i}};}var Hr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new rs.default(t,"le")}readU128(){let t=this.readBuffer(16);return new rs.default(t,"le")}readU256(){let t=this.readBuffer(32);return new rs.default(t,"le")}readU512(){let t=this.readBuffer(64);return new rs.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new mr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return EU.decode(r)}catch(o){throw new mr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};No([Po],Hr.prototype,"readU8",null);No([Po],Hr.prototype,"readU16",null);No([Po],Hr.prototype,"readU32",null);No([Po],Hr.prototype,"readU64",null);No([Po],Hr.prototype,"readU128",null);No([Po],Hr.prototype,"readU256",null);No([Po],Hr.prototype,"readU512",null);No([Po],Hr.prototype,"readString",null);No([Po],Hr.prototype,"readFixedArray",null);No([Po],Hr.prototype,"readArray",null);Ke.BinaryReader=Hr;function HA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sa(e,t,r,o,n){try{if(typeof o=="string")n[`write${HA(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new mr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new mr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)Sa(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Sa(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),Sa(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Sa(e,t,s,o.key,n),Sa(e,t,i,o.value,n);});break}default:throw new mr(`FieldType ${o} unrecognized`)}else VA(e,r,n);}catch(i){throw i instanceof mr&&i.addToFieldPath(t),i}}function VA(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new mr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{Sa(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),Sa(e,s,t[s],a,r);break}}}else throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function AU(e,t,r=xh){let o=new r;return VA(e,t,o),o.toArray()}Ke.serialize=AU;function Ia(e,t,r,o){try{if(typeof r=="string")return o[`read${HA(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(Ia(e,null,r[0],o));return n}else return o.readArray(()=>Ia(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Ia(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=Ia(e,t,r.key,o),c=Ia(e,t,r.value,o);n.set(a,c);}return n}return r_(e,r,o)}catch(n){throw n instanceof mr&&n.addToFieldPath(t),n}}function r_(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new mr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=Ia(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new mr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=Ia(e,i,s,r);return new t({[i]:a})}throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function kU(e,t,r,o=Hr){let n=new o(r),i=r_(e,t,n);if(n.offset<r.length)throw new mr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Ke.deserialize=kU;function RU(e,t,r,o=Hr){let n=new o(r);return r_(e,t,n)}Ke.deserializeUnchecked=RU;});var s_=Wr(M=>{Object.defineProperty(M,"__esModule",{value:true});M.s16=M.s8=M.nu64be=M.u48be=M.u40be=M.u32be=M.u24be=M.u16be=M.nu64=M.u48=M.u40=M.u32=M.u24=M.u16=M.u8=M.offset=M.greedy=M.Constant=M.UTF8=M.CString=M.Blob=M.Boolean=M.BitField=M.BitStructure=M.VariantLayout=M.Union=M.UnionLayoutDiscriminator=M.UnionDiscriminator=M.Structure=M.Sequence=M.DoubleBE=M.Double=M.FloatBE=M.Float=M.NearInt64BE=M.NearInt64=M.NearUInt64BE=M.NearUInt64=M.IntBE=M.Int=M.UIntBE=M.UInt=M.OffsetLayout=M.GreedyCount=M.ExternalLayout=M.bindConstructorLayout=M.nameWithProperty=M.Layout=M.uint8ArrayToBuffer=M.checkUint8Array=void 0;M.constant=M.utf8=M.cstr=M.blob=M.unionLayoutDiscriminator=M.union=M.seq=M.bits=M.struct=M.f64be=M.f64=M.f32be=M.f32=M.ns64be=M.s48be=M.s40be=M.s32be=M.s24be=M.s16be=M.ns64=M.s48=M.s40=M.s32=M.s24=void 0;var o_=Rl();function Hc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=Hc;function Fe(e){return Hc(e),o_.Buffer.from(e.buffer,e.byteOffset,e.length)}M.uint8ArrayToBuffer=Fe;var Ze=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};M.Layout=Ze;function i_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=i_;function TU(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof Ze))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}M.bindConstructorLayout=TU;var Ir=class extends Ze{isCount(){throw new Error("ExternalLayout is abstract")}};M.ExternalLayout=Ir;var vh=class extends Ir{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){Hc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};M.GreedyCount=vh;var Ul=class extends Ir{constructor(t,r=0,o){if(!(t instanceof Ze))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof rn||this.layout instanceof yn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};M.OffsetLayout=Ul;var rn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntLE(t,o,this.span),this.span}};M.UInt=rn;var yn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntBE(t,o,this.span),this.span}};M.UIntBE=yn;var mi=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntLE(t,o,this.span),this.span}};M.Int=mi;var ns=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntBE(t,o,this.span),this.span}};M.IntBE=ns;var n_=Math.pow(2,32);function Lh(e){let t=Math.floor(e/n_),r=e-t*n_;return {hi32:t,lo32:r}}function Uh(e,t){return e*n_+t}var wh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=wh;var _h=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=_h;var Eh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Eh;var Sh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=Sh;var Ih=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatLE(r)}encode(t,r,o=0){return Fe(r).writeFloatLE(t,o),4}};M.Float=Ih;var Ah=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatBE(r)}encode(t,r,o=0){return Fe(r).writeFloatBE(t,o),4}};M.FloatBE=Ah;var kh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleLE(r)}encode(t,r,o=0){return Fe(r).writeDoubleLE(t,o),8}};M.Double=kh;var Rh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleBE(r)}encode(t,r,o=0){return Fe(r).writeDoubleBE(t,o),8}};M.DoubleBE=Rh;var Th=class extends Ze{constructor(t,r,o){if(!(t instanceof Ze))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof Ir&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof Ir)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof Ir&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof Ir&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof Ir&&this.count.encode(t.length,r,o),i}};M.Sequence=Th;var $h=class extends Ze{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof Ze,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){Hc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};M.Structure=$h;var Ml=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};M.UnionDiscriminator=Ml;var Fc=class extends Ml{constructor(t,r){if(!(t instanceof Ir&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};M.UnionLayoutDiscriminator=Fc;var Dl=class extends Ze{constructor(t,r,o){let n;if(t instanceof rn||t instanceof yn)n=new Fc(new Ul(t));else if(t instanceof Ir&&t.isCount())n=new Fc(t);else if(t instanceof Ml)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Ze))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof rn||t instanceof yn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof rn||t instanceof yn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new Oh(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};M.Union=Dl;var Oh=class extends Ze{constructor(t,r,o,n){if(!(t instanceof Dl))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof Ze))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};M.VariantLayout=Oh;function jc(e){return 0>e&&(e+=4294967296),e}var jl=class extends Ze{constructor(t,r,o){if(!(t instanceof rn||t instanceof yn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=jc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Fl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Nh(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};M.BitStructure=jl;var Fl=class{constructor(t,r,o){if(!(t instanceof jl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=jc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return jc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==jc(t&this.valueMask))throw new TypeError(i_("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=jc(t<<this.start);this.container._packedSetValue(jc(r&~this.wordMask)|o);}};M.BitField=Fl;var Nh=class extends Fl{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};M.Boolean=Nh;var Ph=class extends Ze{constructor(t,r){if(!(t instanceof Ir&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof Ir||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Fe(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof Ir&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(i_("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Fe(t);return Fe(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof Ir&&this.length.encode(n,r,o),n}};M.Blob=Ph;var Bh=class extends Ze{constructor(t){super(-1,t);}getSpan(t,r=0){Hc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Fe(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=o_.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Fe(r);return n.copy(s,o),s[o+i]=0,i+1}};M.CString=Bh;var Ch=class extends Ze{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return Hc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Fe(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=o_.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Fe(r),o),i}};M.UTF8=Ch;var zh=class extends Ze{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};M.Constant=zh;M.greedy=((e,t)=>new vh(e,t));M.offset=((e,t,r)=>new Ul(e,t,r));M.u8=(e=>new rn(1,e));M.u16=(e=>new rn(2,e));M.u24=(e=>new rn(3,e));M.u32=(e=>new rn(4,e));M.u40=(e=>new rn(5,e));M.u48=(e=>new rn(6,e));M.nu64=(e=>new wh(e));M.u16be=(e=>new yn(2,e));M.u24be=(e=>new yn(3,e));M.u32be=(e=>new yn(4,e));M.u40be=(e=>new yn(5,e));M.u48be=(e=>new yn(6,e));M.nu64be=(e=>new _h(e));M.s8=(e=>new mi(1,e));M.s16=(e=>new mi(2,e));M.s24=(e=>new mi(3,e));M.s32=(e=>new mi(4,e));M.s40=(e=>new mi(5,e));M.s48=(e=>new mi(6,e));M.ns64=(e=>new Eh(e));M.s16be=(e=>new ns(2,e));M.s24be=(e=>new ns(3,e));M.s32be=(e=>new ns(4,e));M.s40be=(e=>new ns(5,e));M.s48be=(e=>new ns(6,e));M.ns64be=(e=>new Sh(e));M.f32=(e=>new Ih(e));M.f32be=(e=>new Ah(e));M.f64=(e=>new kh(e));M.f64be=(e=>new Rh(e));M.struct=((e,t,r)=>new $h(e,t,r));M.bits=((e,t,r)=>new jl(e,t,r));M.seq=((e,t,r)=>new Th(e,t,r));M.union=((e,t,r)=>new Dl(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Fc(e,t));M.blob=((e,t)=>new Ph(e,t));M.cstr=(e=>new Bh(e));M.utf8=((e,t)=>new Ch(e,t));M.constant=((e,t)=>new zh(e,t));});function Zl(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(Hj)}var Fh,Hj,y_=F(()=>{Hj=new Uint8Array(16);});var fk,lk=F(()=>{fk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function Vj(e){return typeof e=="string"&&fk.test(e)}var is,Gl=F(()=>{lk();is=Vj;});function Zj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]).toLowerCase();if(!is(r))throw TypeError("Stringified UUID is invalid");return r}var hr,Hh,ss,ql=F(()=>{Gl();hr=[];for(Hh=0;Hh<256;++Hh)hr.push((Hh+256).toString(16).substr(1));ss=Zj;});function Gj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||dk,s=e.clockseq!==void 0?e.clockseq:b_;if(i==null||s==null){var a=e.random||(e.rng||Zl)();i==null&&(i=dk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=b_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:v_+1,f=c-x_+(u-v_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>x_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");x_=c,v_=u,b_=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||ss(n)}var dk,b_,x_,v_,pk,mk=F(()=>{y_();ql();x_=0,v_=0;pk=Gj;});function qj(e){if(!is(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Vh,w_=F(()=>{Gl();Vh=qj;});function Wj(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Zh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=Wj(n)),typeof i=="string"&&(i=Vh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return ss(c)}try{o.name=e;}catch{}return o.DNS=Kj,o.URL=Jj,o}var Kj,Jj,__=F(()=>{ql();w_();Kj="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Jj="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function Yj(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return Xj(Qj(e7(e),e.length*8))}function Xj(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function hk(e){return (e+64>>>9<<4)+14+1}function Qj(e,t){e[t>>5]|=128<<t%32,e[hk(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,f=i;r=kr(r,o,n,i,e[s],7,-680876936),i=kr(i,r,o,n,e[s+1],12,-389564586),n=kr(n,i,r,o,e[s+2],17,606105819),o=kr(o,n,i,r,e[s+3],22,-1044525330),r=kr(r,o,n,i,e[s+4],7,-176418897),i=kr(i,r,o,n,e[s+5],12,1200080426),n=kr(n,i,r,o,e[s+6],17,-1473231341),o=kr(o,n,i,r,e[s+7],22,-45705983),r=kr(r,o,n,i,e[s+8],7,1770035416),i=kr(i,r,o,n,e[s+9],12,-1958414417),n=kr(n,i,r,o,e[s+10],17,-42063),o=kr(o,n,i,r,e[s+11],22,-1990404162),r=kr(r,o,n,i,e[s+12],7,1804603682),i=kr(i,r,o,n,e[s+13],12,-40341101),n=kr(n,i,r,o,e[s+14],17,-1502002290),o=kr(o,n,i,r,e[s+15],22,1236535329),r=Rr(r,o,n,i,e[s+1],5,-165796510),i=Rr(i,r,o,n,e[s+6],9,-1069501632),n=Rr(n,i,r,o,e[s+11],14,643717713),o=Rr(o,n,i,r,e[s],20,-373897302),r=Rr(r,o,n,i,e[s+5],5,-701558691),i=Rr(i,r,o,n,e[s+10],9,38016083),n=Rr(n,i,r,o,e[s+15],14,-660478335),o=Rr(o,n,i,r,e[s+4],20,-405537848),r=Rr(r,o,n,i,e[s+9],5,568446438),i=Rr(i,r,o,n,e[s+14],9,-1019803690),n=Rr(n,i,r,o,e[s+3],14,-187363961),o=Rr(o,n,i,r,e[s+8],20,1163531501),r=Rr(r,o,n,i,e[s+13],5,-1444681467),i=Rr(i,r,o,n,e[s+2],9,-51403784),n=Rr(n,i,r,o,e[s+7],14,1735328473),o=Rr(o,n,i,r,e[s+12],20,-1926607734),r=Tr(r,o,n,i,e[s+5],4,-378558),i=Tr(i,r,o,n,e[s+8],11,-2022574463),n=Tr(n,i,r,o,e[s+11],16,1839030562),o=Tr(o,n,i,r,e[s+14],23,-35309556),r=Tr(r,o,n,i,e[s+1],4,-1530992060),i=Tr(i,r,o,n,e[s+4],11,1272893353),n=Tr(n,i,r,o,e[s+7],16,-155497632),o=Tr(o,n,i,r,e[s+10],23,-1094730640),r=Tr(r,o,n,i,e[s+13],4,681279174),i=Tr(i,r,o,n,e[s],11,-358537222),n=Tr(n,i,r,o,e[s+3],16,-722521979),o=Tr(o,n,i,r,e[s+6],23,76029189),r=Tr(r,o,n,i,e[s+9],4,-640364487),i=Tr(i,r,o,n,e[s+12],11,-421815835),n=Tr(n,i,r,o,e[s+15],16,530742520),o=Tr(o,n,i,r,e[s+2],23,-995338651),r=$r(r,o,n,i,e[s],6,-198630844),i=$r(i,r,o,n,e[s+7],10,1126891415),n=$r(n,i,r,o,e[s+14],15,-1416354905),o=$r(o,n,i,r,e[s+5],21,-57434055),r=$r(r,o,n,i,e[s+12],6,1700485571),i=$r(i,r,o,n,e[s+3],10,-1894986606),n=$r(n,i,r,o,e[s+10],15,-1051523),o=$r(o,n,i,r,e[s+1],21,-2054922799),r=$r(r,o,n,i,e[s+8],6,1873313359),i=$r(i,r,o,n,e[s+15],10,-30611744),n=$r(n,i,r,o,e[s+6],15,-1560198380),o=$r(o,n,i,r,e[s+13],21,1309151649),r=$r(r,o,n,i,e[s+4],6,-145523070),i=$r(i,r,o,n,e[s+11],10,-1120210379),n=$r(n,i,r,o,e[s+2],15,718787259),o=$r(o,n,i,r,e[s+9],21,-343485551),r=as(r,a),o=as(o,c),n=as(n,u),i=as(i,f);}return [r,o,n,i]}function e7(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(hk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function as(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function t7(e,t){return e<<t|e>>>32-t}function Gh(e,t,r,o,n,i){return as(t7(as(as(t,e),as(o,i)),n),r)}function kr(e,t,r,o,n,i,s){return Gh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Gh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Gh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Gh(r^(t|~o),e,t,n,i,s)}var gk,yk=F(()=>{gk=Yj;});var r7,bk,xk=F(()=>{__();yk();r7=Zh("v3",48,gk),bk=r7;});function n7(e,t,r){e=e||{};var o=e.random||(e.rng||Zl)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return ss(o)}var vk,wk=F(()=>{y_();ql();vk=n7;});function o7(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function E_(e,t){return e<<t|e>>>32-t}function i7(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),f=0;f<16;++f)u[f]=e[c*64+f*4]<<24|e[c*64+f*4+1]<<16|e[c*64+f*4+2]<<8|e[c*64+f*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var v=16;v<80;++v)g[v]=E_(g[v-3]^g[v-8]^g[v-14]^g[v-16],1);for(var E=r[0],R=r[1],$=r[2],N=r[3],O=r[4],I=0;I<80;++I){var P=Math.floor(I/20),L=E_(E,5)+o7(P,R,$,N)+O+t[P]+g[I]>>>0;O=N,N=$,$=E_(R,30)>>>0,R=E,E=L;}r[0]=r[0]+E>>>0,r[1]=r[1]+R>>>0,r[2]=r[2]+$>>>0,r[3]=r[3]+N>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var _k,Ek=F(()=>{_k=i7;});var s7,Sk,Ik=F(()=>{__();Ek();s7=Zh("v5",80,_k),Sk=s7;});var Ak,kk=F(()=>{Ak="00000000-0000-0000-0000-000000000000";});function a7(e){if(!is(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Rk,Tk=F(()=>{Gl();Rk=a7;});var S_={};Er(S_,{NIL:()=>Ak,parse:()=>Vh,stringify:()=>ss,v1:()=>pk,v3:()=>bk,v4:()=>vk,v5:()=>Sk,validate:()=>is,version:()=>Rk});var I_=F(()=>{mk();xk();wk();Ik();kk();Tk();Gl();ql();w_();});var Ok=Wr((PX,$k)=>{var c7=(I_(),HE(S_)).v4,u7=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return c7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};$k.exports=u7;});var Pk=Wr((BX,Nk)=>{var f7=(I_(),HE(S_)).v4,l7=Ok(),Wl=function(e,t){if(!(this instanceof Wl))return new Wl(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return f7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};Nk.exports=Wl;Wl.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=l7(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(f){if(u){o(f);return}throw f}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,f){n._parseResponse(u,f,o);}),i};Wl.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var Ck=Wr((CX,A_)=>{var d7=Object.prototype.hasOwnProperty,Vr="~";function Kl(){}Object.create&&(Kl.prototype=Object.create(null),new Kl().__proto__||(Vr=false));function p7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Bk(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new p7(r,o||e,n),s=Vr?Vr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function qh(e,t){--e._eventsCount===0?e._events=new Kl:delete e._events[t];}function Or(){this._events=new Kl,this._eventsCount=0;}Or.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)d7.call(r,o)&&t.push(Vr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Or.prototype.listeners=function(t){var r=Vr?Vr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Or.prototype.listenerCount=function(t){var r=Vr?Vr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Or.prototype.emit=function(t,r,o,n,i,s){var a=Vr?Vr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];c.fn.apply(c.context,f);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!f)for(h=1,f=new Array(u-1);h<u;h++)f[h-1]=arguments[h];c[d].fn.apply(c[d].context,f);}}return true};Or.prototype.on=function(t,r,o){return Bk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Bk(this,t,r,o,true)};Or.prototype.removeListener=function(t,r,o,n){var i=Vr?Vr+t:t;if(!this._events[i])return this;if(!r)return qh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&qh(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:qh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&qh(this,r)):(this._events=new Kl,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof A_<"u"&&(A_.exports=Or);});function _7(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],d=Lk(u,f,1)^r[a],g=Uk(u,f,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=Dk[s],c=Lk(n,i,a),u=Uk(n,i,a),f=Mk[s];n=e[f],i=e[f+1],e[f]=c,e[f+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=v7[o],e[1]^=w7[o];}Nn(r);}var h7,Yl,g7,y7,b7,x7,Mk,Dk,jk,Fk,v7,w7,Lk,Uk,k_,E7,Ra,Wh=F(()=>{Pw();ai();h7=BigInt(0),Yl=BigInt(1),g7=BigInt(2),y7=BigInt(7),b7=BigInt(256),x7=BigInt(113),Mk=[],Dk=[],jk=[];for(let e=0,t=Yl,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Mk.push(2*(5*o+r)),Dk.push((e+1)*(e+2)/2%64);let n=h7;for(let i=0;i<7;i++)t=(t<<Yl^(t>>y7)*x7)%b7,t&g7&&(n^=Yl<<(Yl<<BigInt(i))-Yl);jk.push(n);}Fk=oh(jk,true),v7=Fk[0],w7=Fk[1],Lk=(e,t,r)=>r>32?KI(e,t,r):qI(e,t,r),Uk=(e,t,r)=>r>32?JI(e,t,r):WI(e,t,r);k_=class e extends Ji{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,la(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=jI(this.state);}clone(){return this._cloneInto()}keccak(){Tw(this.state32),_7(this.state32,this.rounds),Tw(this.state32),this.posOut=0,this.pos=0;}update(t){si(this),t=da(t),Ao(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){si(this,false),Ao(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return la(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(th(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Nn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},E7=(e,t,r)=>Tl(()=>new k_(t,e,r)),Ra=E7(1,136,256/8);});var Kh,R_,Hk=F(()=>{ai();Kh=class extends Ji{constructor(t,r){super(),this.finished=false,this.destroyed=false,DI(t);let o=da(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Nn(i);}update(t){return si(this),this.iHash.update(t),this}digestInto(t){si(this),Ao(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},R_=(e,t,r)=>new Kh(e,t).update(r).digest();R_.create=(e,t)=>new Kh(e,t);});function Vk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function S7(e){let t=Cl(e);to(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function T_(e,t){return es(To(e,t))}function I7(e){let t=S7(e),{Fp:r}=t,o=di(t.n,t.nBitLength),n=t.toBytes||((O,I,P)=>{let L=I.toAffine();return ar(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),i=t.fromBytes||(O=>{let I=O.subarray(1),P=r.fromBytes(I.subarray(0,r.BYTES)),L=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return {x:P,y:L}});function s(O){let{a:I,b:P}=t,L=r.sqr(O),C=r.mul(L,O);return r.add(r.add(C,r.mul(O,I)),P)}function a(O,I){let P=r.sqr(I),L=s(O);return r.eql(P,L)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,Xl),O_),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(O){return ya(O,Je,t.n)}function d(O){let{allowedPrivateKeyLengths:I,nByteLength:P,wrapPrivateKey:L,n:C}=t;if(I&&typeof O!="bigint"){if(Lc(O)&&(O=es(O)),typeof O!="string"||!I.includes(O.length))throw new Error("invalid private key");O=O.padStart(P*2,"0");}let D;try{D=typeof O=="bigint"?O:tn(Ge("private key",O,P));}catch{throw new Error("invalid private key, expected hex or "+P+" bytes, got "+typeof O)}return L&&(D=Le(D,C)),Dr("private key",D,Je,C),D}function g(O){if(!(O instanceof E))throw new Error("ProjectivePoint expected")}let h=Mc((O,I)=>{let{px:P,py:L,pz:C}=O;if(r.eql(C,r.ONE))return {x:P,y:L};let D=O.is0();I==null&&(I=D?r.ONE:r.inv(C));let q=r.mul(P,I),H=r.mul(L,I),Z=r.mul(C,I);if(D)return {x:r.ZERO,y:r.ZERO};if(!r.eql(Z,r.ONE))throw new Error("invZ was invalid");return {x:q,y:H}}),v=Mc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:I,y:P}=O.toAffine();if(!r.isValid(I)||!r.isValid(P))throw new Error("bad point: x or y not FE");if(!a(I,P))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class E{constructor(I,P,L){if(I==null||!r.isValid(I))throw new Error("x required");if(P==null||!r.isValid(P)||r.is0(P))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=I,this.py=P,this.pz=L,Object.freeze(this);}static fromAffine(I){let{x:P,y:L}=I||{};if(!I||!r.isValid(P)||!r.isValid(L))throw new Error("invalid affine point");if(I instanceof E)throw new Error("projective point not allowed");let C=D=>r.eql(D,r.ZERO);return C(P)&&C(L)?E.ZERO:new E(P,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){let P=li(r,I.map(L=>L.pz));return I.map((L,C)=>L.toAffine(P[C])).map(E.fromAffine)}static fromHex(I){let P=E.fromAffine(i(Ge("pointHex",I)));return P.assertValidity(),P}static fromPrivateKey(I){return E.BASE.multiply(d(I))}static msm(I,P){return lh(E,o,I,P)}_setWindowSize(I){N.setWindowSize(this,I);}assertValidity(){v(this);}hasEvenY(){let{y:I}=this.toAffine();if(r.isOdd)return !r.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.eql(r.mul(P,H),r.mul(D,C)),re=r.eql(r.mul(L,H),r.mul(q,C));return Z&&re}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:I,b:P}=t,L=r.mul(P,Xl),{px:C,py:D,pz:q}=this,H=r.ZERO,Z=r.ZERO,re=r.ZERO,S=r.mul(C,C),l=r.mul(D,D),m=r.mul(q,q),y=r.mul(C,D);return y=r.add(y,y),re=r.mul(C,q),re=r.add(re,re),H=r.mul(I,re),Z=r.mul(L,m),Z=r.add(H,Z),H=r.sub(l,Z),Z=r.add(l,Z),Z=r.mul(H,Z),H=r.mul(y,H),re=r.mul(L,re),m=r.mul(I,m),y=r.sub(S,m),y=r.mul(I,y),y=r.add(y,re),re=r.add(S,S),S=r.add(re,S),S=r.add(S,m),S=r.mul(S,y),Z=r.add(Z,S),m=r.mul(D,q),m=r.add(m,m),S=r.mul(m,y),H=r.sub(H,S),re=r.mul(m,l),re=r.add(re,re),re=r.add(re,re),new E(H,Z,re)}add(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.ZERO,re=r.ZERO,S=r.ZERO,l=t.a,m=r.mul(t.b,Xl),y=r.mul(P,D),b=r.mul(L,q),x=r.mul(C,H),_=r.add(P,L),k=r.add(D,q);_=r.mul(_,k),k=r.add(y,b),_=r.sub(_,k),k=r.add(P,C);let w=r.add(D,H);return k=r.mul(k,w),w=r.add(y,x),k=r.sub(k,w),w=r.add(L,C),Z=r.add(q,H),w=r.mul(w,Z),Z=r.add(b,x),w=r.sub(w,Z),S=r.mul(l,k),Z=r.mul(m,x),S=r.add(Z,S),Z=r.sub(b,S),S=r.add(b,S),re=r.mul(Z,S),b=r.add(y,y),b=r.add(b,y),x=r.mul(l,x),k=r.mul(m,k),b=r.add(b,x),x=r.sub(y,x),x=r.mul(l,x),k=r.add(k,x),y=r.mul(b,k),re=r.add(re,y),y=r.mul(w,k),Z=r.mul(_,Z),Z=r.sub(Z,y),y=r.mul(_,b),S=r.mul(w,S),S=r.add(S,y),new E(Z,re,S)}subtract(I){return this.add(I.negate())}is0(){return this.equals(E.ZERO)}wNAF(I){return N.wNAFCached(this,I,E.normalizeZ)}multiplyUnsafe(I){let{endo:P,n:L}=t;Dr("scalar",I,oo,L);let C=E.ZERO;if(I===oo)return C;if(this.is0()||I===Je)return this;if(!P||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,I,E.normalizeZ);let{k1neg:D,k1:q,k2neg:H,k2:Z}=P.splitScalar(I),re=C,S=C,l=this;for(;q>oo||Z>oo;)q&Je&&(re=re.add(l)),Z&Je&&(S=S.add(l)),l=l.double(),q>>=Je,Z>>=Je;return D&&(re=re.negate()),H&&(S=S.negate()),S=new E(r.mul(S.px,P.beta),S.py,S.pz),re.add(S)}multiply(I){let{endo:P,n:L}=t;Dr("scalar",I,Je,L);let C,D;if(P){let{k1neg:q,k1:H,k2neg:Z,k2:re}=P.splitScalar(I),{p:S,f:l}=this.wNAF(H),{p:m,f:y}=this.wNAF(re);S=N.constTimeNegate(q,S),m=N.constTimeNegate(Z,m),m=new E(r.mul(m.px,P.beta),m.py,m.pz),C=S.add(m),D=l.add(y);}else {let{p:q,f:H}=this.wNAF(I);C=q,D=H;}return E.normalizeZ([C,D])[0]}multiplyAndAddUnsafe(I,P,L){let C=E.BASE,D=(H,Z)=>Z===oo||Z===Je||!H.equals(C)?H.multiplyUnsafe(Z):H.multiply(Z),q=D(this,P).add(D(I,L));return q.is0()?void 0:q}toAffine(I){return h(this,I)}isTorsionFree(){let{h:I,isTorsionFree:P}=t;if(I===Je)return true;if(P)return P(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:I,clearCofactor:P}=t;return I===Je?this:P?P(E,this):this.multiplyUnsafe(t.h)}toRawBytes(I=true){return Ro("isCompressed",I),this.assertValidity(),n(E,this,I)}toHex(I=true){return Ro("isCompressed",I),es(this.toRawBytes(I))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:R,nBitLength:$}=t,N=fh(E,R?Math.ceil($/2):$);return {CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function A7(e){let t=Cl(e);return to(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Zk(e){let t=A7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Le(m,o)}function u(m){return ch(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=I7({...t,toBytes(m,y,b){let x=y.toAffine(),_=r.toBytes(x.x),k=ar;return Ro("isCompressed",b),b?k(Uint8Array.from([y.hasEvenY()?2:3]),_):k(Uint8Array.from([4]),_,r.toBytes(x.y))},fromBytes(m){let y=m.length,b=m[0],x=m.subarray(1);if(y===s&&(b===2||b===3)){let _=tn(x);if(!ya(_,Je,r.ORDER))throw new Error("Point is not on curve");let k=g(_),w;try{w=r.sqrt(k);}catch(G){let K=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+K)}let p=(w&Je)===Je;return (b&1)===1!==p&&(w=r.neg(w)),{x:_,y:w}}else if(y===a&&b===4){let _=r.fromBytes(x.subarray(0,r.BYTES)),k=r.fromBytes(x.subarray(r.BYTES,2*r.BYTES));return {x:_,y:k}}else {let _=s,k=a;throw new Error("invalid Point, expected length of "+_+", or uncompressed "+k+", got "+y)}}});function v(m){let y=o>>Je;return m>y}function E(m){return v(m)?c(-m):m}let R=(m,y,b)=>tn(m.slice(y,b));class ${constructor(y,b,x){Dr("r",y,Je,o),Dr("s",b,Je,o),this.r=y,this.s=b,x!=null&&(this.recovery=x),Object.freeze(this);}static fromCompact(y){let b=n;return y=Ge("compactSignature",y,b*2),new $(R(y,0,b),R(y,b,2*b))}static fromDER(y){let{r:b,s:x}=hi.toSig(Ge("DER",y));return new $(b,x)}assertValidity(){}addRecoveryBit(y){return new $(this.r,this.s,y)}recoverPublicKey(y){let{r:b,s:x,recovery:_}=this,k=C(Ge("msgHash",y));if(_==null||![0,1,2,3].includes(_))throw new Error("recovery id invalid");let w=_===2||_===3?b+t.n:b;if(w>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(_&1)===0?"02":"03",A=f.fromHex(p+T_(w,r.BYTES)),G=u(w),K=c(-k*G),Q=c(x*G),ae=f.BASE.multiplyAndAddUnsafe(A,K,Q);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bl(this.toDERHex())}toDERHex(){return hi.hexFromSig(this)}toCompactRawBytes(){return Bl(this.toCompactHex())}toCompactHex(){let y=n;return T_(this.r,y)+T_(this.s,y)}}let N={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Dw(t.n);return bA(t.randomBytes(m),t.n)},precompute(m=8,y=f.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return f.fromPrivateKey(m).toRawBytes(y)}function I(m){if(typeof m=="bigint")return false;if(m instanceof f)return true;let b=Ge("key",m).length,x=r.BYTES,_=x+1,k=2*x+1;if(!(t.allowedPrivateKeyLengths||n===_))return b===_||b===k}function P(m,y,b=true){if(I(m)===true)throw new Error("first arg must be private key");if(I(y)===false)throw new Error("second arg must be public key");return f.fromHex(y).multiply(d(m)).toRawBytes(b)}let L=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=tn(m),b=m.length*8-i;return b>0?y>>BigInt(b):y},C=t.bits2int_modN||function(m){return c(L(m))},D=ba(i);function q(m){return Dr("num < 2^"+i,m,oo,D),To(m,n)}function H(m,y,b=Z){if(["recovered","canonical"].some(ye=>ye in b))throw new Error("sign() legacy options not supported");let{hash:x,randomBytes:_}=t,{lowS:k,prehash:w,extraEntropy:p}=b;k==null&&(k=true),m=Ge("msgHash",m),Vk(b),w&&(m=Ge("prehashed msgHash",x(m)));let A=C(m),G=d(y),K=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?_(r.BYTES):p;K.push(Ge("extraEntropy",ye));}let Q=ar(...K),ae=A;function he(ye){let We=L(ye);if(!h(We))return;let Se=u(We),_e=f.BASE.multiply(We).toAffine(),tr=c(_e.x);if(tr===oo)return;let Ce=c(Se*c(ae+tr*G));if(Ce===oo)return;let je=(_e.x===tr?0:2)|Number(_e.y&Je),Li=Ce;return k&&v(Ce)&&(Li=E(Ce),je^=1),new $(tr,Li,je)}return {seed:Q,k2sig:he}}let Z={lowS:t.lowS,prehash:false},re={lowS:t.lowS,prehash:false};function S(m,y,b=Z){let{seed:x,k2sig:_}=H(m,y,b),k=t;return fA(k.hash.outputLen,k.nByteLength,k.hmac)(x,_)}f.BASE._setWindowSize(8);function l(m,y,b,x=re){let _=m;y=Ge("msgHash",y),b=Ge("publicKey",b);let{lowS:k,prehash:w,format:p}=x;if(Vk(x),"strict"in x)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof _=="string"||Lc(_),G=!A&&!p&&typeof _=="object"&&_!==null&&typeof _.r=="bigint"&&typeof _.s=="bigint";if(!A&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let K,Q;try{if(G&&(K=new $(_.r,_.s)),A){try{p!=="compact"&&(K=$.fromDER(_));}catch(je){if(!(je instanceof hi.Err))throw je}!K&&p!=="der"&&(K=$.fromCompact(_));}Q=f.fromHex(b);}catch{return false}if(!K||k&&K.hasHighS())return false;w&&(y=t.hash(y));let{r:ae,s:he}=K,ye=C(y),We=u(he),Se=c(ye*We),_e=c(ae*We),tr=f.BASE.multiplyAndAddUnsafe(Q,Se,_e)?.toAffine();return tr?c(tr.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:P,sign:S,verify:l,ProjectivePoint:f,Signature:$,utils:N}}function k7(e,t){let r=e.ORDER,o=oo;for(let v=r-Je;v%cs===oo;v/=cs)o+=Je;let n=o,i=cs<<n-Je-Je,s=i*cs,a=(r-Je)/s,c=(a-Je)/cs,u=s-Je,f=i,d=e.pow(t,a),g=e.pow(t,(a+Je)/cs),h=(v,E)=>{let R=d,$=e.pow(E,u),N=e.sqr($);N=e.mul(N,E);let O=e.mul(v,N);O=e.pow(O,c),O=e.mul(O,$),$=e.mul(O,E),N=e.mul(O,v);let I=e.mul(N,$);O=e.pow(I,f);let P=e.eql(O,e.ONE);$=e.mul(N,g),O=e.mul(I,R),N=e.cmov($,N,P),I=e.cmov(O,I,P);for(let L=n;L>Je;L--){let C=L-cs;C=cs<<C-Je;let D=e.pow(I,C),q=e.eql(D,e.ONE);$=e.mul(N,R),R=e.mul(R,R),D=e.mul(I,R),N=e.cmov($,N,q),I=e.cmov(D,I,q);}return {isValid:P,value:N}};if(e.ORDER%O_===Xl){let v=(e.ORDER-Xl)/O_,E=e.sqrt(e.neg(t));h=(R,$)=>{let N=e.sqr($),O=e.mul(R,$);N=e.mul(N,O);let I=e.pow(N,v);I=e.mul(I,O);let P=e.mul(I,E),L=e.mul(e.sqr(I),$),C=e.eql(L,R),D=e.cmov(P,I,C);return {isValid:C,value:D}};}return h}function Gk(e,t){if(uh(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=k7(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,f,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),f=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),f=e.cmov(f,s,g),d=e.cmov(d,h,g);let v=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,v);let E=li(e,[a],true)[0];return f=e.mul(f,E),{x:f,y:d}}}var $_,hi,oo,Je,cs,Xl,O_,N_=F(()=>{Gw();wa();xa();$_=class extends Error{constructor(t=""){super(t);}},hi={Err:$_,_tlv:{encode:(e,t)=>{let{Err:r}=hi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=Pl(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Pl(n.length/2|128):"";return Pl(e)+i+n+t},decode(e,t){let{Err:r}=hi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)s=s<<8|f;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=hi;if(e<oo)throw new t("integer: negative integers are not allowed");let r=Pl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=hi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return tn(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=hi,n=Ge("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l:f}=o.decode(2,c);if(f.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=hi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};oo=BigInt(0),Je=BigInt(1),cs=BigInt(2),Xl=BigInt(3),O_=BigInt(4);});function R7(e){return {hash:e,hmac:(t,...r)=>R_(e,t,$w(...r)),randomBytes:zc}}function qk(e,t){let r=o=>Zk({...e,...R7(o)});return {...r(t),create:r}}var Wk=F(()=>{Hk();ai();N_();});var tR={};Er(tR,{encodeToCurve:()=>z7,hashToCurve:()=>C7,schnorr:()=>N7,secp256k1:()=>bn,secp256k1_hasher:()=>M_});function Yk(e){let t=td,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,f=u*u*e%t,d=at(f,r,t)*f%t,g=at(d,r,t)*f%t,h=at(g,Yh,t)*u%t,v=at(h,n,t)*h%t,E=at(v,i,t)*v%t,R=at(E,a,t)*E%t,$=at(R,c,t)*R%t,N=at($,a,t)*E%t,O=at(N,r,t)*f%t,I=at(O,s,t)*v%t,P=at(I,o,t)*u%t,L=at(P,Yh,t);if(!us.eql(us.sqr(L),e))throw new Error("Cannot find square root");return L}function Xh(e,...t){let r=Jk[e];if(r===void 0){let o=ha(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Jk[e]=r;}return ha(ar(r,...t))}function C_(e){let t=bn.utils.normPrivateKeyToScalar(e),r=U_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ed(-t),bytes:L_(r)}}function Xk(e){Dr("x",e,Ql,td);let t=P_(e*e),r=P_(t*e+BigInt(7)),o=Yk(r);o%Yh!==z_&&(o=P_(-o));let n=new U_(e,o,Ql);return n.assertValidity(),n}function Qk(...e){return ed(qc(Xh("BIP0340/challenge",...e)))}function $7(e){return C_(e).bytes}function O7(e,t,r=zc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=C_(t),s=Ge("auxRand",r,32),a=B_(i^qc(Xh("BIP0340/aux",s))),c=Xh("BIP0340/nonce",a,n,o),u=ed(qc(c));if(u===z_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=C_(u),g=Qk(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(B_(ed(d+g*i)),32),!eR(h,o,n))throw new Error("sign: Invalid signature produced");return h}function eR(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=Xk(qc(i)),a=qc(o.subarray(0,32));if(!ya(a,Ql,td))return !1;let c=qc(o.subarray(32,64));if(!ya(c,Ql,Jh))return !1;let u=Qk(B_(a),L_(s),n),f=T7(s,c,ed(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var td,Jh,z_,Ql,Yh,Kk,us,bn,Jk,L_,B_,P_,ed,U_,T7,qc,N7,P7,B7,M_,C7,z7,rd=F(()=>{sh();ai();Wk();RA();wa();xa();N_();td=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),z_=BigInt(0),Ql=BigInt(1),Yh=BigInt(2),Kk=(e,t)=>(e+t/Yh)/t;us=di(td,void 0,void 0,{sqrt:Yk}),bn=qk({a:z_,b:BigInt(7),Fp:us,n:Jh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Jh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-Ql*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Kk(i*e,t),c=Kk(-o*e,t),u=Le(e-a*r-c*n,t),f=Le(-a*o-c*i,t),d=u>s,g=f>s;if(d&&(u=t-u),g&&(f=t-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:f}}}},ha),Jk={};L_=e=>e.toRawBytes(true).slice(1),B_=e=>To(e,32),P_=e=>Le(e,td),ed=e=>Le(e,Jh),U_=bn.ProjectivePoint,T7=(e,t,r)=>U_.BASE.multiplyAndAddUnsafe(e,t,r);qc=tn;N7={getPublicKey:$7,sign:O7,verify:eR,utils:{randomPrivateKey:bn.utils.randomPrivateKey,lift_x:Xk,pointToBytes:L_,numberToBytesBE:To,bytesToNumberBE:tn,taggedHash:Xh,mod:Le}},P7=AA(us,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),B7=Gk(us,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:us.create(BigInt("-11"))}),M_=kA(bn.ProjectivePoint,e=>{let{x:t,y:r}=B7(us.create(e[0]));return P7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:us.ORDER,m:1,k:128,expand:"xmd",hash:ha}),C7=M_.hashToCurve,z7=M_.encodeToCurve;});var dT,pT=F(()=>{dT="1.2.3";});var _t,ru=F(()=>{pT();_t=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${dT}`].join(`
3
+ `);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function _n(e,t){return e.exec(t)?.groups}var O6,N6,w0,Sd=F(()=>{O6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,N6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,w0=/^\(.+?\).*?$/;});function _0(e){let t=e.type;if(mT.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=_0(i),n<r-1&&(t+=", ");}let o=_n(mT,e.type);return t+=`)${o?.array||""}`,_0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var mT,hT=F(()=>{Sd();mT=/^tuple(?<array>(\[(\d*)\])*)$/;});function bi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=_0(n),o!==r-1&&(t+=", ");}return t}var P6=F(()=>{hT();});function Ba(e){return e.type==="function"?`function ${e.name}(${bi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${bi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${bi(e.inputs)})`:e.type==="error"?`error ${e.name}(${bi(e.inputs)})`:e.type==="constructor"?`constructor(${bi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var gT=F(()=>{P6();});function bT(e){return yT.test(e)}function xT(e){return _n(yT,e)}function wT(e){return vT.test(e)}function _T(e){return _n(vT,e)}function ST(e){return ET.test(e)}function IT(e){return _n(ET,e)}function ds(e){return AT.test(e)}function kT(e){return _n(AT,e)}function TT(e){return RT.test(e)}function $T(e){return _n(RT,e)}function NT(e){return OT.test(e)}function PT(e){return _n(OT,e)}function BT(e){return uH.test(e)}var yT,vT,ET,AT,RT,OT,uH,B6,CT,E0,nu=F(()=>{Sd();yT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;vT=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;ET=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;AT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;RT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;OT=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;uH=/^receive\(\) external payable$/;B6=new Set(["memory","indexed","storage","calldata"]),CT=new Set(["indexed"]),E0=new Set(["calldata","memory","storage"]);});var Id,Ad,S0,I0=F(()=>{ru();Id=class extends _t{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},Ad=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},S0=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var kd,Rd,Td,$d,Od,Nd,A0=F(()=>{ru();kd=class extends _t{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Rd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Td=class extends _t{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},$d=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Od=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Nd=class extends _t{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var ao,Pd,Bd,C6=F(()=>{ru();ao=class extends _t{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Pd=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Bd=class extends _t{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Cd,zT=F(()=>{ru();Cd=class extends _t{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var zd,LT=F(()=>{ru();zd=class extends _t{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function UT(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var k0,MT=F(()=>{k0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Ld(e,t={}){if(ST(e))return fH(e,t);if(wT(e))return lH(e,t);if(bT(e))return dH(e,t);if(TT(e))return pH(e,t);if(NT(e))return mH(e);if(BT(e))return {type:"receive",stateMutability:"payable"};throw new Pd({signature:e})}function fH(e,t={}){let r=IT(e);if(!r)throw new ao({signature:e,type:"function"});let o=nn(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(co(o[a],{modifiers:E0,structs:t,type:"function"}));let s=[];if(r.returns){let a=nn(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(co(a[u],{modifiers:E0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function lH(e,t={}){let r=_T(e);if(!r)throw new ao({signature:e,type:"event"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{modifiers:CT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function dH(e,t={}){let r=xT(e);if(!r)throw new ao({signature:e,type:"error"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function pH(e,t={}){let r=$T(e);if(!r)throw new ao({signature:e,type:"constructor"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function mH(e){let t=PT(e);if(!t)throw new ao({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function co(e,t){let r=UT(e,t?.type,t?.structs);if(k0.has(r))return k0.get(r);let o=w0.test(e),n=_n(o?gH:hH,e);if(!n)throw new Rd({param:e});if(n.name&&xH(n.name))throw new Td({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=nn(n.type),g=[],h=d.length;for(let v=0;v<h;v++)g.push(co(d[v],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(yH.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!z6(c))throw new S0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new $d({param:e,type:t?.type,modifier:n.modifier});if(E0.has(n.modifier)&&!vH(c,!!n.array))throw new Od({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return k0.set(r,f),f}function nn(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?nn(a,[...t,r.trim()]):nn(a,t,`${r}${s}`,o);case "(":return nn(a,t,`${r}${s}`,o+1);case ")":return nn(a,t,`${r}${s}`,o-1);default:return nn(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new zd({current:r,depth:o});return t.push(r.trim()),t}function z6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||O6.test(e)||N6.test(e)}function xH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||O6.test(e)||N6.test(e)||bH.test(e)}function vH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var hH,gH,yH,bH,ou=F(()=>{Sd();I0();A0();C6();LT();MT();nu();hH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,gH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,yH=/^u?int$/;bH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function iu(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!ds(a))continue;let c=kT(a);if(!c)throw new ao({signature:a,type:"struct"});let u=c.properties.split(";"),f=[],d=u.length;for(let g=0;g<d;g++){let v=u[g].trim();if(!v)continue;let E=co(v,{type:"struct"});f.push(E);}if(!f.length)throw new Bd({signature:a});t[c.name]=f;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=DT(c,t);}return o}function DT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(w0.test(s.type))o.push(s);else {let c=_n(wH,s.type);if(!c?.type)throw new Nd({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new Cd({type:f});o.push({...s,type:`tuple${u??""}`,components:DT(t[f],t,new Set([...r,f]))});}else if(z6(f))o.push(s);else throw new Ad({type:f})}}return o}var wH,R0=F(()=>{Sd();I0();A0();C6();zT();nu();ou();wH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function ps(e){let t=iu(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];ds(i)||r.push(Ld(i,t));}return r}var jT=F(()=>{nu();R0();ou();});function Ud(e){let t;if(typeof e=="string")t=Ld(e);else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!ds(i)){t=Ld(i,r);break}}}if(!t)throw new Id({signature:e});return t}var FT=F(()=>{I0();nu();R0();ou();});function Md(e){let t=[];if(typeof e=="string"){let r=nn(e),o=r.length;for(let n=0;n<o;n++)t.push(co(r[n],{modifiers:B6}));}else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(ds(i))continue;let s=nn(i),a=s.length;for(let c=0;c<a;c++)t.push(co(s[c],{modifiers:B6,structs:r}));}}if(t.length===0)throw new kd({params:e});return t}var HT=F(()=>{A0();nu();R0();ou();ou();});var su=F(()=>{gT();P6();jT();FT();HT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new T0(e.type);return `${e.name}(${Dd(e.inputs,{includeName:t})})`}function Dd(e,{includeName:t=false}={}){return e?e.map(r=>_H(r,{includeName:t})).join(t?", ":","):""}function _H(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Dd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var xi=F(()=>{Et();});function St(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var uo=F(()=>{});function $e(e){return St(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var on=F(()=>{uo();});var L6,ZT=F(()=>{L6="2.55.16";});function GT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?GT(e.cause,t):t?null:e}var U6,z,Te=F(()=>{ZT();U6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${L6}`},z=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=U6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...U6.version?[`Version: ${U6.version}`]:[]].join(`
4
+ `);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=L6;}walk(t){return GT(this,t)}};});var $0,jd,au,Cn,O0,N0,P0,B0,Fd,cu,C0,z0,Hd,fo,uu,L0,U0,M0,vi,ms,D0,j0,fu,T0,Et=F(()=>{xi();on();Te();$0=class extends z{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
5
5
  `),{docsPath:t,name:"AbiConstructorNotFoundError"});}},jd=class extends z{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
6
6
  `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}},au=class extends z{constructor({data:t,params:r,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
7
7
  `),{metaMessages:[`Params: (${Dd(r,{includeName:true})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t,this.params=r,this.size=o;}},Cn=class extends z{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t});}},O0=class extends z{constructor({expectedLength:t,givenLength:r,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
@@ -20,27 +20,27 @@ var JO=Object.create;var Cp=Object.defineProperty;var YO=Object.getOwnPropertyDe
20
20
  `),{docsPath:r,name:"InvalidAbiEncodingType"});}},j0=class extends z{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
21
21
  `),{docsPath:r,name:"InvalidAbiDecodingType"});}},fu=class extends z{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
22
22
  `),{name:"InvalidArrayError"});}},T0=class extends z{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
23
- `),{name:"InvalidDefinitionTypeError"});}};});var Vd,Zd,Gd,H0=F(()=>{Te();Vd=class extends z{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Zd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Gd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function zo(e,{dir:t,size:r=32}={}){return typeof e=="string"?wi(e,{dir:t,size:r}):bH(e,{dir:t,size:r})}function wi(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Zd({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function bH(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Zd({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var qd=F(()=>{H0();});var hs,V0,Z0,G0,Wd=F(()=>{Te();hs=class extends z{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},V0=class extends z{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},Z0=class extends z{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},G0=class extends z{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function Gr(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var Kd=F(()=>{});function sn(e,{size:t}){if($e(e)>t)throw new G0({givenSize:$e(e),maxSize:t})}function ut(e,t={}){let{signed:r}=t;t.size&&sn(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function L6(e,t={}){let r=e;if(t.size&&(sn(r,{size:t.size}),r=Gr(r)),Gr(r)==="0x00")return false;if(Gr(r)==="0x01")return true;throw new Z0(r)}function vt(e,t={}){let r=ut(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new hs({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var ur=F(()=>{Wd();on();Kd();});function mt(e,t={}){return typeof e=="number"||typeof e=="bigint"?J(e,t):typeof e=="string"?lu(e,t):typeof e=="boolean"?U6(e,t):Ue(e,t)}function U6(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function Ue(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=xH[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(sn(o,{size:t.size}),zo(o,{dir:"right",size:t.size})):o}function J(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new hs({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?zo(a,{size:o}):a}function lu(e,t={}){let r=vH.encode(e);return Ue(r,t)}var xH,vH,Re=F(()=>{Wd();qd();ur();xH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));vH=new TextEncoder;});function zn(e,t={}){return typeof e=="number"||typeof e=="bigint"?EH(e,t):typeof e=="boolean"?_H(e,t):St(e)?xr(e,t):lo(e,t)}function _H(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function GT(e){if(e>=_i.zero&&e<=_i.nine)return e-_i.zero;if(e>=_i.A&&e<=_i.F)return e-(_i.A-10);if(e>=_i.a&&e<=_i.f)return e-(_i.a-10)}function xr(e,t={}){let r=e;t.size&&(sn(r,{size:t.size}),r=zo(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=GT(o.charCodeAt(a++)),u=GT(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new z(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function EH(e,t){let r=J(e,t);return xr(r)}function lo(e,t={}){let r=wH.encode(e);return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var wH,_i,vr=F(()=>{Te();uo();qd();ur();Re();wH=new TextEncoder;_i={zero:48,nine:57,A:65,F:70,a:97,f:102};});function Qe(e,t){let r=t||"hex",o=Ra(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}var po=F(()=>{Wh();uo();vr();Re();});function qT(e){return SH(e)}var SH,WT=F(()=>{vr();po();SH=e=>Qe(zn(e));});function KT(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new z("Unable to normalize signature.");return n}var JT=F(()=>{Te();});var YT,XT=F(()=>{su();JT();YT=e=>{let t=typeof e=="string"?e:Ba(e);return KT(t)};});function q0(e){return qT(YT(e))}var M6=F(()=>{WT();XT();});var gs,Jd=F(()=>{M6();gs=q0;});var nt,Lo=F(()=>{Te();nt=class extends z{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var Uo,Yd=F(()=>{Uo=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function ys(e,t){if(D6.has(`${e}.${t}`))return D6.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=Qe(lo(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return D6.set(`${e}.${t}`,i),i}function Ln(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return ys(e,t)}var D6,Ei=F(()=>{Lo();vr();po();Yd();En();D6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(j6.has(o))return j6.get(o);let n=IH.test(e)?e.toLowerCase()===e?true:r?ys(e)===e:true:false;return j6.set(o,n),n}var IH,j6,En=F(()=>{Yd();Ei();IH=/^0x[a-fA-F0-9]{40}$/,j6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):AH(e)}function AH(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function st(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var an=F(()=>{});function cn(e,t,r,{strict:o}={}){return St(e,{strict:false})?kH(e,t,r,{strict:o}):F6(e,t,r,{strict:o})}function QT(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Vd({offset:t,position:"start",size:$e(e)})}function e4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Vd({offset:r,position:"end",size:$e(e)})}function F6(e,t,r,{strict:o}={}){QT(e,t);let n=e.slice(t,r);return o&&e4(n,t,r),n}function kH(e,t,r,{strict:o}={}){QT(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&e4(n,t,r),n}var bs=F(()=>{H0();uo();on();});var t4,W0,H6=F(()=>{t4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,W0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function qr(e,t){if(e.length!==t.length)throw new P0({expectedLength:e.length,givenLength:t.length});let r=RH({params:e,values:t});return G6(r)}function RH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(Z6({param:e[o],value:t[o]}));return r}function Z6({param:e,value:t}){let r=Xd(e.type);if(r){let[o,n]=r;return $H(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return CH(t,{param:e});if(e.type==="address")return TH(t);if(e.type==="bool")return NH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=W0.exec(e.type)??[];return PH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return OH(t,{param:e});if(e.type==="string")return BH(t);throw new D0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function G6(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=$e(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(J(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function TH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:wi(e.toLowerCase())}}function $H(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new fu(e);if(!o&&e.length!==t)throw new O0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&V6(r),i=[];for(let s=0;s<e.length;s++){let a=Z6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=G6(i);if(o){let a=J(i.length,{size:32});return {dynamic:true,encoded:st([a,s])}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:st(i.map(({encoded:s})=>s))}}function OH(e,{param:t}){let[,r]=t.type.split("bytes"),o=$e(e);if(!r){let n=e;return o%32!==0&&(n=wi(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:st([wi(J(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new N0({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:wi(e,{dir:"right"})}}function NH(e){if(typeof e!="boolean")throw new z(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:wi(U6(e))}}function PH(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new hs({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:J(e,{size:32,signed:t})}}function BH(e){let t=lu(e),r=Math.ceil($e(t)/32),o=[];for(let n=0;n<r;n++)o.push(wi(cn(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:st([wi(J($e(t),{size:32})),...o])}}function CH(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=Z6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?G6(o):st(o.map(({encoded:n})=>n))}}function Xd(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function V6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(V6);let r=Xd(t);return r?V6({...e,type:r[1]}):false}var Si=F(()=>{Et();Lo();Te();Wd();En();an();qd();on();bs();Re();H6();});var Do,du=F(()=>{bs();M6();Do=e=>cn(q0(e),0,4);});function un(e){let{abi:t,args:r=[],name:o}=e,n=St(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?Do(a)===o:a.type==="event"?gs(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,f)=>{let d="inputs"in a&&a.inputs[f];return d?q6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=r4(a.inputs,s.inputs,r);if(u)throw new U0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function q6(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Me(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&q6(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>q6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function r4(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return r4(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Me(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Me(r[o],{strict:false}):false)return s}}var xs=F(()=>{Et();uo();En();Jd();du();});function qe(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var fn=F(()=>{});function s4(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=un({abi:t,args:r,name:o});if(!i)throw new fo(o,{docsPath:i4});n=i;}if(n.type!=="function")throw new fo(void 0,{docsPath:i4});return {abi:[n],functionName:Do(nr(n))}}var i4,a4=F(()=>{Et();du();xi();xs();i4="/docs/contract/encodeFunctionData";});function ft(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:s4(e),n=r[0],i=o,s="inputs"in n&&n.inputs?qr(n.inputs,t??[]):void 0;return st([i,s??"0x"])}var Un=F(()=>{an();Si();a4();});var c4,J0,u4,Y0=F(()=>{c4={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},J0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},u4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var Qd,pu,X0,W6=F(()=>{Te();Qd=class extends z{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},pu=class extends z{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},X0=class extends z{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function mu(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(zH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var zH,Q0=F(()=>{W6();zH={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new X0({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new pu({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function f4(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return ut(r,t)}function l4(e,t={}){let r=e;if(typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r)),r.length>1||r[0]>1)throw new V0(r);return !!r[0]}function Fo(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return vt(r,t)}function d4(e,t={}){let r=e;return typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r,{dir:"right"})),new TextDecoder().decode(r)}var p4=F(()=>{Wd();Kd();ur();Re();});function Ii(e,t){let r=typeof t=="string"?xr(t):t,o=mu(r);if($e(r)===0&&e.length>0)throw new Cn;if($e(t)&&$e(t)<32)throw new au({data:typeof t=="string"?t:Ue(t),params:e,size:$e(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];n<r.length&&o.setPosition(n);let[c,u]=hu(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function hu(e,t,{staticPosition:r}){let o=Xd(t.type);if(o){let[n,i]=o;return UH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return FH(e,t,{staticPosition:r});if(t.type==="address")return LH(e);if(t.type==="bool")return MH(e);if(t.type.startsWith("bytes"))return DH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return jH(e,t);if(t.type==="string")return HH(e,{staticPosition:r});throw new j0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function LH(e){let t=e.readBytes(32);return [ys(Ue(F6(t,-20))),32]}function UH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(K6)),a=o+s,c=a+m4;e.setPosition(a);let u=Fo(e.readBytes(m4)),f=ep(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(f?h*32:d));let[v,E]=hu(e,t,{staticPosition:c});d+=E,g.push(v),E===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(o+32),[g,32]}if(ep(t)){let s=Fo(e.readBytes(K6)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[f]=hu(e,t,{staticPosition:a});c.push(f);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=hu(e,t,{staticPosition:o+n});n+=c,i.push(a),c===0&&(e.assertReadLimit(),e._touch());}return [i,n]}function MH(e){return [l4(e.readBytes(32),{size:32}),32]}function DH(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Fo(e.readBytes(32));e.setPosition(r+s);let a=Fo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Ue(c),32]}return [Ue(e.readBytes(Number.parseInt(n,10),32)),32]}function jH(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?f4(n,{signed:r}):Fo(n,{signed:r}),32]}function FH(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(ep(t)){let s=Fo(e.readBytes(K6)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[f,d]=hu(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=f;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=hu(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function HH(e,{staticPosition:t}){let r=Fo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Fo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=d4(i);return e.setPosition(t+32),[s,32]}function ep(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(ep);let r=Xd(e.type);return !!(r&&ep({...e,type:r[1]}))}var m4,K6,tp=F(()=>{Et();Ei();Q0();on();bs();p4();vr();Re();Si();m4=32,K6=32;});function eg(e){let{abi:t,data:r,cause:o}=e,n=cn(r,0,4);if(n==="0x")throw new Cn({cause:o});let s=[...t||[],J0,u4].find(a=>a.type==="error"&&n===Do(nr(a)));if(!s)throw new cu(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ii(s.inputs,cn(r,4)):void 0,errorName:s.name}}var J6=F(()=>{Y0();Et();bs();du();tp();xi();});var Be,Pr=F(()=>{Be=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function Y6({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?Be(t[i]):t[i]}`).join(", ")})`}var h4=F(()=>{Pr();});function rg(e,t=0){if(!Number.isInteger(t)||t<0)throw new X6({decimals:t});let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}function g4(e,t="wei"){return rg(e,tg.ether-tg[t])}function y4(e,t="wei"){return rg(e,tg.gwei-tg[t])}var tg,X6,ng=F(()=>{tg={wei:0,gwei:9,szabo:12,finney:15,ether:18};X6=class extends Error{constructor({decimals:t}){super(`\`decimals\` must be a non-negative integer. Got \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Value.InvalidDecimalsError"});}};});function gu(e,t="wei"){return g4(e,t)}var og=F(()=>{ng();});function or(e,t="wei"){return y4(e,t)}var yu=F(()=>{ng();});function b4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
- `,"")}function x4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
23
+ `),{name:"InvalidDefinitionTypeError"});}};});var Vd,Zd,Gd,H0=F(()=>{Te();Vd=class extends z{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Zd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Gd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function zo(e,{dir:t,size:r=32}={}){return typeof e=="string"?wi(e,{dir:t,size:r}):EH(e,{dir:t,size:r})}function wi(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Zd({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function EH(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Zd({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var qd=F(()=>{H0();});var hs,V0,Z0,G0,Wd=F(()=>{Te();hs=class extends z{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},V0=class extends z{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},Z0=class extends z{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},G0=class extends z{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function Gr(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var Kd=F(()=>{});function sn(e,{size:t}){if($e(e)>t)throw new G0({givenSize:$e(e),maxSize:t})}function ut(e,t={}){let{signed:r}=t;t.size&&sn(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function M6(e,t={}){let r=e;if(t.size&&(sn(r,{size:t.size}),r=Gr(r)),Gr(r)==="0x00")return false;if(Gr(r)==="0x01")return true;throw new Z0(r)}function vt(e,t={}){let r=ut(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new hs({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var ur=F(()=>{Wd();on();Kd();});function mt(e,t={}){return typeof e=="number"||typeof e=="bigint"?J(e,t):typeof e=="string"?lu(e,t):typeof e=="boolean"?D6(e,t):Ue(e,t)}function D6(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function Ue(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=SH[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(sn(o,{size:t.size}),zo(o,{dir:"right",size:t.size})):o}function J(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new hs({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?zo(a,{size:o}):a}function lu(e,t={}){let r=IH.encode(e);return Ue(r,t)}var SH,IH,Re=F(()=>{Wd();qd();ur();SH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));IH=new TextEncoder;});function zn(e,t={}){return typeof e=="number"||typeof e=="bigint"?RH(e,t):typeof e=="boolean"?kH(e,t):St(e)?xr(e,t):lo(e,t)}function kH(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function qT(e){if(e>=_i.zero&&e<=_i.nine)return e-_i.zero;if(e>=_i.A&&e<=_i.F)return e-(_i.A-10);if(e>=_i.a&&e<=_i.f)return e-(_i.a-10)}function xr(e,t={}){let r=e;t.size&&(sn(r,{size:t.size}),r=zo(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=qT(o.charCodeAt(a++)),u=qT(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new z(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function RH(e,t){let r=J(e,t);return xr(r)}function lo(e,t={}){let r=AH.encode(e);return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var AH,_i,vr=F(()=>{Te();uo();qd();ur();Re();AH=new TextEncoder;_i={zero:48,nine:57,A:65,F:70,a:97,f:102};});function Qe(e,t){let r=t||"hex",o=Ra(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}var po=F(()=>{Wh();uo();vr();Re();});function WT(e){return TH(e)}var TH,KT=F(()=>{vr();po();TH=e=>Qe(zn(e));});function JT(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new z("Unable to normalize signature.");return n}var YT=F(()=>{Te();});var XT,QT=F(()=>{su();YT();XT=e=>{let t=typeof e=="string"?e:Ba(e);return JT(t)};});function q0(e){return WT(XT(e))}var j6=F(()=>{KT();QT();});var gs,Jd=F(()=>{j6();gs=q0;});var nt,Lo=F(()=>{Te();nt=class extends z{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var Uo,Yd=F(()=>{Uo=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function ys(e,t){if(F6.has(`${e}.${t}`))return F6.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=Qe(lo(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return F6.set(`${e}.${t}`,i),i}function Ln(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return ys(e,t)}var F6,Ei=F(()=>{Lo();vr();po();Yd();En();F6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(H6.has(o))return H6.get(o);let n=$H.test(e)?e.toLowerCase()===e?true:r?ys(e)===e:true:false;return H6.set(o,n),n}var $H,H6,En=F(()=>{Yd();Ei();$H=/^0x[a-fA-F0-9]{40}$/,H6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):OH(e)}function OH(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function st(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var an=F(()=>{});function cn(e,t,r,{strict:o}={}){return St(e,{strict:false})?NH(e,t,r,{strict:o}):V6(e,t,r,{strict:o})}function e4(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Vd({offset:t,position:"start",size:$e(e)})}function t4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Vd({offset:r,position:"end",size:$e(e)})}function V6(e,t,r,{strict:o}={}){e4(e,t);let n=e.slice(t,r);return o&&t4(n,t,r),n}function NH(e,t,r,{strict:o}={}){e4(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&t4(n,t,r),n}var bs=F(()=>{H0();uo();on();});var r4,W0,Z6=F(()=>{r4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,W0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function qr(e,t){if(e.length!==t.length)throw new P0({expectedLength:e.length,givenLength:t.length});let r=PH({params:e,values:t});return W6(r)}function PH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(q6({param:e[o],value:t[o]}));return r}function q6({param:e,value:t}){let r=Xd(e.type);if(r){let[o,n]=r;return CH(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return DH(t,{param:e});if(e.type==="address")return BH(t);if(e.type==="bool")return LH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=W0.exec(e.type)??[];return UH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return zH(t,{param:e});if(e.type==="string")return MH(t);throw new D0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function W6(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=$e(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(J(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function BH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:wi(e.toLowerCase())}}function CH(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new fu(e);if(!o&&e.length!==t)throw new O0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&G6(r),i=[];for(let s=0;s<e.length;s++){let a=q6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=W6(i);if(o){let a=J(i.length,{size:32});return {dynamic:true,encoded:st([a,s])}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:st(i.map(({encoded:s})=>s))}}function zH(e,{param:t}){let[,r]=t.type.split("bytes"),o=$e(e);if(!r){let n=e;return o%32!==0&&(n=wi(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:st([wi(J(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new N0({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:wi(e,{dir:"right"})}}function LH(e){if(typeof e!="boolean")throw new z(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:wi(D6(e))}}function UH(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new hs({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:J(e,{size:32,signed:t})}}function MH(e){let t=lu(e),r=Math.ceil($e(t)/32),o=[];for(let n=0;n<r;n++)o.push(wi(cn(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:st([wi(J($e(t),{size:32})),...o])}}function DH(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=q6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?W6(o):st(o.map(({encoded:n})=>n))}}function Xd(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function G6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(G6);let r=Xd(t);return r?G6({...e,type:r[1]}):false}var Si=F(()=>{Et();Lo();Te();Wd();En();an();qd();on();bs();Re();Z6();});var Do,du=F(()=>{bs();j6();Do=e=>cn(q0(e),0,4);});function un(e){let{abi:t,args:r=[],name:o}=e,n=St(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?Do(a)===o:a.type==="event"?gs(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,f)=>{let d="inputs"in a&&a.inputs[f];return d?K6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=n4(a.inputs,s.inputs,r);if(u)throw new U0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function K6(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Me(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&K6(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>K6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function n4(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return n4(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Me(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Me(r[o],{strict:false}):false)return s}}var xs=F(()=>{Et();uo();En();Jd();du();});function qe(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var fn=F(()=>{});function a4(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=un({abi:t,args:r,name:o});if(!i)throw new fo(o,{docsPath:s4});n=i;}if(n.type!=="function")throw new fo(void 0,{docsPath:s4});return {abi:[n],functionName:Do(nr(n))}}var s4,c4=F(()=>{Et();du();xi();xs();s4="/docs/contract/encodeFunctionData";});function ft(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:a4(e),n=r[0],i=o,s="inputs"in n&&n.inputs?qr(n.inputs,t??[]):void 0;return st([i,s??"0x"])}var Un=F(()=>{an();Si();c4();});var u4,J0,f4,Y0=F(()=>{u4={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},J0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},f4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var Qd,pu,X0,J6=F(()=>{Te();Qd=class extends z{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},pu=class extends z{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},X0=class extends z{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function mu(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(jH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var jH,Q0=F(()=>{J6();jH={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new X0({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new pu({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function l4(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return ut(r,t)}function d4(e,t={}){let r=e;if(typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r)),r.length>1||r[0]>1)throw new V0(r);return !!r[0]}function Fo(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return vt(r,t)}function p4(e,t={}){let r=e;return typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r,{dir:"right"})),new TextDecoder().decode(r)}var m4=F(()=>{Wd();Kd();ur();Re();});function Ii(e,t){let r=typeof t=="string"?xr(t):t,o=mu(r);if($e(r)===0&&e.length>0)throw new Cn;if($e(t)&&$e(t)<32)throw new au({data:typeof t=="string"?t:Ue(t),params:e,size:$e(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];n<r.length&&o.setPosition(n);let[c,u]=hu(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function hu(e,t,{staticPosition:r}){let o=Xd(t.type);if(o){let[n,i]=o;return HH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return qH(e,t,{staticPosition:r});if(t.type==="address")return FH(e);if(t.type==="bool")return VH(e);if(t.type.startsWith("bytes"))return ZH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return GH(e,t);if(t.type==="string")return WH(e,{staticPosition:r});throw new j0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function FH(e){let t=e.readBytes(32);return [ys(Ue(V6(t,-20))),32]}function HH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(Y6)),a=o+s,c=a+h4;e.setPosition(a);let u=Fo(e.readBytes(h4)),f=ep(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(f?h*32:d));let[v,E]=hu(e,t,{staticPosition:c});d+=E,g.push(v),E===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(o+32),[g,32]}if(ep(t)){let s=Fo(e.readBytes(Y6)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[f]=hu(e,t,{staticPosition:a});c.push(f);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=hu(e,t,{staticPosition:o+n});n+=c,i.push(a),c===0&&(e.assertReadLimit(),e._touch());}return [i,n]}function VH(e){return [d4(e.readBytes(32),{size:32}),32]}function ZH(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Fo(e.readBytes(32));e.setPosition(r+s);let a=Fo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Ue(c),32]}return [Ue(e.readBytes(Number.parseInt(n,10),32)),32]}function GH(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?l4(n,{signed:r}):Fo(n,{signed:r}),32]}function qH(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(ep(t)){let s=Fo(e.readBytes(Y6)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[f,d]=hu(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=f;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=hu(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function WH(e,{staticPosition:t}){let r=Fo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Fo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=p4(i);return e.setPosition(t+32),[s,32]}function ep(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(ep);let r=Xd(e.type);return !!(r&&ep({...e,type:r[1]}))}var h4,Y6,tp=F(()=>{Et();Ei();Q0();on();bs();m4();vr();Re();Si();h4=32,Y6=32;});function eg(e){let{abi:t,data:r,cause:o}=e,n=cn(r,0,4);if(n==="0x")throw new Cn({cause:o});let s=[...t||[],J0,f4].find(a=>a.type==="error"&&n===Do(nr(a)));if(!s)throw new cu(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ii(s.inputs,cn(r,4)):void 0,errorName:s.name}}var X6=F(()=>{Y0();Et();bs();du();tp();xi();});var Be,Pr=F(()=>{Be=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function Q6({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?Be(t[i]):t[i]}`).join(", ")})`}var g4=F(()=>{Pr();});function rg(e,t=0){if(!Number.isInteger(t)||t<0)throw new e2({decimals:t});let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}function y4(e,t="wei"){return rg(e,tg.ether-tg[t])}function b4(e,t="wei"){return rg(e,tg.gwei-tg[t])}var tg,e2,ng=F(()=>{tg={wei:0,gwei:9,szabo:12,finney:15,ether:18};e2=class extends Error{constructor({decimals:t}){super(`\`decimals\` must be a non-negative integer. Got \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Value.InvalidDecimalsError"});}};});function gu(e,t="wei"){return y4(e,t)}var og=F(()=>{ng();});function or(e,t="wei"){return b4(e,t)}var yu=F(()=>{ng();});function x4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
24
+ `,"")}function v4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
25
25
  `;return o.nonce&&(n+=` nonce: ${o.nonce}
26
26
  `),o.balance&&(n+=` balance: ${o.balance}
27
27
  `),o.code&&(n+=` code: ${o.code}
28
28
  `),o.state&&(n+=` state:
29
- `,n+=b4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
- `,n+=b4(o.stateDiff)),n},` State Override:
31
- `).slice(0,-1)}var ig,sg,e2=F(()=>{Te();ig=class extends z{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},sg=class extends z{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"});}};});function Ca(e){let t=Object.entries(e).map(([o,n])=>n===void 0||n===false?null:[o,n]).filter(Boolean),r=t.reduce((o,[n])=>Math.max(o,n.length),0);return t.map(([o,n])=>` ${`${o}:`.padEnd(r+1)} ${n}`).join(`
32
- `)}var ag,cg,ug,fg,ws,bu,lg,dg,Mn=F(()=>{og();yu();Te();ag=class extends z{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},cg=class extends z{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Ca(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"});}},ug=class extends z{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"});}},fg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({chain:n&&`${n?.name} (id: ${n?.id})`,from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},ws=class extends z{constructor({blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i}){let s="Transaction";o&&i!==void 0&&(s=`Transaction at block time "${o}" at index "${i}"`),t&&i!==void 0&&(s=`Transaction at block hash "${t}" at index "${i}"`),r&&i!==void 0&&(s=`Transaction at block number "${r}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"});}},bu=class extends z{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"});}},lg=class extends z{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:true,configurable:true,writable:true,value:void 0}),this.receipt=t;}},dg=class extends z{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"});}};});function wr(e){if(e?.reason)return e.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let t=new Error("This operation was aborted");return t.name="AbortError",t}function ln(e){return typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError"}var v4,za,mo=F(()=>{v4=e=>e;za=e=>{try{let t=new URL(e);return !t.username&&!t.password?e:(t.username="",t.password="",t.toString())}catch{return e}};});var _s,xu,La,pg,mg,Ho,Ai=F(()=>{fn();Y0();J6();xi();h4();xs();og();yu();Et();Te();e2();Mn();mo();_s=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g,stateOverride:h}){let v=r?qe(r):void 0,E=Ca({from:v?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});h&&(E+=`
33
- ${x4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",E].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},xu=class extends z{constructor(t,{abi:r,args:o,contractAddress:n,docsPath:i,functionName:s,sender:a}){let c=un({abi:r,args:o,name:s}),u=c?Y6({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=Ca({address:n&&v4(n),function:f,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"args",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"sender",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abi=r,this.args=o,this.cause=t,this.contractAddress=n,this.functionName=s,this.sender=a;}},La=class extends z{constructor({abi:t,data:r,functionName:o,message:n,cause:i}){let s,a,c,u;if(r&&r!=="0x")try{a=eg({abi:t,data:r,cause:i});let{abiItem:d,errorName:g,args:h}=a;if(g==="Error")u=h[0];else if(g==="Panic"){let[v]=h;u=c4[v];}else {let v=d?nr(d,{includeName:!0}):void 0,E=d&&h?Y6({abiItem:d,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[v?`Error: ${v}`:"",E&&E!=="()"?` ${[...Array(g?.length??0).keys()].map(()=>" ").join("")}${E}`:""];}}catch(d){s=d;}else n&&(u=n);let f;s instanceof cu&&(f=s.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
34
- `):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=f;}},pg=class extends z{constructor({functionName:t,cause:r}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r});}},mg=class extends z{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"});}},Ho=class extends z{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:3}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t;}};});var Dn,Ua,Es,rp,Ma=F(()=>{Pr();Te();mo();Dn=class extends z{constructor({body:t,cause:r,details:o,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:r,details:o,metaMessages:[i&&`Status: ${i}`,`URL: ${za(s)}`,t&&`Request body: ${Be(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=n,this.status=i,this.url=s;}},Ua=class extends z{constructor({maxSize:t,size:r}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${t} bytes`,`Received: ${r} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t,this.size=r;}},Es=class extends z{constructor({body:t,error:r,url:o}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${za(o)}`,`Request body: ${Be(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r.code,this.data=r.data,this.url=o;}},rp=class extends z{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${za(r)}`,`Request body: ${Be(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.url=r;}};});var VH,Br,Cr,vu,wu,_u,Eu,ki,jn,Su,Iu,Au,Ss,Da,ku,ja,Ru,Tu,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,hg,np=F(()=>{Te();Ma();VH=-1,Br=class extends z{constructor(t,{code:r,docsPath:o,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:t,docsPath:o,metaMessages:n||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof Es?t.code:r??VH;}},Cr=class extends Br{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=r.data;}},vu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(vu,"code",{enumerable:true,configurable:true,writable:true,value:-32700});wu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(wu,"code",{enumerable:true,configurable:true,writable:true,value:-32600});_u=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`});}};Object.defineProperty(_u,"code",{enumerable:true,configurable:true,writable:true,value:-32601});Eu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
29
+ `,n+=x4(o.state)),o.stateDiff&&(n+=` stateDiff:
30
+ `,n+=x4(o.stateDiff)),n},` State Override:
31
+ `).slice(0,-1)}var ig,sg,r2=F(()=>{Te();ig=class extends z{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},sg=class extends z{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"});}};});function Ca(e){let t=Object.entries(e).map(([o,n])=>n===void 0||n===false?null:[o,n]).filter(Boolean),r=t.reduce((o,[n])=>Math.max(o,n.length),0);return t.map(([o,n])=>` ${`${o}:`.padEnd(r+1)} ${n}`).join(`
32
+ `)}var ag,cg,ug,fg,ws,bu,lg,dg,Mn=F(()=>{og();yu();Te();ag=class extends z{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},cg=class extends z{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Ca(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"});}},ug=class extends z{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"});}},fg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({chain:n&&`${n?.name} (id: ${n?.id})`,from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},ws=class extends z{constructor({blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i}){let s="Transaction";o&&i!==void 0&&(s=`Transaction at block time "${o}" at index "${i}"`),t&&i!==void 0&&(s=`Transaction at block hash "${t}" at index "${i}"`),r&&i!==void 0&&(s=`Transaction at block number "${r}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"});}},bu=class extends z{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"});}},lg=class extends z{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:true,configurable:true,writable:true,value:void 0}),this.receipt=t;}},dg=class extends z{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"});}};});function wr(e){if(e?.reason)return e.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let t=new Error("This operation was aborted");return t.name="AbortError",t}function ln(e){return typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError"}var w4,za,mo=F(()=>{w4=e=>e;za=e=>{try{let t=new URL(e);return !t.username&&!t.password?e:(t.username="",t.password="",t.toString())}catch{return e}};});var _s,xu,La,pg,mg,Ho,Ai=F(()=>{fn();Y0();X6();xi();g4();xs();og();yu();Et();Te();r2();Mn();mo();_s=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g,stateOverride:h}){let v=r?qe(r):void 0,E=Ca({from:v?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});h&&(E+=`
33
+ ${v4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",E].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},xu=class extends z{constructor(t,{abi:r,args:o,contractAddress:n,docsPath:i,functionName:s,sender:a}){let c=un({abi:r,args:o,name:s}),u=c?Q6({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=Ca({address:n&&w4(n),function:f,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"args",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"sender",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abi=r,this.args=o,this.cause=t,this.contractAddress=n,this.functionName=s,this.sender=a;}},La=class extends z{constructor({abi:t,data:r,functionName:o,message:n,cause:i}){let s,a,c,u;if(r&&r!=="0x")try{a=eg({abi:t,data:r,cause:i});let{abiItem:d,errorName:g,args:h}=a;if(g==="Error")u=h[0];else if(g==="Panic"){let[v]=h;u=u4[v];}else {let v=d?nr(d,{includeName:!0}):void 0,E=d&&h?Q6({abiItem:d,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[v?`Error: ${v}`:"",E&&E!=="()"?` ${[...Array(g?.length??0).keys()].map(()=>" ").join("")}${E}`:""];}}catch(d){s=d;}else n&&(u=n);let f;s instanceof cu&&(f=s.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
34
+ `):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=f;}},pg=class extends z{constructor({functionName:t,cause:r}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r});}},mg=class extends z{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"});}},Ho=class extends z{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:3}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t;}};});var Dn,Ua,Es,rp,Ma=F(()=>{Pr();Te();mo();Dn=class extends z{constructor({body:t,cause:r,details:o,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:r,details:o,metaMessages:[i&&`Status: ${i}`,`URL: ${za(s)}`,t&&`Request body: ${Be(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=n,this.status=i,this.url=s;}},Ua=class extends z{constructor({maxSize:t,size:r}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${t} bytes`,`Received: ${r} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t,this.size=r;}},Es=class extends z{constructor({body:t,error:r,url:o}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${za(o)}`,`Request body: ${Be(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r.code,this.data=r.data,this.url=o;}},rp=class extends z{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${za(r)}`,`Request body: ${Be(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.url=r;}};});var KH,Br,Cr,vu,wu,_u,Eu,ki,jn,Su,Iu,Au,Ss,Da,ku,ja,Ru,Tu,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,hg,np=F(()=>{Te();Ma();KH=-1,Br=class extends z{constructor(t,{code:r,docsPath:o,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:t,docsPath:o,metaMessages:n||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof Es?t.code:r??KH;}},Cr=class extends Br{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=r.data;}},vu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(vu,"code",{enumerable:true,configurable:true,writable:true,value:-32700});wu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(wu,"code",{enumerable:true,configurable:true,writable:true,value:-32600});_u=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`});}};Object.defineProperty(_u,"code",{enumerable:true,configurable:true,writable:true,value:-32601});Eu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
35
35
  `)});}};Object.defineProperty(Eu,"code",{enumerable:true,configurable:true,writable:true,value:-32602});ki=class e extends Br{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(ki,"code",{enumerable:true,configurable:true,writable:true,value:-32603});jn=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
36
36
  `)});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});Su=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty(Su,"code",{enumerable:true,configurable:true,writable:true,value:-32001});Iu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(Iu,"code",{enumerable:true,configurable:true,writable:true,value:-32002});Au=class e extends Br{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Au,"code",{enumerable:true,configurable:true,writable:true,value:-32003});Ss=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`});}};Object.defineProperty(Ss,"code",{enumerable:true,configurable:true,writable:true,value:-32004});Da=class e extends Br{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Da,"code",{enumerable:true,configurable:true,writable:true,value:-32005});ku=class e extends Br{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(ku,"code",{enumerable:true,configurable:true,writable:true,value:-32006});ja=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(ja,"code",{enumerable:true,configurable:true,writable:true,value:4001});Ru=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Ru,"code",{enumerable:true,configurable:true,writable:true,value:4100});Tu=class e extends Cr{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`});}};Object.defineProperty(Tu,"code",{enumerable:true,configurable:true,writable:true,value:4200});$u=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty($u,"code",{enumerable:true,configurable:true,writable:true,value:4900});Ou=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(Ou,"code",{enumerable:true,configurable:true,writable:true,value:4901});Nu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(Nu,"code",{enumerable:true,configurable:true,writable:true,value:4902});Pu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(Pu,"code",{enumerable:true,configurable:true,writable:true,value:5700});Bu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Bu,"code",{enumerable:true,configurable:true,writable:true,value:5710});Cu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(Cu,"code",{enumerable:true,configurable:true,writable:true,value:5720});zu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(zu,"code",{enumerable:true,configurable:true,writable:true,value:5730});Lu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Lu,"code",{enumerable:true,configurable:true,writable:true,value:5740});Uu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Uu,"code",{enumerable:true,configurable:true,writable:true,value:5750});Mu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Mu,"code",{enumerable:true,configurable:true,writable:true,value:5760});Du=class e extends Cr{constructor(t){super(t,{code:e.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."});}};Object.defineProperty(Du,"code",{enumerable:true,configurable:true,writable:true,value:7e3});hg=class extends Br{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};});var yo,Fn,ju,Fu,Hu,Vu,Zu,Gu,qu,Wu,Vo,Hn,Ri=F(()=>{yu();Te();yo=class extends z{constructor({cause:t,message:r}={}){let o=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"});}};Object.defineProperty(yo,"code",{enumerable:true,configurable:true,writable:true,value:3});Object.defineProperty(yo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/execution reverted|gas required exceeds allowance/});Fn=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"});}};Object.defineProperty(Fn,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});ju=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"});}};Object.defineProperty(ju,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});Fu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"});}};Object.defineProperty(Fu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too high/});Hu=class extends z{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
37
37
  `),{cause:t,name:"NonceTooLowError"});}};Object.defineProperty(Hu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too low|transaction already imported|already known/});Vu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"});}};Object.defineProperty(Vu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce has max value/});Zu=class extends z{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
38
38
  `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(Zu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});Gu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(Gu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});qu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(qu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});Wu=class extends z{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(Wu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});Vo=class extends z{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${or(o)} gwei`:""}).`].join(`
39
- `),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(Vo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Hn=class extends z{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};});function Is(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof z?e.walk(n=>n?.code===yo.code):e;return o instanceof z?new yo({cause:e,message:o.details}):yo.nodeMessage.test(r)?new yo({cause:e,message:e.details}):Fn.nodeMessage.test(r)?new Fn({cause:e,maxFeePerGas:t?.maxFeePerGas}):ju.nodeMessage.test(r)?new ju({cause:e,maxFeePerGas:t?.maxFeePerGas}):Fu.nodeMessage.test(r)?new Fu({cause:e,nonce:t?.nonce}):Hu.nodeMessage.test(r)?new Hu({cause:e,nonce:t?.nonce}):Vu.nodeMessage.test(r)?new Vu({cause:e,nonce:t?.nonce}):Zu.nodeMessage.test(r)?new Zu({cause:e}):Gu.nodeMessage.test(r)?new Gu({cause:e,gas:t?.gas}):qu.nodeMessage.test(r)?new qu({cause:e,gas:t?.gas}):Wu.nodeMessage.test(r)?new Wu({cause:e}):Vo.nodeMessage.test(r)?new Vo({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Hn({cause:e})}var ip=F(()=>{Te();Ri();});function As(e,{format:t}){if(!t)return {};let r={};function o(i){let s=Object.keys(i);for(let a of s)a in e&&(r[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&o(i[a]);}let n=t(e||{});return o(n),r}var sp=F(()=>{});function Ku(e,t){return ({exclude:r,format:o})=>({exclude:r,format:(n,i)=>{let s=t(n,i);if(r)for(let a of r)delete s[a];return {...s,...o(n,i)}},type:e})}var bg=F(()=>{});function Zo(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=KH(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(o=>Ue(o)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=J(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=J(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=J(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=J(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=J(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=J(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=WH[e.type]),typeof e.value<"u"&&(r.value=J(e.value)),r}function KH(e){return e.map(t=>({address:t.address,r:t.r?J(BigInt(t.r)):t.r,s:t.s?J(BigInt(t.s)):t.s,chainId:J(t.chainId),nonce:J(t.nonce),...typeof t.yParity<"u"?{yParity:J(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:J(t.v)}:{}}))}var WH,Ju=F(()=>{Re();WH={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function R4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Gd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Gd({size:o.length,targetSize:66,type:"hex"});return t[r]=o,t},{})}function JH(e){let{balance:t,nonce:r,state:o,stateDiff:n,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=J(t)),r!==void 0&&(s.nonce=J(r)),o!==void 0&&(s.state=R4(o)),n!==void 0){if(s.state)throw new sg;s.stateDiff=R4(n);}return s}function Yu(e){if(!e)return;let t={};for(let{address:r,...o}of e){if(!Me(r,{strict:false}))throw new nt({address:r});if(t[r])throw new ig({address:r});t[r]=JH(o);}return t}var xg=F(()=>{Lo();H0();e2();En();Re();});var Xu,t2=F(()=>{Xu=2n**256n-1n;});function Vn(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:o,to:n}=e,i=t?qe(t):void 0;if(i&&!Me(i.address))throw new nt({address:i.address});if(n&&!Me(n))throw new nt({address:n});if(r&&r>Xu)throw new Fn({maxFeePerGas:r});if(o&&r&&o>r)throw new Vo({maxFeePerGas:r,maxPriorityFeePerGas:o})}var Fa=F(()=>{fn();t2();Lo();Ri();En();});function Sn(e){let{blockHash:t,blockNumber:r,blockTag:o,requireCanonical:n}=e;if(n!==void 0&&!t)throw new z("`requireCanonical` can only be provided when `blockHash` is set.");return t?n?{blockHash:t,requireCanonical:n}:{blockHash:t}:typeof r=="bigint"?J(r):o??"latest"}var Va=F(()=>{Te();Re();});function zr(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});if(!Me(t,{strict:false}))throw new nt({address:t});return e.toLowerCase()===t.toLowerCase()}var Ts=F(()=>{Lo();En();});function Lr(e){let{abi:t,args:r,functionName:o,data:n}=e,i=t[0];if(o){let a=un({abi:t,args:r,name:o});if(!a)throw new fo(o,{docsPath:i2});i=a;}if(i.type!=="function")throw new fo(void 0,{docsPath:i2});if(!i.outputs)throw new uu(i.name,{docsPath:i2});let s=Ii(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var i2,$i=F(()=>{Et();tp();xs();i2="/docs/contract/decodeFunctionResult";});var D4,j4=F(()=>{D4="0.1.1";});function F4(){return D4}var H4=F(()=>{j4();});function V4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?V4(e.cause,t):t?null:e}var de,dn=F(()=>{H4();de=class e extends Error{static setStaticOptions(t){e.prototype.docsOrigin=t.docsOrigin,e.prototype.showVersion=t.showVersion,e.prototype.version=t.version;}constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??e.prototype.docsOrigin,s=`${i}${n??""}`,a=!!(r.version??e.prototype.showVersion),c=r.version??e.prototype.version,u=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n||a?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
40
- `);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return V4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${F4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function uf(e,t){if(Zn(e)>t)throw new Ng({givenSize:Zn(e),maxSize:t})}function s2(e){if(e>=Oi.zero&&e<=Oi.nine)return e-Oi.zero;if(e>=Oi.A&&e<=Oi.F)return e-(Oi.A-10);if(e>=Oi.a&&e<=Oi.f)return e-(Oi.a-10)}function q4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Pg({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function a2(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var Oi,W4=F(()=>{$s();Oi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function ff(e,t){if(lt(e)>t)throw new Bg({givenSize:lt(e),maxSize:t})}function K4(e,t){if(typeof t=="number"&&t>0&&t>lt(e)-1)throw new cp({offset:t,position:"start",size:lt(e)})}function J4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&lt(e)!==r-t)throw new cp({offset:r,position:"end",size:lt(e)})}function c2(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new Cg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function Y4(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var u2=F(()=>{lr();});function Os(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+oV:n,r)}var oV,up=F(()=>{oV="#__bigint";});function aV(e){if(!(e instanceof Uint8Array)){if(!e)throw new lf(e);if(typeof e!="object")throw new lf(e);if(!("BYTES_PER_ELEMENT"in e))throw new lf(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new lf(e)}}function Q4(e){return e instanceof Uint8Array?e:typeof e=="string"?df(e):cV(e)}function cV(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function df(e,t={}){let{size:r}=t,o=e;r&&(ff(e,r),o=qo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=s2(n.charCodeAt(c++)),f=s2(n.charCodeAt(c++));if(u===void 0||f===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|f;}return s}function e$(e,t={}){let{size:r}=t,o=sV.encode(e);return typeof r=="number"?(uf(o,r),uV(o,r)):o}function uV(e,t){return q4(e,{dir:"right",size:t})}function Zn(e){return e.length}function t$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function r$(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return d2(o,t)}function n$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(uf(o,r),o=l2(o)),o.length>1||o[0]>1)throw new f2(o);return !!o[0]}function Go(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return Lg(o,t)}function o$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(uf(o,r),o=fV(o)),iV.decode(o)}function l2(e){return a2(e,{dir:"left"})}function fV(e){return a2(e,{dir:"right"})}function i$(e){try{return aV(e),!0}catch{return false}}var iV,sV,f2,lf,Ng,Pg,$s=F(()=>{dn();lr();W4();u2();up();iV=new TextDecoder,sV=new TextEncoder;f2=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},lf=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},Ng=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},Pg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function pV(e,t={}){let{strict:r=false}=t;if(!e)throw new Ug(e);if(typeof e!="string")throw new Ug(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Mg(e);if(!e.startsWith("0x"))throw new Mg(e)}function ht(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function pf(e){return e instanceof Uint8Array?It(e):Array.isArray(e)?It(new Uint8Array(e)):e}function Dg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(ff(r,t.size),Ni(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=dV[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(ff(o,t.size),qo(o,t.size)):o}function Ve(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new fp({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?Ni(c,o):c}function mf(e,t={}){return It(lV.encode(e),t)}function Ni(e,t){return c2(e,{dir:"left",size:t})}function qo(e,t){return c2(e,{dir:"right",size:t})}function dt(e,t,r,o={}){let{strict:n}=o;K4(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&J4(i,t,r),i}function lt(e){return Math.ceil((e.length-2)/2)}function p2(e){return Y4(e,{dir:"left"})}function d2(e,t={}){let{signed:r}=t;t.size&&ff(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function Lg(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:d2(e,t))}function lp(e,t={}){let{strict:r=false}=t;try{return pV(e,{strict:r}),!0}catch{return false}}var lV,dV,fp,Ug,Mg,Bg,cp,Cg,lr=F(()=>{dn();u2();up();lV=new TextEncoder,dV=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fp=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},Ug=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},Mg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},Bg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},cp=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},Cg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function s$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var a$=F(()=>{lr();});function jg(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ve(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ve(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ve(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ve(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ve(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ve(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(s$)}}}var m2=F(()=>{lr();a$();});var bo,Fg,u$,Hg,f$,h2,g2,y2,b2,Gn,pn=F(()=>{bo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Fg=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],u$=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Hg=[...u$,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],f$=[...u$,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],h2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],g2=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],y2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],b2=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Gn=[{type:"event",name:"Approval",inputs:[{indexed:true,name:"owner",type:"address"},{indexed:true,name:"spender",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:true,name:"from",type:"address"},{indexed:true,name:"to",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];});var l$,d$=F(()=>{l$="0x82ad56cb";});var Vg,p$,m$,qa,dp=F(()=>{Vg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",p$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",m$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",qa="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Wa,pp,Ka,Zg=F(()=>{Te();Wa=class extends z{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},pp=class extends z{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Ka=class extends z{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function mp(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new $0({docsPath:x2});if(!("inputs"in n))throw new jd({docsPath:x2});if(!n.inputs||n.inputs.length===0)throw new jd({docsPath:x2});let i=qr(n.inputs,r);return st([o,i])}var x2,v2=F(()=>{Et();an();Si();x2="/docs/contract/encodeDeployData";});function qn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Wa({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Wa({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Ja=F(()=>{Zg();});function Gg(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new _s(o,{docsPath:t,...r})}var w2=F(()=>{Ai();Ri();ip();});function qg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var _2=F(()=>{});function hf({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let f=c();s();let d=f.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<f.length;h++){let{resolve:v}=f[h];v?.([g[h],g]);}}).catch(g=>{for(let h=0;h<f.length;h++){let{reject:v}=f[h];v?.(g);}});},s=()=>E2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>E2.get(t)||[],u=f=>E2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=qg();return r?.([...a(),f])&&i(),c().length>0?(u({args:f,resolve:g,reject:h}),d):(u({args:f,resolve:g,reject:h}),setTimeout(i,o),d)}}}var E2,Wg=F(()=>{_2();E2=new Map;});var Kg,Jg,Yg,h$=F(()=>{Pr();Te();mo();Kg=class extends z{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${za(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},Jg=class extends z{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${za(r)}`,`Response: ${Be(t)}`],name:"OffchainLookupResponseMalformedError"});}},Yg=class extends z{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function g$(e){let{abi:t,data:r}=e,o=cn(r,0,4),n=t.find(i=>i.type==="function"&&o===Do(nr(i)));if(!n)throw new L0(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?Ii(n.inputs,cn(r,4)):void 0}}var y$=F(()=>{Et();bs();du();tp();xi();});function I2(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,args:o,name:r});if(!c)throw new Fd(r,{docsPath:S2});n=c;}if(n.type!=="error")throw new Fd(void 0,{docsPath:S2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new B0(n.name,{docsPath:S2});a=qr(n.inputs,o);}return st([s,a])}var S2,b$=F(()=>{Et();an();du();Si();xi();xs();S2="/docs/contract/encodeErrorResult";});function x$(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=un({abi:t,name:r});if(!s)throw new fo(r,{docsPath:A2});n=s;}if(n.type!=="function")throw new fo(void 0,{docsPath:A2});if(!n.outputs)throw new uu(n.name,{docsPath:A2});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new fu(o)})();return qr(n.outputs,i)}var A2,v$=F(()=>{Et();Si();xs();A2="/docs/contract/encodeFunctionResult";});async function k2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=g$({abi:Fg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(Pi)?await k2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=hV(c);}})),x$({abi:Fg,functionName:"query",result:[n,i]})}function hV(e){return e.name==="HttpRequestError"&&e.status?I2({abi:Fg,errorName:"HttpError",args:[e.status,e.shortMessage]}):I2({abi:[J0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var Pi,hp=F(()=>{pn();Y0();y$();b$();v$();Pi="x-batch-gateway:true";});var E$={};Er(E$,{ccipRequest:()=>_$,offchainLookup:()=>yV,offchainLookupAbiItem:()=>w$,offchainLookupSignature:()=>gV});async function yV(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=eg({data:o,abi:[w$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:_$;try{if(!zr(i,a))throw new Yg({sender:a,to:i});let v=c.includes(Pi)?await k2({data:u,ccipRequest:R=>h({...R,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:E}=await mn(e,{blockNumber:t,blockTag:r,data:Mo([f,qr([{type:"bytes"},{type:"bytes"}],[v,d])]),requestOptions:n,to:i});return E}catch(v){throw n?.signal?.aborted?wr(n.signal):ln(v)?v:new Kg({callbackSelector:f,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function _$({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw wr(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(f.headers.get("Content-Type")?.startsWith("application/json")?d=(await f.json()).data:d=await f.text(),!f.ok){n=new Dn({body:c,details:d?.error?Be(d.error):f.statusText,headers:f.headers,status:f.status,url:s});continue}if(!St(d)){n=new Jg({result:d,url:s});continue}return d}catch(f){if(t?.signal?.aborted)throw wr(t.signal);if(ln(f))throw f;n=new Dn({body:c,details:f.message,url:s});}}throw n}var gV,w$,S$=F(()=>{Ns();h$();Ma();mo();J6();Si();Ts();an();uo();hp();Pr();gV="0x556f1830",w$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function mn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:d,code:g,data:h,factory:v,factoryData:E,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,requestOptions:L,to:C,value:D,stateOverride:q,...H}=t,Z=r?qe(r):void 0;if(g&&(v||E))throw new z("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&C)throw new z("Cannot provide both `code` & `to` as parameters.");let re=g&&h,S=v&&E&&C&&h,l=re||S,m=re?k$({code:g,data:h}):S?EV({data:h,factory:v,factoryData:E,to:C}):h;try{Vn(t);let y=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),b=d?jg(d):void 0,x=Yu(q),_=e.chain?.formatters?.transactionRequest?.format,w=(_||Zo)({...As(H,{format:_}),accessList:u,account:Z,authorizationList:o,blobs:f,data:m,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,to:l?void 0:C,value:D},"call");if(n&&bV({request:w})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},K=A$(e,{blockNumber:s,deployless:G});if(!K||!_V(x,K))return await wV(e,{...w,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:K,requestOptions:L,requireCanonical:c,rpcStateOverride:x})}catch(G){if(!(G instanceof pp)&&!(G instanceof Wa))throw G}let p=(()=>{let G=[w,y];return x&&b?[...G,x,b]:x?[...G,x]:b?[...G,{},b]:G})(),A=await e.request({method:"eth_call",params:p},L);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(L?.signal?.aborted)throw wr(L.signal);if(ln(y))throw y;let b=SV(y),{offchainLookup:x,offchainLookupSignature:_}=await Promise.resolve().then(()=>(S$(),E$));if(e.ccipRead!==false&&b?.slice(0,10)===_&&C)return {data:await x(e,{data:b,requestOptions:L,to:C})};throw l&&b?.slice(0,10)==="0x101bb98d"?new mg({factory:v}):Gg(y,{...t,account:Z,chain:e.chain})}}function bV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(l$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function vV(e){if(!e)return "default";let t=I$.get(e);if(t!==void 0)return t;let r=xV++;return I$.set(e,r),r}async function wV(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:d,rpcStateOverride:g,to:h}=t,v=f!==void 0?f:A$(e,{blockNumber:s,deployless:o}),E=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),R=typeof E=="string"?E:JSON.stringify(E),$=g?`.${JSON.stringify(g)}`:"",{schedule:N}=hf({id:`${e.uid}.${R}.${vV(d)}${$}`,wait:n,shouldSplitBatch(P){return P.reduce((C,{data:D})=>C+(D.length-2),0)>r*2},fn:async P=>{let L=P.map(H=>({allowFailure:true,callData:H.data,target:H.to})),C=ft({abi:bo,args:[L],functionName:"aggregate3"}),D={...v===null?{data:k$({code:qa,data:C})}:{to:v,data:C}},q=await e.request({method:"eth_call",params:g?[D,E,g]:[D,E]},d);return Lr({abi:bo,args:[L],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:O,success:I}]=await N({data:u,to:h});if(!I)throw new Ho({data:O});return O==="0x"?{data:void 0}:{data:O}}function A$(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return qn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new pp}function _V(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function k$(e){let{code:t,data:r}=e;return mp({abi:ps(["constructor(bytes, bytes)"]),bytecode:Vg,args:[t,r]})}function EV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return mp({abi:ps(["constructor(address, bytes, address, bytes)"]),bytecode:p$,args:[n,t,r,o]})}function SV(e){if(!(e instanceof z))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var xV,I$,Ns=F(()=>{su();m2();fn();pn();d$();dp();Te();Zg();Ai();mo();$i();v2();Un();Ts();Va();Ja();w2();sp();Ju();Wg();xg();Fa();xV=0,I$=new WeakMap;});var pe={};Er(pe,{$brand:()=>zp,$input:()=>E1,$output:()=>_1,NEVER:()=>sb,TimePrecision:()=>A1,ZodAny:()=>y5,ZodArray:()=>w5,ZodBase64:()=>Hv,ZodBase64URL:()=>Vv,ZodBigInt:()=>xl,ZodBigIntFormat:()=>qv,ZodBoolean:()=>bl,ZodCIDRv4:()=>jv,ZodCIDRv6:()=>Fv,ZodCUID:()=>Bv,ZodCUID2:()=>Cv,ZodCatch:()=>D5,ZodCodec:()=>nw,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>gl,ZodDate:()=>jm,ZodDefault:()=>B5,ZodDiscriminatedUnion:()=>_5,ZodE164:()=>Zv,ZodEmail:()=>Ov,ZodEmoji:()=>Nv,ZodEnum:()=>ml,ZodError:()=>T3,ZodFile:()=>O5,ZodFirstPartyTypeKind:()=>ow,ZodFunction:()=>K5,ZodGUID:()=>zm,ZodIPv4:()=>Mv,ZodIPv6:()=>Dv,ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,ZodIntersection:()=>E5,ZodIssueCode:()=>DB,ZodJWT:()=>Gv,ZodKSUID:()=>Uv,ZodLazy:()=>G5,ZodLiteral:()=>$5,ZodMap:()=>R5,ZodNaN:()=>F5,ZodNanoID:()=>Pv,ZodNever:()=>x5,ZodNonOptional:()=>tw,ZodNull:()=>h5,ZodNullable:()=>P5,ZodNumber:()=>yl,ZodNumberFormat:()=>xc,ZodObject:()=>Hm,ZodOptional:()=>ew,ZodPipe:()=>rw,ZodPrefault:()=>z5,ZodPromise:()=>W5,ZodReadonly:()=>H5,ZodRealError:()=>Yr,ZodRecord:()=>Yv,ZodSet:()=>T5,ZodString:()=>hl,ZodStringFormat:()=>et,ZodSuccess:()=>M5,ZodSymbol:()=>p5,ZodTemplateLiteral:()=>Z5,ZodTransform:()=>N5,ZodTuple:()=>I5,ZodType:()=>Ae,ZodULID:()=>zv,ZodURL:()=>Dm,ZodUUID:()=>ei,ZodUndefined:()=>m5,ZodUnion:()=>Kv,ZodUnknown:()=>b5,ZodVoid:()=>v5,ZodXID:()=>Lv,_ZodString:()=>$v,_default:()=>C5,_function:()=>PB,any:()=>pB,array:()=>Fm,base64:()=>J3,base64url:()=>Y3,bigint:()=>cB,boolean:()=>d5,catch:()=>j5,check:()=>BB,cidrv4:()=>W3,cidrv6:()=>K3,clone:()=>Mr,codec:()=>$B,coerce:()=>iw,config:()=>wt,core:()=>Qo,cuid:()=>j3,cuid2:()=>F3,custom:()=>CB,date:()=>hB,decode:()=>wv,decodeAsync:()=>Ev,discriminatedUnion:()=>vB,e164:()=>X3,email:()=>O3,emoji:()=>M3,encode:()=>vv,encodeAsync:()=>_v,endsWith:()=>al,enum:()=>Xv,file:()=>AB,flattenError:()=>Hf,float32:()=>oB,float64:()=>iB,formatError:()=>Vf,function:()=>PB,getErrorMap:()=>FB,globalRegistry:()=>vo,gt:()=>Yo,gte:()=>Jr,guid:()=>N3,hash:()=>nB,hex:()=>rB,hostname:()=>tB,httpUrl:()=>U3,includes:()=>il,instanceof:()=>zB,int:()=>Tv,int32:()=>sB,int64:()=>uB,intersection:()=>S5,ipv4:()=>G3,ipv6:()=>q3,iso:()=>Cm,json:()=>UB,jwt:()=>Q3,keyof:()=>gB,ksuid:()=>Z3,lazy:()=>q5,length:()=>gc,literal:()=>IB,locales:()=>Xf,looseObject:()=>xB,lowercase:()=>nl,lt:()=>Jo,lte:()=>kn,map:()=>_B,maxLength:()=>hc,maxSize:()=>mc,mime:()=>cl,minLength:()=>Vi,minSize:()=>Vs,multipleOf:()=>Hs,nan:()=>TB,nanoid:()=>D3,nativeEnum:()=>SB,negative:()=>tv,never:()=>Wv,nonnegative:()=>nv,nonoptional:()=>U5,nonpositive:()=>rv,normalize:()=>ul,null:()=>g5,nullable:()=>Um,nullish:()=>kB,number:()=>l5,object:()=>yB,optional:()=>Lm,overwrite:()=>Xo,parse:()=>gv,parseAsync:()=>yv,partialRecord:()=>wB,pipe:()=>Mm,positive:()=>ev,prefault:()=>L5,preprocess:()=>MB,prettifyError:()=>yb,promise:()=>NB,property:()=>ov,readonly:()=>V5,record:()=>k5,refine:()=>J5,regex:()=>rl,regexes:()=>An,registry:()=>fm,safeDecode:()=>Iv,safeDecodeAsync:()=>kv,safeEncode:()=>Sv,safeEncodeAsync:()=>Av,safeParse:()=>bv,safeParseAsync:()=>xv,set:()=>EB,setErrorMap:()=>jB,size:()=>tl,startsWith:()=>sl,strictObject:()=>bB,string:()=>Rv,stringFormat:()=>eB,stringbool:()=>LB,success:()=>RB,superRefine:()=>Y5,symbol:()=>lB,templateLiteral:()=>OB,toJSONSchema:()=>lv,toLowerCase:()=>ll,toUpperCase:()=>dl,transform:()=>Qv,treeifyError:()=>gb,trim:()=>fl,tuple:()=>A5,uint32:()=>aB,uint64:()=>fB,ulid:()=>H3,undefined:()=>dB,union:()=>Jv,unknown:()=>bc,uppercase:()=>ol,url:()=>L3,util:()=>te,uuid:()=>P3,uuidv4:()=>B3,uuidv6:()=>C3,uuidv7:()=>z3,void:()=>mB,xid:()=>V3});var Qo={};Er(Qo,{$ZodAny:()=>Zx,$ZodArray:()=>Jx,$ZodAsyncError:()=>Kn,$ZodBase64:()=>Cx,$ZodBase64URL:()=>zx,$ZodBigInt:()=>om,$ZodBigIntFormat:()=>jx,$ZodBoolean:()=>Wf,$ZodCIDRv4:()=>Nx,$ZodCIDRv6:()=>Px,$ZodCUID:()=>wx,$ZodCUID2:()=>_x,$ZodCatch:()=>p1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>Yb,$ZodCheckEndsWith:()=>ux,$ZodCheckGreaterThan:()=>Yp,$ZodCheckIncludes:()=>ax,$ZodCheckLengthEquals:()=>nx,$ZodCheckLessThan:()=>Jp,$ZodCheckLowerCase:()=>ix,$ZodCheckMaxLength:()=>tx,$ZodCheckMaxSize:()=>Xb,$ZodCheckMimeType:()=>lx,$ZodCheckMinLength:()=>rx,$ZodCheckMinSize:()=>Qb,$ZodCheckMultipleOf:()=>Kb,$ZodCheckNumberFormat:()=>Jb,$ZodCheckOverwrite:()=>dx,$ZodCheckProperty:()=>fx,$ZodCheckRegex:()=>ox,$ZodCheckSizeEquals:()=>ex,$ZodCheckStartsWith:()=>cx,$ZodCheckStringFormat:()=>dc,$ZodCheckUpperCase:()=>sx,$ZodCodec:()=>Kf,$ZodCustom:()=>w1,$ZodCustomStringFormat:()=>Mx,$ZodDate:()=>Kx,$ZodDefault:()=>u1,$ZodDiscriminatedUnion:()=>Xx,$ZodE164:()=>Lx,$ZodEmail:()=>yx,$ZodEmoji:()=>xx,$ZodEncodeError:()=>Ui,$ZodEnum:()=>n1,$ZodError:()=>Ff,$ZodFile:()=>i1,$ZodFunction:()=>b1,$ZodGUID:()=>hx,$ZodIPv4:()=>$x,$ZodIPv6:()=>Ox,$ZodISODate:()=>kx,$ZodISODateTime:()=>Ax,$ZodISODuration:()=>Tx,$ZodISOTime:()=>Rx,$ZodIntersection:()=>Qx,$ZodJWT:()=>Ux,$ZodKSUID:()=>Ix,$ZodLazy:()=>v1,$ZodLiteral:()=>o1,$ZodMap:()=>t1,$ZodNaN:()=>m1,$ZodNanoID:()=>vx,$ZodNever:()=>qx,$ZodNonOptional:()=>l1,$ZodNull:()=>Vx,$ZodNullable:()=>c1,$ZodNumber:()=>nm,$ZodNumberFormat:()=>Dx,$ZodObject:()=>pS,$ZodObjectJIT:()=>Yx,$ZodOptional:()=>a1,$ZodPipe:()=>h1,$ZodPrefault:()=>f1,$ZodPromise:()=>x1,$ZodReadonly:()=>g1,$ZodRealError:()=>Kr,$ZodRecord:()=>e1,$ZodRegistry:()=>pc,$ZodSet:()=>r1,$ZodString:()=>Fs,$ZodStringFormat:()=>Ye,$ZodSuccess:()=>d1,$ZodSymbol:()=>Fx,$ZodTemplateLiteral:()=>y1,$ZodTransform:()=>s1,$ZodTuple:()=>sm,$ZodType:()=>we,$ZodULID:()=>Ex,$ZodURL:()=>bx,$ZodUUID:()=>gx,$ZodUndefined:()=>Hx,$ZodUnion:()=>im,$ZodUnknown:()=>Gx,$ZodVoid:()=>Wx,$ZodXID:()=>Sx,$brand:()=>zp,$constructor:()=>B,$input:()=>E1,$output:()=>_1,Doc:()=>qf,JSONSchema:()=>c5,JSONSchemaGenerator:()=>pl,NEVER:()=>sb,TimePrecision:()=>A1,_any:()=>q1,_array:()=>iv,_base64:()=>km,_base64url:()=>Rm,_bigint:()=>D1,_boolean:()=>U1,_catch:()=>_3,_check:()=>a5,_cidrv4:()=>Im,_cidrv6:()=>Am,_coercedBigint:()=>j1,_coercedBoolean:()=>M1,_coercedDate:()=>X1,_coercedNumber:()=>N1,_coercedString:()=>I1,_cuid:()=>bm,_cuid2:()=>xm,_custom:()=>av,_date:()=>Y1,_decode:()=>Fp,_decodeAsync:()=>Vp,_default:()=>x3,_discriminatedUnion:()=>a3,_e164:()=>Tm,_email:()=>lm,_emoji:()=>gm,_encode:()=>jp,_encodeAsync:()=>Hp,_endsWith:()=>al,_enum:()=>p3,_file:()=>sv,_float32:()=>B1,_float64:()=>C1,_gt:()=>Yo,_gte:()=>Jr,_guid:()=>Qf,_includes:()=>il,_int:()=>P1,_int32:()=>z1,_int64:()=>F1,_intersection:()=>c3,_ipv4:()=>Em,_ipv6:()=>Sm,_isoDate:()=>R1,_isoDateTime:()=>k1,_isoDuration:()=>$1,_isoTime:()=>T1,_jwt:()=>$m,_ksuid:()=>_m,_lazy:()=>A3,_length:()=>gc,_literal:()=>h3,_lowercase:()=>nl,_lt:()=>Jo,_lte:()=>kn,_map:()=>l3,_max:()=>kn,_maxLength:()=>hc,_maxSize:()=>mc,_mime:()=>cl,_min:()=>Jr,_minLength:()=>Vi,_minSize:()=>Vs,_multipleOf:()=>Hs,_nan:()=>Q1,_nanoid:()=>ym,_nativeEnum:()=>m3,_negative:()=>tv,_never:()=>K1,_nonnegative:()=>nv,_nonoptional:()=>v3,_nonpositive:()=>rv,_normalize:()=>ul,_null:()=>G1,_nullable:()=>b3,_number:()=>O1,_optional:()=>y3,_overwrite:()=>Xo,_parse:()=>cc,_parseAsync:()=>uc,_pipe:()=>E3,_positive:()=>ev,_promise:()=>k3,_property:()=>ov,_readonly:()=>S3,_record:()=>f3,_refine:()=>cv,_regex:()=>rl,_safeDecode:()=>Gp,_safeDecodeAsync:()=>Wp,_safeEncode:()=>Zp,_safeEncodeAsync:()=>qp,_safeParse:()=>fc,_safeParseAsync:()=>lc,_set:()=>d3,_size:()=>tl,_startsWith:()=>sl,_string:()=>S1,_stringFormat:()=>yc,_stringbool:()=>fv,_success:()=>w3,_superRefine:()=>uv,_symbol:()=>V1,_templateLiteral:()=>I3,_toLowerCase:()=>ll,_toUpperCase:()=>dl,_transform:()=>g3,_trim:()=>fl,_tuple:()=>u3,_uint32:()=>L1,_uint64:()=>H1,_ulid:()=>vm,_undefined:()=>Z1,_union:()=>s3,_unknown:()=>W1,_uppercase:()=>ol,_url:()=>el,_uuid:()=>dm,_uuidv4:()=>pm,_uuidv6:()=>mm,_uuidv7:()=>hm,_void:()=>J1,_xid:()=>wm,clone:()=>Mr,config:()=>wt,decode:()=>RN,decodeAsync:()=>$N,encode:()=>kN,encodeAsync:()=>TN,flattenError:()=>Hf,formatError:()=>Vf,globalConfig:()=>Cf,globalRegistry:()=>vo,isValidBase64:()=>Bx,isValidBase64URL:()=>uS,isValidJWT:()=>fS,locales:()=>Xf,parse:()=>Mp,parseAsync:()=>Dp,prettifyError:()=>yb,regexes:()=>An,registry:()=>fm,safeDecode:()=>NN,safeDecodeAsync:()=>BN,safeEncode:()=>ON,safeEncodeAsync:()=>PN,safeParse:()=>bb,safeParseAsync:()=>xb,toDotPath:()=>GE,toJSONSchema:()=>lv,treeifyError:()=>gb,util:()=>te,version:()=>px});var sb=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let f of u._zod.deferred)f();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var zp=Symbol("zod_brand"),Kn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Ui=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},Cf={};function wt(e){return e&&Object.assign(Cf,e),Cf}var te={};Er(te,{BIGINT_FORMAT_RANGES:()=>hb,Class:()=>cb,NUMBER_FORMAT_RANGES:()=>mb,aborted:()=>Hi,allowsEval:()=>fb,assert:()=>iN,assertEqual:()=>tN,assertIs:()=>nN,assertNever:()=>oN,assertNotEqual:()=>rN,assignProp:()=>Di,base64ToUint8Array:()=>HE,base64urlToUint8Array:()=>_N,cached:()=>sc,captureStackTrace:()=>Up,cleanEnum:()=>wN,cleanRegex:()=>Uf,clone:()=>Mr,cloneDef:()=>aN,createTransparentProxy:()=>pN,defineLazy:()=>Oe,esc:()=>Lp,escapeRegex:()=>xo,extend:()=>gN,finalizeIssue:()=>gn,floatSafeRemainder:()=>ub,getElementAtPath:()=>cN,getEnumValues:()=>Lf,getLengthableOrigin:()=>jf,getParsedType:()=>dN,getSizableOrigin:()=>Df,hexToUint8Array:()=>SN,isObject:()=>Ds,isPlainObject:()=>Fi,issue:()=>ac,joinValues:()=>j,jsonStringifyReplacer:()=>ic,merge:()=>bN,mergeDefs:()=>ji,normalizeParams:()=>ee,nullish:()=>Mi,numKeys:()=>lN,objectClone:()=>sN,omit:()=>hN,optionalKeys:()=>pb,partial:()=>xN,pick:()=>mN,prefixIssues:()=>hn,primitiveTypes:()=>db,promiseAllObject:()=>uN,propertyKeyTypes:()=>Mf,randomString:()=>fN,required:()=>vN,safeExtend:()=>yN,shallowClone:()=>lb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>VE,uint8ArrayToBase64url:()=>EN,uint8ArrayToHex:()=>IN,unwrapMessage:()=>zf});function tN(e){return e}function rN(e){return e}function nN(e){}function oN(e){throw new Error}function iN(e){}function Lf(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function j(e,t="|"){return e.map(r=>X(r)).join(t)}function ic(e,t){return typeof t=="bigint"?t.toString():t}function sc(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Mi(e){return e==null}function Uf(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ub(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var FE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==FE)return o===void 0&&(o=FE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function sN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Di(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function ji(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function aN(e){return ji(e._zod.def)}function cN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function uN(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function fN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Lp(e){return JSON.stringify(e)}var Up="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ds(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var fb=sc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Fi(e){if(Ds(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Ds(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function lb(e){return Fi(e)?{...e}:Array.isArray(e)?[...e]:e}function lN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var dN=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Mf=new Set(["string","number","symbol"]),db=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function ee(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function pN(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var mb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function hN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function gN(e,t){if(!Fi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=ji(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Di(this,"shape",i),i},checks:[]});return Mr(e,n)}function yN(e,t){if(!Fi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return Di(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function bN(e,t){let r=ji(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Di(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function xN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function vN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function Hi(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function hn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function zf(e){return typeof e=="string"?e:e?.message}function gn(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=zf(e.inst?._zod.def?.error?.(e))??zf(t?.error?.(e))??zf(r.customError?.(e))??zf(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Df(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function jf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ac(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function wN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function HE(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function VE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _N(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return HE(t+r)}function EN(e){return VE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function SN(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function IN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var cb=class{constructor(...t){}};var ZE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,ic,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ff=B("$ZodError",ZE),Kr=B("$ZodError",ZE,{Parent:Error});function Hf(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Vf(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function gb(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let f=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(a=f.items)[g]??(a[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(c)),d++;}}};return o(e),r}function GE(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function yb(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${GE(o.path)}`);return t.join(`
41
- `)}var cc=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Kn;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Mp=cc(Kr),uc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Dp=uc(Kr),fc=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Kn;return i.issues.length?{success:false,error:new(e??Ff)(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},bb=fc(Kr),lc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},xb=lc(Kr),jp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return cc(e)(t,r,n)},kN=jp(Kr),Fp=e=>(t,r,o)=>cc(e)(t,r,o),RN=Fp(Kr),Hp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uc(e)(t,r,n)},TN=Hp(Kr),Vp=e=>async(t,r,o)=>uc(e)(t,r,o),$N=Vp(Kr),Zp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fc(e)(t,r,n)},ON=Zp(Kr),Gp=e=>(t,r,o)=>fc(e)(t,r,o),NN=Gp(Kr),qp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lc(e)(t,r,n)},PN=qp(Kr),Wp=e=>async(t,r,o)=>lc(e)(t,r,o),BN=Wp(Kr);var An={};Er(An,{base64:()=>Bb,base64url:()=>Kp,bigint:()=>jb,boolean:()=>Vb,browserEmail:()=>FN,cidrv4:()=>Nb,cidrv6:()=>Pb,cuid:()=>vb,cuid2:()=>wb,date:()=>Lb,datetime:()=>Mb,domain:()=>VN,duration:()=>Ab,e164:()=>zb,email:()=>Rb,emoji:()=>Tb,extendedDuration:()=>CN,guid:()=>kb,hex:()=>ZN,hostname:()=>Cb,html5Email:()=>MN,idnEmail:()=>jN,integer:()=>Fb,ipv4:()=>$b,ipv6:()=>Ob,ksuid:()=>Sb,lowercase:()=>qb,md5_base64:()=>qN,md5_base64url:()=>WN,md5_hex:()=>GN,nanoid:()=>Ib,null:()=>Zb,number:()=>Hb,rfc5322Email:()=>DN,sha1_base64:()=>JN,sha1_base64url:()=>YN,sha1_hex:()=>KN,sha256_base64:()=>QN,sha256_base64url:()=>eP,sha256_hex:()=>XN,sha384_base64:()=>rP,sha384_base64url:()=>nP,sha384_hex:()=>tP,sha512_base64:()=>iP,sha512_base64url:()=>sP,sha512_hex:()=>oP,string:()=>Db,time:()=>Ub,ulid:()=>_b,undefined:()=>Gb,unicodeEmail:()=>qE,uppercase:()=>Wb,uuid:()=>js,uuid4:()=>zN,uuid6:()=>LN,uuid7:()=>UN,xid:()=>Eb});var vb=/^[cC][^\s-]{8,}$/,wb=/^[0-9a-z]+$/,_b=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eb=/^[0-9a-vA-V]{20}$/,Sb=/^[A-Za-z0-9]{27}$/,Ib=/^[a-zA-Z0-9_-]{21}$/,Ab=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CN=/^[-+]?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)?)??$/,kb=/^([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})$/,js=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,zN=js(4),LN=js(6),UN=js(7),Rb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MN=/^[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])?)*$/,DN=/^(([^<>()\[\]\\.,;:\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,}))$/,qE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jN=qE,FN=/^[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])?)*$/,HN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Tb(){return new RegExp(HN,"u")}var $b=/^(?:(?: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])$/,Ob=/^(([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}|:))$/,Nb=/^((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])$/,Pb=/^(([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])$/,Bb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kp=/^[A-Za-z0-9_-]*$/,Cb=/^(?=.{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])?)*\.?$/,VN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,zb=/^\+(?:[0-9]){6,14}[0-9]$/,WE="(?:(?:\\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])))",Lb=new RegExp(`^${WE}$`);function KE(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ub(e){return new RegExp(`^${KE(e)}$`)}function Mb(e){let t=KE({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${WE}T(?:${o})$`)}var Db=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jb=/^-?\d+n?$/,Fb=/^-?\d+$/,Hb=/^-?\d+(?:\.\d+)?/,Vb=/^(?:true|false)$/i,Zb=/^null$/i;var Gb=/^undefined$/i;var qb=/^[^A-Z]*$/,Wb=/^[^a-z]*$/,ZN=/^[0-9a-fA-F]*$/;function Zf(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gf(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var GN=/^[0-9a-fA-F]{32}$/,qN=Zf(22,"=="),WN=Gf(22),KN=/^[0-9a-fA-F]{40}$/,JN=Zf(27,"="),YN=Gf(27),XN=/^[0-9a-fA-F]{64}$/,QN=Zf(43,"="),eP=Gf(43),tP=/^[0-9a-fA-F]{96}$/,rP=Zf(64,""),nP=Gf(64),oP=/^[0-9a-fA-F]{128}$/,iP=Zf(86,"=="),sP=Gf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),YE={number:"number",bigint:"bigint",object:"date"},Jp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=YE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Yp=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=YE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Kb=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ub(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),Jb=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=mb[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Fb);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),Yb=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=hb[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),Xb=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Df(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),Qb=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Df(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ex=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Df(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),tx=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=jf(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),rx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=jf(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),nx=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=jf(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),dc=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),ox=B("$ZodCheckRegex",(e,t)=>{dc.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),ix=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qb),dc.init(e,t);}),sx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wb),dc.init(e,t);}),ax=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=xo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort});};}),cx=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${xo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),ux=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${xo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function JE(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues));}var fx=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>JE(n,r,t.property));JE(o,r,t.property);};}),lx=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),dx=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var qf=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
39
+ `),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(Vo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Hn=class extends z{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};});function Is(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof z?e.walk(n=>n?.code===yo.code):e;return o instanceof z?new yo({cause:e,message:o.details}):yo.nodeMessage.test(r)?new yo({cause:e,message:e.details}):Fn.nodeMessage.test(r)?new Fn({cause:e,maxFeePerGas:t?.maxFeePerGas}):ju.nodeMessage.test(r)?new ju({cause:e,maxFeePerGas:t?.maxFeePerGas}):Fu.nodeMessage.test(r)?new Fu({cause:e,nonce:t?.nonce}):Hu.nodeMessage.test(r)?new Hu({cause:e,nonce:t?.nonce}):Vu.nodeMessage.test(r)?new Vu({cause:e,nonce:t?.nonce}):Zu.nodeMessage.test(r)?new Zu({cause:e}):Gu.nodeMessage.test(r)?new Gu({cause:e,gas:t?.gas}):qu.nodeMessage.test(r)?new qu({cause:e,gas:t?.gas}):Wu.nodeMessage.test(r)?new Wu({cause:e}):Vo.nodeMessage.test(r)?new Vo({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Hn({cause:e})}var ip=F(()=>{Te();Ri();});function As(e,{format:t}){if(!t)return {};let r={};function o(i){let s=Object.keys(i);for(let a of s)a in e&&(r[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&o(i[a]);}let n=t(e||{});return o(n),r}var sp=F(()=>{});function Ku(e,t){return ({exclude:r,format:o})=>({exclude:r,format:(n,i)=>{let s=t(n,i);if(r)for(let a of r)delete s[a];return {...s,...o(n,i)}},type:e})}var bg=F(()=>{});function Zo(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=eV(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(o=>Ue(o)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=J(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=J(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=J(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=J(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=J(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=J(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=QH[e.type]),typeof e.value<"u"&&(r.value=J(e.value)),r}function eV(e){return e.map(t=>({address:t.address,r:t.r?J(BigInt(t.r)):t.r,s:t.s?J(BigInt(t.s)):t.s,chainId:J(t.chainId),nonce:J(t.nonce),...typeof t.yParity<"u"?{yParity:J(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:J(t.v)}:{}}))}var QH,Ju=F(()=>{Re();QH={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function T4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Gd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Gd({size:o.length,targetSize:66,type:"hex"});return t[r]=o,t},{})}function tV(e){let{balance:t,nonce:r,state:o,stateDiff:n,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=J(t)),r!==void 0&&(s.nonce=J(r)),o!==void 0&&(s.state=T4(o)),n!==void 0){if(s.state)throw new sg;s.stateDiff=T4(n);}return s}function Yu(e){if(!e)return;let t={};for(let{address:r,...o}of e){if(!Me(r,{strict:false}))throw new nt({address:r});if(t[r])throw new ig({address:r});t[r]=tV(o);}return t}var xg=F(()=>{Lo();H0();r2();En();Re();});var Xu,n2=F(()=>{Xu=2n**256n-1n;});function Vn(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:o,to:n}=e,i=t?qe(t):void 0;if(i&&!Me(i.address))throw new nt({address:i.address});if(n&&!Me(n))throw new nt({address:n});if(r&&r>Xu)throw new Fn({maxFeePerGas:r});if(o&&r&&o>r)throw new Vo({maxFeePerGas:r,maxPriorityFeePerGas:o})}var Fa=F(()=>{fn();n2();Lo();Ri();En();});function Sn(e){let{blockHash:t,blockNumber:r,blockTag:o,requireCanonical:n}=e;if(n!==void 0&&!t)throw new z("`requireCanonical` can only be provided when `blockHash` is set.");return t?n?{blockHash:t,requireCanonical:n}:{blockHash:t}:typeof r=="bigint"?J(r):o??"latest"}var Va=F(()=>{Te();Re();});function zr(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});if(!Me(t,{strict:false}))throw new nt({address:t});return e.toLowerCase()===t.toLowerCase()}var Ts=F(()=>{Lo();En();});function Lr(e){let{abi:t,args:r,functionName:o,data:n}=e,i=t[0];if(o){let a=un({abi:t,args:r,name:o});if(!a)throw new fo(o,{docsPath:a2});i=a;}if(i.type!=="function")throw new fo(void 0,{docsPath:a2});if(!i.outputs)throw new uu(i.name,{docsPath:a2});let s=Ii(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var a2,$i=F(()=>{Et();tp();xs();a2="/docs/contract/decodeFunctionResult";});var j4,F4=F(()=>{j4="0.1.1";});function H4(){return j4}var V4=F(()=>{F4();});function Z4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?Z4(e.cause,t):t?null:e}var de,dn=F(()=>{V4();de=class e extends Error{static setStaticOptions(t){e.prototype.docsOrigin=t.docsOrigin,e.prototype.showVersion=t.showVersion,e.prototype.version=t.version;}constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??e.prototype.docsOrigin,s=`${i}${n??""}`,a=!!(r.version??e.prototype.showVersion),c=r.version??e.prototype.version,u=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n||a?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
40
+ `);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return Z4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${H4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function uf(e,t){if(Zn(e)>t)throw new Ng({givenSize:Zn(e),maxSize:t})}function c2(e){if(e>=Oi.zero&&e<=Oi.nine)return e-Oi.zero;if(e>=Oi.A&&e<=Oi.F)return e-(Oi.A-10);if(e>=Oi.a&&e<=Oi.f)return e-(Oi.a-10)}function W4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Pg({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function u2(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var Oi,K4=F(()=>{$s();Oi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function ff(e,t){if(lt(e)>t)throw new Bg({givenSize:lt(e),maxSize:t})}function J4(e,t){if(typeof t=="number"&&t>0&&t>lt(e)-1)throw new cp({offset:t,position:"start",size:lt(e)})}function Y4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&lt(e)!==r-t)throw new cp({offset:r,position:"end",size:lt(e)})}function f2(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new Cg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function X4(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var l2=F(()=>{lr();});function Os(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+uV:n,r)}var uV,up=F(()=>{uV="#__bigint";});function dV(e){if(!(e instanceof Uint8Array)){if(!e)throw new lf(e);if(typeof e!="object")throw new lf(e);if(!("BYTES_PER_ELEMENT"in e))throw new lf(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new lf(e)}}function e$(e){return e instanceof Uint8Array?e:typeof e=="string"?df(e):pV(e)}function pV(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function df(e,t={}){let{size:r}=t,o=e;r&&(ff(e,r),o=qo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=c2(n.charCodeAt(c++)),f=c2(n.charCodeAt(c++));if(u===void 0||f===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|f;}return s}function t$(e,t={}){let{size:r}=t,o=lV.encode(e);return typeof r=="number"?(uf(o,r),mV(o,r)):o}function mV(e,t){return W4(e,{dir:"right",size:t})}function Zn(e){return e.length}function r$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function n$(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return m2(o,t)}function o$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(uf(o,r),o=p2(o)),o.length>1||o[0]>1)throw new d2(o);return !!o[0]}function Go(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return Lg(o,t)}function i$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(uf(o,r),o=hV(o)),fV.decode(o)}function p2(e){return u2(e,{dir:"left"})}function hV(e){return u2(e,{dir:"right"})}function s$(e){try{return dV(e),!0}catch{return false}}var fV,lV,d2,lf,Ng,Pg,$s=F(()=>{dn();lr();K4();l2();up();fV=new TextDecoder,lV=new TextEncoder;d2=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},lf=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},Ng=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},Pg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function bV(e,t={}){let{strict:r=false}=t;if(!e)throw new Ug(e);if(typeof e!="string")throw new Ug(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Mg(e);if(!e.startsWith("0x"))throw new Mg(e)}function ht(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function pf(e){return e instanceof Uint8Array?It(e):Array.isArray(e)?It(new Uint8Array(e)):e}function Dg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(ff(r,t.size),Ni(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=yV[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(ff(o,t.size),qo(o,t.size)):o}function Ve(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new fp({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?Ni(c,o):c}function mf(e,t={}){return It(gV.encode(e),t)}function Ni(e,t){return f2(e,{dir:"left",size:t})}function qo(e,t){return f2(e,{dir:"right",size:t})}function dt(e,t,r,o={}){let{strict:n}=o;J4(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&Y4(i,t,r),i}function lt(e){return Math.ceil((e.length-2)/2)}function h2(e){return X4(e,{dir:"left"})}function m2(e,t={}){let{signed:r}=t;t.size&&ff(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function Lg(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:m2(e,t))}function lp(e,t={}){let{strict:r=false}=t;try{return bV(e,{strict:r}),!0}catch{return false}}var gV,yV,fp,Ug,Mg,Bg,cp,Cg,lr=F(()=>{dn();l2();up();gV=new TextEncoder,yV=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fp=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},Ug=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},Mg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},Bg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},cp=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},Cg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function a$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var c$=F(()=>{lr();});function jg(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ve(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ve(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ve(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ve(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ve(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ve(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(a$)}}}var g2=F(()=>{lr();c$();});var bo,Fg,f$,Hg,l$,y2,b2,x2,v2,Gn,pn=F(()=>{bo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Fg=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],f$=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Hg=[...f$,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],l$=[...f$,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],y2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],b2=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],x2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],v2=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Gn=[{type:"event",name:"Approval",inputs:[{indexed:true,name:"owner",type:"address"},{indexed:true,name:"spender",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:true,name:"from",type:"address"},{indexed:true,name:"to",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];});var d$,p$=F(()=>{d$="0x82ad56cb";});var Vg,m$,h$,qa,dp=F(()=>{Vg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",m$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",h$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",qa="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Wa,pp,Ka,Zg=F(()=>{Te();Wa=class extends z{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},pp=class extends z{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Ka=class extends z{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function mp(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new $0({docsPath:w2});if(!("inputs"in n))throw new jd({docsPath:w2});if(!n.inputs||n.inputs.length===0)throw new jd({docsPath:w2});let i=qr(n.inputs,r);return st([o,i])}var w2,_2=F(()=>{Et();an();Si();w2="/docs/contract/encodeDeployData";});function qn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Wa({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Wa({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Ja=F(()=>{Zg();});function Gg(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new _s(o,{docsPath:t,...r})}var E2=F(()=>{Ai();Ri();ip();});function qg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var S2=F(()=>{});function hf({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let f=c();s();let d=f.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<f.length;h++){let{resolve:v}=f[h];v?.([g[h],g]);}}).catch(g=>{for(let h=0;h<f.length;h++){let{reject:v}=f[h];v?.(g);}});},s=()=>I2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>I2.get(t)||[],u=f=>I2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=qg();return r?.([...a(),f])&&i(),c().length>0?(u({args:f,resolve:g,reject:h}),d):(u({args:f,resolve:g,reject:h}),setTimeout(i,o),d)}}}var I2,Wg=F(()=>{S2();I2=new Map;});var Kg,Jg,Yg,g$=F(()=>{Pr();Te();mo();Kg=class extends z{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${za(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},Jg=class extends z{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${za(r)}`,`Response: ${Be(t)}`],name:"OffchainLookupResponseMalformedError"});}},Yg=class extends z{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function y$(e){let{abi:t,data:r}=e,o=cn(r,0,4),n=t.find(i=>i.type==="function"&&o===Do(nr(i)));if(!n)throw new L0(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?Ii(n.inputs,cn(r,4)):void 0}}var b$=F(()=>{Et();bs();du();tp();xi();});function k2(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,args:o,name:r});if(!c)throw new Fd(r,{docsPath:A2});n=c;}if(n.type!=="error")throw new Fd(void 0,{docsPath:A2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new B0(n.name,{docsPath:A2});a=qr(n.inputs,o);}return st([s,a])}var A2,x$=F(()=>{Et();an();du();Si();xi();xs();A2="/docs/contract/encodeErrorResult";});function v$(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=un({abi:t,name:r});if(!s)throw new fo(r,{docsPath:R2});n=s;}if(n.type!=="function")throw new fo(void 0,{docsPath:R2});if(!n.outputs)throw new uu(n.name,{docsPath:R2});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new fu(o)})();return qr(n.outputs,i)}var R2,w$=F(()=>{Et();Si();xs();R2="/docs/contract/encodeFunctionResult";});async function T2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=y$({abi:Fg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(Pi)?await T2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=vV(c);}})),v$({abi:Fg,functionName:"query",result:[n,i]})}function vV(e){return e.name==="HttpRequestError"&&e.status?k2({abi:Fg,errorName:"HttpError",args:[e.status,e.shortMessage]}):k2({abi:[J0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var Pi,hp=F(()=>{pn();Y0();b$();x$();w$();Pi="x-batch-gateway:true";});var S$={};Er(S$,{ccipRequest:()=>E$,offchainLookup:()=>_V,offchainLookupAbiItem:()=>_$,offchainLookupSignature:()=>wV});async function _V(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=eg({data:o,abi:[_$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:E$;try{if(!zr(i,a))throw new Yg({sender:a,to:i});let v=c.includes(Pi)?await T2({data:u,ccipRequest:R=>h({...R,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:E}=await mn(e,{blockNumber:t,blockTag:r,data:Mo([f,qr([{type:"bytes"},{type:"bytes"}],[v,d])]),requestOptions:n,to:i});return E}catch(v){throw n?.signal?.aborted?wr(n.signal):ln(v)?v:new Kg({callbackSelector:f,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function E$({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw wr(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(f.headers.get("Content-Type")?.startsWith("application/json")?d=(await f.json()).data:d=await f.text(),!f.ok){n=new Dn({body:c,details:d?.error?Be(d.error):f.statusText,headers:f.headers,status:f.status,url:s});continue}if(!St(d)){n=new Jg({result:d,url:s});continue}return d}catch(f){if(t?.signal?.aborted)throw wr(t.signal);if(ln(f))throw f;n=new Dn({body:c,details:f.message,url:s});}}throw n}var wV,_$,I$=F(()=>{Ns();g$();Ma();mo();X6();Si();Ts();an();uo();hp();Pr();wV="0x556f1830",_$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function mn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:d,code:g,data:h,factory:v,factoryData:E,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,requestOptions:L,to:C,value:D,stateOverride:q,...H}=t,Z=r?qe(r):void 0;if(g&&(v||E))throw new z("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&C)throw new z("Cannot provide both `code` & `to` as parameters.");let re=g&&h,S=v&&E&&C&&h,l=re||S,m=re?R$({code:g,data:h}):S?RV({data:h,factory:v,factoryData:E,to:C}):h;try{Vn(t);let y=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),b=d?jg(d):void 0,x=Yu(q),_=e.chain?.formatters?.transactionRequest?.format,w=(_||Zo)({...As(H,{format:_}),accessList:u,account:Z,authorizationList:o,blobs:f,data:m,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,to:l?void 0:C,value:D},"call");if(n&&EV({request:w})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},K=k$(e,{blockNumber:s,deployless:G});if(!K||!kV(x,K))return await AV(e,{...w,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:K,requestOptions:L,requireCanonical:c,rpcStateOverride:x})}catch(G){if(!(G instanceof pp)&&!(G instanceof Wa))throw G}let p=(()=>{let G=[w,y];return x&&b?[...G,x,b]:x?[...G,x]:b?[...G,{},b]:G})(),A=await e.request({method:"eth_call",params:p},L);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(L?.signal?.aborted)throw wr(L.signal);if(ln(y))throw y;let b=TV(y),{offchainLookup:x,offchainLookupSignature:_}=await Promise.resolve().then(()=>(I$(),S$));if(e.ccipRead!==false&&b?.slice(0,10)===_&&C)return {data:await x(e,{data:b,requestOptions:L,to:C})};throw l&&b?.slice(0,10)==="0x101bb98d"?new mg({factory:v}):Gg(y,{...t,account:Z,chain:e.chain})}}function EV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(d$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function IV(e){if(!e)return "default";let t=A$.get(e);if(t!==void 0)return t;let r=SV++;return A$.set(e,r),r}async function AV(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:d,rpcStateOverride:g,to:h}=t,v=f!==void 0?f:k$(e,{blockNumber:s,deployless:o}),E=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),R=typeof E=="string"?E:JSON.stringify(E),$=g?`.${JSON.stringify(g)}`:"",{schedule:N}=hf({id:`${e.uid}.${R}.${IV(d)}${$}`,wait:n,shouldSplitBatch(P){return P.reduce((C,{data:D})=>C+(D.length-2),0)>r*2},fn:async P=>{let L=P.map(H=>({allowFailure:true,callData:H.data,target:H.to})),C=ft({abi:bo,args:[L],functionName:"aggregate3"}),D={...v===null?{data:R$({code:qa,data:C})}:{to:v,data:C}},q=await e.request({method:"eth_call",params:g?[D,E,g]:[D,E]},d);return Lr({abi:bo,args:[L],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:O,success:I}]=await N({data:u,to:h});if(!I)throw new Ho({data:O});return O==="0x"?{data:void 0}:{data:O}}function k$(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return qn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new pp}function kV(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function R$(e){let{code:t,data:r}=e;return mp({abi:ps(["constructor(bytes, bytes)"]),bytecode:Vg,args:[t,r]})}function RV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return mp({abi:ps(["constructor(address, bytes, address, bytes)"]),bytecode:m$,args:[n,t,r,o]})}function TV(e){if(!(e instanceof z))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var SV,A$,Ns=F(()=>{su();g2();fn();pn();p$();dp();Te();Zg();Ai();mo();$i();_2();Un();Ts();Va();Ja();E2();sp();Ju();Wg();xg();Fa();SV=0,A$=new WeakMap;});var pe={};Er(pe,{$brand:()=>zp,$input:()=>E1,$output:()=>_1,NEVER:()=>sb,TimePrecision:()=>A1,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>Hv,ZodBase64URL:()=>Vv,ZodBigInt:()=>xl,ZodBigIntFormat:()=>qv,ZodBoolean:()=>bl,ZodCIDRv4:()=>jv,ZodCIDRv6:()=>Fv,ZodCUID:()=>Bv,ZodCUID2:()=>Cv,ZodCatch:()=>F5,ZodCodec:()=>nw,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>gl,ZodDate:()=>jm,ZodDefault:()=>z5,ZodDiscriminatedUnion:()=>S5,ZodE164:()=>Zv,ZodEmail:()=>Ov,ZodEmoji:()=>Nv,ZodEnum:()=>ml,ZodError:()=>P3,ZodFile:()=>P5,ZodFirstPartyTypeKind:()=>ow,ZodFunction:()=>Y5,ZodGUID:()=>zm,ZodIPv4:()=>Mv,ZodIPv6:()=>Dv,ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,ZodIntersection:()=>I5,ZodIssueCode:()=>VB,ZodJWT:()=>Gv,ZodKSUID:()=>Uv,ZodLazy:()=>W5,ZodLiteral:()=>N5,ZodMap:()=>$5,ZodNaN:()=>V5,ZodNanoID:()=>Pv,ZodNever:()=>w5,ZodNonOptional:()=>tw,ZodNull:()=>y5,ZodNullable:()=>C5,ZodNumber:()=>yl,ZodNumberFormat:()=>xc,ZodObject:()=>Hm,ZodOptional:()=>ew,ZodPipe:()=>rw,ZodPrefault:()=>U5,ZodPromise:()=>J5,ZodReadonly:()=>Z5,ZodRealError:()=>Yr,ZodRecord:()=>Yv,ZodSet:()=>O5,ZodString:()=>hl,ZodStringFormat:()=>et,ZodSuccess:()=>j5,ZodSymbol:()=>h5,ZodTemplateLiteral:()=>q5,ZodTransform:()=>B5,ZodTuple:()=>k5,ZodType:()=>Ae,ZodULID:()=>zv,ZodURL:()=>Dm,ZodUUID:()=>ei,ZodUndefined:()=>g5,ZodUnion:()=>Kv,ZodUnknown:()=>v5,ZodVoid:()=>_5,ZodXID:()=>Lv,_ZodString:()=>$v,_default:()=>L5,_function:()=>LB,any:()=>yB,array:()=>Fm,base64:()=>eB,base64url:()=>tB,bigint:()=>dB,boolean:()=>m5,catch:()=>H5,check:()=>UB,cidrv4:()=>X3,cidrv6:()=>Q3,clone:()=>Mr,codec:()=>BB,coerce:()=>iw,config:()=>wt,core:()=>Qo,cuid:()=>Z3,cuid2:()=>G3,custom:()=>MB,date:()=>xB,decode:()=>wv,decodeAsync:()=>Ev,discriminatedUnion:()=>SB,e164:()=>rB,email:()=>C3,emoji:()=>H3,encode:()=>vv,encodeAsync:()=>_v,endsWith:()=>al,enum:()=>Xv,file:()=>$B,flattenError:()=>Hf,float32:()=>cB,float64:()=>uB,formatError:()=>Vf,function:()=>LB,getErrorMap:()=>GB,globalRegistry:()=>vo,gt:()=>Yo,gte:()=>Jr,guid:()=>z3,hash:()=>aB,hex:()=>sB,hostname:()=>iB,httpUrl:()=>F3,includes:()=>il,instanceof:()=>DB,int:()=>Tv,int32:()=>fB,int64:()=>pB,intersection:()=>A5,ipv4:()=>J3,ipv6:()=>Y3,iso:()=>Cm,json:()=>FB,jwt:()=>nB,keyof:()=>vB,ksuid:()=>K3,lazy:()=>K5,length:()=>gc,literal:()=>TB,locales:()=>Xf,looseObject:()=>EB,lowercase:()=>nl,lt:()=>Jo,lte:()=>kn,map:()=>AB,maxLength:()=>hc,maxSize:()=>mc,mime:()=>cl,minLength:()=>Vi,minSize:()=>Vs,multipleOf:()=>Hs,nan:()=>PB,nanoid:()=>V3,nativeEnum:()=>RB,negative:()=>tv,never:()=>Wv,nonnegative:()=>nv,nonoptional:()=>D5,nonpositive:()=>rv,normalize:()=>ul,null:()=>b5,nullable:()=>Um,nullish:()=>OB,number:()=>p5,object:()=>wB,optional:()=>Lm,overwrite:()=>Xo,parse:()=>gv,parseAsync:()=>yv,partialRecord:()=>IB,pipe:()=>Mm,positive:()=>ev,prefault:()=>M5,preprocess:()=>HB,prettifyError:()=>yb,promise:()=>zB,property:()=>ov,readonly:()=>G5,record:()=>T5,refine:()=>X5,regex:()=>rl,regexes:()=>An,registry:()=>fm,safeDecode:()=>Iv,safeDecodeAsync:()=>kv,safeEncode:()=>Sv,safeEncodeAsync:()=>Av,safeParse:()=>bv,safeParseAsync:()=>xv,set:()=>kB,setErrorMap:()=>ZB,size:()=>tl,startsWith:()=>sl,strictObject:()=>_B,string:()=>Rv,stringFormat:()=>oB,stringbool:()=>jB,success:()=>NB,superRefine:()=>Q5,symbol:()=>hB,templateLiteral:()=>CB,toJSONSchema:()=>lv,toLowerCase:()=>ll,toUpperCase:()=>dl,transform:()=>Qv,treeifyError:()=>gb,trim:()=>fl,tuple:()=>R5,uint32:()=>lB,uint64:()=>mB,ulid:()=>q3,undefined:()=>gB,union:()=>Jv,unknown:()=>bc,uppercase:()=>ol,url:()=>j3,util:()=>te,uuid:()=>L3,uuidv4:()=>U3,uuidv6:()=>M3,uuidv7:()=>D3,void:()=>bB,xid:()=>W3});var Qo={};Er(Qo,{$ZodAny:()=>Zx,$ZodArray:()=>Jx,$ZodAsyncError:()=>Kn,$ZodBase64:()=>Cx,$ZodBase64URL:()=>zx,$ZodBigInt:()=>om,$ZodBigIntFormat:()=>jx,$ZodBoolean:()=>Wf,$ZodCIDRv4:()=>Nx,$ZodCIDRv6:()=>Px,$ZodCUID:()=>wx,$ZodCUID2:()=>_x,$ZodCatch:()=>p1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>Yb,$ZodCheckEndsWith:()=>ux,$ZodCheckGreaterThan:()=>Yp,$ZodCheckIncludes:()=>ax,$ZodCheckLengthEquals:()=>nx,$ZodCheckLessThan:()=>Jp,$ZodCheckLowerCase:()=>ix,$ZodCheckMaxLength:()=>tx,$ZodCheckMaxSize:()=>Xb,$ZodCheckMimeType:()=>lx,$ZodCheckMinLength:()=>rx,$ZodCheckMinSize:()=>Qb,$ZodCheckMultipleOf:()=>Kb,$ZodCheckNumberFormat:()=>Jb,$ZodCheckOverwrite:()=>dx,$ZodCheckProperty:()=>fx,$ZodCheckRegex:()=>ox,$ZodCheckSizeEquals:()=>ex,$ZodCheckStartsWith:()=>cx,$ZodCheckStringFormat:()=>dc,$ZodCheckUpperCase:()=>sx,$ZodCodec:()=>Kf,$ZodCustom:()=>w1,$ZodCustomStringFormat:()=>Mx,$ZodDate:()=>Kx,$ZodDefault:()=>u1,$ZodDiscriminatedUnion:()=>Xx,$ZodE164:()=>Lx,$ZodEmail:()=>yx,$ZodEmoji:()=>xx,$ZodEncodeError:()=>Ui,$ZodEnum:()=>n1,$ZodError:()=>Ff,$ZodFile:()=>i1,$ZodFunction:()=>b1,$ZodGUID:()=>hx,$ZodIPv4:()=>$x,$ZodIPv6:()=>Ox,$ZodISODate:()=>kx,$ZodISODateTime:()=>Ax,$ZodISODuration:()=>Tx,$ZodISOTime:()=>Rx,$ZodIntersection:()=>Qx,$ZodJWT:()=>Ux,$ZodKSUID:()=>Ix,$ZodLazy:()=>v1,$ZodLiteral:()=>o1,$ZodMap:()=>t1,$ZodNaN:()=>m1,$ZodNanoID:()=>vx,$ZodNever:()=>qx,$ZodNonOptional:()=>l1,$ZodNull:()=>Vx,$ZodNullable:()=>c1,$ZodNumber:()=>nm,$ZodNumberFormat:()=>Dx,$ZodObject:()=>hS,$ZodObjectJIT:()=>Yx,$ZodOptional:()=>a1,$ZodPipe:()=>h1,$ZodPrefault:()=>f1,$ZodPromise:()=>x1,$ZodReadonly:()=>g1,$ZodRealError:()=>Kr,$ZodRecord:()=>e1,$ZodRegistry:()=>pc,$ZodSet:()=>r1,$ZodString:()=>Fs,$ZodStringFormat:()=>Ye,$ZodSuccess:()=>d1,$ZodSymbol:()=>Fx,$ZodTemplateLiteral:()=>y1,$ZodTransform:()=>s1,$ZodTuple:()=>sm,$ZodType:()=>we,$ZodULID:()=>Ex,$ZodURL:()=>bx,$ZodUUID:()=>gx,$ZodUndefined:()=>Hx,$ZodUnion:()=>im,$ZodUnknown:()=>Gx,$ZodVoid:()=>Wx,$ZodXID:()=>Sx,$brand:()=>zp,$constructor:()=>B,$input:()=>E1,$output:()=>_1,Doc:()=>qf,JSONSchema:()=>f5,JSONSchemaGenerator:()=>pl,NEVER:()=>sb,TimePrecision:()=>A1,_any:()=>q1,_array:()=>iv,_base64:()=>km,_base64url:()=>Rm,_bigint:()=>D1,_boolean:()=>U1,_catch:()=>A3,_check:()=>u5,_cidrv4:()=>Im,_cidrv6:()=>Am,_coercedBigint:()=>j1,_coercedBoolean:()=>M1,_coercedDate:()=>X1,_coercedNumber:()=>N1,_coercedString:()=>I1,_cuid:()=>bm,_cuid2:()=>xm,_custom:()=>av,_date:()=>Y1,_decode:()=>Fp,_decodeAsync:()=>Vp,_default:()=>E3,_discriminatedUnion:()=>l3,_e164:()=>Tm,_email:()=>lm,_emoji:()=>gm,_encode:()=>jp,_encodeAsync:()=>Hp,_endsWith:()=>al,_enum:()=>y3,_file:()=>sv,_float32:()=>B1,_float64:()=>C1,_gt:()=>Yo,_gte:()=>Jr,_guid:()=>Qf,_includes:()=>il,_int:()=>P1,_int32:()=>z1,_int64:()=>F1,_intersection:()=>d3,_ipv4:()=>Em,_ipv6:()=>Sm,_isoDate:()=>R1,_isoDateTime:()=>k1,_isoDuration:()=>$1,_isoTime:()=>T1,_jwt:()=>$m,_ksuid:()=>_m,_lazy:()=>$3,_length:()=>gc,_literal:()=>x3,_lowercase:()=>nl,_lt:()=>Jo,_lte:()=>kn,_map:()=>h3,_max:()=>kn,_maxLength:()=>hc,_maxSize:()=>mc,_mime:()=>cl,_min:()=>Jr,_minLength:()=>Vi,_minSize:()=>Vs,_multipleOf:()=>Hs,_nan:()=>Q1,_nanoid:()=>ym,_nativeEnum:()=>b3,_negative:()=>tv,_never:()=>K1,_nonnegative:()=>nv,_nonoptional:()=>S3,_nonpositive:()=>rv,_normalize:()=>ul,_null:()=>G1,_nullable:()=>_3,_number:()=>O1,_optional:()=>w3,_overwrite:()=>Xo,_parse:()=>cc,_parseAsync:()=>uc,_pipe:()=>k3,_positive:()=>ev,_promise:()=>O3,_property:()=>ov,_readonly:()=>R3,_record:()=>m3,_refine:()=>cv,_regex:()=>rl,_safeDecode:()=>Gp,_safeDecodeAsync:()=>Wp,_safeEncode:()=>Zp,_safeEncodeAsync:()=>qp,_safeParse:()=>fc,_safeParseAsync:()=>lc,_set:()=>g3,_size:()=>tl,_startsWith:()=>sl,_string:()=>S1,_stringFormat:()=>yc,_stringbool:()=>fv,_success:()=>I3,_superRefine:()=>uv,_symbol:()=>V1,_templateLiteral:()=>T3,_toLowerCase:()=>ll,_toUpperCase:()=>dl,_transform:()=>v3,_trim:()=>fl,_tuple:()=>p3,_uint32:()=>L1,_uint64:()=>H1,_ulid:()=>vm,_undefined:()=>Z1,_union:()=>f3,_unknown:()=>W1,_uppercase:()=>ol,_url:()=>el,_uuid:()=>dm,_uuidv4:()=>pm,_uuidv6:()=>mm,_uuidv7:()=>hm,_void:()=>J1,_xid:()=>wm,clone:()=>Mr,config:()=>wt,decode:()=>NN,decodeAsync:()=>BN,encode:()=>ON,encodeAsync:()=>PN,flattenError:()=>Hf,formatError:()=>Vf,globalConfig:()=>Cf,globalRegistry:()=>vo,isValidBase64:()=>Bx,isValidBase64URL:()=>lS,isValidJWT:()=>dS,locales:()=>Xf,parse:()=>Mp,parseAsync:()=>Dp,prettifyError:()=>yb,regexes:()=>An,registry:()=>fm,safeDecode:()=>zN,safeDecodeAsync:()=>UN,safeEncode:()=>CN,safeEncodeAsync:()=>LN,safeParse:()=>bb,safeParseAsync:()=>xb,toDotPath:()=>WE,toJSONSchema:()=>lv,treeifyError:()=>gb,util:()=>te,version:()=>px});var sb=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let f of u._zod.deferred)f();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var zp=Symbol("zod_brand"),Kn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Ui=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},Cf={};function wt(e){return e&&Object.assign(Cf,e),Cf}var te={};Er(te,{BIGINT_FORMAT_RANGES:()=>hb,Class:()=>cb,NUMBER_FORMAT_RANGES:()=>mb,aborted:()=>Hi,allowsEval:()=>fb,assert:()=>uN,assertEqual:()=>iN,assertIs:()=>aN,assertNever:()=>cN,assertNotEqual:()=>sN,assignProp:()=>Di,base64ToUint8Array:()=>ZE,base64urlToUint8Array:()=>AN,cached:()=>sc,captureStackTrace:()=>Up,cleanEnum:()=>IN,cleanRegex:()=>Uf,clone:()=>Mr,cloneDef:()=>lN,createTransparentProxy:()=>yN,defineLazy:()=>Oe,esc:()=>Lp,escapeRegex:()=>xo,extend:()=>vN,finalizeIssue:()=>gn,floatSafeRemainder:()=>ub,getElementAtPath:()=>dN,getEnumValues:()=>Lf,getLengthableOrigin:()=>jf,getParsedType:()=>gN,getSizableOrigin:()=>Df,hexToUint8Array:()=>RN,isObject:()=>Ds,isPlainObject:()=>Fi,issue:()=>ac,joinValues:()=>j,jsonStringifyReplacer:()=>ic,merge:()=>_N,mergeDefs:()=>ji,normalizeParams:()=>ee,nullish:()=>Mi,numKeys:()=>hN,objectClone:()=>fN,omit:()=>xN,optionalKeys:()=>pb,partial:()=>EN,pick:()=>bN,prefixIssues:()=>hn,primitiveTypes:()=>db,promiseAllObject:()=>pN,propertyKeyTypes:()=>Mf,randomString:()=>mN,required:()=>SN,safeExtend:()=>wN,shallowClone:()=>lb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>GE,uint8ArrayToBase64url:()=>kN,uint8ArrayToHex:()=>TN,unwrapMessage:()=>zf});function iN(e){return e}function sN(e){return e}function aN(e){}function cN(e){throw new Error}function uN(e){}function Lf(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function j(e,t="|"){return e.map(r=>X(r)).join(t)}function ic(e,t){return typeof t=="bigint"?t.toString():t}function sc(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Mi(e){return e==null}function Uf(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ub(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var VE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==VE)return o===void 0&&(o=VE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function fN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Di(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function ji(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function lN(e){return ji(e._zod.def)}function dN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function pN(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function mN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Lp(e){return JSON.stringify(e)}var Up="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ds(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var fb=sc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Fi(e){if(Ds(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Ds(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function lb(e){return Fi(e)?{...e}:Array.isArray(e)?[...e]:e}function hN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var gN=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Mf=new Set(["string","number","symbol"]),db=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function ee(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function yN(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var mb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function bN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function xN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function vN(e,t){if(!Fi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=ji(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Di(this,"shape",i),i},checks:[]});return Mr(e,n)}function wN(e,t){if(!Fi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return Di(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function _N(e,t){let r=ji(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Di(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function EN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function SN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function Hi(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function hn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function zf(e){return typeof e=="string"?e:e?.message}function gn(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=zf(e.inst?._zod.def?.error?.(e))??zf(t?.error?.(e))??zf(r.customError?.(e))??zf(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Df(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function jf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ac(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function IN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function ZE(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function GE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function AN(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return ZE(t+r)}function kN(e){return GE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function RN(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function TN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var cb=class{constructor(...t){}};var qE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,ic,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ff=B("$ZodError",qE),Kr=B("$ZodError",qE,{Parent:Error});function Hf(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Vf(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function gb(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let f=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(a=f.items)[g]??(a[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(c)),d++;}}};return o(e),r}function WE(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function yb(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${WE(o.path)}`);return t.join(`
41
+ `)}var cc=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Kn;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Mp=cc(Kr),uc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Dp=uc(Kr),fc=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Kn;return i.issues.length?{success:false,error:new(e??Ff)(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},bb=fc(Kr),lc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},xb=lc(Kr),jp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return cc(e)(t,r,n)},ON=jp(Kr),Fp=e=>(t,r,o)=>cc(e)(t,r,o),NN=Fp(Kr),Hp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uc(e)(t,r,n)},PN=Hp(Kr),Vp=e=>async(t,r,o)=>uc(e)(t,r,o),BN=Vp(Kr),Zp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fc(e)(t,r,n)},CN=Zp(Kr),Gp=e=>(t,r,o)=>fc(e)(t,r,o),zN=Gp(Kr),qp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lc(e)(t,r,n)},LN=qp(Kr),Wp=e=>async(t,r,o)=>lc(e)(t,r,o),UN=Wp(Kr);var An={};Er(An,{base64:()=>Bb,base64url:()=>Kp,bigint:()=>jb,boolean:()=>Vb,browserEmail:()=>GN,cidrv4:()=>Nb,cidrv6:()=>Pb,cuid:()=>vb,cuid2:()=>wb,date:()=>Lb,datetime:()=>Mb,domain:()=>WN,duration:()=>Ab,e164:()=>zb,email:()=>Rb,emoji:()=>Tb,extendedDuration:()=>MN,guid:()=>kb,hex:()=>KN,hostname:()=>Cb,html5Email:()=>HN,idnEmail:()=>ZN,integer:()=>Fb,ipv4:()=>$b,ipv6:()=>Ob,ksuid:()=>Sb,lowercase:()=>qb,md5_base64:()=>YN,md5_base64url:()=>XN,md5_hex:()=>JN,nanoid:()=>Ib,null:()=>Zb,number:()=>Hb,rfc5322Email:()=>VN,sha1_base64:()=>eP,sha1_base64url:()=>tP,sha1_hex:()=>QN,sha256_base64:()=>nP,sha256_base64url:()=>oP,sha256_hex:()=>rP,sha384_base64:()=>sP,sha384_base64url:()=>aP,sha384_hex:()=>iP,sha512_base64:()=>uP,sha512_base64url:()=>fP,sha512_hex:()=>cP,string:()=>Db,time:()=>Ub,ulid:()=>_b,undefined:()=>Gb,unicodeEmail:()=>KE,uppercase:()=>Wb,uuid:()=>js,uuid4:()=>DN,uuid6:()=>jN,uuid7:()=>FN,xid:()=>Eb});var vb=/^[cC][^\s-]{8,}$/,wb=/^[0-9a-z]+$/,_b=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eb=/^[0-9a-vA-V]{20}$/,Sb=/^[A-Za-z0-9]{27}$/,Ib=/^[a-zA-Z0-9_-]{21}$/,Ab=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,MN=/^[-+]?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)?)??$/,kb=/^([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})$/,js=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([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)$/,DN=js(4),jN=js(6),FN=js(7),Rb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HN=/^[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])?)*$/,VN=/^(([^<>()\[\]\\.,;:\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,}))$/,KE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ZN=KE,GN=/^[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])?)*$/,qN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Tb(){return new RegExp(qN,"u")}var $b=/^(?:(?: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])$/,Ob=/^(([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}|:))$/,Nb=/^((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])$/,Pb=/^(([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])$/,Bb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kp=/^[A-Za-z0-9_-]*$/,Cb=/^(?=.{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])?)*\.?$/,WN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,zb=/^\+(?:[0-9]){6,14}[0-9]$/,JE="(?:(?:\\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])))",Lb=new RegExp(`^${JE}$`);function YE(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ub(e){return new RegExp(`^${YE(e)}$`)}function Mb(e){let t=YE({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${JE}T(?:${o})$`)}var Db=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jb=/^-?\d+n?$/,Fb=/^-?\d+$/,Hb=/^-?\d+(?:\.\d+)?/,Vb=/^(?:true|false)$/i,Zb=/^null$/i;var Gb=/^undefined$/i;var qb=/^[^A-Z]*$/,Wb=/^[^a-z]*$/,KN=/^[0-9a-fA-F]*$/;function Zf(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gf(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var JN=/^[0-9a-fA-F]{32}$/,YN=Zf(22,"=="),XN=Gf(22),QN=/^[0-9a-fA-F]{40}$/,eP=Zf(27,"="),tP=Gf(27),rP=/^[0-9a-fA-F]{64}$/,nP=Zf(43,"="),oP=Gf(43),iP=/^[0-9a-fA-F]{96}$/,sP=Zf(64,""),aP=Gf(64),cP=/^[0-9a-fA-F]{128}$/,uP=Zf(86,"=="),fP=Gf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),QE={number:"number",bigint:"bigint",object:"date"},Jp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=QE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Yp=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=QE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Kb=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ub(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),Jb=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=mb[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Fb);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),Yb=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=hb[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),Xb=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Df(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),Qb=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Df(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ex=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Df(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),tx=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=jf(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),rx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=jf(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),nx=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=jf(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),dc=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),ox=B("$ZodCheckRegex",(e,t)=>{dc.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),ix=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qb),dc.init(e,t);}),sx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wb),dc.init(e,t);}),ax=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=xo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort});};}),cx=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${xo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),ux=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${xo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function XE(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues));}var fx=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>XE(n,r,t.property));XE(o,r,t.property);};}),lx=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),dx=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var qf=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
42
42
  `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s);}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
43
- `))}};var px={major:4,minor:1,patch:12};var we=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=px;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=Hi(s),f;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new Kn;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=Hi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Hi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Hi(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Kn;return u.then(f=>e._zod.parse(f,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(f=>i(f,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Kn;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=bb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return xb(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Fs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Db(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Ye=B("$ZodStringFormat",(e,t)=>{dc.init(e,t),Fs.init(e,t);}),hx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kb),Ye.init(e,t);}),gx=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=js(o));}else t.pattern??(t.pattern=js());Ye.init(e,t);}),yx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rb),Ye.init(e,t);}),bx=B("$ZodURL",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Cb.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),xx=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Tb()),Ye.init(e,t);}),vx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ib),Ye.init(e,t);}),wx=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vb),Ye.init(e,t);}),_x=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wb),Ye.init(e,t);}),Ex=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_b),Ye.init(e,t);}),Sx=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eb),Ye.init(e,t);}),Ix=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sb),Ye.init(e,t);}),Ax=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Mb(t)),Ye.init(e,t);}),kx=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lb),Ye.init(e,t);}),Rx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ub(t)),Ye.init(e,t);}),Tx=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ab),Ye.init(e,t);}),$x=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$b),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Ox=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ob),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Nx=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nb),Ye.init(e,t);}),Px=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pb),Ye.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Bx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Cx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bb),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Bx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function uS(e){if(!Kp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bx(r)}var zx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Kp),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{uS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Lx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zb),Ye.init(e,t);});function fS(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Ux=B("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{fS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Mx=B("$ZodCustomStringFormat",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),nm=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??Hb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),Dx=B("$ZodNumber",(e,t)=>{Jb.init(e,t),nm.init(e,t);}),Wf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Vb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),om=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=jb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),jx=B("$ZodBigInt",(e,t)=>{Yb.init(e,t),om.init(e,t);}),Fx=B("$ZodSymbol",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Hx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Gb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Vx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Zx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Gx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),qx=B("$ZodNever",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),Wx=B("$ZodVoid",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),Kx=B("$ZodDate",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function QE(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var Jx=B("$ZodArray",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>QE(u,r,s))):QE(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function rm(e,t,r,o){e.issues.length&&t.issues.push(...hn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function lS(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=pb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dS(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let f of Object.keys(t)){if(a.has(f))continue;if(u==="never"){s.push(f);continue}let d=c.run({value:t[f],issues:[]},o);d instanceof Promise?e.push(d.then(g=>rm(g,r,f,t))):rm(d,r,f,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var pS=B("$ZodObject",(e,t)=>{if(we.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=sc(()=>lS(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let f=a[u]._zod;if(f.values){c[u]??(c[u]=new Set);for(let d of f.values)c[u].add(d);}}return c});let n=Ds,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let f=[],d=s.shape;for(let g of s.keys){let v=d[g]._zod.run({value:u[g],issues:[]},c);v instanceof Promise?f.push(v.then(E=>rm(E,a,g,u))):rm(v,a,g,u);}return i?dS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),Yx=B("$ZodObjectJIT",(e,t)=>{pS.init(e,t);let r=e._zod.parse,o=sc(()=>lS(t)),n=g=>{let h=new qf(["shape","payload","ctx"]),v=o.value,E=O=>{let I=Lp(O);return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let R=Object.create(null),$=0;for(let O of v.keys)R[O]=`key_${$++}`;h.write("const newResult = {};");for(let O of v.keys){let I=R[O],P=Lp(O);h.write(`const ${I} = ${E(O)};`),h.write(`
43
+ `))}};var px={major:4,minor:1,patch:12};var we=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=px;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=Hi(s),f;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new Kn;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=Hi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Hi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Hi(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Kn;return u.then(f=>e._zod.parse(f,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(f=>i(f,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Kn;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=bb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return xb(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Fs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Db(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Ye=B("$ZodStringFormat",(e,t)=>{dc.init(e,t),Fs.init(e,t);}),hx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kb),Ye.init(e,t);}),gx=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=js(o));}else t.pattern??(t.pattern=js());Ye.init(e,t);}),yx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rb),Ye.init(e,t);}),bx=B("$ZodURL",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Cb.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),xx=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Tb()),Ye.init(e,t);}),vx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ib),Ye.init(e,t);}),wx=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vb),Ye.init(e,t);}),_x=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wb),Ye.init(e,t);}),Ex=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_b),Ye.init(e,t);}),Sx=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eb),Ye.init(e,t);}),Ix=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sb),Ye.init(e,t);}),Ax=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Mb(t)),Ye.init(e,t);}),kx=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lb),Ye.init(e,t);}),Rx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ub(t)),Ye.init(e,t);}),Tx=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ab),Ye.init(e,t);}),$x=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$b),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Ox=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ob),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Nx=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nb),Ye.init(e,t);}),Px=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pb),Ye.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Bx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Cx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bb),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Bx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function lS(e){if(!Kp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bx(r)}var zx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Kp),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{lS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Lx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zb),Ye.init(e,t);});function dS(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Ux=B("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{dS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Mx=B("$ZodCustomStringFormat",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),nm=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??Hb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),Dx=B("$ZodNumber",(e,t)=>{Jb.init(e,t),nm.init(e,t);}),Wf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Vb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),om=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=jb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),jx=B("$ZodBigInt",(e,t)=>{Yb.init(e,t),om.init(e,t);}),Fx=B("$ZodSymbol",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Hx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Gb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Vx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Zx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Gx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),qx=B("$ZodNever",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),Wx=B("$ZodVoid",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),Kx=B("$ZodDate",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function tS(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var Jx=B("$ZodArray",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>tS(u,r,s))):tS(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function rm(e,t,r,o){e.issues.length&&t.issues.push(...hn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function pS(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=pb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function mS(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let f of Object.keys(t)){if(a.has(f))continue;if(u==="never"){s.push(f);continue}let d=c.run({value:t[f],issues:[]},o);d instanceof Promise?e.push(d.then(g=>rm(g,r,f,t))):rm(d,r,f,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var hS=B("$ZodObject",(e,t)=>{if(we.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=sc(()=>pS(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let f=a[u]._zod;if(f.values){c[u]??(c[u]=new Set);for(let d of f.values)c[u].add(d);}}return c});let n=Ds,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let f=[],d=s.shape;for(let g of s.keys){let v=d[g]._zod.run({value:u[g],issues:[]},c);v instanceof Promise?f.push(v.then(E=>rm(E,a,g,u))):rm(v,a,g,u);}return i?mS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),Yx=B("$ZodObjectJIT",(e,t)=>{hS.init(e,t);let r=e._zod.parse,o=sc(()=>pS(t)),n=g=>{let h=new qf(["shape","payload","ctx"]),v=o.value,E=O=>{let I=Lp(O);return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let R=Object.create(null),$=0;for(let O of v.keys)R[O]=`key_${$++}`;h.write("const newResult = {};");for(let O of v.keys){let I=R[O],P=Lp(O);h.write(`const ${I} = ${E(O)};`),h.write(`
44
44
  if (${I}.issues.length) {
45
45
  payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
46
46
  ...iss,
@@ -57,18 +57,18 @@ ${x4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessa
57
57
  newResult[${P}] = ${I}.value;
58
58
  }
59
59
 
60
- `);}h.write("payload.value = newResult;"),h.write("return payload;");let N=h.compile();return (O,I)=>N(g,O,I)},i,s=Ds,a=!Cf.jitless,u=a&&fb.value,f=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let v=g.value;return s(v)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),f?dS([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function eS(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Hi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>gn(s,o,wt())))}),t)}var im=B("$ZodUnion",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Uf(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>eS(c,n,e,i)):eS(a,n,e,i)};}),Xx=B("$ZodDiscriminatedUnion",(e,t)=>{im.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=sc(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ds(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),Qx=B("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>tS(r,c,u)):tS(r,i,s)};});function mx(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Fi(e)&&Fi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=mx(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=mx(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function tS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Hi(e))return e;let o=mx(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var sm=B("$ZodTuple",(e,t)=>{we.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,f=s.length<o-1;if(u||f)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let f=u._zod.run({value:s[c],issues:[]},i);f instanceof Promise?a.push(f.then(d=>Xp(d,n,c))):Xp(f,n,c);}if(t.rest){let u=s.slice(r.length);for(let f of u){c++;let d=t.rest._zod.run({value:f,issues:[]},i);d instanceof Promise?a.push(d.then(g=>Xp(g,n,c))):Xp(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function Xp(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var e1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Fi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&r.issues.push(...hn(c,f.issues)),r.value[c]=f.value;})):(u.issues.length&&r.issues.push(...hn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>gn(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...hn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...hn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),t1=B("$ZodMap",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([f,d])=>{rS(f,d,r,s,n,e,o);})):rS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function rS(e,t,r,o,n,i,s){e.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>gn(a,s,wt()))})),t.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>gn(a,s,wt()))})),r.value.set(e.value,t.value);}var r1=B("$ZodSet",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>nS(c,r))):nS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function nS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var n1=B("$ZodEnum",(e,t)=>{we.init(e,t);let r=Lf(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Mf.has(typeof n)).map(n=>typeof n=="string"?xo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),o1=B("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xo(r):r?xo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),i1=B("$ZodFile",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),s1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Kn;return r.value=n,r};});function oS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var a1=B("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>oS(i,r.value)):oS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),c1=B("$ZodNullable",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),u1=B("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>iS(i,t)):iS(n,t)};});function iS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var f1=B("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),l1=B("$ZodNonOptional",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>sS(i,e)):sS(n,e)};});function sS(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var d1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),p1=B("$ZodCatch",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>gn(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>gn(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),m1=B("$ZodNaN",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),h1=B("$ZodPipe",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Qp(s,t.in,o)):Qp(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Qp(i,t.out,o)):Qp(n,t.out,o)};});function Qp(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Kf=B("$ZodCodec",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}};});function em(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.out,r)):tm(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.in,r)):tm(e,n,t.in,r)}}function tm(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var g1=B("$ZodReadonly",(e,t)=>{we.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(aS):aS(n)};});function aS(e){return e.value=Object.freeze(e.value),e}var y1=B("$ZodTemplateLiteral",(e,t)=>{we.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||db.has(typeof o))r.push(xo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),b1=B("$ZodFunction",(e,t)=>(we.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Mp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Mp(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Dp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Dp(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new sm({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),x1=B("$ZodPromise",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),v1=B("$ZodLazy",(e,t)=>{we.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),w1=B("$ZodCustom",(e,t)=>{ot.init(e,t),we.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>cS(i,r,o,e));cS(n,r,o,e);};});function cS(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ac(n));}}var Xf={};Er(Xf,{ar:()=>mS,az:()=>hS,be:()=>yS,bg:()=>bS,ca:()=>xS,cs:()=>vS,da:()=>wS,de:()=>_S,en:()=>am,eo:()=>ES,es:()=>SS,fa:()=>IS,fi:()=>AS,fr:()=>kS,frCA:()=>RS,he:()=>TS,hu:()=>$S,id:()=>OS,is:()=>NS,it:()=>PS,ja:()=>BS,ka:()=>CS,kh:()=>zS,km:()=>cm,ko:()=>LS,lt:()=>MS,mk:()=>DS,ms:()=>jS,nl:()=>FS,no:()=>HS,ota:()=>VS,pl:()=>GS,ps:()=>ZS,pt:()=>qS,ru:()=>KS,sl:()=>JS,sv:()=>YS,ta:()=>XS,th:()=>QS,tr:()=>e5,ua:()=>t5,uk:()=>um,ur:()=>r5,vi:()=>n5,yo:()=>s5,zhCN:()=>o5,zhTW:()=>i5});var cP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function mS(){return {localeError:cP()}}var uP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function hS(){return {localeError:uP()}}function gS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var fP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=gS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=gS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function yS(){return {localeError:fP()}}var lP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},dP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${lP(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${j(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function bS(){return {localeError:dP()}}var pP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${j(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function xS(){return {localeError:pP()}}var mP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";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(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${j(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function vS(){return {localeError:mP()}}var hP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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 s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${j(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function wS(){return {localeError:hP()}}var gP=()=>{let e={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 t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function _S(){return {localeError:gP()}}var yP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},bP=()=>{let e={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 t(o){return e[o]??null}let r={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 o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${yP(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function am(){return {localeError:bP()}}var xP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},vP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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 o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${xP(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function ES(){return {localeError:vP()}}var wP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${j(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function SS(){return {localeError:wP()}}var _P=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${j(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${j(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function IS(){return {localeError:_P()}}var EP=()=>{let e={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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 n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.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\xF6te"}}};function AS(){return {localeError:EP()}}var SP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function kS(){return {localeError:SP()}}var IP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function RS(){return {localeError:IP()}}var AP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function TS(){return {localeError:AP()}}var kP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function $S(){return {localeError:kP()}}var RP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function OS(){return {localeError:RP()}}var TP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},$P=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${TP(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${j(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function NS(){return {localeError:$P()}}var OP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function PS(){return {localeError:OP()}}var NP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${j(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function BS(){return {localeError:NP()}}var PP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},BP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${PP(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${j(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${j(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function CS(){return {localeError:BP()}}var CP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${j(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function cm(){return {localeError:CP()}}function zS(){return cm()}var zP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${j(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${j(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function LS(){return {localeError:zP()}}var LP=e=>Yf(typeof e,e),Yf=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},Jf=e=>e.charAt(0).toUpperCase()+e.slice(1);function US(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var UP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${LP(o.input)}, o tik\u0117tasi - ${Yf(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${j(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=Yf(o.origin),i=t(o.origin,US(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=Yf(o.origin),i=t(o.origin,US(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${j(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=Yf(o.origin);return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function MS(){return {localeError:UP()}}var MP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function DS(){return {localeError:MP()}}var DP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function jS(){return {localeError:DP()}}var jP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function FS(){return {localeError:jP()}}var FP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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\xE5de",ipv6:"IPv6-omr\xE5de",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 n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function HS(){return {localeError:FP()}}var HP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function VS(){return {localeError:HP()}}var VP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${j(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function ZS(){return {localeError:VP()}}var ZP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function GS(){return {localeError:ZP()}}var GP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function qS(){return {localeError:GP()}}function WS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var qP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=WS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=WS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function KS(){return {localeError:qP()}}var WP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${j(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function JS(){return {localeError:WP()}}var KP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function YS(){return {localeError:KP()}}var JP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function XS(){return {localeError:JP()}}var YP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${j(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function QS(){return {localeError:YP()}}var XP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},QP=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${XP(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${j(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function e5(){return {localeError:QP()}}var e3=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function um(){return {localeError:e3()}}function t5(){return um()}var t3=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${j(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function r5(){return {localeError:t3()}}var r3=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${j(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function n5(){return {localeError:r3()}}var n3=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function o5(){return {localeError:n3()}}var o3=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function i5(){return {localeError:o3()}}var i3=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${j(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function s5(){return {localeError:i3()}}var _1=Symbol("ZodOutput"),E1=Symbol("ZodInput"),pc=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fm(){return new pc}var vo=fm();function S1(e,t){return new e({type:"string",...ee(t)})}function I1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function lm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...ee(t)})}function Qf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...ee(t)})}function dm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function pm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...ee(t)})}function el(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...ee(t)})}function gm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function ym(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function bm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var A1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function k1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function R1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function T1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function $1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function O1(e,t){return new e({type:"number",checks:[],...ee(t)})}function N1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function P1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function B1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function z1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function U1(e,t){return new e({type:"boolean",...ee(t)})}function M1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function D1(e,t){return new e({type:"bigint",...ee(t)})}function j1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function F1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function H1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function V1(e,t){return new e({type:"symbol",...ee(t)})}function Z1(e,t){return new e({type:"undefined",...ee(t)})}function G1(e,t){return new e({type:"null",...ee(t)})}function q1(e){return new e({type:"any"})}function W1(e){return new e({type:"unknown"})}function K1(e,t){return new e({type:"never",...ee(t)})}function J1(e,t){return new e({type:"void",...ee(t)})}function Y1(e,t){return new e({type:"date",...ee(t)})}function X1(e,t){return new e({type:"date",coerce:true,...ee(t)})}function Q1(e,t){return new e({type:"nan",...ee(t)})}function Jo(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:false})}function kn(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:true})}function Yo(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:false})}function Jr(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:true})}function ev(e){return Yo(0,e)}function tv(e){return Jo(0,e)}function rv(e){return kn(0,e)}function nv(e){return Jr(0,e)}function Hs(e,t){return new Kb({check:"multiple_of",...ee(t),value:e})}function mc(e,t){return new Xb({check:"max_size",...ee(t),maximum:e})}function Vs(e,t){return new Qb({check:"min_size",...ee(t),minimum:e})}function tl(e,t){return new ex({check:"size_equals",...ee(t),size:e})}function hc(e,t){return new tx({check:"max_length",...ee(t),maximum:e})}function Vi(e,t){return new rx({check:"min_length",...ee(t),minimum:e})}function gc(e,t){return new nx({check:"length_equals",...ee(t),length:e})}function rl(e,t){return new ox({check:"string_format",format:"regex",...ee(t),pattern:e})}function nl(e){return new ix({check:"string_format",format:"lowercase",...ee(e)})}function ol(e){return new sx({check:"string_format",format:"uppercase",...ee(e)})}function il(e,t){return new ax({check:"string_format",format:"includes",...ee(t),includes:e})}function sl(e,t){return new cx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function al(e,t){return new ux({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function ov(e,t,r){return new fx({check:"property",property:e,schema:t,...ee(r)})}function cl(e,t){return new lx({check:"mime_type",mime:e,...ee(t)})}function Xo(e){return new dx({check:"overwrite",tx:e})}function ul(e){return Xo(t=>t.normalize(e))}function fl(){return Xo(e=>e.trim())}function ll(){return Xo(e=>e.toLowerCase())}function dl(){return Xo(e=>e.toUpperCase())}function iv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function s3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function a3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function c3(e,t,r){return new e({type:"intersection",left:t,right:r})}function u3(e,t,r,o){let n=r instanceof we,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ee(i)})}function f3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function l3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function d3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function p3(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...ee(r)})}function m3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function h3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function sv(e,t){return new e({type:"file",...ee(t)})}function g3(e,t){return new e({type:"transform",transform:t})}function y3(e,t){return new e({type:"optional",innerType:t})}function b3(e,t){return new e({type:"nullable",innerType:t})}function x3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():lb(r)}})}function v3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function w3(e,t){return new e({type:"success",innerType:t})}function _3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function E3(e,t,r){return new e({type:"pipe",in:t,out:r})}function S3(e,t){return new e({type:"readonly",innerType:t})}function I3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function A3(e,t){return new e({type:"lazy",getter:t})}function k3(e,t){return new e({type:"promise",innerType:t})}function av(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function cv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function uv(e){let t=a5(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ac(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ac(n));}},e(r.value,r)));return t}function a5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function fv(e,t){let r=ee(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??Kf,c=e.Boolean??Wf,u=e.String??Fs,f=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:f,out:d,transform:((h,v)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?true:s.has(E)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:g,continue:false}),{})}),reverseTransform:((h,v)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function yc(e,t,r,o={}){let n=ee(o),i={...ee(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var pl=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let v=h;v.type="string";let{minimum:E,maximum:R,format:$,patterns:N,contentEncoding:O}=t._zod.bag;if(typeof E=="number"&&(v.minLength=E),typeof R=="number"&&(v.maxLength=R),$&&(v.format=i[$]??$,v.format===""&&delete v.format),O&&(v.contentEncoding=O),N&&N.size>0){let I=[...N];I.length===1?v.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(P=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:P.source}))]);}break}case "number":{let v=h,{minimum:E,maximum:R,format:$,multipleOf:N,exclusiveMaximum:O,exclusiveMinimum:I}=t._zod.bag;typeof $=="string"&&$.includes("int")?v.type="integer":v.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=I,v.exclusiveMinimum=true):v.exclusiveMinimum=I),typeof E=="number"&&(v.minimum=E,typeof I=="number"&&this.target!=="draft-4"&&(I>=E?delete v.minimum:delete v.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=O,v.exclusiveMaximum=true):v.exclusiveMaximum=O),typeof R=="number"&&(v.maximum=R,typeof O=="number"&&this.target!=="draft-4"&&(O<=R?delete v.maximum:delete v.exclusiveMaximum)),typeof N=="number"&&(v.multipleOf=N);break}case "boolean":{let v=h;v.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let v=h,{minimum:E,maximum:R}=t._zod.bag;typeof E=="number"&&(v.minItems=E),typeof R=="number"&&(v.maxItems=R),v.type="array",v.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let v=h;v.type="object",v.properties={};let E=n.shape;for(let N in E)v.properties[N]=this.process(E[N],{...d,path:[...d.path,"properties",N]});let R=new Set(Object.keys(E)),$=new Set([...R].filter(N=>{let O=n.shape[N]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));$.size>0&&(v.required=Array.from($)),n.catchall?._zod.def.type==="never"?v.additionalProperties=false:n.catchall?n.catchall&&(v.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=false);break}case "union":{let v=h,E=n.options.map((R,$)=>this.process(R,{...d,path:[...d.path,"anyOf",$]}));v.anyOf=E;break}case "intersection":{let v=h,E=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),R=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),$=O=>"allOf"in O&&Object.keys(O).length===1,N=[...$(E)?E.allOf:[E],...$(R)?R.allOf:[R]];v.allOf=N;break}case "tuple":{let v=h;v.type="array";let E=this.target==="draft-2020-12"?"prefixItems":"items",R=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",$=n.items.map((P,L)=>this.process(P,{...d,path:[...d.path,E,L]})),N=n.rest?this.process(n.rest,{...d,path:[...d.path,R,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=$,N&&(v.items=N)):this.target==="openapi-3.0"?(v.items={anyOf:$},N&&v.items.anyOf.push(N),v.minItems=$.length,N||(v.maxItems=$.length)):(v.items=$,N&&(v.additionalItems=N));let{minimum:O,maximum:I}=t._zod.bag;typeof O=="number"&&(v.minItems=O),typeof I=="number"&&(v.maxItems=I);break}case "record":{let v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),v.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let v=h,E=Lf(n.entries);E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),v.enum=E;break}case "literal":{let v=h,E=[];for(let R of n.values)if(R===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof R=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");E.push(Number(R));}else E.push(R);if(E.length!==0)if(E.length===1){let R=E[0];v.type=R===null?"null":typeof R,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[R]:v.const=R;}else E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),E.every(R=>typeof R=="boolean")&&(v.type="string"),E.every(R=>R===null)&&(v.type="null"),v.enum=E;break}case "file":{let v=h,E={type:"string",format:"binary",contentEncoding:"binary"},{minimum:R,maximum:$,mime:N}=t._zod.bag;R!==void 0&&(E.minLength=R),$!==void 0&&(E.maxLength=$),N?N.length===1?(E.contentMediaType=N[0],Object.assign(v,E)):v.anyOf=N.map(O=>({...E,contentMediaType:O})):Object.assign(v,E);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let v=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[v,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let v=h;v.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let v;try{v=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let v=h,E=t._zod.pattern;if(!E)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=E.source;break}case "pipe":{let v=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(v,d),a.ref=v;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let v=t._zod.innerType;this.process(v,d),a.ref=v;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=f=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let E=o.external.registry.get(f[0])?.id,R=o.external.uri??(N=>N);if(E)return {ref:R(E)};let $=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=$,{defId:$,ref:`${R("__shared")}#/${d}/${$}`}}if(f[1]===n)return {ref:"#"};let h=`#/${d}/`,v=f[1].schema.id??`__schema${this.counter++}`;return {defId:v,ref:h+v}},s=f=>{if(f[1].schema.$ref)return;let d=f[1],{ref:g,defId:h}=i(f);d.def={...d.schema},h&&(d.defId=h);let v=d.schema;for(let E in v)delete v[E];v.$ref=g;};if(o.cycles==="throw")for(let f of this.seen.entries()){let d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
60
+ `);}h.write("payload.value = newResult;"),h.write("return payload;");let N=h.compile();return (O,I)=>N(g,O,I)},i,s=Ds,a=!Cf.jitless,u=a&&fb.value,f=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let v=g.value;return s(v)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),f?mS([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function rS(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Hi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>gn(s,o,wt())))}),t)}var im=B("$ZodUnion",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Uf(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>rS(c,n,e,i)):rS(a,n,e,i)};}),Xx=B("$ZodDiscriminatedUnion",(e,t)=>{im.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=sc(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ds(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),Qx=B("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>nS(r,c,u)):nS(r,i,s)};});function mx(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Fi(e)&&Fi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=mx(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=mx(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function nS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Hi(e))return e;let o=mx(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var sm=B("$ZodTuple",(e,t)=>{we.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,f=s.length<o-1;if(u||f)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let f=u._zod.run({value:s[c],issues:[]},i);f instanceof Promise?a.push(f.then(d=>Xp(d,n,c))):Xp(f,n,c);}if(t.rest){let u=s.slice(r.length);for(let f of u){c++;let d=t.rest._zod.run({value:f,issues:[]},i);d instanceof Promise?a.push(d.then(g=>Xp(g,n,c))):Xp(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function Xp(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var e1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Fi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&r.issues.push(...hn(c,f.issues)),r.value[c]=f.value;})):(u.issues.length&&r.issues.push(...hn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>gn(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...hn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...hn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),t1=B("$ZodMap",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([f,d])=>{oS(f,d,r,s,n,e,o);})):oS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function oS(e,t,r,o,n,i,s){e.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>gn(a,s,wt()))})),t.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>gn(a,s,wt()))})),r.value.set(e.value,t.value);}var r1=B("$ZodSet",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>iS(c,r))):iS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function iS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var n1=B("$ZodEnum",(e,t)=>{we.init(e,t);let r=Lf(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Mf.has(typeof n)).map(n=>typeof n=="string"?xo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),o1=B("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xo(r):r?xo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),i1=B("$ZodFile",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),s1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Kn;return r.value=n,r};});function sS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var a1=B("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>sS(i,r.value)):sS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),c1=B("$ZodNullable",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),u1=B("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>aS(i,t)):aS(n,t)};});function aS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var f1=B("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),l1=B("$ZodNonOptional",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>cS(i,e)):cS(n,e)};});function cS(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var d1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),p1=B("$ZodCatch",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>gn(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>gn(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),m1=B("$ZodNaN",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),h1=B("$ZodPipe",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Qp(s,t.in,o)):Qp(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Qp(i,t.out,o)):Qp(n,t.out,o)};});function Qp(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Kf=B("$ZodCodec",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}};});function em(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.out,r)):tm(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.in,r)):tm(e,n,t.in,r)}}function tm(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var g1=B("$ZodReadonly",(e,t)=>{we.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(uS):uS(n)};});function uS(e){return e.value=Object.freeze(e.value),e}var y1=B("$ZodTemplateLiteral",(e,t)=>{we.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||db.has(typeof o))r.push(xo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),b1=B("$ZodFunction",(e,t)=>(we.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Mp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Mp(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Dp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Dp(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new sm({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),x1=B("$ZodPromise",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),v1=B("$ZodLazy",(e,t)=>{we.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),w1=B("$ZodCustom",(e,t)=>{ot.init(e,t),we.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>fS(i,r,o,e));fS(n,r,o,e);};});function fS(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ac(n));}}var Xf={};Er(Xf,{ar:()=>gS,az:()=>yS,be:()=>xS,bg:()=>vS,ca:()=>wS,cs:()=>_S,da:()=>ES,de:()=>SS,en:()=>am,eo:()=>IS,es:()=>AS,fa:()=>kS,fi:()=>RS,fr:()=>TS,frCA:()=>$S,he:()=>OS,hu:()=>NS,id:()=>PS,is:()=>BS,it:()=>CS,ja:()=>zS,ka:()=>LS,kh:()=>US,km:()=>cm,ko:()=>MS,lt:()=>jS,mk:()=>FS,ms:()=>HS,nl:()=>VS,no:()=>ZS,ota:()=>GS,pl:()=>WS,ps:()=>qS,pt:()=>KS,ru:()=>YS,sl:()=>XS,sv:()=>QS,ta:()=>e5,th:()=>t5,tr:()=>r5,ua:()=>n5,uk:()=>um,ur:()=>o5,vi:()=>i5,yo:()=>c5,zhCN:()=>s5,zhTW:()=>a5});var dP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function gS(){return {localeError:dP()}}var pP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function yS(){return {localeError:pP()}}function bS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var mP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=bS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=bS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function xS(){return {localeError:mP()}}var hP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},gP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${hP(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${j(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function vS(){return {localeError:gP()}}var yP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",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\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${j(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function wS(){return {localeError:yP()}}var bP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";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(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 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 \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${j(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function _S(){return {localeError:bP()}}var xP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={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\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",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 s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${j(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function ES(){return {localeError:xP()}}var vP=()=>{let e={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 t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function SS(){return {localeError:vP()}}var wP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},_P=()=>{let e={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 t(o){return e[o]??null}let r={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 o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${wP(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function am(){return {localeError:_P()}}var EP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},SP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",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\u016Dro",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 o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${EP(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function IS(){return {localeError:SP()}}var IP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${j(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function AS(){return {localeError:IP()}}var AP=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${j(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${j(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function kS(){return {localeError:AP()}}var kP=()=>{let e={string:{unit:"merkki\xE4",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\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",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\xE4iv\xE4m\xE4\xE4r\xE4",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 n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.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\xF6te"}}};function RS(){return {localeError:kP()}}var RP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function TS(){return {localeError:RP()}}var TP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",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\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function $S(){return {localeError:TP()}}var $P=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function OS(){return {localeError:$P()}}var OP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",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\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function NS(){return {localeError:OP()}}var NP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function PS(){return {localeError:NP()}}var PP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},BP=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",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\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",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\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${PP(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${j(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function BS(){return {localeError:BP()}}var CP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function CS(){return {localeError:CP()}}var zP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${j(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function zS(){return {localeError:zP()}}var LP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},UP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${LP(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${j(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${j(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function LS(){return {localeError:UP()}}var MP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${j(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function cm(){return {localeError:MP()}}function US(){return cm()}var DP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${j(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${j(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function MS(){return {localeError:DP()}}var jP=e=>Yf(typeof e,e),Yf=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},Jf=e=>e.charAt(0).toUpperCase()+e.slice(1);function DS(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var FP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to 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\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${jP(o.input)}, o tik\u0117tasi - ${Yf(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${j(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=Yf(o.origin),i=t(o.origin,DS(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=Yf(o.origin),i=t(o.origin,DS(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${j(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=Yf(o.origin);return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function jS(){return {localeError:FP()}}var HP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function FS(){return {localeError:HP()}}var VP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function HS(){return {localeError:VP()}}var ZP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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 n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function VS(){return {localeError:ZP()}}var GP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={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\xE5de",ipv6:"IPv6-omr\xE5de",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 n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function ZS(){return {localeError:GP()}}var qP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",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\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function GS(){return {localeError:qP()}}var WP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${j(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function qS(){return {localeError:WP()}}var KP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",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\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function WS(){return {localeError:KP()}}var JP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o 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\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o 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\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function KS(){return {localeError:JP()}}function JS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var YP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=JS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=JS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function YS(){return {localeError:YP()}}var XP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni 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 \u010Das",date:"ISO datum",time:"ISO \u010Das",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 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${j(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function XS(){return {localeError:XP()}}var QP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt 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\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function QS(){return {localeError:QP()}}var e3=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function e5(){return {localeError:e3()}}var t3=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${j(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function t5(){return {localeError:t3()}}var r3=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},n3=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={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\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${r3(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${j(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function r5(){return {localeError:n3()}}var o3=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function um(){return {localeError:o3()}}function n5(){return um()}var i3=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${j(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function o5(){return {localeError:i3()}}var s3=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 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\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${j(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function i5(){return {localeError:s3()}}var a3=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function s5(){return {localeError:a3()}}var c3=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function a5(){return {localeError:c3()}}var u3=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${j(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function c5(){return {localeError:u3()}}var _1=Symbol("ZodOutput"),E1=Symbol("ZodInput"),pc=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fm(){return new pc}var vo=fm();function S1(e,t){return new e({type:"string",...ee(t)})}function I1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function lm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...ee(t)})}function Qf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...ee(t)})}function dm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function pm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...ee(t)})}function el(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...ee(t)})}function gm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function ym(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function bm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var A1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function k1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function R1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function T1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function $1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function O1(e,t){return new e({type:"number",checks:[],...ee(t)})}function N1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function P1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function B1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function z1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function U1(e,t){return new e({type:"boolean",...ee(t)})}function M1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function D1(e,t){return new e({type:"bigint",...ee(t)})}function j1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function F1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function H1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function V1(e,t){return new e({type:"symbol",...ee(t)})}function Z1(e,t){return new e({type:"undefined",...ee(t)})}function G1(e,t){return new e({type:"null",...ee(t)})}function q1(e){return new e({type:"any"})}function W1(e){return new e({type:"unknown"})}function K1(e,t){return new e({type:"never",...ee(t)})}function J1(e,t){return new e({type:"void",...ee(t)})}function Y1(e,t){return new e({type:"date",...ee(t)})}function X1(e,t){return new e({type:"date",coerce:true,...ee(t)})}function Q1(e,t){return new e({type:"nan",...ee(t)})}function Jo(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:false})}function kn(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:true})}function Yo(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:false})}function Jr(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:true})}function ev(e){return Yo(0,e)}function tv(e){return Jo(0,e)}function rv(e){return kn(0,e)}function nv(e){return Jr(0,e)}function Hs(e,t){return new Kb({check:"multiple_of",...ee(t),value:e})}function mc(e,t){return new Xb({check:"max_size",...ee(t),maximum:e})}function Vs(e,t){return new Qb({check:"min_size",...ee(t),minimum:e})}function tl(e,t){return new ex({check:"size_equals",...ee(t),size:e})}function hc(e,t){return new tx({check:"max_length",...ee(t),maximum:e})}function Vi(e,t){return new rx({check:"min_length",...ee(t),minimum:e})}function gc(e,t){return new nx({check:"length_equals",...ee(t),length:e})}function rl(e,t){return new ox({check:"string_format",format:"regex",...ee(t),pattern:e})}function nl(e){return new ix({check:"string_format",format:"lowercase",...ee(e)})}function ol(e){return new sx({check:"string_format",format:"uppercase",...ee(e)})}function il(e,t){return new ax({check:"string_format",format:"includes",...ee(t),includes:e})}function sl(e,t){return new cx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function al(e,t){return new ux({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function ov(e,t,r){return new fx({check:"property",property:e,schema:t,...ee(r)})}function cl(e,t){return new lx({check:"mime_type",mime:e,...ee(t)})}function Xo(e){return new dx({check:"overwrite",tx:e})}function ul(e){return Xo(t=>t.normalize(e))}function fl(){return Xo(e=>e.trim())}function ll(){return Xo(e=>e.toLowerCase())}function dl(){return Xo(e=>e.toUpperCase())}function iv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function f3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function l3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function d3(e,t,r){return new e({type:"intersection",left:t,right:r})}function p3(e,t,r,o){let n=r instanceof we,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ee(i)})}function m3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function h3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function g3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function y3(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...ee(r)})}function b3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function x3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function sv(e,t){return new e({type:"file",...ee(t)})}function v3(e,t){return new e({type:"transform",transform:t})}function w3(e,t){return new e({type:"optional",innerType:t})}function _3(e,t){return new e({type:"nullable",innerType:t})}function E3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():lb(r)}})}function S3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function I3(e,t){return new e({type:"success",innerType:t})}function A3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function k3(e,t,r){return new e({type:"pipe",in:t,out:r})}function R3(e,t){return new e({type:"readonly",innerType:t})}function T3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function $3(e,t){return new e({type:"lazy",getter:t})}function O3(e,t){return new e({type:"promise",innerType:t})}function av(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function cv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function uv(e){let t=u5(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ac(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ac(n));}},e(r.value,r)));return t}function u5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function fv(e,t){let r=ee(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??Kf,c=e.Boolean??Wf,u=e.String??Fs,f=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:f,out:d,transform:((h,v)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?true:s.has(E)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:g,continue:false}),{})}),reverseTransform:((h,v)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function yc(e,t,r,o={}){let n=ee(o),i={...ee(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var pl=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let v=h;v.type="string";let{minimum:E,maximum:R,format:$,patterns:N,contentEncoding:O}=t._zod.bag;if(typeof E=="number"&&(v.minLength=E),typeof R=="number"&&(v.maxLength=R),$&&(v.format=i[$]??$,v.format===""&&delete v.format),O&&(v.contentEncoding=O),N&&N.size>0){let I=[...N];I.length===1?v.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(P=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:P.source}))]);}break}case "number":{let v=h,{minimum:E,maximum:R,format:$,multipleOf:N,exclusiveMaximum:O,exclusiveMinimum:I}=t._zod.bag;typeof $=="string"&&$.includes("int")?v.type="integer":v.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=I,v.exclusiveMinimum=true):v.exclusiveMinimum=I),typeof E=="number"&&(v.minimum=E,typeof I=="number"&&this.target!=="draft-4"&&(I>=E?delete v.minimum:delete v.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=O,v.exclusiveMaximum=true):v.exclusiveMaximum=O),typeof R=="number"&&(v.maximum=R,typeof O=="number"&&this.target!=="draft-4"&&(O<=R?delete v.maximum:delete v.exclusiveMaximum)),typeof N=="number"&&(v.multipleOf=N);break}case "boolean":{let v=h;v.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let v=h,{minimum:E,maximum:R}=t._zod.bag;typeof E=="number"&&(v.minItems=E),typeof R=="number"&&(v.maxItems=R),v.type="array",v.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let v=h;v.type="object",v.properties={};let E=n.shape;for(let N in E)v.properties[N]=this.process(E[N],{...d,path:[...d.path,"properties",N]});let R=new Set(Object.keys(E)),$=new Set([...R].filter(N=>{let O=n.shape[N]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));$.size>0&&(v.required=Array.from($)),n.catchall?._zod.def.type==="never"?v.additionalProperties=false:n.catchall?n.catchall&&(v.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=false);break}case "union":{let v=h,E=n.options.map((R,$)=>this.process(R,{...d,path:[...d.path,"anyOf",$]}));v.anyOf=E;break}case "intersection":{let v=h,E=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),R=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),$=O=>"allOf"in O&&Object.keys(O).length===1,N=[...$(E)?E.allOf:[E],...$(R)?R.allOf:[R]];v.allOf=N;break}case "tuple":{let v=h;v.type="array";let E=this.target==="draft-2020-12"?"prefixItems":"items",R=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",$=n.items.map((P,L)=>this.process(P,{...d,path:[...d.path,E,L]})),N=n.rest?this.process(n.rest,{...d,path:[...d.path,R,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=$,N&&(v.items=N)):this.target==="openapi-3.0"?(v.items={anyOf:$},N&&v.items.anyOf.push(N),v.minItems=$.length,N||(v.maxItems=$.length)):(v.items=$,N&&(v.additionalItems=N));let{minimum:O,maximum:I}=t._zod.bag;typeof O=="number"&&(v.minItems=O),typeof I=="number"&&(v.maxItems=I);break}case "record":{let v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),v.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let v=h,E=Lf(n.entries);E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),v.enum=E;break}case "literal":{let v=h,E=[];for(let R of n.values)if(R===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof R=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");E.push(Number(R));}else E.push(R);if(E.length!==0)if(E.length===1){let R=E[0];v.type=R===null?"null":typeof R,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[R]:v.const=R;}else E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),E.every(R=>typeof R=="boolean")&&(v.type="string"),E.every(R=>R===null)&&(v.type="null"),v.enum=E;break}case "file":{let v=h,E={type:"string",format:"binary",contentEncoding:"binary"},{minimum:R,maximum:$,mime:N}=t._zod.bag;R!==void 0&&(E.minLength=R),$!==void 0&&(E.maxLength=$),N?N.length===1?(E.contentMediaType=N[0],Object.assign(v,E)):v.anyOf=N.map(O=>({...E,contentMediaType:O})):Object.assign(v,E);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let v=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[v,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let v=h;v.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let v;try{v=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let v=h,E=t._zod.pattern;if(!E)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=E.source;break}case "pipe":{let v=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(v,d),a.ref=v;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let v=t._zod.innerType;this.process(v,d),a.ref=v;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=f=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let E=o.external.registry.get(f[0])?.id,R=o.external.uri??(N=>N);if(E)return {ref:R(E)};let $=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=$,{defId:$,ref:`${R("__shared")}#/${d}/${$}`}}if(f[1]===n)return {ref:"#"};let h=`#/${d}/`,v=f[1].schema.id??`__schema${this.counter++}`;return {defId:v,ref:h+v}},s=f=>{if(f[1].schema.$ref)return;let d=f[1],{ref:g,defId:h}=i(f);d.def={...d.schema},h&&(d.defId=h);let v=d.schema;for(let E in v)delete v[E];v.$ref=g;};if(o.cycles==="throw")for(let f of this.seen.entries()){let d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
61
61
 
62
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of this.seen.entries()){let d=f[1];if(t===f[0]){s(f);continue}if(o.external){let h=o.external.registry.get(f[0])?.id;if(t!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(d.cycle){s(f);continue}if(d.count>1&&o.reused==="ref"){s(f);continue}}let a=(f,d)=>{let g=this.seen.get(f),h=g.def??g.schema,v={...h};if(g.ref===null)return;let E=g.ref;if(g.ref=null,E){a(E,d);let R=this.seen.get(E).schema;R.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(R)):(Object.assign(h,R),Object.assign(h,v));}g.isParent||this.override({zodSchema:f,jsonSchema:h,path:g.path??[]});};for(let f of [...this.seen.entries()].reverse())a(f[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let f=o.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(f);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let f of this.seen.entries()){let d=f[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function lv(e,t){if(e instanceof pc){let o=new pl(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new pl(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.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 false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var c5={};var Cm={};Er(Cm,{ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,date:()=>pv,datetime:()=>dv,duration:()=>hv,time:()=>mv});var Om=B("ZodISODateTime",(e,t)=>{Ax.init(e,t),et.init(e,t);});function dv(e){return k1(Om,e)}var Nm=B("ZodISODate",(e,t)=>{kx.init(e,t),et.init(e,t);});function pv(e){return R1(Nm,e)}var Pm=B("ZodISOTime",(e,t)=>{Rx.init(e,t),et.init(e,t);});function mv(e){return T1(Pm,e)}var Bm=B("ZodISODuration",(e,t)=>{Tx.init(e,t),et.init(e,t);});function hv(e){return $1(Bm,e)}var f5=(e,t)=>{Ff.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Vf(e,r)},flatten:{value:r=>Hf(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ic,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ic,2);}},isEmpty:{get(){return e.issues.length===0}}});},T3=B("ZodError",f5),Yr=B("ZodError",f5,{Parent:Error});var gv=cc(Yr),yv=uc(Yr),bv=fc(Yr),xv=lc(Yr),vv=jp(Yr),wv=Fp(Yr),_v=Hp(Yr),Ev=Vp(Yr),Sv=Zp(Yr),Iv=Gp(Yr),Av=qp(Yr),kv=Wp(Yr);var Ae=B("ZodType",(e,t)=>(we.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(te.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Mr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>gv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>bv(e,r,o),e.parseAsync=async(r,o)=>yv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>xv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vv(e,r,o),e.decode=(r,o)=>wv(e,r,o),e.encodeAsync=async(r,o)=>_v(e,r,o),e.decodeAsync=async(r,o)=>Ev(e,r,o),e.safeEncode=(r,o)=>Sv(e,r,o),e.safeDecode=(r,o)=>Iv(e,r,o),e.safeEncodeAsync=async(r,o)=>Av(e,r,o),e.safeDecodeAsync=async(r,o)=>kv(e,r,o),e.refine=(r,o)=>e.check(J5(r,o)),e.superRefine=r=>e.check(Y5(r)),e.overwrite=r=>e.check(Xo(r)),e.optional=()=>Lm(e),e.nullable=()=>Um(e),e.nullish=()=>Lm(Um(e)),e.nonoptional=r=>U5(e,r),e.array=()=>Fm(e),e.or=r=>Jv([e,r]),e.and=r=>S5(e,r),e.transform=r=>Mm(e,Qv(r)),e.default=r=>C5(e,r),e.prefault=r=>L5(e,r),e.catch=r=>j5(e,r),e.pipe=r=>Mm(e,r),e.readonly=()=>V5(e),e.describe=r=>{let o=e.clone();return vo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return vo.get(e);let o=e.clone();return vo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$v=B("_ZodString",(e,t)=>{Fs.init(e,t),Ae.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(rl(...o)),e.includes=(...o)=>e.check(il(...o)),e.startsWith=(...o)=>e.check(sl(...o)),e.endsWith=(...o)=>e.check(al(...o)),e.min=(...o)=>e.check(Vi(...o)),e.max=(...o)=>e.check(hc(...o)),e.length=(...o)=>e.check(gc(...o)),e.nonempty=(...o)=>e.check(Vi(1,...o)),e.lowercase=o=>e.check(nl(o)),e.uppercase=o=>e.check(ol(o)),e.trim=()=>e.check(fl()),e.normalize=(...o)=>e.check(ul(...o)),e.toLowerCase=()=>e.check(ll()),e.toUpperCase=()=>e.check(dl());}),hl=B("ZodString",(e,t)=>{Fs.init(e,t),$v.init(e,t),e.email=r=>e.check(lm(Ov,r)),e.url=r=>e.check(el(Dm,r)),e.jwt=r=>e.check($m(Gv,r)),e.emoji=r=>e.check(gm(Nv,r)),e.guid=r=>e.check(Qf(zm,r)),e.uuid=r=>e.check(dm(ei,r)),e.uuidv4=r=>e.check(pm(ei,r)),e.uuidv6=r=>e.check(mm(ei,r)),e.uuidv7=r=>e.check(hm(ei,r)),e.nanoid=r=>e.check(ym(Pv,r)),e.guid=r=>e.check(Qf(zm,r)),e.cuid=r=>e.check(bm(Bv,r)),e.cuid2=r=>e.check(xm(Cv,r)),e.ulid=r=>e.check(vm(zv,r)),e.base64=r=>e.check(km(Hv,r)),e.base64url=r=>e.check(Rm(Vv,r)),e.xid=r=>e.check(wm(Lv,r)),e.ksuid=r=>e.check(_m(Uv,r)),e.ipv4=r=>e.check(Em(Mv,r)),e.ipv6=r=>e.check(Sm(Dv,r)),e.cidrv4=r=>e.check(Im(jv,r)),e.cidrv6=r=>e.check(Am(Fv,r)),e.e164=r=>e.check(Tm(Zv,r)),e.datetime=r=>e.check(dv(r)),e.date=r=>e.check(pv(r)),e.time=r=>e.check(mv(r)),e.duration=r=>e.check(hv(r));});function Rv(e){return S1(hl,e)}var et=B("ZodStringFormat",(e,t)=>{Ye.init(e,t),$v.init(e,t);}),Ov=B("ZodEmail",(e,t)=>{yx.init(e,t),et.init(e,t);});function O3(e){return lm(Ov,e)}var zm=B("ZodGUID",(e,t)=>{hx.init(e,t),et.init(e,t);});function N3(e){return Qf(zm,e)}var ei=B("ZodUUID",(e,t)=>{gx.init(e,t),et.init(e,t);});function P3(e){return dm(ei,e)}function B3(e){return pm(ei,e)}function C3(e){return mm(ei,e)}function z3(e){return hm(ei,e)}var Dm=B("ZodURL",(e,t)=>{bx.init(e,t),et.init(e,t);});function L3(e){return el(Dm,e)}function U3(e){return el(Dm,{protocol:/^https?$/,hostname:An.domain,...te.normalizeParams(e)})}var Nv=B("ZodEmoji",(e,t)=>{xx.init(e,t),et.init(e,t);});function M3(e){return gm(Nv,e)}var Pv=B("ZodNanoID",(e,t)=>{vx.init(e,t),et.init(e,t);});function D3(e){return ym(Pv,e)}var Bv=B("ZodCUID",(e,t)=>{wx.init(e,t),et.init(e,t);});function j3(e){return bm(Bv,e)}var Cv=B("ZodCUID2",(e,t)=>{_x.init(e,t),et.init(e,t);});function F3(e){return xm(Cv,e)}var zv=B("ZodULID",(e,t)=>{Ex.init(e,t),et.init(e,t);});function H3(e){return vm(zv,e)}var Lv=B("ZodXID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function V3(e){return wm(Lv,e)}var Uv=B("ZodKSUID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function Z3(e){return _m(Uv,e)}var Mv=B("ZodIPv4",(e,t)=>{$x.init(e,t),et.init(e,t);});function G3(e){return Em(Mv,e)}var Dv=B("ZodIPv6",(e,t)=>{Ox.init(e,t),et.init(e,t);});function q3(e){return Sm(Dv,e)}var jv=B("ZodCIDRv4",(e,t)=>{Nx.init(e,t),et.init(e,t);});function W3(e){return Im(jv,e)}var Fv=B("ZodCIDRv6",(e,t)=>{Px.init(e,t),et.init(e,t);});function K3(e){return Am(Fv,e)}var Hv=B("ZodBase64",(e,t)=>{Cx.init(e,t),et.init(e,t);});function J3(e){return km(Hv,e)}var Vv=B("ZodBase64URL",(e,t)=>{zx.init(e,t),et.init(e,t);});function Y3(e){return Rm(Vv,e)}var Zv=B("ZodE164",(e,t)=>{Lx.init(e,t),et.init(e,t);});function X3(e){return Tm(Zv,e)}var Gv=B("ZodJWT",(e,t)=>{Ux.init(e,t),et.init(e,t);});function Q3(e){return $m(Gv,e)}var gl=B("ZodCustomStringFormat",(e,t)=>{Mx.init(e,t),et.init(e,t);});function eB(e,t,r={}){return yc(gl,e,t,r)}function tB(e){return yc(gl,"hostname",An.hostname,e)}function rB(e){return yc(gl,"hex",An.hex,e)}function nB(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=An[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return yc(gl,o,n,t)}var yl=B("ZodNumber",(e,t)=>{nm.init(e,t),Ae.init(e,t),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.int=o=>e.check(Tv(o)),e.safe=o=>e.check(Tv(o)),e.positive=o=>e.check(Yo(0,o)),e.nonnegative=o=>e.check(Jr(0,o)),e.negative=o=>e.check(Jo(0,o)),e.nonpositive=o=>e.check(kn(0,o)),e.multipleOf=(o,n)=>e.check(Hs(o,n)),e.step=(o,n)=>e.check(Hs(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function l5(e){return O1(yl,e)}var xc=B("ZodNumberFormat",(e,t)=>{Dx.init(e,t),yl.init(e,t);});function Tv(e){return P1(xc,e)}function oB(e){return B1(xc,e)}function iB(e){return C1(xc,e)}function sB(e){return z1(xc,e)}function aB(e){return L1(xc,e)}var bl=B("ZodBoolean",(e,t)=>{Wf.init(e,t),Ae.init(e,t);});function d5(e){return U1(bl,e)}var xl=B("ZodBigInt",(e,t)=>{om.init(e,t),Ae.init(e,t),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.positive=o=>e.check(Yo(BigInt(0),o)),e.negative=o=>e.check(Jo(BigInt(0),o)),e.nonpositive=o=>e.check(kn(BigInt(0),o)),e.nonnegative=o=>e.check(Jr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Hs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function cB(e){return D1(xl,e)}var qv=B("ZodBigIntFormat",(e,t)=>{jx.init(e,t),xl.init(e,t);});function uB(e){return F1(qv,e)}function fB(e){return H1(qv,e)}var p5=B("ZodSymbol",(e,t)=>{Fx.init(e,t),Ae.init(e,t);});function lB(e){return V1(p5,e)}var m5=B("ZodUndefined",(e,t)=>{Hx.init(e,t),Ae.init(e,t);});function dB(e){return Z1(m5,e)}var h5=B("ZodNull",(e,t)=>{Vx.init(e,t),Ae.init(e,t);});function g5(e){return G1(h5,e)}var y5=B("ZodAny",(e,t)=>{Zx.init(e,t),Ae.init(e,t);});function pB(){return q1(y5)}var b5=B("ZodUnknown",(e,t)=>{Gx.init(e,t),Ae.init(e,t);});function bc(){return W1(b5)}var x5=B("ZodNever",(e,t)=>{qx.init(e,t),Ae.init(e,t);});function Wv(e){return K1(x5,e)}var v5=B("ZodVoid",(e,t)=>{Wx.init(e,t),Ae.init(e,t);});function mB(e){return J1(v5,e)}var jm=B("ZodDate",(e,t)=>{Kx.init(e,t),Ae.init(e,t),e.min=(o,n)=>e.check(Jr(o,n)),e.max=(o,n)=>e.check(kn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function hB(e){return Y1(jm,e)}var w5=B("ZodArray",(e,t)=>{Jx.init(e,t),Ae.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Vi(r,o)),e.nonempty=r=>e.check(Vi(1,r)),e.max=(r,o)=>e.check(hc(r,o)),e.length=(r,o)=>e.check(gc(r,o)),e.unwrap=()=>e.element;});function Fm(e,t){return iv(w5,e,t)}function gB(e){let t=e._zod.def.shape;return Xv(Object.keys(t))}var Hm=B("ZodObject",(e,t)=>{Yx.init(e,t),Ae.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Xv(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:bc()}),e.loose=()=>e.clone({...e._zod.def,catchall:bc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>te.extend(e,r),e.safeExtend=r=>te.safeExtend(e,r),e.merge=r=>te.merge(e,r),e.pick=r=>te.pick(e,r),e.omit=r=>te.omit(e,r),e.partial=(...r)=>te.partial(ew,e,r[0]),e.required=(...r)=>te.required(tw,e,r[0]);});function yB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Hm(r)}function bB(e,t){return new Hm({type:"object",shape:e,catchall:Wv(),...te.normalizeParams(t)})}function xB(e,t){return new Hm({type:"object",shape:e,catchall:bc(),...te.normalizeParams(t)})}var Kv=B("ZodUnion",(e,t)=>{im.init(e,t),Ae.init(e,t),e.options=t.options;});function Jv(e,t){return new Kv({type:"union",options:e,...te.normalizeParams(t)})}var _5=B("ZodDiscriminatedUnion",(e,t)=>{Kv.init(e,t),Xx.init(e,t);});function vB(e,t,r){return new _5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var E5=B("ZodIntersection",(e,t)=>{Qx.init(e,t),Ae.init(e,t);});function S5(e,t){return new E5({type:"intersection",left:e,right:t})}var I5=B("ZodTuple",(e,t)=>{sm.init(e,t),Ae.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function A5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new I5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var Yv=B("ZodRecord",(e,t)=>{e1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function k5(e,t,r){return new Yv({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function wB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new Yv({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var R5=B("ZodMap",(e,t)=>{t1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function _B(e,t,r){return new R5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var T5=B("ZodSet",(e,t)=>{r1.init(e,t),Ae.init(e,t),e.min=(...r)=>e.check(Vs(...r)),e.nonempty=r=>e.check(Vs(1,r)),e.max=(...r)=>e.check(mc(...r)),e.size=(...r)=>e.check(tl(...r));});function EB(e,t){return new T5({type:"set",valueType:e,...te.normalizeParams(t)})}var ml=B("ZodEnum",(e,t)=>{n1.init(e,t),Ae.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})};});function Xv(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ml({type:"enum",entries:r,...te.normalizeParams(t)})}function SB(e,t){return new ml({type:"enum",entries:e,...te.normalizeParams(t)})}var $5=B("ZodLiteral",(e,t)=>{o1.init(e,t),Ae.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function IB(e,t){return new $5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var O5=B("ZodFile",(e,t)=>{i1.init(e,t),Ae.init(e,t),e.min=(r,o)=>e.check(Vs(r,o)),e.max=(r,o)=>e.check(mc(r,o)),e.mime=(r,o)=>e.check(cl(Array.isArray(r)?r:[r],o));});function AB(e){return sv(O5,e)}var N5=B("ZodTransform",(e,t)=>{s1.init(e,t),Ae.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function Qv(e){return new N5({type:"transform",transform:e})}var ew=B("ZodOptional",(e,t)=>{a1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Lm(e){return new ew({type:"optional",innerType:e})}var P5=B("ZodNullable",(e,t)=>{c1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Um(e){return new P5({type:"nullable",innerType:e})}function kB(e){return Lm(Um(e))}var B5=B("ZodDefault",(e,t)=>{u1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function C5(e,t){return new B5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var z5=B("ZodPrefault",(e,t)=>{f1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function L5(e,t){return new z5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var tw=B("ZodNonOptional",(e,t)=>{l1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function U5(e,t){return new tw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var M5=B("ZodSuccess",(e,t)=>{d1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function RB(e){return new M5({type:"success",innerType:e})}var D5=B("ZodCatch",(e,t)=>{p1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function j5(e,t){return new D5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var F5=B("ZodNaN",(e,t)=>{m1.init(e,t),Ae.init(e,t);});function TB(e){return Q1(F5,e)}var rw=B("ZodPipe",(e,t)=>{h1.init(e,t),Ae.init(e,t),e.in=t.in,e.out=t.out;});function Mm(e,t){return new rw({type:"pipe",in:e,out:t})}var nw=B("ZodCodec",(e,t)=>{rw.init(e,t),Kf.init(e,t);});function $B(e,t,r){return new nw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var H5=B("ZodReadonly",(e,t)=>{g1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function V5(e){return new H5({type:"readonly",innerType:e})}var Z5=B("ZodTemplateLiteral",(e,t)=>{y1.init(e,t),Ae.init(e,t);});function OB(e,t){return new Z5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var G5=B("ZodLazy",(e,t)=>{v1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.getter();});function q5(e){return new G5({type:"lazy",getter:e})}var W5=B("ZodPromise",(e,t)=>{x1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function NB(e){return new W5({type:"promise",innerType:e})}var K5=B("ZodFunction",(e,t)=>{b1.init(e,t),Ae.init(e,t);});function PB(e){return new K5({type:"function",input:Array.isArray(e?.input)?A5(e?.input):e?.input??Fm(bc()),output:e?.output??bc()})}var Vm=B("ZodCustom",(e,t)=>{w1.init(e,t),Ae.init(e,t);});function BB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function CB(e,t){return av(Vm,e??(()=>true),t)}function J5(e,t={}){return cv(Vm,e,t)}function Y5(e){return uv(e)}function zB(e,t={error:`Input not instance of ${e.name}`}){let r=new Vm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var LB=(...e)=>fv({Codec:nw,Boolean:bl,String:hl},...e);function UB(e){let t=q5(()=>Jv([Rv(e),l5(),d5(),g5(),Fm(t),k5(Rv(),t)]));return t}function MB(e,t){return Mm(Qv(e),t)}var DB={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 jB(e){wt({customError:e});}function FB(){return wt().customError}var ow;ow||(ow={});var iw={};Er(iw,{bigint:()=>GB,boolean:()=>ZB,date:()=>qB,number:()=>VB,string:()=>HB});function HB(e){return I1(hl,e)}function VB(e){return N1(yl,e)}function ZB(e){return M1(bl,e)}function GB(e){return j1(xl,e)}function qB(e){return X1(jm,e)}wt(am());var WB="https://api.adland.space",KB="http://localhost:3069";function JB(e,t){return e?e.replace(/\/$/,""):t==="development"?KB:WB}function YB(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:XB,nodeEnv:QB}=YB(),sw=JB(XB,QB);function eC(e,t){return Object.assign(e,{choices:t})}function wc(e){return {...e,process:t=>tC(e,t),safeProcess:t=>rC(e,t)}}async function tC(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function rC(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Jn=`${sw}/adland`;async function vl(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function vc(e){return fetch(e).then(t=>t.json())}var Yn={verify:{cast({hash:e}){return vl(`${Jn}/verify/cast`,{hash:e})},miniapp({domain:e}){return vl(`${Jn}/verify/miniapp`,{domain:e})},profile({fid:e}){return vl(`${Jn}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return vl(`${Jn}/verify/token`,{address:e,chainId:t})},tweet({url:e}){return vl(`${Jn}/verify/tweet`,{url:e})}},metadata:{cast({hash:e}){return vc(`${Jn}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return vc(`${Jn}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return vc(`${Jn}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return vc(`${Jn}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return vc(`${Jn}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)},tweet({url:e}){return vc(`${Jn}/metadata/tweet?url=${encodeURIComponent(e)}`)}}};wc({type:"cast",data:pe.object({hash:pe.string().nonempty("Hash is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await Yn.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await Yn.metadata.cast({hash:e});return {displayName:t.author.displayName,username:t.author.username,pfpUrl:t.author.pfp?.url,text:t.text,timestamp:String(t.timestamp)}}});wc({type:"link",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({title:pe.string().optional(),description:pe.string().optional(),image:pe.string().optional(),icon:pe.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await Yn.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});wc({type:"miniapp",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({icon:pe.string().optional(),title:pe.string().optional(),description:pe.string().optional(),imageUrl:pe.string().optional(),creator:pe.object({fid:pe.number(),username:pe.string().nullable().optional(),displayName:pe.string().nullable().optional(),pfpUrl:pe.string().nullable().optional()}).nullable().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await Yn.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await Yn.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl,creator:t.creator}}});wc({type:"farcasterProfile",data:pe.object({fid:pe.string().nonempty("Fid is required")}),metadata:pe.object({pfpUrl:pe.string().optional(),bio:pe.string().optional(),username:pe.string().optional(),displayName:pe.string().optional(),followers:pe.number().optional(),following:pe.number().optional(),pro:pe.boolean().optional()}),async verify({fid:e}){if(!(await Yn.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await Yn.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});var nC="eip155",X5=[{chainId:1,label:"Ethereum",coingeckoPlatform:"ethereum"},{chainId:8453,label:"Base",coingeckoPlatform:"base"},{chainId:42161,label:"Arbitrum",coingeckoPlatform:"arbitrum-one"},{chainId:4663,label:"Robinhood",coingeckoPlatform:null}],oC=X5.map(e=>e.chainId);function iC(e){return oC.includes(e)}function Q5(e,t){return `${nC}:${e}/erc20:${t}`}wc({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:eC(pe.number().int().positive("Chain ID is required").refine(iC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),X5.map(e=>({label:`${e.label} (${e.chainId})`,value:e.chainId})))}),metadata:pe.object({name:pe.string().optional(),symbol:pe.string().optional(),decimals:pe.number().optional(),logoURI:pe.string().optional()}),async verify({address:e,chainId:t}){if(!(await Yn.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await Yn.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var sC=/(?:twitter\.com|x\.com)\/\w+\/status\/\d+/;wc({type:"tweet",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({url:e}){if(!sC.test(e))throw new Error("Not an X post link \u2014 expected https://x.com/user/status/123");if(!(await Yn.verify.tweet({url:e})).verified)throw new Error("That post could not be read \u2014 it may be deleted, or from a protected account")},async getMetadata({url:e}){let t=await Yn.metadata.tweet({url:e});return {displayName:t.author.name,username:t.author.username,pfpUrl:t.author.pfpUrl,text:t.text,timestamp:String(Date.parse(t.createdAt)),image:t.image??void 0}}});var wl={};Er(wl,{InvalidDomainManifest:()=>aw,RejectedByUser:()=>cw});var Xn=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var aw=class extends Xn{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},cw=class extends Xn{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var _c={};Er(_c,{RejectedByUser:()=>uw});var uw=class extends Xn{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Ec={};Er(Ec,{GenericError:()=>dw,InvalidDomain:()=>lw,RejectedByUser:()=>fw});var fw=class extends Xn{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},lw=class extends Xn{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},dw=class extends Xn{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>CC,DIRTY:()=>Zs,EMPTY_PATH:()=>pC,INVALID:()=>ge,NEVER:()=>xz,OK:()=>Sr,ParseStatus:()=>dr,Schema:()=>ke,ZodAny:()=>qi,ZodArray:()=>oi,ZodBigInt:()=>qs,ZodBoolean:()=>Ws,ZodBranded:()=>El,ZodCatch:()=>ia,ZodDate:()=>Ks,ZodDefault:()=>oa,ZodDiscriminatedUnion:()=>Wm,ZodEffects:()=>$n,ZodEnum:()=>ra,ZodError:()=>Xr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Jm,ZodIntersection:()=>Qs,ZodIssueCode:()=>Y,ZodLazy:()=>ea,ZodLiteral:()=>ta,ZodMap:()=>Tc,ZodNaN:()=>Oc,ZodNativeEnum:()=>na,ZodNever:()=>Qn,ZodNull:()=>Ys,ZodNullable:()=>Eo,ZodNumber:()=>Gs,ZodObject:()=>Qr,ZodOptional:()=>Rn,ZodParsedType:()=>ce,ZodPipeline:()=>Sl,ZodPromise:()=>Wi,ZodReadonly:()=>sa,ZodRecord:()=>Km,ZodSchema:()=>ke,ZodSet:()=>$c,ZodString:()=>Gi,ZodSymbol:()=>kc,ZodTransformer:()=>$n,ZodTuple:()=>_o,ZodType:()=>ke,ZodUndefined:()=>Js,ZodUnion:()=>Xs,ZodUnknown:()=>ni,ZodVoid:()=>Rc,addIssueToContext:()=>se,any:()=>VC,array:()=>WC,bigint:()=>MC,boolean:()=>fI,coerce:()=>bz,custom:()=>aI,date:()=>DC,datetimeRegex:()=>iI,defaultErrorMap:()=>ti,discriminatedUnion:()=>XC,effect:()=>fz,enum:()=>az,function:()=>oz,getErrorMap:()=>Sc,getParsedType:()=>wo,instanceof:()=>LC,intersection:()=>QC,isAborted:()=>Gm,isAsync:()=>Ic,isDirty:()=>qm,isValid:()=>Zi,late:()=>zC,lazy:()=>iz,literal:()=>sz,makeIssue:()=>_l,map:()=>rz,nan:()=>UC,nativeEnum:()=>cz,never:()=>GC,null:()=>HC,nullable:()=>dz,number:()=>uI,object:()=>KC,objectUtil:()=>pw,oboolean:()=>yz,onumber:()=>gz,optional:()=>lz,ostring:()=>hz,pipeline:()=>mz,preprocess:()=>pz,promise:()=>uz,quotelessJson:()=>fC,record:()=>tz,set:()=>nz,setErrorMap:()=>dC,strictObject:()=>JC,string:()=>cI,symbol:()=>jC,transformer:()=>fz,tuple:()=>ez,undefined:()=>FC,union:()=>YC,unknown:()=>ZC,util:()=>Ne,void:()=>qC});var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(Ne||(Ne={}));var pw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(pw||(pw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var Y=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Xr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Xr.create=e=>new Xr(e);var lC=(e,t)=>{let r;switch(e.code){case Y.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e);}return {message:r}},ti=lC;var eI=ti;function dC(e){eI=e;}function Sc(){return eI}var _l=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},pC=[];function se(e,t){let r=Sc(),o=_l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ti?void 0:ti].filter(n=>!!n)});e.common.issues.push(o);}var dr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ge;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},ge=Object.freeze({status:"aborted"}),Zs=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Gm=e=>e.status==="aborted",qm=e=>e.status==="dirty",Zi=e=>e.status==="valid",Ic=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var Tn=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},tI=(e,t)=>{if(Zi(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new Xr(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ke=class{get description(){return this._def.description}_getType(t){return wo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new dr,ctx:{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ic(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return tI(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return Zi(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Zi(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Ic(n)?n:Promise.resolve(n));return tI(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:Y.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new $n({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return Rn.create(this,this._def)}nullable(){return Eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oi.create(this)}promise(){return Wi.create(this,this._def)}or(t){return Xs.create([this,t],this._def)}and(t){return Qs.create(this,t,this._def)}transform(t){return new $n({...Ee(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oa({...Ee(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new El({typeName:be.ZodBranded,type:this,...Ee(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ia({...Ee(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return sa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mC=/^c[^\s-]{8,}$/i,hC=/^[0-9a-z]+$/,gC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bC=/^[a-z0-9_-]{21}$/i,xC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vC=/^[-+]?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)?)??$/,wC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_C="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",mw,EC=/^(?:(?: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])$/,SC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,IC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,AC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,RC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nI="((\\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])))",TC=new RegExp(`^${nI}$`);function oI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function $C(e){return new RegExp(`^${oI(e)}$`)}function iI(e){let t=`${nI}T${oI(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function OC(e,t){return !!((t==="v4"||!t)&&EC.test(e)||(t==="v6"||!t)&&IC.test(e))}function NC(e,t){if(!xC.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function PC(e,t){return !!((t==="v4"||!t)&&SC.test(e)||(t==="v6"||!t)&&AC.test(e))}var Gi=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.string,received:i.parsedType}),ge}let o=new dr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")wC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")mw||(mw=new RegExp(_C,"u")),mw.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")yC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")bC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")mC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")hC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")gC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:Y.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:Y.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?iI(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?TC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?$C(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?vC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?OC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?NC(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?PC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?kC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?RC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:Y.invalid_string,message:i.message}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:Y.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Gi.create=e=>new Gi({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function BC(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Gs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.number,received:i.parsedType}),ge}let o,n=new dr;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?BC(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};Gs.create=e=>new Gs({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var qs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new dr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qs.create=e=>new qs({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Ws=class extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.boolean,received:o.parsedType}),ge}return Sr(t.data)}};Ws.create=e=>new Ws({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Ks=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_date}),ge}let o=new dr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ks.create=e=>new Ks({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var kc=class extends ke{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.symbol,received:o.parsedType}),ge}return Sr(t.data)}};kc.create=e=>new kc({typeName:be.ZodSymbol,...Ee(e)});var Js=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.undefined,received:o.parsedType}),ge}return Sr(t.data)}};Js.create=e=>new Js({typeName:be.ZodUndefined,...Ee(e)});var Ys=class extends ke{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.null,received:o.parsedType}),ge}return Sr(t.data)}};Ys.create=e=>new Ys({typeName:be.ZodNull,...Ee(e)});var qi=class extends ke{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};qi.create=e=>new qi({typeName:be.ZodAny,...Ee(e)});var ni=class extends ke{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Sr(t.data)}};ni.create=e=>new ni({typeName:be.ZodUnknown,...Ee(e)});var Qn=class extends ke{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.never,received:r.parsedType}),ge}};Qn.create=e=>new Qn({typeName:be.ZodNever,...Ee(e)});var Rc=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.void,received:o.parsedType}),ge}return Sr(t.data)}};Rc.create=e=>new Rc({typeName:be.ZodVoid,...Ee(e)});var oi=class e extends ke{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:Y.invalid_type,expected:ce.array,received:r.parsedType}),ge;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?Y.too_big:Y.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:Y.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:Y.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Tn(r,s,r.path,a)))).then(s=>dr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Tn(r,s,r.path,a)));return dr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};oi.create=(e,t)=>new oi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...Ee(t)});function Ac(e){if(e instanceof Qr){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Rn.create(Ac(o));}return new Qr({...e._def,shape:()=>t})}else return e instanceof oi?new oi({...e._def,type:Ac(e.element)}):e instanceof Rn?Rn.create(Ac(e.unwrap())):e instanceof Eo?Eo.create(Ac(e.unwrap())):e instanceof _o?_o.create(e.items.map(t=>Ac(t))):e}var Qr=class e extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:Y.invalid_type,expected:ce.object,received:u.parsedType}),ge}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Qn&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let f=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new Tn(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof Qn){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(u==="strict")a.length>0&&(se(n,{code:Y.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let f of a){let d=n.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new Tn(n,d,n.path,f)),alwaysSet:f in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let d=await f.key,g=await f.value;u.push({key:d,value:g,alwaysSet:f.alwaysSet});}return u}).then(u=>dr.mergeObjectSync(o,u)):dr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Ac(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof Rn;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return sI(Ne.objectKeys(this.shape))}};Qr.create=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.strictCreate=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strict",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.lazycreate=(e,t)=>new Qr({shape:e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});var Xs=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Xr(a.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:s}),ge}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Xr(c));return se(r,{code:Y.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}};Xs.create=(e,t)=>new Xs({options:e,typeName:be.ZodUnion,...Ee(t)});var ri=e=>e instanceof ea?ri(e.schema):e instanceof $n?ri(e.innerType()):e instanceof ta?[e.value]:e instanceof ra?e.options:e instanceof na?Ne.objectValues(e.enum):e instanceof oa?ri(e._def.innerType):e instanceof Js?[void 0]:e instanceof Ys?[null]:e instanceof Rn?[void 0,...ri(e.unwrap())]:e instanceof Eo?[null,...ri(e.unwrap())]:e instanceof El||e instanceof sa?ri(e.unwrap()):e instanceof ia?ri(e._def.innerType):[],Wm=class e extends ke{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:Y.invalid_type,expected:ce.object,received:r.parsedType}),ge;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=ri(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ee(o)})}};function hw(e,t){let r=wo(e),o=wo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=hw(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=hw(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var Qs=class extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Gm(i)||Gm(s))return ge;let a=hw(i.value,s.value);return a.valid?((qm(i)||qm(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:Y.invalid_intersection_types}),ge)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Qs.create=(e,t,r)=>new Qs({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:Y.invalid_type,expected:ce.array,received:o.parsedType}),ge;if(o.data.length<this._def.items.length)return se(o,{code:Y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),ge;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:Y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Tn(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>dr.mergeArray(r,s)):dr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:e,typeName:be.ZodTuple,rest:null,...Ee(t)})};var Km=class e extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:Y.invalid_type,expected:ce.object,received:o.parsedType}),ge;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Tn(o,a,o.path,a)),value:s._parse(new Tn(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?dr.mergeObjectAsync(r,n):dr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ke?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:Gi.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},Tc=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:Y.invalid_type,expected:ce.map,received:o.parsedType}),ge;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Tn(o,a,o.path,[u,"key"])),value:i._parse(new Tn(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}}}};Tc.create=(e,t,r)=>new Tc({valueType:t,keyType:e,typeName:be.ZodMap,...Ee(r)});var $c=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:Y.invalid_type,expected:ce.set,received:o.parsedType}),ge;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:Y.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:Y.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let f of c){if(f.status==="aborted")return ge;f.status==="dirty"&&r.dirty(),u.add(f.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Tn(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};$c.create=(e,t)=>new $c({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...Ee(t)});var Jm=class e extends ke{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:Y.invalid_type,expected:ce.function,received:r.parsedType}),ge;function o(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function n(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wi){let a=this;return Sr(async function(...c){let u=new Xr([]),f=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Sr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Xr([o(c,u.error)]);let f=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Xr([n(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_o.create(t).rest(ni.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||_o.create([]).rest(ni.create()),returns:r||ni.create(),typeName:be.ZodFunction,...Ee(o)})}},ea=class extends ke{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ea.create=(e,t)=>new ea({getter:e,typeName:be.ZodLazy,...Ee(t)});var ta=class extends ke{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),ge}return {status:"valid",value:t.data}}get value(){return this._def.value}};ta.create=(e,t)=>new ta({value:e,typeName:be.ZodLiteral,...Ee(t)});function sI(e,t){return new ra({values:e,typeName:be.ZodEnum,...Ee(t)})}var ra=class e extends ke{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:Ne.joinValues(o),received:r.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:o}),ge}return Sr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ra.create=sI;var na=class extends ke{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return se(o,{expected:Ne.joinValues(n),received:o.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return se(o,{received:o.data,code:Y.invalid_enum_value,options:n}),ge}return Sr(t.data)}get enum(){return this._def.values}};na.create=(e,t)=>new na({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Wi=class extends ke{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:Y.invalid_type,expected:ce.promise,received:r.parsedType}),ge;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Sr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wi.create=(e,t)=>new Wi({type:e,typeName:be.ZodPromise,...Ee(t)});var $n=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ge;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?ge:c.status==="dirty"?Zs(c.value):r.value==="dirty"?Zs(c.value):c});{if(r.value==="aborted")return ge;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?ge:a.status==="dirty"?Zs(a.value):r.value==="dirty"?Zs(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Zi(s))return ge;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Zi(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):ge);Ne.assertNever(n);}};$n.create=(e,t,r)=>new $n({schema:e,typeName:be.ZodEffects,effect:t,...Ee(r)});$n.createWithPreprocess=(e,t,r)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...Ee(r)});var Rn=class extends ke{_parse(t){return this._getType(t)===ce.undefined?Sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:be.ZodOptional,...Ee(t)});var Eo=class extends ke{_parse(t){return this._getType(t)===ce.null?Sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Eo.create=(e,t)=>new Eo({innerType:e,typeName:be.ZodNullable,...Ee(t)});var oa=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oa.create=(e,t)=>new oa({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var ia=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ic(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};ia.create=(e,t)=>new ia({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Oc=class extends ke{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.nan,received:o.parsedType}),ge}return {status:"valid",value:t.data}}};Oc.create=e=>new Oc({typeName:be.ZodNaN,...Ee(e)});var CC=Symbol("zod_brand"),El=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Sl=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ge:i.status==="dirty"?(r.dirty(),Zs(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ge:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:be.ZodPipeline})}},sa=class extends ke{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Zi(n)&&(n.value=Object.freeze(n.value)),n);return Ic(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};sa.create=(e,t)=>new sa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function rI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function aI(e,t={},r){return e?qi.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=rI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=rI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):qi.create()}var zC={object:Qr.lazycreate},be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(be||(be={}));var LC=(e,t={message:`Input not instance of ${e.name}`})=>aI(r=>r instanceof e,t),cI=Gi.create,uI=Gs.create,UC=Oc.create,MC=qs.create,fI=Ws.create,DC=Ks.create,jC=kc.create,FC=Js.create,HC=Ys.create,VC=qi.create,ZC=ni.create,GC=Qn.create,qC=Rc.create,WC=oi.create,KC=Qr.create,JC=Qr.strictCreate,YC=Xs.create,XC=Wm.create,QC=Qs.create,ez=_o.create,tz=Km.create,rz=Tc.create,nz=$c.create,oz=Jm.create,iz=ea.create,sz=ta.create,az=ra.create,cz=na.create,uz=Wi.create,fz=$n.create,lz=Rn.create,dz=Eo.create,pz=$n.createWithPreprocess,mz=Sl.create,hz=()=>cI().optional(),gz=()=>uI().optional(),yz=()=>fI().optional(),bz={string:(e=>Gi.create({...e,coerce:true})),number:(e=>Gs.create({...e,coerce:true})),boolean:(e=>Ws.create({...e,coerce:true})),bigint:(e=>qs.create({...e,coerce:true})),date:(e=>Ks.create({...e,coerce:true}))};var xz=ge;var vz=/[@#$%^&*+=/\\|~«»]/,wz=/(!{2,}|\?{2,}|-{2,})/,_z=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,aa=({max:e,noSpaces:t}={})=>(t?ie.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ie.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!_z.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!vz.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!wz.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),ir=ie.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),Il=ie.string().max(32),Ym=ie.string().max(32),Ez=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,lI=ie.string().regex(Ez,{message:"Invalid CAIP-19 asset ID"}),Al=ie.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),Sz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,dI=ie.string().max(1024).regex(Sz,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),pI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),mI=ie.object({header:ie.string(),payload:ie.string(),signature:ie.string()});ie.object({fid:ie.number(),type:ie.literal("app_key"),key:ie.string().startsWith("0x")});var Iz=ie.object({type:ie.literal("launch_frame"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Az=ie.object({type:ie.literal("launch_miniapp"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),kz=ie.object({type:ie.literal("view_token"),token:lI}),Rz=ie.discriminatedUnion("type",[Az,kz,Iz]),Tz=ie.object({title:Ym,action:Rz});ie.object({version:ie.union([ie.string(),ie.number()]).transform(e=>String(e)).pipe(ie.union([ie.literal("next"),ie.literal("1")])),imageUrl:ir,aspectRatio:pI.optional(),button:Tz});var gw=ie.object({url:ie.string(),token:ie.string()});ie.object({notificationId:ie.string().max(128),title:ie.string().max(32),body:ie.string().max(128),targetUrl:ir,tokens:ie.string().array().max(100)});ie.object({result:ie.object({successfulTokens:ie.array(ie.string()),invalidTokens:ie.array(ie.string()),rateLimitedTokens:ie.array(ie.string())})});var $z=ie.object({event:ie.literal("miniapp_added"),notificationDetails:gw.optional()}),Oz=ie.object({event:ie.literal("miniapp_removed")}),Nz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:gw.required()}),Pz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[$z,Oz,Nz,Pz]);var hI=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var Bz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],Cz=ie.enum(Bz),zz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),Lz=aa({max:30}),Uz=aa({max:170}),Mz=ie.array(ir).max(3),Dz=ie.array(aa({max:20,noSpaces:true})).max(5),jz=aa({max:30}),Fz=aa({max:30}),Hz=aa({max:100}),Vz=ie.boolean(),Zz=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function yI(e){let t=new Set(e);return Array.from(t)}var Gz=ie.array(ie.enum(Zz)).transform(yI),qz=ie.array(ie.enum(hI)).transform(yI),gI=ie.object({version:zz,name:Il,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Ym.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional(),webhookUrl:ir.optional(),subtitle:Lz.optional(),description:Uz.optional(),screenshotUrls:Mz.optional(),primaryCategory:Cz.optional(),tags:Dz.optional(),heroImageUrl:ir.optional(),tagline:jz.optional(),ogTitle:Fz.optional(),ogDescription:Hz.optional(),ogImageUrl:ir.optional(),noindex:Vz.optional(),requiredChains:Gz.optional(),requiredCapabilities:qz.optional(),castShareUrl:ir.optional(),canonicalDomain:dI.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ie.object({accountAssociation:mI,miniapp:gI.optional(),frame:gI.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var xe=Ko(Rl());sh();ai();Vw();wa();xa();var $o=BigInt(0),Fr=BigInt(1),_A=BigInt(2),GL=BigInt(8),qL={zip215:true};function WL(e){let t=Cl(e);return to(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function EA(e){let t=WL(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=_A<<BigInt(a*8)-Fr,f=r.create,d=di(t.n,t.nBitLength);function g(x,_){let k=r.sqr(x),w=r.sqr(_),p=r.add(r.mul(t.a,k),w),A=r.add(r.ONE,r.mul(t.d,r.mul(k,w)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((x,_)=>{try{return {isValid:!0,value:r.sqrt(x*r.inv(_))}}catch{return {isValid:false,value:$o}}}),v=t.adjustScalarBytes||(x=>x),E=t.domain||((x,_,k)=>{if(Ro("phflag",k),_.length||k)throw new Error("Contexts/pre-hash are not supported");return x});function R(x,_,k=false){let w=k?Fr:$o;Dr("coordinate "+x,_,w,u);}function $(x){if(!(x instanceof I))throw new Error("ExtendedPoint expected")}let N=Mc((x,_)=>{let{ex:k,ey:w,ez:p}=x,A=x.is0();_==null&&(_=A?GL:r.inv(p));let G=f(k*_),K=f(w*_),Q=f(p*_);if(A)return {x:$o,y:Fr};if(Q!==Fr)throw new Error("invZ was invalid");return {x:G,y:K}}),O=Mc(x=>{let{a:_,d:k}=t;if(x.is0())throw new Error("bad point: ZERO");let{ex:w,ey:p,ez:A,et:G}=x,K=f(w*w),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(K*_),We=f(ae*f(ye+Q)),Se=f(he+f(k*f(K*Q)));if(We!==Se)throw new Error("bad point: equation left != right (1)");let _e=f(w*p),tr=f(A*G);if(_e!==tr)throw new Error("bad point: equation left != right (2)");return true});class I{constructor(_,k,w,p){R("x",_),R("y",k),R("z",w,true),R("t",p),this.ex=_,this.ey=k,this.ez=w,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(_){if(_ instanceof I)throw new Error("extended point not allowed");let{x:k,y:w}=_||{};return R("x",k),R("y",w),new I(k,w,Fr,f(k*w))}static normalizeZ(_){let k=li(r,_.map(w=>w.ez));return _.map((w,p)=>w.toAffine(k[p])).map(I.fromAffine)}static msm(_,k){return lh(I,d,_,k)}_setWindowSize(_){C.setWindowSize(this,_);}assertValidity(){O(this);}equals(_){$(_);let{ex:k,ey:w,ez:p}=this,{ex:A,ey:G,ez:K}=_,Q=f(k*K),ae=f(A*p),he=f(w*K),ye=f(G*p);return Q===ae&&he===ye}is0(){return this.equals(I.ZERO)}negate(){return new I(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:_}=t,{ex:k,ey:w,ez:p}=this,A=f(k*k),G=f(w*w),K=f(_A*f(p*p)),Q=f(_*A),ae=k+w,he=f(f(ae*ae)-A-G),ye=Q+G,We=ye-K,Se=Q-G,_e=f(he*We),tr=f(ye*Se),Ce=f(he*Se),je=f(We*ye);return new I(_e,tr,je,Ce)}add(_){$(_);let{a:k,d:w}=t,{ex:p,ey:A,ez:G,et:K}=this,{ex:Q,ey:ae,ez:he,et:ye}=_,We=f(p*Q),Se=f(A*ae),_e=f(K*w*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-We-Se),je=tr-_e,Li=tr+_e,pt=f(Se-k*We),gt=f(Ce*je),Bp=f(Li*pt),yt=f(Ce*pt),bt=f(je*Li);return new I(gt,Bp,bt,yt)}subtract(_){return this.add(_.negate())}wNAF(_){return C.wNAFCached(this,_,I.normalizeZ)}multiply(_){let k=_;Dr("scalar",k,Fr,o);let{p:w,f:p}=this.wNAF(k);return I.normalizeZ([w,p])[0]}multiplyUnsafe(_,k=I.ZERO){let w=_;return Dr("scalar",w,$o,o),w===$o?L:this.is0()||w===Fr?this:C.wNAFCachedUnsafe(this,w,I.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return C.unsafeLadder(this,o).is0()}toAffine(_){return N(this,_)}clearCofactor(){let{h:_}=t;return _===Fr?this:this.multiplyUnsafe(_)}static fromHex(_,k=false){let{d:w,a:p}=t,A=r.BYTES;_=Ge("pointHex",_,A),Ro("zip215",k);let G=_.slice(),K=_[A-1];G[A-1]=K&-129;let Q=ga(G),ae=k?u:r.ORDER;Dr("pointHex.y",Q,$o,ae);let he=f(Q*Q),ye=f(he-Fr),We=f(w*he-p),{isValid:Se,value:_e}=h(ye,We);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let tr=(_e&Fr)===Fr,Ce=(K&128)!==0;if(!k&&_e===$o&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==tr&&(_e=f(-_e)),I.fromAffine({x:_e,y:Q})}static fromPrivateKey(_){let{scalar:k}=H(_);return P.multiply(k)}toRawBytes(){let{x:_,y:k}=this.toAffine(),w=Uc(k,r.BYTES);return w[w.length-1]|=_&Fr?128:0,w}toHex(){return es(this.toRawBytes())}}I.BASE=new I(t.Gx,t.Gy,Fr,f(t.Gx*t.Gy)),I.ZERO=new I($o,Fr,Fr,$o);let{BASE:P,ZERO:L}=I,C=fh(I,a*8);function D(x){return Le(x,o)}function q(x){return D(ga(x))}function H(x){let _=r.BYTES;x=Ge("private key",x,_);let k=Ge("hashed private key",i(x),2*_),w=v(k.slice(0,_)),p=k.slice(_,2*_),A=q(w);return {head:w,prefix:p,scalar:A}}function Z(x){let{head:_,prefix:k,scalar:w}=H(x),p=P.multiply(w),A=p.toRawBytes();return {head:_,prefix:k,scalar:w,point:p,pointBytes:A}}function re(x){return Z(x).pointBytes}function S(x=Uint8Array.of(),..._){let k=ar(..._);return q(i(E(k,Ge("context",x),!!n)))}function l(x,_,k={}){x=Ge("message",x),n&&(x=n(x));let{prefix:w,scalar:p,pointBytes:A}=Z(_),G=S(k.context,w,x),K=P.multiply(G).toRawBytes(),Q=S(k.context,K,A,x),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(K,Uc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=qL;function y(x,_,k,w=m){let{context:p,zip215:A}=w,G=r.BYTES;x=Ge("signature",x,2*G),_=Ge("message",_),k=Ge("publicKey",k,G),A!==void 0&&Ro("zip215",A),n&&(_=n(_));let K=ga(x.slice(G,2*G)),Q,ae,he;try{Q=I.fromHex(k,A),ae=I.fromHex(x.slice(0,G),A),he=P.multiplyUnsafe(K);}catch{return false}if(!A&&Q.isSmallOrder())return false;let ye=S(p,ae.toRawBytes(),Q.toRawBytes(),_);return ae.add(Q.multiplyUnsafe(ye)).subtract(he).clearCofactor().equals(I.ZERO)}return P._setWindowSize(8),{CURVE:t,getPublicKey:re,sign:l,verify:y,ExtendedPoint:I,utils:{getExtendedPublicKey:Z,randomPrivateKey:()=>s(r.BYTES),precompute(x=8,_=I.BASE){return _._setWindowSize(x),_.multiply(BigInt(3)),_}}}}wa();var Zw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),RA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var QL=BigInt(1),TA=BigInt(2);BigInt(3);var eU=BigInt(5),tU=BigInt(8);function rU(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=Zw,a=e*e%i*e%i,c=at(a,TA,i)*a%i,u=at(c,QL,i)*e%i,f=at(u,eU,i)*u%i,d=at(f,t,i)*f%i,g=at(d,r,i)*d%i,h=at(g,o,i)*g%i,v=at(h,n,i)*h%i,E=at(v,n,i)*h%i,R=at(E,t,i)*f%i;return {pow_p_5_8:at(R,TA,i)*e%i,b2:a}}function nU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function oU(e,t){let r=Zw,o=Le(t*t*t,r),n=Le(o*o*t,r),i=rU(e*n).pow_p_5_8,s=Le(e*o*i,r),a=Le(t*s*s,r),c=s,u=Le(s*RA,r),f=a===e,d=a===Le(-e,r),g=a===Le(-e*RA,r);return f&&(s=c),(d||g)&&(s=u),hA(s,r)&&(s=Le(-s,r)),{isValid:f||d,value:s}}var $A=di(Zw,void 0,true),iU={a:$A.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:$A,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:tU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:nA,randomBytes:zc,adjustScalarBytes:nU,uvRatio:oU},_a=EA(iU);var F_=Ko(qw()),Nr=Ko(Kw());sh();var Ll=ha;var Yc=Ko(VA()),T=Ko(o_()),pR=Ko(o_());var i_=8078e3,s_=8078001,a_=8078004,c_=8078005,u_=8078006,f_=8078011;function YA(e){return Array.isArray(e)?"%5B"+e.map(YA).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Sj([e,t]){return `${e}=${YA(t)}`}function Ij(e){let t=Object.entries(e).map(Sj).join("&");return btoa(t)}function Aj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Ij(t)}'`),`${r}\``}}var os=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=Aj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function kj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function XA(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(kj(t,e));return e.write(t,r,0),r}})}function QA(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Vc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function ek(e,t){if(Vc(e)!==Vc(t))throw new os(a_);if(Vc(e)&&Vc(t)&&e.fixedSize!==t.fixedSize)throw new os(c_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Vc(e)&&!Vc(t)&&e.maxSize!==t.maxSize)throw new os(u_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function tk(e,t,r=0){if(t.length-r<=0)throw new os(i_,{codecDescription:e})}function rk(e,t,r,o=0){let n=r.length-o;if(n<t)throw new os(s_,{bytesLength:n,codecDescription:e,expected:t})}function Rj(e,t,r,o){if(o<t||o>r)throw new os(f_,{codecDescription:e,max:r,min:t,value:o})}function nk(e){return e?.endian!==1}function Tj(e){return XA({fixedSize:e.size,write(t,r,o){e.range&&Rj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,nk(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function $j(e){return QA({fixedSize:e.size,read(t,r=0){tk(e.name,t,r),rk(e.name,e.size,t,r);let o=new DataView(Oj(t,r,e.size));return [e.get(o,nk(e.config)),r+e.size]}})}function Oj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var l_=(e={})=>Tj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Nj=(e={})=>$j({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),ok=(e={})=>ek(l_(e),Nj(e));var d_=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function Pj(e){return Hl(e)&&typeof e[Symbol.iterator]=="function"}function Hl(e){return typeof e=="object"&&e!=null}function Mh(e){return Hl(e)&&!Array.isArray(e)}function ro(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Bj(e){let{done:t,value:r}=e.next();return t?void 0:r}function Cj(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${ro(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*ik(e,t,r,o){Pj(e)||(e=[e]);for(let n of e){let i=Cj(n,t,r,o);i&&(yield i);}}function*p_(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,f,d]of t.entries(e,a)){let g=p_(f,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,f],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(f=h[1],u===void 0?e=f:e instanceof Map?e.set(u,f):e instanceof Set?e.add(f):Hl(e)&&(f!==void 0||u in e)&&(e[u]=f));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Pn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let f=n(c,u);return ik(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return ik(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return sk(t,this,r)}create(t,r){return Zc(t,this,r)}is(t){return ak(t,this)}mask(t,r){return zj(t,this,r)}validate(t,r={}){return Vl(t,this,r)}};function sk(e,t,r){let o=Vl(e,t,{message:r});if(o[0])throw o[0]}function Zc(e,t,r){let o=Vl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function zj(e,t,r){let o=Vl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function ak(e,t){return !Vl(e,t)[0]}function Vl(e,t,r={}){let o=p_(e,t,r),n=Bj(o);return n[0]?[new d_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function Aa(e,t){return new Pn({type:e,schema:null,validator:t})}function ck(){return Aa("any",()=>true)}function ue(e){return new Pn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ro(t)}`}})}function no(){return Aa("boolean",e=>typeof e=="boolean")}function Dh(e){return Aa("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ro(t)}`)}function ct(e){let t=ro(e),r=typeof e;return new Pn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${ro(o)}`}})}function Lj(){return Aa("never",()=>false)}function fe(e){return new Pn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U(){return Aa("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ro(e)}`)}function me(e){return new Pn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function m_(e,t){return new Pn({type:"record",schema:null,*entries(r){if(Hl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function ne(){return Aa("string",e=>typeof e=="string"||`Expected a string, but received: ${ro(e)}`)}function jh(e){let t=Lj();return new Pn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${ro(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function W(e){let t=Object.keys(e);return new Pn({type:"type",schema:e,*entries(r){if(Hl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function Ar(e){let t=e.map(r=>r.type).join(" | ");return new Pn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=p_(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${ro(r)}`,...n]}})}function ka(){return Aa("unknown",()=>true)}function Gc(e,t,r){return new Pn({...e,coercer:(o,n)=>ak(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ko(Nk());Ko(Rl(),1);var Jl=Ko(Bk(),1);var Ck=Jl.default;Wh();rd();function rR(e){try{return _a.ExtendedPoint.fromHex(e),!0}catch{return false}}var n6=(e,t)=>_a.sign(e,t.slice(0,32)),P7=_a.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),V_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, Yc.serialize)(e0,this))}static decode(t){return (0, Yc.deserialize)(e0,this,t)}static decodeUnchecked(t){return (0, Yc.deserializeUnchecked)(e0,this,t)}};var e0=new Map,mR,B7=32,ls=32;function C7(e){return e._bn!==void 0}var nR=1,Ie=class e extends V_{constructor(t){if(super({}),this._bn=void 0,C7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ls)throw new Error("Invalid public key input");this._bn=new F_.default(r);}else this._bn=new F_.default(t);if(this._bn.byteLength()>ls)throw new Error("Invalid public key input")}}static unique(){let t=new e(nR);return nR+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Nr.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(xe.Buffer);if(t.length===ls)return t;let r=xe.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=xe.Buffer.concat([t.toBuffer(),xe.Buffer.from(r),o.toBuffer()]),i=Ll(n);return new e(i)}static createProgramAddressSync(t,r){let o=xe.Buffer.alloc(0);t.forEach(function(i){if(i.length>B7)throw new TypeError("Max seed length exceeded");o=xe.Buffer.concat([o,He(i)]);}),o=xe.Buffer.concat([o,r.toBuffer(),xe.Buffer.from("ProgramDerivedAddress")]);let n=Ll(o);if(rR(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(xe.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return rR(r.toBytes())}};mR=Ie;Ie.default=new mR("11111111111111111111111111111111");e0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Ta=1232,o6=127,t0=64;var Kc=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>T.blob(32,e),z7=(e="signature")=>T.blob(64,e),Wc=(e="string")=>{let t=T.struct([T.u32("length"),T.u32("lengthPadding"),T.blob(T.offset(T.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:xe.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>T.u32().span+T.u32().span+xe.Buffer.from(i,"utf8").length,n},L7=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),U7=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),M7=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),D7=(e="voteAuthorizeWithSeedArgs")=>T.struct([T.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),Wc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function xn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function vn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function it(e,t){if(!e)throw new Error(t||"Assertion failed")}var r0=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];it(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{it(r.length>0,"Expected at least one writable signer key");let[c]=r[0];it(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(it(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},gR="Reached end of buffer unexpectedly";function yi(e){if(e.length===0)throw new Error(gR);return e.shift()}function wn(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(gR);return e.splice(...t)}var id=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Nr.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new Kc(this.staticAccountKeys)}static compile(t){let r=r0.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new Kc(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Nr.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];vn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,v=Array.from(Nr.default.decode(d.data)),E=[];vn(E,g.length);let R=[];return vn(R,v.length),{programIdIndex:h,keyIndicesCount:xe.Buffer.from(E),keyIndices:g,dataLength:xe.Buffer.from(R),data:v}}),n=[];vn(n,o.length);let i=xe.Buffer.alloc(Ta);xe.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=T.struct([T.u8("programIdIndex"),T.blob(d.keyIndicesCount.length,"keyIndicesCount"),T.seq(T.u8("keyIndex"),d.keyIndices.length,"keyIndices"),T.blob(d.dataLength.length,"dataLength"),T.seq(T.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=T.struct([T.blob(1,"numRequiredSignatures"),T.blob(1,"numReadonlySignedAccounts"),T.blob(1,"numReadonlyUnsignedAccounts"),T.blob(r.length,"keyCount"),T.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:xe.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:xe.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:xe.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:xe.Buffer.from(r),keys:this.accountKeys.map(d=>He(d.toBytes())),recentBlockhash:Nr.default.decode(this.recentBlockhash)},u=xe.Buffer.alloc(2048),f=a.encode(c,u);return i.copy(u,f),u.slice(0,f+i.length)}static from(t){let r=[...t],o=yi(r);if(o!==(o&o6))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=yi(r),i=yi(r),s=xn(r),a=[];for(let g=0;g<s;g++){let h=wn(r,0,ls);a.push(new Ie(xe.Buffer.from(h)));}let c=wn(r,0,ls),u=xn(r),f=[];for(let g=0;g<u;g++){let h=yi(r),v=xn(r),E=wn(r,0,v),R=xn(r),$=wn(r,0,R),N=Nr.default.encode(xe.Buffer.from($));f.push({programIdIndex:h,accounts:E,data:N});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Nr.default.encode(xe.Buffer.from(c)),accountKeys:a,instructions:f};return new e(d)}},W_=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Kc(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=r0.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let f of i){let d=r.extractTableLookup(f);if(d!==void 0){let[g,{writable:h,readonly:v}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...v);}}let[s,a]=r.getMessageComponents(),u=new Kc(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();vn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();vn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();vn(i,this.addressTableLookups.length);let s=T.struct([T.u8("prefix"),T.struct([T.u8("numRequiredSignatures"),T.u8("numReadonlySignedAccounts"),T.u8("numReadonlyUnsignedAccounts")],"header"),T.blob(t.length,"staticAccountKeysLength"),T.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),T.blob(o.length,"instructionsLength"),T.blob(r.length,"serializedInstructions"),T.blob(i.length,"addressTableLookupsLength"),T.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array(Ta),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(f=>f.toBytes()),recentBlockhash:Nr.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array(Ta);for(let o of this.compiledInstructions){let n=Array();vn(n,o.accountKeyIndexes.length);let i=Array();vn(i,o.data.length);let s=T.struct([T.u8("programIdIndex"),T.blob(n.length,"encodedAccountKeyIndexesLength"),T.seq(T.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),T.blob(i.length,"encodedDataLength"),T.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array(Ta);for(let o of this.addressTableLookups){let n=Array();vn(n,o.writableIndexes.length);let i=Array();vn(i,o.readonlyIndexes.length);let s=T.struct([Pe("accountKey"),T.blob(n.length,"encodedWritableIndexesLength"),T.seq(T.u8(),o.writableIndexes.length,"writableIndexes"),T.blob(i.length,"encodedReadonlyIndexesLength"),T.seq(T.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=yi(r),n=o&o6;it(o!==n,"Expected versioned message but received legacy message");let i=n;it(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:yi(r),numReadonlySignedAccounts:yi(r),numReadonlyUnsignedAccounts:yi(r)},a=[],c=xn(r);for(let v=0;v<c;v++)a.push(new Ie(wn(r,0,ls)));let u=Nr.default.encode(wn(r,0,ls)),f=xn(r),d=[];for(let v=0;v<f;v++){let E=yi(r),R=xn(r),$=wn(r,0,R),N=xn(r),O=new Uint8Array(wn(r,0,N));d.push({programIdIndex:E,accountKeyIndexes:$,data:O});}let g=xn(r),h=[];for(let v=0;v<g;v++){let E=new Ie(wn(r,0,ls)),R=xn(r),$=wn(r,0,R),N=xn(r),O=wn(r,0,N);h.push({accountKey:E,writableIndexes:$,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},a0={deserializeMessageVersion(e){let t=e[0],r=t&o6;return r===t?"legacy":r},deserialize:e=>{let t=a0.deserializeMessageVersion(e);if(t==="legacy")return id.from(e);if(t===0)return W_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var j7=xe.Buffer.alloc(t0).fill(0),Xe=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=xe.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},tt=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new Xe(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let E=0;E<r.length;E++)if(r[E].programId===void 0)throw new Error(`Transaction instruction index ${E} has undefined program id`);let n=[],i=[];r.forEach(E=>{E.keys.forEach($=>{i.push({...$});});let R=E.programId.toString();n.includes(R)||n.push(R);}),n.forEach(E=>{i.push({pubkey:new Ie(E),isSigner:false,isWritable:false});});let s=[];i.forEach(E=>{let R=E.pubkey.toString(),$=s.findIndex(N=>N.pubkey.toString()===R);$>-1?(s[$].isWritable=s[$].isWritable||E.isWritable,s[$].isSigner=s[$].isSigner||E.isSigner):s.push(E);}),s.sort(function(E,R){if(E.isSigner!==R.isSigner)return E.isSigner?-1:1;if(E.isWritable!==R.isWritable)return E.isWritable?-1:1;let $={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return E.pubkey.toBase58().localeCompare(R.pubkey.toBase58(),"en",$)});let a=s.findIndex(E=>E.pubkey.equals(o));if(a>-1){let[E]=s.splice(a,1);E.isSigner=true,E.isWritable=true,s.unshift(E);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let E of this.signatures){let R=s.findIndex($=>$.pubkey.equals(E.publicKey));if(R>-1)s[R].isSigner||(s[R].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${E.publicKey.toString()}`)}let c=0,u=0,f=0,d=[],g=[];s.forEach(({pubkey:E,isSigner:R,isWritable:$})=>{R?(d.push(E.toString()),c+=1,$||(u+=1)):(g.push(E.toString()),$||(f+=1));});let h=d.concat(g),v=r.map(E=>{let{data:R,programId:$}=E;return {programIdIndex:h.indexOf($.toString()),accounts:E.keys.map(N=>h.indexOf(N.pubkey.toString())),data:Nr.default.encode(R)}});return v.forEach(E=>{it(E.programIdIndex>=0),E.accounts.forEach(R=>it(R>=0));}),new id({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:f},accountKeys:h,recentBlockhash:t,instructions:v})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=n6(o,n.secretKey);this._addSignature(n.publicKey,He(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){it(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=xe.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):P7(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
62
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of this.seen.entries()){let d=f[1];if(t===f[0]){s(f);continue}if(o.external){let h=o.external.registry.get(f[0])?.id;if(t!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(d.cycle){s(f);continue}if(d.count>1&&o.reused==="ref"){s(f);continue}}let a=(f,d)=>{let g=this.seen.get(f),h=g.def??g.schema,v={...h};if(g.ref===null)return;let E=g.ref;if(g.ref=null,E){a(E,d);let R=this.seen.get(E).schema;R.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(R)):(Object.assign(h,R),Object.assign(h,v));}g.isParent||this.override({zodSchema:f,jsonSchema:h,path:g.path??[]});};for(let f of [...this.seen.entries()].reverse())a(f[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let f=o.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(f);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let f of this.seen.entries()){let d=f[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function lv(e,t){if(e instanceof pc){let o=new pl(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new pl(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.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 false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var f5={};var Cm={};Er(Cm,{ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,date:()=>pv,datetime:()=>dv,duration:()=>hv,time:()=>mv});var Om=B("ZodISODateTime",(e,t)=>{Ax.init(e,t),et.init(e,t);});function dv(e){return k1(Om,e)}var Nm=B("ZodISODate",(e,t)=>{kx.init(e,t),et.init(e,t);});function pv(e){return R1(Nm,e)}var Pm=B("ZodISOTime",(e,t)=>{Rx.init(e,t),et.init(e,t);});function mv(e){return T1(Pm,e)}var Bm=B("ZodISODuration",(e,t)=>{Tx.init(e,t),et.init(e,t);});function hv(e){return $1(Bm,e)}var d5=(e,t)=>{Ff.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Vf(e,r)},flatten:{value:r=>Hf(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ic,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ic,2);}},isEmpty:{get(){return e.issues.length===0}}});},P3=B("ZodError",d5),Yr=B("ZodError",d5,{Parent:Error});var gv=cc(Yr),yv=uc(Yr),bv=fc(Yr),xv=lc(Yr),vv=jp(Yr),wv=Fp(Yr),_v=Hp(Yr),Ev=Vp(Yr),Sv=Zp(Yr),Iv=Gp(Yr),Av=qp(Yr),kv=Wp(Yr);var Ae=B("ZodType",(e,t)=>(we.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(te.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Mr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>gv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>bv(e,r,o),e.parseAsync=async(r,o)=>yv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>xv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vv(e,r,o),e.decode=(r,o)=>wv(e,r,o),e.encodeAsync=async(r,o)=>_v(e,r,o),e.decodeAsync=async(r,o)=>Ev(e,r,o),e.safeEncode=(r,o)=>Sv(e,r,o),e.safeDecode=(r,o)=>Iv(e,r,o),e.safeEncodeAsync=async(r,o)=>Av(e,r,o),e.safeDecodeAsync=async(r,o)=>kv(e,r,o),e.refine=(r,o)=>e.check(X5(r,o)),e.superRefine=r=>e.check(Q5(r)),e.overwrite=r=>e.check(Xo(r)),e.optional=()=>Lm(e),e.nullable=()=>Um(e),e.nullish=()=>Lm(Um(e)),e.nonoptional=r=>D5(e,r),e.array=()=>Fm(e),e.or=r=>Jv([e,r]),e.and=r=>A5(e,r),e.transform=r=>Mm(e,Qv(r)),e.default=r=>L5(e,r),e.prefault=r=>M5(e,r),e.catch=r=>H5(e,r),e.pipe=r=>Mm(e,r),e.readonly=()=>G5(e),e.describe=r=>{let o=e.clone();return vo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return vo.get(e);let o=e.clone();return vo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$v=B("_ZodString",(e,t)=>{Fs.init(e,t),Ae.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(rl(...o)),e.includes=(...o)=>e.check(il(...o)),e.startsWith=(...o)=>e.check(sl(...o)),e.endsWith=(...o)=>e.check(al(...o)),e.min=(...o)=>e.check(Vi(...o)),e.max=(...o)=>e.check(hc(...o)),e.length=(...o)=>e.check(gc(...o)),e.nonempty=(...o)=>e.check(Vi(1,...o)),e.lowercase=o=>e.check(nl(o)),e.uppercase=o=>e.check(ol(o)),e.trim=()=>e.check(fl()),e.normalize=(...o)=>e.check(ul(...o)),e.toLowerCase=()=>e.check(ll()),e.toUpperCase=()=>e.check(dl());}),hl=B("ZodString",(e,t)=>{Fs.init(e,t),$v.init(e,t),e.email=r=>e.check(lm(Ov,r)),e.url=r=>e.check(el(Dm,r)),e.jwt=r=>e.check($m(Gv,r)),e.emoji=r=>e.check(gm(Nv,r)),e.guid=r=>e.check(Qf(zm,r)),e.uuid=r=>e.check(dm(ei,r)),e.uuidv4=r=>e.check(pm(ei,r)),e.uuidv6=r=>e.check(mm(ei,r)),e.uuidv7=r=>e.check(hm(ei,r)),e.nanoid=r=>e.check(ym(Pv,r)),e.guid=r=>e.check(Qf(zm,r)),e.cuid=r=>e.check(bm(Bv,r)),e.cuid2=r=>e.check(xm(Cv,r)),e.ulid=r=>e.check(vm(zv,r)),e.base64=r=>e.check(km(Hv,r)),e.base64url=r=>e.check(Rm(Vv,r)),e.xid=r=>e.check(wm(Lv,r)),e.ksuid=r=>e.check(_m(Uv,r)),e.ipv4=r=>e.check(Em(Mv,r)),e.ipv6=r=>e.check(Sm(Dv,r)),e.cidrv4=r=>e.check(Im(jv,r)),e.cidrv6=r=>e.check(Am(Fv,r)),e.e164=r=>e.check(Tm(Zv,r)),e.datetime=r=>e.check(dv(r)),e.date=r=>e.check(pv(r)),e.time=r=>e.check(mv(r)),e.duration=r=>e.check(hv(r));});function Rv(e){return S1(hl,e)}var et=B("ZodStringFormat",(e,t)=>{Ye.init(e,t),$v.init(e,t);}),Ov=B("ZodEmail",(e,t)=>{yx.init(e,t),et.init(e,t);});function C3(e){return lm(Ov,e)}var zm=B("ZodGUID",(e,t)=>{hx.init(e,t),et.init(e,t);});function z3(e){return Qf(zm,e)}var ei=B("ZodUUID",(e,t)=>{gx.init(e,t),et.init(e,t);});function L3(e){return dm(ei,e)}function U3(e){return pm(ei,e)}function M3(e){return mm(ei,e)}function D3(e){return hm(ei,e)}var Dm=B("ZodURL",(e,t)=>{bx.init(e,t),et.init(e,t);});function j3(e){return el(Dm,e)}function F3(e){return el(Dm,{protocol:/^https?$/,hostname:An.domain,...te.normalizeParams(e)})}var Nv=B("ZodEmoji",(e,t)=>{xx.init(e,t),et.init(e,t);});function H3(e){return gm(Nv,e)}var Pv=B("ZodNanoID",(e,t)=>{vx.init(e,t),et.init(e,t);});function V3(e){return ym(Pv,e)}var Bv=B("ZodCUID",(e,t)=>{wx.init(e,t),et.init(e,t);});function Z3(e){return bm(Bv,e)}var Cv=B("ZodCUID2",(e,t)=>{_x.init(e,t),et.init(e,t);});function G3(e){return xm(Cv,e)}var zv=B("ZodULID",(e,t)=>{Ex.init(e,t),et.init(e,t);});function q3(e){return vm(zv,e)}var Lv=B("ZodXID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function W3(e){return wm(Lv,e)}var Uv=B("ZodKSUID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function K3(e){return _m(Uv,e)}var Mv=B("ZodIPv4",(e,t)=>{$x.init(e,t),et.init(e,t);});function J3(e){return Em(Mv,e)}var Dv=B("ZodIPv6",(e,t)=>{Ox.init(e,t),et.init(e,t);});function Y3(e){return Sm(Dv,e)}var jv=B("ZodCIDRv4",(e,t)=>{Nx.init(e,t),et.init(e,t);});function X3(e){return Im(jv,e)}var Fv=B("ZodCIDRv6",(e,t)=>{Px.init(e,t),et.init(e,t);});function Q3(e){return Am(Fv,e)}var Hv=B("ZodBase64",(e,t)=>{Cx.init(e,t),et.init(e,t);});function eB(e){return km(Hv,e)}var Vv=B("ZodBase64URL",(e,t)=>{zx.init(e,t),et.init(e,t);});function tB(e){return Rm(Vv,e)}var Zv=B("ZodE164",(e,t)=>{Lx.init(e,t),et.init(e,t);});function rB(e){return Tm(Zv,e)}var Gv=B("ZodJWT",(e,t)=>{Ux.init(e,t),et.init(e,t);});function nB(e){return $m(Gv,e)}var gl=B("ZodCustomStringFormat",(e,t)=>{Mx.init(e,t),et.init(e,t);});function oB(e,t,r={}){return yc(gl,e,t,r)}function iB(e){return yc(gl,"hostname",An.hostname,e)}function sB(e){return yc(gl,"hex",An.hex,e)}function aB(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=An[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return yc(gl,o,n,t)}var yl=B("ZodNumber",(e,t)=>{nm.init(e,t),Ae.init(e,t),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.int=o=>e.check(Tv(o)),e.safe=o=>e.check(Tv(o)),e.positive=o=>e.check(Yo(0,o)),e.nonnegative=o=>e.check(Jr(0,o)),e.negative=o=>e.check(Jo(0,o)),e.nonpositive=o=>e.check(kn(0,o)),e.multipleOf=(o,n)=>e.check(Hs(o,n)),e.step=(o,n)=>e.check(Hs(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function p5(e){return O1(yl,e)}var xc=B("ZodNumberFormat",(e,t)=>{Dx.init(e,t),yl.init(e,t);});function Tv(e){return P1(xc,e)}function cB(e){return B1(xc,e)}function uB(e){return C1(xc,e)}function fB(e){return z1(xc,e)}function lB(e){return L1(xc,e)}var bl=B("ZodBoolean",(e,t)=>{Wf.init(e,t),Ae.init(e,t);});function m5(e){return U1(bl,e)}var xl=B("ZodBigInt",(e,t)=>{om.init(e,t),Ae.init(e,t),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.positive=o=>e.check(Yo(BigInt(0),o)),e.negative=o=>e.check(Jo(BigInt(0),o)),e.nonpositive=o=>e.check(kn(BigInt(0),o)),e.nonnegative=o=>e.check(Jr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Hs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function dB(e){return D1(xl,e)}var qv=B("ZodBigIntFormat",(e,t)=>{jx.init(e,t),xl.init(e,t);});function pB(e){return F1(qv,e)}function mB(e){return H1(qv,e)}var h5=B("ZodSymbol",(e,t)=>{Fx.init(e,t),Ae.init(e,t);});function hB(e){return V1(h5,e)}var g5=B("ZodUndefined",(e,t)=>{Hx.init(e,t),Ae.init(e,t);});function gB(e){return Z1(g5,e)}var y5=B("ZodNull",(e,t)=>{Vx.init(e,t),Ae.init(e,t);});function b5(e){return G1(y5,e)}var x5=B("ZodAny",(e,t)=>{Zx.init(e,t),Ae.init(e,t);});function yB(){return q1(x5)}var v5=B("ZodUnknown",(e,t)=>{Gx.init(e,t),Ae.init(e,t);});function bc(){return W1(v5)}var w5=B("ZodNever",(e,t)=>{qx.init(e,t),Ae.init(e,t);});function Wv(e){return K1(w5,e)}var _5=B("ZodVoid",(e,t)=>{Wx.init(e,t),Ae.init(e,t);});function bB(e){return J1(_5,e)}var jm=B("ZodDate",(e,t)=>{Kx.init(e,t),Ae.init(e,t),e.min=(o,n)=>e.check(Jr(o,n)),e.max=(o,n)=>e.check(kn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function xB(e){return Y1(jm,e)}var E5=B("ZodArray",(e,t)=>{Jx.init(e,t),Ae.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Vi(r,o)),e.nonempty=r=>e.check(Vi(1,r)),e.max=(r,o)=>e.check(hc(r,o)),e.length=(r,o)=>e.check(gc(r,o)),e.unwrap=()=>e.element;});function Fm(e,t){return iv(E5,e,t)}function vB(e){let t=e._zod.def.shape;return Xv(Object.keys(t))}var Hm=B("ZodObject",(e,t)=>{Yx.init(e,t),Ae.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Xv(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:bc()}),e.loose=()=>e.clone({...e._zod.def,catchall:bc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>te.extend(e,r),e.safeExtend=r=>te.safeExtend(e,r),e.merge=r=>te.merge(e,r),e.pick=r=>te.pick(e,r),e.omit=r=>te.omit(e,r),e.partial=(...r)=>te.partial(ew,e,r[0]),e.required=(...r)=>te.required(tw,e,r[0]);});function wB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Hm(r)}function _B(e,t){return new Hm({type:"object",shape:e,catchall:Wv(),...te.normalizeParams(t)})}function EB(e,t){return new Hm({type:"object",shape:e,catchall:bc(),...te.normalizeParams(t)})}var Kv=B("ZodUnion",(e,t)=>{im.init(e,t),Ae.init(e,t),e.options=t.options;});function Jv(e,t){return new Kv({type:"union",options:e,...te.normalizeParams(t)})}var S5=B("ZodDiscriminatedUnion",(e,t)=>{Kv.init(e,t),Xx.init(e,t);});function SB(e,t,r){return new S5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var I5=B("ZodIntersection",(e,t)=>{Qx.init(e,t),Ae.init(e,t);});function A5(e,t){return new I5({type:"intersection",left:e,right:t})}var k5=B("ZodTuple",(e,t)=>{sm.init(e,t),Ae.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function R5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new k5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var Yv=B("ZodRecord",(e,t)=>{e1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function T5(e,t,r){return new Yv({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function IB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new Yv({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var $5=B("ZodMap",(e,t)=>{t1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function AB(e,t,r){return new $5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var O5=B("ZodSet",(e,t)=>{r1.init(e,t),Ae.init(e,t),e.min=(...r)=>e.check(Vs(...r)),e.nonempty=r=>e.check(Vs(1,r)),e.max=(...r)=>e.check(mc(...r)),e.size=(...r)=>e.check(tl(...r));});function kB(e,t){return new O5({type:"set",valueType:e,...te.normalizeParams(t)})}var ml=B("ZodEnum",(e,t)=>{n1.init(e,t),Ae.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})};});function Xv(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ml({type:"enum",entries:r,...te.normalizeParams(t)})}function RB(e,t){return new ml({type:"enum",entries:e,...te.normalizeParams(t)})}var N5=B("ZodLiteral",(e,t)=>{o1.init(e,t),Ae.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function TB(e,t){return new N5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var P5=B("ZodFile",(e,t)=>{i1.init(e,t),Ae.init(e,t),e.min=(r,o)=>e.check(Vs(r,o)),e.max=(r,o)=>e.check(mc(r,o)),e.mime=(r,o)=>e.check(cl(Array.isArray(r)?r:[r],o));});function $B(e){return sv(P5,e)}var B5=B("ZodTransform",(e,t)=>{s1.init(e,t),Ae.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function Qv(e){return new B5({type:"transform",transform:e})}var ew=B("ZodOptional",(e,t)=>{a1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Lm(e){return new ew({type:"optional",innerType:e})}var C5=B("ZodNullable",(e,t)=>{c1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Um(e){return new C5({type:"nullable",innerType:e})}function OB(e){return Lm(Um(e))}var z5=B("ZodDefault",(e,t)=>{u1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function L5(e,t){return new z5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var U5=B("ZodPrefault",(e,t)=>{f1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function M5(e,t){return new U5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var tw=B("ZodNonOptional",(e,t)=>{l1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function D5(e,t){return new tw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var j5=B("ZodSuccess",(e,t)=>{d1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function NB(e){return new j5({type:"success",innerType:e})}var F5=B("ZodCatch",(e,t)=>{p1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function H5(e,t){return new F5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var V5=B("ZodNaN",(e,t)=>{m1.init(e,t),Ae.init(e,t);});function PB(e){return Q1(V5,e)}var rw=B("ZodPipe",(e,t)=>{h1.init(e,t),Ae.init(e,t),e.in=t.in,e.out=t.out;});function Mm(e,t){return new rw({type:"pipe",in:e,out:t})}var nw=B("ZodCodec",(e,t)=>{rw.init(e,t),Kf.init(e,t);});function BB(e,t,r){return new nw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var Z5=B("ZodReadonly",(e,t)=>{g1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function G5(e){return new Z5({type:"readonly",innerType:e})}var q5=B("ZodTemplateLiteral",(e,t)=>{y1.init(e,t),Ae.init(e,t);});function CB(e,t){return new q5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var W5=B("ZodLazy",(e,t)=>{v1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.getter();});function K5(e){return new W5({type:"lazy",getter:e})}var J5=B("ZodPromise",(e,t)=>{x1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function zB(e){return new J5({type:"promise",innerType:e})}var Y5=B("ZodFunction",(e,t)=>{b1.init(e,t),Ae.init(e,t);});function LB(e){return new Y5({type:"function",input:Array.isArray(e?.input)?R5(e?.input):e?.input??Fm(bc()),output:e?.output??bc()})}var Vm=B("ZodCustom",(e,t)=>{w1.init(e,t),Ae.init(e,t);});function UB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function MB(e,t){return av(Vm,e??(()=>true),t)}function X5(e,t={}){return cv(Vm,e,t)}function Q5(e){return uv(e)}function DB(e,t={error:`Input not instance of ${e.name}`}){let r=new Vm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var jB=(...e)=>fv({Codec:nw,Boolean:bl,String:hl},...e);function FB(e){let t=K5(()=>Jv([Rv(e),p5(),m5(),b5(),Fm(t),T5(Rv(),t)]));return t}function HB(e,t){return Mm(Qv(e),t)}var VB={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 ZB(e){wt({customError:e});}function GB(){return wt().customError}var ow;ow||(ow={});var iw={};Er(iw,{bigint:()=>JB,boolean:()=>KB,date:()=>YB,number:()=>WB,string:()=>qB});function qB(e){return I1(hl,e)}function WB(e){return N1(yl,e)}function KB(e){return M1(bl,e)}function JB(e){return j1(xl,e)}function YB(e){return X1(jm,e)}wt(am());var XB="https://api.adland.space",QB="http://localhost:3069";function eC(e,t){return e?e.replace(/\/$/,""):t==="development"?QB:XB}function tC(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:rC,nodeEnv:nC}=tC(),sw=eC(rC,nC);function oC(e,t){return Object.assign(e,{choices:t})}function wc(e){return {...e,process:t=>iC(e,t),safeProcess:t=>sC(e,t)}}async function iC(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function sC(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Jn=`${sw}/adland`;async function vl(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function vc(e){return fetch(e).then(t=>t.json())}var Yn={verify:{cast({hash:e}){return vl(`${Jn}/verify/cast`,{hash:e})},miniapp({domain:e}){return vl(`${Jn}/verify/miniapp`,{domain:e})},profile({fid:e}){return vl(`${Jn}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return vl(`${Jn}/verify/token`,{address:e,chainId:t})},tweet({url:e}){return vl(`${Jn}/verify/tweet`,{url:e})}},metadata:{cast({hash:e}){return vc(`${Jn}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return vc(`${Jn}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return vc(`${Jn}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return vc(`${Jn}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return vc(`${Jn}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)},tweet({url:e}){return vc(`${Jn}/metadata/tweet?url=${encodeURIComponent(e)}`)}}};function aC(e){let t=e.embeds?.images?.[0];return t&&(t.media?.staticRaster||t.url||t.sourceUrl)||null}wc({type:"cast",data:pe.object({hash:pe.string().nonempty("Hash is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await Yn.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await Yn.metadata.cast({hash:e});return {displayName:t.author.displayName,username:t.author.username,pfpUrl:t.author.pfp?.url,text:t.text,timestamp:String(t.timestamp),image:aC(t)??void 0}}});wc({type:"link",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({title:pe.string().optional(),description:pe.string().optional(),image:pe.string().optional(),icon:pe.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await Yn.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});wc({type:"miniapp",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({icon:pe.string().optional(),title:pe.string().optional(),description:pe.string().optional(),imageUrl:pe.string().optional(),creator:pe.object({fid:pe.number(),username:pe.string().nullable().optional(),displayName:pe.string().nullable().optional(),pfpUrl:pe.string().nullable().optional()}).nullable().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await Yn.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await Yn.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl,creator:t.creator}}});wc({type:"farcasterProfile",data:pe.object({fid:pe.string().nonempty("Fid is required")}),metadata:pe.object({pfpUrl:pe.string().optional(),bio:pe.string().optional(),username:pe.string().optional(),displayName:pe.string().optional(),followers:pe.number().optional(),following:pe.number().optional(),pro:pe.boolean().optional()}),async verify({fid:e}){if(!(await Yn.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await Yn.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});var cC="eip155",aw=[{chainId:1,label:"Ethereum",coingeckoPlatform:"ethereum",dexscreenerSlug:"ethereum"},{chainId:8453,label:"Base",coingeckoPlatform:"base",dexscreenerSlug:"base"},{chainId:42161,label:"Arbitrum",coingeckoPlatform:"arbitrum-one",dexscreenerSlug:"arbitrum"},{chainId:4663,label:"Robinhood",coingeckoPlatform:null,dexscreenerSlug:null}],uC=aw.map(e=>e.chainId);function fC(e){return uC.includes(e)}function cw(e){return aw.find(t=>t.chainId===e)}function eI(e,t){return `${cC}:${e}/erc20:${t}`}wc({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:oC(pe.number().int().positive("Chain ID is required").refine(fC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),aw.map(e=>({label:`${e.label} (${e.chainId})`,value:e.chainId})))}),metadata:pe.object({name:pe.string().optional(),symbol:pe.string().optional(),decimals:pe.number().optional(),logoURI:pe.string().optional()}),async verify({address:e,chainId:t}){if(!(await Yn.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await Yn.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var lC=/(?:twitter\.com|x\.com)\/\w+\/status\/\d+/;wc({type:"tweet",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({url:e}){if(!lC.test(e))throw new Error("Not an X post link \u2014 expected https://x.com/user/status/123");if(!(await Yn.verify.tweet({url:e})).verified)throw new Error("That post could not be read \u2014 it may be deleted, or from a protected account")},async getMetadata({url:e}){let t=await Yn.metadata.tweet({url:e});return {displayName:t.author.name,username:t.author.username,pfpUrl:t.author.pfpUrl,text:t.text,timestamp:String(Date.parse(t.createdAt)),image:t.image??void 0}}});var wl={};Er(wl,{InvalidDomainManifest:()=>uw,RejectedByUser:()=>fw});var Xn=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var uw=class extends Xn{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},fw=class extends Xn{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var _c={};Er(_c,{RejectedByUser:()=>lw});var lw=class extends Xn{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Ec={};Er(Ec,{GenericError:()=>mw,InvalidDomain:()=>pw,RejectedByUser:()=>dw});var dw=class extends Xn{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},pw=class extends Xn{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},mw=class extends Xn{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>DC,DIRTY:()=>Zs,EMPTY_PATH:()=>bC,INVALID:()=>ge,NEVER:()=>Sz,OK:()=>Sr,ParseStatus:()=>dr,Schema:()=>ke,ZodAny:()=>qi,ZodArray:()=>oi,ZodBigInt:()=>qs,ZodBoolean:()=>Ws,ZodBranded:()=>El,ZodCatch:()=>ia,ZodDate:()=>Ks,ZodDefault:()=>oa,ZodDiscriminatedUnion:()=>Wm,ZodEffects:()=>$n,ZodEnum:()=>ra,ZodError:()=>Xr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Jm,ZodIntersection:()=>Qs,ZodIssueCode:()=>Y,ZodLazy:()=>ea,ZodLiteral:()=>ta,ZodMap:()=>Tc,ZodNaN:()=>Oc,ZodNativeEnum:()=>na,ZodNever:()=>Qn,ZodNull:()=>Ys,ZodNullable:()=>Eo,ZodNumber:()=>Gs,ZodObject:()=>Qr,ZodOptional:()=>Rn,ZodParsedType:()=>ce,ZodPipeline:()=>Sl,ZodPromise:()=>Wi,ZodReadonly:()=>sa,ZodRecord:()=>Km,ZodSchema:()=>ke,ZodSet:()=>$c,ZodString:()=>Gi,ZodSymbol:()=>kc,ZodTransformer:()=>$n,ZodTuple:()=>_o,ZodType:()=>ke,ZodUndefined:()=>Js,ZodUnion:()=>Xs,ZodUnknown:()=>ni,ZodVoid:()=>Rc,addIssueToContext:()=>se,any:()=>KC,array:()=>QC,bigint:()=>VC,boolean:()=>lI,coerce:()=>Ez,custom:()=>cI,date:()=>ZC,datetimeRegex:()=>sI,defaultErrorMap:()=>ti,discriminatedUnion:()=>nz,effect:()=>hz,enum:()=>dz,function:()=>uz,getErrorMap:()=>Sc,getParsedType:()=>wo,instanceof:()=>FC,intersection:()=>oz,isAborted:()=>Gm,isAsync:()=>Ic,isDirty:()=>qm,isValid:()=>Zi,late:()=>jC,lazy:()=>fz,literal:()=>lz,makeIssue:()=>_l,map:()=>az,nan:()=>HC,nativeEnum:()=>pz,never:()=>YC,null:()=>WC,nullable:()=>yz,number:()=>fI,object:()=>ez,objectUtil:()=>hw,oboolean:()=>_z,onumber:()=>wz,optional:()=>gz,ostring:()=>vz,pipeline:()=>xz,preprocess:()=>bz,promise:()=>mz,quotelessJson:()=>hC,record:()=>sz,set:()=>cz,setErrorMap:()=>yC,strictObject:()=>tz,string:()=>uI,symbol:()=>GC,transformer:()=>hz,tuple:()=>iz,undefined:()=>qC,union:()=>rz,unknown:()=>JC,util:()=>Ne,void:()=>XC});var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(Ne||(Ne={}));var hw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(hw||(hw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var Y=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),hC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Xr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Xr.create=e=>new Xr(e);var gC=(e,t)=>{let r;switch(e.code){case Y.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e);}return {message:r}},ti=gC;var tI=ti;function yC(e){tI=e;}function Sc(){return tI}var _l=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},bC=[];function se(e,t){let r=Sc(),o=_l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ti?void 0:ti].filter(n=>!!n)});e.common.issues.push(o);}var dr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ge;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},ge=Object.freeze({status:"aborted"}),Zs=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Gm=e=>e.status==="aborted",qm=e=>e.status==="dirty",Zi=e=>e.status==="valid",Ic=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var Tn=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},rI=(e,t)=>{if(Zi(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new Xr(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ke=class{get description(){return this._def.description}_getType(t){return wo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new dr,ctx:{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ic(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return rI(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return Zi(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Zi(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Ic(n)?n:Promise.resolve(n));return rI(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:Y.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new $n({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return Rn.create(this,this._def)}nullable(){return Eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oi.create(this)}promise(){return Wi.create(this,this._def)}or(t){return Xs.create([this,t],this._def)}and(t){return Qs.create(this,t,this._def)}transform(t){return new $n({...Ee(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oa({...Ee(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new El({typeName:be.ZodBranded,type:this,...Ee(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ia({...Ee(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return sa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xC=/^c[^\s-]{8,}$/i,vC=/^[0-9a-z]+$/,wC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_C=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,EC=/^[a-z0-9_-]{21}$/i,SC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,IC=/^[-+]?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)?)??$/,AC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gw,RC=/^(?:(?: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])$/,TC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,$C=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,OC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,NC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,PC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,oI="((\\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])))",BC=new RegExp(`^${oI}$`);function iI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function CC(e){return new RegExp(`^${iI(e)}$`)}function sI(e){let t=`${oI}T${iI(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function zC(e,t){return !!((t==="v4"||!t)&&RC.test(e)||(t==="v6"||!t)&&$C.test(e))}function LC(e,t){if(!SC.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function UC(e,t){return !!((t==="v4"||!t)&&TC.test(e)||(t==="v6"||!t)&&OC.test(e))}var Gi=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.string,received:i.parsedType}),ge}let o=new dr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")AC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")gw||(gw=new RegExp(kC,"u")),gw.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")_C.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")EC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")xC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")vC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")wC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:Y.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:Y.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?sI(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?BC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?CC(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?IC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?zC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?LC(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?UC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?NC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?PC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:Y.invalid_string,message:i.message}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:Y.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Gi.create=e=>new Gi({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function MC(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Gs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.number,received:i.parsedType}),ge}let o,n=new dr;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?MC(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};Gs.create=e=>new Gs({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var qs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new dr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qs.create=e=>new qs({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Ws=class extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.boolean,received:o.parsedType}),ge}return Sr(t.data)}};Ws.create=e=>new Ws({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Ks=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_date}),ge}let o=new dr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ks.create=e=>new Ks({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var kc=class extends ke{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.symbol,received:o.parsedType}),ge}return Sr(t.data)}};kc.create=e=>new kc({typeName:be.ZodSymbol,...Ee(e)});var Js=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.undefined,received:o.parsedType}),ge}return Sr(t.data)}};Js.create=e=>new Js({typeName:be.ZodUndefined,...Ee(e)});var Ys=class extends ke{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.null,received:o.parsedType}),ge}return Sr(t.data)}};Ys.create=e=>new Ys({typeName:be.ZodNull,...Ee(e)});var qi=class extends ke{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};qi.create=e=>new qi({typeName:be.ZodAny,...Ee(e)});var ni=class extends ke{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Sr(t.data)}};ni.create=e=>new ni({typeName:be.ZodUnknown,...Ee(e)});var Qn=class extends ke{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.never,received:r.parsedType}),ge}};Qn.create=e=>new Qn({typeName:be.ZodNever,...Ee(e)});var Rc=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.void,received:o.parsedType}),ge}return Sr(t.data)}};Rc.create=e=>new Rc({typeName:be.ZodVoid,...Ee(e)});var oi=class e extends ke{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:Y.invalid_type,expected:ce.array,received:r.parsedType}),ge;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?Y.too_big:Y.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:Y.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:Y.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Tn(r,s,r.path,a)))).then(s=>dr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Tn(r,s,r.path,a)));return dr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};oi.create=(e,t)=>new oi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...Ee(t)});function Ac(e){if(e instanceof Qr){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Rn.create(Ac(o));}return new Qr({...e._def,shape:()=>t})}else return e instanceof oi?new oi({...e._def,type:Ac(e.element)}):e instanceof Rn?Rn.create(Ac(e.unwrap())):e instanceof Eo?Eo.create(Ac(e.unwrap())):e instanceof _o?_o.create(e.items.map(t=>Ac(t))):e}var Qr=class e extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:Y.invalid_type,expected:ce.object,received:u.parsedType}),ge}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Qn&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let f=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new Tn(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof Qn){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(u==="strict")a.length>0&&(se(n,{code:Y.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let f of a){let d=n.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new Tn(n,d,n.path,f)),alwaysSet:f in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let d=await f.key,g=await f.value;u.push({key:d,value:g,alwaysSet:f.alwaysSet});}return u}).then(u=>dr.mergeObjectSync(o,u)):dr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Ac(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof Rn;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return aI(Ne.objectKeys(this.shape))}};Qr.create=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.strictCreate=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strict",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.lazycreate=(e,t)=>new Qr({shape:e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});var Xs=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Xr(a.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:s}),ge}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Xr(c));return se(r,{code:Y.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}};Xs.create=(e,t)=>new Xs({options:e,typeName:be.ZodUnion,...Ee(t)});var ri=e=>e instanceof ea?ri(e.schema):e instanceof $n?ri(e.innerType()):e instanceof ta?[e.value]:e instanceof ra?e.options:e instanceof na?Ne.objectValues(e.enum):e instanceof oa?ri(e._def.innerType):e instanceof Js?[void 0]:e instanceof Ys?[null]:e instanceof Rn?[void 0,...ri(e.unwrap())]:e instanceof Eo?[null,...ri(e.unwrap())]:e instanceof El||e instanceof sa?ri(e.unwrap()):e instanceof ia?ri(e._def.innerType):[],Wm=class e extends ke{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:Y.invalid_type,expected:ce.object,received:r.parsedType}),ge;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=ri(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ee(o)})}};function yw(e,t){let r=wo(e),o=wo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=yw(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=yw(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var Qs=class extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Gm(i)||Gm(s))return ge;let a=yw(i.value,s.value);return a.valid?((qm(i)||qm(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:Y.invalid_intersection_types}),ge)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Qs.create=(e,t,r)=>new Qs({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:Y.invalid_type,expected:ce.array,received:o.parsedType}),ge;if(o.data.length<this._def.items.length)return se(o,{code:Y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),ge;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:Y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Tn(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>dr.mergeArray(r,s)):dr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:e,typeName:be.ZodTuple,rest:null,...Ee(t)})};var Km=class e extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:Y.invalid_type,expected:ce.object,received:o.parsedType}),ge;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Tn(o,a,o.path,a)),value:s._parse(new Tn(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?dr.mergeObjectAsync(r,n):dr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ke?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:Gi.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},Tc=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:Y.invalid_type,expected:ce.map,received:o.parsedType}),ge;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Tn(o,a,o.path,[u,"key"])),value:i._parse(new Tn(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}}}};Tc.create=(e,t,r)=>new Tc({valueType:t,keyType:e,typeName:be.ZodMap,...Ee(r)});var $c=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:Y.invalid_type,expected:ce.set,received:o.parsedType}),ge;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:Y.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:Y.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let f of c){if(f.status==="aborted")return ge;f.status==="dirty"&&r.dirty(),u.add(f.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Tn(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};$c.create=(e,t)=>new $c({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...Ee(t)});var Jm=class e extends ke{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:Y.invalid_type,expected:ce.function,received:r.parsedType}),ge;function o(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function n(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wi){let a=this;return Sr(async function(...c){let u=new Xr([]),f=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Sr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Xr([o(c,u.error)]);let f=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Xr([n(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_o.create(t).rest(ni.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||_o.create([]).rest(ni.create()),returns:r||ni.create(),typeName:be.ZodFunction,...Ee(o)})}},ea=class extends ke{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ea.create=(e,t)=>new ea({getter:e,typeName:be.ZodLazy,...Ee(t)});var ta=class extends ke{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),ge}return {status:"valid",value:t.data}}get value(){return this._def.value}};ta.create=(e,t)=>new ta({value:e,typeName:be.ZodLiteral,...Ee(t)});function aI(e,t){return new ra({values:e,typeName:be.ZodEnum,...Ee(t)})}var ra=class e extends ke{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:Ne.joinValues(o),received:r.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:o}),ge}return Sr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ra.create=aI;var na=class extends ke{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return se(o,{expected:Ne.joinValues(n),received:o.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return se(o,{received:o.data,code:Y.invalid_enum_value,options:n}),ge}return Sr(t.data)}get enum(){return this._def.values}};na.create=(e,t)=>new na({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Wi=class extends ke{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:Y.invalid_type,expected:ce.promise,received:r.parsedType}),ge;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Sr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wi.create=(e,t)=>new Wi({type:e,typeName:be.ZodPromise,...Ee(t)});var $n=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ge;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?ge:c.status==="dirty"?Zs(c.value):r.value==="dirty"?Zs(c.value):c});{if(r.value==="aborted")return ge;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?ge:a.status==="dirty"?Zs(a.value):r.value==="dirty"?Zs(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Zi(s))return ge;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Zi(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):ge);Ne.assertNever(n);}};$n.create=(e,t,r)=>new $n({schema:e,typeName:be.ZodEffects,effect:t,...Ee(r)});$n.createWithPreprocess=(e,t,r)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...Ee(r)});var Rn=class extends ke{_parse(t){return this._getType(t)===ce.undefined?Sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:be.ZodOptional,...Ee(t)});var Eo=class extends ke{_parse(t){return this._getType(t)===ce.null?Sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Eo.create=(e,t)=>new Eo({innerType:e,typeName:be.ZodNullable,...Ee(t)});var oa=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oa.create=(e,t)=>new oa({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var ia=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ic(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};ia.create=(e,t)=>new ia({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Oc=class extends ke{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.nan,received:o.parsedType}),ge}return {status:"valid",value:t.data}}};Oc.create=e=>new Oc({typeName:be.ZodNaN,...Ee(e)});var DC=Symbol("zod_brand"),El=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Sl=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ge:i.status==="dirty"?(r.dirty(),Zs(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ge:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:be.ZodPipeline})}},sa=class extends ke{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Zi(n)&&(n.value=Object.freeze(n.value)),n);return Ic(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};sa.create=(e,t)=>new sa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function nI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function cI(e,t={},r){return e?qi.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=nI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=nI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):qi.create()}var jC={object:Qr.lazycreate},be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(be||(be={}));var FC=(e,t={message:`Input not instance of ${e.name}`})=>cI(r=>r instanceof e,t),uI=Gi.create,fI=Gs.create,HC=Oc.create,VC=qs.create,lI=Ws.create,ZC=Ks.create,GC=kc.create,qC=Js.create,WC=Ys.create,KC=qi.create,JC=ni.create,YC=Qn.create,XC=Rc.create,QC=oi.create,ez=Qr.create,tz=Qr.strictCreate,rz=Xs.create,nz=Wm.create,oz=Qs.create,iz=_o.create,sz=Km.create,az=Tc.create,cz=$c.create,uz=Jm.create,fz=ea.create,lz=ta.create,dz=ra.create,pz=na.create,mz=Wi.create,hz=$n.create,gz=Rn.create,yz=Eo.create,bz=$n.createWithPreprocess,xz=Sl.create,vz=()=>uI().optional(),wz=()=>fI().optional(),_z=()=>lI().optional(),Ez={string:(e=>Gi.create({...e,coerce:true})),number:(e=>Gs.create({...e,coerce:true})),boolean:(e=>Ws.create({...e,coerce:true})),bigint:(e=>qs.create({...e,coerce:true})),date:(e=>Ks.create({...e,coerce:true}))};var Sz=ge;var Iz=/[@#$%^&*+=/\\|~«»]/,Az=/(!{2,}|\?{2,}|-{2,})/,kz=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,aa=({max:e,noSpaces:t}={})=>(t?ie.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ie.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!kz.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!Iz.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!Az.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),ir=ie.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),Il=ie.string().max(32),Ym=ie.string().max(32),Rz=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,dI=ie.string().regex(Rz,{message:"Invalid CAIP-19 asset ID"}),Al=ie.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),Tz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pI=ie.string().max(1024).regex(Tz,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),mI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),hI=ie.object({header:ie.string(),payload:ie.string(),signature:ie.string()});ie.object({fid:ie.number(),type:ie.literal("app_key"),key:ie.string().startsWith("0x")});var $z=ie.object({type:ie.literal("launch_frame"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Oz=ie.object({type:ie.literal("launch_miniapp"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Nz=ie.object({type:ie.literal("view_token"),token:dI}),Pz=ie.discriminatedUnion("type",[Oz,Nz,$z]),Bz=ie.object({title:Ym,action:Pz});ie.object({version:ie.union([ie.string(),ie.number()]).transform(e=>String(e)).pipe(ie.union([ie.literal("next"),ie.literal("1")])),imageUrl:ir,aspectRatio:mI.optional(),button:Bz});var bw=ie.object({url:ie.string(),token:ie.string()});ie.object({notificationId:ie.string().max(128),title:ie.string().max(32),body:ie.string().max(128),targetUrl:ir,tokens:ie.string().array().max(100)});ie.object({result:ie.object({successfulTokens:ie.array(ie.string()),invalidTokens:ie.array(ie.string()),rateLimitedTokens:ie.array(ie.string())})});var Cz=ie.object({event:ie.literal("miniapp_added"),notificationDetails:bw.optional()}),zz=ie.object({event:ie.literal("miniapp_removed")}),Lz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:bw.required()}),Uz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[Cz,zz,Lz,Uz]);var gI=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var Mz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],Dz=ie.enum(Mz),jz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),Fz=aa({max:30}),Hz=aa({max:170}),Vz=ie.array(ir).max(3),Zz=ie.array(aa({max:20,noSpaces:true})).max(5),Gz=aa({max:30}),qz=aa({max:30}),Wz=aa({max:100}),Kz=ie.boolean(),Jz=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function bI(e){let t=new Set(e);return Array.from(t)}var Yz=ie.array(ie.enum(Jz)).transform(bI),Xz=ie.array(ie.enum(gI)).transform(bI),yI=ie.object({version:jz,name:Il,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Ym.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional(),webhookUrl:ir.optional(),subtitle:Fz.optional(),description:Hz.optional(),screenshotUrls:Vz.optional(),primaryCategory:Dz.optional(),tags:Zz.optional(),heroImageUrl:ir.optional(),tagline:Gz.optional(),ogTitle:qz.optional(),ogDescription:Wz.optional(),ogImageUrl:ir.optional(),noindex:Kz.optional(),requiredChains:Yz.optional(),requiredCapabilities:Xz.optional(),castShareUrl:ir.optional(),canonicalDomain:pI.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ie.object({accountAssociation:hI,miniapp:yI.optional(),frame:yI.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var xe=Ko(Rl());sh();ai();Gw();wa();xa();var $o=BigInt(0),Fr=BigInt(1),EA=BigInt(2),YL=BigInt(8),XL={zip215:true};function QL(e){let t=Cl(e);return to(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function SA(e){let t=QL(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=EA<<BigInt(a*8)-Fr,f=r.create,d=di(t.n,t.nBitLength);function g(x,_){let k=r.sqr(x),w=r.sqr(_),p=r.add(r.mul(t.a,k),w),A=r.add(r.ONE,r.mul(t.d,r.mul(k,w)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((x,_)=>{try{return {isValid:!0,value:r.sqrt(x*r.inv(_))}}catch{return {isValid:false,value:$o}}}),v=t.adjustScalarBytes||(x=>x),E=t.domain||((x,_,k)=>{if(Ro("phflag",k),_.length||k)throw new Error("Contexts/pre-hash are not supported");return x});function R(x,_,k=false){let w=k?Fr:$o;Dr("coordinate "+x,_,w,u);}function $(x){if(!(x instanceof I))throw new Error("ExtendedPoint expected")}let N=Mc((x,_)=>{let{ex:k,ey:w,ez:p}=x,A=x.is0();_==null&&(_=A?YL:r.inv(p));let G=f(k*_),K=f(w*_),Q=f(p*_);if(A)return {x:$o,y:Fr};if(Q!==Fr)throw new Error("invZ was invalid");return {x:G,y:K}}),O=Mc(x=>{let{a:_,d:k}=t;if(x.is0())throw new Error("bad point: ZERO");let{ex:w,ey:p,ez:A,et:G}=x,K=f(w*w),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(K*_),We=f(ae*f(ye+Q)),Se=f(he+f(k*f(K*Q)));if(We!==Se)throw new Error("bad point: equation left != right (1)");let _e=f(w*p),tr=f(A*G);if(_e!==tr)throw new Error("bad point: equation left != right (2)");return true});class I{constructor(_,k,w,p){R("x",_),R("y",k),R("z",w,true),R("t",p),this.ex=_,this.ey=k,this.ez=w,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(_){if(_ instanceof I)throw new Error("extended point not allowed");let{x:k,y:w}=_||{};return R("x",k),R("y",w),new I(k,w,Fr,f(k*w))}static normalizeZ(_){let k=li(r,_.map(w=>w.ez));return _.map((w,p)=>w.toAffine(k[p])).map(I.fromAffine)}static msm(_,k){return lh(I,d,_,k)}_setWindowSize(_){C.setWindowSize(this,_);}assertValidity(){O(this);}equals(_){$(_);let{ex:k,ey:w,ez:p}=this,{ex:A,ey:G,ez:K}=_,Q=f(k*K),ae=f(A*p),he=f(w*K),ye=f(G*p);return Q===ae&&he===ye}is0(){return this.equals(I.ZERO)}negate(){return new I(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:_}=t,{ex:k,ey:w,ez:p}=this,A=f(k*k),G=f(w*w),K=f(EA*f(p*p)),Q=f(_*A),ae=k+w,he=f(f(ae*ae)-A-G),ye=Q+G,We=ye-K,Se=Q-G,_e=f(he*We),tr=f(ye*Se),Ce=f(he*Se),je=f(We*ye);return new I(_e,tr,je,Ce)}add(_){$(_);let{a:k,d:w}=t,{ex:p,ey:A,ez:G,et:K}=this,{ex:Q,ey:ae,ez:he,et:ye}=_,We=f(p*Q),Se=f(A*ae),_e=f(K*w*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-We-Se),je=tr-_e,Li=tr+_e,pt=f(Se-k*We),gt=f(Ce*je),Bp=f(Li*pt),yt=f(Ce*pt),bt=f(je*Li);return new I(gt,Bp,bt,yt)}subtract(_){return this.add(_.negate())}wNAF(_){return C.wNAFCached(this,_,I.normalizeZ)}multiply(_){let k=_;Dr("scalar",k,Fr,o);let{p:w,f:p}=this.wNAF(k);return I.normalizeZ([w,p])[0]}multiplyUnsafe(_,k=I.ZERO){let w=_;return Dr("scalar",w,$o,o),w===$o?L:this.is0()||w===Fr?this:C.wNAFCachedUnsafe(this,w,I.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return C.unsafeLadder(this,o).is0()}toAffine(_){return N(this,_)}clearCofactor(){let{h:_}=t;return _===Fr?this:this.multiplyUnsafe(_)}static fromHex(_,k=false){let{d:w,a:p}=t,A=r.BYTES;_=Ge("pointHex",_,A),Ro("zip215",k);let G=_.slice(),K=_[A-1];G[A-1]=K&-129;let Q=ga(G),ae=k?u:r.ORDER;Dr("pointHex.y",Q,$o,ae);let he=f(Q*Q),ye=f(he-Fr),We=f(w*he-p),{isValid:Se,value:_e}=h(ye,We);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let tr=(_e&Fr)===Fr,Ce=(K&128)!==0;if(!k&&_e===$o&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==tr&&(_e=f(-_e)),I.fromAffine({x:_e,y:Q})}static fromPrivateKey(_){let{scalar:k}=H(_);return P.multiply(k)}toRawBytes(){let{x:_,y:k}=this.toAffine(),w=Uc(k,r.BYTES);return w[w.length-1]|=_&Fr?128:0,w}toHex(){return es(this.toRawBytes())}}I.BASE=new I(t.Gx,t.Gy,Fr,f(t.Gx*t.Gy)),I.ZERO=new I($o,Fr,Fr,$o);let{BASE:P,ZERO:L}=I,C=fh(I,a*8);function D(x){return Le(x,o)}function q(x){return D(ga(x))}function H(x){let _=r.BYTES;x=Ge("private key",x,_);let k=Ge("hashed private key",i(x),2*_),w=v(k.slice(0,_)),p=k.slice(_,2*_),A=q(w);return {head:w,prefix:p,scalar:A}}function Z(x){let{head:_,prefix:k,scalar:w}=H(x),p=P.multiply(w),A=p.toRawBytes();return {head:_,prefix:k,scalar:w,point:p,pointBytes:A}}function re(x){return Z(x).pointBytes}function S(x=Uint8Array.of(),..._){let k=ar(..._);return q(i(E(k,Ge("context",x),!!n)))}function l(x,_,k={}){x=Ge("message",x),n&&(x=n(x));let{prefix:w,scalar:p,pointBytes:A}=Z(_),G=S(k.context,w,x),K=P.multiply(G).toRawBytes(),Q=S(k.context,K,A,x),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(K,Uc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=XL;function y(x,_,k,w=m){let{context:p,zip215:A}=w,G=r.BYTES;x=Ge("signature",x,2*G),_=Ge("message",_),k=Ge("publicKey",k,G),A!==void 0&&Ro("zip215",A),n&&(_=n(_));let K=ga(x.slice(G,2*G)),Q,ae,he;try{Q=I.fromHex(k,A),ae=I.fromHex(x.slice(0,G),A),he=P.multiplyUnsafe(K);}catch{return false}if(!A&&Q.isSmallOrder())return false;let ye=S(p,ae.toRawBytes(),Q.toRawBytes(),_);return ae.add(Q.multiplyUnsafe(ye)).subtract(he).clearCofactor().equals(I.ZERO)}return P._setWindowSize(8),{CURVE:t,getPublicKey:re,sign:l,verify:y,ExtendedPoint:I,utils:{getExtendedPublicKey:Z,randomPrivateKey:()=>s(r.BYTES),precompute(x=8,_=I.BASE){return _._setWindowSize(x),_.multiply(BigInt(3)),_}}}}wa();var qw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),TA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var oU=BigInt(1),$A=BigInt(2);BigInt(3);var iU=BigInt(5),sU=BigInt(8);function aU(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=qw,a=e*e%i*e%i,c=at(a,$A,i)*a%i,u=at(c,oU,i)*e%i,f=at(u,iU,i)*u%i,d=at(f,t,i)*f%i,g=at(d,r,i)*d%i,h=at(g,o,i)*g%i,v=at(h,n,i)*h%i,E=at(v,n,i)*h%i,R=at(E,t,i)*f%i;return {pow_p_5_8:at(R,$A,i)*e%i,b2:a}}function cU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function uU(e,t){let r=qw,o=Le(t*t*t,r),n=Le(o*o*t,r),i=aU(e*n).pow_p_5_8,s=Le(e*o*i,r),a=Le(t*s*s,r),c=s,u=Le(s*TA,r),f=a===e,d=a===Le(-e,r),g=a===Le(-e*TA,r);return f&&(s=c),(d||g)&&(s=u),gA(s,r)&&(s=Le(-s,r)),{isValid:f||d,value:s}}var OA=di(qw,void 0,true),fU={a:OA.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:OA,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:sU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:oA,randomBytes:zc,adjustScalarBytes:cU,uvRatio:uU},_a=SA(fU);var V_=Ko(Kw()),Nr=Ko(Yw());sh();var Ll=ha;var Yc=Ko(ZA()),T=Ko(s_()),mR=Ko(s_());var a_=8078e3,c_=8078001,u_=8078004,f_=8078005,l_=8078006,d_=8078011;function XA(e){return Array.isArray(e)?"%5B"+e.map(XA).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Tj([e,t]){return `${e}=${XA(t)}`}function $j(e){let t=Object.entries(e).map(Tj).join("&");return btoa(t)}function Oj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${$j(t)}'`),`${r}\``}}var os=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=Oj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function Nj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function QA(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(Nj(t,e));return e.write(t,r,0),r}})}function ek(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Vc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function tk(e,t){if(Vc(e)!==Vc(t))throw new os(u_);if(Vc(e)&&Vc(t)&&e.fixedSize!==t.fixedSize)throw new os(f_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Vc(e)&&!Vc(t)&&e.maxSize!==t.maxSize)throw new os(l_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function rk(e,t,r=0){if(t.length-r<=0)throw new os(a_,{codecDescription:e})}function nk(e,t,r,o=0){let n=r.length-o;if(n<t)throw new os(c_,{bytesLength:n,codecDescription:e,expected:t})}function Pj(e,t,r,o){if(o<t||o>r)throw new os(d_,{codecDescription:e,max:r,min:t,value:o})}function ok(e){return e?.endian!==1}function Bj(e){return QA({fixedSize:e.size,write(t,r,o){e.range&&Pj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,ok(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function Cj(e){return ek({fixedSize:e.size,read(t,r=0){rk(e.name,t,r),nk(e.name,e.size,t,r);let o=new DataView(zj(t,r,e.size));return [e.get(o,ok(e.config)),r+e.size]}})}function zj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var p_=(e={})=>Bj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Lj=(e={})=>Cj({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),ik=(e={})=>tk(p_(e),Lj(e));var m_=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function Uj(e){return Hl(e)&&typeof e[Symbol.iterator]=="function"}function Hl(e){return typeof e=="object"&&e!=null}function Mh(e){return Hl(e)&&!Array.isArray(e)}function ro(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Mj(e){let{done:t,value:r}=e.next();return t?void 0:r}function Dj(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${ro(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*sk(e,t,r,o){Uj(e)||(e=[e]);for(let n of e){let i=Dj(n,t,r,o);i&&(yield i);}}function*h_(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,f,d]of t.entries(e,a)){let g=h_(f,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,f],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(f=h[1],u===void 0?e=f:e instanceof Map?e.set(u,f):e instanceof Set?e.add(f):Hl(e)&&(f!==void 0||u in e)&&(e[u]=f));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Pn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let f=n(c,u);return sk(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return sk(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return ak(t,this,r)}create(t,r){return Zc(t,this,r)}is(t){return ck(t,this)}mask(t,r){return jj(t,this,r)}validate(t,r={}){return Vl(t,this,r)}};function ak(e,t,r){let o=Vl(e,t,{message:r});if(o[0])throw o[0]}function Zc(e,t,r){let o=Vl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function jj(e,t,r){let o=Vl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function ck(e,t){return !Vl(e,t)[0]}function Vl(e,t,r={}){let o=h_(e,t,r),n=Mj(o);return n[0]?[new m_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function Aa(e,t){return new Pn({type:e,schema:null,validator:t})}function uk(){return Aa("any",()=>true)}function ue(e){return new Pn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ro(t)}`}})}function no(){return Aa("boolean",e=>typeof e=="boolean")}function Dh(e){return Aa("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ro(t)}`)}function ct(e){let t=ro(e),r=typeof e;return new Pn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${ro(o)}`}})}function Fj(){return Aa("never",()=>false)}function fe(e){return new Pn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U(){return Aa("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ro(e)}`)}function me(e){return new Pn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function g_(e,t){return new Pn({type:"record",schema:null,*entries(r){if(Hl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function ne(){return Aa("string",e=>typeof e=="string"||`Expected a string, but received: ${ro(e)}`)}function jh(e){let t=Fj();return new Pn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${ro(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function W(e){let t=Object.keys(e);return new Pn({type:"type",schema:e,*entries(r){if(Hl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function Ar(e){let t=e.map(r=>r.type).join(" | ");return new Pn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=h_(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${ro(r)}`,...n]}})}function ka(){return Aa("unknown",()=>true)}function Gc(e,t,r){return new Pn({...e,coercer:(o,n)=>ck(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ko(Pk());Ko(Rl(),1);var Jl=Ko(Ck(),1);var zk=Jl.default;Wh();rd();function nR(e){try{return _a.ExtendedPoint.fromHex(e),!0}catch{return false}}var i6=(e,t)=>_a.sign(e,t.slice(0,32)),U7=_a.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),G_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, Yc.serialize)(e0,this))}static decode(t){return (0, Yc.deserialize)(e0,this,t)}static decodeUnchecked(t){return (0, Yc.deserializeUnchecked)(e0,this,t)}};var e0=new Map,hR,M7=32,ls=32;function D7(e){return e._bn!==void 0}var oR=1,Ie=class e extends G_{constructor(t){if(super({}),this._bn=void 0,D7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ls)throw new Error("Invalid public key input");this._bn=new V_.default(r);}else this._bn=new V_.default(t);if(this._bn.byteLength()>ls)throw new Error("Invalid public key input")}}static unique(){let t=new e(oR);return oR+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Nr.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(xe.Buffer);if(t.length===ls)return t;let r=xe.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=xe.Buffer.concat([t.toBuffer(),xe.Buffer.from(r),o.toBuffer()]),i=Ll(n);return new e(i)}static createProgramAddressSync(t,r){let o=xe.Buffer.alloc(0);t.forEach(function(i){if(i.length>M7)throw new TypeError("Max seed length exceeded");o=xe.Buffer.concat([o,He(i)]);}),o=xe.Buffer.concat([o,r.toBuffer(),xe.Buffer.from("ProgramDerivedAddress")]);let n=Ll(o);if(nR(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(xe.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return nR(r.toBytes())}};hR=Ie;Ie.default=new hR("11111111111111111111111111111111");e0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Ta=1232,s6=127,t0=64;var Kc=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>T.blob(32,e),j7=(e="signature")=>T.blob(64,e),Wc=(e="string")=>{let t=T.struct([T.u32("length"),T.u32("lengthPadding"),T.blob(T.offset(T.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:xe.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>T.u32().span+T.u32().span+xe.Buffer.from(i,"utf8").length,n},F7=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),H7=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),V7=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),Z7=(e="voteAuthorizeWithSeedArgs")=>T.struct([T.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),Wc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function xn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function vn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function it(e,t){if(!e)throw new Error(t||"Assertion failed")}var r0=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];it(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{it(r.length>0,"Expected at least one writable signer key");let[c]=r[0];it(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(it(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},yR="Reached end of buffer unexpectedly";function yi(e){if(e.length===0)throw new Error(yR);return e.shift()}function wn(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(yR);return e.splice(...t)}var id=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Nr.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new Kc(this.staticAccountKeys)}static compile(t){let r=r0.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new Kc(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Nr.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];vn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,v=Array.from(Nr.default.decode(d.data)),E=[];vn(E,g.length);let R=[];return vn(R,v.length),{programIdIndex:h,keyIndicesCount:xe.Buffer.from(E),keyIndices:g,dataLength:xe.Buffer.from(R),data:v}}),n=[];vn(n,o.length);let i=xe.Buffer.alloc(Ta);xe.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=T.struct([T.u8("programIdIndex"),T.blob(d.keyIndicesCount.length,"keyIndicesCount"),T.seq(T.u8("keyIndex"),d.keyIndices.length,"keyIndices"),T.blob(d.dataLength.length,"dataLength"),T.seq(T.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=T.struct([T.blob(1,"numRequiredSignatures"),T.blob(1,"numReadonlySignedAccounts"),T.blob(1,"numReadonlyUnsignedAccounts"),T.blob(r.length,"keyCount"),T.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:xe.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:xe.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:xe.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:xe.Buffer.from(r),keys:this.accountKeys.map(d=>He(d.toBytes())),recentBlockhash:Nr.default.decode(this.recentBlockhash)},u=xe.Buffer.alloc(2048),f=a.encode(c,u);return i.copy(u,f),u.slice(0,f+i.length)}static from(t){let r=[...t],o=yi(r);if(o!==(o&s6))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=yi(r),i=yi(r),s=xn(r),a=[];for(let g=0;g<s;g++){let h=wn(r,0,ls);a.push(new Ie(xe.Buffer.from(h)));}let c=wn(r,0,ls),u=xn(r),f=[];for(let g=0;g<u;g++){let h=yi(r),v=xn(r),E=wn(r,0,v),R=xn(r),$=wn(r,0,R),N=Nr.default.encode(xe.Buffer.from($));f.push({programIdIndex:h,accounts:E,data:N});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Nr.default.encode(xe.Buffer.from(c)),accountKeys:a,instructions:f};return new e(d)}},J_=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Kc(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=r0.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let f of i){let d=r.extractTableLookup(f);if(d!==void 0){let[g,{writable:h,readonly:v}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...v);}}let[s,a]=r.getMessageComponents(),u=new Kc(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();vn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();vn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();vn(i,this.addressTableLookups.length);let s=T.struct([T.u8("prefix"),T.struct([T.u8("numRequiredSignatures"),T.u8("numReadonlySignedAccounts"),T.u8("numReadonlyUnsignedAccounts")],"header"),T.blob(t.length,"staticAccountKeysLength"),T.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),T.blob(o.length,"instructionsLength"),T.blob(r.length,"serializedInstructions"),T.blob(i.length,"addressTableLookupsLength"),T.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array(Ta),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(f=>f.toBytes()),recentBlockhash:Nr.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array(Ta);for(let o of this.compiledInstructions){let n=Array();vn(n,o.accountKeyIndexes.length);let i=Array();vn(i,o.data.length);let s=T.struct([T.u8("programIdIndex"),T.blob(n.length,"encodedAccountKeyIndexesLength"),T.seq(T.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),T.blob(i.length,"encodedDataLength"),T.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array(Ta);for(let o of this.addressTableLookups){let n=Array();vn(n,o.writableIndexes.length);let i=Array();vn(i,o.readonlyIndexes.length);let s=T.struct([Pe("accountKey"),T.blob(n.length,"encodedWritableIndexesLength"),T.seq(T.u8(),o.writableIndexes.length,"writableIndexes"),T.blob(i.length,"encodedReadonlyIndexesLength"),T.seq(T.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=yi(r),n=o&s6;it(o!==n,"Expected versioned message but received legacy message");let i=n;it(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:yi(r),numReadonlySignedAccounts:yi(r),numReadonlyUnsignedAccounts:yi(r)},a=[],c=xn(r);for(let v=0;v<c;v++)a.push(new Ie(wn(r,0,ls)));let u=Nr.default.encode(wn(r,0,ls)),f=xn(r),d=[];for(let v=0;v<f;v++){let E=yi(r),R=xn(r),$=wn(r,0,R),N=xn(r),O=new Uint8Array(wn(r,0,N));d.push({programIdIndex:E,accountKeyIndexes:$,data:O});}let g=xn(r),h=[];for(let v=0;v<g;v++){let E=new Ie(wn(r,0,ls)),R=xn(r),$=wn(r,0,R),N=xn(r),O=wn(r,0,N);h.push({accountKey:E,writableIndexes:$,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},a0={deserializeMessageVersion(e){let t=e[0],r=t&s6;return r===t?"legacy":r},deserialize:e=>{let t=a0.deserializeMessageVersion(e);if(t==="legacy")return id.from(e);if(t===0)return J_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var G7=xe.Buffer.alloc(t0).fill(0),Xe=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=xe.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},tt=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new Xe(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let E=0;E<r.length;E++)if(r[E].programId===void 0)throw new Error(`Transaction instruction index ${E} has undefined program id`);let n=[],i=[];r.forEach(E=>{E.keys.forEach($=>{i.push({...$});});let R=E.programId.toString();n.includes(R)||n.push(R);}),n.forEach(E=>{i.push({pubkey:new Ie(E),isSigner:false,isWritable:false});});let s=[];i.forEach(E=>{let R=E.pubkey.toString(),$=s.findIndex(N=>N.pubkey.toString()===R);$>-1?(s[$].isWritable=s[$].isWritable||E.isWritable,s[$].isSigner=s[$].isSigner||E.isSigner):s.push(E);}),s.sort(function(E,R){if(E.isSigner!==R.isSigner)return E.isSigner?-1:1;if(E.isWritable!==R.isWritable)return E.isWritable?-1:1;let $={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return E.pubkey.toBase58().localeCompare(R.pubkey.toBase58(),"en",$)});let a=s.findIndex(E=>E.pubkey.equals(o));if(a>-1){let[E]=s.splice(a,1);E.isSigner=true,E.isWritable=true,s.unshift(E);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let E of this.signatures){let R=s.findIndex($=>$.pubkey.equals(E.publicKey));if(R>-1)s[R].isSigner||(s[R].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${E.publicKey.toString()}`)}let c=0,u=0,f=0,d=[],g=[];s.forEach(({pubkey:E,isSigner:R,isWritable:$})=>{R?(d.push(E.toString()),c+=1,$||(u+=1)):(g.push(E.toString()),$||(f+=1));});let h=d.concat(g),v=r.map(E=>{let{data:R,programId:$}=E;return {programIdIndex:h.indexOf($.toString()),accounts:E.keys.map(N=>h.indexOf(N.pubkey.toString())),data:Nr.default.encode(R)}});return v.forEach(E=>{it(E.programIdIndex>=0),E.accounts.forEach(R=>it(R>=0));}),new id({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:f},accountKeys:h,recentBlockhash:t,instructions:v})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=i6(o,n.secretKey);this._addSignature(n.publicKey,He(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){it(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=xe.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):U7(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
63
63
  Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(s+=`
64
- Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];vn(o,r.length);let n=o.length+r.length*64+t.length,i=xe.Buffer.alloc(n);return it(r.length<256),xe.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(it(s.length===64,"signature has invalid length"),xe.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),it(i.length<=Ta,`Transaction too large: ${i.length} > ${Ta}`),i}get keys(){return it(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return it(this.instructions.length===1),this.instructions[0].programId}get data(){return it(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=xn(r),n=[];for(let i=0;i<o;i++){let s=wn(r,0,t0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(id.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Nr.default.encode(j7)?null:Nr.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new Xe({keys:i,programId:t.accountKeys[n.programIdIndex],data:Nr.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var n0=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)it(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(t0));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();vn(r,this.signatures.length);let o=T.struct([T.blob(r.length,"encodedSignaturesLength"),T.seq(z7(),this.signatures.length,"signatures"),T.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=xn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(wn(r,0,t0)));let i=a0.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));it(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=n6(r,n.secretKey);}}addSignature(t,r){it(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));it(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var q7=T.nu64("lamportsPerSignature"),W7=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([q7],"feeCalculator")]);W7.span;function Jc(e){let t=(0, pR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=ok();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:T.struct([T.u32("instruction"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},Assign:{index:1,layout:T.struct([T.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:T.struct([T.u32("instruction"),Jc("lamports")])},CreateWithSeed:{index:3,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:T.struct([T.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:T.struct([T.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:T.struct([T.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:T.struct([T.u32("instruction"),T.ns64("space")])},AllocateWithSeed:{index:9,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:T.struct([T.u32("instruction"),Jc("lamports"),Wc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:T.struct([T.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:T.struct([T.u32("typeIndex"),Jc("deactivationSlot"),T.nu64("lastExtendedSlot"),T.u8("lastExtendedStartIndex"),T.u8(),T.seq(Pe(),T.offset(T.u8(),-1),"authority")])});var xt=Gc(Dh(Ie),ne(),e=>new Ie(e)),yR=jh([ne(),ct("base64")]),i6=Gc(Dh(xe.Buffer),yR,e=>xe.Buffer.from(e[0],"base64"));function bR(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:ka(),message:ne(),data:me(ck())})})])}var J7=bR(ka());function rt(e){return Gc(bR(e),J7,t=>"error"in t?t:{...t,result:Zc(t.result,e)})}function io(e){return rt(W({context:W({slot:U()}),value:e}))}function c0(e){return W({context:W({slot:U()}),value:e})}var Y7=W({foundation:U(),foundationTerm:U(),initial:U(),taper:U(),terminal:U()});rt(ue(fe(W({epoch:U(),effectiveSlot:U(),amount:U(),postBalance:U(),commission:me(fe(U()))}))));var X7=ue(W({slot:U(),prioritizationFee:U()})),Q7=W({total:U(),validator:U(),foundation:U(),epoch:U()}),eF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),tF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:no(),firstNormalEpoch:U(),firstNormalSlot:U()}),rF=m_(ne(),ue(U())),$a=fe(Ar([W({}),ne()])),nF=W({err:$a}),oF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var iF=W({program:ne(),programId:xt,parsed:ka()}),sF=W({programId:xt,accounts:ue(xt),data:ne()});io(W({err:fe(Ar([W({}),ne()])),logs:fe(ue(ne())),accounts:me(fe(ue(fe(W({executable:no(),owner:ne(),lamports:U(),data:ue(ne()),rentEpoch:me(U())}))))),unitsConsumed:me(U()),returnData:me(fe(W({programId:ne(),data:jh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([iF,sF]))}))))}));io(W({byIdentity:m_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(Y7);rt(Q7);rt(X7);rt(eF);rt(tF);rt(rF);rt(U());io(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var aF=W({amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())});io(ue(W({address:xt,amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())})));io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:i6,rentEpoch:U()})})));var Y_=W({program:ne(),parsed:ka(),space:U()});io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:Y_,rentEpoch:U()})})));io(ue(W({lamports:U(),address:xt})));var s6=W({executable:no(),owner:xt,lamports:U(),data:i6,rentEpoch:U()});W({pubkey:xt,account:s6});var cF=Gc(Ar([Dh(xe.Buffer),Y_]),Ar([yR,Y_]),e=>Array.isArray(e)?Zc(e,i6):e),uF=W({executable:no(),owner:xt,lamports:U(),data:cF,rentEpoch:U()});W({pubkey:xt,account:uF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:c0(s6)});var fF=W({pubkey:xt,account:s6});W({subscription:U(),result:c0(fF)});var lF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:lF});var dF=Ar([W({type:Ar([ct("firstShredReceived"),ct("completed"),ct("optimisticConfirmation"),ct("root")]),slot:U(),timestamp:U()}),W({type:ct("createdBank"),parent:U(),slot:U(),timestamp:U()}),W({type:ct("frozen"),slot:U(),timestamp:U(),stats:W({numTransactionEntries:U(),numSuccessfulTransactions:U(),numFailedTransactions:U(),maxTransactionsPerEntry:U()})}),W({type:ct("dead"),slot:U(),timestamp:U(),err:ne()})]);W({subscription:U(),result:dF});W({subscription:U(),result:c0(Ar([nF,oF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var sR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:no(),epochCredits:ue(jh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(sR),delinquent:ue(sR)}));var pF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),mF=W({slot:U(),confirmations:fe(U()),err:$a,confirmationStatus:me(pF)});io(ue(fe(mF)));rt(U());var xR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),a6=W({signatures:ue(ne()),message:W({accountKeys:ue(ne()),header:W({numRequiredSignatures:U(),numReadonlySignedAccounts:U(),numReadonlyUnsignedAccounts:U()}),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()})),recentBlockhash:ne(),addressTableLookups:me(ue(xR))})}),vR=W({pubkey:xt,signer:no(),writable:no(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),wR=W({accountKeys:ue(vR),signatures:ue(ne())}),_R=W({parsed:ka(),program:ne(),programId:xt}),ER=W({accounts:ue(xt),data:ne(),programId:xt}),hF=Ar([ER,_R]),gF=Ar([W({parsed:ka(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),SR=Gc(hF,gF,e=>"accounts"in e?Zc(e,ER):Zc(e,_R)),IR=W({signatures:ue(ne()),message:W({accountKeys:ue(vR),instructions:ue(SR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(xR)))})}),o0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:aF}),AR=W({writable:ue(xt),readonly:ue(xt)}),u0=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()}))})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(AR),computeUnitsConsumed:me(U()),costUnits:me(U())}),c6=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(SR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(AR),computeUnitsConsumed:me(U()),costUnits:me(U())}),Xc=Ar([ct(0),ct("legacy")]),Oa=W({pubkey:ne(),lamports:U(),postBalance:fe(U()),rewardType:fe(ne()),commission:me(fe(U()))});rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:a6,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:wR,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:IR,meta:fe(c6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:wR,meta:fe(c6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:a6,meta:fe(u0)})),rewards:me(ue(Oa)),blockTime:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),signatures:ue(ne()),blockTime:fe(U())})));rt(fe(W({slot:U(),meta:fe(u0),blockTime:me(fe(U())),transaction:a6,version:me(Xc)})));rt(fe(W({slot:U(),transaction:IR,meta:fe(c6),blockTime:me(fe(U())),version:me(Xc)})));io(W({blockhash:ne(),lastValidBlockHeight:U()}));io(no());var yF=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(yF));io(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var bF=W({err:$a,logs:ue(ne()),signature:ne()});W({result:c0(bF),subscription:U()});Object.freeze({CreateLookupTable:{index:0,layout:T.struct([T.u32("instruction"),Jc("recentSlot"),T.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:T.struct([T.u32("instruction")])},ExtendLookupTable:{index:2,layout:T.struct([T.u32("instruction"),Jc(),T.seq(Pe(),T.offset(T.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:T.struct([T.u32("instruction")])},CloseLookupTable:{index:4,layout:T.struct([T.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:T.struct([T.u8("instruction"),T.u32("units"),T.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:T.struct([T.u8("instruction"),T.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:T.struct([T.u8("instruction"),T.u32("units")])},SetComputeUnitPrice:{index:3,layout:T.struct([T.u8("instruction"),Jc("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");T.struct([T.u8("numSignatures"),T.u8("padding"),T.u16("signatureOffset"),T.u16("signatureInstructionIndex"),T.u16("publicKeyOffset"),T.u16("publicKeyInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");bn.utils.isValidPrivateKey;bn.getPublicKey;T.struct([T.u8("numSignatures"),T.u16("signatureOffset"),T.u8("signatureInstructionIndex"),T.u16("ethAddressOffset"),T.u8("ethAddressInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u8("messageInstructionIndex"),T.blob(20,"ethAddress"),T.blob(64,"signature"),T.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var kR;new Ie("StakeConfig11111111111111111111111111111111");var ad=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};kR=ad;ad.default=new kR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),L7(),U7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:T.struct([T.u32("instruction")])},Split:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Withdraw:{index:4,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Deactivate:{index:5,layout:T.struct([T.u32("instruction")])},Merge:{index:7,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType"),Wc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:T.struct([T.u32("instruction"),M7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:T.struct([T.u32("instruction"),D7()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");W({name:ne(),website:me(ne()),details:me(ne()),iconUrl:me(ne()),keybaseUsername:me(ne())});new Ie("Vote111111111111111111111111111111111111111");T.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),T.u8("commission"),T.nu64(),T.seq(T.struct([T.nu64("slot"),T.u32("confirmationCount")]),T.offset(T.u32(),-8),"votes"),T.u8("rootSlotValid"),T.nu64("rootSlot"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),Pe("authorizedVoter")]),T.offset(T.u32(),-8),"authorizedVoters"),T.struct([T.seq(T.struct([Pe("authorizedPubkey"),T.nu64("epochOfLastAuthorizedSwitch"),T.nu64("targetEpoch")]),32,"buf"),T.nu64("idx"),T.u8("isEmpty")],"priorVoters"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),T.nu64("credits"),T.nu64("prevCredits")]),T.offset(T.u32(),-8),"epochCredits"),T.struct([T.nu64("slot"),T.nu64("timestamp")],"lastTimestamp")]);var RR=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function TR(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function EF(e){let t=Buffer.from(e,"base64");return a0.deserializeMessageVersion(t)==="legacy"?n0.deserialize(t):tt.from(t)}function $R(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:TR(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:TR(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:EF(i)}}}}var OR=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=SF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function SF({emitter:e,back:t}){let r=IF();if(r)return AF({emitter:e,back:t,navigation:r});if(typeof window<"u")return kF({emitter:e,back:t,window})}function IF(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function AF({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function kF({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var NR="0.1.1";function PR(){return NR}var f0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
65
- `);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${PR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return BR(this,t)}};function BR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?BR(e.cause,t):t?null:e}function l0(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===Na.code?Na:n===cd.code?cd:n===yd.code?yd:n===hd.code?hd:n===pd.code?pd:n===gd.code?gd:n===dd.code?dd:n===bd.code?bd:n===ud.code?ud:n===fd.code?fd:n===ld.code?ld:n===md.code?md:gr;throw new i(o.error)}return o.result}var gr=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},cd=class e extends gr{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(cd,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var ud=class e extends gr{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(ud,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var fd=class e extends gr{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(fd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var ld=class e extends gr{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(ld,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var dd=class e extends gr{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(dd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var pd=class e extends gr{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(pd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var md=class e extends gr{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(md,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var hd=class e extends gr{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var gd=class e extends gr{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var yd=class e extends gr{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var Na=class e extends gr{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(Na,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var bd=class e extends gr{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var Bo=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},xd=class extends Bo{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(xd,"code",{enumerable:true,configurable:true,writable:true,value:4001});var vd=class extends Bo{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(vd,"code",{enumerable:true,configurable:true,writable:true,value:4100});var wd=class extends Bo{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(wd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var _d=class extends Bo{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(_d,"code",{enumerable:true,configurable:true,writable:true,value:4900});var Ed=class extends Bo{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty(Ed,"code",{enumerable:true,configurable:true,writable:true,value:4901});function zR(){let e=new Jl.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function LR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new u6;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?l0(n):n}}}var u6=class extends f0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function UR(e={}){let t=e.id??0;return {prepare(r){return $F({id:t++,...r})},get id(){return t}}}function $F(e){return {...e,jsonrpc:"2.0"}}var DR=Symbol("Comlink.proxy"),NF=Symbol("Comlink.endpoint"),PF=Symbol("Comlink.releaseProxy"),f6=Symbol("Comlink.finalizer"),p0=Symbol("Comlink.thrown"),jR=e=>typeof e=="object"&&e!==null||typeof e=="function",BF={canHandle:e=>jR(e)&&e[DR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return HR(e,t),[r,[r]]},deserialize(e){return e.start(),d6(e)}},CF={canHandle:e=>jR(e)&&p0 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},FR=new Map([["proxy",BF],["throw",CF]]);function zF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function HR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!zF(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(Pa),u;try{let f=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":f[a.slice(-1)[0]]=Pa(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=FF(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;HR(e,h),u=jF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[p0]:0};}Promise.resolve(u).catch(f=>({value:f,[p0]:0})).then(f=>{let[d,g]=g0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),VR(t),f6 in e&&typeof e[f6]=="function"&&e[f6]());}).catch(f=>{let[d,g]=g0({value:new TypeError("Unserializable return value"),[p0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function LF(e){return e.constructor.name==="MessagePort"}function VR(e){LF(e)&&e.close();}function d6(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),l6(e,r,[],t)}function d0(e){if(e)throw new Error("Proxy has been released and is not useable")}function ZR(e){return Qc(e,new Map,{type:"RELEASE"}).then(()=>{VR(e);})}var m0=new WeakMap,h0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(m0.get(e)||0)-1;m0.set(e,t),t===0&&ZR(e);});function UF(e,t){let r=(m0.get(t)||0)+1;m0.set(t,r),h0&&h0.register(e,t,e);}function MF(e){h0&&h0.unregister(e);}function l6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(d0(n),a===PF)return ()=>{MF(i),ZR(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=Qc(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(Pa);return c.then.bind(c)}return l6(e,t,[...r,a])},set(s,a,c){d0(n);let[u,f]=g0(c);return Qc(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(Pa)},apply(s,a,c){d0(n);let u=r[r.length-1];if(u===NF)return Qc(e,t,{type:"ENDPOINT"}).then(Pa);if(u==="bind")return l6(e,t,r.slice(0,-1));let[f,d]=MR(c);return Qc(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(Pa)},construct(s,a){d0(n);let[c,u]=MR(a);return Qc(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(Pa)}});return UF(i,e),i}function DF(e){return Array.prototype.concat.apply([],e)}function MR(e){let t=e.map(g0);return [t.map(r=>r[0]),DF(t.map(r=>r[1]))]}var GR=new WeakMap;function jF(e,t){return GR.set(e,t),e}function FF(e){return Object.assign(e,{[DR]:true})}function qR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function g0(e){for(let[t,r]of FR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},GR.get(e)||[]]}function Pa(e){switch(e.type){case "HANDLER":return FR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function Qc(e,t,r,o){return new Promise(n=>{let i=HF();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function HF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var VF={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},ZF={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},WR=typeof window>"u"?VF:window?.ReactNativeWebView?ZF:qR(window?.parent??window);var ve=d6(WR);var p6=zR(),GF=UR();function qF({code:e,details:t}){switch(e){case 4001:return new xd;case 4100:return new vd;case 4200:return new wd;case 4900:return new _d;case 4901:return new Ed;default:return new Bo(e,t??"Unknown provider RPC error")}}var eu=LR({...p6,async request(e){let t=GF.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>l0(o,{request:t,raw:!0}));if(r.error)throw qF(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await ve.ethProviderRequest(t);throw r instanceof Bo||r instanceof gr?r:new Na({message:r instanceof Error?r.message:void 0})}}});async function KR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:eu}catch{return eu}}function JR(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;p6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&JR({info:t.info,provider:eu});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;p6.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&JR({info:t.info,provider:eu});}}));new TextEncoder;var y0=new TextDecoder;var KF=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},YR=e=>{let t=e;t instanceof Uint8Array&&(t=y0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return KF(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var XR=YR;function YF(e){return typeof e=="object"&&e!==null}function m6(e){if(!YF(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var yr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};yr.code="ERR_JOSE_GENERIC";var h6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};h6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var g6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};g6.code="ERR_JWT_EXPIRED";var y6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};y6.code="ERR_JOSE_ALG_NOT_ALLOWED";var b6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};b6.code="ERR_JOSE_NOT_SUPPORTED";var x6=class extends yr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};x6.code="ERR_JWE_DECRYPTION_FAILED";var v6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};v6.code="ERR_JWE_INVALID";var w6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};w6.code="ERR_JWS_INVALID";var so=class extends yr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};so.code="ERR_JWT_INVALID";var _6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};_6.code="ERR_JWK_INVALID";var E6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};E6.code="ERR_JWKS_INVALID";var S6=class extends yr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};S6.code="ERR_JWKS_NO_MATCHING_KEY";var I6=class extends yr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};I6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var A6=class extends yr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};A6.code="ERR_JWKS_TIMEOUT";var k6=class extends yr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};k6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function QR(e){if(typeof e!="string")throw new so("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new so("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new so("Invalid JWT");if(!t)throw new so("JWTs must contain a payload");let o;try{o=XR(t);}catch{throw new so("Failed to base64url decode the payload")}let n;try{n=JSON.parse(y0.decode(o));}catch{throw new so("Failed to parse the decoded payload as JSON")}if(!m6(n))throw new so("Invalid JWT Claims Set");return n}function eT(e){return QR(e)}var b0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
66
- `);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},tu=class extends b0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},x0=class extends b0{constructor(t){super(t),this.name="InvalidToken";}};async function tT({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new tu({status:t.status});return await t.json()}async function rT({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new tu({status:r.status});let o=await r.json();if(o.valid===false)throw new x0(o.message??"unknown");return {token:o.token}}function nT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function oT(e={}){let t=nT(e);return {generateNonce:()=>tT(t),verifySiwf:r=>rT(t,r)}}var XF=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,QF=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function iT(e){let{scheme:t,statement:r,...o}=e.match(XF)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(QF)?.groups??{},f=e.split("Resources:")[1]?.split(`
67
- - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var v0=(()=>{let e,t;async function r(o){let n=oT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=iT(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:eT(c.token)},c}throw s.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function rH(){let e=new Ck;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var br=rH();var{solanaProviderRequest:sT}=ve,aT;sT&&(aT=RR($R(sT)));async function R6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return aT}var cT=null;async function nH(e=1e3){if(cT===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([ve.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(cT=true),t}var uT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new wl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new wl.RejectedByUser:new Error("Unreachable")},fT={...br,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:nH,context:ve.context,back:OR({miniAppHost:ve,emitter:br}),quickAuth:v0,actions:{setPrimaryButton:ve.setPrimaryButton.bind(ve),ready:async(e={})=>await ve.ready(e),close:ve.close.bind(ve),viewCast:ve.viewCast.bind(ve),viewProfile:ve.viewProfile.bind(ve),openMiniApp:ve.openMiniApp.bind(ve),signIn:async e=>{let t=await ve.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return ve.openUrl(t.trim())},addFrame:uT,addMiniApp:uT,composeCast(e={}){return ve.composeCast(e)},viewToken:ve.viewToken.bind(ve),sendToken:ve.sendToken.bind(ve),swapToken:ve.swapToken.bind(ve),requestCameraAndMicrophoneAccess:ve.requestCameraAndMicrophoneAccess.bind(ve)},experimental:{getSolanaProvider:R6,signManifest:async e=>{let t=await ve.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ec.RejectedByUser:t.error.type==="invalid_domain"?new Ec.InvalidDomain:t.error.type==="generic_error"?new Ec.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return v0.getToken(e)}},wallet:{ethProvider:eu,getEthereumProvider:KR,getSolanaProvider:R6},haptics:{impactOccurred:ve.impactOccurred.bind(ve),notificationOccurred:ve.notificationOccurred.bind(ve),selectionChanged:ve.selectionChanged.bind(ve)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});var Co=fT;su();function oe(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}Et();Te();var F0=class extends z{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};vr();po();Jd();Si();xi();xs();var n4="/docs/contract/encodeEventTopics";function jo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,name:r});if(!c)throw new Hd(r,{docsPath:n4});n=c;}if(n.type!=="event")throw new Hd(void 0,{docsPath:n4});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(f=>o[f.name])??[]:[];u.length>0&&(i=c?.map((f,d)=>Array.isArray(u[d])?u[d].map((g,h)=>o4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?o4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [gs(s),...i]}function o4({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Qe(zn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new F0(e.type);return qr([e],[t])}Re();function vs(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function K0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=vs(e,{method:"eth_newFilter"}),f=i?jo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?J(s):s,toBlock:typeof c=="bigint"?J(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}fn();Un();Et();Te();Ai();Ma();np();var ZH=3;function ho(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Ho?e:e instanceof z?e.walk(v=>"data"in v)||e.walk():{},{code:c,data:u,details:f,message:d,shortMessage:g}=a,h=e instanceof Cn?new pg({functionName:i,cause:e}):[ZH,ki.code].includes(c)&&(u||f||d||g)||c===jn.code&&f==="execution reverted"&&u?new La({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof Es?f:g??d,cause:e}):e;return new xu(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}fn();Te();Ei();po();function w4(e){let t=Qe(`0x${e.substring(4)}`).substring(26);return ys(`0x${t}`)}uo();on();ur();Re();async function E4({hash:e,signature:t}){let r=St(e)?e:mt(e),{secp256k1:o}=await Promise.resolve().then(()=>(rd(),eR));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:f,v:d,yParity:g}=t,h=Number(g??d),v=_4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(v)}let s=St(t)?t:mt(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=_4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function _4(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function op({hash:e,signature:t}){return w4(await E4({hash:e,signature:t}))}an();vr();Re();Te();Q0();vr();Re();function go(e,t="hex"){let r=S4(e),o=mu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Ue(o.bytes):o.bytes}function S4(e){return Array.isArray(e)?GH(e.map(t=>S4(t))):qH(e)}function GH(e){let t=e.reduce((n,i)=>n+i.length,0),r=I4(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function qH(e){let t=typeof e=="string"?xr(e):e,r=I4(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function I4(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new z("Length is too large.")}po();function A4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=Qe(st(["0x05",go([t?J(t):"0x",n,r?J(r):"0x"])]));return o==="bytes"?xr(i):i}async function gg(e){let{authorization:t,signature:r}=e;return op({hash:A4(t),signature:r??t})}Re();og();yu();Te();Mn();var yg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};Ri();ip();function k4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new yg(o,{docsPath:t,...r})}sp();Ju();xg();Fa();fn();yu();Te();var Qu=class extends z{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},ks=class extends z{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},vg=class extends z{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Rs=class extends z{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Re();bg();ur();bg();var r2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ti(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?vt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?vt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?r2[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=YH(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var T4=Ku("transaction",Ti);function YH(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ha(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:Ti(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var $4=Ku("block",Ha);async function er(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?J(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Rs({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||Ha)(a,"getBlock")}async function ef(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function O4(e,t){return n2(e,t)}async function n2(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await oe(e,er,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ut(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):oe(e,er,"getBlock")({}),oe(e,ef,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new ks;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function N4(e,t){return wg(e,t)}async function wg(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new Qu;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.round(s*c))/BigInt(c),f=r||await oe(e,er,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new ks;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await n2(e,{block:f,chain:o,request:n}),h=u(f.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await oe(e,ef,"getGasPrice")({}))}}Va();ur();async function _g(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return vt(a)}vr();Re();function tf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>xr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Ue(i))}vr();Re();function rf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>xr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>xr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Ue(s))}Re();uo();vr();Re();function P4(e,t){let r=t,o=Ll(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}function B4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=P4(t,"bytes");return n.set([r],0),o==="bytes"?n:Ue(n)}function Eg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(B4({commitment:i,to:o,version:r}));return n}Te();var Sg=class extends z{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},nf=class extends z{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Ig=class extends z{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},Ag=class extends z{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};Q0();on();vr();Re();function C4(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?xr(e.data):e.data,o=$e(r);if(!o)throw new nf;if(o>761855)throw new Sg({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=mu(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Ue(a.bytes))}function kg(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??C4({data:t,to:o}),i=e.commitments??tf({blobs:n,kzg:r,to:o}),s=e.proofs??rf({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}Yd();Fa();Mn();function Rg(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new cg({transaction:e})}fn();Ri();Mn();ip();function z4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new fg(o,{docsPath:t,...r})}sp();Ju();Fa();ur();async function of(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function Tg(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:v,nonceManager:E,to:R,type:$,value:N,...O}=t,I=await(async()=>{if(!r||!E||typeof v<"u")return v;let D=qe(r),q=i?i.id:await oe(e,of,"getChainId")({});return await E.consume({address:D.address,chainId:q,client:e})})();Vn(t);let P=i?.formatters?.transactionRequest?.format,C=(P||Zo)({...As(O,{format:P}),account:r?qe(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:I,to:R,type:$,value:N},"fillTransaction");try{let D=await e.request({method:"eth_fillTransaction",params:[C]}),H=(i?.formatters?.transaction?.format||Ti)(D.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=t.gas??H.gas),H.gasPrice&&(H.gasPrice=t.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=t.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=t.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=t.maxPriorityFeePerGas??H.maxPriorityFeePerGas),typeof H.nonce<"u"&&(H.nonce=t.nonce??H.nonce);let Z=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await oe(e,er,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(Z<1)throw new Qu;let S=10**(Z.toString().split(".")[1]?.length??0),l=m=>m*BigInt(Math.round(Z*S))/BigInt(S);return H.feePayerSignature||(H.maxFeePerGas&&!t.maxFeePerGas&&(H.maxFeePerGas=l(H.maxFeePerGas)),H.gasPrice&&!t.gasPrice&&(H.gasPrice=l(H.gasPrice))),{raw:D.raw,transaction:{from:C.from,...H},...D.capabilities?{capabilities:D.capabilities}:{}}}catch(D){throw z4(D,{...t,chain:e.chain})}}var eV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],L4=new Map,o2=new Uo(128);async function $g(e,t){let r=t;r.account??=e.account,r.parameters??=eV;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await oe(e,of,"getChainId")({}),c))}let f=o&&qe(o),d=r.nonce;if(a?.fn&&a.runAt?.includes("beforeFillTransaction")){r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillTransaction"}),d??=r.nonce;let I=r.account??r.from;f=I?qe(I):void 0;}if(s.includes("nonce")&&typeof d>"u"&&f&&i){let I=await u();d=await i.consume({address:f.address,chainId:I,client:e});}let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs?false:s.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?true:o2.get(e.uid)===false||!["fees","gas"].some(P=>s.includes(P))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await oe(e,Tg,"fillTransaction")({...r,nonce:d}).then(I=>{let{chainId:P,from:L,gas:C,gasPrice:D,nonce:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:re,type:S,...l}=I.transaction,m="feeToken"in l?l.feeToken:void 0,y="feePayerSignature"in l&&l.feePayerSignature!==null&&typeof l.feePayerSignature<"u",b=typeof m<"u"&&m!==null&&(!("feeToken"in r)||y);return o2.set(e.uid,true),{...r,...L?{from:L}:{},...S&&!r.type?{type:S}:{},...typeof P<"u"?{chainId:P}:{},...typeof C<"u"?{gas:C}:{},...typeof D<"u"?{gasPrice:D}:{},...typeof q<"u"?{nonce:q}:{},...typeof H<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:H}:{},...typeof Z<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:Z}:{},...typeof re<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:re}:{},..."nonceKey"in l&&typeof l.nonceKey<"u"?{nonceKey:l.nonceKey}:{},..."keyAuthorization"in l&&typeof l.keyAuthorization<"u"&&l.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:l.keyAuthorization}:{},..."feePayerSignature"in l&&typeof l.feePayerSignature<"u"&&l.feePayerSignature!==null?{feePayerSignature:l.feePayerSignature}:{},...b?{feeToken:m}:{},...I.capabilities?{_capabilities:I.capabilities}:{}}}).catch(I=>{let P=I;if(P.name!=="TransactionExecutionError")return r;if(P.walk?.(D=>D.name==="ExecutionRevertedError"))throw I;return P.walk?.(D=>{let q=D;return q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"||q.message?.includes("eth_fillTransaction is not available")})&&o2.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...f?{from:f?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:v,gas:E,kzg:R,type:$}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillParameters"}));let N;async function O(){return N||(N=await oe(e,er,"getBlock")({blockTag:"latest"}),N)}if(s.includes("nonce")&&typeof d>"u"&&f&&!i&&(r.nonce=await oe(e,_g,"getTransactionCount")({address:f.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&v&&R){let I=tf({blobs:v,kzg:R});if(s.includes("blobVersionedHashes")){let P=Eg({commitments:I,to:"hex"});r.blobVersionedHashes=P;}if(s.includes("sidecars")){let P=rf({blobs:v,commitments:I,kzg:R}),L=kg({blobs:v,commitments:I,proofs:P,to:"hex"});r.sidecars=L;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof $>"u")try{r.type=Rg(r);}catch{let I=L4.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",L4.set(e.uid,I)),r.type=I?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let I=await O(),{maxFeePerGas:P,maxPriorityFeePerGas:L}=await wg(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<L)throw new vg({maxPriorityFeePerGas:L});r.maxPriorityFeePerGas=L,r.maxFeePerGas=P;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new ks;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:P}=await wg(e,{block:I,chain:n,request:r,type:"legacy"});r.gasPrice=P;}}return s.includes("gas")&&typeof E>"u"&&(r.gas=await oe(e,sf,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"afterFillParameters"})),Vn(r),delete r.parameters,r}async function sf(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?qe(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await gg({authorization:t.authorizationList[0]}).catch(()=>{throw new z("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:d,blockTag:g,data:h,gas:v,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,value:I,stateOverride:P,...L}=o?await $g(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let D=(typeof d=="bigint"?J(d):void 0)||g,q=Yu(P);Vn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Zo)({...As(L,{format:H}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,data:h,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,to:s,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:q?[re,D??e.experimental_blockTag??"latest",q]:D?[re,D]:[re]}))}catch(s){throw k4(s,{...t,account:n,chain:e.chain})}}async function U4(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=ft({abi:r,args:n,functionName:i});try{return await oe(e,sf,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let f=a.account?qe(a.account):void 0;throw ho(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}xs();Ts();vr();function fr(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}po();Jd();Et();W6();on();Jd();tp();xi();var M4="/docs/contract/decodeEventLog";function Za(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new C0({docsPath:M4});let c=t.find($=>$.type==="event"&&s===gs(nr($)));if(!(c&&"name"in c)||c.type!=="event")throw new z0(s,{docsPath:M4});let{name:u,inputs:f}=c,d=f?.some($=>!("name"in $&&$.name)),g=d?[]:{},h=f.map(($,N)=>[$,N]).filter(([$])=>"indexed"in $&&$.indexed),v=[];for(let $=0;$<h.length;$++){let[N,O]=h[$],I=a[$];if(!I){if(i)throw new ms({abiItem:c,param:N});v.push([N,O]);continue}g[d?O:N.name||O]=tV({param:N,value:I});}let E=f.filter($=>!("indexed"in $&&$.indexed)),R=i?E:[...v.map(([$])=>$),...E];if(R.length>0){if(r&&r!=="0x")try{let $=Ii(R,r);if($){let N=0;if(!i)for(let[O,I]of v)g[d?I:O.name||I]=$[N++];if(d)for(let O=0;O<f.length;O++)g[O]===void 0&&N<$.length&&(g[O]=$[N++]);else for(let O=0;O<E.length;O++)g[E[O].name]=$[N++];}}catch($){if(i)throw $ instanceof au||$ instanceof pu?new vi({abiItem:c,data:r,params:R,size:$e(r)}):$}else if(i)throw new vi({abiItem:c,data:"0x",params:R,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function tV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ii([e],t)||[])[0]}function af(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:gs(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?fr(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let f,d;for(let g of u)try{f=Za({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!f&&!n){d=u[0];try{f=Za({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !f||!d||i&&!i.includes(f.eventName)||!rV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function rV(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?zr(s,a):i.type==="string"||i.type==="bytes"?Qe(zn(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Re();async function cf(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,f=s??(i?[i]:void 0),d=[];f&&(d=[f.flatMap(E=>jo({abi:[E],eventName:E.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?J(o):o,toBlock:typeof n=="bigint"?J(n):n}]});let h=g.map(v=>fr(v));return f?af({abi:f,args:a,logs:h,strict:u}):h}async function Og(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,f=s?un({abi:r,name:s}):void 0,d=f?void 0:r.filter(g=>g.type==="event");return oe(e,cf,"getLogs")({address:o,args:n,blockHash:i,event:f,events:d,fromBlock:a,toBlock:c,strict:u})}$i();Un();Ns();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=ft({abi:r,args:n,functionName:i});try{let{data:c}=await oe(e,mn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw ho(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}fn();$i();Un();Ns();async function R$(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?qe(a.account):e.account,u=ft({abi:r,args:n,functionName:i});try{let{data:f}=await oe(e,mn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:f||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(f){throw ho(f,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}Et();np();var Xg=new Map,R2=new Map,IV=0;function Ur(e,t,r){let o=++IV,n=()=>Xg.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){Xg.delete(e),R2.delete(e);return}Xg.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=R2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(Xg.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let f in t)c[f]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[f]?.(...d);});let u=r(c);return typeof u=="function"&&R2.set(e,u),s}mo();async function gp(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(wr(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(wr(t));};t?.addEventListener("abort",s,{once:true});})}function Wo(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await gp(c);let u=async()=>{n&&(await e({unpoll:i}),await gp(o),u());};u();})(),i}Pr();var AV=new Map,kV=new Map;function T$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,AV),o=t(e,kV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function $$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=T$(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var RV=e=>`blockNumber.${e}`;async function Wn(e,{cacheTime:t=e.cacheTime}={}){let r=await $$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:RV(e.uid),cacheTime:t});return BigInt(r)}async function Ps(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>fr(i));return !("abi"in t)||!t.abi?n:af({abi:t.abi,logs:n,strict:r})}async function Bs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function O$(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:f,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof f<"u"?f:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R,a]);return Ur($,{onLogs:u,onError:c},N=>{let O;a!==void 0&&(O=a-1n);let I,P=false,L=Wo(async()=>{if(!P){try{I=await oe(e,K0,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:R,fromBlock:a});}catch{}P=true;return}try{let C;if(I)C=await oe(e,Ps,"getFilterChanges")({filter:I});else {let D=await oe(e,Wn,"getBlockNumber")({});O&&O<D?C=await oe(e,Og,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:D,strict:R}):C=[],O=D;}if(C.length===0)return;if(i)N.onLogs(C);else for(let D of C)N.onLogs([D]);}catch(C){I&&C instanceof jn&&(P=false),N.onError?.(C);}},{emitOnBegin:true,interval:d});return async()=>{I&&await oe(e,Bs,"uninstallFilter")({filter:I}),L();}})})():(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R]),N=true,O=()=>N=false;return Ur($,{onLogs:u,onError:c},I=>((async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let D=e.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return D?D.value:e.transport}return e.transport})(),L=s?jo({abi:r,eventName:s,args:n}):[],{unsubscribe:C}=await P.subscribe({params:["logs",{address:o,topics:L}],onData(D){if(!N)return;let q=D.result;try{let{eventName:H,args:Z}=Za({abi:r,data:q.data,topics:q.topics,strict:g}),re=fr(q,{args:Z,eventName:H});I.onLogs([re]);}catch(H){let Z,re;if(H instanceof vi||H instanceof ms){if(g)return;Z=H.abiItem.name,re=H.abiItem.inputs?.some(l=>!("name"in l&&l.name));}let S=fr(q,{args:re?[]:{},eventName:Z});I.onLogs([S]);}},onError(D){I.onError?.(D);}});O=C,N||O();}catch(P){c?.(P);}})(),()=>O()))})()}Te();var yp=class extends z{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
68
- `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"});}};async function N$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}mo();function bp(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(wr(n));return}let u=async({error:f})=>{let d=typeof t=="function"?t({count:c,error:f}):t;if(d)try{await gp(d,{signal:n});}catch(g){s(g);return}return a({count:c+1})};try{let f=await e();i(f);}catch(f){if(n?.aborted){s(wr(n));return}if(ln(f)){s(f);return}if(c<r&&await o({count:c,error:f}))return u({error:f});s(f);}};a().catch(s);})}ur();bg();var TV={"0x0":"reverted","0x1":"success"};function Ya(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>fr(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?vt(e.transactionIndex):null,status:e.status?TV[e.status]:null,type:e.type?r2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var P$=Ku("transactionReceipt",Ya);fn();var Qg=256,ey;function ty(e=11){if(!ey||Qg+e>256*2){ey="",Qg=0;for(let t=0;t<256;t++)ey+=(256+Math.random()*256|0).toString(16).substring(1);}return ey.substring(Qg,Qg+++e)}function C$(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",tokens:a,type:c="base"}=e,u=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(f/2),500),4e3),g=e.pollingInterval??d,h=e.cacheTime??g,v=e.account?qe(e.account):void 0,{config:E,request:R,value:$}=e.transport({account:v,chain:r,pollingInterval:g}),N={...E,...$},O={account:v,batch:t,cacheTime:h,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:g,request:R,tokens:a,transport:N,type:c,uid:ty(),...u?{experimental_blockTag:u}:{}};function I(P){return L=>{let C=L(P);for(let q in O)delete C[q];let D={...P,...C};for(let q in C){let H=P[q],Z=C[q];B$(H)&&B$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:I(D)})}}return Object.assign(O,{extend:I(O)})}function B$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xp(e,t){let r=(o={})=>t(e,o);for(let o of ["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(t,o)){let n=t[o];r[o]=(i={})=>n.length===1?n(i):n(e,i);}for(let o of ["extractEvent","extractEvents"])Object.hasOwn(t,o)&&(r[o]=t[o]);return r}pn();$i();Un();Ei();Ja();on();Kd();Re();Te();Ai();function gf(e){if(!(e instanceof z))return false;let t=e.walk(r=>r instanceof La);return t instanceof La?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}hp();an();vr();Re();po();uo();function ry(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return St(t)?t:null}function vp(e){let t=new Uint8Array(32).fill(0);if(!e)return Ue(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=ry(r[o]),i=n?zn(n):Qe(lo(r[o]),"bytes");t=Qe(Mo([t,i]),"bytes");}return Ue(t)}vr();function z$(e){return `[${e.slice(2)}]`}vr();Re();po();function L$(e){let t=new Uint8Array(32).fill(0);return e?ry(e)||Qe(lo(e)):Ue(t)}function yf(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(lo(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=lo(n[i]);s.byteLength>255&&(s=lo(z$(L$(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function U$(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;let d=n!=null?[vp(i),BigInt(n)]:[vp(i)];try{let g=ft({abi:g2,functionName:"addr",args:d}),h={address:u,abi:Hg,functionName:"resolveWithGateways",args:[mt(yf(i)),g,s??[Pi]],blockNumber:r,blockTag:o},E=await oe(e,De,"readContract")(h);if(E[0]==="0x")return null;let R=$V({coinType:n,data:E[0],args:d});return R==="0x"||Gr(R)==="0x00"?null:R}catch(g){if(a)throw g;if(gf(g))return null;throw g}}function $V({coinType:e,data:t,args:r}){try{return Lr({abi:g2,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=Gr(t);if($e(n)===20)return Ln(n);throw o}}Te();var ny=class extends z{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},Cs=class extends z{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},bf=class extends z{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},oy=class extends z{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var OV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,NV=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,PV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,BV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function CV(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function M$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function T2({uri:e,gatewayUrls:t}){let r=PV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=M$(t?.ipfs,"https://ipfs.io"),n=M$(t?.arweave,"https://arweave.net"),i=e.match(OV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||NV.test(e);if(e.startsWith("http")&&!f&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((f||d)&&c)return {uri:`${o}/${f?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(BV,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new bf({uri:e})}function $2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ny({data:e});return e.image||e.image_url||e.image_data}async function D$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await iy({gatewayUrls:e,uri:$2(r)})}catch{throw new bf({uri:t})}}async function iy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=T2({uri:t,gatewayUrls:e});if(o||await CV(r))return r;throw new bf({uri:t})}function j$(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new Cs({reason:"Only EIP-155 supported"});if(!s)throw new Cs({reason:"Chain ID not found"});if(!c)throw new Cs({reason:"Contract address not found"});if(!n)throw new Cs({reason:"Token ID not found"});if(!a)throw new Cs({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function F$(e,{nft:t}){if(t.namespace==="erc721")return De(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return De(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new oy({namespace:t.namespace})}async function H$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?zV(e,{gatewayUrls:t,record:r}):iy({uri:r,gatewayUrls:t})}async function zV(e,{gatewayUrls:t,record:r}){let o=j$(r),n=await F$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=T2({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(u);return iy({uri:$2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),D$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}pn();$i();Un();Ja();Re();hp();async function sy(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:Hg,args:[mt(yf(i)),ft({abi:h2,functionName:"text",args:[vp(i),n]}),s??[Pi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await oe(e,De,"readContract")(d);if(h[0]==="0x")return null;let v=Lr({abi:h2,functionName:"text",data:h[0]});return v===""?null:v}catch(d){if(a)throw d;if(gf(d))return null;throw d}}async function V$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,sy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await H$(e,{record:c,gatewayUrls:o})}catch{return null}}pn();Ja();hp();async function Z$(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let f={address:u,abi:f$,args:[r,i,s??[Pi]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=oe(e,De,"readContract"),[g]=await d(f);return g||null}catch(f){if(a)throw f;if(gf(f))return null;throw f}}Ja();Re();async function G$(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await oe(e,De,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[mt(yf(n))],blockNumber:r,blockTag:o});return c}Ns();fn();Te();Re();w2();sp();Ju();Fa();async function q$(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h,...v}=t,E=r?qe(r):void 0;try{Vn(t);let $=(typeof o=="bigint"?J(o):void 0)||n,N=e.chain?.formatters?.transactionRequest?.format,I=(N||Zo)({...As(v,{format:N}),account:E,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),P=await e.request({method:"eth_createAccessList",params:[I,$]});if(P.error)throw new z(P.error,{details:P.error});return {accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(R){throw Gg(R,{...t,account:E,chain:e.chain})}}async function W$(e){let t=vs(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Re();async function ay(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=vs(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(h=>jo({abi:[h],eventName:h.name,args:r}))],o&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?J(i):i,toBlock:typeof a=="bigint"?J(a):a,...f.length?{topics:f}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function cy(e){let t=vs(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}pn();$i();Un();Va();Ns();async function K$(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=ft({abi:bo,functionName:"getEthBalance",args:[t]}),{data:f}=await oe(e,mn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:bo,functionName:"getEthBalance",args:[t],data:f||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function J$(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Re();async function Y$(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?J(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Rs({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||Ya;return i.map(a=>s(a,"getBlockReceipts"))}ur();Re();async function X$(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?J(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),vt(i)}Va();async function Xa(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}Ei();on();bs();async function Q$(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await Xa(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&$e(n)===23&&n.startsWith("0xef0100"))return Ln(cn(n,3,23))}Te();var uy=class extends z{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function e8(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,f,d]=await oe(e,De,"readContract")({abi:LV,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:f},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new uy({address:r}):s}}var LV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Re();function t8(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function r8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?J(r):void 0,s=await e.request({method:"eth_feeHistory",params:[J(t),i||o,n]},{dedupe:!!i});return t8(s)}async function n8(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>fr(i));return t.abi?af({abi:t.abi,logs:n,strict:r}):n}Va();Un();Re();Mn();an();Kd();Re();t2();Lo();Te();Zg();Ri();En();on();bs();ur();function o8(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Me(n))throw new nt({address:n});if(o<0)throw new Ka({chainId:o})}fy(e);}function i8(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new nf;for(let r of t){let o=$e(r),n=vt(cn(r,0,1));if(o!==32)throw new Ig({hash:r,size:o});if(n!==1)throw new Ag({hash:r,version:n})}}fy(e);}function fy(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Ka({chainId:t});if(n&&!Me(n))throw new nt({address:n});if(o&&o>Xu)throw new Fn({maxFeePerGas:o});if(r&&o&&r>o)throw new Vo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function s8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Ka({chainId:t});if(i&&!Me(i))throw new nt({address:i});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}function a8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Me(i))throw new nt({address:i});if(typeof t<"u"&&t<=0)throw new Ka({chainId:t});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}Lo();Mn();En();function wp(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new ug({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function c8(e,t){let r=Rg(e);return r==="eip1559"?DV(e,t):r==="eip2930"?jV(e,t):r==="eip4844"?MV(e,t):r==="eip7702"?UV(e,t):FV(e,t)}function UV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;o8(e);let g=wp(f),h=u8(r);return st(["0x04",go([J(o),i?J(i):"0x",u?J(u):"0x",c?J(c):"0x",n?J(n):"0x",s??"0x",a?J(a):"0x",d??"0x",g,h,...xf(e,t)])])}function MV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;i8(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>Ue(L)),I=e.kzg,P=tf({blobs:O,kzg:I});if(typeof g>"u"&&(g=Eg({commitments:P})),typeof h>"u"){let L=rf({blobs:O,commitments:P,kzg:I});h=kg({blobs:O,commitments:P,proofs:L});}}let v=wp(f),E=[J(r),n?J(n):"0x",u?J(u):"0x",c?J(c):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",d??"0x",v,a?J(a):"0x",g??[],...xf(e,t)],R=[],$=[],N=[];if(h)for(let O=0;O<h.length;O++){let{blob:I,commitment:P,proof:L}=h[O];R.push(I),$.push(P),N.push(L);}return st(["0x03",h?go([E,R,$,N]):go(E)])}function DV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;fy(e);let d=wp(u),g=[J(r),n?J(n):"0x",c?J(c):"0x",a?J(a):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",f??"0x",d,...xf(e,t)];return st(["0x02",go(g)])}function jV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;s8(e);let f=wp(c),d=[J(r),i?J(i):"0x",u?J(u):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x",f,...xf(e,t)];return st(["0x01",go(d)])}function FV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;a8(e);let u=[i?J(i):"0x",c?J(c):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x"];if(t){let f=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new ag({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,J(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,J(r),"0x","0x"]);return go(u)}function xf(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=Gr(r.r),s=Gr(r.s);return [typeof n=="number"?n?J(1):"0x":o===0n?"0x":o===1n?J(1):o===27n?"0x":J(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function u8(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?mt(o):"0x",s,n?mt(n):"0x",...xf({},i)]);}return t}Ei();Ts();async function f8({address:e,authorization:t,signature:r}){return zr(Ln(e),await gg({authorization:t,signature:r}))}Te();Ma();np();mo();Yd();var ly=new Uo(8192);function l8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(ly.get(r))return ly.get(r);let o=e().finally(()=>ly.delete(r));return ly.set(r,o),o}Pr();function d8(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:f}=r;if(i?.exclude?.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?VV(`${u}.${Be(r)}`):void 0;return l8(()=>bp(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw wr(c);if(ln(g))throw g;let h=g;switch(h.code){case vu.code:throw new vu(h);case wu.code:throw new wu(h);case _u.code:throw new _u(h,{method:r.method});case Eu.code:throw new Eu(h);case ki.code:throw new ki(h);case jn.code:throw new jn(h);case Su.code:throw new Su(h);case Iu.code:throw new Iu(h);case Au.code:throw new Au(h);case Ss.code:throw new Ss(h,{method:r.method});case Da.code:throw new Da(h);case ku.code:throw new ku(h);case ja.code:throw new ja(h);case Ru.code:throw new Ru(h);case Tu.code:throw new Tu(h);case $u.code:throw new $u(h);case Ou.code:throw new Ou(h);case Nu.code:throw new Nu(h);case Pu.code:throw new Pu(h);case Bu.code:throw new Bu(h);case Cu.code:throw new Cu(h);case zu.code:throw new zu(h);case Lu.code:throw new Lu(h);case Uu.code:throw new Uu(h);case Mu.code:throw new Mu(h);case 5e3:throw new ja(h);case Du.code:throw new Du(h);default:throw g instanceof z?g:new hg(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof Dn){let v=h?.headers?.get("Retry-After");if(v?.match(/\d/))return Number.parseInt(v,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>HV(g)}),{enabled:n,id:d})}}function HV(e){return ln(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Da.code||e.code===ki.code||e.code===429:e instanceof Dn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function VV(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function vf(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}ur();Ma();mo();mo();function p8(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&ln(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}Pr();function ZV(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var O2=ZV();var GV=10485760;function m8(e,t={}){let{url:r,headers:o}=WV(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??GV,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:f=t.timeout??1e4}=n,d={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:g,method:h,signal:v}=d;try{let E=await p8(async({signal:N})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??O2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??O2.take(),...i}),headers:{...o,"Content-Type":"application/json",...g},method:h||"POST",signal:v||(f>0?N:null)},I=new Request(r,O),P=await c?.(I,O)??{...O,url:r};return await s(P.url??r,P)},{errorInstance:new rp({body:i,url:r}),timeout:f,signal:!0});u&&await u(E);let R,$=await qV(E,{maxResponseBodySize:a});if(E.headers.get("Content-Type")?.startsWith("application/json"))R=JSON.parse($);else {R=$;try{R=JSON.parse(R||"{}");}catch(N){if(E.ok)throw N;R={error:R};}}if(!E.ok){if(typeof R.error?.code=="number"&&typeof R.error?.message=="string")return R;throw new Dn({body:i,details:Be(R.error)||E.statusText,headers:E.headers,status:E.status,url:r})}return R}catch(E){throw v?.aborted?wr(v):ln(E)||E instanceof Dn||E instanceof Ua||E instanceof rp?E:new Dn({body:i,cause:E,url:r})}}}}async function qV(e,{maxResponseBodySize:t}){if(t===false)return e.text();let r=e.headers.get("Content-Length");if(r){let a=Number(r);if(a>t)throw new Ua({maxSize:t,size:a})}if(!e.body){let a=await e.text(),c=new TextEncoder().encode(a).length;if(c>t)throw new Ua({maxSize:t,size:c});return a}let o=e.body.getReader(),n=new TextDecoder,i="",s=0;try{for(;;){let{done:a,value:c}=await o.read();if(a)break;if(s+=c.byteLength,s>t)throw await o.cancel(),new Ua({maxSize:t,size:s});i+=n.decode(c,{stream:!0});}return i+=n.decode(),i}finally{o.releaseLock();}}function WV(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}po();var h8=`Ethereum Signed Message:
69
- `;an();on();Re();function g8(e){let t=typeof e=="string"?lu(e):typeof e.raw=="string"?e.raw:Ue(e.raw),r=lu(`${h8}${$e(t)}`);return Mo([r,t])}function dy(e,t){return Qe(g8(e),t)}Si();an();Re();po();Et();Lo();Pr();Te();var py=class extends z{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},my=class extends z{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},hy=class extends z{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},gy=class extends z{constructor({type:t}){let r=t.replace(/^(u?int)/,"$&256");super(`Type "${t}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"});}};En();on();Re();H6();function y8(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:f}=c,d=a[u],g=f.replace(/(\[[0-9]*\])+$/,"");if(g==="int"||g==="uint")throw new gy({type:f});let h=f.match(W0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[R,$,N]=h;J(d,{signed:$==="int",size:Number.parseInt(N,10)/8});}if(f==="address"&&typeof d=="string"&&!Me(d))throw new nt({address:d});let v=f.match(t4);if(v){let[R,$]=v;if($&&$e(d)!==Number.parseInt($,10))throw new M0({expectedSize:Number.parseInt($,10),givenSize:$e(d)})}let E=n[f];E&&(KV(f),i(E,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new py({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new my({primaryType:o,types:n})}function b8({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function KV(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new hy({type:e})}function x8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:b8({domain:t}),...e.types};y8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(JV({domain:t,types:n})),o!=="EIP712Domain"&&i.push(v8({data:r,primaryType:o,types:n})),Qe(Mo(i))}function JV({domain:e,types:t}){return v8({data:e,primaryType:"EIP712Domain",types:t})}function v8({data:e,primaryType:t,types:r}){let o=w8({data:e,primaryType:t,types:r});return Qe(o)}function w8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[YV({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=E8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return qr(o,n)}function YV({primaryType:e,types:t}){let r=mt(XV({primaryType:e,types:t}));return Qe(r)}function XV({primaryType:e,types:t}){let r="",o=_8({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function _8({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])_8({primaryType:i.type,types:t},r);return r}function E8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},Qe(w8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},Qe(o)];if(r==="string")return [{type:"bytes32"},Qe(mt(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>E8({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},Qe(qr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var kp={};Er(kp,{InvalidWrappedSignatureError:()=>Oy,assert:()=>Ny,from:()=>PZ,magicBytes:()=>nE,suffixParameters:()=>oE,unwrap:()=>V8,validate:()=>CZ,wrap:()=>BZ});su();$s();var yy=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var QV={checksum:new yy(8192)},by=QV.checksum;dn();Wh();$s();lr();function Qa(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Ra(Q4(e));return r==="Bytes"?o:It(o)}$s();dn();lr();up();function S8(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new xy({prefix:o,cause:new C2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new xy({prefix:o,cause:new B2});return}throw new P2({publicKey:e})}function I8(e){let t=(()=>{if(lp(e))return A8(e);if(i$(e))return tZ(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return S8(t),t}function tZ(e){return A8(It(e))}function A8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new z2({publicKey:e});if(e.length===130){let o=BigInt(dt(e,0,32)),n=BigInt(dt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(dt(e,0,1)),n=BigInt(dt(e,1,33)),i=BigInt(dt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(dt(e,0,1)),r=BigInt(dt(e,1,33));return {prefix:t,x:r}}function L2(e,t={}){S8(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return ht(i?Ve(r,{size:1}):"0x",Ve(o,{size:32}),typeof n=="bigint"?Ve(n,{size:32}):"0x")}var P2=class extends de{constructor({publicKey:t}){super(`Value \`${Os(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},xy=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},B2=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},C2=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},z2=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var rZ=/^0x[a-fA-F0-9]{40}$/;function ec(e,t={}){let{strict:r=true}=t;if(!rZ.test(e))throw new vy({address:e,cause:new U2});if(r){if(e.toLowerCase()===e)return;if(wy(e)!==e)throw new vy({address:e,cause:new M2})}}function wy(e){if(by.has(e))return by.get(e);ec(e,{strict:false});let t=e.substring(2).toLowerCase(),r=Qa(e$(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return by.set(e,n),n}function nZ(e,t={}){let{checksum:r=false}=t;return ec(e),r?wy(e):e}function R8(e,t={}){let r=Qa(`0x${L2(e).slice(4)}`).substring(26);return nZ(`0x${r}`,t)}function _y(e,t={}){let{strict:r=true}=t??{};try{return ec(e,{strict:r}),!0}catch{return false}}var vy=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},U2=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},M2=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};$s();dn();lr();$s();dn();lr();var T8=/^(.*)\[([0-9]*)\]$/,$8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Sy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,D2=2n**256n-1n;function tc(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=H2(t.type);if(i){let[s,a]=i;return iZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return uZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return oZ(e,{checksum:o});if(t.type==="bool")return sZ(e);if(t.type.startsWith("bytes"))return aZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return cZ(e,t);if(t.type==="string")return fZ(e,{staticPosition:n});throw new _f(t.type)}var N8=32,j2=32;function oZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?wy(i):i)(It(t$(o,-20))),32]}function iZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=Go(e.readBytes(j2)),u=i+c,f=u+N8;e.setPosition(u);let d=Go(e.readBytes(N8)),g=wf(t),h=0,v=[];for(let E=0;E<d;++E){e.setPosition(f+(g?E*32:h));let[R,$]=tc(e,t,{checksumAddress:o,staticPosition:f});h+=$,v.push(R),$===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(i+32),[v,32]}if(wf(t)){let c=Go(e.readBytes(j2)),u=i+c,f=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=tc(e,t,{checksumAddress:o,staticPosition:u});f.push(g);}return e.setPosition(i+32),[f,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,f]=tc(e,t,{checksumAddress:o,staticPosition:i+s});s+=f,a.push(u),f===0&&(e.assertReadLimit(),e._touch());}return [a,s]}function sZ(e){return [n$(e.readBytes(32),{size:32}),32]}function aZ(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Go(e.readBytes(32));e.setPosition(r+s);let a=Go(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[It(c),32]}return [It(e.readBytes(Number.parseInt(n,10),32)),32]}function cZ(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?r$(n,{signed:r}):Go(n,{signed:r}),32]}function uZ(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(wf(t)){let c=Go(e.readBytes(j2)),u=n+c;for(let f=0;f<t.components.length;++f){let d=t.components[f];e.setPosition(u+a);let[g,h]=tc(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?f:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[f,d]=tc(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=f,a+=d;}return [s,a]}function fZ(e,{staticPosition:t}){let r=Go(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Go(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=o$(l2(i));return e.setPosition(t+32),[s,32]}function P8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(F2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function F2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=H2(o.type);if(n){let[i,s]=n;return dZ(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return yZ(r,{checksumAddress:e,parameter:o});if(o.type==="address")return lZ(r,{checksum:e});if(o.type==="bool")return mZ(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Sy.exec(o.type)??[];return hZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return pZ(r,{type:o.type});if(o.type==="string")return gZ(r);throw new _f(o.type)}function Iy(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=lt(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Ve(t+n,{size:32})),o.push(a),n+=lt(a)):r.push(a);}return ht(...r,...o)}function lZ(e,t){let{checksum:r=false}=t;return ec(e,{strict:r}),{dynamic:false,encoded:Ni(e.toLowerCase())}}function dZ(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new ky(e);if(!i&&e.length!==o)throw new Ay({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=e.length===0&&wf(n),a=[];for(let c=0;c<e.length;c++){let u=F2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Iy(a);if(i){let u=Ve(a.length,{size:32});return {dynamic:true,encoded:a.length>0?ht(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:ht(...a.map(({encoded:c})=>c))}}function pZ(e,{type:t}){let[,r]=t.split("bytes"),o=lt(e);if(!r){let n=e;return o%32!==0&&(n=qo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:ht(Ni(Ve(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new _p({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:qo(e)}}function mZ(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Ni(Dg(e))}}function hZ(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new fp({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Ve(e,{size:32,signed:t})}}function gZ(e){let t=mf(e),r=Math.ceil(lt(t)/32),o=[];for(let n=0;n<r;n++)o.push(qo(dt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(qo(Ve(lt(t),{size:32})),...o)}}function yZ(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=F2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Iy(i):ht(...i.map(({encoded:s})=>s))}}function H2(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function wf(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(wf);let r=H2(e.type);return !!(r&&wf({...e,type:r[1]}))}dn();var xZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Z2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new V2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function Ty(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(xZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ry=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},V2=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},Z2=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function rc(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?df(t):t,s=Ty(i);if(Zn(i)===0&&e.length>0)throw new W2;if(Zn(i)&&Zn(i)<32)throw new q2({data:typeof t=="string"?t:It(t),parameters:e,size:Zn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let f=e[u];a<i.length&&s.setPosition(a);let[d,g]=tc(s,f,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[f.name??u]=d;}return c}function zs(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let n=P8({checksumAddress:o,parameters:e,values:t}),i=Iy(n);return i.length===0?"0x":i}function G2(e,t){if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(G2.encode(n,i));}return ht(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return ec(c),Ni(c.toLowerCase(),n?32:0)}if(r==="string")return mf(o);if(r==="bytes")return o;if(r==="bool")return Ni(Dg(o),n?32:1);let i=r.match(Sy);if(i){let[c,u,f="256"]=i,d=Number.parseInt(f,10)/8;return Ve(o,{size:n?32:d,signed:u==="int"})}let s=r.match($8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new _p({expectedSize:Number.parseInt(u,10),value:o});return qo(o,n?32:0)}let a=r.match(T8);if(a&&Array.isArray(o)){let[c,u]=a,f=[];for(let d=0;d<o.length;d++)f.push(t(u,o[d],true));return f.length===0?"0x":ht(...f)}throw new _f(r)}e.encode=t;})(G2||(G2={}));function Sp(e){return Array.isArray(e)&&typeof e[0]=="string"?Md(e):typeof e=="string"?Md(e):e}var q2=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${bi(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},W2=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},Ay=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},_p=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${lt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},$y=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
70
- `)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},ky=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},_f=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};lr();$s();dn();lr();function vZ(e,t){let{as:r}=t,o=z8(e),n=Ty(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function C8(e,t={}){let{as:r="Hex"}=t;return vZ(e,{as:r})}function z8(e){return Array.isArray(e)?wZ(e.map(t=>z8(t))):_Z(e)}function wZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=L8(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function _Z(e){let t=typeof e=="string"?df(e):e,r=L8(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function L8(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}dn();lr();up();function Q2(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new Ip({signature:e});if(typeof e.s>"u")throw new Ip({signature:e});if(r&&typeof e.yParity>"u")throw new Ip({signature:e});if(e.r<0n||e.r>D2)throw new J2({value:e.r});if(e.s<0n||e.s>D2)throw new Y2({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ap({value:e.yParity})}function SZ(e){return U8(It(e))}function U8(e){if(e.length!==130&&e.length!==132)throw new K2({signature:e});let t=BigInt(dt(e,0,32)),r=BigInt(dt(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return rE(n)}catch{throw new Ap({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function eE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return tE(e)}function tE(e){let t=typeof e=="string"?U8(e):e instanceof Uint8Array?SZ(e):typeof e.r=="string"?AZ(e):e.v?IZ(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Q2(t),t}function IZ(e){return {r:e.r,s:e.s,yParity:rE(e.v)}}function AZ(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=rE(r)),typeof o!="number")throw new Ap({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function M8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":p2(Ve(t)),r===0n?"0x":p2(Ve(r))]}function rE(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new X2({value:e})}var K2=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},Ip=class extends de{constructor({signature:t}){super(`Signature \`${Os(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},J2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},Y2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},Ap=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},X2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function j8(e,t={}){return typeof e.chainId=="string"?kZ(e):{...e,...t.signature}}function kZ(e){let{address:t,chainId:r,nonce:o}=e,n=eE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function F8(e){return RZ(e,{presign:true})}function RZ(e,t={}){let{presign:r}=t;return Qa(ht("0x05",C8(TZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function TZ(e){let{address:t,chainId:r,nonce:o}=e,n=eE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?M8(n):[]]}dn();lr();rd();lr();function H8(e){return R8(OZ(e))}function OZ(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new bn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(pf(t).substring(2));return I8(a)}var nE="0x8010801080108010801080108010801080108010801080108010801080108010",oE=Sp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Ny(e){if(typeof e=="string"){if(dt(e,-32)!==nE)throw new Oy(e)}else Q2(e.authorization);}function PZ(e){return typeof e=="string"?V8(e):e}function V8(e){Ny(e);let t=Lg(dt(e,-64,-32)),r=dt(e,-t-64,-64),o=dt(e,0,-t-64),[n,i,s]=rc(oE,r);return {authorization:j8({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function BZ(e){let{data:t,signature:r}=e;Ny(e);let o=H8({payload:F8(e.authorization),signature:tE(e.authorization)}),n=zs(oE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(lt(n),{size:32});return ht(r,n,i,nE)}function CZ(e){try{return Ny(e),!0}catch{return false}}var Oy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};ng();function Z8(e,t){return rg(e,t)}function zZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function G8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?zZ(e.storageProof):void 0}}async function q8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return G8(c)}Mn();async function W8(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new ws({hash:t});return r}Va();async function K8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}Mn();Re();async function Ef(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?J(r):void 0,f=null;if(n?f=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,J(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,J(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,J(a)]},{dedupe:true})),!f)throw new ws({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||Ti)(f,"getTransaction")}async function J8(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([oe(e,Wn,"getBlockNumber")({}),t?oe(e,Ef,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}Mn();async function Sf(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new bu({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||Ya)(r,"getTransactionReceipt")}pn();dp();Et();Te();Ai();$i();Un();Ja();Wg();Pr();async function Y8(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:f}=t,d=t.contracts,g=typeof e.batch?.multicall=="object"?e.batch.multicall:{},h=t.batchSize??g.batchSize??1024,v=t.deployless??g.deployless??false,E=(()=>{if(t.multicallAddress)return t.multicallAddress;if(v)return null;if(e.chain)return qn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),R=[[]],$=0,N=0;for(let C=0;C<d.length;C++){let{abi:D,address:q,args:H,functionName:Z}=d[C];try{let re=ft({abi:D,args:H,functionName:Z});N+=(re.length-2)/2,h>0&&N>h&&R[$].length>0&&($++,N=(re.length-2)/2,R[$]=[]),R[$]=[...R[$],{allowFailure:!0,callData:re,target:q}];}catch(re){let S=ho(re,{abi:D,address:q,args:H,docsPath:"/docs/contract/multicall",functionName:Z,sender:r});if(!n)throw S;R[$]=[...R[$],{allowFailure:true,callData:"0x",target:q}];}}let O=!!e.batch?.multicall,I=O?R.flatMap(C=>C.map(D=>[D])):R,P=await Promise.allSettled(I.map(C=>O?LZ(e,{account:r,authorizationList:o,batchSize:h,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,call:C[0],multicallAddress:E,requireCanonical:u,stateOverride:f}).then(D=>[D]):oe(e,De,"readContract")({...E===null?{code:qa}:{address:E},abi:bo,account:r,args:[C],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:f}))),L=[];for(let C=0;C<P.length;C++){let D=P[C];if(D.status==="rejected"){if(!n)throw D.reason;for(let H=0;H<I[C].length;H++)L.push({status:"failure",error:D.reason,result:void 0});continue}let q=D.value;for(let H=0;H<q.length;H++){let{returnData:Z,success:re}=q[H],{callData:S}=I[C][H],{abi:l,address:m,functionName:y,args:b}=d[L.length];try{if(S==="0x")throw new Cn;if(!re)throw new Ho({data:Z});let x=Lr({abi:l,args:b,data:Z,functionName:y});L.push(n?{result:x,status:"success"}:x);}catch(x){let _=ho(x,{abi:l,address:m,args:b,docsPath:"/docs/contract/multicall",functionName:y});if(!n)throw _;L.push({error:_,result:void 0,status:"failure"});}}}if(L.length!==d.length)throw new z("multicall results mismatch");return L}async function LZ(e,t){let{batchSize:r,call:o,multicallAddress:n,...i}=t,{wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{schedule:a}=hf({id:Be(["multicall",e.uid,r,n,i]),wait:s,shouldSplitBatch(u){return r===0?false:u.reduce((d,{callData:g})=>d+(g.length-2)/2,0)>r},fn:u=>oe(e,De,"readContract")({...n===null?{code:qa}:{address:n},...i,abi:bo,args:[u],functionName:"aggregate3"})}),[c]=await a(o);return c}m2();fn();Et();Ai();Ri();$i();Un();an();Re();ip();Ju();xg();Fa();async function If(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?jg(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,N=$.account?qe($.account):void 0,O=$.abi?ft($):$.data,I={...$,account:N,data:$.dataSuffix?Mo([O||"0x",$.dataSuffix]):O,from:$.from??N?.address};return Vn(I),Zo(I)}),E=g.stateOverrides?Yu(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:v,stateOverrides:E});}let f=(typeof r=="bigint"?J(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},f]})).map((g,h)=>({...Ha(g),calls:g.calls.map((v,E)=>{let{abi:R,args:$,functionName:N,to:O}=n[h].calls[E],I=v.error?.data??v.returnData,P=BigInt(v.gasUsed),L=v.logs?.map(H=>fr(H)),C=v.status==="0x1"?"success":"failure",D=R&&C==="success"&&I!=="0x"?Lr({abi:R,data:I,functionName:N}):null,q=(()=>{if(C==="success")return;let H;if(I==="0x"?H=new Cn:I&&(H=new Ho({data:I})),!!H)return ho(H,{abi:R??[],address:O??"0x",args:$,functionName:N??"<unknown>"})})();return {data:I,gasUsed:P,logs:L,status:C,...C==="success"?{result:D}:{error:q}}})}))}catch(c){let u=c,f=Is(u,{});throw f instanceof Hn?u:f}}su();dn();lr();dn();function By(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function Py(e,t){let r=typeof e,o=t.type;switch(o){case "address":return _y(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>Py(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>Py(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function iE(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return iE(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?_y(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?_y(r[o],{strict:false}):false)return s}}function Af(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Ud(e):typeof e=="string"?Ud(e):e;return {...o,...r?{hash:Ls(o)}:{}}}function kf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=lp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?aE(u)===dt(t,0,4):u.type==="event"?Ls(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Bi({name:t});if(s.length===1)return {...s[0],...n?{hash:Ls(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:Ls(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?Py(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=iE(u.inputs,a.inputs,o);if(d)throw new sE({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...f]=s;return {...u,overloads:f}})();if(!c)throw new Bi({name:t});return {...c,...n?{hash:Ls(c)}:{}}}function aE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return dt(Ls(t),0,4)}function MZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return kf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ba(t);return By(r)}function Ls(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Qa(mf(MZ(t)))}var sE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${By(Ba(t.abiItem))}\`, and`,`\`${r.type}\` in \`${By(Ba(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},Bi=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};lr();function X8(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [DZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?zs(t.inputs,n):"0x")}function Q8(e){return Af(e)}function DZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Bi({name:"constructor"});return t}function eO(e,t={}){return Af(e,t)}function tO(e){return Ls(e)}lr();function rO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [uE(i,s),a,c]}return e})(),n=rc(t.outputs,r,o);if(!(n&&Object.keys(n).length===0))return n&&Object.keys(n).length===1?Array.isArray(n)?n[0]:Object.values(n)[0]:n}function Us(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,f,d]=e;return [uE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?uE([t,...o],t.name,{args:r}):t,i=HZ(n),s=r.length>0?zs(n.inputs,r):void 0;return s?ht(i,s):i}function nc(e,t={}){return Af(e,t)}function uE(e,t,r){let o=kf(e,t,r);if(o.type!=="function")throw new Bi({name:t,type:"function"});return o}function HZ(e){return aE(e)}fn();var Cy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",zy="0x0000000000000000000000000000000000000000";dp();Te();Ai();Ri();qd();ur();Ns();var ZZ="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",uO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",GZ=0x00000000000000000000000000000000deadbeefn,qZ=tO(eO("event Transfer(address indexed from, address indexed to, uint256 value)")),nO=nc("function balanceOf(address) returns (uint256)"),oO=nc("function decimals() returns (uint256)"),iO=nc("function tokenURI(uint256) returns (string)"),sO=nc("function symbol() returns (string)"),WZ=nc("function query(address target, bytes data)");async function fO(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?qe(t.account):void 0;if(s&&!u)throw new z("`account` is required when `traceAssetChanges` is true");let f=u?X8(Q8("constructor(bytes, bytes)"),{bytecode:Vg,args:[ZZ,Us(nc("function getBalance(address)"),[u.address])]}):void 0,d=o??e.experimental_blockTag??"latest",g=r;if(s&&typeof g!="bigint"&&d!=="earliest"&&d!=="pending")if(d==="latest")g=await Wn(e,{cacheTime:0});else {let p=await er(e,{blockTag:d});if(typeof p.number!="bigint")throw new z(`Block tag \`${d}\` did not resolve to a number.`);g=p.number;}let h=typeof g=="bigint"?{blockNumber:g}:{blockTag:d},v=s?await If(e,{...h,blocks:[{calls:n.map(p=>({...p,from:u.address})),stateOverrides:i}],traceTransfers:a,validation:c}):void 0,E=v?[...new Set([...KZ(v[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==Cy&&p!==zy):[],R=JZ([...u?[u.address]:[],...E,...i?.map(({address:p})=>p)??[]]),$=[{address:R,code:uO}],[N,O]=await Promise.all([s?Promise.all([cO(e,{account:u.address,...h,data:f,stateOverride:i}),...E.map(p=>cO(e,{account:u.address,address:p,...h,data:Us(nO,[u.address]),staticCallAddress:R,stateOverride:i}))]):[],If(e,{...h,blocks:[{calls:[...n,{to:zy}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:E.map(p=>({to:R,data:Rp(p,Us(nO,[u.address]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(oO))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(iO,[0n]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(sO))})),stateOverrides:$}]:[]],traceTransfers:a,validation:c})]),I=O[0],[P,L,C,D,q]=s?O.slice(1):[],{calls:H,...Z}=I,re=H.slice(0,-1),S=N.map(p=>aO(p)?ut(p.data):null),l=P?.calls??[],m=L?.calls??[],b=[...l,...m].map(p=>aO(p)?ut(p.data):null),x=(C?.calls??[]).map(p=>fE(p,oO)),_=(q?.calls??[]).map(p=>fE(p,sO)),k=(D?.calls??[]).map(p=>fE(p,iO)),w=[];for(let[p,A]of b.entries()){let G=S[p],K=N[p],Q=typeof G=="bigint"?G:p>0&&K?.status==="success"&&K.data==="0x"?0n:null;if(typeof A!="bigint"||typeof Q!="bigint")continue;let ae=x[p-1],he=_[p-1],ye=k[p-1],We=p===0?{address:Cy,decimals:18,symbol:"ETH"}:{address:E[p-1],decimals:ye||ae?Number(ae??1):void 0,symbol:he??void 0};w.push({token:We,value:{pre:Q,post:A,diff:A-Q}});}return {assetChanges:w,block:Z,results:re}}function Rp(e,t){return Us(WZ,[e,t])}function KZ(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==qZ||o.address.toLowerCase()===Cy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function aO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function fE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return rO(t,e.data)}catch{return null}}async function cO(e,t){let{account:r,address:o,blockNumber:n,blockTag:i,data:s,staticCallAddress:a,stateOverride:c}=t;try{return {data:(await mn({...e,ccipRead:!1},{account:o?zy:r,data:o?Rp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:uO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof _s)||!(u.cause instanceof yo))throw u;return {data:"0x",status:"failure"}}}function JZ(e){let t=new Set(e.map(o=>o.toLowerCase())),r=GZ;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Tp={};Er(Tp,{InvalidWrappedSignatureError:()=>Ly,assert:()=>dE,from:()=>QZ,magicBytes:()=>lE,universalSignatureValidatorAbi:()=>XZ,universalSignatureValidatorBytecode:()=>YZ,unwrap:()=>lO,validate:()=>tG,wrap:()=>eG});dn();lr();var lE="0x6492649264926492649264926492649264926492649264926492649264926492",YZ="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",XZ=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function dE(e){if(dt(e,-32)!==lE)throw new Ly(e)}function QZ(e){return typeof e=="string"?lO(e):e}function lO(e){dE(e);let[t,r,o]=rc(Sp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function eG(e){let{data:t,signature:r,to:o}=e;return ht(zs(Sp("address, bytes, bytes"),[o,t,r]),lE)}function tG(e){try{return dE(e),!0}catch{return false}}var Ly=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};pn();dp();Ai();v2();Un();Ei();Ts();an();uo();ur();Re();rd();ur();vr();function dO({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new bn.Signature(ut(e),ut(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:xr(s)}Ns();async function Ms(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return St(u)?u:typeof u=="object"&&"r"in u&&"s"in u?dO(u):Ue(u)})();try{if(a==="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}return kp.validate(c)?await rG(e,{...t,multicallAddress:s,signature:c}):await nG(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}if(u instanceof Ci)return false;throw u}}async function rG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,multicallAddress:a,requireCanonical:c}=t,{authorization:u,data:f,signature:d,to:g}=kp.unwrap(t.signature);if(await Xa(e,{address:r,blockHash:o,blockNumber:n,blockTag:i,requireCanonical:c})===st(["0xef0100",u.address]))return await oG(e,{...t,signature:d});let v={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:J(u.r,{size:32}),s:J(u.s,{size:32}),yParity:u.yParity};if(!await f8({address:r,authorization:v}))throw new Ci;let R=await oe(e,De,"readContract")({...a?{address:a}:{code:qa},authorizationList:[v],abi:bo,blockHash:o,blockNumber:n,blockTag:"pending",functionName:"aggregate3",requireCanonical:c,args:[[...f?[{allowFailure:true,target:g??r,callData:f}]:[],{allowFailure:true,target:r,callData:ft({abi:y2,functionName:"isValidSignature",args:[s,d]})}]]});if(R[R.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Ci}async function nG(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Tp.validate(s)?s:Tp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:ft({abi:b2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:mp({abi:b2,args:[r,i,u],bytecode:m$}),...c},{data:d}=await oe(e,mn,"call")(f).catch(g=>{throw g instanceof _s?new Ci:g});if(L6(d??"0x0"))return true;throw new Ci}async function oG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,requireCanonical:a,signature:c}=t;if((await oe(e,De,"readContract")({address:r,abi:y2,args:[s,c],blockHash:o,blockNumber:n,blockTag:i,functionName:"isValidSignature",requireCanonical:a}).catch(f=>{throw f instanceof xu?new Ci:f})).startsWith("0x1626ba7e"))return true;throw new Ci}var Ci=class extends Error{};async function pO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=dy(r);return oe(e,Ms,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function mO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=x8({message:s,primaryType:a,types:c,domain:u});return oe(e,Ms,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}Mn();_2();Pr();ur();Pr();function Uy(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=Be(["watchBlockNumber",e.uid,t,r,s]);return Ur(d,{onBlockNumber:o,onError:n},g=>Wo(async()=>{try{let h=await oe(e,Wn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let v=c+1n;v<h;v++)g.onBlockNumber(v,c),c=v;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=Be(["watchBlockNumber",e.uid,t,r]);return Ur(d,{onBlockNumber:o,onError:n},g=>{let h=true,v=()=>h=false;return (async()=>{try{let E=(()=>{if(e.transport.type==="fallback"){let $=e.transport.transports.find(N=>N.config.type==="webSocket"||N.config.type==="ipc");return $?$.value:e.transport}return e.transport})(),{unsubscribe:R}=await E.subscribe({params:["newHeads"],onData($){if(!h)return;let N=ut($.result?.number);g.onBlockNumber(N,c),c=N;},onError($){g.onError?.($);}});v=R,h||v();}catch(E){n?.(E);}})(),()=>v()})})()}async function hO(e,t){let{checkReplacement:r=e.chain?.supportsTransactionReplacementDetection??true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:P})=>~~(1<<P)*200,timeout:c=18e4}=t,u=Be(["waitForTransactionReceipt",e.uid,n]),f=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,v=false,E,R,{promise:$,resolve:N,reject:O}=qg(),I=c?setTimeout(()=>{R?.(),E?.(),O(new dg({hash:n}));},c):void 0;return E=Ur(u,{onReplaced:i,resolve:N,reject:O},async P=>{if(h=await oe(e,Sf,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(I),P.resolve(h),E?.();return}R=oe(e,Uy,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:f,async onBlockNumber(L){let C=q=>{clearTimeout(I),R?.(),q(),E?.();},D=L;if(!v)try{if(h){if(o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));return}if(r&&!d&&(v=!0,await bp(async()=>{d=await oe(e,Ef,"getTransaction")({hash:n}),d.blockNumber&&(D=d.blockNumber);},{delay:a,retryCount:s}),v=!1),h=await oe(e,Sf,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));}catch(q){if(q instanceof ws||q instanceof bu){if(!d){v=false;return}try{g=d,v=!0;let H=await bp(()=>oe(e,er,"getBlock")({blockNumber:D,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:S})=>S instanceof Rs});v=!1;let Z=H.transactions.find(({from:S,nonce:l})=>S===g.from&&l===g.nonce);if(!Z||(h=await oe(e,Sf,"getTransactionReceipt")({hash:Z.hash}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o)))return;let re="replaced";Z.to===g.to&&Z.value===g.value&&Z.input===g.input?re="repriced":Z.from===Z.to&&Z.value===0n&&(re="cancelled"),C(()=>{P.onReplaced?.({reason:re,replacedTransaction:g,transaction:Z,transactionReceipt:h}),P.resolve(h);});}catch(H){C(()=>P.reject(H));}}else C(()=>P.reject(q));}}});}),$}Pr();var iG=["size","totalDifficulty","transactions","uncles","withdrawals"];function gO(e,{onBlockHeader:t,onError:r}){let o,n=Be(["watchBlockHeaders",e.uid]);return Ur(n,{onBlockHeader:t,onError:r},i=>{let s=true,a=false,c=()=>s=false;return (async()=>{try{let u=(()=>{if(e.transport.type==="fallback"){let d=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return d?d.value:e.transport}return e.transport})(),{unsubscribe:f}=await u.subscribe({params:["newHeads"],onData(d){if(!s)return;let g=(e.chain?.formatters?.block?.format||Ha)(d.result,"watchBlockHeaders");for(let h of iG)delete g[h];i.onBlockHeader(g,o),o=g;},onError(d){a&&i.onError?.(d);}});a=!0,c=f,s||c();}catch(u){i.onError?.(u);}})(),()=>c()})}Pr();function yO(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=s??false,d;return u?(()=>{let v=Be(["watchBlocks",e.uid,t,r,o,f,c]);return Ur(v,{onBlock:n,onError:i},E=>Wo(async()=>{try{let R=await oe(e,er,"getBlock")({blockTag:t,includeTransactions:f});if(R.number!==null&&d?.number!=null){if(R.number===d.number)return;if(R.number-d.number>1&&r)for(let $=d?.number+1n;$<R.number;$++){let N=await oe(e,er,"getBlock")({blockNumber:$,includeTransactions:f});E.onBlock(N,d),d=N;}}(d?.number==null||t==="pending"&&R?.number==null||R.number!==null&&R.number>d.number)&&(E.onBlock(R,d),d=R);}catch(R){E.onError?.(R);}},{emitOnBegin:o,interval:c}))})():(()=>{let v=true,E=true,R=()=>v=false;return (async()=>{try{o&&oe(e,er,"getBlock")({blockTag:t,includeTransactions:f}).then(O=>{v&&E&&(n(O,void 0),E=!1);}).catch(i);let $=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:N}=await $.subscribe({params:["newHeads"],async onData(O){if(!v)return;let I=await oe(e,er,"getBlock")({blockNumber:O.result?.number,includeTransactions:f}).catch(()=>{});v&&(n(I,d),E=!1,d=I);},onError(O){i?.(O);}});R=N,v||R();}catch($){i?.($);}})(),()=>R()})()}Et();np();Pr();function bO(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:f=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let R=Be(["watchEvent",t,r,o,e.uid,n,f,s]);return Ur(R,{onLogs:c,onError:a},$=>{let N;s!==void 0&&(N=s-1n);let O,I=false,P=Wo(async()=>{if(!I){try{O=await oe(e,ay,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}I=true;return}try{let L;if(O)L=await oe(e,Ps,"getFilterChanges")({filter:O});else {let C=await oe(e,Wn,"getBlockNumber")({});N&&N!==C?L=await oe(e,cf,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:N+1n,toBlock:C}):L=[],N=C;}if(L.length===0)return;if(o)$.onLogs(L);else for(let C of L)$.onLogs([C]);}catch(L){O&&L instanceof jn&&(I=false),$.onError?.(L);}},{emitOnBegin:true,interval:f});return async()=>{O&&await oe(e,Bs,"uninstallFilter")({filter:O}),P();}})})():(()=>{let R=true,$=()=>R=false;return (async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let L=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),I=[];O&&(I=[O.flatMap(C=>jo({abi:[C],eventName:C.name,args:r}))],n&&(I=I[0]));let{unsubscribe:P}=await N.subscribe({params:["logs",{address:t,topics:I}],onData(L){if(!R)return;let C=L.result;try{let{eventName:D,args:q}=Za({abi:O??[],data:C.data,topics:C.topics,strict:h}),H=fr(C,{args:q,eventName:D});c([H]);}catch(D){let q,H;if(D instanceof vi||D instanceof ms){if(d)return;q=D.abiItem.name,H=D.abiItem.inputs?.some(re=>!("name"in re&&re.name));}let Z=fr(C,{args:H?[]:{},eventName:q});c([Z]);}},onError(L){a?.(L);}});$=P,R||$();}catch(N){a?.(N);}})(),()=>$()})()}Pr();function xO(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=Be(["watchPendingTransactions",e.uid,t,i]);return Ur(u,{onTransactions:o,onError:r},f=>{let d,g=Wo(async()=>{try{if(!d)try{d=await oe(e,cy,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await oe(e,Ps,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)f.onTransactions(h);else for(let v of h)f.onTransactions([v]);}catch(h){f.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await oe(e,Bs,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,f=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});f=d,u||f();}catch(d){r?.(d);}})(),()=>f()})()}var sG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function aG(e){return sG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function pE(e){return aG(e)?new Date(e):new Date(Number.NaN)}function vO(e){let{scheme:t,statement:r,...o}=e.match(cG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(uG)?.groups??{},f=e.split("Resources:")[1]?.split(`
71
- - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:pE(i)}:{},...s?{issuedAt:pE(s)}:{},...a?{notBefore:pE(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var cG=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,uG=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;En();Ts();function wO(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||Number.isNaN(s.getTime())||o.expirationTime&&(Number.isNaN(o.expirationTime.getTime())||s>=o.expirationTime)||o.notBefore&&(Number.isNaN(o.notBefore.getTime())||s<o.notBefore))return false;try{if(!o.address||!Me(o.address,{strict:!1})||t&&!zr(o.address,t))return !1}catch{return false}return true}async function _O(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=vO(n);if(!f.address||!wO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=dy(n);return Ms(e,{address:f.address,hash:g,signature:a,...u})}pn();En();Ts();function Rf(e,t){return {amount:e,decimals:t,formatted:Z8(e,t)}}function zi(e,t){let{decimals:r,token:o}=t,n=hE(e,o);if(n)return {address:n.address,decimals:r??n.decimals};if(Me(o,{strict:false}))return {address:o,decimals:r??lG(e,o)};throw new Error(`Token "${o}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function hE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=fG(r,t);if(n)return mE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=mE(i,o);if(s&&zr(s.address,t))return s}}function mE(e,t){let r=e.addresses[t];if(r)return {address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}function fG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function lG(e,t){let r=e.tokens,o=e.chain?.id;if(r&&o!==void 0)for(let n of r){let i=mE(n,o);if(i&&zr(i.address,t))return i.decimals}}async function Tf(e,t){let{address:r,decimals:o}=zi(e,t);return o!==void 0?{address:r,decimals:o}:{address:r,decimals:await De(e,{abi:Gn,address:r,functionName:"decimals"})}}function $f(e){return {...e,data:ft(e),to:e.address}}Mn();async function EO(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||Ya)(n);if(s.status==="reverted"&&r)throw new lg({receipt:s});return s}pn();async function Of(e,t){let{account:r,decimals:o,spender:n,token:i,...s}=t,[a,{decimals:c}]=await Promise.all([De(e,{...s,...Of.call(e,{account:r,spender:n,token:i})}),Tf(e,{decimals:o,token:i})]);return Rf(a,c)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,functionName:"allowance",args:[o.account,o.spender]})}e.call=t;})(Of||(Of={}));fn();pn();async function Nf(e,t){let{account:r=e.account,decimals:o,token:n,...i}=t;if(!r)throw new yp;let s=qe(r).address,[a,{decimals:c}]=await Promise.all([De(e,{...i,...Nf.call(e,{account:s,token:n})}),Tf(e,{decimals:o,token:n})]);return Rf(a,c)}(function(e){function t(r,o){let n=o.account??r.account;if(!n)throw new yp;let i=qe(n).address;return $f({address:zi(r,o).address,abi:Gn,functionName:"balanceOf",args:[i]})}e.call=t;})(Nf||(Nf={}));pn();async function gE(e,t){let{token:r,...o}=t,{address:n}=zi(e,{token:r}),i=hE(e,r),[s,a,c]=await Promise.all([i?.decimals??De(e,{...o,abi:Gn,address:n,functionName:"decimals"}),i?.name??De(e,{...o,abi:Gn,address:n,functionName:"name"}),i?.symbol??De(e,{...o,abi:Gn,address:n,functionName:"symbol"})]);return {decimals:s,name:a,symbol:c}}pn();async function Pf(e,t){let{decimals:r,token:o,...n}=t,[i,{decimals:s}]=await Promise.all([De(e,{...n,...Pf.call(e,{token:o})}),Tf(e,{decimals:r,token:o})]);return Rf(i,s)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,args:[],functionName:"totalSupply"})}e.call=t;})(Pf||(Pf={}));function SO(e){return {call:t=>mn(e,t),createAccessList:t=>q$(e,t),createBlockFilter:()=>W$(e),createContractEventFilter:t=>K0(e,t),createEventFilter:t=>ay(e,t),createPendingTransactionFilter:()=>cy(e),estimateContractGas:t=>U4(e,t),estimateGas:t=>sf(e,t),getBalance:t=>K$(e,t),getBlobBaseFee:()=>J$(e),getBlock:t=>er(e,t),getBlockNumber:t=>Wn(e,t),getBlockReceipts:t=>Y$(e,t),getBlockTransactionCount:t=>X$(e,t),getBytecode:t=>Xa(e,t),getChainId:()=>of(e),getCode:t=>Xa(e,t),getContractEvents:t=>Og(e,t),getDelegation:t=>Q$(e,t),getEip712Domain:t=>e8(e,t),getEnsAddress:t=>U$(e,t),getEnsAvatar:t=>V$(e,t),getEnsName:t=>Z$(e,t),getEnsResolver:t=>G$(e,t),getEnsText:t=>sy(e,t),getFeeHistory:t=>r8(e,t),estimateFeesPerGas:t=>N4(e,t),getFilterChanges:t=>Ps(e,t),getFilterLogs:t=>n8(e,t),getGasPrice:()=>ef(e),getLogs:t=>cf(e,t),getProof:t=>q8(e,t),estimateMaxPriorityFeePerGas:t=>O4(e,t),fillTransaction:t=>Tg(e,t),getRawTransaction:t=>W8(e,t),getStorageAt:t=>K8(e,t),getTransaction:t=>Ef(e,t),getTransactionConfirmations:t=>J8(e,t),getTransactionCount:t=>_g(e,t),getTransactionReceipt:t=>Sf(e,t),multicall:t=>Y8(e,t),prepareTransactionRequest:t=>$g(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>N$(e,t),sendRawTransactionSync:t=>EO(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>fO(e,t),simulateContract:t=>R$(e,t),verifyHash:t=>Ms(e,t),verifyMessage:t=>pO(e,t),verifySiweMessage:t=>_O(e,t),verifyTypedData:t=>mO(e,t),uninstallFilter:t=>Bs(e,t),waitForTransactionReceipt:t=>hO(e,t),watchBlockHeaders:t=>gO(e,t),watchBlocks:t=>yO(e,t),watchBlockNumber:t=>Uy(e,t),watchContractEvent:t=>O$(e,t),watchEvent:t=>bO(e,t),watchPendingTransactions:t=>xO(e,t),token:dG(e)}}function dG(e){return {getAllowance:xp(e,Of),getBalance:xp(e,Nf),getMetadata:xp(e,gE),getTotalSupply:xp(e,Pf)}}function yE(e){let{key:t="public",name:r="Public Client"}=e;return C$({...e,key:t,name:r,type:"publicClient"}).extend(SO)}function IO({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=ty();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:d8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Ma();Te();var My=class extends z{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};Wg();var pG=0,AO=new WeakMap;function mG(e){if(!e)return "default";let t=AO.get(e);if(t!==void 0)return t;let r=pG++;return AO.set(e,r),r}function bE(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",maxResponseBodySize:s,methods:a,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:f,retryDelay:d,raw:g}=t;return ({chain:h,retryCount:v,timeout:E})=>{let{batchSize:R=1e3,wait:$=0}=typeof r=="object"?r:{},N=t.retryCount??v,O=E??t.timeout??1e4,I=e||h?.rpcUrls.default.http[0];if(!I)throw new My;let P=m8(I,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return IO({key:i,methods:a,name:c,async request({method:L,params:C},D){let q={method:L,params:C},H=D?.signal?{signal:D.signal}:void 0,{schedule:Z}=hf({id:`${I}.${mG(D?.signal)}`,wait:$,shouldSplitBatch(m){return m.length>R},fn:m=>P.request({body:m,fetchOptions:H}),sort:(m,y)=>m.id-y.id}),re=async m=>r?Z(m):[await P.request({body:m,fetchOptions:H})],[{error:S,result:l}]=await re(q);if(g)return {error:S,result:l};if(S)throw new Es({body:q,error:S,url:I});return l},retryCount:N,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:I})}}Ei();var Dy=null,hG=Co.isInMiniApp().then(e=>(Dy=e,e)).catch(()=>(Dy=false,false));async function gG(){return Dy!==null?Dy:hG}async function yG(e,t){let r=Q5(e,Ln(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function bG(e){try{switch(e.type){case "link":await Co.actions.openUrl(e.data.url);break;case "cast":await Co.actions.viewCast({hash:e.data.hash});break;case "tweet":await Co.actions.openUrl(e.data.url);break;case "miniapp":await Co.actions.openMiniApp({url:e.data.url});break;case "token":await yG(e.data.chainId,e.data.address);break;case "farcasterProfile":await Co.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){e.type==="link"||e.type==="miniapp"||e.type==="tweet"?window.open(e.data.url,"_blank","noopener,noreferrer"):console.error("[@adland/react] Failed to perform ad action:",t);}}async function xG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await gG()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var kO={performAdAction:bG,performEmptyAdAction:xG};var RO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var TO={block:$4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=Ti(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ut(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:T4({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ut(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:P$({format(e){return {...e.depositNonce?{depositNonce:ut(e.depositNonce)}:{},...e.depositReceiptVersion?{depositReceiptVersion:vt(e.depositReceiptVersion)}:{},l1GasPrice:e.l1GasPrice?ut(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ut(e.l1GasUsed):null,l1Fee:e.l1Fee?ut(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Lo();En();an();Re();function vG(e,t){return _G(e)?wG(e):c8(e,t)}var $O={transaction:vG};function wG(e){EG(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?mt(s):"0x",c?mt(c):"0x",n?mt(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",go(u)])}function _G(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function EG(e){let{from:t,to:r}=e;if(t&&!Me(t))throw new nt({address:t});if(r&&!Me(r))throw new nt({address:r})}var Bf={blockTime:2e3,contracts:RO,formatters:TO,serializers:$O};var $p=1,Op=vf({...Bf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[$p]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[$p]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[$p]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[$p]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:$p});vf({...Op,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Np=11155111,Pp=vf({...Bf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[Np]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Np]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Np]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Np]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Np});vf({...Pp,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var AG=ps(["function module() view returns (address)"]),kG=ps(["function tokenURI(address slot) view returns (string)"]),RG="0x0000000000000000000000000000000000000000",TG="https://ipfs-gateway.econome.studio";function $G(e,t){return `${(t??TG).replace(/\/$/,"")}/ipfs/${e}`}var OG={[Op.id]:Op,[Pp.id]:Pp};function NO(e,t,r=OG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return yE({chain:o,transport:bE(t)})}function NG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var PO=async(e,t)=>{if(!e)throw new Error("NO_AD");let r=NG(e),o=r?$G(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},BO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:AG,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===RG?"":e.readContract({address:r,abi:kG,functionName:"tokenURI",args:[t]})};var CG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var zG=["image","imageUrl","icon","pfpUrl","logoURI"];var LG=["title","displayName","username","name","symbol"],UG=["description","bio","text","name"];function xE(e){return {...e.data,...e.metadata??{}}}function CO(e){if(!e)return null;let t=xE(e);for(let r of CG[e.type]??zG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function vE(e){if(!e)return null;let t=xE(e);for(let r of LG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function zO(e){if(!e)return null;let t=xE(e),r=vE(e);for(let o of UG){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function LO(e){return e?e.type:null}var oc=new Set,OO=1e3;function MG(e){return e==="view"?"view":"click"}function wE(e){return e.endpoint??sw}function UO(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function MO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${wE(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:MG(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function DO(e,t){typeof window>"u"||(UO(e,t),(t.consent??"granted")==="granted"&&await MO(e,t));}async function DG(e,t,r){try{return (await fetch(`${wE(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId}),keepalive:!0})).ok}catch{return false}}async function jG(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await DG(e,t,r):false,o||await MO("view",e)),UO("view",e,o),o}function jO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!oc.has(r)&&(oc.add(r),DO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function FO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=fetch(`${wE(t)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:t.slot})}).then(s=>s.ok?s.json():null).then(s=>s?.nonce??null).catch(()=>null),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(oc.has(r)||n)continue;n=setTimeout(async()=>{if(oc.has(r))return;oc.add(r),i.disconnect();let c=await o;await jG(t,c,OO);},OO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function _E(e,t){return DO(e,t)}var FG={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function EE(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function SE(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var IE=`
64
+ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];vn(o,r.length);let n=o.length+r.length*64+t.length,i=xe.Buffer.alloc(n);return it(r.length<256),xe.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(it(s.length===64,"signature has invalid length"),xe.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),it(i.length<=Ta,`Transaction too large: ${i.length} > ${Ta}`),i}get keys(){return it(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return it(this.instructions.length===1),this.instructions[0].programId}get data(){return it(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=xn(r),n=[];for(let i=0;i<o;i++){let s=wn(r,0,t0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(id.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Nr.default.encode(G7)?null:Nr.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new Xe({keys:i,programId:t.accountKeys[n.programIdIndex],data:Nr.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var n0=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)it(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(t0));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();vn(r,this.signatures.length);let o=T.struct([T.blob(r.length,"encodedSignaturesLength"),T.seq(j7(),this.signatures.length,"signatures"),T.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=xn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(wn(r,0,t0)));let i=a0.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));it(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=i6(r,n.secretKey);}}addSignature(t,r){it(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));it(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var X7=T.nu64("lamportsPerSignature"),Q7=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([X7],"feeCalculator")]);Q7.span;function Jc(e){let t=(0, mR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=ik();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:T.struct([T.u32("instruction"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},Assign:{index:1,layout:T.struct([T.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:T.struct([T.u32("instruction"),Jc("lamports")])},CreateWithSeed:{index:3,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:T.struct([T.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:T.struct([T.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:T.struct([T.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:T.struct([T.u32("instruction"),T.ns64("space")])},AllocateWithSeed:{index:9,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:T.struct([T.u32("instruction"),Jc("lamports"),Wc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:T.struct([T.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:T.struct([T.u32("typeIndex"),Jc("deactivationSlot"),T.nu64("lastExtendedSlot"),T.u8("lastExtendedStartIndex"),T.u8(),T.seq(Pe(),T.offset(T.u8(),-1),"authority")])});var xt=Gc(Dh(Ie),ne(),e=>new Ie(e)),bR=jh([ne(),ct("base64")]),a6=Gc(Dh(xe.Buffer),bR,e=>xe.Buffer.from(e[0],"base64"));function xR(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:ka(),message:ne(),data:me(uk())})})])}var tF=xR(ka());function rt(e){return Gc(xR(e),tF,t=>"error"in t?t:{...t,result:Zc(t.result,e)})}function io(e){return rt(W({context:W({slot:U()}),value:e}))}function c0(e){return W({context:W({slot:U()}),value:e})}var rF=W({foundation:U(),foundationTerm:U(),initial:U(),taper:U(),terminal:U()});rt(ue(fe(W({epoch:U(),effectiveSlot:U(),amount:U(),postBalance:U(),commission:me(fe(U()))}))));var nF=ue(W({slot:U(),prioritizationFee:U()})),oF=W({total:U(),validator:U(),foundation:U(),epoch:U()}),iF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),sF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:no(),firstNormalEpoch:U(),firstNormalSlot:U()}),aF=g_(ne(),ue(U())),$a=fe(Ar([W({}),ne()])),cF=W({err:$a}),uF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var fF=W({program:ne(),programId:xt,parsed:ka()}),lF=W({programId:xt,accounts:ue(xt),data:ne()});io(W({err:fe(Ar([W({}),ne()])),logs:fe(ue(ne())),accounts:me(fe(ue(fe(W({executable:no(),owner:ne(),lamports:U(),data:ue(ne()),rentEpoch:me(U())}))))),unitsConsumed:me(U()),returnData:me(fe(W({programId:ne(),data:jh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([fF,lF]))}))))}));io(W({byIdentity:g_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(rF);rt(oF);rt(nF);rt(iF);rt(sF);rt(aF);rt(U());io(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var dF=W({amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())});io(ue(W({address:xt,amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())})));io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:a6,rentEpoch:U()})})));var Q_=W({program:ne(),parsed:ka(),space:U()});io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:Q_,rentEpoch:U()})})));io(ue(W({lamports:U(),address:xt})));var c6=W({executable:no(),owner:xt,lamports:U(),data:a6,rentEpoch:U()});W({pubkey:xt,account:c6});var pF=Gc(Ar([Dh(xe.Buffer),Q_]),Ar([bR,Q_]),e=>Array.isArray(e)?Zc(e,a6):e),mF=W({executable:no(),owner:xt,lamports:U(),data:pF,rentEpoch:U()});W({pubkey:xt,account:mF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:c0(c6)});var hF=W({pubkey:xt,account:c6});W({subscription:U(),result:c0(hF)});var gF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:gF});var yF=Ar([W({type:Ar([ct("firstShredReceived"),ct("completed"),ct("optimisticConfirmation"),ct("root")]),slot:U(),timestamp:U()}),W({type:ct("createdBank"),parent:U(),slot:U(),timestamp:U()}),W({type:ct("frozen"),slot:U(),timestamp:U(),stats:W({numTransactionEntries:U(),numSuccessfulTransactions:U(),numFailedTransactions:U(),maxTransactionsPerEntry:U()})}),W({type:ct("dead"),slot:U(),timestamp:U(),err:ne()})]);W({subscription:U(),result:yF});W({subscription:U(),result:c0(Ar([cF,uF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var aR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:no(),epochCredits:ue(jh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(aR),delinquent:ue(aR)}));var bF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),xF=W({slot:U(),confirmations:fe(U()),err:$a,confirmationStatus:me(bF)});io(ue(fe(xF)));rt(U());var vR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),u6=W({signatures:ue(ne()),message:W({accountKeys:ue(ne()),header:W({numRequiredSignatures:U(),numReadonlySignedAccounts:U(),numReadonlyUnsignedAccounts:U()}),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()})),recentBlockhash:ne(),addressTableLookups:me(ue(vR))})}),wR=W({pubkey:xt,signer:no(),writable:no(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),_R=W({accountKeys:ue(wR),signatures:ue(ne())}),ER=W({parsed:ka(),program:ne(),programId:xt}),SR=W({accounts:ue(xt),data:ne(),programId:xt}),vF=Ar([SR,ER]),wF=Ar([W({parsed:ka(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),IR=Gc(vF,wF,e=>"accounts"in e?Zc(e,SR):Zc(e,ER)),AR=W({signatures:ue(ne()),message:W({accountKeys:ue(wR),instructions:ue(IR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(vR)))})}),o0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:dF}),kR=W({writable:ue(xt),readonly:ue(xt)}),u0=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()}))})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(kR),computeUnitsConsumed:me(U()),costUnits:me(U())}),f6=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(IR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(kR),computeUnitsConsumed:me(U()),costUnits:me(U())}),Xc=Ar([ct(0),ct("legacy")]),Oa=W({pubkey:ne(),lamports:U(),postBalance:fe(U()),rewardType:fe(ne()),commission:me(fe(U()))});rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:u6,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:_R,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:AR,meta:fe(f6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:_R,meta:fe(f6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:u6,meta:fe(u0)})),rewards:me(ue(Oa)),blockTime:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),signatures:ue(ne()),blockTime:fe(U())})));rt(fe(W({slot:U(),meta:fe(u0),blockTime:me(fe(U())),transaction:u6,version:me(Xc)})));rt(fe(W({slot:U(),transaction:AR,meta:fe(f6),blockTime:me(fe(U())),version:me(Xc)})));io(W({blockhash:ne(),lastValidBlockHeight:U()}));io(no());var _F=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(_F));io(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var EF=W({err:$a,logs:ue(ne()),signature:ne()});W({result:c0(EF),subscription:U()});Object.freeze({CreateLookupTable:{index:0,layout:T.struct([T.u32("instruction"),Jc("recentSlot"),T.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:T.struct([T.u32("instruction")])},ExtendLookupTable:{index:2,layout:T.struct([T.u32("instruction"),Jc(),T.seq(Pe(),T.offset(T.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:T.struct([T.u32("instruction")])},CloseLookupTable:{index:4,layout:T.struct([T.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:T.struct([T.u8("instruction"),T.u32("units"),T.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:T.struct([T.u8("instruction"),T.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:T.struct([T.u8("instruction"),T.u32("units")])},SetComputeUnitPrice:{index:3,layout:T.struct([T.u8("instruction"),Jc("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");T.struct([T.u8("numSignatures"),T.u8("padding"),T.u16("signatureOffset"),T.u16("signatureInstructionIndex"),T.u16("publicKeyOffset"),T.u16("publicKeyInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");bn.utils.isValidPrivateKey;bn.getPublicKey;T.struct([T.u8("numSignatures"),T.u16("signatureOffset"),T.u8("signatureInstructionIndex"),T.u16("ethAddressOffset"),T.u8("ethAddressInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u8("messageInstructionIndex"),T.blob(20,"ethAddress"),T.blob(64,"signature"),T.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var RR;new Ie("StakeConfig11111111111111111111111111111111");var ad=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};RR=ad;ad.default=new RR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),F7(),H7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:T.struct([T.u32("instruction")])},Split:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Withdraw:{index:4,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Deactivate:{index:5,layout:T.struct([T.u32("instruction")])},Merge:{index:7,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType"),Wc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:T.struct([T.u32("instruction"),V7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Z7()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");W({name:ne(),website:me(ne()),details:me(ne()),iconUrl:me(ne()),keybaseUsername:me(ne())});new Ie("Vote111111111111111111111111111111111111111");T.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),T.u8("commission"),T.nu64(),T.seq(T.struct([T.nu64("slot"),T.u32("confirmationCount")]),T.offset(T.u32(),-8),"votes"),T.u8("rootSlotValid"),T.nu64("rootSlot"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),Pe("authorizedVoter")]),T.offset(T.u32(),-8),"authorizedVoters"),T.struct([T.seq(T.struct([Pe("authorizedPubkey"),T.nu64("epochOfLastAuthorizedSwitch"),T.nu64("targetEpoch")]),32,"buf"),T.nu64("idx"),T.u8("isEmpty")],"priorVoters"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),T.nu64("credits"),T.nu64("prevCredits")]),T.offset(T.u32(),-8),"epochCredits"),T.struct([T.nu64("slot"),T.nu64("timestamp")],"lastTimestamp")]);var TR=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function $R(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function RF(e){let t=Buffer.from(e,"base64");return a0.deserializeMessageVersion(t)==="legacy"?n0.deserialize(t):tt.from(t)}function OR(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:$R(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:$R(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:RF(i)}}}}var NR=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=TF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function TF({emitter:e,back:t}){let r=$F();if(r)return OF({emitter:e,back:t,navigation:r});if(typeof window<"u")return NF({emitter:e,back:t,window})}function $F(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function OF({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function NF({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var PR="0.1.1";function BR(){return PR}var f0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
65
+ `);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${BR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return CR(this,t)}};function CR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?CR(e.cause,t):t?null:e}function l0(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===Na.code?Na:n===cd.code?cd:n===yd.code?yd:n===hd.code?hd:n===pd.code?pd:n===gd.code?gd:n===dd.code?dd:n===bd.code?bd:n===ud.code?ud:n===fd.code?fd:n===ld.code?ld:n===md.code?md:gr;throw new i(o.error)}return o.result}var gr=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},cd=class e extends gr{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(cd,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var ud=class e extends gr{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(ud,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var fd=class e extends gr{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(fd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var ld=class e extends gr{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(ld,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var dd=class e extends gr{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(dd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var pd=class e extends gr{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(pd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var md=class e extends gr{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(md,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var hd=class e extends gr{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var gd=class e extends gr{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var yd=class e extends gr{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var Na=class e extends gr{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(Na,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var bd=class e extends gr{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var Bo=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},xd=class extends Bo{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(xd,"code",{enumerable:true,configurable:true,writable:true,value:4001});var vd=class extends Bo{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(vd,"code",{enumerable:true,configurable:true,writable:true,value:4100});var wd=class extends Bo{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(wd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var _d=class extends Bo{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(_d,"code",{enumerable:true,configurable:true,writable:true,value:4900});var Ed=class extends Bo{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty(Ed,"code",{enumerable:true,configurable:true,writable:true,value:4901});function LR(){let e=new Jl.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function UR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new l6;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?l0(n):n}}}var l6=class extends f0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function MR(e={}){let t=e.id??0;return {prepare(r){return CF({id:t++,...r})},get id(){return t}}}function CF(e){return {...e,jsonrpc:"2.0"}}var jR=Symbol("Comlink.proxy"),LF=Symbol("Comlink.endpoint"),UF=Symbol("Comlink.releaseProxy"),d6=Symbol("Comlink.finalizer"),p0=Symbol("Comlink.thrown"),FR=e=>typeof e=="object"&&e!==null||typeof e=="function",MF={canHandle:e=>FR(e)&&e[jR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return VR(e,t),[r,[r]]},deserialize(e){return e.start(),m6(e)}},DF={canHandle:e=>FR(e)&&p0 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},HR=new Map([["proxy",MF],["throw",DF]]);function jF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function VR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!jF(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(Pa),u;try{let f=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":f[a.slice(-1)[0]]=Pa(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=qF(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;VR(e,h),u=GF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[p0]:0};}Promise.resolve(u).catch(f=>({value:f,[p0]:0})).then(f=>{let[d,g]=g0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),ZR(t),d6 in e&&typeof e[d6]=="function"&&e[d6]());}).catch(f=>{let[d,g]=g0({value:new TypeError("Unserializable return value"),[p0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function FF(e){return e.constructor.name==="MessagePort"}function ZR(e){FF(e)&&e.close();}function m6(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),p6(e,r,[],t)}function d0(e){if(e)throw new Error("Proxy has been released and is not useable")}function GR(e){return Qc(e,new Map,{type:"RELEASE"}).then(()=>{ZR(e);})}var m0=new WeakMap,h0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(m0.get(e)||0)-1;m0.set(e,t),t===0&&GR(e);});function HF(e,t){let r=(m0.get(t)||0)+1;m0.set(t,r),h0&&h0.register(e,t,e);}function VF(e){h0&&h0.unregister(e);}function p6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(d0(n),a===UF)return ()=>{VF(i),GR(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=Qc(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(Pa);return c.then.bind(c)}return p6(e,t,[...r,a])},set(s,a,c){d0(n);let[u,f]=g0(c);return Qc(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(Pa)},apply(s,a,c){d0(n);let u=r[r.length-1];if(u===LF)return Qc(e,t,{type:"ENDPOINT"}).then(Pa);if(u==="bind")return p6(e,t,r.slice(0,-1));let[f,d]=DR(c);return Qc(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(Pa)},construct(s,a){d0(n);let[c,u]=DR(a);return Qc(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(Pa)}});return HF(i,e),i}function ZF(e){return Array.prototype.concat.apply([],e)}function DR(e){let t=e.map(g0);return [t.map(r=>r[0]),ZF(t.map(r=>r[1]))]}var qR=new WeakMap;function GF(e,t){return qR.set(e,t),e}function qF(e){return Object.assign(e,{[jR]:true})}function WR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function g0(e){for(let[t,r]of HR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},qR.get(e)||[]]}function Pa(e){switch(e.type){case "HANDLER":return HR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function Qc(e,t,r,o){return new Promise(n=>{let i=WF();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function WF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var KF={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},JF={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},KR=typeof window>"u"?KF:window?.ReactNativeWebView?JF:WR(window?.parent??window);var ve=m6(KR);var h6=LR(),YF=MR();function XF({code:e,details:t}){switch(e){case 4001:return new xd;case 4100:return new vd;case 4200:return new wd;case 4900:return new _d;case 4901:return new Ed;default:return new Bo(e,t??"Unknown provider RPC error")}}var eu=UR({...h6,async request(e){let t=YF.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>l0(o,{request:t,raw:!0}));if(r.error)throw XF(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await ve.ethProviderRequest(t);throw r instanceof Bo||r instanceof gr?r:new Na({message:r instanceof Error?r.message:void 0})}}});async function JR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:eu}catch{return eu}}function YR(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;h6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&YR({info:t.info,provider:eu});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;h6.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&YR({info:t.info,provider:eu});}}));new TextEncoder;var y0=new TextDecoder;var eH=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},XR=e=>{let t=e;t instanceof Uint8Array&&(t=y0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return eH(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var QR=XR;function rH(e){return typeof e=="object"&&e!==null}function g6(e){if(!rH(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var yr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};yr.code="ERR_JOSE_GENERIC";var y6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};y6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var b6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};b6.code="ERR_JWT_EXPIRED";var x6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};x6.code="ERR_JOSE_ALG_NOT_ALLOWED";var v6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};v6.code="ERR_JOSE_NOT_SUPPORTED";var w6=class extends yr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};w6.code="ERR_JWE_DECRYPTION_FAILED";var _6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};_6.code="ERR_JWE_INVALID";var E6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};E6.code="ERR_JWS_INVALID";var so=class extends yr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};so.code="ERR_JWT_INVALID";var S6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};S6.code="ERR_JWK_INVALID";var I6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};I6.code="ERR_JWKS_INVALID";var A6=class extends yr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};A6.code="ERR_JWKS_NO_MATCHING_KEY";var k6=class extends yr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};k6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var R6=class extends yr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};R6.code="ERR_JWKS_TIMEOUT";var T6=class extends yr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};T6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function eT(e){if(typeof e!="string")throw new so("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new so("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new so("Invalid JWT");if(!t)throw new so("JWTs must contain a payload");let o;try{o=QR(t);}catch{throw new so("Failed to base64url decode the payload")}let n;try{n=JSON.parse(y0.decode(o));}catch{throw new so("Failed to parse the decoded payload as JSON")}if(!g6(n))throw new so("Invalid JWT Claims Set");return n}function tT(e){return eT(e)}var b0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
66
+ `);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},tu=class extends b0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},x0=class extends b0{constructor(t){super(t),this.name="InvalidToken";}};async function rT({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new tu({status:t.status});return await t.json()}async function nT({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new tu({status:r.status});let o=await r.json();if(o.valid===false)throw new x0(o.message??"unknown");return {token:o.token}}function oT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function iT(e={}){let t=oT(e);return {generateNonce:()=>rT(t),verifySiwf:r=>nT(t,r)}}var nH=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,oH=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function sT(e){let{scheme:t,statement:r,...o}=e.match(nH)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(oH)?.groups??{},f=e.split("Resources:")[1]?.split(`
67
+ - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var v0=(()=>{let e,t;async function r(o){let n=iT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=sT(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:tT(c.token)},c}throw s.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function aH(){let e=new zk;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var br=aH();var{solanaProviderRequest:aT}=ve,cT;aT&&(cT=TR(OR(aT)));async function $6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return cT}var uT=null;async function cH(e=1e3){if(uT===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([ve.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(uT=true),t}var fT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new wl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new wl.RejectedByUser:new Error("Unreachable")},lT={...br,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:cH,context:ve.context,back:NR({miniAppHost:ve,emitter:br}),quickAuth:v0,actions:{setPrimaryButton:ve.setPrimaryButton.bind(ve),ready:async(e={})=>await ve.ready(e),close:ve.close.bind(ve),viewCast:ve.viewCast.bind(ve),viewProfile:ve.viewProfile.bind(ve),openMiniApp:ve.openMiniApp.bind(ve),signIn:async e=>{let t=await ve.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return ve.openUrl(t.trim())},addFrame:fT,addMiniApp:fT,composeCast(e={}){return ve.composeCast(e)},viewToken:ve.viewToken.bind(ve),sendToken:ve.sendToken.bind(ve),swapToken:ve.swapToken.bind(ve),requestCameraAndMicrophoneAccess:ve.requestCameraAndMicrophoneAccess.bind(ve)},experimental:{getSolanaProvider:$6,signManifest:async e=>{let t=await ve.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ec.RejectedByUser:t.error.type==="invalid_domain"?new Ec.InvalidDomain:t.error.type==="generic_error"?new Ec.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return v0.getToken(e)}},wallet:{ethProvider:eu,getEthereumProvider:JR,getSolanaProvider:$6},haptics:{impactOccurred:ve.impactOccurred.bind(ve),notificationOccurred:ve.notificationOccurred.bind(ve),selectionChanged:ve.selectionChanged.bind(ve)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});var Co=lT;su();function oe(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}Et();Te();var F0=class extends z{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};vr();po();Jd();Si();xi();xs();var o4="/docs/contract/encodeEventTopics";function jo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,name:r});if(!c)throw new Hd(r,{docsPath:o4});n=c;}if(n.type!=="event")throw new Hd(void 0,{docsPath:o4});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(f=>o[f.name])??[]:[];u.length>0&&(i=c?.map((f,d)=>Array.isArray(u[d])?u[d].map((g,h)=>i4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?i4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [gs(s),...i]}function i4({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Qe(zn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new F0(e.type);return qr([e],[t])}Re();function vs(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function K0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=vs(e,{method:"eth_newFilter"}),f=i?jo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?J(s):s,toBlock:typeof c=="bigint"?J(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}fn();Un();Et();Te();Ai();Ma();np();var JH=3;function ho(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Ho?e:e instanceof z?e.walk(v=>"data"in v)||e.walk():{},{code:c,data:u,details:f,message:d,shortMessage:g}=a,h=e instanceof Cn?new pg({functionName:i,cause:e}):[JH,ki.code].includes(c)&&(u||f||d||g)||c===jn.code&&f==="execution reverted"&&u?new La({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof Es?f:g??d,cause:e}):e;return new xu(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}fn();Te();Ei();po();function _4(e){let t=Qe(`0x${e.substring(4)}`).substring(26);return ys(`0x${t}`)}uo();on();ur();Re();async function S4({hash:e,signature:t}){let r=St(e)?e:mt(e),{secp256k1:o}=await Promise.resolve().then(()=>(rd(),tR));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:f,v:d,yParity:g}=t,h=Number(g??d),v=E4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(v)}let s=St(t)?t:mt(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=E4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function E4(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function op({hash:e,signature:t}){return _4(await S4({hash:e,signature:t}))}an();vr();Re();Te();Q0();vr();Re();function go(e,t="hex"){let r=I4(e),o=mu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Ue(o.bytes):o.bytes}function I4(e){return Array.isArray(e)?YH(e.map(t=>I4(t))):XH(e)}function YH(e){let t=e.reduce((n,i)=>n+i.length,0),r=A4(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function XH(e){let t=typeof e=="string"?xr(e):e,r=A4(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function A4(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new z("Length is too large.")}po();function k4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=Qe(st(["0x05",go([t?J(t):"0x",n,r?J(r):"0x"])]));return o==="bytes"?xr(i):i}async function gg(e){let{authorization:t,signature:r}=e;return op({hash:k4(t),signature:r??t})}Re();og();yu();Te();Mn();var yg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};Ri();ip();function R4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new yg(o,{docsPath:t,...r})}sp();Ju();xg();Fa();fn();yu();Te();var Qu=class extends z{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},ks=class extends z{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},vg=class extends z{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Rs=class extends z{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Re();bg();ur();bg();var o2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ti(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?vt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?vt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?o2[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=rV(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var $4=Ku("transaction",Ti);function rV(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ha(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:Ti(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var O4=Ku("block",Ha);async function er(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?J(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Rs({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||Ha)(a,"getBlock")}async function ef(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function N4(e,t){return i2(e,t)}async function i2(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await oe(e,er,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ut(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):oe(e,er,"getBlock")({}),oe(e,ef,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new ks;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function P4(e,t){return wg(e,t)}async function wg(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new Qu;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.round(s*c))/BigInt(c),f=r||await oe(e,er,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new ks;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await i2(e,{block:f,chain:o,request:n}),h=u(f.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await oe(e,ef,"getGasPrice")({}))}}Va();ur();async function _g(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return vt(a)}vr();Re();function tf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>xr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Ue(i))}vr();Re();function rf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>xr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>xr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Ue(s))}Re();uo();vr();Re();function B4(e,t){let r=t,o=Ll(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}function C4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=B4(t,"bytes");return n.set([r],0),o==="bytes"?n:Ue(n)}function Eg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(C4({commitment:i,to:o,version:r}));return n}Te();var Sg=class extends z{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},nf=class extends z{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Ig=class extends z{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},Ag=class extends z{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};Q0();on();vr();Re();function z4(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?xr(e.data):e.data,o=$e(r);if(!o)throw new nf;if(o>761855)throw new Sg({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=mu(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Ue(a.bytes))}function kg(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??z4({data:t,to:o}),i=e.commitments??tf({blobs:n,kzg:r,to:o}),s=e.proofs??rf({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}Yd();Fa();Mn();function Rg(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new cg({transaction:e})}fn();Ri();Mn();ip();function L4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new fg(o,{docsPath:t,...r})}sp();Ju();Fa();ur();async function of(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function Tg(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:v,nonceManager:E,to:R,type:$,value:N,...O}=t,I=await(async()=>{if(!r||!E||typeof v<"u")return v;let D=qe(r),q=i?i.id:await oe(e,of,"getChainId")({});return await E.consume({address:D.address,chainId:q,client:e})})();Vn(t);let P=i?.formatters?.transactionRequest?.format,C=(P||Zo)({...As(O,{format:P}),account:r?qe(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:I,to:R,type:$,value:N},"fillTransaction");try{let D=await e.request({method:"eth_fillTransaction",params:[C]}),H=(i?.formatters?.transaction?.format||Ti)(D.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=t.gas??H.gas),H.gasPrice&&(H.gasPrice=t.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=t.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=t.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=t.maxPriorityFeePerGas??H.maxPriorityFeePerGas),typeof H.nonce<"u"&&(H.nonce=t.nonce??H.nonce);let Z=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await oe(e,er,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(Z<1)throw new Qu;let S=10**(Z.toString().split(".")[1]?.length??0),l=m=>m*BigInt(Math.round(Z*S))/BigInt(S);return H.feePayerSignature||(H.maxFeePerGas&&!t.maxFeePerGas&&(H.maxFeePerGas=l(H.maxFeePerGas)),H.gasPrice&&!t.gasPrice&&(H.gasPrice=l(H.gasPrice))),{raw:D.raw,transaction:{from:C.from,...H},...D.capabilities?{capabilities:D.capabilities}:{}}}catch(D){throw L4(D,{...t,chain:e.chain})}}var iV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],U4=new Map,s2=new Uo(128);async function $g(e,t){let r=t;r.account??=e.account,r.parameters??=iV;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await oe(e,of,"getChainId")({}),c))}let f=o&&qe(o),d=r.nonce;if(a?.fn&&a.runAt?.includes("beforeFillTransaction")){r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillTransaction"}),d??=r.nonce;let I=r.account??r.from;f=I?qe(I):void 0;}if(s.includes("nonce")&&typeof d>"u"&&f&&i){let I=await u();d=await i.consume({address:f.address,chainId:I,client:e});}let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs?false:s.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?true:s2.get(e.uid)===false||!["fees","gas"].some(P=>s.includes(P))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await oe(e,Tg,"fillTransaction")({...r,nonce:d}).then(I=>{let{chainId:P,from:L,gas:C,gasPrice:D,nonce:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:re,type:S,...l}=I.transaction,m="feeToken"in l?l.feeToken:void 0,y="feePayerSignature"in l&&l.feePayerSignature!==null&&typeof l.feePayerSignature<"u",b=typeof m<"u"&&m!==null&&(!("feeToken"in r)||y);return s2.set(e.uid,true),{...r,...L?{from:L}:{},...S&&!r.type?{type:S}:{},...typeof P<"u"?{chainId:P}:{},...typeof C<"u"?{gas:C}:{},...typeof D<"u"?{gasPrice:D}:{},...typeof q<"u"?{nonce:q}:{},...typeof H<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:H}:{},...typeof Z<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:Z}:{},...typeof re<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:re}:{},..."nonceKey"in l&&typeof l.nonceKey<"u"?{nonceKey:l.nonceKey}:{},..."keyAuthorization"in l&&typeof l.keyAuthorization<"u"&&l.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:l.keyAuthorization}:{},..."feePayerSignature"in l&&typeof l.feePayerSignature<"u"&&l.feePayerSignature!==null?{feePayerSignature:l.feePayerSignature}:{},...b?{feeToken:m}:{},...I.capabilities?{_capabilities:I.capabilities}:{}}}).catch(I=>{let P=I;if(P.name!=="TransactionExecutionError")return r;if(P.walk?.(D=>D.name==="ExecutionRevertedError"))throw I;return P.walk?.(D=>{let q=D;return q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"||q.message?.includes("eth_fillTransaction is not available")})&&s2.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...f?{from:f?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:v,gas:E,kzg:R,type:$}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillParameters"}));let N;async function O(){return N||(N=await oe(e,er,"getBlock")({blockTag:"latest"}),N)}if(s.includes("nonce")&&typeof d>"u"&&f&&!i&&(r.nonce=await oe(e,_g,"getTransactionCount")({address:f.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&v&&R){let I=tf({blobs:v,kzg:R});if(s.includes("blobVersionedHashes")){let P=Eg({commitments:I,to:"hex"});r.blobVersionedHashes=P;}if(s.includes("sidecars")){let P=rf({blobs:v,commitments:I,kzg:R}),L=kg({blobs:v,commitments:I,proofs:P,to:"hex"});r.sidecars=L;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof $>"u")try{r.type=Rg(r);}catch{let I=U4.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",U4.set(e.uid,I)),r.type=I?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let I=await O(),{maxFeePerGas:P,maxPriorityFeePerGas:L}=await wg(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<L)throw new vg({maxPriorityFeePerGas:L});r.maxPriorityFeePerGas=L,r.maxFeePerGas=P;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new ks;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:P}=await wg(e,{block:I,chain:n,request:r,type:"legacy"});r.gasPrice=P;}}return s.includes("gas")&&typeof E>"u"&&(r.gas=await oe(e,sf,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"afterFillParameters"})),Vn(r),delete r.parameters,r}async function sf(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?qe(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await gg({authorization:t.authorizationList[0]}).catch(()=>{throw new z("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:d,blockTag:g,data:h,gas:v,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,value:I,stateOverride:P,...L}=o?await $g(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let D=(typeof d=="bigint"?J(d):void 0)||g,q=Yu(P);Vn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Zo)({...As(L,{format:H}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,data:h,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,to:s,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:q?[re,D??e.experimental_blockTag??"latest",q]:D?[re,D]:[re]}))}catch(s){throw R4(s,{...t,account:n,chain:e.chain})}}async function M4(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=ft({abi:r,args:n,functionName:i});try{return await oe(e,sf,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let f=a.account?qe(a.account):void 0;throw ho(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}xs();Ts();vr();function fr(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}po();Jd();Et();J6();on();Jd();tp();xi();var D4="/docs/contract/decodeEventLog";function Za(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new C0({docsPath:D4});let c=t.find($=>$.type==="event"&&s===gs(nr($)));if(!(c&&"name"in c)||c.type!=="event")throw new z0(s,{docsPath:D4});let{name:u,inputs:f}=c,d=f?.some($=>!("name"in $&&$.name)),g=d?[]:{},h=f.map(($,N)=>[$,N]).filter(([$])=>"indexed"in $&&$.indexed),v=[];for(let $=0;$<h.length;$++){let[N,O]=h[$],I=a[$];if(!I){if(i)throw new ms({abiItem:c,param:N});v.push([N,O]);continue}g[d?O:N.name||O]=sV({param:N,value:I});}let E=f.filter($=>!("indexed"in $&&$.indexed)),R=i?E:[...v.map(([$])=>$),...E];if(R.length>0){if(r&&r!=="0x")try{let $=Ii(R,r);if($){let N=0;if(!i)for(let[O,I]of v)g[d?I:O.name||I]=$[N++];if(d)for(let O=0;O<f.length;O++)g[O]===void 0&&N<$.length&&(g[O]=$[N++]);else for(let O=0;O<E.length;O++)g[E[O].name]=$[N++];}}catch($){if(i)throw $ instanceof au||$ instanceof pu?new vi({abiItem:c,data:r,params:R,size:$e(r)}):$}else if(i)throw new vi({abiItem:c,data:"0x",params:R,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function sV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ii([e],t)||[])[0]}function af(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:gs(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?fr(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let f,d;for(let g of u)try{f=Za({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!f&&!n){d=u[0];try{f=Za({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !f||!d||i&&!i.includes(f.eventName)||!aV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function aV(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?zr(s,a):i.type==="string"||i.type==="bytes"?Qe(zn(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Re();async function cf(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,f=s??(i?[i]:void 0),d=[];f&&(d=[f.flatMap(E=>jo({abi:[E],eventName:E.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?J(o):o,toBlock:typeof n=="bigint"?J(n):n}]});let h=g.map(v=>fr(v));return f?af({abi:f,args:a,logs:h,strict:u}):h}async function Og(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,f=s?un({abi:r,name:s}):void 0,d=f?void 0:r.filter(g=>g.type==="event");return oe(e,cf,"getLogs")({address:o,args:n,blockHash:i,event:f,events:d,fromBlock:a,toBlock:c,strict:u})}$i();Un();Ns();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=ft({abi:r,args:n,functionName:i});try{let{data:c}=await oe(e,mn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw ho(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}fn();$i();Un();Ns();async function T$(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?qe(a.account):e.account,u=ft({abi:r,args:n,functionName:i});try{let{data:f}=await oe(e,mn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:f||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(f){throw ho(f,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}Et();np();var Xg=new Map,$2=new Map,$V=0;function Ur(e,t,r){let o=++$V,n=()=>Xg.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){Xg.delete(e),$2.delete(e);return}Xg.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=$2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(Xg.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let f in t)c[f]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[f]?.(...d);});let u=r(c);return typeof u=="function"&&$2.set(e,u),s}mo();async function gp(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(wr(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(wr(t));};t?.addEventListener("abort",s,{once:true});})}function Wo(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await gp(c);let u=async()=>{n&&(await e({unpoll:i}),await gp(o),u());};u();})(),i}Pr();var OV=new Map,NV=new Map;function $$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,OV),o=t(e,NV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function O$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=$$(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var PV=e=>`blockNumber.${e}`;async function Wn(e,{cacheTime:t=e.cacheTime}={}){let r=await O$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:PV(e.uid),cacheTime:t});return BigInt(r)}async function Ps(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>fr(i));return !("abi"in t)||!t.abi?n:af({abi:t.abi,logs:n,strict:r})}async function Bs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function N$(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:f,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof f<"u"?f:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R,a]);return Ur($,{onLogs:u,onError:c},N=>{let O;a!==void 0&&(O=a-1n);let I,P=false,L=Wo(async()=>{if(!P){try{I=await oe(e,K0,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:R,fromBlock:a});}catch{}P=true;return}try{let C;if(I)C=await oe(e,Ps,"getFilterChanges")({filter:I});else {let D=await oe(e,Wn,"getBlockNumber")({});O&&O<D?C=await oe(e,Og,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:D,strict:R}):C=[],O=D;}if(C.length===0)return;if(i)N.onLogs(C);else for(let D of C)N.onLogs([D]);}catch(C){I&&C instanceof jn&&(P=false),N.onError?.(C);}},{emitOnBegin:true,interval:d});return async()=>{I&&await oe(e,Bs,"uninstallFilter")({filter:I}),L();}})})():(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R]),N=true,O=()=>N=false;return Ur($,{onLogs:u,onError:c},I=>((async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let D=e.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return D?D.value:e.transport}return e.transport})(),L=s?jo({abi:r,eventName:s,args:n}):[],{unsubscribe:C}=await P.subscribe({params:["logs",{address:o,topics:L}],onData(D){if(!N)return;let q=D.result;try{let{eventName:H,args:Z}=Za({abi:r,data:q.data,topics:q.topics,strict:g}),re=fr(q,{args:Z,eventName:H});I.onLogs([re]);}catch(H){let Z,re;if(H instanceof vi||H instanceof ms){if(g)return;Z=H.abiItem.name,re=H.abiItem.inputs?.some(l=>!("name"in l&&l.name));}let S=fr(q,{args:re?[]:{},eventName:Z});I.onLogs([S]);}},onError(D){I.onError?.(D);}});O=C,N||O();}catch(P){c?.(P);}})(),()=>O()))})()}Te();var yp=class extends z{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
68
+ `),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"});}};async function P$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}mo();function bp(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(wr(n));return}let u=async({error:f})=>{let d=typeof t=="function"?t({count:c,error:f}):t;if(d)try{await gp(d,{signal:n});}catch(g){s(g);return}return a({count:c+1})};try{let f=await e();i(f);}catch(f){if(n?.aborted){s(wr(n));return}if(ln(f)){s(f);return}if(c<r&&await o({count:c,error:f}))return u({error:f});s(f);}};a().catch(s);})}ur();bg();var BV={"0x0":"reverted","0x1":"success"};function Ya(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>fr(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?vt(e.transactionIndex):null,status:e.status?BV[e.status]:null,type:e.type?o2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var B$=Ku("transactionReceipt",Ya);fn();var Qg=256,ey;function ty(e=11){if(!ey||Qg+e>256*2){ey="",Qg=0;for(let t=0;t<256;t++)ey+=(256+Math.random()*256|0).toString(16).substring(1);}return ey.substring(Qg,Qg+++e)}function z$(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",tokens:a,type:c="base"}=e,u=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(f/2),500),4e3),g=e.pollingInterval??d,h=e.cacheTime??g,v=e.account?qe(e.account):void 0,{config:E,request:R,value:$}=e.transport({account:v,chain:r,pollingInterval:g}),N={...E,...$},O={account:v,batch:t,cacheTime:h,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:g,request:R,tokens:a,transport:N,type:c,uid:ty(),...u?{experimental_blockTag:u}:{}};function I(P){return L=>{let C=L(P);for(let q in O)delete C[q];let D={...P,...C};for(let q in C){let H=P[q],Z=C[q];C$(H)&&C$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:I(D)})}}return Object.assign(O,{extend:I(O)})}function C$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xp(e,t){let r=(o={})=>t(e,o);for(let o of ["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(t,o)){let n=t[o];r[o]=(i={})=>n.length===1?n(i):n(e,i);}for(let o of ["extractEvent","extractEvents"])Object.hasOwn(t,o)&&(r[o]=t[o]);return r}pn();$i();Un();Ei();Ja();on();Kd();Re();Te();Ai();function gf(e){if(!(e instanceof z))return false;let t=e.walk(r=>r instanceof La);return t instanceof La?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}hp();an();vr();Re();po();uo();function ry(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return St(t)?t:null}function vp(e){let t=new Uint8Array(32).fill(0);if(!e)return Ue(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=ry(r[o]),i=n?zn(n):Qe(lo(r[o]),"bytes");t=Qe(Mo([t,i]),"bytes");}return Ue(t)}vr();function L$(e){return `[${e.slice(2)}]`}vr();Re();po();function U$(e){let t=new Uint8Array(32).fill(0);return e?ry(e)||Qe(lo(e)):Ue(t)}function yf(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(lo(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=lo(n[i]);s.byteLength>255&&(s=lo(L$(U$(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function M$(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;let d=n!=null?[vp(i),BigInt(n)]:[vp(i)];try{let g=ft({abi:b2,functionName:"addr",args:d}),h={address:u,abi:Hg,functionName:"resolveWithGateways",args:[mt(yf(i)),g,s??[Pi]],blockNumber:r,blockTag:o},E=await oe(e,De,"readContract")(h);if(E[0]==="0x")return null;let R=CV({coinType:n,data:E[0],args:d});return R==="0x"||Gr(R)==="0x00"?null:R}catch(g){if(a)throw g;if(gf(g))return null;throw g}}function CV({coinType:e,data:t,args:r}){try{return Lr({abi:b2,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=Gr(t);if($e(n)===20)return Ln(n);throw o}}Te();var ny=class extends z{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},Cs=class extends z{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},bf=class extends z{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},oy=class extends z{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var zV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,LV=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,UV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,MV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function DV(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function D$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function O2({uri:e,gatewayUrls:t}){let r=UV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=D$(t?.ipfs,"https://ipfs.io"),n=D$(t?.arweave,"https://arweave.net"),i=e.match(zV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||LV.test(e);if(e.startsWith("http")&&!f&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((f||d)&&c)return {uri:`${o}/${f?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(MV,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new bf({uri:e})}function N2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ny({data:e});return e.image||e.image_url||e.image_data}async function j$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await iy({gatewayUrls:e,uri:N2(r)})}catch{throw new bf({uri:t})}}async function iy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=O2({uri:t,gatewayUrls:e});if(o||await DV(r))return r;throw new bf({uri:t})}function F$(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new Cs({reason:"Only EIP-155 supported"});if(!s)throw new Cs({reason:"Chain ID not found"});if(!c)throw new Cs({reason:"Contract address not found"});if(!n)throw new Cs({reason:"Token ID not found"});if(!a)throw new Cs({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function H$(e,{nft:t}){if(t.namespace==="erc721")return De(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return De(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new oy({namespace:t.namespace})}async function V$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?jV(e,{gatewayUrls:t,record:r}):iy({uri:r,gatewayUrls:t})}async function jV(e,{gatewayUrls:t,record:r}){let o=F$(r),n=await H$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=O2({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(u);return iy({uri:N2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),j$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}pn();$i();Un();Ja();Re();hp();async function sy(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:Hg,args:[mt(yf(i)),ft({abi:y2,functionName:"text",args:[vp(i),n]}),s??[Pi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await oe(e,De,"readContract")(d);if(h[0]==="0x")return null;let v=Lr({abi:y2,functionName:"text",data:h[0]});return v===""?null:v}catch(d){if(a)throw d;if(gf(d))return null;throw d}}async function Z$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,sy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await V$(e,{record:c,gatewayUrls:o})}catch{return null}}pn();Ja();hp();async function G$(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let f={address:u,abi:l$,args:[r,i,s??[Pi]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=oe(e,De,"readContract"),[g]=await d(f);return g||null}catch(f){if(a)throw f;if(gf(f))return null;throw f}}Ja();Re();async function q$(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await oe(e,De,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[mt(yf(n))],blockNumber:r,blockTag:o});return c}Ns();fn();Te();Re();E2();sp();Ju();Fa();async function W$(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h,...v}=t,E=r?qe(r):void 0;try{Vn(t);let $=(typeof o=="bigint"?J(o):void 0)||n,N=e.chain?.formatters?.transactionRequest?.format,I=(N||Zo)({...As(v,{format:N}),account:E,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),P=await e.request({method:"eth_createAccessList",params:[I,$]});if(P.error)throw new z(P.error,{details:P.error});return {accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(R){throw Gg(R,{...t,account:E,chain:e.chain})}}async function K$(e){let t=vs(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Re();async function ay(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=vs(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(h=>jo({abi:[h],eventName:h.name,args:r}))],o&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?J(i):i,toBlock:typeof a=="bigint"?J(a):a,...f.length?{topics:f}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function cy(e){let t=vs(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}pn();$i();Un();Va();Ns();async function J$(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=ft({abi:bo,functionName:"getEthBalance",args:[t]}),{data:f}=await oe(e,mn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:bo,functionName:"getEthBalance",args:[t],data:f||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function Y$(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Re();async function X$(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?J(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Rs({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||Ya;return i.map(a=>s(a,"getBlockReceipts"))}ur();Re();async function Q$(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?J(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),vt(i)}Va();async function Xa(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}Ei();on();bs();async function e8(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await Xa(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&$e(n)===23&&n.startsWith("0xef0100"))return Ln(cn(n,3,23))}Te();var uy=class extends z{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function t8(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,f,d]=await oe(e,De,"readContract")({abi:FV,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:f},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new uy({address:r}):s}}var FV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Re();function r8(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function n8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?J(r):void 0,s=await e.request({method:"eth_feeHistory",params:[J(t),i||o,n]},{dedupe:!!i});return r8(s)}async function o8(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>fr(i));return t.abi?af({abi:t.abi,logs:n,strict:r}):n}Va();Un();Re();Mn();an();Kd();Re();n2();Lo();Te();Zg();Ri();En();on();bs();ur();function i8(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Me(n))throw new nt({address:n});if(o<0)throw new Ka({chainId:o})}fy(e);}function s8(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new nf;for(let r of t){let o=$e(r),n=vt(cn(r,0,1));if(o!==32)throw new Ig({hash:r,size:o});if(n!==1)throw new Ag({hash:r,version:n})}}fy(e);}function fy(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Ka({chainId:t});if(n&&!Me(n))throw new nt({address:n});if(o&&o>Xu)throw new Fn({maxFeePerGas:o});if(r&&o&&r>o)throw new Vo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function a8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Ka({chainId:t});if(i&&!Me(i))throw new nt({address:i});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}function c8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Me(i))throw new nt({address:i});if(typeof t<"u"&&t<=0)throw new Ka({chainId:t});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}Lo();Mn();En();function wp(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new ug({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function u8(e,t){let r=Rg(e);return r==="eip1559"?ZV(e,t):r==="eip2930"?GV(e,t):r==="eip4844"?VV(e,t):r==="eip7702"?HV(e,t):qV(e,t)}function HV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;i8(e);let g=wp(f),h=f8(r);return st(["0x04",go([J(o),i?J(i):"0x",u?J(u):"0x",c?J(c):"0x",n?J(n):"0x",s??"0x",a?J(a):"0x",d??"0x",g,h,...xf(e,t)])])}function VV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;s8(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>Ue(L)),I=e.kzg,P=tf({blobs:O,kzg:I});if(typeof g>"u"&&(g=Eg({commitments:P})),typeof h>"u"){let L=rf({blobs:O,commitments:P,kzg:I});h=kg({blobs:O,commitments:P,proofs:L});}}let v=wp(f),E=[J(r),n?J(n):"0x",u?J(u):"0x",c?J(c):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",d??"0x",v,a?J(a):"0x",g??[],...xf(e,t)],R=[],$=[],N=[];if(h)for(let O=0;O<h.length;O++){let{blob:I,commitment:P,proof:L}=h[O];R.push(I),$.push(P),N.push(L);}return st(["0x03",h?go([E,R,$,N]):go(E)])}function ZV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;fy(e);let d=wp(u),g=[J(r),n?J(n):"0x",c?J(c):"0x",a?J(a):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",f??"0x",d,...xf(e,t)];return st(["0x02",go(g)])}function GV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;a8(e);let f=wp(c),d=[J(r),i?J(i):"0x",u?J(u):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x",f,...xf(e,t)];return st(["0x01",go(d)])}function qV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;c8(e);let u=[i?J(i):"0x",c?J(c):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x"];if(t){let f=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new ag({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,J(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,J(r),"0x","0x"]);return go(u)}function xf(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=Gr(r.r),s=Gr(r.s);return [typeof n=="number"?n?J(1):"0x":o===0n?"0x":o===1n?J(1):o===27n?"0x":J(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function f8(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?mt(o):"0x",s,n?mt(n):"0x",...xf({},i)]);}return t}Ei();Ts();async function l8({address:e,authorization:t,signature:r}){return zr(Ln(e),await gg({authorization:t,signature:r}))}Te();Ma();np();mo();Yd();var ly=new Uo(8192);function d8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(ly.get(r))return ly.get(r);let o=e().finally(()=>ly.delete(r));return ly.set(r,o),o}Pr();function p8(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:f}=r;if(i?.exclude?.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?KV(`${u}.${Be(r)}`):void 0;return d8(()=>bp(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw wr(c);if(ln(g))throw g;let h=g;switch(h.code){case vu.code:throw new vu(h);case wu.code:throw new wu(h);case _u.code:throw new _u(h,{method:r.method});case Eu.code:throw new Eu(h);case ki.code:throw new ki(h);case jn.code:throw new jn(h);case Su.code:throw new Su(h);case Iu.code:throw new Iu(h);case Au.code:throw new Au(h);case Ss.code:throw new Ss(h,{method:r.method});case Da.code:throw new Da(h);case ku.code:throw new ku(h);case ja.code:throw new ja(h);case Ru.code:throw new Ru(h);case Tu.code:throw new Tu(h);case $u.code:throw new $u(h);case Ou.code:throw new Ou(h);case Nu.code:throw new Nu(h);case Pu.code:throw new Pu(h);case Bu.code:throw new Bu(h);case Cu.code:throw new Cu(h);case zu.code:throw new zu(h);case Lu.code:throw new Lu(h);case Uu.code:throw new Uu(h);case Mu.code:throw new Mu(h);case 5e3:throw new ja(h);case Du.code:throw new Du(h);default:throw g instanceof z?g:new hg(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof Dn){let v=h?.headers?.get("Retry-After");if(v?.match(/\d/))return Number.parseInt(v,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>WV(g)}),{enabled:n,id:d})}}function WV(e){return ln(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Da.code||e.code===ki.code||e.code===429:e instanceof Dn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function KV(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function vf(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}ur();Ma();mo();mo();function m8(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&ln(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}Pr();function JV(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var P2=JV();var YV=10485760;function h8(e,t={}){let{url:r,headers:o}=QV(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??YV,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:f=t.timeout??1e4}=n,d={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:g,method:h,signal:v}=d;try{let E=await m8(async({signal:N})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??P2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??P2.take(),...i}),headers:{...o,"Content-Type":"application/json",...g},method:h||"POST",signal:v||(f>0?N:null)},I=new Request(r,O),P=await c?.(I,O)??{...O,url:r};return await s(P.url??r,P)},{errorInstance:new rp({body:i,url:r}),timeout:f,signal:!0});u&&await u(E);let R,$=await XV(E,{maxResponseBodySize:a});if(E.headers.get("Content-Type")?.startsWith("application/json"))R=JSON.parse($);else {R=$;try{R=JSON.parse(R||"{}");}catch(N){if(E.ok)throw N;R={error:R};}}if(!E.ok){if(typeof R.error?.code=="number"&&typeof R.error?.message=="string")return R;throw new Dn({body:i,details:Be(R.error)||E.statusText,headers:E.headers,status:E.status,url:r})}return R}catch(E){throw v?.aborted?wr(v):ln(E)||E instanceof Dn||E instanceof Ua||E instanceof rp?E:new Dn({body:i,cause:E,url:r})}}}}async function XV(e,{maxResponseBodySize:t}){if(t===false)return e.text();let r=e.headers.get("Content-Length");if(r){let a=Number(r);if(a>t)throw new Ua({maxSize:t,size:a})}if(!e.body){let a=await e.text(),c=new TextEncoder().encode(a).length;if(c>t)throw new Ua({maxSize:t,size:c});return a}let o=e.body.getReader(),n=new TextDecoder,i="",s=0;try{for(;;){let{done:a,value:c}=await o.read();if(a)break;if(s+=c.byteLength,s>t)throw await o.cancel(),new Ua({maxSize:t,size:s});i+=n.decode(c,{stream:!0});}return i+=n.decode(),i}finally{o.releaseLock();}}function QV(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}po();var g8=`Ethereum Signed Message:
69
+ `;an();on();Re();function y8(e){let t=typeof e=="string"?lu(e):typeof e.raw=="string"?e.raw:Ue(e.raw),r=lu(`${g8}${$e(t)}`);return Mo([r,t])}function dy(e,t){return Qe(y8(e),t)}Si();an();Re();po();Et();Lo();Pr();Te();var py=class extends z{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},my=class extends z{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},hy=class extends z{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},gy=class extends z{constructor({type:t}){let r=t.replace(/^(u?int)/,"$&256");super(`Type "${t}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"});}};En();on();Re();Z6();function b8(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:f}=c,d=a[u],g=f.replace(/(\[[0-9]*\])+$/,"");if(g==="int"||g==="uint")throw new gy({type:f});let h=f.match(W0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[R,$,N]=h;J(d,{signed:$==="int",size:Number.parseInt(N,10)/8});}if(f==="address"&&typeof d=="string"&&!Me(d))throw new nt({address:d});let v=f.match(r4);if(v){let[R,$]=v;if($&&$e(d)!==Number.parseInt($,10))throw new M0({expectedSize:Number.parseInt($,10),givenSize:$e(d)})}let E=n[f];E&&(eZ(f),i(E,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new py({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new my({primaryType:o,types:n})}function x8({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function eZ(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new hy({type:e})}function v8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:x8({domain:t}),...e.types};b8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(tZ({domain:t,types:n})),o!=="EIP712Domain"&&i.push(w8({data:r,primaryType:o,types:n})),Qe(Mo(i))}function tZ({domain:e,types:t}){return w8({data:e,primaryType:"EIP712Domain",types:t})}function w8({data:e,primaryType:t,types:r}){let o=_8({data:e,primaryType:t,types:r});return Qe(o)}function _8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[rZ({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=S8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return qr(o,n)}function rZ({primaryType:e,types:t}){let r=mt(nZ({primaryType:e,types:t}));return Qe(r)}function nZ({primaryType:e,types:t}){let r="",o=E8({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function E8({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])E8({primaryType:i.type,types:t},r);return r}function S8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},Qe(_8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},Qe(o)];if(r==="string")return [{type:"bytes32"},Qe(mt(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>S8({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},Qe(qr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var kp={};Er(kp,{InvalidWrappedSignatureError:()=>Oy,assert:()=>Ny,from:()=>UZ,magicBytes:()=>iE,suffixParameters:()=>sE,unwrap:()=>Z8,validate:()=>DZ,wrap:()=>MZ});su();$s();var yy=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var oZ={checksum:new yy(8192)},by=oZ.checksum;dn();Wh();$s();lr();function Qa(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Ra(e$(e));return r==="Bytes"?o:It(o)}$s();dn();lr();up();function I8(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new xy({prefix:o,cause:new L2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new xy({prefix:o,cause:new z2});return}throw new C2({publicKey:e})}function A8(e){let t=(()=>{if(lp(e))return k8(e);if(s$(e))return sZ(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return I8(t),t}function sZ(e){return k8(It(e))}function k8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new U2({publicKey:e});if(e.length===130){let o=BigInt(dt(e,0,32)),n=BigInt(dt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(dt(e,0,1)),n=BigInt(dt(e,1,33)),i=BigInt(dt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(dt(e,0,1)),r=BigInt(dt(e,1,33));return {prefix:t,x:r}}function M2(e,t={}){I8(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return ht(i?Ve(r,{size:1}):"0x",Ve(o,{size:32}),typeof n=="bigint"?Ve(n,{size:32}):"0x")}var C2=class extends de{constructor({publicKey:t}){super(`Value \`${Os(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},xy=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},z2=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},L2=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},U2=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var aZ=/^0x[a-fA-F0-9]{40}$/;function ec(e,t={}){let{strict:r=true}=t;if(!aZ.test(e))throw new vy({address:e,cause:new D2});if(r){if(e.toLowerCase()===e)return;if(wy(e)!==e)throw new vy({address:e,cause:new j2})}}function wy(e){if(by.has(e))return by.get(e);ec(e,{strict:false});let t=e.substring(2).toLowerCase(),r=Qa(t$(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return by.set(e,n),n}function cZ(e,t={}){let{checksum:r=false}=t;return ec(e),r?wy(e):e}function T8(e,t={}){let r=Qa(`0x${M2(e).slice(4)}`).substring(26);return cZ(`0x${r}`,t)}function _y(e,t={}){let{strict:r=true}=t??{};try{return ec(e,{strict:r}),!0}catch{return false}}var vy=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},D2=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},j2=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};$s();dn();lr();$s();dn();lr();var $8=/^(.*)\[([0-9]*)\]$/,O8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Sy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,F2=2n**256n-1n;function tc(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=Z2(t.type);if(i){let[s,a]=i;return fZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return mZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return uZ(e,{checksum:o});if(t.type==="bool")return lZ(e);if(t.type.startsWith("bytes"))return dZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return pZ(e,t);if(t.type==="string")return hZ(e,{staticPosition:n});throw new _f(t.type)}var P8=32,H2=32;function uZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?wy(i):i)(It(r$(o,-20))),32]}function fZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=Go(e.readBytes(H2)),u=i+c,f=u+P8;e.setPosition(u);let d=Go(e.readBytes(P8)),g=wf(t),h=0,v=[];for(let E=0;E<d;++E){e.setPosition(f+(g?E*32:h));let[R,$]=tc(e,t,{checksumAddress:o,staticPosition:f});h+=$,v.push(R),$===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(i+32),[v,32]}if(wf(t)){let c=Go(e.readBytes(H2)),u=i+c,f=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=tc(e,t,{checksumAddress:o,staticPosition:u});f.push(g);}return e.setPosition(i+32),[f,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,f]=tc(e,t,{checksumAddress:o,staticPosition:i+s});s+=f,a.push(u),f===0&&(e.assertReadLimit(),e._touch());}return [a,s]}function lZ(e){return [o$(e.readBytes(32),{size:32}),32]}function dZ(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Go(e.readBytes(32));e.setPosition(r+s);let a=Go(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[It(c),32]}return [It(e.readBytes(Number.parseInt(n,10),32)),32]}function pZ(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?n$(n,{signed:r}):Go(n,{signed:r}),32]}function mZ(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(wf(t)){let c=Go(e.readBytes(H2)),u=n+c;for(let f=0;f<t.components.length;++f){let d=t.components[f];e.setPosition(u+a);let[g,h]=tc(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?f:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[f,d]=tc(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=f,a+=d;}return [s,a]}function hZ(e,{staticPosition:t}){let r=Go(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Go(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=i$(p2(i));return e.setPosition(t+32),[s,32]}function B8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(V2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function V2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=Z2(o.type);if(n){let[i,s]=n;return yZ(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return _Z(r,{checksumAddress:e,parameter:o});if(o.type==="address")return gZ(r,{checksum:e});if(o.type==="bool")return xZ(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Sy.exec(o.type)??[];return vZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return bZ(r,{type:o.type});if(o.type==="string")return wZ(r);throw new _f(o.type)}function Iy(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=lt(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Ve(t+n,{size:32})),o.push(a),n+=lt(a)):r.push(a);}return ht(...r,...o)}function gZ(e,t){let{checksum:r=false}=t;return ec(e,{strict:r}),{dynamic:false,encoded:Ni(e.toLowerCase())}}function yZ(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new ky(e);if(!i&&e.length!==o)throw new Ay({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=e.length===0&&wf(n),a=[];for(let c=0;c<e.length;c++){let u=V2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Iy(a);if(i){let u=Ve(a.length,{size:32});return {dynamic:true,encoded:a.length>0?ht(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:ht(...a.map(({encoded:c})=>c))}}function bZ(e,{type:t}){let[,r]=t.split("bytes"),o=lt(e);if(!r){let n=e;return o%32!==0&&(n=qo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:ht(Ni(Ve(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new _p({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:qo(e)}}function xZ(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Ni(Dg(e))}}function vZ(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new fp({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Ve(e,{size:32,signed:t})}}function wZ(e){let t=mf(e),r=Math.ceil(lt(t)/32),o=[];for(let n=0;n<r;n++)o.push(qo(dt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(qo(Ve(lt(t),{size:32})),...o)}}function _Z(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=V2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Iy(i):ht(...i.map(({encoded:s})=>s))}}function Z2(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function wf(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(wf);let r=Z2(e.type);return !!(r&&wf({...e,type:r[1]}))}dn();var SZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new q2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new G2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function Ty(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(SZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ry=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},G2=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},q2=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function rc(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?df(t):t,s=Ty(i);if(Zn(i)===0&&e.length>0)throw new J2;if(Zn(i)&&Zn(i)<32)throw new K2({data:typeof t=="string"?t:It(t),parameters:e,size:Zn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let f=e[u];a<i.length&&s.setPosition(a);let[d,g]=tc(s,f,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[f.name??u]=d;}return c}function zs(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let n=B8({checksumAddress:o,parameters:e,values:t}),i=Iy(n);return i.length===0?"0x":i}function W2(e,t){if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(W2.encode(n,i));}return ht(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return ec(c),Ni(c.toLowerCase(),n?32:0)}if(r==="string")return mf(o);if(r==="bytes")return o;if(r==="bool")return Ni(Dg(o),n?32:1);let i=r.match(Sy);if(i){let[c,u,f="256"]=i,d=Number.parseInt(f,10)/8;return Ve(o,{size:n?32:d,signed:u==="int"})}let s=r.match(O8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new _p({expectedSize:Number.parseInt(u,10),value:o});return qo(o,n?32:0)}let a=r.match($8);if(a&&Array.isArray(o)){let[c,u]=a,f=[];for(let d=0;d<o.length;d++)f.push(t(u,o[d],true));return f.length===0?"0x":ht(...f)}throw new _f(r)}e.encode=t;})(W2||(W2={}));function Sp(e){return Array.isArray(e)&&typeof e[0]=="string"?Md(e):typeof e=="string"?Md(e):e}var K2=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${bi(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},J2=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},Ay=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},_p=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${lt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},$y=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
70
+ `)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},ky=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},_f=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};lr();$s();dn();lr();function IZ(e,t){let{as:r}=t,o=L8(e),n=Ty(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function z8(e,t={}){let{as:r="Hex"}=t;return IZ(e,{as:r})}function L8(e){return Array.isArray(e)?AZ(e.map(t=>L8(t))):kZ(e)}function AZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=U8(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function kZ(e){let t=typeof e=="string"?df(e):e,r=U8(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function U8(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}dn();lr();up();function tE(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new Ip({signature:e});if(typeof e.s>"u")throw new Ip({signature:e});if(r&&typeof e.yParity>"u")throw new Ip({signature:e});if(e.r<0n||e.r>F2)throw new X2({value:e.r});if(e.s<0n||e.s>F2)throw new Q2({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ap({value:e.yParity})}function TZ(e){return M8(It(e))}function M8(e){if(e.length!==130&&e.length!==132)throw new Y2({signature:e});let t=BigInt(dt(e,0,32)),r=BigInt(dt(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return oE(n)}catch{throw new Ap({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function rE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return nE(e)}function nE(e){let t=typeof e=="string"?M8(e):e instanceof Uint8Array?TZ(e):typeof e.r=="string"?OZ(e):e.v?$Z(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return tE(t),t}function $Z(e){return {r:e.r,s:e.s,yParity:oE(e.v)}}function OZ(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=oE(r)),typeof o!="number")throw new Ap({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function D8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":h2(Ve(t)),r===0n?"0x":h2(Ve(r))]}function oE(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new eE({value:e})}var Y2=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},Ip=class extends de{constructor({signature:t}){super(`Signature \`${Os(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},X2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},Q2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},Ap=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},eE=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function F8(e,t={}){return typeof e.chainId=="string"?NZ(e):{...e,...t.signature}}function NZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function H8(e){return PZ(e,{presign:true})}function PZ(e,t={}){let{presign:r}=t;return Qa(ht("0x05",z8(BZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function BZ(e){let{address:t,chainId:r,nonce:o}=e,n=rE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?D8(n):[]]}dn();lr();rd();lr();function V8(e){return T8(zZ(e))}function zZ(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new bn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(pf(t).substring(2));return A8(a)}var iE="0x8010801080108010801080108010801080108010801080108010801080108010",sE=Sp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Ny(e){if(typeof e=="string"){if(dt(e,-32)!==iE)throw new Oy(e)}else tE(e.authorization);}function UZ(e){return typeof e=="string"?Z8(e):e}function Z8(e){Ny(e);let t=Lg(dt(e,-64,-32)),r=dt(e,-t-64,-64),o=dt(e,0,-t-64),[n,i,s]=rc(sE,r);return {authorization:F8({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function MZ(e){let{data:t,signature:r}=e;Ny(e);let o=V8({payload:H8(e.authorization),signature:nE(e.authorization)}),n=zs(sE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(lt(n),{size:32});return ht(r,n,i,iE)}function DZ(e){try{return Ny(e),!0}catch{return false}}var Oy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};ng();function G8(e,t){return rg(e,t)}function jZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function q8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?jZ(e.storageProof):void 0}}async function W8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return q8(c)}Mn();async function K8(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new ws({hash:t});return r}Va();async function J8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}Mn();Re();async function Ef(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?J(r):void 0,f=null;if(n?f=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,J(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,J(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,J(a)]},{dedupe:true})),!f)throw new ws({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||Ti)(f,"getTransaction")}async function Y8(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([oe(e,Wn,"getBlockNumber")({}),t?oe(e,Ef,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}Mn();async function Sf(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new bu({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||Ya)(r,"getTransactionReceipt")}pn();dp();Et();Te();Ai();$i();Un();Ja();Wg();Pr();async function X8(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:f}=t,d=t.contracts,g=typeof e.batch?.multicall=="object"?e.batch.multicall:{},h=t.batchSize??g.batchSize??1024,v=t.deployless??g.deployless??false,E=(()=>{if(t.multicallAddress)return t.multicallAddress;if(v)return null;if(e.chain)return qn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),R=[[]],$=0,N=0;for(let C=0;C<d.length;C++){let{abi:D,address:q,args:H,functionName:Z}=d[C];try{let re=ft({abi:D,args:H,functionName:Z});N+=(re.length-2)/2,h>0&&N>h&&R[$].length>0&&($++,N=(re.length-2)/2,R[$]=[]),R[$]=[...R[$],{allowFailure:!0,callData:re,target:q}];}catch(re){let S=ho(re,{abi:D,address:q,args:H,docsPath:"/docs/contract/multicall",functionName:Z,sender:r});if(!n)throw S;R[$]=[...R[$],{allowFailure:true,callData:"0x",target:q}];}}let O=!!e.batch?.multicall,I=O?R.flatMap(C=>C.map(D=>[D])):R,P=await Promise.allSettled(I.map(C=>O?FZ(e,{account:r,authorizationList:o,batchSize:h,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,call:C[0],multicallAddress:E,requireCanonical:u,stateOverride:f}).then(D=>[D]):oe(e,De,"readContract")({...E===null?{code:qa}:{address:E},abi:bo,account:r,args:[C],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:f}))),L=[];for(let C=0;C<P.length;C++){let D=P[C];if(D.status==="rejected"){if(!n)throw D.reason;for(let H=0;H<I[C].length;H++)L.push({status:"failure",error:D.reason,result:void 0});continue}let q=D.value;for(let H=0;H<q.length;H++){let{returnData:Z,success:re}=q[H],{callData:S}=I[C][H],{abi:l,address:m,functionName:y,args:b}=d[L.length];try{if(S==="0x")throw new Cn;if(!re)throw new Ho({data:Z});let x=Lr({abi:l,args:b,data:Z,functionName:y});L.push(n?{result:x,status:"success"}:x);}catch(x){let _=ho(x,{abi:l,address:m,args:b,docsPath:"/docs/contract/multicall",functionName:y});if(!n)throw _;L.push({error:_,result:void 0,status:"failure"});}}}if(L.length!==d.length)throw new z("multicall results mismatch");return L}async function FZ(e,t){let{batchSize:r,call:o,multicallAddress:n,...i}=t,{wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{schedule:a}=hf({id:Be(["multicall",e.uid,r,n,i]),wait:s,shouldSplitBatch(u){return r===0?false:u.reduce((d,{callData:g})=>d+(g.length-2)/2,0)>r},fn:u=>oe(e,De,"readContract")({...n===null?{code:qa}:{address:n},...i,abi:bo,args:[u],functionName:"aggregate3"})}),[c]=await a(o);return c}g2();fn();Et();Ai();Ri();$i();Un();an();Re();ip();Ju();xg();Fa();async function If(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?jg(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,N=$.account?qe($.account):void 0,O=$.abi?ft($):$.data,I={...$,account:N,data:$.dataSuffix?Mo([O||"0x",$.dataSuffix]):O,from:$.from??N?.address};return Vn(I),Zo(I)}),E=g.stateOverrides?Yu(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:v,stateOverrides:E});}let f=(typeof r=="bigint"?J(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},f]})).map((g,h)=>({...Ha(g),calls:g.calls.map((v,E)=>{let{abi:R,args:$,functionName:N,to:O}=n[h].calls[E],I=v.error?.data??v.returnData,P=BigInt(v.gasUsed),L=v.logs?.map(H=>fr(H)),C=v.status==="0x1"?"success":"failure",D=R&&C==="success"&&I!=="0x"?Lr({abi:R,data:I,functionName:N}):null,q=(()=>{if(C==="success")return;let H;if(I==="0x"?H=new Cn:I&&(H=new Ho({data:I})),!!H)return ho(H,{abi:R??[],address:O??"0x",args:$,functionName:N??"<unknown>"})})();return {data:I,gasUsed:P,logs:L,status:C,...C==="success"?{result:D}:{error:q}}})}))}catch(c){let u=c,f=Is(u,{});throw f instanceof Hn?u:f}}su();dn();lr();dn();function By(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function Py(e,t){let r=typeof e,o=t.type;switch(o){case "address":return _y(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>Py(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>Py(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function aE(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return aE(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?_y(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?_y(r[o],{strict:false}):false)return s}}function Af(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Ud(e):typeof e=="string"?Ud(e):e;return {...o,...r?{hash:Ls(o)}:{}}}function kf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=lp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?uE(u)===dt(t,0,4):u.type==="event"?Ls(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Bi({name:t});if(s.length===1)return {...s[0],...n?{hash:Ls(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:Ls(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?Py(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=aE(u.inputs,a.inputs,o);if(d)throw new cE({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...f]=s;return {...u,overloads:f}})();if(!c)throw new Bi({name:t});return {...c,...n?{hash:Ls(c)}:{}}}function uE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return dt(Ls(t),0,4)}function VZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return kf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ba(t);return By(r)}function Ls(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Qa(mf(VZ(t)))}var cE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${By(Ba(t.abiItem))}\`, and`,`\`${r.type}\` in \`${By(Ba(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},Bi=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};lr();function Q8(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [ZZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?zs(t.inputs,n):"0x")}function eO(e){return Af(e)}function ZZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Bi({name:"constructor"});return t}function tO(e,t={}){return Af(e,t)}function rO(e){return Ls(e)}lr();function nO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [lE(i,s),a,c]}return e})(),n=rc(t.outputs,r,o);if(!(n&&Object.keys(n).length===0))return n&&Object.keys(n).length===1?Array.isArray(n)?n[0]:Object.values(n)[0]:n}function Us(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,f,d]=e;return [lE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?lE([t,...o],t.name,{args:r}):t,i=WZ(n),s=r.length>0?zs(n.inputs,r):void 0;return s?ht(i,s):i}function nc(e,t={}){return Af(e,t)}function lE(e,t,r){let o=kf(e,t,r);if(o.type!=="function")throw new Bi({name:t,type:"function"});return o}function WZ(e){return uE(e)}fn();var Cy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",zy="0x0000000000000000000000000000000000000000";dp();Te();Ai();Ri();qd();ur();Ns();var JZ="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",fO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",YZ=0x00000000000000000000000000000000deadbeefn,XZ=rO(tO("event Transfer(address indexed from, address indexed to, uint256 value)")),oO=nc("function balanceOf(address) returns (uint256)"),iO=nc("function decimals() returns (uint256)"),sO=nc("function tokenURI(uint256) returns (string)"),aO=nc("function symbol() returns (string)"),QZ=nc("function query(address target, bytes data)");async function lO(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?qe(t.account):void 0;if(s&&!u)throw new z("`account` is required when `traceAssetChanges` is true");let f=u?Q8(eO("constructor(bytes, bytes)"),{bytecode:Vg,args:[JZ,Us(nc("function getBalance(address)"),[u.address])]}):void 0,d=o??e.experimental_blockTag??"latest",g=r;if(s&&typeof g!="bigint"&&d!=="earliest"&&d!=="pending")if(d==="latest")g=await Wn(e,{cacheTime:0});else {let p=await er(e,{blockTag:d});if(typeof p.number!="bigint")throw new z(`Block tag \`${d}\` did not resolve to a number.`);g=p.number;}let h=typeof g=="bigint"?{blockNumber:g}:{blockTag:d},v=s?await If(e,{...h,blocks:[{calls:n.map(p=>({...p,from:u.address})),stateOverrides:i}],traceTransfers:a,validation:c}):void 0,E=v?[...new Set([...eG(v[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==Cy&&p!==zy):[],R=tG([...u?[u.address]:[],...E,...i?.map(({address:p})=>p)??[]]),$=[{address:R,code:fO}],[N,O]=await Promise.all([s?Promise.all([uO(e,{account:u.address,...h,data:f,stateOverride:i}),...E.map(p=>uO(e,{account:u.address,address:p,...h,data:Us(oO,[u.address]),staticCallAddress:R,stateOverride:i}))]):[],If(e,{...h,blocks:[{calls:[...n,{to:zy}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:E.map(p=>({to:R,data:Rp(p,Us(oO,[u.address]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(iO))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(sO,[0n]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(aO))})),stateOverrides:$}]:[]],traceTransfers:a,validation:c})]),I=O[0],[P,L,C,D,q]=s?O.slice(1):[],{calls:H,...Z}=I,re=H.slice(0,-1),S=N.map(p=>cO(p)?ut(p.data):null),l=P?.calls??[],m=L?.calls??[],b=[...l,...m].map(p=>cO(p)?ut(p.data):null),x=(C?.calls??[]).map(p=>dE(p,iO)),_=(q?.calls??[]).map(p=>dE(p,aO)),k=(D?.calls??[]).map(p=>dE(p,sO)),w=[];for(let[p,A]of b.entries()){let G=S[p],K=N[p],Q=typeof G=="bigint"?G:p>0&&K?.status==="success"&&K.data==="0x"?0n:null;if(typeof A!="bigint"||typeof Q!="bigint")continue;let ae=x[p-1],he=_[p-1],ye=k[p-1],We=p===0?{address:Cy,decimals:18,symbol:"ETH"}:{address:E[p-1],decimals:ye||ae?Number(ae??1):void 0,symbol:he??void 0};w.push({token:We,value:{pre:Q,post:A,diff:A-Q}});}return {assetChanges:w,block:Z,results:re}}function Rp(e,t){return Us(QZ,[e,t])}function eG(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==XZ||o.address.toLowerCase()===Cy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function cO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function dE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return nO(t,e.data)}catch{return null}}async function uO(e,t){let{account:r,address:o,blockNumber:n,blockTag:i,data:s,staticCallAddress:a,stateOverride:c}=t;try{return {data:(await mn({...e,ccipRead:!1},{account:o?zy:r,data:o?Rp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:fO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof _s)||!(u.cause instanceof yo))throw u;return {data:"0x",status:"failure"}}}function tG(e){let t=new Set(e.map(o=>o.toLowerCase())),r=YZ;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Tp={};Er(Tp,{InvalidWrappedSignatureError:()=>Ly,assert:()=>mE,from:()=>oG,magicBytes:()=>pE,universalSignatureValidatorAbi:()=>nG,universalSignatureValidatorBytecode:()=>rG,unwrap:()=>dO,validate:()=>sG,wrap:()=>iG});dn();lr();var pE="0x6492649264926492649264926492649264926492649264926492649264926492",rG="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",nG=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function mE(e){if(dt(e,-32)!==pE)throw new Ly(e)}function oG(e){return typeof e=="string"?dO(e):e}function dO(e){mE(e);let[t,r,o]=rc(Sp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function iG(e){let{data:t,signature:r,to:o}=e;return ht(zs(Sp("address, bytes, bytes"),[o,t,r]),pE)}function sG(e){try{return mE(e),!0}catch{return false}}var Ly=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};pn();dp();Ai();_2();Un();Ei();Ts();an();uo();ur();Re();rd();ur();vr();function pO({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new bn.Signature(ut(e),ut(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:xr(s)}Ns();async function Ms(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return St(u)?u:typeof u=="object"&&"r"in u&&"s"in u?pO(u):Ue(u)})();try{if(a==="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}return kp.validate(c)?await aG(e,{...t,multicallAddress:s,signature:c}):await cG(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}if(u instanceof Ci)return false;throw u}}async function aG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,multicallAddress:a,requireCanonical:c}=t,{authorization:u,data:f,signature:d,to:g}=kp.unwrap(t.signature);if(await Xa(e,{address:r,blockHash:o,blockNumber:n,blockTag:i,requireCanonical:c})===st(["0xef0100",u.address]))return await uG(e,{...t,signature:d});let v={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:J(u.r,{size:32}),s:J(u.s,{size:32}),yParity:u.yParity};if(!await l8({address:r,authorization:v}))throw new Ci;let R=await oe(e,De,"readContract")({...a?{address:a}:{code:qa},authorizationList:[v],abi:bo,blockHash:o,blockNumber:n,blockTag:"pending",functionName:"aggregate3",requireCanonical:c,args:[[...f?[{allowFailure:true,target:g??r,callData:f}]:[],{allowFailure:true,target:r,callData:ft({abi:x2,functionName:"isValidSignature",args:[s,d]})}]]});if(R[R.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Ci}async function cG(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Tp.validate(s)?s:Tp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:ft({abi:v2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:mp({abi:v2,args:[r,i,u],bytecode:h$}),...c},{data:d}=await oe(e,mn,"call")(f).catch(g=>{throw g instanceof _s?new Ci:g});if(M6(d??"0x0"))return true;throw new Ci}async function uG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,requireCanonical:a,signature:c}=t;if((await oe(e,De,"readContract")({address:r,abi:x2,args:[s,c],blockHash:o,blockNumber:n,blockTag:i,functionName:"isValidSignature",requireCanonical:a}).catch(f=>{throw f instanceof xu?new Ci:f})).startsWith("0x1626ba7e"))return true;throw new Ci}var Ci=class extends Error{};async function mO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=dy(r);return oe(e,Ms,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function hO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=v8({message:s,primaryType:a,types:c,domain:u});return oe(e,Ms,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}Mn();S2();Pr();ur();Pr();function Uy(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=Be(["watchBlockNumber",e.uid,t,r,s]);return Ur(d,{onBlockNumber:o,onError:n},g=>Wo(async()=>{try{let h=await oe(e,Wn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let v=c+1n;v<h;v++)g.onBlockNumber(v,c),c=v;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=Be(["watchBlockNumber",e.uid,t,r]);return Ur(d,{onBlockNumber:o,onError:n},g=>{let h=true,v=()=>h=false;return (async()=>{try{let E=(()=>{if(e.transport.type==="fallback"){let $=e.transport.transports.find(N=>N.config.type==="webSocket"||N.config.type==="ipc");return $?$.value:e.transport}return e.transport})(),{unsubscribe:R}=await E.subscribe({params:["newHeads"],onData($){if(!h)return;let N=ut($.result?.number);g.onBlockNumber(N,c),c=N;},onError($){g.onError?.($);}});v=R,h||v();}catch(E){n?.(E);}})(),()=>v()})})()}async function gO(e,t){let{checkReplacement:r=e.chain?.supportsTransactionReplacementDetection??true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:P})=>~~(1<<P)*200,timeout:c=18e4}=t,u=Be(["waitForTransactionReceipt",e.uid,n]),f=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,v=false,E,R,{promise:$,resolve:N,reject:O}=qg(),I=c?setTimeout(()=>{R?.(),E?.(),O(new dg({hash:n}));},c):void 0;return E=Ur(u,{onReplaced:i,resolve:N,reject:O},async P=>{if(h=await oe(e,Sf,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(I),P.resolve(h),E?.();return}R=oe(e,Uy,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:f,async onBlockNumber(L){let C=q=>{clearTimeout(I),R?.(),q(),E?.();},D=L;if(!v)try{if(h){if(o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));return}if(r&&!d&&(v=!0,await bp(async()=>{d=await oe(e,Ef,"getTransaction")({hash:n}),d.blockNumber&&(D=d.blockNumber);},{delay:a,retryCount:s}),v=!1),h=await oe(e,Sf,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));}catch(q){if(q instanceof ws||q instanceof bu){if(!d){v=false;return}try{g=d,v=!0;let H=await bp(()=>oe(e,er,"getBlock")({blockNumber:D,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:S})=>S instanceof Rs});v=!1;let Z=H.transactions.find(({from:S,nonce:l})=>S===g.from&&l===g.nonce);if(!Z||(h=await oe(e,Sf,"getTransactionReceipt")({hash:Z.hash}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o)))return;let re="replaced";Z.to===g.to&&Z.value===g.value&&Z.input===g.input?re="repriced":Z.from===Z.to&&Z.value===0n&&(re="cancelled"),C(()=>{P.onReplaced?.({reason:re,replacedTransaction:g,transaction:Z,transactionReceipt:h}),P.resolve(h);});}catch(H){C(()=>P.reject(H));}}else C(()=>P.reject(q));}}});}),$}Pr();var fG=["size","totalDifficulty","transactions","uncles","withdrawals"];function yO(e,{onBlockHeader:t,onError:r}){let o,n=Be(["watchBlockHeaders",e.uid]);return Ur(n,{onBlockHeader:t,onError:r},i=>{let s=true,a=false,c=()=>s=false;return (async()=>{try{let u=(()=>{if(e.transport.type==="fallback"){let d=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return d?d.value:e.transport}return e.transport})(),{unsubscribe:f}=await u.subscribe({params:["newHeads"],onData(d){if(!s)return;let g=(e.chain?.formatters?.block?.format||Ha)(d.result,"watchBlockHeaders");for(let h of fG)delete g[h];i.onBlockHeader(g,o),o=g;},onError(d){a&&i.onError?.(d);}});a=!0,c=f,s||c();}catch(u){i.onError?.(u);}})(),()=>c()})}Pr();function bO(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=s??false,d;return u?(()=>{let v=Be(["watchBlocks",e.uid,t,r,o,f,c]);return Ur(v,{onBlock:n,onError:i},E=>Wo(async()=>{try{let R=await oe(e,er,"getBlock")({blockTag:t,includeTransactions:f});if(R.number!==null&&d?.number!=null){if(R.number===d.number)return;if(R.number-d.number>1&&r)for(let $=d?.number+1n;$<R.number;$++){let N=await oe(e,er,"getBlock")({blockNumber:$,includeTransactions:f});E.onBlock(N,d),d=N;}}(d?.number==null||t==="pending"&&R?.number==null||R.number!==null&&R.number>d.number)&&(E.onBlock(R,d),d=R);}catch(R){E.onError?.(R);}},{emitOnBegin:o,interval:c}))})():(()=>{let v=true,E=true,R=()=>v=false;return (async()=>{try{o&&oe(e,er,"getBlock")({blockTag:t,includeTransactions:f}).then(O=>{v&&E&&(n(O,void 0),E=!1);}).catch(i);let $=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:N}=await $.subscribe({params:["newHeads"],async onData(O){if(!v)return;let I=await oe(e,er,"getBlock")({blockNumber:O.result?.number,includeTransactions:f}).catch(()=>{});v&&(n(I,d),E=!1,d=I);},onError(O){i?.(O);}});R=N,v||R();}catch($){i?.($);}})(),()=>R()})()}Et();np();Pr();function xO(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:f=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let R=Be(["watchEvent",t,r,o,e.uid,n,f,s]);return Ur(R,{onLogs:c,onError:a},$=>{let N;s!==void 0&&(N=s-1n);let O,I=false,P=Wo(async()=>{if(!I){try{O=await oe(e,ay,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}I=true;return}try{let L;if(O)L=await oe(e,Ps,"getFilterChanges")({filter:O});else {let C=await oe(e,Wn,"getBlockNumber")({});N&&N!==C?L=await oe(e,cf,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:N+1n,toBlock:C}):L=[],N=C;}if(L.length===0)return;if(o)$.onLogs(L);else for(let C of L)$.onLogs([C]);}catch(L){O&&L instanceof jn&&(I=false),$.onError?.(L);}},{emitOnBegin:true,interval:f});return async()=>{O&&await oe(e,Bs,"uninstallFilter")({filter:O}),P();}})})():(()=>{let R=true,$=()=>R=false;return (async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let L=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),I=[];O&&(I=[O.flatMap(C=>jo({abi:[C],eventName:C.name,args:r}))],n&&(I=I[0]));let{unsubscribe:P}=await N.subscribe({params:["logs",{address:t,topics:I}],onData(L){if(!R)return;let C=L.result;try{let{eventName:D,args:q}=Za({abi:O??[],data:C.data,topics:C.topics,strict:h}),H=fr(C,{args:q,eventName:D});c([H]);}catch(D){let q,H;if(D instanceof vi||D instanceof ms){if(d)return;q=D.abiItem.name,H=D.abiItem.inputs?.some(re=>!("name"in re&&re.name));}let Z=fr(C,{args:H?[]:{},eventName:q});c([Z]);}},onError(L){a?.(L);}});$=P,R||$();}catch(N){a?.(N);}})(),()=>$()})()}Pr();function vO(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=Be(["watchPendingTransactions",e.uid,t,i]);return Ur(u,{onTransactions:o,onError:r},f=>{let d,g=Wo(async()=>{try{if(!d)try{d=await oe(e,cy,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await oe(e,Ps,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)f.onTransactions(h);else for(let v of h)f.onTransactions([v]);}catch(h){f.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await oe(e,Bs,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,f=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});f=d,u||f();}catch(d){r?.(d);}})(),()=>f()})()}var lG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function dG(e){return lG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function hE(e){return dG(e)?new Date(e):new Date(Number.NaN)}function wO(e){let{scheme:t,statement:r,...o}=e.match(pG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(mG)?.groups??{},f=e.split("Resources:")[1]?.split(`
71
+ - `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:hE(i)}:{},...s?{issuedAt:hE(s)}:{},...a?{notBefore:hE(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var pG=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,mG=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;En();Ts();function _O(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||Number.isNaN(s.getTime())||o.expirationTime&&(Number.isNaN(o.expirationTime.getTime())||s>=o.expirationTime)||o.notBefore&&(Number.isNaN(o.notBefore.getTime())||s<o.notBefore))return false;try{if(!o.address||!Me(o.address,{strict:!1})||t&&!zr(o.address,t))return !1}catch{return false}return true}async function EO(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=wO(n);if(!f.address||!_O({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=dy(n);return Ms(e,{address:f.address,hash:g,signature:a,...u})}pn();En();Ts();function Rf(e,t){return {amount:e,decimals:t,formatted:G8(e,t)}}function zi(e,t){let{decimals:r,token:o}=t,n=yE(e,o);if(n)return {address:n.address,decimals:r??n.decimals};if(Me(o,{strict:false}))return {address:o,decimals:r??gG(e,o)};throw new Error(`Token "${o}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function yE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=hG(r,t);if(n)return gE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=gE(i,o);if(s&&zr(s.address,t))return s}}function gE(e,t){let r=e.addresses[t];if(r)return {address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}function hG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function gG(e,t){let r=e.tokens,o=e.chain?.id;if(r&&o!==void 0)for(let n of r){let i=gE(n,o);if(i&&zr(i.address,t))return i.decimals}}async function Tf(e,t){let{address:r,decimals:o}=zi(e,t);return o!==void 0?{address:r,decimals:o}:{address:r,decimals:await De(e,{abi:Gn,address:r,functionName:"decimals"})}}function $f(e){return {...e,data:ft(e),to:e.address}}Mn();async function SO(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||Ya)(n);if(s.status==="reverted"&&r)throw new lg({receipt:s});return s}pn();async function Of(e,t){let{account:r,decimals:o,spender:n,token:i,...s}=t,[a,{decimals:c}]=await Promise.all([De(e,{...s,...Of.call(e,{account:r,spender:n,token:i})}),Tf(e,{decimals:o,token:i})]);return Rf(a,c)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,functionName:"allowance",args:[o.account,o.spender]})}e.call=t;})(Of||(Of={}));fn();pn();async function Nf(e,t){let{account:r=e.account,decimals:o,token:n,...i}=t;if(!r)throw new yp;let s=qe(r).address,[a,{decimals:c}]=await Promise.all([De(e,{...i,...Nf.call(e,{account:s,token:n})}),Tf(e,{decimals:o,token:n})]);return Rf(a,c)}(function(e){function t(r,o){let n=o.account??r.account;if(!n)throw new yp;let i=qe(n).address;return $f({address:zi(r,o).address,abi:Gn,functionName:"balanceOf",args:[i]})}e.call=t;})(Nf||(Nf={}));pn();async function bE(e,t){let{token:r,...o}=t,{address:n}=zi(e,{token:r}),i=yE(e,r),[s,a,c]=await Promise.all([i?.decimals??De(e,{...o,abi:Gn,address:n,functionName:"decimals"}),i?.name??De(e,{...o,abi:Gn,address:n,functionName:"name"}),i?.symbol??De(e,{...o,abi:Gn,address:n,functionName:"symbol"})]);return {decimals:s,name:a,symbol:c}}pn();async function Pf(e,t){let{decimals:r,token:o,...n}=t,[i,{decimals:s}]=await Promise.all([De(e,{...n,...Pf.call(e,{token:o})}),Tf(e,{decimals:r,token:o})]);return Rf(i,s)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,args:[],functionName:"totalSupply"})}e.call=t;})(Pf||(Pf={}));function IO(e){return {call:t=>mn(e,t),createAccessList:t=>W$(e,t),createBlockFilter:()=>K$(e),createContractEventFilter:t=>K0(e,t),createEventFilter:t=>ay(e,t),createPendingTransactionFilter:()=>cy(e),estimateContractGas:t=>M4(e,t),estimateGas:t=>sf(e,t),getBalance:t=>J$(e,t),getBlobBaseFee:()=>Y$(e),getBlock:t=>er(e,t),getBlockNumber:t=>Wn(e,t),getBlockReceipts:t=>X$(e,t),getBlockTransactionCount:t=>Q$(e,t),getBytecode:t=>Xa(e,t),getChainId:()=>of(e),getCode:t=>Xa(e,t),getContractEvents:t=>Og(e,t),getDelegation:t=>e8(e,t),getEip712Domain:t=>t8(e,t),getEnsAddress:t=>M$(e,t),getEnsAvatar:t=>Z$(e,t),getEnsName:t=>G$(e,t),getEnsResolver:t=>q$(e,t),getEnsText:t=>sy(e,t),getFeeHistory:t=>n8(e,t),estimateFeesPerGas:t=>P4(e,t),getFilterChanges:t=>Ps(e,t),getFilterLogs:t=>o8(e,t),getGasPrice:()=>ef(e),getLogs:t=>cf(e,t),getProof:t=>W8(e,t),estimateMaxPriorityFeePerGas:t=>N4(e,t),fillTransaction:t=>Tg(e,t),getRawTransaction:t=>K8(e,t),getStorageAt:t=>J8(e,t),getTransaction:t=>Ef(e,t),getTransactionConfirmations:t=>Y8(e,t),getTransactionCount:t=>_g(e,t),getTransactionReceipt:t=>Sf(e,t),multicall:t=>X8(e,t),prepareTransactionRequest:t=>$g(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>P$(e,t),sendRawTransactionSync:t=>SO(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>lO(e,t),simulateContract:t=>T$(e,t),verifyHash:t=>Ms(e,t),verifyMessage:t=>mO(e,t),verifySiweMessage:t=>EO(e,t),verifyTypedData:t=>hO(e,t),uninstallFilter:t=>Bs(e,t),waitForTransactionReceipt:t=>gO(e,t),watchBlockHeaders:t=>yO(e,t),watchBlocks:t=>bO(e,t),watchBlockNumber:t=>Uy(e,t),watchContractEvent:t=>N$(e,t),watchEvent:t=>xO(e,t),watchPendingTransactions:t=>vO(e,t),token:yG(e)}}function yG(e){return {getAllowance:xp(e,Of),getBalance:xp(e,Nf),getMetadata:xp(e,bE),getTotalSupply:xp(e,Pf)}}function xE(e){let{key:t="public",name:r="Public Client"}=e;return z$({...e,key:t,name:r,type:"publicClient"}).extend(IO)}function AO({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=ty();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:p8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Ma();Te();var My=class extends z{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};Wg();var bG=0,kO=new WeakMap;function xG(e){if(!e)return "default";let t=kO.get(e);if(t!==void 0)return t;let r=bG++;return kO.set(e,r),r}function vE(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",maxResponseBodySize:s,methods:a,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:f,retryDelay:d,raw:g}=t;return ({chain:h,retryCount:v,timeout:E})=>{let{batchSize:R=1e3,wait:$=0}=typeof r=="object"?r:{},N=t.retryCount??v,O=E??t.timeout??1e4,I=e||h?.rpcUrls.default.http[0];if(!I)throw new My;let P=h8(I,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return AO({key:i,methods:a,name:c,async request({method:L,params:C},D){let q={method:L,params:C},H=D?.signal?{signal:D.signal}:void 0,{schedule:Z}=hf({id:`${I}.${xG(D?.signal)}`,wait:$,shouldSplitBatch(m){return m.length>R},fn:m=>P.request({body:m,fetchOptions:H}),sort:(m,y)=>m.id-y.id}),re=async m=>r?Z(m):[await P.request({body:m,fetchOptions:H})],[{error:S,result:l}]=await re(q);if(g)return {error:S,result:l};if(S)throw new Es({body:q,error:S,url:I});return l},retryCount:N,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:I})}}Ei();function RO(e){window.open(e,"_blank","noopener,noreferrer");}function vG(e){switch(e.type){case "link":case "miniapp":case "tweet":return e.data.url;case "cast":return `https://farcaster.xyz/~/conversations/${e.data.hash}`;case "farcasterProfile":return `https://farcaster.xyz/~/profiles/${e.data.fid}`;case "token":{let t=cw(e.data.chainId)?.dexscreenerSlug;return t?`https://dexscreener.com/${t}/${e.data.address}`:null}default:return null}}var TO={performAdAction(e){let t=vG(e);t?RO(t):console.warn(`[@adland/react] WebActionAdapter has no web action for ad type "${e.type}"`);},performEmptyAdAction(e,t,r){RO(`${r}/slots/${e}?chain=${t}`);}},Dy=null,wG=Co.isInMiniApp().then(e=>(Dy=e,e)).catch(()=>(Dy=false,false));async function $O(){return Dy!==null?Dy:wG}async function _G(e,t){let r=eI(e,Ln(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function EG(e){if(!await $O())return TO.performAdAction(e);try{switch(e.type){case "link":await Co.actions.openUrl(e.data.url);break;case "cast":await Co.actions.viewCast({hash:e.data.hash});break;case "tweet":await Co.actions.openUrl(e.data.url);break;case "miniapp":await Co.actions.openMiniApp({url:e.data.url});break;case "token":await _G(e.data.chainId,e.data.address);break;case "farcasterProfile":await Co.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){console.warn("[@adland/react] Mini App host refused the action, opening on the web:",t),TO.performAdAction(e);}}async function SG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await $O()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var OO={performAdAction:EG,performEmptyAdAction:SG};var NO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var PO={block:O4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=Ti(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ut(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:$4({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ut(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:B$({format(e){return {...e.depositNonce?{depositNonce:ut(e.depositNonce)}:{},...e.depositReceiptVersion?{depositReceiptVersion:vt(e.depositReceiptVersion)}:{},l1GasPrice:e.l1GasPrice?ut(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ut(e.l1GasUsed):null,l1Fee:e.l1Fee?ut(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Lo();En();an();Re();function IG(e,t){return kG(e)?AG(e):u8(e,t)}var BO={transaction:IG};function AG(e){RG(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?mt(s):"0x",c?mt(c):"0x",n?mt(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",go(u)])}function kG(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function RG(e){let{from:t,to:r}=e;if(t&&!Me(t))throw new nt({address:t});if(r&&!Me(r))throw new nt({address:r})}var Bf={blockTime:2e3,contracts:NO,formatters:PO,serializers:BO};var $p=1,Op=vf({...Bf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[$p]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[$p]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[$p]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[$p]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:$p});vf({...Op,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Np=11155111,Pp=vf({...Bf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[Np]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Np]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Np]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Np]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Np});vf({...Pp,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var OG=ps(["function module() view returns (address)"]),NG=ps(["function tokenURI(address slot) view returns (string)"]),PG="0x0000000000000000000000000000000000000000",BG="https://ipfs-gateway.econome.studio";function CG(e,t){return `${(t??BG).replace(/\/$/,"")}/ipfs/${e}`}var zG={[Op.id]:Op,[Pp.id]:Pp};function zO(e,t,r=zG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return xE({chain:o,transport:vE(t),batch:{multicall:true}})}function LG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var LO=async(e,t)=>{if(!e)throw new Error("NO_AD");let r=LG(e),o=r?CG(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},UO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:OG,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===PG?"":e.readContract({address:r,abi:NG,functionName:"tokenURI",args:[t]})};var DG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var jG=["image","imageUrl","icon","pfpUrl","logoURI"];var FG=["title","displayName","username","name","symbol"],HG=["description","bio","text","name"];function wE(e){return {...e.data,...e.metadata??{}}}function MO(e){if(!e)return null;let t=wE(e);for(let r of DG[e.type]??jG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function _E(e){if(!e)return null;let t=wE(e);for(let r of FG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function DO(e){if(!e)return null;let t=wE(e),r=_E(e);for(let o of HG){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function jO(e){return e?e.type:null}var oc=new Set,CO=1e3;function VG(e){return e==="view"?"view":"click"}function EE(e){return e.endpoint??sw}function FO(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function HO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${EE(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:VG(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function VO(e,t){typeof window>"u"||(FO(e,t),(t.consent??"granted")==="granted"&&await HO(e,t));}async function ZG(e,t,r){let o=e.auth??"none",n=null;o==="farcaster"&&e.getAuthToken&&(n=await e.getAuthToken());try{return (await fetch(`${EE(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId,auth:o,...n?{token:n,domain:window.location.hostname}:{}}),keepalive:!0})).ok}catch{return false}}async function GG(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await ZG(e,t,r):false,o||await HO("view",e)),FO("view",e,o),o}function ZO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!oc.has(r)&&(oc.add(r),VO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function GO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=fetch(`${EE(t)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:t.slot})}).then(s=>s.ok?s.json():null).then(s=>s?.nonce??null).catch(()=>null),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(oc.has(r)||n)continue;n=setTimeout(async()=>{if(oc.has(r))return;oc.add(r),i.disconnect();let c=await o;await GG(t,c,CO);},CO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function SE(e,t){return VO(e,t)}var qG={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function IE(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}function AE(e){return e.replace(/"/g,"&quot;").replace(/</g,"&lt;")}var kE=`
72
72
  :host { display: block; }
73
73
  * { box-sizing: border-box; }
74
74
  .adland-card {
@@ -136,7 +136,7 @@ Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.
136
136
  color: var(--adland-label, #9ca3af);
137
137
  }
138
138
  .adland-empty { justify-content: center; color: var(--adland-muted, #6b7280); }
139
- `;function HO(e){let t=CO(e),r=vE(e),o=zO(e),n=LO(e),i=n?FG[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${SE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${EE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${EE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${EE(i)}</span>`:""}<span part="label" class="adland-label">Ad</span></div>`}function VO(){return '<div part="card" class="adland-card adland-empty"><span part="description" class="adland-description">Your ad here</span><span part="label" class="adland-label">Ad</span></div>'}function ZO(e){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var HG=["--adland-bg","--adland-fg","--adland-muted","--adland-label","--adland-border","--adland-border-hover","--adland-border-width","--adland-radius","--adland-padding","--adland-gap","--adland-font","--adland-shadow-hover","--adland-media-size","--adland-media-radius","--adland-media-bg","--adland-title-size","--adland-title-weight","--adland-description-size","--adland-badge-radius","--adland-accent-bg","--adland-accent-fg"];function GO(e){let t=getComputedStyle(e),r="";for(let o of HG){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var qO=8453,VG="https://0xslots.org/app",ZG="68px";function WO(e){return class extends HTMLElement{static observedAttributes=["slot","chain","placement","render-mode","gateway","endpoint","rpc-url","consent","verified","base-link-url","data-ad"];shadowInited=false;cleanupImpression;messageHandler;renderToken=0;connectedCallback(){this.render();}disconnectedCallback(){this.teardown();}attributeChangedCallback(){this.isConnected&&this.render();}attr(r){return this.getAttribute(r)??void 0}chainId(){return Number(this.attr("chain")??qO)||qO}teardown(){this.cleanupImpression?.(),this.cleanupImpression=void 0,this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0);}async loadAd(){let r=this.attr("data-ad");if(r)try{return {data:JSON.parse(r),cid:null}}catch{return {data:null,cid:null}}let o=this.attr("slot");if(!o)return {data:null,cid:null};let n=NO(this.chainId(),this.attr("rpc-url")),i=await BO(n,o);return i?PO(i,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=ZG);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?HO(o.data):VO();(this.attr("render-mode")==="inline"?"inline":"isolated")==="inline"?this.renderInline(n,o.data):this.renderIsolated(n,o.data);let s=this.attr("slot");if(s){let a=this.attr("verified")!=null?FO:jO;this.cleanupImpression=a(this,{slot:s,chainId:this.chainId(),placement:this.attr("placement"),cid:o.cid,empty:!o.data,endpoint:this.attr("endpoint"),consent:this.attr("consent")});}}renderInline(r,o){let n=this.shadowRoot??(this.shadowInited?null:this.attachShadow({mode:"open"}));if(!n)return;this.shadowInited=true,n.innerHTML=`<style>${IE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?ZO(o):this.emptyUrl(),i=n?`<a href="${SE(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=GO(this),a=document.createElement("iframe");a.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox allow-scripts"),a.setAttribute("title","Advertisement"),a.setAttribute("scrolling","no"),a.style.cssText="width:100%;border:0;display:block;height:100%",a.srcdoc=`<!doctype html><html><head><meta charset="utf-8"><style>:root{${s}}html,body{margin:0;padding:0}${IE}</style></head><body>${i}<script>(function(){function send(t,x){parent.postMessage(Object.assign({__adland:t},x||{}),'*')}addEventListener('click',function(){send('click')});function size(){send('size',{height:document.documentElement.scrollHeight})}new ResizeObserver(size).observe(document.documentElement);size()})()<\/script></body></html>`;let c=u=>{if(u.source!==a.contentWindow)return;let f=u.data;f?.__adland==="size"&&typeof f.height=="number"?(a.style.height=`${f.height}px`,this.style.minHeight=""):f?.__adland==="click"&&this.handleClick(o,true);};this.messageHandler=c,window.addEventListener("message",c),this.appendChild(a);}baseLink(){return this.attr("base-link-url")??VG}emptyUrl(){let r=this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&_E("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(_E("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function KO(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,WO(e));}KO(kO);
139
+ `;function qO(e){let t=MO(e),r=_E(e),o=DO(e),n=jO(e),i=n?qG[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${AE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${IE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${IE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${IE(i)}</span>`:""}<span part="label" class="adland-label">Ad</span></div>`}function WO(){return '<div part="card" class="adland-card adland-empty"><span part="description" class="adland-description">Your ad here</span><span part="label" class="adland-label">Ad</span></div>'}function KO(e){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var WG=["--adland-bg","--adland-fg","--adland-muted","--adland-label","--adland-border","--adland-border-hover","--adland-border-width","--adland-radius","--adland-padding","--adland-gap","--adland-font","--adland-shadow-hover","--adland-media-size","--adland-media-radius","--adland-media-bg","--adland-title-size","--adland-title-weight","--adland-description-size","--adland-badge-radius","--adland-accent-bg","--adland-accent-fg"];function JO(e){let t=getComputedStyle(e),r="";for(let o of WG){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var YO=8453,KG="https://0xslots.org/app",JG="68px";function XO(e){return class extends HTMLElement{static observedAttributes=["slot","chain","placement","render-mode","gateway","endpoint","rpc-url","consent","verified","base-link-url","data-ad"];shadowInited=false;cleanupImpression;messageHandler;renderToken=0;connectedCallback(){this.render();}disconnectedCallback(){this.teardown();}attributeChangedCallback(){this.isConnected&&this.render();}attr(r){return this.getAttribute(r)??void 0}chainId(){return Number(this.attr("chain")??YO)||YO}teardown(){this.cleanupImpression?.(),this.cleanupImpression=void 0,this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0);}async loadAd(){let r=this.attr("data-ad");if(r)try{return {data:JSON.parse(r),cid:null}}catch{return {data:null,cid:null}}let o=this.attr("slot");if(!o)return {data:null,cid:null};let n=zO(this.chainId(),this.attr("rpc-url")),i=await UO(n,o);return i?LO(i,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=JG);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?qO(o.data):WO();(this.attr("render-mode")==="inline"?"inline":"isolated")==="inline"?this.renderInline(n,o.data):this.renderIsolated(n,o.data);let s=this.attr("slot");if(s){let a=this.attr("verified")!=null?GO:ZO;this.cleanupImpression=a(this,{slot:s,chainId:this.chainId(),placement:this.attr("placement"),cid:o.cid,empty:!o.data,endpoint:this.attr("endpoint"),consent:this.attr("consent")});}}renderInline(r,o){let n=this.shadowRoot??(this.shadowInited?null:this.attachShadow({mode:"open"}));if(!n)return;this.shadowInited=true,n.innerHTML=`<style>${kE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?KO(o):this.emptyUrl(),i=n?`<a href="${AE(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=JO(this),a=document.createElement("iframe");a.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox allow-scripts"),a.setAttribute("title","Advertisement"),a.setAttribute("scrolling","no"),a.style.cssText="width:100%;border:0;display:block;height:100%",a.srcdoc=`<!doctype html><html><head><meta charset="utf-8"><style>:root{${s}}html,body{margin:0;padding:0}${kE}</style></head><body>${i}<script>(function(){function send(t,x){parent.postMessage(Object.assign({__adland:t},x||{}),'*')}addEventListener('click',function(){send('click')});function size(){send('size',{height:document.documentElement.scrollHeight})}new ResizeObserver(size).observe(document.documentElement);size()})()<\/script></body></html>`;let c=u=>{if(u.source!==a.contentWindow)return;let f=u.data;f?.__adland==="size"&&typeof f.height=="number"?(a.style.height=`${f.height}px`,this.style.minHeight=""):f?.__adland==="click"&&this.handleClick(o,true);};this.messageHandler=c,window.addEventListener("message",c),this.appendChild(a);}baseLink(){return this.attr("base-link-url")??KG}emptyUrl(){let r=this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&SE("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(SE("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function QO(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,XO(e));}QO(OO);
140
140
  /*! Bundled license information:
141
141
 
142
142
  ieee754/index.js: