@learncard/idx-plugin 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/idx-plugin.cjs.development.js +6 -6
- package/dist/idx-plugin.cjs.development.js.map +2 -2
- package/dist/idx-plugin.cjs.production.min.js +26 -26
- package/dist/idx-plugin.cjs.production.min.js.map +2 -2
- package/dist/idx-plugin.esm.js +6 -6
- package/dist/idx-plugin.esm.js.map +2 -2
- package/package.json +4 -4
|
@@ -21,9 +21,9 @@ if (cid) {
|
|
|
21
21
|
`;var Fv={};wn(Fv,{base36:()=>Yi,base36upper:()=>sR});var Yi=Ua({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),sR=Ua({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var e8={tile:0,"caip10-link":1,model:2,MID:3,UNLOADABLE:4};function aR(e){let t=e8[e];if(typeof t<"u")return t;throw new Error(`No stream type registered for name ${e}`)}i(aR,"codeByName");function oR(e){let t=Object.entries(e8).find(([,r])=>r===e);if(t)return t[0];throw new Error(`No stream type registered for index ${e}`)}i(oR,"nameByCode");var Xi=class{};i(Xi,"StreamType");Xi.nameByCode=oR;Xi.codeByName=aR;var _g=Uo(Zh(),1);function ru(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}i(ru,"asUint8Array");function lf(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?ru(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}i(lf,"allocUnsafe");function ff(e,t){t||(t=e.reduce((s,o)=>s+o.length,0));let r=lf(t),n=0;for(let s of e)r.set(s,n),n+=s.length;return ru(r)}i(ff,"concat");var jv={};wn(jv,{identity:()=>_R});var _R=eu({prefix:"\0",name:"identity",encode:e=>W_(e),decode:e=>G_(e)});var zv={};wn(zv,{base2:()=>ER});var ER=Nr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Hv={};wn(Hv,{base8:()=>AR});var AR=Nr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var qv={};wn(qv,{base10:()=>SR});var SR=Ua({prefix:"9",name:"base10",alphabet:"0123456789"});var Kv={};wn(Kv,{base16:()=>xR,base16upper:()=>TR});var xR=Nr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),TR=Nr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Vv={};wn(Vv,{base64:()=>MR,base64pad:()=>CR,base64url:()=>IR,base64urlpad:()=>kR});var MR=Nr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),CR=Nr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),IR=Nr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),kR=Nr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Gv={};wn(Gv,{base256emoji:()=>PR});var l8=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),DR=l8.reduce((e,t,r)=>(e[r]=t,e),[]),OR=l8.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function RR(e){return e.reduce((t,r)=>(t+=DR[r],t),"")}i(RR,"encode");function NR(e){let t=[];for(let r of e){let n=OR[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}i(NR,"decode");var PR=eu({prefix:"\u{1F680}",name:"base256emoji",encode:RR,decode:NR});var Jv={};wn(Jv,{sha256:()=>Zv,sha512:()=>BR});var Wv=i(({name:e,code:t,encode:r})=>new Jh(e,t,r),"from"),Jh=class{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?jo(this.code,r):r.then(n=>jo(this.code,n))}else throw Error("Unknown type, must be binary type")}};i(Jh,"Hasher");var d8=i(e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),"sha"),Zv=Wv({name:"sha2-256",code:18,encode:d8("SHA-256")}),BR=Wv({name:"sha2-512",code:19,encode:d8("SHA-512")});var Yv={};wn(Yv,{identity:()=>UR});var h8=0,LR="identity",p8=sa,FR=i(e=>jo(h8,p8(e)),"digest"),UR={code:h8,name:LR,encode:p8,digest:FR};var OK=new TextEncoder,RK=new TextDecoder;var Xv={...jv,...zv,...Hv,...qv,...Kv,...Lv,...Fv,...Bv,...Vv,...Gv},LK={...Jv,...Yv};function v8(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}i(v8,"createCodec");var m8=v8("utf8","u",e=>{let t=new TextDecoder("utf8");return"u"+t.decode(e)},e=>new TextEncoder().encode(e.substring(1))),Qv=v8("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=lf(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),zR={utf8:m8,"utf-8":m8,hex:Xv.base16,latin1:Qv,ascii:Qv,binary:Qv,...Xv},eg=zR;function tg(e,t="utf8"){let r=eg[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}i(tg,"toString");function si(e){let t,r,n;return typeof e=="object"?(t=e.hashFunction,r=e.expiring,n=e.tags):t=e,(s,o,c)=>{if(c.value!=null)c.value=g8(c.value,t,r,n);else if(c.get!=null)c.get=g8(c.get,t,r,n);else throw"Only put a Memoize() decorator on a method or get accessor."}}i(si,"Memoize");var rg=new Map;function g8(e,t,r=0,n){let s=Symbol("__memoized_map__");return function(...o){let c;this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:new Map});let f=this[s];if(Array.isArray(n))for(let h of n)rg.has(h)?rg.get(h).push(f):rg.set(h,[f]);if(t||o.length>0||r>0){let h;t===!0?h=o.map(b=>b.toString()).join("!"):t?h=t.apply(this,o):h=o[0];let p=`${h}__timestamp`,v=!1;if(r>0)if(!f.has(p))v=!0;else{let b=f.get(p);v=Date.now()-b>r}f.has(h)&&!v?c=f.get(h):(c=e.apply(this,o),f.set(h,c),r>0&&f.set(p,Date.now()))}else{let h=this;f.has(h)?c=f.get(h):(c=e.apply(this,o),f.set(h,c))}return c}}i(g8,"getNewFunction");var Yh=i(({enumerable:e=!0,configurable:t=!1}={})=>({enumerable:e,configurable:t,writable:!1}),"readonly"),ng=i(function*(e,t){if(e!=null&&!(e instanceof Uint8Array))for(let[r,n]of Object.entries(e)){let s=[...t,r];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let[o,c]of n.entries()){let f=[...s,o],h=Ut.asCID(c);h?yield[f.join("/"),h]:typeof c=="object"&&(yield*ng(c,f))}else{let o=Ut.asCID(n);o?yield[s.join("/"),o]:yield*ng(n,s)}}},"links"),ig=i(function*(e,t){if(e!=null)for(let[r,n]of Object.entries(e)){let s=[...t,r];if(yield s.join("/"),n!=null&&!(n instanceof Uint8Array)&&typeof n=="object"&&!Ut.asCID(n))if(Array.isArray(n))for(let[o,c]of n.entries()){let f=[...s,o];yield f.join("/"),typeof c=="object"&&!Ut.asCID(c)&&(yield*ig(c,f))}else yield*ig(n,s)}},"tree"),qR=i((e,t)=>{let r=e;for(let[n,s]of t.entries()){if(r=r[s],r==null)throw new Error(`Object has no property at ${t.slice(0,n+1).map(c=>`[${JSON.stringify(c)}]`).join("")}`);let o=Ut.asCID(r);if(o)return{value:o,remaining:t.slice(n+1).join("/")}}return{value:r}},"get"),Xh=class{constructor({cid:t,bytes:r,value:n}){if(!t||!r||typeof n>"u")throw new Error("Missing required argument");this.cid=t,this.bytes=r,this.value=n,this.asBlock=this,Object.defineProperties(this,{cid:Yh(),bytes:Yh(),value:Yh(),asBlock:Yh()})}links(){return ng(this.value,[])}tree(){return ig(this.value,[])}get(t="/"){return qR(this.value,t.split("/").filter(Boolean))}};i(Xh,"Block");var y8=i(async({value:e,codec:t,hasher:r})=>{if(typeof e>"u")throw new Error('Missing required argument "value"');if(!t||!r)throw new Error("Missing required argument: codec or hasher");let n=t.encode(e),s=await r.digest(n),o=Ut.create(1,t.code,s);return new Xh({value:e,bytes:n,cid:o})},"encode");var bg=Uo(Zh(),1);var lp={};wn(lp,{code:()=>CN,decode:()=>IN,encode:()=>pg,name:()=>MN});var VR=["string","number","bigint","symbol"],GR=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","HTMLElement","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function b8(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e===!0||e===!1)return"boolean";let t=typeof e;if(VR.includes(t))return t;if(t==="function")return"Function";if(Array.isArray(e))return"Array";if(WR(e))return"Buffer";let r=ZR(e);return r||"Object"}i(b8,"is");function WR(e){return e&&e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer.call(null,e)}i(WR,"isBuffer");function ZR(e){let t=Object.prototype.toString.call(e).slice(8,-1);if(GR.includes(t))return t}i(ZR,"getObjectType");var Oe=class{constructor(t,r,n){this.major=t,this.majorEncoded=t<<5,this.name=r,this.terminal=n}toString(){return`Type[${this.major}].${this.name}`}compare(t){return this.major<t.major?-1:this.major>t.major?1:0}};i(Oe,"Type");Oe.uint=new Oe(0,"uint",!0);Oe.negint=new Oe(1,"negint",!0);Oe.bytes=new Oe(2,"bytes",!0);Oe.string=new Oe(3,"string",!0);Oe.array=new Oe(4,"array",!1);Oe.map=new Oe(5,"map",!1);Oe.tag=new Oe(6,"tag",!1);Oe.float=new Oe(7,"float",!0);Oe.false=new Oe(7,"false",!0);Oe.true=new Oe(7,"true",!0);Oe.null=new Oe(7,"null",!0);Oe.undefined=new Oe(7,"undefined",!0);Oe.break=new Oe(7,"break",!0);var Xe=class{constructor(t,r,n){this.type=t,this.value=r,this.encodedLength=n,this.encodedBytes=void 0,this.byteValue=void 0}toString(){return`Token[${this.type}].${this.value}`}};i(Xe,"Token");var nu=globalThis.process&&!globalThis.process.browser&&globalThis.Buffer&&typeof globalThis.Buffer.isBuffer=="function",JR=new TextDecoder,YR=new TextEncoder;function Qh(e){return nu&&globalThis.Buffer.isBuffer(e)}i(Qh,"isBuffer");function sg(e){return e instanceof Uint8Array?Qh(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e:Uint8Array.from(e)}i(sg,"asU8A");var A8=nu?(e,t,r)=>r-t>64?globalThis.Buffer.from(e.subarray(t,r)).toString("utf8"):_8(e,t,r):(e,t,r)=>r-t>64?JR.decode(e.subarray(t,r)):_8(e,t,r),S8=nu?e=>e.length>64?globalThis.Buffer.from(e):w8(e):e=>e.length>64?YR.encode(e):w8(e),Cs=i(e=>Uint8Array.from(e),"fromArray"),iu=nu?(e,t,r)=>Qh(e)?new Uint8Array(e.subarray(t,r)):e.slice(t,r):(e,t,r)=>e.slice(t,r),x8=nu?(e,t)=>(e=e.map(r=>r instanceof Uint8Array?r:globalThis.Buffer.from(r)),sg(globalThis.Buffer.concat(e,t))):(e,t)=>{let r=new Uint8Array(t),n=0;for(let s of e)n+s.length>r.length&&(s=s.subarray(0,r.length-n)),r.set(s,n),n+=s.length;return r},T8=nu?e=>globalThis.Buffer.allocUnsafe(e):e=>new Uint8Array(e);function M8(e,t){if(Qh(e)&&Qh(t))return e.compare(t);for(let r=0;r<e.length;r++)if(e[r]!==t[r])return e[r]<t[r]?-1:1;return 0}i(M8,"compare");function w8(e,t=1/0){let r,n=e.length,s=null,o=[];for(let c=0;c<n;++c){if(r=e.charCodeAt(c),r>55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(c+1===n){(t-=3)>-1&&o.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),s=r;continue}r=(s-55296<<10|r-56320)+65536}else s&&(t-=3)>-1&&o.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}i(w8,"utf8ToBytes");function _8(e,t,r){let n=[];for(;t<r;){let s=e[t],o=null,c=s>239?4:s>223?3:s>191?2:1;if(t+c<=r){let f,h,p,v;switch(c){case 1:s<128&&(o=s);break;case 2:f=e[t+1],(f&192)===128&&(v=(s&31)<<6|f&63,v>127&&(o=v));break;case 3:f=e[t+1],h=e[t+2],(f&192)===128&&(h&192)===128&&(v=(s&15)<<12|(f&63)<<6|h&63,v>2047&&(v<55296||v>57343)&&(o=v));break;case 4:f=e[t+1],h=e[t+2],p=e[t+3],(f&192)===128&&(h&192)===128&&(p&192)===128&&(v=(s&15)<<18|(f&63)<<12|(h&63)<<6|p&63,v>65535&&v<1114112&&(o=v))}}o===null?(o=65533,c=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),t+=c}return XR(n)}i(_8,"utf8Slice");var E8=4096;function XR(e){let t=e.length;if(t<=E8)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E8));return r}i(XR,"decodeCodePointsArray");var QR=256,su=class{constructor(t=QR){this.chunkSize=t,this.cursor=0,this.maxCursor=-1,this.chunks=[],this._initReuseChunk=null}reset(){this.cursor=0,this.maxCursor=-1,this.chunks.length&&(this.chunks=[]),this._initReuseChunk!==null&&(this.chunks.push(this._initReuseChunk),this.maxCursor=this._initReuseChunk.length-1)}push(t){let r=this.chunks[this.chunks.length-1];if(this.cursor+t.length<=this.maxCursor+1){let s=r.length-(this.maxCursor-this.cursor)-1;r.set(t,s)}else{if(r){let s=r.length-(this.maxCursor-this.cursor)-1;s<r.length&&(this.chunks[this.chunks.length-1]=r.subarray(0,s),this.maxCursor=this.cursor-1)}t.length<64&&t.length<this.chunkSize?(r=T8(this.chunkSize),this.chunks.push(r),this.maxCursor+=r.length,this._initReuseChunk===null&&(this._initReuseChunk=r),r.set(t,0)):(this.chunks.push(t),this.maxCursor+=t.length)}this.cursor+=t.length}toBytes(t=!1){let r;if(this.chunks.length===1){let n=this.chunks[0];t&&this.cursor>n.length/2?(r=this.cursor===n.length?n:n.subarray(0,this.cursor),this._initReuseChunk=null,this.chunks=[]):r=iu(n,0,this.cursor)}else r=x8(this.chunks,this.cursor);return t&&this.reset(),r}};i(su,"Bl");var Ct="CBOR decode error:",ag="CBOR encode error:",df=[];df[23]=1;df[24]=2;df[25]=3;df[26]=5;df[27]=9;function aa(e,t,r){if(e.length-t<r)throw new Error(`${Ct} not enough data for type`)}i(aa,"assertEnoughData");var Yr=[24,256,65536,4294967296,BigInt("18446744073709551616")];function ai(e,t,r){aa(e,t,1);let n=e[t];if(r.strict===!0&&n<Yr[0])throw new Error(`${Ct} integer encoded in more bytes than necessary (strict decode)`);return n}i(ai,"readUint8");function oi(e,t,r){aa(e,t,2);let n=e[t]<<8|e[t+1];if(r.strict===!0&&n<Yr[1])throw new Error(`${Ct} integer encoded in more bytes than necessary (strict decode)`);return n}i(oi,"readUint16");function ci(e,t,r){aa(e,t,4);let n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3];if(r.strict===!0&&n<Yr[2])throw new Error(`${Ct} integer encoded in more bytes than necessary (strict decode)`);return n}i(ci,"readUint32");function ui(e,t,r){aa(e,t,8);let n=e[t]*16777216+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3],s=e[t+4]*16777216+(e[t+5]<<16)+(e[t+6]<<8)+e[t+7],o=(BigInt(n)<<BigInt(32))+BigInt(s);if(r.strict===!0&&o<Yr[3])throw new Error(`${Ct} integer encoded in more bytes than necessary (strict decode)`);if(o<=Number.MAX_SAFE_INTEGER)return Number(o);if(r.allowBigInt===!0)return o;throw new Error(`${Ct} integers outside of the safe integer range are not supported`)}i(ui,"readUint64");function C8(e,t,r,n){return new Xe(Oe.uint,ai(e,t+1,n),2)}i(C8,"decodeUint8");function I8(e,t,r,n){return new Xe(Oe.uint,oi(e,t+1,n),3)}i(I8,"decodeUint16");function k8(e,t,r,n){return new Xe(Oe.uint,ci(e,t+1,n),5)}i(k8,"decodeUint32");function D8(e,t,r,n){return new Xe(Oe.uint,ui(e,t+1,n),9)}i(D8,"decodeUint64");function Ri(e,t){return an(e,0,t.value)}i(Ri,"encodeUint");function an(e,t,r){if(r<Yr[0]){let n=Number(r);e.push([t|n])}else if(r<Yr[1]){let n=Number(r);e.push([t|24,n])}else if(r<Yr[2]){let n=Number(r);e.push([t|25,n>>>8,n&255])}else if(r<Yr[3]){let n=Number(r);e.push([t|26,n>>>24&255,n>>>16&255,n>>>8&255,n&255])}else{let n=BigInt(r);if(n<Yr[4]){let s=[t|27,0,0,0,0,0,0,0],o=Number(n&BigInt(4294967295)),c=Number(n>>BigInt(32)&BigInt(4294967295));s[8]=o&255,o=o>>8,s[7]=o&255,o=o>>8,s[6]=o&255,o=o>>8,s[5]=o&255,s[4]=c&255,c=c>>8,s[3]=c&255,c=c>>8,s[2]=c&255,c=c>>8,s[1]=c&255,e.push(s)}else throw new Error(`${Ct} encountered BigInt larger than allowable range`)}}i(an,"encodeUintValue");Ri.encodedSize=i(function(t){return an.encodedSize(t.value)},"encodedSize");an.encodedSize=i(function(t){return t<Yr[0]?1:t<Yr[1]?2:t<Yr[2]?3:t<Yr[3]?5:9},"encodedSize");Ri.compareTokens=i(function(t,r){return t.value<r.value?-1:t.value>r.value?1:0},"compareTokens");function O8(e,t,r,n){return new Xe(Oe.negint,-1-ai(e,t+1,n),2)}i(O8,"decodeNegint8");function R8(e,t,r,n){return new Xe(Oe.negint,-1-oi(e,t+1,n),3)}i(R8,"decodeNegint16");function N8(e,t,r,n){return new Xe(Oe.negint,-1-ci(e,t+1,n),5)}i(N8,"decodeNegint32");var og=BigInt(-1),P8=BigInt(1);function B8(e,t,r,n){let s=ui(e,t+1,n);if(typeof s!="bigint"){let o=-1-s;if(o>=Number.MIN_SAFE_INTEGER)return new Xe(Oe.negint,o,9)}if(n.allowBigInt!==!0)throw new Error(`${Ct} integers outside of the safe integer range are not supported`);return new Xe(Oe.negint,og-BigInt(s),9)}i(B8,"decodeNegint64");function ep(e,t){let r=t.value,n=typeof r=="bigint"?r*og-P8:r*-1-1;an(e,t.type.majorEncoded,n)}i(ep,"encodeNegint");ep.encodedSize=i(function(t){let r=t.value,n=typeof r=="bigint"?r*og-P8:r*-1-1;return n<Yr[0]?1:n<Yr[1]?2:n<Yr[2]?3:n<Yr[3]?5:9},"encodedSize");ep.compareTokens=i(function(t,r){return t.value<r.value?1:t.value>r.value?-1:0},"compareTokens");function hf(e,t,r,n){aa(e,t,r+n);let s=iu(e,t+r,t+r+n);return new Xe(Oe.bytes,s,r+n)}i(hf,"toToken");function L8(e,t,r,n){return hf(e,t,1,r)}i(L8,"decodeBytesCompact");function F8(e,t,r,n){return hf(e,t,2,ai(e,t+1,n))}i(F8,"decodeBytes8");function U8(e,t,r,n){return hf(e,t,3,oi(e,t+1,n))}i(U8,"decodeBytes16");function $8(e,t,r,n){return hf(e,t,5,ci(e,t+1,n))}i($8,"decodeBytes32");function j8(e,t,r,n){let s=ui(e,t+1,n);if(typeof s=="bigint")throw new Error(`${Ct} 64-bit integer bytes lengths not supported`);return hf(e,t,9,s)}i(j8,"decodeBytes64");function tp(e){return e.encodedBytes===void 0&&(e.encodedBytes=e.type===Oe.string?S8(e.value):e.value),e.encodedBytes}i(tp,"tokenBytes");function au(e,t){let r=tp(t);an(e,t.type.majorEncoded,r.length),e.push(r)}i(au,"encodeBytes");au.encodedSize=i(function(t){let r=tp(t);return an.encodedSize(r.length)+r.length},"encodedSize");au.compareTokens=i(function(t,r){return tN(tp(t),tp(r))},"compareTokens");function tN(e,t){return e.length<t.length?-1:e.length>t.length?1:M8(e,t)}i(tN,"compareBytes");function pf(e,t,r,n,s){let o=r+n;aa(e,t,o);let c=new Xe(Oe.string,A8(e,t+r,t+o),o);return s.retainStringBytes===!0&&(c.byteValue=iu(e,t+r,t+o)),c}i(pf,"toToken");function z8(e,t,r,n){return pf(e,t,1,r,n)}i(z8,"decodeStringCompact");function H8(e,t,r,n){return pf(e,t,2,ai(e,t+1,n),n)}i(H8,"decodeString8");function q8(e,t,r,n){return pf(e,t,3,oi(e,t+1,n),n)}i(q8,"decodeString16");function K8(e,t,r,n){return pf(e,t,5,ci(e,t+1,n),n)}i(K8,"decodeString32");function V8(e,t,r,n){let s=ui(e,t+1,n);if(typeof s=="bigint")throw new Error(`${Ct} 64-bit integer string lengths not supported`);return pf(e,t,9,s,n)}i(V8,"decodeString64");var G8=au;function ou(e,t,r,n){return new Xe(Oe.array,n,r)}i(ou,"toToken");function W8(e,t,r,n){return ou(e,t,1,r)}i(W8,"decodeArrayCompact");function Z8(e,t,r,n){return ou(e,t,2,ai(e,t+1,n))}i(Z8,"decodeArray8");function J8(e,t,r,n){return ou(e,t,3,oi(e,t+1,n))}i(J8,"decodeArray16");function Y8(e,t,r,n){return ou(e,t,5,ci(e,t+1,n))}i(Y8,"decodeArray32");function X8(e,t,r,n){let s=ui(e,t+1,n);if(typeof s=="bigint")throw new Error(`${Ct} 64-bit integer array lengths not supported`);return ou(e,t,9,s)}i(X8,"decodeArray64");function Q8(e,t,r,n){if(n.allowIndefinite===!1)throw new Error(`${Ct} indefinite length items not allowed`);return ou(e,t,1,1/0)}i(Q8,"decodeArrayIndefinite");function rp(e,t){an(e,Oe.array.majorEncoded,t.value)}i(rp,"encodeArray");rp.compareTokens=Ri.compareTokens;rp.encodedSize=i(function(t){return an.encodedSize(t.value)},"encodedSize");function cu(e,t,r,n){return new Xe(Oe.map,n,r)}i(cu,"toToken");function e9(e,t,r,n){return cu(e,t,1,r)}i(e9,"decodeMapCompact");function t9(e,t,r,n){return cu(e,t,2,ai(e,t+1,n))}i(t9,"decodeMap8");function r9(e,t,r,n){return cu(e,t,3,oi(e,t+1,n))}i(r9,"decodeMap16");function n9(e,t,r,n){return cu(e,t,5,ci(e,t+1,n))}i(n9,"decodeMap32");function i9(e,t,r,n){let s=ui(e,t+1,n);if(typeof s=="bigint")throw new Error(`${Ct} 64-bit integer map lengths not supported`);return cu(e,t,9,s)}i(i9,"decodeMap64");function s9(e,t,r,n){if(n.allowIndefinite===!1)throw new Error(`${Ct} indefinite length items not allowed`);return cu(e,t,1,1/0)}i(s9,"decodeMapIndefinite");function np(e,t){an(e,Oe.map.majorEncoded,t.value)}i(np,"encodeMap");np.compareTokens=Ri.compareTokens;np.encodedSize=i(function(t){return an.encodedSize(t.value)},"encodedSize");function a9(e,t,r,n){return new Xe(Oe.tag,r,1)}i(a9,"decodeTagCompact");function o9(e,t,r,n){return new Xe(Oe.tag,ai(e,t+1,n),2)}i(o9,"decodeTag8");function c9(e,t,r,n){return new Xe(Oe.tag,oi(e,t+1,n),3)}i(c9,"decodeTag16");function u9(e,t,r,n){return new Xe(Oe.tag,ci(e,t+1,n),5)}i(u9,"decodeTag32");function l9(e,t,r,n){return new Xe(Oe.tag,ui(e,t+1,n),9)}i(l9,"decodeTag64");function ip(e,t){an(e,Oe.tag.majorEncoded,t.value)}i(ip,"encodeTag");ip.compareTokens=Ri.compareTokens;ip.encodedSize=i(function(t){return an.encodedSize(t.value)},"encodedSize");var oN=20,cN=21,uN=22,lN=23;function f9(e,t,r,n){if(n.allowUndefined===!1)throw new Error(`${Ct} undefined values are not supported`);return n.coerceUndefinedToNull===!0?new Xe(Oe.null,null,1):new Xe(Oe.undefined,void 0,1)}i(f9,"decodeUndefined");function d9(e,t,r,n){if(n.allowIndefinite===!1)throw new Error(`${Ct} indefinite length items not allowed`);return new Xe(Oe.break,void 0,1)}i(d9,"decodeBreak");function cg(e,t,r){if(r){if(r.allowNaN===!1&&Number.isNaN(e))throw new Error(`${Ct} NaN values are not supported`);if(r.allowInfinity===!1&&(e===1/0||e===-1/0))throw new Error(`${Ct} Infinity values are not supported`)}return new Xe(Oe.float,e,t)}i(cg,"createToken");function h9(e,t,r,n){return cg(ug(e,t+1),3,n)}i(h9,"decodeFloat16");function p9(e,t,r,n){return cg(lg(e,t+1),5,n)}i(p9,"decodeFloat32");function m9(e,t,r,n){return cg(b9(e,t+1),9,n)}i(m9,"decodeFloat64");function sp(e,t,r){let n=t.value;if(n===!1)e.push([Oe.float.majorEncoded|oN]);else if(n===!0)e.push([Oe.float.majorEncoded|cN]);else if(n===null)e.push([Oe.float.majorEncoded|uN]);else if(n===void 0)e.push([Oe.float.majorEncoded|lN]);else{let s,o=!1;(!r||r.float64!==!0)&&(g9(n),s=ug(Qi,1),n===s||Number.isNaN(n)?(Qi[0]=249,e.push(Qi.slice(0,3)),o=!0):(y9(n),s=lg(Qi,1),n===s&&(Qi[0]=250,e.push(Qi.slice(0,5)),o=!0))),o||(fN(n),s=b9(Qi,1),Qi[0]=251,e.push(Qi.slice(0,9)))}}i(sp,"encodeFloat");sp.encodedSize=i(function(t,r){let n=t.value;if(n===!1||n===!0||n===null||n===void 0)return 1;if(!r||r.float64!==!0){g9(n);let s=ug(Qi,1);if(n===s||Number.isNaN(n))return 3;if(y9(n),s=lg(Qi,1),n===s)return 5}return 9},"encodedSize");var v9=new ArrayBuffer(9),Ni=new DataView(v9,1),Qi=new Uint8Array(v9,0);function g9(e){if(e===1/0)Ni.setUint16(0,31744,!1);else if(e===-1/0)Ni.setUint16(0,64512,!1);else if(Number.isNaN(e))Ni.setUint16(0,32256,!1);else{Ni.setFloat32(0,e);let t=Ni.getUint32(0),r=(t&2139095040)>>23,n=t&8388607;if(r===255)Ni.setUint16(0,31744,!1);else if(r===0)Ni.setUint16(0,(e&2147483648)>>16|n>>13,!1);else{let s=r-127;s<-24?Ni.setUint16(0,0):s<-14?Ni.setUint16(0,(t&2147483648)>>16|1<<24+s,!1):Ni.setUint16(0,(t&2147483648)>>16|s+15<<10|n>>13,!1)}}}i(g9,"encodeFloat16");function ug(e,t){if(e.length-t<2)throw new Error(`${Ct} not enough data for float16`);let r=(e[t]<<8)+e[t+1];if(r===31744)return 1/0;if(r===64512)return-1/0;if(r===32256)return NaN;let n=r>>10&31,s=r&1023,o;return n===0?o=s*2**-24:n!==31?o=(s+1024)*2**(n-25):o=s===0?1/0:NaN,r&32768?-o:o}i(ug,"readFloat16");function y9(e){Ni.setFloat32(0,e,!1)}i(y9,"encodeFloat32");function lg(e,t){if(e.length-t<4)throw new Error(`${Ct} not enough data for float32`);let r=(e.byteOffset||0)+t;return new DataView(e.buffer,r,4).getFloat32(0,!1)}i(lg,"readFloat32");function fN(e){Ni.setFloat64(0,e,!1)}i(fN,"encodeFloat64");function b9(e,t){if(e.length-t<8)throw new Error(`${Ct} not enough data for float64`);let r=(e.byteOffset||0)+t;return new DataView(e.buffer,r,8).getFloat64(0,!1)}i(b9,"readFloat64");sp.compareTokens=Ri.compareTokens;function ur(e,t,r){throw new Error(`${Ct} encountered invalid minor (${r}) for major ${e[t]>>>5}`)}i(ur,"invalidMinor");function ap(e){return()=>{throw new Error(`${Ct} ${e}`)}}i(ap,"errorer");var Ge=[];for(let e=0;e<=23;e++)Ge[e]=ur;Ge[24]=C8;Ge[25]=I8;Ge[26]=k8;Ge[27]=D8;Ge[28]=ur;Ge[29]=ur;Ge[30]=ur;Ge[31]=ur;for(let e=32;e<=55;e++)Ge[e]=ur;Ge[56]=O8;Ge[57]=R8;Ge[58]=N8;Ge[59]=B8;Ge[60]=ur;Ge[61]=ur;Ge[62]=ur;Ge[63]=ur;for(let e=64;e<=87;e++)Ge[e]=L8;Ge[88]=F8;Ge[89]=U8;Ge[90]=$8;Ge[91]=j8;Ge[92]=ur;Ge[93]=ur;Ge[94]=ur;Ge[95]=ap("indefinite length bytes/strings are not supported");for(let e=96;e<=119;e++)Ge[e]=z8;Ge[120]=H8;Ge[121]=q8;Ge[122]=K8;Ge[123]=V8;Ge[124]=ur;Ge[125]=ur;Ge[126]=ur;Ge[127]=ap("indefinite length bytes/strings are not supported");for(let e=128;e<=151;e++)Ge[e]=W8;Ge[152]=Z8;Ge[153]=J8;Ge[154]=Y8;Ge[155]=X8;Ge[156]=ur;Ge[157]=ur;Ge[158]=ur;Ge[159]=Q8;for(let e=160;e<=183;e++)Ge[e]=e9;Ge[184]=t9;Ge[185]=r9;Ge[186]=n9;Ge[187]=i9;Ge[188]=ur;Ge[189]=ur;Ge[190]=ur;Ge[191]=s9;for(let e=192;e<=215;e++)Ge[e]=a9;Ge[216]=o9;Ge[217]=c9;Ge[218]=u9;Ge[219]=l9;Ge[220]=ur;Ge[221]=ur;Ge[222]=ur;Ge[223]=ur;for(let e=224;e<=243;e++)Ge[e]=ap("simple values are not supported");Ge[244]=ur;Ge[245]=ur;Ge[246]=ur;Ge[247]=f9;Ge[248]=ap("simple values are not supported");Ge[249]=h9;Ge[250]=p9;Ge[251]=m9;Ge[252]=ur;Ge[253]=ur;Ge[254]=ur;Ge[255]=d9;var es=[];for(let e=0;e<24;e++)es[e]=new Xe(Oe.uint,e,1);for(let e=-1;e>=-24;e--)es[31-e]=new Xe(Oe.negint,e,1);es[64]=new Xe(Oe.bytes,new Uint8Array(0),1);es[96]=new Xe(Oe.string,"",1);es[128]=new Xe(Oe.array,0,1);es[160]=new Xe(Oe.map,0,1);es[244]=new Xe(Oe.false,!1,1);es[245]=new Xe(Oe.true,!0,1);es[246]=new Xe(Oe.null,null,1);function w9(e){switch(e.type){case Oe.false:return Cs([244]);case Oe.true:return Cs([245]);case Oe.null:return Cs([246]);case Oe.bytes:return e.value.length?void 0:Cs([64]);case Oe.string:return e.value===""?Cs([96]):void 0;case Oe.array:return e.value===0?Cs([128]):void 0;case Oe.map:return e.value===0?Cs([160]):void 0;case Oe.uint:return e.value<24?Cs([Number(e.value)]):void 0;case Oe.negint:if(e.value>=-24)return Cs([31-Number(e.value)])}}i(w9,"quickEncodeToken");var hN={float64:!1,mapSorter:vN,quickEncodeToken:w9};function pN(){let e=[];return e[Oe.uint.major]=Ri,e[Oe.negint.major]=ep,e[Oe.bytes.major]=au,e[Oe.string.major]=G8,e[Oe.array.major]=rp,e[Oe.map.major]=np,e[Oe.tag.major]=ip,e[Oe.float.major]=sp,e}i(pN,"makeCborEncoders");var _9=pN(),fg=new su,Ho=class{constructor(t,r){this.obj=t,this.parent=r}includes(t){let r=this;do if(r.obj===t)return!0;while(r=r.parent);return!1}static createCheck(t,r){if(t&&t.includes(r))throw new Error(`${ag} object contains circular references`);return new Ho(r,t)}};i(Ho,"Ref");var $a={null:new Xe(Oe.null,null),undefined:new Xe(Oe.undefined,void 0),true:new Xe(Oe.true,!0),false:new Xe(Oe.false,!1),emptyArray:new Xe(Oe.array,0),emptyMap:new Xe(Oe.map,0)},ja={number(e,t,r,n){return!Number.isInteger(e)||!Number.isSafeInteger(e)?new Xe(Oe.float,e):e>=0?new Xe(Oe.uint,e):new Xe(Oe.negint,e)},bigint(e,t,r,n){return e>=BigInt(0)?new Xe(Oe.uint,e):new Xe(Oe.negint,e)},Uint8Array(e,t,r,n){return new Xe(Oe.bytes,e)},string(e,t,r,n){return new Xe(Oe.string,e)},boolean(e,t,r,n){return e?$a.true:$a.false},null(e,t,r,n){return $a.null},undefined(e,t,r,n){return $a.undefined},ArrayBuffer(e,t,r,n){return new Xe(Oe.bytes,new Uint8Array(e))},DataView(e,t,r,n){return new Xe(Oe.bytes,new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},Array(e,t,r,n){if(!e.length)return r.addBreakTokens===!0?[$a.emptyArray,new Xe(Oe.break)]:$a.emptyArray;n=Ho.createCheck(n,e);let s=[],o=0;for(let c of e)s[o++]=op(c,r,n);return r.addBreakTokens?[new Xe(Oe.array,e.length),s,new Xe(Oe.break)]:[new Xe(Oe.array,e.length),s]},Object(e,t,r,n){let s=t!=="Object",o=s?e.keys():Object.keys(e),c=s?e.size:o.length;if(!c)return r.addBreakTokens===!0?[$a.emptyMap,new Xe(Oe.break)]:$a.emptyMap;n=Ho.createCheck(n,e);let f=[],h=0;for(let p of o)f[h++]=[op(p,r,n),op(s?e.get(p):e[p],r,n)];return mN(f,r),r.addBreakTokens?[new Xe(Oe.map,c),f,new Xe(Oe.break)]:[new Xe(Oe.map,c),f]}};ja.Map=ja.Object;ja.Buffer=ja.Uint8Array;for(let e of"Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64".split(" "))ja[`${e}Array`]=ja.DataView;function op(e,t={},r){let n=b8(e),s=t&&t.typeEncoders&&t.typeEncoders[n]||ja[n];if(typeof s=="function"){let c=s(e,n,t,r);if(c!=null)return c}let o=ja[n];if(!o)throw new Error(`${ag} unsupported type: ${n}`);return o(e,n,t,r)}i(op,"objectToTokens");function mN(e,t){t.mapSorter&&e.sort(t.mapSorter)}i(mN,"sortMapEntries");function vN(e,t){let r=Array.isArray(e[0])?e[0][0]:e[0],n=Array.isArray(t[0])?t[0][0]:t[0];if(r.type!==n.type)return r.type.compare(n.type);let s=r.type.major,o=_9[s].compareTokens(r,n);return o===0&&console.warn("WARNING: complex key types used, CBOR key sorting guarantees are gone"),o}i(vN,"mapSorter");function E9(e,t,r,n){if(Array.isArray(t))for(let s of t)E9(e,s,r,n);else r[t.type.major](e,t,n)}i(E9,"tokensToEncoded");function gN(e,t,r){let n=op(e,r);if(!Array.isArray(n)&&r.quickEncodeToken){let s=r.quickEncodeToken(n);if(s)return s;let o=t[n.type.major];if(o.encodedSize){let c=o.encodedSize(n,r),f=new su(c);if(o(f,n,r),f.chunks.length!==1)throw new Error(`Unexpected error: pre-calculated length for ${n} was wrong`);return sg(f.chunks[0])}}return fg.reset(),E9(fg,n,t,r),fg.toBytes(!0)}i(gN,"encodeCustom");function dg(e,t){return t=Object.assign({},hN,t),gN(e,_9,t)}i(dg,"encode");var yN={strict:!1,allowIndefinite:!0,allowUndefined:!0,allowBigInt:!0},cp=class{constructor(t,r={}){this.pos=0,this.data=t,this.options=r}done(){return this.pos>=this.data.length}next(){let t=this.data[this.pos],r=es[t];if(r===void 0){let n=Ge[t];if(!n)throw new Error(`${Ct} no decoder for major type ${t>>>5} (byte 0x${t.toString(16).padStart(2,"0")})`);let s=t&31;r=n(this.data,this.pos,s,this.options)}return this.pos+=r.encodedLength,r}};i(cp,"Tokeniser");var mf=Symbol.for("DONE"),up=Symbol.for("BREAK");function bN(e,t,r){let n=[];for(let s=0;s<e.value;s++){let o=vf(t,r);if(o===up){if(e.value===1/0)break;throw new Error(`${Ct} got unexpected break to lengthed array`)}if(o===mf)throw new Error(`${Ct} found array but not enough entries (got ${s}, expected ${e.value})`);n[s]=o}return n}i(bN,"tokenToArray");function wN(e,t,r){let n=r.useMaps===!0,s=n?void 0:{},o=n?new Map:void 0;for(let c=0;c<e.value;c++){let f=vf(t,r);if(f===up){if(e.value===1/0)break;throw new Error(`${Ct} got unexpected break to lengthed map`)}if(f===mf)throw new Error(`${Ct} found map but not enough entries (got ${c} [no key], expected ${e.value})`);if(n!==!0&&typeof f!="string")throw new Error(`${Ct} non-string keys not supported (got ${typeof f})`);if(r.rejectDuplicateMapKeys===!0&&(n&&o.has(f)||!n&&f in s))throw new Error(`${Ct} found repeat map key "${f}"`);let h=vf(t,r);if(h===mf)throw new Error(`${Ct} found map but not enough entries (got ${c} [no value], expected ${e.value})`);n?o.set(f,h):s[f]=h}return n?o:s}i(wN,"tokenToMap");function vf(e,t){if(e.done())return mf;let r=e.next();if(r.type===Oe.break)return up;if(r.type.terminal)return r.value;if(r.type===Oe.array)return bN(r,e,t);if(r.type===Oe.map)return wN(r,e,t);if(r.type===Oe.tag){if(t.tags&&typeof t.tags[r.value]=="function"){let n=vf(e,t);return t.tags[r.value](n)}throw new Error(`${Ct} tag not supported (${r.value})`)}throw new Error("unsupported")}i(vf,"tokensToObject");function hg(e,t){if(!(e instanceof Uint8Array))throw new Error(`${Ct} data to decode must be a Uint8Array`);t=Object.assign({},yN,t);let r=t.tokenizer||new cp(e,t),n=vf(r,t);if(n===mf)throw new Error(`${Ct} did not find any content to decode`);if(n===up)throw new Error(`${Ct} got unexpected break`);if(!r.done())throw new Error(`${Ct} too many terminals, data makes no sense`);return n}i(hg,"decode");var A9=42;function EN(e){if(e.asCID!==e)return null;let t=Ut.asCID(e);if(!t)return null;let r=new Uint8Array(t.bytes.byteLength+1);return r.set(t.bytes,1),[new Xe(Oe.tag,A9),new Xe(Oe.bytes,r)]}i(EN,"cidEncoder");function AN(){throw new Error("`undefined` is not supported by the IPLD Data Model and cannot be encoded")}i(AN,"undefinedEncoder");function SN(e){if(Number.isNaN(e))throw new Error("`NaN` is not supported by the IPLD Data Model and cannot be encoded");if(e===1/0||e===-1/0)throw new Error("`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded");return null}i(SN,"numberEncoder");var xN={float64:!0,typeEncoders:{Object:EN,undefined:AN,number:SN}};function TN(e){if(e[0]!==0)throw new Error("Invalid CID for CBOR tag 42; expected leading 0x00");return Ut.decode(e.subarray(1))}i(TN,"cidDecoder");var S9={allowIndefinite:!1,coerceUndefinedToNull:!0,allowNaN:!1,allowInfinity:!1,allowBigInt:!0,strict:!0,useMaps:!1,tags:[]};S9.tags[A9]=TN;var MN="dag-cbor",CN=113,pg=i(e=>dg(e,xN),"encode"),IN=i(e=>hg(e,S9),"decode");function uu(e){try{return e()}catch(t){return t}}i(uu,"tryCatch");var mg=Uo(Zh(),1);function qo(e){let t=mg.default.decode(e),r=mg.default.decode.bytes,n=e.subarray(r);return[t,n,r]}i(qo,"readVarint");function kN(e){return e===0||e===1}i(kN,"isCidVersion");function vg(e){let[t,r]=qo(e);if(!kN(t))throw new Error(`Unknown CID version ${t}`);let[n,s]=qo(r),[,o,c]=qo(s),[f,,h]=qo(o),p=s.subarray(0,c+h+f),v=s.subarray(c+h+f);return[Ut.create(t,n,zh(p)),v]}i(vg,"readCid");function Ko(e,t="StreamRef"){let[r,n]=qo(e);if(r!==206)throw new Error(`Invalid ${t}, does not include streamid codec`);let[s,o]=qo(n),c=vg(o),[f,h]=c;if(h.length===0)return{kind:"stream-id",type:s,genesis:f};if(h.length===1&&h[0]===0)return{kind:"commit-id",type:s,genesis:f,commit:null};{let[p]=vg(h);return{kind:"commit-id",type:s,genesis:f,commit:p}}}i(Ko,"fromBytes");var DN=/(ceramic:\/\/|\/ceramic\/)?([a-zA-Z0-9]+)(\?commit=([a-zA-Z0-9]+))?/;function lu(e,t="StreamRef"){let r=DN.exec(e)||[],n=r[2];if(!n)throw new Error(`Malformed ${t} string: ${e}`);let s=Yi.decode(n),o=Ko(s),c=r[4];return c?{kind:"commit-id",type:o.type,genesis:o.genesis,commit:gg(o.genesis,c)}:o}i(lu,"fromString");function ON(e){try{return typeof e=="string"?Ut.parse(e):Ut.asCID(e)}catch{return null}}i(ON,"parseCID");function gg(e,t=null){if(!t||t==="0")return null;let r=ON(t);if(r)return e.equals(r)?null:r;throw new Error("Cannot specify commit as a number except to request commit 0 (the genesis commit)")}i(gg,"parseCommit");var gf=function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},Pi=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)},fp=class extends Error{constructor(t){super(`Invalid StreamID bytes ${Yi.encode(t)}: contains commit`)}};i(fp,"InvalidStreamIDBytesError");var dp=class extends Error{constructor(t){super(`Invalid StreamID string ${t}: contains commit`)}};i(dp,"InvalidStreamIDStringError");function M9(e){let t=Ko(e,"StreamID");if(t.kind==="stream-id")return new Yt(t.type,t.genesis);throw new fp(e)}i(M9,"fromBytes");function RN(e){return uu(()=>M9(e))}i(RN,"fromBytesNoThrow");function C9(e){let t=lu(e,"StreamID");if(t.kind==="stream-id")return new Yt(t.type,t.genesis);throw new dp(e)}i(C9,"fromString");function NN(e){return uu(()=>C9(e))}i(NN,"fromStringNoThrow");var T9=Symbol.for("@ceramicnetwork/streamid/StreamID"),Yt=class{constructor(t,r){if(this._tag=T9,!(t||t===0))throw new Error("StreamID constructor: type required");if(!r)throw new Error("StreamID constructor: cid required");this._type=typeof t=="string"?Xi.codeByName(t):t,this._cid=typeof r=="string"?Ut.parse(r):r}static isInstance(t){return typeof t=="object"&&"_tag"in t&&t._tag===T9}static async fromGenesis(t,r){let n=await y8({value:r,codec:lp,hasher:Zv});return new Yt(t,n.cid)}get type(){return this._type}get typeName(){return Xi.nameByCode(this._type)}get cid(){return this._cid}get bytes(){let t=bg.default.encode(206),r=bg.default.encode(this.type);return ff([t,r,this.cid.bytes])}get baseID(){return new Yt(this._type,this._cid)}equals(t){return Yt.isInstance(t)?this.type===t.type&&this.cid.equals(t.cid):!1}toString(){return Yi.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[Symbol.for("nodejs.util.inspect.custom")](){return`StreamID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}};i(Yt,"StreamID");Yt.fromBytes=M9;Yt.fromBytesNoThrow=RN;Yt.fromString=C9;Yt.fromStringNoThrow=NN;gf([si(),Pi("design:type",String),Pi("design:paramtypes",[])],Yt.prototype,"typeName",null);gf([si(),Pi("design:type",Uint8Array),Pi("design:paramtypes",[])],Yt.prototype,"bytes",null);gf([si(),Pi("design:type",Yt),Pi("design:paramtypes",[])],Yt.prototype,"baseID",null);gf([si(),Pi("design:type",Function),Pi("design:paramtypes",[]),Pi("design:returntype",String)],Yt.prototype,"toString",null);gf([si(),Pi("design:type",Function),Pi("design:paramtypes",[]),Pi("design:returntype",String)],Yt.prototype,"toUrl",null);var du=function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},qn=function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)},wg=function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},oa=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},fu,Vo,yf,hp=class extends Error{constructor(t){super(`Error while parsing CommitID from bytes ${Yi.encode(t)}: no commit information provided`)}};i(hp,"InvalidCommitIDBytesError");var pp=class extends Error{constructor(t){super(`Error while parsing CommitID from string ${t}: no commit information provided`)}};i(pp,"InvalidCommitIDStringError");function k9(e){let t=Ko(e,"CommitID");if(t.kind==="commit-id")return new hr(t.type,t.genesis,t.commit);throw new hp(e)}i(k9,"fromBytes");function PN(e){return uu(()=>k9(e))}i(PN,"fromBytesNoThrow");function D9(e){let t=lu(e,"CommitID");if(t.kind==="commit-id")return new hr(t.type,t.genesis,t.commit);throw new pp(e)}i(D9,"fromString");function BN(e){return uu(()=>D9(e))}i(BN,"fromStringNoThrow");var I9=Symbol.for("@ceramicnetwork/streamid/CommitID");function LN(e,t){return new hr(e.type,e.cid,t)}i(LN,"make");var hr=class{constructor(t,r,n=null){if(this._tag=I9,fu.set(this,void 0),Vo.set(this,void 0),yf.set(this,void 0),!t&&t!==0)throw new Error("constructor: type required");if(!r)throw new Error("constructor: cid required");wg(this,fu,typeof t=="string"?Xi.codeByName(t):t,"f"),wg(this,Vo,typeof r=="string"?Ut.parse(r):r,"f"),wg(this,yf,gg(oa(this,Vo,"f"),n),"f")}static isInstance(t){return typeof t=="object"&&"_tag"in t&&t._tag===I9}get baseID(){return new Yt(oa(this,fu,"f"),oa(this,Vo,"f"))}get type(){return oa(this,fu,"f")}get typeName(){return Xi.nameByCode(oa(this,fu,"f"))}get cid(){return oa(this,Vo,"f")}get commit(){return oa(this,yf,"f")||oa(this,Vo,"f")}get bytes(){let t=_g.default.encode(206),r=_g.default.encode(this.type),n=oa(this,yf,"f")?.bytes||new Uint8Array([0]);return ff([t,r,this.cid.bytes,n])}equals(t){return this.type===t.type&&this.cid.equals(t.cid)&&this.commit.equals(t.commit)}toString(){return Yi.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[(fu=new WeakMap,Vo=new WeakMap,yf=new WeakMap,Symbol.for("nodejs.util.inspect.custom"))](){return`CommitID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}};i(hr,"CommitID");hr.fromBytes=k9;hr.fromBytesNoThrow=PN;hr.fromString=D9;hr.fromStringNoThrow=BN;hr.make=LN;du([si(),qn("design:type",Yt),qn("design:paramtypes",[])],hr.prototype,"baseID",null);du([si(),qn("design:type",String),qn("design:paramtypes",[])],hr.prototype,"typeName",null);du([si(),qn("design:type",Ut),qn("design:paramtypes",[])],hr.prototype,"commit",null);du([si(),qn("design:type",Uint8Array),qn("design:paramtypes",[])],hr.prototype,"bytes",null);du([si(),qn("design:type",Function),qn("design:paramtypes",[]),qn("design:returntype",String)],hr.prototype,"toString",null);du([si(),qn("design:type",Function),qn("design:paramtypes",[]),qn("design:returntype",String)],hr.prototype,"toUrl",null);var Go;(function(e){function t(s){let o=Ko(s);switch(o.kind){case"commit-id":return new hr(o.type,o.genesis,o.commit);case"stream-id":return new Yt(o.type,o.genesis);default:throw new Error(`Malformed StreamRef bytes: ${Yi.encode(s)}`)}}i(t,"fromBytes"),e.fromBytes=t;function r(s){let o=lu(s);switch(o.kind){case"commit-id":return new hr(o.type,o.genesis,o.commit);case"stream-id":return new Yt(o.type,o.genesis);default:throw new Error(`Malformed StreamRef string: ${s}`)}}i(r,"fromString"),e.fromString=r;function n(s){if(Yt.isInstance(s)||hr.isInstance(s))return s;if(s instanceof Uint8Array)return t(s);if(typeof s=="string")return r(s);throw new Error(`Can not build CommitID or StreamID from ${JSON.stringify(s)}`)}i(n,"from"),e.from=n})(Go||(Go={}));var O9="ceramic://k3y52l7qbv1fry1fp4s0nwdarh0vahusarpposgevy0pemiykymd2ord6swtharcw",mp="ceramic://k3y52l7qbv1fryjn62sggjh1lpn11c56qfofzmty190d62hwk1cal1c7qc5he54ow";var Eg={};wn(Eg,{JsonPatchError:()=>Pr,_areEquals:()=>_f,applyOperation:()=>Wo,applyPatch:()=>Ep,applyReducer:()=>zN,deepClone:()=>$N,getValueByPointer:()=>wp,validate:()=>N9,validator:()=>_p});var FN=function(){var e=i(function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var o in s)s.hasOwnProperty(o)&&(n[o]=s[o])},e(t,r)},"extendStatics");return function(t,r){e(t,r);function n(){this.constructor=t}i(n,"__"),t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UN=Object.prototype.hasOwnProperty;function gp(e,t){return UN.call(e,t)}i(gp,"hasOwnProperty");function yp(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var s in e)gp(e,s)&&n.push(s);return n}i(yp,"_objectKeys");function on(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}i(on,"_deepClone");function bp(e){for(var t=0,r=e.length,n;t<r;){if(n=e.charCodeAt(t),n>=48&&n<=57){t++;continue}return!1}return!0}i(bp,"isInteger");function Is(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}i(Is,"escapePathComponent");function bf(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}i(bf,"unescapePathComponent");function vp(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(vp(e[t]))return!0}else if(typeof e=="object"){for(var n=yp(e),s=n.length,o=0;o<s;o++)if(vp(e[n[o]]))return!0}}return!1}i(vp,"hasUndefined");function R9(e,t){var r=[e];for(var n in t){var s=typeof t[n]=="object"?JSON.stringify(t[n],null,2):t[n];typeof s<"u"&&r.push(n+": "+s)}return r.join(`
|
|
22
22
|
`)}i(R9,"patchErrorMessageFormatter");var wf=function(e){FN(t,e);function t(r,n,s,o,c){var f=this.constructor,h=e.call(this,R9(r,{name:n,index:s,operation:o,tree:c}))||this;return h.name=n,h.index=s,h.operation=o,h.tree=c,Object.setPrototypeOf(h,f.prototype),h.message=R9(r,{name:n,index:s,operation:o,tree:c}),h}return i(t,"PatchError"),t}(Error);var Pr=wf,$N=on,hu={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=wp(r,this.path);n&&(n=on(n));var s=Wo(r,{op:"remove",path:this.from}).removed;return Wo(r,{op:"add",path:this.path,value:s}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=wp(r,this.from);return Wo(r,{op:"add",path:this.path,value:on(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:_f(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},jN={add:function(e,t,r){return bp(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return{newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:hu.move,copy:hu.copy,test:hu.test,_get:hu._get};function wp(e,t){if(t=="")return e;var r={op:"_get",path:t};return Wo(e,r),r.value}i(wp,"getValueByPointer");function Wo(e,t,r,n,s,o){if(r===void 0&&(r=!1),n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=0),r&&(typeof r=="function"?r(t,0,e,t.path):_p(t,0)),t.path===""){var c={newDocument:e};if(t.op==="add")return c.newDocument=t.value,c;if(t.op==="replace")return c.newDocument=t.value,c.removed=e,c;if(t.op==="move"||t.op==="copy")return c.newDocument=wp(e,t.from),t.op==="move"&&(c.removed=e),c;if(t.op==="test"){if(c.test=_f(e,t.value),c.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c.newDocument=e,c}else{if(t.op==="remove")return c.removed=e,c.newDocument=null,c;if(t.op==="_get")return t.value=e,c;if(r)throw new Pr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",o,t,e);return c}}else{n||(e=on(e));var f=t.path||"",h=f.split("/"),p=e,v=1,b=h.length,y=void 0,_=void 0,T=void 0;for(typeof r=="function"?T=r:T=_p;;){if(_=h[v],_&&_.indexOf("~")!=-1&&(_=bf(_)),s&&(_=="__proto__"||_=="prototype"&&v>0&&h[v-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&y===void 0&&(p[_]===void 0?y=h.slice(0,v).join("/"):v==b-1&&(y=t.path),y!==void 0&&T(t,0,e,y)),v++,Array.isArray(p)){if(_==="-")_=p.length;else{if(r&&!bp(_))throw new Pr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);bp(_)&&(_=~~_)}if(v>=b){if(r&&t.op==="add"&&_>p.length)throw new Pr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);var c=jN[t.op].call(t,p,_,e);if(c.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c}}else if(v>=b){var c=hu[t.op].call(t,p,_,e);if(c.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c}if(p=p[_],r&&v<b&&(!p||typeof p!="object"))throw new Pr("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",o,t,e)}}}i(Wo,"applyOperation");function Ep(e,t,r,n,s){if(n===void 0&&(n=!0),s===void 0&&(s=!0),r&&!Array.isArray(t))throw new Pr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=on(e));for(var o=new Array(t.length),c=0,f=t.length;c<f;c++)o[c]=Wo(e,t[c],r,!0,s,c),e=o[c].newDocument;return o.newDocument=e,o}i(Ep,"applyPatch");function zN(e,t,r){var n=Wo(e,t);if(n.test===!1)throw new Pr("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}i(zN,"applyReducer");function _p(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new Pr("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);if(hu[e.op]){if(typeof e.path!="string")throw new Pr("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new Pr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Pr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Pr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&vp(e.value))throw new Pr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var s=e.path.split("/").length,o=n.split("/").length;if(s!==o+1&&s!==o)throw new Pr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new Pr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var c={op:"_get",path:e.from,value:void 0},f=N9([c],r);if(f&&f.name==="OPERATION_PATH_UNRESOLVABLE")throw new Pr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Pr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}i(_p,"validator");function N9(e,t,r){try{if(!Array.isArray(e))throw new Pr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Ep(on(t),on(e),r||!0);else{r=r||_p;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0)}}catch(s){if(s instanceof Pr)return s;throw s}}i(N9,"validate");function _f(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=Array.isArray(e),n=Array.isArray(t),s,o,c;if(r&&n){if(o=e.length,o!=t.length)return!1;for(s=o;s--!==0;)if(!_f(e[s],t[s]))return!1;return!0}if(r!=n)return!1;var f=Object.keys(e);if(o=f.length,o!==Object.keys(t).length)return!1;for(s=o;s--!==0;)if(!t.hasOwnProperty(f[s]))return!1;for(s=o;s--!==0;)if(c=f[s],!_f(e[c],t[c]))return!1;return!0}return e!==e&&t!==t}i(_f,"_areEquals");var Tg={};wn(Tg,{compare:()=>JN,generate:()=>Ag,observe:()=>ZN,unobserve:()=>WN});var Sg=new WeakMap,HN=function(){function e(t){this.observers=new Map,this.obj=t}return i(e,"Mirror"),e}(),qN=function(){function e(t,r){this.callback=t,this.observer=r}return i(e,"ObserverInfo"),e}();function KN(e){return Sg.get(e)}i(KN,"getMirror");function VN(e,t){return e.observers.get(t)}i(VN,"getObserverFromMirror");function GN(e,t){e.observers.delete(t.callback)}i(GN,"removeObserverFromMirror");function WN(e,t){t.unobserve()}i(WN,"unobserve");function ZN(e,t){var r=[],n,s=KN(e);if(!s)s=new HN(e),Sg.set(e,s);else{var o=VN(s,t);n=o&&o.observer}if(n)return n;if(n={},s.value=on(e),t){n.callback=t,n.next=null;var c=i(function(){Ag(n)},"dirtyCheck"),f=i(function(){clearTimeout(n.next),n.next=setTimeout(c)},"fastCheck");typeof window<"u"&&(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f))}return n.patches=r,n.object=e,n.unobserve=function(){Ag(n),clearTimeout(n.next),GN(s,n),typeof window<"u"&&(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f),window.removeEventListener("change",f))},s.observers.set(t,new qN(t,n)),n}i(ZN,"observe");function Ag(e,t){t===void 0&&(t=!1);var r=Sg.get(e.object);xg(r.value,e.object,e.patches,"",t),e.patches.length&&Ep(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}i(Ag,"generate");function xg(e,t,r,n,s){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var o=yp(t),c=yp(e),f=!1,h=!1,p=c.length-1;p>=0;p--){var v=c[p],b=e[v];if(gp(t,v)&&!(t[v]===void 0&&b!==void 0&&Array.isArray(t)===!1)){var y=t[v];typeof b=="object"&&b!=null&&typeof y=="object"&&y!=null&&Array.isArray(b)===Array.isArray(y)?xg(b,y,r,n+"/"+Is(v),s):b!==y&&(f=!0,s&&r.push({op:"test",path:n+"/"+Is(v),value:on(b)}),r.push({op:"replace",path:n+"/"+Is(v),value:on(y)}))}else Array.isArray(e)===Array.isArray(t)?(s&&r.push({op:"test",path:n+"/"+Is(v),value:on(b)}),r.push({op:"remove",path:n+"/"+Is(v)}),h=!0):(s&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),f=!0)}if(!(!h&&o.length==c.length))for(var p=0;p<o.length;p++){var v=o[p];!gp(e,v)&&t[v]!==void 0&&r.push({op:"add",path:n+"/"+Is(v),value:on(t[v])})}}}i(xg,"_generate");function JN(e,t,r){r===void 0&&(r=!1);var n=[];return xg(e,t,n,"",r),n}i(JN,"compare");var P9=Object.assign({},Eg,Tg,{JsonPatchError:wf,deepClone:on,escapePathComponent:Is,unescapePathComponent:bf});var r7=Uo(jg(),1);var n7=Uo(FE(),1);var Xo;(function(e){e[e.PREFER_CACHE=0]="PREFER_CACHE",e[e.SYNC_ALWAYS=1]="SYNC_ALWAYS",e[e.NEVER_SYNC=2]="NEVER_SYNC"})(Xo||(Xo={}));var sy=Uo(jg(),1);var Zg=i(function(e,t){return Zg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},Zg(e,t)},"extendStatics");function Jg(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Zg(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}i(Jg,"__extends");function Yg(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}i(Yg,"__values");function yu(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,o=[],c;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(f){c={error:f}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}i(yu,"__read");function bu(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}i(bu,"__spreadArray");function Bi(e){return typeof e=="function"}i(Bi,"isFunction");function UE(e){var t=i(function(n){Error.call(n),n.stack=new Error().stack},"_super"),r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}i(UE,"createErrorClass");var Up=UE(function(e){return i(function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
23
23
|
`+r.map(function(n,s){return s+1+") "+n.toString()}).join(`
|
|
24
|
-
`):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function Xg(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}i(Xg,"arrRemove");var $p=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i(e,"Subscription"),e.prototype.unsubscribe=function(){var t,r,n,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=Yg(c),h=f.next();!h.done;h=f.next()){var p=h.value;p.remove(this)}}catch(O){t={error:O}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}else c.remove(this);var v=this.initialTeardown;if(Bi(v))try{v()}catch(O){o=O instanceof Up?O.errors:[O]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var y=Yg(b),_=y.next();!_.done;_=y.next()){var T=_.value;try{$E(T)}catch(O){o=o??[],O instanceof Up?o=bu(bu([],yu(o)),yu(O.errors)):o.push(O)}}}catch(O){n={error:O}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(n)throw n.error}}}if(o)throw new Up(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)$E(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Xg(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Xg(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var pW=$p.EMPTY;function jp(e){return e instanceof $p||e&&"closed"in e&&Bi(e.remove)&&Bi(e.add)&&Bi(e.unsubscribe)}i(jp,"isSubscription");function $E(e){Bi(e)?e():e.unsubscribe()}i($E,"execFinalizer");var ts={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var wu={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=wu.delegate;return s?.setTimeout?s.setTimeout.apply(s,bu([e,t],yu(r))):setTimeout.apply(void 0,bu([e,t],yu(r)))},clearTimeout:function(e){var t=wu.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jE(e){wu.setTimeout(function(){var t=ts.onUnhandledError;if(t)t(e);else throw e})}i(jE,"reportUnhandledError");function Qg(){}i(Qg,"noop");var zE=function(){return ey("C",void 0,void 0)}();function HE(e){return ey("E",void 0,e)}i(HE,"errorNotification");function qE(e){return ey("N",e,void 0)}i(qE,"nextNotification");function ey(e,t,r){return{kind:e,value:t,error:r}}i(ey,"createNotification");var Qo=null;function KE(e){if(ts.useDeprecatedSynchronousErrorHandling){var t=!Qo;if(t&&(Qo={errorThrown:!1,error:null}),e(),t){var r=Qo,n=r.errorThrown,s=r.error;if(Qo=null,n)throw s}}else e()}i(KE,"errorContext");function VE(e){ts.useDeprecatedSynchronousErrorHandling&&Qo&&(Qo.errorThrown=!0,Qo.error=e)}i(VE,"captureError");var ny=function(e){Jg(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,jp(r)&&r.add(n)):n.destination=oL,n}return i(t,"Subscriber"),t.create=function(r,n,s){return new Hp(r,n,s)},t.prototype.next=function(r){this.isStopped?ry(qE(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?ry(HE(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?ry(zE,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}($p);var iL=Function.prototype.bind;function ty(e,t){return iL.call(e,t)}i(ty,"bind");var sL=function(){function e(t){this.partialObserver=t}return i(e,"ConsumerObserver"),e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){zp(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){zp(n)}else zp(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){zp(r)}},e}(),Hp=function(e){Jg(t,e);function t(r,n,s){var o=e.call(this)||this,c;if(Bi(r)||!r)c={next:r??void 0,error:n??void 0,complete:s??void 0};else{var f;o&&ts.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&ty(r.next,f),error:r.error&&ty(r.error,f),complete:r.complete&&ty(r.complete,f)}):c=r}return o.destination=new sL(c),o}return i(t,"SafeSubscriber"),t}(ny);function zp(e){ts.useDeprecatedSynchronousErrorHandling?VE(e):jE(e)}i(zp,"handleUnhandledError");function aL(e){throw e}i(aL,"defaultErrorHandler");function ry(e,t){var r=ts.onStoppedNotification;r&&wu.setTimeout(function(){return r(e,t)})}i(ry,"handleStoppedNotification");var oL={closed:!0,next:Qg,error:aL,complete:Qg};var GE=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function WE(e){return e}i(WE,"identity");function ZE(e){return e.length===0?WE:e.length===1?e[0]:i(function(r){return e.reduce(function(n,s){return s(n)},r)},"piped")}i(ZE,"pipeFromArray");var iy=function(){function e(t){t&&(this._subscribe=t)}return i(e,"Observable"),e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,o=uL(t)?t:new Hp(t,r,n);return KE(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=JE(r),new r(function(s,o){var c=new Hp({next:function(f){try{t(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});n.subscribe(c)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[GE]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ZE(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=JE(t),new t(function(n,s){var o;r.subscribe(function(c){return o=c},function(c){return s(c)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function JE(e){var t;return(t=e??ts.Promise)!==null&&t!==void 0?t:Promise}i(JE,"getPromiseCtor");function cL(e){return e&&Bi(e.next)&&Bi(e.error)&&Bi(e.complete)}i(cL,"isObserver");function uL(e){return e&&e instanceof ny||cL(e)&&jp(e)}i(uL,"isSubscriber");var YE;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(YE||(YE={}));var XE;(function(e){e[e.NOT_REQUESTED=0]="NOT_REQUESTED",e[e.PENDING=1]="PENDING",e[e.PROCESSING=2]="PROCESSING",e[e.ANCHORED=3]="ANCHORED",e[e.FAILED=4]="FAILED"})(XE||(XE={}));var ay;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(ay||(ay={}));var xf=class extends iy{constructor(t,r){super(n=>{t.subscribe(n)}),this.state$=t,this._context=r}get id(){return new Yt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:t,content:r}=this.state$.value;return(0,sy.default)(t?.content??r)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return hr.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:t})=>hr.make(this.id,t))}get anchorCommitIds(){return this.state$.value.log.filter(({type:t})=>t===ay.ANCHOR).map(({cid:t})=>hr.make(this.id,t))}get state(){return(0,sy.default)(this.state$.value)}async sync(t={}){t={sync:Xo.PREFER_CACHE,...t};let r=await this.api.loadStream(this.id,t);this.state$.next(r.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}};i(xf,"Stream");function QE(){return e=>{}}i(QE,"StreamStatic");var lL=function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},fi,oy={anchor:!0,publish:!0,pin:!0,sync:Xo.PREFER_CACHE},fL={sync:Xo.PREFER_CACHE},e7={anchor:!0,publish:!0,throwOnInvalidCommit:!0};function cy(e,t){if(typeof e?.schema=="string")try{hr.fromString(e.schema)}catch{throw new Error("Schema must be a CommitID")}let r={controllers:e?.controllers,family:e?.family,schema:e?.schema?.toString(),tags:e?.tags};if(t)e?.deterministic||(r.unique=tg((0,n7.randomBytes)(12),"base64")),e?.forbidControllerChange&&(r.forbidControllerChange=!0);else{if(e?.deterministic!==void 0||e?.unique!==void 0)throw new Error("Cannot change 'deterministic' or 'unique' properties on existing Streams");if(e?.forbidControllerChange!==void 0)throw new Error("Cannot change 'forbidControllerChange' property on existing Streams")}return Object.keys(r).forEach(n=>r[n]===void 0&&delete r[n]),r}i(cy,"headerFromMetadata");async function t7(e){if(!e.did)throw new Error("No DID provided");return e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`)),e.did}i(t7,"getAuthenticatedDID");async function uy(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(uy,"throwReadOnlyError");var Ha=fi=i(class extends xf{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,r7.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async create(t,r,n,s={}){s={...oy,...s},!n?.deterministic&&s.syncTimeoutSeconds==null&&(s.syncTimeoutSeconds=0);let o=s.asDID?{did:s.asDID}:t,c=await fi.makeGenesis(o,r,n);return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,c,s)}static async createFromGenesis(t,r,n={}){n={...oy,...n},r.header?.unique&&n.syncTimeoutSeconds==null&&(n.syncTimeoutSeconds=0);let s=r.data?await fi._signDagJWS(t,r):r;return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,s,n)}static async deterministic(t,r,n={}){if(n={...oy,...n},r={...r,deterministic:!0},r.family==null&&r.tags==null)throw new Error("Family and/or tags are required when creating a deterministic tile document");let s=await fi.makeGenesis(t,null,r);return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,s,n)}static async load(t,r,n={}){n={...fL,...n};let s=Go.from(r);if(s.type!=fi.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${fi.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async update(t,r,n={}){n={...e7,...n};let s=n.asDID?{did:n.asDID}:this.api,o=await this.makeCommit(s,t,r),c=await this.api.applyCommit(this.id,o,n);this.state$.next(c.state)}async patch(t,r={}){r={...e7,...r};let s={header:cy(this.metadata,!1),data:t,prev:this.tip,id:this.id.cid},o=await fi._signDagJWS(this.api,s),c=await this.api.applyCommit(this.id,o,r);this.state$.next(c.state)}makeReadOnly(){this.update=uy,this.patch=uy,this.sync=uy,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}async makeCommit(t,r,n){let s=await this._makeRawCommit(r,n);return fi._signDagJWS(t,s)}async _makeRawCommit(t,r){r||(r={});let n=cy(r,!1);if(t==null&&(t=this.content),n.controllers){if(n.controllers.length!==1)throw new Error("Exactly one controller must be specified");if(!n.controllers[0])throw new Error("Controller cannot be updated to an undefined value.")}let s=P9.compare(this.content,t),o=this.state.log[0];return{header:n,data:s,prev:this.tip,id:o.cid}}static async makeGenesis(t,r,n){if(n||(n={}),!n.controllers||n.controllers.length===0)if(t.did){let c=await t7(t);n.controllers=[c.hasParent?c.parent:c.id]}else throw new Error("No controllers specified");if(n.controllers?.length!==1)throw new Error("Exactly one controller must be specified");let s=cy(n,!0);if(n?.deterministic&&r)throw new Error("Initial content must be null when creating a deterministic Tile document");if(r==null){let c={header:s};return pg(c),c}let o={data:r,header:s};return fi._signDagJWS(t,o)}static async _signDagJWS(t,r){return(await t7(t)).createDagJWS(r)}},"TileDocument");Ha.STREAM_TYPE_NAME="tile";Ha.STREAM_TYPE_ID=0;Ha=fi=lL([QE()],Ha);var l7=Uo(a7(),1);function _L(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(_L,"_checkPrivateRedeclaration");function EL(e,t){return t.get?t.get.call(e):t.value}i(EL,"_classApplyDescriptorGet");function AL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(AL,"_classApplyDescriptorSet");function u7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(u7,"_classExtractFieldDescriptor");function hy(e,t){var r=u7(e,t,"get");return EL(e,r)}i(hy,"_classPrivateFieldGet");function o7(e,t,r){_L(e,t),t.set(e,r)}i(o7,"_classPrivateFieldInit");function c7(e,t,r){var n=u7(e,t,"set");return AL(e,n,r),r}i(c7,"_classPrivateFieldSet");function SL(e){return typeof e=="string"||hr.isInstance(e)||Yt.isInstance(e)?{streamId:e}:{streamId:e.streamId,genesis:e.genesis}}i(SL,"keyToQuery");function py(e){return typeof e=="string"?Go.from(e).toString():hr.isInstance(e)||Yt.isInstance(e)?e.toString():e.streamId.toString()}i(py,"keyToString");async function vy(e){let t=await Ha.makeGenesis({},null,{...e,deterministic:!0}),r=await Yt.fromGenesis("tile",t);return{genesis:t,streamId:r}}i(vy,"getDeterministicQuery");var xL=i(()=>Promise.resolve([]),"tempBatchLoadFn"),qp=new WeakMap,my=new WeakMap,ec=class extends l7.default{cache(t){if(!hy(this,my))return!1;let r=t.id.toString();return this.clear(r).prime(r,t),!0}async create(t,r,n){let s=await Ha.create(hy(this,qp),t,r,n);return this.cache(s),s}async deterministic(t,r){let n=await vy(t);try{return await super.load(n)}catch{let o=await Ha.createFromGenesis(hy(this,qp),n.genesis,r);return this.cache(o),o}}async load(t){return await super.load(t)}async update(t,r,n,s){let o=py(t);this.clear(o);let c=await this.load({streamId:o});return await c.update(r,n,s),c}constructor(t){super(xL,{cache:!0,cacheKeyFn:py,cacheMap:t.cache!=null&&typeof t.cache!="boolean"?t.cache:void 0}),o7(this,qp,{writable:!0,value:void 0}),o7(this,my,{writable:!0,value:void 0}),this._batchLoadFn=async r=>{t.cache||this.clearAll();let n=await t.ceramic.multiQuery(r.map(SL),t.multiqueryTimeout);return r.map(s=>{let o=py(s),c=n[o];return c||new Error(`Failed to load stream: ${o}`)})},c7(this,qp,t.ceramic),c7(this,my,!!t.cache)}};i(ec,"TileLoader");function TL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(TL,"_checkPrivateRedeclaration");function ML(e,t){return t.get?t.get.call(e):t.value}i(ML,"_classApplyDescriptorGet");function CL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(CL,"_classApplyDescriptorSet");function d7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(d7,"_classExtractFieldDescriptor");function tc(e,t){var r=d7(e,t,"get");return ML(e,r)}i(tc,"_classPrivateFieldGet");function f7(e,t,r){TL(e,t),t.set(e,r)}i(f7,"_classPrivateFieldInit");function gy(e,t,r){var n=d7(e,t,"set");return CL(e,n,r),r}i(gy,"_classPrivateFieldSet");var _u=new WeakMap,Eu=new WeakMap,Au=class{get aliases(){return tc(this,_u)}get loader(){return tc(this,Eu)}getDefinitionID(t){return tc(this,_u).definitions[t]??null}getSchemaURL(t){return tc(this,_u).schemas[t]??null}getTileID(t){return tc(this,_u).tiles[t]??null}async loadTile(t){let r=this.getTileID(t);if(r==null)throw new Error(`Tile alias "${t}" is not defined`);return await tc(this,Eu).load(r)}async createTile(t,r,n={}){let s=this.getSchemaURL(t);if(s==null)throw new Error(`Schema alias "${t}" is not defined`);let{controller:o,...c}=n,f={schema:s};return o!=null&&(f.controllers=[o]),await tc(this,Eu).create(r,f,c)}constructor(t){if(f7(this,_u,{writable:!0,value:void 0}),f7(this,Eu,{writable:!0,value:void 0}),gy(this,_u,t.aliases),t.loader!=null)gy(this,Eu,t.loader);else{if(t.ceramic==null)throw new Error("Invalid DataModel parameters: missing ceramic or loader");gy(this,Eu,new ec({ceramic:t.ceramic,cache:t.cache}))}}};i(Au,"DataModel");function IL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(IL,"_checkPrivateRedeclaration");function kL(e,t){return t.get?t.get.call(e):t.value}i(kL,"_classApplyDescriptorGet");function DL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(DL,"_classApplyDescriptorSet");function h7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(h7,"_classExtractFieldDescriptor");function ks(e,t){var r=h7(e,t,"get");return kL(e,r)}i(ks,"_classPrivateFieldGet");function Kp(e,t,r){IL(e,t),t.set(e,r)}i(Kp,"_classPrivateFieldInit");function Vp(e,t,r){var n=h7(e,t,"set");return DL(e,n,r),r}i(Vp,"_classPrivateFieldSet");var Gp=new WeakMap,rc=new WeakMap,yy=new WeakMap,Wp=new WeakMap,Tf=class{_createValuePromise(){Vp(this,yy,new Promise((t,r)=>{Vp(this,Wp,{resolve:t,reject:r})}))}change(t){return new Promise((r,n)=>{let s=i(async o=>{try{let c=await t(o);r(),this._next(c)}catch(c){n(c),this._next(o)}},"run");ks(this,rc).push({reject:n,run:s}),ks(this,rc).length===1&&this._start()})}async changeContent(t){let r=i(async n=>(await n.update(t(n.content),n.metadata),n),"mutation");return await this.change(r)}async get(){return ks(this,rc).length===0?await ks(this,Gp).call(this):await ks(this,yy)}async _start(){try{let t=await ks(this,Gp).call(this);this._next(t)}catch(t){ks(this,rc).forEach(r=>{r.reject(t)}),Vp(this,rc,[]),ks(this,Wp).reject(t),this._createValuePromise()}}_next(t){let r=ks(this,rc).shift();r==null?this._end(t):r.run(t)}_end(t){ks(this,Wp).resolve(t),this._createValuePromise()}constructor(t){Kp(this,Gp,{writable:!0,value:void 0}),Kp(this,rc,{writable:!0,value:[]}),Kp(this,yy,{writable:!0,value:void 0}),Kp(this,Wp,{writable:!0,value:void 0}),Vp(this,Gp,t),this._createValuePromise()}};i(Tf,"TileProxy");var OL=/^did:([A-Za-z0-9]+):([A-Za-z0-9.\-:_]+)$/;function RL(e){return OL.test(e)}i(RL,"isDIDstring");function NL(e){if(!RL(e))throw new Error(`Invalid DID: ${e}`)}i(NL,"assertDIDstring");function by(e){return NL(e),{controllers:[e],family:"IDX"}}i(by,"getIDXMetadata");function PL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(PL,"_checkPrivateRedeclaration");function BL(e,t){return t.get?t.get.call(e):t.value}i(BL,"_classApplyDescriptorGet");function LL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(LL,"_classApplyDescriptorSet");function p7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(p7,"_classExtractFieldDescriptor");function Ur(e,t){var r=p7(e,t,"get");return BL(e,r)}i(Ur,"_classPrivateFieldGet");function Mf(e,t,r){PL(e,t),t.set(e,r)}i(Mf,"_classPrivateFieldInit");function Zp(e,t,r){var n=p7(e,t,"set");return LL(e,n,r),r}i(Zp,"_classPrivateFieldSet");var la=new WeakMap,Jp=new WeakMap,wy=new WeakMap,Ds=new WeakMap,Yp=new WeakMap,Cf=class{get authenticated(){return Ur(this,la).did!=null}get ceramic(){return Ur(this,la)}get id(){if(Ur(this,Jp)!=null)return Ur(this,Jp);if(Ur(this,la).did==null)throw new Error("Ceramic instance is not authenticated");return Ur(this,la).did.hasParent?Ur(this,la).did.parent:Ur(this,la).did.id}get loader(){return Ur(this,Ds)}get model(){return Ur(this,Yp)}async has(t,r){let n=this.getDefinitionID(t);return await this.getRecordID(n,r)!=null}async get(t,r){let n=this.getDefinitionID(t);return await this.getRecord(n,r)}async getMultiple(t,r){let n=this.getDefinitionID(t),s=await Promise.all(r.map(async f=>{let{genesis:h,streamId:p}=await vy(by(f));return{genesis:h,streamId:p.toString(),paths:[n]}})),o=await Ur(this,la).multiQuery(s),c=[];for(let f of s){let h=o[f.streamId]?.content?.[n],p=h?o[Yt.fromString(h).toString()]:null;c.push(p?.content??null)}return c}async set(t,r,n={}){let s=this.getDefinitionID(t),[o,c]=await this._setRecordOnly(s,r,n);return o&&await this._setReference(n.controller??this.id,s,c),c}async merge(t,r,n={}){let s=this.getDefinitionID(t),o=await this.getRecord(s),c=o?{...o,...r}:r;return await this.setRecord(s,c,n)}async setAll(t,r={}){let n=Object.entries(t).map(async([c,f])=>{let h=this.getDefinitionID(c),[p,v]=await this._setRecordOnly(h,f,r);return[p,h,v]}),o=(await Promise.all(n)).reduce((c,[f,h,p])=>(f&&(c[h]=p.toUrl()),c),{});return await this._setReferences(r.controller??this.id,o),o}async setDefaults(t,r={}){let n=await this.getIndex()??{},s=Object.entries(t).map(([f,h])=>[this.getDefinitionID(f),h]).filter(f=>n[f[0]]==null).map(async([f,h])=>{let p=await this.getDefinition(f),v=await this._createRecord(p,h,r);return{[f]:v.toUrl()}}),c=(await Promise.all(s)).reduce((f,h)=>Object.assign(f,h),{});return await this._setReferences(r.controller??this.id,c),c}async remove(t,r=this.id){await this._getIndexProxy(r).changeContent(n=>(n!=null&&delete n[this.getDefinitionID(t)],n))}async getIndex(t=this.id){let r=this.authenticated&&t===this.id?await this._getIndexProxy(t).get():await this._getIDXDoc(t);return r?r.content:null}iterator(t){let r,n=0;return{[Symbol.asyncIterator](){return this},next:async()=>{if(r==null){let f=await this.getIndex(t);r=Object.entries(f??{})}if(n===r.length)return{done:!0,value:null};let[s,o]=r[n++],c=await Ur(this,Ds).load(o);return{done:!1,value:{key:s,id:o,record:c.content}}}}}async _createIDXDoc(t){return await Ur(this,Ds).deterministic(by(t))}async _getIDXDoc(t){let r=await this._createIDXDoc(t);if(r.content==null||r.metadata.schema==null)return null;if(r.metadata.schema!==mp)throw new Error("Invalid document: schema is not IdentityIndex");return r}async _getOwnIDXDoc(t){let r=await this._createIDXDoc(t);if(r.content==null||r.metadata.schema==null)await r.update({},{schema:mp});else if(r.metadata.schema!==mp)throw new Error("Invalid document: schema is not IdentityIndex");return r}_getIndexProxy(t){let r=Ur(this,wy)[t];return r==null&&(r=new Tf(async()=>await this._getOwnIDXDoc(t)),Ur(this,wy)[t]=r),r}getDefinitionID(t){return Ur(this,Yp).getDefinitionID(t)??t}async getDefinition(t){let r=await Ur(this,Ds).load(t);if(r.metadata.schema!==O9)throw new Error("Invalid document: schema is not Definition");return{...r.content,id:r.id}}async getRecordID(t,r){return(await this.getIndex(r??this.id))?.[t]??null}async getRecordDocument(t,r){let n=await this.getRecordID(t,r);return n?await Ur(this,Ds).load(n):null}async getRecord(t,r){let n=await this.getRecordDocument(t,r);return n?n.content:null}async setRecord(t,r,n={}){let[s,o]=await this._setRecordOnly(t,r,n);return s&&await this._setReference(n.controller??this.id,t,o),o}async _setRecordOnly(t,r,n){let s=await this.getRecordID(t,n.controller??this.id);if(s==null){let o=await this.getDefinition(t),c=await this._createRecord(o,r,n);return[!0,c]}else{let o=await Ur(this,Ds).update(s,r);return[!1,o.id]}}async _createRecord(t,r,{controller:n,pin:s}){let o=await Ur(this,Ds).deterministic({controllers:[n??this.id],family:t.id.toString()},{pin:s});return await o.update(r,{schema:t.schema}),o.id}async _setReference(t,r,n){await this._getIndexProxy(t).changeContent(s=>({...s,[r]:n.toUrl()}))}async _setReferences(t,r){Object.keys(r).length!==0&&await this._getIndexProxy(t).changeContent(n=>({...n,...r}))}constructor(t){Mf(this,la,{writable:!0,value:void 0}),Mf(this,Jp,{writable:!0,value:void 0}),Mf(this,wy,{writable:!0,value:{}}),Mf(this,Ds,{writable:!0,value:void 0}),Mf(this,Yp,{writable:!0,value:void 0});let{cache:r,ceramic:n,id:s,loader:o,model:c}=t;Zp(this,la,n),Zp(this,Jp,s),Zp(this,Ds,o??new ec({ceramic:n,cache:r})),Zp(this,Yp,c instanceof Au?c:new Au({loader:Ur(this,Ds),aliases:c}))}};i(Cf,"DIDDataStore");var nr;(function(e){e.assertEqual=s=>s;function t(s){}i(t,"assertIs"),e.assertIs=t;function r(s){throw new Error}i(r,"assertNever"),e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let c of s)o[c]=c;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(f=>typeof s[s[f]]!="number"),c={};for(let f of o)c[f]=s[f];return e.objectValues(c)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},e.find=(s,o)=>{for(let c of s)if(o(c))return c},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}i(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(nr||(nr={}));var et=nr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qa=i(e=>{switch(typeof e){case"undefined":return et.undefined;case"string":return et.string;case"number":return isNaN(e)?et.nan:et.number;case"boolean":return et.boolean;case"function":return et.function;case"bigint":return et.bigint;case"symbol":return et.symbol;case"object":return Array.isArray(e)?et.array:e===null?et.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?et.promise:typeof Map<"u"&&e instanceof Map?et.map:typeof Set<"u"&&e instanceof Set?et.set:typeof Date<"u"&&e instanceof Date?et.date:et.object;default:return et.unknown}},"getParsedType"),Ke=nr.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"]),FL=i(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Li=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=i(o=>{for(let c of o.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let f=n,h=0;for(;h<c.path.length;){let p=c.path[h];h===c.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(r(c))):f[p]=f[p]||{_errors:[]},f=f[p],h++}}},"processError");return s(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,nr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};i(Li,"ZodError");Li.create=e=>new Li(e);var kf=i((e,t)=>{let r;switch(e.code){case Ke.invalid_type:e.received===et.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,nr.jsonStringifyReplacer)}`;break;case Ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${nr.joinValues(e.keys,", ")}`;break;case Ke.invalid_union:r="Invalid input";break;case Ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${nr.joinValues(e.options)}`;break;case Ke.invalid_enum_value:r=`Invalid enum value. Expected ${nr.joinValues(e.options)}, received '${e.received}'`;break;case Ke.invalid_arguments:r="Invalid function arguments";break;case Ke.invalid_return_type:r="Invalid function return type";break;case Ke.invalid_date:r="Invalid date";break;case Ke.invalid_string:typeof e.validation=="object"?"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}"`:nr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ke.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==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:r="Invalid input";break;case Ke.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==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:r="Invalid input";break;case Ke.custom:r="Invalid input";break;case Ke.invalid_intersection_types:r="Intersection results could not be merged";break;case Ke.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ke.not_finite:r="Number must be finite";break;default:r=t.defaultError,nr.assertNever(e)}return{message:r}},"errorMap"),y7=kf;function UL(e){y7=e}i(UL,"setErrorMap");function Qp(){return y7}i(Qp,"getErrorMap");var e0=i(e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],c={...s,path:o},f="",h=n.filter(p=>!!p).slice().reverse();for(let p of h)f=p(c,{data:t,defaultError:f}).message;return{...s,path:o,message:s.message||f}},"makeIssue"),$L=[];function gt(e,t){let r=e0({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qp(),kf].filter(n=>!!n)});e.common.issues.push(r)}i(gt,"addIssueToContext");var Xr=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return kt;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r)n.push({key:await s.key,value:await s.value});return Xr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:c}=s;if(o.status==="aborted"||c.status==="aborted")return kt;o.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),(typeof c.value<"u"||s.alwaysSet)&&(n[o.value]=c.value)}return{status:t.value,value:n}}};i(Xr,"ParseStatus");var kt=Object.freeze({status:"aborted"}),b7=i(e=>({status:"dirty",value:e}),"DIRTY"),En=i(e=>({status:"valid",value:e}),"OK"),_y=i(e=>e.status==="aborted","isAborted"),Ey=i(e=>e.status==="dirty","isDirty"),t0=i(e=>e.status==="valid","isValid"),r0=i(e=>typeof Promise!==void 0&&e instanceof Promise,"isAsync"),Wt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Wt||(Wt={}));var di=class{constructor(t,r,n,s){this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._path.concat(this._key)}};i(di,"ParseInputLazyPath");var m7=i((e,t)=>{if(t0(t))return{success:!0,data:t.value};{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new Li(e.common.issues);return{success:!1,error:r}}},"handleResult");function Kt(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:i((c,f)=>c.code!=="invalid_type"?{message:f.defaultError}:typeof f.data>"u"?{message:n??f.defaultError}:{message:r??f.defaultError},"customMap"),description:s}}i(Kt,"processCreateParams");var Pt=class{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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return qa(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:qa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xr,ctx:{common:t.parent.common,data:t.data,parsedType:qa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(r0(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 n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qa(t)},o=this._parseSync({data:t,path:s.path,parent:s});return m7(s,o)}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qa(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(r0(s)?s:Promise.resolve(s));return m7(n,o)}refine(t,r){let n=i(s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r,"getIssueProperties");return this._refinement((s,o)=>{let c=t(s),f=i(()=>o.addIssue({code:Ke.custom,...n(s)}),"setError");return typeof Promise<"u"&&c instanceof Promise?c.then(h=>h?!0:(f(),!1)):c?!0:(f(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Vn({schema:this,typeName:xt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return pi.create(this)}nullable(){return Ps.create(this)}nullish(){return this.optional().nullable()}array(){return Kn.create(this)}promise(){return ha.create(this)}or(t){return Za.create([this,t])}and(t){return Ja.create(this,t)}transform(t){return new Vn({schema:this,typeName:xt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ro({innerType:this,defaultValue:r,typeName:xt.ZodDefault})}brand(){return new If({typeName:xt.ZodBranded,type:this,...Kt(void 0)})}catch(t){let r=typeof t=="function"?t:()=>t;return new oc({innerType:this,defaultValue:r,typeName:xt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return no.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};i(Pt,"ZodType");var jL=/^c[^\s-]{8,}$/i,zL=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,HL=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,qL=i(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}:\\d{2})|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),Fi=class extends Pt{constructor(){super(...arguments),this._regex=(t,r,n)=>this.refinement(s=>t.test(s),{validation:r,code:Ke.invalid_string,...Wt.errToObj(n)}),this.nonempty=t=>this.min(1,Wt.errToObj(t)),this.trim=()=>new Fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==et.string){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.string,received:o.parsedType}),kt}let n=new Xr,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let c=t.data.length>o.value,f=t.data.length<o.value;(c||f)&&(s=this._getOrReturnCtx(t,s),c?gt(s,{code:Ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):f&>(s,{code:Ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")HL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"email",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")zL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"uuid",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")jL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"cuid",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),gt(s,{validation:"url",code:Ke.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"regex",code:Ke.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?qL(o).test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:"datetime",message:o.message}),n.dirty()):nr.assertNever(o);return{status:n.value,value:t.data}}_addCheck(t){return new Fi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Wt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Wt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Wt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Wt.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...Wt.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Wt.errToObj(r)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Wt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Wt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Wt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Wt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Wt.errToObj(r)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}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}};i(Fi,"ZodString");Fi.create=e=>{var t;return new Fi({checks:[],typeName:xt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};function KL(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),c=parseInt(t.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}i(KL,"floatSafeRemainder");var rs=class extends Pt{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)!==et.number){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.number,received:o.parsedType}),kt}let n,s=new Xr;for(let o of this._def.checks)o.kind==="int"?nr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?KL(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.not_finite,message:o.message}),s.dirty()):nr.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Wt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Wt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Wt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Wt.toString(r))}setLimit(t,r,n,s){return new rs({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Wt.toString(s)}]})}_addCheck(t){return new rs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Wt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Wt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Wt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Wt.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")}};i(rs,"ZodNumber");rs.create=e=>new rs({checks:[],typeName:xt.ZodNumber,coerce:e?.coerce||!1,...Kt(e)});var Ka=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==et.bigint){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.bigint,received:n.parsedType}),kt}return En(t.data)}};i(Ka,"ZodBigInt");Ka.create=e=>{var t;return new Ka({typeName:xt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};var Va=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=Boolean(t.data)),this._getType(t)!==et.boolean){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.boolean,received:n.parsedType}),kt}return En(t.data)}};i(Va,"ZodBoolean");Va.create=e=>new Va({typeName:xt.ZodBoolean,coerce:e?.coerce||!1,...Kt(e)});var Os=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==et.date){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.date,received:o.parsedType}),kt}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_date}),kt}let n=new Xr,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):nr.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Os({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Wt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Wt.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}};i(Os,"ZodDate");Os.create=e=>new Os({checks:[],coerce:e?.coerce||!1,typeName:xt.ZodDate,...Kt(e)});var nc=class extends Pt{_parse(t){if(this._getType(t)!==et.symbol){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.symbol,received:n.parsedType}),kt}return En(t.data)}};i(nc,"ZodSymbol");nc.create=e=>new nc({typeName:xt.ZodSymbol,...Kt(e)});var Ga=class extends Pt{_parse(t){if(this._getType(t)!==et.undefined){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.undefined,received:n.parsedType}),kt}return En(t.data)}};i(Ga,"ZodUndefined");Ga.create=e=>new Ga({typeName:xt.ZodUndefined,...Kt(e)});var Wa=class extends Pt{_parse(t){if(this._getType(t)!==et.null){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.null,received:n.parsedType}),kt}return En(t.data)}};i(Wa,"ZodNull");Wa.create=e=>new Wa({typeName:xt.ZodNull,...Kt(e)});var fa=class extends Pt{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}};i(fa,"ZodAny");fa.create=e=>new fa({typeName:xt.ZodAny,...Kt(e)});var Rs=class extends Pt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}};i(Rs,"ZodUnknown");Rs.create=e=>new Rs({typeName:xt.ZodUnknown,...Kt(e)});var Ui=class extends Pt{_parse(t){let r=this._getOrReturnCtx(t);return gt(r,{code:Ke.invalid_type,expected:et.never,received:r.parsedType}),kt}};i(Ui,"ZodNever");Ui.create=e=>new Ui({typeName:xt.ZodNever,...Kt(e)});var ic=class extends Pt{_parse(t){if(this._getType(t)!==et.undefined){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.void,received:n.parsedType}),kt}return En(t.data)}};i(ic,"ZodVoid");ic.create=e=>new ic({typeName:xt.ZodVoid,...Kt(e)});var Kn=class extends Pt{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==et.array)return gt(r,{code:Ke.invalid_type,expected:et.array,received:r.parsedType}),kt;if(s.exactLength!==null){let c=r.data.length>s.exactLength.value,f=r.data.length<s.exactLength.value;(c||f)&&(gt(r,{code:c?Ke.too_big:Ke.too_small,minimum:f?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(gt(r,{code:Ke.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(gt(r,{code:Ke.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all(r.data.map((c,f)=>s.type._parseAsync(new di(r,c,r.path,f)))).then(c=>Xr.mergeArray(n,c));let o=r.data.map((c,f)=>s.type._parseSync(new di(r,c,r.path,f)));return Xr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new Kn({...this._def,minLength:{value:t,message:Wt.toString(r)}})}max(t,r){return new Kn({...this._def,maxLength:{value:t,message:Wt.toString(r)}})}length(t,r){return new Kn({...this._def,exactLength:{value:t,message:Wt.toString(r)}})}nonempty(t){return this.min(1,t)}};i(Kn,"ZodArray");Kn.create=(e,t)=>new Kn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:xt.ZodArray,...Kt(t)});var n0;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(n0||(n0={}));var v7=i(e=>t=>new _r({...e,shape:()=>({...e.shape(),...t})}),"AugmentFactory");function Su(e){if(e instanceof _r){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=pi.create(Su(n))}return new _r({...e._def,shape:()=>t})}else return e instanceof Kn?Kn.create(Su(e.element)):e instanceof pi?pi.create(Su(e.unwrap())):e instanceof Ps?Ps.create(Su(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>Su(t))):e}i(Su,"deepPartialify");var _r=class extends Pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=v7(this._def),this.extend=v7(this._def)}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=nr.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==et.object){let p=this._getOrReturnCtx(t);return gt(p,{code:Ke.invalid_type,expected:et.object,received:p.parsedType}),kt}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:c}=this._getCached(),f=[];if(!(this._def.catchall instanceof Ui&&this._def.unknownKeys==="strip"))for(let p in s.data)c.includes(p)||f.push(p);let h=[];for(let p of c){let v=o[p],b=s.data[p];h.push({key:{status:"valid",value:p},value:v._parse(new di(s,b,s.path,p)),alwaysSet:p in s.data})}if(this._def.catchall instanceof Ui){let p=this._def.unknownKeys;if(p==="passthrough")for(let v of f)h.push({key:{status:"valid",value:v},value:{status:"valid",value:s.data[v]}});else if(p==="strict")f.length>0&&(gt(s,{code:Ke.unrecognized_keys,keys:f}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let v of f){let b=s.data[v];h.push({key:{status:"valid",value:v},value:p._parse(new di(s,b,s.path,v)),alwaysSet:v in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let p=[];for(let v of h){let b=await v.key;p.push({key:b,value:await v.value,alwaysSet:v.alwaysSet})}return p}).then(p=>Xr.mergeObjectSync(n,p)):Xr.mergeObjectSync(n,h)}get shape(){return this._def.shape()}strict(t){return Wt.errToObj,new _r({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,c,f;let h=(c=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&c!==void 0?c:n.defaultError;return r.code==="unrecognized_keys"?{message:(f=Wt.errToObj(t).message)!==null&&f!==void 0?f:h}:{message:h}}}:{}})}strip(){return new _r({...this._def,unknownKeys:"strip"})}passthrough(){return new _r({...this._def,unknownKeys:"passthrough"})}setKey(t,r){return this.augment({[t]:r})}merge(t){return new _r({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>n0.mergeShapes(this._def.shape(),t._def.shape()),typeName:xt.ZodObject})}catchall(t){return new _r({...this._def,catchall:t})}pick(t){let r={};return nr.objectKeys(t).map(n=>{this.shape[n]&&(r[n]=this.shape[n])}),new _r({...this._def,shape:()=>r})}omit(t){let r={};return nr.objectKeys(this.shape).map(n=>{nr.objectKeys(t).indexOf(n)===-1&&(r[n]=this.shape[n])}),new _r({...this._def,shape:()=>r})}deepPartial(){return Su(this)}partial(t){let r={};if(t)return nr.objectKeys(this.shape).map(n=>{nr.objectKeys(t).indexOf(n)===-1?r[n]=this.shape[n]:r[n]=this.shape[n].optional()}),new _r({...this._def,shape:()=>r});for(let n in this.shape){let s=this.shape[n];r[n]=s.optional()}return new _r({...this._def,shape:()=>r})}required(t){let r={};if(t)nr.objectKeys(this.shape).map(n=>{if(nr.objectKeys(t).indexOf(n)===-1)r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof pi;)o=o._def.innerType;r[n]=o}});else for(let n in this.shape){let o=this.shape[n];for(;o instanceof pi;)o=o._def.innerType;r[n]=o}return new _r({...this._def,shape:()=>r})}keyof(){return w7(nr.objectKeys(this.shape))}};i(_r,"ZodObject");_r.create=(e,t)=>new _r({shape:()=>e,unknownKeys:"strip",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});_r.strictCreate=(e,t)=>new _r({shape:()=>e,unknownKeys:"strict",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});_r.lazycreate=(e,t)=>new _r({shape:e,unknownKeys:"strip",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});var Za=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let f of o)if(f.result.status==="valid")return f.result;for(let f of o)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;let c=o.map(f=>new Li(f.ctx.common.issues));return gt(r,{code:Ke.invalid_union,unionErrors:c}),kt}if(i(s,"handleResults"),r.common.async)return Promise.all(n.map(async o=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(s);{let o,c=[];for(let h of n){let p={...r,common:{...r.common,issues:[]},parent:null},v=h._parseSync({data:r.data,path:r.path,parent:p});if(v.status==="valid")return v;v.status==="dirty"&&!o&&(o={result:v,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let f=c.map(h=>new Li(h));return gt(r,{code:Ke.invalid_union,unionErrors:f}),kt}}get options(){return this._def.options}};i(Za,"ZodUnion");Za.create=(e,t)=>new Za({options:e,typeName:xt.ZodUnion,...Kt(t)});var Xp=i(e=>e instanceof Xa?Xp(e.schema):e instanceof Vn?Xp(e.innerType()):e instanceof Qa?[e.value]:e instanceof eo?e.options:e instanceof to?Object.keys(e.enum):e instanceof ro?Xp(e._def.innerType):e instanceof Ga?[void 0]:e instanceof Wa?[null]:null,"getDiscriminator"),sc=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.object)return gt(r,{code:Ke.invalid_type,expected:et.object,received:r.parsedType}),kt;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(gt(r,{code:Ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),kt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let c=Xp(o.shape[t]);if(!c)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let f of c){if(s.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);s.set(f,o)}}return new sc({typeName:xt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Kt(n)})}};i(sc,"ZodDiscriminatedUnion");function Ay(e,t){let r=qa(e),n=qa(t);if(e===t)return{valid:!0,data:e};if(r===et.object&&n===et.object){let s=nr.objectKeys(t),o=nr.objectKeys(e).filter(f=>s.indexOf(f)!==-1),c={...e,...t};for(let f of o){let h=Ay(e[f],t[f]);if(!h.valid)return{valid:!1};c[f]=h.data}return{valid:!0,data:c}}else if(r===et.array&&n===et.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let c=e[o],f=t[o],h=Ay(c,f);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return r===et.date&&n===et.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}i(Ay,"mergeValues");var Ja=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=i((o,c)=>{if(_y(o)||_y(c))return kt;let f=Ay(o.value,c.value);return f.valid?((Ey(o)||Ey(c))&&r.dirty(),{status:r.value,value:f.data}):(gt(n,{code:Ke.invalid_intersection_types}),kt)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,c])=>s(o,c)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};i(Ja,"ZodIntersection");Ja.create=(e,t,r)=>new Ja({left:e,right:t,typeName:xt.ZodIntersection,...Kt(r)});var hi=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.array)return gt(n,{code:Ke.invalid_type,expected:et.array,received:n.parsedType}),kt;if(n.data.length<this._def.items.length)return gt(n,{code:Ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),kt;!this._def.rest&&n.data.length>this._def.items.length&&(gt(n,{code:Ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=n.data.map((c,f)=>{let h=this._def.items[f]||this._def.rest;return h?h._parse(new di(n,c,n.path,f)):null}).filter(c=>!!c);return n.common.async?Promise.all(o).then(c=>Xr.mergeArray(r,c)):Xr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new hi({...this._def,rest:t})}};i(hi,"ZodTuple");hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:xt.ZodTuple,rest:null,...Kt(t)})};var Ya=class extends Pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.object)return gt(n,{code:Ke.invalid_type,expected:et.object,received:n.parsedType}),kt;let s=[],o=this._def.keyType,c=this._def.valueType;for(let f in n.data)s.push({key:o._parse(new di(n,f,n.path,f)),value:c._parse(new di(n,n.data[f],n.path,f))});return n.common.async?Xr.mergeObjectAsync(r,s):Xr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Pt?new Ya({keyType:t,valueType:r,typeName:xt.ZodRecord,...Kt(n)}):new Ya({keyType:Fi.create(),valueType:t,typeName:xt.ZodRecord,...Kt(r)})}};i(Ya,"ZodRecord");var ac=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.map)return gt(n,{code:Ke.invalid_type,expected:et.map,received:n.parsedType}),kt;let s=this._def.keyType,o=this._def.valueType,c=[...n.data.entries()].map(([f,h],p)=>({key:s._parse(new di(n,f,n.path,[p,"key"])),value:o._parse(new di(n,h,n.path,[p,"value"]))}));if(n.common.async){let f=new Map;return Promise.resolve().then(async()=>{for(let h of c){let p=await h.key,v=await h.value;if(p.status==="aborted"||v.status==="aborted")return kt;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}})}else{let f=new Map;for(let h of c){let p=h.key,v=h.value;if(p.status==="aborted"||v.status==="aborted")return kt;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}}}};i(ac,"ZodMap");ac.create=(e,t,r)=>new ac({valueType:t,keyType:e,typeName:xt.ZodMap,...Kt(r)});var Ns=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.set)return gt(n,{code:Ke.invalid_type,expected:et.set,received:n.parsedType}),kt;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(gt(n,{code:Ke.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(gt(n,{code:Ke.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function c(h){let p=new Set;for(let v of h){if(v.status==="aborted")return kt;v.status==="dirty"&&r.dirty(),p.add(v.value)}return{status:r.value,value:p}}i(c,"finalizeSet");let f=[...n.data.values()].map((h,p)=>o._parse(new di(n,h,n.path,p)));return n.common.async?Promise.all(f).then(h=>c(h)):c(f)}min(t,r){return new Ns({...this._def,minSize:{value:t,message:Wt.toString(r)}})}max(t,r){return new Ns({...this._def,maxSize:{value:t,message:Wt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};i(Ns,"ZodSet");Ns.create=(e,t)=>new Ns({valueType:e,minSize:null,maxSize:null,typeName:xt.ZodSet,...Kt(t)});var da=class extends Pt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.function)return gt(r,{code:Ke.invalid_type,expected:et.function,received:r.parsedType}),kt;function n(f,h){return e0({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qp(),kf].filter(p=>!!p),issueData:{code:Ke.invalid_arguments,argumentsError:h}})}i(n,"makeArgsIssue");function s(f,h){return e0({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qp(),kf].filter(p=>!!p),issueData:{code:Ke.invalid_return_type,returnTypeError:h}})}i(s,"makeReturnsIssue");let o={errorMap:r.common.contextualErrorMap},c=r.data;return this._def.returns instanceof ha?En(async(...f)=>{let h=new Li([]),p=await this._def.args.parseAsync(f,o).catch(y=>{throw h.addIssue(n(f,y)),h}),v=await c(...p);return await this._def.returns._def.type.parseAsync(v,o).catch(y=>{throw h.addIssue(s(v,y)),h})}):En((...f)=>{let h=this._def.args.safeParse(f,o);if(!h.success)throw new Li([n(f,h.error)]);let p=c(...h.data),v=this._def.returns.safeParse(p,o);if(!v.success)throw new Li([s(p,v.error)]);return v.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new da({...this._def,args:hi.create(t).rest(Rs.create())})}returns(t){return new da({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new da({args:t||hi.create([]).rest(Rs.create()),returns:r||Rs.create(),typeName:xt.ZodFunction,...Kt(n)})}};i(da,"ZodFunction");var Xa=class extends Pt{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})}};i(Xa,"ZodLazy");Xa.create=(e,t)=>new Xa({getter:e,typeName:xt.ZodLazy,...Kt(t)});var Qa=class extends Pt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return gt(r,{code:Ke.invalid_literal,expected:this._def.value}),kt}return{status:"valid",value:t.data}}get value(){return this._def.value}};i(Qa,"ZodLiteral");Qa.create=(e,t)=>new Qa({value:e,typeName:xt.ZodLiteral,...Kt(t)});function w7(e,t){return new eo({values:e,typeName:xt.ZodEnum,...Kt(t)})}i(w7,"createZodEnum");var eo=class extends Pt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return gt(r,{expected:nr.joinValues(n),received:r.parsedType,code:Ke.invalid_type}),kt}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),n=this._def.values;return gt(r,{received:r.data,code:Ke.invalid_enum_value,options:n}),kt}return En(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}};i(eo,"ZodEnum");eo.create=w7;var to=class extends Pt{_parse(t){let r=nr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==et.string&&n.parsedType!==et.number){let s=nr.objectValues(r);return gt(n,{expected:nr.joinValues(s),received:n.parsedType,code:Ke.invalid_type}),kt}if(r.indexOf(t.data)===-1){let s=nr.objectValues(r);return gt(n,{received:n.data,code:Ke.invalid_enum_value,options:s}),kt}return En(t.data)}get enum(){return this._def.values}};i(to,"ZodNativeEnum");to.create=(e,t)=>new to({values:e,typeName:xt.ZodNativeEnum,...Kt(t)});var ha=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.promise&&r.common.async===!1)return gt(r,{code:Ke.invalid_type,expected:et.promise,received:r.parsedType}),kt;let n=r.parsedType===et.promise?r.data:Promise.resolve(r.data);return En(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};i(ha,"ZodPromise");ha.create=(e,t)=>new ha({type:e,typeName:xt.ZodPromise,...Kt(t)});var Vn=class extends Pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null;if(s.type==="preprocess"){let c=s.transform(n.data);return n.common.async?Promise.resolve(c).then(f=>this._def.schema._parseAsync({data:f,path:n.path,parent:n})):this._def.schema._parseSync({data:c,path:n.path,parent:n})}let o={addIssue:c=>{gt(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="refinement"){let c=i(f=>{let h=s.refinement(f,o);if(n.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f},"executeRefinement");if(n.common.async===!1){let f=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return f.status==="aborted"?kt:(f.status==="dirty"&&r.dirty(),c(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(f=>f.status==="aborted"?kt:(f.status==="dirty"&&r.dirty(),c(f.value).then(()=>({status:r.value,value:f.value}))))}if(s.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!t0(c))return c;let f=s.transform(c.value,o);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>t0(c)?Promise.resolve(s.transform(c.value,o)).then(f=>({status:r.value,value:f})):c);nr.assertNever(s)}};i(Vn,"ZodEffects");Vn.create=(e,t,r)=>new Vn({schema:e,typeName:xt.ZodEffects,effect:t,...Kt(r)});Vn.createWithPreprocess=(e,t,r)=>new Vn({schema:t,effect:{type:"preprocess",transform:e},typeName:xt.ZodEffects,...Kt(r)});var pi=class extends Pt{_parse(t){return this._getType(t)===et.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};i(pi,"ZodOptional");pi.create=(e,t)=>new pi({innerType:e,typeName:xt.ZodOptional,...Kt(t)});var Ps=class extends Pt{_parse(t){return this._getType(t)===et.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};i(Ps,"ZodNullable");Ps.create=(e,t)=>new Ps({innerType:e,typeName:xt.ZodNullable,...Kt(t)});var ro=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===et.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};i(ro,"ZodDefault");ro.create=(e,t)=>new ro({innerType:e,typeName:xt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)});var oc=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.innerType._parse({data:r.data,path:r.path,parent:r});return r0(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.defaultValue()})):{status:"valid",value:n.status==="valid"?n.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}};i(oc,"ZodCatch");oc.create=(e,t)=>new oc({innerType:e,typeName:xt.ZodCatch,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)});var cc=class extends Pt{_parse(t){if(this._getType(t)!==et.nan){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.nan,received:n.parsedType}),kt}return{status:"valid",value:t.data}}};i(cc,"ZodNaN");cc.create=e=>new cc({typeName:xt.ZodNaN,...Kt(e)});var VL=Symbol("zod_brand"),If=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};i(If,"ZodBranded");var no=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return i(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?kt:o.status==="dirty"?(r.dirty(),b7(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})},"handleAsync")();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?kt:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new no({in:t,out:r,typeName:xt.ZodPipeline})}};i(no,"ZodPipeline");var _7=i((e,t={},r)=>e?fa.create().superRefine((n,s)=>{if(!e(n)){let o=typeof t=="function"?t(n):t,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:r})}}):fa.create(),"custom"),GL={object:_r.lazycreate},xt;(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"})(xt||(xt={}));var WL=i((e,t={message:`Input not instance of ${e.name}`})=>_7(r=>r instanceof e,t,!0),"instanceOfType"),E7=Fi.create,A7=rs.create,ZL=cc.create,JL=Ka.create,S7=Va.create,YL=Os.create,XL=nc.create,QL=Ga.create,eF=Wa.create,tF=fa.create,rF=Rs.create,nF=Ui.create,iF=ic.create,sF=Kn.create,aF=_r.create,oF=_r.strictCreate,cF=Za.create,uF=sc.create,lF=Ja.create,fF=hi.create,dF=Ya.create,hF=ac.create,pF=Ns.create,mF=da.create,vF=Xa.create,gF=Qa.create,yF=eo.create,bF=to.create,wF=ha.create,g7=Vn.create,_F=pi.create,EF=Ps.create,AF=Vn.createWithPreprocess,SF=no.create,xF=i(()=>E7().optional(),"ostring"),TF=i(()=>A7().optional(),"onumber"),MF=i(()=>S7().optional(),"oboolean"),CF={string:e=>Fi.create({...e,coerce:!0}),number:e=>rs.create({...e,coerce:!0}),boolean:e=>Va.create({...e,coerce:!0}),bigint:e=>Ka.create({...e,coerce:!0}),date:e=>Os.create({...e,coerce:!0})},IF=kt,ne=Object.freeze({__proto__:null,defaultErrorMap:kf,setErrorMap:UL,getErrorMap:Qp,makeIssue:e0,EMPTY_PATH:$L,addIssueToContext:gt,ParseStatus:Xr,INVALID:kt,DIRTY:b7,OK:En,isAborted:_y,isDirty:Ey,isValid:t0,isAsync:r0,get util(){return nr},ZodParsedType:et,getParsedType:qa,ZodType:Pt,ZodString:Fi,ZodNumber:rs,ZodBigInt:Ka,ZodBoolean:Va,ZodDate:Os,ZodSymbol:nc,ZodUndefined:Ga,ZodNull:Wa,ZodAny:fa,ZodUnknown:Rs,ZodNever:Ui,ZodVoid:ic,ZodArray:Kn,get objectUtil(){return n0},ZodObject:_r,ZodUnion:Za,ZodDiscriminatedUnion:sc,ZodIntersection:Ja,ZodTuple:hi,ZodRecord:Ya,ZodMap:ac,ZodSet:Ns,ZodFunction:da,ZodLazy:Xa,ZodLiteral:Qa,ZodEnum:eo,ZodNativeEnum:to,ZodPromise:ha,ZodEffects:Vn,ZodTransformer:Vn,ZodOptional:pi,ZodNullable:Ps,ZodDefault:ro,ZodCatch:oc,ZodNaN:cc,BRAND:VL,ZodBranded:If,ZodPipeline:no,custom:_7,Schema:Pt,ZodSchema:Pt,late:GL,get ZodFirstPartyTypeKind(){return xt},coerce:CF,any:tF,array:sF,bigint:JL,boolean:S7,date:YL,discriminatedUnion:uF,effect:g7,enum:yF,function:mF,instanceof:WL,intersection:lF,lazy:vF,literal:gF,map:hF,nan:ZL,nativeEnum:bF,never:nF,null:eF,nullable:EF,number:A7,object:aF,oboolean:MF,onumber:TF,optional:_F,ostring:xF,pipeline:SF,preprocess:AF,promise:wF,record:dF,set:pF,strictObject:oF,string:E7,symbol:XL,transformer:g7,tuple:fF,undefined:QL,union:cF,unknown:rF,void:iF,NEVER:IF,ZodIssueCode:Ke,quotelessJson:FL,ZodError:Li});var T7=ne.array(ne.string().or(ne.record(ne.any()))),SZ=ne.object({type:ne.string().optional(),narrative:ne.string().optional()}),a0=ne.string().or(ne.object({id:ne.string(),type:ne.string(),caption:ne.string().optional()})),kF=ne.object({type:ne.string().min(1).or(ne.string().array().nonempty()),latitude:ne.number(),longitude:ne.number()}),DF=ne.object({type:ne.string().min(1).or(ne.string().array().nonempty()),addressCountry:ne.string().optional(),addressCountryCode:ne.string().optional(),addressRegion:ne.string().optional(),addressLocality:ne.string().optional(),streetAddress:ne.string().optional(),postOfficeBoxNumber:ne.string().optional(),postalCode:ne.string().optional(),geo:kF.optional()}),OF=ne.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(ne.string()),M7=ne.object({type:ne.string().min(1).or(ne.string().array().nonempty()),identifier:ne.string(),identifierType:OF}),Df=ne.string().or(ne.object({id:ne.string().optional(),type:ne.string().or(ne.string().array().nonempty().optional()),name:ne.string().optional(),url:ne.string().optional(),phone:ne.string().optional(),description:ne.string().optional(),endorsement:ne.any().array().optional(),image:a0.optional(),email:ne.string().email().optional(),address:DF.optional(),otherIdentifier:M7.array().optional(),official:ne.string().optional(),parentOrg:ne.any().optional(),familyName:ne.string().optional(),givenName:ne.string().optional(),additionalName:ne.string().optional(),patronymicName:ne.string().optional(),honorificPrefix:ne.string().optional(),honorificSuffix:ne.string().optional(),familyNamePrefix:ne.string().optional(),dateOfBirth:ne.string().optional()}).catchall(ne.any())),Sy=ne.object({id:ne.string().optional()}).catchall(ne.any()),RF=ne.object({type:ne.string(),id:ne.string()}),NF=ne.object({id:ne.string(),type:ne.string()}),PF=ne.object({id:ne.string(),type:ne.string()}).catchall(ne.any()),i0=ne.object({"@context":T7,id:ne.string().optional(),type:ne.string().array().nonempty(),issuer:Df,issuanceDate:ne.string(),expirationDate:ne.string().optional(),credentialSubject:Sy.or(Sy.array()),credentialStatus:RF.optional(),credentialSchema:NF.array().optional(),refreshService:PF.optional()}).catchall(ne.any()),io=ne.object({type:ne.string(),created:ne.string(),challenge:ne.string().optional(),domain:ne.string().optional(),nonce:ne.string().optional(),proofPurpose:ne.string(),verificationMethod:ne.string(),jws:ne.string().optional()}).catchall(ne.any()),s0=i0.extend({proof:io.or(io.array())}),BF=ne.object({"@context":T7,id:ne.string().optional(),type:ne.string().array().nonempty(),verifiableCredential:s0.or(s0.array()).optional(),holder:ne.string().optional()}).catchall(ne.any()),xZ=BF.extend({proof:io.or(io.array())}),LF=ne.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(ne.string()),o0=ne.object({type:ne.string().array().nonempty(),targetCode:ne.string().optional(),targetDescription:ne.string().optional(),targetName:ne.string(),targetFramework:ne.string().optional(),targetType:LF.optional(),targetUrl:ne.string()}),FF=ne.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),UF=FF.or(ne.string()),$F=ne.object({id:ne.string().optional(),narrative:ne.string().optional()}).catchall(ne.any()),jF=ne.object({id:ne.string(),type:ne.string().array().nonempty(),endorsementComment:ne.string().optional()}),zF=i0.extend({credentialSubject:jF,proof:io.or(io.array()).optional()}),HF=ne.object({id:ne.string(),"@language":ne.string().optional(),version:ne.string().optional()}),qF=ne.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(ne.string()),KF=ne.object({id:ne.string(),type:ne.string().array().nonempty(),alignment:o0.array().optional(),description:ne.string().optional(),level:ne.string().optional(),name:ne.string(),points:ne.string().optional()}).catchall(ne.any()),VF=ne.object({id:ne.string(),type:ne.string().array().nonempty(),alignment:o0.array().optional(),allowedValue:ne.string().array().optional(),name:ne.string(),requiredLevel:ne.string().optional(),requiredValue:ne.string().optional(),resultType:qF,rubricCriterionLevel:KF.array().optional(),valueMax:ne.string().optional(),valueMin:ne.string().optional()}).catchall(ne.any()),GF=ne.object({id:ne.string().optional(),type:ne.string().array().nonempty(),alignment:o0.array().optional(),achievementType:UF.optional(),creator:Df.optional(),creditsAvailable:ne.number().optional(),criteria:$F,description:ne.string(),endorsement:zF.array().optional(),fieldOfStudy:ne.string().optional(),humanCode:ne.string().optional(),image:a0.optional(),"@language":ne.string().optional(),name:ne.string(),otherIdentifier:M7.array().optional(),related:HF.array().optional(),resultDescription:VF.array().optional(),specialization:ne.string().optional(),tag:ne.string().array().optional(),version:ne.string().optional()}).catchall(ne.any()),WF=ne.object({type:ne.string(),hashed:ne.boolean(),identityHash:ne.string(),identityType:ne.string(),salt:ne.string().optional()}),ZF=ne.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),JF=ne.object({type:ne.string().array().nonempty(),achievedLevel:ne.string().optional(),alignment:o0.array().optional(),resultDescription:ne.string().optional(),status:ZF.optional(),value:ne.string().optional()}).catchall(ne.any()),x7=ne.object({id:ne.string().optional(),type:ne.string().array().nonempty(),activityEndDate:ne.string().optional(),activityStartDate:ne.string().optional(),creditsEarned:ne.number().optional(),achievement:GF.optional(),identifier:WF.array().optional(),image:a0.optional(),licenseNumber:ne.string().optional(),narrative:ne.string().optional(),result:JF.array().optional(),role:ne.string().optional(),source:Df.optional(),term:ne.string().optional()}).catchall(ne.any()),YF=ne.object({id:ne.string().optional(),type:ne.string().array().nonempty(),narrative:ne.string().optional(),name:ne.string().optional(),description:ne.string().optional(),genre:ne.string().optional(),audience:ne.string().optional()}).catchall(ne.any()),XF=i0.extend({name:ne.string().optional(),description:ne.string().optional(),image:a0.optional(),credentialSubject:x7.or(x7.array()),endorsement:i0.array().optional(),evidence:YF.array().optional()}),MZ=XF.extend({proof:io.or(io.array())}),IZ=ne.object({checks:ne.string().array(),warnings:ne.string().array(),errors:ne.string().array()}),C7=ne.enum(["Success","Failed","Error"]),kZ=C7.enum,DZ=ne.object({check:ne.string(),status:C7,message:ne.string().optional(),details:ne.string().optional()}),OZ=ne.object({title:ne.string().optional(),createdAt:ne.string().optional(),issuer:Df.optional(),issuee:Df.optional(),credentialSubject:Sy.optional()}),uc=ne.object({id:ne.string(),uri:ne.string()}).catchall(ne.any()),PZ=ne.object({limit:ne.number(),cursor:ne.string().optional()}),I7=ne.object({cursor:ne.string().optional(),hasMore:ne.boolean()}),QF=ne.object({kty:ne.string(),crv:ne.string(),x:ne.string(),y:ne.string().optional(),n:ne.string().optional(),d:ne.string()}),eU=ne.object({alg:ne.string(),iv:ne.string(),tag:ne.string(),epk:QF.partial().optional(),kid:ne.string().optional(),apv:ne.string().optional(),apu:ne.string().optional()}),tU=ne.object({header:eU,encrypted_key:ne.string()}),rU=ne.object({protected:ne.string(),iv:ne.string(),ciphertext:ne.string(),tag:ne.string(),aad:ne.string().optional(),recipients:tU.array().optional()}),k7=ne.object({encryptedRecord:rU,fields:ne.string().array()}).catchall(ne.any()),LZ=I7.extend({records:k7.array()}),nU=k7.extend({id:ne.string()}),FZ=I7.extend({records:nU.array()}),xy=ne.object({profileId:ne.string().min(3).max(40),displayName:ne.string().default(""),did:ne.string(),email:ne.string().optional(),image:ne.string().optional(),isServiceProfile:ne.boolean().default(!1).optional(),notificationsWebhook:ne.string().url().startsWith("https://").optional()}),$Z=ne.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),jZ=ne.object({uri:ne.string(),to:ne.string(),from:ne.string(),sent:ne.string().datetime(),received:ne.string().datetime().optional()}),iU=ne.enum(["DRAFT","LIVE"]),zZ=ne.object({uri:ne.string(),name:ne.string().optional(),type:ne.string().optional(),category:ne.string().optional(),status:iU.optional()}),HZ=ne.object({to:xy,from:ne.string(),received:ne.string().optional()}),sU=ne.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),aU=ne.object({title:ne.string().optional(),body:ne.string().optional()}),oU=ne.object({vcUris:ne.array(ne.string()).optional(),vpUris:ne.array(ne.string()).optional()}),qZ=ne.object({type:sU,to:xy.partial().and(ne.object({did:ne.string()})),from:xy.partial().and(ne.object({did:ne.string()})),message:aU.optional(),data:oU.optional(),sent:ne.string().datetime().optional()}),KZ=ne.object({endpoint:ne.string(),name:ne.string(),did:ne.string().optional()}),VZ=ne.object({ttlSeconds:ne.number().optional(),totalUses:ne.number().optional()}),cU=ne.object({endpoint:ne.string()}),GZ=ne.object({signingAuthority:cU,relationship:ne.object({name:ne.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:ne.string()})});var uU=Object.create,ud=Object.defineProperty,lU=Object.getOwnPropertyDescriptor,Yb=Object.getOwnPropertyNames,fU=Object.getPrototypeOf,dU=Object.prototype.hasOwnProperty,a=i((e,t)=>ud(e,"name",{value:t,configurable:!0}),"__name"),Qy=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),pr=i((e,t)=>i(function(){return e&&(t=(0,e[Yb(e)[0]])(e=0)),t},"__init"),"__esm"),ze=i((e,t)=>i(function(){return t||(0,e[Yb(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require2"),"__commonJS"),Sr=i((e,t)=>{for(var r in t)ud(e,r,{get:t[r],enumerable:!0})},"__export"),GA=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Yb(t))!dU.call(e,s)&&s!==r&&ud(e,s,{get:()=>t[s],enumerable:!(n=lU(t,s))||n.enumerable});return e},"__copyProps"),rr=i((e,t,r)=>(r=e!=null?uU(fU(e)):{},GA(t||!e||!e.__esModule?ud(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),Ty=i(e=>GA(ud({},"__esModule",{value:!0}),e),"__toCommonJS"),hU=ze({"../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"(e,t){(function(){var r,n="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,v="__lodash_placeholder__",b=1,y=2,_=4,T=1,O=2,R=1,P=2,K=4,U=8,j=16,V=32,G=64,I=128,H=256,se=512,ue=30,me="...",q=800,w=16,x=1,m=2,d=3,g=1/0,S=9007199254740991,D=17976931348623157e292,C=0/0,E=4294967295,B=E-1,$=E>>>1,k=[["ary",I],["bind",R],["bindKey",P],["curry",U],["curryRight",j],["flip",se],["partial",V],["partialRight",G],["rearg",H]],F="[object Arguments]",he="[object Array]",N="[object AsyncFunction]",Y="[object Boolean]",J="[object Date]",M="[object DOMException]",z="[object Error]",te="[object Function]",oe="[object GeneratorFunction]",ge="[object Map]",ke="[object Number]",_e="[object Null]",fe="[object Object]",Ce="[object Promise]",pe="[object Proxy]",we="[object RegExp]",Q="[object Set]",ve="[object String]",Me="[object Symbol]",Ue="[object Undefined]",Re="[object WeakMap]",je="[object WeakSet]",rt="[object ArrayBuffer]",le="[object DataView]",ce="[object Float32Array]",Z="[object Float64Array]",re="[object Int8Array]",ye="[object Int16Array]",Se="[object Int32Array]",xe="[object Uint8Array]",De="[object Uint8ClampedArray]",Mt="[object Uint16Array]",qe="[object Uint32Array]",He=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,dt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,Dr=/[&<>"']/g,ct=RegExp(mt.source),ut=RegExp(Dr.source),lr=/<%-([\s\S]+?)%>/g,lt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,it=/^\w*$/,Ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qt=/[\\^$.*+?()[\]{}|]/g,st=RegExp(Qt.source),Qe=/^\s+/,or=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ze=/\{\n\/\* \[wrapped with (.+)\] \*/,cr=/,? & /,ot=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Et=/[()=,{}\[\]\/\s]/,Sn=/\\(\\)?/g,At=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,fn=/^[-+]0x[0-9a-f]+$/i,er=/^0b[01]+$/i,tr=/^\[object .+?Constructor\]$/,tn=/^0o[0-7]+$/i,rn=/^(?:0|[1-9]\d*)$/,Or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hr=/($^)/,nn=/['\n\r\u2028\u2029\\]/g,xn="\\ud800-\\udfff",Ai="\\u0300-\\u036f",Si="\\ufe20-\\ufe2f",xi="\\u20d0-\\u20ff",Pn=Ai+Si+xi,dn="\\u2700-\\u27bf",Xn="a-z\\xdf-\\xf6\\xf8-\\xff",Bn="\\xac\\xb1\\xd7\\xf7",Ti="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mi="\\u2000-\\u206f",Ci=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gs="A-Z\\xc0-\\xd6\\xd8-\\xde",Ws="\\ufe0e\\ufe0f",Zs=Bn+Ti+Mi+Ci,Ca="['\u2019]",Td="["+xn+"]",dl="["+Zs+"]",To="["+Pn+"]",hl="\\d+",Md="["+dn+"]",pl="["+Xn+"]",ml="[^"+xn+Zs+hl+dn+Xn+Gs+"]",Mo="\\ud83c[\\udffb-\\udfff]",Cd="(?:"+To+"|"+Mo+")",vl="[^"+xn+"]",Js="(?:\\ud83c[\\udde6-\\uddff]){2}",Vi="[\\ud800-\\udbff][\\udc00-\\udfff]",Ys="["+Gs+"]",ms="\\u200d",gl="(?:"+pl+"|"+ml+")",Id="(?:"+Ys+"|"+ml+")",yl="(?:"+Ca+"(?:d|ll|m|re|s|t|ve))?",bl="(?:"+Ca+"(?:D|LL|M|RE|S|T|VE))?",wl=Cd+"?",_l="["+Ws+"]?",El="(?:"+ms+"(?:"+[vl,Js,Vi].join("|")+")"+_l+wl+")*",vs="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pc=_l+wl+El,Dd="(?:"+[Md,Js,Vi].join("|")+")"+Pc,Al="(?:"+[vl+To+"?",To,Js,Vi,Td].join("|")+")",Sl=RegExp(Ca,"g"),Od=RegExp(To,"g"),xl=RegExp(Mo+"(?="+Mo+")|"+Al+Pc,"g"),Tl=RegExp([Ys+"?"+pl+"+"+yl+"(?="+[dl,Ys,"$"].join("|")+")",Id+"+"+bl+"(?="+[dl,Ys+gl,"$"].join("|")+")",Ys+"?"+gl+"+"+yl,Ys+"+"+bl,kd,vs,hl,Dd].join("|"),"g"),Rd=RegExp("["+ms+xn+Pn+Ws+"]"),Co=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bc=-1,yr={};yr[ce]=yr[Z]=yr[re]=yr[ye]=yr[Se]=yr[xe]=yr[De]=yr[Mt]=yr[qe]=!0,yr[F]=yr[he]=yr[rt]=yr[Y]=yr[le]=yr[J]=yr[z]=yr[te]=yr[ge]=yr[ke]=yr[fe]=yr[we]=yr[Q]=yr[ve]=yr[Re]=!1;var mr={};mr[F]=mr[he]=mr[rt]=mr[le]=mr[Y]=mr[J]=mr[ce]=mr[Z]=mr[re]=mr[ye]=mr[Se]=mr[ge]=mr[ke]=mr[fe]=mr[we]=mr[Q]=mr[ve]=mr[Me]=mr[xe]=mr[De]=mr[Mt]=mr[qe]=!0,mr[z]=mr[te]=mr[Re]=!1;var ie={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Te={"&":"&","<":"<",">":">",'"':""","'":"'"},Pe={"&":"&","<":"<",">":">",""":'"',"'":"'"},ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qr=parseFloat,sn=parseInt,Tn=typeof global=="object"&&global&&global.Object===Object&&global,hn=typeof self=="object"&&self&&self.Object===Object&&self,Lr=Tn||hn||Function("return this")(),gs=typeof e=="object"&&e&&!e.nodeType&&e,ys=gs&&typeof t=="object"&&t&&!t.nodeType&&t,Ml=ys&&ys.exports===gs,Lc=Ml&&Tn.process,pn=function(){try{var Ee=ys&&ys.require&&ys.require("util").types;return Ee||Lc&&Lc.binding&&Lc.binding("util")}catch{}}(),Io=pn&&pn.isArrayBuffer,M6=pn&&pn.isDate,C6=pn&&pn.isMap,I6=pn&&pn.isRegExp,k6=pn&&pn.isSet,D6=pn&&pn.isTypedArray;function Ln(Ee,Ne,Ie){switch(Ie.length){case 0:return Ee.call(Ne);case 1:return Ee.call(Ne,Ie[0]);case 2:return Ee.call(Ne,Ie[0],Ie[1]);case 3:return Ee.call(Ne,Ie[0],Ie[1],Ie[2])}return Ee.apply(Ne,Ie)}i(Ln,"apply"),a(Ln,"apply");function O6(Ee,Ne,Ie,ft){for(var It=-1,fr=Ee==null?0:Ee.length;++It<fr;){var Vr=Ee[It];Ne(ft,Vr,Ie(Vr),Ee)}return ft}i(O6,"arrayAggregator"),a(O6,"arrayAggregator");function Qn(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft&&Ne(Ee[Ie],Ie,Ee)!==!1;);return Ee}i(Qn,"arrayEach"),a(Qn,"arrayEach");function R6(Ee,Ne){for(var Ie=Ee==null?0:Ee.length;Ie--&&Ne(Ee[Ie],Ie,Ee)!==!1;);return Ee}i(R6,"arrayEachRight"),a(R6,"arrayEachRight");function Wm(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft;)if(!Ne(Ee[Ie],Ie,Ee))return!1;return!0}i(Wm,"arrayEvery"),a(Wm,"arrayEvery");function Xs(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length,It=0,fr=[];++Ie<ft;){var Vr=Ee[Ie];Ne(Vr,Ie,Ee)&&(fr[It++]=Vr)}return fr}i(Xs,"arrayFilter"),a(Xs,"arrayFilter");function Cl(Ee,Ne){var Ie=Ee==null?0:Ee.length;return!!Ie&&ko(Ee,Ne,0)>-1}i(Cl,"arrayIncludes"),a(Cl,"arrayIncludes");function Pd(Ee,Ne,Ie){for(var ft=-1,It=Ee==null?0:Ee.length;++ft<It;)if(Ie(Ne,Ee[ft]))return!0;return!1}i(Pd,"arrayIncludesWith"),a(Pd,"arrayIncludesWith");function Tr(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length,It=Array(ft);++Ie<ft;)It[Ie]=Ne(Ee[Ie],Ie,Ee);return It}i(Tr,"arrayMap"),a(Tr,"arrayMap");function Qs(Ee,Ne){for(var Ie=-1,ft=Ne.length,It=Ee.length;++Ie<ft;)Ee[It+Ie]=Ne[Ie];return Ee}i(Qs,"arrayPush"),a(Qs,"arrayPush");function Bd(Ee,Ne,Ie,ft){var It=-1,fr=Ee==null?0:Ee.length;for(ft&&fr&&(Ie=Ee[++It]);++It<fr;)Ie=Ne(Ie,Ee[It],It,Ee);return Ie}i(Bd,"arrayReduce"),a(Bd,"arrayReduce");function N6(Ee,Ne,Ie,ft){var It=Ee==null?0:Ee.length;for(ft&&It&&(Ie=Ee[--It]);It--;)Ie=Ne(Ie,Ee[It],It,Ee);return Ie}i(N6,"arrayReduceRight"),a(N6,"arrayReduceRight");function Ld(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft;)if(Ne(Ee[Ie],Ie,Ee))return!0;return!1}i(Ld,"arraySome"),a(Ld,"arraySome");var Ek=Fd("length");function P6(Ee){return Ee.split("")}i(P6,"asciiToArray"),a(P6,"asciiToArray");function B6(Ee){return Ee.match(ot)||[]}i(B6,"asciiWords"),a(B6,"asciiWords");function Zm(Ee,Ne,Ie){var ft;return Ie(Ee,function(It,fr,Vr){if(Ne(It,fr,Vr))return ft=fr,!1}),ft}i(Zm,"baseFindKey"),a(Zm,"baseFindKey");function Il(Ee,Ne,Ie,ft){for(var It=Ee.length,fr=Ie+(ft?1:-1);ft?fr--:++fr<It;)if(Ne(Ee[fr],fr,Ee))return fr;return-1}i(Il,"baseFindIndex"),a(Il,"baseFindIndex");function ko(Ee,Ne,Ie){return Ne===Ne?V6(Ee,Ne,Ie):Il(Ee,Jm,Ie)}i(ko,"baseIndexOf"),a(ko,"baseIndexOf");function L6(Ee,Ne,Ie,ft){for(var It=Ie-1,fr=Ee.length;++It<fr;)if(ft(Ee[It],Ne))return It;return-1}i(L6,"baseIndexOfWith"),a(L6,"baseIndexOfWith");function Jm(Ee){return Ee!==Ee}i(Jm,"baseIsNaN"),a(Jm,"baseIsNaN");function Ym(Ee,Ne){var Ie=Ee==null?0:Ee.length;return Ie?$d(Ee,Ne)/Ie:C}i(Ym,"baseMean"),a(Ym,"baseMean");function Fd(Ee){return function(Ne){return Ne==null?r:Ne[Ee]}}i(Fd,"baseProperty"),a(Fd,"baseProperty");function Ud(Ee){return function(Ne){return Ee==null?r:Ee[Ne]}}i(Ud,"basePropertyOf"),a(Ud,"basePropertyOf");function Xm(Ee,Ne,Ie,ft,It){return It(Ee,function(fr,Vr,wr){Ie=ft?(ft=!1,fr):Ne(Ie,fr,Vr,wr)}),Ie}i(Xm,"baseReduce"),a(Xm,"baseReduce");function F6(Ee,Ne){var Ie=Ee.length;for(Ee.sort(Ne);Ie--;)Ee[Ie]=Ee[Ie].value;return Ee}i(F6,"baseSortBy"),a(F6,"baseSortBy");function $d(Ee,Ne){for(var Ie,ft=-1,It=Ee.length;++ft<It;){var fr=Ne(Ee[ft]);fr!==r&&(Ie=Ie===r?fr:Ie+fr)}return Ie}i($d,"baseSum"),a($d,"baseSum");function jd(Ee,Ne){for(var Ie=-1,ft=Array(Ee);++Ie<Ee;)ft[Ie]=Ne(Ie);return ft}i(jd,"baseTimes"),a(jd,"baseTimes");function U6(Ee,Ne){return Tr(Ne,function(Ie){return[Ie,Ee[Ie]]})}i(U6,"baseToPairs"),a(U6,"baseToPairs");function Qm(Ee){return Ee&&Ee.slice(0,n1(Ee)+1).replace(Qe,"")}i(Qm,"baseTrim"),a(Qm,"baseTrim");function Fn(Ee){return function(Ne){return Ee(Ne)}}i(Fn,"baseUnary"),a(Fn,"baseUnary");function zd(Ee,Ne){return Tr(Ne,function(Ie){return Ee[Ie]})}i(zd,"baseValues"),a(zd,"baseValues");function Fc(Ee,Ne){return Ee.has(Ne)}i(Fc,"cacheHas"),a(Fc,"cacheHas");function e1(Ee,Ne){for(var Ie=-1,ft=Ee.length;++Ie<ft&&ko(Ne,Ee[Ie],0)>-1;);return Ie}i(e1,"charsStartIndex"),a(e1,"charsStartIndex");function t1(Ee,Ne){for(var Ie=Ee.length;Ie--&&ko(Ne,Ee[Ie],0)>-1;);return Ie}i(t1,"charsEndIndex"),a(t1,"charsEndIndex");function $6(Ee,Ne){for(var Ie=Ee.length,ft=0;Ie--;)Ee[Ie]===Ne&&++ft;return ft}i($6,"countHolders"),a($6,"countHolders");var Ak=Ud(ie),Sk=Ud(Te);function j6(Ee){return"\\"+ht[Ee]}i(j6,"escapeStringChar"),a(j6,"escapeStringChar");function z6(Ee,Ne){return Ee==null?r:Ee[Ne]}i(z6,"getValue"),a(z6,"getValue");function Do(Ee){return Rd.test(Ee)}i(Do,"hasUnicode"),a(Do,"hasUnicode");function H6(Ee){return Co.test(Ee)}i(H6,"hasUnicodeWord"),a(H6,"hasUnicodeWord");function q6(Ee){for(var Ne,Ie=[];!(Ne=Ee.next()).done;)Ie.push(Ne.value);return Ie}i(q6,"iteratorToArray"),a(q6,"iteratorToArray");function Hd(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft,It){Ie[++Ne]=[It,ft]}),Ie}i(Hd,"mapToArray"),a(Hd,"mapToArray");function r1(Ee,Ne){return function(Ie){return Ee(Ne(Ie))}}i(r1,"overArg"),a(r1,"overArg");function ea(Ee,Ne){for(var Ie=-1,ft=Ee.length,It=0,fr=[];++Ie<ft;){var Vr=Ee[Ie];(Vr===Ne||Vr===v)&&(Ee[Ie]=v,fr[It++]=Ie)}return fr}i(ea,"replaceHolders"),a(ea,"replaceHolders");function kl(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft){Ie[++Ne]=ft}),Ie}i(kl,"setToArray"),a(kl,"setToArray");function K6(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft){Ie[++Ne]=[ft,ft]}),Ie}i(K6,"setToPairs"),a(K6,"setToPairs");function V6(Ee,Ne,Ie){for(var ft=Ie-1,It=Ee.length;++ft<It;)if(Ee[ft]===Ne)return ft;return-1}i(V6,"strictIndexOf"),a(V6,"strictIndexOf");function G6(Ee,Ne,Ie){for(var ft=Ie+1;ft--;)if(Ee[ft]===Ne)return ft;return ft}i(G6,"strictLastIndexOf"),a(G6,"strictLastIndexOf");function Oo(Ee){return Do(Ee)?W6(Ee):Ek(Ee)}i(Oo,"stringSize"),a(Oo,"stringSize");function Ii(Ee){return Do(Ee)?Z6(Ee):P6(Ee)}i(Ii,"stringToArray"),a(Ii,"stringToArray");function n1(Ee){for(var Ne=Ee.length;Ne--&&or.test(Ee.charAt(Ne)););return Ne}i(n1,"trimmedEndIndex"),a(n1,"trimmedEndIndex");var xk=Ud(Pe);function W6(Ee){for(var Ne=xl.lastIndex=0;xl.test(Ee);)++Ne;return Ne}i(W6,"unicodeSize"),a(W6,"unicodeSize");function Z6(Ee){return Ee.match(xl)||[]}i(Z6,"unicodeToArray"),a(Z6,"unicodeToArray");function J6(Ee){return Ee.match(Tl)||[]}i(J6,"unicodeWords"),a(J6,"unicodeWords");var Tk=a(i(function Ee(Ne){Ne=Ne==null?Lr:Ia.defaults(Lr.Object(),Ne,Ia.pick(Lr,Nd));var Ie=Ne.Array,ft=Ne.Date,It=Ne.Error,fr=Ne.Function,Vr=Ne.Math,wr=Ne.Object,i1=Ne.RegExp,Mk=Ne.String,ki=Ne.TypeError,qd=Ie.prototype,Ck=fr.prototype,Uc=wr.prototype,Kd=Ne["__core-js_shared__"],Vd=Ck.toString,vr=Uc.hasOwnProperty,Ik=0,Y6=function(){var u=/[^.]+$/.exec(Kd&&Kd.keys&&Kd.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Gd=Uc.toString,kk=Vd.call(wr),Dk=Lr._,Ok=i1("^"+Vd.call(vr).replace(Qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wd=Ml?Ne.Buffer:r,ka=Ne.Symbol,Zd=Ne.Uint8Array,X6=Wd?Wd.allocUnsafe:r,Jd=r1(wr.getPrototypeOf,wr),Q6=wr.create,e3=Uc.propertyIsEnumerable,Yd=qd.splice,t3=ka?ka.isConcatSpreadable:r,Dl=ka?ka.iterator:r,Ro=ka?ka.toStringTag:r,Xd=function(){try{var u=Ba(wr,"defineProperty");return u({},"",{}),u}catch{}}(),Rk=Ne.clearTimeout!==Lr.clearTimeout&&Ne.clearTimeout,Nk=ft&&ft.now!==Lr.Date.now&&ft.now,Pk=Ne.setTimeout!==Lr.setTimeout&&Ne.setTimeout,Qd=Vr.ceil,eh=Vr.floor,s1=wr.getOwnPropertySymbols,Bk=Wd?Wd.isBuffer:r,r3=Ne.isFinite,Lk=qd.join,Fk=r1(wr.keys,wr),Gr=Vr.max,mn=Vr.min,Uk=ft.now,$k=Ne.parseInt,n3=Vr.random,jk=qd.reverse,a1=Ba(Ne,"DataView"),Ol=Ba(Ne,"Map"),o1=Ba(Ne,"Promise"),$c=Ba(Ne,"Set"),Rl=Ba(Ne,"WeakMap"),Nl=Ba(wr,"create"),th=Rl&&new Rl,jc={},zk=La(a1),Hk=La(Ol),qk=La(o1),Kk=La($c),Vk=La(Rl),rh=ka?ka.prototype:r,Pl=rh?rh.valueOf:r,i3=rh?rh.toString:r;function X(u){if(kr(u)&&!Rt(u)&&!(u instanceof Vt)){if(u instanceof ei)return u;if(vr.call(u,"__wrapped__"))return sv(u)}return new ei(u)}i(X,"lodash"),a(X,"lodash");var zc=function(){function u(){}return i(u,"object"),a(u,"object"),function(l){if(!Cr(l))return{};if(Q6)return Q6(l);u.prototype=l;var A=new u;return u.prototype=r,A}}();function Bl(){}i(Bl,"baseLodash"),a(Bl,"baseLodash");function ei(u,l){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}i(ei,"LodashWrapper"),a(ei,"LodashWrapper"),X.templateSettings={escape:lr,evaluate:lt,interpolate:nt,variable:"",imports:{_:X}},X.prototype=Bl.prototype,X.prototype.constructor=X,ei.prototype=zc(Bl.prototype),ei.prototype.constructor=ei;function Vt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=E,this.__views__=[]}i(Vt,"LazyWrapper"),a(Vt,"LazyWrapper");function s3(){var u=new Vt(this.__wrapped__);return u.__actions__=Mn(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Mn(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Mn(this.__views__),u}i(s3,"lazyClone"),a(s3,"lazyClone");function a3(){if(this.__filtered__){var u=new Vt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}i(a3,"lazyReverse"),a(a3,"lazyReverse");function o3(){var u=this.__wrapped__.value(),l=this.__dir__,A=Rt(u),L=l<0,W=A?u.length:0,ee=_5(0,W,this.__views__),de=ee.start,be=ee.end,Ae=be-de,Be=L?be:de-1,Le=this.__iteratees__,$e=Le.length,Je=0,pt=mn(Ae,this.__takeCount__);if(!A||!L&&W==Ae&&pt==Ae)return I1(u,this.__actions__);var St=[];e:for(;Ae--&&Je<pt;){Be+=l;for(var Lt=-1,_t=u[Be];++Lt<$e;){var Ht=Le[Lt],Gt=Ht.iteratee,jn=Ht.type,bn=Gt(_t);if(jn==m)_t=bn;else if(!bn){if(jn==x)continue e;break e}}St[Je++]=_t}return St}i(o3,"lazyValue"),a(o3,"lazyValue"),Vt.prototype=zc(Bl.prototype),Vt.prototype.constructor=Vt;function Da(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(Da,"Hash"),a(Da,"Hash");function c3(){this.__data__=Nl?Nl(null):{},this.size=0}i(c3,"hashClear"),a(c3,"hashClear");function u3(u){var l=this.has(u)&&delete this.__data__[u];return this.size-=l?1:0,l}i(u3,"hashDelete"),a(u3,"hashDelete");function l3(u){var l=this.__data__;if(Nl){var A=l[u];return A===h?r:A}return vr.call(l,u)?l[u]:r}i(l3,"hashGet"),a(l3,"hashGet");function f3(u){var l=this.__data__;return Nl?l[u]!==r:vr.call(l,u)}i(f3,"hashHas"),a(f3,"hashHas");function d3(u,l){var A=this.__data__;return this.size+=this.has(u)?0:1,A[u]=Nl&&l===r?h:l,this}i(d3,"hashSet"),a(d3,"hashSet"),Da.prototype.clear=c3,Da.prototype.delete=u3,Da.prototype.get=l3,Da.prototype.has=f3,Da.prototype.set=d3;function bs(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(bs,"ListCache"),a(bs,"ListCache");function h3(){this.__data__=[],this.size=0}i(h3,"listCacheClear"),a(h3,"listCacheClear");function p3(u){var l=this.__data__,A=Ll(l,u);if(A<0)return!1;var L=l.length-1;return A==L?l.pop():Yd.call(l,A,1),--this.size,!0}i(p3,"listCacheDelete"),a(p3,"listCacheDelete");function m3(u){var l=this.__data__,A=Ll(l,u);return A<0?r:l[A][1]}i(m3,"listCacheGet"),a(m3,"listCacheGet");function v3(u){return Ll(this.__data__,u)>-1}i(v3,"listCacheHas"),a(v3,"listCacheHas");function g3(u,l){var A=this.__data__,L=Ll(A,u);return L<0?(++this.size,A.push([u,l])):A[L][1]=l,this}i(g3,"listCacheSet"),a(g3,"listCacheSet"),bs.prototype.clear=h3,bs.prototype.delete=p3,bs.prototype.get=m3,bs.prototype.has=v3,bs.prototype.set=g3;function ws(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(ws,"MapCache"),a(ws,"MapCache");function y3(){this.size=0,this.__data__={hash:new Da,map:new(Ol||bs),string:new Da}}i(y3,"mapCacheClear"),a(y3,"mapCacheClear");function b3(u){var l=Zl(this,u).delete(u);return this.size-=l?1:0,l}i(b3,"mapCacheDelete"),a(b3,"mapCacheDelete");function w3(u){return Zl(this,u).get(u)}i(w3,"mapCacheGet"),a(w3,"mapCacheGet");function _3(u){return Zl(this,u).has(u)}i(_3,"mapCacheHas"),a(_3,"mapCacheHas");function E3(u,l){var A=Zl(this,u),L=A.size;return A.set(u,l),this.size+=A.size==L?0:1,this}i(E3,"mapCacheSet"),a(E3,"mapCacheSet"),ws.prototype.clear=y3,ws.prototype.delete=b3,ws.prototype.get=w3,ws.prototype.has=_3,ws.prototype.set=E3;function Oa(u){var l=-1,A=u==null?0:u.length;for(this.__data__=new ws;++l<A;)this.add(u[l])}i(Oa,"SetCache"),a(Oa,"SetCache");function A3(u){return this.__data__.set(u,h),this}i(A3,"setCacheAdd"),a(A3,"setCacheAdd");function S3(u){return this.__data__.has(u)}i(S3,"setCacheHas"),a(S3,"setCacheHas"),Oa.prototype.add=Oa.prototype.push=A3,Oa.prototype.has=S3;function Di(u){var l=this.__data__=new bs(u);this.size=l.size}i(Di,"Stack"),a(Di,"Stack");function x3(){this.__data__=new bs,this.size=0}i(x3,"stackClear"),a(x3,"stackClear");function T3(u){var l=this.__data__,A=l.delete(u);return this.size=l.size,A}i(T3,"stackDelete"),a(T3,"stackDelete");function M3(u){return this.__data__.get(u)}i(M3,"stackGet"),a(M3,"stackGet");function C3(u){return this.__data__.has(u)}i(C3,"stackHas"),a(C3,"stackHas");function I3(u,l){var A=this.__data__;if(A instanceof bs){var L=A.__data__;if(!Ol||L.length<s-1)return L.push([u,l]),this.size=++A.size,this;A=this.__data__=new ws(L)}return A.set(u,l),this.size=A.size,this}i(I3,"stackSet"),a(I3,"stackSet"),Di.prototype.clear=x3,Di.prototype.delete=T3,Di.prototype.get=M3,Di.prototype.has=C3,Di.prototype.set=I3;function c1(u,l){var A=Rt(u),L=!A&&Lo(u),W=!A&&!L&&Fa(u),ee=!A&&!L&&!W&&Yc(u),de=A||L||W||ee,be=de?jd(u.length,Mk):[],Ae=be.length;for(var Be in u)(l||vr.call(u,Be))&&!(de&&(Be=="length"||W&&(Be=="offset"||Be=="parent")||ee&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||Ss(Be,Ae)))&&be.push(Be);return be}i(c1,"arrayLikeKeys"),a(c1,"arrayLikeKeys");function u1(u){var l=u.length;return l?u[dh(0,l-1)]:r}i(u1,"arraySample"),a(u1,"arraySample");function k3(u,l){return Yl(Mn(u),Ra(l,0,u.length))}i(k3,"arraySampleSize"),a(k3,"arraySampleSize");function D3(u){return Yl(Mn(u))}i(D3,"arrayShuffle"),a(D3,"arrayShuffle");function nh(u,l,A){(A!==r&&!Oi(u[l],A)||A===r&&!(l in u))&&_s(u,l,A)}i(nh,"assignMergeValue"),a(nh,"assignMergeValue");function Hc(u,l,A){var L=u[l];(!(vr.call(u,l)&&Oi(L,A))||A===r&&!(l in u))&&_s(u,l,A)}i(Hc,"assignValue"),a(Hc,"assignValue");function Ll(u,l){for(var A=u.length;A--;)if(Oi(u[A][0],l))return A;return-1}i(Ll,"assocIndexOf"),a(Ll,"assocIndexOf");function O3(u,l,A,L){return Na(u,function(W,ee,de){l(L,W,A(W),de)}),L}i(O3,"baseAggregator"),a(O3,"baseAggregator");function l1(u,l){return u&&Wi(l,Wr(l),u)}i(l1,"baseAssign"),a(l1,"baseAssign");function R3(u,l){return u&&Wi(l,In(l),u)}i(R3,"baseAssignIn"),a(R3,"baseAssignIn");function _s(u,l,A){l=="__proto__"&&Xd?Xd(u,l,{configurable:!0,enumerable:!0,value:A,writable:!0}):u[l]=A}i(_s,"baseAssignValue"),a(_s,"baseAssignValue");function ih(u,l){for(var A=-1,L=l.length,W=Ie(L),ee=u==null;++A<L;)W[A]=ee?r:Rh(u,l[A]);return W}i(ih,"baseAt"),a(ih,"baseAt");function Ra(u,l,A){return u===u&&(A!==r&&(u=u<=A?u:A),l!==r&&(u=u>=l?u:l)),u}i(Ra,"baseClamp"),a(Ra,"baseClamp");function ti(u,l,A,L,W,ee){var de,be=l&b,Ae=l&y,Be=l&_;if(A&&(de=W?A(u,L,W,ee):A(u)),de!==r)return de;if(!Cr(u))return u;var Le=Rt(u);if(Le){if(de=A5(u),!be)return Mn(u,de)}else{var $e=gn(u),Je=$e==te||$e==oe;if(Fa(u))return D1(u,be);if($e==fe||$e==F||Je&&!W){if(de=Ae||Je?{}:Y1(u),!be)return Ae?d5(u,R3(de,u)):f5(u,l1(de,u))}else{if(!mr[$e])return W?u:{};de=S5(u,$e,be)}}ee||(ee=new Di);var pt=ee.get(u);if(pt)return pt;ee.set(u,de),w4(u)?u.forEach(function(_t){de.add(ti(_t,l,A,_t,u,ee))}):d4(u)&&u.forEach(function(_t,Ht){de.set(Ht,ti(_t,l,A,Ht,u,ee))});var St=Be?Ae?Ah:Eh:Ae?In:Wr,Lt=Le?r:St(u);return Qn(Lt||u,function(_t,Ht){Lt&&(Ht=_t,_t=u[Ht]),Hc(de,Ht,ti(_t,l,A,Ht,u,ee))}),de}i(ti,"baseClone"),a(ti,"baseClone");function N3(u){var l=Wr(u);return function(A){return f1(A,u,l)}}i(N3,"baseConforms"),a(N3,"baseConforms");function f1(u,l,A){var L=A.length;if(u==null)return!L;for(u=wr(u);L--;){var W=A[L],ee=l[W],de=u[W];if(de===r&&!(W in u)||!ee(de))return!1}return!0}i(f1,"baseConformsTo"),a(f1,"baseConformsTo");function d1(u,l,A){if(typeof u!="function")throw new ki(c);return Jl(function(){u.apply(r,A)},l)}i(d1,"baseDelay"),a(d1,"baseDelay");function qc(u,l,A,L){var W=-1,ee=Cl,de=!0,be=u.length,Ae=[],Be=l.length;if(!be)return Ae;A&&(l=Tr(l,Fn(A))),L?(ee=Pd,de=!1):l.length>=s&&(ee=Fc,de=!1,l=new Oa(l));e:for(;++W<be;){var Le=u[W],$e=A==null?Le:A(Le);if(Le=L||Le!==0?Le:0,de&&$e===$e){for(var Je=Be;Je--;)if(l[Je]===$e)continue e;Ae.push(Le)}else ee(l,$e,L)||Ae.push(Le)}return Ae}i(qc,"baseDifference"),a(qc,"baseDifference");var Na=B1(Gi),P3=B1(sh,!0);function B3(u,l){var A=!0;return Na(u,function(L,W,ee){return A=!!l(L,W,ee),A}),A}i(B3,"baseEvery"),a(B3,"baseEvery");function Fl(u,l,A){for(var L=-1,W=u.length;++L<W;){var ee=u[L],de=l(ee);if(de!=null&&(be===r?de===de&&!$n(de):A(de,be)))var be=de,Ae=ee}return Ae}i(Fl,"baseExtremum"),a(Fl,"baseExtremum");function L3(u,l,A,L){var W=u.length;for(A=Nt(A),A<0&&(A=-A>W?0:W+A),L=L===r||L>W?W:Nt(L),L<0&&(L+=W),L=A>L?0:Tv(L);A<L;)u[A++]=l;return u}i(L3,"baseFill"),a(L3,"baseFill");function h1(u,l){var A=[];return Na(u,function(L,W,ee){l(L,W,ee)&&A.push(L)}),A}i(h1,"baseFilter"),a(h1,"baseFilter");function Jr(u,l,A,L,W){var ee=-1,de=u.length;for(A||(A=T5),W||(W=[]);++ee<de;){var be=u[ee];l>0&&A(be)?l>1?Jr(be,l-1,A,L,W):Qs(W,be):L||(W[W.length]=be)}return W}i(Jr,"baseFlatten"),a(Jr,"baseFlatten");var p1=L1(),F3=L1(!0);function Gi(u,l){return u&&p1(u,l,Wr)}i(Gi,"baseForOwn"),a(Gi,"baseForOwn");function sh(u,l){return u&&F3(u,l,Wr)}i(sh,"baseForOwnRight"),a(sh,"baseForOwnRight");function Ul(u,l){return Xs(l,function(A){return xs(u[A])})}i(Ul,"baseFunctions"),a(Ul,"baseFunctions");function Pa(u,l){l=ra(l,u);for(var A=0,L=l.length;u!=null&&A<L;)u=u[Zi(l[A++])];return A&&A==L?u:r}i(Pa,"baseGet"),a(Pa,"baseGet");function m1(u,l,A){var L=l(u);return Rt(u)?L:Qs(L,A(u))}i(m1,"baseGetAllKeys"),a(m1,"baseGetAllKeys");function vn(u){return u==null?u===r?Ue:_e:Ro&&Ro in wr(u)?b5(u):O5(u)}i(vn,"baseGetTag"),a(vn,"baseGetTag");function ah(u,l){return u>l}i(ah,"baseGt"),a(ah,"baseGt");function U3(u,l){return u!=null&&vr.call(u,l)}i(U3,"baseHas"),a(U3,"baseHas");function $3(u,l){return u!=null&&l in wr(u)}i($3,"baseHasIn"),a($3,"baseHasIn");function j3(u,l,A){return u>=mn(l,A)&&u<Gr(l,A)}i(j3,"baseInRange"),a(j3,"baseInRange");function oh(u,l,A){for(var L=A?Pd:Cl,W=u[0].length,ee=u.length,de=ee,be=Ie(ee),Ae=1/0,Be=[];de--;){var Le=u[de];de&&l&&(Le=Tr(Le,Fn(l))),Ae=mn(Le.length,Ae),be[de]=!A&&(l||W>=120&&Le.length>=120)?new Oa(de&&Le):r}Le=u[0];var $e=-1,Je=be[0];e:for(;++$e<W&&Be.length<Ae;){var pt=Le[$e],St=l?l(pt):pt;if(pt=A||pt!==0?pt:0,!(Je?Fc(Je,St):L(Be,St,A))){for(de=ee;--de;){var Lt=be[de];if(!(Lt?Fc(Lt,St):L(u[de],St,A)))continue e}Je&&Je.push(St),Be.push(pt)}}return Be}i(oh,"baseIntersection"),a(oh,"baseIntersection");function z3(u,l,A,L){return Gi(u,function(W,ee,de){l(L,A(W),ee,de)}),L}i(z3,"baseInverter"),a(z3,"baseInverter");function Kc(u,l,A){l=ra(l,u),u=tv(u,l);var L=u==null?u:u[Zi(ni(l))];return L==null?r:Ln(L,u,A)}i(Kc,"baseInvoke"),a(Kc,"baseInvoke");function v1(u){return kr(u)&&vn(u)==F}i(v1,"baseIsArguments"),a(v1,"baseIsArguments");function H3(u){return kr(u)&&vn(u)==rt}i(H3,"baseIsArrayBuffer"),a(H3,"baseIsArrayBuffer");function q3(u){return kr(u)&&vn(u)==J}i(q3,"baseIsDate"),a(q3,"baseIsDate");function Vc(u,l,A,L,W){return u===l?!0:u==null||l==null||!kr(u)&&!kr(l)?u!==u&&l!==l:K3(u,l,A,L,Vc,W)}i(Vc,"baseIsEqual"),a(Vc,"baseIsEqual");function K3(u,l,A,L,W,ee){var de=Rt(u),be=Rt(l),Ae=de?he:gn(u),Be=be?he:gn(l);Ae=Ae==F?fe:Ae,Be=Be==F?fe:Be;var Le=Ae==fe,$e=Be==fe,Je=Ae==Be;if(Je&&Fa(u)){if(!Fa(l))return!1;de=!0,Le=!1}if(Je&&!Le)return ee||(ee=new Di),de||Yc(u)?G1(u,l,A,L,W,ee):g5(u,l,Ae,A,L,W,ee);if(!(A&T)){var pt=Le&&vr.call(u,"__wrapped__"),St=$e&&vr.call(l,"__wrapped__");if(pt||St){var Lt=pt?u.value():u,_t=St?l.value():l;return ee||(ee=new Di),W(Lt,_t,A,L,ee)}}return Je?(ee||(ee=new Di),y5(u,l,A,L,W,ee)):!1}i(K3,"baseIsEqualDeep"),a(K3,"baseIsEqualDeep");function V3(u){return kr(u)&&gn(u)==ge}i(V3,"baseIsMap"),a(V3,"baseIsMap");function ch(u,l,A,L){var W=A.length,ee=W,de=!L;if(u==null)return!ee;for(u=wr(u);W--;){var be=A[W];if(de&&be[2]?be[1]!==u[be[0]]:!(be[0]in u))return!1}for(;++W<ee;){be=A[W];var Ae=be[0],Be=u[Ae],Le=be[1];if(de&&be[2]){if(Be===r&&!(Ae in u))return!1}else{var $e=new Di;if(L)var Je=L(Be,Le,Ae,u,l,$e);if(!(Je===r?Vc(Le,Be,T|O,L,$e):Je))return!1}}return!0}i(ch,"baseIsMatch"),a(ch,"baseIsMatch");function g1(u){if(!Cr(u)||C5(u))return!1;var l=xs(u)?Ok:tr;return l.test(La(u))}i(g1,"baseIsNative"),a(g1,"baseIsNative");function G3(u){return kr(u)&&vn(u)==we}i(G3,"baseIsRegExp"),a(G3,"baseIsRegExp");function W3(u){return kr(u)&&gn(u)==Q}i(W3,"baseIsSet"),a(W3,"baseIsSet");function Z3(u){return kr(u)&&rf(u.length)&&!!yr[vn(u)]}i(Z3,"baseIsTypedArray"),a(Z3,"baseIsTypedArray");function y1(u){return typeof u=="function"?u:u==null?kn:typeof u=="object"?Rt(u)?_1(u[0],u[1]):w1(u):Rv(u)}i(y1,"baseIteratee"),a(y1,"baseIteratee");function uh(u){if(!Zc(u))return Fk(u);var l=[];for(var A in wr(u))vr.call(u,A)&&A!="constructor"&&l.push(A);return l}i(uh,"baseKeys"),a(uh,"baseKeys");function J3(u){if(!Cr(u))return D5(u);var l=Zc(u),A=[];for(var L in u)L=="constructor"&&(l||!vr.call(u,L))||A.push(L);return A}i(J3,"baseKeysIn"),a(J3,"baseKeysIn");function lh(u,l){return u<l}i(lh,"baseLt"),a(lh,"baseLt");function b1(u,l){var A=-1,L=Cn(u)?Ie(u.length):[];return Na(u,function(W,ee,de){L[++A]=l(W,ee,de)}),L}i(b1,"baseMap"),a(b1,"baseMap");function w1(u){var l=Sh(u);return l.length==1&&l[0][2]?Q1(l[0][0],l[0][1]):function(A){return A===u||ch(A,u,l)}}i(w1,"baseMatches"),a(w1,"baseMatches");function _1(u,l){return xh(u)&&X1(l)?Q1(Zi(u),l):function(A){var L=Rh(A,u);return L===r&&L===l?Nh(A,u):Vc(l,L,T|O)}}i(_1,"baseMatchesProperty"),a(_1,"baseMatchesProperty");function $l(u,l,A,L,W){u!==l&&p1(l,function(ee,de){if(W||(W=new Di),Cr(ee))Y3(u,l,de,A,$l,L,W);else{var be=L?L(Mh(u,de),ee,de+"",u,l,W):r;be===r&&(be=ee),nh(u,de,be)}},In)}i($l,"baseMerge"),a($l,"baseMerge");function Y3(u,l,A,L,W,ee,de){var be=Mh(u,A),Ae=Mh(l,A),Be=de.get(Ae);if(Be){nh(u,A,Be);return}var Le=ee?ee(be,Ae,A+"",u,l,de):r,$e=Le===r;if($e){var Je=Rt(Ae),pt=!Je&&Fa(Ae),St=!Je&&!pt&&Yc(Ae);Le=Ae,Je||pt||St?Rt(be)?Le=be:Rr(be)?Le=Mn(be):pt?($e=!1,Le=D1(Ae,!0)):St?($e=!1,Le=O1(Ae,!0)):Le=[]:Jc(Ae)||Lo(Ae)?(Le=be,Lo(be)?Le=Mv(be):(!Cr(be)||xs(be))&&(Le=Y1(Ae))):$e=!1}$e&&(de.set(Ae,Le),W(Le,Ae,L,ee,de),de.delete(Ae)),nh(u,A,Le)}i(Y3,"baseMergeDeep"),a(Y3,"baseMergeDeep");function E1(u,l){var A=u.length;if(!!A)return l+=l<0?A:0,Ss(l,A)?u[l]:r}i(E1,"baseNth"),a(E1,"baseNth");function A1(u,l,A){l.length?l=Tr(l,function(ee){return Rt(ee)?function(de){return Pa(de,ee.length===1?ee[0]:ee)}:ee}):l=[kn];var L=-1;l=Tr(l,Fn(wt()));var W=b1(u,function(ee,de,be){var Ae=Tr(l,function(Be){return Be(ee)});return{criteria:Ae,index:++L,value:ee}});return F6(W,function(ee,de){return l5(ee,de,A)})}i(A1,"baseOrderBy"),a(A1,"baseOrderBy");function X3(u,l){return S1(u,l,function(A,L){return Nh(u,L)})}i(X3,"basePick"),a(X3,"basePick");function S1(u,l,A){for(var L=-1,W=l.length,ee={};++L<W;){var de=l[L],be=Pa(u,de);A(be,de)&&Gc(ee,ra(de,u),be)}return ee}i(S1,"basePickBy"),a(S1,"basePickBy");function Q3(u){return function(l){return Pa(l,u)}}i(Q3,"basePropertyDeep"),a(Q3,"basePropertyDeep");function fh(u,l,A,L){var W=L?L6:ko,ee=-1,de=l.length,be=u;for(u===l&&(l=Mn(l)),A&&(be=Tr(u,Fn(A)));++ee<de;)for(var Ae=0,Be=l[ee],Le=A?A(Be):Be;(Ae=W(be,Le,Ae,L))>-1;)be!==u&&Yd.call(be,Ae,1),Yd.call(u,Ae,1);return u}i(fh,"basePullAll"),a(fh,"basePullAll");function x1(u,l){for(var A=u?l.length:0,L=A-1;A--;){var W=l[A];if(A==L||W!==ee){var ee=W;Ss(W)?Yd.call(u,W,1):mh(u,W)}}return u}i(x1,"basePullAt"),a(x1,"basePullAt");function dh(u,l){return u+eh(n3()*(l-u+1))}i(dh,"baseRandom"),a(dh,"baseRandom");function e5(u,l,A,L){for(var W=-1,ee=Gr(Qd((l-u)/(A||1)),0),de=Ie(ee);ee--;)de[L?ee:++W]=u,u+=A;return de}i(e5,"baseRange"),a(e5,"baseRange");function hh(u,l){var A="";if(!u||l<1||l>S)return A;do l%2&&(A+=u),l=eh(l/2),l&&(u+=u);while(l);return A}i(hh,"baseRepeat"),a(hh,"baseRepeat");function Ft(u,l){return rv(ev(u,l,kn),u+"")}i(Ft,"baseRest"),a(Ft,"baseRest");function t5(u){return u1(Fo(u))}i(t5,"baseSample"),a(t5,"baseSample");function r5(u,l){var A=Fo(u);return Yl(A,Ra(l,0,A.length))}i(r5,"baseSampleSize"),a(r5,"baseSampleSize");function Gc(u,l,A,L){if(!Cr(u))return u;l=ra(l,u);for(var W=-1,ee=l.length,de=ee-1,be=u;be!=null&&++W<ee;){var Ae=Zi(l[W]),Be=A;if(Ae==="__proto__"||Ae==="constructor"||Ae==="prototype")return u;if(W!=de){var Le=be[Ae];Be=L?L(Le,Ae,be):r,Be===r&&(Be=Cr(Le)?Le:Ss(l[W+1])?[]:{})}Hc(be,Ae,Be),be=be[Ae]}return u}i(Gc,"baseSet"),a(Gc,"baseSet");var n5=th?function(u,l){return th.set(u,l),u}:kn,Gk=Xd?function(u,l){return Xd(u,"toString",{configurable:!0,enumerable:!1,value:Ph(l),writable:!0})}:kn;function i5(u){return Yl(Fo(u))}i(i5,"baseShuffle"),a(i5,"baseShuffle");function ri(u,l,A){var L=-1,W=u.length;l<0&&(l=-l>W?0:W+l),A=A>W?W:A,A<0&&(A+=W),W=l>A?0:A-l>>>0,l>>>=0;for(var ee=Ie(W);++L<W;)ee[L]=u[L+l];return ee}i(ri,"baseSlice"),a(ri,"baseSlice");function s5(u,l){var A;return Na(u,function(L,W,ee){return A=l(L,W,ee),!A}),!!A}i(s5,"baseSome"),a(s5,"baseSome");function jl(u,l,A){var L=0,W=u==null?L:u.length;if(typeof l=="number"&&l===l&&W<=$){for(;L<W;){var ee=L+W>>>1,de=u[ee];de!==null&&!$n(de)&&(A?de<=l:de<l)?L=ee+1:W=ee}return W}return ph(u,l,kn,A)}i(jl,"baseSortedIndex"),a(jl,"baseSortedIndex");function ph(u,l,A,L){var W=0,ee=u==null?0:u.length;if(ee===0)return 0;l=A(l);for(var de=l!==l,be=l===null,Ae=$n(l),Be=l===r;W<ee;){var Le=eh((W+ee)/2),$e=A(u[Le]),Je=$e!==r,pt=$e===null,St=$e===$e,Lt=$n($e);if(de)var _t=L||St;else Be?_t=St&&(L||Je):be?_t=St&&Je&&(L||!pt):Ae?_t=St&&Je&&!pt&&(L||!Lt):pt||Lt?_t=!1:_t=L?$e<=l:$e<l;_t?W=Le+1:ee=Le}return mn(ee,B)}i(ph,"baseSortedIndexBy"),a(ph,"baseSortedIndexBy");function T1(u,l){for(var A=-1,L=u.length,W=0,ee=[];++A<L;){var de=u[A],be=l?l(de):de;if(!A||!Oi(be,Ae)){var Ae=be;ee[W++]=de===0?0:de}}return ee}i(T1,"baseSortedUniq"),a(T1,"baseSortedUniq");function M1(u){return typeof u=="number"?u:$n(u)?C:+u}i(M1,"baseToNumber"),a(M1,"baseToNumber");function Un(u){if(typeof u=="string")return u;if(Rt(u))return Tr(u,Un)+"";if($n(u))return i3?i3.call(u):"";var l=u+"";return l=="0"&&1/u==-g?"-0":l}i(Un,"baseToString"),a(Un,"baseToString");function ta(u,l,A){var L=-1,W=Cl,ee=u.length,de=!0,be=[],Ae=be;if(A)de=!1,W=Pd;else if(ee>=s){var Be=l?null:Zk(u);if(Be)return kl(Be);de=!1,W=Fc,Ae=new Oa}else Ae=l?[]:be;e:for(;++L<ee;){var Le=u[L],$e=l?l(Le):Le;if(Le=A||Le!==0?Le:0,de&&$e===$e){for(var Je=Ae.length;Je--;)if(Ae[Je]===$e)continue e;l&&Ae.push($e),be.push(Le)}else W(Ae,$e,A)||(Ae!==be&&Ae.push($e),be.push(Le))}return be}i(ta,"baseUniq"),a(ta,"baseUniq");function mh(u,l){return l=ra(l,u),u=tv(u,l),u==null||delete u[Zi(ni(l))]}i(mh,"baseUnset"),a(mh,"baseUnset");function C1(u,l,A,L){return Gc(u,l,A(Pa(u,l)),L)}i(C1,"baseUpdate"),a(C1,"baseUpdate");function zl(u,l,A,L){for(var W=u.length,ee=L?W:-1;(L?ee--:++ee<W)&&l(u[ee],ee,u););return A?ri(u,L?0:ee,L?ee+1:W):ri(u,L?ee+1:0,L?W:ee)}i(zl,"baseWhile"),a(zl,"baseWhile");function I1(u,l){var A=u;return A instanceof Vt&&(A=A.value()),Bd(l,function(L,W){return W.func.apply(W.thisArg,Qs([L],W.args))},A)}i(I1,"baseWrapperValue"),a(I1,"baseWrapperValue");function vh(u,l,A){var L=u.length;if(L<2)return L?ta(u[0]):[];for(var W=-1,ee=Ie(L);++W<L;)for(var de=u[W],be=-1;++be<L;)be!=W&&(ee[W]=qc(ee[W]||de,u[be],l,A));return ta(Jr(ee,1),l,A)}i(vh,"baseXor"),a(vh,"baseXor");function k1(u,l,A){for(var L=-1,W=u.length,ee=l.length,de={};++L<W;){var be=L<ee?l[L]:r;A(de,u[L],be)}return de}i(k1,"baseZipObject"),a(k1,"baseZipObject");function gh(u){return Rr(u)?u:[]}i(gh,"castArrayLikeObject"),a(gh,"castArrayLikeObject");function yh(u){return typeof u=="function"?u:kn}i(yh,"castFunction"),a(yh,"castFunction");function ra(u,l){return Rt(u)?u:xh(u,l)?[u]:P5(dr(u))}i(ra,"castPath"),a(ra,"castPath");var Wk=Ft;function na(u,l,A){var L=u.length;return A=A===r?L:A,!l&&A>=L?u:ri(u,l,A)}i(na,"castSlice"),a(na,"castSlice");var a5=Rk||function(u){return Lr.clearTimeout(u)};function D1(u,l){if(l)return u.slice();var A=u.length,L=X6?X6(A):new u.constructor(A);return u.copy(L),L}i(D1,"cloneBuffer"),a(D1,"cloneBuffer");function bh(u){var l=new u.constructor(u.byteLength);return new Zd(l).set(new Zd(u)),l}i(bh,"cloneArrayBuffer"),a(bh,"cloneArrayBuffer");function o5(u,l){var A=l?bh(u.buffer):u.buffer;return new u.constructor(A,u.byteOffset,u.byteLength)}i(o5,"cloneDataView"),a(o5,"cloneDataView");function c5(u){var l=new u.constructor(u.source,yt.exec(u));return l.lastIndex=u.lastIndex,l}i(c5,"cloneRegExp"),a(c5,"cloneRegExp");function u5(u){return Pl?wr(Pl.call(u)):{}}i(u5,"cloneSymbol"),a(u5,"cloneSymbol");function O1(u,l){var A=l?bh(u.buffer):u.buffer;return new u.constructor(A,u.byteOffset,u.length)}i(O1,"cloneTypedArray"),a(O1,"cloneTypedArray");function R1(u,l){if(u!==l){var A=u!==r,L=u===null,W=u===u,ee=$n(u),de=l!==r,be=l===null,Ae=l===l,Be=$n(l);if(!be&&!Be&&!ee&&u>l||ee&&de&&Ae&&!be&&!Be||L&&de&&Ae||!A&&Ae||!W)return 1;if(!L&&!ee&&!Be&&u<l||Be&&A&&W&&!L&&!ee||be&&A&&W||!de&&W||!Ae)return-1}return 0}i(R1,"compareAscending"),a(R1,"compareAscending");function l5(u,l,A){for(var L=-1,W=u.criteria,ee=l.criteria,de=W.length,be=A.length;++L<de;){var Ae=R1(W[L],ee[L]);if(Ae){if(L>=be)return Ae;var Be=A[L];return Ae*(Be=="desc"?-1:1)}}return u.index-l.index}i(l5,"compareMultiple"),a(l5,"compareMultiple");function N1(u,l,A,L){for(var W=-1,ee=u.length,de=A.length,be=-1,Ae=l.length,Be=Gr(ee-de,0),Le=Ie(Ae+Be),$e=!L;++be<Ae;)Le[be]=l[be];for(;++W<de;)($e||W<ee)&&(Le[A[W]]=u[W]);for(;Be--;)Le[be++]=u[W++];return Le}i(N1,"composeArgs"),a(N1,"composeArgs");function P1(u,l,A,L){for(var W=-1,ee=u.length,de=-1,be=A.length,Ae=-1,Be=l.length,Le=Gr(ee-be,0),$e=Ie(Le+Be),Je=!L;++W<Le;)$e[W]=u[W];for(var pt=W;++Ae<Be;)$e[pt+Ae]=l[Ae];for(;++de<be;)(Je||W<ee)&&($e[pt+A[de]]=u[W++]);return $e}i(P1,"composeArgsRight"),a(P1,"composeArgsRight");function Mn(u,l){var A=-1,L=u.length;for(l||(l=Ie(L));++A<L;)l[A]=u[A];return l}i(Mn,"copyArray"),a(Mn,"copyArray");function Wi(u,l,A,L){var W=!A;A||(A={});for(var ee=-1,de=l.length;++ee<de;){var be=l[ee],Ae=L?L(A[be],u[be],be,A,u):r;Ae===r&&(Ae=u[be]),W?_s(A,be,Ae):Hc(A,be,Ae)}return A}i(Wi,"copyObject"),a(Wi,"copyObject");function f5(u,l){return Wi(u,Z1(u),l)}i(f5,"copySymbols"),a(f5,"copySymbols");function d5(u,l){return Wi(u,w5(u),l)}i(d5,"copySymbolsIn"),a(d5,"copySymbolsIn");function Hl(u,l){return function(A,L){var W=Rt(A)?O6:O3,ee=l?l():{};return W(A,u,wt(L,2),ee)}}i(Hl,"createAggregator"),a(Hl,"createAggregator");function No(u){return Ft(function(l,A){var L=-1,W=A.length,ee=W>1?A[W-1]:r,de=W>2?A[2]:r;for(ee=u.length>3&&typeof ee=="function"?(W--,ee):r,de&&yn(A[0],A[1],de)&&(ee=W<3?r:ee,W=1),l=wr(l);++L<W;){var be=A[L];be&&u(l,be,L,ee)}return l})}i(No,"createAssigner"),a(No,"createAssigner");function B1(u,l){return function(A,L){if(A==null)return A;if(!Cn(A))return u(A,L);for(var W=A.length,ee=l?W:-1,de=wr(A);(l?ee--:++ee<W)&&L(de[ee],ee,de)!==!1;);return A}}i(B1,"createBaseEach"),a(B1,"createBaseEach");function L1(u){return function(l,A,L){for(var W=-1,ee=wr(l),de=L(l),be=de.length;be--;){var Ae=de[u?be:++W];if(A(ee[Ae],Ae,ee)===!1)break}return l}}i(L1,"createBaseFor"),a(L1,"createBaseFor");function h5(u,l,A){var L=l&R,W=Wc(u);function ee(){var de=this&&this!==Lr&&this instanceof ee?W:u;return de.apply(L?A:this,arguments)}return i(ee,"wrapper"),a(ee,"wrapper"),ee}i(h5,"createBind"),a(h5,"createBind");function F1(u){return function(l){l=dr(l);var A=Do(l)?Ii(l):r,L=A?A[0]:l.charAt(0),W=A?na(A,1).join(""):l.slice(1);return L[u]()+W}}i(F1,"createCaseFirst"),a(F1,"createCaseFirst");function Po(u){return function(l){return Bd(Ov(kv(l).replace(Sl,"")),u,"")}}i(Po,"createCompounder"),a(Po,"createCompounder");function Wc(u){return function(){var l=arguments;switch(l.length){case 0:return new u;case 1:return new u(l[0]);case 2:return new u(l[0],l[1]);case 3:return new u(l[0],l[1],l[2]);case 4:return new u(l[0],l[1],l[2],l[3]);case 5:return new u(l[0],l[1],l[2],l[3],l[4]);case 6:return new u(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new u(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var A=zc(u.prototype),L=u.apply(A,l);return Cr(L)?L:A}}i(Wc,"createCtor"),a(Wc,"createCtor");function p5(u,l,A){var L=Wc(u);function W(){for(var ee=arguments.length,de=Ie(ee),be=ee,Ae=Bo(W);be--;)de[be]=arguments[be];var Be=ee<3&&de[0]!==Ae&&de[ee-1]!==Ae?[]:ea(de,Ae);if(ee-=Be.length,ee<A)return H1(u,l,ql,W.placeholder,r,de,Be,r,r,A-ee);var Le=this&&this!==Lr&&this instanceof W?L:u;return Ln(Le,this,de)}return i(W,"wrapper"),a(W,"wrapper"),W}i(p5,"createCurry"),a(p5,"createCurry");function U1(u){return function(l,A,L){var W=wr(l);if(!Cn(l)){var ee=wt(A,3);l=Wr(l),A=a(function(be){return ee(W[be],be,W)},"predicate")}var de=u(l,A,L);return de>-1?W[ee?l[de]:de]:r}}i(U1,"createFind"),a(U1,"createFind");function $1(u){return As(function(l){var A=l.length,L=A,W=ei.prototype.thru;for(u&&l.reverse();L--;){var ee=l[L];if(typeof ee!="function")throw new ki(c);if(W&&!de&&Wl(ee)=="wrapper")var de=new ei([],!0)}for(L=de?L:A;++L<A;){ee=l[L];var be=Wl(ee),Ae=be=="wrapper"?W1(ee):r;Ae&&Th(Ae[0])&&Ae[1]==(I|U|V|H)&&!Ae[4].length&&Ae[9]==1?de=de[Wl(Ae[0])].apply(de,Ae[3]):de=ee.length==1&&Th(ee)?de[be]():de.thru(ee)}return function(){var Be=arguments,Le=Be[0];if(de&&Be.length==1&&Rt(Le))return de.plant(Le).value();for(var $e=0,Je=A?l[$e].apply(this,Be):Le;++$e<A;)Je=l[$e].call(this,Je);return Je}})}i($1,"createFlow"),a($1,"createFlow");function ql(u,l,A,L,W,ee,de,be,Ae,Be){var Le=l&I,$e=l&R,Je=l&P,pt=l&(U|j),St=l&se,Lt=Je?r:Wc(u);function _t(){for(var Ht=arguments.length,Gt=Ie(Ht),jn=Ht;jn--;)Gt[jn]=arguments[jn];if(pt)var bn=Bo(_t),zn=$6(Gt,bn);if(L&&(Gt=N1(Gt,L,W,pt)),ee&&(Gt=P1(Gt,ee,de,pt)),Ht-=zn,pt&&Ht<Be){var Fr=ea(Gt,bn);return H1(u,l,ql,_t.placeholder,A,Gt,Fr,be,Ae,Be-Ht)}var Ji=$e?A:this,ia=Je?Ji[u]:u;return Ht=Gt.length,be?Gt=R5(Gt,be):St&&Ht>1&&Gt.reverse(),Le&&Ae<Ht&&(Gt.length=Ae),this&&this!==Lr&&this instanceof _t&&(ia=Lt||Wc(ia)),ia.apply(Ji,Gt)}return i(_t,"wrapper"),a(_t,"wrapper"),_t}i(ql,"createHybrid"),a(ql,"createHybrid");function j1(u,l){return function(A,L){return z3(A,u,l(L),{})}}i(j1,"createInverter"),a(j1,"createInverter");function Kl(u,l){return function(A,L){var W;if(A===r&&L===r)return l;if(A!==r&&(W=A),L!==r){if(W===r)return L;typeof A=="string"||typeof L=="string"?(A=Un(A),L=Un(L)):(A=M1(A),L=M1(L)),W=u(A,L)}return W}}i(Kl,"createMathOperation"),a(Kl,"createMathOperation");function wh(u){return As(function(l){return l=Tr(l,Fn(wt())),Ft(function(A){var L=this;return u(l,function(W){return Ln(W,L,A)})})})}i(wh,"createOver"),a(wh,"createOver");function Vl(u,l){l=l===r?" ":Un(l);var A=l.length;if(A<2)return A?hh(l,u):l;var L=hh(l,Qd(u/Oo(l)));return Do(l)?na(Ii(L),0,u).join(""):L.slice(0,u)}i(Vl,"createPadding"),a(Vl,"createPadding");function m5(u,l,A,L){var W=l&R,ee=Wc(u);function de(){for(var be=-1,Ae=arguments.length,Be=-1,Le=L.length,$e=Ie(Le+Ae),Je=this&&this!==Lr&&this instanceof de?ee:u;++Be<Le;)$e[Be]=L[Be];for(;Ae--;)$e[Be++]=arguments[++be];return Ln(Je,W?A:this,$e)}return i(de,"wrapper"),a(de,"wrapper"),de}i(m5,"createPartial"),a(m5,"createPartial");function z1(u){return function(l,A,L){return L&&typeof L!="number"&&yn(l,A,L)&&(A=L=r),l=Ts(l),A===r?(A=l,l=0):A=Ts(A),L=L===r?l<A?1:-1:Ts(L),e5(l,A,L,u)}}i(z1,"createRange"),a(z1,"createRange");function Gl(u){return function(l,A){return typeof l=="string"&&typeof A=="string"||(l=ii(l),A=ii(A)),u(l,A)}}i(Gl,"createRelationalOperation"),a(Gl,"createRelationalOperation");function H1(u,l,A,L,W,ee,de,be,Ae,Be){var Le=l&U,$e=Le?de:r,Je=Le?r:de,pt=Le?ee:r,St=Le?r:ee;l|=Le?V:G,l&=~(Le?G:V),l&K||(l&=~(R|P));var Lt=[u,l,W,pt,$e,St,Je,be,Ae,Be],_t=A.apply(r,Lt);return Th(u)&&N5(_t,Lt),_t.placeholder=L,nv(_t,u,l)}i(H1,"createRecurry"),a(H1,"createRecurry");function _h(u){var l=Vr[u];return function(A,L){if(A=ii(A),L=L==null?0:mn(Nt(L),292),L&&r3(A)){var W=(dr(A)+"e").split("e"),ee=l(W[0]+"e"+(+W[1]+L));return W=(dr(ee)+"e").split("e"),+(W[0]+"e"+(+W[1]-L))}return l(A)}}i(_h,"createRound"),a(_h,"createRound");var Zk=$c&&1/kl(new $c([,-0]))[1]==g?function(u){return new $c(u)}:Fh;function q1(u){return function(l){var A=gn(l);return A==ge?Hd(l):A==Q?K6(l):U6(l,u(l))}}i(q1,"createToPairs"),a(q1,"createToPairs");function Es(u,l,A,L,W,ee,de,be){var Ae=l&P;if(!Ae&&typeof u!="function")throw new ki(c);var Be=L?L.length:0;if(Be||(l&=~(V|G),L=W=r),de=de===r?de:Gr(Nt(de),0),be=be===r?be:Nt(be),Be-=W?W.length:0,l&G){var Le=L,$e=W;L=W=r}var Je=Ae?r:W1(u),pt=[u,l,A,L,W,Le,$e,ee,de,be];if(Je&&k5(pt,Je),u=pt[0],l=pt[1],A=pt[2],L=pt[3],W=pt[4],be=pt[9]=pt[9]===r?Ae?0:u.length:Gr(pt[9]-Be,0),!be&&l&(U|j)&&(l&=~(U|j)),!l||l==R)var St=h5(u,l,A);else l==U||l==j?St=p5(u,l,be):(l==V||l==(R|V))&&!W.length?St=m5(u,l,A,L):St=ql.apply(r,pt);var Lt=Je?n5:N5;return nv(Lt(St,pt),u,l)}i(Es,"createWrap"),a(Es,"createWrap");function K1(u,l,A,L){return u===r||Oi(u,Uc[A])&&!vr.call(L,A)?l:u}i(K1,"customDefaultsAssignIn"),a(K1,"customDefaultsAssignIn");function V1(u,l,A,L,W,ee){return Cr(u)&&Cr(l)&&(ee.set(l,u),$l(u,l,r,V1,ee),ee.delete(l)),u}i(V1,"customDefaultsMerge"),a(V1,"customDefaultsMerge");function v5(u){return Jc(u)?r:u}i(v5,"customOmitClone"),a(v5,"customOmitClone");function G1(u,l,A,L,W,ee){var de=A&T,be=u.length,Ae=l.length;if(be!=Ae&&!(de&&Ae>be))return!1;var Be=ee.get(u),Le=ee.get(l);if(Be&&Le)return Be==l&&Le==u;var $e=-1,Je=!0,pt=A&O?new Oa:r;for(ee.set(u,l),ee.set(l,u);++$e<be;){var St=u[$e],Lt=l[$e];if(L)var _t=de?L(Lt,St,$e,l,u,ee):L(St,Lt,$e,u,l,ee);if(_t!==r){if(_t)continue;Je=!1;break}if(pt){if(!Ld(l,function(Ht,Gt){if(!Fc(pt,Gt)&&(St===Ht||W(St,Ht,A,L,ee)))return pt.push(Gt)})){Je=!1;break}}else if(!(St===Lt||W(St,Lt,A,L,ee))){Je=!1;break}}return ee.delete(u),ee.delete(l),Je}i(G1,"equalArrays"),a(G1,"equalArrays");function g5(u,l,A,L,W,ee,de){switch(A){case le:if(u.byteLength!=l.byteLength||u.byteOffset!=l.byteOffset)return!1;u=u.buffer,l=l.buffer;case rt:return!(u.byteLength!=l.byteLength||!ee(new Zd(u),new Zd(l)));case Y:case J:case ke:return Oi(+u,+l);case z:return u.name==l.name&&u.message==l.message;case we:case ve:return u==l+"";case ge:var be=Hd;case Q:var Ae=L&T;if(be||(be=kl),u.size!=l.size&&!Ae)return!1;var Be=de.get(u);if(Be)return Be==l;L|=O,de.set(u,l);var Le=G1(be(u),be(l),L,W,ee,de);return de.delete(u),Le;case Me:if(Pl)return Pl.call(u)==Pl.call(l)}return!1}i(g5,"equalByTag"),a(g5,"equalByTag");function y5(u,l,A,L,W,ee){var de=A&T,be=Eh(u),Ae=be.length,Be=Eh(l),Le=Be.length;if(Ae!=Le&&!de)return!1;for(var $e=Ae;$e--;){var Je=be[$e];if(!(de?Je in l:vr.call(l,Je)))return!1}var pt=ee.get(u),St=ee.get(l);if(pt&&St)return pt==l&&St==u;var Lt=!0;ee.set(u,l),ee.set(l,u);for(var _t=de;++$e<Ae;){Je=be[$e];var Ht=u[Je],Gt=l[Je];if(L)var jn=de?L(Gt,Ht,Je,l,u,ee):L(Ht,Gt,Je,u,l,ee);if(!(jn===r?Ht===Gt||W(Ht,Gt,A,L,ee):jn)){Lt=!1;break}_t||(_t=Je=="constructor")}if(Lt&&!_t){var bn=u.constructor,zn=l.constructor;bn!=zn&&"constructor"in u&&"constructor"in l&&!(typeof bn=="function"&&bn instanceof bn&&typeof zn=="function"&&zn instanceof zn)&&(Lt=!1)}return ee.delete(u),ee.delete(l),Lt}i(y5,"equalObjects"),a(y5,"equalObjects");function As(u){return rv(ev(u,r,cv),u+"")}i(As,"flatRest"),a(As,"flatRest");function Eh(u){return m1(u,Wr,Z1)}i(Eh,"getAllKeys"),a(Eh,"getAllKeys");function Ah(u){return m1(u,In,w5)}i(Ah,"getAllKeysIn"),a(Ah,"getAllKeysIn");var W1=th?function(u){return th.get(u)}:Fh;function Wl(u){for(var l=u.name+"",A=jc[l],L=vr.call(jc,l)?A.length:0;L--;){var W=A[L],ee=W.func;if(ee==null||ee==u)return W.name}return l}i(Wl,"getFuncName"),a(Wl,"getFuncName");function Bo(u){var l=vr.call(X,"placeholder")?X:u;return l.placeholder}i(Bo,"getHolder"),a(Bo,"getHolder");function wt(){var u=X.iteratee||Bh;return u=u===Bh?y1:u,arguments.length?u(arguments[0],arguments[1]):u}i(wt,"getIteratee"),a(wt,"getIteratee");function Zl(u,l){var A=u.__data__;return M5(l)?A[typeof l=="string"?"string":"hash"]:A.map}i(Zl,"getMapData"),a(Zl,"getMapData");function Sh(u){for(var l=Wr(u),A=l.length;A--;){var L=l[A],W=u[L];l[A]=[L,W,X1(W)]}return l}i(Sh,"getMatchData"),a(Sh,"getMatchData");function Ba(u,l){var A=z6(u,l);return g1(A)?A:r}i(Ba,"getNative"),a(Ba,"getNative");function b5(u){var l=vr.call(u,Ro),A=u[Ro];try{u[Ro]=r;var L=!0}catch{}var W=Gd.call(u);return L&&(l?u[Ro]=A:delete u[Ro]),W}i(b5,"getRawTag"),a(b5,"getRawTag");var Z1=s1?function(u){return u==null?[]:(u=wr(u),Xs(s1(u),function(l){return e3.call(u,l)}))}:Uh,w5=s1?function(u){for(var l=[];u;)Qs(l,Z1(u)),u=Jd(u);return l}:Uh,gn=vn;(a1&&gn(new a1(new ArrayBuffer(1)))!=le||Ol&&gn(new Ol)!=ge||o1&&gn(o1.resolve())!=Ce||$c&&gn(new $c)!=Q||Rl&&gn(new Rl)!=Re)&&(gn=a(function(u){var l=vn(u),A=l==fe?u.constructor:r,L=A?La(A):"";if(L)switch(L){case zk:return le;case Hk:return ge;case qk:return Ce;case Kk:return Q;case Vk:return Re}return l},"getTag"));function _5(u,l,A){for(var L=-1,W=A.length;++L<W;){var ee=A[L],de=ee.size;switch(ee.type){case"drop":u+=de;break;case"dropRight":l-=de;break;case"take":l=mn(l,u+de);break;case"takeRight":u=Gr(u,l-de);break}}return{start:u,end:l}}i(_5,"getView"),a(_5,"getView");function E5(u){var l=u.match(Ze);return l?l[1].split(cr):[]}i(E5,"getWrapDetails"),a(E5,"getWrapDetails");function J1(u,l,A){l=ra(l,u);for(var L=-1,W=l.length,ee=!1;++L<W;){var de=Zi(l[L]);if(!(ee=u!=null&&A(u,de)))break;u=u[de]}return ee||++L!=W?ee:(W=u==null?0:u.length,!!W&&rf(W)&&Ss(de,W)&&(Rt(u)||Lo(u)))}i(J1,"hasPath"),a(J1,"hasPath");function A5(u){var l=u.length,A=new u.constructor(l);return l&&typeof u[0]=="string"&&vr.call(u,"index")&&(A.index=u.index,A.input=u.input),A}i(A5,"initCloneArray"),a(A5,"initCloneArray");function Y1(u){return typeof u.constructor=="function"&&!Zc(u)?zc(Jd(u)):{}}i(Y1,"initCloneObject"),a(Y1,"initCloneObject");function S5(u,l,A){var L=u.constructor;switch(l){case rt:return bh(u);case Y:case J:return new L(+u);case le:return o5(u,A);case ce:case Z:case re:case ye:case Se:case xe:case De:case Mt:case qe:return O1(u,A);case ge:return new L;case ke:case ve:return new L(u);case we:return c5(u);case Q:return new L;case Me:return u5(u)}}i(S5,"initCloneByTag"),a(S5,"initCloneByTag");function x5(u,l){var A=l.length;if(!A)return u;var L=A-1;return l[L]=(A>1?"& ":"")+l[L],l=l.join(A>2?", ":" "),u.replace(at,`{
|
|
24
|
+
`):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl")});function Xg(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}i(Xg,"arrRemove");var $p=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i(e,"Subscription"),e.prototype.unsubscribe=function(){var t,r,n,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=Yg(c),h=f.next();!h.done;h=f.next()){var p=h.value;p.remove(this)}}catch(O){t={error:O}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}else c.remove(this);var v=this.initialTeardown;if(Bi(v))try{v()}catch(O){o=O instanceof Up?O.errors:[O]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var y=Yg(b),_=y.next();!_.done;_=y.next()){var T=_.value;try{$E(T)}catch(O){o=o??[],O instanceof Up?o=bu(bu([],yu(o)),yu(O.errors)):o.push(O)}}}catch(O){n={error:O}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(n)throw n.error}}}if(o)throw new Up(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)$E(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Xg(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Xg(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}();var pW=$p.EMPTY;function jp(e){return e instanceof $p||e&&"closed"in e&&Bi(e.remove)&&Bi(e.add)&&Bi(e.unsubscribe)}i(jp,"isSubscription");function $E(e){Bi(e)?e():e.unsubscribe()}i($E,"execFinalizer");var ts={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var wu={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=wu.delegate;return s?.setTimeout?s.setTimeout.apply(s,bu([e,t],yu(r))):setTimeout.apply(void 0,bu([e,t],yu(r)))},clearTimeout:function(e){var t=wu.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jE(e){wu.setTimeout(function(){var t=ts.onUnhandledError;if(t)t(e);else throw e})}i(jE,"reportUnhandledError");function Qg(){}i(Qg,"noop");var zE=function(){return ey("C",void 0,void 0)}();function HE(e){return ey("E",void 0,e)}i(HE,"errorNotification");function qE(e){return ey("N",e,void 0)}i(qE,"nextNotification");function ey(e,t,r){return{kind:e,value:t,error:r}}i(ey,"createNotification");var Qo=null;function KE(e){if(ts.useDeprecatedSynchronousErrorHandling){var t=!Qo;if(t&&(Qo={errorThrown:!1,error:null}),e(),t){var r=Qo,n=r.errorThrown,s=r.error;if(Qo=null,n)throw s}}else e()}i(KE,"errorContext");function VE(e){ts.useDeprecatedSynchronousErrorHandling&&Qo&&(Qo.errorThrown=!0,Qo.error=e)}i(VE,"captureError");var ny=function(e){Jg(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,jp(r)&&r.add(n)):n.destination=oL,n}return i(t,"Subscriber"),t.create=function(r,n,s){return new Hp(r,n,s)},t.prototype.next=function(r){this.isStopped?ry(qE(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?ry(HE(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?ry(zE,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}($p);var iL=Function.prototype.bind;function ty(e,t){return iL.call(e,t)}i(ty,"bind");var sL=function(){function e(t){this.partialObserver=t}return i(e,"ConsumerObserver"),e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){zp(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){zp(n)}else zp(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){zp(r)}},e}(),Hp=function(e){Jg(t,e);function t(r,n,s){var o=e.call(this)||this,c;if(Bi(r)||!r)c={next:r??void 0,error:n??void 0,complete:s??void 0};else{var f;o&&ts.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&ty(r.next,f),error:r.error&&ty(r.error,f),complete:r.complete&&ty(r.complete,f)}):c=r}return o.destination=new sL(c),o}return i(t,"SafeSubscriber"),t}(ny);function zp(e){ts.useDeprecatedSynchronousErrorHandling?VE(e):jE(e)}i(zp,"handleUnhandledError");function aL(e){throw e}i(aL,"defaultErrorHandler");function ry(e,t){var r=ts.onStoppedNotification;r&&wu.setTimeout(function(){return r(e,t)})}i(ry,"handleStoppedNotification");var oL={closed:!0,next:Qg,error:aL,complete:Qg};var GE=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function WE(e){return e}i(WE,"identity");function ZE(e){return e.length===0?WE:e.length===1?e[0]:i(function(r){return e.reduce(function(n,s){return s(n)},r)},"piped")}i(ZE,"pipeFromArray");var iy=function(){function e(t){t&&(this._subscribe=t)}return i(e,"Observable"),e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,o=uL(t)?t:new Hp(t,r,n);return KE(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=JE(r),new r(function(s,o){var c=new Hp({next:function(f){try{t(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});n.subscribe(c)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[GE]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ZE(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=JE(t),new t(function(n,s){var o;r.subscribe(function(c){return o=c},function(c){return s(c)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function JE(e){var t;return(t=e??ts.Promise)!==null&&t!==void 0?t:Promise}i(JE,"getPromiseCtor");function cL(e){return e&&Bi(e.next)&&Bi(e.error)&&Bi(e.complete)}i(cL,"isObserver");function uL(e){return e&&e instanceof ny||cL(e)&&jp(e)}i(uL,"isSubscriber");var YE;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(YE||(YE={}));var XE;(function(e){e[e.NOT_REQUESTED=0]="NOT_REQUESTED",e[e.PENDING=1]="PENDING",e[e.PROCESSING=2]="PROCESSING",e[e.ANCHORED=3]="ANCHORED",e[e.FAILED=4]="FAILED"})(XE||(XE={}));var ay;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(ay||(ay={}));var xf=class extends iy{constructor(t,r){super(n=>{t.subscribe(n)}),this.state$=t,this._context=r}get id(){return new Yt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:t,content:r}=this.state$.value;return(0,sy.default)(t?.content??r)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return hr.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:t})=>hr.make(this.id,t))}get anchorCommitIds(){return this.state$.value.log.filter(({type:t})=>t===ay.ANCHOR).map(({cid:t})=>hr.make(this.id,t))}get state(){return(0,sy.default)(this.state$.value)}async sync(t={}){t={sync:Xo.PREFER_CACHE,...t};let r=await this.api.loadStream(this.id,t);this.state$.next(r.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}};i(xf,"Stream");function QE(){return e=>{}}i(QE,"StreamStatic");var lL=function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},fi,oy={anchor:!0,publish:!0,pin:!0,sync:Xo.PREFER_CACHE},fL={sync:Xo.PREFER_CACHE},e7={anchor:!0,publish:!0,throwOnInvalidCommit:!0};function cy(e,t){if(typeof e?.schema=="string")try{hr.fromString(e.schema)}catch{throw new Error("Schema must be a CommitID")}let r={controllers:e?.controllers,family:e?.family,schema:e?.schema?.toString(),tags:e?.tags};if(t)e?.deterministic||(r.unique=tg((0,n7.randomBytes)(12),"base64")),e?.forbidControllerChange&&(r.forbidControllerChange=!0);else{if(e?.deterministic!==void 0||e?.unique!==void 0)throw new Error("Cannot change 'deterministic' or 'unique' properties on existing Streams");if(e?.forbidControllerChange!==void 0)throw new Error("Cannot change 'forbidControllerChange' property on existing Streams")}return Object.keys(r).forEach(n=>r[n]===void 0&&delete r[n]),r}i(cy,"headerFromMetadata");async function t7(e){if(!e.did)throw new Error("No DID provided");return e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`)),e.did}i(t7,"getAuthenticatedDID");async function uy(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(uy,"throwReadOnlyError");var Ha=fi=i(class extends xf{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,r7.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async create(t,r,n,s={}){s={...oy,...s},!n?.deterministic&&s.syncTimeoutSeconds==null&&(s.syncTimeoutSeconds=0);let o=s.asDID?{did:s.asDID}:t,c=await fi.makeGenesis(o,r,n);return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,c,s)}static async createFromGenesis(t,r,n={}){n={...oy,...n},r.header?.unique&&n.syncTimeoutSeconds==null&&(n.syncTimeoutSeconds=0);let s=r.data?await fi._signDagJWS(t,r):r;return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,s,n)}static async deterministic(t,r,n={}){if(n={...oy,...n},r={...r,deterministic:!0},r.family==null&&r.tags==null)throw new Error("Family and/or tags are required when creating a deterministic tile document");let s=await fi.makeGenesis(t,null,r);return t.createStreamFromGenesis(fi.STREAM_TYPE_ID,s,n)}static async load(t,r,n={}){n={...fL,...n};let s=Go.from(r);if(s.type!=fi.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${fi.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async update(t,r,n={}){n={...e7,...n};let s=n.asDID?{did:n.asDID}:this.api,o=await this.makeCommit(s,t,r),c=await this.api.applyCommit(this.id,o,n);this.state$.next(c.state)}async patch(t,r={}){r={...e7,...r};let s={header:cy(this.metadata,!1),data:t,prev:this.tip,id:this.id.cid},o=await fi._signDagJWS(this.api,s),c=await this.api.applyCommit(this.id,o,r);this.state$.next(c.state)}makeReadOnly(){this.update=uy,this.patch=uy,this.sync=uy,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}async makeCommit(t,r,n){let s=await this._makeRawCommit(r,n);return fi._signDagJWS(t,s)}async _makeRawCommit(t,r){r||(r={});let n=cy(r,!1);if(t==null&&(t=this.content),n.controllers){if(n.controllers.length!==1)throw new Error("Exactly one controller must be specified");if(!n.controllers[0])throw new Error("Controller cannot be updated to an undefined value.")}let s=P9.compare(this.content,t),o=this.state.log[0];return{header:n,data:s,prev:this.tip,id:o.cid}}static async makeGenesis(t,r,n){if(n||(n={}),!n.controllers||n.controllers.length===0)if(t.did){let c=await t7(t);n.controllers=[c.hasParent?c.parent:c.id]}else throw new Error("No controllers specified");if(n.controllers?.length!==1)throw new Error("Exactly one controller must be specified");let s=cy(n,!0);if(n?.deterministic&&r)throw new Error("Initial content must be null when creating a deterministic Tile document");if(r==null){let c={header:s};return pg(c),c}let o={data:r,header:s};return fi._signDagJWS(t,o)}static async _signDagJWS(t,r){return(await t7(t)).createDagJWS(r)}},"TileDocument");Ha.STREAM_TYPE_NAME="tile";Ha.STREAM_TYPE_ID=0;Ha=fi=lL([QE()],Ha);var l7=Uo(a7(),1);function _L(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(_L,"_checkPrivateRedeclaration");function EL(e,t){return t.get?t.get.call(e):t.value}i(EL,"_classApplyDescriptorGet");function AL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(AL,"_classApplyDescriptorSet");function u7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(u7,"_classExtractFieldDescriptor");function hy(e,t){var r=u7(e,t,"get");return EL(e,r)}i(hy,"_classPrivateFieldGet");function o7(e,t,r){_L(e,t),t.set(e,r)}i(o7,"_classPrivateFieldInit");function c7(e,t,r){var n=u7(e,t,"set");return AL(e,n,r),r}i(c7,"_classPrivateFieldSet");function SL(e){return typeof e=="string"||hr.isInstance(e)||Yt.isInstance(e)?{streamId:e}:{streamId:e.streamId,genesis:e.genesis}}i(SL,"keyToQuery");function py(e){return typeof e=="string"?Go.from(e).toString():hr.isInstance(e)||Yt.isInstance(e)?e.toString():e.streamId.toString()}i(py,"keyToString");async function vy(e){let t=await Ha.makeGenesis({},null,{...e,deterministic:!0}),r=await Yt.fromGenesis("tile",t);return{genesis:t,streamId:r}}i(vy,"getDeterministicQuery");var xL=i(()=>Promise.resolve([]),"tempBatchLoadFn"),qp=new WeakMap,my=new WeakMap,ec=class extends l7.default{cache(t){if(!hy(this,my))return!1;let r=t.id.toString();return this.clear(r).prime(r,t),!0}async create(t,r,n){let s=await Ha.create(hy(this,qp),t,r,n);return this.cache(s),s}async deterministic(t,r){let n=await vy(t);try{return await super.load(n)}catch{let o=await Ha.createFromGenesis(hy(this,qp),n.genesis,r);return this.cache(o),o}}async load(t){return await super.load(t)}async update(t,r,n,s){let o=py(t);this.clear(o);let c=await this.load({streamId:o});return await c.update(r,n,s),c}constructor(t){super(xL,{cache:!0,cacheKeyFn:py,cacheMap:t.cache!=null&&typeof t.cache!="boolean"?t.cache:void 0}),o7(this,qp,{writable:!0,value:void 0}),o7(this,my,{writable:!0,value:void 0}),this._batchLoadFn=async r=>{t.cache||this.clearAll();let n=await t.ceramic.multiQuery(r.map(SL),t.multiqueryTimeout);return r.map(s=>{let o=py(s),c=n[o];return c||new Error(`Failed to load stream: ${o}`)})},c7(this,qp,t.ceramic),c7(this,my,!!t.cache)}};i(ec,"TileLoader");function TL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(TL,"_checkPrivateRedeclaration");function ML(e,t){return t.get?t.get.call(e):t.value}i(ML,"_classApplyDescriptorGet");function CL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(CL,"_classApplyDescriptorSet");function d7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(d7,"_classExtractFieldDescriptor");function tc(e,t){var r=d7(e,t,"get");return ML(e,r)}i(tc,"_classPrivateFieldGet");function f7(e,t,r){TL(e,t),t.set(e,r)}i(f7,"_classPrivateFieldInit");function gy(e,t,r){var n=d7(e,t,"set");return CL(e,n,r),r}i(gy,"_classPrivateFieldSet");var _u=new WeakMap,Eu=new WeakMap,Au=class{get aliases(){return tc(this,_u)}get loader(){return tc(this,Eu)}getDefinitionID(t){return tc(this,_u).definitions[t]??null}getSchemaURL(t){return tc(this,_u).schemas[t]??null}getTileID(t){return tc(this,_u).tiles[t]??null}async loadTile(t){let r=this.getTileID(t);if(r==null)throw new Error(`Tile alias "${t}" is not defined`);return await tc(this,Eu).load(r)}async createTile(t,r,n={}){let s=this.getSchemaURL(t);if(s==null)throw new Error(`Schema alias "${t}" is not defined`);let{controller:o,...c}=n,f={schema:s};return o!=null&&(f.controllers=[o]),await tc(this,Eu).create(r,f,c)}constructor(t){if(f7(this,_u,{writable:!0,value:void 0}),f7(this,Eu,{writable:!0,value:void 0}),gy(this,_u,t.aliases),t.loader!=null)gy(this,Eu,t.loader);else{if(t.ceramic==null)throw new Error("Invalid DataModel parameters: missing ceramic or loader");gy(this,Eu,new ec({ceramic:t.ceramic,cache:t.cache}))}}};i(Au,"DataModel");function IL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(IL,"_checkPrivateRedeclaration");function kL(e,t){return t.get?t.get.call(e):t.value}i(kL,"_classApplyDescriptorGet");function DL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(DL,"_classApplyDescriptorSet");function h7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(h7,"_classExtractFieldDescriptor");function ks(e,t){var r=h7(e,t,"get");return kL(e,r)}i(ks,"_classPrivateFieldGet");function Kp(e,t,r){IL(e,t),t.set(e,r)}i(Kp,"_classPrivateFieldInit");function Vp(e,t,r){var n=h7(e,t,"set");return DL(e,n,r),r}i(Vp,"_classPrivateFieldSet");var Gp=new WeakMap,rc=new WeakMap,yy=new WeakMap,Wp=new WeakMap,Tf=class{_createValuePromise(){Vp(this,yy,new Promise((t,r)=>{Vp(this,Wp,{resolve:t,reject:r})}))}change(t){return new Promise((r,n)=>{let s=i(async o=>{try{let c=await t(o);r(),this._next(c)}catch(c){n(c),this._next(o)}},"run");ks(this,rc).push({reject:n,run:s}),ks(this,rc).length===1&&this._start()})}async changeContent(t){let r=i(async n=>(await n.update(t(n.content),n.metadata),n),"mutation");return await this.change(r)}async get(){return ks(this,rc).length===0?await ks(this,Gp).call(this):await ks(this,yy)}async _start(){try{let t=await ks(this,Gp).call(this);this._next(t)}catch(t){ks(this,rc).forEach(r=>{r.reject(t)}),Vp(this,rc,[]),ks(this,Wp).reject(t),this._createValuePromise()}}_next(t){let r=ks(this,rc).shift();r==null?this._end(t):r.run(t)}_end(t){ks(this,Wp).resolve(t),this._createValuePromise()}constructor(t){Kp(this,Gp,{writable:!0,value:void 0}),Kp(this,rc,{writable:!0,value:[]}),Kp(this,yy,{writable:!0,value:void 0}),Kp(this,Wp,{writable:!0,value:void 0}),Vp(this,Gp,t),this._createValuePromise()}};i(Tf,"TileProxy");var OL=/^did:([A-Za-z0-9]+):([A-Za-z0-9.\-:_]+)$/;function RL(e){return OL.test(e)}i(RL,"isDIDstring");function NL(e){if(!RL(e))throw new Error(`Invalid DID: ${e}`)}i(NL,"assertDIDstring");function by(e){return NL(e),{controllers:[e],family:"IDX"}}i(by,"getIDXMetadata");function PL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(PL,"_checkPrivateRedeclaration");function BL(e,t){return t.get?t.get.call(e):t.value}i(BL,"_classApplyDescriptorGet");function LL(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(LL,"_classApplyDescriptorSet");function p7(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(p7,"_classExtractFieldDescriptor");function Ur(e,t){var r=p7(e,t,"get");return BL(e,r)}i(Ur,"_classPrivateFieldGet");function Mf(e,t,r){PL(e,t),t.set(e,r)}i(Mf,"_classPrivateFieldInit");function Zp(e,t,r){var n=p7(e,t,"set");return LL(e,n,r),r}i(Zp,"_classPrivateFieldSet");var la=new WeakMap,Jp=new WeakMap,wy=new WeakMap,Ds=new WeakMap,Yp=new WeakMap,Cf=class{get authenticated(){return Ur(this,la).did!=null}get ceramic(){return Ur(this,la)}get id(){if(Ur(this,Jp)!=null)return Ur(this,Jp);if(Ur(this,la).did==null)throw new Error("Ceramic instance is not authenticated");return Ur(this,la).did.hasParent?Ur(this,la).did.parent:Ur(this,la).did.id}get loader(){return Ur(this,Ds)}get model(){return Ur(this,Yp)}async has(t,r){let n=this.getDefinitionID(t);return await this.getRecordID(n,r)!=null}async get(t,r){let n=this.getDefinitionID(t);return await this.getRecord(n,r)}async getMultiple(t,r){let n=this.getDefinitionID(t),s=await Promise.all(r.map(async f=>{let{genesis:h,streamId:p}=await vy(by(f));return{genesis:h,streamId:p.toString(),paths:[n]}})),o=await Ur(this,la).multiQuery(s),c=[];for(let f of s){let h=o[f.streamId]?.content?.[n],p=h?o[Yt.fromString(h).toString()]:null;c.push(p?.content??null)}return c}async set(t,r,n={}){let s=this.getDefinitionID(t),[o,c]=await this._setRecordOnly(s,r,n);return o&&await this._setReference(n.controller??this.id,s,c),c}async merge(t,r,n={}){let s=this.getDefinitionID(t),o=await this.getRecord(s),c=o?{...o,...r}:r;return await this.setRecord(s,c,n)}async setAll(t,r={}){let n=Object.entries(t).map(async([c,f])=>{let h=this.getDefinitionID(c),[p,v]=await this._setRecordOnly(h,f,r);return[p,h,v]}),o=(await Promise.all(n)).reduce((c,[f,h,p])=>(f&&(c[h]=p.toUrl()),c),{});return await this._setReferences(r.controller??this.id,o),o}async setDefaults(t,r={}){let n=await this.getIndex()??{},s=Object.entries(t).map(([f,h])=>[this.getDefinitionID(f),h]).filter(f=>n[f[0]]==null).map(async([f,h])=>{let p=await this.getDefinition(f),v=await this._createRecord(p,h,r);return{[f]:v.toUrl()}}),c=(await Promise.all(s)).reduce((f,h)=>Object.assign(f,h),{});return await this._setReferences(r.controller??this.id,c),c}async remove(t,r=this.id){await this._getIndexProxy(r).changeContent(n=>(n!=null&&delete n[this.getDefinitionID(t)],n))}async getIndex(t=this.id){let r=this.authenticated&&t===this.id?await this._getIndexProxy(t).get():await this._getIDXDoc(t);return r?r.content:null}iterator(t){let r,n=0;return{[Symbol.asyncIterator](){return this},next:async()=>{if(r==null){let f=await this.getIndex(t);r=Object.entries(f??{})}if(n===r.length)return{done:!0,value:null};let[s,o]=r[n++],c=await Ur(this,Ds).load(o);return{done:!1,value:{key:s,id:o,record:c.content}}}}}async _createIDXDoc(t){return await Ur(this,Ds).deterministic(by(t))}async _getIDXDoc(t){let r=await this._createIDXDoc(t);if(r.content==null||r.metadata.schema==null)return null;if(r.metadata.schema!==mp)throw new Error("Invalid document: schema is not IdentityIndex");return r}async _getOwnIDXDoc(t){let r=await this._createIDXDoc(t);if(r.content==null||r.metadata.schema==null)await r.update({},{schema:mp});else if(r.metadata.schema!==mp)throw new Error("Invalid document: schema is not IdentityIndex");return r}_getIndexProxy(t){let r=Ur(this,wy)[t];return r==null&&(r=new Tf(async()=>await this._getOwnIDXDoc(t)),Ur(this,wy)[t]=r),r}getDefinitionID(t){return Ur(this,Yp).getDefinitionID(t)??t}async getDefinition(t){let r=await Ur(this,Ds).load(t);if(r.metadata.schema!==O9)throw new Error("Invalid document: schema is not Definition");return{...r.content,id:r.id}}async getRecordID(t,r){return(await this.getIndex(r??this.id))?.[t]??null}async getRecordDocument(t,r){let n=await this.getRecordID(t,r);return n?await Ur(this,Ds).load(n):null}async getRecord(t,r){let n=await this.getRecordDocument(t,r);return n?n.content:null}async setRecord(t,r,n={}){let[s,o]=await this._setRecordOnly(t,r,n);return s&&await this._setReference(n.controller??this.id,t,o),o}async _setRecordOnly(t,r,n){let s=await this.getRecordID(t,n.controller??this.id);if(s==null){let o=await this.getDefinition(t),c=await this._createRecord(o,r,n);return[!0,c]}else{let o=await Ur(this,Ds).update(s,r);return[!1,o.id]}}async _createRecord(t,r,{controller:n,pin:s}){let o=await Ur(this,Ds).deterministic({controllers:[n??this.id],family:t.id.toString()},{pin:s});return await o.update(r,{schema:t.schema}),o.id}async _setReference(t,r,n){await this._getIndexProxy(t).changeContent(s=>({...s,[r]:n.toUrl()}))}async _setReferences(t,r){Object.keys(r).length!==0&&await this._getIndexProxy(t).changeContent(n=>({...n,...r}))}constructor(t){Mf(this,la,{writable:!0,value:void 0}),Mf(this,Jp,{writable:!0,value:void 0}),Mf(this,wy,{writable:!0,value:{}}),Mf(this,Ds,{writable:!0,value:void 0}),Mf(this,Yp,{writable:!0,value:void 0});let{cache:r,ceramic:n,id:s,loader:o,model:c}=t;Zp(this,la,n),Zp(this,Jp,s),Zp(this,Ds,o??new ec({ceramic:n,cache:r})),Zp(this,Yp,c instanceof Au?c:new Au({loader:Ur(this,Ds),aliases:c}))}};i(Cf,"DIDDataStore");var nr;(function(e){e.assertEqual=s=>s;function t(s){}i(t,"assertIs"),e.assertIs=t;function r(s){throw new Error}i(r,"assertNever"),e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let c of s)o[c]=c;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(f=>typeof s[s[f]]!="number"),c={};for(let f of o)c[f]=s[f];return e.objectValues(c)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},e.find=(s,o)=>{for(let c of s)if(o(c))return c},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}i(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(nr||(nr={}));var et=nr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qa=i(e=>{switch(typeof e){case"undefined":return et.undefined;case"string":return et.string;case"number":return isNaN(e)?et.nan:et.number;case"boolean":return et.boolean;case"function":return et.function;case"bigint":return et.bigint;case"symbol":return et.symbol;case"object":return Array.isArray(e)?et.array:e===null?et.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?et.promise:typeof Map<"u"&&e instanceof Map?et.map:typeof Set<"u"&&e instanceof Set?et.set:typeof Date<"u"&&e instanceof Date?et.date:et.object;default:return et.unknown}},"getParsedType"),Ke=nr.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"]),FL=i(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Li=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(o){return o.message},n={_errors:[]},s=i(o=>{for(let c of o.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)n._errors.push(r(c));else{let f=n,h=0;for(;h<c.path.length;){let p=c.path[h];h===c.path.length-1?(f[p]=f[p]||{_errors:[]},f[p]._errors.push(r(c))):f[p]=f[p]||{_errors:[]},f=f[p],h++}}},"processError");return s(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,nr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};i(Li,"ZodError");Li.create=e=>new Li(e);var kf=i((e,t)=>{let r;switch(e.code){case Ke.invalid_type:e.received===et.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,nr.jsonStringifyReplacer)}`;break;case Ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${nr.joinValues(e.keys,", ")}`;break;case Ke.invalid_union:r="Invalid input";break;case Ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${nr.joinValues(e.options)}`;break;case Ke.invalid_enum_value:r=`Invalid enum value. Expected ${nr.joinValues(e.options)}, received '${e.received}'`;break;case Ke.invalid_arguments:r="Invalid function arguments";break;case Ke.invalid_return_type:r="Invalid function return type";break;case Ke.invalid_date:r="Invalid date";break;case Ke.invalid_string:typeof e.validation=="object"?"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}"`:nr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ke.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==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:r="Invalid input";break;case Ke.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==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:r="Invalid input";break;case Ke.custom:r="Invalid input";break;case Ke.invalid_intersection_types:r="Intersection results could not be merged";break;case Ke.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ke.not_finite:r="Number must be finite";break;default:r=t.defaultError,nr.assertNever(e)}return{message:r}},"errorMap"),y7=kf;function UL(e){y7=e}i(UL,"setErrorMap");function Qp(){return y7}i(Qp,"getErrorMap");var e0=i(e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],c={...s,path:o},f="",h=n.filter(p=>!!p).slice().reverse();for(let p of h)f=p(c,{data:t,defaultError:f}).message;return{...s,path:o,message:s.message||f}},"makeIssue"),$L=[];function gt(e,t){let r=e0({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Qp(),kf].filter(n=>!!n)});e.common.issues.push(r)}i(gt,"addIssueToContext");var Xr=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let s of r){if(s.status==="aborted")return kt;s.status==="dirty"&&t.dirty(),n.push(s.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let s of r)n.push({key:await s.key,value:await s.value});return Xr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let s of r){let{key:o,value:c}=s;if(o.status==="aborted"||c.status==="aborted")return kt;o.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),(typeof c.value<"u"||s.alwaysSet)&&(n[o.value]=c.value)}return{status:t.value,value:n}}};i(Xr,"ParseStatus");var kt=Object.freeze({status:"aborted"}),b7=i(e=>({status:"dirty",value:e}),"DIRTY"),En=i(e=>({status:"valid",value:e}),"OK"),_y=i(e=>e.status==="aborted","isAborted"),Ey=i(e=>e.status==="dirty","isDirty"),t0=i(e=>e.status==="valid","isValid"),r0=i(e=>typeof Promise!==void 0&&e instanceof Promise,"isAsync"),Wt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Wt||(Wt={}));var di=class{constructor(t,r,n,s){this.parent=t,this.data=r,this._path=n,this._key=s}get path(){return this._path.concat(this._key)}};i(di,"ParseInputLazyPath");var m7=i((e,t)=>{if(t0(t))return{success:!0,data:t.value};{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new Li(e.common.issues);return{success:!1,error:r}}},"handleResult");function Kt(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:i((c,f)=>c.code!=="invalid_type"?{message:f.defaultError}:typeof f.data>"u"?{message:n??f.defaultError}:{message:r??f.defaultError},"customMap"),description:s}}i(Kt,"processCreateParams");var Pt=class{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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return qa(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:qa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xr,ctx:{common:t.parent.common,data:t.data,parsedType:qa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(r0(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 n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;let s={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qa(t)},o=this._parseSync({data:t,path:s.path,parent:s});return m7(s,o)}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:qa(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(r0(s)?s:Promise.resolve(s));return m7(n,o)}refine(t,r){let n=i(s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r,"getIssueProperties");return this._refinement((s,o)=>{let c=t(s),f=i(()=>o.addIssue({code:Ke.custom,...n(s)}),"setError");return typeof Promise<"u"&&c instanceof Promise?c.then(h=>h?!0:(f(),!1)):c?!0:(f(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new Vn({schema:this,typeName:xt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return pi.create(this)}nullable(){return Ps.create(this)}nullish(){return this.optional().nullable()}array(){return Kn.create(this)}promise(){return ha.create(this)}or(t){return Za.create([this,t])}and(t){return Ja.create(this,t)}transform(t){return new Vn({schema:this,typeName:xt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ro({innerType:this,defaultValue:r,typeName:xt.ZodDefault})}brand(){return new If({typeName:xt.ZodBranded,type:this,...Kt(void 0)})}catch(t){let r=typeof t=="function"?t:()=>t;return new oc({innerType:this,defaultValue:r,typeName:xt.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return no.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};i(Pt,"ZodType");var jL=/^c[^\s-]{8,}$/i,zL=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,HL=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,qL=i(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}:\\d{2})|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),Fi=class extends Pt{constructor(){super(...arguments),this._regex=(t,r,n)=>this.refinement(s=>t.test(s),{validation:r,code:Ke.invalid_string,...Wt.errToObj(n)}),this.nonempty=t=>this.min(1,Wt.errToObj(t)),this.trim=()=>new Fi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==et.string){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.string,received:o.parsedType}),kt}let n=new Xr,s;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let c=t.data.length>o.value,f=t.data.length<o.value;(c||f)&&(s=this._getOrReturnCtx(t,s),c?gt(s,{code:Ke.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):f&>(s,{code:Ke.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")HL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"email",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")zL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"uuid",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")jL.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"cuid",code:Ke.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),gt(s,{validation:"url",code:Ke.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{validation:"regex",code:Ke.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?qL(o).test(t.data)||(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.invalid_string,validation:"datetime",message:o.message}),n.dirty()):nr.assertNever(o);return{status:n.value,value:t.data}}_addCheck(t){return new Fi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Wt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Wt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Wt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Wt.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...Wt.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Wt.errToObj(r)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Wt.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Wt.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Wt.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Wt.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Wt.errToObj(r)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}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}};i(Fi,"ZodString");Fi.create=e=>{var t;return new Fi({checks:[],typeName:xt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};function KL(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),c=parseInt(t.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}i(KL,"floatSafeRemainder");var rs=class extends Pt{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)!==et.number){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.number,received:o.parsedType}),kt}let n,s=new Xr;for(let o of this._def.checks)o.kind==="int"?nr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?KL(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),gt(n,{code:Ke.not_finite,message:o.message}),s.dirty()):nr.assertNever(o);return{status:s.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Wt.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Wt.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Wt.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Wt.toString(r))}setLimit(t,r,n,s){return new rs({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Wt.toString(s)}]})}_addCheck(t){return new rs({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Wt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Wt.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Wt.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Wt.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")}};i(rs,"ZodNumber");rs.create=e=>new rs({checks:[],typeName:xt.ZodNumber,coerce:e?.coerce||!1,...Kt(e)});var Ka=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==et.bigint){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.bigint,received:n.parsedType}),kt}return En(t.data)}};i(Ka,"ZodBigInt");Ka.create=e=>{var t;return new Ka({typeName:xt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Kt(e)})};var Va=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=Boolean(t.data)),this._getType(t)!==et.boolean){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.boolean,received:n.parsedType}),kt}return En(t.data)}};i(Va,"ZodBoolean");Va.create=e=>new Va({typeName:xt.ZodBoolean,coerce:e?.coerce||!1,...Kt(e)});var Os=class extends Pt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==et.date){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_type,expected:et.date,received:o.parsedType}),kt}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return gt(o,{code:Ke.invalid_date}),kt}let n=new Xr,s;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),gt(s,{code:Ke.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):nr.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Os({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Wt.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Wt.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}};i(Os,"ZodDate");Os.create=e=>new Os({checks:[],coerce:e?.coerce||!1,typeName:xt.ZodDate,...Kt(e)});var nc=class extends Pt{_parse(t){if(this._getType(t)!==et.symbol){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.symbol,received:n.parsedType}),kt}return En(t.data)}};i(nc,"ZodSymbol");nc.create=e=>new nc({typeName:xt.ZodSymbol,...Kt(e)});var Ga=class extends Pt{_parse(t){if(this._getType(t)!==et.undefined){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.undefined,received:n.parsedType}),kt}return En(t.data)}};i(Ga,"ZodUndefined");Ga.create=e=>new Ga({typeName:xt.ZodUndefined,...Kt(e)});var Wa=class extends Pt{_parse(t){if(this._getType(t)!==et.null){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.null,received:n.parsedType}),kt}return En(t.data)}};i(Wa,"ZodNull");Wa.create=e=>new Wa({typeName:xt.ZodNull,...Kt(e)});var fa=class extends Pt{constructor(){super(...arguments),this._any=!0}_parse(t){return En(t.data)}};i(fa,"ZodAny");fa.create=e=>new fa({typeName:xt.ZodAny,...Kt(e)});var Rs=class extends Pt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return En(t.data)}};i(Rs,"ZodUnknown");Rs.create=e=>new Rs({typeName:xt.ZodUnknown,...Kt(e)});var Ui=class extends Pt{_parse(t){let r=this._getOrReturnCtx(t);return gt(r,{code:Ke.invalid_type,expected:et.never,received:r.parsedType}),kt}};i(Ui,"ZodNever");Ui.create=e=>new Ui({typeName:xt.ZodNever,...Kt(e)});var ic=class extends Pt{_parse(t){if(this._getType(t)!==et.undefined){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.void,received:n.parsedType}),kt}return En(t.data)}};i(ic,"ZodVoid");ic.create=e=>new ic({typeName:xt.ZodVoid,...Kt(e)});var Kn=class extends Pt{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==et.array)return gt(r,{code:Ke.invalid_type,expected:et.array,received:r.parsedType}),kt;if(s.exactLength!==null){let c=r.data.length>s.exactLength.value,f=r.data.length<s.exactLength.value;(c||f)&&(gt(r,{code:c?Ke.too_big:Ke.too_small,minimum:f?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(gt(r,{code:Ke.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(gt(r,{code:Ke.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all(r.data.map((c,f)=>s.type._parseAsync(new di(r,c,r.path,f)))).then(c=>Xr.mergeArray(n,c));let o=r.data.map((c,f)=>s.type._parseSync(new di(r,c,r.path,f)));return Xr.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new Kn({...this._def,minLength:{value:t,message:Wt.toString(r)}})}max(t,r){return new Kn({...this._def,maxLength:{value:t,message:Wt.toString(r)}})}length(t,r){return new Kn({...this._def,exactLength:{value:t,message:Wt.toString(r)}})}nonempty(t){return this.min(1,t)}};i(Kn,"ZodArray");Kn.create=(e,t)=>new Kn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:xt.ZodArray,...Kt(t)});var n0;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(n0||(n0={}));var v7=i(e=>t=>new _r({...e,shape:()=>({...e.shape(),...t})}),"AugmentFactory");function Su(e){if(e instanceof _r){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=pi.create(Su(n))}return new _r({...e._def,shape:()=>t})}else return e instanceof Kn?Kn.create(Su(e.element)):e instanceof pi?pi.create(Su(e.unwrap())):e instanceof Ps?Ps.create(Su(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>Su(t))):e}i(Su,"deepPartialify");var _r=class extends Pt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=v7(this._def),this.extend=v7(this._def)}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=nr.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==et.object){let p=this._getOrReturnCtx(t);return gt(p,{code:Ke.invalid_type,expected:et.object,received:p.parsedType}),kt}let{status:n,ctx:s}=this._processInputParams(t),{shape:o,keys:c}=this._getCached(),f=[];if(!(this._def.catchall instanceof Ui&&this._def.unknownKeys==="strip"))for(let p in s.data)c.includes(p)||f.push(p);let h=[];for(let p of c){let v=o[p],b=s.data[p];h.push({key:{status:"valid",value:p},value:v._parse(new di(s,b,s.path,p)),alwaysSet:p in s.data})}if(this._def.catchall instanceof Ui){let p=this._def.unknownKeys;if(p==="passthrough")for(let v of f)h.push({key:{status:"valid",value:v},value:{status:"valid",value:s.data[v]}});else if(p==="strict")f.length>0&&(gt(s,{code:Ke.unrecognized_keys,keys:f}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let v of f){let b=s.data[v];h.push({key:{status:"valid",value:v},value:p._parse(new di(s,b,s.path,v)),alwaysSet:v in s.data})}}return s.common.async?Promise.resolve().then(async()=>{let p=[];for(let v of h){let b=await v.key;p.push({key:b,value:await v.value,alwaysSet:v.alwaysSet})}return p}).then(p=>Xr.mergeObjectSync(n,p)):Xr.mergeObjectSync(n,h)}get shape(){return this._def.shape()}strict(t){return Wt.errToObj,new _r({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var s,o,c,f;let h=(c=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&c!==void 0?c:n.defaultError;return r.code==="unrecognized_keys"?{message:(f=Wt.errToObj(t).message)!==null&&f!==void 0?f:h}:{message:h}}}:{}})}strip(){return new _r({...this._def,unknownKeys:"strip"})}passthrough(){return new _r({...this._def,unknownKeys:"passthrough"})}setKey(t,r){return this.augment({[t]:r})}merge(t){return new _r({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>n0.mergeShapes(this._def.shape(),t._def.shape()),typeName:xt.ZodObject})}catchall(t){return new _r({...this._def,catchall:t})}pick(t){let r={};return nr.objectKeys(t).map(n=>{this.shape[n]&&(r[n]=this.shape[n])}),new _r({...this._def,shape:()=>r})}omit(t){let r={};return nr.objectKeys(this.shape).map(n=>{nr.objectKeys(t).indexOf(n)===-1&&(r[n]=this.shape[n])}),new _r({...this._def,shape:()=>r})}deepPartial(){return Su(this)}partial(t){let r={};if(t)return nr.objectKeys(this.shape).map(n=>{nr.objectKeys(t).indexOf(n)===-1?r[n]=this.shape[n]:r[n]=this.shape[n].optional()}),new _r({...this._def,shape:()=>r});for(let n in this.shape){let s=this.shape[n];r[n]=s.optional()}return new _r({...this._def,shape:()=>r})}required(t){let r={};if(t)nr.objectKeys(this.shape).map(n=>{if(nr.objectKeys(t).indexOf(n)===-1)r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof pi;)o=o._def.innerType;r[n]=o}});else for(let n in this.shape){let o=this.shape[n];for(;o instanceof pi;)o=o._def.innerType;r[n]=o}return new _r({...this._def,shape:()=>r})}keyof(){return w7(nr.objectKeys(this.shape))}};i(_r,"ZodObject");_r.create=(e,t)=>new _r({shape:()=>e,unknownKeys:"strip",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});_r.strictCreate=(e,t)=>new _r({shape:()=>e,unknownKeys:"strict",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});_r.lazycreate=(e,t)=>new _r({shape:e,unknownKeys:"strip",catchall:Ui.create(),typeName:xt.ZodObject,...Kt(t)});var Za=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function s(o){for(let f of o)if(f.result.status==="valid")return f.result;for(let f of o)if(f.result.status==="dirty")return r.common.issues.push(...f.ctx.common.issues),f.result;let c=o.map(f=>new Li(f.ctx.common.issues));return gt(r,{code:Ke.invalid_union,unionErrors:c}),kt}if(i(s,"handleResults"),r.common.async)return Promise.all(n.map(async o=>{let c={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(s);{let o,c=[];for(let h of n){let p={...r,common:{...r.common,issues:[]},parent:null},v=h._parseSync({data:r.data,path:r.path,parent:p});if(v.status==="valid")return v;v.status==="dirty"&&!o&&(o={result:v,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let f=c.map(h=>new Li(h));return gt(r,{code:Ke.invalid_union,unionErrors:f}),kt}}get options(){return this._def.options}};i(Za,"ZodUnion");Za.create=(e,t)=>new Za({options:e,typeName:xt.ZodUnion,...Kt(t)});var Xp=i(e=>e instanceof Xa?Xp(e.schema):e instanceof Vn?Xp(e.innerType()):e instanceof Qa?[e.value]:e instanceof eo?e.options:e instanceof to?Object.keys(e.enum):e instanceof ro?Xp(e._def.innerType):e instanceof Ga?[void 0]:e instanceof Wa?[null]:null,"getDiscriminator"),sc=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.object)return gt(r,{code:Ke.invalid_type,expected:et.object,received:r.parsedType}),kt;let n=this.discriminator,s=r.data[n],o=this.optionsMap.get(s);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(gt(r,{code:Ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),kt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let s=new Map;for(let o of r){let c=Xp(o.shape[t]);if(!c)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let f of c){if(s.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);s.set(f,o)}}return new sc({typeName:xt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:s,...Kt(n)})}};i(sc,"ZodDiscriminatedUnion");function Ay(e,t){let r=qa(e),n=qa(t);if(e===t)return{valid:!0,data:e};if(r===et.object&&n===et.object){let s=nr.objectKeys(t),o=nr.objectKeys(e).filter(f=>s.indexOf(f)!==-1),c={...e,...t};for(let f of o){let h=Ay(e[f],t[f]);if(!h.valid)return{valid:!1};c[f]=h.data}return{valid:!0,data:c}}else if(r===et.array&&n===et.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let c=e[o],f=t[o],h=Ay(c,f);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return r===et.date&&n===et.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}i(Ay,"mergeValues");var Ja=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=i((o,c)=>{if(_y(o)||_y(c))return kt;let f=Ay(o.value,c.value);return f.valid?((Ey(o)||Ey(c))&&r.dirty(),{status:r.value,value:f.data}):(gt(n,{code:Ke.invalid_intersection_types}),kt)},"handleParsed");return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,c])=>s(o,c)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};i(Ja,"ZodIntersection");Ja.create=(e,t,r)=>new Ja({left:e,right:t,typeName:xt.ZodIntersection,...Kt(r)});var hi=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.array)return gt(n,{code:Ke.invalid_type,expected:et.array,received:n.parsedType}),kt;if(n.data.length<this._def.items.length)return gt(n,{code:Ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),kt;!this._def.rest&&n.data.length>this._def.items.length&&(gt(n,{code:Ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=n.data.map((c,f)=>{let h=this._def.items[f]||this._def.rest;return h?h._parse(new di(n,c,n.path,f)):null}).filter(c=>!!c);return n.common.async?Promise.all(o).then(c=>Xr.mergeArray(r,c)):Xr.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new hi({...this._def,rest:t})}};i(hi,"ZodTuple");hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:xt.ZodTuple,rest:null,...Kt(t)})};var Ya=class extends Pt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.object)return gt(n,{code:Ke.invalid_type,expected:et.object,received:n.parsedType}),kt;let s=[],o=this._def.keyType,c=this._def.valueType;for(let f in n.data)s.push({key:o._parse(new di(n,f,n.path,f)),value:c._parse(new di(n,n.data[f],n.path,f))});return n.common.async?Xr.mergeObjectAsync(r,s):Xr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Pt?new Ya({keyType:t,valueType:r,typeName:xt.ZodRecord,...Kt(n)}):new Ya({keyType:Fi.create(),valueType:t,typeName:xt.ZodRecord,...Kt(r)})}};i(Ya,"ZodRecord");var ac=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.map)return gt(n,{code:Ke.invalid_type,expected:et.map,received:n.parsedType}),kt;let s=this._def.keyType,o=this._def.valueType,c=[...n.data.entries()].map(([f,h],p)=>({key:s._parse(new di(n,f,n.path,[p,"key"])),value:o._parse(new di(n,h,n.path,[p,"value"]))}));if(n.common.async){let f=new Map;return Promise.resolve().then(async()=>{for(let h of c){let p=await h.key,v=await h.value;if(p.status==="aborted"||v.status==="aborted")return kt;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}})}else{let f=new Map;for(let h of c){let p=h.key,v=h.value;if(p.status==="aborted"||v.status==="aborted")return kt;(p.status==="dirty"||v.status==="dirty")&&r.dirty(),f.set(p.value,v.value)}return{status:r.value,value:f}}}};i(ac,"ZodMap");ac.create=(e,t,r)=>new ac({valueType:t,keyType:e,typeName:xt.ZodMap,...Kt(r)});var Ns=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==et.set)return gt(n,{code:Ke.invalid_type,expected:et.set,received:n.parsedType}),kt;let s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(gt(n,{code:Ke.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(gt(n,{code:Ke.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let o=this._def.valueType;function c(h){let p=new Set;for(let v of h){if(v.status==="aborted")return kt;v.status==="dirty"&&r.dirty(),p.add(v.value)}return{status:r.value,value:p}}i(c,"finalizeSet");let f=[...n.data.values()].map((h,p)=>o._parse(new di(n,h,n.path,p)));return n.common.async?Promise.all(f).then(h=>c(h)):c(f)}min(t,r){return new Ns({...this._def,minSize:{value:t,message:Wt.toString(r)}})}max(t,r){return new Ns({...this._def,maxSize:{value:t,message:Wt.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};i(Ns,"ZodSet");Ns.create=(e,t)=>new Ns({valueType:e,minSize:null,maxSize:null,typeName:xt.ZodSet,...Kt(t)});var da=class extends Pt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.function)return gt(r,{code:Ke.invalid_type,expected:et.function,received:r.parsedType}),kt;function n(f,h){return e0({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qp(),kf].filter(p=>!!p),issueData:{code:Ke.invalid_arguments,argumentsError:h}})}i(n,"makeArgsIssue");function s(f,h){return e0({data:f,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Qp(),kf].filter(p=>!!p),issueData:{code:Ke.invalid_return_type,returnTypeError:h}})}i(s,"makeReturnsIssue");let o={errorMap:r.common.contextualErrorMap},c=r.data;return this._def.returns instanceof ha?En(async(...f)=>{let h=new Li([]),p=await this._def.args.parseAsync(f,o).catch(y=>{throw h.addIssue(n(f,y)),h}),v=await c(...p);return await this._def.returns._def.type.parseAsync(v,o).catch(y=>{throw h.addIssue(s(v,y)),h})}):En((...f)=>{let h=this._def.args.safeParse(f,o);if(!h.success)throw new Li([n(f,h.error)]);let p=c(...h.data),v=this._def.returns.safeParse(p,o);if(!v.success)throw new Li([s(p,v.error)]);return v.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new da({...this._def,args:hi.create(t).rest(Rs.create())})}returns(t){return new da({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new da({args:t||hi.create([]).rest(Rs.create()),returns:r||Rs.create(),typeName:xt.ZodFunction,...Kt(n)})}};i(da,"ZodFunction");var Xa=class extends Pt{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})}};i(Xa,"ZodLazy");Xa.create=(e,t)=>new Xa({getter:e,typeName:xt.ZodLazy,...Kt(t)});var Qa=class extends Pt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return gt(r,{code:Ke.invalid_literal,expected:this._def.value}),kt}return{status:"valid",value:t.data}}get value(){return this._def.value}};i(Qa,"ZodLiteral");Qa.create=(e,t)=>new Qa({value:e,typeName:xt.ZodLiteral,...Kt(t)});function w7(e,t){return new eo({values:e,typeName:xt.ZodEnum,...Kt(t)})}i(w7,"createZodEnum");var eo=class extends Pt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return gt(r,{expected:nr.joinValues(n),received:r.parsedType,code:Ke.invalid_type}),kt}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),n=this._def.values;return gt(r,{received:r.data,code:Ke.invalid_enum_value,options:n}),kt}return En(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}};i(eo,"ZodEnum");eo.create=w7;var to=class extends Pt{_parse(t){let r=nr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==et.string&&n.parsedType!==et.number){let s=nr.objectValues(r);return gt(n,{expected:nr.joinValues(s),received:n.parsedType,code:Ke.invalid_type}),kt}if(r.indexOf(t.data)===-1){let s=nr.objectValues(r);return gt(n,{received:n.data,code:Ke.invalid_enum_value,options:s}),kt}return En(t.data)}get enum(){return this._def.values}};i(to,"ZodNativeEnum");to.create=(e,t)=>new to({values:e,typeName:xt.ZodNativeEnum,...Kt(t)});var ha=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==et.promise&&r.common.async===!1)return gt(r,{code:Ke.invalid_type,expected:et.promise,received:r.parsedType}),kt;let n=r.parsedType===et.promise?r.data:Promise.resolve(r.data);return En(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};i(ha,"ZodPromise");ha.create=(e,t)=>new ha({type:e,typeName:xt.ZodPromise,...Kt(t)});var Vn=class extends Pt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=this._def.effect||null;if(s.type==="preprocess"){let c=s.transform(n.data);return n.common.async?Promise.resolve(c).then(f=>this._def.schema._parseAsync({data:f,path:n.path,parent:n})):this._def.schema._parseSync({data:c,path:n.path,parent:n})}let o={addIssue:c=>{gt(n,c),c.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="refinement"){let c=i(f=>{let h=s.refinement(f,o);if(n.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f},"executeRefinement");if(n.common.async===!1){let f=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return f.status==="aborted"?kt:(f.status==="dirty"&&r.dirty(),c(f.value),{status:r.value,value:f.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(f=>f.status==="aborted"?kt:(f.status==="dirty"&&r.dirty(),c(f.value).then(()=>({status:r.value,value:f.value}))))}if(s.type==="transform")if(n.common.async===!1){let c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!t0(c))return c;let f=s.transform(c.value,o);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:f}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>t0(c)?Promise.resolve(s.transform(c.value,o)).then(f=>({status:r.value,value:f})):c);nr.assertNever(s)}};i(Vn,"ZodEffects");Vn.create=(e,t,r)=>new Vn({schema:e,typeName:xt.ZodEffects,effect:t,...Kt(r)});Vn.createWithPreprocess=(e,t,r)=>new Vn({schema:t,effect:{type:"preprocess",transform:e},typeName:xt.ZodEffects,...Kt(r)});var pi=class extends Pt{_parse(t){return this._getType(t)===et.undefined?En(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};i(pi,"ZodOptional");pi.create=(e,t)=>new pi({innerType:e,typeName:xt.ZodOptional,...Kt(t)});var Ps=class extends Pt{_parse(t){return this._getType(t)===et.null?En(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};i(Ps,"ZodNullable");Ps.create=(e,t)=>new Ps({innerType:e,typeName:xt.ZodNullable,...Kt(t)});var ro=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===et.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};i(ro,"ZodDefault");ro.create=(e,t)=>new ro({innerType:e,typeName:xt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)});var oc=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.innerType._parse({data:r.data,path:r.path,parent:r});return r0(n)?n.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.defaultValue()})):{status:"valid",value:n.status==="valid"?n.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}};i(oc,"ZodCatch");oc.create=(e,t)=>new oc({innerType:e,typeName:xt.ZodCatch,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)});var cc=class extends Pt{_parse(t){if(this._getType(t)!==et.nan){let n=this._getOrReturnCtx(t);return gt(n,{code:Ke.invalid_type,expected:et.nan,received:n.parsedType}),kt}return{status:"valid",value:t.data}}};i(cc,"ZodNaN");cc.create=e=>new cc({typeName:xt.ZodNaN,...Kt(e)});var VL=Symbol("zod_brand"),If=class extends Pt{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};i(If,"ZodBranded");var no=class extends Pt{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return i(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?kt:o.status==="dirty"?(r.dirty(),b7(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})},"handleAsync")();{let s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?kt:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(t,r){return new no({in:t,out:r,typeName:xt.ZodPipeline})}};i(no,"ZodPipeline");var _7=i((e,t={},r)=>e?fa.create().superRefine((n,s)=>{if(!e(n)){let o=typeof t=="function"?t(n):t,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:r})}}):fa.create(),"custom"),GL={object:_r.lazycreate},xt;(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"})(xt||(xt={}));var WL=i((e,t={message:`Input not instance of ${e.name}`})=>_7(r=>r instanceof e,t,!0),"instanceOfType"),E7=Fi.create,A7=rs.create,ZL=cc.create,JL=Ka.create,S7=Va.create,YL=Os.create,XL=nc.create,QL=Ga.create,eF=Wa.create,tF=fa.create,rF=Rs.create,nF=Ui.create,iF=ic.create,sF=Kn.create,aF=_r.create,oF=_r.strictCreate,cF=Za.create,uF=sc.create,lF=Ja.create,fF=hi.create,dF=Ya.create,hF=ac.create,pF=Ns.create,mF=da.create,vF=Xa.create,gF=Qa.create,yF=eo.create,bF=to.create,wF=ha.create,g7=Vn.create,_F=pi.create,EF=Ps.create,AF=Vn.createWithPreprocess,SF=no.create,xF=i(()=>E7().optional(),"ostring"),TF=i(()=>A7().optional(),"onumber"),MF=i(()=>S7().optional(),"oboolean"),CF={string:e=>Fi.create({...e,coerce:!0}),number:e=>rs.create({...e,coerce:!0}),boolean:e=>Va.create({...e,coerce:!0}),bigint:e=>Ka.create({...e,coerce:!0}),date:e=>Os.create({...e,coerce:!0})},IF=kt,te=Object.freeze({__proto__:null,defaultErrorMap:kf,setErrorMap:UL,getErrorMap:Qp,makeIssue:e0,EMPTY_PATH:$L,addIssueToContext:gt,ParseStatus:Xr,INVALID:kt,DIRTY:b7,OK:En,isAborted:_y,isDirty:Ey,isValid:t0,isAsync:r0,get util(){return nr},ZodParsedType:et,getParsedType:qa,ZodType:Pt,ZodString:Fi,ZodNumber:rs,ZodBigInt:Ka,ZodBoolean:Va,ZodDate:Os,ZodSymbol:nc,ZodUndefined:Ga,ZodNull:Wa,ZodAny:fa,ZodUnknown:Rs,ZodNever:Ui,ZodVoid:ic,ZodArray:Kn,get objectUtil(){return n0},ZodObject:_r,ZodUnion:Za,ZodDiscriminatedUnion:sc,ZodIntersection:Ja,ZodTuple:hi,ZodRecord:Ya,ZodMap:ac,ZodSet:Ns,ZodFunction:da,ZodLazy:Xa,ZodLiteral:Qa,ZodEnum:eo,ZodNativeEnum:to,ZodPromise:ha,ZodEffects:Vn,ZodTransformer:Vn,ZodOptional:pi,ZodNullable:Ps,ZodDefault:ro,ZodCatch:oc,ZodNaN:cc,BRAND:VL,ZodBranded:If,ZodPipeline:no,custom:_7,Schema:Pt,ZodSchema:Pt,late:GL,get ZodFirstPartyTypeKind(){return xt},coerce:CF,any:tF,array:sF,bigint:JL,boolean:S7,date:YL,discriminatedUnion:uF,effect:g7,enum:yF,function:mF,instanceof:WL,intersection:lF,lazy:vF,literal:gF,map:hF,nan:ZL,nativeEnum:bF,never:nF,null:eF,nullable:EF,number:A7,object:aF,oboolean:MF,onumber:TF,optional:_F,ostring:xF,pipeline:SF,preprocess:AF,promise:wF,record:dF,set:pF,strictObject:oF,string:E7,symbol:XL,transformer:g7,tuple:fF,undefined:QL,union:cF,unknown:rF,void:iF,NEVER:IF,ZodIssueCode:Ke,quotelessJson:FL,ZodError:Li});var T7=te.array(te.string().or(te.record(te.any()))),SZ=te.object({type:te.string().optional(),narrative:te.string().optional()}),a0=te.string().or(te.object({id:te.string(),type:te.string(),caption:te.string().optional()})),kF=te.object({type:te.string().min(1).or(te.string().array().nonempty()),latitude:te.number(),longitude:te.number()}),DF=te.object({type:te.string().min(1).or(te.string().array().nonempty()),addressCountry:te.string().optional(),addressCountryCode:te.string().optional(),addressRegion:te.string().optional(),addressLocality:te.string().optional(),streetAddress:te.string().optional(),postOfficeBoxNumber:te.string().optional(),postalCode:te.string().optional(),geo:kF.optional()}),OF=te.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(te.string()),M7=te.object({type:te.string().min(1).or(te.string().array().nonempty()),identifier:te.string(),identifierType:OF}),Df=te.string().or(te.object({id:te.string().optional(),type:te.string().or(te.string().array().nonempty().optional()),name:te.string().optional(),url:te.string().optional(),phone:te.string().optional(),description:te.string().optional(),endorsement:te.any().array().optional(),image:a0.optional(),email:te.string().email().optional(),address:DF.optional(),otherIdentifier:M7.array().optional(),official:te.string().optional(),parentOrg:te.any().optional(),familyName:te.string().optional(),givenName:te.string().optional(),additionalName:te.string().optional(),patronymicName:te.string().optional(),honorificPrefix:te.string().optional(),honorificSuffix:te.string().optional(),familyNamePrefix:te.string().optional(),dateOfBirth:te.string().optional()}).catchall(te.any())),Sy=te.object({id:te.string().optional()}).catchall(te.any()),RF=te.object({type:te.string(),id:te.string()}).catchall(te.any()),NF=te.object({id:te.string(),type:te.string()}).catchall(te.any()),PF=te.object({id:te.string(),type:te.string()}).catchall(te.any()),i0=te.object({"@context":T7,id:te.string().optional(),type:te.string().array().nonempty(),issuer:Df,issuanceDate:te.string(),expirationDate:te.string().optional(),credentialSubject:Sy.or(Sy.array()),credentialStatus:RF.optional(),credentialSchema:NF.array().optional(),refreshService:PF.optional()}).catchall(te.any()),io=te.object({type:te.string(),created:te.string(),challenge:te.string().optional(),domain:te.string().optional(),nonce:te.string().optional(),proofPurpose:te.string(),verificationMethod:te.string(),jws:te.string().optional()}).catchall(te.any()),s0=i0.extend({proof:io.or(io.array())}),BF=te.object({"@context":T7,id:te.string().optional(),type:te.string().or(te.string().array().nonempty()),verifiableCredential:s0.or(s0.array()).optional(),holder:te.string().optional()}).catchall(te.any()),xZ=BF.extend({proof:io.or(io.array())}),LF=te.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(te.string()),o0=te.object({type:te.string().array().nonempty(),targetCode:te.string().optional(),targetDescription:te.string().optional(),targetName:te.string(),targetFramework:te.string().optional(),targetType:LF.optional(),targetUrl:te.string()}),FF=te.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),UF=FF.or(te.string()),$F=te.object({id:te.string().optional(),narrative:te.string().optional()}).catchall(te.any()),jF=te.object({id:te.string(),type:te.string().array().nonempty(),endorsementComment:te.string().optional()}),zF=i0.extend({credentialSubject:jF,proof:io.or(io.array()).optional()}),HF=te.object({id:te.string(),"@language":te.string().optional(),version:te.string().optional()}),qF=te.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(te.string()),KF=te.object({id:te.string(),type:te.string().array().nonempty(),alignment:o0.array().optional(),description:te.string().optional(),level:te.string().optional(),name:te.string(),points:te.string().optional()}).catchall(te.any()),VF=te.object({id:te.string(),type:te.string().array().nonempty(),alignment:o0.array().optional(),allowedValue:te.string().array().optional(),name:te.string(),requiredLevel:te.string().optional(),requiredValue:te.string().optional(),resultType:qF,rubricCriterionLevel:KF.array().optional(),valueMax:te.string().optional(),valueMin:te.string().optional()}).catchall(te.any()),GF=te.object({id:te.string().optional(),type:te.string().array().nonempty(),alignment:o0.array().optional(),achievementType:UF.optional(),creator:Df.optional(),creditsAvailable:te.number().optional(),criteria:$F,description:te.string(),endorsement:zF.array().optional(),fieldOfStudy:te.string().optional(),humanCode:te.string().optional(),image:a0.optional(),"@language":te.string().optional(),name:te.string(),otherIdentifier:M7.array().optional(),related:HF.array().optional(),resultDescription:VF.array().optional(),specialization:te.string().optional(),tag:te.string().array().optional(),version:te.string().optional()}).catchall(te.any()),WF=te.object({type:te.string(),hashed:te.boolean(),identityHash:te.string(),identityType:te.string(),salt:te.string().optional()}),ZF=te.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),JF=te.object({type:te.string().array().nonempty(),achievedLevel:te.string().optional(),alignment:o0.array().optional(),resultDescription:te.string().optional(),status:ZF.optional(),value:te.string().optional()}).catchall(te.any()),x7=te.object({id:te.string().optional(),type:te.string().array().nonempty(),activityEndDate:te.string().optional(),activityStartDate:te.string().optional(),creditsEarned:te.number().optional(),achievement:GF.optional(),identifier:WF.array().optional(),image:a0.optional(),licenseNumber:te.string().optional(),narrative:te.string().optional(),result:JF.array().optional(),role:te.string().optional(),source:Df.optional(),term:te.string().optional()}).catchall(te.any()),YF=te.object({id:te.string().optional(),type:te.string().array().nonempty(),narrative:te.string().optional(),name:te.string().optional(),description:te.string().optional(),genre:te.string().optional(),audience:te.string().optional()}).catchall(te.any()),XF=i0.extend({name:te.string().optional(),description:te.string().optional(),image:a0.optional(),credentialSubject:x7.or(x7.array()),endorsement:i0.array().optional(),evidence:YF.array().optional()}),MZ=XF.extend({proof:io.or(io.array())}),IZ=te.object({checks:te.string().array(),warnings:te.string().array(),errors:te.string().array()}),C7=te.enum(["Success","Failed","Error"]),kZ=C7.enum,DZ=te.object({check:te.string(),status:C7,message:te.string().optional(),details:te.string().optional()}),OZ=te.object({title:te.string().optional(),createdAt:te.string().optional(),issuer:Df.optional(),issuee:Df.optional(),credentialSubject:Sy.optional()}),uc=te.object({id:te.string(),uri:te.string()}).catchall(te.any()),PZ=te.object({limit:te.number(),cursor:te.string().optional()}),I7=te.object({cursor:te.string().optional(),hasMore:te.boolean()}),QF=te.object({kty:te.string(),crv:te.string(),x:te.string(),y:te.string().optional(),n:te.string().optional(),d:te.string()}),eU=te.object({alg:te.string(),iv:te.string(),tag:te.string(),epk:QF.partial().optional(),kid:te.string().optional(),apv:te.string().optional(),apu:te.string().optional()}),tU=te.object({header:eU,encrypted_key:te.string()}),rU=te.object({protected:te.string(),iv:te.string(),ciphertext:te.string(),tag:te.string(),aad:te.string().optional(),recipients:tU.array().optional()}),k7=te.object({encryptedRecord:rU,fields:te.string().array()}).catchall(te.any()),LZ=I7.extend({records:k7.array()}),nU=k7.extend({id:te.string()}),FZ=I7.extend({records:nU.array()}),xy=te.object({profileId:te.string().min(3).max(40),displayName:te.string().default(""),did:te.string(),email:te.string().optional(),image:te.string().optional(),isServiceProfile:te.boolean().default(!1).optional(),notificationsWebhook:te.string().url().startsWith("https://").optional()}),$Z=te.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),jZ=te.object({uri:te.string(),to:te.string(),from:te.string(),sent:te.string().datetime(),received:te.string().datetime().optional()}),iU=te.enum(["DRAFT","LIVE"]),zZ=te.object({uri:te.string(),name:te.string().optional(),type:te.string().optional(),category:te.string().optional(),status:iU.optional()}),HZ=te.object({to:xy,from:te.string(),received:te.string().optional()}),sU=te.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),aU=te.object({title:te.string().optional(),body:te.string().optional()}),oU=te.object({vcUris:te.array(te.string()).optional(),vpUris:te.array(te.string()).optional()}),qZ=te.object({type:sU,to:xy.partial().and(te.object({did:te.string()})),from:xy.partial().and(te.object({did:te.string()})),message:aU.optional(),data:oU.optional(),sent:te.string().datetime().optional()}),KZ=te.object({endpoint:te.string(),name:te.string(),did:te.string().optional()}),VZ=te.object({ttlSeconds:te.number().optional(),totalUses:te.number().optional()}),cU=te.object({endpoint:te.string()}),GZ=te.object({signingAuthority:cU,relationship:te.object({name:te.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:te.string()})});var uU=Object.create,ud=Object.defineProperty,lU=Object.getOwnPropertyDescriptor,Yb=Object.getOwnPropertyNames,fU=Object.getPrototypeOf,dU=Object.prototype.hasOwnProperty,a=i((e,t)=>ud(e,"name",{value:t,configurable:!0}),"__name"),Qy=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')}),pr=i((e,t)=>i(function(){return e&&(t=(0,e[Yb(e)[0]])(e=0)),t},"__init"),"__esm"),ze=i((e,t)=>i(function(){return t||(0,e[Yb(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require2"),"__commonJS"),Sr=i((e,t)=>{for(var r in t)ud(e,r,{get:t[r],enumerable:!0})},"__export"),GA=i((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Yb(t))!dU.call(e,s)&&s!==r&&ud(e,s,{get:()=>t[s],enumerable:!(n=lU(t,s))||n.enumerable});return e},"__copyProps"),rr=i((e,t,r)=>(r=e!=null?uU(fU(e)):{},GA(t||!e||!e.__esModule?ud(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),Ty=i(e=>GA(ud({},"__esModule",{value:!0}),e),"__toCommonJS"),hU=ze({"../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"(e,t){(function(){var r,n="4.17.21",s=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",f="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,v="__lodash_placeholder__",b=1,y=2,_=4,T=1,O=2,R=1,P=2,K=4,U=8,j=16,V=32,G=64,I=128,H=256,se=512,ue=30,me="...",q=800,w=16,x=1,m=2,d=3,g=1/0,S=9007199254740991,D=17976931348623157e292,C=0/0,E=4294967295,B=E-1,$=E>>>1,k=[["ary",I],["bind",R],["bindKey",P],["curry",U],["curryRight",j],["flip",se],["partial",V],["partialRight",G],["rearg",H]],F="[object Arguments]",he="[object Array]",N="[object AsyncFunction]",Y="[object Boolean]",J="[object Date]",M="[object DOMException]",z="[object Error]",re="[object Function]",oe="[object GeneratorFunction]",ge="[object Map]",ke="[object Number]",_e="[object Null]",fe="[object Object]",Ce="[object Promise]",pe="[object Proxy]",we="[object RegExp]",Q="[object Set]",ve="[object String]",Me="[object Symbol]",Ue="[object Undefined]",Re="[object WeakMap]",je="[object WeakSet]",rt="[object ArrayBuffer]",le="[object DataView]",ce="[object Float32Array]",Z="[object Float64Array]",ne="[object Int8Array]",ye="[object Int16Array]",Se="[object Int32Array]",xe="[object Uint8Array]",De="[object Uint8ClampedArray]",Mt="[object Uint16Array]",qe="[object Uint32Array]",He=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,dt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,Dr=/[&<>"']/g,ct=RegExp(mt.source),ut=RegExp(Dr.source),lr=/<%-([\s\S]+?)%>/g,lt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,it=/^\w*$/,Ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qt=/[\\^$.*+?()[\]{}|]/g,st=RegExp(Qt.source),Qe=/^\s+/,or=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ze=/\{\n\/\* \[wrapped with (.+)\] \*/,cr=/,? & /,ot=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Et=/[()=,{}\[\]\/\s]/,Sn=/\\(\\)?/g,At=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yt=/\w*$/,fn=/^[-+]0x[0-9a-f]+$/i,er=/^0b[01]+$/i,tr=/^\[object .+?Constructor\]$/,tn=/^0o[0-7]+$/i,rn=/^(?:0|[1-9]\d*)$/,Or=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Hr=/($^)/,nn=/['\n\r\u2028\u2029\\]/g,xn="\\ud800-\\udfff",Ai="\\u0300-\\u036f",Si="\\ufe20-\\ufe2f",xi="\\u20d0-\\u20ff",Pn=Ai+Si+xi,dn="\\u2700-\\u27bf",Xn="a-z\\xdf-\\xf6\\xf8-\\xff",Bn="\\xac\\xb1\\xd7\\xf7",Ti="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mi="\\u2000-\\u206f",Ci=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Gs="A-Z\\xc0-\\xd6\\xd8-\\xde",Ws="\\ufe0e\\ufe0f",Zs=Bn+Ti+Mi+Ci,Ca="['\u2019]",Td="["+xn+"]",dl="["+Zs+"]",To="["+Pn+"]",hl="\\d+",Md="["+dn+"]",pl="["+Xn+"]",ml="[^"+xn+Zs+hl+dn+Xn+Gs+"]",Mo="\\ud83c[\\udffb-\\udfff]",Cd="(?:"+To+"|"+Mo+")",vl="[^"+xn+"]",Js="(?:\\ud83c[\\udde6-\\uddff]){2}",Vi="[\\ud800-\\udbff][\\udc00-\\udfff]",Ys="["+Gs+"]",ms="\\u200d",gl="(?:"+pl+"|"+ml+")",Id="(?:"+Ys+"|"+ml+")",yl="(?:"+Ca+"(?:d|ll|m|re|s|t|ve))?",bl="(?:"+Ca+"(?:D|LL|M|RE|S|T|VE))?",wl=Cd+"?",_l="["+Ws+"]?",El="(?:"+ms+"(?:"+[vl,Js,Vi].join("|")+")"+_l+wl+")*",vs="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pc=_l+wl+El,Dd="(?:"+[Md,Js,Vi].join("|")+")"+Pc,Al="(?:"+[vl+To+"?",To,Js,Vi,Td].join("|")+")",Sl=RegExp(Ca,"g"),Od=RegExp(To,"g"),xl=RegExp(Mo+"(?="+Mo+")|"+Al+Pc,"g"),Tl=RegExp([Ys+"?"+pl+"+"+yl+"(?="+[dl,Ys,"$"].join("|")+")",Id+"+"+bl+"(?="+[dl,Ys+gl,"$"].join("|")+")",Ys+"?"+gl+"+"+yl,Ys+"+"+bl,kd,vs,hl,Dd].join("|"),"g"),Rd=RegExp("["+ms+xn+Pn+Ws+"]"),Co=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nd=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bc=-1,yr={};yr[ce]=yr[Z]=yr[ne]=yr[ye]=yr[Se]=yr[xe]=yr[De]=yr[Mt]=yr[qe]=!0,yr[F]=yr[he]=yr[rt]=yr[Y]=yr[le]=yr[J]=yr[z]=yr[re]=yr[ge]=yr[ke]=yr[fe]=yr[we]=yr[Q]=yr[ve]=yr[Re]=!1;var mr={};mr[F]=mr[he]=mr[rt]=mr[le]=mr[Y]=mr[J]=mr[ce]=mr[Z]=mr[ne]=mr[ye]=mr[Se]=mr[ge]=mr[ke]=mr[fe]=mr[we]=mr[Q]=mr[ve]=mr[Me]=mr[xe]=mr[De]=mr[Mt]=mr[qe]=!0,mr[z]=mr[re]=mr[Re]=!1;var ie={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Te={"&":"&","<":"<",">":">",'"':""","'":"'"},Pe={"&":"&","<":"<",">":">",""":'"',"'":"'"},ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qr=parseFloat,sn=parseInt,Tn=typeof global=="object"&&global&&global.Object===Object&&global,hn=typeof self=="object"&&self&&self.Object===Object&&self,Lr=Tn||hn||Function("return this")(),gs=typeof e=="object"&&e&&!e.nodeType&&e,ys=gs&&typeof t=="object"&&t&&!t.nodeType&&t,Ml=ys&&ys.exports===gs,Lc=Ml&&Tn.process,pn=function(){try{var Ee=ys&&ys.require&&ys.require("util").types;return Ee||Lc&&Lc.binding&&Lc.binding("util")}catch{}}(),Io=pn&&pn.isArrayBuffer,M6=pn&&pn.isDate,C6=pn&&pn.isMap,I6=pn&&pn.isRegExp,k6=pn&&pn.isSet,D6=pn&&pn.isTypedArray;function Ln(Ee,Ne,Ie){switch(Ie.length){case 0:return Ee.call(Ne);case 1:return Ee.call(Ne,Ie[0]);case 2:return Ee.call(Ne,Ie[0],Ie[1]);case 3:return Ee.call(Ne,Ie[0],Ie[1],Ie[2])}return Ee.apply(Ne,Ie)}i(Ln,"apply"),a(Ln,"apply");function O6(Ee,Ne,Ie,ft){for(var It=-1,fr=Ee==null?0:Ee.length;++It<fr;){var Vr=Ee[It];Ne(ft,Vr,Ie(Vr),Ee)}return ft}i(O6,"arrayAggregator"),a(O6,"arrayAggregator");function Qn(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft&&Ne(Ee[Ie],Ie,Ee)!==!1;);return Ee}i(Qn,"arrayEach"),a(Qn,"arrayEach");function R6(Ee,Ne){for(var Ie=Ee==null?0:Ee.length;Ie--&&Ne(Ee[Ie],Ie,Ee)!==!1;);return Ee}i(R6,"arrayEachRight"),a(R6,"arrayEachRight");function Wm(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft;)if(!Ne(Ee[Ie],Ie,Ee))return!1;return!0}i(Wm,"arrayEvery"),a(Wm,"arrayEvery");function Xs(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length,It=0,fr=[];++Ie<ft;){var Vr=Ee[Ie];Ne(Vr,Ie,Ee)&&(fr[It++]=Vr)}return fr}i(Xs,"arrayFilter"),a(Xs,"arrayFilter");function Cl(Ee,Ne){var Ie=Ee==null?0:Ee.length;return!!Ie&&ko(Ee,Ne,0)>-1}i(Cl,"arrayIncludes"),a(Cl,"arrayIncludes");function Pd(Ee,Ne,Ie){for(var ft=-1,It=Ee==null?0:Ee.length;++ft<It;)if(Ie(Ne,Ee[ft]))return!0;return!1}i(Pd,"arrayIncludesWith"),a(Pd,"arrayIncludesWith");function Tr(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length,It=Array(ft);++Ie<ft;)It[Ie]=Ne(Ee[Ie],Ie,Ee);return It}i(Tr,"arrayMap"),a(Tr,"arrayMap");function Qs(Ee,Ne){for(var Ie=-1,ft=Ne.length,It=Ee.length;++Ie<ft;)Ee[It+Ie]=Ne[Ie];return Ee}i(Qs,"arrayPush"),a(Qs,"arrayPush");function Bd(Ee,Ne,Ie,ft){var It=-1,fr=Ee==null?0:Ee.length;for(ft&&fr&&(Ie=Ee[++It]);++It<fr;)Ie=Ne(Ie,Ee[It],It,Ee);return Ie}i(Bd,"arrayReduce"),a(Bd,"arrayReduce");function N6(Ee,Ne,Ie,ft){var It=Ee==null?0:Ee.length;for(ft&&It&&(Ie=Ee[--It]);It--;)Ie=Ne(Ie,Ee[It],It,Ee);return Ie}i(N6,"arrayReduceRight"),a(N6,"arrayReduceRight");function Ld(Ee,Ne){for(var Ie=-1,ft=Ee==null?0:Ee.length;++Ie<ft;)if(Ne(Ee[Ie],Ie,Ee))return!0;return!1}i(Ld,"arraySome"),a(Ld,"arraySome");var Ek=Fd("length");function P6(Ee){return Ee.split("")}i(P6,"asciiToArray"),a(P6,"asciiToArray");function B6(Ee){return Ee.match(ot)||[]}i(B6,"asciiWords"),a(B6,"asciiWords");function Zm(Ee,Ne,Ie){var ft;return Ie(Ee,function(It,fr,Vr){if(Ne(It,fr,Vr))return ft=fr,!1}),ft}i(Zm,"baseFindKey"),a(Zm,"baseFindKey");function Il(Ee,Ne,Ie,ft){for(var It=Ee.length,fr=Ie+(ft?1:-1);ft?fr--:++fr<It;)if(Ne(Ee[fr],fr,Ee))return fr;return-1}i(Il,"baseFindIndex"),a(Il,"baseFindIndex");function ko(Ee,Ne,Ie){return Ne===Ne?V6(Ee,Ne,Ie):Il(Ee,Jm,Ie)}i(ko,"baseIndexOf"),a(ko,"baseIndexOf");function L6(Ee,Ne,Ie,ft){for(var It=Ie-1,fr=Ee.length;++It<fr;)if(ft(Ee[It],Ne))return It;return-1}i(L6,"baseIndexOfWith"),a(L6,"baseIndexOfWith");function Jm(Ee){return Ee!==Ee}i(Jm,"baseIsNaN"),a(Jm,"baseIsNaN");function Ym(Ee,Ne){var Ie=Ee==null?0:Ee.length;return Ie?$d(Ee,Ne)/Ie:C}i(Ym,"baseMean"),a(Ym,"baseMean");function Fd(Ee){return function(Ne){return Ne==null?r:Ne[Ee]}}i(Fd,"baseProperty"),a(Fd,"baseProperty");function Ud(Ee){return function(Ne){return Ee==null?r:Ee[Ne]}}i(Ud,"basePropertyOf"),a(Ud,"basePropertyOf");function Xm(Ee,Ne,Ie,ft,It){return It(Ee,function(fr,Vr,wr){Ie=ft?(ft=!1,fr):Ne(Ie,fr,Vr,wr)}),Ie}i(Xm,"baseReduce"),a(Xm,"baseReduce");function F6(Ee,Ne){var Ie=Ee.length;for(Ee.sort(Ne);Ie--;)Ee[Ie]=Ee[Ie].value;return Ee}i(F6,"baseSortBy"),a(F6,"baseSortBy");function $d(Ee,Ne){for(var Ie,ft=-1,It=Ee.length;++ft<It;){var fr=Ne(Ee[ft]);fr!==r&&(Ie=Ie===r?fr:Ie+fr)}return Ie}i($d,"baseSum"),a($d,"baseSum");function jd(Ee,Ne){for(var Ie=-1,ft=Array(Ee);++Ie<Ee;)ft[Ie]=Ne(Ie);return ft}i(jd,"baseTimes"),a(jd,"baseTimes");function U6(Ee,Ne){return Tr(Ne,function(Ie){return[Ie,Ee[Ie]]})}i(U6,"baseToPairs"),a(U6,"baseToPairs");function Qm(Ee){return Ee&&Ee.slice(0,n1(Ee)+1).replace(Qe,"")}i(Qm,"baseTrim"),a(Qm,"baseTrim");function Fn(Ee){return function(Ne){return Ee(Ne)}}i(Fn,"baseUnary"),a(Fn,"baseUnary");function zd(Ee,Ne){return Tr(Ne,function(Ie){return Ee[Ie]})}i(zd,"baseValues"),a(zd,"baseValues");function Fc(Ee,Ne){return Ee.has(Ne)}i(Fc,"cacheHas"),a(Fc,"cacheHas");function e1(Ee,Ne){for(var Ie=-1,ft=Ee.length;++Ie<ft&&ko(Ne,Ee[Ie],0)>-1;);return Ie}i(e1,"charsStartIndex"),a(e1,"charsStartIndex");function t1(Ee,Ne){for(var Ie=Ee.length;Ie--&&ko(Ne,Ee[Ie],0)>-1;);return Ie}i(t1,"charsEndIndex"),a(t1,"charsEndIndex");function $6(Ee,Ne){for(var Ie=Ee.length,ft=0;Ie--;)Ee[Ie]===Ne&&++ft;return ft}i($6,"countHolders"),a($6,"countHolders");var Ak=Ud(ie),Sk=Ud(Te);function j6(Ee){return"\\"+ht[Ee]}i(j6,"escapeStringChar"),a(j6,"escapeStringChar");function z6(Ee,Ne){return Ee==null?r:Ee[Ne]}i(z6,"getValue"),a(z6,"getValue");function Do(Ee){return Rd.test(Ee)}i(Do,"hasUnicode"),a(Do,"hasUnicode");function H6(Ee){return Co.test(Ee)}i(H6,"hasUnicodeWord"),a(H6,"hasUnicodeWord");function q6(Ee){for(var Ne,Ie=[];!(Ne=Ee.next()).done;)Ie.push(Ne.value);return Ie}i(q6,"iteratorToArray"),a(q6,"iteratorToArray");function Hd(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft,It){Ie[++Ne]=[It,ft]}),Ie}i(Hd,"mapToArray"),a(Hd,"mapToArray");function r1(Ee,Ne){return function(Ie){return Ee(Ne(Ie))}}i(r1,"overArg"),a(r1,"overArg");function ea(Ee,Ne){for(var Ie=-1,ft=Ee.length,It=0,fr=[];++Ie<ft;){var Vr=Ee[Ie];(Vr===Ne||Vr===v)&&(Ee[Ie]=v,fr[It++]=Ie)}return fr}i(ea,"replaceHolders"),a(ea,"replaceHolders");function kl(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft){Ie[++Ne]=ft}),Ie}i(kl,"setToArray"),a(kl,"setToArray");function K6(Ee){var Ne=-1,Ie=Array(Ee.size);return Ee.forEach(function(ft){Ie[++Ne]=[ft,ft]}),Ie}i(K6,"setToPairs"),a(K6,"setToPairs");function V6(Ee,Ne,Ie){for(var ft=Ie-1,It=Ee.length;++ft<It;)if(Ee[ft]===Ne)return ft;return-1}i(V6,"strictIndexOf"),a(V6,"strictIndexOf");function G6(Ee,Ne,Ie){for(var ft=Ie+1;ft--;)if(Ee[ft]===Ne)return ft;return ft}i(G6,"strictLastIndexOf"),a(G6,"strictLastIndexOf");function Oo(Ee){return Do(Ee)?W6(Ee):Ek(Ee)}i(Oo,"stringSize"),a(Oo,"stringSize");function Ii(Ee){return Do(Ee)?Z6(Ee):P6(Ee)}i(Ii,"stringToArray"),a(Ii,"stringToArray");function n1(Ee){for(var Ne=Ee.length;Ne--&&or.test(Ee.charAt(Ne)););return Ne}i(n1,"trimmedEndIndex"),a(n1,"trimmedEndIndex");var xk=Ud(Pe);function W6(Ee){for(var Ne=xl.lastIndex=0;xl.test(Ee);)++Ne;return Ne}i(W6,"unicodeSize"),a(W6,"unicodeSize");function Z6(Ee){return Ee.match(xl)||[]}i(Z6,"unicodeToArray"),a(Z6,"unicodeToArray");function J6(Ee){return Ee.match(Tl)||[]}i(J6,"unicodeWords"),a(J6,"unicodeWords");var Tk=a(i(function Ee(Ne){Ne=Ne==null?Lr:Ia.defaults(Lr.Object(),Ne,Ia.pick(Lr,Nd));var Ie=Ne.Array,ft=Ne.Date,It=Ne.Error,fr=Ne.Function,Vr=Ne.Math,wr=Ne.Object,i1=Ne.RegExp,Mk=Ne.String,ki=Ne.TypeError,qd=Ie.prototype,Ck=fr.prototype,Uc=wr.prototype,Kd=Ne["__core-js_shared__"],Vd=Ck.toString,vr=Uc.hasOwnProperty,Ik=0,Y6=function(){var u=/[^.]+$/.exec(Kd&&Kd.keys&&Kd.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Gd=Uc.toString,kk=Vd.call(wr),Dk=Lr._,Ok=i1("^"+Vd.call(vr).replace(Qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wd=Ml?Ne.Buffer:r,ka=Ne.Symbol,Zd=Ne.Uint8Array,X6=Wd?Wd.allocUnsafe:r,Jd=r1(wr.getPrototypeOf,wr),Q6=wr.create,e3=Uc.propertyIsEnumerable,Yd=qd.splice,t3=ka?ka.isConcatSpreadable:r,Dl=ka?ka.iterator:r,Ro=ka?ka.toStringTag:r,Xd=function(){try{var u=Ba(wr,"defineProperty");return u({},"",{}),u}catch{}}(),Rk=Ne.clearTimeout!==Lr.clearTimeout&&Ne.clearTimeout,Nk=ft&&ft.now!==Lr.Date.now&&ft.now,Pk=Ne.setTimeout!==Lr.setTimeout&&Ne.setTimeout,Qd=Vr.ceil,eh=Vr.floor,s1=wr.getOwnPropertySymbols,Bk=Wd?Wd.isBuffer:r,r3=Ne.isFinite,Lk=qd.join,Fk=r1(wr.keys,wr),Gr=Vr.max,mn=Vr.min,Uk=ft.now,$k=Ne.parseInt,n3=Vr.random,jk=qd.reverse,a1=Ba(Ne,"DataView"),Ol=Ba(Ne,"Map"),o1=Ba(Ne,"Promise"),$c=Ba(Ne,"Set"),Rl=Ba(Ne,"WeakMap"),Nl=Ba(wr,"create"),th=Rl&&new Rl,jc={},zk=La(a1),Hk=La(Ol),qk=La(o1),Kk=La($c),Vk=La(Rl),rh=ka?ka.prototype:r,Pl=rh?rh.valueOf:r,i3=rh?rh.toString:r;function X(u){if(kr(u)&&!Rt(u)&&!(u instanceof Vt)){if(u instanceof ei)return u;if(vr.call(u,"__wrapped__"))return sv(u)}return new ei(u)}i(X,"lodash"),a(X,"lodash");var zc=function(){function u(){}return i(u,"object"),a(u,"object"),function(l){if(!Cr(l))return{};if(Q6)return Q6(l);u.prototype=l;var A=new u;return u.prototype=r,A}}();function Bl(){}i(Bl,"baseLodash"),a(Bl,"baseLodash");function ei(u,l){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}i(ei,"LodashWrapper"),a(ei,"LodashWrapper"),X.templateSettings={escape:lr,evaluate:lt,interpolate:nt,variable:"",imports:{_:X}},X.prototype=Bl.prototype,X.prototype.constructor=X,ei.prototype=zc(Bl.prototype),ei.prototype.constructor=ei;function Vt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=E,this.__views__=[]}i(Vt,"LazyWrapper"),a(Vt,"LazyWrapper");function s3(){var u=new Vt(this.__wrapped__);return u.__actions__=Mn(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Mn(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Mn(this.__views__),u}i(s3,"lazyClone"),a(s3,"lazyClone");function a3(){if(this.__filtered__){var u=new Vt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}i(a3,"lazyReverse"),a(a3,"lazyReverse");function o3(){var u=this.__wrapped__.value(),l=this.__dir__,A=Rt(u),L=l<0,W=A?u.length:0,ee=_5(0,W,this.__views__),de=ee.start,be=ee.end,Ae=be-de,Be=L?be:de-1,Le=this.__iteratees__,$e=Le.length,Je=0,pt=mn(Ae,this.__takeCount__);if(!A||!L&&W==Ae&&pt==Ae)return I1(u,this.__actions__);var St=[];e:for(;Ae--&&Je<pt;){Be+=l;for(var Lt=-1,_t=u[Be];++Lt<$e;){var Ht=Le[Lt],Gt=Ht.iteratee,jn=Ht.type,bn=Gt(_t);if(jn==m)_t=bn;else if(!bn){if(jn==x)continue e;break e}}St[Je++]=_t}return St}i(o3,"lazyValue"),a(o3,"lazyValue"),Vt.prototype=zc(Bl.prototype),Vt.prototype.constructor=Vt;function Da(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(Da,"Hash"),a(Da,"Hash");function c3(){this.__data__=Nl?Nl(null):{},this.size=0}i(c3,"hashClear"),a(c3,"hashClear");function u3(u){var l=this.has(u)&&delete this.__data__[u];return this.size-=l?1:0,l}i(u3,"hashDelete"),a(u3,"hashDelete");function l3(u){var l=this.__data__;if(Nl){var A=l[u];return A===h?r:A}return vr.call(l,u)?l[u]:r}i(l3,"hashGet"),a(l3,"hashGet");function f3(u){var l=this.__data__;return Nl?l[u]!==r:vr.call(l,u)}i(f3,"hashHas"),a(f3,"hashHas");function d3(u,l){var A=this.__data__;return this.size+=this.has(u)?0:1,A[u]=Nl&&l===r?h:l,this}i(d3,"hashSet"),a(d3,"hashSet"),Da.prototype.clear=c3,Da.prototype.delete=u3,Da.prototype.get=l3,Da.prototype.has=f3,Da.prototype.set=d3;function bs(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(bs,"ListCache"),a(bs,"ListCache");function h3(){this.__data__=[],this.size=0}i(h3,"listCacheClear"),a(h3,"listCacheClear");function p3(u){var l=this.__data__,A=Ll(l,u);if(A<0)return!1;var L=l.length-1;return A==L?l.pop():Yd.call(l,A,1),--this.size,!0}i(p3,"listCacheDelete"),a(p3,"listCacheDelete");function m3(u){var l=this.__data__,A=Ll(l,u);return A<0?r:l[A][1]}i(m3,"listCacheGet"),a(m3,"listCacheGet");function v3(u){return Ll(this.__data__,u)>-1}i(v3,"listCacheHas"),a(v3,"listCacheHas");function g3(u,l){var A=this.__data__,L=Ll(A,u);return L<0?(++this.size,A.push([u,l])):A[L][1]=l,this}i(g3,"listCacheSet"),a(g3,"listCacheSet"),bs.prototype.clear=h3,bs.prototype.delete=p3,bs.prototype.get=m3,bs.prototype.has=v3,bs.prototype.set=g3;function ws(u){var l=-1,A=u==null?0:u.length;for(this.clear();++l<A;){var L=u[l];this.set(L[0],L[1])}}i(ws,"MapCache"),a(ws,"MapCache");function y3(){this.size=0,this.__data__={hash:new Da,map:new(Ol||bs),string:new Da}}i(y3,"mapCacheClear"),a(y3,"mapCacheClear");function b3(u){var l=Zl(this,u).delete(u);return this.size-=l?1:0,l}i(b3,"mapCacheDelete"),a(b3,"mapCacheDelete");function w3(u){return Zl(this,u).get(u)}i(w3,"mapCacheGet"),a(w3,"mapCacheGet");function _3(u){return Zl(this,u).has(u)}i(_3,"mapCacheHas"),a(_3,"mapCacheHas");function E3(u,l){var A=Zl(this,u),L=A.size;return A.set(u,l),this.size+=A.size==L?0:1,this}i(E3,"mapCacheSet"),a(E3,"mapCacheSet"),ws.prototype.clear=y3,ws.prototype.delete=b3,ws.prototype.get=w3,ws.prototype.has=_3,ws.prototype.set=E3;function Oa(u){var l=-1,A=u==null?0:u.length;for(this.__data__=new ws;++l<A;)this.add(u[l])}i(Oa,"SetCache"),a(Oa,"SetCache");function A3(u){return this.__data__.set(u,h),this}i(A3,"setCacheAdd"),a(A3,"setCacheAdd");function S3(u){return this.__data__.has(u)}i(S3,"setCacheHas"),a(S3,"setCacheHas"),Oa.prototype.add=Oa.prototype.push=A3,Oa.prototype.has=S3;function Di(u){var l=this.__data__=new bs(u);this.size=l.size}i(Di,"Stack"),a(Di,"Stack");function x3(){this.__data__=new bs,this.size=0}i(x3,"stackClear"),a(x3,"stackClear");function T3(u){var l=this.__data__,A=l.delete(u);return this.size=l.size,A}i(T3,"stackDelete"),a(T3,"stackDelete");function M3(u){return this.__data__.get(u)}i(M3,"stackGet"),a(M3,"stackGet");function C3(u){return this.__data__.has(u)}i(C3,"stackHas"),a(C3,"stackHas");function I3(u,l){var A=this.__data__;if(A instanceof bs){var L=A.__data__;if(!Ol||L.length<s-1)return L.push([u,l]),this.size=++A.size,this;A=this.__data__=new ws(L)}return A.set(u,l),this.size=A.size,this}i(I3,"stackSet"),a(I3,"stackSet"),Di.prototype.clear=x3,Di.prototype.delete=T3,Di.prototype.get=M3,Di.prototype.has=C3,Di.prototype.set=I3;function c1(u,l){var A=Rt(u),L=!A&&Lo(u),W=!A&&!L&&Fa(u),ee=!A&&!L&&!W&&Yc(u),de=A||L||W||ee,be=de?jd(u.length,Mk):[],Ae=be.length;for(var Be in u)(l||vr.call(u,Be))&&!(de&&(Be=="length"||W&&(Be=="offset"||Be=="parent")||ee&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||Ss(Be,Ae)))&&be.push(Be);return be}i(c1,"arrayLikeKeys"),a(c1,"arrayLikeKeys");function u1(u){var l=u.length;return l?u[dh(0,l-1)]:r}i(u1,"arraySample"),a(u1,"arraySample");function k3(u,l){return Yl(Mn(u),Ra(l,0,u.length))}i(k3,"arraySampleSize"),a(k3,"arraySampleSize");function D3(u){return Yl(Mn(u))}i(D3,"arrayShuffle"),a(D3,"arrayShuffle");function nh(u,l,A){(A!==r&&!Oi(u[l],A)||A===r&&!(l in u))&&_s(u,l,A)}i(nh,"assignMergeValue"),a(nh,"assignMergeValue");function Hc(u,l,A){var L=u[l];(!(vr.call(u,l)&&Oi(L,A))||A===r&&!(l in u))&&_s(u,l,A)}i(Hc,"assignValue"),a(Hc,"assignValue");function Ll(u,l){for(var A=u.length;A--;)if(Oi(u[A][0],l))return A;return-1}i(Ll,"assocIndexOf"),a(Ll,"assocIndexOf");function O3(u,l,A,L){return Na(u,function(W,ee,de){l(L,W,A(W),de)}),L}i(O3,"baseAggregator"),a(O3,"baseAggregator");function l1(u,l){return u&&Wi(l,Wr(l),u)}i(l1,"baseAssign"),a(l1,"baseAssign");function R3(u,l){return u&&Wi(l,In(l),u)}i(R3,"baseAssignIn"),a(R3,"baseAssignIn");function _s(u,l,A){l=="__proto__"&&Xd?Xd(u,l,{configurable:!0,enumerable:!0,value:A,writable:!0}):u[l]=A}i(_s,"baseAssignValue"),a(_s,"baseAssignValue");function ih(u,l){for(var A=-1,L=l.length,W=Ie(L),ee=u==null;++A<L;)W[A]=ee?r:Rh(u,l[A]);return W}i(ih,"baseAt"),a(ih,"baseAt");function Ra(u,l,A){return u===u&&(A!==r&&(u=u<=A?u:A),l!==r&&(u=u>=l?u:l)),u}i(Ra,"baseClamp"),a(Ra,"baseClamp");function ti(u,l,A,L,W,ee){var de,be=l&b,Ae=l&y,Be=l&_;if(A&&(de=W?A(u,L,W,ee):A(u)),de!==r)return de;if(!Cr(u))return u;var Le=Rt(u);if(Le){if(de=A5(u),!be)return Mn(u,de)}else{var $e=gn(u),Je=$e==re||$e==oe;if(Fa(u))return D1(u,be);if($e==fe||$e==F||Je&&!W){if(de=Ae||Je?{}:Y1(u),!be)return Ae?d5(u,R3(de,u)):f5(u,l1(de,u))}else{if(!mr[$e])return W?u:{};de=S5(u,$e,be)}}ee||(ee=new Di);var pt=ee.get(u);if(pt)return pt;ee.set(u,de),w4(u)?u.forEach(function(_t){de.add(ti(_t,l,A,_t,u,ee))}):d4(u)&&u.forEach(function(_t,Ht){de.set(Ht,ti(_t,l,A,Ht,u,ee))});var St=Be?Ae?Ah:Eh:Ae?In:Wr,Lt=Le?r:St(u);return Qn(Lt||u,function(_t,Ht){Lt&&(Ht=_t,_t=u[Ht]),Hc(de,Ht,ti(_t,l,A,Ht,u,ee))}),de}i(ti,"baseClone"),a(ti,"baseClone");function N3(u){var l=Wr(u);return function(A){return f1(A,u,l)}}i(N3,"baseConforms"),a(N3,"baseConforms");function f1(u,l,A){var L=A.length;if(u==null)return!L;for(u=wr(u);L--;){var W=A[L],ee=l[W],de=u[W];if(de===r&&!(W in u)||!ee(de))return!1}return!0}i(f1,"baseConformsTo"),a(f1,"baseConformsTo");function d1(u,l,A){if(typeof u!="function")throw new ki(c);return Jl(function(){u.apply(r,A)},l)}i(d1,"baseDelay"),a(d1,"baseDelay");function qc(u,l,A,L){var W=-1,ee=Cl,de=!0,be=u.length,Ae=[],Be=l.length;if(!be)return Ae;A&&(l=Tr(l,Fn(A))),L?(ee=Pd,de=!1):l.length>=s&&(ee=Fc,de=!1,l=new Oa(l));e:for(;++W<be;){var Le=u[W],$e=A==null?Le:A(Le);if(Le=L||Le!==0?Le:0,de&&$e===$e){for(var Je=Be;Je--;)if(l[Je]===$e)continue e;Ae.push(Le)}else ee(l,$e,L)||Ae.push(Le)}return Ae}i(qc,"baseDifference"),a(qc,"baseDifference");var Na=B1(Gi),P3=B1(sh,!0);function B3(u,l){var A=!0;return Na(u,function(L,W,ee){return A=!!l(L,W,ee),A}),A}i(B3,"baseEvery"),a(B3,"baseEvery");function Fl(u,l,A){for(var L=-1,W=u.length;++L<W;){var ee=u[L],de=l(ee);if(de!=null&&(be===r?de===de&&!$n(de):A(de,be)))var be=de,Ae=ee}return Ae}i(Fl,"baseExtremum"),a(Fl,"baseExtremum");function L3(u,l,A,L){var W=u.length;for(A=Nt(A),A<0&&(A=-A>W?0:W+A),L=L===r||L>W?W:Nt(L),L<0&&(L+=W),L=A>L?0:Tv(L);A<L;)u[A++]=l;return u}i(L3,"baseFill"),a(L3,"baseFill");function h1(u,l){var A=[];return Na(u,function(L,W,ee){l(L,W,ee)&&A.push(L)}),A}i(h1,"baseFilter"),a(h1,"baseFilter");function Jr(u,l,A,L,W){var ee=-1,de=u.length;for(A||(A=T5),W||(W=[]);++ee<de;){var be=u[ee];l>0&&A(be)?l>1?Jr(be,l-1,A,L,W):Qs(W,be):L||(W[W.length]=be)}return W}i(Jr,"baseFlatten"),a(Jr,"baseFlatten");var p1=L1(),F3=L1(!0);function Gi(u,l){return u&&p1(u,l,Wr)}i(Gi,"baseForOwn"),a(Gi,"baseForOwn");function sh(u,l){return u&&F3(u,l,Wr)}i(sh,"baseForOwnRight"),a(sh,"baseForOwnRight");function Ul(u,l){return Xs(l,function(A){return xs(u[A])})}i(Ul,"baseFunctions"),a(Ul,"baseFunctions");function Pa(u,l){l=ra(l,u);for(var A=0,L=l.length;u!=null&&A<L;)u=u[Zi(l[A++])];return A&&A==L?u:r}i(Pa,"baseGet"),a(Pa,"baseGet");function m1(u,l,A){var L=l(u);return Rt(u)?L:Qs(L,A(u))}i(m1,"baseGetAllKeys"),a(m1,"baseGetAllKeys");function vn(u){return u==null?u===r?Ue:_e:Ro&&Ro in wr(u)?b5(u):O5(u)}i(vn,"baseGetTag"),a(vn,"baseGetTag");function ah(u,l){return u>l}i(ah,"baseGt"),a(ah,"baseGt");function U3(u,l){return u!=null&&vr.call(u,l)}i(U3,"baseHas"),a(U3,"baseHas");function $3(u,l){return u!=null&&l in wr(u)}i($3,"baseHasIn"),a($3,"baseHasIn");function j3(u,l,A){return u>=mn(l,A)&&u<Gr(l,A)}i(j3,"baseInRange"),a(j3,"baseInRange");function oh(u,l,A){for(var L=A?Pd:Cl,W=u[0].length,ee=u.length,de=ee,be=Ie(ee),Ae=1/0,Be=[];de--;){var Le=u[de];de&&l&&(Le=Tr(Le,Fn(l))),Ae=mn(Le.length,Ae),be[de]=!A&&(l||W>=120&&Le.length>=120)?new Oa(de&&Le):r}Le=u[0];var $e=-1,Je=be[0];e:for(;++$e<W&&Be.length<Ae;){var pt=Le[$e],St=l?l(pt):pt;if(pt=A||pt!==0?pt:0,!(Je?Fc(Je,St):L(Be,St,A))){for(de=ee;--de;){var Lt=be[de];if(!(Lt?Fc(Lt,St):L(u[de],St,A)))continue e}Je&&Je.push(St),Be.push(pt)}}return Be}i(oh,"baseIntersection"),a(oh,"baseIntersection");function z3(u,l,A,L){return Gi(u,function(W,ee,de){l(L,A(W),ee,de)}),L}i(z3,"baseInverter"),a(z3,"baseInverter");function Kc(u,l,A){l=ra(l,u),u=tv(u,l);var L=u==null?u:u[Zi(ni(l))];return L==null?r:Ln(L,u,A)}i(Kc,"baseInvoke"),a(Kc,"baseInvoke");function v1(u){return kr(u)&&vn(u)==F}i(v1,"baseIsArguments"),a(v1,"baseIsArguments");function H3(u){return kr(u)&&vn(u)==rt}i(H3,"baseIsArrayBuffer"),a(H3,"baseIsArrayBuffer");function q3(u){return kr(u)&&vn(u)==J}i(q3,"baseIsDate"),a(q3,"baseIsDate");function Vc(u,l,A,L,W){return u===l?!0:u==null||l==null||!kr(u)&&!kr(l)?u!==u&&l!==l:K3(u,l,A,L,Vc,W)}i(Vc,"baseIsEqual"),a(Vc,"baseIsEqual");function K3(u,l,A,L,W,ee){var de=Rt(u),be=Rt(l),Ae=de?he:gn(u),Be=be?he:gn(l);Ae=Ae==F?fe:Ae,Be=Be==F?fe:Be;var Le=Ae==fe,$e=Be==fe,Je=Ae==Be;if(Je&&Fa(u)){if(!Fa(l))return!1;de=!0,Le=!1}if(Je&&!Le)return ee||(ee=new Di),de||Yc(u)?G1(u,l,A,L,W,ee):g5(u,l,Ae,A,L,W,ee);if(!(A&T)){var pt=Le&&vr.call(u,"__wrapped__"),St=$e&&vr.call(l,"__wrapped__");if(pt||St){var Lt=pt?u.value():u,_t=St?l.value():l;return ee||(ee=new Di),W(Lt,_t,A,L,ee)}}return Je?(ee||(ee=new Di),y5(u,l,A,L,W,ee)):!1}i(K3,"baseIsEqualDeep"),a(K3,"baseIsEqualDeep");function V3(u){return kr(u)&&gn(u)==ge}i(V3,"baseIsMap"),a(V3,"baseIsMap");function ch(u,l,A,L){var W=A.length,ee=W,de=!L;if(u==null)return!ee;for(u=wr(u);W--;){var be=A[W];if(de&&be[2]?be[1]!==u[be[0]]:!(be[0]in u))return!1}for(;++W<ee;){be=A[W];var Ae=be[0],Be=u[Ae],Le=be[1];if(de&&be[2]){if(Be===r&&!(Ae in u))return!1}else{var $e=new Di;if(L)var Je=L(Be,Le,Ae,u,l,$e);if(!(Je===r?Vc(Le,Be,T|O,L,$e):Je))return!1}}return!0}i(ch,"baseIsMatch"),a(ch,"baseIsMatch");function g1(u){if(!Cr(u)||C5(u))return!1;var l=xs(u)?Ok:tr;return l.test(La(u))}i(g1,"baseIsNative"),a(g1,"baseIsNative");function G3(u){return kr(u)&&vn(u)==we}i(G3,"baseIsRegExp"),a(G3,"baseIsRegExp");function W3(u){return kr(u)&&gn(u)==Q}i(W3,"baseIsSet"),a(W3,"baseIsSet");function Z3(u){return kr(u)&&rf(u.length)&&!!yr[vn(u)]}i(Z3,"baseIsTypedArray"),a(Z3,"baseIsTypedArray");function y1(u){return typeof u=="function"?u:u==null?kn:typeof u=="object"?Rt(u)?_1(u[0],u[1]):w1(u):Rv(u)}i(y1,"baseIteratee"),a(y1,"baseIteratee");function uh(u){if(!Zc(u))return Fk(u);var l=[];for(var A in wr(u))vr.call(u,A)&&A!="constructor"&&l.push(A);return l}i(uh,"baseKeys"),a(uh,"baseKeys");function J3(u){if(!Cr(u))return D5(u);var l=Zc(u),A=[];for(var L in u)L=="constructor"&&(l||!vr.call(u,L))||A.push(L);return A}i(J3,"baseKeysIn"),a(J3,"baseKeysIn");function lh(u,l){return u<l}i(lh,"baseLt"),a(lh,"baseLt");function b1(u,l){var A=-1,L=Cn(u)?Ie(u.length):[];return Na(u,function(W,ee,de){L[++A]=l(W,ee,de)}),L}i(b1,"baseMap"),a(b1,"baseMap");function w1(u){var l=Sh(u);return l.length==1&&l[0][2]?Q1(l[0][0],l[0][1]):function(A){return A===u||ch(A,u,l)}}i(w1,"baseMatches"),a(w1,"baseMatches");function _1(u,l){return xh(u)&&X1(l)?Q1(Zi(u),l):function(A){var L=Rh(A,u);return L===r&&L===l?Nh(A,u):Vc(l,L,T|O)}}i(_1,"baseMatchesProperty"),a(_1,"baseMatchesProperty");function $l(u,l,A,L,W){u!==l&&p1(l,function(ee,de){if(W||(W=new Di),Cr(ee))Y3(u,l,de,A,$l,L,W);else{var be=L?L(Mh(u,de),ee,de+"",u,l,W):r;be===r&&(be=ee),nh(u,de,be)}},In)}i($l,"baseMerge"),a($l,"baseMerge");function Y3(u,l,A,L,W,ee,de){var be=Mh(u,A),Ae=Mh(l,A),Be=de.get(Ae);if(Be){nh(u,A,Be);return}var Le=ee?ee(be,Ae,A+"",u,l,de):r,$e=Le===r;if($e){var Je=Rt(Ae),pt=!Je&&Fa(Ae),St=!Je&&!pt&&Yc(Ae);Le=Ae,Je||pt||St?Rt(be)?Le=be:Rr(be)?Le=Mn(be):pt?($e=!1,Le=D1(Ae,!0)):St?($e=!1,Le=O1(Ae,!0)):Le=[]:Jc(Ae)||Lo(Ae)?(Le=be,Lo(be)?Le=Mv(be):(!Cr(be)||xs(be))&&(Le=Y1(Ae))):$e=!1}$e&&(de.set(Ae,Le),W(Le,Ae,L,ee,de),de.delete(Ae)),nh(u,A,Le)}i(Y3,"baseMergeDeep"),a(Y3,"baseMergeDeep");function E1(u,l){var A=u.length;if(!!A)return l+=l<0?A:0,Ss(l,A)?u[l]:r}i(E1,"baseNth"),a(E1,"baseNth");function A1(u,l,A){l.length?l=Tr(l,function(ee){return Rt(ee)?function(de){return Pa(de,ee.length===1?ee[0]:ee)}:ee}):l=[kn];var L=-1;l=Tr(l,Fn(wt()));var W=b1(u,function(ee,de,be){var Ae=Tr(l,function(Be){return Be(ee)});return{criteria:Ae,index:++L,value:ee}});return F6(W,function(ee,de){return l5(ee,de,A)})}i(A1,"baseOrderBy"),a(A1,"baseOrderBy");function X3(u,l){return S1(u,l,function(A,L){return Nh(u,L)})}i(X3,"basePick"),a(X3,"basePick");function S1(u,l,A){for(var L=-1,W=l.length,ee={};++L<W;){var de=l[L],be=Pa(u,de);A(be,de)&&Gc(ee,ra(de,u),be)}return ee}i(S1,"basePickBy"),a(S1,"basePickBy");function Q3(u){return function(l){return Pa(l,u)}}i(Q3,"basePropertyDeep"),a(Q3,"basePropertyDeep");function fh(u,l,A,L){var W=L?L6:ko,ee=-1,de=l.length,be=u;for(u===l&&(l=Mn(l)),A&&(be=Tr(u,Fn(A)));++ee<de;)for(var Ae=0,Be=l[ee],Le=A?A(Be):Be;(Ae=W(be,Le,Ae,L))>-1;)be!==u&&Yd.call(be,Ae,1),Yd.call(u,Ae,1);return u}i(fh,"basePullAll"),a(fh,"basePullAll");function x1(u,l){for(var A=u?l.length:0,L=A-1;A--;){var W=l[A];if(A==L||W!==ee){var ee=W;Ss(W)?Yd.call(u,W,1):mh(u,W)}}return u}i(x1,"basePullAt"),a(x1,"basePullAt");function dh(u,l){return u+eh(n3()*(l-u+1))}i(dh,"baseRandom"),a(dh,"baseRandom");function e5(u,l,A,L){for(var W=-1,ee=Gr(Qd((l-u)/(A||1)),0),de=Ie(ee);ee--;)de[L?ee:++W]=u,u+=A;return de}i(e5,"baseRange"),a(e5,"baseRange");function hh(u,l){var A="";if(!u||l<1||l>S)return A;do l%2&&(A+=u),l=eh(l/2),l&&(u+=u);while(l);return A}i(hh,"baseRepeat"),a(hh,"baseRepeat");function Ft(u,l){return rv(ev(u,l,kn),u+"")}i(Ft,"baseRest"),a(Ft,"baseRest");function t5(u){return u1(Fo(u))}i(t5,"baseSample"),a(t5,"baseSample");function r5(u,l){var A=Fo(u);return Yl(A,Ra(l,0,A.length))}i(r5,"baseSampleSize"),a(r5,"baseSampleSize");function Gc(u,l,A,L){if(!Cr(u))return u;l=ra(l,u);for(var W=-1,ee=l.length,de=ee-1,be=u;be!=null&&++W<ee;){var Ae=Zi(l[W]),Be=A;if(Ae==="__proto__"||Ae==="constructor"||Ae==="prototype")return u;if(W!=de){var Le=be[Ae];Be=L?L(Le,Ae,be):r,Be===r&&(Be=Cr(Le)?Le:Ss(l[W+1])?[]:{})}Hc(be,Ae,Be),be=be[Ae]}return u}i(Gc,"baseSet"),a(Gc,"baseSet");var n5=th?function(u,l){return th.set(u,l),u}:kn,Gk=Xd?function(u,l){return Xd(u,"toString",{configurable:!0,enumerable:!1,value:Ph(l),writable:!0})}:kn;function i5(u){return Yl(Fo(u))}i(i5,"baseShuffle"),a(i5,"baseShuffle");function ri(u,l,A){var L=-1,W=u.length;l<0&&(l=-l>W?0:W+l),A=A>W?W:A,A<0&&(A+=W),W=l>A?0:A-l>>>0,l>>>=0;for(var ee=Ie(W);++L<W;)ee[L]=u[L+l];return ee}i(ri,"baseSlice"),a(ri,"baseSlice");function s5(u,l){var A;return Na(u,function(L,W,ee){return A=l(L,W,ee),!A}),!!A}i(s5,"baseSome"),a(s5,"baseSome");function jl(u,l,A){var L=0,W=u==null?L:u.length;if(typeof l=="number"&&l===l&&W<=$){for(;L<W;){var ee=L+W>>>1,de=u[ee];de!==null&&!$n(de)&&(A?de<=l:de<l)?L=ee+1:W=ee}return W}return ph(u,l,kn,A)}i(jl,"baseSortedIndex"),a(jl,"baseSortedIndex");function ph(u,l,A,L){var W=0,ee=u==null?0:u.length;if(ee===0)return 0;l=A(l);for(var de=l!==l,be=l===null,Ae=$n(l),Be=l===r;W<ee;){var Le=eh((W+ee)/2),$e=A(u[Le]),Je=$e!==r,pt=$e===null,St=$e===$e,Lt=$n($e);if(de)var _t=L||St;else Be?_t=St&&(L||Je):be?_t=St&&Je&&(L||!pt):Ae?_t=St&&Je&&!pt&&(L||!Lt):pt||Lt?_t=!1:_t=L?$e<=l:$e<l;_t?W=Le+1:ee=Le}return mn(ee,B)}i(ph,"baseSortedIndexBy"),a(ph,"baseSortedIndexBy");function T1(u,l){for(var A=-1,L=u.length,W=0,ee=[];++A<L;){var de=u[A],be=l?l(de):de;if(!A||!Oi(be,Ae)){var Ae=be;ee[W++]=de===0?0:de}}return ee}i(T1,"baseSortedUniq"),a(T1,"baseSortedUniq");function M1(u){return typeof u=="number"?u:$n(u)?C:+u}i(M1,"baseToNumber"),a(M1,"baseToNumber");function Un(u){if(typeof u=="string")return u;if(Rt(u))return Tr(u,Un)+"";if($n(u))return i3?i3.call(u):"";var l=u+"";return l=="0"&&1/u==-g?"-0":l}i(Un,"baseToString"),a(Un,"baseToString");function ta(u,l,A){var L=-1,W=Cl,ee=u.length,de=!0,be=[],Ae=be;if(A)de=!1,W=Pd;else if(ee>=s){var Be=l?null:Zk(u);if(Be)return kl(Be);de=!1,W=Fc,Ae=new Oa}else Ae=l?[]:be;e:for(;++L<ee;){var Le=u[L],$e=l?l(Le):Le;if(Le=A||Le!==0?Le:0,de&&$e===$e){for(var Je=Ae.length;Je--;)if(Ae[Je]===$e)continue e;l&&Ae.push($e),be.push(Le)}else W(Ae,$e,A)||(Ae!==be&&Ae.push($e),be.push(Le))}return be}i(ta,"baseUniq"),a(ta,"baseUniq");function mh(u,l){return l=ra(l,u),u=tv(u,l),u==null||delete u[Zi(ni(l))]}i(mh,"baseUnset"),a(mh,"baseUnset");function C1(u,l,A,L){return Gc(u,l,A(Pa(u,l)),L)}i(C1,"baseUpdate"),a(C1,"baseUpdate");function zl(u,l,A,L){for(var W=u.length,ee=L?W:-1;(L?ee--:++ee<W)&&l(u[ee],ee,u););return A?ri(u,L?0:ee,L?ee+1:W):ri(u,L?ee+1:0,L?W:ee)}i(zl,"baseWhile"),a(zl,"baseWhile");function I1(u,l){var A=u;return A instanceof Vt&&(A=A.value()),Bd(l,function(L,W){return W.func.apply(W.thisArg,Qs([L],W.args))},A)}i(I1,"baseWrapperValue"),a(I1,"baseWrapperValue");function vh(u,l,A){var L=u.length;if(L<2)return L?ta(u[0]):[];for(var W=-1,ee=Ie(L);++W<L;)for(var de=u[W],be=-1;++be<L;)be!=W&&(ee[W]=qc(ee[W]||de,u[be],l,A));return ta(Jr(ee,1),l,A)}i(vh,"baseXor"),a(vh,"baseXor");function k1(u,l,A){for(var L=-1,W=u.length,ee=l.length,de={};++L<W;){var be=L<ee?l[L]:r;A(de,u[L],be)}return de}i(k1,"baseZipObject"),a(k1,"baseZipObject");function gh(u){return Rr(u)?u:[]}i(gh,"castArrayLikeObject"),a(gh,"castArrayLikeObject");function yh(u){return typeof u=="function"?u:kn}i(yh,"castFunction"),a(yh,"castFunction");function ra(u,l){return Rt(u)?u:xh(u,l)?[u]:P5(dr(u))}i(ra,"castPath"),a(ra,"castPath");var Wk=Ft;function na(u,l,A){var L=u.length;return A=A===r?L:A,!l&&A>=L?u:ri(u,l,A)}i(na,"castSlice"),a(na,"castSlice");var a5=Rk||function(u){return Lr.clearTimeout(u)};function D1(u,l){if(l)return u.slice();var A=u.length,L=X6?X6(A):new u.constructor(A);return u.copy(L),L}i(D1,"cloneBuffer"),a(D1,"cloneBuffer");function bh(u){var l=new u.constructor(u.byteLength);return new Zd(l).set(new Zd(u)),l}i(bh,"cloneArrayBuffer"),a(bh,"cloneArrayBuffer");function o5(u,l){var A=l?bh(u.buffer):u.buffer;return new u.constructor(A,u.byteOffset,u.byteLength)}i(o5,"cloneDataView"),a(o5,"cloneDataView");function c5(u){var l=new u.constructor(u.source,yt.exec(u));return l.lastIndex=u.lastIndex,l}i(c5,"cloneRegExp"),a(c5,"cloneRegExp");function u5(u){return Pl?wr(Pl.call(u)):{}}i(u5,"cloneSymbol"),a(u5,"cloneSymbol");function O1(u,l){var A=l?bh(u.buffer):u.buffer;return new u.constructor(A,u.byteOffset,u.length)}i(O1,"cloneTypedArray"),a(O1,"cloneTypedArray");function R1(u,l){if(u!==l){var A=u!==r,L=u===null,W=u===u,ee=$n(u),de=l!==r,be=l===null,Ae=l===l,Be=$n(l);if(!be&&!Be&&!ee&&u>l||ee&&de&&Ae&&!be&&!Be||L&&de&&Ae||!A&&Ae||!W)return 1;if(!L&&!ee&&!Be&&u<l||Be&&A&&W&&!L&&!ee||be&&A&&W||!de&&W||!Ae)return-1}return 0}i(R1,"compareAscending"),a(R1,"compareAscending");function l5(u,l,A){for(var L=-1,W=u.criteria,ee=l.criteria,de=W.length,be=A.length;++L<de;){var Ae=R1(W[L],ee[L]);if(Ae){if(L>=be)return Ae;var Be=A[L];return Ae*(Be=="desc"?-1:1)}}return u.index-l.index}i(l5,"compareMultiple"),a(l5,"compareMultiple");function N1(u,l,A,L){for(var W=-1,ee=u.length,de=A.length,be=-1,Ae=l.length,Be=Gr(ee-de,0),Le=Ie(Ae+Be),$e=!L;++be<Ae;)Le[be]=l[be];for(;++W<de;)($e||W<ee)&&(Le[A[W]]=u[W]);for(;Be--;)Le[be++]=u[W++];return Le}i(N1,"composeArgs"),a(N1,"composeArgs");function P1(u,l,A,L){for(var W=-1,ee=u.length,de=-1,be=A.length,Ae=-1,Be=l.length,Le=Gr(ee-be,0),$e=Ie(Le+Be),Je=!L;++W<Le;)$e[W]=u[W];for(var pt=W;++Ae<Be;)$e[pt+Ae]=l[Ae];for(;++de<be;)(Je||W<ee)&&($e[pt+A[de]]=u[W++]);return $e}i(P1,"composeArgsRight"),a(P1,"composeArgsRight");function Mn(u,l){var A=-1,L=u.length;for(l||(l=Ie(L));++A<L;)l[A]=u[A];return l}i(Mn,"copyArray"),a(Mn,"copyArray");function Wi(u,l,A,L){var W=!A;A||(A={});for(var ee=-1,de=l.length;++ee<de;){var be=l[ee],Ae=L?L(A[be],u[be],be,A,u):r;Ae===r&&(Ae=u[be]),W?_s(A,be,Ae):Hc(A,be,Ae)}return A}i(Wi,"copyObject"),a(Wi,"copyObject");function f5(u,l){return Wi(u,Z1(u),l)}i(f5,"copySymbols"),a(f5,"copySymbols");function d5(u,l){return Wi(u,w5(u),l)}i(d5,"copySymbolsIn"),a(d5,"copySymbolsIn");function Hl(u,l){return function(A,L){var W=Rt(A)?O6:O3,ee=l?l():{};return W(A,u,wt(L,2),ee)}}i(Hl,"createAggregator"),a(Hl,"createAggregator");function No(u){return Ft(function(l,A){var L=-1,W=A.length,ee=W>1?A[W-1]:r,de=W>2?A[2]:r;for(ee=u.length>3&&typeof ee=="function"?(W--,ee):r,de&&yn(A[0],A[1],de)&&(ee=W<3?r:ee,W=1),l=wr(l);++L<W;){var be=A[L];be&&u(l,be,L,ee)}return l})}i(No,"createAssigner"),a(No,"createAssigner");function B1(u,l){return function(A,L){if(A==null)return A;if(!Cn(A))return u(A,L);for(var W=A.length,ee=l?W:-1,de=wr(A);(l?ee--:++ee<W)&&L(de[ee],ee,de)!==!1;);return A}}i(B1,"createBaseEach"),a(B1,"createBaseEach");function L1(u){return function(l,A,L){for(var W=-1,ee=wr(l),de=L(l),be=de.length;be--;){var Ae=de[u?be:++W];if(A(ee[Ae],Ae,ee)===!1)break}return l}}i(L1,"createBaseFor"),a(L1,"createBaseFor");function h5(u,l,A){var L=l&R,W=Wc(u);function ee(){var de=this&&this!==Lr&&this instanceof ee?W:u;return de.apply(L?A:this,arguments)}return i(ee,"wrapper"),a(ee,"wrapper"),ee}i(h5,"createBind"),a(h5,"createBind");function F1(u){return function(l){l=dr(l);var A=Do(l)?Ii(l):r,L=A?A[0]:l.charAt(0),W=A?na(A,1).join(""):l.slice(1);return L[u]()+W}}i(F1,"createCaseFirst"),a(F1,"createCaseFirst");function Po(u){return function(l){return Bd(Ov(kv(l).replace(Sl,"")),u,"")}}i(Po,"createCompounder"),a(Po,"createCompounder");function Wc(u){return function(){var l=arguments;switch(l.length){case 0:return new u;case 1:return new u(l[0]);case 2:return new u(l[0],l[1]);case 3:return new u(l[0],l[1],l[2]);case 4:return new u(l[0],l[1],l[2],l[3]);case 5:return new u(l[0],l[1],l[2],l[3],l[4]);case 6:return new u(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new u(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var A=zc(u.prototype),L=u.apply(A,l);return Cr(L)?L:A}}i(Wc,"createCtor"),a(Wc,"createCtor");function p5(u,l,A){var L=Wc(u);function W(){for(var ee=arguments.length,de=Ie(ee),be=ee,Ae=Bo(W);be--;)de[be]=arguments[be];var Be=ee<3&&de[0]!==Ae&&de[ee-1]!==Ae?[]:ea(de,Ae);if(ee-=Be.length,ee<A)return H1(u,l,ql,W.placeholder,r,de,Be,r,r,A-ee);var Le=this&&this!==Lr&&this instanceof W?L:u;return Ln(Le,this,de)}return i(W,"wrapper"),a(W,"wrapper"),W}i(p5,"createCurry"),a(p5,"createCurry");function U1(u){return function(l,A,L){var W=wr(l);if(!Cn(l)){var ee=wt(A,3);l=Wr(l),A=a(function(be){return ee(W[be],be,W)},"predicate")}var de=u(l,A,L);return de>-1?W[ee?l[de]:de]:r}}i(U1,"createFind"),a(U1,"createFind");function $1(u){return As(function(l){var A=l.length,L=A,W=ei.prototype.thru;for(u&&l.reverse();L--;){var ee=l[L];if(typeof ee!="function")throw new ki(c);if(W&&!de&&Wl(ee)=="wrapper")var de=new ei([],!0)}for(L=de?L:A;++L<A;){ee=l[L];var be=Wl(ee),Ae=be=="wrapper"?W1(ee):r;Ae&&Th(Ae[0])&&Ae[1]==(I|U|V|H)&&!Ae[4].length&&Ae[9]==1?de=de[Wl(Ae[0])].apply(de,Ae[3]):de=ee.length==1&&Th(ee)?de[be]():de.thru(ee)}return function(){var Be=arguments,Le=Be[0];if(de&&Be.length==1&&Rt(Le))return de.plant(Le).value();for(var $e=0,Je=A?l[$e].apply(this,Be):Le;++$e<A;)Je=l[$e].call(this,Je);return Je}})}i($1,"createFlow"),a($1,"createFlow");function ql(u,l,A,L,W,ee,de,be,Ae,Be){var Le=l&I,$e=l&R,Je=l&P,pt=l&(U|j),St=l&se,Lt=Je?r:Wc(u);function _t(){for(var Ht=arguments.length,Gt=Ie(Ht),jn=Ht;jn--;)Gt[jn]=arguments[jn];if(pt)var bn=Bo(_t),zn=$6(Gt,bn);if(L&&(Gt=N1(Gt,L,W,pt)),ee&&(Gt=P1(Gt,ee,de,pt)),Ht-=zn,pt&&Ht<Be){var Fr=ea(Gt,bn);return H1(u,l,ql,_t.placeholder,A,Gt,Fr,be,Ae,Be-Ht)}var Ji=$e?A:this,ia=Je?Ji[u]:u;return Ht=Gt.length,be?Gt=R5(Gt,be):St&&Ht>1&&Gt.reverse(),Le&&Ae<Ht&&(Gt.length=Ae),this&&this!==Lr&&this instanceof _t&&(ia=Lt||Wc(ia)),ia.apply(Ji,Gt)}return i(_t,"wrapper"),a(_t,"wrapper"),_t}i(ql,"createHybrid"),a(ql,"createHybrid");function j1(u,l){return function(A,L){return z3(A,u,l(L),{})}}i(j1,"createInverter"),a(j1,"createInverter");function Kl(u,l){return function(A,L){var W;if(A===r&&L===r)return l;if(A!==r&&(W=A),L!==r){if(W===r)return L;typeof A=="string"||typeof L=="string"?(A=Un(A),L=Un(L)):(A=M1(A),L=M1(L)),W=u(A,L)}return W}}i(Kl,"createMathOperation"),a(Kl,"createMathOperation");function wh(u){return As(function(l){return l=Tr(l,Fn(wt())),Ft(function(A){var L=this;return u(l,function(W){return Ln(W,L,A)})})})}i(wh,"createOver"),a(wh,"createOver");function Vl(u,l){l=l===r?" ":Un(l);var A=l.length;if(A<2)return A?hh(l,u):l;var L=hh(l,Qd(u/Oo(l)));return Do(l)?na(Ii(L),0,u).join(""):L.slice(0,u)}i(Vl,"createPadding"),a(Vl,"createPadding");function m5(u,l,A,L){var W=l&R,ee=Wc(u);function de(){for(var be=-1,Ae=arguments.length,Be=-1,Le=L.length,$e=Ie(Le+Ae),Je=this&&this!==Lr&&this instanceof de?ee:u;++Be<Le;)$e[Be]=L[Be];for(;Ae--;)$e[Be++]=arguments[++be];return Ln(Je,W?A:this,$e)}return i(de,"wrapper"),a(de,"wrapper"),de}i(m5,"createPartial"),a(m5,"createPartial");function z1(u){return function(l,A,L){return L&&typeof L!="number"&&yn(l,A,L)&&(A=L=r),l=Ts(l),A===r?(A=l,l=0):A=Ts(A),L=L===r?l<A?1:-1:Ts(L),e5(l,A,L,u)}}i(z1,"createRange"),a(z1,"createRange");function Gl(u){return function(l,A){return typeof l=="string"&&typeof A=="string"||(l=ii(l),A=ii(A)),u(l,A)}}i(Gl,"createRelationalOperation"),a(Gl,"createRelationalOperation");function H1(u,l,A,L,W,ee,de,be,Ae,Be){var Le=l&U,$e=Le?de:r,Je=Le?r:de,pt=Le?ee:r,St=Le?r:ee;l|=Le?V:G,l&=~(Le?G:V),l&K||(l&=~(R|P));var Lt=[u,l,W,pt,$e,St,Je,be,Ae,Be],_t=A.apply(r,Lt);return Th(u)&&N5(_t,Lt),_t.placeholder=L,nv(_t,u,l)}i(H1,"createRecurry"),a(H1,"createRecurry");function _h(u){var l=Vr[u];return function(A,L){if(A=ii(A),L=L==null?0:mn(Nt(L),292),L&&r3(A)){var W=(dr(A)+"e").split("e"),ee=l(W[0]+"e"+(+W[1]+L));return W=(dr(ee)+"e").split("e"),+(W[0]+"e"+(+W[1]-L))}return l(A)}}i(_h,"createRound"),a(_h,"createRound");var Zk=$c&&1/kl(new $c([,-0]))[1]==g?function(u){return new $c(u)}:Fh;function q1(u){return function(l){var A=gn(l);return A==ge?Hd(l):A==Q?K6(l):U6(l,u(l))}}i(q1,"createToPairs"),a(q1,"createToPairs");function Es(u,l,A,L,W,ee,de,be){var Ae=l&P;if(!Ae&&typeof u!="function")throw new ki(c);var Be=L?L.length:0;if(Be||(l&=~(V|G),L=W=r),de=de===r?de:Gr(Nt(de),0),be=be===r?be:Nt(be),Be-=W?W.length:0,l&G){var Le=L,$e=W;L=W=r}var Je=Ae?r:W1(u),pt=[u,l,A,L,W,Le,$e,ee,de,be];if(Je&&k5(pt,Je),u=pt[0],l=pt[1],A=pt[2],L=pt[3],W=pt[4],be=pt[9]=pt[9]===r?Ae?0:u.length:Gr(pt[9]-Be,0),!be&&l&(U|j)&&(l&=~(U|j)),!l||l==R)var St=h5(u,l,A);else l==U||l==j?St=p5(u,l,be):(l==V||l==(R|V))&&!W.length?St=m5(u,l,A,L):St=ql.apply(r,pt);var Lt=Je?n5:N5;return nv(Lt(St,pt),u,l)}i(Es,"createWrap"),a(Es,"createWrap");function K1(u,l,A,L){return u===r||Oi(u,Uc[A])&&!vr.call(L,A)?l:u}i(K1,"customDefaultsAssignIn"),a(K1,"customDefaultsAssignIn");function V1(u,l,A,L,W,ee){return Cr(u)&&Cr(l)&&(ee.set(l,u),$l(u,l,r,V1,ee),ee.delete(l)),u}i(V1,"customDefaultsMerge"),a(V1,"customDefaultsMerge");function v5(u){return Jc(u)?r:u}i(v5,"customOmitClone"),a(v5,"customOmitClone");function G1(u,l,A,L,W,ee){var de=A&T,be=u.length,Ae=l.length;if(be!=Ae&&!(de&&Ae>be))return!1;var Be=ee.get(u),Le=ee.get(l);if(Be&&Le)return Be==l&&Le==u;var $e=-1,Je=!0,pt=A&O?new Oa:r;for(ee.set(u,l),ee.set(l,u);++$e<be;){var St=u[$e],Lt=l[$e];if(L)var _t=de?L(Lt,St,$e,l,u,ee):L(St,Lt,$e,u,l,ee);if(_t!==r){if(_t)continue;Je=!1;break}if(pt){if(!Ld(l,function(Ht,Gt){if(!Fc(pt,Gt)&&(St===Ht||W(St,Ht,A,L,ee)))return pt.push(Gt)})){Je=!1;break}}else if(!(St===Lt||W(St,Lt,A,L,ee))){Je=!1;break}}return ee.delete(u),ee.delete(l),Je}i(G1,"equalArrays"),a(G1,"equalArrays");function g5(u,l,A,L,W,ee,de){switch(A){case le:if(u.byteLength!=l.byteLength||u.byteOffset!=l.byteOffset)return!1;u=u.buffer,l=l.buffer;case rt:return!(u.byteLength!=l.byteLength||!ee(new Zd(u),new Zd(l)));case Y:case J:case ke:return Oi(+u,+l);case z:return u.name==l.name&&u.message==l.message;case we:case ve:return u==l+"";case ge:var be=Hd;case Q:var Ae=L&T;if(be||(be=kl),u.size!=l.size&&!Ae)return!1;var Be=de.get(u);if(Be)return Be==l;L|=O,de.set(u,l);var Le=G1(be(u),be(l),L,W,ee,de);return de.delete(u),Le;case Me:if(Pl)return Pl.call(u)==Pl.call(l)}return!1}i(g5,"equalByTag"),a(g5,"equalByTag");function y5(u,l,A,L,W,ee){var de=A&T,be=Eh(u),Ae=be.length,Be=Eh(l),Le=Be.length;if(Ae!=Le&&!de)return!1;for(var $e=Ae;$e--;){var Je=be[$e];if(!(de?Je in l:vr.call(l,Je)))return!1}var pt=ee.get(u),St=ee.get(l);if(pt&&St)return pt==l&&St==u;var Lt=!0;ee.set(u,l),ee.set(l,u);for(var _t=de;++$e<Ae;){Je=be[$e];var Ht=u[Je],Gt=l[Je];if(L)var jn=de?L(Gt,Ht,Je,l,u,ee):L(Ht,Gt,Je,u,l,ee);if(!(jn===r?Ht===Gt||W(Ht,Gt,A,L,ee):jn)){Lt=!1;break}_t||(_t=Je=="constructor")}if(Lt&&!_t){var bn=u.constructor,zn=l.constructor;bn!=zn&&"constructor"in u&&"constructor"in l&&!(typeof bn=="function"&&bn instanceof bn&&typeof zn=="function"&&zn instanceof zn)&&(Lt=!1)}return ee.delete(u),ee.delete(l),Lt}i(y5,"equalObjects"),a(y5,"equalObjects");function As(u){return rv(ev(u,r,cv),u+"")}i(As,"flatRest"),a(As,"flatRest");function Eh(u){return m1(u,Wr,Z1)}i(Eh,"getAllKeys"),a(Eh,"getAllKeys");function Ah(u){return m1(u,In,w5)}i(Ah,"getAllKeysIn"),a(Ah,"getAllKeysIn");var W1=th?function(u){return th.get(u)}:Fh;function Wl(u){for(var l=u.name+"",A=jc[l],L=vr.call(jc,l)?A.length:0;L--;){var W=A[L],ee=W.func;if(ee==null||ee==u)return W.name}return l}i(Wl,"getFuncName"),a(Wl,"getFuncName");function Bo(u){var l=vr.call(X,"placeholder")?X:u;return l.placeholder}i(Bo,"getHolder"),a(Bo,"getHolder");function wt(){var u=X.iteratee||Bh;return u=u===Bh?y1:u,arguments.length?u(arguments[0],arguments[1]):u}i(wt,"getIteratee"),a(wt,"getIteratee");function Zl(u,l){var A=u.__data__;return M5(l)?A[typeof l=="string"?"string":"hash"]:A.map}i(Zl,"getMapData"),a(Zl,"getMapData");function Sh(u){for(var l=Wr(u),A=l.length;A--;){var L=l[A],W=u[L];l[A]=[L,W,X1(W)]}return l}i(Sh,"getMatchData"),a(Sh,"getMatchData");function Ba(u,l){var A=z6(u,l);return g1(A)?A:r}i(Ba,"getNative"),a(Ba,"getNative");function b5(u){var l=vr.call(u,Ro),A=u[Ro];try{u[Ro]=r;var L=!0}catch{}var W=Gd.call(u);return L&&(l?u[Ro]=A:delete u[Ro]),W}i(b5,"getRawTag"),a(b5,"getRawTag");var Z1=s1?function(u){return u==null?[]:(u=wr(u),Xs(s1(u),function(l){return e3.call(u,l)}))}:Uh,w5=s1?function(u){for(var l=[];u;)Qs(l,Z1(u)),u=Jd(u);return l}:Uh,gn=vn;(a1&&gn(new a1(new ArrayBuffer(1)))!=le||Ol&&gn(new Ol)!=ge||o1&&gn(o1.resolve())!=Ce||$c&&gn(new $c)!=Q||Rl&&gn(new Rl)!=Re)&&(gn=a(function(u){var l=vn(u),A=l==fe?u.constructor:r,L=A?La(A):"";if(L)switch(L){case zk:return le;case Hk:return ge;case qk:return Ce;case Kk:return Q;case Vk:return Re}return l},"getTag"));function _5(u,l,A){for(var L=-1,W=A.length;++L<W;){var ee=A[L],de=ee.size;switch(ee.type){case"drop":u+=de;break;case"dropRight":l-=de;break;case"take":l=mn(l,u+de);break;case"takeRight":u=Gr(u,l-de);break}}return{start:u,end:l}}i(_5,"getView"),a(_5,"getView");function E5(u){var l=u.match(Ze);return l?l[1].split(cr):[]}i(E5,"getWrapDetails"),a(E5,"getWrapDetails");function J1(u,l,A){l=ra(l,u);for(var L=-1,W=l.length,ee=!1;++L<W;){var de=Zi(l[L]);if(!(ee=u!=null&&A(u,de)))break;u=u[de]}return ee||++L!=W?ee:(W=u==null?0:u.length,!!W&&rf(W)&&Ss(de,W)&&(Rt(u)||Lo(u)))}i(J1,"hasPath"),a(J1,"hasPath");function A5(u){var l=u.length,A=new u.constructor(l);return l&&typeof u[0]=="string"&&vr.call(u,"index")&&(A.index=u.index,A.input=u.input),A}i(A5,"initCloneArray"),a(A5,"initCloneArray");function Y1(u){return typeof u.constructor=="function"&&!Zc(u)?zc(Jd(u)):{}}i(Y1,"initCloneObject"),a(Y1,"initCloneObject");function S5(u,l,A){var L=u.constructor;switch(l){case rt:return bh(u);case Y:case J:return new L(+u);case le:return o5(u,A);case ce:case Z:case ne:case ye:case Se:case xe:case De:case Mt:case qe:return O1(u,A);case ge:return new L;case ke:case ve:return new L(u);case we:return c5(u);case Q:return new L;case Me:return u5(u)}}i(S5,"initCloneByTag"),a(S5,"initCloneByTag");function x5(u,l){var A=l.length;if(!A)return u;var L=A-1;return l[L]=(A>1?"& ":"")+l[L],l=l.join(A>2?", ":" "),u.replace(at,`{
|
|
25
25
|
/* [wrapped with `+l+`] */
|
|
26
|
-
`)}i(x5,"insertWrapDetails"),a(x5,"insertWrapDetails");function T5(u){return Rt(u)||Lo(u)||!!(t3&&u&&u[t3])}i(T5,"isFlattenable"),a(T5,"isFlattenable");function Ss(u,l){var A=typeof u;return l=l??S,!!l&&(A=="number"||A!="symbol"&&rn.test(u))&&u>-1&&u%1==0&&u<l}i(Ss,"isIndex"),a(Ss,"isIndex");function yn(u,l,A){if(!Cr(A))return!1;var L=typeof l;return(L=="number"?Cn(A)&&Ss(l,A.length):L=="string"&&l in A)?Oi(A[l],u):!1}i(yn,"isIterateeCall"),a(yn,"isIterateeCall");function xh(u,l){if(Rt(u))return!1;var A=typeof u;return A=="number"||A=="symbol"||A=="boolean"||u==null||$n(u)?!0:it.test(u)||!ar.test(u)||l!=null&&u in wr(l)}i(xh,"isKey"),a(xh,"isKey");function M5(u){var l=typeof u;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?u!=="__proto__":u===null}i(M5,"isKeyable"),a(M5,"isKeyable");function Th(u){var l=Wl(u),A=X[l];if(typeof A!="function"||!(l in Vt.prototype))return!1;if(u===A)return!0;var L=W1(A);return!!L&&u===L[0]}i(Th,"isLaziable"),a(Th,"isLaziable");function C5(u){return!!Y6&&Y6 in u}i(C5,"isMasked"),a(C5,"isMasked");var Jk=Kd?xs:$h;function Zc(u){var l=u&&u.constructor,A=typeof l=="function"&&l.prototype||Uc;return u===A}i(Zc,"isPrototype"),a(Zc,"isPrototype");function X1(u){return u===u&&!Cr(u)}i(X1,"isStrictComparable"),a(X1,"isStrictComparable");function Q1(u,l){return function(A){return A==null?!1:A[u]===l&&(l!==r||u in wr(A))}}i(Q1,"matchesStrictComparable"),a(Q1,"matchesStrictComparable");function I5(u){var l=ef(u,function(L){return A.size===p&&A.clear(),L}),A=l.cache;return l}i(I5,"memoizeCapped"),a(I5,"memoizeCapped");function k5(u,l){var A=u[1],L=l[1],W=A|L,ee=W<(R|P|I),de=L==I&&A==U||L==I&&A==H&&u[7].length<=l[8]||L==(I|H)&&l[7].length<=l[8]&&A==U;if(!(ee||de))return u;L&R&&(u[2]=l[2],W|=A&R?0:K);var be=l[3];if(be){var Ae=u[3];u[3]=Ae?N1(Ae,be,l[4]):be,u[4]=Ae?ea(u[3],v):l[4]}return be=l[5],be&&(Ae=u[5],u[5]=Ae?P1(Ae,be,l[6]):be,u[6]=Ae?ea(u[5],v):l[6]),be=l[7],be&&(u[7]=be),L&I&&(u[8]=u[8]==null?l[8]:mn(u[8],l[8])),u[9]==null&&(u[9]=l[9]),u[0]=l[0],u[1]=W,u}i(k5,"mergeData"),a(k5,"mergeData");function D5(u){var l=[];if(u!=null)for(var A in wr(u))l.push(A);return l}i(D5,"nativeKeysIn"),a(D5,"nativeKeysIn");function O5(u){return Gd.call(u)}i(O5,"objectToString"),a(O5,"objectToString");function ev(u,l,A){return l=Gr(l===r?u.length-1:l,0),function(){for(var L=arguments,W=-1,ee=Gr(L.length-l,0),de=Ie(ee);++W<ee;)de[W]=L[l+W];W=-1;for(var be=Ie(l+1);++W<l;)be[W]=L[W];return be[l]=A(de),Ln(u,this,be)}}i(ev,"overRest"),a(ev,"overRest");function tv(u,l){return l.length<2?u:Pa(u,ri(l,0,-1))}i(tv,"parent"),a(tv,"parent");function R5(u,l){for(var A=u.length,L=mn(l.length,A),W=Mn(u);L--;){var ee=l[L];u[L]=Ss(ee,A)?W[ee]:r}return u}i(R5,"reorder"),a(R5,"reorder");function Mh(u,l){if(!(l==="constructor"&&typeof u[l]=="function")&&l!="__proto__")return u[l]}i(Mh,"safeGet"),a(Mh,"safeGet");var N5=iv(n5),Jl=Pk||function(u,l){return Lr.setTimeout(u,l)},rv=iv(Gk);function nv(u,l,A){var L=l+"";return rv(u,x5(L,B5(E5(L),A)))}i(nv,"setWrapToString"),a(nv,"setWrapToString");function iv(u){var l=0,A=0;return function(){var L=Uk(),W=w-(L-A);if(A=L,W>0){if(++l>=q)return arguments[0]}else l=0;return u.apply(r,arguments)}}i(iv,"shortOut"),a(iv,"shortOut");function Yl(u,l){var A=-1,L=u.length,W=L-1;for(l=l===r?L:l;++A<l;){var ee=dh(A,W),de=u[ee];u[ee]=u[A],u[A]=de}return u.length=l,u}i(Yl,"shuffleSelf"),a(Yl,"shuffleSelf");var P5=I5(function(u){var l=[];return u.charCodeAt(0)===46&&l.push(""),u.replace(Ye,function(A,L,W,ee){l.push(W?ee.replace(Sn,"$1"):L||A)}),l});function Zi(u){if(typeof u=="string"||$n(u))return u;var l=u+"";return l=="0"&&1/u==-g?"-0":l}i(Zi,"toKey"),a(Zi,"toKey");function La(u){if(u!=null){try{return Vd.call(u)}catch{}try{return u+""}catch{}}return""}i(La,"toSource"),a(La,"toSource");function B5(u,l){return Qn(k,function(A){var L="_."+A[0];l&A[1]&&!Cl(u,L)&&u.push(L)}),u.sort()}i(B5,"updateWrapDetails"),a(B5,"updateWrapDetails");function sv(u){if(u instanceof Vt)return u.clone();var l=new ei(u.__wrapped__,u.__chain__);return l.__actions__=Mn(u.__actions__),l.__index__=u.__index__,l.__values__=u.__values__,l}i(sv,"wrapperClone"),a(sv,"wrapperClone");function L5(u,l,A){(A?yn(u,l,A):l===r)?l=1:l=Gr(Nt(l),0);var L=u==null?0:u.length;if(!L||l<1)return[];for(var W=0,ee=0,de=Ie(Qd(L/l));W<L;)de[ee++]=ri(u,W,W+=l);return de}i(L5,"chunk"),a(L5,"chunk");function F5(u){for(var l=-1,A=u==null?0:u.length,L=0,W=[];++l<A;){var ee=u[l];ee&&(W[L++]=ee)}return W}i(F5,"compact"),a(F5,"compact");function U5(){var u=arguments.length;if(!u)return[];for(var l=Ie(u-1),A=arguments[0],L=u;L--;)l[L-1]=arguments[L];return Qs(Rt(A)?Mn(A):[A],Jr(l,1))}i(U5,"concat4"),a(U5,"concat");var Yk=Ft(function(u,l){return Rr(u)?qc(u,Jr(l,1,Rr,!0)):[]}),Xk=Ft(function(u,l){var A=ni(l);return Rr(A)&&(A=r),Rr(u)?qc(u,Jr(l,1,Rr,!0),wt(A,2)):[]}),Qk=Ft(function(u,l){var A=ni(l);return Rr(A)&&(A=r),Rr(u)?qc(u,Jr(l,1,Rr,!0),r,A):[]});function $5(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),ri(u,l<0?0:l,L)):[]}i($5,"drop"),a($5,"drop");function j5(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),l=L-l,ri(u,0,l<0?0:l)):[]}i(j5,"dropRight"),a(j5,"dropRight");function z5(u,l){return u&&u.length?zl(u,wt(l,3),!0,!0):[]}i(z5,"dropRightWhile"),a(z5,"dropRightWhile");function H5(u,l){return u&&u.length?zl(u,wt(l,3),!0):[]}i(H5,"dropWhile"),a(H5,"dropWhile");function q5(u,l,A,L){var W=u==null?0:u.length;return W?(A&&typeof A!="number"&&yn(u,l,A)&&(A=0,L=W),L3(u,l,A,L)):[]}i(q5,"fill"),a(q5,"fill");function av(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=A==null?0:Nt(A);return W<0&&(W=Gr(L+W,0)),Il(u,wt(l,3),W)}i(av,"findIndex"),a(av,"findIndex");function ov(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=L-1;return A!==r&&(W=Nt(A),W=A<0?Gr(L+W,0):mn(W,L-1)),Il(u,wt(l,3),W,!0)}i(ov,"findLastIndex"),a(ov,"findLastIndex");function cv(u){var l=u==null?0:u.length;return l?Jr(u,1):[]}i(cv,"flatten"),a(cv,"flatten");function K5(u){var l=u==null?0:u.length;return l?Jr(u,g):[]}i(K5,"flattenDeep"),a(K5,"flattenDeep");function V5(u,l){var A=u==null?0:u.length;return A?(l=l===r?1:Nt(l),Jr(u,l)):[]}i(V5,"flattenDepth"),a(V5,"flattenDepth");function G5(u){for(var l=-1,A=u==null?0:u.length,L={};++l<A;){var W=u[l];L[W[0]]=W[1]}return L}i(G5,"fromPairs"),a(G5,"fromPairs");function uv(u){return u&&u.length?u[0]:r}i(uv,"head"),a(uv,"head");function W5(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=A==null?0:Nt(A);return W<0&&(W=Gr(L+W,0)),ko(u,l,W)}i(W5,"indexOf"),a(W5,"indexOf");function Z5(u){var l=u==null?0:u.length;return l?ri(u,0,-1):[]}i(Z5,"initial"),a(Z5,"initial");var eD=Ft(function(u){var l=Tr(u,gh);return l.length&&l[0]===u[0]?oh(l):[]}),tD=Ft(function(u){var l=ni(u),A=Tr(u,gh);return l===ni(A)?l=r:A.pop(),A.length&&A[0]===u[0]?oh(A,wt(l,2)):[]}),rD=Ft(function(u){var l=ni(u),A=Tr(u,gh);return l=typeof l=="function"?l:r,l&&A.pop(),A.length&&A[0]===u[0]?oh(A,r,l):[]});function J5(u,l){return u==null?"":Lk.call(u,l)}i(J5,"join"),a(J5,"join");function ni(u){var l=u==null?0:u.length;return l?u[l-1]:r}i(ni,"last2"),a(ni,"last");function Y5(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=L;return A!==r&&(W=Nt(A),W=W<0?Gr(L+W,0):mn(W,L-1)),l===l?G6(u,l,W):Il(u,Jm,W,!0)}i(Y5,"lastIndexOf"),a(Y5,"lastIndexOf");function X5(u,l){return u&&u.length?E1(u,Nt(l)):r}i(X5,"nth"),a(X5,"nth");var nD=Ft(lv);function lv(u,l){return u&&u.length&&l&&l.length?fh(u,l):u}i(lv,"pullAll"),a(lv,"pullAll");function Q5(u,l,A){return u&&u.length&&l&&l.length?fh(u,l,wt(A,2)):u}i(Q5,"pullAllBy"),a(Q5,"pullAllBy");function ew(u,l,A){return u&&u.length&&l&&l.length?fh(u,l,r,A):u}i(ew,"pullAllWith"),a(ew,"pullAllWith");var iD=As(function(u,l){var A=u==null?0:u.length,L=ih(u,l);return x1(u,Tr(l,function(W){return Ss(W,A)?+W:W}).sort(R1)),L});function tw(u,l){var A=[];if(!(u&&u.length))return A;var L=-1,W=[],ee=u.length;for(l=wt(l,3);++L<ee;){var de=u[L];l(de,L,u)&&(A.push(de),W.push(L))}return x1(u,W),A}i(tw,"remove"),a(tw,"remove");function Ch(u){return u==null?u:jk.call(u)}i(Ch,"reverse"),a(Ch,"reverse");function rw(u,l,A){var L=u==null?0:u.length;return L?(A&&typeof A!="number"&&yn(u,l,A)?(l=0,A=L):(l=l==null?0:Nt(l),A=A===r?L:Nt(A)),ri(u,l,A)):[]}i(rw,"slice2"),a(rw,"slice");function nw(u,l){return jl(u,l)}i(nw,"sortedIndex"),a(nw,"sortedIndex");function iw(u,l,A){return ph(u,l,wt(A,2))}i(iw,"sortedIndexBy"),a(iw,"sortedIndexBy");function sw(u,l){var A=u==null?0:u.length;if(A){var L=jl(u,l);if(L<A&&Oi(u[L],l))return L}return-1}i(sw,"sortedIndexOf"),a(sw,"sortedIndexOf");function aw(u,l){return jl(u,l,!0)}i(aw,"sortedLastIndex"),a(aw,"sortedLastIndex");function ow(u,l,A){return ph(u,l,wt(A,2),!0)}i(ow,"sortedLastIndexBy"),a(ow,"sortedLastIndexBy");function cw(u,l){var A=u==null?0:u.length;if(A){var L=jl(u,l,!0)-1;if(Oi(u[L],l))return L}return-1}i(cw,"sortedLastIndexOf"),a(cw,"sortedLastIndexOf");function uw(u){return u&&u.length?T1(u):[]}i(uw,"sortedUniq"),a(uw,"sortedUniq");function lw(u,l){return u&&u.length?T1(u,wt(l,2)):[]}i(lw,"sortedUniqBy"),a(lw,"sortedUniqBy");function fw(u){var l=u==null?0:u.length;return l?ri(u,1,l):[]}i(fw,"tail"),a(fw,"tail");function dw(u,l,A){return u&&u.length?(l=A||l===r?1:Nt(l),ri(u,0,l<0?0:l)):[]}i(dw,"take2"),a(dw,"take");function hw(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),l=L-l,ri(u,l<0?0:l,L)):[]}i(hw,"takeRight"),a(hw,"takeRight");function pw(u,l){return u&&u.length?zl(u,wt(l,3),!1,!0):[]}i(pw,"takeRightWhile"),a(pw,"takeRightWhile");function mw(u,l){return u&&u.length?zl(u,wt(l,3)):[]}i(mw,"takeWhile"),a(mw,"takeWhile");var sD=Ft(function(u){return ta(Jr(u,1,Rr,!0))}),aD=Ft(function(u){var l=ni(u);return Rr(l)&&(l=r),ta(Jr(u,1,Rr,!0),wt(l,2))}),oD=Ft(function(u){var l=ni(u);return l=typeof l=="function"?l:r,ta(Jr(u,1,Rr,!0),r,l)});function vw(u){return u&&u.length?ta(u):[]}i(vw,"uniq"),a(vw,"uniq");function gw(u,l){return u&&u.length?ta(u,wt(l,2)):[]}i(gw,"uniqBy"),a(gw,"uniqBy");function yw(u,l){return l=typeof l=="function"?l:r,u&&u.length?ta(u,r,l):[]}i(yw,"uniqWith"),a(yw,"uniqWith");function Ih(u){if(!(u&&u.length))return[];var l=0;return u=Xs(u,function(A){if(Rr(A))return l=Gr(A.length,l),!0}),jd(l,function(A){return Tr(u,Fd(A))})}i(Ih,"unzip"),a(Ih,"unzip");function fv(u,l){if(!(u&&u.length))return[];var A=Ih(u);return l==null?A:Tr(A,function(L){return Ln(l,r,L)})}i(fv,"unzipWith"),a(fv,"unzipWith");var cD=Ft(function(u,l){return Rr(u)?qc(u,l):[]}),uD=Ft(function(u){return vh(Xs(u,Rr))}),lD=Ft(function(u){var l=ni(u);return Rr(l)&&(l=r),vh(Xs(u,Rr),wt(l,2))}),fD=Ft(function(u){var l=ni(u);return l=typeof l=="function"?l:r,vh(Xs(u,Rr),r,l)}),dD=Ft(Ih);function bw(u,l){return k1(u||[],l||[],Hc)}i(bw,"zipObject"),a(bw,"zipObject");function ww(u,l){return k1(u||[],l||[],Gc)}i(ww,"zipObjectDeep"),a(ww,"zipObjectDeep");var hD=Ft(function(u){var l=u.length,A=l>1?u[l-1]:r;return A=typeof A=="function"?(u.pop(),A):r,fv(u,A)});function dv(u){var l=X(u);return l.__chain__=!0,l}i(dv,"chain"),a(dv,"chain");function _w(u,l){return l(u),u}i(_w,"tap"),a(_w,"tap");function Xl(u,l){return l(u)}i(Xl,"thru"),a(Xl,"thru");var pD=As(function(u){var l=u.length,A=l?u[0]:0,L=this.__wrapped__,W=a(function(ee){return ih(ee,u)},"interceptor");return l>1||this.__actions__.length||!(L instanceof Vt)||!Ss(A)?this.thru(W):(L=L.slice(A,+A+(l?1:0)),L.__actions__.push({func:Xl,args:[W],thisArg:r}),new ei(L,this.__chain__).thru(function(ee){return l&&!ee.length&&ee.push(r),ee}))});function Ew(){return dv(this)}i(Ew,"wrapperChain"),a(Ew,"wrapperChain");function Aw(){return new ei(this.value(),this.__chain__)}i(Aw,"wrapperCommit"),a(Aw,"wrapperCommit");function Sw(){this.__values__===r&&(this.__values__=xv(this.value()));var u=this.__index__>=this.__values__.length,l=u?r:this.__values__[this.__index__++];return{done:u,value:l}}i(Sw,"wrapperNext"),a(Sw,"wrapperNext");function xw(){return this}i(xw,"wrapperToIterator"),a(xw,"wrapperToIterator");function Tw(u){for(var l,A=this;A instanceof Bl;){var L=sv(A);L.__index__=0,L.__values__=r,l?W.__wrapped__=L:l=L;var W=L;A=A.__wrapped__}return W.__wrapped__=u,l}i(Tw,"wrapperPlant"),a(Tw,"wrapperPlant");function Mw(){var u=this.__wrapped__;if(u instanceof Vt){var l=u;return this.__actions__.length&&(l=new Vt(this)),l=l.reverse(),l.__actions__.push({func:Xl,args:[Ch],thisArg:r}),new ei(l,this.__chain__)}return this.thru(Ch)}i(Mw,"wrapperReverse"),a(Mw,"wrapperReverse");function Cw(){return I1(this.__wrapped__,this.__actions__)}i(Cw,"wrapperValue"),a(Cw,"wrapperValue");var mD=Hl(function(u,l,A){vr.call(u,A)?++u[A]:_s(u,A,1)});function Iw(u,l,A){var L=Rt(u)?Wm:B3;return A&&yn(u,l,A)&&(l=r),L(u,wt(l,3))}i(Iw,"every"),a(Iw,"every");function kw(u,l){var A=Rt(u)?Xs:h1;return A(u,wt(l,3))}i(kw,"filter2"),a(kw,"filter");var vD=U1(av),gD=U1(ov);function Dw(u,l){return Jr(Ql(u,l),1)}i(Dw,"flatMap"),a(Dw,"flatMap");function Ow(u,l){return Jr(Ql(u,l),g)}i(Ow,"flatMapDeep"),a(Ow,"flatMapDeep");function Rw(u,l,A){return A=A===r?1:Nt(A),Jr(Ql(u,l),A)}i(Rw,"flatMapDepth"),a(Rw,"flatMapDepth");function hv(u,l){var A=Rt(u)?Qn:Na;return A(u,wt(l,3))}i(hv,"forEach"),a(hv,"forEach");function pv(u,l){var A=Rt(u)?R6:P3;return A(u,wt(l,3))}i(pv,"forEachRight"),a(pv,"forEachRight");var yD=Hl(function(u,l,A){vr.call(u,A)?u[A].push(l):_s(u,A,[l])});function Nw(u,l,A,L){u=Cn(u)?u:Fo(u),A=A&&!L?Nt(A):0;var W=u.length;return A<0&&(A=Gr(W+A,0)),nf(u)?A<=W&&u.indexOf(l,A)>-1:!!W&&ko(u,l,A)>-1}i(Nw,"includes"),a(Nw,"includes");var bD=Ft(function(u,l,A){var L=-1,W=typeof l=="function",ee=Cn(u)?Ie(u.length):[];return Na(u,function(de){ee[++L]=W?Ln(l,de,A):Kc(de,l,A)}),ee}),wD=Hl(function(u,l,A){_s(u,A,l)});function Ql(u,l){var A=Rt(u)?Tr:b1;return A(u,wt(l,3))}i(Ql,"map2"),a(Ql,"map");function Pw(u,l,A,L){return u==null?[]:(Rt(l)||(l=l==null?[]:[l]),A=L?r:A,Rt(A)||(A=A==null?[]:[A]),A1(u,l,A))}i(Pw,"orderBy"),a(Pw,"orderBy");var _D=Hl(function(u,l,A){u[A?0:1].push(l)},function(){return[[],[]]});function Bw(u,l,A){var L=Rt(u)?Bd:Xm,W=arguments.length<3;return L(u,wt(l,4),A,W,Na)}i(Bw,"reduce"),a(Bw,"reduce");function Lw(u,l,A){var L=Rt(u)?N6:Xm,W=arguments.length<3;return L(u,wt(l,4),A,W,P3)}i(Lw,"reduceRight"),a(Lw,"reduceRight");function Fw(u,l){var A=Rt(u)?Xs:h1;return A(u,tf(wt(l,3)))}i(Fw,"reject"),a(Fw,"reject");function Uw(u){var l=Rt(u)?u1:t5;return l(u)}i(Uw,"sample"),a(Uw,"sample");function $w(u,l,A){(A?yn(u,l,A):l===r)?l=1:l=Nt(l);var L=Rt(u)?k3:r5;return L(u,l)}i($w,"sampleSize"),a($w,"sampleSize");function jw(u){var l=Rt(u)?D3:i5;return l(u)}i(jw,"shuffle"),a(jw,"shuffle");function zw(u){if(u==null)return 0;if(Cn(u))return nf(u)?Oo(u):u.length;var l=gn(u);return l==ge||l==Q?u.size:uh(u).length}i(zw,"size"),a(zw,"size");function Hw(u,l,A){var L=Rt(u)?Ld:s5;return A&&yn(u,l,A)&&(l=r),L(u,wt(l,3))}i(Hw,"some"),a(Hw,"some");var ED=Ft(function(u,l){if(u==null)return[];var A=l.length;return A>1&&yn(u,l[0],l[1])?l=[]:A>2&&yn(l[0],l[1],l[2])&&(l=[l[0]]),A1(u,Jr(l,1),[])}),kh=Nk||function(){return Lr.Date.now()};function qw(u,l){if(typeof l!="function")throw new ki(c);return u=Nt(u),function(){if(--u<1)return l.apply(this,arguments)}}i(qw,"after"),a(qw,"after");function mv(u,l,A){return l=A?r:l,l=u&&l==null?u.length:l,Es(u,I,r,r,r,r,l)}i(mv,"ary"),a(mv,"ary");function vv(u,l){var A;if(typeof l!="function")throw new ki(c);return u=Nt(u),function(){return--u>0&&(A=l.apply(this,arguments)),u<=1&&(l=r),A}}i(vv,"before"),a(vv,"before");var gv=Ft(function(u,l,A){var L=R;if(A.length){var W=ea(A,Bo(gv));L|=V}return Es(u,L,l,A,W)}),Kw=Ft(function(u,l,A){var L=R|P;if(A.length){var W=ea(A,Bo(Kw));L|=V}return Es(l,L,u,A,W)});function yv(u,l,A){l=A?r:l;var L=Es(u,U,r,r,r,r,r,l);return L.placeholder=yv.placeholder,L}i(yv,"curry"),a(yv,"curry");function bv(u,l,A){l=A?r:l;var L=Es(u,j,r,r,r,r,r,l);return L.placeholder=bv.placeholder,L}i(bv,"curryRight"),a(bv,"curryRight");function wv(u,l,A){var L,W,ee,de,be,Ae,Be=0,Le=!1,$e=!1,Je=!0;if(typeof u!="function")throw new ki(c);l=ii(l)||0,Cr(A)&&(Le=!!A.leading,$e="maxWait"in A,ee=$e?Gr(ii(A.maxWait)||0,l):ee,Je="trailing"in A?!!A.trailing:Je);function pt(Fr){var Ji=L,ia=W;return L=W=r,Be=Fr,de=u.apply(ia,Ji),de}i(pt,"invokeFunc"),a(pt,"invokeFunc");function St(Fr){return Be=Fr,be=Jl(Ht,l),Le?pt(Fr):de}i(St,"leadingEdge"),a(St,"leadingEdge");function Lt(Fr){var Ji=Fr-Ae,ia=Fr-Be,j_=l-Ji;return $e?mn(j_,ee-ia):j_}i(Lt,"remainingWait"),a(Lt,"remainingWait");function _t(Fr){var Ji=Fr-Ae,ia=Fr-Be;return Ae===r||Ji>=l||Ji<0||$e&&ia>=ee}i(_t,"shouldInvoke"),a(_t,"shouldInvoke");function Ht(){var Fr=kh();if(_t(Fr))return Gt(Fr);be=Jl(Ht,Lt(Fr))}i(Ht,"timerExpired"),a(Ht,"timerExpired");function Gt(Fr){return be=r,Je&&L?pt(Fr):(L=W=r,de)}i(Gt,"trailingEdge"),a(Gt,"trailingEdge");function jn(){be!==r&&a5(be),Be=0,L=Ae=W=be=r}i(jn,"cancel"),a(jn,"cancel");function bn(){return be===r?de:Gt(kh())}i(bn,"flush"),a(bn,"flush");function zn(){var Fr=kh(),Ji=_t(Fr);if(L=arguments,W=this,Ae=Fr,Ji){if(be===r)return St(Ae);if($e)return a5(be),be=Jl(Ht,l),pt(Ae)}return be===r&&(be=Jl(Ht,l)),de}return i(zn,"debounced"),a(zn,"debounced"),zn.cancel=jn,zn.flush=bn,zn}i(wv,"debounce"),a(wv,"debounce");var AD=Ft(function(u,l){return d1(u,1,l)}),SD=Ft(function(u,l,A){return d1(u,ii(l)||0,A)});function Vw(u){return Es(u,se)}i(Vw,"flip"),a(Vw,"flip");function ef(u,l){if(typeof u!="function"||l!=null&&typeof l!="function")throw new ki(c);var A=a(function(){var L=arguments,W=l?l.apply(this,L):L[0],ee=A.cache;if(ee.has(W))return ee.get(W);var de=u.apply(this,L);return A.cache=ee.set(W,de)||ee,de},"memoized");return A.cache=new(ef.Cache||ws),A}i(ef,"memoize"),a(ef,"memoize"),ef.Cache=ws;function tf(u){if(typeof u!="function")throw new ki(c);return function(){var l=arguments;switch(l.length){case 0:return!u.call(this);case 1:return!u.call(this,l[0]);case 2:return!u.call(this,l[0],l[1]);case 3:return!u.call(this,l[0],l[1],l[2])}return!u.apply(this,l)}}i(tf,"negate"),a(tf,"negate");function Gw(u){return vv(2,u)}i(Gw,"once"),a(Gw,"once");var xD=Wk(function(u,l){l=l.length==1&&Rt(l[0])?Tr(l[0],Fn(wt())):Tr(Jr(l,1),Fn(wt()));var A=l.length;return Ft(function(L){for(var W=-1,ee=mn(L.length,A);++W<ee;)L[W]=l[W].call(this,L[W]);return Ln(u,this,L)})}),_v=Ft(function(u,l){var A=ea(l,Bo(_v));return Es(u,V,r,l,A)}),Ww=Ft(function(u,l){var A=ea(l,Bo(Ww));return Es(u,G,r,l,A)}),TD=As(function(u,l){return Es(u,H,r,r,r,l)});function Zw(u,l){if(typeof u!="function")throw new ki(c);return l=l===r?l:Nt(l),Ft(u,l)}i(Zw,"rest"),a(Zw,"rest");function Jw(u,l){if(typeof u!="function")throw new ki(c);return l=l==null?0:Gr(Nt(l),0),Ft(function(A){var L=A[l],W=na(A,0,l);return L&&Qs(W,L),Ln(u,this,W)})}i(Jw,"spread"),a(Jw,"spread");function Yw(u,l,A){var L=!0,W=!0;if(typeof u!="function")throw new ki(c);return Cr(A)&&(L="leading"in A?!!A.leading:L,W="trailing"in A?!!A.trailing:W),wv(u,l,{leading:L,maxWait:l,trailing:W})}i(Yw,"throttle2"),a(Yw,"throttle");function Xw(u){return mv(u,1)}i(Xw,"unary"),a(Xw,"unary");function Qw(u,l){return _v(yh(l),u)}i(Qw,"wrap"),a(Qw,"wrap");function e4(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}i(e4,"castArray"),a(e4,"castArray");function t4(u){return ti(u,_)}i(t4,"clone"),a(t4,"clone");function r4(u,l){return l=typeof l=="function"?l:r,ti(u,_,l)}i(r4,"cloneWith"),a(r4,"cloneWith");function n4(u){return ti(u,b|_)}i(n4,"cloneDeep6"),a(n4,"cloneDeep");function i4(u,l){return l=typeof l=="function"?l:r,ti(u,b|_,l)}i(i4,"cloneDeepWith"),a(i4,"cloneDeepWith");function s4(u,l){return l==null||f1(u,l,Wr(l))}i(s4,"conformsTo"),a(s4,"conformsTo");function Oi(u,l){return u===l||u!==u&&l!==l}i(Oi,"eq4"),a(Oi,"eq");var MD=Gl(ah),CD=Gl(function(u,l){return u>=l}),Lo=v1(function(){return arguments}())?v1:function(u){return kr(u)&&vr.call(u,"callee")&&!e3.call(u,"callee")},Rt=Ie.isArray,ID=Io?Fn(Io):H3;function Cn(u){return u!=null&&rf(u.length)&&!xs(u)}i(Cn,"isArrayLike2"),a(Cn,"isArrayLike");function Rr(u){return kr(u)&&Cn(u)}i(Rr,"isArrayLikeObject"),a(Rr,"isArrayLikeObject");function a4(u){return u===!0||u===!1||kr(u)&&vn(u)==Y}i(a4,"isBoolean"),a(a4,"isBoolean");var Fa=Bk||$h,kD=M6?Fn(M6):q3;function o4(u){return kr(u)&&u.nodeType===1&&!Jc(u)}i(o4,"isElement"),a(o4,"isElement");function c4(u){if(u==null)return!0;if(Cn(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||Fa(u)||Yc(u)||Lo(u)))return!u.length;var l=gn(u);if(l==ge||l==Q)return!u.size;if(Zc(u))return!uh(u).length;for(var A in u)if(vr.call(u,A))return!1;return!0}i(c4,"isEmpty"),a(c4,"isEmpty");function u4(u,l){return Vc(u,l)}i(u4,"isEqual"),a(u4,"isEqual");function l4(u,l,A){A=typeof A=="function"?A:r;var L=A?A(u,l):r;return L===r?Vc(u,l,r,A):!!L}i(l4,"isEqualWith"),a(l4,"isEqualWith");function Dh(u){if(!kr(u))return!1;var l=vn(u);return l==z||l==M||typeof u.message=="string"&&typeof u.name=="string"&&!Jc(u)}i(Dh,"isError"),a(Dh,"isError");function f4(u){return typeof u=="number"&&r3(u)}i(f4,"isFinite2"),a(f4,"isFinite");function xs(u){if(!Cr(u))return!1;var l=vn(u);return l==te||l==oe||l==N||l==pe}i(xs,"isFunction2"),a(xs,"isFunction");function Ev(u){return typeof u=="number"&&u==Nt(u)}i(Ev,"isInteger3"),a(Ev,"isInteger");function rf(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=S}i(rf,"isLength"),a(rf,"isLength");function Cr(u){var l=typeof u;return u!=null&&(l=="object"||l=="function")}i(Cr,"isObject"),a(Cr,"isObject");function kr(u){return u!=null&&typeof u=="object"}i(kr,"isObjectLike"),a(kr,"isObjectLike");var d4=C6?Fn(C6):V3;function h4(u,l){return u===l||ch(u,l,Sh(l))}i(h4,"isMatch"),a(h4,"isMatch");function p4(u,l,A){return A=typeof A=="function"?A:r,ch(u,l,Sh(l),A)}i(p4,"isMatchWith"),a(p4,"isMatchWith");function m4(u){return Av(u)&&u!=+u}i(m4,"isNaN2"),a(m4,"isNaN");function v4(u){if(Jk(u))throw new It(o);return g1(u)}i(v4,"isNative"),a(v4,"isNative");function g4(u){return u===null}i(g4,"isNull"),a(g4,"isNull");function y4(u){return u==null}i(y4,"isNil"),a(y4,"isNil");function Av(u){return typeof u=="number"||kr(u)&&vn(u)==ke}i(Av,"isNumber"),a(Av,"isNumber");function Jc(u){if(!kr(u)||vn(u)!=fe)return!1;var l=Jd(u);if(l===null)return!0;var A=vr.call(l,"constructor")&&l.constructor;return typeof A=="function"&&A instanceof A&&Vd.call(A)==kk}i(Jc,"isPlainObject"),a(Jc,"isPlainObject");var Sv=I6?Fn(I6):G3;function b4(u){return Ev(u)&&u>=-S&&u<=S}i(b4,"isSafeInteger"),a(b4,"isSafeInteger");var w4=k6?Fn(k6):W3;function nf(u){return typeof u=="string"||!Rt(u)&&kr(u)&&vn(u)==ve}i(nf,"isString"),a(nf,"isString");function $n(u){return typeof u=="symbol"||kr(u)&&vn(u)==Me}i($n,"isSymbol"),a($n,"isSymbol");var Yc=D6?Fn(D6):Z3;function _4(u){return u===r}i(_4,"isUndefined"),a(_4,"isUndefined");function E4(u){return kr(u)&&gn(u)==Re}i(E4,"isWeakMap"),a(E4,"isWeakMap");function A4(u){return kr(u)&&vn(u)==je}i(A4,"isWeakSet"),a(A4,"isWeakSet");var DD=Gl(lh),OD=Gl(function(u,l){return u<=l});function xv(u){if(!u)return[];if(Cn(u))return nf(u)?Ii(u):Mn(u);if(Dl&&u[Dl])return q6(u[Dl]());var l=gn(u),A=l==ge?Hd:l==Q?kl:Fo;return A(u)}i(xv,"toArray"),a(xv,"toArray");function Ts(u){if(!u)return u===0?u:0;if(u=ii(u),u===g||u===-g){var l=u<0?-1:1;return l*D}return u===u?u:0}i(Ts,"toFinite"),a(Ts,"toFinite");function Nt(u){var l=Ts(u),A=l%1;return l===l?A?l-A:l:0}i(Nt,"toInteger"),a(Nt,"toInteger");function Tv(u){return u?Ra(Nt(u),0,E):0}i(Tv,"toLength"),a(Tv,"toLength");function ii(u){if(typeof u=="number")return u;if($n(u))return C;if(Cr(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=Cr(l)?l+"":l}if(typeof u!="string")return u===0?u:+u;u=Qm(u);var A=er.test(u);return A||tn.test(u)?sn(u.slice(2),A?2:8):fn.test(u)?C:+u}i(ii,"toNumber"),a(ii,"toNumber");function Mv(u){return Wi(u,In(u))}i(Mv,"toPlainObject"),a(Mv,"toPlainObject");function S4(u){return u?Ra(Nt(u),-S,S):u===0?u:0}i(S4,"toSafeInteger"),a(S4,"toSafeInteger");function dr(u){return u==null?"":Un(u)}i(dr,"toString4"),a(dr,"toString");var RD=No(function(u,l){if(Zc(l)||Cn(l)){Wi(l,Wr(l),u);return}for(var A in l)vr.call(l,A)&&Hc(u,A,l[A])}),x4=No(function(u,l){Wi(l,In(l),u)}),Oh=No(function(u,l,A,L){Wi(l,In(l),u,L)}),ND=No(function(u,l,A,L){Wi(l,Wr(l),u,L)}),PD=As(ih);function T4(u,l){var A=zc(u);return l==null?A:l1(A,l)}i(T4,"create2"),a(T4,"create");var BD=Ft(function(u,l){u=wr(u);var A=-1,L=l.length,W=L>2?l[2]:r;for(W&&yn(l[0],l[1],W)&&(L=1);++A<L;)for(var ee=l[A],de=In(ee),be=-1,Ae=de.length;++be<Ae;){var Be=de[be],Le=u[Be];(Le===r||Oi(Le,Uc[Be])&&!vr.call(u,Be))&&(u[Be]=ee[Be])}return u}),LD=Ft(function(u){return u.push(r,V1),Ln(F4,r,u)});function M4(u,l){return Zm(u,wt(l,3),Gi)}i(M4,"findKey"),a(M4,"findKey");function C4(u,l){return Zm(u,wt(l,3),sh)}i(C4,"findLastKey"),a(C4,"findLastKey");function I4(u,l){return u==null?u:p1(u,wt(l,3),In)}i(I4,"forIn"),a(I4,"forIn");function k4(u,l){return u==null?u:F3(u,wt(l,3),In)}i(k4,"forInRight"),a(k4,"forInRight");function D4(u,l){return u&&Gi(u,wt(l,3))}i(D4,"forOwn"),a(D4,"forOwn");function O4(u,l){return u&&sh(u,wt(l,3))}i(O4,"forOwnRight"),a(O4,"forOwnRight");function R4(u){return u==null?[]:Ul(u,Wr(u))}i(R4,"functions"),a(R4,"functions");function N4(u){return u==null?[]:Ul(u,In(u))}i(N4,"functionsIn"),a(N4,"functionsIn");function Rh(u,l,A){var L=u==null?r:Pa(u,l);return L===r?A:L}i(Rh,"get2"),a(Rh,"get");function P4(u,l){return u!=null&&J1(u,l,U3)}i(P4,"has"),a(P4,"has");function Nh(u,l){return u!=null&&J1(u,l,$3)}i(Nh,"hasIn"),a(Nh,"hasIn");var FD=j1(function(u,l,A){l!=null&&typeof l.toString!="function"&&(l=Gd.call(l)),u[l]=A},Ph(kn)),UD=j1(function(u,l,A){l!=null&&typeof l.toString!="function"&&(l=Gd.call(l)),vr.call(u,l)?u[l].push(A):u[l]=[A]},wt),$D=Ft(Kc);function Wr(u){return Cn(u)?c1(u):uh(u)}i(Wr,"keys"),a(Wr,"keys");function In(u){return Cn(u)?c1(u,!0):J3(u)}i(In,"keysIn"),a(In,"keysIn");function B4(u,l){var A={};return l=wt(l,3),Gi(u,function(L,W,ee){_s(A,l(L,W,ee),L)}),A}i(B4,"mapKeys"),a(B4,"mapKeys");function L4(u,l){var A={};return l=wt(l,3),Gi(u,function(L,W,ee){_s(A,W,l(L,W,ee))}),A}i(L4,"mapValues"),a(L4,"mapValues");var jD=No(function(u,l,A){$l(u,l,A)}),F4=No(function(u,l,A,L){$l(u,l,A,L)}),zD=As(function(u,l){var A={};if(u==null)return A;var L=!1;l=Tr(l,function(ee){return ee=ra(ee,u),L||(L=ee.length>1),ee}),Wi(u,Ah(u),A),L&&(A=ti(A,b|y|_,v5));for(var W=l.length;W--;)mh(A,l[W]);return A});function U4(u,l){return Cv(u,tf(wt(l)))}i(U4,"omitBy"),a(U4,"omitBy");var HD=As(function(u,l){return u==null?{}:X3(u,l)});function Cv(u,l){if(u==null)return{};var A=Tr(Ah(u),function(L){return[L]});return l=wt(l),S1(u,A,function(L,W){return l(L,W[0])})}i(Cv,"pickBy"),a(Cv,"pickBy");function $4(u,l,A){l=ra(l,u);var L=-1,W=l.length;for(W||(W=1,u=r);++L<W;){var ee=u==null?r:u[Zi(l[L])];ee===r&&(L=W,ee=A),u=xs(ee)?ee.call(u):ee}return u}i($4,"result"),a($4,"result");function j4(u,l,A){return u==null?u:Gc(u,l,A)}i(j4,"set"),a(j4,"set");function z4(u,l,A,L){return L=typeof L=="function"?L:r,u==null?u:Gc(u,l,A,L)}i(z4,"setWith"),a(z4,"setWith");var H4=q1(Wr),q4=q1(In);function K4(u,l,A){var L=Rt(u),W=L||Fa(u)||Yc(u);if(l=wt(l,4),A==null){var ee=u&&u.constructor;W?A=L?new ee:[]:Cr(u)?A=xs(ee)?zc(Jd(u)):{}:A={}}return(W?Qn:Gi)(u,function(de,be,Ae){return l(A,de,be,Ae)}),A}i(K4,"transform"),a(K4,"transform");function V4(u,l){return u==null?!0:mh(u,l)}i(V4,"unset"),a(V4,"unset");function G4(u,l,A){return u==null?u:C1(u,l,yh(A))}i(G4,"update2"),a(G4,"update");function W4(u,l,A,L){return L=typeof L=="function"?L:r,u==null?u:C1(u,l,yh(A),L)}i(W4,"updateWith"),a(W4,"updateWith");function Fo(u){return u==null?[]:zd(u,Wr(u))}i(Fo,"values"),a(Fo,"values");function Z4(u){return u==null?[]:zd(u,In(u))}i(Z4,"valuesIn"),a(Z4,"valuesIn");function J4(u,l,A){return A===r&&(A=l,l=r),A!==r&&(A=ii(A),A=A===A?A:0),l!==r&&(l=ii(l),l=l===l?l:0),Ra(ii(u),l,A)}i(J4,"clamp"),a(J4,"clamp");function Y4(u,l,A){return l=Ts(l),A===r?(A=l,l=0):A=Ts(A),u=ii(u),j3(u,l,A)}i(Y4,"inRange"),a(Y4,"inRange");function X4(u,l,A){if(A&&typeof A!="boolean"&&yn(u,l,A)&&(l=A=r),A===r&&(typeof l=="boolean"?(A=l,l=r):typeof u=="boolean"&&(A=u,u=r)),u===r&&l===r?(u=0,l=1):(u=Ts(u),l===r?(l=u,u=0):l=Ts(l)),u>l){var L=u;u=l,l=L}if(A||u%1||l%1){var W=n3();return mn(u+W*(l-u+qr("1e-"+((W+"").length-1))),l)}return dh(u,l)}i(X4,"random"),a(X4,"random");var qD=Po(function(u,l,A){return l=l.toLowerCase(),u+(A?Iv(l):l)});function Iv(u){return Dv(dr(u).toLowerCase())}i(Iv,"capitalize"),a(Iv,"capitalize");function kv(u){return u=dr(u),u&&u.replace(Or,Ak).replace(Od,"")}i(kv,"deburr"),a(kv,"deburr");function Q4(u,l,A){u=dr(u),l=Un(l);var L=u.length;A=A===r?L:Ra(Nt(A),0,L);var W=A;return A-=l.length,A>=0&&u.slice(A,W)==l}i(Q4,"endsWith"),a(Q4,"endsWith");function e_(u){return u=dr(u),u&&ut.test(u)?u.replace(Dr,Sk):u}i(e_,"escape"),a(e_,"escape");function t_(u){return u=dr(u),u&&st.test(u)?u.replace(Qt,"\\$&"):u}i(t_,"escapeRegExp"),a(t_,"escapeRegExp");var KD=Po(function(u,l,A){return u+(A?"-":"")+l.toLowerCase()}),VD=Po(function(u,l,A){return u+(A?" ":"")+l.toLowerCase()}),GD=F1("toLowerCase");function r_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;if(!l||L>=l)return u;var W=(l-L)/2;return Vl(eh(W),A)+u+Vl(Qd(W),A)}i(r_,"pad2"),a(r_,"pad");function n_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;return l&&L<l?u+Vl(l-L,A):u}i(n_,"padEnd"),a(n_,"padEnd");function i_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;return l&&L<l?Vl(l-L,A)+u:u}i(i_,"padStart"),a(i_,"padStart");function s_(u,l,A){return A||l==null?l=0:l&&(l=+l),$k(dr(u).replace(Qe,""),l||0)}i(s_,"parseInt2"),a(s_,"parseInt");function a_(u,l,A){return(A?yn(u,l,A):l===r)?l=1:l=Nt(l),hh(dr(u),l)}i(a_,"repeat"),a(a_,"repeat");function o_(){var u=arguments,l=dr(u[0]);return u.length<3?l:l.replace(u[1],u[2])}i(o_,"replace"),a(o_,"replace");var WD=Po(function(u,l,A){return u+(A?"_":"")+l.toLowerCase()});function c_(u,l,A){return A&&typeof A!="number"&&yn(u,l,A)&&(l=A=r),A=A===r?E:A>>>0,A?(u=dr(u),u&&(typeof l=="string"||l!=null&&!Sv(l))&&(l=Un(l),!l&&Do(u))?na(Ii(u),0,A):u.split(l,A)):[]}i(c_,"split"),a(c_,"split");var ZD=Po(function(u,l,A){return u+(A?" ":"")+Dv(l)});function u_(u,l,A){return u=dr(u),A=A==null?0:Ra(Nt(A),0,u.length),l=Un(l),u.slice(A,A+l.length)==l}i(u_,"startsWith"),a(u_,"startsWith");function l_(u,l,A){var L=X.templateSettings;A&&yn(u,l,A)&&(l=r),u=dr(u),l=Oh({},l,L,K1);var W=Oh({},l.imports,L.imports,K1),ee=Wr(W),de=zd(W,ee),be,Ae,Be=0,Le=l.interpolate||Hr,$e="__p += '",Je=i1((l.escape||Hr).source+"|"+Le.source+"|"+(Le===nt?At:Hr).source+"|"+(l.evaluate||Hr).source+"|$","g"),pt="//# sourceURL="+(vr.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bc+"]")+`
|
|
26
|
+
`)}i(x5,"insertWrapDetails"),a(x5,"insertWrapDetails");function T5(u){return Rt(u)||Lo(u)||!!(t3&&u&&u[t3])}i(T5,"isFlattenable"),a(T5,"isFlattenable");function Ss(u,l){var A=typeof u;return l=l??S,!!l&&(A=="number"||A!="symbol"&&rn.test(u))&&u>-1&&u%1==0&&u<l}i(Ss,"isIndex"),a(Ss,"isIndex");function yn(u,l,A){if(!Cr(A))return!1;var L=typeof l;return(L=="number"?Cn(A)&&Ss(l,A.length):L=="string"&&l in A)?Oi(A[l],u):!1}i(yn,"isIterateeCall"),a(yn,"isIterateeCall");function xh(u,l){if(Rt(u))return!1;var A=typeof u;return A=="number"||A=="symbol"||A=="boolean"||u==null||$n(u)?!0:it.test(u)||!ar.test(u)||l!=null&&u in wr(l)}i(xh,"isKey"),a(xh,"isKey");function M5(u){var l=typeof u;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?u!=="__proto__":u===null}i(M5,"isKeyable"),a(M5,"isKeyable");function Th(u){var l=Wl(u),A=X[l];if(typeof A!="function"||!(l in Vt.prototype))return!1;if(u===A)return!0;var L=W1(A);return!!L&&u===L[0]}i(Th,"isLaziable"),a(Th,"isLaziable");function C5(u){return!!Y6&&Y6 in u}i(C5,"isMasked"),a(C5,"isMasked");var Jk=Kd?xs:$h;function Zc(u){var l=u&&u.constructor,A=typeof l=="function"&&l.prototype||Uc;return u===A}i(Zc,"isPrototype"),a(Zc,"isPrototype");function X1(u){return u===u&&!Cr(u)}i(X1,"isStrictComparable"),a(X1,"isStrictComparable");function Q1(u,l){return function(A){return A==null?!1:A[u]===l&&(l!==r||u in wr(A))}}i(Q1,"matchesStrictComparable"),a(Q1,"matchesStrictComparable");function I5(u){var l=ef(u,function(L){return A.size===p&&A.clear(),L}),A=l.cache;return l}i(I5,"memoizeCapped"),a(I5,"memoizeCapped");function k5(u,l){var A=u[1],L=l[1],W=A|L,ee=W<(R|P|I),de=L==I&&A==U||L==I&&A==H&&u[7].length<=l[8]||L==(I|H)&&l[7].length<=l[8]&&A==U;if(!(ee||de))return u;L&R&&(u[2]=l[2],W|=A&R?0:K);var be=l[3];if(be){var Ae=u[3];u[3]=Ae?N1(Ae,be,l[4]):be,u[4]=Ae?ea(u[3],v):l[4]}return be=l[5],be&&(Ae=u[5],u[5]=Ae?P1(Ae,be,l[6]):be,u[6]=Ae?ea(u[5],v):l[6]),be=l[7],be&&(u[7]=be),L&I&&(u[8]=u[8]==null?l[8]:mn(u[8],l[8])),u[9]==null&&(u[9]=l[9]),u[0]=l[0],u[1]=W,u}i(k5,"mergeData"),a(k5,"mergeData");function D5(u){var l=[];if(u!=null)for(var A in wr(u))l.push(A);return l}i(D5,"nativeKeysIn"),a(D5,"nativeKeysIn");function O5(u){return Gd.call(u)}i(O5,"objectToString"),a(O5,"objectToString");function ev(u,l,A){return l=Gr(l===r?u.length-1:l,0),function(){for(var L=arguments,W=-1,ee=Gr(L.length-l,0),de=Ie(ee);++W<ee;)de[W]=L[l+W];W=-1;for(var be=Ie(l+1);++W<l;)be[W]=L[W];return be[l]=A(de),Ln(u,this,be)}}i(ev,"overRest"),a(ev,"overRest");function tv(u,l){return l.length<2?u:Pa(u,ri(l,0,-1))}i(tv,"parent"),a(tv,"parent");function R5(u,l){for(var A=u.length,L=mn(l.length,A),W=Mn(u);L--;){var ee=l[L];u[L]=Ss(ee,A)?W[ee]:r}return u}i(R5,"reorder"),a(R5,"reorder");function Mh(u,l){if(!(l==="constructor"&&typeof u[l]=="function")&&l!="__proto__")return u[l]}i(Mh,"safeGet"),a(Mh,"safeGet");var N5=iv(n5),Jl=Pk||function(u,l){return Lr.setTimeout(u,l)},rv=iv(Gk);function nv(u,l,A){var L=l+"";return rv(u,x5(L,B5(E5(L),A)))}i(nv,"setWrapToString"),a(nv,"setWrapToString");function iv(u){var l=0,A=0;return function(){var L=Uk(),W=w-(L-A);if(A=L,W>0){if(++l>=q)return arguments[0]}else l=0;return u.apply(r,arguments)}}i(iv,"shortOut"),a(iv,"shortOut");function Yl(u,l){var A=-1,L=u.length,W=L-1;for(l=l===r?L:l;++A<l;){var ee=dh(A,W),de=u[ee];u[ee]=u[A],u[A]=de}return u.length=l,u}i(Yl,"shuffleSelf"),a(Yl,"shuffleSelf");var P5=I5(function(u){var l=[];return u.charCodeAt(0)===46&&l.push(""),u.replace(Ye,function(A,L,W,ee){l.push(W?ee.replace(Sn,"$1"):L||A)}),l});function Zi(u){if(typeof u=="string"||$n(u))return u;var l=u+"";return l=="0"&&1/u==-g?"-0":l}i(Zi,"toKey"),a(Zi,"toKey");function La(u){if(u!=null){try{return Vd.call(u)}catch{}try{return u+""}catch{}}return""}i(La,"toSource"),a(La,"toSource");function B5(u,l){return Qn(k,function(A){var L="_."+A[0];l&A[1]&&!Cl(u,L)&&u.push(L)}),u.sort()}i(B5,"updateWrapDetails"),a(B5,"updateWrapDetails");function sv(u){if(u instanceof Vt)return u.clone();var l=new ei(u.__wrapped__,u.__chain__);return l.__actions__=Mn(u.__actions__),l.__index__=u.__index__,l.__values__=u.__values__,l}i(sv,"wrapperClone"),a(sv,"wrapperClone");function L5(u,l,A){(A?yn(u,l,A):l===r)?l=1:l=Gr(Nt(l),0);var L=u==null?0:u.length;if(!L||l<1)return[];for(var W=0,ee=0,de=Ie(Qd(L/l));W<L;)de[ee++]=ri(u,W,W+=l);return de}i(L5,"chunk"),a(L5,"chunk");function F5(u){for(var l=-1,A=u==null?0:u.length,L=0,W=[];++l<A;){var ee=u[l];ee&&(W[L++]=ee)}return W}i(F5,"compact"),a(F5,"compact");function U5(){var u=arguments.length;if(!u)return[];for(var l=Ie(u-1),A=arguments[0],L=u;L--;)l[L-1]=arguments[L];return Qs(Rt(A)?Mn(A):[A],Jr(l,1))}i(U5,"concat4"),a(U5,"concat");var Yk=Ft(function(u,l){return Rr(u)?qc(u,Jr(l,1,Rr,!0)):[]}),Xk=Ft(function(u,l){var A=ni(l);return Rr(A)&&(A=r),Rr(u)?qc(u,Jr(l,1,Rr,!0),wt(A,2)):[]}),Qk=Ft(function(u,l){var A=ni(l);return Rr(A)&&(A=r),Rr(u)?qc(u,Jr(l,1,Rr,!0),r,A):[]});function $5(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),ri(u,l<0?0:l,L)):[]}i($5,"drop"),a($5,"drop");function j5(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),l=L-l,ri(u,0,l<0?0:l)):[]}i(j5,"dropRight"),a(j5,"dropRight");function z5(u,l){return u&&u.length?zl(u,wt(l,3),!0,!0):[]}i(z5,"dropRightWhile"),a(z5,"dropRightWhile");function H5(u,l){return u&&u.length?zl(u,wt(l,3),!0):[]}i(H5,"dropWhile"),a(H5,"dropWhile");function q5(u,l,A,L){var W=u==null?0:u.length;return W?(A&&typeof A!="number"&&yn(u,l,A)&&(A=0,L=W),L3(u,l,A,L)):[]}i(q5,"fill"),a(q5,"fill");function av(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=A==null?0:Nt(A);return W<0&&(W=Gr(L+W,0)),Il(u,wt(l,3),W)}i(av,"findIndex"),a(av,"findIndex");function ov(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=L-1;return A!==r&&(W=Nt(A),W=A<0?Gr(L+W,0):mn(W,L-1)),Il(u,wt(l,3),W,!0)}i(ov,"findLastIndex"),a(ov,"findLastIndex");function cv(u){var l=u==null?0:u.length;return l?Jr(u,1):[]}i(cv,"flatten"),a(cv,"flatten");function K5(u){var l=u==null?0:u.length;return l?Jr(u,g):[]}i(K5,"flattenDeep"),a(K5,"flattenDeep");function V5(u,l){var A=u==null?0:u.length;return A?(l=l===r?1:Nt(l),Jr(u,l)):[]}i(V5,"flattenDepth"),a(V5,"flattenDepth");function G5(u){for(var l=-1,A=u==null?0:u.length,L={};++l<A;){var W=u[l];L[W[0]]=W[1]}return L}i(G5,"fromPairs"),a(G5,"fromPairs");function uv(u){return u&&u.length?u[0]:r}i(uv,"head"),a(uv,"head");function W5(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=A==null?0:Nt(A);return W<0&&(W=Gr(L+W,0)),ko(u,l,W)}i(W5,"indexOf"),a(W5,"indexOf");function Z5(u){var l=u==null?0:u.length;return l?ri(u,0,-1):[]}i(Z5,"initial"),a(Z5,"initial");var eD=Ft(function(u){var l=Tr(u,gh);return l.length&&l[0]===u[0]?oh(l):[]}),tD=Ft(function(u){var l=ni(u),A=Tr(u,gh);return l===ni(A)?l=r:A.pop(),A.length&&A[0]===u[0]?oh(A,wt(l,2)):[]}),rD=Ft(function(u){var l=ni(u),A=Tr(u,gh);return l=typeof l=="function"?l:r,l&&A.pop(),A.length&&A[0]===u[0]?oh(A,r,l):[]});function J5(u,l){return u==null?"":Lk.call(u,l)}i(J5,"join"),a(J5,"join");function ni(u){var l=u==null?0:u.length;return l?u[l-1]:r}i(ni,"last2"),a(ni,"last");function Y5(u,l,A){var L=u==null?0:u.length;if(!L)return-1;var W=L;return A!==r&&(W=Nt(A),W=W<0?Gr(L+W,0):mn(W,L-1)),l===l?G6(u,l,W):Il(u,Jm,W,!0)}i(Y5,"lastIndexOf"),a(Y5,"lastIndexOf");function X5(u,l){return u&&u.length?E1(u,Nt(l)):r}i(X5,"nth"),a(X5,"nth");var nD=Ft(lv);function lv(u,l){return u&&u.length&&l&&l.length?fh(u,l):u}i(lv,"pullAll"),a(lv,"pullAll");function Q5(u,l,A){return u&&u.length&&l&&l.length?fh(u,l,wt(A,2)):u}i(Q5,"pullAllBy"),a(Q5,"pullAllBy");function ew(u,l,A){return u&&u.length&&l&&l.length?fh(u,l,r,A):u}i(ew,"pullAllWith"),a(ew,"pullAllWith");var iD=As(function(u,l){var A=u==null?0:u.length,L=ih(u,l);return x1(u,Tr(l,function(W){return Ss(W,A)?+W:W}).sort(R1)),L});function tw(u,l){var A=[];if(!(u&&u.length))return A;var L=-1,W=[],ee=u.length;for(l=wt(l,3);++L<ee;){var de=u[L];l(de,L,u)&&(A.push(de),W.push(L))}return x1(u,W),A}i(tw,"remove"),a(tw,"remove");function Ch(u){return u==null?u:jk.call(u)}i(Ch,"reverse"),a(Ch,"reverse");function rw(u,l,A){var L=u==null?0:u.length;return L?(A&&typeof A!="number"&&yn(u,l,A)?(l=0,A=L):(l=l==null?0:Nt(l),A=A===r?L:Nt(A)),ri(u,l,A)):[]}i(rw,"slice2"),a(rw,"slice");function nw(u,l){return jl(u,l)}i(nw,"sortedIndex"),a(nw,"sortedIndex");function iw(u,l,A){return ph(u,l,wt(A,2))}i(iw,"sortedIndexBy"),a(iw,"sortedIndexBy");function sw(u,l){var A=u==null?0:u.length;if(A){var L=jl(u,l);if(L<A&&Oi(u[L],l))return L}return-1}i(sw,"sortedIndexOf"),a(sw,"sortedIndexOf");function aw(u,l){return jl(u,l,!0)}i(aw,"sortedLastIndex"),a(aw,"sortedLastIndex");function ow(u,l,A){return ph(u,l,wt(A,2),!0)}i(ow,"sortedLastIndexBy"),a(ow,"sortedLastIndexBy");function cw(u,l){var A=u==null?0:u.length;if(A){var L=jl(u,l,!0)-1;if(Oi(u[L],l))return L}return-1}i(cw,"sortedLastIndexOf"),a(cw,"sortedLastIndexOf");function uw(u){return u&&u.length?T1(u):[]}i(uw,"sortedUniq"),a(uw,"sortedUniq");function lw(u,l){return u&&u.length?T1(u,wt(l,2)):[]}i(lw,"sortedUniqBy"),a(lw,"sortedUniqBy");function fw(u){var l=u==null?0:u.length;return l?ri(u,1,l):[]}i(fw,"tail"),a(fw,"tail");function dw(u,l,A){return u&&u.length?(l=A||l===r?1:Nt(l),ri(u,0,l<0?0:l)):[]}i(dw,"take2"),a(dw,"take");function hw(u,l,A){var L=u==null?0:u.length;return L?(l=A||l===r?1:Nt(l),l=L-l,ri(u,l<0?0:l,L)):[]}i(hw,"takeRight"),a(hw,"takeRight");function pw(u,l){return u&&u.length?zl(u,wt(l,3),!1,!0):[]}i(pw,"takeRightWhile"),a(pw,"takeRightWhile");function mw(u,l){return u&&u.length?zl(u,wt(l,3)):[]}i(mw,"takeWhile"),a(mw,"takeWhile");var sD=Ft(function(u){return ta(Jr(u,1,Rr,!0))}),aD=Ft(function(u){var l=ni(u);return Rr(l)&&(l=r),ta(Jr(u,1,Rr,!0),wt(l,2))}),oD=Ft(function(u){var l=ni(u);return l=typeof l=="function"?l:r,ta(Jr(u,1,Rr,!0),r,l)});function vw(u){return u&&u.length?ta(u):[]}i(vw,"uniq"),a(vw,"uniq");function gw(u,l){return u&&u.length?ta(u,wt(l,2)):[]}i(gw,"uniqBy"),a(gw,"uniqBy");function yw(u,l){return l=typeof l=="function"?l:r,u&&u.length?ta(u,r,l):[]}i(yw,"uniqWith"),a(yw,"uniqWith");function Ih(u){if(!(u&&u.length))return[];var l=0;return u=Xs(u,function(A){if(Rr(A))return l=Gr(A.length,l),!0}),jd(l,function(A){return Tr(u,Fd(A))})}i(Ih,"unzip"),a(Ih,"unzip");function fv(u,l){if(!(u&&u.length))return[];var A=Ih(u);return l==null?A:Tr(A,function(L){return Ln(l,r,L)})}i(fv,"unzipWith"),a(fv,"unzipWith");var cD=Ft(function(u,l){return Rr(u)?qc(u,l):[]}),uD=Ft(function(u){return vh(Xs(u,Rr))}),lD=Ft(function(u){var l=ni(u);return Rr(l)&&(l=r),vh(Xs(u,Rr),wt(l,2))}),fD=Ft(function(u){var l=ni(u);return l=typeof l=="function"?l:r,vh(Xs(u,Rr),r,l)}),dD=Ft(Ih);function bw(u,l){return k1(u||[],l||[],Hc)}i(bw,"zipObject"),a(bw,"zipObject");function ww(u,l){return k1(u||[],l||[],Gc)}i(ww,"zipObjectDeep"),a(ww,"zipObjectDeep");var hD=Ft(function(u){var l=u.length,A=l>1?u[l-1]:r;return A=typeof A=="function"?(u.pop(),A):r,fv(u,A)});function dv(u){var l=X(u);return l.__chain__=!0,l}i(dv,"chain"),a(dv,"chain");function _w(u,l){return l(u),u}i(_w,"tap"),a(_w,"tap");function Xl(u,l){return l(u)}i(Xl,"thru"),a(Xl,"thru");var pD=As(function(u){var l=u.length,A=l?u[0]:0,L=this.__wrapped__,W=a(function(ee){return ih(ee,u)},"interceptor");return l>1||this.__actions__.length||!(L instanceof Vt)||!Ss(A)?this.thru(W):(L=L.slice(A,+A+(l?1:0)),L.__actions__.push({func:Xl,args:[W],thisArg:r}),new ei(L,this.__chain__).thru(function(ee){return l&&!ee.length&&ee.push(r),ee}))});function Ew(){return dv(this)}i(Ew,"wrapperChain"),a(Ew,"wrapperChain");function Aw(){return new ei(this.value(),this.__chain__)}i(Aw,"wrapperCommit"),a(Aw,"wrapperCommit");function Sw(){this.__values__===r&&(this.__values__=xv(this.value()));var u=this.__index__>=this.__values__.length,l=u?r:this.__values__[this.__index__++];return{done:u,value:l}}i(Sw,"wrapperNext"),a(Sw,"wrapperNext");function xw(){return this}i(xw,"wrapperToIterator"),a(xw,"wrapperToIterator");function Tw(u){for(var l,A=this;A instanceof Bl;){var L=sv(A);L.__index__=0,L.__values__=r,l?W.__wrapped__=L:l=L;var W=L;A=A.__wrapped__}return W.__wrapped__=u,l}i(Tw,"wrapperPlant"),a(Tw,"wrapperPlant");function Mw(){var u=this.__wrapped__;if(u instanceof Vt){var l=u;return this.__actions__.length&&(l=new Vt(this)),l=l.reverse(),l.__actions__.push({func:Xl,args:[Ch],thisArg:r}),new ei(l,this.__chain__)}return this.thru(Ch)}i(Mw,"wrapperReverse"),a(Mw,"wrapperReverse");function Cw(){return I1(this.__wrapped__,this.__actions__)}i(Cw,"wrapperValue"),a(Cw,"wrapperValue");var mD=Hl(function(u,l,A){vr.call(u,A)?++u[A]:_s(u,A,1)});function Iw(u,l,A){var L=Rt(u)?Wm:B3;return A&&yn(u,l,A)&&(l=r),L(u,wt(l,3))}i(Iw,"every"),a(Iw,"every");function kw(u,l){var A=Rt(u)?Xs:h1;return A(u,wt(l,3))}i(kw,"filter2"),a(kw,"filter");var vD=U1(av),gD=U1(ov);function Dw(u,l){return Jr(Ql(u,l),1)}i(Dw,"flatMap"),a(Dw,"flatMap");function Ow(u,l){return Jr(Ql(u,l),g)}i(Ow,"flatMapDeep"),a(Ow,"flatMapDeep");function Rw(u,l,A){return A=A===r?1:Nt(A),Jr(Ql(u,l),A)}i(Rw,"flatMapDepth"),a(Rw,"flatMapDepth");function hv(u,l){var A=Rt(u)?Qn:Na;return A(u,wt(l,3))}i(hv,"forEach"),a(hv,"forEach");function pv(u,l){var A=Rt(u)?R6:P3;return A(u,wt(l,3))}i(pv,"forEachRight"),a(pv,"forEachRight");var yD=Hl(function(u,l,A){vr.call(u,A)?u[A].push(l):_s(u,A,[l])});function Nw(u,l,A,L){u=Cn(u)?u:Fo(u),A=A&&!L?Nt(A):0;var W=u.length;return A<0&&(A=Gr(W+A,0)),nf(u)?A<=W&&u.indexOf(l,A)>-1:!!W&&ko(u,l,A)>-1}i(Nw,"includes"),a(Nw,"includes");var bD=Ft(function(u,l,A){var L=-1,W=typeof l=="function",ee=Cn(u)?Ie(u.length):[];return Na(u,function(de){ee[++L]=W?Ln(l,de,A):Kc(de,l,A)}),ee}),wD=Hl(function(u,l,A){_s(u,A,l)});function Ql(u,l){var A=Rt(u)?Tr:b1;return A(u,wt(l,3))}i(Ql,"map2"),a(Ql,"map");function Pw(u,l,A,L){return u==null?[]:(Rt(l)||(l=l==null?[]:[l]),A=L?r:A,Rt(A)||(A=A==null?[]:[A]),A1(u,l,A))}i(Pw,"orderBy"),a(Pw,"orderBy");var _D=Hl(function(u,l,A){u[A?0:1].push(l)},function(){return[[],[]]});function Bw(u,l,A){var L=Rt(u)?Bd:Xm,W=arguments.length<3;return L(u,wt(l,4),A,W,Na)}i(Bw,"reduce"),a(Bw,"reduce");function Lw(u,l,A){var L=Rt(u)?N6:Xm,W=arguments.length<3;return L(u,wt(l,4),A,W,P3)}i(Lw,"reduceRight"),a(Lw,"reduceRight");function Fw(u,l){var A=Rt(u)?Xs:h1;return A(u,tf(wt(l,3)))}i(Fw,"reject"),a(Fw,"reject");function Uw(u){var l=Rt(u)?u1:t5;return l(u)}i(Uw,"sample"),a(Uw,"sample");function $w(u,l,A){(A?yn(u,l,A):l===r)?l=1:l=Nt(l);var L=Rt(u)?k3:r5;return L(u,l)}i($w,"sampleSize"),a($w,"sampleSize");function jw(u){var l=Rt(u)?D3:i5;return l(u)}i(jw,"shuffle"),a(jw,"shuffle");function zw(u){if(u==null)return 0;if(Cn(u))return nf(u)?Oo(u):u.length;var l=gn(u);return l==ge||l==Q?u.size:uh(u).length}i(zw,"size"),a(zw,"size");function Hw(u,l,A){var L=Rt(u)?Ld:s5;return A&&yn(u,l,A)&&(l=r),L(u,wt(l,3))}i(Hw,"some"),a(Hw,"some");var ED=Ft(function(u,l){if(u==null)return[];var A=l.length;return A>1&&yn(u,l[0],l[1])?l=[]:A>2&&yn(l[0],l[1],l[2])&&(l=[l[0]]),A1(u,Jr(l,1),[])}),kh=Nk||function(){return Lr.Date.now()};function qw(u,l){if(typeof l!="function")throw new ki(c);return u=Nt(u),function(){if(--u<1)return l.apply(this,arguments)}}i(qw,"after"),a(qw,"after");function mv(u,l,A){return l=A?r:l,l=u&&l==null?u.length:l,Es(u,I,r,r,r,r,l)}i(mv,"ary"),a(mv,"ary");function vv(u,l){var A;if(typeof l!="function")throw new ki(c);return u=Nt(u),function(){return--u>0&&(A=l.apply(this,arguments)),u<=1&&(l=r),A}}i(vv,"before"),a(vv,"before");var gv=Ft(function(u,l,A){var L=R;if(A.length){var W=ea(A,Bo(gv));L|=V}return Es(u,L,l,A,W)}),Kw=Ft(function(u,l,A){var L=R|P;if(A.length){var W=ea(A,Bo(Kw));L|=V}return Es(l,L,u,A,W)});function yv(u,l,A){l=A?r:l;var L=Es(u,U,r,r,r,r,r,l);return L.placeholder=yv.placeholder,L}i(yv,"curry"),a(yv,"curry");function bv(u,l,A){l=A?r:l;var L=Es(u,j,r,r,r,r,r,l);return L.placeholder=bv.placeholder,L}i(bv,"curryRight"),a(bv,"curryRight");function wv(u,l,A){var L,W,ee,de,be,Ae,Be=0,Le=!1,$e=!1,Je=!0;if(typeof u!="function")throw new ki(c);l=ii(l)||0,Cr(A)&&(Le=!!A.leading,$e="maxWait"in A,ee=$e?Gr(ii(A.maxWait)||0,l):ee,Je="trailing"in A?!!A.trailing:Je);function pt(Fr){var Ji=L,ia=W;return L=W=r,Be=Fr,de=u.apply(ia,Ji),de}i(pt,"invokeFunc"),a(pt,"invokeFunc");function St(Fr){return Be=Fr,be=Jl(Ht,l),Le?pt(Fr):de}i(St,"leadingEdge"),a(St,"leadingEdge");function Lt(Fr){var Ji=Fr-Ae,ia=Fr-Be,j_=l-Ji;return $e?mn(j_,ee-ia):j_}i(Lt,"remainingWait"),a(Lt,"remainingWait");function _t(Fr){var Ji=Fr-Ae,ia=Fr-Be;return Ae===r||Ji>=l||Ji<0||$e&&ia>=ee}i(_t,"shouldInvoke"),a(_t,"shouldInvoke");function Ht(){var Fr=kh();if(_t(Fr))return Gt(Fr);be=Jl(Ht,Lt(Fr))}i(Ht,"timerExpired"),a(Ht,"timerExpired");function Gt(Fr){return be=r,Je&&L?pt(Fr):(L=W=r,de)}i(Gt,"trailingEdge"),a(Gt,"trailingEdge");function jn(){be!==r&&a5(be),Be=0,L=Ae=W=be=r}i(jn,"cancel"),a(jn,"cancel");function bn(){return be===r?de:Gt(kh())}i(bn,"flush"),a(bn,"flush");function zn(){var Fr=kh(),Ji=_t(Fr);if(L=arguments,W=this,Ae=Fr,Ji){if(be===r)return St(Ae);if($e)return a5(be),be=Jl(Ht,l),pt(Ae)}return be===r&&(be=Jl(Ht,l)),de}return i(zn,"debounced"),a(zn,"debounced"),zn.cancel=jn,zn.flush=bn,zn}i(wv,"debounce"),a(wv,"debounce");var AD=Ft(function(u,l){return d1(u,1,l)}),SD=Ft(function(u,l,A){return d1(u,ii(l)||0,A)});function Vw(u){return Es(u,se)}i(Vw,"flip"),a(Vw,"flip");function ef(u,l){if(typeof u!="function"||l!=null&&typeof l!="function")throw new ki(c);var A=a(function(){var L=arguments,W=l?l.apply(this,L):L[0],ee=A.cache;if(ee.has(W))return ee.get(W);var de=u.apply(this,L);return A.cache=ee.set(W,de)||ee,de},"memoized");return A.cache=new(ef.Cache||ws),A}i(ef,"memoize"),a(ef,"memoize"),ef.Cache=ws;function tf(u){if(typeof u!="function")throw new ki(c);return function(){var l=arguments;switch(l.length){case 0:return!u.call(this);case 1:return!u.call(this,l[0]);case 2:return!u.call(this,l[0],l[1]);case 3:return!u.call(this,l[0],l[1],l[2])}return!u.apply(this,l)}}i(tf,"negate"),a(tf,"negate");function Gw(u){return vv(2,u)}i(Gw,"once"),a(Gw,"once");var xD=Wk(function(u,l){l=l.length==1&&Rt(l[0])?Tr(l[0],Fn(wt())):Tr(Jr(l,1),Fn(wt()));var A=l.length;return Ft(function(L){for(var W=-1,ee=mn(L.length,A);++W<ee;)L[W]=l[W].call(this,L[W]);return Ln(u,this,L)})}),_v=Ft(function(u,l){var A=ea(l,Bo(_v));return Es(u,V,r,l,A)}),Ww=Ft(function(u,l){var A=ea(l,Bo(Ww));return Es(u,G,r,l,A)}),TD=As(function(u,l){return Es(u,H,r,r,r,l)});function Zw(u,l){if(typeof u!="function")throw new ki(c);return l=l===r?l:Nt(l),Ft(u,l)}i(Zw,"rest"),a(Zw,"rest");function Jw(u,l){if(typeof u!="function")throw new ki(c);return l=l==null?0:Gr(Nt(l),0),Ft(function(A){var L=A[l],W=na(A,0,l);return L&&Qs(W,L),Ln(u,this,W)})}i(Jw,"spread"),a(Jw,"spread");function Yw(u,l,A){var L=!0,W=!0;if(typeof u!="function")throw new ki(c);return Cr(A)&&(L="leading"in A?!!A.leading:L,W="trailing"in A?!!A.trailing:W),wv(u,l,{leading:L,maxWait:l,trailing:W})}i(Yw,"throttle2"),a(Yw,"throttle");function Xw(u){return mv(u,1)}i(Xw,"unary"),a(Xw,"unary");function Qw(u,l){return _v(yh(l),u)}i(Qw,"wrap"),a(Qw,"wrap");function e4(){if(!arguments.length)return[];var u=arguments[0];return Rt(u)?u:[u]}i(e4,"castArray"),a(e4,"castArray");function t4(u){return ti(u,_)}i(t4,"clone"),a(t4,"clone");function r4(u,l){return l=typeof l=="function"?l:r,ti(u,_,l)}i(r4,"cloneWith"),a(r4,"cloneWith");function n4(u){return ti(u,b|_)}i(n4,"cloneDeep6"),a(n4,"cloneDeep");function i4(u,l){return l=typeof l=="function"?l:r,ti(u,b|_,l)}i(i4,"cloneDeepWith"),a(i4,"cloneDeepWith");function s4(u,l){return l==null||f1(u,l,Wr(l))}i(s4,"conformsTo"),a(s4,"conformsTo");function Oi(u,l){return u===l||u!==u&&l!==l}i(Oi,"eq4"),a(Oi,"eq");var MD=Gl(ah),CD=Gl(function(u,l){return u>=l}),Lo=v1(function(){return arguments}())?v1:function(u){return kr(u)&&vr.call(u,"callee")&&!e3.call(u,"callee")},Rt=Ie.isArray,ID=Io?Fn(Io):H3;function Cn(u){return u!=null&&rf(u.length)&&!xs(u)}i(Cn,"isArrayLike2"),a(Cn,"isArrayLike");function Rr(u){return kr(u)&&Cn(u)}i(Rr,"isArrayLikeObject"),a(Rr,"isArrayLikeObject");function a4(u){return u===!0||u===!1||kr(u)&&vn(u)==Y}i(a4,"isBoolean"),a(a4,"isBoolean");var Fa=Bk||$h,kD=M6?Fn(M6):q3;function o4(u){return kr(u)&&u.nodeType===1&&!Jc(u)}i(o4,"isElement"),a(o4,"isElement");function c4(u){if(u==null)return!0;if(Cn(u)&&(Rt(u)||typeof u=="string"||typeof u.splice=="function"||Fa(u)||Yc(u)||Lo(u)))return!u.length;var l=gn(u);if(l==ge||l==Q)return!u.size;if(Zc(u))return!uh(u).length;for(var A in u)if(vr.call(u,A))return!1;return!0}i(c4,"isEmpty"),a(c4,"isEmpty");function u4(u,l){return Vc(u,l)}i(u4,"isEqual"),a(u4,"isEqual");function l4(u,l,A){A=typeof A=="function"?A:r;var L=A?A(u,l):r;return L===r?Vc(u,l,r,A):!!L}i(l4,"isEqualWith"),a(l4,"isEqualWith");function Dh(u){if(!kr(u))return!1;var l=vn(u);return l==z||l==M||typeof u.message=="string"&&typeof u.name=="string"&&!Jc(u)}i(Dh,"isError"),a(Dh,"isError");function f4(u){return typeof u=="number"&&r3(u)}i(f4,"isFinite2"),a(f4,"isFinite");function xs(u){if(!Cr(u))return!1;var l=vn(u);return l==re||l==oe||l==N||l==pe}i(xs,"isFunction2"),a(xs,"isFunction");function Ev(u){return typeof u=="number"&&u==Nt(u)}i(Ev,"isInteger3"),a(Ev,"isInteger");function rf(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=S}i(rf,"isLength"),a(rf,"isLength");function Cr(u){var l=typeof u;return u!=null&&(l=="object"||l=="function")}i(Cr,"isObject"),a(Cr,"isObject");function kr(u){return u!=null&&typeof u=="object"}i(kr,"isObjectLike"),a(kr,"isObjectLike");var d4=C6?Fn(C6):V3;function h4(u,l){return u===l||ch(u,l,Sh(l))}i(h4,"isMatch"),a(h4,"isMatch");function p4(u,l,A){return A=typeof A=="function"?A:r,ch(u,l,Sh(l),A)}i(p4,"isMatchWith"),a(p4,"isMatchWith");function m4(u){return Av(u)&&u!=+u}i(m4,"isNaN2"),a(m4,"isNaN");function v4(u){if(Jk(u))throw new It(o);return g1(u)}i(v4,"isNative"),a(v4,"isNative");function g4(u){return u===null}i(g4,"isNull"),a(g4,"isNull");function y4(u){return u==null}i(y4,"isNil"),a(y4,"isNil");function Av(u){return typeof u=="number"||kr(u)&&vn(u)==ke}i(Av,"isNumber"),a(Av,"isNumber");function Jc(u){if(!kr(u)||vn(u)!=fe)return!1;var l=Jd(u);if(l===null)return!0;var A=vr.call(l,"constructor")&&l.constructor;return typeof A=="function"&&A instanceof A&&Vd.call(A)==kk}i(Jc,"isPlainObject"),a(Jc,"isPlainObject");var Sv=I6?Fn(I6):G3;function b4(u){return Ev(u)&&u>=-S&&u<=S}i(b4,"isSafeInteger"),a(b4,"isSafeInteger");var w4=k6?Fn(k6):W3;function nf(u){return typeof u=="string"||!Rt(u)&&kr(u)&&vn(u)==ve}i(nf,"isString"),a(nf,"isString");function $n(u){return typeof u=="symbol"||kr(u)&&vn(u)==Me}i($n,"isSymbol"),a($n,"isSymbol");var Yc=D6?Fn(D6):Z3;function _4(u){return u===r}i(_4,"isUndefined"),a(_4,"isUndefined");function E4(u){return kr(u)&&gn(u)==Re}i(E4,"isWeakMap"),a(E4,"isWeakMap");function A4(u){return kr(u)&&vn(u)==je}i(A4,"isWeakSet"),a(A4,"isWeakSet");var DD=Gl(lh),OD=Gl(function(u,l){return u<=l});function xv(u){if(!u)return[];if(Cn(u))return nf(u)?Ii(u):Mn(u);if(Dl&&u[Dl])return q6(u[Dl]());var l=gn(u),A=l==ge?Hd:l==Q?kl:Fo;return A(u)}i(xv,"toArray"),a(xv,"toArray");function Ts(u){if(!u)return u===0?u:0;if(u=ii(u),u===g||u===-g){var l=u<0?-1:1;return l*D}return u===u?u:0}i(Ts,"toFinite"),a(Ts,"toFinite");function Nt(u){var l=Ts(u),A=l%1;return l===l?A?l-A:l:0}i(Nt,"toInteger"),a(Nt,"toInteger");function Tv(u){return u?Ra(Nt(u),0,E):0}i(Tv,"toLength"),a(Tv,"toLength");function ii(u){if(typeof u=="number")return u;if($n(u))return C;if(Cr(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=Cr(l)?l+"":l}if(typeof u!="string")return u===0?u:+u;u=Qm(u);var A=er.test(u);return A||tn.test(u)?sn(u.slice(2),A?2:8):fn.test(u)?C:+u}i(ii,"toNumber"),a(ii,"toNumber");function Mv(u){return Wi(u,In(u))}i(Mv,"toPlainObject"),a(Mv,"toPlainObject");function S4(u){return u?Ra(Nt(u),-S,S):u===0?u:0}i(S4,"toSafeInteger"),a(S4,"toSafeInteger");function dr(u){return u==null?"":Un(u)}i(dr,"toString4"),a(dr,"toString");var RD=No(function(u,l){if(Zc(l)||Cn(l)){Wi(l,Wr(l),u);return}for(var A in l)vr.call(l,A)&&Hc(u,A,l[A])}),x4=No(function(u,l){Wi(l,In(l),u)}),Oh=No(function(u,l,A,L){Wi(l,In(l),u,L)}),ND=No(function(u,l,A,L){Wi(l,Wr(l),u,L)}),PD=As(ih);function T4(u,l){var A=zc(u);return l==null?A:l1(A,l)}i(T4,"create2"),a(T4,"create");var BD=Ft(function(u,l){u=wr(u);var A=-1,L=l.length,W=L>2?l[2]:r;for(W&&yn(l[0],l[1],W)&&(L=1);++A<L;)for(var ee=l[A],de=In(ee),be=-1,Ae=de.length;++be<Ae;){var Be=de[be],Le=u[Be];(Le===r||Oi(Le,Uc[Be])&&!vr.call(u,Be))&&(u[Be]=ee[Be])}return u}),LD=Ft(function(u){return u.push(r,V1),Ln(F4,r,u)});function M4(u,l){return Zm(u,wt(l,3),Gi)}i(M4,"findKey"),a(M4,"findKey");function C4(u,l){return Zm(u,wt(l,3),sh)}i(C4,"findLastKey"),a(C4,"findLastKey");function I4(u,l){return u==null?u:p1(u,wt(l,3),In)}i(I4,"forIn"),a(I4,"forIn");function k4(u,l){return u==null?u:F3(u,wt(l,3),In)}i(k4,"forInRight"),a(k4,"forInRight");function D4(u,l){return u&&Gi(u,wt(l,3))}i(D4,"forOwn"),a(D4,"forOwn");function O4(u,l){return u&&sh(u,wt(l,3))}i(O4,"forOwnRight"),a(O4,"forOwnRight");function R4(u){return u==null?[]:Ul(u,Wr(u))}i(R4,"functions"),a(R4,"functions");function N4(u){return u==null?[]:Ul(u,In(u))}i(N4,"functionsIn"),a(N4,"functionsIn");function Rh(u,l,A){var L=u==null?r:Pa(u,l);return L===r?A:L}i(Rh,"get2"),a(Rh,"get");function P4(u,l){return u!=null&&J1(u,l,U3)}i(P4,"has"),a(P4,"has");function Nh(u,l){return u!=null&&J1(u,l,$3)}i(Nh,"hasIn"),a(Nh,"hasIn");var FD=j1(function(u,l,A){l!=null&&typeof l.toString!="function"&&(l=Gd.call(l)),u[l]=A},Ph(kn)),UD=j1(function(u,l,A){l!=null&&typeof l.toString!="function"&&(l=Gd.call(l)),vr.call(u,l)?u[l].push(A):u[l]=[A]},wt),$D=Ft(Kc);function Wr(u){return Cn(u)?c1(u):uh(u)}i(Wr,"keys"),a(Wr,"keys");function In(u){return Cn(u)?c1(u,!0):J3(u)}i(In,"keysIn"),a(In,"keysIn");function B4(u,l){var A={};return l=wt(l,3),Gi(u,function(L,W,ee){_s(A,l(L,W,ee),L)}),A}i(B4,"mapKeys"),a(B4,"mapKeys");function L4(u,l){var A={};return l=wt(l,3),Gi(u,function(L,W,ee){_s(A,W,l(L,W,ee))}),A}i(L4,"mapValues"),a(L4,"mapValues");var jD=No(function(u,l,A){$l(u,l,A)}),F4=No(function(u,l,A,L){$l(u,l,A,L)}),zD=As(function(u,l){var A={};if(u==null)return A;var L=!1;l=Tr(l,function(ee){return ee=ra(ee,u),L||(L=ee.length>1),ee}),Wi(u,Ah(u),A),L&&(A=ti(A,b|y|_,v5));for(var W=l.length;W--;)mh(A,l[W]);return A});function U4(u,l){return Cv(u,tf(wt(l)))}i(U4,"omitBy"),a(U4,"omitBy");var HD=As(function(u,l){return u==null?{}:X3(u,l)});function Cv(u,l){if(u==null)return{};var A=Tr(Ah(u),function(L){return[L]});return l=wt(l),S1(u,A,function(L,W){return l(L,W[0])})}i(Cv,"pickBy"),a(Cv,"pickBy");function $4(u,l,A){l=ra(l,u);var L=-1,W=l.length;for(W||(W=1,u=r);++L<W;){var ee=u==null?r:u[Zi(l[L])];ee===r&&(L=W,ee=A),u=xs(ee)?ee.call(u):ee}return u}i($4,"result"),a($4,"result");function j4(u,l,A){return u==null?u:Gc(u,l,A)}i(j4,"set"),a(j4,"set");function z4(u,l,A,L){return L=typeof L=="function"?L:r,u==null?u:Gc(u,l,A,L)}i(z4,"setWith"),a(z4,"setWith");var H4=q1(Wr),q4=q1(In);function K4(u,l,A){var L=Rt(u),W=L||Fa(u)||Yc(u);if(l=wt(l,4),A==null){var ee=u&&u.constructor;W?A=L?new ee:[]:Cr(u)?A=xs(ee)?zc(Jd(u)):{}:A={}}return(W?Qn:Gi)(u,function(de,be,Ae){return l(A,de,be,Ae)}),A}i(K4,"transform"),a(K4,"transform");function V4(u,l){return u==null?!0:mh(u,l)}i(V4,"unset"),a(V4,"unset");function G4(u,l,A){return u==null?u:C1(u,l,yh(A))}i(G4,"update2"),a(G4,"update");function W4(u,l,A,L){return L=typeof L=="function"?L:r,u==null?u:C1(u,l,yh(A),L)}i(W4,"updateWith"),a(W4,"updateWith");function Fo(u){return u==null?[]:zd(u,Wr(u))}i(Fo,"values"),a(Fo,"values");function Z4(u){return u==null?[]:zd(u,In(u))}i(Z4,"valuesIn"),a(Z4,"valuesIn");function J4(u,l,A){return A===r&&(A=l,l=r),A!==r&&(A=ii(A),A=A===A?A:0),l!==r&&(l=ii(l),l=l===l?l:0),Ra(ii(u),l,A)}i(J4,"clamp"),a(J4,"clamp");function Y4(u,l,A){return l=Ts(l),A===r?(A=l,l=0):A=Ts(A),u=ii(u),j3(u,l,A)}i(Y4,"inRange"),a(Y4,"inRange");function X4(u,l,A){if(A&&typeof A!="boolean"&&yn(u,l,A)&&(l=A=r),A===r&&(typeof l=="boolean"?(A=l,l=r):typeof u=="boolean"&&(A=u,u=r)),u===r&&l===r?(u=0,l=1):(u=Ts(u),l===r?(l=u,u=0):l=Ts(l)),u>l){var L=u;u=l,l=L}if(A||u%1||l%1){var W=n3();return mn(u+W*(l-u+qr("1e-"+((W+"").length-1))),l)}return dh(u,l)}i(X4,"random"),a(X4,"random");var qD=Po(function(u,l,A){return l=l.toLowerCase(),u+(A?Iv(l):l)});function Iv(u){return Dv(dr(u).toLowerCase())}i(Iv,"capitalize"),a(Iv,"capitalize");function kv(u){return u=dr(u),u&&u.replace(Or,Ak).replace(Od,"")}i(kv,"deburr"),a(kv,"deburr");function Q4(u,l,A){u=dr(u),l=Un(l);var L=u.length;A=A===r?L:Ra(Nt(A),0,L);var W=A;return A-=l.length,A>=0&&u.slice(A,W)==l}i(Q4,"endsWith"),a(Q4,"endsWith");function e_(u){return u=dr(u),u&&ut.test(u)?u.replace(Dr,Sk):u}i(e_,"escape"),a(e_,"escape");function t_(u){return u=dr(u),u&&st.test(u)?u.replace(Qt,"\\$&"):u}i(t_,"escapeRegExp"),a(t_,"escapeRegExp");var KD=Po(function(u,l,A){return u+(A?"-":"")+l.toLowerCase()}),VD=Po(function(u,l,A){return u+(A?" ":"")+l.toLowerCase()}),GD=F1("toLowerCase");function r_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;if(!l||L>=l)return u;var W=(l-L)/2;return Vl(eh(W),A)+u+Vl(Qd(W),A)}i(r_,"pad2"),a(r_,"pad");function n_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;return l&&L<l?u+Vl(l-L,A):u}i(n_,"padEnd"),a(n_,"padEnd");function i_(u,l,A){u=dr(u),l=Nt(l);var L=l?Oo(u):0;return l&&L<l?Vl(l-L,A)+u:u}i(i_,"padStart"),a(i_,"padStart");function s_(u,l,A){return A||l==null?l=0:l&&(l=+l),$k(dr(u).replace(Qe,""),l||0)}i(s_,"parseInt2"),a(s_,"parseInt");function a_(u,l,A){return(A?yn(u,l,A):l===r)?l=1:l=Nt(l),hh(dr(u),l)}i(a_,"repeat"),a(a_,"repeat");function o_(){var u=arguments,l=dr(u[0]);return u.length<3?l:l.replace(u[1],u[2])}i(o_,"replace"),a(o_,"replace");var WD=Po(function(u,l,A){return u+(A?"_":"")+l.toLowerCase()});function c_(u,l,A){return A&&typeof A!="number"&&yn(u,l,A)&&(l=A=r),A=A===r?E:A>>>0,A?(u=dr(u),u&&(typeof l=="string"||l!=null&&!Sv(l))&&(l=Un(l),!l&&Do(u))?na(Ii(u),0,A):u.split(l,A)):[]}i(c_,"split"),a(c_,"split");var ZD=Po(function(u,l,A){return u+(A?" ":"")+Dv(l)});function u_(u,l,A){return u=dr(u),A=A==null?0:Ra(Nt(A),0,u.length),l=Un(l),u.slice(A,A+l.length)==l}i(u_,"startsWith"),a(u_,"startsWith");function l_(u,l,A){var L=X.templateSettings;A&&yn(u,l,A)&&(l=r),u=dr(u),l=Oh({},l,L,K1);var W=Oh({},l.imports,L.imports,K1),ee=Wr(W),de=zd(W,ee),be,Ae,Be=0,Le=l.interpolate||Hr,$e="__p += '",Je=i1((l.escape||Hr).source+"|"+Le.source+"|"+(Le===nt?At:Hr).source+"|"+(l.evaluate||Hr).source+"|$","g"),pt="//# sourceURL="+(vr.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bc+"]")+`
|
|
27
27
|
`;u.replace(Je,function(_t,Ht,Gt,jn,bn,zn){return Gt||(Gt=jn),$e+=u.slice(Be,zn).replace(nn,j6),Ht&&(be=!0,$e+=`' +
|
|
28
28
|
__e(`+Ht+`) +
|
|
29
29
|
'`),bn&&(Ae=!0,$e+=`';
|
|
@@ -54,7 +54,7 @@ if (cid) {
|
|
|
54
54
|
// Make sure to use cid instead of value
|
|
55
55
|
doSomethingWithCID(cid)
|
|
56
56
|
}
|
|
57
|
-
`}}),zS=pr({"../../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/index.js"(){js(),r2(),Tc(),LS(),Ju()}}),k0,MU,HS=pr({"../../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js"(){vU(),gU(),yU(),bU(),wU(),wS(),fd(),e2(),t2(),_U(),om(),jS(),AU(),TU(),zS(),k0={...eS,...rS,...iS,...aS,...cS,...fS,..._S,...AS,...xS,...IS},MU={...FS,...$S}}});function Uy(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}i(Uy,"createCodec");var $y,c0,cA,i2,qS=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js"(){HS(),Qb(),a(Uy,"createCodec"),$y=Uy("utf8","u",e=>{let t=new TextDecoder("utf8");return"u"+t.decode(e)},e=>new TextEncoder().encode(e.substring(1))),c0=Uy("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=Xb(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),cA={utf8:$y,"utf-8":$y,hex:k0.base16,latin1:c0,ascii:c0,binary:c0,...k0},i2=cA}}),KS={};Sr(KS,{fromString:()=>br});function br(e,t="utf8"){let r=i2[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?sm(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}i(br,"fromString2");var um=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js"(){qS(),am(),a(br,"fromString")}}),VS={};Sr(VS,{toString:()=>Mr});function Mr(e,t="utf8"){let r=i2[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}i(Mr,"toString2");var dd=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/to-string.js"(){qS(),a(Mr,"toString")}}),CU=ze({"../../../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(f,h){var p=f>>>16&65535,v=f&65535,b=h>>>16&65535,y=h&65535;return v*y+(p*y+v*b<<16>>>0)|0}i(t,"imulShim"),a(t,"imulShim"),e.mul=Math.imul||t;function r(f,h){return f+h|0}i(r,"add3"),a(r,"add"),e.add=r;function n(f,h){return f-h|0}i(n,"sub"),a(n,"sub"),e.sub=n;function s(f,h){return f<<h|f>>>32-h}i(s,"rotl"),a(s,"rotl"),e.rotl=s;function o(f,h){return f<<32-h|f>>>h}i(o,"rotr"),a(o,"rotr"),e.rotr=o;function c(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f}i(c,"isIntegerShim"),a(c,"isIntegerShim"),e.isInteger=Number.isInteger||c,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(f){return e.isInteger(f)&&f>=-e.MAX_SAFE_INTEGER&&f<=e.MAX_SAFE_INTEGER}}}),Xu=ze({"../../../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=CU();function r(d,g){return g===void 0&&(g=0),(d[g+0]<<8|d[g+1])<<16>>16}i(r,"readInt16BE"),a(r,"readInt16BE"),e.readInt16BE=r;function n(d,g){return g===void 0&&(g=0),(d[g+0]<<8|d[g+1])>>>0}i(n,"readUint16BE"),a(n,"readUint16BE"),e.readUint16BE=n;function s(d,g){return g===void 0&&(g=0),(d[g+1]<<8|d[g])<<16>>16}i(s,"readInt16LE"),a(s,"readInt16LE"),e.readInt16LE=s;function o(d,g){return g===void 0&&(g=0),(d[g+1]<<8|d[g])>>>0}i(o,"readUint16LE"),a(o,"readUint16LE"),e.readUint16LE=o;function c(d,g,S){return g===void 0&&(g=new Uint8Array(2)),S===void 0&&(S=0),g[S+0]=d>>>8,g[S+1]=d>>>0,g}i(c,"writeUint16BE"),a(c,"writeUint16BE"),e.writeUint16BE=c,e.writeInt16BE=c;function f(d,g,S){return g===void 0&&(g=new Uint8Array(2)),S===void 0&&(S=0),g[S+0]=d>>>0,g[S+1]=d>>>8,g}i(f,"writeUint16LE"),a(f,"writeUint16LE"),e.writeUint16LE=f,e.writeInt16LE=f;function h(d,g){return g===void 0&&(g=0),d[g]<<24|d[g+1]<<16|d[g+2]<<8|d[g+3]}i(h,"readInt32BE"),a(h,"readInt32BE"),e.readInt32BE=h;function p(d,g){return g===void 0&&(g=0),(d[g]<<24|d[g+1]<<16|d[g+2]<<8|d[g+3])>>>0}i(p,"readUint32BE"),a(p,"readUint32BE"),e.readUint32BE=p;function v(d,g){return g===void 0&&(g=0),d[g+3]<<24|d[g+2]<<16|d[g+1]<<8|d[g]}i(v,"readInt32LE"),a(v,"readInt32LE"),e.readInt32LE=v;function b(d,g){return g===void 0&&(g=0),(d[g+3]<<24|d[g+2]<<16|d[g+1]<<8|d[g])>>>0}i(b,"readUint32LE"),a(b,"readUint32LE"),e.readUint32LE=b;function y(d,g,S){return g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0),g[S+0]=d>>>24,g[S+1]=d>>>16,g[S+2]=d>>>8,g[S+3]=d>>>0,g}i(y,"writeUint32BE2"),a(y,"writeUint32BE"),e.writeUint32BE=y,e.writeInt32BE=y;function _(d,g,S){return g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0),g[S+0]=d>>>0,g[S+1]=d>>>8,g[S+2]=d>>>16,g[S+3]=d>>>24,g}i(_,"writeUint32LE"),a(_,"writeUint32LE"),e.writeUint32LE=_,e.writeInt32LE=_;function T(d,g){g===void 0&&(g=0);var S=h(d,g),D=h(d,g+4);return S*4294967296+D-(D>>31)*4294967296}i(T,"readInt64BE"),a(T,"readInt64BE"),e.readInt64BE=T;function O(d,g){g===void 0&&(g=0);var S=p(d,g),D=p(d,g+4);return S*4294967296+D}i(O,"readUint64BE"),a(O,"readUint64BE"),e.readUint64BE=O;function R(d,g){g===void 0&&(g=0);var S=v(d,g),D=v(d,g+4);return D*4294967296+S-(S>>31)*4294967296}i(R,"readInt64LE"),a(R,"readInt64LE"),e.readInt64LE=R;function P(d,g){g===void 0&&(g=0);var S=b(d,g),D=b(d,g+4);return D*4294967296+S}i(P,"readUint64LE"),a(P,"readUint64LE"),e.readUint64LE=P;function K(d,g,S){return g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0),y(d/4294967296>>>0,g,S),y(d>>>0,g,S+4),g}i(K,"writeUint64BE"),a(K,"writeUint64BE"),e.writeUint64BE=K,e.writeInt64BE=K;function U(d,g,S){return g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0),_(d>>>0,g,S),_(d/4294967296>>>0,g,S+4),g}i(U,"writeUint64LE"),a(U,"writeUint64LE"),e.writeUint64LE=U,e.writeInt64LE=U;function j(d,g,S){if(S===void 0&&(S=0),d%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(d/8>g.length-S)throw new Error("readUintBE: array is too short for the given bitLength");for(var D=0,C=1,E=d/8+S-1;E>=S;E--)D+=g[E]*C,C*=256;return D}i(j,"readUintBE"),a(j,"readUintBE"),e.readUintBE=j;function V(d,g,S){if(S===void 0&&(S=0),d%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(d/8>g.length-S)throw new Error("readUintLE: array is too short for the given bitLength");for(var D=0,C=1,E=S;E<S+d/8;E++)D+=g[E]*C,C*=256;return D}i(V,"readUintLE"),a(V,"readUintLE"),e.readUintLE=V;function G(d,g,S,D){if(S===void 0&&(S=new Uint8Array(d/8)),D===void 0&&(D=0),d%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!t.isSafeInteger(g))throw new Error("writeUintBE value must be an integer");for(var C=1,E=d/8+D-1;E>=D;E--)S[E]=g/C&255,C*=256;return S}i(G,"writeUintBE"),a(G,"writeUintBE"),e.writeUintBE=G;function I(d,g,S,D){if(S===void 0&&(S=new Uint8Array(d/8)),D===void 0&&(D=0),d%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!t.isSafeInteger(g))throw new Error("writeUintLE value must be an integer");for(var C=1,E=D;E<D+d/8;E++)S[E]=g/C&255,C*=256;return S}i(I,"writeUintLE"),a(I,"writeUintLE"),e.writeUintLE=I;function H(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat32(g)}i(H,"readFloat32BE"),a(H,"readFloat32BE"),e.readFloat32BE=H;function se(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat32(g,!0)}i(se,"readFloat32LE"),a(se,"readFloat32LE"),e.readFloat32LE=se;function ue(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat64(g)}i(ue,"readFloat64BE"),a(ue,"readFloat64BE"),e.readFloat64BE=ue;function me(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat64(g,!0)}i(me,"readFloat64LE"),a(me,"readFloat64LE"),e.readFloat64LE=me;function q(d,g,S){g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat32(S,d),g}i(q,"writeFloat32BE"),a(q,"writeFloat32BE"),e.writeFloat32BE=q;function w(d,g,S){g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat32(S,d,!0),g}i(w,"writeFloat32LE"),a(w,"writeFloat32LE"),e.writeFloat32LE=w;function x(d,g,S){g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat64(S,d),g}i(x,"writeFloat64BE"),a(x,"writeFloat64BE"),e.writeFloat64BE=x;function m(d,g,S){g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat64(S,d,!0),g}i(m,"writeFloat64LE"),a(m,"writeFloat64LE"),e.writeFloat64LE=m}}),ps=ze({"../../../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(r){for(var n=0;n<r.length;n++)r[n]=0;return r}i(t,"wipe"),a(t,"wipe"),e.wipe=t}}),IU=ze({"../../../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps();e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var n=function(){function f(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i(f,"SHA2562"),a(f,"SHA256"),f.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},f.prototype.update=function(h,p){if(p===void 0&&(p=h.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var v=0;if(this._bytesHashed+=p,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&p>0;)this._buffer[this._bufferLength++]=h[v++],p--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(p>=this.blockSize&&(v=o(this._temp,this._state,h,v,p),p%=this.blockSize);p>0;)this._buffer[this._bufferLength++]=h[v++],p--;return this},f.prototype.finish=function(h){if(!this._finished){var p=this._bytesHashed,v=this._bufferLength,b=p/536870912|0,y=p<<3,_=p%64<56?64:128;this._buffer[v]=128;for(var T=v+1;T<_-8;T++)this._buffer[T]=0;t.writeUint32BE(b,this._buffer,_-8),t.writeUint32BE(y,this._buffer,_-4),o(this._temp,this._state,this._buffer,0,_),this._finished=!0}for(var T=0;T<this.digestLength/4;T++)t.writeUint32BE(this._state[T],h,T*4);return this},f.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},f.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(h){return this._state.set(h.state),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(h){r.wipe(h.state),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},f}();e.SHA256=n;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(f,h,p,v,b){for(;b>=64;){for(var y=h[0],_=h[1],T=h[2],O=h[3],R=h[4],P=h[5],K=h[6],U=h[7],j=0;j<16;j++){var V=v+j*4;f[j]=t.readUint32BE(p,V)}for(var j=16;j<64;j++){var G=f[j-2],I=(G>>>17|G<<32-17)^(G>>>19|G<<32-19)^G>>>10;G=f[j-15];var H=(G>>>7|G<<32-7)^(G>>>18|G<<32-18)^G>>>3;f[j]=(I+f[j-7]|0)+(H+f[j-16]|0)}for(var j=0;j<64;j++){var I=(((R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7))+(R&P^~R&K)|0)+(U+(s[j]+f[j]|0)|0)|0,H=((y>>>2|y<<32-2)^(y>>>13|y<<32-13)^(y>>>22|y<<32-22))+(y&_^y&T^_&T)|0;U=K,K=P,P=R,R=O+I|0,O=T,T=_,_=y,y=I+H|0}h[0]+=y,h[1]+=_,h[2]+=T,h[3]+=O,h[4]+=R,h[5]+=P,h[6]+=K,h[7]+=U,v+=64,b-=64}return v}i(o,"hashBlocks"),a(o,"hashBlocks");function c(f){var h=new n;h.update(f);var p=h.digest();return h.clean(),p}i(c,"hash3"),a(c,"hash"),e.hash=c}}),GS=ze({"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js"(e,t){(function(){"use strict";var r="input is invalid type",n="finalize already called",s=typeof window=="object",o=s?window:{};o.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&typeof self=="object",f=!o.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;f?o=global:c&&(o=self);var h=!o.JS_SHA3_NO_COMMON_JS&&typeof t=="object"&&t.exports,p=typeof define=="function"&&define.amd,v=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",b="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],_=[4,1024,262144,67108864],T=[1,256,65536,16777216],O=[6,1536,393216,100663296],R=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],K=[224,256,384,512],U=[128,256],j=["hex","buffer","arrayBuffer","array","digest"],V={"128":168,"256":136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}),v&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(N){return typeof N=="object"&&N.buffer&&N.buffer.constructor===ArrayBuffer});for(var G=a(function(N,Y,J){return function(M){return new k(N,Y,N).update(M)[J]()}},"createOutputMethod"),I=a(function(N,Y,J){return function(M,z){return new k(N,Y,z).update(M)[J]()}},"createShakeOutputMethod"),H=a(function(N,Y,J){return function(M,z,te,oe){return d["cshake"+N].update(M,z,te,oe)[J]()}},"createCshakeOutputMethod"),se=a(function(N,Y,J){return function(M,z,te,oe){return d["kmac"+N].update(M,z,te,oe)[J]()}},"createKmacOutputMethod"),ue=a(function(N,Y,J,M){for(var z=0;z<j.length;++z){var te=j[z];N[te]=Y(J,M,te)}return N},"createOutputMethods"),me=a(function(N,Y){var J=G(N,Y,"hex");return J.create=function(){return new k(N,Y,N)},J.update=function(M){return J.create().update(M)},ue(J,G,N,Y)},"createMethod"),q=a(function(N,Y){var J=I(N,Y,"hex");return J.create=function(M){return new k(N,Y,M)},J.update=function(M,z){return J.create(z).update(M)},ue(J,I,N,Y)},"createShakeMethod"),w=a(function(N,Y){var J=V[N],M=H(N,Y,"hex");return M.create=function(z,te,oe){return!te&&!oe?d["shake"+N].create(z):new k(N,Y,z).bytepad([te,oe],J)},M.update=function(z,te,oe,ge){return M.create(te,oe,ge).update(z)},ue(M,H,N,Y)},"createCshakeMethod"),x=a(function(N,Y){var J=V[N],M=se(N,Y,"hex");return M.create=function(z,te,oe){return new F(N,Y,te).bytepad(["KMAC",oe],J).bytepad([z],J)},M.update=function(z,te,oe,ge){return M.create(z,oe,ge).update(te)},ue(M,se,N,Y)},"createKmacMethod"),m=[{name:"keccak",padding:T,bits:K,createMethod:me},{name:"sha3",padding:O,bits:K,createMethod:me},{name:"shake",padding:y,bits:U,createMethod:q},{name:"cshake",padding:_,bits:U,createMethod:w},{name:"kmac",padding:_,bits:U,createMethod:x}],d={},g=[],S=0;S<m.length;++S)for(var D=m[S],C=D.bits,E=0;E<C.length;++E){var B=D.name+"_"+C[E];if(g.push(B),d[B]=D.createMethod(C[E],D.padding),D.name!=="sha3"){var $=D.name+C[E];g.push($),d[$]=d[B]}}function k(N,Y,J){this.blocks=[],this.s=[],this.padding=Y,this.outputBits=J,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(N<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=J>>5,this.extraBytes=(J&31)>>3;for(var M=0;M<50;++M)this.s[M]=0}i(k,"Keccak"),a(k,"Keccak"),k.prototype.update=function(N){if(this.finalized)throw new Error(n);var Y,J=typeof N;if(J!=="string"){if(J==="object"){if(N===null)throw new Error(r);if(v&&N.constructor===ArrayBuffer)N=new Uint8Array(N);else if(!Array.isArray(N)&&(!v||!ArrayBuffer.isView(N)))throw new Error(r)}else throw new Error(r);Y=!0}for(var M=this.blocks,z=this.byteCount,te=N.length,oe=this.blockCount,ge=0,ke=this.s,_e,fe;ge<te;){if(this.reset)for(this.reset=!1,M[0]=this.block,_e=1;_e<oe+1;++_e)M[_e]=0;if(Y)for(_e=this.start;ge<te&&_e<z;++ge)M[_e>>2]|=N[ge]<<R[_e++&3];else for(_e=this.start;ge<te&&_e<z;++ge)fe=N.charCodeAt(ge),fe<128?M[_e>>2]|=fe<<R[_e++&3]:fe<2048?(M[_e>>2]|=(192|fe>>6)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]):fe<55296||fe>=57344?(M[_e>>2]|=(224|fe>>12)<<R[_e++&3],M[_e>>2]|=(128|fe>>6&63)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]):(fe=65536+((fe&1023)<<10|N.charCodeAt(++ge)&1023),M[_e>>2]|=(240|fe>>18)<<R[_e++&3],M[_e>>2]|=(128|fe>>12&63)<<R[_e++&3],M[_e>>2]|=(128|fe>>6&63)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]);if(this.lastByteIndex=_e,_e>=z){for(this.start=_e-z,this.block=M[oe],_e=0;_e<oe;++_e)ke[_e]^=M[_e];he(ke),this.reset=!0}else this.start=_e}return this},k.prototype.encode=function(N,Y){var J=N&255,M=1,z=[J];for(N=N>>8,J=N&255;J>0;)z.unshift(J),N=N>>8,J=N&255,++M;return Y?z.push(M):z.unshift(M),this.update(z),z.length},k.prototype.encodeString=function(N){var Y,J=typeof N;if(J!=="string"){if(J==="object"){if(N===null)throw new Error(r);if(v&&N.constructor===ArrayBuffer)N=new Uint8Array(N);else if(!Array.isArray(N)&&(!v||!ArrayBuffer.isView(N)))throw new Error(r)}else throw new Error(r);Y=!0}var M=0,z=N.length;if(Y)M=z;else for(var te=0;te<N.length;++te){var oe=N.charCodeAt(te);oe<128?M+=1:oe<2048?M+=2:oe<55296||oe>=57344?M+=3:(oe=65536+((oe&1023)<<10|N.charCodeAt(++te)&1023),M+=4)}return M+=this.encode(M*8),this.update(N),M},k.prototype.bytepad=function(N,Y){for(var J=this.encode(Y),M=0;M<N.length;++M)J+=this.encodeString(N[M]);var z=Y-J%Y,te=[];return te.length=z,this.update(te),this},k.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var N=this.blocks,Y=this.lastByteIndex,J=this.blockCount,M=this.s;if(N[Y>>2]|=this.padding[Y&3],this.lastByteIndex===this.byteCount)for(N[0]=N[J],Y=1;Y<J+1;++Y)N[Y]=0;for(N[J-1]|=2147483648,Y=0;Y<J;++Y)M[Y]^=N[Y];he(M)}},k.prototype.toString=k.prototype.hex=function(){this.finalize();for(var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,te=0,oe="",ge;te<J;){for(z=0;z<N&&te<J;++z,++te)ge=Y[z],oe+=b[ge>>4&15]+b[ge&15]+b[ge>>12&15]+b[ge>>8&15]+b[ge>>20&15]+b[ge>>16&15]+b[ge>>28&15]+b[ge>>24&15];te%N===0&&(he(Y),z=0)}return M&&(ge=Y[z],oe+=b[ge>>4&15]+b[ge&15],M>1&&(oe+=b[ge>>12&15]+b[ge>>8&15]),M>2&&(oe+=b[ge>>20&15]+b[ge>>16&15])),oe},k.prototype.arrayBuffer=function(){this.finalize();var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,te=0,oe=this.outputBits>>3,ge;M?ge=new ArrayBuffer(J+1<<2):ge=new ArrayBuffer(oe);for(var ke=new Uint32Array(ge);te<J;){for(z=0;z<N&&te<J;++z,++te)ke[te]=Y[z];te%N===0&&he(Y)}return M&&(ke[z]=Y[z],ge=ge.slice(0,oe)),ge},k.prototype.buffer=k.prototype.arrayBuffer,k.prototype.digest=k.prototype.array=function(){this.finalize();for(var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,te=0,oe=[],ge,ke;te<J;){for(z=0;z<N&&te<J;++z,++te)ge=te<<2,ke=Y[z],oe[ge]=ke&255,oe[ge+1]=ke>>8&255,oe[ge+2]=ke>>16&255,oe[ge+3]=ke>>24&255;te%N===0&&he(Y)}return M&&(ge=te<<2,ke=Y[z],oe[ge]=ke&255,M>1&&(oe[ge+1]=ke>>8&255),M>2&&(oe[ge+2]=ke>>16&255)),oe};function F(N,Y,J){k.call(this,N,Y,J)}i(F,"Kmac"),a(F,"Kmac"),F.prototype=new k,F.prototype.finalize=function(){return this.encode(this.outputBits,!0),k.prototype.finalize.call(this)};var he=a(function(N){var Y,J,M,z,te,oe,ge,ke,_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re,je,rt,le,ce,Z,re,ye,Se,xe,De,Mt,qe,He,Ot,dt,mt,Dr,ct,ut,lr,lt,nt,ar,it,Ye,Qt,st,Qe,or,at,Ze,cr,ot,Et,Sn,At,yt,fn,er,tr,tn,rn,Or,Hr,nn;for(M=0;M<48;M+=2)z=N[0]^N[10]^N[20]^N[30]^N[40],te=N[1]^N[11]^N[21]^N[31]^N[41],oe=N[2]^N[12]^N[22]^N[32]^N[42],ge=N[3]^N[13]^N[23]^N[33]^N[43],ke=N[4]^N[14]^N[24]^N[34]^N[44],_e=N[5]^N[15]^N[25]^N[35]^N[45],fe=N[6]^N[16]^N[26]^N[36]^N[46],Ce=N[7]^N[17]^N[27]^N[37]^N[47],pe=N[8]^N[18]^N[28]^N[38]^N[48],we=N[9]^N[19]^N[29]^N[39]^N[49],Y=pe^(oe<<1|ge>>>31),J=we^(ge<<1|oe>>>31),N[0]^=Y,N[1]^=J,N[10]^=Y,N[11]^=J,N[20]^=Y,N[21]^=J,N[30]^=Y,N[31]^=J,N[40]^=Y,N[41]^=J,Y=z^(ke<<1|_e>>>31),J=te^(_e<<1|ke>>>31),N[2]^=Y,N[3]^=J,N[12]^=Y,N[13]^=J,N[22]^=Y,N[23]^=J,N[32]^=Y,N[33]^=J,N[42]^=Y,N[43]^=J,Y=oe^(fe<<1|Ce>>>31),J=ge^(Ce<<1|fe>>>31),N[4]^=Y,N[5]^=J,N[14]^=Y,N[15]^=J,N[24]^=Y,N[25]^=J,N[34]^=Y,N[35]^=J,N[44]^=Y,N[45]^=J,Y=ke^(pe<<1|we>>>31),J=_e^(we<<1|pe>>>31),N[6]^=Y,N[7]^=J,N[16]^=Y,N[17]^=J,N[26]^=Y,N[27]^=J,N[36]^=Y,N[37]^=J,N[46]^=Y,N[47]^=J,Y=fe^(z<<1|te>>>31),J=Ce^(te<<1|z>>>31),N[8]^=Y,N[9]^=J,N[18]^=Y,N[19]^=J,N[28]^=Y,N[29]^=J,N[38]^=Y,N[39]^=J,N[48]^=Y,N[49]^=J,Q=N[0],ve=N[1],Qe=N[11]<<4|N[10]>>>28,or=N[10]<<4|N[11]>>>28,De=N[20]<<3|N[21]>>>29,Mt=N[21]<<3|N[20]>>>29,rn=N[31]<<9|N[30]>>>23,Or=N[30]<<9|N[31]>>>23,it=N[40]<<18|N[41]>>>14,Ye=N[41]<<18|N[40]>>>14,mt=N[2]<<1|N[3]>>>31,Dr=N[3]<<1|N[2]>>>31,Me=N[13]<<12|N[12]>>>20,Ue=N[12]<<12|N[13]>>>20,at=N[22]<<10|N[23]>>>22,Ze=N[23]<<10|N[22]>>>22,qe=N[33]<<13|N[32]>>>19,He=N[32]<<13|N[33]>>>19,Hr=N[42]<<2|N[43]>>>30,nn=N[43]<<2|N[42]>>>30,At=N[5]<<30|N[4]>>>2,yt=N[4]<<30|N[5]>>>2,ct=N[14]<<6|N[15]>>>26,ut=N[15]<<6|N[14]>>>26,Re=N[25]<<11|N[24]>>>21,je=N[24]<<11|N[25]>>>21,cr=N[34]<<15|N[35]>>>17,ot=N[35]<<15|N[34]>>>17,Ot=N[45]<<29|N[44]>>>3,dt=N[44]<<29|N[45]>>>3,re=N[6]<<28|N[7]>>>4,ye=N[7]<<28|N[6]>>>4,fn=N[17]<<23|N[16]>>>9,er=N[16]<<23|N[17]>>>9,lr=N[26]<<25|N[27]>>>7,lt=N[27]<<25|N[26]>>>7,rt=N[36]<<21|N[37]>>>11,le=N[37]<<21|N[36]>>>11,Et=N[47]<<24|N[46]>>>8,Sn=N[46]<<24|N[47]>>>8,Qt=N[8]<<27|N[9]>>>5,st=N[9]<<27|N[8]>>>5,Se=N[18]<<20|N[19]>>>12,xe=N[19]<<20|N[18]>>>12,tr=N[29]<<7|N[28]>>>25,tn=N[28]<<7|N[29]>>>25,nt=N[38]<<8|N[39]>>>24,ar=N[39]<<8|N[38]>>>24,ce=N[48]<<14|N[49]>>>18,Z=N[49]<<14|N[48]>>>18,N[0]=Q^~Me&Re,N[1]=ve^~Ue&je,N[10]=re^~Se&De,N[11]=ye^~xe&Mt,N[20]=mt^~ct&lr,N[21]=Dr^~ut<,N[30]=Qt^~Qe&at,N[31]=st^~or&Ze,N[40]=At^~fn&tr,N[41]=yt^~er&tn,N[2]=Me^~Re&rt,N[3]=Ue^~je&le,N[12]=Se^~De&qe,N[13]=xe^~Mt&He,N[22]=ct^~lr&nt,N[23]=ut^~lt&ar,N[32]=Qe^~at&cr,N[33]=or^~Ze&ot,N[42]=fn^~tr&rn,N[43]=er^~tn&Or,N[4]=Re^~rt&ce,N[5]=je^~le&Z,N[14]=De^~qe&Ot,N[15]=Mt^~He&dt,N[24]=lr^~nt&it,N[25]=lt^~ar&Ye,N[34]=at^~cr&Et,N[35]=Ze^~ot&Sn,N[44]=tr^~rn&Hr,N[45]=tn^~Or&nn,N[6]=rt^~ce&Q,N[7]=le^~Z&ve,N[16]=qe^~Ot&re,N[17]=He^~dt&ye,N[26]=nt^~it&mt,N[27]=ar^~Ye&Dr,N[36]=cr^~Et&Qt,N[37]=ot^~Sn&st,N[46]=rn^~Hr&At,N[47]=Or^~nn&yt,N[8]=ce^~Q&Me,N[9]=Z^~ve&Ue,N[18]=Ot^~re&Se,N[19]=dt^~ye&xe,N[28]=it^~mt&ct,N[29]=Ye^~Dr&ut,N[38]=Et^~Qt&Qe,N[39]=Sn^~st&or,N[48]=Hr^~At&fn,N[49]=nn^~yt&er,N[0]^=P[M],N[1]^=P[M+1]},"f");if(h)t.exports=d;else{for(S=0;S<g.length;++S)o[g[S]]=d[g[S]];p&&define(function(){return d})}})()}}),kU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/package.json"(e,t){t.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}}),WS=ze({"(disabled):../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js"(){}}),xa=ze({"../../../node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js"(e,t){(function(r,n){"use strict";function s(q,w){if(!q)throw new Error(w||"Assertion failed")}i(s,"assert2"),a(s,"assert");function o(q,w){q.super_=w;var x=a(function(){},"TempCtor");x.prototype=w.prototype,q.prototype=new x,q.prototype.constructor=q}i(o,"inherits"),a(o,"inherits");function c(q,w,x){if(c.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((w==="le"||w==="be")&&(x=w,w=10),this._init(q||0,w||10,x||"be"))}i(c,"BN3"),a(c,"BN"),typeof r=="object"?r.exports=c:n.BN=c,c.BN=c,c.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=WS().Buffer}catch{}c.isBN=a(i(function(w){return w instanceof c?!0:w!==null&&typeof w=="object"&&w.constructor.wordSize===c.wordSize&&Array.isArray(w.words)},"isBN"),"isBN"),c.max=a(i(function(w,x){return w.cmp(x)>0?w:x},"max"),"max"),c.min=a(i(function(w,x){return w.cmp(x)<0?w:x},"min"),"min"),c.prototype._init=a(i(function(w,x,m){if(typeof w=="number")return this._initNumber(w,x,m);if(typeof w=="object")return this._initArray(w,x,m);x==="hex"&&(x=16),s(x===(x|0)&&x>=2&&x<=36),w=w.toString().replace(/\s+/g,"");var d=0;w[0]==="-"&&(d++,this.negative=1),d<w.length&&(x===16?this._parseHex(w,d,m):(this._parseBase(w,x,d),m==="le"&&this._initArray(this.toArray(),x,m)))},"init2"),"init"),c.prototype._initNumber=a(i(function(w,x,m){w<0&&(this.negative=1,w=-w),w<67108864?(this.words=[w&67108863],this.length=1):w<4503599627370496?(this.words=[w&67108863,w/67108864&67108863],this.length=2):(s(w<9007199254740992),this.words=[w&67108863,w/67108864&67108863,1],this.length=3),m==="le"&&this._initArray(this.toArray(),x,m)},"_initNumber"),"_initNumber"),c.prototype._initArray=a(i(function(w,x,m){if(s(typeof w.length=="number"),w.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(w.length/3),this.words=new Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var g,S,D=0;if(m==="be")for(d=w.length-1,g=0;d>=0;d-=3)S=w[d]|w[d-1]<<8|w[d-2]<<16,this.words[g]|=S<<D&67108863,this.words[g+1]=S>>>26-D&67108863,D+=24,D>=26&&(D-=26,g++);else if(m==="le")for(d=0,g=0;d<w.length;d+=3)S=w[d]|w[d+1]<<8|w[d+2]<<16,this.words[g]|=S<<D&67108863,this.words[g+1]=S>>>26-D&67108863,D+=24,D>=26&&(D-=26,g++);return this.strip()},"_initArray"),"_initArray");function h(q,w){var x=q.charCodeAt(w);return x>=65&&x<=70?x-55:x>=97&&x<=102?x-87:x-48&15}i(h,"parseHex4Bits"),a(h,"parseHex4Bits");function p(q,w,x){var m=h(q,x);return x-1>=w&&(m|=h(q,x-1)<<4),m}i(p,"parseHexByte"),a(p,"parseHexByte"),c.prototype._parseHex=a(i(function(w,x,m){this.length=Math.ceil((w.length-x)/6),this.words=new Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var g=0,S=0,D;if(m==="be")for(d=w.length-1;d>=x;d-=2)D=p(w,x,d)<<g,this.words[S]|=D&67108863,g>=18?(g-=18,S+=1,this.words[S]|=D>>>26):g+=8;else{var C=w.length-x;for(d=C%2===0?x+1:x;d<w.length;d+=2)D=p(w,x,d)<<g,this.words[S]|=D&67108863,g>=18?(g-=18,S+=1,this.words[S]|=D>>>26):g+=8}this.strip()},"_parseHex"),"_parseHex");function v(q,w,x,m){for(var d=0,g=Math.min(q.length,x),S=w;S<g;S++){var D=q.charCodeAt(S)-48;d*=m,D>=49?d+=D-49+10:D>=17?d+=D-17+10:d+=D}return d}i(v,"parseBase"),a(v,"parseBase"),c.prototype._parseBase=a(i(function(w,x,m){this.words=[0],this.length=1;for(var d=0,g=1;g<=67108863;g*=x)d++;d--,g=g/x|0;for(var S=w.length-m,D=S%d,C=Math.min(S,S-D)+m,E=0,B=m;B<C;B+=d)E=v(w,B,B+d,x),this.imuln(g),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(D!==0){var $=1;for(E=v(w,B,w.length,x),B=0;B<D;B++)$*=x;this.imuln($),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this.strip()},"_parseBase"),"_parseBase"),c.prototype.copy=a(i(function(w){w.words=new Array(this.length);for(var x=0;x<this.length;x++)w.words[x]=this.words[x];w.length=this.length,w.negative=this.negative,w.red=this.red},"copy"),"copy"),c.prototype.clone=a(i(function(){var w=new c(null);return this.copy(w),w},"clone"),"clone"),c.prototype._expand=a(i(function(w){for(;this.length<w;)this.words[this.length++]=0;return this},"_expand"),"_expand"),c.prototype.strip=a(i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),"strip"),c.prototype._normSign=a(i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),"_normSign"),c.prototype.inspect=a(i(function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"},"inspect4"),"inspect");var b=["","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"],y=[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],_=[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];c.prototype.toString=a(i(function(w,x){w=w||10,x=x|0||1;var m;if(w===16||w==="hex"){m="";for(var d=0,g=0,S=0;S<this.length;S++){var D=this.words[S],C=((D<<d|g)&16777215).toString(16);g=D>>>24-d&16777215,g!==0||S!==this.length-1?m=b[6-C.length]+C+m:m=C+m,d+=2,d>=26&&(d-=26,S--)}for(g!==0&&(m=g.toString(16)+m);m.length%x!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(w===(w|0)&&w>=2&&w<=36){var E=y[w],B=_[w];m="";var $=this.clone();for($.negative=0;!$.isZero();){var k=$.modn(B).toString(w);$=$.idivn(B),$.isZero()?m=k+m:m=b[E-k.length]+k+m}for(this.isZero()&&(m="0"+m);m.length%x!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}s(!1,"Base should be between 2 and 36")},"toString4"),"toString"),c.prototype.toNumber=a(i(function(){var w=this.words[0];return this.length===2?w+=this.words[1]*67108864:this.length===3&&this.words[2]===1?w+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-w:w},"toNumber"),"toNumber"),c.prototype.toJSON=a(i(function(){return this.toString(16)},"toJSON2"),"toJSON"),c.prototype.toBuffer=a(i(function(w,x){return s(typeof f<"u"),this.toArrayLike(f,w,x)},"toBuffer"),"toBuffer"),c.prototype.toArray=a(i(function(w,x){return this.toArrayLike(Array,w,x)},"toArray"),"toArray"),c.prototype.toArrayLike=a(i(function(w,x,m){var d=this.byteLength(),g=m||Math.max(1,d);s(d<=g,"byte array longer than desired length"),s(g>0,"Requested array length <= 0"),this.strip();var S=x==="le",D=new w(g),C,E,B=this.clone();if(S){for(E=0;!B.isZero();E++)C=B.andln(255),B.iushrn(8),D[E]=C;for(;E<g;E++)D[E]=0}else{for(E=0;E<g-d;E++)D[E]=0;for(E=0;!B.isZero();E++)C=B.andln(255),B.iushrn(8),D[g-E-1]=C}return D},"toArrayLike"),"toArrayLike"),Math.clz32?c.prototype._countBits=a(i(function(w){return 32-Math.clz32(w)},"_countBits"),"_countBits"):c.prototype._countBits=a(i(function(w){var x=w,m=0;return x>=4096&&(m+=13,x>>>=13),x>=64&&(m+=7,x>>>=7),x>=8&&(m+=4,x>>>=4),x>=2&&(m+=2,x>>>=2),m+x},"_countBits"),"_countBits"),c.prototype._zeroBits=a(i(function(w){if(w===0)return 26;var x=w,m=0;return(x&8191)===0&&(m+=13,x>>>=13),(x&127)===0&&(m+=7,x>>>=7),(x&15)===0&&(m+=4,x>>>=4),(x&3)===0&&(m+=2,x>>>=2),(x&1)===0&&m++,m},"_zeroBits"),"_zeroBits"),c.prototype.bitLength=a(i(function(){var w=this.words[this.length-1],x=this._countBits(w);return(this.length-1)*26+x},"bitLength"),"bitLength");function T(q){for(var w=new Array(q.bitLength()),x=0;x<w.length;x++){var m=x/26|0,d=x%26;w[x]=(q.words[m]&1<<d)>>>d}return w}i(T,"toBitArray"),a(T,"toBitArray"),c.prototype.zeroBits=a(i(function(){if(this.isZero())return 0;for(var w=0,x=0;x<this.length;x++){var m=this._zeroBits(this.words[x]);if(w+=m,m!==26)break}return w},"zeroBits"),"zeroBits"),c.prototype.byteLength=a(i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),"byteLength"),c.prototype.toTwos=a(i(function(w){return this.negative!==0?this.abs().inotn(w).iaddn(1):this.clone()},"toTwos"),"toTwos"),c.prototype.fromTwos=a(i(function(w){return this.testn(w-1)?this.notn(w).iaddn(1).ineg():this.clone()},"fromTwos"),"fromTwos"),c.prototype.isNeg=a(i(function(){return this.negative!==0},"isNeg"),"isNeg"),c.prototype.neg=a(i(function(){return this.clone().ineg()},"neg3"),"neg"),c.prototype.ineg=a(i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),"ineg"),c.prototype.iuor=a(i(function(w){for(;this.length<w.length;)this.words[this.length++]=0;for(var x=0;x<w.length;x++)this.words[x]=this.words[x]|w.words[x];return this.strip()},"iuor"),"iuor"),c.prototype.ior=a(i(function(w){return s((this.negative|w.negative)===0),this.iuor(w)},"ior"),"ior"),c.prototype.or=a(i(function(w){return this.length>w.length?this.clone().ior(w):w.clone().ior(this)},"or2"),"or"),c.prototype.uor=a(i(function(w){return this.length>w.length?this.clone().iuor(w):w.clone().iuor(this)},"uor"),"uor"),c.prototype.iuand=a(i(function(w){var x;this.length>w.length?x=w:x=this;for(var m=0;m<x.length;m++)this.words[m]=this.words[m]&w.words[m];return this.length=x.length,this.strip()},"iuand"),"iuand"),c.prototype.iand=a(i(function(w){return s((this.negative|w.negative)===0),this.iuand(w)},"iand"),"iand"),c.prototype.and=a(i(function(w){return this.length>w.length?this.clone().iand(w):w.clone().iand(this)},"and"),"and"),c.prototype.uand=a(i(function(w){return this.length>w.length?this.clone().iuand(w):w.clone().iuand(this)},"uand"),"uand"),c.prototype.iuxor=a(i(function(w){var x,m;this.length>w.length?(x=this,m=w):(x=w,m=this);for(var d=0;d<m.length;d++)this.words[d]=x.words[d]^m.words[d];if(this!==x)for(;d<x.length;d++)this.words[d]=x.words[d];return this.length=x.length,this.strip()},"iuxor"),"iuxor"),c.prototype.ixor=a(i(function(w){return s((this.negative|w.negative)===0),this.iuxor(w)},"ixor"),"ixor"),c.prototype.xor=a(i(function(w){return this.length>w.length?this.clone().ixor(w):w.clone().ixor(this)},"xor2"),"xor"),c.prototype.uxor=a(i(function(w){return this.length>w.length?this.clone().iuxor(w):w.clone().iuxor(this)},"uxor"),"uxor"),c.prototype.inotn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=Math.ceil(w/26)|0,m=w%26;this._expand(x),m>0&&x--;for(var d=0;d<x;d++)this.words[d]=~this.words[d]&67108863;return m>0&&(this.words[d]=~this.words[d]&67108863>>26-m),this.strip()},"inotn"),"inotn"),c.prototype.notn=a(i(function(w){return this.clone().inotn(w)},"notn"),"notn"),c.prototype.setn=a(i(function(w,x){s(typeof w=="number"&&w>=0);var m=w/26|0,d=w%26;return this._expand(m+1),x?this.words[m]=this.words[m]|1<<d:this.words[m]=this.words[m]&~(1<<d),this.strip()},"setn"),"setn"),c.prototype.iadd=a(i(function(w){var x;if(this.negative!==0&&w.negative===0)return this.negative=0,x=this.isub(w),this.negative^=1,this._normSign();if(this.negative===0&&w.negative!==0)return w.negative=0,x=this.isub(w),w.negative=1,x._normSign();var m,d;this.length>w.length?(m=this,d=w):(m=w,d=this);for(var g=0,S=0;S<d.length;S++)x=(m.words[S]|0)+(d.words[S]|0)+g,this.words[S]=x&67108863,g=x>>>26;for(;g!==0&&S<m.length;S++)x=(m.words[S]|0)+g,this.words[S]=x&67108863,g=x>>>26;if(this.length=m.length,g!==0)this.words[this.length]=g,this.length++;else if(m!==this)for(;S<m.length;S++)this.words[S]=m.words[S];return this},"iadd"),"iadd"),c.prototype.add=a(i(function(w){var x;return w.negative!==0&&this.negative===0?(w.negative=0,x=this.sub(w),w.negative^=1,x):w.negative===0&&this.negative!==0?(this.negative=0,x=w.sub(this),this.negative=1,x):this.length>w.length?this.clone().iadd(w):w.clone().iadd(this)},"add3"),"add"),c.prototype.isub=a(i(function(w){if(w.negative!==0){w.negative=0;var x=this.iadd(w);return w.negative=1,x._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(w),this.negative=1,this._normSign();var m=this.cmp(w);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var d,g;m>0?(d=this,g=w):(d=w,g=this);for(var S=0,D=0;D<g.length;D++)x=(d.words[D]|0)-(g.words[D]|0)+S,S=x>>26,this.words[D]=x&67108863;for(;S!==0&&D<d.length;D++)x=(d.words[D]|0)+S,S=x>>26,this.words[D]=x&67108863;if(S===0&&D<d.length&&d!==this)for(;D<d.length;D++)this.words[D]=d.words[D];return this.length=Math.max(this.length,D),d!==this&&(this.negative=1),this.strip()},"isub"),"isub"),c.prototype.sub=a(i(function(w){return this.clone().isub(w)},"sub"),"sub");function O(q,w,x){x.negative=w.negative^q.negative;var m=q.length+w.length|0;x.length=m,m=m-1|0;var d=q.words[0]|0,g=w.words[0]|0,S=d*g,D=S&67108863,C=S/67108864|0;x.words[0]=D;for(var E=1;E<m;E++){for(var B=C>>>26,$=C&67108863,k=Math.min(E,w.length-1),F=Math.max(0,E-q.length+1);F<=k;F++){var he=E-F|0;d=q.words[he]|0,g=w.words[F]|0,S=d*g+$,B+=S/67108864|0,$=S&67108863}x.words[E]=$|0,C=B|0}return C!==0?x.words[E]=C|0:x.length--,x.strip()}i(O,"smallMulTo"),a(O,"smallMulTo");var R=a(i(function(w,x,m){var d=w.words,g=x.words,S=m.words,D=0,C,E,B,$=d[0]|0,k=$&8191,F=$>>>13,he=d[1]|0,N=he&8191,Y=he>>>13,J=d[2]|0,M=J&8191,z=J>>>13,te=d[3]|0,oe=te&8191,ge=te>>>13,ke=d[4]|0,_e=ke&8191,fe=ke>>>13,Ce=d[5]|0,pe=Ce&8191,we=Ce>>>13,Q=d[6]|0,ve=Q&8191,Me=Q>>>13,Ue=d[7]|0,Re=Ue&8191,je=Ue>>>13,rt=d[8]|0,le=rt&8191,ce=rt>>>13,Z=d[9]|0,re=Z&8191,ye=Z>>>13,Se=g[0]|0,xe=Se&8191,De=Se>>>13,Mt=g[1]|0,qe=Mt&8191,He=Mt>>>13,Ot=g[2]|0,dt=Ot&8191,mt=Ot>>>13,Dr=g[3]|0,ct=Dr&8191,ut=Dr>>>13,lr=g[4]|0,lt=lr&8191,nt=lr>>>13,ar=g[5]|0,it=ar&8191,Ye=ar>>>13,Qt=g[6]|0,st=Qt&8191,Qe=Qt>>>13,or=g[7]|0,at=or&8191,Ze=or>>>13,cr=g[8]|0,ot=cr&8191,Et=cr>>>13,Sn=g[9]|0,At=Sn&8191,yt=Sn>>>13;m.negative=w.negative^x.negative,m.length=19,C=Math.imul(k,xe),E=Math.imul(k,De),E=E+Math.imul(F,xe)|0,B=Math.imul(F,De);var fn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(N,xe),E=Math.imul(N,De),E=E+Math.imul(Y,xe)|0,B=Math.imul(Y,De),C=C+Math.imul(k,qe)|0,E=E+Math.imul(k,He)|0,E=E+Math.imul(F,qe)|0,B=B+Math.imul(F,He)|0;var er=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(er>>>26)|0,er&=67108863,C=Math.imul(M,xe),E=Math.imul(M,De),E=E+Math.imul(z,xe)|0,B=Math.imul(z,De),C=C+Math.imul(N,qe)|0,E=E+Math.imul(N,He)|0,E=E+Math.imul(Y,qe)|0,B=B+Math.imul(Y,He)|0,C=C+Math.imul(k,dt)|0,E=E+Math.imul(k,mt)|0,E=E+Math.imul(F,dt)|0,B=B+Math.imul(F,mt)|0;var tr=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(tr>>>26)|0,tr&=67108863,C=Math.imul(oe,xe),E=Math.imul(oe,De),E=E+Math.imul(ge,xe)|0,B=Math.imul(ge,De),C=C+Math.imul(M,qe)|0,E=E+Math.imul(M,He)|0,E=E+Math.imul(z,qe)|0,B=B+Math.imul(z,He)|0,C=C+Math.imul(N,dt)|0,E=E+Math.imul(N,mt)|0,E=E+Math.imul(Y,dt)|0,B=B+Math.imul(Y,mt)|0,C=C+Math.imul(k,ct)|0,E=E+Math.imul(k,ut)|0,E=E+Math.imul(F,ct)|0,B=B+Math.imul(F,ut)|0;var tn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(_e,xe),E=Math.imul(_e,De),E=E+Math.imul(fe,xe)|0,B=Math.imul(fe,De),C=C+Math.imul(oe,qe)|0,E=E+Math.imul(oe,He)|0,E=E+Math.imul(ge,qe)|0,B=B+Math.imul(ge,He)|0,C=C+Math.imul(M,dt)|0,E=E+Math.imul(M,mt)|0,E=E+Math.imul(z,dt)|0,B=B+Math.imul(z,mt)|0,C=C+Math.imul(N,ct)|0,E=E+Math.imul(N,ut)|0,E=E+Math.imul(Y,ct)|0,B=B+Math.imul(Y,ut)|0,C=C+Math.imul(k,lt)|0,E=E+Math.imul(k,nt)|0,E=E+Math.imul(F,lt)|0,B=B+Math.imul(F,nt)|0;var rn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(rn>>>26)|0,rn&=67108863,C=Math.imul(pe,xe),E=Math.imul(pe,De),E=E+Math.imul(we,xe)|0,B=Math.imul(we,De),C=C+Math.imul(_e,qe)|0,E=E+Math.imul(_e,He)|0,E=E+Math.imul(fe,qe)|0,B=B+Math.imul(fe,He)|0,C=C+Math.imul(oe,dt)|0,E=E+Math.imul(oe,mt)|0,E=E+Math.imul(ge,dt)|0,B=B+Math.imul(ge,mt)|0,C=C+Math.imul(M,ct)|0,E=E+Math.imul(M,ut)|0,E=E+Math.imul(z,ct)|0,B=B+Math.imul(z,ut)|0,C=C+Math.imul(N,lt)|0,E=E+Math.imul(N,nt)|0,E=E+Math.imul(Y,lt)|0,B=B+Math.imul(Y,nt)|0,C=C+Math.imul(k,it)|0,E=E+Math.imul(k,Ye)|0,E=E+Math.imul(F,it)|0,B=B+Math.imul(F,Ye)|0;var Or=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Or>>>26)|0,Or&=67108863,C=Math.imul(ve,xe),E=Math.imul(ve,De),E=E+Math.imul(Me,xe)|0,B=Math.imul(Me,De),C=C+Math.imul(pe,qe)|0,E=E+Math.imul(pe,He)|0,E=E+Math.imul(we,qe)|0,B=B+Math.imul(we,He)|0,C=C+Math.imul(_e,dt)|0,E=E+Math.imul(_e,mt)|0,E=E+Math.imul(fe,dt)|0,B=B+Math.imul(fe,mt)|0,C=C+Math.imul(oe,ct)|0,E=E+Math.imul(oe,ut)|0,E=E+Math.imul(ge,ct)|0,B=B+Math.imul(ge,ut)|0,C=C+Math.imul(M,lt)|0,E=E+Math.imul(M,nt)|0,E=E+Math.imul(z,lt)|0,B=B+Math.imul(z,nt)|0,C=C+Math.imul(N,it)|0,E=E+Math.imul(N,Ye)|0,E=E+Math.imul(Y,it)|0,B=B+Math.imul(Y,Ye)|0,C=C+Math.imul(k,st)|0,E=E+Math.imul(k,Qe)|0,E=E+Math.imul(F,st)|0,B=B+Math.imul(F,Qe)|0;var Hr=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,C=Math.imul(Re,xe),E=Math.imul(Re,De),E=E+Math.imul(je,xe)|0,B=Math.imul(je,De),C=C+Math.imul(ve,qe)|0,E=E+Math.imul(ve,He)|0,E=E+Math.imul(Me,qe)|0,B=B+Math.imul(Me,He)|0,C=C+Math.imul(pe,dt)|0,E=E+Math.imul(pe,mt)|0,E=E+Math.imul(we,dt)|0,B=B+Math.imul(we,mt)|0,C=C+Math.imul(_e,ct)|0,E=E+Math.imul(_e,ut)|0,E=E+Math.imul(fe,ct)|0,B=B+Math.imul(fe,ut)|0,C=C+Math.imul(oe,lt)|0,E=E+Math.imul(oe,nt)|0,E=E+Math.imul(ge,lt)|0,B=B+Math.imul(ge,nt)|0,C=C+Math.imul(M,it)|0,E=E+Math.imul(M,Ye)|0,E=E+Math.imul(z,it)|0,B=B+Math.imul(z,Ye)|0,C=C+Math.imul(N,st)|0,E=E+Math.imul(N,Qe)|0,E=E+Math.imul(Y,st)|0,B=B+Math.imul(Y,Qe)|0,C=C+Math.imul(k,at)|0,E=E+Math.imul(k,Ze)|0,E=E+Math.imul(F,at)|0,B=B+Math.imul(F,Ze)|0;var nn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(le,xe),E=Math.imul(le,De),E=E+Math.imul(ce,xe)|0,B=Math.imul(ce,De),C=C+Math.imul(Re,qe)|0,E=E+Math.imul(Re,He)|0,E=E+Math.imul(je,qe)|0,B=B+Math.imul(je,He)|0,C=C+Math.imul(ve,dt)|0,E=E+Math.imul(ve,mt)|0,E=E+Math.imul(Me,dt)|0,B=B+Math.imul(Me,mt)|0,C=C+Math.imul(pe,ct)|0,E=E+Math.imul(pe,ut)|0,E=E+Math.imul(we,ct)|0,B=B+Math.imul(we,ut)|0,C=C+Math.imul(_e,lt)|0,E=E+Math.imul(_e,nt)|0,E=E+Math.imul(fe,lt)|0,B=B+Math.imul(fe,nt)|0,C=C+Math.imul(oe,it)|0,E=E+Math.imul(oe,Ye)|0,E=E+Math.imul(ge,it)|0,B=B+Math.imul(ge,Ye)|0,C=C+Math.imul(M,st)|0,E=E+Math.imul(M,Qe)|0,E=E+Math.imul(z,st)|0,B=B+Math.imul(z,Qe)|0,C=C+Math.imul(N,at)|0,E=E+Math.imul(N,Ze)|0,E=E+Math.imul(Y,at)|0,B=B+Math.imul(Y,Ze)|0,C=C+Math.imul(k,ot)|0,E=E+Math.imul(k,Et)|0,E=E+Math.imul(F,ot)|0,B=B+Math.imul(F,Et)|0;var xn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(xn>>>26)|0,xn&=67108863,C=Math.imul(re,xe),E=Math.imul(re,De),E=E+Math.imul(ye,xe)|0,B=Math.imul(ye,De),C=C+Math.imul(le,qe)|0,E=E+Math.imul(le,He)|0,E=E+Math.imul(ce,qe)|0,B=B+Math.imul(ce,He)|0,C=C+Math.imul(Re,dt)|0,E=E+Math.imul(Re,mt)|0,E=E+Math.imul(je,dt)|0,B=B+Math.imul(je,mt)|0,C=C+Math.imul(ve,ct)|0,E=E+Math.imul(ve,ut)|0,E=E+Math.imul(Me,ct)|0,B=B+Math.imul(Me,ut)|0,C=C+Math.imul(pe,lt)|0,E=E+Math.imul(pe,nt)|0,E=E+Math.imul(we,lt)|0,B=B+Math.imul(we,nt)|0,C=C+Math.imul(_e,it)|0,E=E+Math.imul(_e,Ye)|0,E=E+Math.imul(fe,it)|0,B=B+Math.imul(fe,Ye)|0,C=C+Math.imul(oe,st)|0,E=E+Math.imul(oe,Qe)|0,E=E+Math.imul(ge,st)|0,B=B+Math.imul(ge,Qe)|0,C=C+Math.imul(M,at)|0,E=E+Math.imul(M,Ze)|0,E=E+Math.imul(z,at)|0,B=B+Math.imul(z,Ze)|0,C=C+Math.imul(N,ot)|0,E=E+Math.imul(N,Et)|0,E=E+Math.imul(Y,ot)|0,B=B+Math.imul(Y,Et)|0,C=C+Math.imul(k,At)|0,E=E+Math.imul(k,yt)|0,E=E+Math.imul(F,At)|0,B=B+Math.imul(F,yt)|0;var Ai=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,C=Math.imul(re,qe),E=Math.imul(re,He),E=E+Math.imul(ye,qe)|0,B=Math.imul(ye,He),C=C+Math.imul(le,dt)|0,E=E+Math.imul(le,mt)|0,E=E+Math.imul(ce,dt)|0,B=B+Math.imul(ce,mt)|0,C=C+Math.imul(Re,ct)|0,E=E+Math.imul(Re,ut)|0,E=E+Math.imul(je,ct)|0,B=B+Math.imul(je,ut)|0,C=C+Math.imul(ve,lt)|0,E=E+Math.imul(ve,nt)|0,E=E+Math.imul(Me,lt)|0,B=B+Math.imul(Me,nt)|0,C=C+Math.imul(pe,it)|0,E=E+Math.imul(pe,Ye)|0,E=E+Math.imul(we,it)|0,B=B+Math.imul(we,Ye)|0,C=C+Math.imul(_e,st)|0,E=E+Math.imul(_e,Qe)|0,E=E+Math.imul(fe,st)|0,B=B+Math.imul(fe,Qe)|0,C=C+Math.imul(oe,at)|0,E=E+Math.imul(oe,Ze)|0,E=E+Math.imul(ge,at)|0,B=B+Math.imul(ge,Ze)|0,C=C+Math.imul(M,ot)|0,E=E+Math.imul(M,Et)|0,E=E+Math.imul(z,ot)|0,B=B+Math.imul(z,Et)|0,C=C+Math.imul(N,At)|0,E=E+Math.imul(N,yt)|0,E=E+Math.imul(Y,At)|0,B=B+Math.imul(Y,yt)|0;var Si=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Si>>>26)|0,Si&=67108863,C=Math.imul(re,dt),E=Math.imul(re,mt),E=E+Math.imul(ye,dt)|0,B=Math.imul(ye,mt),C=C+Math.imul(le,ct)|0,E=E+Math.imul(le,ut)|0,E=E+Math.imul(ce,ct)|0,B=B+Math.imul(ce,ut)|0,C=C+Math.imul(Re,lt)|0,E=E+Math.imul(Re,nt)|0,E=E+Math.imul(je,lt)|0,B=B+Math.imul(je,nt)|0,C=C+Math.imul(ve,it)|0,E=E+Math.imul(ve,Ye)|0,E=E+Math.imul(Me,it)|0,B=B+Math.imul(Me,Ye)|0,C=C+Math.imul(pe,st)|0,E=E+Math.imul(pe,Qe)|0,E=E+Math.imul(we,st)|0,B=B+Math.imul(we,Qe)|0,C=C+Math.imul(_e,at)|0,E=E+Math.imul(_e,Ze)|0,E=E+Math.imul(fe,at)|0,B=B+Math.imul(fe,Ze)|0,C=C+Math.imul(oe,ot)|0,E=E+Math.imul(oe,Et)|0,E=E+Math.imul(ge,ot)|0,B=B+Math.imul(ge,Et)|0,C=C+Math.imul(M,At)|0,E=E+Math.imul(M,yt)|0,E=E+Math.imul(z,At)|0,B=B+Math.imul(z,yt)|0;var xi=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(xi>>>26)|0,xi&=67108863,C=Math.imul(re,ct),E=Math.imul(re,ut),E=E+Math.imul(ye,ct)|0,B=Math.imul(ye,ut),C=C+Math.imul(le,lt)|0,E=E+Math.imul(le,nt)|0,E=E+Math.imul(ce,lt)|0,B=B+Math.imul(ce,nt)|0,C=C+Math.imul(Re,it)|0,E=E+Math.imul(Re,Ye)|0,E=E+Math.imul(je,it)|0,B=B+Math.imul(je,Ye)|0,C=C+Math.imul(ve,st)|0,E=E+Math.imul(ve,Qe)|0,E=E+Math.imul(Me,st)|0,B=B+Math.imul(Me,Qe)|0,C=C+Math.imul(pe,at)|0,E=E+Math.imul(pe,Ze)|0,E=E+Math.imul(we,at)|0,B=B+Math.imul(we,Ze)|0,C=C+Math.imul(_e,ot)|0,E=E+Math.imul(_e,Et)|0,E=E+Math.imul(fe,ot)|0,B=B+Math.imul(fe,Et)|0,C=C+Math.imul(oe,At)|0,E=E+Math.imul(oe,yt)|0,E=E+Math.imul(ge,At)|0,B=B+Math.imul(ge,yt)|0;var Pn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,C=Math.imul(re,lt),E=Math.imul(re,nt),E=E+Math.imul(ye,lt)|0,B=Math.imul(ye,nt),C=C+Math.imul(le,it)|0,E=E+Math.imul(le,Ye)|0,E=E+Math.imul(ce,it)|0,B=B+Math.imul(ce,Ye)|0,C=C+Math.imul(Re,st)|0,E=E+Math.imul(Re,Qe)|0,E=E+Math.imul(je,st)|0,B=B+Math.imul(je,Qe)|0,C=C+Math.imul(ve,at)|0,E=E+Math.imul(ve,Ze)|0,E=E+Math.imul(Me,at)|0,B=B+Math.imul(Me,Ze)|0,C=C+Math.imul(pe,ot)|0,E=E+Math.imul(pe,Et)|0,E=E+Math.imul(we,ot)|0,B=B+Math.imul(we,Et)|0,C=C+Math.imul(_e,At)|0,E=E+Math.imul(_e,yt)|0,E=E+Math.imul(fe,At)|0,B=B+Math.imul(fe,yt)|0;var dn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(dn>>>26)|0,dn&=67108863,C=Math.imul(re,it),E=Math.imul(re,Ye),E=E+Math.imul(ye,it)|0,B=Math.imul(ye,Ye),C=C+Math.imul(le,st)|0,E=E+Math.imul(le,Qe)|0,E=E+Math.imul(ce,st)|0,B=B+Math.imul(ce,Qe)|0,C=C+Math.imul(Re,at)|0,E=E+Math.imul(Re,Ze)|0,E=E+Math.imul(je,at)|0,B=B+Math.imul(je,Ze)|0,C=C+Math.imul(ve,ot)|0,E=E+Math.imul(ve,Et)|0,E=E+Math.imul(Me,ot)|0,B=B+Math.imul(Me,Et)|0,C=C+Math.imul(pe,At)|0,E=E+Math.imul(pe,yt)|0,E=E+Math.imul(we,At)|0,B=B+Math.imul(we,yt)|0;var Xn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,C=Math.imul(re,st),E=Math.imul(re,Qe),E=E+Math.imul(ye,st)|0,B=Math.imul(ye,Qe),C=C+Math.imul(le,at)|0,E=E+Math.imul(le,Ze)|0,E=E+Math.imul(ce,at)|0,B=B+Math.imul(ce,Ze)|0,C=C+Math.imul(Re,ot)|0,E=E+Math.imul(Re,Et)|0,E=E+Math.imul(je,ot)|0,B=B+Math.imul(je,Et)|0,C=C+Math.imul(ve,At)|0,E=E+Math.imul(ve,yt)|0,E=E+Math.imul(Me,At)|0,B=B+Math.imul(Me,yt)|0;var Bn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,C=Math.imul(re,at),E=Math.imul(re,Ze),E=E+Math.imul(ye,at)|0,B=Math.imul(ye,Ze),C=C+Math.imul(le,ot)|0,E=E+Math.imul(le,Et)|0,E=E+Math.imul(ce,ot)|0,B=B+Math.imul(ce,Et)|0,C=C+Math.imul(Re,At)|0,E=E+Math.imul(Re,yt)|0,E=E+Math.imul(je,At)|0,B=B+Math.imul(je,yt)|0;var Ti=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,C=Math.imul(re,ot),E=Math.imul(re,Et),E=E+Math.imul(ye,ot)|0,B=Math.imul(ye,Et),C=C+Math.imul(le,At)|0,E=E+Math.imul(le,yt)|0,E=E+Math.imul(ce,At)|0,B=B+Math.imul(ce,yt)|0;var Mi=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,C=Math.imul(re,At),E=Math.imul(re,yt),E=E+Math.imul(ye,At)|0,B=Math.imul(ye,yt);var Ci=(D+C|0)+((E&8191)<<13)|0;return D=(B+(E>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,S[0]=fn,S[1]=er,S[2]=tr,S[3]=tn,S[4]=rn,S[5]=Or,S[6]=Hr,S[7]=nn,S[8]=xn,S[9]=Ai,S[10]=Si,S[11]=xi,S[12]=Pn,S[13]=dn,S[14]=Xn,S[15]=Bn,S[16]=Ti,S[17]=Mi,S[18]=Ci,D!==0&&(S[19]=D,m.length++),m},"comb10MulTo2"),"comb10MulTo");Math.imul||(R=O);function P(q,w,x){x.negative=w.negative^q.negative,x.length=q.length+w.length;for(var m=0,d=0,g=0;g<x.length-1;g++){var S=d;d=0;for(var D=m&67108863,C=Math.min(g,w.length-1),E=Math.max(0,g-q.length+1);E<=C;E++){var B=g-E,$=q.words[B]|0,k=w.words[E]|0,F=$*k,he=F&67108863;S=S+(F/67108864|0)|0,he=he+D|0,D=he&67108863,S=S+(he>>>26)|0,d+=S>>>26,S&=67108863}x.words[g]=D,m=S,S=d}return m!==0?x.words[g]=m:x.length--,x.strip()}i(P,"bigMulTo"),a(P,"bigMulTo");function K(q,w,x){var m=new U;return m.mulp(q,w,x)}i(K,"jumboMulTo"),a(K,"jumboMulTo"),c.prototype.mulTo=a(i(function(w,x){var m,d=this.length+w.length;return this.length===10&&w.length===10?m=R(this,w,x):d<63?m=O(this,w,x):d<1024?m=P(this,w,x):m=K(this,w,x),m},"mulTo"),"mulTo");function U(q,w){this.x=q,this.y=w}i(U,"FFTM"),a(U,"FFTM"),U.prototype.makeRBT=a(i(function(w){for(var x=new Array(w),m=c.prototype._countBits(w)-1,d=0;d<w;d++)x[d]=this.revBin(d,m,w);return x},"makeRBT"),"makeRBT"),U.prototype.revBin=a(i(function(w,x,m){if(w===0||w===m-1)return w;for(var d=0,g=0;g<x;g++)d|=(w&1)<<x-g-1,w>>=1;return d},"revBin"),"revBin"),U.prototype.permute=a(i(function(w,x,m,d,g,S){for(var D=0;D<S;D++)d[D]=x[w[D]],g[D]=m[w[D]]},"permute"),"permute"),U.prototype.transform=a(i(function(w,x,m,d,g,S){this.permute(S,w,x,m,d,g);for(var D=1;D<g;D<<=1)for(var C=D<<1,E=Math.cos(2*Math.PI/C),B=Math.sin(2*Math.PI/C),$=0;$<g;$+=C)for(var k=E,F=B,he=0;he<D;he++){var N=m[$+he],Y=d[$+he],J=m[$+he+D],M=d[$+he+D],z=k*J-F*M;M=k*M+F*J,J=z,m[$+he]=N+J,d[$+he]=Y+M,m[$+he+D]=N-J,d[$+he+D]=Y-M,he!==C&&(z=E*k-B*F,F=E*F+B*k,k=z)}},"transform"),"transform"),U.prototype.guessLen13b=a(i(function(w,x){var m=Math.max(x,w)|1,d=m&1,g=0;for(m=m/2|0;m;m=m>>>1)g++;return 1<<g+1+d},"guessLen13b"),"guessLen13b"),U.prototype.conjugate=a(i(function(w,x,m){if(!(m<=1))for(var d=0;d<m/2;d++){var g=w[d];w[d]=w[m-d-1],w[m-d-1]=g,g=x[d],x[d]=-x[m-d-1],x[m-d-1]=-g}},"conjugate"),"conjugate"),U.prototype.normalize13b=a(i(function(w,x){for(var m=0,d=0;d<x/2;d++){var g=Math.round(w[2*d+1]/x)*8192+Math.round(w[2*d]/x)+m;w[d]=g&67108863,g<67108864?m=0:m=g/67108864|0}return w},"normalize13b"),"normalize13b"),U.prototype.convert13b=a(i(function(w,x,m,d){for(var g=0,S=0;S<x;S++)g=g+(w[S]|0),m[2*S]=g&8191,g=g>>>13,m[2*S+1]=g&8191,g=g>>>13;for(S=2*x;S<d;++S)m[S]=0;s(g===0),s((g&-8192)===0)},"convert13b"),"convert13b"),U.prototype.stub=a(i(function(w){for(var x=new Array(w),m=0;m<w;m++)x[m]=0;return x},"stub"),"stub"),U.prototype.mulp=a(i(function(w,x,m){var d=2*this.guessLen13b(w.length,x.length),g=this.makeRBT(d),S=this.stub(d),D=new Array(d),C=new Array(d),E=new Array(d),B=new Array(d),$=new Array(d),k=new Array(d),F=m.words;F.length=d,this.convert13b(w.words,w.length,D,d),this.convert13b(x.words,x.length,B,d),this.transform(D,S,C,E,d,g),this.transform(B,S,$,k,d,g);for(var he=0;he<d;he++){var N=C[he]*$[he]-E[he]*k[he];E[he]=C[he]*k[he]+E[he]*$[he],C[he]=N}return this.conjugate(C,E,d),this.transform(C,E,F,S,d,g),this.conjugate(F,S,d),this.normalize13b(F,d),m.negative=w.negative^x.negative,m.length=w.length+x.length,m.strip()},"mulp"),"mulp"),c.prototype.mul=a(i(function(w){var x=new c(null);return x.words=new Array(this.length+w.length),this.mulTo(w,x)},"mul3"),"mul"),c.prototype.mulf=a(i(function(w){var x=new c(null);return x.words=new Array(this.length+w.length),K(this,w,x)},"mulf"),"mulf"),c.prototype.imul=a(i(function(w){return this.clone().mulTo(w,this)},"imul"),"imul"),c.prototype.imuln=a(i(function(w){s(typeof w=="number"),s(w<67108864);for(var x=0,m=0;m<this.length;m++){var d=(this.words[m]|0)*w,g=(d&67108863)+(x&67108863);x>>=26,x+=d/67108864|0,x+=g>>>26,this.words[m]=g&67108863}return x!==0&&(this.words[m]=x,this.length++),this},"imuln"),"imuln"),c.prototype.muln=a(i(function(w){return this.clone().imuln(w)},"muln"),"muln"),c.prototype.sqr=a(i(function(){return this.mul(this)},"sqr"),"sqr"),c.prototype.isqr=a(i(function(){return this.imul(this.clone())},"isqr"),"isqr"),c.prototype.pow=a(i(function(w){var x=T(w);if(x.length===0)return new c(1);for(var m=this,d=0;d<x.length&&x[d]===0;d++,m=m.sqr());if(++d<x.length)for(var g=m.sqr();d<x.length;d++,g=g.sqr())x[d]!==0&&(m=m.mul(g));return m},"pow"),"pow"),c.prototype.iushln=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26,d=67108863>>>26-x<<26-x,g;if(x!==0){var S=0;for(g=0;g<this.length;g++){var D=this.words[g]&d,C=(this.words[g]|0)-D<<x;this.words[g]=C|S,S=D>>>26-x}S&&(this.words[g]=S,this.length++)}if(m!==0){for(g=this.length-1;g>=0;g--)this.words[g+m]=this.words[g];for(g=0;g<m;g++)this.words[g]=0;this.length+=m}return this.strip()},"iushln"),"iushln"),c.prototype.ishln=a(i(function(w){return s(this.negative===0),this.iushln(w)},"ishln"),"ishln"),c.prototype.iushrn=a(i(function(w,x,m){s(typeof w=="number"&&w>=0);var d;x?d=(x-x%26)/26:d=0;var g=w%26,S=Math.min((w-g)/26,this.length),D=67108863^67108863>>>g<<g,C=m;if(d-=S,d=Math.max(0,d),C){for(var E=0;E<S;E++)C.words[E]=this.words[E];C.length=S}if(S!==0)if(this.length>S)for(this.length-=S,E=0;E<this.length;E++)this.words[E]=this.words[E+S];else this.words[0]=0,this.length=1;var B=0;for(E=this.length-1;E>=0&&(B!==0||E>=d);E--){var $=this.words[E]|0;this.words[E]=B<<26-g|$>>>g,B=$&D}return C&&B!==0&&(C.words[C.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},"iushrn"),"iushrn"),c.prototype.ishrn=a(i(function(w,x,m){return s(this.negative===0),this.iushrn(w,x,m)},"ishrn"),"ishrn"),c.prototype.shln=a(i(function(w){return this.clone().ishln(w)},"shln"),"shln"),c.prototype.ushln=a(i(function(w){return this.clone().iushln(w)},"ushln"),"ushln"),c.prototype.shrn=a(i(function(w){return this.clone().ishrn(w)},"shrn"),"shrn"),c.prototype.ushrn=a(i(function(w){return this.clone().iushrn(w)},"ushrn"),"ushrn"),c.prototype.testn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26,d=1<<x;if(this.length<=m)return!1;var g=this.words[m];return!!(g&d)},"testn"),"testn"),c.prototype.imaskn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(x!==0&&m++,this.length=Math.min(m,this.length),x!==0){var d=67108863^67108863>>>x<<x;this.words[this.length-1]&=d}return this.strip()},"imaskn"),"imaskn"),c.prototype.maskn=a(i(function(w){return this.clone().imaskn(w)},"maskn"),"maskn"),c.prototype.iaddn=a(i(function(w){return s(typeof w=="number"),s(w<67108864),w<0?this.isubn(-w):this.negative!==0?this.length===1&&(this.words[0]|0)<w?(this.words[0]=w-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(w),this.negative=1,this):this._iaddn(w)},"iaddn"),"iaddn"),c.prototype._iaddn=a(i(function(w){this.words[0]+=w;for(var x=0;x<this.length&&this.words[x]>=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},"_iaddn"),"_iaddn"),c.prototype.isubn=a(i(function(w){if(s(typeof w=="number"),s(w<67108864),w<0)return this.iaddn(-w);if(this.negative!==0)return this.negative=0,this.iaddn(w),this.negative=1,this;if(this.words[0]-=w,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x<this.length&&this.words[x]<0;x++)this.words[x]+=67108864,this.words[x+1]-=1;return this.strip()},"isubn"),"isubn"),c.prototype.addn=a(i(function(w){return this.clone().iaddn(w)},"addn"),"addn"),c.prototype.subn=a(i(function(w){return this.clone().isubn(w)},"subn"),"subn"),c.prototype.iabs=a(i(function(){return this.negative=0,this},"iabs"),"iabs"),c.prototype.abs=a(i(function(){return this.clone().iabs()},"abs"),"abs"),c.prototype._ishlnsubmul=a(i(function(w,x,m){var d=w.length+m,g;this._expand(d);var S,D=0;for(g=0;g<w.length;g++){S=(this.words[g+m]|0)+D;var C=(w.words[g]|0)*x;S-=C&67108863,D=(S>>26)-(C/67108864|0),this.words[g+m]=S&67108863}for(;g<this.length-m;g++)S=(this.words[g+m]|0)+D,D=S>>26,this.words[g+m]=S&67108863;if(D===0)return this.strip();for(s(D===-1),D=0,g=0;g<this.length;g++)S=-(this.words[g]|0)+D,D=S>>26,this.words[g]=S&67108863;return this.negative=1,this.strip()},"_ishlnsubmul"),"_ishlnsubmul"),c.prototype._wordDiv=a(i(function(w,x){var m=this.length-w.length,d=this.clone(),g=w,S=g.words[g.length-1]|0,D=this._countBits(S);m=26-D,m!==0&&(g=g.ushln(m),d.iushln(m),S=g.words[g.length-1]|0);var C=d.length-g.length,E;if(x!=="mod"){E=new c(null),E.length=C+1,E.words=new Array(E.length);for(var B=0;B<E.length;B++)E.words[B]=0}var $=d.clone()._ishlnsubmul(g,1,C);$.negative===0&&(d=$,E&&(E.words[C]=1));for(var k=C-1;k>=0;k--){var F=(d.words[g.length+k]|0)*67108864+(d.words[g.length+k-1]|0);for(F=Math.min(F/S|0,67108863),d._ishlnsubmul(g,F,k);d.negative!==0;)F--,d.negative=0,d._ishlnsubmul(g,1,k),d.isZero()||(d.negative^=1);E&&(E.words[k]=F)}return E&&E.strip(),d.strip(),x!=="div"&&m!==0&&d.iushrn(m),{div:E||null,mod:d}},"_wordDiv"),"_wordDiv"),c.prototype.divmod=a(i(function(w,x,m){if(s(!w.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var d,g,S;return this.negative!==0&&w.negative===0?(S=this.neg().divmod(w,x),x!=="mod"&&(d=S.div.neg()),x!=="div"&&(g=S.mod.neg(),m&&g.negative!==0&&g.iadd(w)),{div:d,mod:g}):this.negative===0&&w.negative!==0?(S=this.divmod(w.neg(),x),x!=="mod"&&(d=S.div.neg()),{div:d,mod:S.mod}):(this.negative&w.negative)!==0?(S=this.neg().divmod(w.neg(),x),x!=="div"&&(g=S.mod.neg(),m&&g.negative!==0&&g.isub(w)),{div:S.div,mod:g}):w.length>this.length||this.cmp(w)<0?{div:new c(0),mod:this}:w.length===1?x==="div"?{div:this.divn(w.words[0]),mod:null}:x==="mod"?{div:null,mod:new c(this.modn(w.words[0]))}:{div:this.divn(w.words[0]),mod:new c(this.modn(w.words[0]))}:this._wordDiv(w,x)},"divmod"),"divmod"),c.prototype.div=a(i(function(w){return this.divmod(w,"div",!1).div},"div"),"div"),c.prototype.mod=a(i(function(w){return this.divmod(w,"mod",!1).mod},"mod2"),"mod"),c.prototype.umod=a(i(function(w){return this.divmod(w,"mod",!0).mod},"umod"),"umod"),c.prototype.divRound=a(i(function(w){var x=this.divmod(w);if(x.mod.isZero())return x.div;var m=x.div.negative!==0?x.mod.isub(w):x.mod,d=w.ushrn(1),g=w.andln(1),S=m.cmp(d);return S<0||g===1&&S===0?x.div:x.div.negative!==0?x.div.isubn(1):x.div.iaddn(1)},"divRound"),"divRound"),c.prototype.modn=a(i(function(w){s(w<=67108863);for(var x=(1<<26)%w,m=0,d=this.length-1;d>=0;d--)m=(x*m+(this.words[d]|0))%w;return m},"modn"),"modn"),c.prototype.idivn=a(i(function(w){s(w<=67108863);for(var x=0,m=this.length-1;m>=0;m--){var d=(this.words[m]|0)+x*67108864;this.words[m]=d/w|0,x=d%w}return this.strip()},"idivn"),"idivn"),c.prototype.divn=a(i(function(w){return this.clone().idivn(w)},"divn"),"divn"),c.prototype.egcd=a(i(function(w){s(w.negative===0),s(!w.isZero());var x=this,m=w.clone();x.negative!==0?x=x.umod(w):x=x.clone();for(var d=new c(1),g=new c(0),S=new c(0),D=new c(1),C=0;x.isEven()&&m.isEven();)x.iushrn(1),m.iushrn(1),++C;for(var E=m.clone(),B=x.clone();!x.isZero();){for(var $=0,k=1;(x.words[0]&k)===0&&$<26;++$,k<<=1);if($>0)for(x.iushrn($);$-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(E),g.isub(B)),d.iushrn(1),g.iushrn(1);for(var F=0,he=1;(m.words[0]&he)===0&&F<26;++F,he<<=1);if(F>0)for(m.iushrn(F);F-- >0;)(S.isOdd()||D.isOdd())&&(S.iadd(E),D.isub(B)),S.iushrn(1),D.iushrn(1);x.cmp(m)>=0?(x.isub(m),d.isub(S),g.isub(D)):(m.isub(x),S.isub(d),D.isub(g))}return{a:S,b:D,gcd:m.iushln(C)}},"egcd"),"egcd"),c.prototype._invmp=a(i(function(w){s(w.negative===0),s(!w.isZero());var x=this,m=w.clone();x.negative!==0?x=x.umod(w):x=x.clone();for(var d=new c(1),g=new c(0),S=m.clone();x.cmpn(1)>0&&m.cmpn(1)>0;){for(var D=0,C=1;(x.words[0]&C)===0&&D<26;++D,C<<=1);if(D>0)for(x.iushrn(D);D-- >0;)d.isOdd()&&d.iadd(S),d.iushrn(1);for(var E=0,B=1;(m.words[0]&B)===0&&E<26;++E,B<<=1);if(E>0)for(m.iushrn(E);E-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);x.cmp(m)>=0?(x.isub(m),d.isub(g)):(m.isub(x),g.isub(d))}var $;return x.cmpn(1)===0?$=d:$=g,$.cmpn(0)<0&&$.iadd(w),$},"_invmp"),"_invmp"),c.prototype.gcd=a(i(function(w){if(this.isZero())return w.abs();if(w.isZero())return this.abs();var x=this.clone(),m=w.clone();x.negative=0,m.negative=0;for(var d=0;x.isEven()&&m.isEven();d++)x.iushrn(1),m.iushrn(1);do{for(;x.isEven();)x.iushrn(1);for(;m.isEven();)m.iushrn(1);var g=x.cmp(m);if(g<0){var S=x;x=m,m=S}else if(g===0||m.cmpn(1)===0)break;x.isub(m)}while(!0);return m.iushln(d)},"gcd"),"gcd"),c.prototype.invm=a(i(function(w){return this.egcd(w).a.umod(w)},"invm"),"invm"),c.prototype.isEven=a(i(function(){return(this.words[0]&1)===0},"isEven"),"isEven"),c.prototype.isOdd=a(i(function(){return(this.words[0]&1)===1},"isOdd"),"isOdd"),c.prototype.andln=a(i(function(w){return this.words[0]&w},"andln"),"andln"),c.prototype.bincn=a(i(function(w){s(typeof w=="number");var x=w%26,m=(w-x)/26,d=1<<x;if(this.length<=m)return this._expand(m+1),this.words[m]|=d,this;for(var g=d,S=m;g!==0&&S<this.length;S++){var D=this.words[S]|0;D+=g,g=D>>>26,D&=67108863,this.words[S]=D}return g!==0&&(this.words[S]=g,this.length++),this},"bincn"),"bincn"),c.prototype.isZero=a(i(function(){return this.length===1&&this.words[0]===0},"isZero"),"isZero"),c.prototype.cmpn=a(i(function(w){var x=w<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;this.strip();var m;if(this.length>1)m=1;else{x&&(w=-w),s(w<=67108863,"Number is too big");var d=this.words[0]|0;m=d===w?0:d<w?-1:1}return this.negative!==0?-m|0:m},"cmpn"),"cmpn"),c.prototype.cmp=a(i(function(w){if(this.negative!==0&&w.negative===0)return-1;if(this.negative===0&&w.negative!==0)return 1;var x=this.ucmp(w);return this.negative!==0?-x|0:x},"cmp"),"cmp"),c.prototype.ucmp=a(i(function(w){if(this.length>w.length)return 1;if(this.length<w.length)return-1;for(var x=0,m=this.length-1;m>=0;m--){var d=this.words[m]|0,g=w.words[m]|0;if(d!==g){d<g?x=-1:d>g&&(x=1);break}}return x},"ucmp"),"ucmp"),c.prototype.gtn=a(i(function(w){return this.cmpn(w)===1},"gtn"),"gtn"),c.prototype.gt=a(i(function(w){return this.cmp(w)===1},"gt"),"gt"),c.prototype.gten=a(i(function(w){return this.cmpn(w)>=0},"gten"),"gten"),c.prototype.gte=a(i(function(w){return this.cmp(w)>=0},"gte"),"gte"),c.prototype.ltn=a(i(function(w){return this.cmpn(w)===-1},"ltn"),"ltn"),c.prototype.lt=a(i(function(w){return this.cmp(w)===-1},"lt"),"lt"),c.prototype.lten=a(i(function(w){return this.cmpn(w)<=0},"lten"),"lten"),c.prototype.lte=a(i(function(w){return this.cmp(w)<=0},"lte"),"lte"),c.prototype.eqn=a(i(function(w){return this.cmpn(w)===0},"eqn"),"eqn"),c.prototype.eq=a(i(function(w){return this.cmp(w)===0},"eq4"),"eq"),c.red=a(i(function(w){return new ue(w)},"red"),"red"),c.prototype.toRed=a(i(function(w){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),w.convertTo(this)._forceRed(w)},"toRed"),"toRed"),c.prototype.fromRed=a(i(function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),"fromRed"),c.prototype._forceRed=a(i(function(w){return this.red=w,this},"_forceRed"),"_forceRed"),c.prototype.forceRed=a(i(function(w){return s(!this.red,"Already a number in reduction context"),this._forceRed(w)},"forceRed"),"forceRed"),c.prototype.redAdd=a(i(function(w){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,w)},"redAdd"),"redAdd"),c.prototype.redIAdd=a(i(function(w){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,w)},"redIAdd"),"redIAdd"),c.prototype.redSub=a(i(function(w){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,w)},"redSub"),"redSub"),c.prototype.redISub=a(i(function(w){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,w)},"redISub"),"redISub"),c.prototype.redShl=a(i(function(w){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,w)},"redShl"),"redShl"),c.prototype.redMul=a(i(function(w){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.mul(this,w)},"redMul"),"redMul"),c.prototype.redIMul=a(i(function(w){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.imul(this,w)},"redIMul"),"redIMul"),c.prototype.redSqr=a(i(function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),"redSqr"),c.prototype.redISqr=a(i(function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),"redISqr"),c.prototype.redSqrt=a(i(function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),"redSqrt"),c.prototype.redInvm=a(i(function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),"redInvm"),c.prototype.redNeg=a(i(function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),"redNeg"),c.prototype.redPow=a(i(function(w){return s(this.red&&!w.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,w)},"redPow"),"redPow");var j={k256:null,p224:null,p192:null,p25519:null};function V(q,w){this.name=q,this.p=new c(w,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(V,"MPrime"),a(V,"MPrime"),V.prototype._tmp=a(i(function(){var w=new c(null);return w.words=new Array(Math.ceil(this.n/13)),w},"_tmp"),"_tmp"),V.prototype.ireduce=a(i(function(w){var x=w,m;do this.split(x,this.tmp),x=this.imulK(x),x=x.iadd(this.tmp),m=x.bitLength();while(m>this.n);var d=m<this.n?-1:x.ucmp(this.p);return d===0?(x.words[0]=0,x.length=1):d>0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},"ireduce"),"ireduce"),V.prototype.split=a(i(function(w,x){w.iushrn(this.n,0,x)},"split"),"split"),V.prototype.imulK=a(i(function(w){return w.imul(this.k)},"imulK"),"imulK");function G(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,"K256"),a(G,"K256"),o(G,V),G.prototype.split=a(i(function(w,x){for(var m=4194303,d=Math.min(w.length,9),g=0;g<d;g++)x.words[g]=w.words[g];if(x.length=d,w.length<=9){w.words[0]=0,w.length=1;return}var S=w.words[9];for(x.words[x.length++]=S&m,g=10;g<w.length;g++){var D=w.words[g]|0;w.words[g-10]=(D&m)<<4|S>>>22,S=D}S>>>=22,w.words[g-10]=S,S===0&&w.length>10?w.length-=10:w.length-=9},"split"),"split"),G.prototype.imulK=a(i(function(w){w.words[w.length]=0,w.words[w.length+1]=0,w.length+=2;for(var x=0,m=0;m<w.length;m++){var d=w.words[m]|0;x+=d*977,w.words[m]=x&67108863,x=d*64+(x/67108864|0)}return w.words[w.length-1]===0&&(w.length--,w.words[w.length-1]===0&&w.length--),w},"imulK"),"imulK");function I(){V.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(I,"P224"),a(I,"P224"),o(I,V);function H(){V.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(H,"P192"),a(H,"P192"),o(H,V);function se(){V.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(se,"P25519"),a(se,"P25519"),o(se,V),se.prototype.imulK=a(i(function(w){for(var x=0,m=0;m<w.length;m++){var d=(w.words[m]|0)*19+x,g=d&67108863;d>>>=26,w.words[m]=g,x=d}return x!==0&&(w.words[w.length++]=x),w},"imulK"),"imulK"),c._prime=a(i(function(w){if(j[w])return j[w];var x;if(w==="k256")x=new G;else if(w==="p224")x=new I;else if(w==="p192")x=new H;else if(w==="p25519")x=new se;else throw new Error("Unknown prime "+w);return j[w]=x,x},"prime"),"prime");function ue(q){if(typeof q=="string"){var w=c._prime(q);this.m=w.p,this.prime=w}else s(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}i(ue,"Red"),a(ue,"Red"),ue.prototype._verify1=a(i(function(w){s(w.negative===0,"red works only with positives"),s(w.red,"red works only with red numbers")},"_verify1"),"_verify1"),ue.prototype._verify2=a(i(function(w,x){s((w.negative|x.negative)===0,"red works only with positives"),s(w.red&&w.red===x.red,"red works only with red numbers")},"_verify2"),"_verify2"),ue.prototype.imod=a(i(function(w){return this.prime?this.prime.ireduce(w)._forceRed(this):w.umod(this.m)._forceRed(this)},"imod"),"imod"),ue.prototype.neg=a(i(function(w){return w.isZero()?w.clone():this.m.sub(w)._forceRed(this)},"neg3"),"neg"),ue.prototype.add=a(i(function(w,x){this._verify2(w,x);var m=w.add(x);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},"add3"),"add"),ue.prototype.iadd=a(i(function(w,x){this._verify2(w,x);var m=w.iadd(x);return m.cmp(this.m)>=0&&m.isub(this.m),m},"iadd"),"iadd"),ue.prototype.sub=a(i(function(w,x){this._verify2(w,x);var m=w.sub(x);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},"sub"),"sub"),ue.prototype.isub=a(i(function(w,x){this._verify2(w,x);var m=w.isub(x);return m.cmpn(0)<0&&m.iadd(this.m),m},"isub"),"isub"),ue.prototype.shl=a(i(function(w,x){return this._verify1(w),this.imod(w.ushln(x))},"shl"),"shl"),ue.prototype.imul=a(i(function(w,x){return this._verify2(w,x),this.imod(w.imul(x))},"imul"),"imul"),ue.prototype.mul=a(i(function(w,x){return this._verify2(w,x),this.imod(w.mul(x))},"mul3"),"mul"),ue.prototype.isqr=a(i(function(w){return this.imul(w,w.clone())},"isqr"),"isqr"),ue.prototype.sqr=a(i(function(w){return this.mul(w,w)},"sqr"),"sqr"),ue.prototype.sqrt=a(i(function(w){if(w.isZero())return w.clone();var x=this.m.andln(3);if(s(x%2===1),x===3){var m=this.m.add(new c(1)).iushrn(2);return this.pow(w,m)}for(var d=this.m.subn(1),g=0;!d.isZero()&&d.andln(1)===0;)g++,d.iushrn(1);s(!d.isZero());var S=new c(1).toRed(this),D=S.redNeg(),C=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new c(2*E*E).toRed(this);this.pow(E,C).cmp(D)!==0;)E.redIAdd(D);for(var B=this.pow(E,d),$=this.pow(w,d.addn(1).iushrn(1)),k=this.pow(w,d),F=g;k.cmp(S)!==0;){for(var he=k,N=0;he.cmp(S)!==0;N++)he=he.redSqr();s(N<F);var Y=this.pow(B,new c(1).iushln(F-N-1));$=$.redMul(Y),B=Y.redSqr(),k=k.redMul(B),F=N}return $},"sqrt"),"sqrt"),ue.prototype.invm=a(i(function(w){var x=w._invmp(this.m);return x.negative!==0?(x.negative=0,this.imod(x).redNeg()):this.imod(x)},"invm"),"invm"),ue.prototype.pow=a(i(function(w,x){if(x.isZero())return new c(1).toRed(this);if(x.cmpn(1)===0)return w.clone();var m=4,d=new Array(1<<m);d[0]=new c(1).toRed(this),d[1]=w;for(var g=2;g<d.length;g++)d[g]=this.mul(d[g-1],w);var S=d[0],D=0,C=0,E=x.bitLength()%26;for(E===0&&(E=26),g=x.length-1;g>=0;g--){for(var B=x.words[g],$=E-1;$>=0;$--){var k=B>>$&1;if(S!==d[0]&&(S=this.sqr(S)),k===0&&D===0){C=0;continue}D<<=1,D|=k,C++,!(C!==m&&(g!==0||$!==0))&&(S=this.mul(S,d[D]),C=0,D=0)}E=26}return S},"pow"),"pow"),ue.prototype.convertTo=a(i(function(w){var x=w.umod(this.m);return x===w?x.clone():x},"convertTo"),"convertTo"),ue.prototype.convertFrom=a(i(function(w){var x=w.clone();return x.red=null,x},"convertFrom"),"convertFrom"),c.mont=a(i(function(w){return new me(w)},"mont"),"mont");function me(q){ue.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}i(me,"Mont"),a(me,"Mont"),o(me,ue),me.prototype.convertTo=a(i(function(w){return this.imod(w.ushln(this.shift))},"convertTo"),"convertTo"),me.prototype.convertFrom=a(i(function(w){var x=this.imod(w.mul(this.rinv));return x.red=null,x},"convertFrom"),"convertFrom"),me.prototype.imul=a(i(function(w,x){if(w.isZero()||x.isZero())return w.words[0]=0,w.length=1,w;var m=w.imul(x),d=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=m.isub(d).iushrn(this.shift),S=g;return g.cmp(this.m)>=0?S=g.isub(this.m):g.cmpn(0)<0&&(S=g.iadd(this.m)),S._forceRed(this)},"imul"),"imul"),me.prototype.mul=a(i(function(w,x){if(w.isZero()||x.isZero())return new c(0)._forceRed(this);var m=w.mul(x),d=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=m.isub(d).iushrn(this.shift),S=g;return g.cmp(this.m)>=0?S=g.isub(this.m):g.cmpn(0)<0&&(S=g.iadd(this.m)),S._forceRed(this)},"mul3"),"mul"),me.prototype.invm=a(i(function(w){var x=this.imod(w._invmp(this.m).mul(this.r2));return x._forceRed(this)},"invm"),"invm")})(typeof t>"u"||t,e)}}),Mc=ze({"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js"(e,t){t.exports=r;function r(n,s){if(!n)throw new Error(s||"Assertion failed")}i(r,"assert2"),a(r,"assert"),r.equal=a(i(function(s,o,c){if(s!=o)throw new Error(c||"Assertion failed: "+s+" != "+o)},"assertEqual2"),"assertEqual")}}),ZS=ze({"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js"(e){"use strict";var t=e;function r(o,c){if(Array.isArray(o))return o.slice();if(!o)return[];var f=[];if(typeof o!="string"){for(var h=0;h<o.length;h++)f[h]=o[h]|0;return f}if(c==="hex"){o=o.replace(/[^a-z0-9]+/ig,""),o.length%2!==0&&(o="0"+o);for(var h=0;h<o.length;h+=2)f.push(parseInt(o[h]+o[h+1],16))}else for(var h=0;h<o.length;h++){var p=o.charCodeAt(h),v=p>>8,b=p&255;v?f.push(v,b):f.push(b)}return f}i(r,"toArray"),a(r,"toArray"),t.toArray=r;function n(o){return o.length===1?"0"+o:o}i(n,"zero2"),a(n,"zero2"),t.zero2=n;function s(o){for(var c="",f=0;f<o.length;f++)c+=n(o[f].toString(16));return c}i(s,"toHex"),a(s,"toHex"),t.toHex=s,t.encode=a(i(function(c,f){return f==="hex"?s(c):c},"encode9"),"encode")}}),qi=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/utils.js"(e){"use strict";var t=e,r=xa(),n=Mc(),s=ZS();t.assert=n,t.toArray=s.toArray,t.zero2=s.zero2,t.toHex=s.toHex,t.encode=s.encode;function o(v,b,y){var _=new Array(Math.max(v.bitLength(),y)+1);_.fill(0);for(var T=1<<b+1,O=v.clone(),R=0;R<_.length;R++){var P,K=O.andln(T-1);O.isOdd()?(K>(T>>1)-1?P=(T>>1)-K:P=K,O.isubn(P)):P=0,_[R]=P,O.iushrn(1)}return _}i(o,"getNAF2"),a(o,"getNAF"),t.getNAF=o;function c(v,b){var y=[[],[]];v=v.clone(),b=b.clone();for(var _=0,T=0,O;v.cmpn(-_)>0||b.cmpn(-T)>0;){var R=v.andln(3)+_&3,P=b.andln(3)+T&3;R===3&&(R=-1),P===3&&(P=-1);var K;(R&1)===0?K=0:(O=v.andln(7)+_&7,(O===3||O===5)&&P===2?K=-R:K=R),y[0].push(K);var U;(P&1)===0?U=0:(O=b.andln(7)+T&7,(O===3||O===5)&&R===2?U=-P:U=P),y[1].push(U),2*_===K+1&&(_=1-_),2*T===U+1&&(T=1-T),v.iushrn(1),b.iushrn(1)}return y}i(c,"getJSF2"),a(c,"getJSF"),t.getJSF=c;function f(v,b,y){var _="_"+b;v.prototype[b]=a(i(function(){return this[_]!==void 0?this[_]:this[_]=y.call(this)},"cachedProperty2"),"cachedProperty")}i(f,"cachedProperty"),a(f,"cachedProperty"),t.cachedProperty=f;function h(v){return typeof v=="string"?t.toArray(v,"hex"):v}i(h,"parseBytes"),a(h,"parseBytes"),t.parseBytes=h;function p(v){return new r(v,"hex","le")}i(p,"intFromLE"),a(p,"intFromLE"),t.intFromLE=p}}),JS=ze({"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js"(e,t){var r;t.exports=a(i(function(c){return r||(r=new n(null)),r.generate(c)},"rand2"),"rand");function n(o){this.rand=o}if(i(n,"Rand"),a(n,"Rand"),t.exports.Rand=n,n.prototype.generate=a(i(function(c){return this._rand(c)},"generate3"),"generate"),n.prototype._rand=a(i(function(c){if(this.rand.getBytes)return this.rand.getBytes(c);for(var f=new Uint8Array(c),h=0;h<f.length;h++)f[h]=this.rand.getByte();return f},"_rand"),"_rand"),typeof self=="object")self.crypto&&self.crypto.getRandomValues?n.prototype._rand=a(i(function(c){var f=new Uint8Array(c);return self.crypto.getRandomValues(f),f},"_rand"),"_rand"):self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=a(i(function(c){var f=new Uint8Array(c);return self.msCrypto.getRandomValues(f),f},"_rand"),"_rand"):typeof window=="object"&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(s=Qy("crypto"),typeof s.randomBytes!="function")throw new Error("Not supported");n.prototype._rand=a(i(function(c){return s.randomBytes(c)},"_rand"),"_rand")}catch{}var s}}),lm=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/base.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.getNAF,o=n.getJSF,c=n.assert;function f(p,v){this.type=p,this.p=new r(v.p,16),this.red=v.prime?r.red(v.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=v.n&&new r(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var b=this.n&&this.p.div(this.n);!b||b.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}i(f,"BaseCurve2"),a(f,"BaseCurve"),t.exports=f,f.prototype.point=a(i(function(){throw new Error("Not implemented")},"point3"),"point"),f.prototype.validate=a(i(function(){throw new Error("Not implemented")},"validate6"),"validate"),f.prototype._fixedNafMul=a(i(function(v,b){c(v.precomputed);var y=v._getDoubles(),_=s(b,1,this._bitLength),T=(1<<y.step+1)-(y.step%2===0?2:1);T/=3;var O=[],R,P;for(R=0;R<_.length;R+=y.step){P=0;for(var K=R+y.step-1;K>=R;K--)P=(P<<1)+_[K];O.push(P)}for(var U=this.jpoint(null,null,null),j=this.jpoint(null,null,null),V=T;V>0;V--){for(R=0;R<O.length;R++)P=O[R],P===V?j=j.mixedAdd(y.points[R]):P===-V&&(j=j.mixedAdd(y.points[R].neg()));U=U.add(j)}return U.toP()},"_fixedNafMul2"),"_fixedNafMul"),f.prototype._wnafMul=a(i(function(v,b){var y=4,_=v._getNAFPoints(y);y=_.wnd;for(var T=_.points,O=s(b,y,this._bitLength),R=this.jpoint(null,null,null),P=O.length-1;P>=0;P--){for(var K=0;P>=0&&O[P]===0;P--)K++;if(P>=0&&K++,R=R.dblp(K),P<0)break;var U=O[P];c(U!==0),v.type==="affine"?U>0?R=R.mixedAdd(T[U-1>>1]):R=R.mixedAdd(T[-U-1>>1].neg()):U>0?R=R.add(T[U-1>>1]):R=R.add(T[-U-1>>1].neg())}return v.type==="affine"?R.toP():R},"_wnafMul2"),"_wnafMul"),f.prototype._wnafMulAdd=a(i(function(v,b,y,_,T){var O=this._wnafT1,R=this._wnafT2,P=this._wnafT3,K=0,U,j,V;for(U=0;U<_;U++){V=b[U];var G=V._getNAFPoints(v);O[U]=G.wnd,R[U]=G.points}for(U=_-1;U>=1;U-=2){var I=U-1,H=U;if(O[I]!==1||O[H]!==1){P[I]=s(y[I],O[I],this._bitLength),P[H]=s(y[H],O[H],this._bitLength),K=Math.max(P[I].length,K),K=Math.max(P[H].length,K);continue}var se=[b[I],null,null,b[H]];b[I].y.cmp(b[H].y)===0?(se[1]=b[I].add(b[H]),se[2]=b[I].toJ().mixedAdd(b[H].neg())):b[I].y.cmp(b[H].y.redNeg())===0?(se[1]=b[I].toJ().mixedAdd(b[H]),se[2]=b[I].add(b[H].neg())):(se[1]=b[I].toJ().mixedAdd(b[H]),se[2]=b[I].toJ().mixedAdd(b[H].neg()));var ue=[-3,-1,-5,-7,0,7,5,1,3],me=o(y[I],y[H]);for(K=Math.max(me[0].length,K),P[I]=new Array(K),P[H]=new Array(K),j=0;j<K;j++){var q=me[0][j]|0,w=me[1][j]|0;P[I][j]=ue[(q+1)*3+(w+1)],P[H][j]=0,R[I]=se}}var x=this.jpoint(null,null,null),m=this._wnafT4;for(U=K;U>=0;U--){for(var d=0;U>=0;){var g=!0;for(j=0;j<_;j++)m[j]=P[j][U]|0,m[j]!==0&&(g=!1);if(!g)break;d++,U--}if(U>=0&&d++,x=x.dblp(d),U<0)break;for(j=0;j<_;j++){var S=m[j];S!==0&&(S>0?V=R[j][S-1>>1]:S<0&&(V=R[j][-S-1>>1].neg()),V.type==="affine"?x=x.mixedAdd(V):x=x.add(V))}}for(U=0;U<_;U++)R[U]=null;return T?x:x.toP()},"_wnafMulAdd2"),"_wnafMulAdd");function h(p,v){this.curve=p,this.type=v,this.precomputed=null}i(h,"BasePoint2"),a(h,"BasePoint"),f.BasePoint=h,h.prototype.eq=a(i(function(){throw new Error("Not implemented")},"eq4"),"eq"),h.prototype.validate=a(i(function(){return this.curve.validate(this)},"validate6"),"validate"),f.prototype.decodePoint=a(i(function(v,b){v=n.toArray(v,b);var y=this.p.byteLength();if((v[0]===4||v[0]===6||v[0]===7)&&v.length-1===2*y){v[0]===6?c(v[v.length-1]%2===0):v[0]===7&&c(v[v.length-1]%2===1);var _=this.point(v.slice(1,1+y),v.slice(1+y,1+2*y));return _}else if((v[0]===2||v[0]===3)&&v.length-1===y)return this.pointFromX(v.slice(1,1+y),v[0]===3);throw new Error("Unknown point format")},"decodePoint2"),"decodePoint"),h.prototype.encodeCompressed=a(i(function(v){return this.encode(v,!0)},"encodeCompressed2"),"encodeCompressed"),h.prototype._encode=a(i(function(v){var b=this.curve.p.byteLength(),y=this.getX().toArray("be",b);return v?[this.getY().isEven()?2:3].concat(y):[4].concat(y,this.getY().toArray("be",b))},"_encode2"),"_encode"),h.prototype.encode=a(i(function(v,b){return n.encode(this._encode(b),v)},"encode9"),"encode"),h.prototype.precompute=a(i(function(v){if(this.precomputed)return this;var b={doubles:null,naf:null,beta:null};return b.naf=this._getNAFPoints(8),b.doubles=this._getDoubles(4,v),b.beta=this._getBeta(),this.precomputed=b,this},"precompute2"),"precompute"),h.prototype._hasDoubles=a(i(function(v){if(!this.precomputed)return!1;var b=this.precomputed.doubles;return b?b.points.length>=Math.ceil((v.bitLength()+1)/b.step):!1},"_hasDoubles2"),"_hasDoubles"),h.prototype._getDoubles=a(i(function(v,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var y=[this],_=this,T=0;T<b;T+=v){for(var O=0;O<v;O++)_=_.dbl();y.push(_)}return{step:v,points:y}},"_getDoubles2"),"_getDoubles"),h.prototype._getNAFPoints=a(i(function(v){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var b=[this],y=(1<<v)-1,_=y===1?null:this.dbl(),T=1;T<y;T++)b[T]=b[T-1].add(_);return{wnd:v,points:b}},"_getNAFPoints2"),"_getNAFPoints"),h.prototype._getBeta=a(i(function(){return null},"_getBeta3"),"_getBeta"),h.prototype.dblp=a(i(function(v){for(var b=this,y=0;y<v;y++)b=b.dbl();return b},"dblp3"),"dblp")}}),fm=ze({"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=a(i(function(n,s){s&&(n.super_=s,n.prototype=Object.create(s.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"),"inherits"):t.exports=a(i(function(n,s){if(s){n.super_=s;var o=a(function(){},"TempCtor");o.prototype=s.prototype,n.prototype=new o,n.prototype.constructor=n}},"inherits"),"inherits")}}),DU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/short.js"(e,t){"use strict";var r=qi(),n=xa(),s=fm(),o=lm(),c=r.assert;function f(v){o.call(this,"short",v),this.a=new n(v.a,16).toRed(this.red),this.b=new n(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}i(f,"ShortCurve2"),a(f,"ShortCurve"),s(f,o),t.exports=f,f.prototype._getEndomorphism=a(i(function(b){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var y,_;if(b.beta)y=new n(b.beta,16).toRed(this.red);else{var T=this._getEndoRoots(this.p);y=T[0].cmp(T[1])<0?T[0]:T[1],y=y.toRed(this.red)}if(b.lambda)_=new n(b.lambda,16);else{var O=this._getEndoRoots(this.n);this.g.mul(O[0]).x.cmp(this.g.x.redMul(y))===0?_=O[0]:(_=O[1],c(this.g.mul(_).x.cmp(this.g.x.redMul(y))===0))}var R;return b.basis?R=b.basis.map(function(P){return{a:new n(P.a,16),b:new n(P.b,16)}}):R=this._getEndoBasis(_),{beta:y,lambda:_,basis:R}}},"_getEndomorphism2"),"_getEndomorphism"),f.prototype._getEndoRoots=a(i(function(b){var y=b===this.p?this.red:n.mont(b),_=new n(2).toRed(y).redInvm(),T=_.redNeg(),O=new n(3).toRed(y).redNeg().redSqrt().redMul(_),R=T.redAdd(O).fromRed(),P=T.redSub(O).fromRed();return[R,P]},"_getEndoRoots2"),"_getEndoRoots"),f.prototype._getEndoBasis=a(i(function(b){for(var y=this.n.ushrn(Math.floor(this.n.bitLength()/2)),_=b,T=this.n.clone(),O=new n(1),R=new n(0),P=new n(0),K=new n(1),U,j,V,G,I,H,se,ue=0,me,q;_.cmpn(0)!==0;){var w=T.div(_);me=T.sub(w.mul(_)),q=P.sub(w.mul(O));var x=K.sub(w.mul(R));if(!V&&me.cmp(y)<0)U=se.neg(),j=O,V=me.neg(),G=q;else if(V&&++ue===2)break;se=me,T=_,_=me,P=O,O=q,K=R,R=x}I=me.neg(),H=q;var m=V.sqr().add(G.sqr()),d=I.sqr().add(H.sqr());return d.cmp(m)>=0&&(I=U,H=j),V.negative&&(V=V.neg(),G=G.neg()),I.negative&&(I=I.neg(),H=H.neg()),[{a:V,b:G},{a:I,b:H}]},"_getEndoBasis2"),"_getEndoBasis"),f.prototype._endoSplit=a(i(function(b){var y=this.endo.basis,_=y[0],T=y[1],O=T.b.mul(b).divRound(this.n),R=_.b.neg().mul(b).divRound(this.n),P=O.mul(_.a),K=R.mul(T.a),U=O.mul(_.b),j=R.mul(T.b),V=b.sub(P).sub(K),G=U.add(j).neg();return{k1:V,k2:G}},"_endoSplit2"),"_endoSplit"),f.prototype.pointFromX=a(i(function(b,y){b=new n(b,16),b.red||(b=b.toRed(this.red));var _=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),T=_.redSqrt();if(T.redSqr().redSub(_).cmp(this.zero)!==0)throw new Error("invalid point");var O=T.fromRed().isOdd();return(y&&!O||!y&&O)&&(T=T.redNeg()),this.point(b,T)},"pointFromX2"),"pointFromX"),f.prototype.validate=a(i(function(b){if(b.inf)return!0;var y=b.x,_=b.y,T=this.a.redMul(y),O=y.redSqr().redMul(y).redIAdd(T).redIAdd(this.b);return _.redSqr().redISub(O).cmpn(0)===0},"validate6"),"validate"),f.prototype._endoWnafMulAdd=a(i(function(b,y,_){for(var T=this._endoWnafT1,O=this._endoWnafT2,R=0;R<b.length;R++){var P=this._endoSplit(y[R]),K=b[R],U=K._getBeta();P.k1.negative&&(P.k1.ineg(),K=K.neg(!0)),P.k2.negative&&(P.k2.ineg(),U=U.neg(!0)),T[R*2]=K,T[R*2+1]=U,O[R*2]=P.k1,O[R*2+1]=P.k2}for(var j=this._wnafMulAdd(1,T,O,R*2,_),V=0;V<R*2;V++)T[V]=null,O[V]=null;return j},"_endoWnafMulAdd2"),"_endoWnafMulAdd");function h(v,b,y,_){o.BasePoint.call(this,v,"affine"),b===null&&y===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(b,16),this.y=new n(y,16),_&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}i(h,"Point2"),a(h,"Point"),s(h,o.BasePoint),f.prototype.point=a(i(function(b,y,_){return new h(this,b,y,_)},"point3"),"point"),f.prototype.pointFromJSON=a(i(function(b,y){return h.fromJSON(this,b,y)},"pointFromJSON2"),"pointFromJSON"),h.prototype._getBeta=a(i(function(){if(!!this.curve.endo){var b=this.precomputed;if(b&&b.beta)return b.beta;var y=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(b){var _=this.curve,T=a(function(O){return _.point(O.x.redMul(_.endo.beta),O.y)},"endoMul");b.beta=y,y.precomputed={beta:null,naf:b.naf&&{wnd:b.naf.wnd,points:b.naf.points.map(T)},doubles:b.doubles&&{step:b.doubles.step,points:b.doubles.points.map(T)}}}return y}},"_getBeta3"),"_getBeta"),h.prototype.toJSON=a(i(function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},"toJSON2"),"toJSON"),h.fromJSON=a(i(function(b,y,_){typeof y=="string"&&(y=JSON.parse(y));var T=b.point(y[0],y[1],_);if(!y[2])return T;function O(P){return b.point(P[0],P[1],_)}i(O,"obj2point"),a(O,"obj2point");var R=y[2];return T.precomputed={beta:null,doubles:R.doubles&&{step:R.doubles.step,points:[T].concat(R.doubles.points.map(O))},naf:R.naf&&{wnd:R.naf.wnd,points:[T].concat(R.naf.points.map(O))}},T},"fromJSON2"),"fromJSON"),h.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),h.prototype.isInfinity=a(i(function(){return this.inf},"isInfinity3"),"isInfinity"),h.prototype.add=a(i(function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(this.x.cmp(b.x)===0)return this.curve.point(null,null);var y=this.y.redSub(b.y);y.cmpn(0)!==0&&(y=y.redMul(this.x.redSub(b.x).redInvm()));var _=y.redSqr().redISub(this.x).redISub(b.x),T=y.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,T)},"add3"),"add"),h.prototype.dbl=a(i(function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(b.cmpn(0)===0)return this.curve.point(null,null);var y=this.curve.a,_=this.x.redSqr(),T=b.redInvm(),O=_.redAdd(_).redIAdd(_).redIAdd(y).redMul(T),R=O.redSqr().redISub(this.x.redAdd(this.x)),P=O.redMul(this.x.redSub(R)).redISub(this.y);return this.curve.point(R,P)},"dbl3"),"dbl"),h.prototype.getX=a(i(function(){return this.x.fromRed()},"getX2"),"getX"),h.prototype.getY=a(i(function(){return this.y.fromRed()},"getY2"),"getY"),h.prototype.mul=a(i(function(b){return b=new n(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},"mul3"),"mul"),h.prototype.mulAdd=a(i(function(b,y,_){var T=[this,y],O=[b,_];return this.curve.endo?this.curve._endoWnafMulAdd(T,O):this.curve._wnafMulAdd(1,T,O,2)},"mulAdd2"),"mulAdd"),h.prototype.jmulAdd=a(i(function(b,y,_){var T=[this,y],O=[b,_];return this.curve.endo?this.curve._endoWnafMulAdd(T,O,!0):this.curve._wnafMulAdd(1,T,O,2,!0)},"jmulAdd2"),"jmulAdd"),h.prototype.eq=a(i(function(b){return this===b||this.inf===b.inf&&(this.inf||this.x.cmp(b.x)===0&&this.y.cmp(b.y)===0)},"eq4"),"eq"),h.prototype.neg=a(i(function(b){if(this.inf)return this;var y=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var _=this.precomputed,T=a(function(O){return O.neg()},"negate");y.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(T)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(T)}}}return y},"neg3"),"neg"),h.prototype.toJ=a(i(function(){if(this.inf)return this.curve.jpoint(null,null,null);var b=this.curve.jpoint(this.x,this.y,this.curve.one);return b},"toJ2"),"toJ");function p(v,b,y,_){o.BasePoint.call(this,v,"jacobian"),b===null&&y===null&&_===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(b,16),this.y=new n(y,16),this.z=new n(_,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(p,"JPoint2"),a(p,"JPoint"),s(p,o.BasePoint),f.prototype.jpoint=a(i(function(b,y,_){return new p(this,b,y,_)},"jpoint2"),"jpoint"),p.prototype.toP=a(i(function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),y=b.redSqr(),_=this.x.redMul(y),T=this.y.redMul(y).redMul(b);return this.curve.point(_,T)},"toP2"),"toP"),p.prototype.neg=a(i(function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},"neg3"),"neg"),p.prototype.add=a(i(function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var y=b.z.redSqr(),_=this.z.redSqr(),T=this.x.redMul(y),O=b.x.redMul(_),R=this.y.redMul(y.redMul(b.z)),P=b.y.redMul(_.redMul(this.z)),K=T.redSub(O),U=R.redSub(P);if(K.cmpn(0)===0)return U.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var j=K.redSqr(),V=j.redMul(K),G=T.redMul(j),I=U.redSqr().redIAdd(V).redISub(G).redISub(G),H=U.redMul(G.redISub(I)).redISub(R.redMul(V)),se=this.z.redMul(b.z).redMul(K);return this.curve.jpoint(I,H,se)},"add3"),"add"),p.prototype.mixedAdd=a(i(function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var y=this.z.redSqr(),_=this.x,T=b.x.redMul(y),O=this.y,R=b.y.redMul(y).redMul(this.z),P=_.redSub(T),K=O.redSub(R);if(P.cmpn(0)===0)return K.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var U=P.redSqr(),j=U.redMul(P),V=_.redMul(U),G=K.redSqr().redIAdd(j).redISub(V).redISub(V),I=K.redMul(V.redISub(G)).redISub(O.redMul(j)),H=this.z.redMul(P);return this.curve.jpoint(G,I,H)},"mixedAdd2"),"mixedAdd"),p.prototype.dblp=a(i(function(b){if(b===0)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var y;if(this.curve.zeroA||this.curve.threeA){var _=this;for(y=0;y<b;y++)_=_.dbl();return _}var T=this.curve.a,O=this.curve.tinv,R=this.x,P=this.y,K=this.z,U=K.redSqr().redSqr(),j=P.redAdd(P);for(y=0;y<b;y++){var V=R.redSqr(),G=j.redSqr(),I=G.redSqr(),H=V.redAdd(V).redIAdd(V).redIAdd(T.redMul(U)),se=R.redMul(G),ue=H.redSqr().redISub(se.redAdd(se)),me=se.redISub(ue),q=H.redMul(me);q=q.redIAdd(q).redISub(I);var w=j.redMul(K);y+1<b&&(U=U.redMul(I)),R=ue,K=w,j=q}return this.curve.jpoint(R,j.redMul(O),K)},"dblp3"),"dblp"),p.prototype.dbl=a(i(function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},"dbl3"),"dbl"),p.prototype._zeroDbl=a(i(function(){var b,y,_;if(this.zOne){var T=this.x.redSqr(),O=this.y.redSqr(),R=O.redSqr(),P=this.x.redAdd(O).redSqr().redISub(T).redISub(R);P=P.redIAdd(P);var K=T.redAdd(T).redIAdd(T),U=K.redSqr().redISub(P).redISub(P),j=R.redIAdd(R);j=j.redIAdd(j),j=j.redIAdd(j),b=U,y=K.redMul(P.redISub(U)).redISub(j),_=this.y.redAdd(this.y)}else{var V=this.x.redSqr(),G=this.y.redSqr(),I=G.redSqr(),H=this.x.redAdd(G).redSqr().redISub(V).redISub(I);H=H.redIAdd(H);var se=V.redAdd(V).redIAdd(V),ue=se.redSqr(),me=I.redIAdd(I);me=me.redIAdd(me),me=me.redIAdd(me),b=ue.redISub(H).redISub(H),y=se.redMul(H.redISub(b)).redISub(me),_=this.y.redMul(this.z),_=_.redIAdd(_)}return this.curve.jpoint(b,y,_)},"_zeroDbl2"),"_zeroDbl"),p.prototype._threeDbl=a(i(function(){var b,y,_;if(this.zOne){var T=this.x.redSqr(),O=this.y.redSqr(),R=O.redSqr(),P=this.x.redAdd(O).redSqr().redISub(T).redISub(R);P=P.redIAdd(P);var K=T.redAdd(T).redIAdd(T).redIAdd(this.curve.a),U=K.redSqr().redISub(P).redISub(P);b=U;var j=R.redIAdd(R);j=j.redIAdd(j),j=j.redIAdd(j),y=K.redMul(P.redISub(U)).redISub(j),_=this.y.redAdd(this.y)}else{var V=this.z.redSqr(),G=this.y.redSqr(),I=this.x.redMul(G),H=this.x.redSub(V).redMul(this.x.redAdd(V));H=H.redAdd(H).redIAdd(H);var se=I.redIAdd(I);se=se.redIAdd(se);var ue=se.redAdd(se);b=H.redSqr().redISub(ue),_=this.y.redAdd(this.z).redSqr().redISub(G).redISub(V);var me=G.redSqr();me=me.redIAdd(me),me=me.redIAdd(me),me=me.redIAdd(me),y=H.redMul(se.redISub(b)).redISub(me)}return this.curve.jpoint(b,y,_)},"_threeDbl2"),"_threeDbl"),p.prototype._dbl=a(i(function(){var b=this.curve.a,y=this.x,_=this.y,T=this.z,O=T.redSqr().redSqr(),R=y.redSqr(),P=_.redSqr(),K=R.redAdd(R).redIAdd(R).redIAdd(b.redMul(O)),U=y.redAdd(y);U=U.redIAdd(U);var j=U.redMul(P),V=K.redSqr().redISub(j.redAdd(j)),G=j.redISub(V),I=P.redSqr();I=I.redIAdd(I),I=I.redIAdd(I),I=I.redIAdd(I);var H=K.redMul(G).redISub(I),se=_.redAdd(_).redMul(T);return this.curve.jpoint(V,H,se)},"_dbl2"),"_dbl"),p.prototype.trpl=a(i(function(){if(!this.curve.zeroA)return this.dbl().add(this);var b=this.x.redSqr(),y=this.y.redSqr(),_=this.z.redSqr(),T=y.redSqr(),O=b.redAdd(b).redIAdd(b),R=O.redSqr(),P=this.x.redAdd(y).redSqr().redISub(b).redISub(T);P=P.redIAdd(P),P=P.redAdd(P).redIAdd(P),P=P.redISub(R);var K=P.redSqr(),U=T.redIAdd(T);U=U.redIAdd(U),U=U.redIAdd(U),U=U.redIAdd(U);var j=O.redIAdd(P).redSqr().redISub(R).redISub(K).redISub(U),V=y.redMul(j);V=V.redIAdd(V),V=V.redIAdd(V);var G=this.x.redMul(K).redISub(V);G=G.redIAdd(G),G=G.redIAdd(G);var I=this.y.redMul(j.redMul(U.redISub(j)).redISub(P.redMul(K)));I=I.redIAdd(I),I=I.redIAdd(I),I=I.redIAdd(I);var H=this.z.redAdd(P).redSqr().redISub(_).redISub(K);return this.curve.jpoint(G,I,H)},"trpl2"),"trpl"),p.prototype.mul=a(i(function(b,y){return b=new n(b,y),this.curve._wnafMul(this,b)},"mul3"),"mul"),p.prototype.eq=a(i(function(b){if(b.type==="affine")return this.eq(b.toJ());if(this===b)return!0;var y=this.z.redSqr(),_=b.z.redSqr();if(this.x.redMul(_).redISub(b.x.redMul(y)).cmpn(0)!==0)return!1;var T=y.redMul(this.z),O=_.redMul(b.z);return this.y.redMul(O).redISub(b.y.redMul(T)).cmpn(0)===0},"eq4"),"eq"),p.prototype.eqXToP=a(i(function(b){var y=this.z.redSqr(),_=b.toRed(this.curve.red).redMul(y);if(this.x.cmp(_)===0)return!0;for(var T=b.clone(),O=this.curve.redN.redMul(y);;){if(T.iadd(this.curve.n),T.cmp(this.curve.p)>=0)return!1;if(_.redIAdd(O),this.x.cmp(_)===0)return!0}},"eqXToP2"),"eqXToP"),p.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},"inspect4"),"inspect"),p.prototype.isInfinity=a(i(function(){return this.z.cmpn(0)===0},"isInfinity3"),"isInfinity")}}),OU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/mont.js"(e,t){"use strict";var r=xa(),n=fm(),s=lm(),o=qi();function c(h){s.call(this,"mont",h),this.a=new r(h.a,16).toRed(this.red),this.b=new r(h.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}i(c,"MontCurve"),a(c,"MontCurve"),n(c,s),t.exports=c,c.prototype.validate=a(i(function(p){var v=p.normalize().x,b=v.redSqr(),y=b.redMul(v).redAdd(b.redMul(this.a)).redAdd(v),_=y.redSqrt();return _.redSqr().cmp(y)===0},"validate6"),"validate");function f(h,p,v){s.BasePoint.call(this,h,"projective"),p===null&&v===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(p,16),this.z=new r(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(f,"Point2"),a(f,"Point"),n(f,s.BasePoint),c.prototype.decodePoint=a(i(function(p,v){return this.point(o.toArray(p,v),1)},"decodePoint2"),"decodePoint"),c.prototype.point=a(i(function(p,v){return new f(this,p,v)},"point3"),"point"),c.prototype.pointFromJSON=a(i(function(p){return f.fromJSON(this,p)},"pointFromJSON2"),"pointFromJSON"),f.prototype.precompute=a(i(function(){},"precompute2"),"precompute"),f.prototype._encode=a(i(function(){return this.getX().toArray("be",this.curve.p.byteLength())},"_encode2"),"_encode"),f.fromJSON=a(i(function(p,v){return new f(p,v[0],v[1]||p.one)},"fromJSON2"),"fromJSON"),f.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),f.prototype.isInfinity=a(i(function(){return this.z.cmpn(0)===0},"isInfinity3"),"isInfinity"),f.prototype.dbl=a(i(function(){var p=this.x.redAdd(this.z),v=p.redSqr(),b=this.x.redSub(this.z),y=b.redSqr(),_=v.redSub(y),T=v.redMul(y),O=_.redMul(y.redAdd(this.curve.a24.redMul(_)));return this.curve.point(T,O)},"dbl3"),"dbl"),f.prototype.add=a(i(function(){throw new Error("Not supported on Montgomery curve")},"add3"),"add"),f.prototype.diffAdd=a(i(function(p,v){var b=this.x.redAdd(this.z),y=this.x.redSub(this.z),_=p.x.redAdd(p.z),T=p.x.redSub(p.z),O=T.redMul(b),R=_.redMul(y),P=v.z.redMul(O.redAdd(R).redSqr()),K=v.x.redMul(O.redISub(R).redSqr());return this.curve.point(P,K)},"diffAdd"),"diffAdd"),f.prototype.mul=a(i(function(p){for(var v=p.clone(),b=this,y=this.curve.point(null,null),_=this,T=[];v.cmpn(0)!==0;v.iushrn(1))T.push(v.andln(1));for(var O=T.length-1;O>=0;O--)T[O]===0?(b=b.diffAdd(y,_),y=y.dbl()):(y=b.diffAdd(y,_),b=b.dbl());return y},"mul3"),"mul"),f.prototype.mulAdd=a(i(function(){throw new Error("Not supported on Montgomery curve")},"mulAdd2"),"mulAdd"),f.prototype.jumlAdd=a(i(function(){throw new Error("Not supported on Montgomery curve")},"jumlAdd"),"jumlAdd"),f.prototype.eq=a(i(function(p){return this.getX().cmp(p.getX())===0},"eq4"),"eq"),f.prototype.normalize=a(i(function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},"normalize"),"normalize"),f.prototype.getX=a(i(function(){return this.normalize(),this.x.fromRed()},"getX2"),"getX")}}),RU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/edwards.js"(e,t){"use strict";var r=qi(),n=xa(),s=fm(),o=lm(),c=r.assert;function f(p){this.twisted=(p.a|0)!==1,this.mOneA=this.twisted&&(p.a|0)===-1,this.extended=this.mOneA,o.call(this,"edwards",p),this.a=new n(p.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(p.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(p.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(p.c|0)===1}i(f,"EdwardsCurve"),a(f,"EdwardsCurve"),s(f,o),t.exports=f,f.prototype._mulA=a(i(function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},"_mulA"),"_mulA"),f.prototype._mulC=a(i(function(v){return this.oneC?v:this.c.redMul(v)},"_mulC"),"_mulC"),f.prototype.jpoint=a(i(function(v,b,y,_){return this.point(v,b,y,_)},"jpoint2"),"jpoint"),f.prototype.pointFromX=a(i(function(v,b){v=new n(v,16),v.red||(v=v.toRed(this.red));var y=v.redSqr(),_=this.c2.redSub(this.a.redMul(y)),T=this.one.redSub(this.c2.redMul(this.d).redMul(y)),O=_.redMul(T.redInvm()),R=O.redSqrt();if(R.redSqr().redSub(O).cmp(this.zero)!==0)throw new Error("invalid point");var P=R.fromRed().isOdd();return(b&&!P||!b&&P)&&(R=R.redNeg()),this.point(v,R)},"pointFromX2"),"pointFromX"),f.prototype.pointFromY=a(i(function(v,b){v=new n(v,16),v.red||(v=v.toRed(this.red));var y=v.redSqr(),_=y.redSub(this.c2),T=y.redMul(this.d).redMul(this.c2).redSub(this.a),O=_.redMul(T.redInvm());if(O.cmp(this.zero)===0){if(b)throw new Error("invalid point");return this.point(this.zero,v)}var R=O.redSqrt();if(R.redSqr().redSub(O).cmp(this.zero)!==0)throw new Error("invalid point");return R.fromRed().isOdd()!==b&&(R=R.redNeg()),this.point(R,v)},"pointFromY"),"pointFromY"),f.prototype.validate=a(i(function(v){if(v.isInfinity())return!0;v.normalize();var b=v.x.redSqr(),y=v.y.redSqr(),_=b.redMul(this.a).redAdd(y),T=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(y)));return _.cmp(T)===0},"validate6"),"validate");function h(p,v,b,y,_){o.BasePoint.call(this,p,"projective"),v===null&&b===null&&y===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(v,16),this.y=new n(b,16),this.z=y?new n(y,16):this.curve.one,this.t=_&&new n(_,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(h,"Point2"),a(h,"Point"),s(h,o.BasePoint),f.prototype.pointFromJSON=a(i(function(v){return h.fromJSON(this,v)},"pointFromJSON2"),"pointFromJSON"),f.prototype.point=a(i(function(v,b,y,_){return new h(this,v,b,y,_)},"point3"),"point"),h.fromJSON=a(i(function(v,b){return new h(v,b[0],b[1],b[2])},"fromJSON2"),"fromJSON"),h.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),h.prototype.isInfinity=a(i(function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},"isInfinity3"),"isInfinity"),h.prototype._extDbl=a(i(function(){var v=this.x.redSqr(),b=this.y.redSqr(),y=this.z.redSqr();y=y.redIAdd(y);var _=this.curve._mulA(v),T=this.x.redAdd(this.y).redSqr().redISub(v).redISub(b),O=_.redAdd(b),R=O.redSub(y),P=_.redSub(b),K=T.redMul(R),U=O.redMul(P),j=T.redMul(P),V=R.redMul(O);return this.curve.point(K,U,V,j)},"_extDbl"),"_extDbl"),h.prototype._projDbl=a(i(function(){var v=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),y=this.y.redSqr(),_,T,O,R,P,K;if(this.curve.twisted){R=this.curve._mulA(b);var U=R.redAdd(y);this.zOne?(_=v.redSub(b).redSub(y).redMul(U.redSub(this.curve.two)),T=U.redMul(R.redSub(y)),O=U.redSqr().redSub(U).redSub(U)):(P=this.z.redSqr(),K=U.redSub(P).redISub(P),_=v.redSub(b).redISub(y).redMul(K),T=U.redMul(R.redSub(y)),O=U.redMul(K))}else R=b.redAdd(y),P=this.curve._mulC(this.z).redSqr(),K=R.redSub(P).redSub(P),_=this.curve._mulC(v.redISub(R)).redMul(K),T=this.curve._mulC(R).redMul(b.redISub(y)),O=R.redMul(K);return this.curve.point(_,T,O)},"_projDbl"),"_projDbl"),h.prototype.dbl=a(i(function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},"dbl3"),"dbl"),h.prototype._extAdd=a(i(function(v){var b=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),y=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),_=this.t.redMul(this.curve.dd).redMul(v.t),T=this.z.redMul(v.z.redAdd(v.z)),O=y.redSub(b),R=T.redSub(_),P=T.redAdd(_),K=y.redAdd(b),U=O.redMul(R),j=P.redMul(K),V=O.redMul(K),G=R.redMul(P);return this.curve.point(U,j,G,V)},"_extAdd"),"_extAdd"),h.prototype._projAdd=a(i(function(v){var b=this.z.redMul(v.z),y=b.redSqr(),_=this.x.redMul(v.x),T=this.y.redMul(v.y),O=this.curve.d.redMul(_).redMul(T),R=y.redSub(O),P=y.redAdd(O),K=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(_).redISub(T),U=b.redMul(R).redMul(K),j,V;return this.curve.twisted?(j=b.redMul(P).redMul(T.redSub(this.curve._mulA(_))),V=R.redMul(P)):(j=b.redMul(P).redMul(T.redSub(_)),V=this.curve._mulC(R).redMul(P)),this.curve.point(U,j,V)},"_projAdd"),"_projAdd"),h.prototype.add=a(i(function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},"add3"),"add"),h.prototype.mul=a(i(function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},"mul3"),"mul"),h.prototype.mulAdd=a(i(function(v,b,y){return this.curve._wnafMulAdd(1,[this,b],[v,y],2,!1)},"mulAdd2"),"mulAdd"),h.prototype.jmulAdd=a(i(function(v,b,y){return this.curve._wnafMulAdd(1,[this,b],[v,y],2,!0)},"jmulAdd2"),"jmulAdd"),h.prototype.normalize=a(i(function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},"normalize"),"normalize"),h.prototype.neg=a(i(function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},"neg3"),"neg"),h.prototype.getX=a(i(function(){return this.normalize(),this.x.fromRed()},"getX2"),"getX"),h.prototype.getY=a(i(function(){return this.normalize(),this.y.fromRed()},"getY2"),"getY"),h.prototype.eq=a(i(function(v){return this===v||this.getX().cmp(v.getX())===0&&this.getY().cmp(v.getY())===0},"eq4"),"eq"),h.prototype.eqXToP=a(i(function(v){var b=v.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(b)===0)return!0;for(var y=v.clone(),_=this.curve.redN.redMul(this.z);;){if(y.iadd(this.curve.n),y.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(_),this.x.cmp(b)===0)return!0}},"eqXToP2"),"eqXToP"),h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add}}),YS=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/index.js"(e){"use strict";var t=e;t.base=lm(),t.short=DU(),t.mont=OU(),t.edwards=RU()}}),zs=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js"(e){"use strict";var t=Mc(),r=fm();e.inherits=r;function n(w,x){return(w.charCodeAt(x)&64512)!==55296||x<0||x+1>=w.length?!1:(w.charCodeAt(x+1)&64512)===56320}i(n,"isSurrogatePair"),a(n,"isSurrogatePair");function s(w,x){if(Array.isArray(w))return w.slice();if(!w)return[];var m=[];if(typeof w=="string")if(x){if(x==="hex")for(w=w.replace(/[^a-z0-9]+/ig,""),w.length%2!==0&&(w="0"+w),g=0;g<w.length;g+=2)m.push(parseInt(w[g]+w[g+1],16))}else for(var d=0,g=0;g<w.length;g++){var S=w.charCodeAt(g);S<128?m[d++]=S:S<2048?(m[d++]=S>>6|192,m[d++]=S&63|128):n(w,g)?(S=65536+((S&1023)<<10)+(w.charCodeAt(++g)&1023),m[d++]=S>>18|240,m[d++]=S>>12&63|128,m[d++]=S>>6&63|128,m[d++]=S&63|128):(m[d++]=S>>12|224,m[d++]=S>>6&63|128,m[d++]=S&63|128)}else for(g=0;g<w.length;g++)m[g]=w[g]|0;return m}i(s,"toArray"),a(s,"toArray"),e.toArray=s;function o(w){for(var x="",m=0;m<w.length;m++)x+=h(w[m].toString(16));return x}i(o,"toHex"),a(o,"toHex"),e.toHex=o;function c(w){var x=w>>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return x>>>0}i(c,"htonl"),a(c,"htonl"),e.htonl=c;function f(w,x){for(var m="",d=0;d<w.length;d++){var g=w[d];x==="little"&&(g=c(g)),m+=p(g.toString(16))}return m}i(f,"toHex32"),a(f,"toHex32"),e.toHex32=f;function h(w){return w.length===1?"0"+w:w}i(h,"zero2"),a(h,"zero2"),e.zero2=h;function p(w){return w.length===7?"0"+w:w.length===6?"00"+w:w.length===5?"000"+w:w.length===4?"0000"+w:w.length===3?"00000"+w:w.length===2?"000000"+w:w.length===1?"0000000"+w:w}i(p,"zero8"),a(p,"zero8"),e.zero8=p;function v(w,x,m,d){var g=m-x;t(g%4===0);for(var S=new Array(g/4),D=0,C=x;D<S.length;D++,C+=4){var E;d==="big"?E=w[C]<<24|w[C+1]<<16|w[C+2]<<8|w[C+3]:E=w[C+3]<<24|w[C+2]<<16|w[C+1]<<8|w[C],S[D]=E>>>0}return S}i(v,"join32"),a(v,"join32"),e.join32=v;function b(w,x){for(var m=new Array(w.length*4),d=0,g=0;d<w.length;d++,g+=4){var S=w[d];x==="big"?(m[g]=S>>>24,m[g+1]=S>>>16&255,m[g+2]=S>>>8&255,m[g+3]=S&255):(m[g+3]=S>>>24,m[g+2]=S>>>16&255,m[g+1]=S>>>8&255,m[g]=S&255)}return m}i(b,"split32"),a(b,"split32"),e.split32=b;function y(w,x){return w>>>x|w<<32-x}i(y,"rotr32"),a(y,"rotr32"),e.rotr32=y;function _(w,x){return w<<x|w>>>32-x}i(_,"rotl32"),a(_,"rotl32"),e.rotl32=_;function T(w,x){return w+x>>>0}i(T,"sum32"),a(T,"sum32"),e.sum32=T;function O(w,x,m){return w+x+m>>>0}i(O,"sum32_3"),a(O,"sum32_3"),e.sum32_3=O;function R(w,x,m,d){return w+x+m+d>>>0}i(R,"sum32_4"),a(R,"sum32_4"),e.sum32_4=R;function P(w,x,m,d,g){return w+x+m+d+g>>>0}i(P,"sum32_5"),a(P,"sum32_5"),e.sum32_5=P;function K(w,x,m,d){var g=w[x],S=w[x+1],D=d+S>>>0,C=(D<d?1:0)+m+g;w[x]=C>>>0,w[x+1]=D}i(K,"sum64"),a(K,"sum64"),e.sum64=K;function U(w,x,m,d){var g=x+d>>>0,S=(g<x?1:0)+w+m;return S>>>0}i(U,"sum64_hi"),a(U,"sum64_hi"),e.sum64_hi=U;function j(w,x,m,d){var g=x+d;return g>>>0}i(j,"sum64_lo"),a(j,"sum64_lo"),e.sum64_lo=j;function V(w,x,m,d,g,S,D,C){var E=0,B=x;B=B+d>>>0,E+=B<x?1:0,B=B+S>>>0,E+=B<S?1:0,B=B+C>>>0,E+=B<C?1:0;var $=w+m+g+D+E;return $>>>0}i(V,"sum64_4_hi"),a(V,"sum64_4_hi"),e.sum64_4_hi=V;function G(w,x,m,d,g,S,D,C){var E=x+d+S+C;return E>>>0}i(G,"sum64_4_lo"),a(G,"sum64_4_lo"),e.sum64_4_lo=G;function I(w,x,m,d,g,S,D,C,E,B){var $=0,k=x;k=k+d>>>0,$+=k<x?1:0,k=k+S>>>0,$+=k<S?1:0,k=k+C>>>0,$+=k<C?1:0,k=k+B>>>0,$+=k<B?1:0;var F=w+m+g+D+E+$;return F>>>0}i(I,"sum64_5_hi"),a(I,"sum64_5_hi"),e.sum64_5_hi=I;function H(w,x,m,d,g,S,D,C,E,B){var $=x+d+S+C+B;return $>>>0}i(H,"sum64_5_lo"),a(H,"sum64_5_lo"),e.sum64_5_lo=H;function se(w,x,m){var d=x<<32-m|w>>>m;return d>>>0}i(se,"rotr64_hi"),a(se,"rotr64_hi"),e.rotr64_hi=se;function ue(w,x,m){var d=w<<32-m|x>>>m;return d>>>0}i(ue,"rotr64_lo"),a(ue,"rotr64_lo"),e.rotr64_lo=ue;function me(w,x,m){return w>>>m}i(me,"shr64_hi"),a(me,"shr64_hi"),e.shr64_hi=me;function q(w,x,m){var d=w<<32-m|x>>>m;return d>>>0}i(q,"shr64_lo"),a(q,"shr64_lo"),e.shr64_lo=q}}),hd=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js"(e){"use strict";var t=zs(),r=Mc();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}i(n,"BlockHash"),a(n,"BlockHash"),e.BlockHash=n,n.prototype.update=a(i(function(o,c){if(o=t.toArray(o,c),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var f=o.length%this._delta8;this.pending=o.slice(o.length-f,o.length),this.pending.length===0&&(this.pending=null),o=t.join32(o,0,o.length-f,this.endian);for(var h=0;h<o.length;h+=this._delta32)this._update(o,h,h+this._delta32)}return this},"update2"),"update"),n.prototype.digest=a(i(function(o){return this.update(this._pad()),r(this.pending===null),this._digest(o)},"digest2"),"digest"),n.prototype._pad=a(i(function(){var o=this.pendingTotal,c=this._delta8,f=c-(o+this.padLength)%c,h=new Array(f+this.padLength);h[0]=128;for(var p=1;p<f;p++)h[p]=0;if(o<<=3,this.endian==="big"){for(var v=8;v<this.padLength;v++)h[p++]=0;h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=o>>>24&255,h[p++]=o>>>16&255,h[p++]=o>>>8&255,h[p++]=o&255}else for(h[p++]=o&255,h[p++]=o>>>8&255,h[p++]=o>>>16&255,h[p++]=o>>>24&255,h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=0,v=8;v<this.padLength;v++)h[p++]=0;return h},"pad2"),"pad")}}),XS=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js"(e){"use strict";var t=zs(),r=t.rotr32;function n(b,y,_,T){if(b===0)return s(y,_,T);if(b===1||b===3)return c(y,_,T);if(b===2)return o(y,_,T)}i(n,"ft_1"),a(n,"ft_1"),e.ft_1=n;function s(b,y,_){return b&y^~b&_}i(s,"ch32"),a(s,"ch32"),e.ch32=s;function o(b,y,_){return b&y^b&_^y&_}i(o,"maj32"),a(o,"maj32"),e.maj32=o;function c(b,y,_){return b^y^_}i(c,"p32"),a(c,"p32"),e.p32=c;function f(b){return r(b,2)^r(b,13)^r(b,22)}i(f,"s0_256"),a(f,"s0_256"),e.s0_256=f;function h(b){return r(b,6)^r(b,11)^r(b,25)}i(h,"s1_256"),a(h,"s1_256"),e.s1_256=h;function p(b){return r(b,7)^r(b,18)^b>>>3}i(p,"g0_256"),a(p,"g0_256"),e.g0_256=p;function v(b){return r(b,17)^r(b,19)^b>>>10}i(v,"g1_256"),a(v,"g1_256"),e.g1_256=v}}),NU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js"(e,t){"use strict";var r=zs(),n=hd(),s=XS(),o=r.rotl32,c=r.sum32,f=r.sum32_5,h=s.ft_1,p=n.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function b(){if(!(this instanceof b))return new b;p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i(b,"SHA1"),a(b,"SHA1"),r.inherits(b,p),t.exports=b,b.blockSize=512,b.outSize=160,b.hmacStrength=80,b.padLength=64,b.prototype._update=a(i(function(_,T){for(var O=this.W,R=0;R<16;R++)O[R]=_[T+R];for(;R<O.length;R++)O[R]=o(O[R-3]^O[R-8]^O[R-14]^O[R-16],1);var P=this.h[0],K=this.h[1],U=this.h[2],j=this.h[3],V=this.h[4];for(R=0;R<O.length;R++){var G=~~(R/20),I=f(o(P,5),h(G,K,U,j),V,O[R],v[G]);V=j,j=U,U=o(K,30),K=P,P=I}this.h[0]=c(this.h[0],P),this.h[1]=c(this.h[1],K),this.h[2]=c(this.h[2],U),this.h[3]=c(this.h[3],j),this.h[4]=c(this.h[4],V)},"_update"),"_update"),b.prototype._digest=a(i(function(_){return _==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest")}}),QS=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js"(e,t){"use strict";var r=zs(),n=hd(),s=XS(),o=Mc(),c=r.sum32,f=r.sum32_4,h=r.sum32_5,p=s.ch32,v=s.maj32,b=s.s0_256,y=s.s1_256,_=s.g0_256,T=s.g1_256,O=n.BlockHash,R=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function P(){if(!(this instanceof P))return new P;O.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=R,this.W=new Array(64)}i(P,"SHA256"),a(P,"SHA256"),r.inherits(P,O),t.exports=P,P.blockSize=512,P.outSize=256,P.hmacStrength=192,P.padLength=64,P.prototype._update=a(i(function(U,j){for(var V=this.W,G=0;G<16;G++)V[G]=U[j+G];for(;G<V.length;G++)V[G]=f(T(V[G-2]),V[G-7],_(V[G-15]),V[G-16]);var I=this.h[0],H=this.h[1],se=this.h[2],ue=this.h[3],me=this.h[4],q=this.h[5],w=this.h[6],x=this.h[7];for(o(this.k.length===V.length),G=0;G<V.length;G++){var m=h(x,y(me),p(me,q,w),this.k[G],V[G]),d=c(b(I),v(I,H,se));x=w,w=q,q=me,me=c(ue,m),ue=se,se=H,H=I,I=c(m,d)}this.h[0]=c(this.h[0],I),this.h[1]=c(this.h[1],H),this.h[2]=c(this.h[2],se),this.h[3]=c(this.h[3],ue),this.h[4]=c(this.h[4],me),this.h[5]=c(this.h[5],q),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],x)},"_update"),"_update"),P.prototype._digest=a(i(function(U){return U==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest")}}),PU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js"(e,t){"use strict";var r=zs(),n=QS();function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i(s,"SHA224"),a(s,"SHA224"),r.inherits(s,n),t.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=a(i(function(c){return c==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},"digest2"),"digest")}}),ex=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js"(e,t){"use strict";var r=zs(),n=hd(),s=Mc(),o=r.rotr64_hi,c=r.rotr64_lo,f=r.shr64_hi,h=r.shr64_lo,p=r.sum64,v=r.sum64_hi,b=r.sum64_lo,y=r.sum64_4_hi,_=r.sum64_4_lo,T=r.sum64_5_hi,O=r.sum64_5_lo,R=n.BlockHash,P=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(){if(!(this instanceof K))return new K;R.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=P,this.W=new Array(160)}i(K,"SHA512"),a(K,"SHA512"),r.inherits(K,R),t.exports=K,K.blockSize=1024,K.outSize=512,K.hmacStrength=192,K.padLength=128,K.prototype._prepareBlock=a(i(function(d,g){for(var S=this.W,D=0;D<32;D++)S[D]=d[g+D];for(;D<S.length;D+=2){var C=w(S[D-4],S[D-3]),E=x(S[D-4],S[D-3]),B=S[D-14],$=S[D-13],k=me(S[D-30],S[D-29]),F=q(S[D-30],S[D-29]),he=S[D-32],N=S[D-31];S[D]=y(C,E,B,$,k,F,he,N),S[D+1]=_(C,E,B,$,k,F,he,N)}},"_prepareBlock"),"_prepareBlock"),K.prototype._update=a(i(function(d,g){this._prepareBlock(d,g);var S=this.W,D=this.h[0],C=this.h[1],E=this.h[2],B=this.h[3],$=this.h[4],k=this.h[5],F=this.h[6],he=this.h[7],N=this.h[8],Y=this.h[9],J=this.h[10],M=this.h[11],z=this.h[12],te=this.h[13],oe=this.h[14],ge=this.h[15];s(this.k.length===S.length);for(var ke=0;ke<S.length;ke+=2){var _e=oe,fe=ge,Ce=se(N,Y),pe=ue(N,Y),we=U(N,Y,J,M,z,te),Q=j(N,Y,J,M,z,te),ve=this.k[ke],Me=this.k[ke+1],Ue=S[ke],Re=S[ke+1],je=T(_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re),rt=O(_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re);_e=I(D,C),fe=H(D,C),Ce=V(D,C,E,B,$,k),pe=G(D,C,E,B,$,k);var le=v(_e,fe,Ce,pe),ce=b(_e,fe,Ce,pe);oe=z,ge=te,z=J,te=M,J=N,M=Y,N=v(F,he,je,rt),Y=b(he,he,je,rt),F=$,he=k,$=E,k=B,E=D,B=C,D=v(je,rt,le,ce),C=b(je,rt,le,ce)}p(this.h,0,D,C),p(this.h,2,E,B),p(this.h,4,$,k),p(this.h,6,F,he),p(this.h,8,N,Y),p(this.h,10,J,M),p(this.h,12,z,te),p(this.h,14,oe,ge)},"_update"),"_update"),K.prototype._digest=a(i(function(d){return d==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest");function U(m,d,g,S,D){var C=m&g^~m&D;return C<0&&(C+=4294967296),C}i(U,"ch64_hi"),a(U,"ch64_hi");function j(m,d,g,S,D,C){var E=d&S^~d&C;return E<0&&(E+=4294967296),E}i(j,"ch64_lo"),a(j,"ch64_lo");function V(m,d,g,S,D){var C=m&g^m&D^g&D;return C<0&&(C+=4294967296),C}i(V,"maj64_hi"),a(V,"maj64_hi");function G(m,d,g,S,D,C){var E=d&S^d&C^S&C;return E<0&&(E+=4294967296),E}i(G,"maj64_lo"),a(G,"maj64_lo");function I(m,d){var g=o(m,d,28),S=o(d,m,2),D=o(d,m,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(I,"s0_512_hi"),a(I,"s0_512_hi");function H(m,d){var g=c(m,d,28),S=c(d,m,2),D=c(d,m,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(H,"s0_512_lo"),a(H,"s0_512_lo");function se(m,d){var g=o(m,d,14),S=o(m,d,18),D=o(d,m,9),C=g^S^D;return C<0&&(C+=4294967296),C}i(se,"s1_512_hi"),a(se,"s1_512_hi");function ue(m,d){var g=c(m,d,14),S=c(m,d,18),D=c(d,m,9),C=g^S^D;return C<0&&(C+=4294967296),C}i(ue,"s1_512_lo"),a(ue,"s1_512_lo");function me(m,d){var g=o(m,d,1),S=o(m,d,8),D=f(m,d,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(me,"g0_512_hi"),a(me,"g0_512_hi");function q(m,d){var g=c(m,d,1),S=c(m,d,8),D=h(m,d,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(q,"g0_512_lo"),a(q,"g0_512_lo");function w(m,d){var g=o(m,d,19),S=o(d,m,29),D=f(m,d,6),C=g^S^D;return C<0&&(C+=4294967296),C}i(w,"g1_512_hi"),a(w,"g1_512_hi");function x(m,d){var g=c(m,d,19),S=c(d,m,29),D=h(m,d,6),C=g^S^D;return C<0&&(C+=4294967296),C}i(x,"g1_512_lo"),a(x,"g1_512_lo")}}),BU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js"(e,t){"use strict";var r=zs(),n=ex();function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i(s,"SHA384"),a(s,"SHA384"),r.inherits(s,n),t.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=a(i(function(c){return c==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},"digest2"),"digest")}}),LU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js"(e){"use strict";e.sha1=NU(),e.sha224=PU(),e.sha256=QS(),e.sha384=BU(),e.sha512=ex()}}),FU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js"(e){"use strict";var t=zs(),r=hd(),n=t.rotl32,s=t.sum32,o=t.sum32_3,c=t.sum32_4,f=r.BlockHash;function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}i(h,"RIPEMD160"),a(h,"RIPEMD160"),t.inherits(h,f),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=a(i(function(P,K){for(var U=this.h[0],j=this.h[1],V=this.h[2],G=this.h[3],I=this.h[4],H=U,se=j,ue=V,me=G,q=I,w=0;w<80;w++){var x=s(n(c(U,p(w,j,V,G),P[y[w]+K],v(w)),T[w]),I);U=I,I=G,G=n(V,10),V=j,j=x,x=s(n(c(H,p(79-w,se,ue,me),P[_[w]+K],b(w)),O[w]),q),H=q,q=me,me=n(ue,10),ue=se,se=x}x=o(this.h[1],V,me),this.h[1]=o(this.h[2],G,q),this.h[2]=o(this.h[3],I,H),this.h[3]=o(this.h[4],U,se),this.h[4]=o(this.h[0],j,ue),this.h[0]=x},"update2"),"update"),h.prototype._digest=a(i(function(P){return P==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")},"digest2"),"digest");function p(R,P,K,U){return R<=15?P^K^U:R<=31?P&K|~P&U:R<=47?(P|~K)^U:R<=63?P&U|K&~U:P^(K|~U)}i(p,"f2"),a(p,"f");function v(R){return R<=15?0:R<=31?1518500249:R<=47?1859775393:R<=63?2400959708:2840853838}i(v,"K"),a(v,"K");function b(R){return R<=15?1352829926:R<=31?1548603684:R<=47?1836072691:R<=63?2053994217:0}i(b,"Kh"),a(b,"Kh");var y=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],T=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],O=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}}),UU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js"(e,t){"use strict";var r=zs(),n=Mc();function s(o,c,f){if(!(this instanceof s))return new s(o,c,f);this.Hash=o,this.blockSize=o.blockSize/8,this.outSize=o.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(c,f))}i(s,"Hmac"),a(s,"Hmac"),t.exports=s,s.prototype._init=a(i(function(c){c.length>this.blockSize&&(c=new this.Hash().update(c).digest()),n(c.length<=this.blockSize);for(var f=c.length;f<this.blockSize;f++)c.push(0);for(f=0;f<c.length;f++)c[f]^=54;for(this.inner=new this.Hash().update(c),f=0;f<c.length;f++)c[f]^=106;this.outer=new this.Hash().update(c)},"init2"),"init"),s.prototype.update=a(i(function(c,f){return this.inner.update(c,f),this},"update2"),"update"),s.prototype.digest=a(i(function(c){return this.outer.update(this.inner.digest()),this.outer.digest(c)},"digest2"),"digest")}}),dm=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js"(e){var t=e;t.utils=zs(),t.common=hd(),t.sha=LU(),t.ripemd=FU(),t.hmac=UU(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}}),$U=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js"(e,t){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}}),s2=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curves.js"(e){"use strict";var t=e,r=dm(),n=YS(),s=qi(),o=s.assert;function c(p){p.type==="short"?this.curve=new n.short(p):p.type==="edwards"?this.curve=new n.edwards(p):this.curve=new n.mont(p),this.g=this.curve.g,this.n=this.curve.n,this.hash=p.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i(c,"PresetCurve"),a(c,"PresetCurve"),t.PresetCurve=c;function f(p,v){Object.defineProperty(t,p,{configurable:!0,enumerable:!0,get:function(){var b=new c(v);return Object.defineProperty(t,p,{configurable:!0,enumerable:!0,value:b}),b}})}i(f,"defineCurve"),a(f,"defineCurve"),f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var h;try{h=$U()}catch{h=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",h]})}}),jU=ze({"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js"(e,t){"use strict";var r=dm(),n=ZS(),s=Mc();function o(c){if(!(this instanceof o))return new o(c);this.hash=c.hash,this.predResist=!!c.predResist,this.outLen=this.hash.outSize,this.minEntropy=c.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=n.toArray(c.entropy,c.entropyEnc||"hex"),h=n.toArray(c.nonce,c.nonceEnc||"hex"),p=n.toArray(c.pers,c.persEnc||"hex");s(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,h,p)}i(o,"HmacDRBG2"),a(o,"HmacDRBG"),t.exports=o,o.prototype._init=a(i(function(f,h,p){var v=f.concat(h).concat(p);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b<this.V.length;b++)this.K[b]=0,this.V[b]=1;this._update(v),this._reseed=1,this.reseedInterval=281474976710656},"init2"),"init"),o.prototype._hmac=a(i(function(){return new r.hmac(this.hash,this.K)},"hmac2"),"hmac"),o.prototype._update=a(i(function(f){var h=this._hmac().update(this.V).update([0]);f&&(h=h.update(f)),this.K=h.digest(),this.V=this._hmac().update(this.V).digest(),f&&(this.K=this._hmac().update(this.V).update([1]).update(f).digest(),this.V=this._hmac().update(this.V).digest())},"update2"),"update"),o.prototype.reseed=a(i(function(f,h,p,v){typeof h!="string"&&(v=p,p=h,h=null),f=n.toArray(f,h),p=n.toArray(p,v),s(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(p||[])),this._reseed=1},"reseed2"),"reseed"),o.prototype.generate=a(i(function(f,h,p,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof h!="string"&&(v=p,p=h,h=null),p&&(p=n.toArray(p,v||"hex"),this._update(p));for(var b=[];b.length<f;)this.V=this._hmac().update(this.V).digest(),b=b.concat(this.V);var y=b.slice(0,f);return this._update(p),this._reseed++,n.encode(y,h)},"generate3"),"generate")}}),zU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/key.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert;function o(c,f){this.ec=c,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}i(o,"KeyPair2"),a(o,"KeyPair"),t.exports=o,o.fromPublic=a(i(function(f,h,p){return h instanceof o?h:new o(f,{pub:h,pubEnc:p})},"fromPublic2"),"fromPublic"),o.fromPrivate=a(i(function(f,h,p){return h instanceof o?h:new o(f,{priv:h,privEnc:p})},"fromPrivate2"),"fromPrivate"),o.prototype.validate=a(i(function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},"validate6"),"validate"),o.prototype.getPublic=a(i(function(f,h){return typeof f=="string"&&(h=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),h?this.pub.encode(h,f):this.pub},"getPublic2"),"getPublic"),o.prototype.getPrivate=a(i(function(f){return f==="hex"?this.priv.toString(16,2):this.priv},"getPrivate2"),"getPrivate"),o.prototype._importPrivate=a(i(function(f,h){this.priv=new r(f,h||16),this.priv=this.priv.umod(this.ec.curve.n)},"_importPrivate2"),"_importPrivate"),o.prototype._importPublic=a(i(function(f,h){if(f.x||f.y){this.ec.curve.type==="mont"?s(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&s(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,h)},"_importPublic2"),"_importPublic"),o.prototype.derive=a(i(function(f){return f.validate()||s(f.validate(),"public point not validated"),f.mul(this.priv).getX()},"derive2"),"derive"),o.prototype.sign=a(i(function(f,h,p){return this.ec.sign(f,this,h,p)},"sign5"),"sign"),o.prototype.verify=a(i(function(f,h){return this.ec.verify(f,h,this)},"verify5"),"verify"),o.prototype.inspect=a(i(function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},"inspect4"),"inspect")}}),HU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/signature.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert;function o(v,b){if(v instanceof o)return v;this._importDER(v,b)||(s(v.r&&v.s,"Signature without r or s"),this.r=new r(v.r,16),this.s=new r(v.s,16),v.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}i(o,"Signature2"),a(o,"Signature"),t.exports=o;function c(){this.place=0}i(c,"Position2"),a(c,"Position");function f(v,b){var y=v[b.place++];if(!(y&128))return y;var _=y&15;if(_===0||_>4)return!1;for(var T=0,O=0,R=b.place;O<_;O++,R++)T<<=8,T|=v[R],T>>>=0;return T<=127?!1:(b.place=R,T)}i(f,"getLength2"),a(f,"getLength");function h(v){for(var b=0,y=v.length-1;!v[b]&&!(v[b+1]&128)&&b<y;)b++;return b===0?v:v.slice(b)}i(h,"rmPadding2"),a(h,"rmPadding"),o.prototype._importDER=a(i(function(b,y){b=n.toArray(b,y);var _=new c;if(b[_.place++]!==48)return!1;var T=f(b,_);if(T===!1||T+_.place!==b.length||b[_.place++]!==2)return!1;var O=f(b,_);if(O===!1)return!1;var R=b.slice(_.place,O+_.place);if(_.place+=O,b[_.place++]!==2)return!1;var P=f(b,_);if(P===!1||b.length!==P+_.place)return!1;var K=b.slice(_.place,P+_.place);if(R[0]===0)if(R[1]&128)R=R.slice(1);else return!1;if(K[0]===0)if(K[1]&128)K=K.slice(1);else return!1;return this.r=new r(R),this.s=new r(K),this.recoveryParam=null,!0},"_importDER2"),"_importDER");function p(v,b){if(b<128){v.push(b);return}var y=1+(Math.log(b)/Math.LN2>>>3);for(v.push(y|128);--y;)v.push(b>>>(y<<3)&255);v.push(b)}i(p,"constructLength2"),a(p,"constructLength"),o.prototype.toDER=a(i(function(b){var y=this.r.toArray(),_=this.s.toArray();for(y[0]&128&&(y=[0].concat(y)),_[0]&128&&(_=[0].concat(_)),y=h(y),_=h(_);!_[0]&&!(_[1]&128);)_=_.slice(1);var T=[2];p(T,y.length),T=T.concat(y),T.push(2),p(T,_.length);var O=T.concat(_),R=[48];return p(R,O.length),R=R.concat(O),n.encode(R,b)},"toDER2"),"toDER")}}),qU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/index.js"(e,t){"use strict";var r=xa(),n=jU(),s=qi(),o=s2(),c=JS(),f=s.assert,h=zU(),p=HU();function v(b){if(!(this instanceof v))return new v(b);typeof b=="string"&&(f(Object.prototype.hasOwnProperty.call(o,b),"Unknown curve "+b),b=o[b]),b instanceof o.PresetCurve&&(b={curve:b}),this.curve=b.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=b.curve.g,this.g.precompute(b.curve.n.bitLength()+1),this.hash=b.hash||b.curve.hash}i(v,"EC2"),a(v,"EC"),t.exports=v,v.prototype.keyPair=a(i(function(y){return new h(this,y)},"keyPair2"),"keyPair"),v.prototype.keyFromPrivate=a(i(function(y,_){return h.fromPrivate(this,y,_)},"keyFromPrivate2"),"keyFromPrivate"),v.prototype.keyFromPublic=a(i(function(y,_){return h.fromPublic(this,y,_)},"keyFromPublic2"),"keyFromPublic"),v.prototype.genKeyPair=a(i(function(y){y||(y={});for(var _=new n({hash:this.hash,pers:y.pers,persEnc:y.persEnc||"utf8",entropy:y.entropy||c(this.hash.hmacStrength),entropyEnc:y.entropy&&y.entropyEnc||"utf8",nonce:this.n.toArray()}),T=this.n.byteLength(),O=this.n.sub(new r(2));;){var R=new r(_.generate(T));if(!(R.cmp(O)>0))return R.iaddn(1),this.keyFromPrivate(R)}},"genKeyPair2"),"genKeyPair"),v.prototype._truncateToN=a(i(function(y,_){var T=y.byteLength()*8-this.n.bitLength();return T>0&&(y=y.ushrn(T)),!_&&y.cmp(this.n)>=0?y.sub(this.n):y},"_truncateToN2"),"_truncateToN"),v.prototype.sign=a(i(function(y,_,T,O){typeof T=="object"&&(O=T,T=null),O||(O={}),_=this.keyFromPrivate(_,T),y=this._truncateToN(new r(y,16));for(var R=this.n.byteLength(),P=_.getPrivate().toArray("be",R),K=y.toArray("be",R),U=new n({hash:this.hash,entropy:P,nonce:K,pers:O.pers,persEnc:O.persEnc||"utf8"}),j=this.n.sub(new r(1)),V=0;;V++){var G=O.k?O.k(V):new r(U.generate(this.n.byteLength()));if(G=this._truncateToN(G,!0),!(G.cmpn(1)<=0||G.cmp(j)>=0)){var I=this.g.mul(G);if(!I.isInfinity()){var H=I.getX(),se=H.umod(this.n);if(se.cmpn(0)!==0){var ue=G.invm(this.n).mul(se.mul(_.getPrivate()).iadd(y));if(ue=ue.umod(this.n),ue.cmpn(0)!==0){var me=(I.getY().isOdd()?1:0)|(H.cmp(se)!==0?2:0);return O.canonical&&ue.cmp(this.nh)>0&&(ue=this.n.sub(ue),me^=1),new p({r:se,s:ue,recoveryParam:me})}}}}}},"sign5"),"sign"),v.prototype.verify=a(i(function(y,_,T,O){y=this._truncateToN(new r(y,16)),T=this.keyFromPublic(T,O),_=new p(_,"hex");var R=_.r,P=_.s;if(R.cmpn(1)<0||R.cmp(this.n)>=0||P.cmpn(1)<0||P.cmp(this.n)>=0)return!1;var K=P.invm(this.n),U=K.mul(y).umod(this.n),j=K.mul(R).umod(this.n),V;return this.curve._maxwellTrick?(V=this.g.jmulAdd(U,T.getPublic(),j),V.isInfinity()?!1:V.eqXToP(R)):(V=this.g.mulAdd(U,T.getPublic(),j),V.isInfinity()?!1:V.getX().umod(this.n).cmp(R)===0)},"verify5"),"verify"),v.prototype.recoverPubKey=function(b,y,_,T){f((3&_)===_,"The recovery param is more than two bits"),y=new p(y,T);var O=this.n,R=new r(b),P=y.r,K=y.s,U=_&1,j=_>>1;if(P.cmp(this.curve.p.umod(this.curve.n))>=0&&j)throw new Error("Unable to find sencond key candinate");j?P=this.curve.pointFromX(P.add(this.curve.n),U):P=this.curve.pointFromX(P,U);var V=y.r.invm(O),G=O.sub(R).mul(V).umod(O),I=K.mul(V).umod(O);return this.g.mulAdd(G,P,I)},v.prototype.getKeyRecoveryParam=function(b,y,_,T){if(y=new p(y,T),y.recoveryParam!==null)return y.recoveryParam;for(var O=0;O<4;O++){var R;try{R=this.recoverPubKey(b,y,O)}catch{continue}if(R.eq(_))return O}throw new Error("Unable to find valid recovery factor")}}}),KU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/key.js"(e,t){"use strict";var r=qi(),n=r.assert,s=r.parseBytes,o=r.cachedProperty;function c(f,h){this.eddsa=f,this._secret=s(h.secret),f.isPoint(h.pub)?this._pub=h.pub:this._pubBytes=s(h.pub)}i(c,"KeyPair2"),a(c,"KeyPair"),c.fromPublic=a(i(function(h,p){return p instanceof c?p:new c(h,{pub:p})},"fromPublic2"),"fromPublic"),c.fromSecret=a(i(function(h,p){return p instanceof c?p:new c(h,{secret:p})},"fromSecret"),"fromSecret"),c.prototype.secret=a(i(function(){return this._secret},"secret"),"secret"),o(c,"pubBytes",a(i(function(){return this.eddsa.encodePoint(this.pub())},"pubBytes"),"pubBytes")),o(c,"pub",a(i(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())},"pub"),"pub")),o(c,"privBytes",a(i(function(){var h=this.eddsa,p=this.hash(),v=h.encodingLength-1,b=p.slice(0,h.encodingLength);return b[0]&=248,b[v]&=127,b[v]|=64,b},"privBytes"),"privBytes")),o(c,"priv",a(i(function(){return this.eddsa.decodeInt(this.privBytes())},"priv"),"priv")),o(c,"hash",a(i(function(){return this.eddsa.hash().update(this.secret()).digest()},"hash3"),"hash")),o(c,"messagePrefix",a(i(function(){return this.hash().slice(this.eddsa.encodingLength)},"messagePrefix2"),"messagePrefix")),c.prototype.sign=a(i(function(h){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(h,this)},"sign5"),"sign"),c.prototype.verify=a(i(function(h,p){return this.eddsa.verify(h,p,this)},"verify5"),"verify"),c.prototype.getSecret=a(i(function(h){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),h)},"getSecret"),"getSecret"),c.prototype.getPublic=a(i(function(h){return r.encode(this.pubBytes(),h)},"getPublic2"),"getPublic"),t.exports=c}}),VU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/signature.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert,o=n.cachedProperty,c=n.parseBytes;function f(h,p){this.eddsa=h,typeof p!="object"&&(p=c(p)),Array.isArray(p)&&(p={R:p.slice(0,h.encodingLength),S:p.slice(h.encodingLength)}),s(p.R&&p.S,"Signature without R or S"),h.isPoint(p.R)&&(this._R=p.R),p.S instanceof r&&(this._S=p.S),this._Rencoded=Array.isArray(p.R)?p.R:p.Rencoded,this._Sencoded=Array.isArray(p.S)?p.S:p.Sencoded}i(f,"Signature2"),a(f,"Signature"),o(f,"S",a(i(function(){return this.eddsa.decodeInt(this.Sencoded())},"S"),"S")),o(f,"R",a(i(function(){return this.eddsa.decodePoint(this.Rencoded())},"R"),"R")),o(f,"Rencoded",a(i(function(){return this.eddsa.encodePoint(this.R())},"Rencoded"),"Rencoded")),o(f,"Sencoded",a(i(function(){return this.eddsa.encodeInt(this.S())},"Sencoded"),"Sencoded")),f.prototype.toBytes=a(i(function(){return this.Rencoded().concat(this.Sencoded())},"toBytes"),"toBytes"),f.prototype.toHex=a(i(function(){return n.encode(this.toBytes(),"hex").toUpperCase()},"toHex"),"toHex"),t.exports=f}}),GU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/index.js"(e,t){"use strict";var r=dm(),n=s2(),s=qi(),o=s.assert,c=s.parseBytes,f=KU(),h=VU();function p(v){if(o(v==="ed25519","only tested with ed25519 so far"),!(this instanceof p))return new p(v);v=n[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=r.sha512}i(p,"EDDSA"),a(p,"EDDSA"),t.exports=p,p.prototype.sign=a(i(function(b,y){b=c(b);var _=this.keyFromSecret(y),T=this.hashInt(_.messagePrefix(),b),O=this.g.mul(T),R=this.encodePoint(O),P=this.hashInt(R,_.pubBytes(),b).mul(_.priv()),K=T.add(P).umod(this.curve.n);return this.makeSignature({R:O,S:K,Rencoded:R})},"sign5"),"sign"),p.prototype.verify=a(i(function(b,y,_){b=c(b),y=this.makeSignature(y);var T=this.keyFromPublic(_),O=this.hashInt(y.Rencoded(),T.pubBytes(),b),R=this.g.mul(y.S()),P=y.R().add(T.pub().mul(O));return P.eq(R)},"verify5"),"verify"),p.prototype.hashInt=a(i(function(){for(var b=this.hash(),y=0;y<arguments.length;y++)b.update(arguments[y]);return s.intFromLE(b.digest()).umod(this.curve.n)},"hashInt"),"hashInt"),p.prototype.keyFromPublic=a(i(function(b){return f.fromPublic(this,b)},"keyFromPublic2"),"keyFromPublic"),p.prototype.keyFromSecret=a(i(function(b){return f.fromSecret(this,b)},"keyFromSecret"),"keyFromSecret"),p.prototype.makeSignature=a(i(function(b){return b instanceof h?b:new h(this,b)},"makeSignature"),"makeSignature"),p.prototype.encodePoint=a(i(function(b){var y=b.getY().toArray("le",this.encodingLength);return y[this.encodingLength-1]|=b.getX().isOdd()?128:0,y},"encodePoint"),"encodePoint"),p.prototype.decodePoint=a(i(function(b){b=s.parseBytes(b);var y=b.length-1,_=b.slice(0,y).concat(b[y]&-129),T=(b[y]&128)!==0,O=s.intFromLE(_);return this.curve.pointFromY(O,T)},"decodePoint2"),"decodePoint"),p.prototype.encodeInt=a(i(function(b){return b.toArray("le",this.encodingLength)},"encodeInt"),"encodeInt"),p.prototype.decodeInt=a(i(function(b){return s.intFromLE(b)},"decodeInt"),"decodeInt"),p.prototype.isPoint=a(i(function(b){return b instanceof this.pointClass},"isPoint"),"isPoint")}}),WU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic.js"(e){"use strict";var t=e;t.version=kU().version,t.utils=qi(),t.rand=JS(),t.curve=YS(),t.curves=s2(),t.ec=qU(),t.eddsa=GU()}}),ZU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;var t=65536,r=i(class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let n=typeof self<"u"?self.crypto||self.msCrypto:null;n&&n.getRandomValues!==void 0&&(this._crypto=n,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(n){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let s=new Uint8Array(n);for(let o=0;o<s.length;o+=t)this._crypto.getRandomValues(s.subarray(o,o+Math.min(s.length-o,t)));return s}},"BrowserRandomSource");a(r,"BrowserRandomSource"),e.BrowserRandomSource=r}}),JU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;var t=ps(),r=i(class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Qy<"u"){let n=Qy("crypto");n&&n.randomBytes&&(this._crypto=n,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(n){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let s=this._crypto.randomBytes(n);if(s.length!==n)throw new Error("NodeRandomSource: got fewer bytes than requested");let o=new Uint8Array(n);for(let c=0;c<o.length;c++)o[c]=s[c];return(0,t.wipe)(s),o}},"NodeRandomSource");a(r,"NodeRandomSource"),e.NodeRandomSource=r}}),YU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;var t=ZU(),r=JU(),n=i(class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new t.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new r.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(s){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(s)}},"SystemRandomSource");a(n,"SystemRandomSource"),e.SystemRandomSource=n}}),Qu=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;var t=YU(),r=Xu(),n=ps();e.defaultRandomSource=new t.SystemRandomSource;function s(p,v=e.defaultRandomSource){return v.randomBytes(p)}i(s,"randomBytes5"),a(s,"randomBytes"),e.randomBytes=s;function o(p=e.defaultRandomSource){let v=s(4,p),b=(0,r.readUint32LE)(v);return(0,n.wipe)(v),b}i(o,"randomUint32"),a(o,"randomUint32"),e.randomUint32=o;var c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function f(p,v=c,b=e.defaultRandomSource){if(v.length<2)throw new Error("randomString charset is too short");if(v.length>256)throw new Error("randomString charset is too long");let y="",_=v.length,T=256-256%_;for(;p>0;){let O=s(Math.ceil(p*256/T),b);for(let R=0;R<O.length&&p>0;R++){let P=O[R];P<T&&(y+=v.charAt(P%_),p--)}(0,n.wipe)(O)}return y}i(f,"randomString2"),a(f,"randomString"),e.randomString=f;function h(p,v=c,b=e.defaultRandomSource){let y=Math.ceil(p/(Math.log(v.length)/Math.LN2));return f(y,v,b)}i(h,"randomStringForEntropy"),a(h,"randomStringForEntropy"),e.randomStringForEntropy=h}}),XU=ze({"../../../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps();e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var n=function(){function f(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i(f,"SHA5122"),a(f,"SHA512"),f.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},f.prototype.update=function(h,p){if(p===void 0&&(p=h.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var v=0;if(this._bytesHashed+=p,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&p>0;)this._buffer[this._bufferLength++]=h[v++],p--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(p>=this.blockSize&&(v=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,h,v,p),p%=this.blockSize);p>0;)this._buffer[this._bufferLength++]=h[v++],p--;return this},f.prototype.finish=function(h){if(!this._finished){var p=this._bytesHashed,v=this._bufferLength,b=p/536870912|0,y=p<<3,_=p%128<112?128:256;this._buffer[v]=128;for(var T=v+1;T<_-8;T++)this._buffer[T]=0;t.writeUint32BE(b,this._buffer,_-8),t.writeUint32BE(y,this._buffer,_-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,_),this._finished=!0}for(var T=0;T<this.digestLength/8;T++)t.writeUint32BE(this._stateHi[T],h,T*8),t.writeUint32BE(this._stateLo[T],h,T*8+4);return this},f.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},f.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(h){return this._stateHi.set(h.stateHi),this._stateLo.set(h.stateLo),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(h){r.wipe(h.stateHi),r.wipe(h.stateLo),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},f}();e.SHA512=n;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(f,h,p,v,b,y,_){for(var T=p[0],O=p[1],R=p[2],P=p[3],K=p[4],U=p[5],j=p[6],V=p[7],G=v[0],I=v[1],H=v[2],se=v[3],ue=v[4],me=v[5],q=v[6],w=v[7],x,m,d,g,S,D,C,E;_>=128;){for(var B=0;B<16;B++){var $=8*B+y;f[B]=t.readUint32BE(b,$),h[B]=t.readUint32BE(b,$+4)}for(var B=0;B<80;B++){var k=T,F=O,he=R,N=P,Y=K,J=U,M=j,z=V,te=G,oe=I,ge=H,ke=se,_e=ue,fe=me,Ce=q,pe=w;if(x=V,m=w,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=(K>>>14|ue<<32-14)^(K>>>18|ue<<32-18)^(ue>>>41-32|K<<32-(41-32)),m=(ue>>>14|K<<32-14)^(ue>>>18|K<<32-18)^(K>>>41-32|ue<<32-(41-32)),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=K&U^~K&j,m=ue&me^~ue&q,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=s[B*2],m=s[B*2+1],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=f[B%16],m=h[B%16],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,d=C&65535|E<<16,g=S&65535|D<<16,x=d,m=g,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=(T>>>28|G<<32-28)^(G>>>34-32|T<<32-(34-32))^(G>>>39-32|T<<32-(39-32)),m=(G>>>28|T<<32-28)^(T>>>34-32|G<<32-(34-32))^(T>>>39-32|G<<32-(39-32)),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=T&O^T&R^O&R,m=G&I^G&H^I&H,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,z=C&65535|E<<16,pe=S&65535|D<<16,x=N,m=ke,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=d,m=g,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,N=C&65535|E<<16,ke=S&65535|D<<16,O=k,R=F,P=he,K=N,U=Y,j=J,V=M,T=z,I=te,H=oe,se=ge,ue=ke,me=_e,q=fe,w=Ce,G=pe,B%16===15)for(var $=0;$<16;$++)x=f[$],m=h[$],S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=f[($+9)%16],m=h[($+9)%16],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,d=f[($+1)%16],g=h[($+1)%16],x=(d>>>1|g<<32-1)^(d>>>8|g<<32-8)^d>>>7,m=(g>>>1|d<<32-1)^(g>>>8|d<<32-8)^(g>>>7|d<<32-7),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,d=f[($+14)%16],g=h[($+14)%16],x=(d>>>19|g<<32-19)^(g>>>61-32|d<<32-(61-32))^d>>>6,m=(g>>>19|d<<32-19)^(d>>>61-32|g<<32-(61-32))^(g>>>6|d<<32-6),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,f[$]=C&65535|E<<16,h[$]=S&65535|D<<16}x=T,m=G,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[0],m=v[0],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[0]=T=C&65535|E<<16,v[0]=G=S&65535|D<<16,x=O,m=I,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[1],m=v[1],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[1]=O=C&65535|E<<16,v[1]=I=S&65535|D<<16,x=R,m=H,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[2],m=v[2],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[2]=R=C&65535|E<<16,v[2]=H=S&65535|D<<16,x=P,m=se,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[3],m=v[3],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[3]=P=C&65535|E<<16,v[3]=se=S&65535|D<<16,x=K,m=ue,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[4],m=v[4],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[4]=K=C&65535|E<<16,v[4]=ue=S&65535|D<<16,x=U,m=me,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[5],m=v[5],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[5]=U=C&65535|E<<16,v[5]=me=S&65535|D<<16,x=j,m=q,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[6],m=v[6],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[6]=j=C&65535|E<<16,v[6]=q=S&65535|D<<16,x=V,m=w,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[7],m=v[7],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[7]=V=C&65535|E<<16,v[7]=w=S&65535|D<<16,y+=128,_-=128}return y}i(o,"hashBlocks"),a(o,"hashBlocks");function c(f){var h=new n;h.update(f);var p=h.digest();return h.clean(),p}i(c,"hash3"),a(c,"hash"),e.hash=c}}),hm=ze({"../../../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;var t=Qu(),r=XU(),n=ps();e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(N){let Y=new Float64Array(16);if(N)for(let J=0;J<N.length;J++)Y[J]=N[J];return Y}i(s,"gf"),a(s,"gf");var o=new Uint8Array(32);o[0]=9;var c=s(),f=s([1]),h=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),b=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),y=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function _(N,Y){for(let J=0;J<16;J++)N[J]=Y[J]|0}i(_,"set25519"),a(_,"set25519");function T(N){let Y=1;for(let J=0;J<16;J++){let M=N[J]+Y+65535;Y=Math.floor(M/65536),N[J]=M-Y*65536}N[0]+=Y-1+37*(Y-1)}i(T,"car25519"),a(T,"car25519");function O(N,Y,J){let M=~(J-1);for(let z=0;z<16;z++){let te=M&(N[z]^Y[z]);N[z]^=te,Y[z]^=te}}i(O,"sel25519"),a(O,"sel25519");function R(N,Y){let J=s(),M=s();for(let z=0;z<16;z++)M[z]=Y[z];T(M),T(M),T(M);for(let z=0;z<2;z++){J[0]=M[0]-65517;for(let oe=1;oe<15;oe++)J[oe]=M[oe]-65535-(J[oe-1]>>16&1),J[oe-1]&=65535;J[15]=M[15]-32767-(J[14]>>16&1);let te=J[15]>>16&1;J[14]&=65535,O(M,J,1-te)}for(let z=0;z<16;z++)N[2*z]=M[z]&255,N[2*z+1]=M[z]>>8}i(R,"pack25519"),a(R,"pack25519");function P(N,Y){let J=0;for(let M=0;M<32;M++)J|=N[M]^Y[M];return(1&J-1>>>8)-1}i(P,"verify32"),a(P,"verify32");function K(N,Y){let J=new Uint8Array(32),M=new Uint8Array(32);return R(J,N),R(M,Y),P(J,M)}i(K,"neq25519"),a(K,"neq25519");function U(N){let Y=new Uint8Array(32);return R(Y,N),Y[0]&1}i(U,"par25519"),a(U,"par25519");function j(N,Y){for(let J=0;J<16;J++)N[J]=Y[2*J]+(Y[2*J+1]<<8);N[15]&=32767}i(j,"unpack25519"),a(j,"unpack25519");function V(N,Y,J){for(let M=0;M<16;M++)N[M]=Y[M]+J[M]}i(V,"add3"),a(V,"add");function G(N,Y,J){for(let M=0;M<16;M++)N[M]=Y[M]-J[M]}i(G,"sub"),a(G,"sub");function I(N,Y,J){let M,z,te=0,oe=0,ge=0,ke=0,_e=0,fe=0,Ce=0,pe=0,we=0,Q=0,ve=0,Me=0,Ue=0,Re=0,je=0,rt=0,le=0,ce=0,Z=0,re=0,ye=0,Se=0,xe=0,De=0,Mt=0,qe=0,He=0,Ot=0,dt=0,mt=0,Dr=0,ct=J[0],ut=J[1],lr=J[2],lt=J[3],nt=J[4],ar=J[5],it=J[6],Ye=J[7],Qt=J[8],st=J[9],Qe=J[10],or=J[11],at=J[12],Ze=J[13],cr=J[14],ot=J[15];M=Y[0],te+=M*ct,oe+=M*ut,ge+=M*lr,ke+=M*lt,_e+=M*nt,fe+=M*ar,Ce+=M*it,pe+=M*Ye,we+=M*Qt,Q+=M*st,ve+=M*Qe,Me+=M*or,Ue+=M*at,Re+=M*Ze,je+=M*cr,rt+=M*ot,M=Y[1],oe+=M*ct,ge+=M*ut,ke+=M*lr,_e+=M*lt,fe+=M*nt,Ce+=M*ar,pe+=M*it,we+=M*Ye,Q+=M*Qt,ve+=M*st,Me+=M*Qe,Ue+=M*or,Re+=M*at,je+=M*Ze,rt+=M*cr,le+=M*ot,M=Y[2],ge+=M*ct,ke+=M*ut,_e+=M*lr,fe+=M*lt,Ce+=M*nt,pe+=M*ar,we+=M*it,Q+=M*Ye,ve+=M*Qt,Me+=M*st,Ue+=M*Qe,Re+=M*or,je+=M*at,rt+=M*Ze,le+=M*cr,ce+=M*ot,M=Y[3],ke+=M*ct,_e+=M*ut,fe+=M*lr,Ce+=M*lt,pe+=M*nt,we+=M*ar,Q+=M*it,ve+=M*Ye,Me+=M*Qt,Ue+=M*st,Re+=M*Qe,je+=M*or,rt+=M*at,le+=M*Ze,ce+=M*cr,Z+=M*ot,M=Y[4],_e+=M*ct,fe+=M*ut,Ce+=M*lr,pe+=M*lt,we+=M*nt,Q+=M*ar,ve+=M*it,Me+=M*Ye,Ue+=M*Qt,Re+=M*st,je+=M*Qe,rt+=M*or,le+=M*at,ce+=M*Ze,Z+=M*cr,re+=M*ot,M=Y[5],fe+=M*ct,Ce+=M*ut,pe+=M*lr,we+=M*lt,Q+=M*nt,ve+=M*ar,Me+=M*it,Ue+=M*Ye,Re+=M*Qt,je+=M*st,rt+=M*Qe,le+=M*or,ce+=M*at,Z+=M*Ze,re+=M*cr,ye+=M*ot,M=Y[6],Ce+=M*ct,pe+=M*ut,we+=M*lr,Q+=M*lt,ve+=M*nt,Me+=M*ar,Ue+=M*it,Re+=M*Ye,je+=M*Qt,rt+=M*st,le+=M*Qe,ce+=M*or,Z+=M*at,re+=M*Ze,ye+=M*cr,Se+=M*ot,M=Y[7],pe+=M*ct,we+=M*ut,Q+=M*lr,ve+=M*lt,Me+=M*nt,Ue+=M*ar,Re+=M*it,je+=M*Ye,rt+=M*Qt,le+=M*st,ce+=M*Qe,Z+=M*or,re+=M*at,ye+=M*Ze,Se+=M*cr,xe+=M*ot,M=Y[8],we+=M*ct,Q+=M*ut,ve+=M*lr,Me+=M*lt,Ue+=M*nt,Re+=M*ar,je+=M*it,rt+=M*Ye,le+=M*Qt,ce+=M*st,Z+=M*Qe,re+=M*or,ye+=M*at,Se+=M*Ze,xe+=M*cr,De+=M*ot,M=Y[9],Q+=M*ct,ve+=M*ut,Me+=M*lr,Ue+=M*lt,Re+=M*nt,je+=M*ar,rt+=M*it,le+=M*Ye,ce+=M*Qt,Z+=M*st,re+=M*Qe,ye+=M*or,Se+=M*at,xe+=M*Ze,De+=M*cr,Mt+=M*ot,M=Y[10],ve+=M*ct,Me+=M*ut,Ue+=M*lr,Re+=M*lt,je+=M*nt,rt+=M*ar,le+=M*it,ce+=M*Ye,Z+=M*Qt,re+=M*st,ye+=M*Qe,Se+=M*or,xe+=M*at,De+=M*Ze,Mt+=M*cr,qe+=M*ot,M=Y[11],Me+=M*ct,Ue+=M*ut,Re+=M*lr,je+=M*lt,rt+=M*nt,le+=M*ar,ce+=M*it,Z+=M*Ye,re+=M*Qt,ye+=M*st,Se+=M*Qe,xe+=M*or,De+=M*at,Mt+=M*Ze,qe+=M*cr,He+=M*ot,M=Y[12],Ue+=M*ct,Re+=M*ut,je+=M*lr,rt+=M*lt,le+=M*nt,ce+=M*ar,Z+=M*it,re+=M*Ye,ye+=M*Qt,Se+=M*st,xe+=M*Qe,De+=M*or,Mt+=M*at,qe+=M*Ze,He+=M*cr,Ot+=M*ot,M=Y[13],Re+=M*ct,je+=M*ut,rt+=M*lr,le+=M*lt,ce+=M*nt,Z+=M*ar,re+=M*it,ye+=M*Ye,Se+=M*Qt,xe+=M*st,De+=M*Qe,Mt+=M*or,qe+=M*at,He+=M*Ze,Ot+=M*cr,dt+=M*ot,M=Y[14],je+=M*ct,rt+=M*ut,le+=M*lr,ce+=M*lt,Z+=M*nt,re+=M*ar,ye+=M*it,Se+=M*Ye,xe+=M*Qt,De+=M*st,Mt+=M*Qe,qe+=M*or,He+=M*at,Ot+=M*Ze,dt+=M*cr,mt+=M*ot,M=Y[15],rt+=M*ct,le+=M*ut,ce+=M*lr,Z+=M*lt,re+=M*nt,ye+=M*ar,Se+=M*it,xe+=M*Ye,De+=M*Qt,Mt+=M*st,qe+=M*Qe,He+=M*or,Ot+=M*at,dt+=M*Ze,mt+=M*cr,Dr+=M*ot,te+=38*le,oe+=38*ce,ge+=38*Z,ke+=38*re,_e+=38*ye,fe+=38*Se,Ce+=38*xe,pe+=38*De,we+=38*Mt,Q+=38*qe,ve+=38*He,Me+=38*Ot,Ue+=38*dt,Re+=38*mt,je+=38*Dr,z=1,M=te+z+65535,z=Math.floor(M/65536),te=M-z*65536,M=oe+z+65535,z=Math.floor(M/65536),oe=M-z*65536,M=ge+z+65535,z=Math.floor(M/65536),ge=M-z*65536,M=ke+z+65535,z=Math.floor(M/65536),ke=M-z*65536,M=_e+z+65535,z=Math.floor(M/65536),_e=M-z*65536,M=fe+z+65535,z=Math.floor(M/65536),fe=M-z*65536,M=Ce+z+65535,z=Math.floor(M/65536),Ce=M-z*65536,M=pe+z+65535,z=Math.floor(M/65536),pe=M-z*65536,M=we+z+65535,z=Math.floor(M/65536),we=M-z*65536,M=Q+z+65535,z=Math.floor(M/65536),Q=M-z*65536,M=ve+z+65535,z=Math.floor(M/65536),ve=M-z*65536,M=Me+z+65535,z=Math.floor(M/65536),Me=M-z*65536,M=Ue+z+65535,z=Math.floor(M/65536),Ue=M-z*65536,M=Re+z+65535,z=Math.floor(M/65536),Re=M-z*65536,M=je+z+65535,z=Math.floor(M/65536),je=M-z*65536,M=rt+z+65535,z=Math.floor(M/65536),rt=M-z*65536,te+=z-1+37*(z-1),z=1,M=te+z+65535,z=Math.floor(M/65536),te=M-z*65536,M=oe+z+65535,z=Math.floor(M/65536),oe=M-z*65536,M=ge+z+65535,z=Math.floor(M/65536),ge=M-z*65536,M=ke+z+65535,z=Math.floor(M/65536),ke=M-z*65536,M=_e+z+65535,z=Math.floor(M/65536),_e=M-z*65536,M=fe+z+65535,z=Math.floor(M/65536),fe=M-z*65536,M=Ce+z+65535,z=Math.floor(M/65536),Ce=M-z*65536,M=pe+z+65535,z=Math.floor(M/65536),pe=M-z*65536,M=we+z+65535,z=Math.floor(M/65536),we=M-z*65536,M=Q+z+65535,z=Math.floor(M/65536),Q=M-z*65536,M=ve+z+65535,z=Math.floor(M/65536),ve=M-z*65536,M=Me+z+65535,z=Math.floor(M/65536),Me=M-z*65536,M=Ue+z+65535,z=Math.floor(M/65536),Ue=M-z*65536,M=Re+z+65535,z=Math.floor(M/65536),Re=M-z*65536,M=je+z+65535,z=Math.floor(M/65536),je=M-z*65536,M=rt+z+65535,z=Math.floor(M/65536),rt=M-z*65536,te+=z-1+37*(z-1),N[0]=te,N[1]=oe,N[2]=ge,N[3]=ke,N[4]=_e,N[5]=fe,N[6]=Ce,N[7]=pe,N[8]=we,N[9]=Q,N[10]=ve,N[11]=Me,N[12]=Ue,N[13]=Re,N[14]=je,N[15]=rt}i(I,"mul3"),a(I,"mul");function H(N,Y){I(N,Y,Y)}i(H,"square"),a(H,"square");function se(N,Y){let J=s(),M;for(M=0;M<16;M++)J[M]=Y[M];for(M=253;M>=0;M--)H(J,J),M!==2&&M!==4&&I(J,J,Y);for(M=0;M<16;M++)N[M]=J[M]}i(se,"inv25519"),a(se,"inv25519");function ue(N,Y){let J=s(),M;for(M=0;M<16;M++)J[M]=Y[M];for(M=250;M>=0;M--)H(J,J),M!==1&&I(J,J,Y);for(M=0;M<16;M++)N[M]=J[M]}i(ue,"pow2523"),a(ue,"pow2523");function me(N,Y){let J=s(),M=s(),z=s(),te=s(),oe=s(),ge=s(),ke=s(),_e=s(),fe=s();G(J,N[1],N[0]),G(fe,Y[1],Y[0]),I(J,J,fe),V(M,N[0],N[1]),V(fe,Y[0],Y[1]),I(M,M,fe),I(z,N[3],Y[3]),I(z,z,p),I(te,N[2],Y[2]),V(te,te,te),G(oe,M,J),G(ge,te,z),V(ke,te,z),V(_e,M,J),I(N[0],oe,ge),I(N[1],_e,ke),I(N[2],ke,ge),I(N[3],oe,_e)}i(me,"edadd"),a(me,"edadd");function q(N,Y,J){for(let M=0;M<4;M++)O(N[M],Y[M],J)}i(q,"cswap"),a(q,"cswap");function w(N,Y){let J=s(),M=s(),z=s();se(z,Y[2]),I(J,Y[0],z),I(M,Y[1],z),R(N,M),N[31]^=U(J)<<7}i(w,"pack"),a(w,"pack");function x(N,Y,J){_(N[0],c),_(N[1],f),_(N[2],f),_(N[3],c);for(let M=255;M>=0;--M){let z=J[M/8|0]>>(M&7)&1;q(N,Y,z),me(Y,N),me(N,N),q(N,Y,z)}}i(x,"scalarmult"),a(x,"scalarmult");function m(N,Y){let J=[s(),s(),s(),s()];_(J[0],v),_(J[1],b),_(J[2],f),I(J[3],v,b),x(N,J,Y)}i(m,"scalarbase"),a(m,"scalarbase");function d(N){if(N.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);let Y=(0,r.hash)(N);Y[0]&=248,Y[31]&=127,Y[31]|=64;let J=new Uint8Array(32),M=[s(),s(),s(),s()];m(M,Y),w(J,M);let z=new Uint8Array(64);return z.set(N),z.set(J,32),{publicKey:J,secretKey:z}}i(d,"generateKeyPairFromSeed2"),a(d,"generateKeyPairFromSeed"),e.generateKeyPairFromSeed=d;function g(N){let Y=(0,t.randomBytes)(32,N),J=d(Y);return(0,n.wipe)(Y),J}i(g,"generateKeyPair2"),a(g,"generateKeyPair"),e.generateKeyPair=g;function S(N){if(N.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(N.subarray(32))}i(S,"extractPublicKeyFromSecretKey"),a(S,"extractPublicKeyFromSecretKey"),e.extractPublicKeyFromSecretKey=S;var D=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function C(N,Y){let J,M,z,te;for(M=63;M>=32;--M){for(J=0,z=M-32,te=M-12;z<te;++z)Y[z]+=J-16*Y[M]*D[z-(M-32)],J=Math.floor((Y[z]+128)/256),Y[z]-=J*256;Y[z]+=J,Y[M]=0}for(J=0,z=0;z<32;z++)Y[z]+=J-(Y[31]>>4)*D[z],J=Y[z]>>8,Y[z]&=255;for(z=0;z<32;z++)Y[z]-=J*D[z];for(M=0;M<32;M++)Y[M+1]+=Y[M]>>8,N[M]=Y[M]&255}i(C,"modL"),a(C,"modL");function E(N){let Y=new Float64Array(64);for(let J=0;J<64;J++)Y[J]=N[J];for(let J=0;J<64;J++)N[J]=0;C(N,Y)}i(E,"reduce"),a(E,"reduce");function B(N,Y){let J=new Float64Array(64),M=[s(),s(),s(),s()],z=(0,r.hash)(N.subarray(0,32));z[0]&=248,z[31]&=127,z[31]|=64;let te=new Uint8Array(64);te.set(z.subarray(32),32);let oe=new r.SHA512;oe.update(te.subarray(32)),oe.update(Y);let ge=oe.digest();oe.clean(),E(ge),m(M,ge),w(te,M),oe.reset(),oe.update(te.subarray(0,32)),oe.update(N.subarray(32)),oe.update(Y);let ke=oe.digest();E(ke);for(let _e=0;_e<32;_e++)J[_e]=ge[_e];for(let _e=0;_e<32;_e++)for(let fe=0;fe<32;fe++)J[_e+fe]+=ke[_e]*z[fe];return C(te.subarray(32),J),te}i(B,"sign5"),a(B,"sign"),e.sign=B;function $(N,Y){let J=s(),M=s(),z=s(),te=s(),oe=s(),ge=s(),ke=s();return _(N[2],f),j(N[1],Y),H(z,N[1]),I(te,z,h),G(z,z,N[2]),V(te,N[2],te),H(oe,te),H(ge,oe),I(ke,ge,oe),I(J,ke,z),I(J,J,te),ue(J,J),I(J,J,z),I(J,J,te),I(J,J,te),I(N[0],J,te),H(M,N[0]),I(M,M,te),K(M,z)&&I(N[0],N[0],y),H(M,N[0]),I(M,M,te),K(M,z)?-1:(U(N[0])===Y[31]>>7&&G(N[0],c,N[0]),I(N[3],N[0],N[1]),0)}i($,"unpackneg"),a($,"unpackneg");function k(N,Y,J){let M=new Uint8Array(32),z=[s(),s(),s(),s()],te=[s(),s(),s(),s()];if(J.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if($(te,N))return!1;let oe=new r.SHA512;oe.update(J.subarray(0,32)),oe.update(N),oe.update(Y);let ge=oe.digest();return E(ge),x(z,te,ge),m(te,J.subarray(32)),me(z,te),w(M,z),!P(J,M)}i(k,"verify5"),a(k,"verify"),e.verify=k;function F(N){let Y=[s(),s(),s(),s()];if($(Y,N))throw new Error("Ed25519: invalid public key");let J=s(),M=s(),z=Y[1];V(J,f,z),G(M,f,z),se(M,M),I(J,J,M);let te=new Uint8Array(32);return R(te,J),te}i(F,"convertPublicKeyToX255192"),a(F,"convertPublicKeyToX25519"),e.convertPublicKeyToX25519=F;function he(N){let Y=(0,r.hash)(N.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;let J=new Uint8Array(Y.subarray(0,32));return(0,n.wipe)(Y),J}i(he,"convertSecretKeyToX255192"),a(he,"convertSecretKeyToX25519"),e.convertSecretKeyToX25519=he}}),QU=ze({"../../../node_modules/.pnpm/canonicalize@1.0.8/node_modules/canonicalize/lib/canonicalize.js"(e,t){"use strict";t.exports=a(i(function r(n){return n===null||typeof n!="object"||n.toJSON!=null?JSON.stringify(n):Array.isArray(n)?"["+n.reduce((s,o,c)=>{let f=c===0?"":",",h=o===void 0||typeof o=="symbol"?null:o;return s+f+r(h)},"")+"]":"{"+Object.keys(n).sort().reduce((s,o,c)=>{if(n[o]===void 0||typeof n[o]=="symbol")return s;let f=s.length===0?"":",";return s+f+r(o)+":"+r(n[o])},"")+"}"},"serialize2"),"serialize")}}),e$=ze({"../../../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;var t=Qu(),r=ps();e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(j){let V=new Float64Array(16);if(j)for(let G=0;G<j.length;G++)V[G]=j[G];return V}i(n,"gf"),a(n,"gf");var s=new Uint8Array(32);s[0]=9;var o=n([56129,1]);function c(j){let V=1;for(let G=0;G<16;G++){let I=j[G]+V+65535;V=Math.floor(I/65536),j[G]=I-V*65536}j[0]+=V-1+37*(V-1)}i(c,"car25519"),a(c,"car25519");function f(j,V,G){let I=~(G-1);for(let H=0;H<16;H++){let se=I&(j[H]^V[H]);j[H]^=se,V[H]^=se}}i(f,"sel25519"),a(f,"sel25519");function h(j,V){let G=n(),I=n();for(let H=0;H<16;H++)I[H]=V[H];c(I),c(I),c(I);for(let H=0;H<2;H++){G[0]=I[0]-65517;for(let ue=1;ue<15;ue++)G[ue]=I[ue]-65535-(G[ue-1]>>16&1),G[ue-1]&=65535;G[15]=I[15]-32767-(G[14]>>16&1);let se=G[15]>>16&1;G[14]&=65535,f(I,G,1-se)}for(let H=0;H<16;H++)j[2*H]=I[H]&255,j[2*H+1]=I[H]>>8}i(h,"pack25519"),a(h,"pack25519");function p(j,V){for(let G=0;G<16;G++)j[G]=V[2*G]+(V[2*G+1]<<8);j[15]&=32767}i(p,"unpack25519"),a(p,"unpack25519");function v(j,V,G){for(let I=0;I<16;I++)j[I]=V[I]+G[I]}i(v,"add3"),a(v,"add");function b(j,V,G){for(let I=0;I<16;I++)j[I]=V[I]-G[I]}i(b,"sub"),a(b,"sub");function y(j,V,G){let I,H,se=0,ue=0,me=0,q=0,w=0,x=0,m=0,d=0,g=0,S=0,D=0,C=0,E=0,B=0,$=0,k=0,F=0,he=0,N=0,Y=0,J=0,M=0,z=0,te=0,oe=0,ge=0,ke=0,_e=0,fe=0,Ce=0,pe=0,we=G[0],Q=G[1],ve=G[2],Me=G[3],Ue=G[4],Re=G[5],je=G[6],rt=G[7],le=G[8],ce=G[9],Z=G[10],re=G[11],ye=G[12],Se=G[13],xe=G[14],De=G[15];I=V[0],se+=I*we,ue+=I*Q,me+=I*ve,q+=I*Me,w+=I*Ue,x+=I*Re,m+=I*je,d+=I*rt,g+=I*le,S+=I*ce,D+=I*Z,C+=I*re,E+=I*ye,B+=I*Se,$+=I*xe,k+=I*De,I=V[1],ue+=I*we,me+=I*Q,q+=I*ve,w+=I*Me,x+=I*Ue,m+=I*Re,d+=I*je,g+=I*rt,S+=I*le,D+=I*ce,C+=I*Z,E+=I*re,B+=I*ye,$+=I*Se,k+=I*xe,F+=I*De,I=V[2],me+=I*we,q+=I*Q,w+=I*ve,x+=I*Me,m+=I*Ue,d+=I*Re,g+=I*je,S+=I*rt,D+=I*le,C+=I*ce,E+=I*Z,B+=I*re,$+=I*ye,k+=I*Se,F+=I*xe,he+=I*De,I=V[3],q+=I*we,w+=I*Q,x+=I*ve,m+=I*Me,d+=I*Ue,g+=I*Re,S+=I*je,D+=I*rt,C+=I*le,E+=I*ce,B+=I*Z,$+=I*re,k+=I*ye,F+=I*Se,he+=I*xe,N+=I*De,I=V[4],w+=I*we,x+=I*Q,m+=I*ve,d+=I*Me,g+=I*Ue,S+=I*Re,D+=I*je,C+=I*rt,E+=I*le,B+=I*ce,$+=I*Z,k+=I*re,F+=I*ye,he+=I*Se,N+=I*xe,Y+=I*De,I=V[5],x+=I*we,m+=I*Q,d+=I*ve,g+=I*Me,S+=I*Ue,D+=I*Re,C+=I*je,E+=I*rt,B+=I*le,$+=I*ce,k+=I*Z,F+=I*re,he+=I*ye,N+=I*Se,Y+=I*xe,J+=I*De,I=V[6],m+=I*we,d+=I*Q,g+=I*ve,S+=I*Me,D+=I*Ue,C+=I*Re,E+=I*je,B+=I*rt,$+=I*le,k+=I*ce,F+=I*Z,he+=I*re,N+=I*ye,Y+=I*Se,J+=I*xe,M+=I*De,I=V[7],d+=I*we,g+=I*Q,S+=I*ve,D+=I*Me,C+=I*Ue,E+=I*Re,B+=I*je,$+=I*rt,k+=I*le,F+=I*ce,he+=I*Z,N+=I*re,Y+=I*ye,J+=I*Se,M+=I*xe,z+=I*De,I=V[8],g+=I*we,S+=I*Q,D+=I*ve,C+=I*Me,E+=I*Ue,B+=I*Re,$+=I*je,k+=I*rt,F+=I*le,he+=I*ce,N+=I*Z,Y+=I*re,J+=I*ye,M+=I*Se,z+=I*xe,te+=I*De,I=V[9],S+=I*we,D+=I*Q,C+=I*ve,E+=I*Me,B+=I*Ue,$+=I*Re,k+=I*je,F+=I*rt,he+=I*le,N+=I*ce,Y+=I*Z,J+=I*re,M+=I*ye,z+=I*Se,te+=I*xe,oe+=I*De,I=V[10],D+=I*we,C+=I*Q,E+=I*ve,B+=I*Me,$+=I*Ue,k+=I*Re,F+=I*je,he+=I*rt,N+=I*le,Y+=I*ce,J+=I*Z,M+=I*re,z+=I*ye,te+=I*Se,oe+=I*xe,ge+=I*De,I=V[11],C+=I*we,E+=I*Q,B+=I*ve,$+=I*Me,k+=I*Ue,F+=I*Re,he+=I*je,N+=I*rt,Y+=I*le,J+=I*ce,M+=I*Z,z+=I*re,te+=I*ye,oe+=I*Se,ge+=I*xe,ke+=I*De,I=V[12],E+=I*we,B+=I*Q,$+=I*ve,k+=I*Me,F+=I*Ue,he+=I*Re,N+=I*je,Y+=I*rt,J+=I*le,M+=I*ce,z+=I*Z,te+=I*re,oe+=I*ye,ge+=I*Se,ke+=I*xe,_e+=I*De,I=V[13],B+=I*we,$+=I*Q,k+=I*ve,F+=I*Me,he+=I*Ue,N+=I*Re,Y+=I*je,J+=I*rt,M+=I*le,z+=I*ce,te+=I*Z,oe+=I*re,ge+=I*ye,ke+=I*Se,_e+=I*xe,fe+=I*De,I=V[14],$+=I*we,k+=I*Q,F+=I*ve,he+=I*Me,N+=I*Ue,Y+=I*Re,J+=I*je,M+=I*rt,z+=I*le,te+=I*ce,oe+=I*Z,ge+=I*re,ke+=I*ye,_e+=I*Se,fe+=I*xe,Ce+=I*De,I=V[15],k+=I*we,F+=I*Q,he+=I*ve,N+=I*Me,Y+=I*Ue,J+=I*Re,M+=I*je,z+=I*rt,te+=I*le,oe+=I*ce,ge+=I*Z,ke+=I*re,_e+=I*ye,fe+=I*Se,Ce+=I*xe,pe+=I*De,se+=38*F,ue+=38*he,me+=38*N,q+=38*Y,w+=38*J,x+=38*M,m+=38*z,d+=38*te,g+=38*oe,S+=38*ge,D+=38*ke,C+=38*_e,E+=38*fe,B+=38*Ce,$+=38*pe,H=1,I=se+H+65535,H=Math.floor(I/65536),se=I-H*65536,I=ue+H+65535,H=Math.floor(I/65536),ue=I-H*65536,I=me+H+65535,H=Math.floor(I/65536),me=I-H*65536,I=q+H+65535,H=Math.floor(I/65536),q=I-H*65536,I=w+H+65535,H=Math.floor(I/65536),w=I-H*65536,I=x+H+65535,H=Math.floor(I/65536),x=I-H*65536,I=m+H+65535,H=Math.floor(I/65536),m=I-H*65536,I=d+H+65535,H=Math.floor(I/65536),d=I-H*65536,I=g+H+65535,H=Math.floor(I/65536),g=I-H*65536,I=S+H+65535,H=Math.floor(I/65536),S=I-H*65536,I=D+H+65535,H=Math.floor(I/65536),D=I-H*65536,I=C+H+65535,H=Math.floor(I/65536),C=I-H*65536,I=E+H+65535,H=Math.floor(I/65536),E=I-H*65536,I=B+H+65535,H=Math.floor(I/65536),B=I-H*65536,I=$+H+65535,H=Math.floor(I/65536),$=I-H*65536,I=k+H+65535,H=Math.floor(I/65536),k=I-H*65536,se+=H-1+37*(H-1),H=1,I=se+H+65535,H=Math.floor(I/65536),se=I-H*65536,I=ue+H+65535,H=Math.floor(I/65536),ue=I-H*65536,I=me+H+65535,H=Math.floor(I/65536),me=I-H*65536,I=q+H+65535,H=Math.floor(I/65536),q=I-H*65536,I=w+H+65535,H=Math.floor(I/65536),w=I-H*65536,I=x+H+65535,H=Math.floor(I/65536),x=I-H*65536,I=m+H+65535,H=Math.floor(I/65536),m=I-H*65536,I=d+H+65535,H=Math.floor(I/65536),d=I-H*65536,I=g+H+65535,H=Math.floor(I/65536),g=I-H*65536,I=S+H+65535,H=Math.floor(I/65536),S=I-H*65536,I=D+H+65535,H=Math.floor(I/65536),D=I-H*65536,I=C+H+65535,H=Math.floor(I/65536),C=I-H*65536,I=E+H+65535,H=Math.floor(I/65536),E=I-H*65536,I=B+H+65535,H=Math.floor(I/65536),B=I-H*65536,I=$+H+65535,H=Math.floor(I/65536),$=I-H*65536,I=k+H+65535,H=Math.floor(I/65536),k=I-H*65536,se+=H-1+37*(H-1),j[0]=se,j[1]=ue,j[2]=me,j[3]=q,j[4]=w,j[5]=x,j[6]=m,j[7]=d,j[8]=g,j[9]=S,j[10]=D,j[11]=C,j[12]=E,j[13]=B,j[14]=$,j[15]=k}i(y,"mul3"),a(y,"mul");function _(j,V){y(j,V,V)}i(_,"square"),a(_,"square");function T(j,V){let G=n();for(let I=0;I<16;I++)G[I]=V[I];for(let I=253;I>=0;I--)_(G,G),I!==2&&I!==4&&y(G,G,V);for(let I=0;I<16;I++)j[I]=G[I]}i(T,"inv25519"),a(T,"inv25519");function O(j,V){let G=new Uint8Array(32),I=new Float64Array(80),H=n(),se=n(),ue=n(),me=n(),q=n(),w=n();for(let g=0;g<31;g++)G[g]=j[g];G[31]=j[31]&127|64,G[0]&=248,p(I,V);for(let g=0;g<16;g++)se[g]=I[g];H[0]=me[0]=1;for(let g=254;g>=0;--g){let S=G[g>>>3]>>>(g&7)&1;f(H,se,S),f(ue,me,S),v(q,H,ue),b(H,H,ue),v(ue,se,me),b(se,se,me),_(me,q),_(w,H),y(H,ue,H),y(ue,se,q),v(q,H,ue),b(H,H,ue),_(se,H),b(ue,me,w),y(H,ue,o),v(H,H,me),y(ue,ue,H),y(H,me,w),y(me,se,I),_(se,q),f(H,se,S),f(ue,me,S)}for(let g=0;g<16;g++)I[g+16]=H[g],I[g+32]=ue[g],I[g+48]=se[g],I[g+64]=me[g];let x=I.subarray(32),m=I.subarray(16);T(x,x),y(m,m,x);let d=new Uint8Array(32);return h(d,m),d}i(O,"scalarMult"),a(O,"scalarMult"),e.scalarMult=O;function R(j){return O(j,s)}i(R,"scalarMultBase"),a(R,"scalarMultBase"),e.scalarMultBase=R;function P(j){if(j.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);let V=new Uint8Array(j);return{publicKey:R(V),secretKey:V}}i(P,"generateKeyPairFromSeed2"),a(P,"generateKeyPairFromSeed"),e.generateKeyPairFromSeed=P;function K(j){let V=(0,t.randomBytes)(32,j),G=P(V);return(0,r.wipe)(V),G}i(K,"generateKeyPair2"),a(K,"generateKeyPair"),e.generateKeyPair=K;function U(j,V,G=!1){if(j.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(V.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let I=O(j,V);if(G){let H=0;for(let se=0;se<I.length;se++)H|=I[se];if(H===0)throw new Error("X25519: invalid shared key")}return I}i(U,"sharedKey2"),a(U,"sharedKey"),e.sharedKey=U}}),tx=ze({"../../../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps(),n=20;function s(h,p,v){for(var b=1634760805,y=857760878,_=2036477234,T=1797285236,O=v[3]<<24|v[2]<<16|v[1]<<8|v[0],R=v[7]<<24|v[6]<<16|v[5]<<8|v[4],P=v[11]<<24|v[10]<<16|v[9]<<8|v[8],K=v[15]<<24|v[14]<<16|v[13]<<8|v[12],U=v[19]<<24|v[18]<<16|v[17]<<8|v[16],j=v[23]<<24|v[22]<<16|v[21]<<8|v[20],V=v[27]<<24|v[26]<<16|v[25]<<8|v[24],G=v[31]<<24|v[30]<<16|v[29]<<8|v[28],I=p[3]<<24|p[2]<<16|p[1]<<8|p[0],H=p[7]<<24|p[6]<<16|p[5]<<8|p[4],se=p[11]<<24|p[10]<<16|p[9]<<8|p[8],ue=p[15]<<24|p[14]<<16|p[13]<<8|p[12],me=b,q=y,w=_,x=T,m=O,d=R,g=P,S=K,D=U,C=j,E=V,B=G,$=I,k=H,F=se,he=ue,N=0;N<n;N+=2)me=me+m|0,$^=me,$=$>>>32-16|$<<16,D=D+$|0,m^=D,m=m>>>32-12|m<<12,q=q+d|0,k^=q,k=k>>>32-16|k<<16,C=C+k|0,d^=C,d=d>>>32-12|d<<12,w=w+g|0,F^=w,F=F>>>32-16|F<<16,E=E+F|0,g^=E,g=g>>>32-12|g<<12,x=x+S|0,he^=x,he=he>>>32-16|he<<16,B=B+he|0,S^=B,S=S>>>32-12|S<<12,w=w+g|0,F^=w,F=F>>>32-8|F<<8,E=E+F|0,g^=E,g=g>>>32-7|g<<7,x=x+S|0,he^=x,he=he>>>32-8|he<<8,B=B+he|0,S^=B,S=S>>>32-7|S<<7,q=q+d|0,k^=q,k=k>>>32-8|k<<8,C=C+k|0,d^=C,d=d>>>32-7|d<<7,me=me+m|0,$^=me,$=$>>>32-8|$<<8,D=D+$|0,m^=D,m=m>>>32-7|m<<7,me=me+d|0,he^=me,he=he>>>32-16|he<<16,E=E+he|0,d^=E,d=d>>>32-12|d<<12,q=q+g|0,$^=q,$=$>>>32-16|$<<16,B=B+$|0,g^=B,g=g>>>32-12|g<<12,w=w+S|0,k^=w,k=k>>>32-16|k<<16,D=D+k|0,S^=D,S=S>>>32-12|S<<12,x=x+m|0,F^=x,F=F>>>32-16|F<<16,C=C+F|0,m^=C,m=m>>>32-12|m<<12,w=w+S|0,k^=w,k=k>>>32-8|k<<8,D=D+k|0,S^=D,S=S>>>32-7|S<<7,x=x+m|0,F^=x,F=F>>>32-8|F<<8,C=C+F|0,m^=C,m=m>>>32-7|m<<7,q=q+g|0,$^=q,$=$>>>32-8|$<<8,B=B+$|0,g^=B,g=g>>>32-7|g<<7,me=me+d|0,he^=me,he=he>>>32-8|he<<8,E=E+he|0,d^=E,d=d>>>32-7|d<<7;t.writeUint32LE(me+b|0,h,0),t.writeUint32LE(q+y|0,h,4),t.writeUint32LE(w+_|0,h,8),t.writeUint32LE(x+T|0,h,12),t.writeUint32LE(m+O|0,h,16),t.writeUint32LE(d+R|0,h,20),t.writeUint32LE(g+P|0,h,24),t.writeUint32LE(S+K|0,h,28),t.writeUint32LE(D+U|0,h,32),t.writeUint32LE(C+j|0,h,36),t.writeUint32LE(E+V|0,h,40),t.writeUint32LE(B+G|0,h,44),t.writeUint32LE($+I|0,h,48),t.writeUint32LE(k+H|0,h,52),t.writeUint32LE(F+se|0,h,56),t.writeUint32LE(he+ue|0,h,60)}i(s,"core"),a(s,"core");function o(h,p,v,b,y){if(y===void 0&&(y=0),h.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(b.length<v.length)throw new Error("ChaCha: destination is shorter than source");var _,T;if(y===0){if(p.length!==8&&p.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");_=new Uint8Array(16),T=_.length-p.length,_.set(p,T)}else{if(p.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");_=p,T=y}for(var O=new Uint8Array(64),R=0;R<v.length;R+=64){s(O,_,h);for(var P=R;P<R+64&&P<v.length;P++)b[P]=v[P]^O[P-R];f(_,0,T)}return r.wipe(O),y===0&&r.wipe(_),b}i(o,"streamXOR"),a(o,"streamXOR"),e.streamXOR=o;function c(h,p,v,b){return b===void 0&&(b=0),r.wipe(v),o(h,p,v,v,b)}i(c,"stream"),a(c,"stream"),e.stream=c;function f(h,p,v){for(var b=1;v--;)b=b+(h[p]&255)|0,h[p]=b&255,b>>>=8,p++;if(b>0)throw new Error("ChaCha: counter overflow")}i(f,"incrementCounter"),a(f,"incrementCounter")}}),t$=ze({"../../../node_modules/.pnpm/@stablelib+xchacha20@1.0.1/node_modules/@stablelib/xchacha20/lib/xchacha20.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps(),n=tx(),s=20;function o(h,p,v,b){if(p.length!==24)throw new Error("XChaCha20 nonce must be 24 bytes");var y=f(h,p.subarray(0,16),new Uint8Array(32)),_=new Uint8Array(12);_.set(p.subarray(16),4);var T=n.streamXOR(y,_,v,b);return r.wipe(y),T}i(o,"streamXOR"),a(o,"streamXOR"),e.streamXOR=o;function c(h,p,v){return r.wipe(v),o(h,p,v,v)}i(c,"stream"),a(c,"stream"),e.stream=c;function f(h,p,v){for(var b=1634760805,y=857760878,_=2036477234,T=1797285236,O=h[3]<<24|h[2]<<16|h[1]<<8|h[0],R=h[7]<<24|h[6]<<16|h[5]<<8|h[4],P=h[11]<<24|h[10]<<16|h[9]<<8|h[8],K=h[15]<<24|h[14]<<16|h[13]<<8|h[12],U=h[19]<<24|h[18]<<16|h[17]<<8|h[16],j=h[23]<<24|h[22]<<16|h[21]<<8|h[20],V=h[27]<<24|h[26]<<16|h[25]<<8|h[24],G=h[31]<<24|h[30]<<16|h[29]<<8|h[28],I=p[3]<<24|p[2]<<16|p[1]<<8|p[0],H=p[7]<<24|p[6]<<16|p[5]<<8|p[4],se=p[11]<<24|p[10]<<16|p[9]<<8|p[8],ue=p[15]<<24|p[14]<<16|p[13]<<8|p[12],me=b,q=y,w=_,x=T,m=O,d=R,g=P,S=K,D=U,C=j,E=V,B=G,$=I,k=H,F=se,he=ue,N=0;N<s;N+=2)me=me+m|0,$^=me,$=$>>>32-16|$<<16,D=D+$|0,m^=D,m=m>>>32-12|m<<12,q=q+d|0,k^=q,k=k>>>32-16|k<<16,C=C+k|0,d^=C,d=d>>>32-12|d<<12,w=w+g|0,F^=w,F=F>>>32-16|F<<16,E=E+F|0,g^=E,g=g>>>32-12|g<<12,x=x+S|0,he^=x,he=he>>>32-16|he<<16,B=B+he|0,S^=B,S=S>>>32-12|S<<12,w=w+g|0,F^=w,F=F>>>32-8|F<<8,E=E+F|0,g^=E,g=g>>>32-7|g<<7,x=x+S|0,he^=x,he=he>>>32-8|he<<8,B=B+he|0,S^=B,S=S>>>32-7|S<<7,q=q+d|0,k^=q,k=k>>>32-8|k<<8,C=C+k|0,d^=C,d=d>>>32-7|d<<7,me=me+m|0,$^=me,$=$>>>32-8|$<<8,D=D+$|0,m^=D,m=m>>>32-7|m<<7,me=me+d|0,he^=me,he=he>>>32-16|he<<16,E=E+he|0,d^=E,d=d>>>32-12|d<<12,q=q+g|0,$^=q,$=$>>>32-16|$<<16,B=B+$|0,g^=B,g=g>>>32-12|g<<12,w=w+S|0,k^=w,k=k>>>32-16|k<<16,D=D+k|0,S^=D,S=S>>>32-12|S<<12,x=x+m|0,F^=x,F=F>>>32-16|F<<16,C=C+F|0,m^=C,m=m>>>32-12|m<<12,w=w+S|0,k^=w,k=k>>>32-8|k<<8,D=D+k|0,S^=D,S=S>>>32-7|S<<7,x=x+m|0,F^=x,F=F>>>32-8|F<<8,C=C+F|0,m^=C,m=m>>>32-7|m<<7,q=q+g|0,$^=q,$=$>>>32-8|$<<8,B=B+$|0,g^=B,g=g>>>32-7|g<<7,me=me+d|0,he^=me,he=he>>>32-8|he<<8,E=E+he|0,d^=E,d=d>>>32-7|d<<7;return t.writeUint32LE(me,v,0),t.writeUint32LE(q,v,4),t.writeUint32LE(w,v,8),t.writeUint32LE(x,v,12),t.writeUint32LE($,v,16),t.writeUint32LE(k,v,20),t.writeUint32LE(F,v,24),t.writeUint32LE(he,v,28),v}i(f,"hchacha"),a(f,"hchacha"),e.hchacha=f}}),rx=ze({"../../../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(o,c,f){return~(o-1)&c|o-1&f}i(t,"select"),a(t,"select"),e.select=t;function r(o,c){return(o|0)-(c|0)-1>>>31&1}i(r,"lessOrEqual"),a(r,"lessOrEqual"),e.lessOrEqual=r;function n(o,c){if(o.length!==c.length)return 0;for(var f=0,h=0;h<o.length;h++)f|=o[h]^c[h];return 1&f-1>>>8}i(n,"compare4"),a(n,"compare"),e.compare=n;function s(o,c){return o.length===0||c.length===0?!1:n(o,c)!==0}i(s,"equal"),a(s,"equal"),e.equal=s}}),r$=ze({"../../../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=rx(),r=ps();e.DIGEST_LENGTH=16;var n=function(){function c(f){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var h=f[0]|f[1]<<8;this._r[0]=h&8191;var p=f[2]|f[3]<<8;this._r[1]=(h>>>13|p<<3)&8191;var v=f[4]|f[5]<<8;this._r[2]=(p>>>10|v<<6)&7939;var b=f[6]|f[7]<<8;this._r[3]=(v>>>7|b<<9)&8191;var y=f[8]|f[9]<<8;this._r[4]=(b>>>4|y<<12)&255,this._r[5]=y>>>1&8190;var _=f[10]|f[11]<<8;this._r[6]=(y>>>14|_<<2)&8191;var T=f[12]|f[13]<<8;this._r[7]=(_>>>11|T<<5)&8065;var O=f[14]|f[15]<<8;this._r[8]=(T>>>8|O<<8)&8191,this._r[9]=O>>>5&127,this._pad[0]=f[16]|f[17]<<8,this._pad[1]=f[18]|f[19]<<8,this._pad[2]=f[20]|f[21]<<8,this._pad[3]=f[22]|f[23]<<8,this._pad[4]=f[24]|f[25]<<8,this._pad[5]=f[26]|f[27]<<8,this._pad[6]=f[28]|f[29]<<8,this._pad[7]=f[30]|f[31]<<8}return i(c,"Poly13052"),a(c,"Poly1305"),c.prototype._blocks=function(f,h,p){for(var v=this._fin?0:2048,b=this._h[0],y=this._h[1],_=this._h[2],T=this._h[3],O=this._h[4],R=this._h[5],P=this._h[6],K=this._h[7],U=this._h[8],j=this._h[9],V=this._r[0],G=this._r[1],I=this._r[2],H=this._r[3],se=this._r[4],ue=this._r[5],me=this._r[6],q=this._r[7],w=this._r[8],x=this._r[9];p>=16;){var m=f[h+0]|f[h+1]<<8;b+=m&8191;var d=f[h+2]|f[h+3]<<8;y+=(m>>>13|d<<3)&8191;var g=f[h+4]|f[h+5]<<8;_+=(d>>>10|g<<6)&8191;var S=f[h+6]|f[h+7]<<8;T+=(g>>>7|S<<9)&8191;var D=f[h+8]|f[h+9]<<8;O+=(S>>>4|D<<12)&8191,R+=D>>>1&8191;var C=f[h+10]|f[h+11]<<8;P+=(D>>>14|C<<2)&8191;var E=f[h+12]|f[h+13]<<8;K+=(C>>>11|E<<5)&8191;var B=f[h+14]|f[h+15]<<8;U+=(E>>>8|B<<8)&8191,j+=B>>>5|v;var $=0,k=$;k+=b*V,k+=y*(5*x),k+=_*(5*w),k+=T*(5*q),k+=O*(5*me),$=k>>>13,k&=8191,k+=R*(5*ue),k+=P*(5*se),k+=K*(5*H),k+=U*(5*I),k+=j*(5*G),$+=k>>>13,k&=8191;var F=$;F+=b*G,F+=y*V,F+=_*(5*x),F+=T*(5*w),F+=O*(5*q),$=F>>>13,F&=8191,F+=R*(5*me),F+=P*(5*ue),F+=K*(5*se),F+=U*(5*H),F+=j*(5*I),$+=F>>>13,F&=8191;var he=$;he+=b*I,he+=y*G,he+=_*V,he+=T*(5*x),he+=O*(5*w),$=he>>>13,he&=8191,he+=R*(5*q),he+=P*(5*me),he+=K*(5*ue),he+=U*(5*se),he+=j*(5*H),$+=he>>>13,he&=8191;var N=$;N+=b*H,N+=y*I,N+=_*G,N+=T*V,N+=O*(5*x),$=N>>>13,N&=8191,N+=R*(5*w),N+=P*(5*q),N+=K*(5*me),N+=U*(5*ue),N+=j*(5*se),$+=N>>>13,N&=8191;var Y=$;Y+=b*se,Y+=y*H,Y+=_*I,Y+=T*G,Y+=O*V,$=Y>>>13,Y&=8191,Y+=R*(5*x),Y+=P*(5*w),Y+=K*(5*q),Y+=U*(5*me),Y+=j*(5*ue),$+=Y>>>13,Y&=8191;var J=$;J+=b*ue,J+=y*se,J+=_*H,J+=T*I,J+=O*G,$=J>>>13,J&=8191,J+=R*V,J+=P*(5*x),J+=K*(5*w),J+=U*(5*q),J+=j*(5*me),$+=J>>>13,J&=8191;var M=$;M+=b*me,M+=y*ue,M+=_*se,M+=T*H,M+=O*I,$=M>>>13,M&=8191,M+=R*G,M+=P*V,M+=K*(5*x),M+=U*(5*w),M+=j*(5*q),$+=M>>>13,M&=8191;var z=$;z+=b*q,z+=y*me,z+=_*ue,z+=T*se,z+=O*H,$=z>>>13,z&=8191,z+=R*I,z+=P*G,z+=K*V,z+=U*(5*x),z+=j*(5*w),$+=z>>>13,z&=8191;var te=$;te+=b*w,te+=y*q,te+=_*me,te+=T*ue,te+=O*se,$=te>>>13,te&=8191,te+=R*H,te+=P*I,te+=K*G,te+=U*V,te+=j*(5*x),$+=te>>>13,te&=8191;var oe=$;oe+=b*x,oe+=y*w,oe+=_*q,oe+=T*me,oe+=O*ue,$=oe>>>13,oe&=8191,oe+=R*se,oe+=P*H,oe+=K*I,oe+=U*G,oe+=j*V,$+=oe>>>13,oe&=8191,$=($<<2)+$|0,$=$+k|0,k=$&8191,$=$>>>13,F+=$,b=k,y=F,_=he,T=N,O=Y,R=J,P=M,K=z,U=te,j=oe,h+=16,p-=16}this._h[0]=b,this._h[1]=y,this._h[2]=_,this._h[3]=T,this._h[4]=O,this._h[5]=R,this._h[6]=P,this._h[7]=K,this._h[8]=U,this._h[9]=j},c.prototype.finish=function(f,h){h===void 0&&(h=0);var p=new Uint16Array(10),v,b,y,_;if(this._leftover){for(_=this._leftover,this._buffer[_++]=1;_<16;_++)this._buffer[_]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(v=this._h[1]>>>13,this._h[1]&=8191,_=2;_<10;_++)this._h[_]+=v,v=this._h[_]>>>13,this._h[_]&=8191;for(this._h[0]+=v*5,v=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=v,v=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=v,p[0]=this._h[0]+5,v=p[0]>>>13,p[0]&=8191,_=1;_<10;_++)p[_]=this._h[_]+v,v=p[_]>>>13,p[_]&=8191;for(p[9]-=1<<13,b=(v^1)-1,_=0;_<10;_++)p[_]&=b;for(b=~b,_=0;_<10;_++)this._h[_]=this._h[_]&b|p[_];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,y=this._h[0]+this._pad[0],this._h[0]=y&65535,_=1;_<8;_++)y=(this._h[_]+this._pad[_]|0)+(y>>>16)|0,this._h[_]=y&65535;return f[h+0]=this._h[0]>>>0,f[h+1]=this._h[0]>>>8,f[h+2]=this._h[1]>>>0,f[h+3]=this._h[1]>>>8,f[h+4]=this._h[2]>>>0,f[h+5]=this._h[2]>>>8,f[h+6]=this._h[3]>>>0,f[h+7]=this._h[3]>>>8,f[h+8]=this._h[4]>>>0,f[h+9]=this._h[4]>>>8,f[h+10]=this._h[5]>>>0,f[h+11]=this._h[5]>>>8,f[h+12]=this._h[6]>>>0,f[h+13]=this._h[6]>>>8,f[h+14]=this._h[7]>>>0,f[h+15]=this._h[7]>>>8,this._finished=!0,this},c.prototype.update=function(f){var h=0,p=f.length,v;if(this._leftover){v=16-this._leftover,v>p&&(v=p);for(var b=0;b<v;b++)this._buffer[this._leftover+b]=f[h+b];if(p-=v,h+=v,this._leftover+=v,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(p>=16&&(v=p-p%16,this._blocks(f,h,v),h+=v,p-=v),p){for(var b=0;b<p;b++)this._buffer[this._leftover+b]=f[h+b];this._leftover+=p}return this},c.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var f=new Uint8Array(16);return this.finish(f),f},c.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();e.Poly1305=n;function s(c,f){var h=new n(c);h.update(f);var p=h.digest();return h.clean(),p}i(s,"oneTimeAuth"),a(s,"oneTimeAuth"),e.oneTimeAuth=s;function o(c,f){return c.length!==e.DIGEST_LENGTH||f.length!==e.DIGEST_LENGTH?!1:t.equal(c,f)}i(o,"equal"),a(o,"equal"),e.equal=o}}),n$=ze({"../../../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=tx(),r=r$(),n=ps(),s=Xu(),o=rx();e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var c=new Uint8Array(16),f=function(){function h(p){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,p.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(p)}return i(h,"ChaCha20Poly13052"),a(h,"ChaCha20Poly1305"),h.prototype.seal=function(p,v,b,y){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var _=new Uint8Array(16);_.set(p,_.length-p.length);var T=new Uint8Array(32);t.stream(this._key,_,T,4);var O=v.length+this.tagLength,R;if(y){if(y.length!==O)throw new Error("ChaCha20Poly1305: incorrect destination length");R=y}else R=new Uint8Array(O);return t.streamXOR(this._key,_,v,R,4),this._authenticate(R.subarray(R.length-this.tagLength,R.length),T,R.subarray(0,R.length-this.tagLength),b),n.wipe(_),R},h.prototype.open=function(p,v,b,y){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(v.length<this.tagLength)return null;var _=new Uint8Array(16);_.set(p,_.length-p.length);var T=new Uint8Array(32);t.stream(this._key,_,T,4);var O=new Uint8Array(this.tagLength);if(this._authenticate(O,T,v.subarray(0,v.length-this.tagLength),b),!o.equal(O,v.subarray(v.length-this.tagLength,v.length)))return null;var R=v.length-this.tagLength,P;if(y){if(y.length!==R)throw new Error("ChaCha20Poly1305: incorrect destination length");P=y}else P=new Uint8Array(R);return t.streamXOR(this._key,_,v.subarray(0,v.length-this.tagLength),P,4),n.wipe(_),P},h.prototype.clean=function(){return n.wipe(this._key),this},h.prototype._authenticate=function(p,v,b,y){var _=new r.Poly1305(v);y&&(_.update(y),y.length%16>0&&_.update(c.subarray(y.length%16))),_.update(b),b.length%16>0&&_.update(c.subarray(b.length%16));var T=new Uint8Array(8);y&&s.writeUint64LE(y.length,T),_.update(T),s.writeUint64LE(b.length,T),_.update(T);for(var O=_.digest(),R=0;R<O.length;R++)p[R]=O[R];_.clean(),n.wipe(O),n.wipe(T)},h}();e.ChaCha20Poly1305=f}}),i$=ze({"../../../node_modules/.pnpm/@stablelib+xchacha20poly1305@1.0.1/node_modules/@stablelib/xchacha20poly1305/lib/xchacha20poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=t$(),r=n$(),n=ps();e.KEY_LENGTH=32,e.NONCE_LENGTH=24,e.TAG_LENGTH=16;var s=function(){function o(c){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,c.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(c)}return i(o,"XChaCha20Poly13053"),a(o,"XChaCha20Poly1305"),o.prototype.seal=function(c,f,h,p){if(c.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");var v=t.hchacha(this._key,c.subarray(0,16),new Uint8Array(32)),b=new Uint8Array(12);b.set(c.subarray(16),4);var y=new r.ChaCha20Poly1305(v),_=y.seal(b,f,h,p);return n.wipe(v),n.wipe(b),y.clean(),_},o.prototype.open=function(c,f,h,p){if(c.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");if(f.length<this.tagLength)return null;var v=t.hchacha(this._key,c.subarray(0,16),new Uint8Array(32)),b=new Uint8Array(12);b.set(c.subarray(16),4);var y=new r.ChaCha20Poly1305(v),_=y.open(b,f,h,p);return n.wipe(v),n.wipe(b),y.clean(),_},o.prototype.clean=function(){return n.wipe(this._key),this},o}();e.XChaCha20Poly1305=s}}),Hs=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/identifiers.js"(e,t){t.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}}}),pm=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/style.js"(e,t){t.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}}}),s$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-conv-api/transformers.js"(e){var t=e,r=4294967292,n=4294967293,s=4294967294,o=4294967295,c=[0,1,3,7,15,31,63,127,255,511,1023],f=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),p=[];h.forEach(y=>{p.push(y.charCodeAt(0))}),e.utf8={encode(y){let _=[];return y.forEach(T=>{if(T>=0&&T<=127)_.push(T);else if(T<=2047)_.push(192+(T>>6&c[5])),_.push(128+(T&c[6]));else if(T<55296||T>57343&&T<=65535)_.push(224+(T>>12&c[4])),_.push(128+(T>>6&c[6])),_.push(128+(T&c[6]));else if(T>=65536&&T<=1114111){let O=T>>16&c[5];_.push(240+(O>>2)),_.push(128+((O&c[2])<<4)+(T>>12&c[4])),_.push(128+(T>>6&c[6])),_.push(128+(T&c[6]))}else throw new RangeError(`utf8.encode: character out of range: char: ${T}`)}),Buffer.from(_)},decode(y,_){function T(ue,me){if((me&192)!==128)return n;let q=((ue&c[5])<<6)+(me&c[6]);return q<128?r:q}i(T,"bytes2"),a(T,"bytes2");function O(ue,me,q){if((q&192)!==128||(me&192)!==128)return n;let w=((ue&c[4])<<12)+((me&c[6])<<6)+(q&c[6]);return w<2048?r:w>=55296&&w<=57343?s:w}i(O,"bytes3"),a(O,"bytes3");function R(ue,me,q,w){if((w&192)!==128||(q&192)!==128||(me&192)!==128)return n;let x=(((ue&c[3])<<2)+(me>>4&c[2])<<16)+((me&c[4])<<12)+((q&c[6])<<6)+(w&c[6]);return x<65536?r:x>1114111?s:x}i(R,"bytes4"),a(R,"bytes4");let P,K,U,j,V,G,I=y.length,H=_?3:0,se=[];for(;H<I;){K=y[H],P=o;let ue=!0;for(;ue;){if(K>=0&&K<=127){P=K,G=1;break}if(U=H+1,U<I&&K>=194&&K<=223){P=T(K,y[U]),G=2;break}if(j=H+2,j<I&&K>=224&&K<=239){P=O(K,y[U],y[j]),G=3;break}if(V=H+3,V<I&&K>=240&&K<=244){P=R(K,y[U],y[j],y[V]),G=4;break}break}if(P>1114111){let me=`byte[${H}]`;throw P===o?new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${me}`):P===n?new RangeError(`utf8.decode: illegal trailing byte found at: ${me}`):P===s?new RangeError(`utf8.decode: code point out of range found at: ${me}`):P===r?new RangeError(`utf8.decode: non-shortest form found at: ${me}`):new RangeError(`utf8.decode: unrecognized error found at: ${me}`)}se.push(P),H+=G}return se}},e.utf16be={encode(y){let _=[],T,O,R;for(let P=0;P<y.length;P+=1)if(T=y[P],T>=0&&T<=55295||T>=57344&&T<=65535)_.push(T>>8&c[8]),_.push(T&c[8]);else if(T>=65536&&T<=1114111)R=T-65536,O=55296+(R>>10),R=56320+(R&c[10]),_.push(O>>8&c[8]),_.push(O&c[8]),_.push(R>>8&c[8]),_.push(R&c[8]);else throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${P}]: ${T}`);return Buffer.from(_)},decode(y,_){if(y.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${y.length}`);let T=[],O=y.length,R=_?2:0,P=0,K,U,j,V,G,I;for(;R<O;){for(;;){if(j=R+1,j<O){if(G=(y[R]<<8)+y[j],G<55296||G>57343){K=G,U=2;break}if(V=R+3,V<O&&(I=(y[R+2]<<8)+y[V],G<=56319&&I>=56320&&I<=57343)){K=65536+(G-55296<<10)+(I-56320),U=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${R}]`)}T[P++]=K,R+=U}return T}},e.utf16le={encode(y){let _=[],T,O,R;for(let P=0;P<y.length;P+=1)if(T=y[P],T>=0&&T<=55295||T>=57344&&T<=65535)_.push(T&c[8]),_.push(T>>8&c[8]);else if(T>=65536&&T<=1114111)R=T-65536,O=55296+(R>>10),R=56320+(R&c[10]),_.push(O&c[8]),_.push(O>>8&c[8]),_.push(R&c[8]),_.push(R>>8&c[8]);else throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${P}]: ${T}`);return Buffer.from(_)},decode(y,_){if(y.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${y.length}`);let T=[],O=y.length,R=_?2:0,P=0,K,U,j,V,G,I;for(;R<O;){for(;;){if(j=R+1,j<O){if(G=(y[j]<<8)+y[R],G<55296||G>57343){K=G,U=2;break}if(V=R+3,V<O&&(I=(y[V]<<8)+y[R+2],G<=56319&&I>=56320&&I<=57343)){K=65536+(G-55296<<10)+(I-56320),U=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${R}]`)}T[P++]=K,R+=U}return T}},e.utf32be={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{if(O>=55296&&O<=57343||O>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${T/4}]: ${O}`);_[T++]=O>>24&c[8],_[T++]=O>>16&c[8],_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y,_){if(y.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${y.length}`);let T=[],O=_?4:0;for(;O<y.length;O+=4){let R=(y[O]<<24)+(y[O+1]<<16)+(y[O+2]<<8)+y[O+3];if(R>=55296&&R<=57343||R>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${O/4}]: ${R}`);T.push(R)}return T}},e.utf32le={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{if(O>=55296&&O<=57343||O>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${T/4}]: ${O}`);_[T++]=O&c[8],_[T++]=O>>8&c[8],_[T++]=O>>16&c[8],_[T++]=O>>24&c[8]}),_},decode(y,_){if(y.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${y.length}`);let T=[],O=_?4:0;for(;O<y.length;O+=4){let R=(y[O+3]<<24)+(y[O+2]<<16)+(y[O+1]<<8)+y[O];if(R>=55296&&R<=57343||R>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${O/4}]: ${R}`);T.push(R)}return T}},e.uint7={encode(y){let _=Buffer.alloc(y.length);for(let T=0;T<y.length;T+=1){if(y[T]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${T}]: ${y[T]}`);_[T]=y[T]}return _},decode(y){let _=[];for(let T=0;T<y.length;T+=1){if(y[T]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${T}]: ${y[T]}`);_[T]=y[T]}return _}},e.uint8={encode(y){let _=Buffer.alloc(y.length);for(let T=0;T<y.length;T+=1){if(y[T]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${T}]: ${y[T]}`);_[T]=y[T]}return _},decode(y){let _=[];for(let T=0;T<y.length;T+=1)_[T]=y[T];return _}},e.uint16be={encode(y){let _=Buffer.alloc(y.length*2),T=0;return y.forEach(O=>{if(O>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${T/2}]: ${O}`);_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y){if(y.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=2)_.push((y[T]<<8)+y[T+1]);return _}},e.uint16le={encode(y){let _=Buffer.alloc(y.length*2),T=0;return y.forEach(O=>{if(O>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${T/2}]: ${O}`);_[T++]=O&c[8],_[T++]=O>>8&c[8]}),_},decode(y){if(y.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=2)_.push((y[T+1]<<8)+y[T]);return _}},e.uint32be={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{_[T++]=O>>24&c[8],_[T++]=O>>16&c[8],_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y){if(y.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=4)_.push((y[T]<<24)+(y[T+1]<<16)+(y[T+2]<<8)+y[T+3]);return _}},e.uint32le={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{_[T++]=O&c[8],_[T++]=O>>8&c[8],_[T++]=O>>16&c[8],_[T++]=O>>24&c[8]}),_},decode(y){if(y.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=4)_.push((y[T+3]<<24)+(y[T+2]<<16)+(y[T+1]<<8)+y[T]);return _}},e.string={encode(y){return t.utf16le.encode(y).toString("utf16le")},decode(y){return t.utf16le.decode(Buffer.from(y,"utf16le"),0)}},e.escaped={encode(y){let _=[];for(let T=0;T<y.length;T+=1){let O=y[T];if(O===96)_.push(O),_.push(O);else if(O===10)_.push(O);else if(O>=32&&O<=126)_.push(O);else{let R="";if(O>=0&&O<=31)R+=`\`x${f[O]}`;else if(O>=127&&O<=255)R+=`\`x${f[O]}`;else if(O>=256&&O<=65535)R+=`\`u${f[O>>8&c[8]]}${f[O&c[8]]}`;else if(O>=65536&&O<=4294967295){R+="`u{";let K=O>>24&c[8];K>0&&(R+=f[K]),R+=`${f[O>>16&c[8]]+f[O>>8&c[8]]+f[O&c[8]]}}`}else throw new Error("escape.encode(char): char > 0xffffffff not allowed");Buffer.from(R).forEach(K=>{_.push(K)})}}return Buffer.from(_)},decode(y){function _(I){return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}i(_,"isHex"),a(_,"isHex");function T(I,H,se){let ue={char:null,nexti:I+2,error:!0};if(I+1<H&&_(se[I])&&_(se[I+1])){let me=String.fromCodePoint(se[I],se[I+1]);ue.char=parseInt(me,16),Number.isNaN(ue.char)||(ue.error=!1)}return ue}i(T,"getx"),a(T,"getx");function O(I,H,se){let ue={char:null,nexti:I+4,error:!0};if(I+3<H&&_(se[I])&&_(se[I+1])&&_(se[I+2])&&_(se[I+3])){let me=String.fromCodePoint(se[I],se[I+1],se[I+2],se[I+3]);ue.char=parseInt(me,16),Number.isNaN(ue.char)||(ue.error=!1)}return ue}i(O,"getu"),a(O,"getu");function R(I,H,se){let ue={char:null,nexti:I+4,error:!0},me="";for(;I<H&&_(se[I]);)me+=String.fromCodePoint(se[I]),I+=1;return ue.char=parseInt(me,16),se[I]===125&&!Number.isNaN(ue.char)&&(ue.error=!1),ue.nexti=I+1,ue}i(R,"getU"),a(R,"getU");let P=[],K=y.length,U,j,V,G=0;for(;G<K;){for(;;){if(V=!0,y[G]!==96){P.push(y[G]),G+=1,V=!1;break}if(U=G+1,U>=K)break;if(y[U]===96){P.push(96),G+=2,V=!1;break}if(y[U]===120){if(j=T(U+1,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}if(y[U]===117){if(y[U+1]===123){if(j=R(U+2,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}if(j=O(U+1,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}break}if(V)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${G}]`)}return P}};var v=13,b=10;e.lineEnds={crlf(y){let _=[],T=0;for(;T<y.length;)switch(y[T]){case v:T+1<y.length&&y[T+1]===b?T+=2:T+=1,_.push(v),_.push(b);break;case b:_.push(v),_.push(b),T+=1;break;default:_.push(y[T]),T+=1;break}return _.length>0&&_[_.length-1]!==b&&(_.push(v),_.push(b)),_},lf(y){let _=[],T=0;for(;T<y.length;)switch(y[T]){case v:T+1<y.length&&y[T+1]===b?T+=2:T+=1,_.push(b);break;case b:_.push(b),T+=1;break;default:_.push(y[T]),T+=1;break}return _.length>0&&_[_.length-1]!==b&&_.push(b),_}},e.base64={encode(y){if(y.length===0)return Buffer.alloc(0);let _,T,O,R=y.length%3;R=R>0?3-R:0;let P=(y.length+R)/3,K=Buffer.alloc(P*4);R>0&&(P-=1),_=0,T=0;for(let U=0;U<P;U+=1)O=y[_++]<<16,O+=y[_++]<<8,O+=y[_++],K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[O>>6&c[6]],K[T++]=p[O&c[6]];if(R===0)return K;if(R===1)return O=y[_++]<<16,O+=y[_]<<8,K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[O>>6&c[6]],K[T]=p[64],K;if(R===2)return O=y[_]<<16,K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[64],K[T]=p[64],K},decode(y){function _(G){let I=[],H=0;for(let se=0;se<G.length;se+=1){let ue=G[se],me=!0;for(;me&&!(ue===32||ue===9||ue===10||ue===13);){if(ue>=65&&ue<=90){I.push(ue-65);break}if(ue>=97&&ue<=122){I.push(ue-71);break}if(ue>=48&&ue<=57){I.push(ue+4);break}if(ue===43){I.push(62);break}if(ue===47){I.push(63);break}if(ue===61){I.push(64),H+=1;break}throw new RangeError(`base64.decode: invalid character buf[${se}]: ${ue}`)}}if(I.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${I.length}`);switch(H){case 0:break;case 1:if(I[I.length-1]!==64)throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(I[I.length-1]!==64||I[I.length-2]!==64)throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${H}`)}return{tail:H,buf:Buffer.from(I)}}if(i(_,"validate6"),a(_,"validate"),y.length===0)return Buffer.alloc(0);let T=_(y),{tail:O}=T,R=T.buf,P,K,U,j=R.length/4,V=Buffer.alloc(j*3-O);O>0&&(j-=1),K=0,P=0;for(let G=0;G<j;G+=1)U=R[P++]<<18,U+=R[P++]<<12,U+=R[P++]<<6,U+=R[P++],V[K++]=U>>16&c[8],V[K++]=U>>8&c[8],V[K++]=U&c[8];return O===1&&(U=R[P++]<<18,U+=R[P++]<<12,U+=R[P]<<6,V[K++]=U>>16&c[8],V[K]=U>>8&c[8]),O===2&&(U=R[P++]<<18,U+=R[P++]<<12,V[K]=U>>16&c[8]),V},toString(y){if(y.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${y.length}`);let _="",T=0;function O(P,K,U,j){switch(T){case 76:_+=`\r
|
|
57
|
+
`}}),zS=pr({"../../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/index.js"(){js(),r2(),Tc(),LS(),Ju()}}),k0,MU,HS=pr({"../../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/src/basics.js"(){vU(),gU(),yU(),bU(),wU(),wS(),fd(),e2(),t2(),_U(),om(),jS(),AU(),TU(),zS(),k0={...eS,...rS,...iS,...aS,...cS,...fS,..._S,...AS,...xS,...IS},MU={...FS,...$S}}});function Uy(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}i(Uy,"createCodec");var $y,c0,cA,i2,qS=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/util/bases.js"(){HS(),Qb(),a(Uy,"createCodec"),$y=Uy("utf8","u",e=>{let t=new TextDecoder("utf8");return"u"+t.decode(e)},e=>new TextEncoder().encode(e.substring(1))),c0=Uy("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);let t=Xb(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),cA={utf8:$y,"utf-8":$y,hex:k0.base16,latin1:c0,ascii:c0,binary:c0,...k0},i2=cA}}),KS={};Sr(KS,{fromString:()=>br});function br(e,t="utf8"){let r=i2[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?sm(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}i(br,"fromString2");var um=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/from-string.js"(){qS(),am(),a(br,"fromString")}}),VS={};Sr(VS,{toString:()=>Mr});function Mr(e,t="utf8"){let r=i2[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}i(Mr,"toString2");var dd=pr({"../../../node_modules/.pnpm/uint8arrays@3.1.1/node_modules/uint8arrays/esm/src/to-string.js"(){qS(),a(Mr,"toString")}}),CU=ze({"../../../node_modules/.pnpm/@stablelib+int@1.0.1/node_modules/@stablelib/int/lib/int.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(f,h){var p=f>>>16&65535,v=f&65535,b=h>>>16&65535,y=h&65535;return v*y+(p*y+v*b<<16>>>0)|0}i(t,"imulShim"),a(t,"imulShim"),e.mul=Math.imul||t;function r(f,h){return f+h|0}i(r,"add3"),a(r,"add"),e.add=r;function n(f,h){return f-h|0}i(n,"sub"),a(n,"sub"),e.sub=n;function s(f,h){return f<<h|f>>>32-h}i(s,"rotl"),a(s,"rotl"),e.rotl=s;function o(f,h){return f<<32-h|f>>>h}i(o,"rotr"),a(o,"rotr"),e.rotr=o;function c(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f}i(c,"isIntegerShim"),a(c,"isIntegerShim"),e.isInteger=Number.isInteger||c,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(f){return e.isInteger(f)&&f>=-e.MAX_SAFE_INTEGER&&f<=e.MAX_SAFE_INTEGER}}}),Xu=ze({"../../../node_modules/.pnpm/@stablelib+binary@1.0.1/node_modules/@stablelib/binary/lib/binary.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=CU();function r(d,g){return g===void 0&&(g=0),(d[g+0]<<8|d[g+1])<<16>>16}i(r,"readInt16BE"),a(r,"readInt16BE"),e.readInt16BE=r;function n(d,g){return g===void 0&&(g=0),(d[g+0]<<8|d[g+1])>>>0}i(n,"readUint16BE"),a(n,"readUint16BE"),e.readUint16BE=n;function s(d,g){return g===void 0&&(g=0),(d[g+1]<<8|d[g])<<16>>16}i(s,"readInt16LE"),a(s,"readInt16LE"),e.readInt16LE=s;function o(d,g){return g===void 0&&(g=0),(d[g+1]<<8|d[g])>>>0}i(o,"readUint16LE"),a(o,"readUint16LE"),e.readUint16LE=o;function c(d,g,S){return g===void 0&&(g=new Uint8Array(2)),S===void 0&&(S=0),g[S+0]=d>>>8,g[S+1]=d>>>0,g}i(c,"writeUint16BE"),a(c,"writeUint16BE"),e.writeUint16BE=c,e.writeInt16BE=c;function f(d,g,S){return g===void 0&&(g=new Uint8Array(2)),S===void 0&&(S=0),g[S+0]=d>>>0,g[S+1]=d>>>8,g}i(f,"writeUint16LE"),a(f,"writeUint16LE"),e.writeUint16LE=f,e.writeInt16LE=f;function h(d,g){return g===void 0&&(g=0),d[g]<<24|d[g+1]<<16|d[g+2]<<8|d[g+3]}i(h,"readInt32BE"),a(h,"readInt32BE"),e.readInt32BE=h;function p(d,g){return g===void 0&&(g=0),(d[g]<<24|d[g+1]<<16|d[g+2]<<8|d[g+3])>>>0}i(p,"readUint32BE"),a(p,"readUint32BE"),e.readUint32BE=p;function v(d,g){return g===void 0&&(g=0),d[g+3]<<24|d[g+2]<<16|d[g+1]<<8|d[g]}i(v,"readInt32LE"),a(v,"readInt32LE"),e.readInt32LE=v;function b(d,g){return g===void 0&&(g=0),(d[g+3]<<24|d[g+2]<<16|d[g+1]<<8|d[g])>>>0}i(b,"readUint32LE"),a(b,"readUint32LE"),e.readUint32LE=b;function y(d,g,S){return g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0),g[S+0]=d>>>24,g[S+1]=d>>>16,g[S+2]=d>>>8,g[S+3]=d>>>0,g}i(y,"writeUint32BE2"),a(y,"writeUint32BE"),e.writeUint32BE=y,e.writeInt32BE=y;function _(d,g,S){return g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0),g[S+0]=d>>>0,g[S+1]=d>>>8,g[S+2]=d>>>16,g[S+3]=d>>>24,g}i(_,"writeUint32LE"),a(_,"writeUint32LE"),e.writeUint32LE=_,e.writeInt32LE=_;function T(d,g){g===void 0&&(g=0);var S=h(d,g),D=h(d,g+4);return S*4294967296+D-(D>>31)*4294967296}i(T,"readInt64BE"),a(T,"readInt64BE"),e.readInt64BE=T;function O(d,g){g===void 0&&(g=0);var S=p(d,g),D=p(d,g+4);return S*4294967296+D}i(O,"readUint64BE"),a(O,"readUint64BE"),e.readUint64BE=O;function R(d,g){g===void 0&&(g=0);var S=v(d,g),D=v(d,g+4);return D*4294967296+S-(S>>31)*4294967296}i(R,"readInt64LE"),a(R,"readInt64LE"),e.readInt64LE=R;function P(d,g){g===void 0&&(g=0);var S=b(d,g),D=b(d,g+4);return D*4294967296+S}i(P,"readUint64LE"),a(P,"readUint64LE"),e.readUint64LE=P;function K(d,g,S){return g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0),y(d/4294967296>>>0,g,S),y(d>>>0,g,S+4),g}i(K,"writeUint64BE"),a(K,"writeUint64BE"),e.writeUint64BE=K,e.writeInt64BE=K;function U(d,g,S){return g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0),_(d>>>0,g,S),_(d/4294967296>>>0,g,S+4),g}i(U,"writeUint64LE"),a(U,"writeUint64LE"),e.writeUint64LE=U,e.writeInt64LE=U;function j(d,g,S){if(S===void 0&&(S=0),d%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(d/8>g.length-S)throw new Error("readUintBE: array is too short for the given bitLength");for(var D=0,C=1,E=d/8+S-1;E>=S;E--)D+=g[E]*C,C*=256;return D}i(j,"readUintBE"),a(j,"readUintBE"),e.readUintBE=j;function V(d,g,S){if(S===void 0&&(S=0),d%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(d/8>g.length-S)throw new Error("readUintLE: array is too short for the given bitLength");for(var D=0,C=1,E=S;E<S+d/8;E++)D+=g[E]*C,C*=256;return D}i(V,"readUintLE"),a(V,"readUintLE"),e.readUintLE=V;function G(d,g,S,D){if(S===void 0&&(S=new Uint8Array(d/8)),D===void 0&&(D=0),d%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!t.isSafeInteger(g))throw new Error("writeUintBE value must be an integer");for(var C=1,E=d/8+D-1;E>=D;E--)S[E]=g/C&255,C*=256;return S}i(G,"writeUintBE"),a(G,"writeUintBE"),e.writeUintBE=G;function I(d,g,S,D){if(S===void 0&&(S=new Uint8Array(d/8)),D===void 0&&(D=0),d%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!t.isSafeInteger(g))throw new Error("writeUintLE value must be an integer");for(var C=1,E=D;E<D+d/8;E++)S[E]=g/C&255,C*=256;return S}i(I,"writeUintLE"),a(I,"writeUintLE"),e.writeUintLE=I;function H(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat32(g)}i(H,"readFloat32BE"),a(H,"readFloat32BE"),e.readFloat32BE=H;function se(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat32(g,!0)}i(se,"readFloat32LE"),a(se,"readFloat32LE"),e.readFloat32LE=se;function ue(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat64(g)}i(ue,"readFloat64BE"),a(ue,"readFloat64BE"),e.readFloat64BE=ue;function me(d,g){g===void 0&&(g=0);var S=new DataView(d.buffer,d.byteOffset,d.byteLength);return S.getFloat64(g,!0)}i(me,"readFloat64LE"),a(me,"readFloat64LE"),e.readFloat64LE=me;function q(d,g,S){g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat32(S,d),g}i(q,"writeFloat32BE"),a(q,"writeFloat32BE"),e.writeFloat32BE=q;function w(d,g,S){g===void 0&&(g=new Uint8Array(4)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat32(S,d,!0),g}i(w,"writeFloat32LE"),a(w,"writeFloat32LE"),e.writeFloat32LE=w;function x(d,g,S){g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat64(S,d),g}i(x,"writeFloat64BE"),a(x,"writeFloat64BE"),e.writeFloat64BE=x;function m(d,g,S){g===void 0&&(g=new Uint8Array(8)),S===void 0&&(S=0);var D=new DataView(g.buffer,g.byteOffset,g.byteLength);return D.setFloat64(S,d,!0),g}i(m,"writeFloat64LE"),a(m,"writeFloat64LE"),e.writeFloat64LE=m}}),ps=ze({"../../../node_modules/.pnpm/@stablelib+wipe@1.0.1/node_modules/@stablelib/wipe/lib/wipe.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(r){for(var n=0;n<r.length;n++)r[n]=0;return r}i(t,"wipe"),a(t,"wipe"),e.wipe=t}}),IU=ze({"../../../node_modules/.pnpm/@stablelib+sha256@1.0.1/node_modules/@stablelib/sha256/lib/sha256.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps();e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var n=function(){function f(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i(f,"SHA2562"),a(f,"SHA256"),f.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},f.prototype.update=function(h,p){if(p===void 0&&(p=h.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var v=0;if(this._bytesHashed+=p,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&p>0;)this._buffer[this._bufferLength++]=h[v++],p--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(p>=this.blockSize&&(v=o(this._temp,this._state,h,v,p),p%=this.blockSize);p>0;)this._buffer[this._bufferLength++]=h[v++],p--;return this},f.prototype.finish=function(h){if(!this._finished){var p=this._bytesHashed,v=this._bufferLength,b=p/536870912|0,y=p<<3,_=p%64<56?64:128;this._buffer[v]=128;for(var T=v+1;T<_-8;T++)this._buffer[T]=0;t.writeUint32BE(b,this._buffer,_-8),t.writeUint32BE(y,this._buffer,_-4),o(this._temp,this._state,this._buffer,0,_),this._finished=!0}for(var T=0;T<this.digestLength/4;T++)t.writeUint32BE(this._state[T],h,T*4);return this},f.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},f.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(h){return this._state.set(h.state),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(h){r.wipe(h.state),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},f}();e.SHA256=n;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(f,h,p,v,b){for(;b>=64;){for(var y=h[0],_=h[1],T=h[2],O=h[3],R=h[4],P=h[5],K=h[6],U=h[7],j=0;j<16;j++){var V=v+j*4;f[j]=t.readUint32BE(p,V)}for(var j=16;j<64;j++){var G=f[j-2],I=(G>>>17|G<<32-17)^(G>>>19|G<<32-19)^G>>>10;G=f[j-15];var H=(G>>>7|G<<32-7)^(G>>>18|G<<32-18)^G>>>3;f[j]=(I+f[j-7]|0)+(H+f[j-16]|0)}for(var j=0;j<64;j++){var I=(((R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7))+(R&P^~R&K)|0)+(U+(s[j]+f[j]|0)|0)|0,H=((y>>>2|y<<32-2)^(y>>>13|y<<32-13)^(y>>>22|y<<32-22))+(y&_^y&T^_&T)|0;U=K,K=P,P=R,R=O+I|0,O=T,T=_,_=y,y=I+H|0}h[0]+=y,h[1]+=_,h[2]+=T,h[3]+=O,h[4]+=R,h[5]+=P,h[6]+=K,h[7]+=U,v+=64,b-=64}return v}i(o,"hashBlocks"),a(o,"hashBlocks");function c(f){var h=new n;h.update(f);var p=h.digest();return h.clean(),p}i(c,"hash3"),a(c,"hash"),e.hash=c}}),GS=ze({"../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js"(e,t){(function(){"use strict";var r="input is invalid type",n="finalize already called",s=typeof window=="object",o=s?window:{};o.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&typeof self=="object",f=!o.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;f?o=global:c&&(o=self);var h=!o.JS_SHA3_NO_COMMON_JS&&typeof t=="object"&&t.exports,p=typeof define=="function"&&define.amd,v=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",b="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],_=[4,1024,262144,67108864],T=[1,256,65536,16777216],O=[6,1536,393216,100663296],R=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],K=[224,256,384,512],U=[128,256],j=["hex","buffer","arrayBuffer","array","digest"],V={"128":168,"256":136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(N){return Object.prototype.toString.call(N)==="[object Array]"}),v&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(N){return typeof N=="object"&&N.buffer&&N.buffer.constructor===ArrayBuffer});for(var G=a(function(N,Y,J){return function(M){return new k(N,Y,N).update(M)[J]()}},"createOutputMethod"),I=a(function(N,Y,J){return function(M,z){return new k(N,Y,z).update(M)[J]()}},"createShakeOutputMethod"),H=a(function(N,Y,J){return function(M,z,re,oe){return d["cshake"+N].update(M,z,re,oe)[J]()}},"createCshakeOutputMethod"),se=a(function(N,Y,J){return function(M,z,re,oe){return d["kmac"+N].update(M,z,re,oe)[J]()}},"createKmacOutputMethod"),ue=a(function(N,Y,J,M){for(var z=0;z<j.length;++z){var re=j[z];N[re]=Y(J,M,re)}return N},"createOutputMethods"),me=a(function(N,Y){var J=G(N,Y,"hex");return J.create=function(){return new k(N,Y,N)},J.update=function(M){return J.create().update(M)},ue(J,G,N,Y)},"createMethod"),q=a(function(N,Y){var J=I(N,Y,"hex");return J.create=function(M){return new k(N,Y,M)},J.update=function(M,z){return J.create(z).update(M)},ue(J,I,N,Y)},"createShakeMethod"),w=a(function(N,Y){var J=V[N],M=H(N,Y,"hex");return M.create=function(z,re,oe){return!re&&!oe?d["shake"+N].create(z):new k(N,Y,z).bytepad([re,oe],J)},M.update=function(z,re,oe,ge){return M.create(re,oe,ge).update(z)},ue(M,H,N,Y)},"createCshakeMethod"),x=a(function(N,Y){var J=V[N],M=se(N,Y,"hex");return M.create=function(z,re,oe){return new F(N,Y,re).bytepad(["KMAC",oe],J).bytepad([z],J)},M.update=function(z,re,oe,ge){return M.create(z,oe,ge).update(re)},ue(M,se,N,Y)},"createKmacMethod"),m=[{name:"keccak",padding:T,bits:K,createMethod:me},{name:"sha3",padding:O,bits:K,createMethod:me},{name:"shake",padding:y,bits:U,createMethod:q},{name:"cshake",padding:_,bits:U,createMethod:w},{name:"kmac",padding:_,bits:U,createMethod:x}],d={},g=[],S=0;S<m.length;++S)for(var D=m[S],C=D.bits,E=0;E<C.length;++E){var B=D.name+"_"+C[E];if(g.push(B),d[B]=D.createMethod(C[E],D.padding),D.name!=="sha3"){var $=D.name+C[E];g.push($),d[$]=d[B]}}function k(N,Y,J){this.blocks=[],this.s=[],this.padding=Y,this.outputBits=J,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(N<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=J>>5,this.extraBytes=(J&31)>>3;for(var M=0;M<50;++M)this.s[M]=0}i(k,"Keccak"),a(k,"Keccak"),k.prototype.update=function(N){if(this.finalized)throw new Error(n);var Y,J=typeof N;if(J!=="string"){if(J==="object"){if(N===null)throw new Error(r);if(v&&N.constructor===ArrayBuffer)N=new Uint8Array(N);else if(!Array.isArray(N)&&(!v||!ArrayBuffer.isView(N)))throw new Error(r)}else throw new Error(r);Y=!0}for(var M=this.blocks,z=this.byteCount,re=N.length,oe=this.blockCount,ge=0,ke=this.s,_e,fe;ge<re;){if(this.reset)for(this.reset=!1,M[0]=this.block,_e=1;_e<oe+1;++_e)M[_e]=0;if(Y)for(_e=this.start;ge<re&&_e<z;++ge)M[_e>>2]|=N[ge]<<R[_e++&3];else for(_e=this.start;ge<re&&_e<z;++ge)fe=N.charCodeAt(ge),fe<128?M[_e>>2]|=fe<<R[_e++&3]:fe<2048?(M[_e>>2]|=(192|fe>>6)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]):fe<55296||fe>=57344?(M[_e>>2]|=(224|fe>>12)<<R[_e++&3],M[_e>>2]|=(128|fe>>6&63)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]):(fe=65536+((fe&1023)<<10|N.charCodeAt(++ge)&1023),M[_e>>2]|=(240|fe>>18)<<R[_e++&3],M[_e>>2]|=(128|fe>>12&63)<<R[_e++&3],M[_e>>2]|=(128|fe>>6&63)<<R[_e++&3],M[_e>>2]|=(128|fe&63)<<R[_e++&3]);if(this.lastByteIndex=_e,_e>=z){for(this.start=_e-z,this.block=M[oe],_e=0;_e<oe;++_e)ke[_e]^=M[_e];he(ke),this.reset=!0}else this.start=_e}return this},k.prototype.encode=function(N,Y){var J=N&255,M=1,z=[J];for(N=N>>8,J=N&255;J>0;)z.unshift(J),N=N>>8,J=N&255,++M;return Y?z.push(M):z.unshift(M),this.update(z),z.length},k.prototype.encodeString=function(N){var Y,J=typeof N;if(J!=="string"){if(J==="object"){if(N===null)throw new Error(r);if(v&&N.constructor===ArrayBuffer)N=new Uint8Array(N);else if(!Array.isArray(N)&&(!v||!ArrayBuffer.isView(N)))throw new Error(r)}else throw new Error(r);Y=!0}var M=0,z=N.length;if(Y)M=z;else for(var re=0;re<N.length;++re){var oe=N.charCodeAt(re);oe<128?M+=1:oe<2048?M+=2:oe<55296||oe>=57344?M+=3:(oe=65536+((oe&1023)<<10|N.charCodeAt(++re)&1023),M+=4)}return M+=this.encode(M*8),this.update(N),M},k.prototype.bytepad=function(N,Y){for(var J=this.encode(Y),M=0;M<N.length;++M)J+=this.encodeString(N[M]);var z=Y-J%Y,re=[];return re.length=z,this.update(re),this},k.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var N=this.blocks,Y=this.lastByteIndex,J=this.blockCount,M=this.s;if(N[Y>>2]|=this.padding[Y&3],this.lastByteIndex===this.byteCount)for(N[0]=N[J],Y=1;Y<J+1;++Y)N[Y]=0;for(N[J-1]|=2147483648,Y=0;Y<J;++Y)M[Y]^=N[Y];he(M)}},k.prototype.toString=k.prototype.hex=function(){this.finalize();for(var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,re=0,oe="",ge;re<J;){for(z=0;z<N&&re<J;++z,++re)ge=Y[z],oe+=b[ge>>4&15]+b[ge&15]+b[ge>>12&15]+b[ge>>8&15]+b[ge>>20&15]+b[ge>>16&15]+b[ge>>28&15]+b[ge>>24&15];re%N===0&&(he(Y),z=0)}return M&&(ge=Y[z],oe+=b[ge>>4&15]+b[ge&15],M>1&&(oe+=b[ge>>12&15]+b[ge>>8&15]),M>2&&(oe+=b[ge>>20&15]+b[ge>>16&15])),oe},k.prototype.arrayBuffer=function(){this.finalize();var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,re=0,oe=this.outputBits>>3,ge;M?ge=new ArrayBuffer(J+1<<2):ge=new ArrayBuffer(oe);for(var ke=new Uint32Array(ge);re<J;){for(z=0;z<N&&re<J;++z,++re)ke[re]=Y[z];re%N===0&&he(Y)}return M&&(ke[z]=Y[z],ge=ge.slice(0,oe)),ge},k.prototype.buffer=k.prototype.arrayBuffer,k.prototype.digest=k.prototype.array=function(){this.finalize();for(var N=this.blockCount,Y=this.s,J=this.outputBlocks,M=this.extraBytes,z=0,re=0,oe=[],ge,ke;re<J;){for(z=0;z<N&&re<J;++z,++re)ge=re<<2,ke=Y[z],oe[ge]=ke&255,oe[ge+1]=ke>>8&255,oe[ge+2]=ke>>16&255,oe[ge+3]=ke>>24&255;re%N===0&&he(Y)}return M&&(ge=re<<2,ke=Y[z],oe[ge]=ke&255,M>1&&(oe[ge+1]=ke>>8&255),M>2&&(oe[ge+2]=ke>>16&255)),oe};function F(N,Y,J){k.call(this,N,Y,J)}i(F,"Kmac"),a(F,"Kmac"),F.prototype=new k,F.prototype.finalize=function(){return this.encode(this.outputBits,!0),k.prototype.finalize.call(this)};var he=a(function(N){var Y,J,M,z,re,oe,ge,ke,_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re,je,rt,le,ce,Z,ne,ye,Se,xe,De,Mt,qe,He,Ot,dt,mt,Dr,ct,ut,lr,lt,nt,ar,it,Ye,Qt,st,Qe,or,at,Ze,cr,ot,Et,Sn,At,yt,fn,er,tr,tn,rn,Or,Hr,nn;for(M=0;M<48;M+=2)z=N[0]^N[10]^N[20]^N[30]^N[40],re=N[1]^N[11]^N[21]^N[31]^N[41],oe=N[2]^N[12]^N[22]^N[32]^N[42],ge=N[3]^N[13]^N[23]^N[33]^N[43],ke=N[4]^N[14]^N[24]^N[34]^N[44],_e=N[5]^N[15]^N[25]^N[35]^N[45],fe=N[6]^N[16]^N[26]^N[36]^N[46],Ce=N[7]^N[17]^N[27]^N[37]^N[47],pe=N[8]^N[18]^N[28]^N[38]^N[48],we=N[9]^N[19]^N[29]^N[39]^N[49],Y=pe^(oe<<1|ge>>>31),J=we^(ge<<1|oe>>>31),N[0]^=Y,N[1]^=J,N[10]^=Y,N[11]^=J,N[20]^=Y,N[21]^=J,N[30]^=Y,N[31]^=J,N[40]^=Y,N[41]^=J,Y=z^(ke<<1|_e>>>31),J=re^(_e<<1|ke>>>31),N[2]^=Y,N[3]^=J,N[12]^=Y,N[13]^=J,N[22]^=Y,N[23]^=J,N[32]^=Y,N[33]^=J,N[42]^=Y,N[43]^=J,Y=oe^(fe<<1|Ce>>>31),J=ge^(Ce<<1|fe>>>31),N[4]^=Y,N[5]^=J,N[14]^=Y,N[15]^=J,N[24]^=Y,N[25]^=J,N[34]^=Y,N[35]^=J,N[44]^=Y,N[45]^=J,Y=ke^(pe<<1|we>>>31),J=_e^(we<<1|pe>>>31),N[6]^=Y,N[7]^=J,N[16]^=Y,N[17]^=J,N[26]^=Y,N[27]^=J,N[36]^=Y,N[37]^=J,N[46]^=Y,N[47]^=J,Y=fe^(z<<1|re>>>31),J=Ce^(re<<1|z>>>31),N[8]^=Y,N[9]^=J,N[18]^=Y,N[19]^=J,N[28]^=Y,N[29]^=J,N[38]^=Y,N[39]^=J,N[48]^=Y,N[49]^=J,Q=N[0],ve=N[1],Qe=N[11]<<4|N[10]>>>28,or=N[10]<<4|N[11]>>>28,De=N[20]<<3|N[21]>>>29,Mt=N[21]<<3|N[20]>>>29,rn=N[31]<<9|N[30]>>>23,Or=N[30]<<9|N[31]>>>23,it=N[40]<<18|N[41]>>>14,Ye=N[41]<<18|N[40]>>>14,mt=N[2]<<1|N[3]>>>31,Dr=N[3]<<1|N[2]>>>31,Me=N[13]<<12|N[12]>>>20,Ue=N[12]<<12|N[13]>>>20,at=N[22]<<10|N[23]>>>22,Ze=N[23]<<10|N[22]>>>22,qe=N[33]<<13|N[32]>>>19,He=N[32]<<13|N[33]>>>19,Hr=N[42]<<2|N[43]>>>30,nn=N[43]<<2|N[42]>>>30,At=N[5]<<30|N[4]>>>2,yt=N[4]<<30|N[5]>>>2,ct=N[14]<<6|N[15]>>>26,ut=N[15]<<6|N[14]>>>26,Re=N[25]<<11|N[24]>>>21,je=N[24]<<11|N[25]>>>21,cr=N[34]<<15|N[35]>>>17,ot=N[35]<<15|N[34]>>>17,Ot=N[45]<<29|N[44]>>>3,dt=N[44]<<29|N[45]>>>3,ne=N[6]<<28|N[7]>>>4,ye=N[7]<<28|N[6]>>>4,fn=N[17]<<23|N[16]>>>9,er=N[16]<<23|N[17]>>>9,lr=N[26]<<25|N[27]>>>7,lt=N[27]<<25|N[26]>>>7,rt=N[36]<<21|N[37]>>>11,le=N[37]<<21|N[36]>>>11,Et=N[47]<<24|N[46]>>>8,Sn=N[46]<<24|N[47]>>>8,Qt=N[8]<<27|N[9]>>>5,st=N[9]<<27|N[8]>>>5,Se=N[18]<<20|N[19]>>>12,xe=N[19]<<20|N[18]>>>12,tr=N[29]<<7|N[28]>>>25,tn=N[28]<<7|N[29]>>>25,nt=N[38]<<8|N[39]>>>24,ar=N[39]<<8|N[38]>>>24,ce=N[48]<<14|N[49]>>>18,Z=N[49]<<14|N[48]>>>18,N[0]=Q^~Me&Re,N[1]=ve^~Ue&je,N[10]=ne^~Se&De,N[11]=ye^~xe&Mt,N[20]=mt^~ct&lr,N[21]=Dr^~ut<,N[30]=Qt^~Qe&at,N[31]=st^~or&Ze,N[40]=At^~fn&tr,N[41]=yt^~er&tn,N[2]=Me^~Re&rt,N[3]=Ue^~je&le,N[12]=Se^~De&qe,N[13]=xe^~Mt&He,N[22]=ct^~lr&nt,N[23]=ut^~lt&ar,N[32]=Qe^~at&cr,N[33]=or^~Ze&ot,N[42]=fn^~tr&rn,N[43]=er^~tn&Or,N[4]=Re^~rt&ce,N[5]=je^~le&Z,N[14]=De^~qe&Ot,N[15]=Mt^~He&dt,N[24]=lr^~nt&it,N[25]=lt^~ar&Ye,N[34]=at^~cr&Et,N[35]=Ze^~ot&Sn,N[44]=tr^~rn&Hr,N[45]=tn^~Or&nn,N[6]=rt^~ce&Q,N[7]=le^~Z&ve,N[16]=qe^~Ot&ne,N[17]=He^~dt&ye,N[26]=nt^~it&mt,N[27]=ar^~Ye&Dr,N[36]=cr^~Et&Qt,N[37]=ot^~Sn&st,N[46]=rn^~Hr&At,N[47]=Or^~nn&yt,N[8]=ce^~Q&Me,N[9]=Z^~ve&Ue,N[18]=Ot^~ne&Se,N[19]=dt^~ye&xe,N[28]=it^~mt&ct,N[29]=Ye^~Dr&ut,N[38]=Et^~Qt&Qe,N[39]=Sn^~st&or,N[48]=Hr^~At&fn,N[49]=nn^~yt&er,N[0]^=P[M],N[1]^=P[M+1]},"f");if(h)t.exports=d;else{for(S=0;S<g.length;++S)o[g[S]]=d[g[S]];p&&define(function(){return d})}})()}}),kU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/package.json"(e,t){t.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}}),WS=ze({"(disabled):../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js"(){}}),xa=ze({"../../../node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js"(e,t){(function(r,n){"use strict";function s(q,w){if(!q)throw new Error(w||"Assertion failed")}i(s,"assert2"),a(s,"assert");function o(q,w){q.super_=w;var x=a(function(){},"TempCtor");x.prototype=w.prototype,q.prototype=new x,q.prototype.constructor=q}i(o,"inherits"),a(o,"inherits");function c(q,w,x){if(c.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((w==="le"||w==="be")&&(x=w,w=10),this._init(q||0,w||10,x||"be"))}i(c,"BN3"),a(c,"BN"),typeof r=="object"?r.exports=c:n.BN=c,c.BN=c,c.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=WS().Buffer}catch{}c.isBN=a(i(function(w){return w instanceof c?!0:w!==null&&typeof w=="object"&&w.constructor.wordSize===c.wordSize&&Array.isArray(w.words)},"isBN"),"isBN"),c.max=a(i(function(w,x){return w.cmp(x)>0?w:x},"max"),"max"),c.min=a(i(function(w,x){return w.cmp(x)<0?w:x},"min"),"min"),c.prototype._init=a(i(function(w,x,m){if(typeof w=="number")return this._initNumber(w,x,m);if(typeof w=="object")return this._initArray(w,x,m);x==="hex"&&(x=16),s(x===(x|0)&&x>=2&&x<=36),w=w.toString().replace(/\s+/g,"");var d=0;w[0]==="-"&&(d++,this.negative=1),d<w.length&&(x===16?this._parseHex(w,d,m):(this._parseBase(w,x,d),m==="le"&&this._initArray(this.toArray(),x,m)))},"init2"),"init"),c.prototype._initNumber=a(i(function(w,x,m){w<0&&(this.negative=1,w=-w),w<67108864?(this.words=[w&67108863],this.length=1):w<4503599627370496?(this.words=[w&67108863,w/67108864&67108863],this.length=2):(s(w<9007199254740992),this.words=[w&67108863,w/67108864&67108863,1],this.length=3),m==="le"&&this._initArray(this.toArray(),x,m)},"_initNumber"),"_initNumber"),c.prototype._initArray=a(i(function(w,x,m){if(s(typeof w.length=="number"),w.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(w.length/3),this.words=new Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var g,S,D=0;if(m==="be")for(d=w.length-1,g=0;d>=0;d-=3)S=w[d]|w[d-1]<<8|w[d-2]<<16,this.words[g]|=S<<D&67108863,this.words[g+1]=S>>>26-D&67108863,D+=24,D>=26&&(D-=26,g++);else if(m==="le")for(d=0,g=0;d<w.length;d+=3)S=w[d]|w[d+1]<<8|w[d+2]<<16,this.words[g]|=S<<D&67108863,this.words[g+1]=S>>>26-D&67108863,D+=24,D>=26&&(D-=26,g++);return this.strip()},"_initArray"),"_initArray");function h(q,w){var x=q.charCodeAt(w);return x>=65&&x<=70?x-55:x>=97&&x<=102?x-87:x-48&15}i(h,"parseHex4Bits"),a(h,"parseHex4Bits");function p(q,w,x){var m=h(q,x);return x-1>=w&&(m|=h(q,x-1)<<4),m}i(p,"parseHexByte"),a(p,"parseHexByte"),c.prototype._parseHex=a(i(function(w,x,m){this.length=Math.ceil((w.length-x)/6),this.words=new Array(this.length);for(var d=0;d<this.length;d++)this.words[d]=0;var g=0,S=0,D;if(m==="be")for(d=w.length-1;d>=x;d-=2)D=p(w,x,d)<<g,this.words[S]|=D&67108863,g>=18?(g-=18,S+=1,this.words[S]|=D>>>26):g+=8;else{var C=w.length-x;for(d=C%2===0?x+1:x;d<w.length;d+=2)D=p(w,x,d)<<g,this.words[S]|=D&67108863,g>=18?(g-=18,S+=1,this.words[S]|=D>>>26):g+=8}this.strip()},"_parseHex"),"_parseHex");function v(q,w,x,m){for(var d=0,g=Math.min(q.length,x),S=w;S<g;S++){var D=q.charCodeAt(S)-48;d*=m,D>=49?d+=D-49+10:D>=17?d+=D-17+10:d+=D}return d}i(v,"parseBase"),a(v,"parseBase"),c.prototype._parseBase=a(i(function(w,x,m){this.words=[0],this.length=1;for(var d=0,g=1;g<=67108863;g*=x)d++;d--,g=g/x|0;for(var S=w.length-m,D=S%d,C=Math.min(S,S-D)+m,E=0,B=m;B<C;B+=d)E=v(w,B,B+d,x),this.imuln(g),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(D!==0){var $=1;for(E=v(w,B,w.length,x),B=0;B<D;B++)$*=x;this.imuln($),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this.strip()},"_parseBase"),"_parseBase"),c.prototype.copy=a(i(function(w){w.words=new Array(this.length);for(var x=0;x<this.length;x++)w.words[x]=this.words[x];w.length=this.length,w.negative=this.negative,w.red=this.red},"copy"),"copy"),c.prototype.clone=a(i(function(){var w=new c(null);return this.copy(w),w},"clone"),"clone"),c.prototype._expand=a(i(function(w){for(;this.length<w;)this.words[this.length++]=0;return this},"_expand"),"_expand"),c.prototype.strip=a(i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),"strip"),c.prototype._normSign=a(i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),"_normSign"),c.prototype.inspect=a(i(function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"},"inspect4"),"inspect");var b=["","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"],y=[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],_=[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];c.prototype.toString=a(i(function(w,x){w=w||10,x=x|0||1;var m;if(w===16||w==="hex"){m="";for(var d=0,g=0,S=0;S<this.length;S++){var D=this.words[S],C=((D<<d|g)&16777215).toString(16);g=D>>>24-d&16777215,g!==0||S!==this.length-1?m=b[6-C.length]+C+m:m=C+m,d+=2,d>=26&&(d-=26,S--)}for(g!==0&&(m=g.toString(16)+m);m.length%x!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(w===(w|0)&&w>=2&&w<=36){var E=y[w],B=_[w];m="";var $=this.clone();for($.negative=0;!$.isZero();){var k=$.modn(B).toString(w);$=$.idivn(B),$.isZero()?m=k+m:m=b[E-k.length]+k+m}for(this.isZero()&&(m="0"+m);m.length%x!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}s(!1,"Base should be between 2 and 36")},"toString4"),"toString"),c.prototype.toNumber=a(i(function(){var w=this.words[0];return this.length===2?w+=this.words[1]*67108864:this.length===3&&this.words[2]===1?w+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-w:w},"toNumber"),"toNumber"),c.prototype.toJSON=a(i(function(){return this.toString(16)},"toJSON2"),"toJSON"),c.prototype.toBuffer=a(i(function(w,x){return s(typeof f<"u"),this.toArrayLike(f,w,x)},"toBuffer"),"toBuffer"),c.prototype.toArray=a(i(function(w,x){return this.toArrayLike(Array,w,x)},"toArray"),"toArray"),c.prototype.toArrayLike=a(i(function(w,x,m){var d=this.byteLength(),g=m||Math.max(1,d);s(d<=g,"byte array longer than desired length"),s(g>0,"Requested array length <= 0"),this.strip();var S=x==="le",D=new w(g),C,E,B=this.clone();if(S){for(E=0;!B.isZero();E++)C=B.andln(255),B.iushrn(8),D[E]=C;for(;E<g;E++)D[E]=0}else{for(E=0;E<g-d;E++)D[E]=0;for(E=0;!B.isZero();E++)C=B.andln(255),B.iushrn(8),D[g-E-1]=C}return D},"toArrayLike"),"toArrayLike"),Math.clz32?c.prototype._countBits=a(i(function(w){return 32-Math.clz32(w)},"_countBits"),"_countBits"):c.prototype._countBits=a(i(function(w){var x=w,m=0;return x>=4096&&(m+=13,x>>>=13),x>=64&&(m+=7,x>>>=7),x>=8&&(m+=4,x>>>=4),x>=2&&(m+=2,x>>>=2),m+x},"_countBits"),"_countBits"),c.prototype._zeroBits=a(i(function(w){if(w===0)return 26;var x=w,m=0;return(x&8191)===0&&(m+=13,x>>>=13),(x&127)===0&&(m+=7,x>>>=7),(x&15)===0&&(m+=4,x>>>=4),(x&3)===0&&(m+=2,x>>>=2),(x&1)===0&&m++,m},"_zeroBits"),"_zeroBits"),c.prototype.bitLength=a(i(function(){var w=this.words[this.length-1],x=this._countBits(w);return(this.length-1)*26+x},"bitLength"),"bitLength");function T(q){for(var w=new Array(q.bitLength()),x=0;x<w.length;x++){var m=x/26|0,d=x%26;w[x]=(q.words[m]&1<<d)>>>d}return w}i(T,"toBitArray"),a(T,"toBitArray"),c.prototype.zeroBits=a(i(function(){if(this.isZero())return 0;for(var w=0,x=0;x<this.length;x++){var m=this._zeroBits(this.words[x]);if(w+=m,m!==26)break}return w},"zeroBits"),"zeroBits"),c.prototype.byteLength=a(i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),"byteLength"),c.prototype.toTwos=a(i(function(w){return this.negative!==0?this.abs().inotn(w).iaddn(1):this.clone()},"toTwos"),"toTwos"),c.prototype.fromTwos=a(i(function(w){return this.testn(w-1)?this.notn(w).iaddn(1).ineg():this.clone()},"fromTwos"),"fromTwos"),c.prototype.isNeg=a(i(function(){return this.negative!==0},"isNeg"),"isNeg"),c.prototype.neg=a(i(function(){return this.clone().ineg()},"neg3"),"neg"),c.prototype.ineg=a(i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),"ineg"),c.prototype.iuor=a(i(function(w){for(;this.length<w.length;)this.words[this.length++]=0;for(var x=0;x<w.length;x++)this.words[x]=this.words[x]|w.words[x];return this.strip()},"iuor"),"iuor"),c.prototype.ior=a(i(function(w){return s((this.negative|w.negative)===0),this.iuor(w)},"ior"),"ior"),c.prototype.or=a(i(function(w){return this.length>w.length?this.clone().ior(w):w.clone().ior(this)},"or2"),"or"),c.prototype.uor=a(i(function(w){return this.length>w.length?this.clone().iuor(w):w.clone().iuor(this)},"uor"),"uor"),c.prototype.iuand=a(i(function(w){var x;this.length>w.length?x=w:x=this;for(var m=0;m<x.length;m++)this.words[m]=this.words[m]&w.words[m];return this.length=x.length,this.strip()},"iuand"),"iuand"),c.prototype.iand=a(i(function(w){return s((this.negative|w.negative)===0),this.iuand(w)},"iand"),"iand"),c.prototype.and=a(i(function(w){return this.length>w.length?this.clone().iand(w):w.clone().iand(this)},"and"),"and"),c.prototype.uand=a(i(function(w){return this.length>w.length?this.clone().iuand(w):w.clone().iuand(this)},"uand"),"uand"),c.prototype.iuxor=a(i(function(w){var x,m;this.length>w.length?(x=this,m=w):(x=w,m=this);for(var d=0;d<m.length;d++)this.words[d]=x.words[d]^m.words[d];if(this!==x)for(;d<x.length;d++)this.words[d]=x.words[d];return this.length=x.length,this.strip()},"iuxor"),"iuxor"),c.prototype.ixor=a(i(function(w){return s((this.negative|w.negative)===0),this.iuxor(w)},"ixor"),"ixor"),c.prototype.xor=a(i(function(w){return this.length>w.length?this.clone().ixor(w):w.clone().ixor(this)},"xor2"),"xor"),c.prototype.uxor=a(i(function(w){return this.length>w.length?this.clone().iuxor(w):w.clone().iuxor(this)},"uxor"),"uxor"),c.prototype.inotn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=Math.ceil(w/26)|0,m=w%26;this._expand(x),m>0&&x--;for(var d=0;d<x;d++)this.words[d]=~this.words[d]&67108863;return m>0&&(this.words[d]=~this.words[d]&67108863>>26-m),this.strip()},"inotn"),"inotn"),c.prototype.notn=a(i(function(w){return this.clone().inotn(w)},"notn"),"notn"),c.prototype.setn=a(i(function(w,x){s(typeof w=="number"&&w>=0);var m=w/26|0,d=w%26;return this._expand(m+1),x?this.words[m]=this.words[m]|1<<d:this.words[m]=this.words[m]&~(1<<d),this.strip()},"setn"),"setn"),c.prototype.iadd=a(i(function(w){var x;if(this.negative!==0&&w.negative===0)return this.negative=0,x=this.isub(w),this.negative^=1,this._normSign();if(this.negative===0&&w.negative!==0)return w.negative=0,x=this.isub(w),w.negative=1,x._normSign();var m,d;this.length>w.length?(m=this,d=w):(m=w,d=this);for(var g=0,S=0;S<d.length;S++)x=(m.words[S]|0)+(d.words[S]|0)+g,this.words[S]=x&67108863,g=x>>>26;for(;g!==0&&S<m.length;S++)x=(m.words[S]|0)+g,this.words[S]=x&67108863,g=x>>>26;if(this.length=m.length,g!==0)this.words[this.length]=g,this.length++;else if(m!==this)for(;S<m.length;S++)this.words[S]=m.words[S];return this},"iadd"),"iadd"),c.prototype.add=a(i(function(w){var x;return w.negative!==0&&this.negative===0?(w.negative=0,x=this.sub(w),w.negative^=1,x):w.negative===0&&this.negative!==0?(this.negative=0,x=w.sub(this),this.negative=1,x):this.length>w.length?this.clone().iadd(w):w.clone().iadd(this)},"add3"),"add"),c.prototype.isub=a(i(function(w){if(w.negative!==0){w.negative=0;var x=this.iadd(w);return w.negative=1,x._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(w),this.negative=1,this._normSign();var m=this.cmp(w);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var d,g;m>0?(d=this,g=w):(d=w,g=this);for(var S=0,D=0;D<g.length;D++)x=(d.words[D]|0)-(g.words[D]|0)+S,S=x>>26,this.words[D]=x&67108863;for(;S!==0&&D<d.length;D++)x=(d.words[D]|0)+S,S=x>>26,this.words[D]=x&67108863;if(S===0&&D<d.length&&d!==this)for(;D<d.length;D++)this.words[D]=d.words[D];return this.length=Math.max(this.length,D),d!==this&&(this.negative=1),this.strip()},"isub"),"isub"),c.prototype.sub=a(i(function(w){return this.clone().isub(w)},"sub"),"sub");function O(q,w,x){x.negative=w.negative^q.negative;var m=q.length+w.length|0;x.length=m,m=m-1|0;var d=q.words[0]|0,g=w.words[0]|0,S=d*g,D=S&67108863,C=S/67108864|0;x.words[0]=D;for(var E=1;E<m;E++){for(var B=C>>>26,$=C&67108863,k=Math.min(E,w.length-1),F=Math.max(0,E-q.length+1);F<=k;F++){var he=E-F|0;d=q.words[he]|0,g=w.words[F]|0,S=d*g+$,B+=S/67108864|0,$=S&67108863}x.words[E]=$|0,C=B|0}return C!==0?x.words[E]=C|0:x.length--,x.strip()}i(O,"smallMulTo"),a(O,"smallMulTo");var R=a(i(function(w,x,m){var d=w.words,g=x.words,S=m.words,D=0,C,E,B,$=d[0]|0,k=$&8191,F=$>>>13,he=d[1]|0,N=he&8191,Y=he>>>13,J=d[2]|0,M=J&8191,z=J>>>13,re=d[3]|0,oe=re&8191,ge=re>>>13,ke=d[4]|0,_e=ke&8191,fe=ke>>>13,Ce=d[5]|0,pe=Ce&8191,we=Ce>>>13,Q=d[6]|0,ve=Q&8191,Me=Q>>>13,Ue=d[7]|0,Re=Ue&8191,je=Ue>>>13,rt=d[8]|0,le=rt&8191,ce=rt>>>13,Z=d[9]|0,ne=Z&8191,ye=Z>>>13,Se=g[0]|0,xe=Se&8191,De=Se>>>13,Mt=g[1]|0,qe=Mt&8191,He=Mt>>>13,Ot=g[2]|0,dt=Ot&8191,mt=Ot>>>13,Dr=g[3]|0,ct=Dr&8191,ut=Dr>>>13,lr=g[4]|0,lt=lr&8191,nt=lr>>>13,ar=g[5]|0,it=ar&8191,Ye=ar>>>13,Qt=g[6]|0,st=Qt&8191,Qe=Qt>>>13,or=g[7]|0,at=or&8191,Ze=or>>>13,cr=g[8]|0,ot=cr&8191,Et=cr>>>13,Sn=g[9]|0,At=Sn&8191,yt=Sn>>>13;m.negative=w.negative^x.negative,m.length=19,C=Math.imul(k,xe),E=Math.imul(k,De),E=E+Math.imul(F,xe)|0,B=Math.imul(F,De);var fn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(fn>>>26)|0,fn&=67108863,C=Math.imul(N,xe),E=Math.imul(N,De),E=E+Math.imul(Y,xe)|0,B=Math.imul(Y,De),C=C+Math.imul(k,qe)|0,E=E+Math.imul(k,He)|0,E=E+Math.imul(F,qe)|0,B=B+Math.imul(F,He)|0;var er=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(er>>>26)|0,er&=67108863,C=Math.imul(M,xe),E=Math.imul(M,De),E=E+Math.imul(z,xe)|0,B=Math.imul(z,De),C=C+Math.imul(N,qe)|0,E=E+Math.imul(N,He)|0,E=E+Math.imul(Y,qe)|0,B=B+Math.imul(Y,He)|0,C=C+Math.imul(k,dt)|0,E=E+Math.imul(k,mt)|0,E=E+Math.imul(F,dt)|0,B=B+Math.imul(F,mt)|0;var tr=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(tr>>>26)|0,tr&=67108863,C=Math.imul(oe,xe),E=Math.imul(oe,De),E=E+Math.imul(ge,xe)|0,B=Math.imul(ge,De),C=C+Math.imul(M,qe)|0,E=E+Math.imul(M,He)|0,E=E+Math.imul(z,qe)|0,B=B+Math.imul(z,He)|0,C=C+Math.imul(N,dt)|0,E=E+Math.imul(N,mt)|0,E=E+Math.imul(Y,dt)|0,B=B+Math.imul(Y,mt)|0,C=C+Math.imul(k,ct)|0,E=E+Math.imul(k,ut)|0,E=E+Math.imul(F,ct)|0,B=B+Math.imul(F,ut)|0;var tn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(_e,xe),E=Math.imul(_e,De),E=E+Math.imul(fe,xe)|0,B=Math.imul(fe,De),C=C+Math.imul(oe,qe)|0,E=E+Math.imul(oe,He)|0,E=E+Math.imul(ge,qe)|0,B=B+Math.imul(ge,He)|0,C=C+Math.imul(M,dt)|0,E=E+Math.imul(M,mt)|0,E=E+Math.imul(z,dt)|0,B=B+Math.imul(z,mt)|0,C=C+Math.imul(N,ct)|0,E=E+Math.imul(N,ut)|0,E=E+Math.imul(Y,ct)|0,B=B+Math.imul(Y,ut)|0,C=C+Math.imul(k,lt)|0,E=E+Math.imul(k,nt)|0,E=E+Math.imul(F,lt)|0,B=B+Math.imul(F,nt)|0;var rn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(rn>>>26)|0,rn&=67108863,C=Math.imul(pe,xe),E=Math.imul(pe,De),E=E+Math.imul(we,xe)|0,B=Math.imul(we,De),C=C+Math.imul(_e,qe)|0,E=E+Math.imul(_e,He)|0,E=E+Math.imul(fe,qe)|0,B=B+Math.imul(fe,He)|0,C=C+Math.imul(oe,dt)|0,E=E+Math.imul(oe,mt)|0,E=E+Math.imul(ge,dt)|0,B=B+Math.imul(ge,mt)|0,C=C+Math.imul(M,ct)|0,E=E+Math.imul(M,ut)|0,E=E+Math.imul(z,ct)|0,B=B+Math.imul(z,ut)|0,C=C+Math.imul(N,lt)|0,E=E+Math.imul(N,nt)|0,E=E+Math.imul(Y,lt)|0,B=B+Math.imul(Y,nt)|0,C=C+Math.imul(k,it)|0,E=E+Math.imul(k,Ye)|0,E=E+Math.imul(F,it)|0,B=B+Math.imul(F,Ye)|0;var Or=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Or>>>26)|0,Or&=67108863,C=Math.imul(ve,xe),E=Math.imul(ve,De),E=E+Math.imul(Me,xe)|0,B=Math.imul(Me,De),C=C+Math.imul(pe,qe)|0,E=E+Math.imul(pe,He)|0,E=E+Math.imul(we,qe)|0,B=B+Math.imul(we,He)|0,C=C+Math.imul(_e,dt)|0,E=E+Math.imul(_e,mt)|0,E=E+Math.imul(fe,dt)|0,B=B+Math.imul(fe,mt)|0,C=C+Math.imul(oe,ct)|0,E=E+Math.imul(oe,ut)|0,E=E+Math.imul(ge,ct)|0,B=B+Math.imul(ge,ut)|0,C=C+Math.imul(M,lt)|0,E=E+Math.imul(M,nt)|0,E=E+Math.imul(z,lt)|0,B=B+Math.imul(z,nt)|0,C=C+Math.imul(N,it)|0,E=E+Math.imul(N,Ye)|0,E=E+Math.imul(Y,it)|0,B=B+Math.imul(Y,Ye)|0,C=C+Math.imul(k,st)|0,E=E+Math.imul(k,Qe)|0,E=E+Math.imul(F,st)|0,B=B+Math.imul(F,Qe)|0;var Hr=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,C=Math.imul(Re,xe),E=Math.imul(Re,De),E=E+Math.imul(je,xe)|0,B=Math.imul(je,De),C=C+Math.imul(ve,qe)|0,E=E+Math.imul(ve,He)|0,E=E+Math.imul(Me,qe)|0,B=B+Math.imul(Me,He)|0,C=C+Math.imul(pe,dt)|0,E=E+Math.imul(pe,mt)|0,E=E+Math.imul(we,dt)|0,B=B+Math.imul(we,mt)|0,C=C+Math.imul(_e,ct)|0,E=E+Math.imul(_e,ut)|0,E=E+Math.imul(fe,ct)|0,B=B+Math.imul(fe,ut)|0,C=C+Math.imul(oe,lt)|0,E=E+Math.imul(oe,nt)|0,E=E+Math.imul(ge,lt)|0,B=B+Math.imul(ge,nt)|0,C=C+Math.imul(M,it)|0,E=E+Math.imul(M,Ye)|0,E=E+Math.imul(z,it)|0,B=B+Math.imul(z,Ye)|0,C=C+Math.imul(N,st)|0,E=E+Math.imul(N,Qe)|0,E=E+Math.imul(Y,st)|0,B=B+Math.imul(Y,Qe)|0,C=C+Math.imul(k,at)|0,E=E+Math.imul(k,Ze)|0,E=E+Math.imul(F,at)|0,B=B+Math.imul(F,Ze)|0;var nn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(le,xe),E=Math.imul(le,De),E=E+Math.imul(ce,xe)|0,B=Math.imul(ce,De),C=C+Math.imul(Re,qe)|0,E=E+Math.imul(Re,He)|0,E=E+Math.imul(je,qe)|0,B=B+Math.imul(je,He)|0,C=C+Math.imul(ve,dt)|0,E=E+Math.imul(ve,mt)|0,E=E+Math.imul(Me,dt)|0,B=B+Math.imul(Me,mt)|0,C=C+Math.imul(pe,ct)|0,E=E+Math.imul(pe,ut)|0,E=E+Math.imul(we,ct)|0,B=B+Math.imul(we,ut)|0,C=C+Math.imul(_e,lt)|0,E=E+Math.imul(_e,nt)|0,E=E+Math.imul(fe,lt)|0,B=B+Math.imul(fe,nt)|0,C=C+Math.imul(oe,it)|0,E=E+Math.imul(oe,Ye)|0,E=E+Math.imul(ge,it)|0,B=B+Math.imul(ge,Ye)|0,C=C+Math.imul(M,st)|0,E=E+Math.imul(M,Qe)|0,E=E+Math.imul(z,st)|0,B=B+Math.imul(z,Qe)|0,C=C+Math.imul(N,at)|0,E=E+Math.imul(N,Ze)|0,E=E+Math.imul(Y,at)|0,B=B+Math.imul(Y,Ze)|0,C=C+Math.imul(k,ot)|0,E=E+Math.imul(k,Et)|0,E=E+Math.imul(F,ot)|0,B=B+Math.imul(F,Et)|0;var xn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(xn>>>26)|0,xn&=67108863,C=Math.imul(ne,xe),E=Math.imul(ne,De),E=E+Math.imul(ye,xe)|0,B=Math.imul(ye,De),C=C+Math.imul(le,qe)|0,E=E+Math.imul(le,He)|0,E=E+Math.imul(ce,qe)|0,B=B+Math.imul(ce,He)|0,C=C+Math.imul(Re,dt)|0,E=E+Math.imul(Re,mt)|0,E=E+Math.imul(je,dt)|0,B=B+Math.imul(je,mt)|0,C=C+Math.imul(ve,ct)|0,E=E+Math.imul(ve,ut)|0,E=E+Math.imul(Me,ct)|0,B=B+Math.imul(Me,ut)|0,C=C+Math.imul(pe,lt)|0,E=E+Math.imul(pe,nt)|0,E=E+Math.imul(we,lt)|0,B=B+Math.imul(we,nt)|0,C=C+Math.imul(_e,it)|0,E=E+Math.imul(_e,Ye)|0,E=E+Math.imul(fe,it)|0,B=B+Math.imul(fe,Ye)|0,C=C+Math.imul(oe,st)|0,E=E+Math.imul(oe,Qe)|0,E=E+Math.imul(ge,st)|0,B=B+Math.imul(ge,Qe)|0,C=C+Math.imul(M,at)|0,E=E+Math.imul(M,Ze)|0,E=E+Math.imul(z,at)|0,B=B+Math.imul(z,Ze)|0,C=C+Math.imul(N,ot)|0,E=E+Math.imul(N,Et)|0,E=E+Math.imul(Y,ot)|0,B=B+Math.imul(Y,Et)|0,C=C+Math.imul(k,At)|0,E=E+Math.imul(k,yt)|0,E=E+Math.imul(F,At)|0,B=B+Math.imul(F,yt)|0;var Ai=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,C=Math.imul(ne,qe),E=Math.imul(ne,He),E=E+Math.imul(ye,qe)|0,B=Math.imul(ye,He),C=C+Math.imul(le,dt)|0,E=E+Math.imul(le,mt)|0,E=E+Math.imul(ce,dt)|0,B=B+Math.imul(ce,mt)|0,C=C+Math.imul(Re,ct)|0,E=E+Math.imul(Re,ut)|0,E=E+Math.imul(je,ct)|0,B=B+Math.imul(je,ut)|0,C=C+Math.imul(ve,lt)|0,E=E+Math.imul(ve,nt)|0,E=E+Math.imul(Me,lt)|0,B=B+Math.imul(Me,nt)|0,C=C+Math.imul(pe,it)|0,E=E+Math.imul(pe,Ye)|0,E=E+Math.imul(we,it)|0,B=B+Math.imul(we,Ye)|0,C=C+Math.imul(_e,st)|0,E=E+Math.imul(_e,Qe)|0,E=E+Math.imul(fe,st)|0,B=B+Math.imul(fe,Qe)|0,C=C+Math.imul(oe,at)|0,E=E+Math.imul(oe,Ze)|0,E=E+Math.imul(ge,at)|0,B=B+Math.imul(ge,Ze)|0,C=C+Math.imul(M,ot)|0,E=E+Math.imul(M,Et)|0,E=E+Math.imul(z,ot)|0,B=B+Math.imul(z,Et)|0,C=C+Math.imul(N,At)|0,E=E+Math.imul(N,yt)|0,E=E+Math.imul(Y,At)|0,B=B+Math.imul(Y,yt)|0;var Si=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Si>>>26)|0,Si&=67108863,C=Math.imul(ne,dt),E=Math.imul(ne,mt),E=E+Math.imul(ye,dt)|0,B=Math.imul(ye,mt),C=C+Math.imul(le,ct)|0,E=E+Math.imul(le,ut)|0,E=E+Math.imul(ce,ct)|0,B=B+Math.imul(ce,ut)|0,C=C+Math.imul(Re,lt)|0,E=E+Math.imul(Re,nt)|0,E=E+Math.imul(je,lt)|0,B=B+Math.imul(je,nt)|0,C=C+Math.imul(ve,it)|0,E=E+Math.imul(ve,Ye)|0,E=E+Math.imul(Me,it)|0,B=B+Math.imul(Me,Ye)|0,C=C+Math.imul(pe,st)|0,E=E+Math.imul(pe,Qe)|0,E=E+Math.imul(we,st)|0,B=B+Math.imul(we,Qe)|0,C=C+Math.imul(_e,at)|0,E=E+Math.imul(_e,Ze)|0,E=E+Math.imul(fe,at)|0,B=B+Math.imul(fe,Ze)|0,C=C+Math.imul(oe,ot)|0,E=E+Math.imul(oe,Et)|0,E=E+Math.imul(ge,ot)|0,B=B+Math.imul(ge,Et)|0,C=C+Math.imul(M,At)|0,E=E+Math.imul(M,yt)|0,E=E+Math.imul(z,At)|0,B=B+Math.imul(z,yt)|0;var xi=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(xi>>>26)|0,xi&=67108863,C=Math.imul(ne,ct),E=Math.imul(ne,ut),E=E+Math.imul(ye,ct)|0,B=Math.imul(ye,ut),C=C+Math.imul(le,lt)|0,E=E+Math.imul(le,nt)|0,E=E+Math.imul(ce,lt)|0,B=B+Math.imul(ce,nt)|0,C=C+Math.imul(Re,it)|0,E=E+Math.imul(Re,Ye)|0,E=E+Math.imul(je,it)|0,B=B+Math.imul(je,Ye)|0,C=C+Math.imul(ve,st)|0,E=E+Math.imul(ve,Qe)|0,E=E+Math.imul(Me,st)|0,B=B+Math.imul(Me,Qe)|0,C=C+Math.imul(pe,at)|0,E=E+Math.imul(pe,Ze)|0,E=E+Math.imul(we,at)|0,B=B+Math.imul(we,Ze)|0,C=C+Math.imul(_e,ot)|0,E=E+Math.imul(_e,Et)|0,E=E+Math.imul(fe,ot)|0,B=B+Math.imul(fe,Et)|0,C=C+Math.imul(oe,At)|0,E=E+Math.imul(oe,yt)|0,E=E+Math.imul(ge,At)|0,B=B+Math.imul(ge,yt)|0;var Pn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,C=Math.imul(ne,lt),E=Math.imul(ne,nt),E=E+Math.imul(ye,lt)|0,B=Math.imul(ye,nt),C=C+Math.imul(le,it)|0,E=E+Math.imul(le,Ye)|0,E=E+Math.imul(ce,it)|0,B=B+Math.imul(ce,Ye)|0,C=C+Math.imul(Re,st)|0,E=E+Math.imul(Re,Qe)|0,E=E+Math.imul(je,st)|0,B=B+Math.imul(je,Qe)|0,C=C+Math.imul(ve,at)|0,E=E+Math.imul(ve,Ze)|0,E=E+Math.imul(Me,at)|0,B=B+Math.imul(Me,Ze)|0,C=C+Math.imul(pe,ot)|0,E=E+Math.imul(pe,Et)|0,E=E+Math.imul(we,ot)|0,B=B+Math.imul(we,Et)|0,C=C+Math.imul(_e,At)|0,E=E+Math.imul(_e,yt)|0,E=E+Math.imul(fe,At)|0,B=B+Math.imul(fe,yt)|0;var dn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(dn>>>26)|0,dn&=67108863,C=Math.imul(ne,it),E=Math.imul(ne,Ye),E=E+Math.imul(ye,it)|0,B=Math.imul(ye,Ye),C=C+Math.imul(le,st)|0,E=E+Math.imul(le,Qe)|0,E=E+Math.imul(ce,st)|0,B=B+Math.imul(ce,Qe)|0,C=C+Math.imul(Re,at)|0,E=E+Math.imul(Re,Ze)|0,E=E+Math.imul(je,at)|0,B=B+Math.imul(je,Ze)|0,C=C+Math.imul(ve,ot)|0,E=E+Math.imul(ve,Et)|0,E=E+Math.imul(Me,ot)|0,B=B+Math.imul(Me,Et)|0,C=C+Math.imul(pe,At)|0,E=E+Math.imul(pe,yt)|0,E=E+Math.imul(we,At)|0,B=B+Math.imul(we,yt)|0;var Xn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,C=Math.imul(ne,st),E=Math.imul(ne,Qe),E=E+Math.imul(ye,st)|0,B=Math.imul(ye,Qe),C=C+Math.imul(le,at)|0,E=E+Math.imul(le,Ze)|0,E=E+Math.imul(ce,at)|0,B=B+Math.imul(ce,Ze)|0,C=C+Math.imul(Re,ot)|0,E=E+Math.imul(Re,Et)|0,E=E+Math.imul(je,ot)|0,B=B+Math.imul(je,Et)|0,C=C+Math.imul(ve,At)|0,E=E+Math.imul(ve,yt)|0,E=E+Math.imul(Me,At)|0,B=B+Math.imul(Me,yt)|0;var Bn=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,C=Math.imul(ne,at),E=Math.imul(ne,Ze),E=E+Math.imul(ye,at)|0,B=Math.imul(ye,Ze),C=C+Math.imul(le,ot)|0,E=E+Math.imul(le,Et)|0,E=E+Math.imul(ce,ot)|0,B=B+Math.imul(ce,Et)|0,C=C+Math.imul(Re,At)|0,E=E+Math.imul(Re,yt)|0,E=E+Math.imul(je,At)|0,B=B+Math.imul(je,yt)|0;var Ti=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,C=Math.imul(ne,ot),E=Math.imul(ne,Et),E=E+Math.imul(ye,ot)|0,B=Math.imul(ye,Et),C=C+Math.imul(le,At)|0,E=E+Math.imul(le,yt)|0,E=E+Math.imul(ce,At)|0,B=B+Math.imul(ce,yt)|0;var Mi=(D+C|0)+((E&8191)<<13)|0;D=(B+(E>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,C=Math.imul(ne,At),E=Math.imul(ne,yt),E=E+Math.imul(ye,At)|0,B=Math.imul(ye,yt);var Ci=(D+C|0)+((E&8191)<<13)|0;return D=(B+(E>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,S[0]=fn,S[1]=er,S[2]=tr,S[3]=tn,S[4]=rn,S[5]=Or,S[6]=Hr,S[7]=nn,S[8]=xn,S[9]=Ai,S[10]=Si,S[11]=xi,S[12]=Pn,S[13]=dn,S[14]=Xn,S[15]=Bn,S[16]=Ti,S[17]=Mi,S[18]=Ci,D!==0&&(S[19]=D,m.length++),m},"comb10MulTo2"),"comb10MulTo");Math.imul||(R=O);function P(q,w,x){x.negative=w.negative^q.negative,x.length=q.length+w.length;for(var m=0,d=0,g=0;g<x.length-1;g++){var S=d;d=0;for(var D=m&67108863,C=Math.min(g,w.length-1),E=Math.max(0,g-q.length+1);E<=C;E++){var B=g-E,$=q.words[B]|0,k=w.words[E]|0,F=$*k,he=F&67108863;S=S+(F/67108864|0)|0,he=he+D|0,D=he&67108863,S=S+(he>>>26)|0,d+=S>>>26,S&=67108863}x.words[g]=D,m=S,S=d}return m!==0?x.words[g]=m:x.length--,x.strip()}i(P,"bigMulTo"),a(P,"bigMulTo");function K(q,w,x){var m=new U;return m.mulp(q,w,x)}i(K,"jumboMulTo"),a(K,"jumboMulTo"),c.prototype.mulTo=a(i(function(w,x){var m,d=this.length+w.length;return this.length===10&&w.length===10?m=R(this,w,x):d<63?m=O(this,w,x):d<1024?m=P(this,w,x):m=K(this,w,x),m},"mulTo"),"mulTo");function U(q,w){this.x=q,this.y=w}i(U,"FFTM"),a(U,"FFTM"),U.prototype.makeRBT=a(i(function(w){for(var x=new Array(w),m=c.prototype._countBits(w)-1,d=0;d<w;d++)x[d]=this.revBin(d,m,w);return x},"makeRBT"),"makeRBT"),U.prototype.revBin=a(i(function(w,x,m){if(w===0||w===m-1)return w;for(var d=0,g=0;g<x;g++)d|=(w&1)<<x-g-1,w>>=1;return d},"revBin"),"revBin"),U.prototype.permute=a(i(function(w,x,m,d,g,S){for(var D=0;D<S;D++)d[D]=x[w[D]],g[D]=m[w[D]]},"permute"),"permute"),U.prototype.transform=a(i(function(w,x,m,d,g,S){this.permute(S,w,x,m,d,g);for(var D=1;D<g;D<<=1)for(var C=D<<1,E=Math.cos(2*Math.PI/C),B=Math.sin(2*Math.PI/C),$=0;$<g;$+=C)for(var k=E,F=B,he=0;he<D;he++){var N=m[$+he],Y=d[$+he],J=m[$+he+D],M=d[$+he+D],z=k*J-F*M;M=k*M+F*J,J=z,m[$+he]=N+J,d[$+he]=Y+M,m[$+he+D]=N-J,d[$+he+D]=Y-M,he!==C&&(z=E*k-B*F,F=E*F+B*k,k=z)}},"transform"),"transform"),U.prototype.guessLen13b=a(i(function(w,x){var m=Math.max(x,w)|1,d=m&1,g=0;for(m=m/2|0;m;m=m>>>1)g++;return 1<<g+1+d},"guessLen13b"),"guessLen13b"),U.prototype.conjugate=a(i(function(w,x,m){if(!(m<=1))for(var d=0;d<m/2;d++){var g=w[d];w[d]=w[m-d-1],w[m-d-1]=g,g=x[d],x[d]=-x[m-d-1],x[m-d-1]=-g}},"conjugate"),"conjugate"),U.prototype.normalize13b=a(i(function(w,x){for(var m=0,d=0;d<x/2;d++){var g=Math.round(w[2*d+1]/x)*8192+Math.round(w[2*d]/x)+m;w[d]=g&67108863,g<67108864?m=0:m=g/67108864|0}return w},"normalize13b"),"normalize13b"),U.prototype.convert13b=a(i(function(w,x,m,d){for(var g=0,S=0;S<x;S++)g=g+(w[S]|0),m[2*S]=g&8191,g=g>>>13,m[2*S+1]=g&8191,g=g>>>13;for(S=2*x;S<d;++S)m[S]=0;s(g===0),s((g&-8192)===0)},"convert13b"),"convert13b"),U.prototype.stub=a(i(function(w){for(var x=new Array(w),m=0;m<w;m++)x[m]=0;return x},"stub"),"stub"),U.prototype.mulp=a(i(function(w,x,m){var d=2*this.guessLen13b(w.length,x.length),g=this.makeRBT(d),S=this.stub(d),D=new Array(d),C=new Array(d),E=new Array(d),B=new Array(d),$=new Array(d),k=new Array(d),F=m.words;F.length=d,this.convert13b(w.words,w.length,D,d),this.convert13b(x.words,x.length,B,d),this.transform(D,S,C,E,d,g),this.transform(B,S,$,k,d,g);for(var he=0;he<d;he++){var N=C[he]*$[he]-E[he]*k[he];E[he]=C[he]*k[he]+E[he]*$[he],C[he]=N}return this.conjugate(C,E,d),this.transform(C,E,F,S,d,g),this.conjugate(F,S,d),this.normalize13b(F,d),m.negative=w.negative^x.negative,m.length=w.length+x.length,m.strip()},"mulp"),"mulp"),c.prototype.mul=a(i(function(w){var x=new c(null);return x.words=new Array(this.length+w.length),this.mulTo(w,x)},"mul3"),"mul"),c.prototype.mulf=a(i(function(w){var x=new c(null);return x.words=new Array(this.length+w.length),K(this,w,x)},"mulf"),"mulf"),c.prototype.imul=a(i(function(w){return this.clone().mulTo(w,this)},"imul"),"imul"),c.prototype.imuln=a(i(function(w){s(typeof w=="number"),s(w<67108864);for(var x=0,m=0;m<this.length;m++){var d=(this.words[m]|0)*w,g=(d&67108863)+(x&67108863);x>>=26,x+=d/67108864|0,x+=g>>>26,this.words[m]=g&67108863}return x!==0&&(this.words[m]=x,this.length++),this},"imuln"),"imuln"),c.prototype.muln=a(i(function(w){return this.clone().imuln(w)},"muln"),"muln"),c.prototype.sqr=a(i(function(){return this.mul(this)},"sqr"),"sqr"),c.prototype.isqr=a(i(function(){return this.imul(this.clone())},"isqr"),"isqr"),c.prototype.pow=a(i(function(w){var x=T(w);if(x.length===0)return new c(1);for(var m=this,d=0;d<x.length&&x[d]===0;d++,m=m.sqr());if(++d<x.length)for(var g=m.sqr();d<x.length;d++,g=g.sqr())x[d]!==0&&(m=m.mul(g));return m},"pow"),"pow"),c.prototype.iushln=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26,d=67108863>>>26-x<<26-x,g;if(x!==0){var S=0;for(g=0;g<this.length;g++){var D=this.words[g]&d,C=(this.words[g]|0)-D<<x;this.words[g]=C|S,S=D>>>26-x}S&&(this.words[g]=S,this.length++)}if(m!==0){for(g=this.length-1;g>=0;g--)this.words[g+m]=this.words[g];for(g=0;g<m;g++)this.words[g]=0;this.length+=m}return this.strip()},"iushln"),"iushln"),c.prototype.ishln=a(i(function(w){return s(this.negative===0),this.iushln(w)},"ishln"),"ishln"),c.prototype.iushrn=a(i(function(w,x,m){s(typeof w=="number"&&w>=0);var d;x?d=(x-x%26)/26:d=0;var g=w%26,S=Math.min((w-g)/26,this.length),D=67108863^67108863>>>g<<g,C=m;if(d-=S,d=Math.max(0,d),C){for(var E=0;E<S;E++)C.words[E]=this.words[E];C.length=S}if(S!==0)if(this.length>S)for(this.length-=S,E=0;E<this.length;E++)this.words[E]=this.words[E+S];else this.words[0]=0,this.length=1;var B=0;for(E=this.length-1;E>=0&&(B!==0||E>=d);E--){var $=this.words[E]|0;this.words[E]=B<<26-g|$>>>g,B=$&D}return C&&B!==0&&(C.words[C.length++]=B),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},"iushrn"),"iushrn"),c.prototype.ishrn=a(i(function(w,x,m){return s(this.negative===0),this.iushrn(w,x,m)},"ishrn"),"ishrn"),c.prototype.shln=a(i(function(w){return this.clone().ishln(w)},"shln"),"shln"),c.prototype.ushln=a(i(function(w){return this.clone().iushln(w)},"ushln"),"ushln"),c.prototype.shrn=a(i(function(w){return this.clone().ishrn(w)},"shrn"),"shrn"),c.prototype.ushrn=a(i(function(w){return this.clone().iushrn(w)},"ushrn"),"ushrn"),c.prototype.testn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26,d=1<<x;if(this.length<=m)return!1;var g=this.words[m];return!!(g&d)},"testn"),"testn"),c.prototype.imaskn=a(i(function(w){s(typeof w=="number"&&w>=0);var x=w%26,m=(w-x)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(x!==0&&m++,this.length=Math.min(m,this.length),x!==0){var d=67108863^67108863>>>x<<x;this.words[this.length-1]&=d}return this.strip()},"imaskn"),"imaskn"),c.prototype.maskn=a(i(function(w){return this.clone().imaskn(w)},"maskn"),"maskn"),c.prototype.iaddn=a(i(function(w){return s(typeof w=="number"),s(w<67108864),w<0?this.isubn(-w):this.negative!==0?this.length===1&&(this.words[0]|0)<w?(this.words[0]=w-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(w),this.negative=1,this):this._iaddn(w)},"iaddn"),"iaddn"),c.prototype._iaddn=a(i(function(w){this.words[0]+=w;for(var x=0;x<this.length&&this.words[x]>=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},"_iaddn"),"_iaddn"),c.prototype.isubn=a(i(function(w){if(s(typeof w=="number"),s(w<67108864),w<0)return this.iaddn(-w);if(this.negative!==0)return this.negative=0,this.iaddn(w),this.negative=1,this;if(this.words[0]-=w,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x<this.length&&this.words[x]<0;x++)this.words[x]+=67108864,this.words[x+1]-=1;return this.strip()},"isubn"),"isubn"),c.prototype.addn=a(i(function(w){return this.clone().iaddn(w)},"addn"),"addn"),c.prototype.subn=a(i(function(w){return this.clone().isubn(w)},"subn"),"subn"),c.prototype.iabs=a(i(function(){return this.negative=0,this},"iabs"),"iabs"),c.prototype.abs=a(i(function(){return this.clone().iabs()},"abs"),"abs"),c.prototype._ishlnsubmul=a(i(function(w,x,m){var d=w.length+m,g;this._expand(d);var S,D=0;for(g=0;g<w.length;g++){S=(this.words[g+m]|0)+D;var C=(w.words[g]|0)*x;S-=C&67108863,D=(S>>26)-(C/67108864|0),this.words[g+m]=S&67108863}for(;g<this.length-m;g++)S=(this.words[g+m]|0)+D,D=S>>26,this.words[g+m]=S&67108863;if(D===0)return this.strip();for(s(D===-1),D=0,g=0;g<this.length;g++)S=-(this.words[g]|0)+D,D=S>>26,this.words[g]=S&67108863;return this.negative=1,this.strip()},"_ishlnsubmul"),"_ishlnsubmul"),c.prototype._wordDiv=a(i(function(w,x){var m=this.length-w.length,d=this.clone(),g=w,S=g.words[g.length-1]|0,D=this._countBits(S);m=26-D,m!==0&&(g=g.ushln(m),d.iushln(m),S=g.words[g.length-1]|0);var C=d.length-g.length,E;if(x!=="mod"){E=new c(null),E.length=C+1,E.words=new Array(E.length);for(var B=0;B<E.length;B++)E.words[B]=0}var $=d.clone()._ishlnsubmul(g,1,C);$.negative===0&&(d=$,E&&(E.words[C]=1));for(var k=C-1;k>=0;k--){var F=(d.words[g.length+k]|0)*67108864+(d.words[g.length+k-1]|0);for(F=Math.min(F/S|0,67108863),d._ishlnsubmul(g,F,k);d.negative!==0;)F--,d.negative=0,d._ishlnsubmul(g,1,k),d.isZero()||(d.negative^=1);E&&(E.words[k]=F)}return E&&E.strip(),d.strip(),x!=="div"&&m!==0&&d.iushrn(m),{div:E||null,mod:d}},"_wordDiv"),"_wordDiv"),c.prototype.divmod=a(i(function(w,x,m){if(s(!w.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var d,g,S;return this.negative!==0&&w.negative===0?(S=this.neg().divmod(w,x),x!=="mod"&&(d=S.div.neg()),x!=="div"&&(g=S.mod.neg(),m&&g.negative!==0&&g.iadd(w)),{div:d,mod:g}):this.negative===0&&w.negative!==0?(S=this.divmod(w.neg(),x),x!=="mod"&&(d=S.div.neg()),{div:d,mod:S.mod}):(this.negative&w.negative)!==0?(S=this.neg().divmod(w.neg(),x),x!=="div"&&(g=S.mod.neg(),m&&g.negative!==0&&g.isub(w)),{div:S.div,mod:g}):w.length>this.length||this.cmp(w)<0?{div:new c(0),mod:this}:w.length===1?x==="div"?{div:this.divn(w.words[0]),mod:null}:x==="mod"?{div:null,mod:new c(this.modn(w.words[0]))}:{div:this.divn(w.words[0]),mod:new c(this.modn(w.words[0]))}:this._wordDiv(w,x)},"divmod"),"divmod"),c.prototype.div=a(i(function(w){return this.divmod(w,"div",!1).div},"div"),"div"),c.prototype.mod=a(i(function(w){return this.divmod(w,"mod",!1).mod},"mod2"),"mod"),c.prototype.umod=a(i(function(w){return this.divmod(w,"mod",!0).mod},"umod"),"umod"),c.prototype.divRound=a(i(function(w){var x=this.divmod(w);if(x.mod.isZero())return x.div;var m=x.div.negative!==0?x.mod.isub(w):x.mod,d=w.ushrn(1),g=w.andln(1),S=m.cmp(d);return S<0||g===1&&S===0?x.div:x.div.negative!==0?x.div.isubn(1):x.div.iaddn(1)},"divRound"),"divRound"),c.prototype.modn=a(i(function(w){s(w<=67108863);for(var x=(1<<26)%w,m=0,d=this.length-1;d>=0;d--)m=(x*m+(this.words[d]|0))%w;return m},"modn"),"modn"),c.prototype.idivn=a(i(function(w){s(w<=67108863);for(var x=0,m=this.length-1;m>=0;m--){var d=(this.words[m]|0)+x*67108864;this.words[m]=d/w|0,x=d%w}return this.strip()},"idivn"),"idivn"),c.prototype.divn=a(i(function(w){return this.clone().idivn(w)},"divn"),"divn"),c.prototype.egcd=a(i(function(w){s(w.negative===0),s(!w.isZero());var x=this,m=w.clone();x.negative!==0?x=x.umod(w):x=x.clone();for(var d=new c(1),g=new c(0),S=new c(0),D=new c(1),C=0;x.isEven()&&m.isEven();)x.iushrn(1),m.iushrn(1),++C;for(var E=m.clone(),B=x.clone();!x.isZero();){for(var $=0,k=1;(x.words[0]&k)===0&&$<26;++$,k<<=1);if($>0)for(x.iushrn($);$-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(E),g.isub(B)),d.iushrn(1),g.iushrn(1);for(var F=0,he=1;(m.words[0]&he)===0&&F<26;++F,he<<=1);if(F>0)for(m.iushrn(F);F-- >0;)(S.isOdd()||D.isOdd())&&(S.iadd(E),D.isub(B)),S.iushrn(1),D.iushrn(1);x.cmp(m)>=0?(x.isub(m),d.isub(S),g.isub(D)):(m.isub(x),S.isub(d),D.isub(g))}return{a:S,b:D,gcd:m.iushln(C)}},"egcd"),"egcd"),c.prototype._invmp=a(i(function(w){s(w.negative===0),s(!w.isZero());var x=this,m=w.clone();x.negative!==0?x=x.umod(w):x=x.clone();for(var d=new c(1),g=new c(0),S=m.clone();x.cmpn(1)>0&&m.cmpn(1)>0;){for(var D=0,C=1;(x.words[0]&C)===0&&D<26;++D,C<<=1);if(D>0)for(x.iushrn(D);D-- >0;)d.isOdd()&&d.iadd(S),d.iushrn(1);for(var E=0,B=1;(m.words[0]&B)===0&&E<26;++E,B<<=1);if(E>0)for(m.iushrn(E);E-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);x.cmp(m)>=0?(x.isub(m),d.isub(g)):(m.isub(x),g.isub(d))}var $;return x.cmpn(1)===0?$=d:$=g,$.cmpn(0)<0&&$.iadd(w),$},"_invmp"),"_invmp"),c.prototype.gcd=a(i(function(w){if(this.isZero())return w.abs();if(w.isZero())return this.abs();var x=this.clone(),m=w.clone();x.negative=0,m.negative=0;for(var d=0;x.isEven()&&m.isEven();d++)x.iushrn(1),m.iushrn(1);do{for(;x.isEven();)x.iushrn(1);for(;m.isEven();)m.iushrn(1);var g=x.cmp(m);if(g<0){var S=x;x=m,m=S}else if(g===0||m.cmpn(1)===0)break;x.isub(m)}while(!0);return m.iushln(d)},"gcd"),"gcd"),c.prototype.invm=a(i(function(w){return this.egcd(w).a.umod(w)},"invm"),"invm"),c.prototype.isEven=a(i(function(){return(this.words[0]&1)===0},"isEven"),"isEven"),c.prototype.isOdd=a(i(function(){return(this.words[0]&1)===1},"isOdd"),"isOdd"),c.prototype.andln=a(i(function(w){return this.words[0]&w},"andln"),"andln"),c.prototype.bincn=a(i(function(w){s(typeof w=="number");var x=w%26,m=(w-x)/26,d=1<<x;if(this.length<=m)return this._expand(m+1),this.words[m]|=d,this;for(var g=d,S=m;g!==0&&S<this.length;S++){var D=this.words[S]|0;D+=g,g=D>>>26,D&=67108863,this.words[S]=D}return g!==0&&(this.words[S]=g,this.length++),this},"bincn"),"bincn"),c.prototype.isZero=a(i(function(){return this.length===1&&this.words[0]===0},"isZero"),"isZero"),c.prototype.cmpn=a(i(function(w){var x=w<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;this.strip();var m;if(this.length>1)m=1;else{x&&(w=-w),s(w<=67108863,"Number is too big");var d=this.words[0]|0;m=d===w?0:d<w?-1:1}return this.negative!==0?-m|0:m},"cmpn"),"cmpn"),c.prototype.cmp=a(i(function(w){if(this.negative!==0&&w.negative===0)return-1;if(this.negative===0&&w.negative!==0)return 1;var x=this.ucmp(w);return this.negative!==0?-x|0:x},"cmp"),"cmp"),c.prototype.ucmp=a(i(function(w){if(this.length>w.length)return 1;if(this.length<w.length)return-1;for(var x=0,m=this.length-1;m>=0;m--){var d=this.words[m]|0,g=w.words[m]|0;if(d!==g){d<g?x=-1:d>g&&(x=1);break}}return x},"ucmp"),"ucmp"),c.prototype.gtn=a(i(function(w){return this.cmpn(w)===1},"gtn"),"gtn"),c.prototype.gt=a(i(function(w){return this.cmp(w)===1},"gt"),"gt"),c.prototype.gten=a(i(function(w){return this.cmpn(w)>=0},"gten"),"gten"),c.prototype.gte=a(i(function(w){return this.cmp(w)>=0},"gte"),"gte"),c.prototype.ltn=a(i(function(w){return this.cmpn(w)===-1},"ltn"),"ltn"),c.prototype.lt=a(i(function(w){return this.cmp(w)===-1},"lt"),"lt"),c.prototype.lten=a(i(function(w){return this.cmpn(w)<=0},"lten"),"lten"),c.prototype.lte=a(i(function(w){return this.cmp(w)<=0},"lte"),"lte"),c.prototype.eqn=a(i(function(w){return this.cmpn(w)===0},"eqn"),"eqn"),c.prototype.eq=a(i(function(w){return this.cmp(w)===0},"eq4"),"eq"),c.red=a(i(function(w){return new ue(w)},"red"),"red"),c.prototype.toRed=a(i(function(w){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),w.convertTo(this)._forceRed(w)},"toRed"),"toRed"),c.prototype.fromRed=a(i(function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),"fromRed"),c.prototype._forceRed=a(i(function(w){return this.red=w,this},"_forceRed"),"_forceRed"),c.prototype.forceRed=a(i(function(w){return s(!this.red,"Already a number in reduction context"),this._forceRed(w)},"forceRed"),"forceRed"),c.prototype.redAdd=a(i(function(w){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,w)},"redAdd"),"redAdd"),c.prototype.redIAdd=a(i(function(w){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,w)},"redIAdd"),"redIAdd"),c.prototype.redSub=a(i(function(w){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,w)},"redSub"),"redSub"),c.prototype.redISub=a(i(function(w){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,w)},"redISub"),"redISub"),c.prototype.redShl=a(i(function(w){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,w)},"redShl"),"redShl"),c.prototype.redMul=a(i(function(w){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.mul(this,w)},"redMul"),"redMul"),c.prototype.redIMul=a(i(function(w){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.imul(this,w)},"redIMul"),"redIMul"),c.prototype.redSqr=a(i(function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),"redSqr"),c.prototype.redISqr=a(i(function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),"redISqr"),c.prototype.redSqrt=a(i(function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),"redSqrt"),c.prototype.redInvm=a(i(function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),"redInvm"),c.prototype.redNeg=a(i(function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),"redNeg"),c.prototype.redPow=a(i(function(w){return s(this.red&&!w.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,w)},"redPow"),"redPow");var j={k256:null,p224:null,p192:null,p25519:null};function V(q,w){this.name=q,this.p=new c(w,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(V,"MPrime"),a(V,"MPrime"),V.prototype._tmp=a(i(function(){var w=new c(null);return w.words=new Array(Math.ceil(this.n/13)),w},"_tmp"),"_tmp"),V.prototype.ireduce=a(i(function(w){var x=w,m;do this.split(x,this.tmp),x=this.imulK(x),x=x.iadd(this.tmp),m=x.bitLength();while(m>this.n);var d=m<this.n?-1:x.ucmp(this.p);return d===0?(x.words[0]=0,x.length=1):d>0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},"ireduce"),"ireduce"),V.prototype.split=a(i(function(w,x){w.iushrn(this.n,0,x)},"split"),"split"),V.prototype.imulK=a(i(function(w){return w.imul(this.k)},"imulK"),"imulK");function G(){V.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(G,"K256"),a(G,"K256"),o(G,V),G.prototype.split=a(i(function(w,x){for(var m=4194303,d=Math.min(w.length,9),g=0;g<d;g++)x.words[g]=w.words[g];if(x.length=d,w.length<=9){w.words[0]=0,w.length=1;return}var S=w.words[9];for(x.words[x.length++]=S&m,g=10;g<w.length;g++){var D=w.words[g]|0;w.words[g-10]=(D&m)<<4|S>>>22,S=D}S>>>=22,w.words[g-10]=S,S===0&&w.length>10?w.length-=10:w.length-=9},"split"),"split"),G.prototype.imulK=a(i(function(w){w.words[w.length]=0,w.words[w.length+1]=0,w.length+=2;for(var x=0,m=0;m<w.length;m++){var d=w.words[m]|0;x+=d*977,w.words[m]=x&67108863,x=d*64+(x/67108864|0)}return w.words[w.length-1]===0&&(w.length--,w.words[w.length-1]===0&&w.length--),w},"imulK"),"imulK");function I(){V.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(I,"P224"),a(I,"P224"),o(I,V);function H(){V.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(H,"P192"),a(H,"P192"),o(H,V);function se(){V.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(se,"P25519"),a(se,"P25519"),o(se,V),se.prototype.imulK=a(i(function(w){for(var x=0,m=0;m<w.length;m++){var d=(w.words[m]|0)*19+x,g=d&67108863;d>>>=26,w.words[m]=g,x=d}return x!==0&&(w.words[w.length++]=x),w},"imulK"),"imulK"),c._prime=a(i(function(w){if(j[w])return j[w];var x;if(w==="k256")x=new G;else if(w==="p224")x=new I;else if(w==="p192")x=new H;else if(w==="p25519")x=new se;else throw new Error("Unknown prime "+w);return j[w]=x,x},"prime"),"prime");function ue(q){if(typeof q=="string"){var w=c._prime(q);this.m=w.p,this.prime=w}else s(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}i(ue,"Red"),a(ue,"Red"),ue.prototype._verify1=a(i(function(w){s(w.negative===0,"red works only with positives"),s(w.red,"red works only with red numbers")},"_verify1"),"_verify1"),ue.prototype._verify2=a(i(function(w,x){s((w.negative|x.negative)===0,"red works only with positives"),s(w.red&&w.red===x.red,"red works only with red numbers")},"_verify2"),"_verify2"),ue.prototype.imod=a(i(function(w){return this.prime?this.prime.ireduce(w)._forceRed(this):w.umod(this.m)._forceRed(this)},"imod"),"imod"),ue.prototype.neg=a(i(function(w){return w.isZero()?w.clone():this.m.sub(w)._forceRed(this)},"neg3"),"neg"),ue.prototype.add=a(i(function(w,x){this._verify2(w,x);var m=w.add(x);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},"add3"),"add"),ue.prototype.iadd=a(i(function(w,x){this._verify2(w,x);var m=w.iadd(x);return m.cmp(this.m)>=0&&m.isub(this.m),m},"iadd"),"iadd"),ue.prototype.sub=a(i(function(w,x){this._verify2(w,x);var m=w.sub(x);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},"sub"),"sub"),ue.prototype.isub=a(i(function(w,x){this._verify2(w,x);var m=w.isub(x);return m.cmpn(0)<0&&m.iadd(this.m),m},"isub"),"isub"),ue.prototype.shl=a(i(function(w,x){return this._verify1(w),this.imod(w.ushln(x))},"shl"),"shl"),ue.prototype.imul=a(i(function(w,x){return this._verify2(w,x),this.imod(w.imul(x))},"imul"),"imul"),ue.prototype.mul=a(i(function(w,x){return this._verify2(w,x),this.imod(w.mul(x))},"mul3"),"mul"),ue.prototype.isqr=a(i(function(w){return this.imul(w,w.clone())},"isqr"),"isqr"),ue.prototype.sqr=a(i(function(w){return this.mul(w,w)},"sqr"),"sqr"),ue.prototype.sqrt=a(i(function(w){if(w.isZero())return w.clone();var x=this.m.andln(3);if(s(x%2===1),x===3){var m=this.m.add(new c(1)).iushrn(2);return this.pow(w,m)}for(var d=this.m.subn(1),g=0;!d.isZero()&&d.andln(1)===0;)g++,d.iushrn(1);s(!d.isZero());var S=new c(1).toRed(this),D=S.redNeg(),C=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new c(2*E*E).toRed(this);this.pow(E,C).cmp(D)!==0;)E.redIAdd(D);for(var B=this.pow(E,d),$=this.pow(w,d.addn(1).iushrn(1)),k=this.pow(w,d),F=g;k.cmp(S)!==0;){for(var he=k,N=0;he.cmp(S)!==0;N++)he=he.redSqr();s(N<F);var Y=this.pow(B,new c(1).iushln(F-N-1));$=$.redMul(Y),B=Y.redSqr(),k=k.redMul(B),F=N}return $},"sqrt"),"sqrt"),ue.prototype.invm=a(i(function(w){var x=w._invmp(this.m);return x.negative!==0?(x.negative=0,this.imod(x).redNeg()):this.imod(x)},"invm"),"invm"),ue.prototype.pow=a(i(function(w,x){if(x.isZero())return new c(1).toRed(this);if(x.cmpn(1)===0)return w.clone();var m=4,d=new Array(1<<m);d[0]=new c(1).toRed(this),d[1]=w;for(var g=2;g<d.length;g++)d[g]=this.mul(d[g-1],w);var S=d[0],D=0,C=0,E=x.bitLength()%26;for(E===0&&(E=26),g=x.length-1;g>=0;g--){for(var B=x.words[g],$=E-1;$>=0;$--){var k=B>>$&1;if(S!==d[0]&&(S=this.sqr(S)),k===0&&D===0){C=0;continue}D<<=1,D|=k,C++,!(C!==m&&(g!==0||$!==0))&&(S=this.mul(S,d[D]),C=0,D=0)}E=26}return S},"pow"),"pow"),ue.prototype.convertTo=a(i(function(w){var x=w.umod(this.m);return x===w?x.clone():x},"convertTo"),"convertTo"),ue.prototype.convertFrom=a(i(function(w){var x=w.clone();return x.red=null,x},"convertFrom"),"convertFrom"),c.mont=a(i(function(w){return new me(w)},"mont"),"mont");function me(q){ue.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}i(me,"Mont"),a(me,"Mont"),o(me,ue),me.prototype.convertTo=a(i(function(w){return this.imod(w.ushln(this.shift))},"convertTo"),"convertTo"),me.prototype.convertFrom=a(i(function(w){var x=this.imod(w.mul(this.rinv));return x.red=null,x},"convertFrom"),"convertFrom"),me.prototype.imul=a(i(function(w,x){if(w.isZero()||x.isZero())return w.words[0]=0,w.length=1,w;var m=w.imul(x),d=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=m.isub(d).iushrn(this.shift),S=g;return g.cmp(this.m)>=0?S=g.isub(this.m):g.cmpn(0)<0&&(S=g.iadd(this.m)),S._forceRed(this)},"imul"),"imul"),me.prototype.mul=a(i(function(w,x){if(w.isZero()||x.isZero())return new c(0)._forceRed(this);var m=w.mul(x),d=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=m.isub(d).iushrn(this.shift),S=g;return g.cmp(this.m)>=0?S=g.isub(this.m):g.cmpn(0)<0&&(S=g.iadd(this.m)),S._forceRed(this)},"mul3"),"mul"),me.prototype.invm=a(i(function(w){var x=this.imod(w._invmp(this.m).mul(this.r2));return x._forceRed(this)},"invm"),"invm")})(typeof t>"u"||t,e)}}),Mc=ze({"../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js"(e,t){t.exports=r;function r(n,s){if(!n)throw new Error(s||"Assertion failed")}i(r,"assert2"),a(r,"assert"),r.equal=a(i(function(s,o,c){if(s!=o)throw new Error(c||"Assertion failed: "+s+" != "+o)},"assertEqual2"),"assertEqual")}}),ZS=ze({"../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js"(e){"use strict";var t=e;function r(o,c){if(Array.isArray(o))return o.slice();if(!o)return[];var f=[];if(typeof o!="string"){for(var h=0;h<o.length;h++)f[h]=o[h]|0;return f}if(c==="hex"){o=o.replace(/[^a-z0-9]+/ig,""),o.length%2!==0&&(o="0"+o);for(var h=0;h<o.length;h+=2)f.push(parseInt(o[h]+o[h+1],16))}else for(var h=0;h<o.length;h++){var p=o.charCodeAt(h),v=p>>8,b=p&255;v?f.push(v,b):f.push(b)}return f}i(r,"toArray"),a(r,"toArray"),t.toArray=r;function n(o){return o.length===1?"0"+o:o}i(n,"zero2"),a(n,"zero2"),t.zero2=n;function s(o){for(var c="",f=0;f<o.length;f++)c+=n(o[f].toString(16));return c}i(s,"toHex"),a(s,"toHex"),t.toHex=s,t.encode=a(i(function(c,f){return f==="hex"?s(c):c},"encode9"),"encode")}}),qi=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/utils.js"(e){"use strict";var t=e,r=xa(),n=Mc(),s=ZS();t.assert=n,t.toArray=s.toArray,t.zero2=s.zero2,t.toHex=s.toHex,t.encode=s.encode;function o(v,b,y){var _=new Array(Math.max(v.bitLength(),y)+1);_.fill(0);for(var T=1<<b+1,O=v.clone(),R=0;R<_.length;R++){var P,K=O.andln(T-1);O.isOdd()?(K>(T>>1)-1?P=(T>>1)-K:P=K,O.isubn(P)):P=0,_[R]=P,O.iushrn(1)}return _}i(o,"getNAF2"),a(o,"getNAF"),t.getNAF=o;function c(v,b){var y=[[],[]];v=v.clone(),b=b.clone();for(var _=0,T=0,O;v.cmpn(-_)>0||b.cmpn(-T)>0;){var R=v.andln(3)+_&3,P=b.andln(3)+T&3;R===3&&(R=-1),P===3&&(P=-1);var K;(R&1)===0?K=0:(O=v.andln(7)+_&7,(O===3||O===5)&&P===2?K=-R:K=R),y[0].push(K);var U;(P&1)===0?U=0:(O=b.andln(7)+T&7,(O===3||O===5)&&R===2?U=-P:U=P),y[1].push(U),2*_===K+1&&(_=1-_),2*T===U+1&&(T=1-T),v.iushrn(1),b.iushrn(1)}return y}i(c,"getJSF2"),a(c,"getJSF"),t.getJSF=c;function f(v,b,y){var _="_"+b;v.prototype[b]=a(i(function(){return this[_]!==void 0?this[_]:this[_]=y.call(this)},"cachedProperty2"),"cachedProperty")}i(f,"cachedProperty"),a(f,"cachedProperty"),t.cachedProperty=f;function h(v){return typeof v=="string"?t.toArray(v,"hex"):v}i(h,"parseBytes"),a(h,"parseBytes"),t.parseBytes=h;function p(v){return new r(v,"hex","le")}i(p,"intFromLE"),a(p,"intFromLE"),t.intFromLE=p}}),JS=ze({"../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js"(e,t){var r;t.exports=a(i(function(c){return r||(r=new n(null)),r.generate(c)},"rand2"),"rand");function n(o){this.rand=o}if(i(n,"Rand"),a(n,"Rand"),t.exports.Rand=n,n.prototype.generate=a(i(function(c){return this._rand(c)},"generate3"),"generate"),n.prototype._rand=a(i(function(c){if(this.rand.getBytes)return this.rand.getBytes(c);for(var f=new Uint8Array(c),h=0;h<f.length;h++)f[h]=this.rand.getByte();return f},"_rand"),"_rand"),typeof self=="object")self.crypto&&self.crypto.getRandomValues?n.prototype._rand=a(i(function(c){var f=new Uint8Array(c);return self.crypto.getRandomValues(f),f},"_rand"),"_rand"):self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=a(i(function(c){var f=new Uint8Array(c);return self.msCrypto.getRandomValues(f),f},"_rand"),"_rand"):typeof window=="object"&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(s=Qy("crypto"),typeof s.randomBytes!="function")throw new Error("Not supported");n.prototype._rand=a(i(function(c){return s.randomBytes(c)},"_rand"),"_rand")}catch{}var s}}),lm=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/base.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.getNAF,o=n.getJSF,c=n.assert;function f(p,v){this.type=p,this.p=new r(v.p,16),this.red=v.prime?r.red(v.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=v.n&&new r(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var b=this.n&&this.p.div(this.n);!b||b.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}i(f,"BaseCurve2"),a(f,"BaseCurve"),t.exports=f,f.prototype.point=a(i(function(){throw new Error("Not implemented")},"point3"),"point"),f.prototype.validate=a(i(function(){throw new Error("Not implemented")},"validate6"),"validate"),f.prototype._fixedNafMul=a(i(function(v,b){c(v.precomputed);var y=v._getDoubles(),_=s(b,1,this._bitLength),T=(1<<y.step+1)-(y.step%2===0?2:1);T/=3;var O=[],R,P;for(R=0;R<_.length;R+=y.step){P=0;for(var K=R+y.step-1;K>=R;K--)P=(P<<1)+_[K];O.push(P)}for(var U=this.jpoint(null,null,null),j=this.jpoint(null,null,null),V=T;V>0;V--){for(R=0;R<O.length;R++)P=O[R],P===V?j=j.mixedAdd(y.points[R]):P===-V&&(j=j.mixedAdd(y.points[R].neg()));U=U.add(j)}return U.toP()},"_fixedNafMul2"),"_fixedNafMul"),f.prototype._wnafMul=a(i(function(v,b){var y=4,_=v._getNAFPoints(y);y=_.wnd;for(var T=_.points,O=s(b,y,this._bitLength),R=this.jpoint(null,null,null),P=O.length-1;P>=0;P--){for(var K=0;P>=0&&O[P]===0;P--)K++;if(P>=0&&K++,R=R.dblp(K),P<0)break;var U=O[P];c(U!==0),v.type==="affine"?U>0?R=R.mixedAdd(T[U-1>>1]):R=R.mixedAdd(T[-U-1>>1].neg()):U>0?R=R.add(T[U-1>>1]):R=R.add(T[-U-1>>1].neg())}return v.type==="affine"?R.toP():R},"_wnafMul2"),"_wnafMul"),f.prototype._wnafMulAdd=a(i(function(v,b,y,_,T){var O=this._wnafT1,R=this._wnafT2,P=this._wnafT3,K=0,U,j,V;for(U=0;U<_;U++){V=b[U];var G=V._getNAFPoints(v);O[U]=G.wnd,R[U]=G.points}for(U=_-1;U>=1;U-=2){var I=U-1,H=U;if(O[I]!==1||O[H]!==1){P[I]=s(y[I],O[I],this._bitLength),P[H]=s(y[H],O[H],this._bitLength),K=Math.max(P[I].length,K),K=Math.max(P[H].length,K);continue}var se=[b[I],null,null,b[H]];b[I].y.cmp(b[H].y)===0?(se[1]=b[I].add(b[H]),se[2]=b[I].toJ().mixedAdd(b[H].neg())):b[I].y.cmp(b[H].y.redNeg())===0?(se[1]=b[I].toJ().mixedAdd(b[H]),se[2]=b[I].add(b[H].neg())):(se[1]=b[I].toJ().mixedAdd(b[H]),se[2]=b[I].toJ().mixedAdd(b[H].neg()));var ue=[-3,-1,-5,-7,0,7,5,1,3],me=o(y[I],y[H]);for(K=Math.max(me[0].length,K),P[I]=new Array(K),P[H]=new Array(K),j=0;j<K;j++){var q=me[0][j]|0,w=me[1][j]|0;P[I][j]=ue[(q+1)*3+(w+1)],P[H][j]=0,R[I]=se}}var x=this.jpoint(null,null,null),m=this._wnafT4;for(U=K;U>=0;U--){for(var d=0;U>=0;){var g=!0;for(j=0;j<_;j++)m[j]=P[j][U]|0,m[j]!==0&&(g=!1);if(!g)break;d++,U--}if(U>=0&&d++,x=x.dblp(d),U<0)break;for(j=0;j<_;j++){var S=m[j];S!==0&&(S>0?V=R[j][S-1>>1]:S<0&&(V=R[j][-S-1>>1].neg()),V.type==="affine"?x=x.mixedAdd(V):x=x.add(V))}}for(U=0;U<_;U++)R[U]=null;return T?x:x.toP()},"_wnafMulAdd2"),"_wnafMulAdd");function h(p,v){this.curve=p,this.type=v,this.precomputed=null}i(h,"BasePoint2"),a(h,"BasePoint"),f.BasePoint=h,h.prototype.eq=a(i(function(){throw new Error("Not implemented")},"eq4"),"eq"),h.prototype.validate=a(i(function(){return this.curve.validate(this)},"validate6"),"validate"),f.prototype.decodePoint=a(i(function(v,b){v=n.toArray(v,b);var y=this.p.byteLength();if((v[0]===4||v[0]===6||v[0]===7)&&v.length-1===2*y){v[0]===6?c(v[v.length-1]%2===0):v[0]===7&&c(v[v.length-1]%2===1);var _=this.point(v.slice(1,1+y),v.slice(1+y,1+2*y));return _}else if((v[0]===2||v[0]===3)&&v.length-1===y)return this.pointFromX(v.slice(1,1+y),v[0]===3);throw new Error("Unknown point format")},"decodePoint2"),"decodePoint"),h.prototype.encodeCompressed=a(i(function(v){return this.encode(v,!0)},"encodeCompressed2"),"encodeCompressed"),h.prototype._encode=a(i(function(v){var b=this.curve.p.byteLength(),y=this.getX().toArray("be",b);return v?[this.getY().isEven()?2:3].concat(y):[4].concat(y,this.getY().toArray("be",b))},"_encode2"),"_encode"),h.prototype.encode=a(i(function(v,b){return n.encode(this._encode(b),v)},"encode9"),"encode"),h.prototype.precompute=a(i(function(v){if(this.precomputed)return this;var b={doubles:null,naf:null,beta:null};return b.naf=this._getNAFPoints(8),b.doubles=this._getDoubles(4,v),b.beta=this._getBeta(),this.precomputed=b,this},"precompute2"),"precompute"),h.prototype._hasDoubles=a(i(function(v){if(!this.precomputed)return!1;var b=this.precomputed.doubles;return b?b.points.length>=Math.ceil((v.bitLength()+1)/b.step):!1},"_hasDoubles2"),"_hasDoubles"),h.prototype._getDoubles=a(i(function(v,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var y=[this],_=this,T=0;T<b;T+=v){for(var O=0;O<v;O++)_=_.dbl();y.push(_)}return{step:v,points:y}},"_getDoubles2"),"_getDoubles"),h.prototype._getNAFPoints=a(i(function(v){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var b=[this],y=(1<<v)-1,_=y===1?null:this.dbl(),T=1;T<y;T++)b[T]=b[T-1].add(_);return{wnd:v,points:b}},"_getNAFPoints2"),"_getNAFPoints"),h.prototype._getBeta=a(i(function(){return null},"_getBeta3"),"_getBeta"),h.prototype.dblp=a(i(function(v){for(var b=this,y=0;y<v;y++)b=b.dbl();return b},"dblp3"),"dblp")}}),fm=ze({"../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=a(i(function(n,s){s&&(n.super_=s,n.prototype=Object.create(s.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"),"inherits"):t.exports=a(i(function(n,s){if(s){n.super_=s;var o=a(function(){},"TempCtor");o.prototype=s.prototype,n.prototype=new o,n.prototype.constructor=n}},"inherits"),"inherits")}}),DU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/short.js"(e,t){"use strict";var r=qi(),n=xa(),s=fm(),o=lm(),c=r.assert;function f(v){o.call(this,"short",v),this.a=new n(v.a,16).toRed(this.red),this.b=new n(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}i(f,"ShortCurve2"),a(f,"ShortCurve"),s(f,o),t.exports=f,f.prototype._getEndomorphism=a(i(function(b){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var y,_;if(b.beta)y=new n(b.beta,16).toRed(this.red);else{var T=this._getEndoRoots(this.p);y=T[0].cmp(T[1])<0?T[0]:T[1],y=y.toRed(this.red)}if(b.lambda)_=new n(b.lambda,16);else{var O=this._getEndoRoots(this.n);this.g.mul(O[0]).x.cmp(this.g.x.redMul(y))===0?_=O[0]:(_=O[1],c(this.g.mul(_).x.cmp(this.g.x.redMul(y))===0))}var R;return b.basis?R=b.basis.map(function(P){return{a:new n(P.a,16),b:new n(P.b,16)}}):R=this._getEndoBasis(_),{beta:y,lambda:_,basis:R}}},"_getEndomorphism2"),"_getEndomorphism"),f.prototype._getEndoRoots=a(i(function(b){var y=b===this.p?this.red:n.mont(b),_=new n(2).toRed(y).redInvm(),T=_.redNeg(),O=new n(3).toRed(y).redNeg().redSqrt().redMul(_),R=T.redAdd(O).fromRed(),P=T.redSub(O).fromRed();return[R,P]},"_getEndoRoots2"),"_getEndoRoots"),f.prototype._getEndoBasis=a(i(function(b){for(var y=this.n.ushrn(Math.floor(this.n.bitLength()/2)),_=b,T=this.n.clone(),O=new n(1),R=new n(0),P=new n(0),K=new n(1),U,j,V,G,I,H,se,ue=0,me,q;_.cmpn(0)!==0;){var w=T.div(_);me=T.sub(w.mul(_)),q=P.sub(w.mul(O));var x=K.sub(w.mul(R));if(!V&&me.cmp(y)<0)U=se.neg(),j=O,V=me.neg(),G=q;else if(V&&++ue===2)break;se=me,T=_,_=me,P=O,O=q,K=R,R=x}I=me.neg(),H=q;var m=V.sqr().add(G.sqr()),d=I.sqr().add(H.sqr());return d.cmp(m)>=0&&(I=U,H=j),V.negative&&(V=V.neg(),G=G.neg()),I.negative&&(I=I.neg(),H=H.neg()),[{a:V,b:G},{a:I,b:H}]},"_getEndoBasis2"),"_getEndoBasis"),f.prototype._endoSplit=a(i(function(b){var y=this.endo.basis,_=y[0],T=y[1],O=T.b.mul(b).divRound(this.n),R=_.b.neg().mul(b).divRound(this.n),P=O.mul(_.a),K=R.mul(T.a),U=O.mul(_.b),j=R.mul(T.b),V=b.sub(P).sub(K),G=U.add(j).neg();return{k1:V,k2:G}},"_endoSplit2"),"_endoSplit"),f.prototype.pointFromX=a(i(function(b,y){b=new n(b,16),b.red||(b=b.toRed(this.red));var _=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),T=_.redSqrt();if(T.redSqr().redSub(_).cmp(this.zero)!==0)throw new Error("invalid point");var O=T.fromRed().isOdd();return(y&&!O||!y&&O)&&(T=T.redNeg()),this.point(b,T)},"pointFromX2"),"pointFromX"),f.prototype.validate=a(i(function(b){if(b.inf)return!0;var y=b.x,_=b.y,T=this.a.redMul(y),O=y.redSqr().redMul(y).redIAdd(T).redIAdd(this.b);return _.redSqr().redISub(O).cmpn(0)===0},"validate6"),"validate"),f.prototype._endoWnafMulAdd=a(i(function(b,y,_){for(var T=this._endoWnafT1,O=this._endoWnafT2,R=0;R<b.length;R++){var P=this._endoSplit(y[R]),K=b[R],U=K._getBeta();P.k1.negative&&(P.k1.ineg(),K=K.neg(!0)),P.k2.negative&&(P.k2.ineg(),U=U.neg(!0)),T[R*2]=K,T[R*2+1]=U,O[R*2]=P.k1,O[R*2+1]=P.k2}for(var j=this._wnafMulAdd(1,T,O,R*2,_),V=0;V<R*2;V++)T[V]=null,O[V]=null;return j},"_endoWnafMulAdd2"),"_endoWnafMulAdd");function h(v,b,y,_){o.BasePoint.call(this,v,"affine"),b===null&&y===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(b,16),this.y=new n(y,16),_&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}i(h,"Point2"),a(h,"Point"),s(h,o.BasePoint),f.prototype.point=a(i(function(b,y,_){return new h(this,b,y,_)},"point3"),"point"),f.prototype.pointFromJSON=a(i(function(b,y){return h.fromJSON(this,b,y)},"pointFromJSON2"),"pointFromJSON"),h.prototype._getBeta=a(i(function(){if(!!this.curve.endo){var b=this.precomputed;if(b&&b.beta)return b.beta;var y=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(b){var _=this.curve,T=a(function(O){return _.point(O.x.redMul(_.endo.beta),O.y)},"endoMul");b.beta=y,y.precomputed={beta:null,naf:b.naf&&{wnd:b.naf.wnd,points:b.naf.points.map(T)},doubles:b.doubles&&{step:b.doubles.step,points:b.doubles.points.map(T)}}}return y}},"_getBeta3"),"_getBeta"),h.prototype.toJSON=a(i(function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},"toJSON2"),"toJSON"),h.fromJSON=a(i(function(b,y,_){typeof y=="string"&&(y=JSON.parse(y));var T=b.point(y[0],y[1],_);if(!y[2])return T;function O(P){return b.point(P[0],P[1],_)}i(O,"obj2point"),a(O,"obj2point");var R=y[2];return T.precomputed={beta:null,doubles:R.doubles&&{step:R.doubles.step,points:[T].concat(R.doubles.points.map(O))},naf:R.naf&&{wnd:R.naf.wnd,points:[T].concat(R.naf.points.map(O))}},T},"fromJSON2"),"fromJSON"),h.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),h.prototype.isInfinity=a(i(function(){return this.inf},"isInfinity3"),"isInfinity"),h.prototype.add=a(i(function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(this.x.cmp(b.x)===0)return this.curve.point(null,null);var y=this.y.redSub(b.y);y.cmpn(0)!==0&&(y=y.redMul(this.x.redSub(b.x).redInvm()));var _=y.redSqr().redISub(this.x).redISub(b.x),T=y.redMul(this.x.redSub(_)).redISub(this.y);return this.curve.point(_,T)},"add3"),"add"),h.prototype.dbl=a(i(function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(b.cmpn(0)===0)return this.curve.point(null,null);var y=this.curve.a,_=this.x.redSqr(),T=b.redInvm(),O=_.redAdd(_).redIAdd(_).redIAdd(y).redMul(T),R=O.redSqr().redISub(this.x.redAdd(this.x)),P=O.redMul(this.x.redSub(R)).redISub(this.y);return this.curve.point(R,P)},"dbl3"),"dbl"),h.prototype.getX=a(i(function(){return this.x.fromRed()},"getX2"),"getX"),h.prototype.getY=a(i(function(){return this.y.fromRed()},"getY2"),"getY"),h.prototype.mul=a(i(function(b){return b=new n(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},"mul3"),"mul"),h.prototype.mulAdd=a(i(function(b,y,_){var T=[this,y],O=[b,_];return this.curve.endo?this.curve._endoWnafMulAdd(T,O):this.curve._wnafMulAdd(1,T,O,2)},"mulAdd2"),"mulAdd"),h.prototype.jmulAdd=a(i(function(b,y,_){var T=[this,y],O=[b,_];return this.curve.endo?this.curve._endoWnafMulAdd(T,O,!0):this.curve._wnafMulAdd(1,T,O,2,!0)},"jmulAdd2"),"jmulAdd"),h.prototype.eq=a(i(function(b){return this===b||this.inf===b.inf&&(this.inf||this.x.cmp(b.x)===0&&this.y.cmp(b.y)===0)},"eq4"),"eq"),h.prototype.neg=a(i(function(b){if(this.inf)return this;var y=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var _=this.precomputed,T=a(function(O){return O.neg()},"negate");y.precomputed={naf:_.naf&&{wnd:_.naf.wnd,points:_.naf.points.map(T)},doubles:_.doubles&&{step:_.doubles.step,points:_.doubles.points.map(T)}}}return y},"neg3"),"neg"),h.prototype.toJ=a(i(function(){if(this.inf)return this.curve.jpoint(null,null,null);var b=this.curve.jpoint(this.x,this.y,this.curve.one);return b},"toJ2"),"toJ");function p(v,b,y,_){o.BasePoint.call(this,v,"jacobian"),b===null&&y===null&&_===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(b,16),this.y=new n(y,16),this.z=new n(_,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(p,"JPoint2"),a(p,"JPoint"),s(p,o.BasePoint),f.prototype.jpoint=a(i(function(b,y,_){return new p(this,b,y,_)},"jpoint2"),"jpoint"),p.prototype.toP=a(i(function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),y=b.redSqr(),_=this.x.redMul(y),T=this.y.redMul(y).redMul(b);return this.curve.point(_,T)},"toP2"),"toP"),p.prototype.neg=a(i(function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},"neg3"),"neg"),p.prototype.add=a(i(function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var y=b.z.redSqr(),_=this.z.redSqr(),T=this.x.redMul(y),O=b.x.redMul(_),R=this.y.redMul(y.redMul(b.z)),P=b.y.redMul(_.redMul(this.z)),K=T.redSub(O),U=R.redSub(P);if(K.cmpn(0)===0)return U.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var j=K.redSqr(),V=j.redMul(K),G=T.redMul(j),I=U.redSqr().redIAdd(V).redISub(G).redISub(G),H=U.redMul(G.redISub(I)).redISub(R.redMul(V)),se=this.z.redMul(b.z).redMul(K);return this.curve.jpoint(I,H,se)},"add3"),"add"),p.prototype.mixedAdd=a(i(function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var y=this.z.redSqr(),_=this.x,T=b.x.redMul(y),O=this.y,R=b.y.redMul(y).redMul(this.z),P=_.redSub(T),K=O.redSub(R);if(P.cmpn(0)===0)return K.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var U=P.redSqr(),j=U.redMul(P),V=_.redMul(U),G=K.redSqr().redIAdd(j).redISub(V).redISub(V),I=K.redMul(V.redISub(G)).redISub(O.redMul(j)),H=this.z.redMul(P);return this.curve.jpoint(G,I,H)},"mixedAdd2"),"mixedAdd"),p.prototype.dblp=a(i(function(b){if(b===0)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var y;if(this.curve.zeroA||this.curve.threeA){var _=this;for(y=0;y<b;y++)_=_.dbl();return _}var T=this.curve.a,O=this.curve.tinv,R=this.x,P=this.y,K=this.z,U=K.redSqr().redSqr(),j=P.redAdd(P);for(y=0;y<b;y++){var V=R.redSqr(),G=j.redSqr(),I=G.redSqr(),H=V.redAdd(V).redIAdd(V).redIAdd(T.redMul(U)),se=R.redMul(G),ue=H.redSqr().redISub(se.redAdd(se)),me=se.redISub(ue),q=H.redMul(me);q=q.redIAdd(q).redISub(I);var w=j.redMul(K);y+1<b&&(U=U.redMul(I)),R=ue,K=w,j=q}return this.curve.jpoint(R,j.redMul(O),K)},"dblp3"),"dblp"),p.prototype.dbl=a(i(function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},"dbl3"),"dbl"),p.prototype._zeroDbl=a(i(function(){var b,y,_;if(this.zOne){var T=this.x.redSqr(),O=this.y.redSqr(),R=O.redSqr(),P=this.x.redAdd(O).redSqr().redISub(T).redISub(R);P=P.redIAdd(P);var K=T.redAdd(T).redIAdd(T),U=K.redSqr().redISub(P).redISub(P),j=R.redIAdd(R);j=j.redIAdd(j),j=j.redIAdd(j),b=U,y=K.redMul(P.redISub(U)).redISub(j),_=this.y.redAdd(this.y)}else{var V=this.x.redSqr(),G=this.y.redSqr(),I=G.redSqr(),H=this.x.redAdd(G).redSqr().redISub(V).redISub(I);H=H.redIAdd(H);var se=V.redAdd(V).redIAdd(V),ue=se.redSqr(),me=I.redIAdd(I);me=me.redIAdd(me),me=me.redIAdd(me),b=ue.redISub(H).redISub(H),y=se.redMul(H.redISub(b)).redISub(me),_=this.y.redMul(this.z),_=_.redIAdd(_)}return this.curve.jpoint(b,y,_)},"_zeroDbl2"),"_zeroDbl"),p.prototype._threeDbl=a(i(function(){var b,y,_;if(this.zOne){var T=this.x.redSqr(),O=this.y.redSqr(),R=O.redSqr(),P=this.x.redAdd(O).redSqr().redISub(T).redISub(R);P=P.redIAdd(P);var K=T.redAdd(T).redIAdd(T).redIAdd(this.curve.a),U=K.redSqr().redISub(P).redISub(P);b=U;var j=R.redIAdd(R);j=j.redIAdd(j),j=j.redIAdd(j),y=K.redMul(P.redISub(U)).redISub(j),_=this.y.redAdd(this.y)}else{var V=this.z.redSqr(),G=this.y.redSqr(),I=this.x.redMul(G),H=this.x.redSub(V).redMul(this.x.redAdd(V));H=H.redAdd(H).redIAdd(H);var se=I.redIAdd(I);se=se.redIAdd(se);var ue=se.redAdd(se);b=H.redSqr().redISub(ue),_=this.y.redAdd(this.z).redSqr().redISub(G).redISub(V);var me=G.redSqr();me=me.redIAdd(me),me=me.redIAdd(me),me=me.redIAdd(me),y=H.redMul(se.redISub(b)).redISub(me)}return this.curve.jpoint(b,y,_)},"_threeDbl2"),"_threeDbl"),p.prototype._dbl=a(i(function(){var b=this.curve.a,y=this.x,_=this.y,T=this.z,O=T.redSqr().redSqr(),R=y.redSqr(),P=_.redSqr(),K=R.redAdd(R).redIAdd(R).redIAdd(b.redMul(O)),U=y.redAdd(y);U=U.redIAdd(U);var j=U.redMul(P),V=K.redSqr().redISub(j.redAdd(j)),G=j.redISub(V),I=P.redSqr();I=I.redIAdd(I),I=I.redIAdd(I),I=I.redIAdd(I);var H=K.redMul(G).redISub(I),se=_.redAdd(_).redMul(T);return this.curve.jpoint(V,H,se)},"_dbl2"),"_dbl"),p.prototype.trpl=a(i(function(){if(!this.curve.zeroA)return this.dbl().add(this);var b=this.x.redSqr(),y=this.y.redSqr(),_=this.z.redSqr(),T=y.redSqr(),O=b.redAdd(b).redIAdd(b),R=O.redSqr(),P=this.x.redAdd(y).redSqr().redISub(b).redISub(T);P=P.redIAdd(P),P=P.redAdd(P).redIAdd(P),P=P.redISub(R);var K=P.redSqr(),U=T.redIAdd(T);U=U.redIAdd(U),U=U.redIAdd(U),U=U.redIAdd(U);var j=O.redIAdd(P).redSqr().redISub(R).redISub(K).redISub(U),V=y.redMul(j);V=V.redIAdd(V),V=V.redIAdd(V);var G=this.x.redMul(K).redISub(V);G=G.redIAdd(G),G=G.redIAdd(G);var I=this.y.redMul(j.redMul(U.redISub(j)).redISub(P.redMul(K)));I=I.redIAdd(I),I=I.redIAdd(I),I=I.redIAdd(I);var H=this.z.redAdd(P).redSqr().redISub(_).redISub(K);return this.curve.jpoint(G,I,H)},"trpl2"),"trpl"),p.prototype.mul=a(i(function(b,y){return b=new n(b,y),this.curve._wnafMul(this,b)},"mul3"),"mul"),p.prototype.eq=a(i(function(b){if(b.type==="affine")return this.eq(b.toJ());if(this===b)return!0;var y=this.z.redSqr(),_=b.z.redSqr();if(this.x.redMul(_).redISub(b.x.redMul(y)).cmpn(0)!==0)return!1;var T=y.redMul(this.z),O=_.redMul(b.z);return this.y.redMul(O).redISub(b.y.redMul(T)).cmpn(0)===0},"eq4"),"eq"),p.prototype.eqXToP=a(i(function(b){var y=this.z.redSqr(),_=b.toRed(this.curve.red).redMul(y);if(this.x.cmp(_)===0)return!0;for(var T=b.clone(),O=this.curve.redN.redMul(y);;){if(T.iadd(this.curve.n),T.cmp(this.curve.p)>=0)return!1;if(_.redIAdd(O),this.x.cmp(_)===0)return!0}},"eqXToP2"),"eqXToP"),p.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},"inspect4"),"inspect"),p.prototype.isInfinity=a(i(function(){return this.z.cmpn(0)===0},"isInfinity3"),"isInfinity")}}),OU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/mont.js"(e,t){"use strict";var r=xa(),n=fm(),s=lm(),o=qi();function c(h){s.call(this,"mont",h),this.a=new r(h.a,16).toRed(this.red),this.b=new r(h.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}i(c,"MontCurve"),a(c,"MontCurve"),n(c,s),t.exports=c,c.prototype.validate=a(i(function(p){var v=p.normalize().x,b=v.redSqr(),y=b.redMul(v).redAdd(b.redMul(this.a)).redAdd(v),_=y.redSqrt();return _.redSqr().cmp(y)===0},"validate6"),"validate");function f(h,p,v){s.BasePoint.call(this,h,"projective"),p===null&&v===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(p,16),this.z=new r(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(f,"Point2"),a(f,"Point"),n(f,s.BasePoint),c.prototype.decodePoint=a(i(function(p,v){return this.point(o.toArray(p,v),1)},"decodePoint2"),"decodePoint"),c.prototype.point=a(i(function(p,v){return new f(this,p,v)},"point3"),"point"),c.prototype.pointFromJSON=a(i(function(p){return f.fromJSON(this,p)},"pointFromJSON2"),"pointFromJSON"),f.prototype.precompute=a(i(function(){},"precompute2"),"precompute"),f.prototype._encode=a(i(function(){return this.getX().toArray("be",this.curve.p.byteLength())},"_encode2"),"_encode"),f.fromJSON=a(i(function(p,v){return new f(p,v[0],v[1]||p.one)},"fromJSON2"),"fromJSON"),f.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),f.prototype.isInfinity=a(i(function(){return this.z.cmpn(0)===0},"isInfinity3"),"isInfinity"),f.prototype.dbl=a(i(function(){var p=this.x.redAdd(this.z),v=p.redSqr(),b=this.x.redSub(this.z),y=b.redSqr(),_=v.redSub(y),T=v.redMul(y),O=_.redMul(y.redAdd(this.curve.a24.redMul(_)));return this.curve.point(T,O)},"dbl3"),"dbl"),f.prototype.add=a(i(function(){throw new Error("Not supported on Montgomery curve")},"add3"),"add"),f.prototype.diffAdd=a(i(function(p,v){var b=this.x.redAdd(this.z),y=this.x.redSub(this.z),_=p.x.redAdd(p.z),T=p.x.redSub(p.z),O=T.redMul(b),R=_.redMul(y),P=v.z.redMul(O.redAdd(R).redSqr()),K=v.x.redMul(O.redISub(R).redSqr());return this.curve.point(P,K)},"diffAdd"),"diffAdd"),f.prototype.mul=a(i(function(p){for(var v=p.clone(),b=this,y=this.curve.point(null,null),_=this,T=[];v.cmpn(0)!==0;v.iushrn(1))T.push(v.andln(1));for(var O=T.length-1;O>=0;O--)T[O]===0?(b=b.diffAdd(y,_),y=y.dbl()):(y=b.diffAdd(y,_),b=b.dbl());return y},"mul3"),"mul"),f.prototype.mulAdd=a(i(function(){throw new Error("Not supported on Montgomery curve")},"mulAdd2"),"mulAdd"),f.prototype.jumlAdd=a(i(function(){throw new Error("Not supported on Montgomery curve")},"jumlAdd"),"jumlAdd"),f.prototype.eq=a(i(function(p){return this.getX().cmp(p.getX())===0},"eq4"),"eq"),f.prototype.normalize=a(i(function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},"normalize"),"normalize"),f.prototype.getX=a(i(function(){return this.normalize(),this.x.fromRed()},"getX2"),"getX")}}),RU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/edwards.js"(e,t){"use strict";var r=qi(),n=xa(),s=fm(),o=lm(),c=r.assert;function f(p){this.twisted=(p.a|0)!==1,this.mOneA=this.twisted&&(p.a|0)===-1,this.extended=this.mOneA,o.call(this,"edwards",p),this.a=new n(p.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(p.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(p.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),c(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(p.c|0)===1}i(f,"EdwardsCurve"),a(f,"EdwardsCurve"),s(f,o),t.exports=f,f.prototype._mulA=a(i(function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},"_mulA"),"_mulA"),f.prototype._mulC=a(i(function(v){return this.oneC?v:this.c.redMul(v)},"_mulC"),"_mulC"),f.prototype.jpoint=a(i(function(v,b,y,_){return this.point(v,b,y,_)},"jpoint2"),"jpoint"),f.prototype.pointFromX=a(i(function(v,b){v=new n(v,16),v.red||(v=v.toRed(this.red));var y=v.redSqr(),_=this.c2.redSub(this.a.redMul(y)),T=this.one.redSub(this.c2.redMul(this.d).redMul(y)),O=_.redMul(T.redInvm()),R=O.redSqrt();if(R.redSqr().redSub(O).cmp(this.zero)!==0)throw new Error("invalid point");var P=R.fromRed().isOdd();return(b&&!P||!b&&P)&&(R=R.redNeg()),this.point(v,R)},"pointFromX2"),"pointFromX"),f.prototype.pointFromY=a(i(function(v,b){v=new n(v,16),v.red||(v=v.toRed(this.red));var y=v.redSqr(),_=y.redSub(this.c2),T=y.redMul(this.d).redMul(this.c2).redSub(this.a),O=_.redMul(T.redInvm());if(O.cmp(this.zero)===0){if(b)throw new Error("invalid point");return this.point(this.zero,v)}var R=O.redSqrt();if(R.redSqr().redSub(O).cmp(this.zero)!==0)throw new Error("invalid point");return R.fromRed().isOdd()!==b&&(R=R.redNeg()),this.point(R,v)},"pointFromY"),"pointFromY"),f.prototype.validate=a(i(function(v){if(v.isInfinity())return!0;v.normalize();var b=v.x.redSqr(),y=v.y.redSqr(),_=b.redMul(this.a).redAdd(y),T=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(y)));return _.cmp(T)===0},"validate6"),"validate");function h(p,v,b,y,_){o.BasePoint.call(this,p,"projective"),v===null&&b===null&&y===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(v,16),this.y=new n(b,16),this.z=y?new n(y,16):this.curve.one,this.t=_&&new n(_,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(h,"Point2"),a(h,"Point"),s(h,o.BasePoint),f.prototype.pointFromJSON=a(i(function(v){return h.fromJSON(this,v)},"pointFromJSON2"),"pointFromJSON"),f.prototype.point=a(i(function(v,b,y,_){return new h(this,v,b,y,_)},"point3"),"point"),h.fromJSON=a(i(function(v,b){return new h(v,b[0],b[1],b[2])},"fromJSON2"),"fromJSON"),h.prototype.inspect=a(i(function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},"inspect4"),"inspect"),h.prototype.isInfinity=a(i(function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},"isInfinity3"),"isInfinity"),h.prototype._extDbl=a(i(function(){var v=this.x.redSqr(),b=this.y.redSqr(),y=this.z.redSqr();y=y.redIAdd(y);var _=this.curve._mulA(v),T=this.x.redAdd(this.y).redSqr().redISub(v).redISub(b),O=_.redAdd(b),R=O.redSub(y),P=_.redSub(b),K=T.redMul(R),U=O.redMul(P),j=T.redMul(P),V=R.redMul(O);return this.curve.point(K,U,V,j)},"_extDbl"),"_extDbl"),h.prototype._projDbl=a(i(function(){var v=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),y=this.y.redSqr(),_,T,O,R,P,K;if(this.curve.twisted){R=this.curve._mulA(b);var U=R.redAdd(y);this.zOne?(_=v.redSub(b).redSub(y).redMul(U.redSub(this.curve.two)),T=U.redMul(R.redSub(y)),O=U.redSqr().redSub(U).redSub(U)):(P=this.z.redSqr(),K=U.redSub(P).redISub(P),_=v.redSub(b).redISub(y).redMul(K),T=U.redMul(R.redSub(y)),O=U.redMul(K))}else R=b.redAdd(y),P=this.curve._mulC(this.z).redSqr(),K=R.redSub(P).redSub(P),_=this.curve._mulC(v.redISub(R)).redMul(K),T=this.curve._mulC(R).redMul(b.redISub(y)),O=R.redMul(K);return this.curve.point(_,T,O)},"_projDbl"),"_projDbl"),h.prototype.dbl=a(i(function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},"dbl3"),"dbl"),h.prototype._extAdd=a(i(function(v){var b=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),y=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),_=this.t.redMul(this.curve.dd).redMul(v.t),T=this.z.redMul(v.z.redAdd(v.z)),O=y.redSub(b),R=T.redSub(_),P=T.redAdd(_),K=y.redAdd(b),U=O.redMul(R),j=P.redMul(K),V=O.redMul(K),G=R.redMul(P);return this.curve.point(U,j,G,V)},"_extAdd"),"_extAdd"),h.prototype._projAdd=a(i(function(v){var b=this.z.redMul(v.z),y=b.redSqr(),_=this.x.redMul(v.x),T=this.y.redMul(v.y),O=this.curve.d.redMul(_).redMul(T),R=y.redSub(O),P=y.redAdd(O),K=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(_).redISub(T),U=b.redMul(R).redMul(K),j,V;return this.curve.twisted?(j=b.redMul(P).redMul(T.redSub(this.curve._mulA(_))),V=R.redMul(P)):(j=b.redMul(P).redMul(T.redSub(_)),V=this.curve._mulC(R).redMul(P)),this.curve.point(U,j,V)},"_projAdd"),"_projAdd"),h.prototype.add=a(i(function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},"add3"),"add"),h.prototype.mul=a(i(function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},"mul3"),"mul"),h.prototype.mulAdd=a(i(function(v,b,y){return this.curve._wnafMulAdd(1,[this,b],[v,y],2,!1)},"mulAdd2"),"mulAdd"),h.prototype.jmulAdd=a(i(function(v,b,y){return this.curve._wnafMulAdd(1,[this,b],[v,y],2,!0)},"jmulAdd2"),"jmulAdd"),h.prototype.normalize=a(i(function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},"normalize"),"normalize"),h.prototype.neg=a(i(function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},"neg3"),"neg"),h.prototype.getX=a(i(function(){return this.normalize(),this.x.fromRed()},"getX2"),"getX"),h.prototype.getY=a(i(function(){return this.normalize(),this.y.fromRed()},"getY2"),"getY"),h.prototype.eq=a(i(function(v){return this===v||this.getX().cmp(v.getX())===0&&this.getY().cmp(v.getY())===0},"eq4"),"eq"),h.prototype.eqXToP=a(i(function(v){var b=v.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(b)===0)return!0;for(var y=v.clone(),_=this.curve.redN.redMul(this.z);;){if(y.iadd(this.curve.n),y.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(_),this.x.cmp(b)===0)return!0}},"eqXToP2"),"eqXToP"),h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add}}),YS=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/index.js"(e){"use strict";var t=e;t.base=lm(),t.short=DU(),t.mont=OU(),t.edwards=RU()}}),zs=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js"(e){"use strict";var t=Mc(),r=fm();e.inherits=r;function n(w,x){return(w.charCodeAt(x)&64512)!==55296||x<0||x+1>=w.length?!1:(w.charCodeAt(x+1)&64512)===56320}i(n,"isSurrogatePair"),a(n,"isSurrogatePair");function s(w,x){if(Array.isArray(w))return w.slice();if(!w)return[];var m=[];if(typeof w=="string")if(x){if(x==="hex")for(w=w.replace(/[^a-z0-9]+/ig,""),w.length%2!==0&&(w="0"+w),g=0;g<w.length;g+=2)m.push(parseInt(w[g]+w[g+1],16))}else for(var d=0,g=0;g<w.length;g++){var S=w.charCodeAt(g);S<128?m[d++]=S:S<2048?(m[d++]=S>>6|192,m[d++]=S&63|128):n(w,g)?(S=65536+((S&1023)<<10)+(w.charCodeAt(++g)&1023),m[d++]=S>>18|240,m[d++]=S>>12&63|128,m[d++]=S>>6&63|128,m[d++]=S&63|128):(m[d++]=S>>12|224,m[d++]=S>>6&63|128,m[d++]=S&63|128)}else for(g=0;g<w.length;g++)m[g]=w[g]|0;return m}i(s,"toArray"),a(s,"toArray"),e.toArray=s;function o(w){for(var x="",m=0;m<w.length;m++)x+=h(w[m].toString(16));return x}i(o,"toHex"),a(o,"toHex"),e.toHex=o;function c(w){var x=w>>>24|w>>>8&65280|w<<8&16711680|(w&255)<<24;return x>>>0}i(c,"htonl"),a(c,"htonl"),e.htonl=c;function f(w,x){for(var m="",d=0;d<w.length;d++){var g=w[d];x==="little"&&(g=c(g)),m+=p(g.toString(16))}return m}i(f,"toHex32"),a(f,"toHex32"),e.toHex32=f;function h(w){return w.length===1?"0"+w:w}i(h,"zero2"),a(h,"zero2"),e.zero2=h;function p(w){return w.length===7?"0"+w:w.length===6?"00"+w:w.length===5?"000"+w:w.length===4?"0000"+w:w.length===3?"00000"+w:w.length===2?"000000"+w:w.length===1?"0000000"+w:w}i(p,"zero8"),a(p,"zero8"),e.zero8=p;function v(w,x,m,d){var g=m-x;t(g%4===0);for(var S=new Array(g/4),D=0,C=x;D<S.length;D++,C+=4){var E;d==="big"?E=w[C]<<24|w[C+1]<<16|w[C+2]<<8|w[C+3]:E=w[C+3]<<24|w[C+2]<<16|w[C+1]<<8|w[C],S[D]=E>>>0}return S}i(v,"join32"),a(v,"join32"),e.join32=v;function b(w,x){for(var m=new Array(w.length*4),d=0,g=0;d<w.length;d++,g+=4){var S=w[d];x==="big"?(m[g]=S>>>24,m[g+1]=S>>>16&255,m[g+2]=S>>>8&255,m[g+3]=S&255):(m[g+3]=S>>>24,m[g+2]=S>>>16&255,m[g+1]=S>>>8&255,m[g]=S&255)}return m}i(b,"split32"),a(b,"split32"),e.split32=b;function y(w,x){return w>>>x|w<<32-x}i(y,"rotr32"),a(y,"rotr32"),e.rotr32=y;function _(w,x){return w<<x|w>>>32-x}i(_,"rotl32"),a(_,"rotl32"),e.rotl32=_;function T(w,x){return w+x>>>0}i(T,"sum32"),a(T,"sum32"),e.sum32=T;function O(w,x,m){return w+x+m>>>0}i(O,"sum32_3"),a(O,"sum32_3"),e.sum32_3=O;function R(w,x,m,d){return w+x+m+d>>>0}i(R,"sum32_4"),a(R,"sum32_4"),e.sum32_4=R;function P(w,x,m,d,g){return w+x+m+d+g>>>0}i(P,"sum32_5"),a(P,"sum32_5"),e.sum32_5=P;function K(w,x,m,d){var g=w[x],S=w[x+1],D=d+S>>>0,C=(D<d?1:0)+m+g;w[x]=C>>>0,w[x+1]=D}i(K,"sum64"),a(K,"sum64"),e.sum64=K;function U(w,x,m,d){var g=x+d>>>0,S=(g<x?1:0)+w+m;return S>>>0}i(U,"sum64_hi"),a(U,"sum64_hi"),e.sum64_hi=U;function j(w,x,m,d){var g=x+d;return g>>>0}i(j,"sum64_lo"),a(j,"sum64_lo"),e.sum64_lo=j;function V(w,x,m,d,g,S,D,C){var E=0,B=x;B=B+d>>>0,E+=B<x?1:0,B=B+S>>>0,E+=B<S?1:0,B=B+C>>>0,E+=B<C?1:0;var $=w+m+g+D+E;return $>>>0}i(V,"sum64_4_hi"),a(V,"sum64_4_hi"),e.sum64_4_hi=V;function G(w,x,m,d,g,S,D,C){var E=x+d+S+C;return E>>>0}i(G,"sum64_4_lo"),a(G,"sum64_4_lo"),e.sum64_4_lo=G;function I(w,x,m,d,g,S,D,C,E,B){var $=0,k=x;k=k+d>>>0,$+=k<x?1:0,k=k+S>>>0,$+=k<S?1:0,k=k+C>>>0,$+=k<C?1:0,k=k+B>>>0,$+=k<B?1:0;var F=w+m+g+D+E+$;return F>>>0}i(I,"sum64_5_hi"),a(I,"sum64_5_hi"),e.sum64_5_hi=I;function H(w,x,m,d,g,S,D,C,E,B){var $=x+d+S+C+B;return $>>>0}i(H,"sum64_5_lo"),a(H,"sum64_5_lo"),e.sum64_5_lo=H;function se(w,x,m){var d=x<<32-m|w>>>m;return d>>>0}i(se,"rotr64_hi"),a(se,"rotr64_hi"),e.rotr64_hi=se;function ue(w,x,m){var d=w<<32-m|x>>>m;return d>>>0}i(ue,"rotr64_lo"),a(ue,"rotr64_lo"),e.rotr64_lo=ue;function me(w,x,m){return w>>>m}i(me,"shr64_hi"),a(me,"shr64_hi"),e.shr64_hi=me;function q(w,x,m){var d=w<<32-m|x>>>m;return d>>>0}i(q,"shr64_lo"),a(q,"shr64_lo"),e.shr64_lo=q}}),hd=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js"(e){"use strict";var t=zs(),r=Mc();function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}i(n,"BlockHash"),a(n,"BlockHash"),e.BlockHash=n,n.prototype.update=a(i(function(o,c){if(o=t.toArray(o,c),this.pending?this.pending=this.pending.concat(o):this.pending=o,this.pendingTotal+=o.length,this.pending.length>=this._delta8){o=this.pending;var f=o.length%this._delta8;this.pending=o.slice(o.length-f,o.length),this.pending.length===0&&(this.pending=null),o=t.join32(o,0,o.length-f,this.endian);for(var h=0;h<o.length;h+=this._delta32)this._update(o,h,h+this._delta32)}return this},"update2"),"update"),n.prototype.digest=a(i(function(o){return this.update(this._pad()),r(this.pending===null),this._digest(o)},"digest2"),"digest"),n.prototype._pad=a(i(function(){var o=this.pendingTotal,c=this._delta8,f=c-(o+this.padLength)%c,h=new Array(f+this.padLength);h[0]=128;for(var p=1;p<f;p++)h[p]=0;if(o<<=3,this.endian==="big"){for(var v=8;v<this.padLength;v++)h[p++]=0;h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=o>>>24&255,h[p++]=o>>>16&255,h[p++]=o>>>8&255,h[p++]=o&255}else for(h[p++]=o&255,h[p++]=o>>>8&255,h[p++]=o>>>16&255,h[p++]=o>>>24&255,h[p++]=0,h[p++]=0,h[p++]=0,h[p++]=0,v=8;v<this.padLength;v++)h[p++]=0;return h},"pad2"),"pad")}}),XS=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js"(e){"use strict";var t=zs(),r=t.rotr32;function n(b,y,_,T){if(b===0)return s(y,_,T);if(b===1||b===3)return c(y,_,T);if(b===2)return o(y,_,T)}i(n,"ft_1"),a(n,"ft_1"),e.ft_1=n;function s(b,y,_){return b&y^~b&_}i(s,"ch32"),a(s,"ch32"),e.ch32=s;function o(b,y,_){return b&y^b&_^y&_}i(o,"maj32"),a(o,"maj32"),e.maj32=o;function c(b,y,_){return b^y^_}i(c,"p32"),a(c,"p32"),e.p32=c;function f(b){return r(b,2)^r(b,13)^r(b,22)}i(f,"s0_256"),a(f,"s0_256"),e.s0_256=f;function h(b){return r(b,6)^r(b,11)^r(b,25)}i(h,"s1_256"),a(h,"s1_256"),e.s1_256=h;function p(b){return r(b,7)^r(b,18)^b>>>3}i(p,"g0_256"),a(p,"g0_256"),e.g0_256=p;function v(b){return r(b,17)^r(b,19)^b>>>10}i(v,"g1_256"),a(v,"g1_256"),e.g1_256=v}}),NU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js"(e,t){"use strict";var r=zs(),n=hd(),s=XS(),o=r.rotl32,c=r.sum32,f=r.sum32_5,h=s.ft_1,p=n.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function b(){if(!(this instanceof b))return new b;p.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i(b,"SHA1"),a(b,"SHA1"),r.inherits(b,p),t.exports=b,b.blockSize=512,b.outSize=160,b.hmacStrength=80,b.padLength=64,b.prototype._update=a(i(function(_,T){for(var O=this.W,R=0;R<16;R++)O[R]=_[T+R];for(;R<O.length;R++)O[R]=o(O[R-3]^O[R-8]^O[R-14]^O[R-16],1);var P=this.h[0],K=this.h[1],U=this.h[2],j=this.h[3],V=this.h[4];for(R=0;R<O.length;R++){var G=~~(R/20),I=f(o(P,5),h(G,K,U,j),V,O[R],v[G]);V=j,j=U,U=o(K,30),K=P,P=I}this.h[0]=c(this.h[0],P),this.h[1]=c(this.h[1],K),this.h[2]=c(this.h[2],U),this.h[3]=c(this.h[3],j),this.h[4]=c(this.h[4],V)},"_update"),"_update"),b.prototype._digest=a(i(function(_){return _==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest")}}),QS=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js"(e,t){"use strict";var r=zs(),n=hd(),s=XS(),o=Mc(),c=r.sum32,f=r.sum32_4,h=r.sum32_5,p=s.ch32,v=s.maj32,b=s.s0_256,y=s.s1_256,_=s.g0_256,T=s.g1_256,O=n.BlockHash,R=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function P(){if(!(this instanceof P))return new P;O.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=R,this.W=new Array(64)}i(P,"SHA256"),a(P,"SHA256"),r.inherits(P,O),t.exports=P,P.blockSize=512,P.outSize=256,P.hmacStrength=192,P.padLength=64,P.prototype._update=a(i(function(U,j){for(var V=this.W,G=0;G<16;G++)V[G]=U[j+G];for(;G<V.length;G++)V[G]=f(T(V[G-2]),V[G-7],_(V[G-15]),V[G-16]);var I=this.h[0],H=this.h[1],se=this.h[2],ue=this.h[3],me=this.h[4],q=this.h[5],w=this.h[6],x=this.h[7];for(o(this.k.length===V.length),G=0;G<V.length;G++){var m=h(x,y(me),p(me,q,w),this.k[G],V[G]),d=c(b(I),v(I,H,se));x=w,w=q,q=me,me=c(ue,m),ue=se,se=H,H=I,I=c(m,d)}this.h[0]=c(this.h[0],I),this.h[1]=c(this.h[1],H),this.h[2]=c(this.h[2],se),this.h[3]=c(this.h[3],ue),this.h[4]=c(this.h[4],me),this.h[5]=c(this.h[5],q),this.h[6]=c(this.h[6],w),this.h[7]=c(this.h[7],x)},"_update"),"_update"),P.prototype._digest=a(i(function(U){return U==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest")}}),PU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js"(e,t){"use strict";var r=zs(),n=QS();function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i(s,"SHA224"),a(s,"SHA224"),r.inherits(s,n),t.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=a(i(function(c){return c==="hex"?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")},"digest2"),"digest")}}),ex=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js"(e,t){"use strict";var r=zs(),n=hd(),s=Mc(),o=r.rotr64_hi,c=r.rotr64_lo,f=r.shr64_hi,h=r.shr64_lo,p=r.sum64,v=r.sum64_hi,b=r.sum64_lo,y=r.sum64_4_hi,_=r.sum64_4_lo,T=r.sum64_5_hi,O=r.sum64_5_lo,R=n.BlockHash,P=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(){if(!(this instanceof K))return new K;R.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=P,this.W=new Array(160)}i(K,"SHA512"),a(K,"SHA512"),r.inherits(K,R),t.exports=K,K.blockSize=1024,K.outSize=512,K.hmacStrength=192,K.padLength=128,K.prototype._prepareBlock=a(i(function(d,g){for(var S=this.W,D=0;D<32;D++)S[D]=d[g+D];for(;D<S.length;D+=2){var C=w(S[D-4],S[D-3]),E=x(S[D-4],S[D-3]),B=S[D-14],$=S[D-13],k=me(S[D-30],S[D-29]),F=q(S[D-30],S[D-29]),he=S[D-32],N=S[D-31];S[D]=y(C,E,B,$,k,F,he,N),S[D+1]=_(C,E,B,$,k,F,he,N)}},"_prepareBlock"),"_prepareBlock"),K.prototype._update=a(i(function(d,g){this._prepareBlock(d,g);var S=this.W,D=this.h[0],C=this.h[1],E=this.h[2],B=this.h[3],$=this.h[4],k=this.h[5],F=this.h[6],he=this.h[7],N=this.h[8],Y=this.h[9],J=this.h[10],M=this.h[11],z=this.h[12],re=this.h[13],oe=this.h[14],ge=this.h[15];s(this.k.length===S.length);for(var ke=0;ke<S.length;ke+=2){var _e=oe,fe=ge,Ce=se(N,Y),pe=ue(N,Y),we=U(N,Y,J,M,z,re),Q=j(N,Y,J,M,z,re),ve=this.k[ke],Me=this.k[ke+1],Ue=S[ke],Re=S[ke+1],je=T(_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re),rt=O(_e,fe,Ce,pe,we,Q,ve,Me,Ue,Re);_e=I(D,C),fe=H(D,C),Ce=V(D,C,E,B,$,k),pe=G(D,C,E,B,$,k);var le=v(_e,fe,Ce,pe),ce=b(_e,fe,Ce,pe);oe=z,ge=re,z=J,re=M,J=N,M=Y,N=v(F,he,je,rt),Y=b(he,he,je,rt),F=$,he=k,$=E,k=B,E=D,B=C,D=v(je,rt,le,ce),C=b(je,rt,le,ce)}p(this.h,0,D,C),p(this.h,2,E,B),p(this.h,4,$,k),p(this.h,6,F,he),p(this.h,8,N,Y),p(this.h,10,J,M),p(this.h,12,z,re),p(this.h,14,oe,ge)},"_update"),"_update"),K.prototype._digest=a(i(function(d){return d==="hex"?r.toHex32(this.h,"big"):r.split32(this.h,"big")},"digest2"),"digest");function U(m,d,g,S,D){var C=m&g^~m&D;return C<0&&(C+=4294967296),C}i(U,"ch64_hi"),a(U,"ch64_hi");function j(m,d,g,S,D,C){var E=d&S^~d&C;return E<0&&(E+=4294967296),E}i(j,"ch64_lo"),a(j,"ch64_lo");function V(m,d,g,S,D){var C=m&g^m&D^g&D;return C<0&&(C+=4294967296),C}i(V,"maj64_hi"),a(V,"maj64_hi");function G(m,d,g,S,D,C){var E=d&S^d&C^S&C;return E<0&&(E+=4294967296),E}i(G,"maj64_lo"),a(G,"maj64_lo");function I(m,d){var g=o(m,d,28),S=o(d,m,2),D=o(d,m,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(I,"s0_512_hi"),a(I,"s0_512_hi");function H(m,d){var g=c(m,d,28),S=c(d,m,2),D=c(d,m,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(H,"s0_512_lo"),a(H,"s0_512_lo");function se(m,d){var g=o(m,d,14),S=o(m,d,18),D=o(d,m,9),C=g^S^D;return C<0&&(C+=4294967296),C}i(se,"s1_512_hi"),a(se,"s1_512_hi");function ue(m,d){var g=c(m,d,14),S=c(m,d,18),D=c(d,m,9),C=g^S^D;return C<0&&(C+=4294967296),C}i(ue,"s1_512_lo"),a(ue,"s1_512_lo");function me(m,d){var g=o(m,d,1),S=o(m,d,8),D=f(m,d,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(me,"g0_512_hi"),a(me,"g0_512_hi");function q(m,d){var g=c(m,d,1),S=c(m,d,8),D=h(m,d,7),C=g^S^D;return C<0&&(C+=4294967296),C}i(q,"g0_512_lo"),a(q,"g0_512_lo");function w(m,d){var g=o(m,d,19),S=o(d,m,29),D=f(m,d,6),C=g^S^D;return C<0&&(C+=4294967296),C}i(w,"g1_512_hi"),a(w,"g1_512_hi");function x(m,d){var g=c(m,d,19),S=c(d,m,29),D=h(m,d,6),C=g^S^D;return C<0&&(C+=4294967296),C}i(x,"g1_512_lo"),a(x,"g1_512_lo")}}),BU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js"(e,t){"use strict";var r=zs(),n=ex();function s(){if(!(this instanceof s))return new s;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i(s,"SHA384"),a(s,"SHA384"),r.inherits(s,n),t.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=a(i(function(c){return c==="hex"?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")},"digest2"),"digest")}}),LU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js"(e){"use strict";e.sha1=NU(),e.sha224=PU(),e.sha256=QS(),e.sha384=BU(),e.sha512=ex()}}),FU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js"(e){"use strict";var t=zs(),r=hd(),n=t.rotl32,s=t.sum32,o=t.sum32_3,c=t.sum32_4,f=r.BlockHash;function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}i(h,"RIPEMD160"),a(h,"RIPEMD160"),t.inherits(h,f),e.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=a(i(function(P,K){for(var U=this.h[0],j=this.h[1],V=this.h[2],G=this.h[3],I=this.h[4],H=U,se=j,ue=V,me=G,q=I,w=0;w<80;w++){var x=s(n(c(U,p(w,j,V,G),P[y[w]+K],v(w)),T[w]),I);U=I,I=G,G=n(V,10),V=j,j=x,x=s(n(c(H,p(79-w,se,ue,me),P[_[w]+K],b(w)),O[w]),q),H=q,q=me,me=n(ue,10),ue=se,se=x}x=o(this.h[1],V,me),this.h[1]=o(this.h[2],G,q),this.h[2]=o(this.h[3],I,H),this.h[3]=o(this.h[4],U,se),this.h[4]=o(this.h[0],j,ue),this.h[0]=x},"update2"),"update"),h.prototype._digest=a(i(function(P){return P==="hex"?t.toHex32(this.h,"little"):t.split32(this.h,"little")},"digest2"),"digest");function p(R,P,K,U){return R<=15?P^K^U:R<=31?P&K|~P&U:R<=47?(P|~K)^U:R<=63?P&U|K&~U:P^(K|~U)}i(p,"f2"),a(p,"f");function v(R){return R<=15?0:R<=31?1518500249:R<=47?1859775393:R<=63?2400959708:2840853838}i(v,"K"),a(v,"K");function b(R){return R<=15?1352829926:R<=31?1548603684:R<=47?1836072691:R<=63?2053994217:0}i(b,"Kh"),a(b,"Kh");var y=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],T=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],O=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}}),UU=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js"(e,t){"use strict";var r=zs(),n=Mc();function s(o,c,f){if(!(this instanceof s))return new s(o,c,f);this.Hash=o,this.blockSize=o.blockSize/8,this.outSize=o.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(c,f))}i(s,"Hmac"),a(s,"Hmac"),t.exports=s,s.prototype._init=a(i(function(c){c.length>this.blockSize&&(c=new this.Hash().update(c).digest()),n(c.length<=this.blockSize);for(var f=c.length;f<this.blockSize;f++)c.push(0);for(f=0;f<c.length;f++)c[f]^=54;for(this.inner=new this.Hash().update(c),f=0;f<c.length;f++)c[f]^=106;this.outer=new this.Hash().update(c)},"init2"),"init"),s.prototype.update=a(i(function(c,f){return this.inner.update(c,f),this},"update2"),"update"),s.prototype.digest=a(i(function(c){return this.outer.update(this.inner.digest()),this.outer.digest(c)},"digest2"),"digest")}}),dm=ze({"../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js"(e){var t=e;t.utils=zs(),t.common=hd(),t.sha=LU(),t.ripemd=FU(),t.hmac=UU(),t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}}),$U=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js"(e,t){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}}),s2=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curves.js"(e){"use strict";var t=e,r=dm(),n=YS(),s=qi(),o=s.assert;function c(p){p.type==="short"?this.curve=new n.short(p):p.type==="edwards"?this.curve=new n.edwards(p):this.curve=new n.mont(p),this.g=this.curve.g,this.n=this.curve.n,this.hash=p.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}i(c,"PresetCurve"),a(c,"PresetCurve"),t.PresetCurve=c;function f(p,v){Object.defineProperty(t,p,{configurable:!0,enumerable:!0,get:function(){var b=new c(v);return Object.defineProperty(t,p,{configurable:!0,enumerable:!0,value:b}),b}})}i(f,"defineCurve"),a(f,"defineCurve"),f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var h;try{h=$U()}catch{h=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",h]})}}),jU=ze({"../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js"(e,t){"use strict";var r=dm(),n=ZS(),s=Mc();function o(c){if(!(this instanceof o))return new o(c);this.hash=c.hash,this.predResist=!!c.predResist,this.outLen=this.hash.outSize,this.minEntropy=c.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var f=n.toArray(c.entropy,c.entropyEnc||"hex"),h=n.toArray(c.nonce,c.nonceEnc||"hex"),p=n.toArray(c.pers,c.persEnc||"hex");s(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(f,h,p)}i(o,"HmacDRBG2"),a(o,"HmacDRBG"),t.exports=o,o.prototype._init=a(i(function(f,h,p){var v=f.concat(h).concat(p);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b<this.V.length;b++)this.K[b]=0,this.V[b]=1;this._update(v),this._reseed=1,this.reseedInterval=281474976710656},"init2"),"init"),o.prototype._hmac=a(i(function(){return new r.hmac(this.hash,this.K)},"hmac2"),"hmac"),o.prototype._update=a(i(function(f){var h=this._hmac().update(this.V).update([0]);f&&(h=h.update(f)),this.K=h.digest(),this.V=this._hmac().update(this.V).digest(),f&&(this.K=this._hmac().update(this.V).update([1]).update(f).digest(),this.V=this._hmac().update(this.V).digest())},"update2"),"update"),o.prototype.reseed=a(i(function(f,h,p,v){typeof h!="string"&&(v=p,p=h,h=null),f=n.toArray(f,h),p=n.toArray(p,v),s(f.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(f.concat(p||[])),this._reseed=1},"reseed2"),"reseed"),o.prototype.generate=a(i(function(f,h,p,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof h!="string"&&(v=p,p=h,h=null),p&&(p=n.toArray(p,v||"hex"),this._update(p));for(var b=[];b.length<f;)this.V=this._hmac().update(this.V).digest(),b=b.concat(this.V);var y=b.slice(0,f);return this._update(p),this._reseed++,n.encode(y,h)},"generate3"),"generate")}}),zU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/key.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert;function o(c,f){this.ec=c,this.priv=null,this.pub=null,f.priv&&this._importPrivate(f.priv,f.privEnc),f.pub&&this._importPublic(f.pub,f.pubEnc)}i(o,"KeyPair2"),a(o,"KeyPair"),t.exports=o,o.fromPublic=a(i(function(f,h,p){return h instanceof o?h:new o(f,{pub:h,pubEnc:p})},"fromPublic2"),"fromPublic"),o.fromPrivate=a(i(function(f,h,p){return h instanceof o?h:new o(f,{priv:h,privEnc:p})},"fromPrivate2"),"fromPrivate"),o.prototype.validate=a(i(function(){var f=this.getPublic();return f.isInfinity()?{result:!1,reason:"Invalid public key"}:f.validate()?f.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},"validate6"),"validate"),o.prototype.getPublic=a(i(function(f,h){return typeof f=="string"&&(h=f,f=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),h?this.pub.encode(h,f):this.pub},"getPublic2"),"getPublic"),o.prototype.getPrivate=a(i(function(f){return f==="hex"?this.priv.toString(16,2):this.priv},"getPrivate2"),"getPrivate"),o.prototype._importPrivate=a(i(function(f,h){this.priv=new r(f,h||16),this.priv=this.priv.umod(this.ec.curve.n)},"_importPrivate2"),"_importPrivate"),o.prototype._importPublic=a(i(function(f,h){if(f.x||f.y){this.ec.curve.type==="mont"?s(f.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&s(f.x&&f.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(f.x,f.y);return}this.pub=this.ec.curve.decodePoint(f,h)},"_importPublic2"),"_importPublic"),o.prototype.derive=a(i(function(f){return f.validate()||s(f.validate(),"public point not validated"),f.mul(this.priv).getX()},"derive2"),"derive"),o.prototype.sign=a(i(function(f,h,p){return this.ec.sign(f,this,h,p)},"sign5"),"sign"),o.prototype.verify=a(i(function(f,h){return this.ec.verify(f,h,this)},"verify5"),"verify"),o.prototype.inspect=a(i(function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},"inspect4"),"inspect")}}),HU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/signature.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert;function o(v,b){if(v instanceof o)return v;this._importDER(v,b)||(s(v.r&&v.s,"Signature without r or s"),this.r=new r(v.r,16),this.s=new r(v.s,16),v.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}i(o,"Signature2"),a(o,"Signature"),t.exports=o;function c(){this.place=0}i(c,"Position2"),a(c,"Position");function f(v,b){var y=v[b.place++];if(!(y&128))return y;var _=y&15;if(_===0||_>4)return!1;for(var T=0,O=0,R=b.place;O<_;O++,R++)T<<=8,T|=v[R],T>>>=0;return T<=127?!1:(b.place=R,T)}i(f,"getLength2"),a(f,"getLength");function h(v){for(var b=0,y=v.length-1;!v[b]&&!(v[b+1]&128)&&b<y;)b++;return b===0?v:v.slice(b)}i(h,"rmPadding2"),a(h,"rmPadding"),o.prototype._importDER=a(i(function(b,y){b=n.toArray(b,y);var _=new c;if(b[_.place++]!==48)return!1;var T=f(b,_);if(T===!1||T+_.place!==b.length||b[_.place++]!==2)return!1;var O=f(b,_);if(O===!1)return!1;var R=b.slice(_.place,O+_.place);if(_.place+=O,b[_.place++]!==2)return!1;var P=f(b,_);if(P===!1||b.length!==P+_.place)return!1;var K=b.slice(_.place,P+_.place);if(R[0]===0)if(R[1]&128)R=R.slice(1);else return!1;if(K[0]===0)if(K[1]&128)K=K.slice(1);else return!1;return this.r=new r(R),this.s=new r(K),this.recoveryParam=null,!0},"_importDER2"),"_importDER");function p(v,b){if(b<128){v.push(b);return}var y=1+(Math.log(b)/Math.LN2>>>3);for(v.push(y|128);--y;)v.push(b>>>(y<<3)&255);v.push(b)}i(p,"constructLength2"),a(p,"constructLength"),o.prototype.toDER=a(i(function(b){var y=this.r.toArray(),_=this.s.toArray();for(y[0]&128&&(y=[0].concat(y)),_[0]&128&&(_=[0].concat(_)),y=h(y),_=h(_);!_[0]&&!(_[1]&128);)_=_.slice(1);var T=[2];p(T,y.length),T=T.concat(y),T.push(2),p(T,_.length);var O=T.concat(_),R=[48];return p(R,O.length),R=R.concat(O),n.encode(R,b)},"toDER2"),"toDER")}}),qU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/index.js"(e,t){"use strict";var r=xa(),n=jU(),s=qi(),o=s2(),c=JS(),f=s.assert,h=zU(),p=HU();function v(b){if(!(this instanceof v))return new v(b);typeof b=="string"&&(f(Object.prototype.hasOwnProperty.call(o,b),"Unknown curve "+b),b=o[b]),b instanceof o.PresetCurve&&(b={curve:b}),this.curve=b.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=b.curve.g,this.g.precompute(b.curve.n.bitLength()+1),this.hash=b.hash||b.curve.hash}i(v,"EC2"),a(v,"EC"),t.exports=v,v.prototype.keyPair=a(i(function(y){return new h(this,y)},"keyPair2"),"keyPair"),v.prototype.keyFromPrivate=a(i(function(y,_){return h.fromPrivate(this,y,_)},"keyFromPrivate2"),"keyFromPrivate"),v.prototype.keyFromPublic=a(i(function(y,_){return h.fromPublic(this,y,_)},"keyFromPublic2"),"keyFromPublic"),v.prototype.genKeyPair=a(i(function(y){y||(y={});for(var _=new n({hash:this.hash,pers:y.pers,persEnc:y.persEnc||"utf8",entropy:y.entropy||c(this.hash.hmacStrength),entropyEnc:y.entropy&&y.entropyEnc||"utf8",nonce:this.n.toArray()}),T=this.n.byteLength(),O=this.n.sub(new r(2));;){var R=new r(_.generate(T));if(!(R.cmp(O)>0))return R.iaddn(1),this.keyFromPrivate(R)}},"genKeyPair2"),"genKeyPair"),v.prototype._truncateToN=a(i(function(y,_){var T=y.byteLength()*8-this.n.bitLength();return T>0&&(y=y.ushrn(T)),!_&&y.cmp(this.n)>=0?y.sub(this.n):y},"_truncateToN2"),"_truncateToN"),v.prototype.sign=a(i(function(y,_,T,O){typeof T=="object"&&(O=T,T=null),O||(O={}),_=this.keyFromPrivate(_,T),y=this._truncateToN(new r(y,16));for(var R=this.n.byteLength(),P=_.getPrivate().toArray("be",R),K=y.toArray("be",R),U=new n({hash:this.hash,entropy:P,nonce:K,pers:O.pers,persEnc:O.persEnc||"utf8"}),j=this.n.sub(new r(1)),V=0;;V++){var G=O.k?O.k(V):new r(U.generate(this.n.byteLength()));if(G=this._truncateToN(G,!0),!(G.cmpn(1)<=0||G.cmp(j)>=0)){var I=this.g.mul(G);if(!I.isInfinity()){var H=I.getX(),se=H.umod(this.n);if(se.cmpn(0)!==0){var ue=G.invm(this.n).mul(se.mul(_.getPrivate()).iadd(y));if(ue=ue.umod(this.n),ue.cmpn(0)!==0){var me=(I.getY().isOdd()?1:0)|(H.cmp(se)!==0?2:0);return O.canonical&&ue.cmp(this.nh)>0&&(ue=this.n.sub(ue),me^=1),new p({r:se,s:ue,recoveryParam:me})}}}}}},"sign5"),"sign"),v.prototype.verify=a(i(function(y,_,T,O){y=this._truncateToN(new r(y,16)),T=this.keyFromPublic(T,O),_=new p(_,"hex");var R=_.r,P=_.s;if(R.cmpn(1)<0||R.cmp(this.n)>=0||P.cmpn(1)<0||P.cmp(this.n)>=0)return!1;var K=P.invm(this.n),U=K.mul(y).umod(this.n),j=K.mul(R).umod(this.n),V;return this.curve._maxwellTrick?(V=this.g.jmulAdd(U,T.getPublic(),j),V.isInfinity()?!1:V.eqXToP(R)):(V=this.g.mulAdd(U,T.getPublic(),j),V.isInfinity()?!1:V.getX().umod(this.n).cmp(R)===0)},"verify5"),"verify"),v.prototype.recoverPubKey=function(b,y,_,T){f((3&_)===_,"The recovery param is more than two bits"),y=new p(y,T);var O=this.n,R=new r(b),P=y.r,K=y.s,U=_&1,j=_>>1;if(P.cmp(this.curve.p.umod(this.curve.n))>=0&&j)throw new Error("Unable to find sencond key candinate");j?P=this.curve.pointFromX(P.add(this.curve.n),U):P=this.curve.pointFromX(P,U);var V=y.r.invm(O),G=O.sub(R).mul(V).umod(O),I=K.mul(V).umod(O);return this.g.mulAdd(G,P,I)},v.prototype.getKeyRecoveryParam=function(b,y,_,T){if(y=new p(y,T),y.recoveryParam!==null)return y.recoveryParam;for(var O=0;O<4;O++){var R;try{R=this.recoverPubKey(b,y,O)}catch{continue}if(R.eq(_))return O}throw new Error("Unable to find valid recovery factor")}}}),KU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/key.js"(e,t){"use strict";var r=qi(),n=r.assert,s=r.parseBytes,o=r.cachedProperty;function c(f,h){this.eddsa=f,this._secret=s(h.secret),f.isPoint(h.pub)?this._pub=h.pub:this._pubBytes=s(h.pub)}i(c,"KeyPair2"),a(c,"KeyPair"),c.fromPublic=a(i(function(h,p){return p instanceof c?p:new c(h,{pub:p})},"fromPublic2"),"fromPublic"),c.fromSecret=a(i(function(h,p){return p instanceof c?p:new c(h,{secret:p})},"fromSecret"),"fromSecret"),c.prototype.secret=a(i(function(){return this._secret},"secret"),"secret"),o(c,"pubBytes",a(i(function(){return this.eddsa.encodePoint(this.pub())},"pubBytes"),"pubBytes")),o(c,"pub",a(i(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())},"pub"),"pub")),o(c,"privBytes",a(i(function(){var h=this.eddsa,p=this.hash(),v=h.encodingLength-1,b=p.slice(0,h.encodingLength);return b[0]&=248,b[v]&=127,b[v]|=64,b},"privBytes"),"privBytes")),o(c,"priv",a(i(function(){return this.eddsa.decodeInt(this.privBytes())},"priv"),"priv")),o(c,"hash",a(i(function(){return this.eddsa.hash().update(this.secret()).digest()},"hash3"),"hash")),o(c,"messagePrefix",a(i(function(){return this.hash().slice(this.eddsa.encodingLength)},"messagePrefix2"),"messagePrefix")),c.prototype.sign=a(i(function(h){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(h,this)},"sign5"),"sign"),c.prototype.verify=a(i(function(h,p){return this.eddsa.verify(h,p,this)},"verify5"),"verify"),c.prototype.getSecret=a(i(function(h){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),h)},"getSecret"),"getSecret"),c.prototype.getPublic=a(i(function(h){return r.encode(this.pubBytes(),h)},"getPublic2"),"getPublic"),t.exports=c}}),VU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/signature.js"(e,t){"use strict";var r=xa(),n=qi(),s=n.assert,o=n.cachedProperty,c=n.parseBytes;function f(h,p){this.eddsa=h,typeof p!="object"&&(p=c(p)),Array.isArray(p)&&(p={R:p.slice(0,h.encodingLength),S:p.slice(h.encodingLength)}),s(p.R&&p.S,"Signature without R or S"),h.isPoint(p.R)&&(this._R=p.R),p.S instanceof r&&(this._S=p.S),this._Rencoded=Array.isArray(p.R)?p.R:p.Rencoded,this._Sencoded=Array.isArray(p.S)?p.S:p.Sencoded}i(f,"Signature2"),a(f,"Signature"),o(f,"S",a(i(function(){return this.eddsa.decodeInt(this.Sencoded())},"S"),"S")),o(f,"R",a(i(function(){return this.eddsa.decodePoint(this.Rencoded())},"R"),"R")),o(f,"Rencoded",a(i(function(){return this.eddsa.encodePoint(this.R())},"Rencoded"),"Rencoded")),o(f,"Sencoded",a(i(function(){return this.eddsa.encodeInt(this.S())},"Sencoded"),"Sencoded")),f.prototype.toBytes=a(i(function(){return this.Rencoded().concat(this.Sencoded())},"toBytes"),"toBytes"),f.prototype.toHex=a(i(function(){return n.encode(this.toBytes(),"hex").toUpperCase()},"toHex"),"toHex"),t.exports=f}}),GU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/index.js"(e,t){"use strict";var r=dm(),n=s2(),s=qi(),o=s.assert,c=s.parseBytes,f=KU(),h=VU();function p(v){if(o(v==="ed25519","only tested with ed25519 so far"),!(this instanceof p))return new p(v);v=n[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=r.sha512}i(p,"EDDSA"),a(p,"EDDSA"),t.exports=p,p.prototype.sign=a(i(function(b,y){b=c(b);var _=this.keyFromSecret(y),T=this.hashInt(_.messagePrefix(),b),O=this.g.mul(T),R=this.encodePoint(O),P=this.hashInt(R,_.pubBytes(),b).mul(_.priv()),K=T.add(P).umod(this.curve.n);return this.makeSignature({R:O,S:K,Rencoded:R})},"sign5"),"sign"),p.prototype.verify=a(i(function(b,y,_){b=c(b),y=this.makeSignature(y);var T=this.keyFromPublic(_),O=this.hashInt(y.Rencoded(),T.pubBytes(),b),R=this.g.mul(y.S()),P=y.R().add(T.pub().mul(O));return P.eq(R)},"verify5"),"verify"),p.prototype.hashInt=a(i(function(){for(var b=this.hash(),y=0;y<arguments.length;y++)b.update(arguments[y]);return s.intFromLE(b.digest()).umod(this.curve.n)},"hashInt"),"hashInt"),p.prototype.keyFromPublic=a(i(function(b){return f.fromPublic(this,b)},"keyFromPublic2"),"keyFromPublic"),p.prototype.keyFromSecret=a(i(function(b){return f.fromSecret(this,b)},"keyFromSecret"),"keyFromSecret"),p.prototype.makeSignature=a(i(function(b){return b instanceof h?b:new h(this,b)},"makeSignature"),"makeSignature"),p.prototype.encodePoint=a(i(function(b){var y=b.getY().toArray("le",this.encodingLength);return y[this.encodingLength-1]|=b.getX().isOdd()?128:0,y},"encodePoint"),"encodePoint"),p.prototype.decodePoint=a(i(function(b){b=s.parseBytes(b);var y=b.length-1,_=b.slice(0,y).concat(b[y]&-129),T=(b[y]&128)!==0,O=s.intFromLE(_);return this.curve.pointFromY(O,T)},"decodePoint2"),"decodePoint"),p.prototype.encodeInt=a(i(function(b){return b.toArray("le",this.encodingLength)},"encodeInt"),"encodeInt"),p.prototype.decodeInt=a(i(function(b){return s.intFromLE(b)},"decodeInt"),"decodeInt"),p.prototype.isPoint=a(i(function(b){return b instanceof this.pointClass},"isPoint"),"isPoint")}}),WU=ze({"../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic.js"(e){"use strict";var t=e;t.version=kU().version,t.utils=qi(),t.rand=JS(),t.curve=YS(),t.curves=s2(),t.ec=qU(),t.eddsa=GU()}}),ZU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;var t=65536,r=i(class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let n=typeof self<"u"?self.crypto||self.msCrypto:null;n&&n.getRandomValues!==void 0&&(this._crypto=n,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(n){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");let s=new Uint8Array(n);for(let o=0;o<s.length;o+=t)this._crypto.getRandomValues(s.subarray(o,o+Math.min(s.length-o,t)));return s}},"BrowserRandomSource");a(r,"BrowserRandomSource"),e.BrowserRandomSource=r}}),JU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/node.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;var t=ps(),r=i(class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Qy<"u"){let n=Qy("crypto");n&&n.randomBytes&&(this._crypto=n,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(n){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let s=this._crypto.randomBytes(n);if(s.length!==n)throw new Error("NodeRandomSource: got fewer bytes than requested");let o=new Uint8Array(n);for(let c=0;c<o.length;c++)o[c]=s[c];return(0,t.wipe)(s),o}},"NodeRandomSource");a(r,"NodeRandomSource"),e.NodeRandomSource=r}}),YU=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/system.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;var t=ZU(),r=JU(),n=i(class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new t.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new r.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(s){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(s)}},"SystemRandomSource");a(n,"SystemRandomSource"),e.SystemRandomSource=n}}),Qu=ze({"../../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/random.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;var t=YU(),r=Xu(),n=ps();e.defaultRandomSource=new t.SystemRandomSource;function s(p,v=e.defaultRandomSource){return v.randomBytes(p)}i(s,"randomBytes5"),a(s,"randomBytes"),e.randomBytes=s;function o(p=e.defaultRandomSource){let v=s(4,p),b=(0,r.readUint32LE)(v);return(0,n.wipe)(v),b}i(o,"randomUint32"),a(o,"randomUint32"),e.randomUint32=o;var c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function f(p,v=c,b=e.defaultRandomSource){if(v.length<2)throw new Error("randomString charset is too short");if(v.length>256)throw new Error("randomString charset is too long");let y="",_=v.length,T=256-256%_;for(;p>0;){let O=s(Math.ceil(p*256/T),b);for(let R=0;R<O.length&&p>0;R++){let P=O[R];P<T&&(y+=v.charAt(P%_),p--)}(0,n.wipe)(O)}return y}i(f,"randomString2"),a(f,"randomString"),e.randomString=f;function h(p,v=c,b=e.defaultRandomSource){let y=Math.ceil(p/(Math.log(v.length)/Math.LN2));return f(y,v,b)}i(h,"randomStringForEntropy"),a(h,"randomStringForEntropy"),e.randomStringForEntropy=h}}),XU=ze({"../../../node_modules/.pnpm/@stablelib+sha512@1.0.1/node_modules/@stablelib/sha512/lib/sha512.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps();e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var n=function(){function f(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return i(f,"SHA5122"),a(f,"SHA512"),f.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._tempHi),r.wipe(this._tempLo),this.reset()},f.prototype.update=function(h,p){if(p===void 0&&(p=h.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var v=0;if(this._bytesHashed+=p,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&p>0;)this._buffer[this._bufferLength++]=h[v++],p--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(p>=this.blockSize&&(v=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,h,v,p),p%=this.blockSize);p>0;)this._buffer[this._bufferLength++]=h[v++],p--;return this},f.prototype.finish=function(h){if(!this._finished){var p=this._bytesHashed,v=this._bufferLength,b=p/536870912|0,y=p<<3,_=p%128<112?128:256;this._buffer[v]=128;for(var T=v+1;T<_-8;T++)this._buffer[T]=0;t.writeUint32BE(b,this._buffer,_-8),t.writeUint32BE(y,this._buffer,_-4),o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,_),this._finished=!0}for(var T=0;T<this.digestLength/8;T++)t.writeUint32BE(this._stateHi[T],h,T*8),t.writeUint32BE(this._stateLo[T],h,T*8+4);return this},f.prototype.digest=function(){var h=new Uint8Array(this.digestLength);return this.finish(h),h},f.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(h){return this._stateHi.set(h.stateHi),this._stateLo.set(h.stateLo),this._bufferLength=h.bufferLength,h.buffer&&this._buffer.set(h.buffer),this._bytesHashed=h.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(h){r.wipe(h.stateHi),r.wipe(h.stateLo),h.buffer&&r.wipe(h.buffer),h.bufferLength=0,h.bytesHashed=0},f}();e.SHA512=n;var s=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(f,h,p,v,b,y,_){for(var T=p[0],O=p[1],R=p[2],P=p[3],K=p[4],U=p[5],j=p[6],V=p[7],G=v[0],I=v[1],H=v[2],se=v[3],ue=v[4],me=v[5],q=v[6],w=v[7],x,m,d,g,S,D,C,E;_>=128;){for(var B=0;B<16;B++){var $=8*B+y;f[B]=t.readUint32BE(b,$),h[B]=t.readUint32BE(b,$+4)}for(var B=0;B<80;B++){var k=T,F=O,he=R,N=P,Y=K,J=U,M=j,z=V,re=G,oe=I,ge=H,ke=se,_e=ue,fe=me,Ce=q,pe=w;if(x=V,m=w,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=(K>>>14|ue<<32-14)^(K>>>18|ue<<32-18)^(ue>>>41-32|K<<32-(41-32)),m=(ue>>>14|K<<32-14)^(ue>>>18|K<<32-18)^(K>>>41-32|ue<<32-(41-32)),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=K&U^~K&j,m=ue&me^~ue&q,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=s[B*2],m=s[B*2+1],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=f[B%16],m=h[B%16],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,d=C&65535|E<<16,g=S&65535|D<<16,x=d,m=g,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=(T>>>28|G<<32-28)^(G>>>34-32|T<<32-(34-32))^(G>>>39-32|T<<32-(39-32)),m=(G>>>28|T<<32-28)^(T>>>34-32|G<<32-(34-32))^(T>>>39-32|G<<32-(39-32)),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,x=T&O^T&R^O&R,m=G&I^G&H^I&H,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,z=C&65535|E<<16,pe=S&65535|D<<16,x=N,m=ke,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=d,m=g,S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,N=C&65535|E<<16,ke=S&65535|D<<16,O=k,R=F,P=he,K=N,U=Y,j=J,V=M,T=z,I=re,H=oe,se=ge,ue=ke,me=_e,q=fe,w=Ce,G=pe,B%16===15)for(var $=0;$<16;$++)x=f[$],m=h[$],S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=f[($+9)%16],m=h[($+9)%16],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,d=f[($+1)%16],g=h[($+1)%16],x=(d>>>1|g<<32-1)^(d>>>8|g<<32-8)^d>>>7,m=(g>>>1|d<<32-1)^(g>>>8|d<<32-8)^(g>>>7|d<<32-7),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,d=f[($+14)%16],g=h[($+14)%16],x=(d>>>19|g<<32-19)^(g>>>61-32|d<<32-(61-32))^d>>>6,m=(g>>>19|d<<32-19)^(d>>>61-32|g<<32-(61-32))^(g>>>6|d<<32-6),S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,f[$]=C&65535|E<<16,h[$]=S&65535|D<<16}x=T,m=G,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[0],m=v[0],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[0]=T=C&65535|E<<16,v[0]=G=S&65535|D<<16,x=O,m=I,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[1],m=v[1],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[1]=O=C&65535|E<<16,v[1]=I=S&65535|D<<16,x=R,m=H,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[2],m=v[2],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[2]=R=C&65535|E<<16,v[2]=H=S&65535|D<<16,x=P,m=se,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[3],m=v[3],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[3]=P=C&65535|E<<16,v[3]=se=S&65535|D<<16,x=K,m=ue,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[4],m=v[4],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[4]=K=C&65535|E<<16,v[4]=ue=S&65535|D<<16,x=U,m=me,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[5],m=v[5],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[5]=U=C&65535|E<<16,v[5]=me=S&65535|D<<16,x=j,m=q,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[6],m=v[6],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[6]=j=C&65535|E<<16,v[6]=q=S&65535|D<<16,x=V,m=w,S=m&65535,D=m>>>16,C=x&65535,E=x>>>16,x=p[7],m=v[7],S+=m&65535,D+=m>>>16,C+=x&65535,E+=x>>>16,D+=S>>>16,C+=D>>>16,E+=C>>>16,p[7]=V=C&65535|E<<16,v[7]=w=S&65535|D<<16,y+=128,_-=128}return y}i(o,"hashBlocks"),a(o,"hashBlocks");function c(f){var h=new n;h.update(f);var p=h.digest();return h.clean(),p}i(c,"hash3"),a(c,"hash"),e.hash=c}}),hm=ze({"../../../node_modules/.pnpm/@stablelib+ed25519@1.0.3/node_modules/@stablelib/ed25519/lib/ed25519.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;var t=Qu(),r=XU(),n=ps();e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function s(N){let Y=new Float64Array(16);if(N)for(let J=0;J<N.length;J++)Y[J]=N[J];return Y}i(s,"gf"),a(s,"gf");var o=new Uint8Array(32);o[0]=9;var c=s(),f=s([1]),h=s([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=s([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),v=s([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),b=s([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),y=s([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function _(N,Y){for(let J=0;J<16;J++)N[J]=Y[J]|0}i(_,"set25519"),a(_,"set25519");function T(N){let Y=1;for(let J=0;J<16;J++){let M=N[J]+Y+65535;Y=Math.floor(M/65536),N[J]=M-Y*65536}N[0]+=Y-1+37*(Y-1)}i(T,"car25519"),a(T,"car25519");function O(N,Y,J){let M=~(J-1);for(let z=0;z<16;z++){let re=M&(N[z]^Y[z]);N[z]^=re,Y[z]^=re}}i(O,"sel25519"),a(O,"sel25519");function R(N,Y){let J=s(),M=s();for(let z=0;z<16;z++)M[z]=Y[z];T(M),T(M),T(M);for(let z=0;z<2;z++){J[0]=M[0]-65517;for(let oe=1;oe<15;oe++)J[oe]=M[oe]-65535-(J[oe-1]>>16&1),J[oe-1]&=65535;J[15]=M[15]-32767-(J[14]>>16&1);let re=J[15]>>16&1;J[14]&=65535,O(M,J,1-re)}for(let z=0;z<16;z++)N[2*z]=M[z]&255,N[2*z+1]=M[z]>>8}i(R,"pack25519"),a(R,"pack25519");function P(N,Y){let J=0;for(let M=0;M<32;M++)J|=N[M]^Y[M];return(1&J-1>>>8)-1}i(P,"verify32"),a(P,"verify32");function K(N,Y){let J=new Uint8Array(32),M=new Uint8Array(32);return R(J,N),R(M,Y),P(J,M)}i(K,"neq25519"),a(K,"neq25519");function U(N){let Y=new Uint8Array(32);return R(Y,N),Y[0]&1}i(U,"par25519"),a(U,"par25519");function j(N,Y){for(let J=0;J<16;J++)N[J]=Y[2*J]+(Y[2*J+1]<<8);N[15]&=32767}i(j,"unpack25519"),a(j,"unpack25519");function V(N,Y,J){for(let M=0;M<16;M++)N[M]=Y[M]+J[M]}i(V,"add3"),a(V,"add");function G(N,Y,J){for(let M=0;M<16;M++)N[M]=Y[M]-J[M]}i(G,"sub"),a(G,"sub");function I(N,Y,J){let M,z,re=0,oe=0,ge=0,ke=0,_e=0,fe=0,Ce=0,pe=0,we=0,Q=0,ve=0,Me=0,Ue=0,Re=0,je=0,rt=0,le=0,ce=0,Z=0,ne=0,ye=0,Se=0,xe=0,De=0,Mt=0,qe=0,He=0,Ot=0,dt=0,mt=0,Dr=0,ct=J[0],ut=J[1],lr=J[2],lt=J[3],nt=J[4],ar=J[5],it=J[6],Ye=J[7],Qt=J[8],st=J[9],Qe=J[10],or=J[11],at=J[12],Ze=J[13],cr=J[14],ot=J[15];M=Y[0],re+=M*ct,oe+=M*ut,ge+=M*lr,ke+=M*lt,_e+=M*nt,fe+=M*ar,Ce+=M*it,pe+=M*Ye,we+=M*Qt,Q+=M*st,ve+=M*Qe,Me+=M*or,Ue+=M*at,Re+=M*Ze,je+=M*cr,rt+=M*ot,M=Y[1],oe+=M*ct,ge+=M*ut,ke+=M*lr,_e+=M*lt,fe+=M*nt,Ce+=M*ar,pe+=M*it,we+=M*Ye,Q+=M*Qt,ve+=M*st,Me+=M*Qe,Ue+=M*or,Re+=M*at,je+=M*Ze,rt+=M*cr,le+=M*ot,M=Y[2],ge+=M*ct,ke+=M*ut,_e+=M*lr,fe+=M*lt,Ce+=M*nt,pe+=M*ar,we+=M*it,Q+=M*Ye,ve+=M*Qt,Me+=M*st,Ue+=M*Qe,Re+=M*or,je+=M*at,rt+=M*Ze,le+=M*cr,ce+=M*ot,M=Y[3],ke+=M*ct,_e+=M*ut,fe+=M*lr,Ce+=M*lt,pe+=M*nt,we+=M*ar,Q+=M*it,ve+=M*Ye,Me+=M*Qt,Ue+=M*st,Re+=M*Qe,je+=M*or,rt+=M*at,le+=M*Ze,ce+=M*cr,Z+=M*ot,M=Y[4],_e+=M*ct,fe+=M*ut,Ce+=M*lr,pe+=M*lt,we+=M*nt,Q+=M*ar,ve+=M*it,Me+=M*Ye,Ue+=M*Qt,Re+=M*st,je+=M*Qe,rt+=M*or,le+=M*at,ce+=M*Ze,Z+=M*cr,ne+=M*ot,M=Y[5],fe+=M*ct,Ce+=M*ut,pe+=M*lr,we+=M*lt,Q+=M*nt,ve+=M*ar,Me+=M*it,Ue+=M*Ye,Re+=M*Qt,je+=M*st,rt+=M*Qe,le+=M*or,ce+=M*at,Z+=M*Ze,ne+=M*cr,ye+=M*ot,M=Y[6],Ce+=M*ct,pe+=M*ut,we+=M*lr,Q+=M*lt,ve+=M*nt,Me+=M*ar,Ue+=M*it,Re+=M*Ye,je+=M*Qt,rt+=M*st,le+=M*Qe,ce+=M*or,Z+=M*at,ne+=M*Ze,ye+=M*cr,Se+=M*ot,M=Y[7],pe+=M*ct,we+=M*ut,Q+=M*lr,ve+=M*lt,Me+=M*nt,Ue+=M*ar,Re+=M*it,je+=M*Ye,rt+=M*Qt,le+=M*st,ce+=M*Qe,Z+=M*or,ne+=M*at,ye+=M*Ze,Se+=M*cr,xe+=M*ot,M=Y[8],we+=M*ct,Q+=M*ut,ve+=M*lr,Me+=M*lt,Ue+=M*nt,Re+=M*ar,je+=M*it,rt+=M*Ye,le+=M*Qt,ce+=M*st,Z+=M*Qe,ne+=M*or,ye+=M*at,Se+=M*Ze,xe+=M*cr,De+=M*ot,M=Y[9],Q+=M*ct,ve+=M*ut,Me+=M*lr,Ue+=M*lt,Re+=M*nt,je+=M*ar,rt+=M*it,le+=M*Ye,ce+=M*Qt,Z+=M*st,ne+=M*Qe,ye+=M*or,Se+=M*at,xe+=M*Ze,De+=M*cr,Mt+=M*ot,M=Y[10],ve+=M*ct,Me+=M*ut,Ue+=M*lr,Re+=M*lt,je+=M*nt,rt+=M*ar,le+=M*it,ce+=M*Ye,Z+=M*Qt,ne+=M*st,ye+=M*Qe,Se+=M*or,xe+=M*at,De+=M*Ze,Mt+=M*cr,qe+=M*ot,M=Y[11],Me+=M*ct,Ue+=M*ut,Re+=M*lr,je+=M*lt,rt+=M*nt,le+=M*ar,ce+=M*it,Z+=M*Ye,ne+=M*Qt,ye+=M*st,Se+=M*Qe,xe+=M*or,De+=M*at,Mt+=M*Ze,qe+=M*cr,He+=M*ot,M=Y[12],Ue+=M*ct,Re+=M*ut,je+=M*lr,rt+=M*lt,le+=M*nt,ce+=M*ar,Z+=M*it,ne+=M*Ye,ye+=M*Qt,Se+=M*st,xe+=M*Qe,De+=M*or,Mt+=M*at,qe+=M*Ze,He+=M*cr,Ot+=M*ot,M=Y[13],Re+=M*ct,je+=M*ut,rt+=M*lr,le+=M*lt,ce+=M*nt,Z+=M*ar,ne+=M*it,ye+=M*Ye,Se+=M*Qt,xe+=M*st,De+=M*Qe,Mt+=M*or,qe+=M*at,He+=M*Ze,Ot+=M*cr,dt+=M*ot,M=Y[14],je+=M*ct,rt+=M*ut,le+=M*lr,ce+=M*lt,Z+=M*nt,ne+=M*ar,ye+=M*it,Se+=M*Ye,xe+=M*Qt,De+=M*st,Mt+=M*Qe,qe+=M*or,He+=M*at,Ot+=M*Ze,dt+=M*cr,mt+=M*ot,M=Y[15],rt+=M*ct,le+=M*ut,ce+=M*lr,Z+=M*lt,ne+=M*nt,ye+=M*ar,Se+=M*it,xe+=M*Ye,De+=M*Qt,Mt+=M*st,qe+=M*Qe,He+=M*or,Ot+=M*at,dt+=M*Ze,mt+=M*cr,Dr+=M*ot,re+=38*le,oe+=38*ce,ge+=38*Z,ke+=38*ne,_e+=38*ye,fe+=38*Se,Ce+=38*xe,pe+=38*De,we+=38*Mt,Q+=38*qe,ve+=38*He,Me+=38*Ot,Ue+=38*dt,Re+=38*mt,je+=38*Dr,z=1,M=re+z+65535,z=Math.floor(M/65536),re=M-z*65536,M=oe+z+65535,z=Math.floor(M/65536),oe=M-z*65536,M=ge+z+65535,z=Math.floor(M/65536),ge=M-z*65536,M=ke+z+65535,z=Math.floor(M/65536),ke=M-z*65536,M=_e+z+65535,z=Math.floor(M/65536),_e=M-z*65536,M=fe+z+65535,z=Math.floor(M/65536),fe=M-z*65536,M=Ce+z+65535,z=Math.floor(M/65536),Ce=M-z*65536,M=pe+z+65535,z=Math.floor(M/65536),pe=M-z*65536,M=we+z+65535,z=Math.floor(M/65536),we=M-z*65536,M=Q+z+65535,z=Math.floor(M/65536),Q=M-z*65536,M=ve+z+65535,z=Math.floor(M/65536),ve=M-z*65536,M=Me+z+65535,z=Math.floor(M/65536),Me=M-z*65536,M=Ue+z+65535,z=Math.floor(M/65536),Ue=M-z*65536,M=Re+z+65535,z=Math.floor(M/65536),Re=M-z*65536,M=je+z+65535,z=Math.floor(M/65536),je=M-z*65536,M=rt+z+65535,z=Math.floor(M/65536),rt=M-z*65536,re+=z-1+37*(z-1),z=1,M=re+z+65535,z=Math.floor(M/65536),re=M-z*65536,M=oe+z+65535,z=Math.floor(M/65536),oe=M-z*65536,M=ge+z+65535,z=Math.floor(M/65536),ge=M-z*65536,M=ke+z+65535,z=Math.floor(M/65536),ke=M-z*65536,M=_e+z+65535,z=Math.floor(M/65536),_e=M-z*65536,M=fe+z+65535,z=Math.floor(M/65536),fe=M-z*65536,M=Ce+z+65535,z=Math.floor(M/65536),Ce=M-z*65536,M=pe+z+65535,z=Math.floor(M/65536),pe=M-z*65536,M=we+z+65535,z=Math.floor(M/65536),we=M-z*65536,M=Q+z+65535,z=Math.floor(M/65536),Q=M-z*65536,M=ve+z+65535,z=Math.floor(M/65536),ve=M-z*65536,M=Me+z+65535,z=Math.floor(M/65536),Me=M-z*65536,M=Ue+z+65535,z=Math.floor(M/65536),Ue=M-z*65536,M=Re+z+65535,z=Math.floor(M/65536),Re=M-z*65536,M=je+z+65535,z=Math.floor(M/65536),je=M-z*65536,M=rt+z+65535,z=Math.floor(M/65536),rt=M-z*65536,re+=z-1+37*(z-1),N[0]=re,N[1]=oe,N[2]=ge,N[3]=ke,N[4]=_e,N[5]=fe,N[6]=Ce,N[7]=pe,N[8]=we,N[9]=Q,N[10]=ve,N[11]=Me,N[12]=Ue,N[13]=Re,N[14]=je,N[15]=rt}i(I,"mul3"),a(I,"mul");function H(N,Y){I(N,Y,Y)}i(H,"square"),a(H,"square");function se(N,Y){let J=s(),M;for(M=0;M<16;M++)J[M]=Y[M];for(M=253;M>=0;M--)H(J,J),M!==2&&M!==4&&I(J,J,Y);for(M=0;M<16;M++)N[M]=J[M]}i(se,"inv25519"),a(se,"inv25519");function ue(N,Y){let J=s(),M;for(M=0;M<16;M++)J[M]=Y[M];for(M=250;M>=0;M--)H(J,J),M!==1&&I(J,J,Y);for(M=0;M<16;M++)N[M]=J[M]}i(ue,"pow2523"),a(ue,"pow2523");function me(N,Y){let J=s(),M=s(),z=s(),re=s(),oe=s(),ge=s(),ke=s(),_e=s(),fe=s();G(J,N[1],N[0]),G(fe,Y[1],Y[0]),I(J,J,fe),V(M,N[0],N[1]),V(fe,Y[0],Y[1]),I(M,M,fe),I(z,N[3],Y[3]),I(z,z,p),I(re,N[2],Y[2]),V(re,re,re),G(oe,M,J),G(ge,re,z),V(ke,re,z),V(_e,M,J),I(N[0],oe,ge),I(N[1],_e,ke),I(N[2],ke,ge),I(N[3],oe,_e)}i(me,"edadd"),a(me,"edadd");function q(N,Y,J){for(let M=0;M<4;M++)O(N[M],Y[M],J)}i(q,"cswap"),a(q,"cswap");function w(N,Y){let J=s(),M=s(),z=s();se(z,Y[2]),I(J,Y[0],z),I(M,Y[1],z),R(N,M),N[31]^=U(J)<<7}i(w,"pack"),a(w,"pack");function x(N,Y,J){_(N[0],c),_(N[1],f),_(N[2],f),_(N[3],c);for(let M=255;M>=0;--M){let z=J[M/8|0]>>(M&7)&1;q(N,Y,z),me(Y,N),me(N,N),q(N,Y,z)}}i(x,"scalarmult"),a(x,"scalarmult");function m(N,Y){let J=[s(),s(),s(),s()];_(J[0],v),_(J[1],b),_(J[2],f),I(J[3],v,b),x(N,J,Y)}i(m,"scalarbase"),a(m,"scalarbase");function d(N){if(N.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);let Y=(0,r.hash)(N);Y[0]&=248,Y[31]&=127,Y[31]|=64;let J=new Uint8Array(32),M=[s(),s(),s(),s()];m(M,Y),w(J,M);let z=new Uint8Array(64);return z.set(N),z.set(J,32),{publicKey:J,secretKey:z}}i(d,"generateKeyPairFromSeed2"),a(d,"generateKeyPairFromSeed"),e.generateKeyPairFromSeed=d;function g(N){let Y=(0,t.randomBytes)(32,N),J=d(Y);return(0,n.wipe)(Y),J}i(g,"generateKeyPair2"),a(g,"generateKeyPair"),e.generateKeyPair=g;function S(N){if(N.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(N.subarray(32))}i(S,"extractPublicKeyFromSecretKey"),a(S,"extractPublicKeyFromSecretKey"),e.extractPublicKeyFromSecretKey=S;var D=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function C(N,Y){let J,M,z,re;for(M=63;M>=32;--M){for(J=0,z=M-32,re=M-12;z<re;++z)Y[z]+=J-16*Y[M]*D[z-(M-32)],J=Math.floor((Y[z]+128)/256),Y[z]-=J*256;Y[z]+=J,Y[M]=0}for(J=0,z=0;z<32;z++)Y[z]+=J-(Y[31]>>4)*D[z],J=Y[z]>>8,Y[z]&=255;for(z=0;z<32;z++)Y[z]-=J*D[z];for(M=0;M<32;M++)Y[M+1]+=Y[M]>>8,N[M]=Y[M]&255}i(C,"modL"),a(C,"modL");function E(N){let Y=new Float64Array(64);for(let J=0;J<64;J++)Y[J]=N[J];for(let J=0;J<64;J++)N[J]=0;C(N,Y)}i(E,"reduce"),a(E,"reduce");function B(N,Y){let J=new Float64Array(64),M=[s(),s(),s(),s()],z=(0,r.hash)(N.subarray(0,32));z[0]&=248,z[31]&=127,z[31]|=64;let re=new Uint8Array(64);re.set(z.subarray(32),32);let oe=new r.SHA512;oe.update(re.subarray(32)),oe.update(Y);let ge=oe.digest();oe.clean(),E(ge),m(M,ge),w(re,M),oe.reset(),oe.update(re.subarray(0,32)),oe.update(N.subarray(32)),oe.update(Y);let ke=oe.digest();E(ke);for(let _e=0;_e<32;_e++)J[_e]=ge[_e];for(let _e=0;_e<32;_e++)for(let fe=0;fe<32;fe++)J[_e+fe]+=ke[_e]*z[fe];return C(re.subarray(32),J),re}i(B,"sign5"),a(B,"sign"),e.sign=B;function $(N,Y){let J=s(),M=s(),z=s(),re=s(),oe=s(),ge=s(),ke=s();return _(N[2],f),j(N[1],Y),H(z,N[1]),I(re,z,h),G(z,z,N[2]),V(re,N[2],re),H(oe,re),H(ge,oe),I(ke,ge,oe),I(J,ke,z),I(J,J,re),ue(J,J),I(J,J,z),I(J,J,re),I(J,J,re),I(N[0],J,re),H(M,N[0]),I(M,M,re),K(M,z)&&I(N[0],N[0],y),H(M,N[0]),I(M,M,re),K(M,z)?-1:(U(N[0])===Y[31]>>7&&G(N[0],c,N[0]),I(N[3],N[0],N[1]),0)}i($,"unpackneg"),a($,"unpackneg");function k(N,Y,J){let M=new Uint8Array(32),z=[s(),s(),s(),s()],re=[s(),s(),s(),s()];if(J.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if($(re,N))return!1;let oe=new r.SHA512;oe.update(J.subarray(0,32)),oe.update(N),oe.update(Y);let ge=oe.digest();return E(ge),x(z,re,ge),m(re,J.subarray(32)),me(z,re),w(M,z),!P(J,M)}i(k,"verify5"),a(k,"verify"),e.verify=k;function F(N){let Y=[s(),s(),s(),s()];if($(Y,N))throw new Error("Ed25519: invalid public key");let J=s(),M=s(),z=Y[1];V(J,f,z),G(M,f,z),se(M,M),I(J,J,M);let re=new Uint8Array(32);return R(re,J),re}i(F,"convertPublicKeyToX255192"),a(F,"convertPublicKeyToX25519"),e.convertPublicKeyToX25519=F;function he(N){let Y=(0,r.hash)(N.subarray(0,32));Y[0]&=248,Y[31]&=127,Y[31]|=64;let J=new Uint8Array(Y.subarray(0,32));return(0,n.wipe)(Y),J}i(he,"convertSecretKeyToX255192"),a(he,"convertSecretKeyToX25519"),e.convertSecretKeyToX25519=he}}),QU=ze({"../../../node_modules/.pnpm/canonicalize@1.0.8/node_modules/canonicalize/lib/canonicalize.js"(e,t){"use strict";t.exports=a(i(function r(n){return n===null||typeof n!="object"||n.toJSON!=null?JSON.stringify(n):Array.isArray(n)?"["+n.reduce((s,o,c)=>{let f=c===0?"":",",h=o===void 0||typeof o=="symbol"?null:o;return s+f+r(h)},"")+"]":"{"+Object.keys(n).sort().reduce((s,o,c)=>{if(n[o]===void 0||typeof n[o]=="symbol")return s;let f=s.length===0?"":",";return s+f+r(o)+":"+r(n[o])},"")+"}"},"serialize2"),"serialize")}}),e$=ze({"../../../node_modules/.pnpm/@stablelib+x25519@1.0.3/node_modules/@stablelib/x25519/lib/x25519.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;var t=Qu(),r=ps();e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(j){let V=new Float64Array(16);if(j)for(let G=0;G<j.length;G++)V[G]=j[G];return V}i(n,"gf"),a(n,"gf");var s=new Uint8Array(32);s[0]=9;var o=n([56129,1]);function c(j){let V=1;for(let G=0;G<16;G++){let I=j[G]+V+65535;V=Math.floor(I/65536),j[G]=I-V*65536}j[0]+=V-1+37*(V-1)}i(c,"car25519"),a(c,"car25519");function f(j,V,G){let I=~(G-1);for(let H=0;H<16;H++){let se=I&(j[H]^V[H]);j[H]^=se,V[H]^=se}}i(f,"sel25519"),a(f,"sel25519");function h(j,V){let G=n(),I=n();for(let H=0;H<16;H++)I[H]=V[H];c(I),c(I),c(I);for(let H=0;H<2;H++){G[0]=I[0]-65517;for(let ue=1;ue<15;ue++)G[ue]=I[ue]-65535-(G[ue-1]>>16&1),G[ue-1]&=65535;G[15]=I[15]-32767-(G[14]>>16&1);let se=G[15]>>16&1;G[14]&=65535,f(I,G,1-se)}for(let H=0;H<16;H++)j[2*H]=I[H]&255,j[2*H+1]=I[H]>>8}i(h,"pack25519"),a(h,"pack25519");function p(j,V){for(let G=0;G<16;G++)j[G]=V[2*G]+(V[2*G+1]<<8);j[15]&=32767}i(p,"unpack25519"),a(p,"unpack25519");function v(j,V,G){for(let I=0;I<16;I++)j[I]=V[I]+G[I]}i(v,"add3"),a(v,"add");function b(j,V,G){for(let I=0;I<16;I++)j[I]=V[I]-G[I]}i(b,"sub"),a(b,"sub");function y(j,V,G){let I,H,se=0,ue=0,me=0,q=0,w=0,x=0,m=0,d=0,g=0,S=0,D=0,C=0,E=0,B=0,$=0,k=0,F=0,he=0,N=0,Y=0,J=0,M=0,z=0,re=0,oe=0,ge=0,ke=0,_e=0,fe=0,Ce=0,pe=0,we=G[0],Q=G[1],ve=G[2],Me=G[3],Ue=G[4],Re=G[5],je=G[6],rt=G[7],le=G[8],ce=G[9],Z=G[10],ne=G[11],ye=G[12],Se=G[13],xe=G[14],De=G[15];I=V[0],se+=I*we,ue+=I*Q,me+=I*ve,q+=I*Me,w+=I*Ue,x+=I*Re,m+=I*je,d+=I*rt,g+=I*le,S+=I*ce,D+=I*Z,C+=I*ne,E+=I*ye,B+=I*Se,$+=I*xe,k+=I*De,I=V[1],ue+=I*we,me+=I*Q,q+=I*ve,w+=I*Me,x+=I*Ue,m+=I*Re,d+=I*je,g+=I*rt,S+=I*le,D+=I*ce,C+=I*Z,E+=I*ne,B+=I*ye,$+=I*Se,k+=I*xe,F+=I*De,I=V[2],me+=I*we,q+=I*Q,w+=I*ve,x+=I*Me,m+=I*Ue,d+=I*Re,g+=I*je,S+=I*rt,D+=I*le,C+=I*ce,E+=I*Z,B+=I*ne,$+=I*ye,k+=I*Se,F+=I*xe,he+=I*De,I=V[3],q+=I*we,w+=I*Q,x+=I*ve,m+=I*Me,d+=I*Ue,g+=I*Re,S+=I*je,D+=I*rt,C+=I*le,E+=I*ce,B+=I*Z,$+=I*ne,k+=I*ye,F+=I*Se,he+=I*xe,N+=I*De,I=V[4],w+=I*we,x+=I*Q,m+=I*ve,d+=I*Me,g+=I*Ue,S+=I*Re,D+=I*je,C+=I*rt,E+=I*le,B+=I*ce,$+=I*Z,k+=I*ne,F+=I*ye,he+=I*Se,N+=I*xe,Y+=I*De,I=V[5],x+=I*we,m+=I*Q,d+=I*ve,g+=I*Me,S+=I*Ue,D+=I*Re,C+=I*je,E+=I*rt,B+=I*le,$+=I*ce,k+=I*Z,F+=I*ne,he+=I*ye,N+=I*Se,Y+=I*xe,J+=I*De,I=V[6],m+=I*we,d+=I*Q,g+=I*ve,S+=I*Me,D+=I*Ue,C+=I*Re,E+=I*je,B+=I*rt,$+=I*le,k+=I*ce,F+=I*Z,he+=I*ne,N+=I*ye,Y+=I*Se,J+=I*xe,M+=I*De,I=V[7],d+=I*we,g+=I*Q,S+=I*ve,D+=I*Me,C+=I*Ue,E+=I*Re,B+=I*je,$+=I*rt,k+=I*le,F+=I*ce,he+=I*Z,N+=I*ne,Y+=I*ye,J+=I*Se,M+=I*xe,z+=I*De,I=V[8],g+=I*we,S+=I*Q,D+=I*ve,C+=I*Me,E+=I*Ue,B+=I*Re,$+=I*je,k+=I*rt,F+=I*le,he+=I*ce,N+=I*Z,Y+=I*ne,J+=I*ye,M+=I*Se,z+=I*xe,re+=I*De,I=V[9],S+=I*we,D+=I*Q,C+=I*ve,E+=I*Me,B+=I*Ue,$+=I*Re,k+=I*je,F+=I*rt,he+=I*le,N+=I*ce,Y+=I*Z,J+=I*ne,M+=I*ye,z+=I*Se,re+=I*xe,oe+=I*De,I=V[10],D+=I*we,C+=I*Q,E+=I*ve,B+=I*Me,$+=I*Ue,k+=I*Re,F+=I*je,he+=I*rt,N+=I*le,Y+=I*ce,J+=I*Z,M+=I*ne,z+=I*ye,re+=I*Se,oe+=I*xe,ge+=I*De,I=V[11],C+=I*we,E+=I*Q,B+=I*ve,$+=I*Me,k+=I*Ue,F+=I*Re,he+=I*je,N+=I*rt,Y+=I*le,J+=I*ce,M+=I*Z,z+=I*ne,re+=I*ye,oe+=I*Se,ge+=I*xe,ke+=I*De,I=V[12],E+=I*we,B+=I*Q,$+=I*ve,k+=I*Me,F+=I*Ue,he+=I*Re,N+=I*je,Y+=I*rt,J+=I*le,M+=I*ce,z+=I*Z,re+=I*ne,oe+=I*ye,ge+=I*Se,ke+=I*xe,_e+=I*De,I=V[13],B+=I*we,$+=I*Q,k+=I*ve,F+=I*Me,he+=I*Ue,N+=I*Re,Y+=I*je,J+=I*rt,M+=I*le,z+=I*ce,re+=I*Z,oe+=I*ne,ge+=I*ye,ke+=I*Se,_e+=I*xe,fe+=I*De,I=V[14],$+=I*we,k+=I*Q,F+=I*ve,he+=I*Me,N+=I*Ue,Y+=I*Re,J+=I*je,M+=I*rt,z+=I*le,re+=I*ce,oe+=I*Z,ge+=I*ne,ke+=I*ye,_e+=I*Se,fe+=I*xe,Ce+=I*De,I=V[15],k+=I*we,F+=I*Q,he+=I*ve,N+=I*Me,Y+=I*Ue,J+=I*Re,M+=I*je,z+=I*rt,re+=I*le,oe+=I*ce,ge+=I*Z,ke+=I*ne,_e+=I*ye,fe+=I*Se,Ce+=I*xe,pe+=I*De,se+=38*F,ue+=38*he,me+=38*N,q+=38*Y,w+=38*J,x+=38*M,m+=38*z,d+=38*re,g+=38*oe,S+=38*ge,D+=38*ke,C+=38*_e,E+=38*fe,B+=38*Ce,$+=38*pe,H=1,I=se+H+65535,H=Math.floor(I/65536),se=I-H*65536,I=ue+H+65535,H=Math.floor(I/65536),ue=I-H*65536,I=me+H+65535,H=Math.floor(I/65536),me=I-H*65536,I=q+H+65535,H=Math.floor(I/65536),q=I-H*65536,I=w+H+65535,H=Math.floor(I/65536),w=I-H*65536,I=x+H+65535,H=Math.floor(I/65536),x=I-H*65536,I=m+H+65535,H=Math.floor(I/65536),m=I-H*65536,I=d+H+65535,H=Math.floor(I/65536),d=I-H*65536,I=g+H+65535,H=Math.floor(I/65536),g=I-H*65536,I=S+H+65535,H=Math.floor(I/65536),S=I-H*65536,I=D+H+65535,H=Math.floor(I/65536),D=I-H*65536,I=C+H+65535,H=Math.floor(I/65536),C=I-H*65536,I=E+H+65535,H=Math.floor(I/65536),E=I-H*65536,I=B+H+65535,H=Math.floor(I/65536),B=I-H*65536,I=$+H+65535,H=Math.floor(I/65536),$=I-H*65536,I=k+H+65535,H=Math.floor(I/65536),k=I-H*65536,se+=H-1+37*(H-1),H=1,I=se+H+65535,H=Math.floor(I/65536),se=I-H*65536,I=ue+H+65535,H=Math.floor(I/65536),ue=I-H*65536,I=me+H+65535,H=Math.floor(I/65536),me=I-H*65536,I=q+H+65535,H=Math.floor(I/65536),q=I-H*65536,I=w+H+65535,H=Math.floor(I/65536),w=I-H*65536,I=x+H+65535,H=Math.floor(I/65536),x=I-H*65536,I=m+H+65535,H=Math.floor(I/65536),m=I-H*65536,I=d+H+65535,H=Math.floor(I/65536),d=I-H*65536,I=g+H+65535,H=Math.floor(I/65536),g=I-H*65536,I=S+H+65535,H=Math.floor(I/65536),S=I-H*65536,I=D+H+65535,H=Math.floor(I/65536),D=I-H*65536,I=C+H+65535,H=Math.floor(I/65536),C=I-H*65536,I=E+H+65535,H=Math.floor(I/65536),E=I-H*65536,I=B+H+65535,H=Math.floor(I/65536),B=I-H*65536,I=$+H+65535,H=Math.floor(I/65536),$=I-H*65536,I=k+H+65535,H=Math.floor(I/65536),k=I-H*65536,se+=H-1+37*(H-1),j[0]=se,j[1]=ue,j[2]=me,j[3]=q,j[4]=w,j[5]=x,j[6]=m,j[7]=d,j[8]=g,j[9]=S,j[10]=D,j[11]=C,j[12]=E,j[13]=B,j[14]=$,j[15]=k}i(y,"mul3"),a(y,"mul");function _(j,V){y(j,V,V)}i(_,"square"),a(_,"square");function T(j,V){let G=n();for(let I=0;I<16;I++)G[I]=V[I];for(let I=253;I>=0;I--)_(G,G),I!==2&&I!==4&&y(G,G,V);for(let I=0;I<16;I++)j[I]=G[I]}i(T,"inv25519"),a(T,"inv25519");function O(j,V){let G=new Uint8Array(32),I=new Float64Array(80),H=n(),se=n(),ue=n(),me=n(),q=n(),w=n();for(let g=0;g<31;g++)G[g]=j[g];G[31]=j[31]&127|64,G[0]&=248,p(I,V);for(let g=0;g<16;g++)se[g]=I[g];H[0]=me[0]=1;for(let g=254;g>=0;--g){let S=G[g>>>3]>>>(g&7)&1;f(H,se,S),f(ue,me,S),v(q,H,ue),b(H,H,ue),v(ue,se,me),b(se,se,me),_(me,q),_(w,H),y(H,ue,H),y(ue,se,q),v(q,H,ue),b(H,H,ue),_(se,H),b(ue,me,w),y(H,ue,o),v(H,H,me),y(ue,ue,H),y(H,me,w),y(me,se,I),_(se,q),f(H,se,S),f(ue,me,S)}for(let g=0;g<16;g++)I[g+16]=H[g],I[g+32]=ue[g],I[g+48]=se[g],I[g+64]=me[g];let x=I.subarray(32),m=I.subarray(16);T(x,x),y(m,m,x);let d=new Uint8Array(32);return h(d,m),d}i(O,"scalarMult"),a(O,"scalarMult"),e.scalarMult=O;function R(j){return O(j,s)}i(R,"scalarMultBase"),a(R,"scalarMultBase"),e.scalarMultBase=R;function P(j){if(j.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);let V=new Uint8Array(j);return{publicKey:R(V),secretKey:V}}i(P,"generateKeyPairFromSeed2"),a(P,"generateKeyPairFromSeed"),e.generateKeyPairFromSeed=P;function K(j){let V=(0,t.randomBytes)(32,j),G=P(V);return(0,r.wipe)(V),G}i(K,"generateKeyPair2"),a(K,"generateKeyPair"),e.generateKeyPair=K;function U(j,V,G=!1){if(j.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(V.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");let I=O(j,V);if(G){let H=0;for(let se=0;se<I.length;se++)H|=I[se];if(H===0)throw new Error("X25519: invalid shared key")}return I}i(U,"sharedKey2"),a(U,"sharedKey"),e.sharedKey=U}}),tx=ze({"../../../node_modules/.pnpm/@stablelib+chacha@1.0.1/node_modules/@stablelib/chacha/lib/chacha.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps(),n=20;function s(h,p,v){for(var b=1634760805,y=857760878,_=2036477234,T=1797285236,O=v[3]<<24|v[2]<<16|v[1]<<8|v[0],R=v[7]<<24|v[6]<<16|v[5]<<8|v[4],P=v[11]<<24|v[10]<<16|v[9]<<8|v[8],K=v[15]<<24|v[14]<<16|v[13]<<8|v[12],U=v[19]<<24|v[18]<<16|v[17]<<8|v[16],j=v[23]<<24|v[22]<<16|v[21]<<8|v[20],V=v[27]<<24|v[26]<<16|v[25]<<8|v[24],G=v[31]<<24|v[30]<<16|v[29]<<8|v[28],I=p[3]<<24|p[2]<<16|p[1]<<8|p[0],H=p[7]<<24|p[6]<<16|p[5]<<8|p[4],se=p[11]<<24|p[10]<<16|p[9]<<8|p[8],ue=p[15]<<24|p[14]<<16|p[13]<<8|p[12],me=b,q=y,w=_,x=T,m=O,d=R,g=P,S=K,D=U,C=j,E=V,B=G,$=I,k=H,F=se,he=ue,N=0;N<n;N+=2)me=me+m|0,$^=me,$=$>>>32-16|$<<16,D=D+$|0,m^=D,m=m>>>32-12|m<<12,q=q+d|0,k^=q,k=k>>>32-16|k<<16,C=C+k|0,d^=C,d=d>>>32-12|d<<12,w=w+g|0,F^=w,F=F>>>32-16|F<<16,E=E+F|0,g^=E,g=g>>>32-12|g<<12,x=x+S|0,he^=x,he=he>>>32-16|he<<16,B=B+he|0,S^=B,S=S>>>32-12|S<<12,w=w+g|0,F^=w,F=F>>>32-8|F<<8,E=E+F|0,g^=E,g=g>>>32-7|g<<7,x=x+S|0,he^=x,he=he>>>32-8|he<<8,B=B+he|0,S^=B,S=S>>>32-7|S<<7,q=q+d|0,k^=q,k=k>>>32-8|k<<8,C=C+k|0,d^=C,d=d>>>32-7|d<<7,me=me+m|0,$^=me,$=$>>>32-8|$<<8,D=D+$|0,m^=D,m=m>>>32-7|m<<7,me=me+d|0,he^=me,he=he>>>32-16|he<<16,E=E+he|0,d^=E,d=d>>>32-12|d<<12,q=q+g|0,$^=q,$=$>>>32-16|$<<16,B=B+$|0,g^=B,g=g>>>32-12|g<<12,w=w+S|0,k^=w,k=k>>>32-16|k<<16,D=D+k|0,S^=D,S=S>>>32-12|S<<12,x=x+m|0,F^=x,F=F>>>32-16|F<<16,C=C+F|0,m^=C,m=m>>>32-12|m<<12,w=w+S|0,k^=w,k=k>>>32-8|k<<8,D=D+k|0,S^=D,S=S>>>32-7|S<<7,x=x+m|0,F^=x,F=F>>>32-8|F<<8,C=C+F|0,m^=C,m=m>>>32-7|m<<7,q=q+g|0,$^=q,$=$>>>32-8|$<<8,B=B+$|0,g^=B,g=g>>>32-7|g<<7,me=me+d|0,he^=me,he=he>>>32-8|he<<8,E=E+he|0,d^=E,d=d>>>32-7|d<<7;t.writeUint32LE(me+b|0,h,0),t.writeUint32LE(q+y|0,h,4),t.writeUint32LE(w+_|0,h,8),t.writeUint32LE(x+T|0,h,12),t.writeUint32LE(m+O|0,h,16),t.writeUint32LE(d+R|0,h,20),t.writeUint32LE(g+P|0,h,24),t.writeUint32LE(S+K|0,h,28),t.writeUint32LE(D+U|0,h,32),t.writeUint32LE(C+j|0,h,36),t.writeUint32LE(E+V|0,h,40),t.writeUint32LE(B+G|0,h,44),t.writeUint32LE($+I|0,h,48),t.writeUint32LE(k+H|0,h,52),t.writeUint32LE(F+se|0,h,56),t.writeUint32LE(he+ue|0,h,60)}i(s,"core"),a(s,"core");function o(h,p,v,b,y){if(y===void 0&&(y=0),h.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(b.length<v.length)throw new Error("ChaCha: destination is shorter than source");var _,T;if(y===0){if(p.length!==8&&p.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");_=new Uint8Array(16),T=_.length-p.length,_.set(p,T)}else{if(p.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");_=p,T=y}for(var O=new Uint8Array(64),R=0;R<v.length;R+=64){s(O,_,h);for(var P=R;P<R+64&&P<v.length;P++)b[P]=v[P]^O[P-R];f(_,0,T)}return r.wipe(O),y===0&&r.wipe(_),b}i(o,"streamXOR"),a(o,"streamXOR"),e.streamXOR=o;function c(h,p,v,b){return b===void 0&&(b=0),r.wipe(v),o(h,p,v,v,b)}i(c,"stream"),a(c,"stream"),e.stream=c;function f(h,p,v){for(var b=1;v--;)b=b+(h[p]&255)|0,h[p]=b&255,b>>>=8,p++;if(b>0)throw new Error("ChaCha: counter overflow")}i(f,"incrementCounter"),a(f,"incrementCounter")}}),t$=ze({"../../../node_modules/.pnpm/@stablelib+xchacha20@1.0.1/node_modules/@stablelib/xchacha20/lib/xchacha20.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Xu(),r=ps(),n=tx(),s=20;function o(h,p,v,b){if(p.length!==24)throw new Error("XChaCha20 nonce must be 24 bytes");var y=f(h,p.subarray(0,16),new Uint8Array(32)),_=new Uint8Array(12);_.set(p.subarray(16),4);var T=n.streamXOR(y,_,v,b);return r.wipe(y),T}i(o,"streamXOR"),a(o,"streamXOR"),e.streamXOR=o;function c(h,p,v){return r.wipe(v),o(h,p,v,v)}i(c,"stream"),a(c,"stream"),e.stream=c;function f(h,p,v){for(var b=1634760805,y=857760878,_=2036477234,T=1797285236,O=h[3]<<24|h[2]<<16|h[1]<<8|h[0],R=h[7]<<24|h[6]<<16|h[5]<<8|h[4],P=h[11]<<24|h[10]<<16|h[9]<<8|h[8],K=h[15]<<24|h[14]<<16|h[13]<<8|h[12],U=h[19]<<24|h[18]<<16|h[17]<<8|h[16],j=h[23]<<24|h[22]<<16|h[21]<<8|h[20],V=h[27]<<24|h[26]<<16|h[25]<<8|h[24],G=h[31]<<24|h[30]<<16|h[29]<<8|h[28],I=p[3]<<24|p[2]<<16|p[1]<<8|p[0],H=p[7]<<24|p[6]<<16|p[5]<<8|p[4],se=p[11]<<24|p[10]<<16|p[9]<<8|p[8],ue=p[15]<<24|p[14]<<16|p[13]<<8|p[12],me=b,q=y,w=_,x=T,m=O,d=R,g=P,S=K,D=U,C=j,E=V,B=G,$=I,k=H,F=se,he=ue,N=0;N<s;N+=2)me=me+m|0,$^=me,$=$>>>32-16|$<<16,D=D+$|0,m^=D,m=m>>>32-12|m<<12,q=q+d|0,k^=q,k=k>>>32-16|k<<16,C=C+k|0,d^=C,d=d>>>32-12|d<<12,w=w+g|0,F^=w,F=F>>>32-16|F<<16,E=E+F|0,g^=E,g=g>>>32-12|g<<12,x=x+S|0,he^=x,he=he>>>32-16|he<<16,B=B+he|0,S^=B,S=S>>>32-12|S<<12,w=w+g|0,F^=w,F=F>>>32-8|F<<8,E=E+F|0,g^=E,g=g>>>32-7|g<<7,x=x+S|0,he^=x,he=he>>>32-8|he<<8,B=B+he|0,S^=B,S=S>>>32-7|S<<7,q=q+d|0,k^=q,k=k>>>32-8|k<<8,C=C+k|0,d^=C,d=d>>>32-7|d<<7,me=me+m|0,$^=me,$=$>>>32-8|$<<8,D=D+$|0,m^=D,m=m>>>32-7|m<<7,me=me+d|0,he^=me,he=he>>>32-16|he<<16,E=E+he|0,d^=E,d=d>>>32-12|d<<12,q=q+g|0,$^=q,$=$>>>32-16|$<<16,B=B+$|0,g^=B,g=g>>>32-12|g<<12,w=w+S|0,k^=w,k=k>>>32-16|k<<16,D=D+k|0,S^=D,S=S>>>32-12|S<<12,x=x+m|0,F^=x,F=F>>>32-16|F<<16,C=C+F|0,m^=C,m=m>>>32-12|m<<12,w=w+S|0,k^=w,k=k>>>32-8|k<<8,D=D+k|0,S^=D,S=S>>>32-7|S<<7,x=x+m|0,F^=x,F=F>>>32-8|F<<8,C=C+F|0,m^=C,m=m>>>32-7|m<<7,q=q+g|0,$^=q,$=$>>>32-8|$<<8,B=B+$|0,g^=B,g=g>>>32-7|g<<7,me=me+d|0,he^=me,he=he>>>32-8|he<<8,E=E+he|0,d^=E,d=d>>>32-7|d<<7;return t.writeUint32LE(me,v,0),t.writeUint32LE(q,v,4),t.writeUint32LE(w,v,8),t.writeUint32LE(x,v,12),t.writeUint32LE($,v,16),t.writeUint32LE(k,v,20),t.writeUint32LE(F,v,24),t.writeUint32LE(he,v,28),v}i(f,"hchacha"),a(f,"hchacha"),e.hchacha=f}}),rx=ze({"../../../node_modules/.pnpm/@stablelib+constant-time@1.0.1/node_modules/@stablelib/constant-time/lib/constant-time.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function t(o,c,f){return~(o-1)&c|o-1&f}i(t,"select"),a(t,"select"),e.select=t;function r(o,c){return(o|0)-(c|0)-1>>>31&1}i(r,"lessOrEqual"),a(r,"lessOrEqual"),e.lessOrEqual=r;function n(o,c){if(o.length!==c.length)return 0;for(var f=0,h=0;h<o.length;h++)f|=o[h]^c[h];return 1&f-1>>>8}i(n,"compare4"),a(n,"compare"),e.compare=n;function s(o,c){return o.length===0||c.length===0?!1:n(o,c)!==0}i(s,"equal"),a(s,"equal"),e.equal=s}}),r$=ze({"../../../node_modules/.pnpm/@stablelib+poly1305@1.0.1/node_modules/@stablelib/poly1305/lib/poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=rx(),r=ps();e.DIGEST_LENGTH=16;var n=function(){function c(f){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var h=f[0]|f[1]<<8;this._r[0]=h&8191;var p=f[2]|f[3]<<8;this._r[1]=(h>>>13|p<<3)&8191;var v=f[4]|f[5]<<8;this._r[2]=(p>>>10|v<<6)&7939;var b=f[6]|f[7]<<8;this._r[3]=(v>>>7|b<<9)&8191;var y=f[8]|f[9]<<8;this._r[4]=(b>>>4|y<<12)&255,this._r[5]=y>>>1&8190;var _=f[10]|f[11]<<8;this._r[6]=(y>>>14|_<<2)&8191;var T=f[12]|f[13]<<8;this._r[7]=(_>>>11|T<<5)&8065;var O=f[14]|f[15]<<8;this._r[8]=(T>>>8|O<<8)&8191,this._r[9]=O>>>5&127,this._pad[0]=f[16]|f[17]<<8,this._pad[1]=f[18]|f[19]<<8,this._pad[2]=f[20]|f[21]<<8,this._pad[3]=f[22]|f[23]<<8,this._pad[4]=f[24]|f[25]<<8,this._pad[5]=f[26]|f[27]<<8,this._pad[6]=f[28]|f[29]<<8,this._pad[7]=f[30]|f[31]<<8}return i(c,"Poly13052"),a(c,"Poly1305"),c.prototype._blocks=function(f,h,p){for(var v=this._fin?0:2048,b=this._h[0],y=this._h[1],_=this._h[2],T=this._h[3],O=this._h[4],R=this._h[5],P=this._h[6],K=this._h[7],U=this._h[8],j=this._h[9],V=this._r[0],G=this._r[1],I=this._r[2],H=this._r[3],se=this._r[4],ue=this._r[5],me=this._r[6],q=this._r[7],w=this._r[8],x=this._r[9];p>=16;){var m=f[h+0]|f[h+1]<<8;b+=m&8191;var d=f[h+2]|f[h+3]<<8;y+=(m>>>13|d<<3)&8191;var g=f[h+4]|f[h+5]<<8;_+=(d>>>10|g<<6)&8191;var S=f[h+6]|f[h+7]<<8;T+=(g>>>7|S<<9)&8191;var D=f[h+8]|f[h+9]<<8;O+=(S>>>4|D<<12)&8191,R+=D>>>1&8191;var C=f[h+10]|f[h+11]<<8;P+=(D>>>14|C<<2)&8191;var E=f[h+12]|f[h+13]<<8;K+=(C>>>11|E<<5)&8191;var B=f[h+14]|f[h+15]<<8;U+=(E>>>8|B<<8)&8191,j+=B>>>5|v;var $=0,k=$;k+=b*V,k+=y*(5*x),k+=_*(5*w),k+=T*(5*q),k+=O*(5*me),$=k>>>13,k&=8191,k+=R*(5*ue),k+=P*(5*se),k+=K*(5*H),k+=U*(5*I),k+=j*(5*G),$+=k>>>13,k&=8191;var F=$;F+=b*G,F+=y*V,F+=_*(5*x),F+=T*(5*w),F+=O*(5*q),$=F>>>13,F&=8191,F+=R*(5*me),F+=P*(5*ue),F+=K*(5*se),F+=U*(5*H),F+=j*(5*I),$+=F>>>13,F&=8191;var he=$;he+=b*I,he+=y*G,he+=_*V,he+=T*(5*x),he+=O*(5*w),$=he>>>13,he&=8191,he+=R*(5*q),he+=P*(5*me),he+=K*(5*ue),he+=U*(5*se),he+=j*(5*H),$+=he>>>13,he&=8191;var N=$;N+=b*H,N+=y*I,N+=_*G,N+=T*V,N+=O*(5*x),$=N>>>13,N&=8191,N+=R*(5*w),N+=P*(5*q),N+=K*(5*me),N+=U*(5*ue),N+=j*(5*se),$+=N>>>13,N&=8191;var Y=$;Y+=b*se,Y+=y*H,Y+=_*I,Y+=T*G,Y+=O*V,$=Y>>>13,Y&=8191,Y+=R*(5*x),Y+=P*(5*w),Y+=K*(5*q),Y+=U*(5*me),Y+=j*(5*ue),$+=Y>>>13,Y&=8191;var J=$;J+=b*ue,J+=y*se,J+=_*H,J+=T*I,J+=O*G,$=J>>>13,J&=8191,J+=R*V,J+=P*(5*x),J+=K*(5*w),J+=U*(5*q),J+=j*(5*me),$+=J>>>13,J&=8191;var M=$;M+=b*me,M+=y*ue,M+=_*se,M+=T*H,M+=O*I,$=M>>>13,M&=8191,M+=R*G,M+=P*V,M+=K*(5*x),M+=U*(5*w),M+=j*(5*q),$+=M>>>13,M&=8191;var z=$;z+=b*q,z+=y*me,z+=_*ue,z+=T*se,z+=O*H,$=z>>>13,z&=8191,z+=R*I,z+=P*G,z+=K*V,z+=U*(5*x),z+=j*(5*w),$+=z>>>13,z&=8191;var re=$;re+=b*w,re+=y*q,re+=_*me,re+=T*ue,re+=O*se,$=re>>>13,re&=8191,re+=R*H,re+=P*I,re+=K*G,re+=U*V,re+=j*(5*x),$+=re>>>13,re&=8191;var oe=$;oe+=b*x,oe+=y*w,oe+=_*q,oe+=T*me,oe+=O*ue,$=oe>>>13,oe&=8191,oe+=R*se,oe+=P*H,oe+=K*I,oe+=U*G,oe+=j*V,$+=oe>>>13,oe&=8191,$=($<<2)+$|0,$=$+k|0,k=$&8191,$=$>>>13,F+=$,b=k,y=F,_=he,T=N,O=Y,R=J,P=M,K=z,U=re,j=oe,h+=16,p-=16}this._h[0]=b,this._h[1]=y,this._h[2]=_,this._h[3]=T,this._h[4]=O,this._h[5]=R,this._h[6]=P,this._h[7]=K,this._h[8]=U,this._h[9]=j},c.prototype.finish=function(f,h){h===void 0&&(h=0);var p=new Uint16Array(10),v,b,y,_;if(this._leftover){for(_=this._leftover,this._buffer[_++]=1;_<16;_++)this._buffer[_]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(v=this._h[1]>>>13,this._h[1]&=8191,_=2;_<10;_++)this._h[_]+=v,v=this._h[_]>>>13,this._h[_]&=8191;for(this._h[0]+=v*5,v=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=v,v=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=v,p[0]=this._h[0]+5,v=p[0]>>>13,p[0]&=8191,_=1;_<10;_++)p[_]=this._h[_]+v,v=p[_]>>>13,p[_]&=8191;for(p[9]-=1<<13,b=(v^1)-1,_=0;_<10;_++)p[_]&=b;for(b=~b,_=0;_<10;_++)this._h[_]=this._h[_]&b|p[_];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,y=this._h[0]+this._pad[0],this._h[0]=y&65535,_=1;_<8;_++)y=(this._h[_]+this._pad[_]|0)+(y>>>16)|0,this._h[_]=y&65535;return f[h+0]=this._h[0]>>>0,f[h+1]=this._h[0]>>>8,f[h+2]=this._h[1]>>>0,f[h+3]=this._h[1]>>>8,f[h+4]=this._h[2]>>>0,f[h+5]=this._h[2]>>>8,f[h+6]=this._h[3]>>>0,f[h+7]=this._h[3]>>>8,f[h+8]=this._h[4]>>>0,f[h+9]=this._h[4]>>>8,f[h+10]=this._h[5]>>>0,f[h+11]=this._h[5]>>>8,f[h+12]=this._h[6]>>>0,f[h+13]=this._h[6]>>>8,f[h+14]=this._h[7]>>>0,f[h+15]=this._h[7]>>>8,this._finished=!0,this},c.prototype.update=function(f){var h=0,p=f.length,v;if(this._leftover){v=16-this._leftover,v>p&&(v=p);for(var b=0;b<v;b++)this._buffer[this._leftover+b]=f[h+b];if(p-=v,h+=v,this._leftover+=v,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(p>=16&&(v=p-p%16,this._blocks(f,h,v),h+=v,p-=v),p){for(var b=0;b<p;b++)this._buffer[this._leftover+b]=f[h+b];this._leftover+=p}return this},c.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var f=new Uint8Array(16);return this.finish(f),f},c.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},c}();e.Poly1305=n;function s(c,f){var h=new n(c);h.update(f);var p=h.digest();return h.clean(),p}i(s,"oneTimeAuth"),a(s,"oneTimeAuth"),e.oneTimeAuth=s;function o(c,f){return c.length!==e.DIGEST_LENGTH||f.length!==e.DIGEST_LENGTH?!1:t.equal(c,f)}i(o,"equal"),a(o,"equal"),e.equal=o}}),n$=ze({"../../../node_modules/.pnpm/@stablelib+chacha20poly1305@1.0.1/node_modules/@stablelib/chacha20poly1305/lib/chacha20poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=tx(),r=r$(),n=ps(),s=Xu(),o=rx();e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var c=new Uint8Array(16),f=function(){function h(p){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,p.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(p)}return i(h,"ChaCha20Poly13052"),a(h,"ChaCha20Poly1305"),h.prototype.seal=function(p,v,b,y){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var _=new Uint8Array(16);_.set(p,_.length-p.length);var T=new Uint8Array(32);t.stream(this._key,_,T,4);var O=v.length+this.tagLength,R;if(y){if(y.length!==O)throw new Error("ChaCha20Poly1305: incorrect destination length");R=y}else R=new Uint8Array(O);return t.streamXOR(this._key,_,v,R,4),this._authenticate(R.subarray(R.length-this.tagLength,R.length),T,R.subarray(0,R.length-this.tagLength),b),n.wipe(_),R},h.prototype.open=function(p,v,b,y){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(v.length<this.tagLength)return null;var _=new Uint8Array(16);_.set(p,_.length-p.length);var T=new Uint8Array(32);t.stream(this._key,_,T,4);var O=new Uint8Array(this.tagLength);if(this._authenticate(O,T,v.subarray(0,v.length-this.tagLength),b),!o.equal(O,v.subarray(v.length-this.tagLength,v.length)))return null;var R=v.length-this.tagLength,P;if(y){if(y.length!==R)throw new Error("ChaCha20Poly1305: incorrect destination length");P=y}else P=new Uint8Array(R);return t.streamXOR(this._key,_,v.subarray(0,v.length-this.tagLength),P,4),n.wipe(_),P},h.prototype.clean=function(){return n.wipe(this._key),this},h.prototype._authenticate=function(p,v,b,y){var _=new r.Poly1305(v);y&&(_.update(y),y.length%16>0&&_.update(c.subarray(y.length%16))),_.update(b),b.length%16>0&&_.update(c.subarray(b.length%16));var T=new Uint8Array(8);y&&s.writeUint64LE(y.length,T),_.update(T),s.writeUint64LE(b.length,T),_.update(T);for(var O=_.digest(),R=0;R<O.length;R++)p[R]=O[R];_.clean(),n.wipe(O),n.wipe(T)},h}();e.ChaCha20Poly1305=f}}),i$=ze({"../../../node_modules/.pnpm/@stablelib+xchacha20poly1305@1.0.1/node_modules/@stablelib/xchacha20poly1305/lib/xchacha20poly1305.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=t$(),r=n$(),n=ps();e.KEY_LENGTH=32,e.NONCE_LENGTH=24,e.TAG_LENGTH=16;var s=function(){function o(c){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,c.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(c)}return i(o,"XChaCha20Poly13053"),a(o,"XChaCha20Poly1305"),o.prototype.seal=function(c,f,h,p){if(c.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");var v=t.hchacha(this._key,c.subarray(0,16),new Uint8Array(32)),b=new Uint8Array(12);b.set(c.subarray(16),4);var y=new r.ChaCha20Poly1305(v),_=y.seal(b,f,h,p);return n.wipe(v),n.wipe(b),y.clean(),_},o.prototype.open=function(c,f,h,p){if(c.length!==24)throw new Error("XChaCha20Poly1305: incorrect nonce length");if(f.length<this.tagLength)return null;var v=t.hchacha(this._key,c.subarray(0,16),new Uint8Array(32)),b=new Uint8Array(12);b.set(c.subarray(16),4);var y=new r.ChaCha20Poly1305(v),_=y.open(b,f,h,p);return n.wipe(v),n.wipe(b),y.clean(),_},o.prototype.clean=function(){return n.wipe(this._key),this},o}();e.XChaCha20Poly1305=s}}),Hs=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/identifiers.js"(e,t){t.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}}}),pm=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/style.js"(e,t){t.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}}}),s$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-conv-api/transformers.js"(e){var t=e,r=4294967292,n=4294967293,s=4294967294,o=4294967295,c=[0,1,3,7,15,31,63,127,255,511,1023],f=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),p=[];h.forEach(y=>{p.push(y.charCodeAt(0))}),e.utf8={encode(y){let _=[];return y.forEach(T=>{if(T>=0&&T<=127)_.push(T);else if(T<=2047)_.push(192+(T>>6&c[5])),_.push(128+(T&c[6]));else if(T<55296||T>57343&&T<=65535)_.push(224+(T>>12&c[4])),_.push(128+(T>>6&c[6])),_.push(128+(T&c[6]));else if(T>=65536&&T<=1114111){let O=T>>16&c[5];_.push(240+(O>>2)),_.push(128+((O&c[2])<<4)+(T>>12&c[4])),_.push(128+(T>>6&c[6])),_.push(128+(T&c[6]))}else throw new RangeError(`utf8.encode: character out of range: char: ${T}`)}),Buffer.from(_)},decode(y,_){function T(ue,me){if((me&192)!==128)return n;let q=((ue&c[5])<<6)+(me&c[6]);return q<128?r:q}i(T,"bytes2"),a(T,"bytes2");function O(ue,me,q){if((q&192)!==128||(me&192)!==128)return n;let w=((ue&c[4])<<12)+((me&c[6])<<6)+(q&c[6]);return w<2048?r:w>=55296&&w<=57343?s:w}i(O,"bytes3"),a(O,"bytes3");function R(ue,me,q,w){if((w&192)!==128||(q&192)!==128||(me&192)!==128)return n;let x=(((ue&c[3])<<2)+(me>>4&c[2])<<16)+((me&c[4])<<12)+((q&c[6])<<6)+(w&c[6]);return x<65536?r:x>1114111?s:x}i(R,"bytes4"),a(R,"bytes4");let P,K,U,j,V,G,I=y.length,H=_?3:0,se=[];for(;H<I;){K=y[H],P=o;let ue=!0;for(;ue;){if(K>=0&&K<=127){P=K,G=1;break}if(U=H+1,U<I&&K>=194&&K<=223){P=T(K,y[U]),G=2;break}if(j=H+2,j<I&&K>=224&&K<=239){P=O(K,y[U],y[j]),G=3;break}if(V=H+3,V<I&&K>=240&&K<=244){P=R(K,y[U],y[j],y[V]),G=4;break}break}if(P>1114111){let me=`byte[${H}]`;throw P===o?new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${me}`):P===n?new RangeError(`utf8.decode: illegal trailing byte found at: ${me}`):P===s?new RangeError(`utf8.decode: code point out of range found at: ${me}`):P===r?new RangeError(`utf8.decode: non-shortest form found at: ${me}`):new RangeError(`utf8.decode: unrecognized error found at: ${me}`)}se.push(P),H+=G}return se}},e.utf16be={encode(y){let _=[],T,O,R;for(let P=0;P<y.length;P+=1)if(T=y[P],T>=0&&T<=55295||T>=57344&&T<=65535)_.push(T>>8&c[8]),_.push(T&c[8]);else if(T>=65536&&T<=1114111)R=T-65536,O=55296+(R>>10),R=56320+(R&c[10]),_.push(O>>8&c[8]),_.push(O&c[8]),_.push(R>>8&c[8]),_.push(R&c[8]);else throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${P}]: ${T}`);return Buffer.from(_)},decode(y,_){if(y.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${y.length}`);let T=[],O=y.length,R=_?2:0,P=0,K,U,j,V,G,I;for(;R<O;){for(;;){if(j=R+1,j<O){if(G=(y[R]<<8)+y[j],G<55296||G>57343){K=G,U=2;break}if(V=R+3,V<O&&(I=(y[R+2]<<8)+y[V],G<=56319&&I>=56320&&I<=57343)){K=65536+(G-55296<<10)+(I-56320),U=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${R}]`)}T[P++]=K,R+=U}return T}},e.utf16le={encode(y){let _=[],T,O,R;for(let P=0;P<y.length;P+=1)if(T=y[P],T>=0&&T<=55295||T>=57344&&T<=65535)_.push(T&c[8]),_.push(T>>8&c[8]);else if(T>=65536&&T<=1114111)R=T-65536,O=55296+(R>>10),R=56320+(R&c[10]),_.push(O&c[8]),_.push(O>>8&c[8]),_.push(R&c[8]),_.push(R>>8&c[8]);else throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${P}]: ${T}`);return Buffer.from(_)},decode(y,_){if(y.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${y.length}`);let T=[],O=y.length,R=_?2:0,P=0,K,U,j,V,G,I;for(;R<O;){for(;;){if(j=R+1,j<O){if(G=(y[j]<<8)+y[R],G<55296||G>57343){K=G,U=2;break}if(V=R+3,V<O&&(I=(y[V]<<8)+y[R+2],G<=56319&&I>=56320&&I<=57343)){K=65536+(G-55296<<10)+(I-56320),U=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${R}]`)}T[P++]=K,R+=U}return T}},e.utf32be={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{if(O>=55296&&O<=57343||O>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${T/4}]: ${O}`);_[T++]=O>>24&c[8],_[T++]=O>>16&c[8],_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y,_){if(y.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${y.length}`);let T=[],O=_?4:0;for(;O<y.length;O+=4){let R=(y[O]<<24)+(y[O+1]<<16)+(y[O+2]<<8)+y[O+3];if(R>=55296&&R<=57343||R>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${O/4}]: ${R}`);T.push(R)}return T}},e.utf32le={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{if(O>=55296&&O<=57343||O>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${T/4}]: ${O}`);_[T++]=O&c[8],_[T++]=O>>8&c[8],_[T++]=O>>16&c[8],_[T++]=O>>24&c[8]}),_},decode(y,_){if(y.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${y.length}`);let T=[],O=_?4:0;for(;O<y.length;O+=4){let R=(y[O+3]<<24)+(y[O+2]<<16)+(y[O+1]<<8)+y[O];if(R>=55296&&R<=57343||R>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${O/4}]: ${R}`);T.push(R)}return T}},e.uint7={encode(y){let _=Buffer.alloc(y.length);for(let T=0;T<y.length;T+=1){if(y[T]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${T}]: ${y[T]}`);_[T]=y[T]}return _},decode(y){let _=[];for(let T=0;T<y.length;T+=1){if(y[T]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${T}]: ${y[T]}`);_[T]=y[T]}return _}},e.uint8={encode(y){let _=Buffer.alloc(y.length);for(let T=0;T<y.length;T+=1){if(y[T]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${T}]: ${y[T]}`);_[T]=y[T]}return _},decode(y){let _=[];for(let T=0;T<y.length;T+=1)_[T]=y[T];return _}},e.uint16be={encode(y){let _=Buffer.alloc(y.length*2),T=0;return y.forEach(O=>{if(O>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${T/2}]: ${O}`);_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y){if(y.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=2)_.push((y[T]<<8)+y[T+1]);return _}},e.uint16le={encode(y){let _=Buffer.alloc(y.length*2),T=0;return y.forEach(O=>{if(O>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${T/2}]: ${O}`);_[T++]=O&c[8],_[T++]=O>>8&c[8]}),_},decode(y){if(y.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=2)_.push((y[T+1]<<8)+y[T]);return _}},e.uint32be={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{_[T++]=O>>24&c[8],_[T++]=O>>16&c[8],_[T++]=O>>8&c[8],_[T++]=O&c[8]}),_},decode(y){if(y.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=4)_.push((y[T]<<24)+(y[T+1]<<16)+(y[T+2]<<8)+y[T+3]);return _}},e.uint32le={encode(y){let _=Buffer.alloc(y.length*4),T=0;return y.forEach(O=>{_[T++]=O&c[8],_[T++]=O>>8&c[8],_[T++]=O>>16&c[8],_[T++]=O>>24&c[8]}),_},decode(y){if(y.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${y.length}`);let _=[];for(let T=0;T<y.length;T+=4)_.push((y[T+3]<<24)+(y[T+2]<<16)+(y[T+1]<<8)+y[T]);return _}},e.string={encode(y){return t.utf16le.encode(y).toString("utf16le")},decode(y){return t.utf16le.decode(Buffer.from(y,"utf16le"),0)}},e.escaped={encode(y){let _=[];for(let T=0;T<y.length;T+=1){let O=y[T];if(O===96)_.push(O),_.push(O);else if(O===10)_.push(O);else if(O>=32&&O<=126)_.push(O);else{let R="";if(O>=0&&O<=31)R+=`\`x${f[O]}`;else if(O>=127&&O<=255)R+=`\`x${f[O]}`;else if(O>=256&&O<=65535)R+=`\`u${f[O>>8&c[8]]}${f[O&c[8]]}`;else if(O>=65536&&O<=4294967295){R+="`u{";let K=O>>24&c[8];K>0&&(R+=f[K]),R+=`${f[O>>16&c[8]]+f[O>>8&c[8]]+f[O&c[8]]}}`}else throw new Error("escape.encode(char): char > 0xffffffff not allowed");Buffer.from(R).forEach(K=>{_.push(K)})}}return Buffer.from(_)},decode(y){function _(I){return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}i(_,"isHex"),a(_,"isHex");function T(I,H,se){let ue={char:null,nexti:I+2,error:!0};if(I+1<H&&_(se[I])&&_(se[I+1])){let me=String.fromCodePoint(se[I],se[I+1]);ue.char=parseInt(me,16),Number.isNaN(ue.char)||(ue.error=!1)}return ue}i(T,"getx"),a(T,"getx");function O(I,H,se){let ue={char:null,nexti:I+4,error:!0};if(I+3<H&&_(se[I])&&_(se[I+1])&&_(se[I+2])&&_(se[I+3])){let me=String.fromCodePoint(se[I],se[I+1],se[I+2],se[I+3]);ue.char=parseInt(me,16),Number.isNaN(ue.char)||(ue.error=!1)}return ue}i(O,"getu"),a(O,"getu");function R(I,H,se){let ue={char:null,nexti:I+4,error:!0},me="";for(;I<H&&_(se[I]);)me+=String.fromCodePoint(se[I]),I+=1;return ue.char=parseInt(me,16),se[I]===125&&!Number.isNaN(ue.char)&&(ue.error=!1),ue.nexti=I+1,ue}i(R,"getU"),a(R,"getU");let P=[],K=y.length,U,j,V,G=0;for(;G<K;){for(;;){if(V=!0,y[G]!==96){P.push(y[G]),G+=1,V=!1;break}if(U=G+1,U>=K)break;if(y[U]===96){P.push(96),G+=2,V=!1;break}if(y[U]===120){if(j=T(U+1,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}if(y[U]===117){if(y[U+1]===123){if(j=R(U+2,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}if(j=O(U+1,K,y),j.error)break;P.push(j.char),G=j.nexti,V=!1;break}break}if(V)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${G}]`)}return P}};var v=13,b=10;e.lineEnds={crlf(y){let _=[],T=0;for(;T<y.length;)switch(y[T]){case v:T+1<y.length&&y[T+1]===b?T+=2:T+=1,_.push(v),_.push(b);break;case b:_.push(v),_.push(b),T+=1;break;default:_.push(y[T]),T+=1;break}return _.length>0&&_[_.length-1]!==b&&(_.push(v),_.push(b)),_},lf(y){let _=[],T=0;for(;T<y.length;)switch(y[T]){case v:T+1<y.length&&y[T+1]===b?T+=2:T+=1,_.push(b);break;case b:_.push(b),T+=1;break;default:_.push(y[T]),T+=1;break}return _.length>0&&_[_.length-1]!==b&&_.push(b),_}},e.base64={encode(y){if(y.length===0)return Buffer.alloc(0);let _,T,O,R=y.length%3;R=R>0?3-R:0;let P=(y.length+R)/3,K=Buffer.alloc(P*4);R>0&&(P-=1),_=0,T=0;for(let U=0;U<P;U+=1)O=y[_++]<<16,O+=y[_++]<<8,O+=y[_++],K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[O>>6&c[6]],K[T++]=p[O&c[6]];if(R===0)return K;if(R===1)return O=y[_++]<<16,O+=y[_]<<8,K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[O>>6&c[6]],K[T]=p[64],K;if(R===2)return O=y[_]<<16,K[T++]=p[O>>18&c[6]],K[T++]=p[O>>12&c[6]],K[T++]=p[64],K[T]=p[64],K},decode(y){function _(G){let I=[],H=0;for(let se=0;se<G.length;se+=1){let ue=G[se],me=!0;for(;me&&!(ue===32||ue===9||ue===10||ue===13);){if(ue>=65&&ue<=90){I.push(ue-65);break}if(ue>=97&&ue<=122){I.push(ue-71);break}if(ue>=48&&ue<=57){I.push(ue+4);break}if(ue===43){I.push(62);break}if(ue===47){I.push(63);break}if(ue===61){I.push(64),H+=1;break}throw new RangeError(`base64.decode: invalid character buf[${se}]: ${ue}`)}}if(I.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${I.length}`);switch(H){case 0:break;case 1:if(I[I.length-1]!==64)throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(I[I.length-1]!==64||I[I.length-2]!==64)throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${H}`)}return{tail:H,buf:Buffer.from(I)}}if(i(_,"validate6"),a(_,"validate"),y.length===0)return Buffer.alloc(0);let T=_(y),{tail:O}=T,R=T.buf,P,K,U,j=R.length/4,V=Buffer.alloc(j*3-O);O>0&&(j-=1),K=0,P=0;for(let G=0;G<j;G+=1)U=R[P++]<<18,U+=R[P++]<<12,U+=R[P++]<<6,U+=R[P++],V[K++]=U>>16&c[8],V[K++]=U>>8&c[8],V[K++]=U&c[8];return O===1&&(U=R[P++]<<18,U+=R[P++]<<12,U+=R[P]<<6,V[K++]=U>>16&c[8],V[K]=U>>8&c[8]),O===2&&(U=R[P++]<<18,U+=R[P++]<<12,V[K]=U>>16&c[8]),V},toString(y){if(y.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${y.length}`);let _="",T=0;function O(P,K,U,j){switch(T){case 76:_+=`\r
|
|
58
58
|
${P}${K}${U}${j}`,T=4;break;case 75:_+=`${P}\r
|
|
59
59
|
${K}${U}${j}`,T=3;break;case 74:_+=`${P+K}\r
|
|
60
60
|
${U}${j}`,T=2;break;case 73:_+=`${P+K+U}\r
|
|
@@ -311,7 +311,7 @@ table.apg-attrs a:hover {
|
|
|
311
311
|
`,j+=O(V+2),j+=K(p,G.phraseIndex,G.phraseLength),j+=`
|
|
312
312
|
`):(j+=O(V),j+=`</node><!-- name="${G.name}" -->
|
|
313
313
|
`,V-=1)}),j+=`</root>
|
|
314
|
-
`,j},"toSml"),"toSml"),this.phrases=a(i(function(){let P={},K,U;for(K=0;K<T.length;K+=1)U=T[K],U.state===n.SEM_PRE&&(Array.isArray(P[U.name])||(P[U.name]=[]),P[U.name].push({index:U.phraseIndex,length:U.phraseLength}));return P},"phrases"),"phrases")},"exportsAst"),"exportsAst")}}),sx=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/circular-buffer.js"(e,t){t.exports=a(i(function(){let n="circular-buffer.js: ",s=-1,o=0;this.init=a(i(function(f){if(typeof f!="number"||f<=0)throw new Error(`${n}init: circular buffer size must an integer > 0`);o=Math.ceil(f),s=-1},"init2"),"init"),this.increment=a(i(function(){return s+=1,(s+o)%o},"increment"),"increment"),this.maxSize=a(i(function(){return o},"maxSize"),"maxSize"),this.items=a(i(function(){return s+1},"items"),"items"),this.getListIndex=a(i(function(f){return s===-1||f<0||f>s||s-f>=o?-1:(f+o)%o},"getListIndex"),"getListIndex"),this.forEach=a(i(function(f){if(s!==-1){if(s<o){for(let h=0;h<=s;h+=1)f(h,h);return}for(let h=s-o+1;h<=s;h+=1){let p=(h+o)%o;f(p,h)}}},"forEach"),"forEach")},"exportsCircularBuffer"),"exportsCircularBuffer")}}),o$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/parser.js"(e,t){t.exports=a(i(function(){let n=Hs(),s=el(),o="parser.js: ",c=this,f;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let h=null,p=null,v,b,y,_,T=0,O=0,R=0,P=null,K=null,U=null,j=null,V=null,G=0,I=1/0,H=1/0,se=a(i(function(ce,Z,re){let ye=`${o}evaluateRule(): `;if(ce>=U.length)throw new Error(`${ye}rule index: ${ce} out of range`);if(Z>=y)throw new Error(`${ye}phrase index: ${Z} out of range`);let{length:Se}=h;h.push({type:n.RNM,index:ce}),f(Se,Z,re),h.pop()},"evaluateRule2"),"evaluateRule"),ue=a(function(le,ce,Z){let re=`${o}evaluateUdt(): `;if(le>=j.length)throw new Error(`${re}udt index: ${le} out of range`);if(ce>=y)throw new Error(`${re}phrase index: ${ce} out of range`);let{length:ye}=h;h.push({type:n.UDT,empty:j[le].empty,index:le}),f(ye,ce,Z),h.pop()},"evaluateUdt"),me=a(function(){T=0,O=0,R=0,G=0,_=[{lookAround:n.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],U=null,j=null,p=null,v=0,b=0,y=0,P=null,K=null,V=null,h=null},"clear"),q=a(function(){let le=[],ce=a(function(){let re={};U.forEach(ye=>{ye.isBkr&&(re[ye.lower]=null)}),j.length>0&&j.forEach(ye=>{ye.isBkr&&(re[ye.lower]=null)}),le.push(re)},"init"),Z=a(function(){let re=le[le.length-1],ye={};for(let Se in re)ye[Se]=re[Se];return ye},"copy");this.push=a(i(function(){le.push(Z())},"push"),"push"),this.pop=a(i(function(ye){let Se=ye;if(Se||(Se=le.length-1),Se<1||Se>le.length)throw new Error(`${o}backRef.pop(): bad length: ${Se}`);return le.length=Se,le[le.length-1]},"pop"),"pop"),this.length=a(i(function(){return le.length},"length2"),"length"),this.savePhrase=a(i(function(ye,Se,xe){le[le.length-1][ye]={phraseIndex:Se,phraseLength:xe}},"savePhrase"),"savePhrase"),this.getPhrase=function(re){return le[le.length-1][re]},ce()},"backRef"),w=a(i(function(){let ce=this;this.state=n.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=_[_.length-1],this.uFrame=new q,this.pFrame=new q,this.evaluateRule=se,this.evaluateUdt=ue,this.refresh=a(i(function(){ce.state=n.ACTIVE,ce.phraseLength=0,ce.lookAround=_[_.length-1]},"refresh"),"refresh")},"systemData2"),"systemData"),x=a(i(function(){return _[_.length-1]},"lookAroundValue2"),"lookAroundValue"),m=a(i(function(){return _.length>1},"inLookAround2"),"inLookAround"),d=a(function(){return _[_.length-1].lookAround===n.LOOKAROUND_BEHIND},"inLookBehind"),g=a(function(){let le=`${o}initializeAst(): `,ce=!0;for(;ce;){if(c.ast===void 0){c.ast=null;break}if(c.ast===null)break;if(c.ast.astObject!=="astObject")throw new Error(`${le}ast object not recognized`);break}c.ast!==null&&c.ast.init(U,j,p)},"initializeAst"),S=a(function(){let le=`${o}initializeTrace(): `,ce=!0;for(;ce;){if(c.trace===void 0){c.trace=null;break}if(c.trace===null)break;if(c.trace.traceObject!=="traceObject")throw new Error(`${le}trace object not recognized`);break}c.trace!==null&&c.trace.init(U,j,p)},"initializeTrace"),D=a(function(){let le=`${o}initializeStats(): `,ce=!0;for(;ce;){if(c.stats===void 0){c.stats=null;break}if(c.stats===null)break;if(c.stats.statsObject!=="statsObject")throw new Error(`${le}stats object not recognized`);break}c.stats!==null&&c.stats.init(U,j)},"initializeStats"),C=a(function(le){let ce=`${o}initializeGrammar(): `;if(!le)throw new Error(`${ce}grammar object undefined`);if(le.grammarObject!=="grammarObject")throw new Error(`${ce}bad grammar object`);U=le.rules,j=le.udts},"initializeGrammar"),E=a(function(le){let ce=`${o}initializeStartRule(): `,Z=null;if(typeof le=="number"){if(le>=U.length)throw new Error(`${ce}start rule index too large: max: ${U.length}: index: ${le}`);Z=le}else if(typeof le=="string"){let re=le.toLowerCase();for(let ye=0;ye<U.length;ye+=1)if(re===U[ye].lower){Z=U[ye].index;break}if(Z===null)throw new Error(`${ce}start rule name '${le}' not recognized`)}else throw new Error(`${ce}type of start rule '${typeof le}' not recognized`);return Z},"initializeStartRule"),B=a(i(function(ce,Z,re){let ye=`${o}initializeInputChars(): `,Se=ce,xe=Z,De=re;if(Se===void 0)throw new Error(`${ye}input string is undefined`);if(Se===null)throw new Error(`${ye}input string is null`);if(typeof Se=="string")Se=s.stringToChars(Se);else if(!Array.isArray(Se))throw new Error(`${ye}input string is not a string or array`);if(Se.length>0&&typeof Se[0]!="number")throw new Error(`${ye}input string not an array of integers`);if(typeof xe!="number")xe=0;else if(xe=Math.floor(xe),xe<0||xe>Se.length)throw new Error(`${ye}input beginning index out of range: ${xe}`);if(typeof De!="number")De=Se.length-xe;else if(De=Math.floor(De),De<0||De>Se.length-xe)throw new Error(`${ye}input length out of range: ${De}`);p=Se,v=xe,b=De,y=v+b},"initializeInputChars2"),"initializeInputChars"),$=a(function(){let le=`${o}initializeCallbacks(): `,ce;for(P=[],K=[],ce=0;ce<U.length;ce+=1)P[ce]=null;for(ce=0;ce<j.length;ce+=1)K[ce]=null;let Z,re=[];for(ce=0;ce<U.length;ce+=1)re.push(U[ce].lower);for(ce=0;ce<j.length;ce+=1)re.push(j[ce].lower);for(let ye in c.callbacks){if(ce=re.indexOf(ye.toLowerCase()),ce<0)throw new Error(`${le}syntax callback '${ye}' not a rule or udt name`);if(Z=c.callbacks[ye],Z||(Z=null),typeof Z=="function"||Z===null)ce<U.length?P[ce]=Z:K[ce-U.length]=Z;else throw new Error(`${le}syntax callback[${ye}] must be function reference or 'false' (false/null/undefined/etc.)`)}for(ce=0;ce<j.length;ce+=1)if(K[ce]===null)throw new Error(`${le}all UDT callbacks must be defined. UDT callback[${j[ce].lower}] not a function reference`)},"initializeCallbacks");this.setMaxTreeDepth=function(le){if(typeof le!="number")throw new Error(`parser: max tree depth must be integer > 0: ${le}`);if(I=Math.floor(le),I<=0)throw new Error(`parser: max tree depth must be integer > 0: ${le}`)},this.setMaxNodeHits=function(le){if(typeof le!="number")throw new Error(`parser: max node hits must be integer > 0: ${le}`);if(H=Math.floor(le),H<=0)throw new Error(`parser: max node hits must be integer > 0: ${le}`)};let k=a(function(le,ce,Z){let re,ye=`${o}parse(): `;C(le);let Se=E(ce);$(),S(),D(),g();let xe=new w;switch(Z!=null&&(V=Z),h=[{type:n.RNM,index:Se}],f(0,v,xe),h=null,xe.state){case n.ACTIVE:throw new Error(`${ye}final state should never be 'ACTIVE'`);case n.NOMATCH:re=!1;break;case n.EMPTY:case n.MATCH:xe.phraseLength===b?re=!0:re=!1;break;default:throw new Error("unrecognized state")}return{success:re,state:xe.state,length:b,matched:xe.phraseLength,maxMatched:G,maxTreeDepth:O,nodeHits:R,inputLength:p.length,subBegin:v,subEnd:y,subLength:b}},"privateParse");this.parseSubstring=a(i(function(ce,Z,re,ye,Se,xe){return me(),B(re,ye,Se),k(ce,Z,xe)},"parseSubstring"),"parseSubstring"),this.parse=a(i(function(ce,Z,re,ye){return me(),B(re,0,re.length),k(ce,Z,ye)},"parse3"),"parse");let F=a(function(le,ce,Z){let re=h[le];for(let ye=0;ye<re.children.length&&(f(re.children[ye],ce,Z),Z.state===n.NOMATCH);ye+=1);},"opALT"),he=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le],Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ye=c.ast.getLength()),re=!0,Se=ce,xe=0;for(let He=0;He<De.children.length;He+=1)if(f(De.children[He],Se,Z),Z.state===n.NOMATCH){re=!1;break}else Se+=Z.phraseLength,xe+=Z.phraseLength;re?(Z.state=xe===0?n.EMPTY:n.MATCH,Z.phraseLength=xe):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ye))},"opCAT"),N=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le];ye=ce,Se=0,xe=0;let Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(re=c.ast.getLength());let He=!0;for(;He&&!(ye>=y||(f(le+1,ye,Z),Z.state===n.NOMATCH)||Z.state===n.EMPTY||(xe+=1,Se+=Z.phraseLength,ye+=Z.phraseLength,xe===De.max)););Z.state===n.EMPTY||xe>=De.min?(Z.state=Se===0?n.EMPTY:n.MATCH,Z.phraseLength=Se):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(re))},"opREP"),Y=a(function(le,ce,Z,re){if(ce.phraseLength>Z){let ye=`${o}opRNM(${le.name}): callback function error: `;throw ye+=`sysData.phraseLength: ${ce.phraseLength}`,ye+=` must be <= remaining chars: ${Z}`,new Error(ye)}switch(ce.state){case n.ACTIVE:if(re!==!0)throw new Error(`${o}opRNM(${le.name}): callback function return error. ACTIVE state not allowed.`);break;case n.EMPTY:ce.phraseLength=0;break;case n.MATCH:ce.phraseLength===0&&(ce.state=n.EMPTY);break;case n.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${o}opRNM(${le.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},"validateRnmCallbackResult"),J=a(function(le,ce,Z){let re,ye,Se,xe,De,Mt,qe=h[le],He=U[qe.index],Ot=P[He.index],dt=!m();if(dt&&(ye=c.ast&&c.ast.ruleDefined(qe.index),ye&&(re=c.ast.getLength(),c.ast.down(qe.index,U[qe.index].name)),xe=Z.uFrame.length(),De=Z.pFrame.length(),Z.uFrame.push(),Z.pFrame.push(),Mt=Z.pFrame,Z.pFrame=new q),Ot===null)Se=h,h=He.opcodes,f(0,ce,Z),h=Se;else{let mt=y-ce;Z.ruleIndex=He.index,Ot(Z,p,ce,V),Y(He,Z,mt,!0),Z.state===n.ACTIVE&&(Se=h,h=He.opcodes,f(0,ce,Z),h=Se,Z.ruleIndex=He.index,Ot(Z,p,ce,V),Y(He,Z,mt,!1))}dt&&(ye&&(Z.state===n.NOMATCH?c.ast.setLength(re):c.ast.up(qe.index,He.name,ce,Z.phraseLength)),Z.pFrame=Mt,Z.state===n.NOMATCH?(Z.uFrame.pop(xe),Z.pFrame.pop(De)):He.isBkr&&(Z.pFrame.savePhrase(He.lower,ce,Z.phraseLength),Z.uFrame.savePhrase(He.lower,ce,Z.phraseLength)))},"opRNM"),M=a(function(le,ce,Z){if(ce.phraseLength>Z){let re=`${o}opUDT(${le.name}): callback function error: `;throw re+=`sysData.phraseLength: ${ce.phraseLength}`,re+=` must be <= remaining chars: ${Z}`,new Error(re)}switch(ce.state){case n.ACTIVE:throw new Error(`${o}opUDT(${le.name}): callback function return error. ACTIVE state not allowed.`);case n.EMPTY:if(le.empty===!1)throw new Error(`${o}opUDT(${le.name}): callback function return error. May not return EMPTY.`);ce.phraseLength=0;break;case n.MATCH:if(ce.phraseLength===0){if(le.empty===!1)throw new Error(`${o}opUDT(${le.name}): callback function return error. May not return EMPTY.`);ce.state=n.EMPTY}break;case n.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${o}opUDT(${le.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},"validateUdtCallbackResult"),z=a(function(le,ce,Z){let re,ye,Se,xe,De,Mt,qe=h[le],He=j[qe.index];Z.UdtIndex=He.index;let Ot=!m();Ot&&(Se=c.ast&&c.ast.udtDefined(qe.index),Se&&(ye=U.length+qe.index,re=c.ast.getLength(),c.ast.down(ye,He.name)),xe=Z.uFrame.length(),De=Z.pFrame.length(),Z.uFrame.push(),Z.pFrame.push(),Mt=Z.pFrame,Z.pFrame=new q);let dt=y-ce;K[qe.index](Z,p,ce,V),M(He,Z,dt),Ot&&(Se&&(Z.state===n.NOMATCH?c.ast.setLength(re):c.ast.up(ye,He.name,ce,Z.phraseLength)),Z.pFrame=Mt,Z.state===n.NOMATCH?(Z.uFrame.pop(xe),Z.pFrame.pop(De)):He.isBkr&&(Z.pFrame.savePhrase(He.lower,ce,Z.phraseLength),Z.uFrame.savePhrase(He.lower,ce,Z.phraseLength)))},"opUDT"),te=a(function(le,ce,Z){_.push({lookAround:n.LOOKAROUND_AHEAD,anchor:ce,charsEnd:y,charsLength:b}),y=p.length,b=p.length-v,f(le+1,ce,Z);let re=_.pop();switch(y=re.charsEnd,b=re.charsLength,Z.phraseLength=0,Z.state){case n.EMPTY:Z.state=n.EMPTY;break;case n.MATCH:Z.state=n.EMPTY;break;case n.NOMATCH:Z.state=n.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Z.state}`)}},"opAND"),oe=a(function(le,ce,Z){_.push({lookAround:n.LOOKAROUND_AHEAD,anchor:ce,charsEnd:y,charsLength:b}),y=p.length,b=p.length-v,f(le+1,ce,Z);let re=_.pop();switch(y=re.charsEnd,b=re.charsLength,Z.phraseLength=0,Z.state){case n.EMPTY:case n.MATCH:Z.state=n.NOMATCH;break;case n.NOMATCH:Z.state=n.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Z.state}`)}},"opNOT"),ge=a(function(le,ce,Z){let re=h[le];Z.state=n.NOMATCH,ce<y&&re.min<=p[ce]&&p[ce]<=re.max&&(Z.state=n.MATCH,Z.phraseLength=1)},"opTRG"),ke=a(function(le,ce,Z){let re,ye=h[le],Se=ye.string.length;if(Z.state=n.NOMATCH,ce+Se<=y){for(re=0;re<Se;re+=1)if(p[ce+re]!==ye.string[re])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTBS"),_e=a(function(le,ce,Z){let re,ye,Se=h[le];Z.state=n.NOMATCH;let xe=Se.string.length;if(xe===0){Z.state=n.EMPTY;return}if(ce+xe<=y){for(re=0;re<xe;re+=1)if(ye=p[ce+re],ye>=65&&ye<=90&&(ye+=32),ye!==Se.string[re])return;Z.state=n.MATCH,Z.phraseLength=xe}},"opTLS"),fe=a(function(le,ce,Z){Z.state=n.NOMATCH,Z.phraseLength=0,Z.state=ce===0?n.EMPTY:n.NOMATCH},"opABG"),Ce=a(function(le,ce,Z){Z.state=n.NOMATCH,Z.phraseLength=0,Z.state=ce===p.length?n.EMPTY:n.NOMATCH},"opAEN"),pe=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le];Z.state=n.NOMATCH,De.index<U.length?xe=U[De.index].lower:xe=j[De.index-U.length].lower;let Mt=De.bkrMode===n.BKR_MODE_PM?Z.pFrame.getPhrase(xe):Z.uFrame.getPhrase(xe),qe=De.bkrCase===n.BKR_MODE_CI;if(Mt===null)return;let He=Mt.phraseIndex,Ot=Mt.phraseLength;if(Ot===0){Z.state=n.EMPTY;return}if(ce+Ot<=y){if(qe){for(re=0;re<Ot;re+=1)if(ye=p[ce+re],Se=p[He+re],ye>=65&&ye<=90&&(ye+=32),Se>=65&&Se<=90&&(Se+=32),ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}else for(re=0;re<Ot;re+=1)if(ye=p[ce+re],Se=p[He+re],ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}},"opBKR"),we=a(function(le,ce,Z){switch(_.push({lookAround:n.LOOKAROUND_BEHIND,anchor:ce}),f(le+1,ce,Z),_.pop(),Z.phraseLength=0,Z.state){case n.EMPTY:Z.state=n.EMPTY;break;case n.MATCH:Z.state=n.EMPTY;break;case n.NOMATCH:Z.state=n.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${Z.state}`)}},"opBKA"),Q=a(function(le,ce,Z){switch(_.push({lookAround:n.LOOKAROUND_BEHIND,anchor:ce}),f(le+1,ce,Z),_.pop(),Z.phraseLength=0,Z.state){case n.EMPTY:case n.MATCH:Z.state=n.NOMATCH;break;case n.NOMATCH:Z.state=n.EMPTY;break;default:throw new Error(`opBKN: invalid state ${Z.state}`)}},"opBKN"),ve=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le],Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ye=c.ast.getLength()),re=!0,Se=ce,xe=0;for(let He=De.children.length-1;He>=0;He-=1)if(f(De.children[He],Se,Z),Se-=Z.phraseLength,xe+=Z.phraseLength,Z.state===n.NOMATCH){re=!1;break}re?(Z.state=xe===0?n.EMPTY:n.MATCH,Z.phraseLength=xe):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ye))},"opCATBehind"),Me=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le];ye=ce,Se=0,xe=0;let Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(re=c.ast.getLength());let He=!0;for(;He&&!(ye<=0||(f(le+1,ye,Z),Z.state===n.NOMATCH)||Z.state===n.EMPTY||(xe+=1,Se+=Z.phraseLength,ye-=Z.phraseLength,xe===De.max)););Z.state===n.EMPTY||xe>=De.min?(Z.state=Se===0?n.EMPTY:n.MATCH,Z.phraseLength=Se):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(re))},"opREPBehind"),Ue=a(function(le,ce,Z){let re=h[le];if(Z.state=n.NOMATCH,Z.phraseLength=0,ce>0){let ye=p[ce-1];re.min<=ye&&ye<=re.max&&(Z.state=n.MATCH,Z.phraseLength=1)}},"opTRGBehind"),Re=a(function(le,ce,Z){let re,ye=h[le];Z.state=n.NOMATCH;let Se=ye.string.length,xe=ce-Se;if(xe>=0){for(re=0;re<Se;re+=1)if(p[xe+re]!==ye.string[re])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTBSBehind"),je=a(function(le,ce,Z){let re,ye=h[le];Z.state=n.NOMATCH;let Se=ye.string.length;if(Se===0){Z.state=n.EMPTY;return}let xe=ce-Se;if(xe>=0){for(let De=0;De<Se;De+=1)if(re=p[xe+De],re>=65&&re<=90&&(re+=32),re!==ye.string[De])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTLSBehind"),rt=a(function(le,ce,Z){let re,ye,Se,xe,De=h[le];Z.state=n.NOMATCH,Z.phraseLength=0,De.index<U.length?xe=U[De.index].lower:xe=j[De.index-U.length].lower;let Mt=De.bkrMode===n.BKR_MODE_PM?Z.pFrame.getPhrase(xe):Z.uFrame.getPhrase(xe),qe=De.bkrCase===n.BKR_MODE_CI;if(Mt===null)return;let He=Mt.phraseIndex,Ot=Mt.phraseLength;if(Ot===0){Z.state=n.EMPTY,Z.phraseLength=0;return}let dt=ce-Ot;if(dt>=0){if(qe){for(re=0;re<Ot;re+=1)if(ye=p[dt+re],Se=p[He+re],ye>=65&&ye<=90&&(ye+=32),Se>=65&&Se<=90&&(Se+=32),ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}else for(re=0;re<Ot;re+=1)if(ye=p[dt+re],Se=p[He+re],ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}},"opBKRBehind");f=a(i(function(ce,Z,re){let ye=!0,Se=h[ce];if(R+=1,R>H)throw new Error(`parser: maximum number of node hits exceeded: ${H}`);if(T+=1,T>O&&(O=T,O>I))throw new Error(`parser: maximum parse tree depth exceeded: ${I}`);if(re.refresh(),c.trace!==null){let xe=x();c.trace.down(Se,re.state,Z,re.phraseLength,xe.anchor,xe.lookAround)}if(d())switch(Se.type){case n.ALT:F(ce,Z,re);break;case n.CAT:ve(ce,Z,re);break;case n.REP:Me(ce,Z,re);break;case n.RNM:J(ce,Z,re);break;case n.UDT:z(ce,Z,re);break;case n.AND:te(ce,Z,re);break;case n.NOT:oe(ce,Z,re);break;case n.TRG:Ue(ce,Z,re);break;case n.TBS:Re(ce,Z,re);break;case n.TLS:je(ce,Z,re);break;case n.BKR:rt(ce,Z,re);break;case n.BKA:we(ce,Z,re);break;case n.BKN:Q(ce,Z,re);break;case n.ABG:fe(ce,Z,re);break;case n.AEN:Ce(ce,Z,re);break;default:ye=!1;break}else switch(Se.type){case n.ALT:F(ce,Z,re);break;case n.CAT:he(ce,Z,re);break;case n.REP:N(ce,Z,re);break;case n.RNM:J(ce,Z,re);break;case n.UDT:z(ce,Z,re);break;case n.AND:te(ce,Z,re);break;case n.NOT:oe(ce,Z,re);break;case n.TRG:ge(ce,Z,re);break;case n.TBS:ke(ce,Z,re);break;case n.TLS:_e(ce,Z,re);break;case n.BKR:pe(ce,Z,re);break;case n.BKA:we(ce,Z,re);break;case n.BKN:Q(ce,Z,re);break;case n.ABG:fe(ce,Z,re);break;case n.AEN:Ce(ce,Z,re);break;default:ye=!1;break}if(!m()&&Z+re.phraseLength>G&&(G=Z+re.phraseLength),c.stats!==null&&c.stats.collect(Se,re),c.trace!==null){let xe=x();c.trace.up(Se,re.state,Z,re.phraseLength,xe.anchor,xe.lookAround)}return T-=1,ye},"opExecuteFunc"),"opExecuteFunc")},"parser"),"parser")}}),c$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/stats.js"(e,t){t.exports=a(i(function(){let n=Hs(),s=el(),o=pm(),c="stats.js: ",f=[],h=[],p=[],v,b=[],y=[];this.statsObject="statsObject";let _="stats",T=a(i(function(H,se){return H.lower<se.lower?-1:H.lower>se.lower?1:0},"sortAlpha2"),"sortAlpha"),O=a(i(function(H,se){return H.total<se.total?1:H.total>se.total?-1:T(H,se)},"sortHits2"),"sortHits"),R=a(i(function(H,se){return H.index<se.index?-1:H.index>se.index?1:0},"sortIndex2"),"sortIndex"),P=a(i(function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},"EmptyStat2"),"EmptyStat"),K=a(i(function(){p.length=0,v=new P,p[n.ALT]=new P,p[n.CAT]=new P,p[n.REP]=new P,p[n.RNM]=new P,p[n.TRG]=new P,p[n.TBS]=new P,p[n.TLS]=new P,p[n.UDT]=new P,p[n.AND]=new P,p[n.NOT]=new P,p[n.BKR]=new P,p[n.BKA]=new P,p[n.BKN]=new P,p[n.ABG]=new P,p[n.AEN]=new P,b.length=0;for(let H=0;H<f.length;H+=1)b.push({empty:0,match:0,nomatch:0,total:0,name:f[H].name,lower:f[H].lower,index:f[H].index});if(h.length>0){y.length=0;for(let H=0;H<h.length;H+=1)y.push({empty:0,match:0,nomatch:0,total:0,name:h[H].name,lower:h[H].lower,index:h[H].index})}},"clear2"),"clear"),U=a(i(function(H,se){switch(H.total+=1,se){case n.EMPTY:H.empty+=1;break;case n.MATCH:H.match+=1;break;case n.NOMATCH:H.nomatch+=1;break;default:throw new Error(`${c}collect(): incStat(): unrecognized state: ${se}`)}},"incStat2"),"incStat"),j=a(i(function(H,se){let ue="";return ue+="<tr>",ue+=`<td class="${o.CLASS_ACTIVE}">${H}</td>`,ue+=`<td class="${o.CLASS_EMPTY}">${se.empty}</td>`,ue+=`<td class="${o.CLASS_MATCH}">${se.match}</td>`,ue+=`<td class="${o.CLASS_NOMATCH}">${se.nomatch}</td>`,ue+=`<td class="${o.CLASS_ACTIVE}">${se.total}</td>`,ue+=`</tr>
|
|
314
|
+
`,j},"toSml"),"toSml"),this.phrases=a(i(function(){let P={},K,U;for(K=0;K<T.length;K+=1)U=T[K],U.state===n.SEM_PRE&&(Array.isArray(P[U.name])||(P[U.name]=[]),P[U.name].push({index:U.phraseIndex,length:U.phraseLength}));return P},"phrases"),"phrases")},"exportsAst"),"exportsAst")}}),sx=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/circular-buffer.js"(e,t){t.exports=a(i(function(){let n="circular-buffer.js: ",s=-1,o=0;this.init=a(i(function(f){if(typeof f!="number"||f<=0)throw new Error(`${n}init: circular buffer size must an integer > 0`);o=Math.ceil(f),s=-1},"init2"),"init"),this.increment=a(i(function(){return s+=1,(s+o)%o},"increment"),"increment"),this.maxSize=a(i(function(){return o},"maxSize"),"maxSize"),this.items=a(i(function(){return s+1},"items"),"items"),this.getListIndex=a(i(function(f){return s===-1||f<0||f>s||s-f>=o?-1:(f+o)%o},"getListIndex"),"getListIndex"),this.forEach=a(i(function(f){if(s!==-1){if(s<o){for(let h=0;h<=s;h+=1)f(h,h);return}for(let h=s-o+1;h<=s;h+=1){let p=(h+o)%o;f(p,h)}}},"forEach"),"forEach")},"exportsCircularBuffer"),"exportsCircularBuffer")}}),o$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/parser.js"(e,t){t.exports=a(i(function(){let n=Hs(),s=el(),o="parser.js: ",c=this,f;this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];let h=null,p=null,v,b,y,_,T=0,O=0,R=0,P=null,K=null,U=null,j=null,V=null,G=0,I=1/0,H=1/0,se=a(i(function(ce,Z,ne){let ye=`${o}evaluateRule(): `;if(ce>=U.length)throw new Error(`${ye}rule index: ${ce} out of range`);if(Z>=y)throw new Error(`${ye}phrase index: ${Z} out of range`);let{length:Se}=h;h.push({type:n.RNM,index:ce}),f(Se,Z,ne),h.pop()},"evaluateRule2"),"evaluateRule"),ue=a(function(le,ce,Z){let ne=`${o}evaluateUdt(): `;if(le>=j.length)throw new Error(`${ne}udt index: ${le} out of range`);if(ce>=y)throw new Error(`${ne}phrase index: ${ce} out of range`);let{length:ye}=h;h.push({type:n.UDT,empty:j[le].empty,index:le}),f(ye,ce,Z),h.pop()},"evaluateUdt"),me=a(function(){T=0,O=0,R=0,G=0,_=[{lookAround:n.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],U=null,j=null,p=null,v=0,b=0,y=0,P=null,K=null,V=null,h=null},"clear"),q=a(function(){let le=[],ce=a(function(){let ne={};U.forEach(ye=>{ye.isBkr&&(ne[ye.lower]=null)}),j.length>0&&j.forEach(ye=>{ye.isBkr&&(ne[ye.lower]=null)}),le.push(ne)},"init"),Z=a(function(){let ne=le[le.length-1],ye={};for(let Se in ne)ye[Se]=ne[Se];return ye},"copy");this.push=a(i(function(){le.push(Z())},"push"),"push"),this.pop=a(i(function(ye){let Se=ye;if(Se||(Se=le.length-1),Se<1||Se>le.length)throw new Error(`${o}backRef.pop(): bad length: ${Se}`);return le.length=Se,le[le.length-1]},"pop"),"pop"),this.length=a(i(function(){return le.length},"length2"),"length"),this.savePhrase=a(i(function(ye,Se,xe){le[le.length-1][ye]={phraseIndex:Se,phraseLength:xe}},"savePhrase"),"savePhrase"),this.getPhrase=function(ne){return le[le.length-1][ne]},ce()},"backRef"),w=a(i(function(){let ce=this;this.state=n.ACTIVE,this.phraseLength=0,this.ruleIndex=0,this.udtIndex=0,this.lookAround=_[_.length-1],this.uFrame=new q,this.pFrame=new q,this.evaluateRule=se,this.evaluateUdt=ue,this.refresh=a(i(function(){ce.state=n.ACTIVE,ce.phraseLength=0,ce.lookAround=_[_.length-1]},"refresh"),"refresh")},"systemData2"),"systemData"),x=a(i(function(){return _[_.length-1]},"lookAroundValue2"),"lookAroundValue"),m=a(i(function(){return _.length>1},"inLookAround2"),"inLookAround"),d=a(function(){return _[_.length-1].lookAround===n.LOOKAROUND_BEHIND},"inLookBehind"),g=a(function(){let le=`${o}initializeAst(): `,ce=!0;for(;ce;){if(c.ast===void 0){c.ast=null;break}if(c.ast===null)break;if(c.ast.astObject!=="astObject")throw new Error(`${le}ast object not recognized`);break}c.ast!==null&&c.ast.init(U,j,p)},"initializeAst"),S=a(function(){let le=`${o}initializeTrace(): `,ce=!0;for(;ce;){if(c.trace===void 0){c.trace=null;break}if(c.trace===null)break;if(c.trace.traceObject!=="traceObject")throw new Error(`${le}trace object not recognized`);break}c.trace!==null&&c.trace.init(U,j,p)},"initializeTrace"),D=a(function(){let le=`${o}initializeStats(): `,ce=!0;for(;ce;){if(c.stats===void 0){c.stats=null;break}if(c.stats===null)break;if(c.stats.statsObject!=="statsObject")throw new Error(`${le}stats object not recognized`);break}c.stats!==null&&c.stats.init(U,j)},"initializeStats"),C=a(function(le){let ce=`${o}initializeGrammar(): `;if(!le)throw new Error(`${ce}grammar object undefined`);if(le.grammarObject!=="grammarObject")throw new Error(`${ce}bad grammar object`);U=le.rules,j=le.udts},"initializeGrammar"),E=a(function(le){let ce=`${o}initializeStartRule(): `,Z=null;if(typeof le=="number"){if(le>=U.length)throw new Error(`${ce}start rule index too large: max: ${U.length}: index: ${le}`);Z=le}else if(typeof le=="string"){let ne=le.toLowerCase();for(let ye=0;ye<U.length;ye+=1)if(ne===U[ye].lower){Z=U[ye].index;break}if(Z===null)throw new Error(`${ce}start rule name '${le}' not recognized`)}else throw new Error(`${ce}type of start rule '${typeof le}' not recognized`);return Z},"initializeStartRule"),B=a(i(function(ce,Z,ne){let ye=`${o}initializeInputChars(): `,Se=ce,xe=Z,De=ne;if(Se===void 0)throw new Error(`${ye}input string is undefined`);if(Se===null)throw new Error(`${ye}input string is null`);if(typeof Se=="string")Se=s.stringToChars(Se);else if(!Array.isArray(Se))throw new Error(`${ye}input string is not a string or array`);if(Se.length>0&&typeof Se[0]!="number")throw new Error(`${ye}input string not an array of integers`);if(typeof xe!="number")xe=0;else if(xe=Math.floor(xe),xe<0||xe>Se.length)throw new Error(`${ye}input beginning index out of range: ${xe}`);if(typeof De!="number")De=Se.length-xe;else if(De=Math.floor(De),De<0||De>Se.length-xe)throw new Error(`${ye}input length out of range: ${De}`);p=Se,v=xe,b=De,y=v+b},"initializeInputChars2"),"initializeInputChars"),$=a(function(){let le=`${o}initializeCallbacks(): `,ce;for(P=[],K=[],ce=0;ce<U.length;ce+=1)P[ce]=null;for(ce=0;ce<j.length;ce+=1)K[ce]=null;let Z,ne=[];for(ce=0;ce<U.length;ce+=1)ne.push(U[ce].lower);for(ce=0;ce<j.length;ce+=1)ne.push(j[ce].lower);for(let ye in c.callbacks){if(ce=ne.indexOf(ye.toLowerCase()),ce<0)throw new Error(`${le}syntax callback '${ye}' not a rule or udt name`);if(Z=c.callbacks[ye],Z||(Z=null),typeof Z=="function"||Z===null)ce<U.length?P[ce]=Z:K[ce-U.length]=Z;else throw new Error(`${le}syntax callback[${ye}] must be function reference or 'false' (false/null/undefined/etc.)`)}for(ce=0;ce<j.length;ce+=1)if(K[ce]===null)throw new Error(`${le}all UDT callbacks must be defined. UDT callback[${j[ce].lower}] not a function reference`)},"initializeCallbacks");this.setMaxTreeDepth=function(le){if(typeof le!="number")throw new Error(`parser: max tree depth must be integer > 0: ${le}`);if(I=Math.floor(le),I<=0)throw new Error(`parser: max tree depth must be integer > 0: ${le}`)},this.setMaxNodeHits=function(le){if(typeof le!="number")throw new Error(`parser: max node hits must be integer > 0: ${le}`);if(H=Math.floor(le),H<=0)throw new Error(`parser: max node hits must be integer > 0: ${le}`)};let k=a(function(le,ce,Z){let ne,ye=`${o}parse(): `;C(le);let Se=E(ce);$(),S(),D(),g();let xe=new w;switch(Z!=null&&(V=Z),h=[{type:n.RNM,index:Se}],f(0,v,xe),h=null,xe.state){case n.ACTIVE:throw new Error(`${ye}final state should never be 'ACTIVE'`);case n.NOMATCH:ne=!1;break;case n.EMPTY:case n.MATCH:xe.phraseLength===b?ne=!0:ne=!1;break;default:throw new Error("unrecognized state")}return{success:ne,state:xe.state,length:b,matched:xe.phraseLength,maxMatched:G,maxTreeDepth:O,nodeHits:R,inputLength:p.length,subBegin:v,subEnd:y,subLength:b}},"privateParse");this.parseSubstring=a(i(function(ce,Z,ne,ye,Se,xe){return me(),B(ne,ye,Se),k(ce,Z,xe)},"parseSubstring"),"parseSubstring"),this.parse=a(i(function(ce,Z,ne,ye){return me(),B(ne,0,ne.length),k(ce,Z,ye)},"parse3"),"parse");let F=a(function(le,ce,Z){let ne=h[le];for(let ye=0;ye<ne.children.length&&(f(ne.children[ye],ce,Z),Z.state===n.NOMATCH);ye+=1);},"opALT"),he=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le],Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ye=c.ast.getLength()),ne=!0,Se=ce,xe=0;for(let He=0;He<De.children.length;He+=1)if(f(De.children[He],Se,Z),Z.state===n.NOMATCH){ne=!1;break}else Se+=Z.phraseLength,xe+=Z.phraseLength;ne?(Z.state=xe===0?n.EMPTY:n.MATCH,Z.phraseLength=xe):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ye))},"opCAT"),N=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le];ye=ce,Se=0,xe=0;let Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ne=c.ast.getLength());let He=!0;for(;He&&!(ye>=y||(f(le+1,ye,Z),Z.state===n.NOMATCH)||Z.state===n.EMPTY||(xe+=1,Se+=Z.phraseLength,ye+=Z.phraseLength,xe===De.max)););Z.state===n.EMPTY||xe>=De.min?(Z.state=Se===0?n.EMPTY:n.MATCH,Z.phraseLength=Se):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ne))},"opREP"),Y=a(function(le,ce,Z,ne){if(ce.phraseLength>Z){let ye=`${o}opRNM(${le.name}): callback function error: `;throw ye+=`sysData.phraseLength: ${ce.phraseLength}`,ye+=` must be <= remaining chars: ${Z}`,new Error(ye)}switch(ce.state){case n.ACTIVE:if(ne!==!0)throw new Error(`${o}opRNM(${le.name}): callback function return error. ACTIVE state not allowed.`);break;case n.EMPTY:ce.phraseLength=0;break;case n.MATCH:ce.phraseLength===0&&(ce.state=n.EMPTY);break;case n.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${o}opRNM(${le.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},"validateRnmCallbackResult"),J=a(function(le,ce,Z){let ne,ye,Se,xe,De,Mt,qe=h[le],He=U[qe.index],Ot=P[He.index],dt=!m();if(dt&&(ye=c.ast&&c.ast.ruleDefined(qe.index),ye&&(ne=c.ast.getLength(),c.ast.down(qe.index,U[qe.index].name)),xe=Z.uFrame.length(),De=Z.pFrame.length(),Z.uFrame.push(),Z.pFrame.push(),Mt=Z.pFrame,Z.pFrame=new q),Ot===null)Se=h,h=He.opcodes,f(0,ce,Z),h=Se;else{let mt=y-ce;Z.ruleIndex=He.index,Ot(Z,p,ce,V),Y(He,Z,mt,!0),Z.state===n.ACTIVE&&(Se=h,h=He.opcodes,f(0,ce,Z),h=Se,Z.ruleIndex=He.index,Ot(Z,p,ce,V),Y(He,Z,mt,!1))}dt&&(ye&&(Z.state===n.NOMATCH?c.ast.setLength(ne):c.ast.up(qe.index,He.name,ce,Z.phraseLength)),Z.pFrame=Mt,Z.state===n.NOMATCH?(Z.uFrame.pop(xe),Z.pFrame.pop(De)):He.isBkr&&(Z.pFrame.savePhrase(He.lower,ce,Z.phraseLength),Z.uFrame.savePhrase(He.lower,ce,Z.phraseLength)))},"opRNM"),M=a(function(le,ce,Z){if(ce.phraseLength>Z){let ne=`${o}opUDT(${le.name}): callback function error: `;throw ne+=`sysData.phraseLength: ${ce.phraseLength}`,ne+=` must be <= remaining chars: ${Z}`,new Error(ne)}switch(ce.state){case n.ACTIVE:throw new Error(`${o}opUDT(${le.name}): callback function return error. ACTIVE state not allowed.`);case n.EMPTY:if(le.empty===!1)throw new Error(`${o}opUDT(${le.name}): callback function return error. May not return EMPTY.`);ce.phraseLength=0;break;case n.MATCH:if(ce.phraseLength===0){if(le.empty===!1)throw new Error(`${o}opUDT(${le.name}): callback function return error. May not return EMPTY.`);ce.state=n.EMPTY}break;case n.NOMATCH:ce.phraseLength=0;break;default:throw new Error(`${o}opUDT(${le.name}): callback function return error. Unrecognized return state: ${ce.state}`)}},"validateUdtCallbackResult"),z=a(function(le,ce,Z){let ne,ye,Se,xe,De,Mt,qe=h[le],He=j[qe.index];Z.UdtIndex=He.index;let Ot=!m();Ot&&(Se=c.ast&&c.ast.udtDefined(qe.index),Se&&(ye=U.length+qe.index,ne=c.ast.getLength(),c.ast.down(ye,He.name)),xe=Z.uFrame.length(),De=Z.pFrame.length(),Z.uFrame.push(),Z.pFrame.push(),Mt=Z.pFrame,Z.pFrame=new q);let dt=y-ce;K[qe.index](Z,p,ce,V),M(He,Z,dt),Ot&&(Se&&(Z.state===n.NOMATCH?c.ast.setLength(ne):c.ast.up(ye,He.name,ce,Z.phraseLength)),Z.pFrame=Mt,Z.state===n.NOMATCH?(Z.uFrame.pop(xe),Z.pFrame.pop(De)):He.isBkr&&(Z.pFrame.savePhrase(He.lower,ce,Z.phraseLength),Z.uFrame.savePhrase(He.lower,ce,Z.phraseLength)))},"opUDT"),re=a(function(le,ce,Z){_.push({lookAround:n.LOOKAROUND_AHEAD,anchor:ce,charsEnd:y,charsLength:b}),y=p.length,b=p.length-v,f(le+1,ce,Z);let ne=_.pop();switch(y=ne.charsEnd,b=ne.charsLength,Z.phraseLength=0,Z.state){case n.EMPTY:Z.state=n.EMPTY;break;case n.MATCH:Z.state=n.EMPTY;break;case n.NOMATCH:Z.state=n.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Z.state}`)}},"opAND"),oe=a(function(le,ce,Z){_.push({lookAround:n.LOOKAROUND_AHEAD,anchor:ce,charsEnd:y,charsLength:b}),y=p.length,b=p.length-v,f(le+1,ce,Z);let ne=_.pop();switch(y=ne.charsEnd,b=ne.charsLength,Z.phraseLength=0,Z.state){case n.EMPTY:case n.MATCH:Z.state=n.NOMATCH;break;case n.NOMATCH:Z.state=n.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Z.state}`)}},"opNOT"),ge=a(function(le,ce,Z){let ne=h[le];Z.state=n.NOMATCH,ce<y&&ne.min<=p[ce]&&p[ce]<=ne.max&&(Z.state=n.MATCH,Z.phraseLength=1)},"opTRG"),ke=a(function(le,ce,Z){let ne,ye=h[le],Se=ye.string.length;if(Z.state=n.NOMATCH,ce+Se<=y){for(ne=0;ne<Se;ne+=1)if(p[ce+ne]!==ye.string[ne])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTBS"),_e=a(function(le,ce,Z){let ne,ye,Se=h[le];Z.state=n.NOMATCH;let xe=Se.string.length;if(xe===0){Z.state=n.EMPTY;return}if(ce+xe<=y){for(ne=0;ne<xe;ne+=1)if(ye=p[ce+ne],ye>=65&&ye<=90&&(ye+=32),ye!==Se.string[ne])return;Z.state=n.MATCH,Z.phraseLength=xe}},"opTLS"),fe=a(function(le,ce,Z){Z.state=n.NOMATCH,Z.phraseLength=0,Z.state=ce===0?n.EMPTY:n.NOMATCH},"opABG"),Ce=a(function(le,ce,Z){Z.state=n.NOMATCH,Z.phraseLength=0,Z.state=ce===p.length?n.EMPTY:n.NOMATCH},"opAEN"),pe=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le];Z.state=n.NOMATCH,De.index<U.length?xe=U[De.index].lower:xe=j[De.index-U.length].lower;let Mt=De.bkrMode===n.BKR_MODE_PM?Z.pFrame.getPhrase(xe):Z.uFrame.getPhrase(xe),qe=De.bkrCase===n.BKR_MODE_CI;if(Mt===null)return;let He=Mt.phraseIndex,Ot=Mt.phraseLength;if(Ot===0){Z.state=n.EMPTY;return}if(ce+Ot<=y){if(qe){for(ne=0;ne<Ot;ne+=1)if(ye=p[ce+ne],Se=p[He+ne],ye>=65&&ye<=90&&(ye+=32),Se>=65&&Se<=90&&(Se+=32),ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}else for(ne=0;ne<Ot;ne+=1)if(ye=p[ce+ne],Se=p[He+ne],ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}},"opBKR"),we=a(function(le,ce,Z){switch(_.push({lookAround:n.LOOKAROUND_BEHIND,anchor:ce}),f(le+1,ce,Z),_.pop(),Z.phraseLength=0,Z.state){case n.EMPTY:Z.state=n.EMPTY;break;case n.MATCH:Z.state=n.EMPTY;break;case n.NOMATCH:Z.state=n.NOMATCH;break;default:throw new Error(`opBKA: invalid state ${Z.state}`)}},"opBKA"),Q=a(function(le,ce,Z){switch(_.push({lookAround:n.LOOKAROUND_BEHIND,anchor:ce}),f(le+1,ce,Z),_.pop(),Z.phraseLength=0,Z.state){case n.EMPTY:case n.MATCH:Z.state=n.NOMATCH;break;case n.NOMATCH:Z.state=n.EMPTY;break;default:throw new Error(`opBKN: invalid state ${Z.state}`)}},"opBKN"),ve=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le],Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ye=c.ast.getLength()),ne=!0,Se=ce,xe=0;for(let He=De.children.length-1;He>=0;He-=1)if(f(De.children[He],Se,Z),Se-=Z.phraseLength,xe+=Z.phraseLength,Z.state===n.NOMATCH){ne=!1;break}ne?(Z.state=xe===0?n.EMPTY:n.MATCH,Z.phraseLength=xe):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ye))},"opCATBehind"),Me=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le];ye=ce,Se=0,xe=0;let Mt=Z.uFrame.length(),qe=Z.pFrame.length();c.ast&&(ne=c.ast.getLength());let He=!0;for(;He&&!(ye<=0||(f(le+1,ye,Z),Z.state===n.NOMATCH)||Z.state===n.EMPTY||(xe+=1,Se+=Z.phraseLength,ye-=Z.phraseLength,xe===De.max)););Z.state===n.EMPTY||xe>=De.min?(Z.state=Se===0?n.EMPTY:n.MATCH,Z.phraseLength=Se):(Z.state=n.NOMATCH,Z.phraseLength=0,Z.uFrame.pop(Mt),Z.pFrame.pop(qe),c.ast&&c.ast.setLength(ne))},"opREPBehind"),Ue=a(function(le,ce,Z){let ne=h[le];if(Z.state=n.NOMATCH,Z.phraseLength=0,ce>0){let ye=p[ce-1];ne.min<=ye&&ye<=ne.max&&(Z.state=n.MATCH,Z.phraseLength=1)}},"opTRGBehind"),Re=a(function(le,ce,Z){let ne,ye=h[le];Z.state=n.NOMATCH;let Se=ye.string.length,xe=ce-Se;if(xe>=0){for(ne=0;ne<Se;ne+=1)if(p[xe+ne]!==ye.string[ne])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTBSBehind"),je=a(function(le,ce,Z){let ne,ye=h[le];Z.state=n.NOMATCH;let Se=ye.string.length;if(Se===0){Z.state=n.EMPTY;return}let xe=ce-Se;if(xe>=0){for(let De=0;De<Se;De+=1)if(ne=p[xe+De],ne>=65&&ne<=90&&(ne+=32),ne!==ye.string[De])return;Z.state=n.MATCH,Z.phraseLength=Se}},"opTLSBehind"),rt=a(function(le,ce,Z){let ne,ye,Se,xe,De=h[le];Z.state=n.NOMATCH,Z.phraseLength=0,De.index<U.length?xe=U[De.index].lower:xe=j[De.index-U.length].lower;let Mt=De.bkrMode===n.BKR_MODE_PM?Z.pFrame.getPhrase(xe):Z.uFrame.getPhrase(xe),qe=De.bkrCase===n.BKR_MODE_CI;if(Mt===null)return;let He=Mt.phraseIndex,Ot=Mt.phraseLength;if(Ot===0){Z.state=n.EMPTY,Z.phraseLength=0;return}let dt=ce-Ot;if(dt>=0){if(qe){for(ne=0;ne<Ot;ne+=1)if(ye=p[dt+ne],Se=p[He+ne],ye>=65&&ye<=90&&(ye+=32),Se>=65&&Se<=90&&(Se+=32),ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}else for(ne=0;ne<Ot;ne+=1)if(ye=p[dt+ne],Se=p[He+ne],ye!==Se)return;Z.state=n.MATCH,Z.phraseLength=Ot}},"opBKRBehind");f=a(i(function(ce,Z,ne){let ye=!0,Se=h[ce];if(R+=1,R>H)throw new Error(`parser: maximum number of node hits exceeded: ${H}`);if(T+=1,T>O&&(O=T,O>I))throw new Error(`parser: maximum parse tree depth exceeded: ${I}`);if(ne.refresh(),c.trace!==null){let xe=x();c.trace.down(Se,ne.state,Z,ne.phraseLength,xe.anchor,xe.lookAround)}if(d())switch(Se.type){case n.ALT:F(ce,Z,ne);break;case n.CAT:ve(ce,Z,ne);break;case n.REP:Me(ce,Z,ne);break;case n.RNM:J(ce,Z,ne);break;case n.UDT:z(ce,Z,ne);break;case n.AND:re(ce,Z,ne);break;case n.NOT:oe(ce,Z,ne);break;case n.TRG:Ue(ce,Z,ne);break;case n.TBS:Re(ce,Z,ne);break;case n.TLS:je(ce,Z,ne);break;case n.BKR:rt(ce,Z,ne);break;case n.BKA:we(ce,Z,ne);break;case n.BKN:Q(ce,Z,ne);break;case n.ABG:fe(ce,Z,ne);break;case n.AEN:Ce(ce,Z,ne);break;default:ye=!1;break}else switch(Se.type){case n.ALT:F(ce,Z,ne);break;case n.CAT:he(ce,Z,ne);break;case n.REP:N(ce,Z,ne);break;case n.RNM:J(ce,Z,ne);break;case n.UDT:z(ce,Z,ne);break;case n.AND:re(ce,Z,ne);break;case n.NOT:oe(ce,Z,ne);break;case n.TRG:ge(ce,Z,ne);break;case n.TBS:ke(ce,Z,ne);break;case n.TLS:_e(ce,Z,ne);break;case n.BKR:pe(ce,Z,ne);break;case n.BKA:we(ce,Z,ne);break;case n.BKN:Q(ce,Z,ne);break;case n.ABG:fe(ce,Z,ne);break;case n.AEN:Ce(ce,Z,ne);break;default:ye=!1;break}if(!m()&&Z+ne.phraseLength>G&&(G=Z+ne.phraseLength),c.stats!==null&&c.stats.collect(Se,ne),c.trace!==null){let xe=x();c.trace.up(Se,ne.state,Z,ne.phraseLength,xe.anchor,xe.lookAround)}return T-=1,ye},"opExecuteFunc"),"opExecuteFunc")},"parser"),"parser")}}),c$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/stats.js"(e,t){t.exports=a(i(function(){let n=Hs(),s=el(),o=pm(),c="stats.js: ",f=[],h=[],p=[],v,b=[],y=[];this.statsObject="statsObject";let _="stats",T=a(i(function(H,se){return H.lower<se.lower?-1:H.lower>se.lower?1:0},"sortAlpha2"),"sortAlpha"),O=a(i(function(H,se){return H.total<se.total?1:H.total>se.total?-1:T(H,se)},"sortHits2"),"sortHits"),R=a(i(function(H,se){return H.index<se.index?-1:H.index>se.index?1:0},"sortIndex2"),"sortIndex"),P=a(i(function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},"EmptyStat2"),"EmptyStat"),K=a(i(function(){p.length=0,v=new P,p[n.ALT]=new P,p[n.CAT]=new P,p[n.REP]=new P,p[n.RNM]=new P,p[n.TRG]=new P,p[n.TBS]=new P,p[n.TLS]=new P,p[n.UDT]=new P,p[n.AND]=new P,p[n.NOT]=new P,p[n.BKR]=new P,p[n.BKA]=new P,p[n.BKN]=new P,p[n.ABG]=new P,p[n.AEN]=new P,b.length=0;for(let H=0;H<f.length;H+=1)b.push({empty:0,match:0,nomatch:0,total:0,name:f[H].name,lower:f[H].lower,index:f[H].index});if(h.length>0){y.length=0;for(let H=0;H<h.length;H+=1)y.push({empty:0,match:0,nomatch:0,total:0,name:h[H].name,lower:h[H].lower,index:h[H].index})}},"clear2"),"clear"),U=a(i(function(H,se){switch(H.total+=1,se){case n.EMPTY:H.empty+=1;break;case n.MATCH:H.match+=1;break;case n.NOMATCH:H.nomatch+=1;break;default:throw new Error(`${c}collect(): incStat(): unrecognized state: ${se}`)}},"incStat2"),"incStat"),j=a(i(function(H,se){let ue="";return ue+="<tr>",ue+=`<td class="${o.CLASS_ACTIVE}">${H}</td>`,ue+=`<td class="${o.CLASS_EMPTY}">${se.empty}</td>`,ue+=`<td class="${o.CLASS_MATCH}">${se.match}</td>`,ue+=`<td class="${o.CLASS_NOMATCH}">${se.nomatch}</td>`,ue+=`<td class="${o.CLASS_ACTIVE}">${se.total}</td>`,ue+=`</tr>
|
|
315
315
|
`,ue},"displayRow2"),"displayRow"),V=a(i(function(){let H="";return H+=j("ALT",p[n.ALT]),H+=j("CAT",p[n.CAT]),H+=j("REP",p[n.REP]),H+=j("RNM",p[n.RNM]),H+=j("TRG",p[n.TRG]),H+=j("TBS",p[n.TBS]),H+=j("TLS",p[n.TLS]),H+=j("UDT",p[n.UDT]),H+=j("AND",p[n.AND]),H+=j("NOT",p[n.NOT]),H+=j("BKR",p[n.BKR]),H+=j("BKA",p[n.BKA]),H+=j("BKN",p[n.BKN]),H+=j("ABG",p[n.ABG]),H+=j("AEN",p[n.AEN]),H+=j("totals",v),H},"displayOpsOnly2"),"displayOpsOnly"),G=a(i(function(){let H="";H+=`<tr><th></th><th></th><th></th><th></th><th></th></tr>
|
|
316
316
|
`,H+=`<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>
|
|
317
317
|
`;for(let se=0;se<f.length;se+=1)b[se].total>0&&(H+="<tr>",H+=`<td class="${o.CLASS_ACTIVE}">${b[se].name}</td>`,H+=`<td class="${o.CLASS_EMPTY}">${b[se].empty}</td>`,H+=`<td class="${o.CLASS_MATCH}">${b[se].match}</td>`,H+=`<td class="${o.CLASS_NOMATCH}">${b[se].nomatch}</td>`,H+=`<td class="${o.CLASS_ACTIVE}">${b[se].total}</td>`,H+=`</tr>
|
|
@@ -326,7 +326,7 @@ table.apg-attrs a:hover {
|
|
|
326
326
|
`,ue+=`<th class="${o.CLASS_NOMATCH}">NOMATCH</th>
|
|
327
327
|
`,ue+=`<th class="${o.CLASS_ACTIVE}">totals</th></tr>
|
|
328
328
|
`;let me=!0;for(;me;){if(H===void 0){ue+=V();break}if(H===null){ue+=V();break}if(H==="ops"){ue+=V();break}if(H==="index"){b.sort(R),y.length>0&&y.sort(R),ue+=V(),ue+=G();break}if(H==="hits"){b.sort(O),y.length>0&&y.sort(R),ue+=V(),ue+=G();break}if(H==="alpha"){b.sort(T),y.length>0&&y.sort(T),ue+=V(),ue+=G();break}break}return ue+=`</table>
|
|
329
|
-
`,ue},"toHtml"),"toHtml"),this.toHtmlPage=a(i(function(H,se,ue){return s.htmlToPage(this.toHtml(H,se),ue)},"toHtmlPage"),"toHtmlPage")},"statsFunc"),"statsFunc")}}),u$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/trace.js"(e,t){t.exports=a(i(function(){let n=el(),s=pm(),o=new(sx()),c=Hs(),f="trace.js: ",h=this,p=16,v=10,b=8,y=32,_=80,T=5,O=[],R=5e3,P=-1,K=0,U=0,j=[],V=null,G=null,I=null,H=[],se=[],ue=`<span class="${s.CLASS_LINEEND}">•</span>`,me=`<span class="${s.CLASS_LINEEND}">…</span>`,q=`<span class="${s.CLASS_EMPTY}">𝜺</span>`,w=a(function(){let M=a(function(
|
|
329
|
+
`,ue},"toHtml"),"toHtml"),this.toHtmlPage=a(i(function(H,se,ue){return s.htmlToPage(this.toHtml(H,se),ue)},"toHtmlPage"),"toHtmlPage")},"statsFunc"),"statsFunc")}}),u$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/trace.js"(e,t){t.exports=a(i(function(){let n=el(),s=pm(),o=new(sx()),c=Hs(),f="trace.js: ",h=this,p=16,v=10,b=8,y=32,_=80,T=5,O=[],R=5e3,P=-1,K=0,U=0,j=[],V=null,G=null,I=null,H=[],se=[],ue=`<span class="${s.CLASS_LINEEND}">•</span>`,me=`<span class="${s.CLASS_LINEEND}">…</span>`,q=`<span class="${s.CLASS_EMPTY}">𝜺</span>`,w=a(function(){let M=a(function(re){H[c.ALT]=re,H[c.CAT]=re,H[c.REP]=re,H[c.TLS]=re,H[c.TBS]=re,H[c.TRG]=re,H[c.AND]=re,H[c.NOT]=re,H[c.BKR]=re,H[c.BKA]=re,H[c.BKN]=re,H[c.ABG]=re,H[c.AEN]=re},"setOperators"),z=0;for(let re in h.filter.operators)z+=1;if(z===0){M(!1);return}for(let re in h.filter.operators){let oe=re.toUpperCase();if(oe==="<ALL>"){M(!0);return}if(oe==="<NONE>"){M(!1);return}}M(!1);for(let re in h.filter.operators){let oe=re.toUpperCase();if(oe==="ALT")H[c.ALT]=h.filter.operators[re]===!0;else if(oe==="CAT")H[c.CAT]=h.filter.operators[re]===!0;else if(oe==="REP")H[c.REP]=h.filter.operators[re]===!0;else if(oe==="AND")H[c.AND]=h.filter.operators[re]===!0;else if(oe==="NOT")H[c.NOT]=h.filter.operators[re]===!0;else if(oe==="TLS")H[c.TLS]=h.filter.operators[re]===!0;else if(oe==="TBS")H[c.TBS]=h.filter.operators[re]===!0;else if(oe==="TRG")H[c.TRG]=h.filter.operators[re]===!0;else if(oe==="BKR")H[c.BKR]=h.filter.operators[re]===!0;else if(oe==="BKA")H[c.BKA]=h.filter.operators[re]===!0;else if(oe==="BKN")H[c.BKN]=h.filter.operators[re]===!0;else if(oe==="ABG")H[c.ABG]=h.filter.operators[re]===!0;else if(oe==="AEN")H[c.AEN]=h.filter.operators[re]===!0;else throw new Error(`${f}initOpratorFilter: '${re}' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn`)}},"initOperatorFilter"),x=a(function(){let M=a(function(ge){H[c.RNM]=ge,H[c.UDT]=ge;let ke=G.length+I.length;se.length=0;for(let _e=0;_e<ke;_e+=1)se.push(ge)},"setRules"),z,re,oe=[];for(re=0;re<G.length;re+=1)oe.push(G[re].lower);for(re=0;re<I.length;re+=1)oe.push(I[re].lower);se.length=0,z=0;for(let ge in h.filter.rules)z+=1;if(z===0){M(!0);return}for(let ge in h.filter.rules){let ke=ge.toLowerCase();if(ke==="<all>"){M(!0);return}if(ke==="<none>"){M(!1);return}}M(!1),H[c.RNM]=!0,H[c.UDT]=!0;for(let ge in h.filter.rules){let ke=ge.toLowerCase();if(re=oe.indexOf(ke),re<0)throw new Error(`${f}initRuleFilter: '${ge}' not a valid rule or udt name`);se[re]=h.filter.rules[ge]===!0}},"initRuleFilter");this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(M,z){if(P=-1,typeof M=="number"&&M>0)R=Math.ceil(M);else{R=0;return}typeof z=="number"&&(P=Math.floor(z),P<0&&(P=-1))},this.getMaxRecords=function(){return R},this.getLastRecord=function(){return P},this.init=function(M,z,re){O.length=0,j.length=0,K=0,U=0,V=re,G=M,I=z,w(),x(),o.init(R)};let m=a(function(M){let z=!1;return M.type===c.RNM?H[M.type]&&se[M.index]?z=!0:z=!1:M.type===c.UDT?H[M.type]&&se[G.length+M.index]?z=!0:z=!1:z=H[M.type],z},"filterOps"),d=a(function(M){return P===-1||M<=P},"filterRecords");this.down=function(M,z,re,oe,ge,ke){d(K)&&m(M)&&(j.push(K),O[o.increment()]={dirUp:!1,depth:U,thisLine:K,thatLine:void 0,opcode:M,state:z,phraseIndex:re,phraseLength:oe,lookAnchor:ge,lookAround:ke},K+=1,U+=1)},this.up=function(M,z,re,oe,ge,ke){if(d(K)&&m(M)){let _e=K,fe=j.pop(),Ce=o.getListIndex(fe);Ce!==-1&&(O[Ce].thatLine=_e),U-=1,O[o.increment()]={dirUp:!0,depth:U,thisLine:_e,thatLine:fe,opcode:M,state:z,phraseIndex:re,phraseLength:oe,lookAnchor:ge,lookAround:ke},K+=1}};let g=a(function(){function M(Z,ne){let ye,Se,xe;if(ne)switch(Z.op={id:ne.type,name:n.opcodeToString(ne.type)},Z.opData=void 0,ne.type){case c.RNM:Z.opData=G[ne.index].name;break;case c.UDT:Z.opData=I[ne.index].name;break;case c.BKR:ne.index<G.length?ye=G[ne.index].name:ye=I[ne.index-G.length].name,Se=ne.bkrCase===c.BKR_MODE_CI?"%i":"%s",xe=ne.bkrMode===c.BKR_MODE_UM?"%u":"%p",Z.opData=`\\\\${Se}${xe}${ye}`;break;case c.TLS:Z.opData=[];for(let De=0;De<ne.string.length;De+=1)Z.opData.push(ne.string[De]);break;case c.TBS:Z.opData=[];for(let De=0;De<ne.string.length;De+=1)Z.opData.push(ne.string[De]);break;case c.TRG:Z.opData=[ne.min,ne.max];break;case c.REP:Z.opData=[ne.min,ne.max];break;default:throw new Error("unrecognized opcode")}else Z.op={id:void 0,name:void 0},Z.opData=void 0}i(M,"nodeOpcode"),a(M,"nodeOpcode");function z(Z,ne,ye){return Z===c.MATCH?{index:ne,length:ye}:Z===c.NOMATCH?{index:ne,length:0}:Z===c.EMPTY?{index:ne,length:0}:null}i(z,"nodePhrase"),a(z,"nodePhrase");let re=-1;function oe(Z,ne,ye){let Se={id:re++,branch:-1,parent:Z,up:!1,down:!1,depth:ye,children:[]};return ne?(Se.down=!0,Se.state={id:ne.state,name:n.stateToString(ne.state)},Se.phrase=null,M(Se,ne.opcode)):(Se.state={id:void 0,name:void 0},Se.phrase=z(),M(Se,void 0)),Se}i(oe,"nodeDown"),a(oe,"nodeDown");function ge(Z,ne){ne&&(Z.up=!0,Z.state={id:ne.state,name:n.stateToString(ne.state)},Z.phrase=z(ne.state,ne.phraseIndex,ne.phraseLength),Z.down||M(Z,ne.opcode))}i(ge,"nodeUp"),a(ge,"nodeUp");let ke=0,_e=-1,fe=1;function Ce(Z){if(_e+=1,Z.branch=fe,_e>U&&(U=_e),Z.children.length===0)ke+=1;else for(let ne=0;ne<Z.children.length;ne+=1)ne>0&&(fe+=1),Z.children[ne].leftMost=!1,Z.children[ne].rightMost=!1,Z.leftMost&&(Z.children[ne].leftMost=ne===0),Z.rightMost&&(Z.children[ne].rightMost=ne===Z.children.length-1),Ce(Z.children[ne]);_e-=1}i(Ce,"walk"),a(Ce,"walk");function pe(Z,ne){let ye,Se={};if(Se.id=Z.id,Se.branch=Z.branch,Se.leftMost=Z.leftMost,Se.rightMost=Z.rightMost,ye=Z.state.name?Z.state.name:"ACTIVE",Se.state={id:Z.state.id,name:ye},ye=Z.op.name?Z.op.name:"?",Se.op={id:Z.op.id,name:ye},typeof Z.opData=="string")Se.opData=Z.opData;else if(Array.isArray(Z.opData)){Se.opData=[];for(let xe=0;xe<Z.opData.length;xe+=1)Se.opData[xe]=Z.opData[xe]}else Se.opData=void 0;Z.phrase?Se.phrase={index:Z.phrase.index,length:Z.phrase.length}:Se.phrase=null,Se.depth=Z.depth,Se.children=[];for(let xe=0;xe<Z.children.length;xe+=1){let De=xe!==Z.children.length-1;Se.children[xe]=pe(Z.children[xe],ne,De)}return Se}i(pe,"display"),a(pe,"display");let we=[],Q,ve,Me,Ue,Re=!0,je=oe(null,null,-1);for(we.push(je),ve=je,o.forEach(Z=>{if(Ue=O[Z],Re&&(Re=!1,Ue.depth>0)){let ne=Ue.dirUp?Ue.depth+1:Ue.depth;for(let ye=0;ye<ne;ye+=1)Me=ve,ve=oe(ve,null,ye),we.push(ve),Me.children.push(ve)}Ue.dirUp?(ve=we.pop(),ge(ve,Ue),ve=we[we.length-1]):(Me=ve,ve=oe(ve,Ue,Ue.depth),we.push(ve),Me.children.push(ve))});we.length>1;)ve=we.pop(),ge(ve,null);if(je.children.length===0)throw new Error("trace.toTree(): parse tree has no nodes");if(we.length===0)throw new Error("trace.toTree(): integrity check: dummy root node disappeared?");Q=je.children[0];let rt=Q;for(;Q&&!Q.down&&!Q.up;)rt=Q,Q=Q.children[0];Q=rt,Q.leftMost=!0,Q.rightMost=!0,Ce(Q),Q.branch=0;let le={};le.string=[];for(let Z=0;Z<V.length;Z+=1)le.string[Z]=V[Z];le.rules=[];for(let Z=0;Z<G.length;Z+=1)le.rules[Z]=G[Z].name;le.udts=[];for(let Z=0;Z<I.length;Z+=1)le.udts[Z]=I[Z].name;le.id={},le.id.ALT={id:c.ALT,name:"ALT"},le.id.CAT={id:c.CAT,name:"CAT"},le.id.REP={id:c.REP,name:"REP"},le.id.RNM={id:c.RNM,name:"RNM"},le.id.TLS={id:c.TLS,name:"TLS"},le.id.TBS={id:c.TBS,name:"TBS"},le.id.TRG={id:c.TRG,name:"TRG"},le.id.UDT={id:c.UDT,name:"UDT"},le.id.AND={id:c.AND,name:"AND"},le.id.NOT={id:c.NOT,name:"NOT"},le.id.BKR={id:c.BKR,name:"BKR"},le.id.BKA={id:c.BKA,name:"BKA"},le.id.BKN={id:c.BKN,name:"BKN"},le.id.ABG={id:c.ABG,name:"ABG"},le.id.AEN={id:c.AEN,name:"AEN"},le.id.ACTIVE={id:c.ACTIVE,name:"ACTIVE"},le.id.MATCH={id:c.MATCH,name:"MATCH"},le.id.EMPTY={id:c.EMPTY,name:"EMPTY"},le.id.NOMATCH={id:c.NOMATCH,name:"NOMATCH"},le.treeDepth=U,le.leafNodes=ke;let ce;return Q.down?Q.up?ce="none":ce="right":Q.up?ce="left":ce="both",le.branchesIncomplete=ce,le.tree=pe(Q,Q.depth,!1),le},"toTreeObj");this.toTree=function(M){let z=g();return M?JSON.stringify(z):z},this.toHtmlPage=function(M,z,re){return n.htmlToPage(this.toHtml(M,z),re)};let S=a(function(M,z){let re;switch(M){case p:re="hexadecimal";break;case v:re="decimal";break;case b:re="ASCII";break;case y:re="UNICODE";break;default:throw new Error(`${f}htmlHeader: unrecognized mode: ${M}`)}let oe="";return oe+=`<p>display mode: ${re}</p>
|
|
330
330
|
`,oe+=`<table class="${s.CLASS_TRACE}">
|
|
331
331
|
`,typeof z=="string"&&(oe+=`<caption>${z}</caption>`),oe},"htmlHeader"),D=a(function(){let M="";return M+=`</table>
|
|
332
332
|
`,M+=`<p class="${s.CLASS_MONOSPACE}">legend:<br>
|
|
@@ -371,11 +371,11 @@ table.apg-attrs a:hover {
|
|
|
371
371
|
`,M+=`ABG - anchor - begin of input string<br>
|
|
372
372
|
`,M+=`AEN - anchor - end of input string<br>
|
|
373
373
|
`,M+=`</p>
|
|
374
|
-
`,M},"htmlFooter");this.indent=function(M){let z="";for(let
|
|
375
|
-
`,o.forEach(Ce=>{let pe=O[Ce];switch(
|
|
374
|
+
`,M},"htmlFooter");this.indent=function(M){let z="";for(let re=0;re<M;re+=1)z+=".";return z};let C=a(function(M,z){let re="";if(z.type===c.TRG)if(M===p||M===y){let oe=z.min.toString(16).toUpperCase();oe.length%2!==0&&(oe=`0${oe}`),re+=M===p?"%x":"U+",re+=oe,oe=z.max.toString(16).toUpperCase(),oe.length%2!==0&&(oe=`0${oe}`),re+=`–${oe}`}else re=`%d${z.min.toString(10)}–${z.max.toString(10)}`;return re},"displayTrg"),E=a(function(M,z){let re="";if(z.type===c.REP)if(M===p){let oe=z.min.toString(16).toUpperCase();oe.length%2!==0&&(oe=`0${oe}`),re=`x${oe}`,z.max<1/0?(oe=z.max.toString(16).toUpperCase(),oe.length%2!==0&&(oe=`0${oe}`)):oe="inf",re+=`–${oe}`}else z.max<1/0?re=`${z.min.toString(10)}–${z.max.toString(10)}`:re=`${z.min.toString(10)}–inf`;return re},"displayRep"),B=a(function(M,z){let re="";if(z.type===c.TBS){let oe=Math.min(z.string.length,T*2);if(M===p||M===y){re+=M===p?"%x":"U+";for(let ge=0;ge<oe;ge+=1){let ke;ge>0&&(re+="."),ke=z.string[ge].toString(16).toUpperCase(),ke.length%2!==0&&(ke=`0${ke}`),re+=ke}}else{re="%d";for(let ge=0;ge<oe;ge+=1)ge>0&&(re+="."),re+=z.string[ge].toString(10)}oe<z.string.length&&(re+=me)}return re},"displayTbs"),$=a(function(M,z){let re="";if(z.type===c.TLS){let oe=Math.min(z.string.length,T);if(M===p||M===v){let ge,ke,_e;M===p?(re="%x",_e=16):(re="%d",_e=10);for(let fe=0;fe<oe;fe+=1)fe>0&&(re+="."),ke=z.string[fe],ke>=97&&ke<=122?(ge=ke-32,re+=`${ge.toString(_e)}/${ke.toString(_e)}`.toUpperCase()):ke>=65&&ke<=90?(ge=ke,ke+=32,re+=`${ge.toString(_e)}/${ke.toString(_e)}`.toUpperCase()):re+=ke.toString(_e).toUpperCase();oe<z.string.length&&(re+=me)}else{re='"';for(let ge=0;ge<oe;ge+=1)re+=n.asciiChars[z.string[ge]];oe<z.string.length&&(re+=me),re+='"'}}return re},"displayTls"),k=a(function(M,z,re,oe,ge){if(oe===0)return"";let ke="",_e=ge?",":"";switch(M){case p:ke=_e+n.charsToHex(z,re,oe);break;case v:if(ge)return`,${n.charsToDec(z,re,oe)}`;ke=_e+n.charsToDec(z,re,oe);break;case y:ke=n.charsToUnicode(z,re,oe);break;case b:default:ke=n.charsToAsciiHtml(z,re,oe);break}return ke},"subPhrase"),F=a(function(M,z,re,oe,ge,ke){let _e="",fe,Ce,pe,we,Q=ue,ve=`<span class="${s.CLASS_LOOKBEHIND}">`,Me=`<span class="${s.CLASS_REMAINDER}">`,Ue="</span>",Re=!1;switch(re){case c.EMPTY:_e+=q;case c.NOMATCH:case c.MATCH:case c.ACTIVE:fe=oe-ge,Ce=ke-fe,pe=ke,we=z.length-pe;break;default:throw new Error("unrecognized state")}return Q=ue,Ce>_?(Ce=_,Q=me,we=0):Ce+we>_&&(Q=me,we=_-Ce),Ce>0&&(_e+=ve,_e+=k(M,z,fe,Ce,Re),_e+=Ue,Re=!0),we>0&&(_e+=Me,_e+=k(M,z,pe,we,Re),_e+=Ue),_e+Q},"displayBehind"),he=a(function(M,z,re,oe,ge,ke){let _e="",fe,Ce,pe,we,Q=ue,ve=`<span class="${s.CLASS_REMAINDER}">`,Me="</span>",Ue=!1;switch(re){case c.EMPTY:_e+=q;case c.NOMATCH:case c.ACTIVE:fe=oe,Ce=0,pe=oe,we=z.length-pe;break;case c.MATCH:fe=oe,Ce=ge,pe=oe+Ce,we=z.length-pe;break;default:throw new Error("unrecognized state")}return Q=ue,Ce>_?(Ce=_,Q=me,we=0):Ce+we>_&&(Q=me,we=_-Ce),Ce>0&&(_e+=ke,_e+=k(M,z,fe,Ce,Ue),_e+=Me,Ue=!0),we>0&&(_e+=ve,_e+=k(M,z,pe,we,Ue),_e+=Me),_e+Q},"displayForward"),N=a(function(M,z,re,oe,ge){let ke=`<span class="${s.CLASS_LOOKAHEAD}">`;return he(M,z,re,oe,ge,ke)},"displayAhead"),Y=a(function(M,z,re,oe,ge){let ke=`<span class="${s.CLASS_MATCH}">`;return he(M,z,re,oe,ge,ke)},"displayNone"),J=a(function(M){if(G===null)return"";let z="",re,oe,ge,ke,_e,fe;return z+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",z+=`<th>operator</th><th>phrase</th></tr>
|
|
375
|
+
`,o.forEach(Ce=>{let pe=O[Ce];switch(re=pe.thisLine,oe=pe.thatLine!==void 0?pe.thatLine:"--",ge=!1,ke=!1,_e=!1,pe.lookAround===c.LOOKAROUND_AHEAD&&(ge=!0,_e=!0,fe=pe.lookAnchor),(pe.opcode.type===c.AND||pe.opcode.type===c.NOT)&&(ge=!0,_e=!0,fe=pe.phraseIndex),pe.lookAround===c.LOOKAROUND_BEHIND&&(ke=!0,_e=!0,fe=pe.lookAnchor),(pe.opcode.type===c.BKA||pe.opcode.type===c.BKN)&&(ke=!0,_e=!0,fe=pe.phraseIndex),z+="<tr>",z+=`<td>${re}</td><td>${oe}</td>`,z+=`<td>${pe.phraseIndex}</td>`,z+=`<td>${pe.phraseLength}</td>`,z+=`<td>${pe.depth}</td>`,z+="<td>",pe.state){case c.ACTIVE:z+=`<span class="${s.CLASS_ACTIVE}">↓ </span>`;break;case c.MATCH:z+=`<span class="${s.CLASS_MATCH}">↑M</span>`;break;case c.NOMATCH:z+=`<span class="${s.CLASS_NOMATCH}">↑N</span>`;break;case c.EMPTY:z+=`<span class="${s.CLASS_EMPTY}">↑E</span>`;break;default:z+=`<span class="${s.CLASS_ACTIVE}">--</span>`;break}if(z+="</td>",z+="<td>",z+=h.indent(pe.depth),ge?z+=`<span class="${s.CLASS_LOOKAHEAD}">`:ke&&(z+=`<span class="${s.CLASS_LOOKBEHIND}">`),z+=n.opcodeToString(pe.opcode.type),pe.opcode.type===c.RNM&&(z+=`(${G[pe.opcode.index].name}) `),pe.opcode.type===c.BKR){let we=pe.opcode.bkrCase===c.BKR_MODE_CI?"%i":"%s",Q=pe.opcode.bkrMode===c.BKR_MODE_UM?"%u":"%p";z+=`(\\${we}${Q}${G[pe.opcode.index].name}) `}pe.opcode.type===c.UDT&&(z+=`(${I[pe.opcode.index].name}) `),pe.opcode.type===c.TRG&&(z+=`(${C(M,pe.opcode)}) `),pe.opcode.type===c.TBS&&(z+=`(${B(M,pe.opcode)}) `),pe.opcode.type===c.TLS&&(z+=`(${$(M,pe.opcode)}) `),pe.opcode.type===c.REP&&(z+=`(${E(M,pe.opcode)}) `),_e&&(z+="</span>"),z+="</td>",z+="<td>",ke?z+=F(M,V,pe.state,pe.phraseIndex,pe.phraseLength,fe):ge?z+=N(M,V,pe.state,pe.phraseIndex,pe.phraseLength):z+=Y(M,V,pe.state,pe.phraseIndex,pe.phraseLength),z+=`</td></tr>
|
|
376
376
|
`}),z+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",z+=`<th>operator</th><th>phrase</th></tr>
|
|
377
377
|
`,z+=`</table>
|
|
378
|
-
`,z},"htmlTable");this.toHtml=function(M,z){let
|
|
378
|
+
`,z},"htmlTable");this.toHtml=function(M,z){let re=b;if(typeof M=="string"&&M.length>=3){let ge=M.toLowerCase().slice(0,3);ge==="hex"?re=p:ge==="dec"?re=v:ge==="uni"&&(re=y)}let oe="";return oe+=S(re,z),oe+=J(re),oe+=D(),oe}},"exportTrace"),"exportTrace")}}),tl=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-lib/node-exports.js"(e,t){t.exports={ast:a$(),circular:sx(),ids:Hs(),parser:o$(),stats:c$(),trace:u$(),utils:el(),emitcss:ix(),style:pm()}}}),l$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/scanner-grammar.js"(e,t){t.exports=a(i(function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=a(i(function(){let s="";return s+=`file = *line [last-line]
|
|
379
379
|
`,s+=`line = line-text end
|
|
380
380
|
`,s+=`line-text = *(valid/invalid)
|
|
381
381
|
`,s+=`last-line = 1*(valid/invalid)
|
|
@@ -385,7 +385,7 @@ table.apg-attrs a:hover {
|
|
|
385
385
|
`,s+=`CRLF = %d13.10
|
|
386
386
|
`,s+=`LF = %d10
|
|
387
387
|
`,s+=`CR = %d13
|
|
388
|
-
`,s},"toString4"),"toString")},"grammar"),"grammar")}}),f$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/scanner-callbacks.js"(e){var t=Hs(),r=el();function n(y,_,T,O,R){return y===t.SEM_PRE?(R.endLength=0,R.textLength=0,R.invalidCount=0):R.lines.push({lineNo:R.lines.length,beginChar:T,length:O,textLength:R.textLength,endType:R.endType,invalidChars:R.invalidCount}),t.SEM_OK}i(n,"semLine"),a(n,"semLine");function s(y,_,T,O,R){return y===t.SEM_PRE&&(R.textLength=O),t.SEM_OK}i(s,"semLineText"),a(s,"semLineText");function o(y,_,T,O,R){return y===t.SEM_PRE?(R.endLength=0,R.textLength=0,R.invalidCount=0):R.strict?(R.lines.push({lineNo:R.lines.length,beginChar:T,length:O,textLength:O,endType:"none",invalidChars:R.invalidCount}),R.errors.push({line:R.lineNo,char:T+O,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(_.push(10),R.lines.push({lineNo:R.lines.length,beginChar:T,length:O+1,textLength:O,endType:"LF",invalidChars:R.invalidCount})),t.SEM_OK}i(o,"semLastLine"),a(o,"semLastLine");function c(y,_,T,O,R){return y===t.SEM_PRE&&R.errors.push({line:R.lineNo,char:T,msg:`invalid character found '\\x${r.charToHex(_[T])}'`}),t.SEM_OK}i(c,"semInvalid"),a(c,"semInvalid");function f(y,_,T,O,R){return y===t.SEM_POST&&(R.lineNo+=1),t.SEM_OK}i(f,"semEnd"),a(f,"semEnd");function h(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="LF",R.strict&&R.errors.push({line:R.lineNo,char:T,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),t.SEM_OK}i(h,"semLF"),a(h,"semLF");function p(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="CR",R.strict&&R.errors.push({line:R.lineNo,char:T,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),t.SEM_OK}i(p,"semCR"),a(p,"semCR");function v(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="CRLF"),t.SEM_OK}i(v,"semCRLF"),a(v,"semCRLF");var b=[];b.line=n,b["line-text"]=s,b["last-line"]=o,b.invalid=c,b.end=f,b.lf=h,b.cr=p,b.crlf=v,e.callbacks=b}}),d$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/scanner.js"(e,t){t.exports=a(i(function(n,s,o,c){let f="scanner.js: ",h=tl(),p=new(l$()),{callbacks:v}=f$(),b=[],y=new h.parser;if(y.ast=new h.ast,y.ast.callbacks=v,c){if(c.traceObject!=="traceObject")throw new TypeError(`${f}trace argument is not a trace object`);y.trace=c}if(y.parse(p,"file",n).success!==!0){s.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}let T={lines:b,lineNo:0,errors:s,strict:!!o};return y.ast.translate(T),b},"exfn"),"exfn")}}),h$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/syntax-callbacks.js"(e,t){t.exports=a(i(function(){let n="syntax-callbacks.js: ",s=tl(),o=s.ids,c,f=a(i(function($,k,F,he){switch($.state){case o.ACTIVE:he.altStack=[],he.repCount=0;break;case o.EMPTY:he.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case o.MATCH:he.ruleCount===0&&he.errors.push({line:0,char:0,msg:"no rules defined"});break;case o.NOMATCH:throw new Error(`${n}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${n}synFile: unrecognized case.`)}},"synFile2"),"synFile"),h=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.altStack.length=0,c={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;case o.EMPTY:throw new Error(`${n}synRule: EMPTY: rule cannot be empty`);case o.NOMATCH:break;case o.MATCH:F.ruleCount+=1;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRule"),p=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRuleError"),v=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRuleNameError"),b=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synDefinedAsError"),y=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAndOp"),_=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synNotOp"),T=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Positive look-behind operator(&&) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBkaOp"),O=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Negative look-behind operator(!!) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBknOp"),R=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Beginning of string anchor(%^) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAbgOp"),P=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"End of string anchor(%$) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAenOp"),K=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(F.strict){let he=s.utils.charsToString($,k,B.phraseLength);F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`Back reference operator(${he}) found - strict ABNF specified.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBkrOp"),U=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(F.strict){let he=s.utils.charsToString($,k,B.phraseLength);F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`UDT operator found(${he}) - strict ABNF specified.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synUdtOp"),j=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.tlsOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsOpen"),V=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsString"),G=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synStringTab"),I=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.tlsOpen),char:c.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),c.basicError=!0,c.tlsOpen=null;break;case o.MATCH:c.tlsOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsClose"),H=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.clsOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsOpen"),se=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsString"),ue=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.clsOpen),char:c.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),c.clsOpen=null,c.basicError=!0;break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,c.clsOpen),char:c.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),c.clsOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsClose"),me=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.prosValOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValOpen"),q=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValString"),w=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.prosValOpen),char:c.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),c.basicError=!0,c.prosValOpen=null;break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,c.prosValOpen),char:c.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),c.prosValOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValClose"),x=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c={groupOpen:k,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synGroupOpen"),m=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.groupOpen),char:c.groupOpen,msg:'Group "(...)" opened but not closed.'}),c=F.altStack.pop(),c.groupError=!0;break;case o.MATCH:c=F.altStack.pop();break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synGroupClose"),d=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c={groupOpen:null,groupError:!1,optionOpen:k,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synOptionOpen"),g=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.optionOpen),char:c.optionOpen,msg:'Option "[...]" opened but not closed.'}),c=F.altStack.pop(),c.optionError=!0;break;case o.MATCH:c=F.altStack.pop();break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synOptionClose"),S=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.basicError===!1&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBasicElementError"),D=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(B.phraseLength===1&&F.strict){let he=$[k]===13?"CR":"LF";F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`Line end '${he}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synLineEnd"),C=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synLineEndError"),E=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.repCount+=1;break;case o.MATCH:F.repCount+=1;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRepetition");this.callbacks=[],this.callbacks.andop=y,this.callbacks.basicelementerr=S,this.callbacks.clsclose=ue,this.callbacks.clsopen=H,this.callbacks.clsstring=se,this.callbacks.definedaserror=b,this.callbacks.file=f,this.callbacks.groupclose=m,this.callbacks.groupopen=x,this.callbacks.lineenderror=C,this.callbacks.lineend=D,this.callbacks.notop=_,this.callbacks.optionclose=g,this.callbacks.optionopen=d,this.callbacks.prosvalclose=w,this.callbacks.prosvalopen=me,this.callbacks.prosvalstring=q,this.callbacks.repetition=E,this.callbacks.rule=h,this.callbacks.ruleerror=p,this.callbacks.rulenameerror=v,this.callbacks.stringtab=G,this.callbacks.tlsclose=I,this.callbacks.tlsopen=j,this.callbacks.tlsstring=V,this.callbacks.udtop=U,this.callbacks.bkaop=T,this.callbacks.bknop=O,this.callbacks.bkrop=K,this.callbacks.abgop=R,this.callbacks.aenop=P},"exfn"),"exfn")}}),p$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/semantic-callbacks.js"(e,t){t.exports=a(i(function(){let n=tl(),s=n.ids,o=a(i(function(){this.names=[],this.add=a(i(function(pe){let we=-1;return this.get(pe)===-1&&(we={name:pe,lower:pe.toLowerCase(),index:this.names.length},this.names.push(we)),we},"add3"),"add"),this.get=a(i(function(pe){let we=-1,Q=pe.toLowerCase();for(let ve=0;ve<this.names.length;ve+=1)if(this.names[ve].lower===Q){we=this.names[ve];break}return we},"get2"),"get")},"NameList2"),"NameList"),c=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1)Q=10*Q+Ce[ve]-48;return Q},"decnum2"),"decnum"),f=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1)Q=2*Q+Ce[ve]-48;return Q},"binnum2"),"binnum"),h=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1){let Me=Ce[ve];if(Me>=48&&Me<=57)Me-=48;else if(Me>=65&&Me<=70)Me-=55;else if(Me>=97&&Me<=102)Me-=87;else throw new Error("hexnum out of range");Q=16*Q+Me}return Q},"hexnum2"),"hexnum");function p(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)Q.ruleNames=new o,Q.udtNames=new o,Q.rules=[],Q.udts=[],Q.rulesLineMap=[],Q.opcodes=[],Q.altStack=[],Q.topStack=null,Q.topRule=null;else if(fe===s.SEM_POST){let Me;Q.rules.forEach(Ue=>{Ue.isBkr=!1,Ue.opcodes.forEach(Re=>{Re.type===s.RNM&&(Me=Q.ruleNames.get(Re.index.name),Me===-1?(Q.errors.push({line:Q.findLine(Q.lines,Re.index.phraseIndex,Q.charsLength),char:Re.index.phraseIndex,msg:`Rule name '${Re.index.name}' used but not defined.`}),Re.index=-1):Re.index=Me.index)})}),Q.udts.forEach(Ue=>{Ue.isBkr=!1}),Q.rules.forEach(Ue=>{Ue.opcodes.forEach(Re=>{Re.type===s.BKR&&(Ue.hasBkr=!0,Me=Q.ruleNames.get(Re.index.name),Me!==-1?(Q.rules[Me.index].isBkr=!0,Re.index=Me.index):(Me=Q.udtNames.get(Re.index.name),Me!==-1?(Q.udts[Me.index].isBkr=!0,Re.index=Q.rules.length+Me.index):(Q.errors.push({line:Q.findLine(Q.lines,Re.index.phraseIndex,Q.charsLength),char:Re.index.phraseIndex,msg:`Back reference name '${Re.index.name}' refers to undefined rule or unamed UDT.`}),Re.index=-1)))})})}return ve}i(p,"semFile"),a(p,"semFile");function v(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.altStack.length=0,Q.topStack=null,Q.rulesLineMap.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe})),ve}i(v,"semRule"),a(v,"semRule");function b(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)Q.ruleName="",Q.definedas="";else if(fe===s.SEM_POST){let Me;Q.definedas==="="?(Me=Q.ruleNames.add(Q.ruleName),Me===-1?(Q.definedas=null,Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`Rule name '${Q.ruleName}' previously defined.`})):(Q.topRule={name:Me.name,lower:Me.lower,opcodes:[],index:Me.index},Q.rules.push(Q.topRule),Q.opcodes=Q.topRule.opcodes)):(Me=Q.ruleNames.get(Q.ruleName),Me===-1?(Q.definedas=null,Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`Rule name '${Q.ruleName}' for incremental alternate not previously defined.`})):(Q.topRule=Q.rules[Me.index],Q.opcodes=Q.topRule.opcodes))}return ve}i(b,"semRuleLookup"),a(b,"semRuleLookup");function y(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)for(;;){if(Q.definedas===null){ve=s.SEM_SKIP;break}if(Q.topStack===null){if(Q.definedas==="="){Q.topStack={alt:{type:s.ALT,children:[]},cat:null},Q.altStack.push(Q.topStack),Q.opcodes.push(Q.topStack.alt);break}Q.topStack={alt:Q.opcodes[0],cat:null},Q.altStack.push(Q.topStack);break}Q.topStack={alt:{type:s.ALT,children:[]},cat:null},Q.altStack.push(Q.topStack),Q.opcodes.push(Q.topStack.alt);break}else fe===s.SEM_POST&&(Q.altStack.pop(),Q.altStack.length>0?Q.topStack=Q.altStack[Q.altStack.length-1]:Q.topStack=null);return ve}i(y,"semAlternation"),a(y,"semAlternation");function _(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.topStack.alt.children.push(Q.opcodes.length),Q.topStack.cat={type:s.CAT,children:[]},Q.opcodes.push(Q.topStack.cat)):fe===s.SEM_POST&&(Q.topStack.cat=null),ve}i(_,"semConcatenation"),a(_,"semConcatenation");function T(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&Q.topStack.cat.children.push(Q.opcodes.length),ve}i(T,"semRepetition"),a(T,"semRepetition");function O(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.REP,min:0,max:1,char:pe}),ve}i(O,"semOptionOpen"),a(O,"semOptionOpen");function R(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.ruleName=n.utils.charsToString(Ce,pe,we)),ve}i(R,"semRuleName"),a(R,"semRuleName");function P(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.definedas="="),ve}i(P,"semDefined"),a(P,"semDefined");function K(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.definedas="=/"),ve}i(K,"semIncAlt"),a(K,"semIncAlt");function U(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.min=0,Q.max=1/0,Q.topRep={type:s.REP,min:0,max:1/0},Q.opcodes.push(Q.topRep)):fe===s.SEM_POST&&(Q.min>Q.max&&Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`repetition min cannot be greater than max: min: ${Q.min}: max: ${Q.max}`}),Q.topRep.min=Q.min,Q.topRep.max=Q.max),ve}i(U,"semRepOp"),a(U,"semRepOp");function j(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=c(Ce,pe,we)),ve}i(j,"semRepMin"),a(j,"semRepMin");function V(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we)),ve}i(V,"semRepMax"),a(V,"semRepMax");function G(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we),Q.min=Q.max),ve}i(G,"semRepMinMax"),a(G,"semRepMinMax");function I(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.AND}),ve}i(I,"semAndOp"),a(I,"semAndOp");function H(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.NOT}),ve}i(H,"semNotOp"),a(H,"semNotOp");function se(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.RNM,index:{phraseIndex:pe,name:n.utils.charsToString(Ce,pe,we)}}),ve}i(se,"semRnmOp"),a(se,"semRnmOp");function ue(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.ABG}),ve}i(ue,"semAbgOp"),a(ue,"semAbgOp");function me(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.AEN}),ve}i(me,"semAenOp"),a(me,"semAenOp");function q(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.BKA}),ve}i(q,"semBkaOp"),a(q,"semBkaOp");function w(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.BKN}),ve}i(w,"semBknOp"),a(w,"semBknOp");function x(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.ci=!0,Q.cs=!1,Q.um=!0,Q.pm=!1):fe===s.SEM_POST&&Q.opcodes.push({type:s.BKR,bkrCase:Q.cs===!0?s.BKR_MODE_CS:s.BKR_MODE_CI,bkrMode:Q.pm===!0?s.BKR_MODE_PM:s.BKR_MODE_UM,index:{phraseIndex:Q.bkrname.phraseIndex,name:n.utils.charsToString(Ce,Q.bkrname.phraseIndex,Q.bkrname.phraseLength)}}),ve}i(x,"semBkrOp"),a(x,"semBkrOp");function m(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.ci=!0),ve}i(m,"semBkrCi"),a(m,"semBkrCi");function d(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.cs=!0),ve}i(d,"semBkrCs"),a(d,"semBkrCs");function g(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.um=!0),ve}i(g,"semBkrUm"),a(g,"semBkrUm");function S(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.pm=!0),ve}i(S,"semBkrPm"),a(S,"semBkrPm");function D(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.bkrname={phraseIndex:pe,phraseLength:we}),ve}i(D,"semBkrName"),a(D,"semBkrName");function C(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST){let Me=n.utils.charsToString(Ce,pe,we),Ue=Q.udtNames.add(Me);if(Ue===-1){if(Ue=Q.udtNames.get(Me),Ue===-1)throw new Error("semUdtEmpty: name look up error")}else Q.udts.push({name:Ue.name,lower:Ue.lower,index:Ue.index,empty:!0});Q.opcodes.push({type:s.UDT,empty:!0,index:Ue.index})}return ve}i(C,"semUdtEmpty"),a(C,"semUdtEmpty");function E(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST){let Me=n.utils.charsToString(Ce,pe,we),Ue=Q.udtNames.add(Me);if(Ue===-1){if(Ue=Q.udtNames.get(Me),Ue===-1)throw new Error("semUdtNonEmpty: name look up error")}else Q.udts.push({name:Ue.name,lower:Ue.lower,index:Ue.index,empty:!1});Q.opcodes.push({type:s.UDT,empty:!1,index:Ue.index,syntax:null,semantic:null})}return ve}i(E,"semUdtNonEmpty"),a(E,"semUdtNonEmpty");function B(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.tlscase=!0),ve}i(B,"semTlsOp"),a(B,"semTlsOp");function $(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&we>0&&(Ce[pe+1]===83||Ce[pe+1]===115)&&(Q.tlscase=!1),ve}i($,"semTlsCase"),a($,"semTlsCase");function k(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST)if(Q.tlscase){let Me=Ce.slice(pe,pe+we);for(let Ue=0;Ue<Me.length;Ue+=1)Me[Ue]>=65&&Me[Ue]<=90&&(Me[Ue]+=32);Q.opcodes.push({type:s.TLS,string:Me})}else Q.opcodes.push({type:s.TBS,string:Ce.slice(pe,pe+we)});return ve}i(k,"semTlsString"),a(k,"semTlsString");function F(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(we<=2?Q.opcodes.push({type:s.TLS,string:[]}):Q.opcodes.push({type:s.TBS,string:Ce.slice(pe+1,pe+we-1)})),ve}i(F,"semClsOp"),a(F,"semClsOp");function he(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?Q.tbsstr=[]:fe===s.SEM_POST&&Q.opcodes.push({type:s.TBS,string:Q.tbsstr}),ve}i(he,"semTbsOp"),a(he,"semTbsOp");function N(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.min=0,Q.max=0):fe===s.SEM_POST&&(Q.min>Q.max&&Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${Q.min}: max: ${Q.max}`}),Q.opcodes.push({type:s.TRG,min:Q.min,max:Q.max})),ve}i(N,"semTrgOp"),a(N,"semTrgOp");function Y(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=c(Ce,pe,we)),ve}i(Y,"semDmin"),a(Y,"semDmin");function J(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we)),ve}i(J,"semDmax"),a(J,"semDmax");function M(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=f(Ce,pe,we)),ve}i(M,"semBmin"),a(M,"semBmin");function z(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=f(Ce,pe,we)),ve}i(z,"semBmax"),a(z,"semBmax");function te(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=h(Ce,pe,we)),ve}i(te,"semXmin"),a(te,"semXmin");function oe(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=h(Ce,pe,we)),ve}i(oe,"semXmax"),a(oe,"semXmax");function ge(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(c(Ce,pe,we)),ve}i(ge,"semDstring"),a(ge,"semDstring");function ke(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(f(Ce,pe,we)),ve}i(ke,"semBstring"),a(ke,"semBstring");function _e(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(h(Ce,pe,we)),ve}i(_e,"semXstring"),a(_e,"semXstring"),this.callbacks=[],this.callbacks.abgop=ue,this.callbacks.aenop=me,this.callbacks.alternation=y,this.callbacks.andop=I,this.callbacks.bmax=z,this.callbacks.bmin=M,this.callbacks.bkaop=q,this.callbacks.bknop=w,this.callbacks.bkrop=x,this.callbacks["bkr-name"]=D,this.callbacks.bstring=ke,this.callbacks.clsop=F,this.callbacks.ci=m,this.callbacks.cs=d,this.callbacks.um=g,this.callbacks.pm=S,this.callbacks.concatenation=_,this.callbacks.defined=P,this.callbacks.dmax=J,this.callbacks.dmin=Y,this.callbacks.dstring=ge,this.callbacks.file=p,this.callbacks.incalt=K,this.callbacks.notop=H,this.callbacks.optionopen=O,this.callbacks["rep-max"]=V,this.callbacks["rep-min"]=j,this.callbacks["rep-min-max"]=G,this.callbacks.repetition=T,this.callbacks.repop=U,this.callbacks.rnmop=se,this.callbacks.rule=v,this.callbacks.rulelookup=b,this.callbacks.rulename=R,this.callbacks.tbsop=he,this.callbacks.tlscase=$,this.callbacks.tlsstring=k,this.callbacks.tlsop=B,this.callbacks.trgop=N,this.callbacks["udt-empty"]=C,this.callbacks["udt-non-empty"]=E,this.callbacks.xmax=oe,this.callbacks.xmin=te,this.callbacks.xstring=_e},"exfn"),"exfn")}}),m$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/sabnf-grammar.js"(e,t){t.exports=a(i(function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=a(i(function(){let s="";return s+=`;
|
|
388
|
+
`,s},"toString4"),"toString")},"grammar"),"grammar")}}),f$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/scanner-callbacks.js"(e){var t=Hs(),r=el();function n(y,_,T,O,R){return y===t.SEM_PRE?(R.endLength=0,R.textLength=0,R.invalidCount=0):R.lines.push({lineNo:R.lines.length,beginChar:T,length:O,textLength:R.textLength,endType:R.endType,invalidChars:R.invalidCount}),t.SEM_OK}i(n,"semLine"),a(n,"semLine");function s(y,_,T,O,R){return y===t.SEM_PRE&&(R.textLength=O),t.SEM_OK}i(s,"semLineText"),a(s,"semLineText");function o(y,_,T,O,R){return y===t.SEM_PRE?(R.endLength=0,R.textLength=0,R.invalidCount=0):R.strict?(R.lines.push({lineNo:R.lines.length,beginChar:T,length:O,textLength:O,endType:"none",invalidChars:R.invalidCount}),R.errors.push({line:R.lineNo,char:T+O,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(_.push(10),R.lines.push({lineNo:R.lines.length,beginChar:T,length:O+1,textLength:O,endType:"LF",invalidChars:R.invalidCount})),t.SEM_OK}i(o,"semLastLine"),a(o,"semLastLine");function c(y,_,T,O,R){return y===t.SEM_PRE&&R.errors.push({line:R.lineNo,char:T,msg:`invalid character found '\\x${r.charToHex(_[T])}'`}),t.SEM_OK}i(c,"semInvalid"),a(c,"semInvalid");function f(y,_,T,O,R){return y===t.SEM_POST&&(R.lineNo+=1),t.SEM_OK}i(f,"semEnd"),a(f,"semEnd");function h(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="LF",R.strict&&R.errors.push({line:R.lineNo,char:T,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),t.SEM_OK}i(h,"semLF"),a(h,"semLF");function p(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="CR",R.strict&&R.errors.push({line:R.lineNo,char:T,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),t.SEM_OK}i(p,"semCR"),a(p,"semCR");function v(y,_,T,O,R){return y===t.SEM_PRE&&(R.endType="CRLF"),t.SEM_OK}i(v,"semCRLF"),a(v,"semCRLF");var b=[];b.line=n,b["line-text"]=s,b["last-line"]=o,b.invalid=c,b.end=f,b.lf=h,b.cr=p,b.crlf=v,e.callbacks=b}}),d$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/scanner.js"(e,t){t.exports=a(i(function(n,s,o,c){let f="scanner.js: ",h=tl(),p=new(l$()),{callbacks:v}=f$(),b=[],y=new h.parser;if(y.ast=new h.ast,y.ast.callbacks=v,c){if(c.traceObject!=="traceObject")throw new TypeError(`${f}trace argument is not a trace object`);y.trace=c}if(y.parse(p,"file",n).success!==!0){s.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});return}let T={lines:b,lineNo:0,errors:s,strict:!!o};return y.ast.translate(T),b},"exfn"),"exfn")}}),h$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/syntax-callbacks.js"(e,t){t.exports=a(i(function(){let n="syntax-callbacks.js: ",s=tl(),o=s.ids,c,f=a(i(function($,k,F,he){switch($.state){case o.ACTIVE:he.altStack=[],he.repCount=0;break;case o.EMPTY:he.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case o.MATCH:he.ruleCount===0&&he.errors.push({line:0,char:0,msg:"no rules defined"});break;case o.NOMATCH:throw new Error(`${n}synFile: grammar file NOMATCH: design error: should never happen.`);default:throw new Error(`${n}synFile: unrecognized case.`)}},"synFile2"),"synFile"),h=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.altStack.length=0,c={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;case o.EMPTY:throw new Error(`${n}synRule: EMPTY: rule cannot be empty`);case o.NOMATCH:break;case o.MATCH:F.ruleCount+=1;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRule"),p=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRuleError"),v=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Rule names must be alphanum and begin with alphabetic character."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRuleNameError"),b=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Expected '=' or '=/'. Not found."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synDefinedAsError"),y=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"AND operator(&) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAndOp"),_=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"NOT operator(!) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synNotOp"),T=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Positive look-behind operator(&&) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBkaOp"),O=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Negative look-behind operator(!!) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBknOp"),R=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Beginning of string anchor(%^) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAbgOp"),P=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"End of string anchor(%$) found - strict ABNF specified."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synAenOp"),K=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(F.strict){let he=s.utils.charsToString($,k,B.phraseLength);F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`Back reference operator(${he}) found - strict ABNF specified.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBkrOp"),U=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(F.strict){let he=s.utils.charsToString($,k,B.phraseLength);F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`UDT operator found(${he}) - strict ABNF specified.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synUdtOp"),j=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.tlsOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsOpen"),V=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsString"),G=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synStringTab"),I=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.tlsOpen),char:c.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),c.basicError=!0,c.tlsOpen=null;break;case o.MATCH:c.tlsOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synTlsClose"),H=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.clsOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsOpen"),se=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsString"),ue=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.clsOpen),char:c.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),c.clsOpen=null,c.basicError=!0;break;case o.MATCH:F.strict&&F.errors.push({line:F.findLine(F.lines,c.clsOpen),char:c.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),c.clsOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synClsClose"),me=a(function(B,$,k){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.prosValOpen=k;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValOpen"),q=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:F.stringTabChar=!1;break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.stringTabChar!==!1&&F.errors.push({line:F.findLine(F.lines,F.stringTabChar),char:F.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValString"),w=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.prosValOpen),char:c.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),c.basicError=!0,c.prosValOpen=null;break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,c.prosValOpen),char:c.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),c.prosValOpen=null;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synProsValClose"),x=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c={groupOpen:k,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synGroupOpen"),m=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.groupOpen),char:c.groupOpen,msg:'Group "(...)" opened but not closed.'}),c=F.altStack.pop(),c.groupError=!0;break;case o.MATCH:c=F.altStack.pop();break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synGroupClose"),d=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c={groupOpen:null,groupError:!1,optionOpen:k,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},F.altStack.push(c);break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synOptionOpen"),g=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.errors.push({line:F.findLine(F.lines,c.optionOpen),char:c.optionOpen,msg:'Option "[...]" opened but not closed.'}),c=F.altStack.pop(),c.optionError=!0;break;case o.MATCH:c=F.altStack.pop();break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synOptionClose"),S=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:c.basicError===!1&&F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized SABNF element."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synBasicElementError"),D=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:if(B.phraseLength===1&&F.strict){let he=$[k]===13?"CR":"LF";F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:`Line end '${he}' found - strict ABNF specified, only CRLF allowed.`})}break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synLineEnd"),C=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:break;case o.MATCH:F.errors.push({line:F.findLine(F.lines,k,F.charsLength),char:k,msg:"Unrecognized grammar element or characters."});break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synLineEndError"),E=a(function(B,$,k,F){switch(B.state){case o.ACTIVE:break;case o.EMPTY:break;case o.NOMATCH:F.repCount+=1;break;case o.MATCH:F.repCount+=1;break;default:throw new Error(`${n}synFile: unrecognized case.`)}},"synRepetition");this.callbacks=[],this.callbacks.andop=y,this.callbacks.basicelementerr=S,this.callbacks.clsclose=ue,this.callbacks.clsopen=H,this.callbacks.clsstring=se,this.callbacks.definedaserror=b,this.callbacks.file=f,this.callbacks.groupclose=m,this.callbacks.groupopen=x,this.callbacks.lineenderror=C,this.callbacks.lineend=D,this.callbacks.notop=_,this.callbacks.optionclose=g,this.callbacks.optionopen=d,this.callbacks.prosvalclose=w,this.callbacks.prosvalopen=me,this.callbacks.prosvalstring=q,this.callbacks.repetition=E,this.callbacks.rule=h,this.callbacks.ruleerror=p,this.callbacks.rulenameerror=v,this.callbacks.stringtab=G,this.callbacks.tlsclose=I,this.callbacks.tlsopen=j,this.callbacks.tlsstring=V,this.callbacks.udtop=U,this.callbacks.bkaop=T,this.callbacks.bknop=O,this.callbacks.bkrop=K,this.callbacks.abgop=R,this.callbacks.aenop=P},"exfn"),"exfn")}}),p$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/semantic-callbacks.js"(e,t){t.exports=a(i(function(){let n=tl(),s=n.ids,o=a(i(function(){this.names=[],this.add=a(i(function(pe){let we=-1;return this.get(pe)===-1&&(we={name:pe,lower:pe.toLowerCase(),index:this.names.length},this.names.push(we)),we},"add3"),"add"),this.get=a(i(function(pe){let we=-1,Q=pe.toLowerCase();for(let ve=0;ve<this.names.length;ve+=1)if(this.names[ve].lower===Q){we=this.names[ve];break}return we},"get2"),"get")},"NameList2"),"NameList"),c=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1)Q=10*Q+Ce[ve]-48;return Q},"decnum2"),"decnum"),f=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1)Q=2*Q+Ce[ve]-48;return Q},"binnum2"),"binnum"),h=a(i(function(Ce,pe,we){let Q=0;for(let ve=pe;ve<pe+we;ve+=1){let Me=Ce[ve];if(Me>=48&&Me<=57)Me-=48;else if(Me>=65&&Me<=70)Me-=55;else if(Me>=97&&Me<=102)Me-=87;else throw new Error("hexnum out of range");Q=16*Q+Me}return Q},"hexnum2"),"hexnum");function p(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)Q.ruleNames=new o,Q.udtNames=new o,Q.rules=[],Q.udts=[],Q.rulesLineMap=[],Q.opcodes=[],Q.altStack=[],Q.topStack=null,Q.topRule=null;else if(fe===s.SEM_POST){let Me;Q.rules.forEach(Ue=>{Ue.isBkr=!1,Ue.opcodes.forEach(Re=>{Re.type===s.RNM&&(Me=Q.ruleNames.get(Re.index.name),Me===-1?(Q.errors.push({line:Q.findLine(Q.lines,Re.index.phraseIndex,Q.charsLength),char:Re.index.phraseIndex,msg:`Rule name '${Re.index.name}' used but not defined.`}),Re.index=-1):Re.index=Me.index)})}),Q.udts.forEach(Ue=>{Ue.isBkr=!1}),Q.rules.forEach(Ue=>{Ue.opcodes.forEach(Re=>{Re.type===s.BKR&&(Ue.hasBkr=!0,Me=Q.ruleNames.get(Re.index.name),Me!==-1?(Q.rules[Me.index].isBkr=!0,Re.index=Me.index):(Me=Q.udtNames.get(Re.index.name),Me!==-1?(Q.udts[Me.index].isBkr=!0,Re.index=Q.rules.length+Me.index):(Q.errors.push({line:Q.findLine(Q.lines,Re.index.phraseIndex,Q.charsLength),char:Re.index.phraseIndex,msg:`Back reference name '${Re.index.name}' refers to undefined rule or unamed UDT.`}),Re.index=-1)))})})}return ve}i(p,"semFile"),a(p,"semFile");function v(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.altStack.length=0,Q.topStack=null,Q.rulesLineMap.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe})),ve}i(v,"semRule"),a(v,"semRule");function b(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)Q.ruleName="",Q.definedas="";else if(fe===s.SEM_POST){let Me;Q.definedas==="="?(Me=Q.ruleNames.add(Q.ruleName),Me===-1?(Q.definedas=null,Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`Rule name '${Q.ruleName}' previously defined.`})):(Q.topRule={name:Me.name,lower:Me.lower,opcodes:[],index:Me.index},Q.rules.push(Q.topRule),Q.opcodes=Q.topRule.opcodes)):(Me=Q.ruleNames.get(Q.ruleName),Me===-1?(Q.definedas=null,Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`Rule name '${Q.ruleName}' for incremental alternate not previously defined.`})):(Q.topRule=Q.rules[Me.index],Q.opcodes=Q.topRule.opcodes))}return ve}i(b,"semRuleLookup"),a(b,"semRuleLookup");function y(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_PRE)for(;;){if(Q.definedas===null){ve=s.SEM_SKIP;break}if(Q.topStack===null){if(Q.definedas==="="){Q.topStack={alt:{type:s.ALT,children:[]},cat:null},Q.altStack.push(Q.topStack),Q.opcodes.push(Q.topStack.alt);break}Q.topStack={alt:Q.opcodes[0],cat:null},Q.altStack.push(Q.topStack);break}Q.topStack={alt:{type:s.ALT,children:[]},cat:null},Q.altStack.push(Q.topStack),Q.opcodes.push(Q.topStack.alt);break}else fe===s.SEM_POST&&(Q.altStack.pop(),Q.altStack.length>0?Q.topStack=Q.altStack[Q.altStack.length-1]:Q.topStack=null);return ve}i(y,"semAlternation"),a(y,"semAlternation");function _(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.topStack.alt.children.push(Q.opcodes.length),Q.topStack.cat={type:s.CAT,children:[]},Q.opcodes.push(Q.topStack.cat)):fe===s.SEM_POST&&(Q.topStack.cat=null),ve}i(_,"semConcatenation"),a(_,"semConcatenation");function T(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&Q.topStack.cat.children.push(Q.opcodes.length),ve}i(T,"semRepetition"),a(T,"semRepetition");function O(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.REP,min:0,max:1,char:pe}),ve}i(O,"semOptionOpen"),a(O,"semOptionOpen");function R(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.ruleName=n.utils.charsToString(Ce,pe,we)),ve}i(R,"semRuleName"),a(R,"semRuleName");function P(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.definedas="="),ve}i(P,"semDefined"),a(P,"semDefined");function K(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.definedas="=/"),ve}i(K,"semIncAlt"),a(K,"semIncAlt");function U(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.min=0,Q.max=1/0,Q.topRep={type:s.REP,min:0,max:1/0},Q.opcodes.push(Q.topRep)):fe===s.SEM_POST&&(Q.min>Q.max&&Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`repetition min cannot be greater than max: min: ${Q.min}: max: ${Q.max}`}),Q.topRep.min=Q.min,Q.topRep.max=Q.max),ve}i(U,"semRepOp"),a(U,"semRepOp");function j(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=c(Ce,pe,we)),ve}i(j,"semRepMin"),a(j,"semRepMin");function V(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we)),ve}i(V,"semRepMax"),a(V,"semRepMax");function G(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we),Q.min=Q.max),ve}i(G,"semRepMinMax"),a(G,"semRepMinMax");function I(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.AND}),ve}i(I,"semAndOp"),a(I,"semAndOp");function H(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.NOT}),ve}i(H,"semNotOp"),a(H,"semNotOp");function se(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.RNM,index:{phraseIndex:pe,name:n.utils.charsToString(Ce,pe,we)}}),ve}i(se,"semRnmOp"),a(se,"semRnmOp");function ue(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.ABG}),ve}i(ue,"semAbgOp"),a(ue,"semAbgOp");function me(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.AEN}),ve}i(me,"semAenOp"),a(me,"semAenOp");function q(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.BKA}),ve}i(q,"semBkaOp"),a(q,"semBkaOp");function w(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.opcodes.push({type:s.BKN}),ve}i(w,"semBknOp"),a(w,"semBknOp");function x(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.ci=!0,Q.cs=!1,Q.um=!0,Q.pm=!1):fe===s.SEM_POST&&Q.opcodes.push({type:s.BKR,bkrCase:Q.cs===!0?s.BKR_MODE_CS:s.BKR_MODE_CI,bkrMode:Q.pm===!0?s.BKR_MODE_PM:s.BKR_MODE_UM,index:{phraseIndex:Q.bkrname.phraseIndex,name:n.utils.charsToString(Ce,Q.bkrname.phraseIndex,Q.bkrname.phraseLength)}}),ve}i(x,"semBkrOp"),a(x,"semBkrOp");function m(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.ci=!0),ve}i(m,"semBkrCi"),a(m,"semBkrCi");function d(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.cs=!0),ve}i(d,"semBkrCs"),a(d,"semBkrCs");function g(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.um=!0),ve}i(g,"semBkrUm"),a(g,"semBkrUm");function S(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.pm=!0),ve}i(S,"semBkrPm"),a(S,"semBkrPm");function D(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.bkrname={phraseIndex:pe,phraseLength:we}),ve}i(D,"semBkrName"),a(D,"semBkrName");function C(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST){let Me=n.utils.charsToString(Ce,pe,we),Ue=Q.udtNames.add(Me);if(Ue===-1){if(Ue=Q.udtNames.get(Me),Ue===-1)throw new Error("semUdtEmpty: name look up error")}else Q.udts.push({name:Ue.name,lower:Ue.lower,index:Ue.index,empty:!0});Q.opcodes.push({type:s.UDT,empty:!0,index:Ue.index})}return ve}i(C,"semUdtEmpty"),a(C,"semUdtEmpty");function E(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST){let Me=n.utils.charsToString(Ce,pe,we),Ue=Q.udtNames.add(Me);if(Ue===-1){if(Ue=Q.udtNames.get(Me),Ue===-1)throw new Error("semUdtNonEmpty: name look up error")}else Q.udts.push({name:Ue.name,lower:Ue.lower,index:Ue.index,empty:!1});Q.opcodes.push({type:s.UDT,empty:!1,index:Ue.index,syntax:null,semantic:null})}return ve}i(E,"semUdtNonEmpty"),a(E,"semUdtNonEmpty");function B(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE&&(Q.tlscase=!0),ve}i(B,"semTlsOp"),a(B,"semTlsOp");function $(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&we>0&&(Ce[pe+1]===83||Ce[pe+1]===115)&&(Q.tlscase=!1),ve}i($,"semTlsCase"),a($,"semTlsCase");function k(fe,Ce,pe,we,Q){let ve=s.SEM_OK;if(fe===s.SEM_POST)if(Q.tlscase){let Me=Ce.slice(pe,pe+we);for(let Ue=0;Ue<Me.length;Ue+=1)Me[Ue]>=65&&Me[Ue]<=90&&(Me[Ue]+=32);Q.opcodes.push({type:s.TLS,string:Me})}else Q.opcodes.push({type:s.TBS,string:Ce.slice(pe,pe+we)});return ve}i(k,"semTlsString"),a(k,"semTlsString");function F(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(we<=2?Q.opcodes.push({type:s.TLS,string:[]}):Q.opcodes.push({type:s.TBS,string:Ce.slice(pe+1,pe+we-1)})),ve}i(F,"semClsOp"),a(F,"semClsOp");function he(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?Q.tbsstr=[]:fe===s.SEM_POST&&Q.opcodes.push({type:s.TBS,string:Q.tbsstr}),ve}i(he,"semTbsOp"),a(he,"semTbsOp");function N(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_PRE?(Q.min=0,Q.max=0):fe===s.SEM_POST&&(Q.min>Q.max&&Q.errors.push({line:Q.findLine(Q.lines,pe,Q.charsLength),char:pe,msg:`TRG, (%dmin-max), min cannot be greater than max: min: ${Q.min}: max: ${Q.max}`}),Q.opcodes.push({type:s.TRG,min:Q.min,max:Q.max})),ve}i(N,"semTrgOp"),a(N,"semTrgOp");function Y(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=c(Ce,pe,we)),ve}i(Y,"semDmin"),a(Y,"semDmin");function J(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=c(Ce,pe,we)),ve}i(J,"semDmax"),a(J,"semDmax");function M(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=f(Ce,pe,we)),ve}i(M,"semBmin"),a(M,"semBmin");function z(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=f(Ce,pe,we)),ve}i(z,"semBmax"),a(z,"semBmax");function re(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.min=h(Ce,pe,we)),ve}i(re,"semXmin"),a(re,"semXmin");function oe(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&(Q.max=h(Ce,pe,we)),ve}i(oe,"semXmax"),a(oe,"semXmax");function ge(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(c(Ce,pe,we)),ve}i(ge,"semDstring"),a(ge,"semDstring");function ke(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(f(Ce,pe,we)),ve}i(ke,"semBstring"),a(ke,"semBstring");function _e(fe,Ce,pe,we,Q){let ve=s.SEM_OK;return fe===s.SEM_POST&&Q.tbsstr.push(h(Ce,pe,we)),ve}i(_e,"semXstring"),a(_e,"semXstring"),this.callbacks=[],this.callbacks.abgop=ue,this.callbacks.aenop=me,this.callbacks.alternation=y,this.callbacks.andop=I,this.callbacks.bmax=z,this.callbacks.bmin=M,this.callbacks.bkaop=q,this.callbacks.bknop=w,this.callbacks.bkrop=x,this.callbacks["bkr-name"]=D,this.callbacks.bstring=ke,this.callbacks.clsop=F,this.callbacks.ci=m,this.callbacks.cs=d,this.callbacks.um=g,this.callbacks.pm=S,this.callbacks.concatenation=_,this.callbacks.defined=P,this.callbacks.dmax=J,this.callbacks.dmin=Y,this.callbacks.dstring=ge,this.callbacks.file=p,this.callbacks.incalt=K,this.callbacks.notop=H,this.callbacks.optionopen=O,this.callbacks["rep-max"]=V,this.callbacks["rep-min"]=j,this.callbacks["rep-min-max"]=G,this.callbacks.repetition=T,this.callbacks.repop=U,this.callbacks.rnmop=se,this.callbacks.rule=v,this.callbacks.rulelookup=b,this.callbacks.rulename=R,this.callbacks.tbsop=he,this.callbacks.tlscase=$,this.callbacks.tlsstring=k,this.callbacks.tlsop=B,this.callbacks.trgop=N,this.callbacks["udt-empty"]=C,this.callbacks["udt-non-empty"]=E,this.callbacks.xmax=oe,this.callbacks.xmin=re,this.callbacks.xstring=_e},"exfn"),"exfn")}}),m$=ze({"../../../node_modules/.pnpm/apg-js@4.1.3/node_modules/apg-js/src/apg-api/sabnf-grammar.js"(e,t){t.exports=a(i(function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43},this.rules[17].opcodes[5]={type:4,index:43},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]},this.rules[54].opcodes[8]={type:6,string:[46]},this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=a(i(function(){let s="";return s+=`;
|
|
389
389
|
`,s+=`; ABNF for JavaScript APG 2.0 SABNF
|
|
390
390
|
`,s+=`; RFC 5234 with some restrictions and additions.
|
|
391
391
|
`,s+=`; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation
|
|
@@ -598,21 +598,21 @@ table.apg-attrs a:hover {
|
|
|
598
598
|
`,R.forEach((J,M)=>{M>0&&(U+=`
|
|
599
599
|
`),U+=` /* ${J.name} */
|
|
600
600
|
`,U+=` this.rules[${M}].opcodes = [];
|
|
601
|
-
`,J.opcodes.forEach((z,
|
|
602
|
-
`;break;case o.CAT:U+=` this.rules[${M}].opcodes[${
|
|
603
|
-
`;break;case o.RNM:U+=` this.rules[${M}].opcodes[${
|
|
604
|
-
`;break;case o.BKR:z.index>=R.length?(V=P[z.index-R.length].name,G=P[z.index-R.length].lower):(V=R[z.index].name,G=R[z.index].lower),oe="%i",z.bkrCase===o.BKR_MODE_CS&&(oe="%s"),z.bkrMode===o.BKR_MODE_UM?oe+="%u":oe+="%p",V=oe+V,U+=` this.rules[${M}].opcodes[${
|
|
605
|
-
`;break;case o.UDT:U+=` this.rules[${M}].opcodes[${
|
|
606
|
-
`;break;case o.REP:U+=` this.rules[${M}].opcodes[${
|
|
607
|
-
`;break;case o.AND:U+=` this.rules[${M}].opcodes[${
|
|
608
|
-
`;break;case o.NOT:U+=` this.rules[${M}].opcodes[${
|
|
609
|
-
`;break;case o.ABG:U+=` this.rules[${M}].opcodes[${
|
|
610
|
-
`;break;case o.AEN:U+=` this.rules[${M}].opcodes[${
|
|
611
|
-
`;break;case o.BKA:U+=` this.rules[${M}].opcodes[${
|
|
612
|
-
`;break;case o.BKN:U+=` this.rules[${M}].opcodes[${
|
|
613
|
-
`;break;case o.TLS:U+=` this.rules[${M}].opcodes[${
|
|
614
|
-
`;break;case o.TBS:U+=` this.rules[${M}].opcodes[${
|
|
615
|
-
`;break;case o.TRG:U+=` this.rules[${M}].opcodes[${
|
|
601
|
+
`,J.opcodes.forEach((z,re)=>{let oe;switch(z.type){case o.ALT:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, children: [${z.children.toString()}]};// ALT
|
|
602
|
+
`;break;case o.CAT:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, children: [${z.children.toString()}]};// CAT
|
|
603
|
+
`;break;case o.RNM:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, index: ${z.index}};// RNM(${R[z.index].name})
|
|
604
|
+
`;break;case o.BKR:z.index>=R.length?(V=P[z.index-R.length].name,G=P[z.index-R.length].lower):(V=R[z.index].name,G=R[z.index].lower),oe="%i",z.bkrCase===o.BKR_MODE_CS&&(oe="%s"),z.bkrMode===o.BKR_MODE_UM?oe+="%u":oe+="%p",V=oe+V,U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, index: ${z.index}, lower: '${G}', bkrCase: ${z.bkrCase}, bkrMode: ${z.bkrMode}};// BKR(\\${V})
|
|
605
|
+
`;break;case o.UDT:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, empty: ${z.empty}, index: ${z.index}};// UDT(${P[z.index].name})
|
|
606
|
+
`;break;case o.REP:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, min: ${z.min}, max: ${z.max}};// REP
|
|
607
|
+
`;break;case o.AND:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// AND
|
|
608
|
+
`;break;case o.NOT:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// NOT
|
|
609
|
+
`;break;case o.ABG:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// ABG(%^)
|
|
610
|
+
`;break;case o.AEN:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// AEN(%$)
|
|
611
|
+
`;break;case o.BKA:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// BKA
|
|
612
|
+
`;break;case o.BKN:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}};// BKN
|
|
613
|
+
`;break;case o.TLS:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, string: [${z.string.toString()}]};// TLS
|
|
614
|
+
`;break;case o.TBS:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, string: [${z.string.toString()}]};// TBS
|
|
615
|
+
`;break;case o.TRG:U+=` this.rules[${M}].opcodes[${re}] = {type: ${z.type}, min: ${z.min}, max: ${z.max}};// TRG
|
|
616
616
|
`;break;default:throw new Error("parser.js: ~143: unrecognized opcode")}})}),U+=`
|
|
617
617
|
`,U+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",U+=` this.toString = function toString(){
|
|
618
618
|
`,U+=` let str = "";
|
|
@@ -665,7 +665,7 @@ ${P}${K}`,y=R.length);b===0&&(R+=`<= <none>
|
|
|
665
665
|
`)}),g+=`</table></p>
|
|
666
666
|
`,g},"errorsToHtml2"),"errorsToHtml"),j=a(i(function(q,w,x){let m,d,g,S;return m="",q.forEach(D=>{d=w[D.line],m+=`${d.lineNo}: `,m+=`${d.beginChar}: `,m+=`${D.char-d.beginChar}: `,g=d.beginChar,S=D.char-d.beginChar,m+=R(x,g,S),m+=" >> ",g=D.char,S=d.beginChar+d.length-D.char,m+=R(x,g,S),m+=`
|
|
667
667
|
`,m+=`${d.lineNo}: `,m+=`${d.beginChar}: `,m+=`${D.char-d.beginChar}: `,m+="error: ",m+=D.msg,m+=`
|
|
668
|
-
`}),m},"errorsToAscii2"),"errorsToAscii"),V=!1,G=!1,I=!1,H=!1,se=0,ue;if(this.errors=[],Buffer.isBuffer(n))this.chars=f.decode("BINARY",n);else if(Array.isArray(n))this.chars=n.slice();else if(typeof n=="string")this.chars=f.decode("STRING",n);else throw new Error(`${s}input source is not a string, byte Buffer or character array`);this.sabnf=f.encode("STRING",this.chars),this.scan=a(i(function(q,w){this.lines=h(this.chars,this.errors,q,w),V=!0},"scan"),"scan"),this.parse=a(i(function(q,w){if(!V)throw new Error(`${s}grammar not scanned`);p.syntax(this.chars,this.lines,this.errors,q,w),G=!0},"parse3"),"parse"),this.translate=a(i(function(){if(!G)throw new Error(`${s}grammar not scanned and parsed`);let q=p.semantic(this.chars,this.lines,this.errors);this.errors.length===0&&(this.rules=q.rules,this.udts=q.udts,ue=q.lineMap,I=!0)},"translate"),"translate"),this.attributes=a(i(function(){if(!I)throw new Error(`${s}grammar not scanned, parsed and translated`);return se=v(this.rules,this.udts,ue,this.errors),H=!0,se},"attrs"),"attrs"),this.generate=a(i(function(q){if(this.lines=h(this.chars,this.errors,q),this.errors.length||(p.syntax(this.chars,this.lines,this.errors,q),this.errors.length))return;let w=p.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=w.rules,this.udts=w.udts,ue=w.lineMap,se=v(this.rules,this.udts,ue,this.errors),H=!0)},"generate3"),"generate"),this.displayRules=a(i(function(q="index"){if(!I)throw new Error(`${s}grammar not scanned, parsed and translated`);return T(this.rules,this.udts,q)},"displayRules"),"displayRules"),this.displayRuleDependencies=a(i(function(q="index"){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return _(q)},"displayRuleDependencies"),"displayRuleDependencies"),this.displayAttributes=a(i(function(q="index"){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return se&&y(q),b(q)},"displayAttributes"),"displayAttributes"),this.displayAttributeErrors=a(i(function(){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return y()},"displayAttributeErrors"),"displayAttributeErrors"),this.toSource=a(i(function(q){if(!H)throw new Error(`${s}can't generate parser source - must be preceeded by call to attributes()`);if(se)throw new Error(`${s}can't generate parser source - attributes have ${se} errors`);return p.generateSource(this.chars,this.lines,this.rules,this.udts,q)},"toSource"),"toSource"),this.toObject=a(i(function(){if(!H)throw new Error(`${s}can't generate parser source - must be preceeded by call to attributes()`);if(se)throw new Error(`${s}can't generate parser source - attributes have ${se} errors`);return p.generateObject(this.sabnf,this.rules,this.udts)},"toObject"),"toObject"),this.errorsToAscii=a(i(function(){return j(this.errors,this.lines,this.chars)},"errorsToAsciiFunc"),"errorsToAsciiFunc"),this.errorsToHtml=a(i(function(q){return U(this.errors,this.lines,this.chars,q)},"errorsToHtmlFunc"),"errorsToHtmlFunc"),this.linesToAscii=a(i(function(){return P(this.lines)},"linesToAsciiFunc"),"linesToAsciiFunc"),this.linesToHtml=a(i(function(){return K(this.lines)},"linesToHtmlFunc"),"linesToHtmlFunc")},"api"),"api")}}),ax=ze({"../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js"(e,t){(function(r,n){"use strict";function s(m,d){if(!m)throw new Error(d||"Assertion failed")}i(s,"assert2"),a(s,"assert");function o(m,d){m.super_=d;var g=a(function(){},"TempCtor");g.prototype=d.prototype,m.prototype=new g,m.prototype.constructor=m}i(o,"inherits"),a(o,"inherits");function c(m,d,g){if(c.isBN(m))return m;this.negative=0,this.words=null,this.length=0,this.red=null,m!==null&&((d==="le"||d==="be")&&(g=d,d=10),this._init(m||0,d||10,g||"be"))}i(c,"BN3"),a(c,"BN"),typeof r=="object"?r.exports=c:n.BN=c,c.BN=c,c.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=WS().Buffer}catch{}c.isBN=a(i(function(d){return d instanceof c?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===c.wordSize&&Array.isArray(d.words)},"isBN"),"isBN"),c.max=a(i(function(d,g){return d.cmp(g)>0?d:g},"max"),"max"),c.min=a(i(function(d,g){return d.cmp(g)<0?d:g},"min"),"min"),c.prototype._init=a(i(function(d,g,S){if(typeof d=="number")return this._initNumber(d,g,S);if(typeof d=="object")return this._initArray(d,g,S);g==="hex"&&(g=16),s(g===(g|0)&&g>=2&&g<=36),d=d.toString().replace(/\s+/g,"");var D=0;d[0]==="-"&&(D++,this.negative=1),D<d.length&&(g===16?this._parseHex(d,D,S):(this._parseBase(d,g,D),S==="le"&&this._initArray(this.toArray(),g,S)))},"init2"),"init"),c.prototype._initNumber=a(i(function(d,g,S){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[d&67108863],this.length=1):d<4503599627370496?(this.words=[d&67108863,d/67108864&67108863],this.length=2):(s(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),g,S)},"_initNumber"),"_initNumber"),c.prototype._initArray=a(i(function(d,g,S){if(s(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=new Array(this.length);for(var D=0;D<this.length;D++)this.words[D]=0;var C,E,B=0;if(S==="be")for(D=d.length-1,C=0;D>=0;D-=3)E=d[D]|d[D-1]<<8|d[D-2]<<16,this.words[C]|=E<<B&67108863,this.words[C+1]=E>>>26-B&67108863,B+=24,B>=26&&(B-=26,C++);else if(S==="le")for(D=0,C=0;D<d.length;D+=3)E=d[D]|d[D+1]<<8|d[D+2]<<16,this.words[C]|=E<<B&67108863,this.words[C+1]=E>>>26-B&67108863,B+=24,B>=26&&(B-=26,C++);return this._strip()},"_initArray"),"_initArray");function h(m,d){var g=m.charCodeAt(d);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;s(!1,"Invalid character in "+m)}i(h,"parseHex4Bits"),a(h,"parseHex4Bits");function p(m,d,g){var S=h(m,g);return g-1>=d&&(S|=h(m,g-1)<<4),S}i(p,"parseHexByte"),a(p,"parseHexByte"),c.prototype._parseHex=a(i(function(d,g,S){this.length=Math.ceil((d.length-g)/6),this.words=new Array(this.length);for(var D=0;D<this.length;D++)this.words[D]=0;var C=0,E=0,B;if(S==="be")for(D=d.length-1;D>=g;D-=2)B=p(d,g,D)<<C,this.words[E]|=B&67108863,C>=18?(C-=18,E+=1,this.words[E]|=B>>>26):C+=8;else{var $=d.length-g;for(D=$%2===0?g+1:g;D<d.length;D+=2)B=p(d,g,D)<<C,this.words[E]|=B&67108863,C>=18?(C-=18,E+=1,this.words[E]|=B>>>26):C+=8}this._strip()},"_parseHex"),"_parseHex");function v(m,d,g,S){for(var D=0,C=0,E=Math.min(m.length,g),B=d;B<E;B++){var $=m.charCodeAt(B)-48;D*=S,$>=49?C=$-49+10:$>=17?C=$-17+10:C=$,s($>=0&&C<S,"Invalid character"),D+=C}return D}i(v,"parseBase"),a(v,"parseBase"),c.prototype._parseBase=a(i(function(d,g,S){this.words=[0],this.length=1;for(var D=0,C=1;C<=67108863;C*=g)D++;D--,C=C/g|0;for(var E=d.length-S,B=E%D,$=Math.min(E,E-B)+S,k=0,F=S;F<$;F+=D)k=v(d,F,F+D,g),this.imuln(C),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k);if(B!==0){var he=1;for(k=v(d,F,d.length,g),F=0;F<B;F++)he*=g;this.imuln(he),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k)}this._strip()},"_parseBase"),"_parseBase"),c.prototype.copy=a(i(function(d){d.words=new Array(this.length);for(var g=0;g<this.length;g++)d.words[g]=this.words[g];d.length=this.length,d.negative=this.negative,d.red=this.red},"copy"),"copy");function b(m,d){m.words=d.words,m.length=d.length,m.negative=d.negative,m.red=d.red}if(i(b,"move"),a(b,"move"),c.prototype._move=a(i(function(d){b(d,this)},"_move"),"_move"),c.prototype.clone=a(i(function(){var d=new c(null);return this.copy(d),d},"clone"),"clone"),c.prototype._expand=a(i(function(d){for(;this.length<d;)this.words[this.length++]=0;return this},"_expand"),"_expand"),c.prototype._strip=a(i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),"strip"),c.prototype._normSign=a(i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),"_normSign"),typeof Symbol<"u"&&typeof Symbol.for=="function")try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{c.prototype.inspect=y}else c.prototype.inspect=y;function y(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}i(y,"inspect4"),a(y,"inspect");var _=["","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"],T=[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],O=[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];c.prototype.toString=a(i(function(d,g){d=d||10,g=g|0||1;var S;if(d===16||d==="hex"){S="";for(var D=0,C=0,E=0;E<this.length;E++){var B=this.words[E],$=((B<<D|C)&16777215).toString(16);C=B>>>24-D&16777215,D+=2,D>=26&&(D-=26,E--),C!==0||E!==this.length-1?S=_[6-$.length]+$+S:S=$+S}for(C!==0&&(S=C.toString(16)+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(d===(d|0)&&d>=2&&d<=36){var k=T[d],F=O[d];S="";var he=this.clone();for(he.negative=0;!he.isZero();){var N=he.modrn(F).toString(d);he=he.idivn(F),he.isZero()?S=N+S:S=_[k-N.length]+N+S}for(this.isZero()&&(S="0"+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}s(!1,"Base should be between 2 and 36")},"toString4"),"toString"),c.prototype.toNumber=a(i(function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},"toNumber"),"toNumber"),c.prototype.toJSON=a(i(function(){return this.toString(16,2)},"toJSON2"),"toJSON"),f&&(c.prototype.toBuffer=a(i(function(d,g){return this.toArrayLike(f,d,g)},"toBuffer"),"toBuffer")),c.prototype.toArray=a(i(function(d,g){return this.toArrayLike(Array,d,g)},"toArray"),"toArray");var R=a(i(function(d,g){return d.allocUnsafe?d.allocUnsafe(g):new d(g)},"allocate2"),"allocate");c.prototype.toArrayLike=a(i(function(d,g,S){this._strip();var D=this.byteLength(),C=S||Math.max(1,D);s(D<=C,"byte array longer than desired length"),s(C>0,"Requested array length <= 0");var E=R(d,C),B=g==="le"?"LE":"BE";return this["_toArrayLike"+B](E,D),E},"toArrayLike"),"toArrayLike"),c.prototype._toArrayLikeLE=a(i(function(d,g){for(var S=0,D=0,C=0,E=0;C<this.length;C++){var B=this.words[C]<<E|D;d[S++]=B&255,S<d.length&&(d[S++]=B>>8&255),S<d.length&&(d[S++]=B>>16&255),E===6?(S<d.length&&(d[S++]=B>>24&255),D=0,E=0):(D=B>>>24,E+=2)}if(S<d.length)for(d[S++]=D;S<d.length;)d[S++]=0},"_toArrayLikeLE"),"_toArrayLikeLE"),c.prototype._toArrayLikeBE=a(i(function(d,g){for(var S=d.length-1,D=0,C=0,E=0;C<this.length;C++){var B=this.words[C]<<E|D;d[S--]=B&255,S>=0&&(d[S--]=B>>8&255),S>=0&&(d[S--]=B>>16&255),E===6?(S>=0&&(d[S--]=B>>24&255),D=0,E=0):(D=B>>>24,E+=2)}if(S>=0)for(d[S--]=D;S>=0;)d[S--]=0},"_toArrayLikeBE"),"_toArrayLikeBE"),Math.clz32?c.prototype._countBits=a(i(function(d){return 32-Math.clz32(d)},"_countBits"),"_countBits"):c.prototype._countBits=a(i(function(d){var g=d,S=0;return g>=4096&&(S+=13,g>>>=13),g>=64&&(S+=7,g>>>=7),g>=8&&(S+=4,g>>>=4),g>=2&&(S+=2,g>>>=2),S+g},"_countBits"),"_countBits"),c.prototype._zeroBits=a(i(function(d){if(d===0)return 26;var g=d,S=0;return(g&8191)===0&&(S+=13,g>>>=13),(g&127)===0&&(S+=7,g>>>=7),(g&15)===0&&(S+=4,g>>>=4),(g&3)===0&&(S+=2,g>>>=2),(g&1)===0&&S++,S},"_zeroBits"),"_zeroBits"),c.prototype.bitLength=a(i(function(){var d=this.words[this.length-1],g=this._countBits(d);return(this.length-1)*26+g},"bitLength"),"bitLength");function P(m){for(var d=new Array(m.bitLength()),g=0;g<d.length;g++){var S=g/26|0,D=g%26;d[g]=m.words[S]>>>D&1}return d}i(P,"toBitArray"),a(P,"toBitArray"),c.prototype.zeroBits=a(i(function(){if(this.isZero())return 0;for(var d=0,g=0;g<this.length;g++){var S=this._zeroBits(this.words[g]);if(d+=S,S!==26)break}return d},"zeroBits"),"zeroBits"),c.prototype.byteLength=a(i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),"byteLength"),c.prototype.toTwos=a(i(function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},"toTwos"),"toTwos"),c.prototype.fromTwos=a(i(function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},"fromTwos"),"fromTwos"),c.prototype.isNeg=a(i(function(){return this.negative!==0},"isNeg"),"isNeg"),c.prototype.neg=a(i(function(){return this.clone().ineg()},"neg3"),"neg"),c.prototype.ineg=a(i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),"ineg"),c.prototype.iuor=a(i(function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var g=0;g<d.length;g++)this.words[g]=this.words[g]|d.words[g];return this._strip()},"iuor"),"iuor"),c.prototype.ior=a(i(function(d){return s((this.negative|d.negative)===0),this.iuor(d)},"ior"),"ior"),c.prototype.or=a(i(function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},"or2"),"or"),c.prototype.uor=a(i(function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},"uor"),"uor"),c.prototype.iuand=a(i(function(d){var g;this.length>d.length?g=d:g=this;for(var S=0;S<g.length;S++)this.words[S]=this.words[S]&d.words[S];return this.length=g.length,this._strip()},"iuand"),"iuand"),c.prototype.iand=a(i(function(d){return s((this.negative|d.negative)===0),this.iuand(d)},"iand"),"iand"),c.prototype.and=a(i(function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},"and"),"and"),c.prototype.uand=a(i(function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},"uand"),"uand"),c.prototype.iuxor=a(i(function(d){var g,S;this.length>d.length?(g=this,S=d):(g=d,S=this);for(var D=0;D<S.length;D++)this.words[D]=g.words[D]^S.words[D];if(this!==g)for(;D<g.length;D++)this.words[D]=g.words[D];return this.length=g.length,this._strip()},"iuxor"),"iuxor"),c.prototype.ixor=a(i(function(d){return s((this.negative|d.negative)===0),this.iuxor(d)},"ixor"),"ixor"),c.prototype.xor=a(i(function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},"xor2"),"xor"),c.prototype.uxor=a(i(function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},"uxor"),"uxor"),c.prototype.inotn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=Math.ceil(d/26)|0,S=d%26;this._expand(g),S>0&&g--;for(var D=0;D<g;D++)this.words[D]=~this.words[D]&67108863;return S>0&&(this.words[D]=~this.words[D]&67108863>>26-S),this._strip()},"inotn"),"inotn"),c.prototype.notn=a(i(function(d){return this.clone().inotn(d)},"notn"),"notn"),c.prototype.setn=a(i(function(d,g){s(typeof d=="number"&&d>=0);var S=d/26|0,D=d%26;return this._expand(S+1),g?this.words[S]=this.words[S]|1<<D:this.words[S]=this.words[S]&~(1<<D),this._strip()},"setn"),"setn"),c.prototype.iadd=a(i(function(d){var g;if(this.negative!==0&&d.negative===0)return this.negative=0,g=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,g=this.isub(d),d.negative=1,g._normSign();var S,D;this.length>d.length?(S=this,D=d):(S=d,D=this);for(var C=0,E=0;E<D.length;E++)g=(S.words[E]|0)+(D.words[E]|0)+C,this.words[E]=g&67108863,C=g>>>26;for(;C!==0&&E<S.length;E++)g=(S.words[E]|0)+C,this.words[E]=g&67108863,C=g>>>26;if(this.length=S.length,C!==0)this.words[this.length]=C,this.length++;else if(S!==this)for(;E<S.length;E++)this.words[E]=S.words[E];return this},"iadd"),"iadd"),c.prototype.add=a(i(function(d){var g;return d.negative!==0&&this.negative===0?(d.negative=0,g=this.sub(d),d.negative^=1,g):d.negative===0&&this.negative!==0?(this.negative=0,g=d.sub(this),this.negative=1,g):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},"add3"),"add"),c.prototype.isub=a(i(function(d){if(d.negative!==0){d.negative=0;var g=this.iadd(d);return d.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var S=this.cmp(d);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var D,C;S>0?(D=this,C=d):(D=d,C=this);for(var E=0,B=0;B<C.length;B++)g=(D.words[B]|0)-(C.words[B]|0)+E,E=g>>26,this.words[B]=g&67108863;for(;E!==0&&B<D.length;B++)g=(D.words[B]|0)+E,E=g>>26,this.words[B]=g&67108863;if(E===0&&B<D.length&&D!==this)for(;B<D.length;B++)this.words[B]=D.words[B];return this.length=Math.max(this.length,B),D!==this&&(this.negative=1),this._strip()},"isub"),"isub"),c.prototype.sub=a(i(function(d){return this.clone().isub(d)},"sub"),"sub");function K(m,d,g){g.negative=d.negative^m.negative;var S=m.length+d.length|0;g.length=S,S=S-1|0;var D=m.words[0]|0,C=d.words[0]|0,E=D*C,B=E&67108863,$=E/67108864|0;g.words[0]=B;for(var k=1;k<S;k++){for(var F=$>>>26,he=$&67108863,N=Math.min(k,d.length-1),Y=Math.max(0,k-m.length+1);Y<=N;Y++){var J=k-Y|0;D=m.words[J]|0,C=d.words[Y]|0,E=D*C+he,F+=E/67108864|0,he=E&67108863}g.words[k]=he|0,$=F|0}return $!==0?g.words[k]=$|0:g.length--,g._strip()}i(K,"smallMulTo"),a(K,"smallMulTo");var U=a(i(function(d,g,S){var D=d.words,C=g.words,E=S.words,B=0,$,k,F,he=D[0]|0,N=he&8191,Y=he>>>13,J=D[1]|0,M=J&8191,z=J>>>13,te=D[2]|0,oe=te&8191,ge=te>>>13,ke=D[3]|0,_e=ke&8191,fe=ke>>>13,Ce=D[4]|0,pe=Ce&8191,we=Ce>>>13,Q=D[5]|0,ve=Q&8191,Me=Q>>>13,Ue=D[6]|0,Re=Ue&8191,je=Ue>>>13,rt=D[7]|0,le=rt&8191,ce=rt>>>13,Z=D[8]|0,re=Z&8191,ye=Z>>>13,Se=D[9]|0,xe=Se&8191,De=Se>>>13,Mt=C[0]|0,qe=Mt&8191,He=Mt>>>13,Ot=C[1]|0,dt=Ot&8191,mt=Ot>>>13,Dr=C[2]|0,ct=Dr&8191,ut=Dr>>>13,lr=C[3]|0,lt=lr&8191,nt=lr>>>13,ar=C[4]|0,it=ar&8191,Ye=ar>>>13,Qt=C[5]|0,st=Qt&8191,Qe=Qt>>>13,or=C[6]|0,at=or&8191,Ze=or>>>13,cr=C[7]|0,ot=cr&8191,Et=cr>>>13,Sn=C[8]|0,At=Sn&8191,yt=Sn>>>13,fn=C[9]|0,er=fn&8191,tr=fn>>>13;S.negative=d.negative^g.negative,S.length=19,$=Math.imul(N,qe),k=Math.imul(N,He),k=k+Math.imul(Y,qe)|0,F=Math.imul(Y,He);var tn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(tn>>>26)|0,tn&=67108863,$=Math.imul(M,qe),k=Math.imul(M,He),k=k+Math.imul(z,qe)|0,F=Math.imul(z,He),$=$+Math.imul(N,dt)|0,k=k+Math.imul(N,mt)|0,k=k+Math.imul(Y,dt)|0,F=F+Math.imul(Y,mt)|0;var rn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(rn>>>26)|0,rn&=67108863,$=Math.imul(oe,qe),k=Math.imul(oe,He),k=k+Math.imul(ge,qe)|0,F=Math.imul(ge,He),$=$+Math.imul(M,dt)|0,k=k+Math.imul(M,mt)|0,k=k+Math.imul(z,dt)|0,F=F+Math.imul(z,mt)|0,$=$+Math.imul(N,ct)|0,k=k+Math.imul(N,ut)|0,k=k+Math.imul(Y,ct)|0,F=F+Math.imul(Y,ut)|0;var Or=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Or>>>26)|0,Or&=67108863,$=Math.imul(_e,qe),k=Math.imul(_e,He),k=k+Math.imul(fe,qe)|0,F=Math.imul(fe,He),$=$+Math.imul(oe,dt)|0,k=k+Math.imul(oe,mt)|0,k=k+Math.imul(ge,dt)|0,F=F+Math.imul(ge,mt)|0,$=$+Math.imul(M,ct)|0,k=k+Math.imul(M,ut)|0,k=k+Math.imul(z,ct)|0,F=F+Math.imul(z,ut)|0,$=$+Math.imul(N,lt)|0,k=k+Math.imul(N,nt)|0,k=k+Math.imul(Y,lt)|0,F=F+Math.imul(Y,nt)|0;var Hr=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,$=Math.imul(pe,qe),k=Math.imul(pe,He),k=k+Math.imul(we,qe)|0,F=Math.imul(we,He),$=$+Math.imul(_e,dt)|0,k=k+Math.imul(_e,mt)|0,k=k+Math.imul(fe,dt)|0,F=F+Math.imul(fe,mt)|0,$=$+Math.imul(oe,ct)|0,k=k+Math.imul(oe,ut)|0,k=k+Math.imul(ge,ct)|0,F=F+Math.imul(ge,ut)|0,$=$+Math.imul(M,lt)|0,k=k+Math.imul(M,nt)|0,k=k+Math.imul(z,lt)|0,F=F+Math.imul(z,nt)|0,$=$+Math.imul(N,it)|0,k=k+Math.imul(N,Ye)|0,k=k+Math.imul(Y,it)|0,F=F+Math.imul(Y,Ye)|0;var nn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(nn>>>26)|0,nn&=67108863,$=Math.imul(ve,qe),k=Math.imul(ve,He),k=k+Math.imul(Me,qe)|0,F=Math.imul(Me,He),$=$+Math.imul(pe,dt)|0,k=k+Math.imul(pe,mt)|0,k=k+Math.imul(we,dt)|0,F=F+Math.imul(we,mt)|0,$=$+Math.imul(_e,ct)|0,k=k+Math.imul(_e,ut)|0,k=k+Math.imul(fe,ct)|0,F=F+Math.imul(fe,ut)|0,$=$+Math.imul(oe,lt)|0,k=k+Math.imul(oe,nt)|0,k=k+Math.imul(ge,lt)|0,F=F+Math.imul(ge,nt)|0,$=$+Math.imul(M,it)|0,k=k+Math.imul(M,Ye)|0,k=k+Math.imul(z,it)|0,F=F+Math.imul(z,Ye)|0,$=$+Math.imul(N,st)|0,k=k+Math.imul(N,Qe)|0,k=k+Math.imul(Y,st)|0,F=F+Math.imul(Y,Qe)|0;var xn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(xn>>>26)|0,xn&=67108863,$=Math.imul(Re,qe),k=Math.imul(Re,He),k=k+Math.imul(je,qe)|0,F=Math.imul(je,He),$=$+Math.imul(ve,dt)|0,k=k+Math.imul(ve,mt)|0,k=k+Math.imul(Me,dt)|0,F=F+Math.imul(Me,mt)|0,$=$+Math.imul(pe,ct)|0,k=k+Math.imul(pe,ut)|0,k=k+Math.imul(we,ct)|0,F=F+Math.imul(we,ut)|0,$=$+Math.imul(_e,lt)|0,k=k+Math.imul(_e,nt)|0,k=k+Math.imul(fe,lt)|0,F=F+Math.imul(fe,nt)|0,$=$+Math.imul(oe,it)|0,k=k+Math.imul(oe,Ye)|0,k=k+Math.imul(ge,it)|0,F=F+Math.imul(ge,Ye)|0,$=$+Math.imul(M,st)|0,k=k+Math.imul(M,Qe)|0,k=k+Math.imul(z,st)|0,F=F+Math.imul(z,Qe)|0,$=$+Math.imul(N,at)|0,k=k+Math.imul(N,Ze)|0,k=k+Math.imul(Y,at)|0,F=F+Math.imul(Y,Ze)|0;var Ai=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,$=Math.imul(le,qe),k=Math.imul(le,He),k=k+Math.imul(ce,qe)|0,F=Math.imul(ce,He),$=$+Math.imul(Re,dt)|0,k=k+Math.imul(Re,mt)|0,k=k+Math.imul(je,dt)|0,F=F+Math.imul(je,mt)|0,$=$+Math.imul(ve,ct)|0,k=k+Math.imul(ve,ut)|0,k=k+Math.imul(Me,ct)|0,F=F+Math.imul(Me,ut)|0,$=$+Math.imul(pe,lt)|0,k=k+Math.imul(pe,nt)|0,k=k+Math.imul(we,lt)|0,F=F+Math.imul(we,nt)|0,$=$+Math.imul(_e,it)|0,k=k+Math.imul(_e,Ye)|0,k=k+Math.imul(fe,it)|0,F=F+Math.imul(fe,Ye)|0,$=$+Math.imul(oe,st)|0,k=k+Math.imul(oe,Qe)|0,k=k+Math.imul(ge,st)|0,F=F+Math.imul(ge,Qe)|0,$=$+Math.imul(M,at)|0,k=k+Math.imul(M,Ze)|0,k=k+Math.imul(z,at)|0,F=F+Math.imul(z,Ze)|0,$=$+Math.imul(N,ot)|0,k=k+Math.imul(N,Et)|0,k=k+Math.imul(Y,ot)|0,F=F+Math.imul(Y,Et)|0;var Si=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Si>>>26)|0,Si&=67108863,$=Math.imul(re,qe),k=Math.imul(re,He),k=k+Math.imul(ye,qe)|0,F=Math.imul(ye,He),$=$+Math.imul(le,dt)|0,k=k+Math.imul(le,mt)|0,k=k+Math.imul(ce,dt)|0,F=F+Math.imul(ce,mt)|0,$=$+Math.imul(Re,ct)|0,k=k+Math.imul(Re,ut)|0,k=k+Math.imul(je,ct)|0,F=F+Math.imul(je,ut)|0,$=$+Math.imul(ve,lt)|0,k=k+Math.imul(ve,nt)|0,k=k+Math.imul(Me,lt)|0,F=F+Math.imul(Me,nt)|0,$=$+Math.imul(pe,it)|0,k=k+Math.imul(pe,Ye)|0,k=k+Math.imul(we,it)|0,F=F+Math.imul(we,Ye)|0,$=$+Math.imul(_e,st)|0,k=k+Math.imul(_e,Qe)|0,k=k+Math.imul(fe,st)|0,F=F+Math.imul(fe,Qe)|0,$=$+Math.imul(oe,at)|0,k=k+Math.imul(oe,Ze)|0,k=k+Math.imul(ge,at)|0,F=F+Math.imul(ge,Ze)|0,$=$+Math.imul(M,ot)|0,k=k+Math.imul(M,Et)|0,k=k+Math.imul(z,ot)|0,F=F+Math.imul(z,Et)|0,$=$+Math.imul(N,At)|0,k=k+Math.imul(N,yt)|0,k=k+Math.imul(Y,At)|0,F=F+Math.imul(Y,yt)|0;var xi=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(xi>>>26)|0,xi&=67108863,$=Math.imul(xe,qe),k=Math.imul(xe,He),k=k+Math.imul(De,qe)|0,F=Math.imul(De,He),$=$+Math.imul(re,dt)|0,k=k+Math.imul(re,mt)|0,k=k+Math.imul(ye,dt)|0,F=F+Math.imul(ye,mt)|0,$=$+Math.imul(le,ct)|0,k=k+Math.imul(le,ut)|0,k=k+Math.imul(ce,ct)|0,F=F+Math.imul(ce,ut)|0,$=$+Math.imul(Re,lt)|0,k=k+Math.imul(Re,nt)|0,k=k+Math.imul(je,lt)|0,F=F+Math.imul(je,nt)|0,$=$+Math.imul(ve,it)|0,k=k+Math.imul(ve,Ye)|0,k=k+Math.imul(Me,it)|0,F=F+Math.imul(Me,Ye)|0,$=$+Math.imul(pe,st)|0,k=k+Math.imul(pe,Qe)|0,k=k+Math.imul(we,st)|0,F=F+Math.imul(we,Qe)|0,$=$+Math.imul(_e,at)|0,k=k+Math.imul(_e,Ze)|0,k=k+Math.imul(fe,at)|0,F=F+Math.imul(fe,Ze)|0,$=$+Math.imul(oe,ot)|0,k=k+Math.imul(oe,Et)|0,k=k+Math.imul(ge,ot)|0,F=F+Math.imul(ge,Et)|0,$=$+Math.imul(M,At)|0,k=k+Math.imul(M,yt)|0,k=k+Math.imul(z,At)|0,F=F+Math.imul(z,yt)|0,$=$+Math.imul(N,er)|0,k=k+Math.imul(N,tr)|0,k=k+Math.imul(Y,er)|0,F=F+Math.imul(Y,tr)|0;var Pn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,$=Math.imul(xe,dt),k=Math.imul(xe,mt),k=k+Math.imul(De,dt)|0,F=Math.imul(De,mt),$=$+Math.imul(re,ct)|0,k=k+Math.imul(re,ut)|0,k=k+Math.imul(ye,ct)|0,F=F+Math.imul(ye,ut)|0,$=$+Math.imul(le,lt)|0,k=k+Math.imul(le,nt)|0,k=k+Math.imul(ce,lt)|0,F=F+Math.imul(ce,nt)|0,$=$+Math.imul(Re,it)|0,k=k+Math.imul(Re,Ye)|0,k=k+Math.imul(je,it)|0,F=F+Math.imul(je,Ye)|0,$=$+Math.imul(ve,st)|0,k=k+Math.imul(ve,Qe)|0,k=k+Math.imul(Me,st)|0,F=F+Math.imul(Me,Qe)|0,$=$+Math.imul(pe,at)|0,k=k+Math.imul(pe,Ze)|0,k=k+Math.imul(we,at)|0,F=F+Math.imul(we,Ze)|0,$=$+Math.imul(_e,ot)|0,k=k+Math.imul(_e,Et)|0,k=k+Math.imul(fe,ot)|0,F=F+Math.imul(fe,Et)|0,$=$+Math.imul(oe,At)|0,k=k+Math.imul(oe,yt)|0,k=k+Math.imul(ge,At)|0,F=F+Math.imul(ge,yt)|0,$=$+Math.imul(M,er)|0,k=k+Math.imul(M,tr)|0,k=k+Math.imul(z,er)|0,F=F+Math.imul(z,tr)|0;var dn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(dn>>>26)|0,dn&=67108863,$=Math.imul(xe,ct),k=Math.imul(xe,ut),k=k+Math.imul(De,ct)|0,F=Math.imul(De,ut),$=$+Math.imul(re,lt)|0,k=k+Math.imul(re,nt)|0,k=k+Math.imul(ye,lt)|0,F=F+Math.imul(ye,nt)|0,$=$+Math.imul(le,it)|0,k=k+Math.imul(le,Ye)|0,k=k+Math.imul(ce,it)|0,F=F+Math.imul(ce,Ye)|0,$=$+Math.imul(Re,st)|0,k=k+Math.imul(Re,Qe)|0,k=k+Math.imul(je,st)|0,F=F+Math.imul(je,Qe)|0,$=$+Math.imul(ve,at)|0,k=k+Math.imul(ve,Ze)|0,k=k+Math.imul(Me,at)|0,F=F+Math.imul(Me,Ze)|0,$=$+Math.imul(pe,ot)|0,k=k+Math.imul(pe,Et)|0,k=k+Math.imul(we,ot)|0,F=F+Math.imul(we,Et)|0,$=$+Math.imul(_e,At)|0,k=k+Math.imul(_e,yt)|0,k=k+Math.imul(fe,At)|0,F=F+Math.imul(fe,yt)|0,$=$+Math.imul(oe,er)|0,k=k+Math.imul(oe,tr)|0,k=k+Math.imul(ge,er)|0,F=F+Math.imul(ge,tr)|0;var Xn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,$=Math.imul(xe,lt),k=Math.imul(xe,nt),k=k+Math.imul(De,lt)|0,F=Math.imul(De,nt),$=$+Math.imul(re,it)|0,k=k+Math.imul(re,Ye)|0,k=k+Math.imul(ye,it)|0,F=F+Math.imul(ye,Ye)|0,$=$+Math.imul(le,st)|0,k=k+Math.imul(le,Qe)|0,k=k+Math.imul(ce,st)|0,F=F+Math.imul(ce,Qe)|0,$=$+Math.imul(Re,at)|0,k=k+Math.imul(Re,Ze)|0,k=k+Math.imul(je,at)|0,F=F+Math.imul(je,Ze)|0,$=$+Math.imul(ve,ot)|0,k=k+Math.imul(ve,Et)|0,k=k+Math.imul(Me,ot)|0,F=F+Math.imul(Me,Et)|0,$=$+Math.imul(pe,At)|0,k=k+Math.imul(pe,yt)|0,k=k+Math.imul(we,At)|0,F=F+Math.imul(we,yt)|0,$=$+Math.imul(_e,er)|0,k=k+Math.imul(_e,tr)|0,k=k+Math.imul(fe,er)|0,F=F+Math.imul(fe,tr)|0;var Bn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,$=Math.imul(xe,it),k=Math.imul(xe,Ye),k=k+Math.imul(De,it)|0,F=Math.imul(De,Ye),$=$+Math.imul(re,st)|0,k=k+Math.imul(re,Qe)|0,k=k+Math.imul(ye,st)|0,F=F+Math.imul(ye,Qe)|0,$=$+Math.imul(le,at)|0,k=k+Math.imul(le,Ze)|0,k=k+Math.imul(ce,at)|0,F=F+Math.imul(ce,Ze)|0,$=$+Math.imul(Re,ot)|0,k=k+Math.imul(Re,Et)|0,k=k+Math.imul(je,ot)|0,F=F+Math.imul(je,Et)|0,$=$+Math.imul(ve,At)|0,k=k+Math.imul(ve,yt)|0,k=k+Math.imul(Me,At)|0,F=F+Math.imul(Me,yt)|0,$=$+Math.imul(pe,er)|0,k=k+Math.imul(pe,tr)|0,k=k+Math.imul(we,er)|0,F=F+Math.imul(we,tr)|0;var Ti=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,$=Math.imul(xe,st),k=Math.imul(xe,Qe),k=k+Math.imul(De,st)|0,F=Math.imul(De,Qe),$=$+Math.imul(re,at)|0,k=k+Math.imul(re,Ze)|0,k=k+Math.imul(ye,at)|0,F=F+Math.imul(ye,Ze)|0,$=$+Math.imul(le,ot)|0,k=k+Math.imul(le,Et)|0,k=k+Math.imul(ce,ot)|0,F=F+Math.imul(ce,Et)|0,$=$+Math.imul(Re,At)|0,k=k+Math.imul(Re,yt)|0,k=k+Math.imul(je,At)|0,F=F+Math.imul(je,yt)|0,$=$+Math.imul(ve,er)|0,k=k+Math.imul(ve,tr)|0,k=k+Math.imul(Me,er)|0,F=F+Math.imul(Me,tr)|0;var Mi=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,$=Math.imul(xe,at),k=Math.imul(xe,Ze),k=k+Math.imul(De,at)|0,F=Math.imul(De,Ze),$=$+Math.imul(re,ot)|0,k=k+Math.imul(re,Et)|0,k=k+Math.imul(ye,ot)|0,F=F+Math.imul(ye,Et)|0,$=$+Math.imul(le,At)|0,k=k+Math.imul(le,yt)|0,k=k+Math.imul(ce,At)|0,F=F+Math.imul(ce,yt)|0,$=$+Math.imul(Re,er)|0,k=k+Math.imul(Re,tr)|0,k=k+Math.imul(je,er)|0,F=F+Math.imul(je,tr)|0;var Ci=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,$=Math.imul(xe,ot),k=Math.imul(xe,Et),k=k+Math.imul(De,ot)|0,F=Math.imul(De,Et),$=$+Math.imul(re,At)|0,k=k+Math.imul(re,yt)|0,k=k+Math.imul(ye,At)|0,F=F+Math.imul(ye,yt)|0,$=$+Math.imul(le,er)|0,k=k+Math.imul(le,tr)|0,k=k+Math.imul(ce,er)|0,F=F+Math.imul(ce,tr)|0;var Gs=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Gs>>>26)|0,Gs&=67108863,$=Math.imul(xe,At),k=Math.imul(xe,yt),k=k+Math.imul(De,At)|0,F=Math.imul(De,yt),$=$+Math.imul(re,er)|0,k=k+Math.imul(re,tr)|0,k=k+Math.imul(ye,er)|0,F=F+Math.imul(ye,tr)|0;var Ws=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ws>>>26)|0,Ws&=67108863,$=Math.imul(xe,er),k=Math.imul(xe,tr),k=k+Math.imul(De,er)|0,F=Math.imul(De,tr);var Zs=(B+$|0)+((k&8191)<<13)|0;return B=(F+(k>>>13)|0)+(Zs>>>26)|0,Zs&=67108863,E[0]=tn,E[1]=rn,E[2]=Or,E[3]=Hr,E[4]=nn,E[5]=xn,E[6]=Ai,E[7]=Si,E[8]=xi,E[9]=Pn,E[10]=dn,E[11]=Xn,E[12]=Bn,E[13]=Ti,E[14]=Mi,E[15]=Ci,E[16]=Gs,E[17]=Ws,E[18]=Zs,B!==0&&(E[19]=B,S.length++),S},"comb10MulTo2"),"comb10MulTo");Math.imul||(U=K);function j(m,d,g){g.negative=d.negative^m.negative,g.length=m.length+d.length;for(var S=0,D=0,C=0;C<g.length-1;C++){var E=D;D=0;for(var B=S&67108863,$=Math.min(C,d.length-1),k=Math.max(0,C-m.length+1);k<=$;k++){var F=C-k,he=m.words[F]|0,N=d.words[k]|0,Y=he*N,J=Y&67108863;E=E+(Y/67108864|0)|0,J=J+B|0,B=J&67108863,E=E+(J>>>26)|0,D+=E>>>26,E&=67108863}g.words[C]=B,S=E,E=D}return S!==0?g.words[C]=S:g.length--,g._strip()}i(j,"bigMulTo"),a(j,"bigMulTo");function V(m,d,g){return j(m,d,g)}i(V,"jumboMulTo"),a(V,"jumboMulTo"),c.prototype.mulTo=a(i(function(d,g){var S,D=this.length+d.length;return this.length===10&&d.length===10?S=U(this,d,g):D<63?S=K(this,d,g):D<1024?S=j(this,d,g):S=V(this,d,g),S},"mulTo"),"mulTo");function G(m,d){this.x=m,this.y=d}i(G,"FFTM"),a(G,"FFTM"),G.prototype.makeRBT=a(i(function(d){for(var g=new Array(d),S=c.prototype._countBits(d)-1,D=0;D<d;D++)g[D]=this.revBin(D,S,d);return g},"makeRBT"),"makeRBT"),G.prototype.revBin=a(i(function(d,g,S){if(d===0||d===S-1)return d;for(var D=0,C=0;C<g;C++)D|=(d&1)<<g-C-1,d>>=1;return D},"revBin"),"revBin"),G.prototype.permute=a(i(function(d,g,S,D,C,E){for(var B=0;B<E;B++)D[B]=g[d[B]],C[B]=S[d[B]]},"permute"),"permute"),G.prototype.transform=a(i(function(d,g,S,D,C,E){this.permute(E,d,g,S,D,C);for(var B=1;B<C;B<<=1)for(var $=B<<1,k=Math.cos(2*Math.PI/$),F=Math.sin(2*Math.PI/$),he=0;he<C;he+=$)for(var N=k,Y=F,J=0;J<B;J++){var M=S[he+J],z=D[he+J],te=S[he+J+B],oe=D[he+J+B],ge=N*te-Y*oe;oe=N*oe+Y*te,te=ge,S[he+J]=M+te,D[he+J]=z+oe,S[he+J+B]=M-te,D[he+J+B]=z-oe,J!==$&&(ge=k*N-F*Y,Y=k*Y+F*N,N=ge)}},"transform"),"transform"),G.prototype.guessLen13b=a(i(function(d,g){var S=Math.max(g,d)|1,D=S&1,C=0;for(S=S/2|0;S;S=S>>>1)C++;return 1<<C+1+D},"guessLen13b"),"guessLen13b"),G.prototype.conjugate=a(i(function(d,g,S){if(!(S<=1))for(var D=0;D<S/2;D++){var C=d[D];d[D]=d[S-D-1],d[S-D-1]=C,C=g[D],g[D]=-g[S-D-1],g[S-D-1]=-C}},"conjugate"),"conjugate"),G.prototype.normalize13b=a(i(function(d,g){for(var S=0,D=0;D<g/2;D++){var C=Math.round(d[2*D+1]/g)*8192+Math.round(d[2*D]/g)+S;d[D]=C&67108863,C<67108864?S=0:S=C/67108864|0}return d},"normalize13b"),"normalize13b"),G.prototype.convert13b=a(i(function(d,g,S,D){for(var C=0,E=0;E<g;E++)C=C+(d[E]|0),S[2*E]=C&8191,C=C>>>13,S[2*E+1]=C&8191,C=C>>>13;for(E=2*g;E<D;++E)S[E]=0;s(C===0),s((C&-8192)===0)},"convert13b"),"convert13b"),G.prototype.stub=a(i(function(d){for(var g=new Array(d),S=0;S<d;S++)g[S]=0;return g},"stub"),"stub"),G.prototype.mulp=a(i(function(d,g,S){var D=2*this.guessLen13b(d.length,g.length),C=this.makeRBT(D),E=this.stub(D),B=new Array(D),$=new Array(D),k=new Array(D),F=new Array(D),he=new Array(D),N=new Array(D),Y=S.words;Y.length=D,this.convert13b(d.words,d.length,B,D),this.convert13b(g.words,g.length,F,D),this.transform(B,E,$,k,D,C),this.transform(F,E,he,N,D,C);for(var J=0;J<D;J++){var M=$[J]*he[J]-k[J]*N[J];k[J]=$[J]*N[J]+k[J]*he[J],$[J]=M}return this.conjugate($,k,D),this.transform($,k,Y,E,D,C),this.conjugate(Y,E,D),this.normalize13b(Y,D),S.negative=d.negative^g.negative,S.length=d.length+g.length,S._strip()},"mulp"),"mulp"),c.prototype.mul=a(i(function(d){var g=new c(null);return g.words=new Array(this.length+d.length),this.mulTo(d,g)},"mul3"),"mul"),c.prototype.mulf=a(i(function(d){var g=new c(null);return g.words=new Array(this.length+d.length),V(this,d,g)},"mulf"),"mulf"),c.prototype.imul=a(i(function(d){return this.clone().mulTo(d,this)},"imul"),"imul"),c.prototype.imuln=a(i(function(d){var g=d<0;g&&(d=-d),s(typeof d=="number"),s(d<67108864);for(var S=0,D=0;D<this.length;D++){var C=(this.words[D]|0)*d,E=(C&67108863)+(S&67108863);S>>=26,S+=C/67108864|0,S+=E>>>26,this.words[D]=E&67108863}return S!==0&&(this.words[D]=S,this.length++),g?this.ineg():this},"imuln"),"imuln"),c.prototype.muln=a(i(function(d){return this.clone().imuln(d)},"muln"),"muln"),c.prototype.sqr=a(i(function(){return this.mul(this)},"sqr"),"sqr"),c.prototype.isqr=a(i(function(){return this.imul(this.clone())},"isqr"),"isqr"),c.prototype.pow=a(i(function(d){var g=P(d);if(g.length===0)return new c(1);for(var S=this,D=0;D<g.length&&g[D]===0;D++,S=S.sqr());if(++D<g.length)for(var C=S.sqr();D<g.length;D++,C=C.sqr())g[D]!==0&&(S=S.mul(C));return S},"pow"),"pow"),c.prototype.iushln=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26,D=67108863>>>26-g<<26-g,C;if(g!==0){var E=0;for(C=0;C<this.length;C++){var B=this.words[C]&D,$=(this.words[C]|0)-B<<g;this.words[C]=$|E,E=B>>>26-g}E&&(this.words[C]=E,this.length++)}if(S!==0){for(C=this.length-1;C>=0;C--)this.words[C+S]=this.words[C];for(C=0;C<S;C++)this.words[C]=0;this.length+=S}return this._strip()},"iushln"),"iushln"),c.prototype.ishln=a(i(function(d){return s(this.negative===0),this.iushln(d)},"ishln"),"ishln"),c.prototype.iushrn=a(i(function(d,g,S){s(typeof d=="number"&&d>=0);var D;g?D=(g-g%26)/26:D=0;var C=d%26,E=Math.min((d-C)/26,this.length),B=67108863^67108863>>>C<<C,$=S;if(D-=E,D=Math.max(0,D),$){for(var k=0;k<E;k++)$.words[k]=this.words[k];$.length=E}if(E!==0)if(this.length>E)for(this.length-=E,k=0;k<this.length;k++)this.words[k]=this.words[k+E];else this.words[0]=0,this.length=1;var F=0;for(k=this.length-1;k>=0&&(F!==0||k>=D);k--){var he=this.words[k]|0;this.words[k]=F<<26-C|he>>>C,F=he&B}return $&&F!==0&&($.words[$.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},"iushrn"),"iushrn"),c.prototype.ishrn=a(i(function(d,g,S){return s(this.negative===0),this.iushrn(d,g,S)},"ishrn"),"ishrn"),c.prototype.shln=a(i(function(d){return this.clone().ishln(d)},"shln"),"shln"),c.prototype.ushln=a(i(function(d){return this.clone().iushln(d)},"ushln"),"ushln"),c.prototype.shrn=a(i(function(d){return this.clone().ishrn(d)},"shrn"),"shrn"),c.prototype.ushrn=a(i(function(d){return this.clone().iushrn(d)},"ushrn"),"ushrn"),c.prototype.testn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26,D=1<<g;if(this.length<=S)return!1;var C=this.words[S];return!!(C&D)},"testn"),"testn"),c.prototype.imaskn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(g!==0&&S++,this.length=Math.min(S,this.length),g!==0){var D=67108863^67108863>>>g<<g;this.words[this.length-1]&=D}return this._strip()},"imaskn"),"imaskn"),c.prototype.maskn=a(i(function(d){return this.clone().imaskn(d)},"maskn"),"maskn"),c.prototype.iaddn=a(i(function(d){return s(typeof d=="number"),s(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<=d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},"iaddn"),"iaddn"),c.prototype._iaddn=a(i(function(d){this.words[0]+=d;for(var g=0;g<this.length&&this.words[g]>=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},"_iaddn"),"_iaddn"),c.prototype.isubn=a(i(function(d){if(s(typeof d=="number"),s(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g<this.length&&this.words[g]<0;g++)this.words[g]+=67108864,this.words[g+1]-=1;return this._strip()},"isubn"),"isubn"),c.prototype.addn=a(i(function(d){return this.clone().iaddn(d)},"addn"),"addn"),c.prototype.subn=a(i(function(d){return this.clone().isubn(d)},"subn"),"subn"),c.prototype.iabs=a(i(function(){return this.negative=0,this},"iabs"),"iabs"),c.prototype.abs=a(i(function(){return this.clone().iabs()},"abs"),"abs"),c.prototype._ishlnsubmul=a(i(function(d,g,S){var D=d.length+S,C;this._expand(D);var E,B=0;for(C=0;C<d.length;C++){E=(this.words[C+S]|0)+B;var $=(d.words[C]|0)*g;E-=$&67108863,B=(E>>26)-($/67108864|0),this.words[C+S]=E&67108863}for(;C<this.length-S;C++)E=(this.words[C+S]|0)+B,B=E>>26,this.words[C+S]=E&67108863;if(B===0)return this._strip();for(s(B===-1),B=0,C=0;C<this.length;C++)E=-(this.words[C]|0)+B,B=E>>26,this.words[C]=E&67108863;return this.negative=1,this._strip()},"_ishlnsubmul"),"_ishlnsubmul"),c.prototype._wordDiv=a(i(function(d,g){var S=this.length-d.length,D=this.clone(),C=d,E=C.words[C.length-1]|0,B=this._countBits(E);S=26-B,S!==0&&(C=C.ushln(S),D.iushln(S),E=C.words[C.length-1]|0);var $=D.length-C.length,k;if(g!=="mod"){k=new c(null),k.length=$+1,k.words=new Array(k.length);for(var F=0;F<k.length;F++)k.words[F]=0}var he=D.clone()._ishlnsubmul(C,1,$);he.negative===0&&(D=he,k&&(k.words[$]=1));for(var N=$-1;N>=0;N--){var Y=(D.words[C.length+N]|0)*67108864+(D.words[C.length+N-1]|0);for(Y=Math.min(Y/E|0,67108863),D._ishlnsubmul(C,Y,N);D.negative!==0;)Y--,D.negative=0,D._ishlnsubmul(C,1,N),D.isZero()||(D.negative^=1);k&&(k.words[N]=Y)}return k&&k._strip(),D._strip(),g!=="div"&&S!==0&&D.iushrn(S),{div:k||null,mod:D}},"_wordDiv"),"_wordDiv"),c.prototype.divmod=a(i(function(d,g,S){if(s(!d.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var D,C,E;return this.negative!==0&&d.negative===0?(E=this.neg().divmod(d,g),g!=="mod"&&(D=E.div.neg()),g!=="div"&&(C=E.mod.neg(),S&&C.negative!==0&&C.iadd(d)),{div:D,mod:C}):this.negative===0&&d.negative!==0?(E=this.divmod(d.neg(),g),g!=="mod"&&(D=E.div.neg()),{div:D,mod:E.mod}):(this.negative&d.negative)!==0?(E=this.neg().divmod(d.neg(),g),g!=="div"&&(C=E.mod.neg(),S&&C.negative!==0&&C.isub(d)),{div:E.div,mod:C}):d.length>this.length||this.cmp(d)<0?{div:new c(0),mod:this}:d.length===1?g==="div"?{div:this.divn(d.words[0]),mod:null}:g==="mod"?{div:null,mod:new c(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new c(this.modrn(d.words[0]))}:this._wordDiv(d,g)},"divmod"),"divmod"),c.prototype.div=a(i(function(d){return this.divmod(d,"div",!1).div},"div"),"div"),c.prototype.mod=a(i(function(d){return this.divmod(d,"mod",!1).mod},"mod2"),"mod"),c.prototype.umod=a(i(function(d){return this.divmod(d,"mod",!0).mod},"umod"),"umod"),c.prototype.divRound=a(i(function(d){var g=this.divmod(d);if(g.mod.isZero())return g.div;var S=g.div.negative!==0?g.mod.isub(d):g.mod,D=d.ushrn(1),C=d.andln(1),E=S.cmp(D);return E<0||C===1&&E===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},"divRound"),"divRound"),c.prototype.modrn=a(i(function(d){var g=d<0;g&&(d=-d),s(d<=67108863);for(var S=(1<<26)%d,D=0,C=this.length-1;C>=0;C--)D=(S*D+(this.words[C]|0))%d;return g?-D:D},"modrn"),"modrn"),c.prototype.modn=a(i(function(d){return this.modrn(d)},"modn"),"modn"),c.prototype.idivn=a(i(function(d){var g=d<0;g&&(d=-d),s(d<=67108863);for(var S=0,D=this.length-1;D>=0;D--){var C=(this.words[D]|0)+S*67108864;this.words[D]=C/d|0,S=C%d}return this._strip(),g?this.ineg():this},"idivn"),"idivn"),c.prototype.divn=a(i(function(d){return this.clone().idivn(d)},"divn"),"divn"),c.prototype.egcd=a(i(function(d){s(d.negative===0),s(!d.isZero());var g=this,S=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var D=new c(1),C=new c(0),E=new c(0),B=new c(1),$=0;g.isEven()&&S.isEven();)g.iushrn(1),S.iushrn(1),++$;for(var k=S.clone(),F=g.clone();!g.isZero();){for(var he=0,N=1;(g.words[0]&N)===0&&he<26;++he,N<<=1);if(he>0)for(g.iushrn(he);he-- >0;)(D.isOdd()||C.isOdd())&&(D.iadd(k),C.isub(F)),D.iushrn(1),C.iushrn(1);for(var Y=0,J=1;(S.words[0]&J)===0&&Y<26;++Y,J<<=1);if(Y>0)for(S.iushrn(Y);Y-- >0;)(E.isOdd()||B.isOdd())&&(E.iadd(k),B.isub(F)),E.iushrn(1),B.iushrn(1);g.cmp(S)>=0?(g.isub(S),D.isub(E),C.isub(B)):(S.isub(g),E.isub(D),B.isub(C))}return{a:E,b:B,gcd:S.iushln($)}},"egcd"),"egcd"),c.prototype._invmp=a(i(function(d){s(d.negative===0),s(!d.isZero());var g=this,S=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var D=new c(1),C=new c(0),E=S.clone();g.cmpn(1)>0&&S.cmpn(1)>0;){for(var B=0,$=1;(g.words[0]&$)===0&&B<26;++B,$<<=1);if(B>0)for(g.iushrn(B);B-- >0;)D.isOdd()&&D.iadd(E),D.iushrn(1);for(var k=0,F=1;(S.words[0]&F)===0&&k<26;++k,F<<=1);if(k>0)for(S.iushrn(k);k-- >0;)C.isOdd()&&C.iadd(E),C.iushrn(1);g.cmp(S)>=0?(g.isub(S),D.isub(C)):(S.isub(g),C.isub(D))}var he;return g.cmpn(1)===0?he=D:he=C,he.cmpn(0)<0&&he.iadd(d),he},"_invmp"),"_invmp"),c.prototype.gcd=a(i(function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var g=this.clone(),S=d.clone();g.negative=0,S.negative=0;for(var D=0;g.isEven()&&S.isEven();D++)g.iushrn(1),S.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;S.isEven();)S.iushrn(1);var C=g.cmp(S);if(C<0){var E=g;g=S,S=E}else if(C===0||S.cmpn(1)===0)break;g.isub(S)}while(!0);return S.iushln(D)},"gcd"),"gcd"),c.prototype.invm=a(i(function(d){return this.egcd(d).a.umod(d)},"invm"),"invm"),c.prototype.isEven=a(i(function(){return(this.words[0]&1)===0},"isEven"),"isEven"),c.prototype.isOdd=a(i(function(){return(this.words[0]&1)===1},"isOdd"),"isOdd"),c.prototype.andln=a(i(function(d){return this.words[0]&d},"andln"),"andln"),c.prototype.bincn=a(i(function(d){s(typeof d=="number");var g=d%26,S=(d-g)/26,D=1<<g;if(this.length<=S)return this._expand(S+1),this.words[S]|=D,this;for(var C=D,E=S;C!==0&&E<this.length;E++){var B=this.words[E]|0;B+=C,C=B>>>26,B&=67108863,this.words[E]=B}return C!==0&&(this.words[E]=C,this.length++),this},"bincn"),"bincn"),c.prototype.isZero=a(i(function(){return this.length===1&&this.words[0]===0},"isZero"),"isZero"),c.prototype.cmpn=a(i(function(d){var g=d<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var S;if(this.length>1)S=1;else{g&&(d=-d),s(d<=67108863,"Number is too big");var D=this.words[0]|0;S=D===d?0:D<d?-1:1}return this.negative!==0?-S|0:S},"cmpn"),"cmpn"),c.prototype.cmp=a(i(function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var g=this.ucmp(d);return this.negative!==0?-g|0:g},"cmp"),"cmp"),c.prototype.ucmp=a(i(function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var g=0,S=this.length-1;S>=0;S--){var D=this.words[S]|0,C=d.words[S]|0;if(D!==C){D<C?g=-1:D>C&&(g=1);break}}return g},"ucmp"),"ucmp"),c.prototype.gtn=a(i(function(d){return this.cmpn(d)===1},"gtn"),"gtn"),c.prototype.gt=a(i(function(d){return this.cmp(d)===1},"gt"),"gt"),c.prototype.gten=a(i(function(d){return this.cmpn(d)>=0},"gten"),"gten"),c.prototype.gte=a(i(function(d){return this.cmp(d)>=0},"gte"),"gte"),c.prototype.ltn=a(i(function(d){return this.cmpn(d)===-1},"ltn"),"ltn"),c.prototype.lt=a(i(function(d){return this.cmp(d)===-1},"lt"),"lt"),c.prototype.lten=a(i(function(d){return this.cmpn(d)<=0},"lten"),"lten"),c.prototype.lte=a(i(function(d){return this.cmp(d)<=0},"lte"),"lte"),c.prototype.eqn=a(i(function(d){return this.cmpn(d)===0},"eqn"),"eqn"),c.prototype.eq=a(i(function(d){return this.cmp(d)===0},"eq4"),"eq"),c.red=a(i(function(d){return new w(d)},"red"),"red"),c.prototype.toRed=a(i(function(d){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},"toRed"),"toRed"),c.prototype.fromRed=a(i(function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),"fromRed"),c.prototype._forceRed=a(i(function(d){return this.red=d,this},"_forceRed"),"_forceRed"),c.prototype.forceRed=a(i(function(d){return s(!this.red,"Already a number in reduction context"),this._forceRed(d)},"forceRed"),"forceRed"),c.prototype.redAdd=a(i(function(d){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},"redAdd"),"redAdd"),c.prototype.redIAdd=a(i(function(d){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},"redIAdd"),"redIAdd"),c.prototype.redSub=a(i(function(d){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},"redSub"),"redSub"),c.prototype.redISub=a(i(function(d){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},"redISub"),"redISub"),c.prototype.redShl=a(i(function(d){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},"redShl"),"redShl"),c.prototype.redMul=a(i(function(d){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},"redMul"),"redMul"),c.prototype.redIMul=a(i(function(d){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},"redIMul"),"redIMul"),c.prototype.redSqr=a(i(function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),"redSqr"),c.prototype.redISqr=a(i(function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),"redISqr"),c.prototype.redSqrt=a(i(function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),"redSqrt"),c.prototype.redInvm=a(i(function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),"redInvm"),c.prototype.redNeg=a(i(function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),"redNeg"),c.prototype.redPow=a(i(function(d){return s(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)},"redPow"),"redPow");var I={k256:null,p224:null,p192:null,p25519:null};function H(m,d){this.name=m,this.p=new c(d,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(H,"MPrime"),a(H,"MPrime"),H.prototype._tmp=a(i(function(){var d=new c(null);return d.words=new Array(Math.ceil(this.n/13)),d},"_tmp"),"_tmp"),H.prototype.ireduce=a(i(function(d){var g=d,S;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),S=g.bitLength();while(S>this.n);var D=S<this.n?-1:g.ucmp(this.p);return D===0?(g.words[0]=0,g.length=1):D>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},"ireduce"),"ireduce"),H.prototype.split=a(i(function(d,g){d.iushrn(this.n,0,g)},"split"),"split"),H.prototype.imulK=a(i(function(d){return d.imul(this.k)},"imulK"),"imulK");function se(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(se,"K256"),a(se,"K256"),o(se,H),se.prototype.split=a(i(function(d,g){for(var S=4194303,D=Math.min(d.length,9),C=0;C<D;C++)g.words[C]=d.words[C];if(g.length=D,d.length<=9){d.words[0]=0,d.length=1;return}var E=d.words[9];for(g.words[g.length++]=E&S,C=10;C<d.length;C++){var B=d.words[C]|0;d.words[C-10]=(B&S)<<4|E>>>22,E=B}E>>>=22,d.words[C-10]=E,E===0&&d.length>10?d.length-=10:d.length-=9},"split"),"split"),se.prototype.imulK=a(i(function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var g=0,S=0;S<d.length;S++){var D=d.words[S]|0;g+=D*977,d.words[S]=g&67108863,g=D*64+(g/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d},"imulK"),"imulK");function ue(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(ue,"P224"),a(ue,"P224"),o(ue,H);function me(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(me,"P192"),a(me,"P192"),o(me,H);function q(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(q,"P25519"),a(q,"P25519"),o(q,H),q.prototype.imulK=a(i(function(d){for(var g=0,S=0;S<d.length;S++){var D=(d.words[S]|0)*19+g,C=D&67108863;D>>>=26,d.words[S]=C,g=D}return g!==0&&(d.words[d.length++]=g),d},"imulK"),"imulK"),c._prime=a(i(function(d){if(I[d])return I[d];var g;if(d==="k256")g=new se;else if(d==="p224")g=new ue;else if(d==="p192")g=new me;else if(d==="p25519")g=new q;else throw new Error("Unknown prime "+d);return I[d]=g,g},"prime"),"prime");function w(m){if(typeof m=="string"){var d=c._prime(m);this.m=d.p,this.prime=d}else s(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}i(w,"Red"),a(w,"Red"),w.prototype._verify1=a(i(function(d){s(d.negative===0,"red works only with positives"),s(d.red,"red works only with red numbers")},"_verify1"),"_verify1"),w.prototype._verify2=a(i(function(d,g){s((d.negative|g.negative)===0,"red works only with positives"),s(d.red&&d.red===g.red,"red works only with red numbers")},"_verify2"),"_verify2"),w.prototype.imod=a(i(function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(b(d,d.umod(this.m)._forceRed(this)),d)},"imod"),"imod"),w.prototype.neg=a(i(function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},"neg3"),"neg"),w.prototype.add=a(i(function(d,g){this._verify2(d,g);var S=d.add(g);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},"add3"),"add"),w.prototype.iadd=a(i(function(d,g){this._verify2(d,g);var S=d.iadd(g);return S.cmp(this.m)>=0&&S.isub(this.m),S},"iadd"),"iadd"),w.prototype.sub=a(i(function(d,g){this._verify2(d,g);var S=d.sub(g);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},"sub"),"sub"),w.prototype.isub=a(i(function(d,g){this._verify2(d,g);var S=d.isub(g);return S.cmpn(0)<0&&S.iadd(this.m),S},"isub"),"isub"),w.prototype.shl=a(i(function(d,g){return this._verify1(d),this.imod(d.ushln(g))},"shl"),"shl"),w.prototype.imul=a(i(function(d,g){return this._verify2(d,g),this.imod(d.imul(g))},"imul"),"imul"),w.prototype.mul=a(i(function(d,g){return this._verify2(d,g),this.imod(d.mul(g))},"mul3"),"mul"),w.prototype.isqr=a(i(function(d){return this.imul(d,d.clone())},"isqr"),"isqr"),w.prototype.sqr=a(i(function(d){return this.mul(d,d)},"sqr"),"sqr"),w.prototype.sqrt=a(i(function(d){if(d.isZero())return d.clone();var g=this.m.andln(3);if(s(g%2===1),g===3){var S=this.m.add(new c(1)).iushrn(2);return this.pow(d,S)}for(var D=this.m.subn(1),C=0;!D.isZero()&&D.andln(1)===0;)C++,D.iushrn(1);s(!D.isZero());var E=new c(1).toRed(this),B=E.redNeg(),$=this.m.subn(1).iushrn(1),k=this.m.bitLength();for(k=new c(2*k*k).toRed(this);this.pow(k,$).cmp(B)!==0;)k.redIAdd(B);for(var F=this.pow(k,D),he=this.pow(d,D.addn(1).iushrn(1)),N=this.pow(d,D),Y=C;N.cmp(E)!==0;){for(var J=N,M=0;J.cmp(E)!==0;M++)J=J.redSqr();s(M<Y);var z=this.pow(F,new c(1).iushln(Y-M-1));he=he.redMul(z),F=z.redSqr(),N=N.redMul(F),Y=M}return he},"sqrt"),"sqrt"),w.prototype.invm=a(i(function(d){var g=d._invmp(this.m);return g.negative!==0?(g.negative=0,this.imod(g).redNeg()):this.imod(g)},"invm"),"invm"),w.prototype.pow=a(i(function(d,g){if(g.isZero())return new c(1).toRed(this);if(g.cmpn(1)===0)return d.clone();var S=4,D=new Array(1<<S);D[0]=new c(1).toRed(this),D[1]=d;for(var C=2;C<D.length;C++)D[C]=this.mul(D[C-1],d);var E=D[0],B=0,$=0,k=g.bitLength()%26;for(k===0&&(k=26),C=g.length-1;C>=0;C--){for(var F=g.words[C],he=k-1;he>=0;he--){var N=F>>he&1;if(E!==D[0]&&(E=this.sqr(E)),N===0&&B===0){$=0;continue}B<<=1,B|=N,$++,!($!==S&&(C!==0||he!==0))&&(E=this.mul(E,D[B]),$=0,B=0)}k=26}return E},"pow"),"pow"),w.prototype.convertTo=a(i(function(d){var g=d.umod(this.m);return g===d?g.clone():g},"convertTo"),"convertTo"),w.prototype.convertFrom=a(i(function(d){var g=d.clone();return g.red=null,g},"convertFrom"),"convertFrom"),c.mont=a(i(function(d){return new x(d)},"mont"),"mont");function x(m){w.call(this,m),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}i(x,"Mont"),a(x,"Mont"),o(x,w),x.prototype.convertTo=a(i(function(d){return this.imod(d.ushln(this.shift))},"convertTo"),"convertTo"),x.prototype.convertFrom=a(i(function(d){var g=this.imod(d.mul(this.rinv));return g.red=null,g},"convertFrom"),"convertFrom"),x.prototype.imul=a(i(function(d,g){if(d.isZero()||g.isZero())return d.words[0]=0,d.length=1,d;var S=d.imul(g),D=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(D).iushrn(this.shift),E=C;return C.cmp(this.m)>=0?E=C.isub(this.m):C.cmpn(0)<0&&(E=C.iadd(this.m)),E._forceRed(this)},"imul"),"imul"),x.prototype.mul=a(i(function(d,g){if(d.isZero()||g.isZero())return new c(0)._forceRed(this);var S=d.mul(g),D=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(D).iushrn(this.shift),E=C;return C.cmp(this.m)>=0?E=C.isub(this.m):C.cmpn(0)<0&&(E=C.iadd(this.m)),E._forceRed(this)},"mul3"),"mul"),x.prototype.invm=a(i(function(d){var g=this.imod(d._invmp(this.m).mul(this.r2));return g._forceRed(this)},"invm"),"invm")})(typeof t>"u"||t,e)}}),E$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/encode.js"(e,t){t.exports=c;var r=128,n=127,s=~n,o=Math.pow(2,31);function c(f,h,p){if(Number.MAX_SAFE_INTEGER&&f>Number.MAX_SAFE_INTEGER)throw c.bytes=0,new RangeError("Could not encode varint");h=h||[],p=p||0;for(var v=p;f>=o;)h[p++]=f&255|r,f/=128;for(;f&s;)h[p++]=f&255|r,f>>>=7;return h[p]=f|0,c.bytes=p-v+1,h}i(c,"encode9"),a(c,"encode")}}),A$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/decode.js"(e,t){t.exports=s;var r=128,n=127;function s(o,h){var f=0,h=h||0,p=0,v=h,b,y=o.length;do{if(v>=y||p>49)throw s.bytes=0,new RangeError("Could not decode varint");b=o[v++],f+=p<28?(b&n)<<p:(b&n)*Math.pow(2,p),p+=7}while(b>=r);return s.bytes=v-h,f}i(s,"read2"),a(s,"read")}}),S$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/length.js"(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),s=Math.pow(2,21),o=Math.pow(2,28),c=Math.pow(2,35),f=Math.pow(2,42),h=Math.pow(2,49),p=Math.pow(2,56),v=Math.pow(2,63);t.exports=function(b){return b<r?1:b<n?2:b<s?3:b<o?4:b<c?5:b<f?6:b<h?7:b<p?8:b<v?9:10}}}),mm=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/index.js"(e,t){t.exports={encode:E$(),decode:A$(),encodingLength:S$()}}}),x$=ze({"../../../node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(e,t){"use strict";t.exports=function(r,n){n||(n={}),typeof n=="function"&&(n={cmp:n});var s=typeof n.cycles=="boolean"?n.cycles:!1,o=n.cmp&&function(f){return function(h){return function(p,v){var b={key:p,value:h[p]},y={key:v,value:h[v]};return f(b,y)}}}(n.cmp),c=[];return a(i(function f(h){if(h&&h.toJSON&&typeof h.toJSON=="function"&&(h=h.toJSON()),h!==void 0){if(typeof h=="number")return isFinite(h)?""+h:"null";if(typeof h!="object")return JSON.stringify(h);var p,v;if(Array.isArray(h)){for(v="[",p=0;p<h.length;p++)p&&(v+=","),v+=f(h[p])||"null";return v+"]"}if(h===null)return"null";if(c.indexOf(h)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var b=c.push(h)-1,y=Object.keys(h).sort(o&&o(h));for(v="",p=0;p<y.length;p++){var _=y[p],T=f(h[_]);!T||(v&&(v+=","),v+=JSON.stringify(_)+":"+T)}return c.splice(b,1),"{"+v+"}"}},"stringify2"),"stringify")(r)}}}),pd=ze({"../../../node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js"(e,t){var r=200,n="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",c="[object Array]",f="[object Boolean]",h="[object Date]",p="[object Error]",v="[object Function]",b="[object GeneratorFunction]",y="[object Map]",_="[object Number]",T="[object Object]",O="[object Promise]",R="[object RegExp]",P="[object Set]",K="[object String]",U="[object Symbol]",j="[object WeakMap]",V="[object ArrayBuffer]",G="[object DataView]",I="[object Float32Array]",H="[object Float64Array]",se="[object Int8Array]",ue="[object Int16Array]",me="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",x="[object Uint16Array]",m="[object Uint32Array]",d=/[\\^$.*+?()[\]{}|]/g,g=/\w*$/,S=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,C={};C[o]=C[c]=C[V]=C[G]=C[f]=C[h]=C[I]=C[H]=C[se]=C[ue]=C[me]=C[y]=C[_]=C[T]=C[R]=C[P]=C[K]=C[U]=C[q]=C[w]=C[x]=C[m]=!0,C[p]=C[v]=C[j]=!1;var E=typeof global=="object"&&global&&global.Object===Object&&global,B=typeof self=="object"&&self&&self.Object===Object&&self,$=E||B||Function("return this")(),k=typeof e=="object"&&e&&!e.nodeType&&e,F=k&&typeof t=="object"&&t&&!t.nodeType&&t,he=F&&F.exports===k;function N(ie,Te){return ie.set(Te[0],Te[1]),ie}i(N,"addMapEntry"),a(N,"addMapEntry");function Y(ie,Te){return ie.add(Te),ie}i(Y,"addSetEntry"),a(Y,"addSetEntry");function J(ie,Te){for(var Pe=-1,ht=ie?ie.length:0;++Pe<ht&&Te(ie[Pe],Pe,ie)!==!1;);return ie}i(J,"arrayEach"),a(J,"arrayEach");function M(ie,Te){for(var Pe=-1,ht=Te.length,qr=ie.length;++Pe<ht;)ie[qr+Pe]=Te[Pe];return ie}i(M,"arrayPush"),a(M,"arrayPush");function z(ie,Te,Pe,ht){var qr=-1,sn=ie?ie.length:0;for(ht&&sn&&(Pe=ie[++qr]);++qr<sn;)Pe=Te(Pe,ie[qr],qr,ie);return Pe}i(z,"arrayReduce"),a(z,"arrayReduce");function te(ie,Te){for(var Pe=-1,ht=Array(ie);++Pe<ie;)ht[Pe]=Te(Pe);return ht}i(te,"baseTimes"),a(te,"baseTimes");function oe(ie,Te){return ie?.[Te]}i(oe,"getValue"),a(oe,"getValue");function ge(ie){var Te=!1;if(ie!=null&&typeof ie.toString!="function")try{Te=!!(ie+"")}catch{}return Te}i(ge,"isHostObject"),a(ge,"isHostObject");function ke(ie){var Te=-1,Pe=Array(ie.size);return ie.forEach(function(ht,qr){Pe[++Te]=[qr,ht]}),Pe}i(ke,"mapToArray"),a(ke,"mapToArray");function _e(ie,Te){return function(Pe){return ie(Te(Pe))}}i(_e,"overArg"),a(_e,"overArg");function fe(ie){var Te=-1,Pe=Array(ie.size);return ie.forEach(function(ht){Pe[++Te]=ht}),Pe}i(fe,"setToArray"),a(fe,"setToArray");var Ce=Array.prototype,pe=Function.prototype,we=Object.prototype,Q=$["__core-js_shared__"],ve=function(){var ie=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),Me=pe.toString,Ue=we.hasOwnProperty,Re=we.toString,je=RegExp("^"+Me.call(Ue).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=he?$.Buffer:void 0,le=$.Symbol,ce=$.Uint8Array,Z=_e(Object.getPrototypeOf,Object),re=Object.create,ye=we.propertyIsEnumerable,Se=Ce.splice,xe=Object.getOwnPropertySymbols,De=rt?rt.isBuffer:void 0,Mt=_e(Object.keys,Object),qe=Vi($,"DataView"),He=Vi($,"Map"),Ot=Vi($,"Promise"),dt=Vi($,"Set"),mt=Vi($,"WeakMap"),Dr=Vi(Object,"create"),ct=vs(qe),ut=vs(He),lr=vs(Ot),lt=vs(dt),nt=vs(mt),ar=le?le.prototype:void 0,it=ar?ar.valueOf:void 0;function Ye(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(Ye,"Hash"),a(Ye,"Hash");function Qt(){this.__data__=Dr?Dr(null):{}}i(Qt,"hashClear"),a(Qt,"hashClear");function st(ie){return this.has(ie)&&delete this.__data__[ie]}i(st,"hashDelete"),a(st,"hashDelete");function Qe(ie){var Te=this.__data__;if(Dr){var Pe=Te[ie];return Pe===n?void 0:Pe}return Ue.call(Te,ie)?Te[ie]:void 0}i(Qe,"hashGet"),a(Qe,"hashGet");function or(ie){var Te=this.__data__;return Dr?Te[ie]!==void 0:Ue.call(Te,ie)}i(or,"hashHas"),a(or,"hashHas");function at(ie,Te){var Pe=this.__data__;return Pe[ie]=Dr&&Te===void 0?n:Te,this}i(at,"hashSet"),a(at,"hashSet"),Ye.prototype.clear=Qt,Ye.prototype.delete=st,Ye.prototype.get=Qe,Ye.prototype.has=or,Ye.prototype.set=at;function Ze(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(Ze,"ListCache"),a(Ze,"ListCache");function cr(){this.__data__=[]}i(cr,"listCacheClear"),a(cr,"listCacheClear");function ot(ie){var Te=this.__data__,Pe=dn(Te,ie);if(Pe<0)return!1;var ht=Te.length-1;return Pe==ht?Te.pop():Se.call(Te,Pe,1),!0}i(ot,"listCacheDelete"),a(ot,"listCacheDelete");function Et(ie){var Te=this.__data__,Pe=dn(Te,ie);return Pe<0?void 0:Te[Pe][1]}i(Et,"listCacheGet"),a(Et,"listCacheGet");function Sn(ie){return dn(this.__data__,ie)>-1}i(Sn,"listCacheHas"),a(Sn,"listCacheHas");function At(ie,Te){var Pe=this.__data__,ht=dn(Pe,ie);return ht<0?Pe.push([ie,Te]):Pe[ht][1]=Te,this}i(At,"listCacheSet"),a(At,"listCacheSet"),Ze.prototype.clear=cr,Ze.prototype.delete=ot,Ze.prototype.get=Et,Ze.prototype.has=Sn,Ze.prototype.set=At;function yt(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(yt,"MapCache"),a(yt,"MapCache");function fn(){this.__data__={hash:new Ye,map:new(He||Ze),string:new Ye}}i(fn,"mapCacheClear"),a(fn,"mapCacheClear");function er(ie){return Js(this,ie).delete(ie)}i(er,"mapCacheDelete"),a(er,"mapCacheDelete");function tr(ie){return Js(this,ie).get(ie)}i(tr,"mapCacheGet"),a(tr,"mapCacheGet");function tn(ie){return Js(this,ie).has(ie)}i(tn,"mapCacheHas"),a(tn,"mapCacheHas");function rn(ie,Te){return Js(this,ie).set(ie,Te),this}i(rn,"mapCacheSet"),a(rn,"mapCacheSet"),yt.prototype.clear=fn,yt.prototype.delete=er,yt.prototype.get=tr,yt.prototype.has=tn,yt.prototype.set=rn;function Or(ie){this.__data__=new Ze(ie)}i(Or,"Stack"),a(Or,"Stack");function Hr(){this.__data__=new Ze}i(Hr,"stackClear"),a(Hr,"stackClear");function nn(ie){return this.__data__.delete(ie)}i(nn,"stackDelete"),a(nn,"stackDelete");function xn(ie){return this.__data__.get(ie)}i(xn,"stackGet"),a(xn,"stackGet");function Ai(ie){return this.__data__.has(ie)}i(Ai,"stackHas"),a(Ai,"stackHas");function Si(ie,Te){var Pe=this.__data__;if(Pe instanceof Ze){var ht=Pe.__data__;if(!He||ht.length<r-1)return ht.push([ie,Te]),this;Pe=this.__data__=new yt(ht)}return Pe.set(ie,Te),this}i(Si,"stackSet"),a(Si,"stackSet"),Or.prototype.clear=Hr,Or.prototype.delete=nn,Or.prototype.get=xn,Or.prototype.has=Ai,Or.prototype.set=Si;function xi(ie,Te){var Pe=Al(ie)||Dd(ie)?te(ie.length,String):[],ht=Pe.length,qr=!!ht;for(var sn in ie)(Te||Ue.call(ie,sn))&&!(qr&&(sn=="length"||bl(sn,ht)))&&Pe.push(sn);return Pe}i(xi,"arrayLikeKeys"),a(xi,"arrayLikeKeys");function Pn(ie,Te,Pe){var ht=ie[Te];(!(Ue.call(ie,Te)&&Pc(ht,Pe))||Pe===void 0&&!(Te in ie))&&(ie[Te]=Pe)}i(Pn,"assignValue"),a(Pn,"assignValue");function dn(ie,Te){for(var Pe=ie.length;Pe--;)if(Pc(ie[Pe][0],Te))return Pe;return-1}i(dn,"assocIndexOf"),a(dn,"assocIndexOf");function Xn(ie,Te){return ie&&Mo(Te,Bc(Te),ie)}i(Xn,"baseAssign"),a(Xn,"baseAssign");function Bn(ie,Te,Pe,ht,qr,sn,Tn){var hn;if(ht&&(hn=sn?ht(ie,qr,sn,Tn):ht(ie)),hn!==void 0)return hn;if(!Co(ie))return ie;var Lr=Al(ie);if(Lr){if(hn=gl(ie),!Te)return ml(ie,hn)}else{var gs=ms(ie),ys=gs==v||gs==b;if(xl(ie))return Zs(ie,Te);if(gs==T||gs==o||ys&&!sn){if(ge(ie))return sn?ie:{};if(hn=Id(ys?{}:ie),!Te)return Cd(ie,Xn(hn,ie))}else{if(!C[gs])return sn?ie:{};hn=yl(ie,gs,Bn,Te)}}Tn||(Tn=new Or);var Ml=Tn.get(ie);if(Ml)return Ml;if(Tn.set(ie,hn),!Lr)var Lc=Pe?vl(ie):Bc(ie);return J(Lc||ie,function(pn,Io){Lc&&(Io=pn,pn=ie[Io]),Pn(hn,Io,Bn(pn,Te,Pe,ht,Io,ie,Tn))}),hn}i(Bn,"baseClone"),a(Bn,"baseClone");function Ti(ie){return Co(ie)?re(ie):{}}i(Ti,"baseCreate"),a(Ti,"baseCreate");function Mi(ie,Te,Pe){var ht=Te(ie);return Al(ie)?ht:M(ht,Pe(ie))}i(Mi,"baseGetAllKeys"),a(Mi,"baseGetAllKeys");function Ci(ie){return Re.call(ie)}i(Ci,"baseGetTag"),a(Ci,"baseGetTag");function Gs(ie){if(!Co(ie)||_l(ie))return!1;var Te=Tl(ie)||ge(ie)?je:S;return Te.test(vs(ie))}i(Gs,"baseIsNative"),a(Gs,"baseIsNative");function Ws(ie){if(!El(ie))return Mt(ie);var Te=[];for(var Pe in Object(ie))Ue.call(ie,Pe)&&Pe!="constructor"&&Te.push(Pe);return Te}i(Ws,"baseKeys"),a(Ws,"baseKeys");function Zs(ie,Te){if(Te)return ie.slice();var Pe=new ie.constructor(ie.length);return ie.copy(Pe),Pe}i(Zs,"cloneBuffer"),a(Zs,"cloneBuffer");function Ca(ie){var Te=new ie.constructor(ie.byteLength);return new ce(Te).set(new ce(ie)),Te}i(Ca,"cloneArrayBuffer"),a(Ca,"cloneArrayBuffer");function Td(ie,Te){var Pe=Te?Ca(ie.buffer):ie.buffer;return new ie.constructor(Pe,ie.byteOffset,ie.byteLength)}i(Td,"cloneDataView"),a(Td,"cloneDataView");function dl(ie,Te,Pe){var ht=Te?Pe(ke(ie),!0):ke(ie);return z(ht,N,new ie.constructor)}i(dl,"cloneMap"),a(dl,"cloneMap");function To(ie){var Te=new ie.constructor(ie.source,g.exec(ie));return Te.lastIndex=ie.lastIndex,Te}i(To,"cloneRegExp"),a(To,"cloneRegExp");function hl(ie,Te,Pe){var ht=Te?Pe(fe(ie),!0):fe(ie);return z(ht,Y,new ie.constructor)}i(hl,"cloneSet"),a(hl,"cloneSet");function Md(ie){return it?Object(it.call(ie)):{}}i(Md,"cloneSymbol"),a(Md,"cloneSymbol");function pl(ie,Te){var Pe=Te?Ca(ie.buffer):ie.buffer;return new ie.constructor(Pe,ie.byteOffset,ie.length)}i(pl,"cloneTypedArray"),a(pl,"cloneTypedArray");function ml(ie,Te){var Pe=-1,ht=ie.length;for(Te||(Te=Array(ht));++Pe<ht;)Te[Pe]=ie[Pe];return Te}i(ml,"copyArray"),a(ml,"copyArray");function Mo(ie,Te,Pe,ht){Pe||(Pe={});for(var qr=-1,sn=Te.length;++qr<sn;){var Tn=Te[qr],hn=ht?ht(Pe[Tn],ie[Tn],Tn,Pe,ie):void 0;Pn(Pe,Tn,hn===void 0?ie[Tn]:hn)}return Pe}i(Mo,"copyObject"),a(Mo,"copyObject");function Cd(ie,Te){return Mo(ie,Ys(ie),Te)}i(Cd,"copySymbols"),a(Cd,"copySymbols");function vl(ie){return Mi(ie,Bc,Ys)}i(vl,"getAllKeys"),a(vl,"getAllKeys");function Js(ie,Te){var Pe=ie.__data__;return wl(Te)?Pe[typeof Te=="string"?"string":"hash"]:Pe.map}i(Js,"getMapData"),a(Js,"getMapData");function Vi(ie,Te){var Pe=oe(ie,Te);return Gs(Pe)?Pe:void 0}i(Vi,"getNative"),a(Vi,"getNative");var Ys=xe?_e(xe,Object):yr,ms=Ci;(qe&&ms(new qe(new ArrayBuffer(1)))!=G||He&&ms(new He)!=y||Ot&&ms(Ot.resolve())!=O||dt&&ms(new dt)!=P||mt&&ms(new mt)!=j)&&(ms=a(function(ie){var Te=Re.call(ie),Pe=Te==T?ie.constructor:void 0,ht=Pe?vs(Pe):void 0;if(ht)switch(ht){case ct:return G;case ut:return y;case lr:return O;case lt:return P;case nt:return j}return Te},"getTag"));function gl(ie){var Te=ie.length,Pe=ie.constructor(Te);return Te&&typeof ie[0]=="string"&&Ue.call(ie,"index")&&(Pe.index=ie.index,Pe.input=ie.input),Pe}i(gl,"initCloneArray"),a(gl,"initCloneArray");function Id(ie){return typeof ie.constructor=="function"&&!El(ie)?Ti(Z(ie)):{}}i(Id,"initCloneObject"),a(Id,"initCloneObject");function yl(ie,Te,Pe,ht){var qr=ie.constructor;switch(Te){case V:return Ca(ie);case f:case h:return new qr(+ie);case G:return Td(ie,ht);case I:case H:case se:case ue:case me:case q:case w:case x:case m:return pl(ie,ht);case y:return dl(ie,ht,Pe);case _:case K:return new qr(ie);case R:return To(ie);case P:return hl(ie,ht,Pe);case U:return Md(ie)}}i(yl,"initCloneByTag"),a(yl,"initCloneByTag");function bl(ie,Te){return Te=Te??s,!!Te&&(typeof ie=="number"||D.test(ie))&&ie>-1&&ie%1==0&&ie<Te}i(bl,"isIndex"),a(bl,"isIndex");function wl(ie){var Te=typeof ie;return Te=="string"||Te=="number"||Te=="symbol"||Te=="boolean"?ie!=="__proto__":ie===null}i(wl,"isKeyable"),a(wl,"isKeyable");function _l(ie){return!!ve&&ve in ie}i(_l,"isMasked"),a(_l,"isMasked");function El(ie){var Te=ie&&ie.constructor,Pe=typeof Te=="function"&&Te.prototype||we;return ie===Pe}i(El,"isPrototype"),a(El,"isPrototype");function vs(ie){if(ie!=null){try{return Me.call(ie)}catch{}try{return ie+""}catch{}}return""}i(vs,"toSource"),a(vs,"toSource");function kd(ie){return Bn(ie,!0,!0)}i(kd,"cloneDeep6"),a(kd,"cloneDeep");function Pc(ie,Te){return ie===Te||ie!==ie&&Te!==Te}i(Pc,"eq4"),a(Pc,"eq");function Dd(ie){return Od(ie)&&Ue.call(ie,"callee")&&(!ye.call(ie,"callee")||Re.call(ie)==o)}i(Dd,"isArguments"),a(Dd,"isArguments");var Al=Array.isArray;function Sl(ie){return ie!=null&&Rd(ie.length)&&!Tl(ie)}i(Sl,"isArrayLike2"),a(Sl,"isArrayLike");function Od(ie){return Nd(ie)&&Sl(ie)}i(Od,"isArrayLikeObject"),a(Od,"isArrayLikeObject");var xl=De||mr;function Tl(ie){var Te=Co(ie)?Re.call(ie):"";return Te==v||Te==b}i(Tl,"isFunction2"),a(Tl,"isFunction");function Rd(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=s}i(Rd,"isLength"),a(Rd,"isLength");function Co(ie){var Te=typeof ie;return!!ie&&(Te=="object"||Te=="function")}i(Co,"isObject"),a(Co,"isObject");function Nd(ie){return!!ie&&typeof ie=="object"}i(Nd,"isObjectLike"),a(Nd,"isObjectLike");function Bc(ie){return Sl(ie)?xi(ie):Ws(ie)}i(Bc,"keys"),a(Bc,"keys");function yr(){return[]}i(yr,"stubArray"),a(yr,"stubArray");function mr(){return!1}i(mr,"stubFalse"),a(mr,"stubFalse"),t.exports=kd}}),T$=ze({"../../../node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js"(e,t){var r=typeof self<"u"?self:e,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return i(o,"F"),a(o,"F"),o.prototype=r,new o}();(function(o){var c=function(f){var h={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function p(m){return m&&DataView.prototype.isPrototypeOf(m)}if(i(p,"isDataView"),a(p,"isDataView"),h.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(m){return m&&v.indexOf(Object.prototype.toString.call(m))>-1};function y(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}i(y,"normalizeName"),a(y,"normalizeName");function _(m){return typeof m!="string"&&(m=String(m)),m}i(_,"normalizeValue"),a(_,"normalizeValue");function T(m){var d={next:function(){var g=m.shift();return{done:g===void 0,value:g}}};return h.iterable&&(d[Symbol.iterator]=function(){return d}),d}i(T,"iteratorFor"),a(T,"iteratorFor");function O(m){this.map={},m instanceof O?m.forEach(function(d,g){this.append(g,d)},this):Array.isArray(m)?m.forEach(function(d){this.append(d[0],d[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(d){this.append(d,m[d])},this)}i(O,"Headers"),a(O,"Headers"),O.prototype.append=function(m,d){m=y(m),d=_(d);var g=this.map[m];this.map[m]=g?g+", "+d:d},O.prototype.delete=function(m){delete this.map[y(m)]},O.prototype.get=function(m){return m=y(m),this.has(m)?this.map[m]:null},O.prototype.has=function(m){return this.map.hasOwnProperty(y(m))},O.prototype.set=function(m,d){this.map[y(m)]=_(d)},O.prototype.forEach=function(m,d){for(var g in this.map)this.map.hasOwnProperty(g)&&m.call(d,this.map[g],g,this)},O.prototype.keys=function(){var m=[];return this.forEach(function(d,g){m.push(g)}),T(m)},O.prototype.values=function(){var m=[];return this.forEach(function(d){m.push(d)}),T(m)},O.prototype.entries=function(){var m=[];return this.forEach(function(d,g){m.push([g,d])}),T(m)},h.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function R(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}i(R,"consumed"),a(R,"consumed");function P(m){return new Promise(function(d,g){m.onload=function(){d(m.result)},m.onerror=function(){g(m.error)}})}i(P,"fileReaderReady"),a(P,"fileReaderReady");function K(m){var d=new FileReader,g=P(d);return d.readAsArrayBuffer(m),g}i(K,"readBlobAsArrayBuffer"),a(K,"readBlobAsArrayBuffer");function U(m){var d=new FileReader,g=P(d);return d.readAsText(m),g}i(U,"readBlobAsText"),a(U,"readBlobAsText");function j(m){for(var d=new Uint8Array(m),g=new Array(d.length),S=0;S<d.length;S++)g[S]=String.fromCharCode(d[S]);return g.join("")}i(j,"readArrayBufferAsText"),a(j,"readArrayBufferAsText");function V(m){if(m.slice)return m.slice(0);var d=new Uint8Array(m.byteLength);return d.set(new Uint8Array(m)),d.buffer}i(V,"bufferClone"),a(V,"bufferClone");function G(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:h.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:h.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():h.arrayBuffer&&h.blob&&p(m)?(this._bodyArrayBuffer=V(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||b(m))?this._bodyArrayBuffer=V(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var m=R(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?R(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(K)}),this.text=function(){var m=R(this);if(m)return m;if(this._bodyBlob)return U(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(j(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}i(G,"Body"),a(G,"Body");var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(m){var d=m.toUpperCase();return I.indexOf(d)>-1?d:m}i(H,"normalizeMethod"),a(H,"normalizeMethod");function se(m,d){d=d||{};var g=d.body;if(m instanceof se){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,d.headers||(this.headers=new O(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!g&&m._bodyInit!=null&&(g=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=d.credentials||this.credentials||"same-origin",(d.headers||!this.headers)&&(this.headers=new O(d.headers)),this.method=H(d.method||this.method||"GET"),this.mode=d.mode||this.mode||null,this.signal=d.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&g)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(g)}i(se,"Request"),a(se,"Request"),se.prototype.clone=function(){return new se(this,{body:this._bodyInit})};function ue(m){var d=new FormData;return m.trim().split("&").forEach(function(g){if(g){var S=g.split("="),D=S.shift().replace(/\+/g," "),C=S.join("=").replace(/\+/g," ");d.append(decodeURIComponent(D),decodeURIComponent(C))}}),d}i(ue,"decode9"),a(ue,"decode");function me(m){var d=new O,g=m.replace(/\r?\n[\t ]+/g," ");return g.split(/\r?\n/).forEach(function(S){var D=S.split(":"),C=D.shift().trim();if(C){var E=D.join(":").trim();d.append(C,E)}}),d}i(me,"parseHeaders"),a(me,"parseHeaders"),G.call(se.prototype);function q(m,d){d||(d={}),this.type="default",this.status=d.status===void 0?200:d.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in d?d.statusText:"OK",this.headers=new O(d.headers),this.url=d.url||"",this._initBody(m)}i(q,"Response"),a(q,"Response"),G.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},q.error=function(){var m=new q(null,{status:0,statusText:""});return m.type="error",m};var w=[301,302,303,307,308];q.redirect=function(m,d){if(w.indexOf(d)===-1)throw new RangeError("Invalid status code");return new q(null,{status:d,headers:{location:m}})},f.DOMException=o.DOMException;try{new f.DOMException}catch{f.DOMException=function(d,g){this.message=d,this.name=g;var S=Error(d);this.stack=S.stack},f.DOMException.prototype=Object.create(Error.prototype),f.DOMException.prototype.constructor=f.DOMException}function x(m,d){return new Promise(function(g,S){var D=new se(m,d);if(D.signal&&D.signal.aborted)return S(new f.DOMException("Aborted","AbortError"));var C=new XMLHttpRequest;function E(){C.abort()}i(E,"abortXhr"),a(E,"abortXhr"),C.onload=function(){var B={status:C.status,statusText:C.statusText,headers:me(C.getAllResponseHeaders()||"")};B.url="responseURL"in C?C.responseURL:B.headers.get("X-Request-URL");var $="response"in C?C.response:C.responseText;g(new q($,B))},C.onerror=function(){S(new TypeError("Network request failed"))},C.ontimeout=function(){S(new TypeError("Network request failed"))},C.onabort=function(){S(new f.DOMException("Aborted","AbortError"))},C.open(D.method,D.url,!0),D.credentials==="include"?C.withCredentials=!0:D.credentials==="omit"&&(C.withCredentials=!1),"responseType"in C&&h.blob&&(C.responseType="blob"),D.headers.forEach(function(B,$){C.setRequestHeader($,B)}),D.signal&&(D.signal.addEventListener("abort",E),C.onreadystatechange=function(){C.readyState===4&&D.signal.removeEventListener("abort",E)}),C.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return i(x,"fetch2"),a(x,"fetch"),x.polyfill=!0,o.fetch||(o.fetch=x,o.Headers=O,o.Request=se,o.Response=q),f.Headers=O,f.Request=se,f.Response=q,f.fetch=x,Object.defineProperty(f,"__esModule",{value:!0}),f}({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=n;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e}}),M$=ze({"../../../node_modules/.pnpm/dataloader@2.2.2/node_modules/dataloader/index.js"(e,t){"use strict";var r=function(){function O(P,K){if(typeof P!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array<key> and returns Promise<Array<value>>, but got: "+P+"."));this._batchLoadFn=P,this._maxBatchSize=p(K),this._batchScheduleFn=v(K),this._cacheKeyFn=b(K),this._cacheMap=y(K),this._batch=null,this.name=_(K)}i(O,"DataLoader3"),a(O,"DataLoader");var R=O.prototype;return R.load=a(i(function(K){if(K==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(K)+"."));var U=o(this),j=this._cacheMap,V=this._cacheKeyFn(K);if(j){var G=j.get(V);if(G){var I=U.cacheHits||(U.cacheHits=[]);return new Promise(function(se){I.push(function(){se(G)})})}}U.keys.push(K);var H=new Promise(function(se,ue){U.callbacks.push({resolve:se,reject:ue})});return j&&j.set(V,H),H},"load"),"load"),R.loadMany=a(i(function(K){if(!T(K))throw new TypeError("The loader.loadMany() function must be called with Array<key> "+("but got: "+K+"."));for(var U=[],j=0;j<K.length;j++)U.push(this.load(K[j]).catch(function(V){return V}));return Promise.all(U)},"loadMany"),"loadMany"),R.clear=a(i(function(K){var U=this._cacheMap;if(U){var j=this._cacheKeyFn(K);U.delete(j)}return this},"clear"),"clear"),R.clearAll=a(i(function(){var K=this._cacheMap;return K&&K.clear(),this},"clearAll"),"clearAll"),R.prime=a(i(function(K,U){var j=this._cacheMap;if(j){var V=this._cacheKeyFn(K);if(j.get(V)===void 0){var G;U instanceof Error?(G=Promise.reject(U),G.catch(function(){})):G=Promise.resolve(U),j.set(V,G)}}return this},"prime"),"prime"),O}(),n=typeof process=="object"&&typeof process.nextTick=="function"?function(O){s||(s=Promise.resolve()),s.then(function(){process.nextTick(O)})}:typeof setImmediate=="function"?function(O){setImmediate(O)}:function(O){setTimeout(O)},s;function o(O){var R=O._batch;if(R!==null&&!R.hasDispatched&&R.keys.length<O._maxBatchSize)return R;var P={hasDispatched:!1,keys:[],callbacks:[]};return O._batch=P,O._batchScheduleFn(function(){c(O,P)}),P}i(o,"getCurrentBatch"),a(o,"getCurrentBatch");function c(O,R){if(R.hasDispatched=!0,R.keys.length===0){h(R);return}var P;try{P=O._batchLoadFn(R.keys)}catch(K){return f(O,R,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function "+("errored synchronously: "+String(K)+".")))}if(!P||typeof P.then!="function")return f(O,R,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise: "+String(P)+".")));P.then(function(K){if(!T(K))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise of an Array: "+String(K)+"."));if(K.length!==R.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(`
|
|
668
|
+
`}),m},"errorsToAscii2"),"errorsToAscii"),V=!1,G=!1,I=!1,H=!1,se=0,ue;if(this.errors=[],Buffer.isBuffer(n))this.chars=f.decode("BINARY",n);else if(Array.isArray(n))this.chars=n.slice();else if(typeof n=="string")this.chars=f.decode("STRING",n);else throw new Error(`${s}input source is not a string, byte Buffer or character array`);this.sabnf=f.encode("STRING",this.chars),this.scan=a(i(function(q,w){this.lines=h(this.chars,this.errors,q,w),V=!0},"scan"),"scan"),this.parse=a(i(function(q,w){if(!V)throw new Error(`${s}grammar not scanned`);p.syntax(this.chars,this.lines,this.errors,q,w),G=!0},"parse3"),"parse"),this.translate=a(i(function(){if(!G)throw new Error(`${s}grammar not scanned and parsed`);let q=p.semantic(this.chars,this.lines,this.errors);this.errors.length===0&&(this.rules=q.rules,this.udts=q.udts,ue=q.lineMap,I=!0)},"translate"),"translate"),this.attributes=a(i(function(){if(!I)throw new Error(`${s}grammar not scanned, parsed and translated`);return se=v(this.rules,this.udts,ue,this.errors),H=!0,se},"attrs"),"attrs"),this.generate=a(i(function(q){if(this.lines=h(this.chars,this.errors,q),this.errors.length||(p.syntax(this.chars,this.lines,this.errors,q),this.errors.length))return;let w=p.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=w.rules,this.udts=w.udts,ue=w.lineMap,se=v(this.rules,this.udts,ue,this.errors),H=!0)},"generate3"),"generate"),this.displayRules=a(i(function(q="index"){if(!I)throw new Error(`${s}grammar not scanned, parsed and translated`);return T(this.rules,this.udts,q)},"displayRules"),"displayRules"),this.displayRuleDependencies=a(i(function(q="index"){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return _(q)},"displayRuleDependencies"),"displayRuleDependencies"),this.displayAttributes=a(i(function(q="index"){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return se&&y(q),b(q)},"displayAttributes"),"displayAttributes"),this.displayAttributeErrors=a(i(function(){if(!H)throw new Error(`${s}no attributes - must be preceeded by call to attributes()`);return y()},"displayAttributeErrors"),"displayAttributeErrors"),this.toSource=a(i(function(q){if(!H)throw new Error(`${s}can't generate parser source - must be preceeded by call to attributes()`);if(se)throw new Error(`${s}can't generate parser source - attributes have ${se} errors`);return p.generateSource(this.chars,this.lines,this.rules,this.udts,q)},"toSource"),"toSource"),this.toObject=a(i(function(){if(!H)throw new Error(`${s}can't generate parser source - must be preceeded by call to attributes()`);if(se)throw new Error(`${s}can't generate parser source - attributes have ${se} errors`);return p.generateObject(this.sabnf,this.rules,this.udts)},"toObject"),"toObject"),this.errorsToAscii=a(i(function(){return j(this.errors,this.lines,this.chars)},"errorsToAsciiFunc"),"errorsToAsciiFunc"),this.errorsToHtml=a(i(function(q){return U(this.errors,this.lines,this.chars,q)},"errorsToHtmlFunc"),"errorsToHtmlFunc"),this.linesToAscii=a(i(function(){return P(this.lines)},"linesToAsciiFunc"),"linesToAsciiFunc"),this.linesToHtml=a(i(function(){return K(this.lines)},"linesToHtmlFunc"),"linesToHtmlFunc")},"api"),"api")}}),ax=ze({"../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js"(e,t){(function(r,n){"use strict";function s(m,d){if(!m)throw new Error(d||"Assertion failed")}i(s,"assert2"),a(s,"assert");function o(m,d){m.super_=d;var g=a(function(){},"TempCtor");g.prototype=d.prototype,m.prototype=new g,m.prototype.constructor=m}i(o,"inherits"),a(o,"inherits");function c(m,d,g){if(c.isBN(m))return m;this.negative=0,this.words=null,this.length=0,this.red=null,m!==null&&((d==="le"||d==="be")&&(g=d,d=10),this._init(m||0,d||10,g||"be"))}i(c,"BN3"),a(c,"BN"),typeof r=="object"?r.exports=c:n.BN=c,c.BN=c,c.wordSize=26;var f;try{typeof window<"u"&&typeof window.Buffer<"u"?f=window.Buffer:f=WS().Buffer}catch{}c.isBN=a(i(function(d){return d instanceof c?!0:d!==null&&typeof d=="object"&&d.constructor.wordSize===c.wordSize&&Array.isArray(d.words)},"isBN"),"isBN"),c.max=a(i(function(d,g){return d.cmp(g)>0?d:g},"max"),"max"),c.min=a(i(function(d,g){return d.cmp(g)<0?d:g},"min"),"min"),c.prototype._init=a(i(function(d,g,S){if(typeof d=="number")return this._initNumber(d,g,S);if(typeof d=="object")return this._initArray(d,g,S);g==="hex"&&(g=16),s(g===(g|0)&&g>=2&&g<=36),d=d.toString().replace(/\s+/g,"");var D=0;d[0]==="-"&&(D++,this.negative=1),D<d.length&&(g===16?this._parseHex(d,D,S):(this._parseBase(d,g,D),S==="le"&&this._initArray(this.toArray(),g,S)))},"init2"),"init"),c.prototype._initNumber=a(i(function(d,g,S){d<0&&(this.negative=1,d=-d),d<67108864?(this.words=[d&67108863],this.length=1):d<4503599627370496?(this.words=[d&67108863,d/67108864&67108863],this.length=2):(s(d<9007199254740992),this.words=[d&67108863,d/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),g,S)},"_initNumber"),"_initNumber"),c.prototype._initArray=a(i(function(d,g,S){if(s(typeof d.length=="number"),d.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(d.length/3),this.words=new Array(this.length);for(var D=0;D<this.length;D++)this.words[D]=0;var C,E,B=0;if(S==="be")for(D=d.length-1,C=0;D>=0;D-=3)E=d[D]|d[D-1]<<8|d[D-2]<<16,this.words[C]|=E<<B&67108863,this.words[C+1]=E>>>26-B&67108863,B+=24,B>=26&&(B-=26,C++);else if(S==="le")for(D=0,C=0;D<d.length;D+=3)E=d[D]|d[D+1]<<8|d[D+2]<<16,this.words[C]|=E<<B&67108863,this.words[C+1]=E>>>26-B&67108863,B+=24,B>=26&&(B-=26,C++);return this._strip()},"_initArray"),"_initArray");function h(m,d){var g=m.charCodeAt(d);if(g>=48&&g<=57)return g-48;if(g>=65&&g<=70)return g-55;if(g>=97&&g<=102)return g-87;s(!1,"Invalid character in "+m)}i(h,"parseHex4Bits"),a(h,"parseHex4Bits");function p(m,d,g){var S=h(m,g);return g-1>=d&&(S|=h(m,g-1)<<4),S}i(p,"parseHexByte"),a(p,"parseHexByte"),c.prototype._parseHex=a(i(function(d,g,S){this.length=Math.ceil((d.length-g)/6),this.words=new Array(this.length);for(var D=0;D<this.length;D++)this.words[D]=0;var C=0,E=0,B;if(S==="be")for(D=d.length-1;D>=g;D-=2)B=p(d,g,D)<<C,this.words[E]|=B&67108863,C>=18?(C-=18,E+=1,this.words[E]|=B>>>26):C+=8;else{var $=d.length-g;for(D=$%2===0?g+1:g;D<d.length;D+=2)B=p(d,g,D)<<C,this.words[E]|=B&67108863,C>=18?(C-=18,E+=1,this.words[E]|=B>>>26):C+=8}this._strip()},"_parseHex"),"_parseHex");function v(m,d,g,S){for(var D=0,C=0,E=Math.min(m.length,g),B=d;B<E;B++){var $=m.charCodeAt(B)-48;D*=S,$>=49?C=$-49+10:$>=17?C=$-17+10:C=$,s($>=0&&C<S,"Invalid character"),D+=C}return D}i(v,"parseBase"),a(v,"parseBase"),c.prototype._parseBase=a(i(function(d,g,S){this.words=[0],this.length=1;for(var D=0,C=1;C<=67108863;C*=g)D++;D--,C=C/g|0;for(var E=d.length-S,B=E%D,$=Math.min(E,E-B)+S,k=0,F=S;F<$;F+=D)k=v(d,F,F+D,g),this.imuln(C),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k);if(B!==0){var he=1;for(k=v(d,F,d.length,g),F=0;F<B;F++)he*=g;this.imuln(he),this.words[0]+k<67108864?this.words[0]+=k:this._iaddn(k)}this._strip()},"_parseBase"),"_parseBase"),c.prototype.copy=a(i(function(d){d.words=new Array(this.length);for(var g=0;g<this.length;g++)d.words[g]=this.words[g];d.length=this.length,d.negative=this.negative,d.red=this.red},"copy"),"copy");function b(m,d){m.words=d.words,m.length=d.length,m.negative=d.negative,m.red=d.red}if(i(b,"move"),a(b,"move"),c.prototype._move=a(i(function(d){b(d,this)},"_move"),"_move"),c.prototype.clone=a(i(function(){var d=new c(null);return this.copy(d),d},"clone"),"clone"),c.prototype._expand=a(i(function(d){for(;this.length<d;)this.words[this.length++]=0;return this},"_expand"),"_expand"),c.prototype._strip=a(i(function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},"strip"),"strip"),c.prototype._normSign=a(i(function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},"_normSign"),"_normSign"),typeof Symbol<"u"&&typeof Symbol.for=="function")try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=y}catch{c.prototype.inspect=y}else c.prototype.inspect=y;function y(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}i(y,"inspect4"),a(y,"inspect");var _=["","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"],T=[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],O=[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];c.prototype.toString=a(i(function(d,g){d=d||10,g=g|0||1;var S;if(d===16||d==="hex"){S="";for(var D=0,C=0,E=0;E<this.length;E++){var B=this.words[E],$=((B<<D|C)&16777215).toString(16);C=B>>>24-D&16777215,D+=2,D>=26&&(D-=26,E--),C!==0||E!==this.length-1?S=_[6-$.length]+$+S:S=$+S}for(C!==0&&(S=C.toString(16)+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(d===(d|0)&&d>=2&&d<=36){var k=T[d],F=O[d];S="";var he=this.clone();for(he.negative=0;!he.isZero();){var N=he.modrn(F).toString(d);he=he.idivn(F),he.isZero()?S=N+S:S=_[k-N.length]+N+S}for(this.isZero()&&(S="0"+S);S.length%g!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}s(!1,"Base should be between 2 and 36")},"toString4"),"toString"),c.prototype.toNumber=a(i(function(){var d=this.words[0];return this.length===2?d+=this.words[1]*67108864:this.length===3&&this.words[2]===1?d+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-d:d},"toNumber"),"toNumber"),c.prototype.toJSON=a(i(function(){return this.toString(16,2)},"toJSON2"),"toJSON"),f&&(c.prototype.toBuffer=a(i(function(d,g){return this.toArrayLike(f,d,g)},"toBuffer"),"toBuffer")),c.prototype.toArray=a(i(function(d,g){return this.toArrayLike(Array,d,g)},"toArray"),"toArray");var R=a(i(function(d,g){return d.allocUnsafe?d.allocUnsafe(g):new d(g)},"allocate2"),"allocate");c.prototype.toArrayLike=a(i(function(d,g,S){this._strip();var D=this.byteLength(),C=S||Math.max(1,D);s(D<=C,"byte array longer than desired length"),s(C>0,"Requested array length <= 0");var E=R(d,C),B=g==="le"?"LE":"BE";return this["_toArrayLike"+B](E,D),E},"toArrayLike"),"toArrayLike"),c.prototype._toArrayLikeLE=a(i(function(d,g){for(var S=0,D=0,C=0,E=0;C<this.length;C++){var B=this.words[C]<<E|D;d[S++]=B&255,S<d.length&&(d[S++]=B>>8&255),S<d.length&&(d[S++]=B>>16&255),E===6?(S<d.length&&(d[S++]=B>>24&255),D=0,E=0):(D=B>>>24,E+=2)}if(S<d.length)for(d[S++]=D;S<d.length;)d[S++]=0},"_toArrayLikeLE"),"_toArrayLikeLE"),c.prototype._toArrayLikeBE=a(i(function(d,g){for(var S=d.length-1,D=0,C=0,E=0;C<this.length;C++){var B=this.words[C]<<E|D;d[S--]=B&255,S>=0&&(d[S--]=B>>8&255),S>=0&&(d[S--]=B>>16&255),E===6?(S>=0&&(d[S--]=B>>24&255),D=0,E=0):(D=B>>>24,E+=2)}if(S>=0)for(d[S--]=D;S>=0;)d[S--]=0},"_toArrayLikeBE"),"_toArrayLikeBE"),Math.clz32?c.prototype._countBits=a(i(function(d){return 32-Math.clz32(d)},"_countBits"),"_countBits"):c.prototype._countBits=a(i(function(d){var g=d,S=0;return g>=4096&&(S+=13,g>>>=13),g>=64&&(S+=7,g>>>=7),g>=8&&(S+=4,g>>>=4),g>=2&&(S+=2,g>>>=2),S+g},"_countBits"),"_countBits"),c.prototype._zeroBits=a(i(function(d){if(d===0)return 26;var g=d,S=0;return(g&8191)===0&&(S+=13,g>>>=13),(g&127)===0&&(S+=7,g>>>=7),(g&15)===0&&(S+=4,g>>>=4),(g&3)===0&&(S+=2,g>>>=2),(g&1)===0&&S++,S},"_zeroBits"),"_zeroBits"),c.prototype.bitLength=a(i(function(){var d=this.words[this.length-1],g=this._countBits(d);return(this.length-1)*26+g},"bitLength"),"bitLength");function P(m){for(var d=new Array(m.bitLength()),g=0;g<d.length;g++){var S=g/26|0,D=g%26;d[g]=m.words[S]>>>D&1}return d}i(P,"toBitArray"),a(P,"toBitArray"),c.prototype.zeroBits=a(i(function(){if(this.isZero())return 0;for(var d=0,g=0;g<this.length;g++){var S=this._zeroBits(this.words[g]);if(d+=S,S!==26)break}return d},"zeroBits"),"zeroBits"),c.prototype.byteLength=a(i(function(){return Math.ceil(this.bitLength()/8)},"byteLength"),"byteLength"),c.prototype.toTwos=a(i(function(d){return this.negative!==0?this.abs().inotn(d).iaddn(1):this.clone()},"toTwos"),"toTwos"),c.prototype.fromTwos=a(i(function(d){return this.testn(d-1)?this.notn(d).iaddn(1).ineg():this.clone()},"fromTwos"),"fromTwos"),c.prototype.isNeg=a(i(function(){return this.negative!==0},"isNeg"),"isNeg"),c.prototype.neg=a(i(function(){return this.clone().ineg()},"neg3"),"neg"),c.prototype.ineg=a(i(function(){return this.isZero()||(this.negative^=1),this},"ineg"),"ineg"),c.prototype.iuor=a(i(function(d){for(;this.length<d.length;)this.words[this.length++]=0;for(var g=0;g<d.length;g++)this.words[g]=this.words[g]|d.words[g];return this._strip()},"iuor"),"iuor"),c.prototype.ior=a(i(function(d){return s((this.negative|d.negative)===0),this.iuor(d)},"ior"),"ior"),c.prototype.or=a(i(function(d){return this.length>d.length?this.clone().ior(d):d.clone().ior(this)},"or2"),"or"),c.prototype.uor=a(i(function(d){return this.length>d.length?this.clone().iuor(d):d.clone().iuor(this)},"uor"),"uor"),c.prototype.iuand=a(i(function(d){var g;this.length>d.length?g=d:g=this;for(var S=0;S<g.length;S++)this.words[S]=this.words[S]&d.words[S];return this.length=g.length,this._strip()},"iuand"),"iuand"),c.prototype.iand=a(i(function(d){return s((this.negative|d.negative)===0),this.iuand(d)},"iand"),"iand"),c.prototype.and=a(i(function(d){return this.length>d.length?this.clone().iand(d):d.clone().iand(this)},"and"),"and"),c.prototype.uand=a(i(function(d){return this.length>d.length?this.clone().iuand(d):d.clone().iuand(this)},"uand"),"uand"),c.prototype.iuxor=a(i(function(d){var g,S;this.length>d.length?(g=this,S=d):(g=d,S=this);for(var D=0;D<S.length;D++)this.words[D]=g.words[D]^S.words[D];if(this!==g)for(;D<g.length;D++)this.words[D]=g.words[D];return this.length=g.length,this._strip()},"iuxor"),"iuxor"),c.prototype.ixor=a(i(function(d){return s((this.negative|d.negative)===0),this.iuxor(d)},"ixor"),"ixor"),c.prototype.xor=a(i(function(d){return this.length>d.length?this.clone().ixor(d):d.clone().ixor(this)},"xor2"),"xor"),c.prototype.uxor=a(i(function(d){return this.length>d.length?this.clone().iuxor(d):d.clone().iuxor(this)},"uxor"),"uxor"),c.prototype.inotn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=Math.ceil(d/26)|0,S=d%26;this._expand(g),S>0&&g--;for(var D=0;D<g;D++)this.words[D]=~this.words[D]&67108863;return S>0&&(this.words[D]=~this.words[D]&67108863>>26-S),this._strip()},"inotn"),"inotn"),c.prototype.notn=a(i(function(d){return this.clone().inotn(d)},"notn"),"notn"),c.prototype.setn=a(i(function(d,g){s(typeof d=="number"&&d>=0);var S=d/26|0,D=d%26;return this._expand(S+1),g?this.words[S]=this.words[S]|1<<D:this.words[S]=this.words[S]&~(1<<D),this._strip()},"setn"),"setn"),c.prototype.iadd=a(i(function(d){var g;if(this.negative!==0&&d.negative===0)return this.negative=0,g=this.isub(d),this.negative^=1,this._normSign();if(this.negative===0&&d.negative!==0)return d.negative=0,g=this.isub(d),d.negative=1,g._normSign();var S,D;this.length>d.length?(S=this,D=d):(S=d,D=this);for(var C=0,E=0;E<D.length;E++)g=(S.words[E]|0)+(D.words[E]|0)+C,this.words[E]=g&67108863,C=g>>>26;for(;C!==0&&E<S.length;E++)g=(S.words[E]|0)+C,this.words[E]=g&67108863,C=g>>>26;if(this.length=S.length,C!==0)this.words[this.length]=C,this.length++;else if(S!==this)for(;E<S.length;E++)this.words[E]=S.words[E];return this},"iadd"),"iadd"),c.prototype.add=a(i(function(d){var g;return d.negative!==0&&this.negative===0?(d.negative=0,g=this.sub(d),d.negative^=1,g):d.negative===0&&this.negative!==0?(this.negative=0,g=d.sub(this),this.negative=1,g):this.length>d.length?this.clone().iadd(d):d.clone().iadd(this)},"add3"),"add"),c.prototype.isub=a(i(function(d){if(d.negative!==0){d.negative=0;var g=this.iadd(d);return d.negative=1,g._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(d),this.negative=1,this._normSign();var S=this.cmp(d);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var D,C;S>0?(D=this,C=d):(D=d,C=this);for(var E=0,B=0;B<C.length;B++)g=(D.words[B]|0)-(C.words[B]|0)+E,E=g>>26,this.words[B]=g&67108863;for(;E!==0&&B<D.length;B++)g=(D.words[B]|0)+E,E=g>>26,this.words[B]=g&67108863;if(E===0&&B<D.length&&D!==this)for(;B<D.length;B++)this.words[B]=D.words[B];return this.length=Math.max(this.length,B),D!==this&&(this.negative=1),this._strip()},"isub"),"isub"),c.prototype.sub=a(i(function(d){return this.clone().isub(d)},"sub"),"sub");function K(m,d,g){g.negative=d.negative^m.negative;var S=m.length+d.length|0;g.length=S,S=S-1|0;var D=m.words[0]|0,C=d.words[0]|0,E=D*C,B=E&67108863,$=E/67108864|0;g.words[0]=B;for(var k=1;k<S;k++){for(var F=$>>>26,he=$&67108863,N=Math.min(k,d.length-1),Y=Math.max(0,k-m.length+1);Y<=N;Y++){var J=k-Y|0;D=m.words[J]|0,C=d.words[Y]|0,E=D*C+he,F+=E/67108864|0,he=E&67108863}g.words[k]=he|0,$=F|0}return $!==0?g.words[k]=$|0:g.length--,g._strip()}i(K,"smallMulTo"),a(K,"smallMulTo");var U=a(i(function(d,g,S){var D=d.words,C=g.words,E=S.words,B=0,$,k,F,he=D[0]|0,N=he&8191,Y=he>>>13,J=D[1]|0,M=J&8191,z=J>>>13,re=D[2]|0,oe=re&8191,ge=re>>>13,ke=D[3]|0,_e=ke&8191,fe=ke>>>13,Ce=D[4]|0,pe=Ce&8191,we=Ce>>>13,Q=D[5]|0,ve=Q&8191,Me=Q>>>13,Ue=D[6]|0,Re=Ue&8191,je=Ue>>>13,rt=D[7]|0,le=rt&8191,ce=rt>>>13,Z=D[8]|0,ne=Z&8191,ye=Z>>>13,Se=D[9]|0,xe=Se&8191,De=Se>>>13,Mt=C[0]|0,qe=Mt&8191,He=Mt>>>13,Ot=C[1]|0,dt=Ot&8191,mt=Ot>>>13,Dr=C[2]|0,ct=Dr&8191,ut=Dr>>>13,lr=C[3]|0,lt=lr&8191,nt=lr>>>13,ar=C[4]|0,it=ar&8191,Ye=ar>>>13,Qt=C[5]|0,st=Qt&8191,Qe=Qt>>>13,or=C[6]|0,at=or&8191,Ze=or>>>13,cr=C[7]|0,ot=cr&8191,Et=cr>>>13,Sn=C[8]|0,At=Sn&8191,yt=Sn>>>13,fn=C[9]|0,er=fn&8191,tr=fn>>>13;S.negative=d.negative^g.negative,S.length=19,$=Math.imul(N,qe),k=Math.imul(N,He),k=k+Math.imul(Y,qe)|0,F=Math.imul(Y,He);var tn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(tn>>>26)|0,tn&=67108863,$=Math.imul(M,qe),k=Math.imul(M,He),k=k+Math.imul(z,qe)|0,F=Math.imul(z,He),$=$+Math.imul(N,dt)|0,k=k+Math.imul(N,mt)|0,k=k+Math.imul(Y,dt)|0,F=F+Math.imul(Y,mt)|0;var rn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(rn>>>26)|0,rn&=67108863,$=Math.imul(oe,qe),k=Math.imul(oe,He),k=k+Math.imul(ge,qe)|0,F=Math.imul(ge,He),$=$+Math.imul(M,dt)|0,k=k+Math.imul(M,mt)|0,k=k+Math.imul(z,dt)|0,F=F+Math.imul(z,mt)|0,$=$+Math.imul(N,ct)|0,k=k+Math.imul(N,ut)|0,k=k+Math.imul(Y,ct)|0,F=F+Math.imul(Y,ut)|0;var Or=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Or>>>26)|0,Or&=67108863,$=Math.imul(_e,qe),k=Math.imul(_e,He),k=k+Math.imul(fe,qe)|0,F=Math.imul(fe,He),$=$+Math.imul(oe,dt)|0,k=k+Math.imul(oe,mt)|0,k=k+Math.imul(ge,dt)|0,F=F+Math.imul(ge,mt)|0,$=$+Math.imul(M,ct)|0,k=k+Math.imul(M,ut)|0,k=k+Math.imul(z,ct)|0,F=F+Math.imul(z,ut)|0,$=$+Math.imul(N,lt)|0,k=k+Math.imul(N,nt)|0,k=k+Math.imul(Y,lt)|0,F=F+Math.imul(Y,nt)|0;var Hr=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Hr>>>26)|0,Hr&=67108863,$=Math.imul(pe,qe),k=Math.imul(pe,He),k=k+Math.imul(we,qe)|0,F=Math.imul(we,He),$=$+Math.imul(_e,dt)|0,k=k+Math.imul(_e,mt)|0,k=k+Math.imul(fe,dt)|0,F=F+Math.imul(fe,mt)|0,$=$+Math.imul(oe,ct)|0,k=k+Math.imul(oe,ut)|0,k=k+Math.imul(ge,ct)|0,F=F+Math.imul(ge,ut)|0,$=$+Math.imul(M,lt)|0,k=k+Math.imul(M,nt)|0,k=k+Math.imul(z,lt)|0,F=F+Math.imul(z,nt)|0,$=$+Math.imul(N,it)|0,k=k+Math.imul(N,Ye)|0,k=k+Math.imul(Y,it)|0,F=F+Math.imul(Y,Ye)|0;var nn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(nn>>>26)|0,nn&=67108863,$=Math.imul(ve,qe),k=Math.imul(ve,He),k=k+Math.imul(Me,qe)|0,F=Math.imul(Me,He),$=$+Math.imul(pe,dt)|0,k=k+Math.imul(pe,mt)|0,k=k+Math.imul(we,dt)|0,F=F+Math.imul(we,mt)|0,$=$+Math.imul(_e,ct)|0,k=k+Math.imul(_e,ut)|0,k=k+Math.imul(fe,ct)|0,F=F+Math.imul(fe,ut)|0,$=$+Math.imul(oe,lt)|0,k=k+Math.imul(oe,nt)|0,k=k+Math.imul(ge,lt)|0,F=F+Math.imul(ge,nt)|0,$=$+Math.imul(M,it)|0,k=k+Math.imul(M,Ye)|0,k=k+Math.imul(z,it)|0,F=F+Math.imul(z,Ye)|0,$=$+Math.imul(N,st)|0,k=k+Math.imul(N,Qe)|0,k=k+Math.imul(Y,st)|0,F=F+Math.imul(Y,Qe)|0;var xn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(xn>>>26)|0,xn&=67108863,$=Math.imul(Re,qe),k=Math.imul(Re,He),k=k+Math.imul(je,qe)|0,F=Math.imul(je,He),$=$+Math.imul(ve,dt)|0,k=k+Math.imul(ve,mt)|0,k=k+Math.imul(Me,dt)|0,F=F+Math.imul(Me,mt)|0,$=$+Math.imul(pe,ct)|0,k=k+Math.imul(pe,ut)|0,k=k+Math.imul(we,ct)|0,F=F+Math.imul(we,ut)|0,$=$+Math.imul(_e,lt)|0,k=k+Math.imul(_e,nt)|0,k=k+Math.imul(fe,lt)|0,F=F+Math.imul(fe,nt)|0,$=$+Math.imul(oe,it)|0,k=k+Math.imul(oe,Ye)|0,k=k+Math.imul(ge,it)|0,F=F+Math.imul(ge,Ye)|0,$=$+Math.imul(M,st)|0,k=k+Math.imul(M,Qe)|0,k=k+Math.imul(z,st)|0,F=F+Math.imul(z,Qe)|0,$=$+Math.imul(N,at)|0,k=k+Math.imul(N,Ze)|0,k=k+Math.imul(Y,at)|0,F=F+Math.imul(Y,Ze)|0;var Ai=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ai>>>26)|0,Ai&=67108863,$=Math.imul(le,qe),k=Math.imul(le,He),k=k+Math.imul(ce,qe)|0,F=Math.imul(ce,He),$=$+Math.imul(Re,dt)|0,k=k+Math.imul(Re,mt)|0,k=k+Math.imul(je,dt)|0,F=F+Math.imul(je,mt)|0,$=$+Math.imul(ve,ct)|0,k=k+Math.imul(ve,ut)|0,k=k+Math.imul(Me,ct)|0,F=F+Math.imul(Me,ut)|0,$=$+Math.imul(pe,lt)|0,k=k+Math.imul(pe,nt)|0,k=k+Math.imul(we,lt)|0,F=F+Math.imul(we,nt)|0,$=$+Math.imul(_e,it)|0,k=k+Math.imul(_e,Ye)|0,k=k+Math.imul(fe,it)|0,F=F+Math.imul(fe,Ye)|0,$=$+Math.imul(oe,st)|0,k=k+Math.imul(oe,Qe)|0,k=k+Math.imul(ge,st)|0,F=F+Math.imul(ge,Qe)|0,$=$+Math.imul(M,at)|0,k=k+Math.imul(M,Ze)|0,k=k+Math.imul(z,at)|0,F=F+Math.imul(z,Ze)|0,$=$+Math.imul(N,ot)|0,k=k+Math.imul(N,Et)|0,k=k+Math.imul(Y,ot)|0,F=F+Math.imul(Y,Et)|0;var Si=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Si>>>26)|0,Si&=67108863,$=Math.imul(ne,qe),k=Math.imul(ne,He),k=k+Math.imul(ye,qe)|0,F=Math.imul(ye,He),$=$+Math.imul(le,dt)|0,k=k+Math.imul(le,mt)|0,k=k+Math.imul(ce,dt)|0,F=F+Math.imul(ce,mt)|0,$=$+Math.imul(Re,ct)|0,k=k+Math.imul(Re,ut)|0,k=k+Math.imul(je,ct)|0,F=F+Math.imul(je,ut)|0,$=$+Math.imul(ve,lt)|0,k=k+Math.imul(ve,nt)|0,k=k+Math.imul(Me,lt)|0,F=F+Math.imul(Me,nt)|0,$=$+Math.imul(pe,it)|0,k=k+Math.imul(pe,Ye)|0,k=k+Math.imul(we,it)|0,F=F+Math.imul(we,Ye)|0,$=$+Math.imul(_e,st)|0,k=k+Math.imul(_e,Qe)|0,k=k+Math.imul(fe,st)|0,F=F+Math.imul(fe,Qe)|0,$=$+Math.imul(oe,at)|0,k=k+Math.imul(oe,Ze)|0,k=k+Math.imul(ge,at)|0,F=F+Math.imul(ge,Ze)|0,$=$+Math.imul(M,ot)|0,k=k+Math.imul(M,Et)|0,k=k+Math.imul(z,ot)|0,F=F+Math.imul(z,Et)|0,$=$+Math.imul(N,At)|0,k=k+Math.imul(N,yt)|0,k=k+Math.imul(Y,At)|0,F=F+Math.imul(Y,yt)|0;var xi=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(xi>>>26)|0,xi&=67108863,$=Math.imul(xe,qe),k=Math.imul(xe,He),k=k+Math.imul(De,qe)|0,F=Math.imul(De,He),$=$+Math.imul(ne,dt)|0,k=k+Math.imul(ne,mt)|0,k=k+Math.imul(ye,dt)|0,F=F+Math.imul(ye,mt)|0,$=$+Math.imul(le,ct)|0,k=k+Math.imul(le,ut)|0,k=k+Math.imul(ce,ct)|0,F=F+Math.imul(ce,ut)|0,$=$+Math.imul(Re,lt)|0,k=k+Math.imul(Re,nt)|0,k=k+Math.imul(je,lt)|0,F=F+Math.imul(je,nt)|0,$=$+Math.imul(ve,it)|0,k=k+Math.imul(ve,Ye)|0,k=k+Math.imul(Me,it)|0,F=F+Math.imul(Me,Ye)|0,$=$+Math.imul(pe,st)|0,k=k+Math.imul(pe,Qe)|0,k=k+Math.imul(we,st)|0,F=F+Math.imul(we,Qe)|0,$=$+Math.imul(_e,at)|0,k=k+Math.imul(_e,Ze)|0,k=k+Math.imul(fe,at)|0,F=F+Math.imul(fe,Ze)|0,$=$+Math.imul(oe,ot)|0,k=k+Math.imul(oe,Et)|0,k=k+Math.imul(ge,ot)|0,F=F+Math.imul(ge,Et)|0,$=$+Math.imul(M,At)|0,k=k+Math.imul(M,yt)|0,k=k+Math.imul(z,At)|0,F=F+Math.imul(z,yt)|0,$=$+Math.imul(N,er)|0,k=k+Math.imul(N,tr)|0,k=k+Math.imul(Y,er)|0,F=F+Math.imul(Y,tr)|0;var Pn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,$=Math.imul(xe,dt),k=Math.imul(xe,mt),k=k+Math.imul(De,dt)|0,F=Math.imul(De,mt),$=$+Math.imul(ne,ct)|0,k=k+Math.imul(ne,ut)|0,k=k+Math.imul(ye,ct)|0,F=F+Math.imul(ye,ut)|0,$=$+Math.imul(le,lt)|0,k=k+Math.imul(le,nt)|0,k=k+Math.imul(ce,lt)|0,F=F+Math.imul(ce,nt)|0,$=$+Math.imul(Re,it)|0,k=k+Math.imul(Re,Ye)|0,k=k+Math.imul(je,it)|0,F=F+Math.imul(je,Ye)|0,$=$+Math.imul(ve,st)|0,k=k+Math.imul(ve,Qe)|0,k=k+Math.imul(Me,st)|0,F=F+Math.imul(Me,Qe)|0,$=$+Math.imul(pe,at)|0,k=k+Math.imul(pe,Ze)|0,k=k+Math.imul(we,at)|0,F=F+Math.imul(we,Ze)|0,$=$+Math.imul(_e,ot)|0,k=k+Math.imul(_e,Et)|0,k=k+Math.imul(fe,ot)|0,F=F+Math.imul(fe,Et)|0,$=$+Math.imul(oe,At)|0,k=k+Math.imul(oe,yt)|0,k=k+Math.imul(ge,At)|0,F=F+Math.imul(ge,yt)|0,$=$+Math.imul(M,er)|0,k=k+Math.imul(M,tr)|0,k=k+Math.imul(z,er)|0,F=F+Math.imul(z,tr)|0;var dn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(dn>>>26)|0,dn&=67108863,$=Math.imul(xe,ct),k=Math.imul(xe,ut),k=k+Math.imul(De,ct)|0,F=Math.imul(De,ut),$=$+Math.imul(ne,lt)|0,k=k+Math.imul(ne,nt)|0,k=k+Math.imul(ye,lt)|0,F=F+Math.imul(ye,nt)|0,$=$+Math.imul(le,it)|0,k=k+Math.imul(le,Ye)|0,k=k+Math.imul(ce,it)|0,F=F+Math.imul(ce,Ye)|0,$=$+Math.imul(Re,st)|0,k=k+Math.imul(Re,Qe)|0,k=k+Math.imul(je,st)|0,F=F+Math.imul(je,Qe)|0,$=$+Math.imul(ve,at)|0,k=k+Math.imul(ve,Ze)|0,k=k+Math.imul(Me,at)|0,F=F+Math.imul(Me,Ze)|0,$=$+Math.imul(pe,ot)|0,k=k+Math.imul(pe,Et)|0,k=k+Math.imul(we,ot)|0,F=F+Math.imul(we,Et)|0,$=$+Math.imul(_e,At)|0,k=k+Math.imul(_e,yt)|0,k=k+Math.imul(fe,At)|0,F=F+Math.imul(fe,yt)|0,$=$+Math.imul(oe,er)|0,k=k+Math.imul(oe,tr)|0,k=k+Math.imul(ge,er)|0,F=F+Math.imul(ge,tr)|0;var Xn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,$=Math.imul(xe,lt),k=Math.imul(xe,nt),k=k+Math.imul(De,lt)|0,F=Math.imul(De,nt),$=$+Math.imul(ne,it)|0,k=k+Math.imul(ne,Ye)|0,k=k+Math.imul(ye,it)|0,F=F+Math.imul(ye,Ye)|0,$=$+Math.imul(le,st)|0,k=k+Math.imul(le,Qe)|0,k=k+Math.imul(ce,st)|0,F=F+Math.imul(ce,Qe)|0,$=$+Math.imul(Re,at)|0,k=k+Math.imul(Re,Ze)|0,k=k+Math.imul(je,at)|0,F=F+Math.imul(je,Ze)|0,$=$+Math.imul(ve,ot)|0,k=k+Math.imul(ve,Et)|0,k=k+Math.imul(Me,ot)|0,F=F+Math.imul(Me,Et)|0,$=$+Math.imul(pe,At)|0,k=k+Math.imul(pe,yt)|0,k=k+Math.imul(we,At)|0,F=F+Math.imul(we,yt)|0,$=$+Math.imul(_e,er)|0,k=k+Math.imul(_e,tr)|0,k=k+Math.imul(fe,er)|0,F=F+Math.imul(fe,tr)|0;var Bn=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,$=Math.imul(xe,it),k=Math.imul(xe,Ye),k=k+Math.imul(De,it)|0,F=Math.imul(De,Ye),$=$+Math.imul(ne,st)|0,k=k+Math.imul(ne,Qe)|0,k=k+Math.imul(ye,st)|0,F=F+Math.imul(ye,Qe)|0,$=$+Math.imul(le,at)|0,k=k+Math.imul(le,Ze)|0,k=k+Math.imul(ce,at)|0,F=F+Math.imul(ce,Ze)|0,$=$+Math.imul(Re,ot)|0,k=k+Math.imul(Re,Et)|0,k=k+Math.imul(je,ot)|0,F=F+Math.imul(je,Et)|0,$=$+Math.imul(ve,At)|0,k=k+Math.imul(ve,yt)|0,k=k+Math.imul(Me,At)|0,F=F+Math.imul(Me,yt)|0,$=$+Math.imul(pe,er)|0,k=k+Math.imul(pe,tr)|0,k=k+Math.imul(we,er)|0,F=F+Math.imul(we,tr)|0;var Ti=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,$=Math.imul(xe,st),k=Math.imul(xe,Qe),k=k+Math.imul(De,st)|0,F=Math.imul(De,Qe),$=$+Math.imul(ne,at)|0,k=k+Math.imul(ne,Ze)|0,k=k+Math.imul(ye,at)|0,F=F+Math.imul(ye,Ze)|0,$=$+Math.imul(le,ot)|0,k=k+Math.imul(le,Et)|0,k=k+Math.imul(ce,ot)|0,F=F+Math.imul(ce,Et)|0,$=$+Math.imul(Re,At)|0,k=k+Math.imul(Re,yt)|0,k=k+Math.imul(je,At)|0,F=F+Math.imul(je,yt)|0,$=$+Math.imul(ve,er)|0,k=k+Math.imul(ve,tr)|0,k=k+Math.imul(Me,er)|0,F=F+Math.imul(Me,tr)|0;var Mi=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,$=Math.imul(xe,at),k=Math.imul(xe,Ze),k=k+Math.imul(De,at)|0,F=Math.imul(De,Ze),$=$+Math.imul(ne,ot)|0,k=k+Math.imul(ne,Et)|0,k=k+Math.imul(ye,ot)|0,F=F+Math.imul(ye,Et)|0,$=$+Math.imul(le,At)|0,k=k+Math.imul(le,yt)|0,k=k+Math.imul(ce,At)|0,F=F+Math.imul(ce,yt)|0,$=$+Math.imul(Re,er)|0,k=k+Math.imul(Re,tr)|0,k=k+Math.imul(je,er)|0,F=F+Math.imul(je,tr)|0;var Ci=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ci>>>26)|0,Ci&=67108863,$=Math.imul(xe,ot),k=Math.imul(xe,Et),k=k+Math.imul(De,ot)|0,F=Math.imul(De,Et),$=$+Math.imul(ne,At)|0,k=k+Math.imul(ne,yt)|0,k=k+Math.imul(ye,At)|0,F=F+Math.imul(ye,yt)|0,$=$+Math.imul(le,er)|0,k=k+Math.imul(le,tr)|0,k=k+Math.imul(ce,er)|0,F=F+Math.imul(ce,tr)|0;var Gs=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Gs>>>26)|0,Gs&=67108863,$=Math.imul(xe,At),k=Math.imul(xe,yt),k=k+Math.imul(De,At)|0,F=Math.imul(De,yt),$=$+Math.imul(ne,er)|0,k=k+Math.imul(ne,tr)|0,k=k+Math.imul(ye,er)|0,F=F+Math.imul(ye,tr)|0;var Ws=(B+$|0)+((k&8191)<<13)|0;B=(F+(k>>>13)|0)+(Ws>>>26)|0,Ws&=67108863,$=Math.imul(xe,er),k=Math.imul(xe,tr),k=k+Math.imul(De,er)|0,F=Math.imul(De,tr);var Zs=(B+$|0)+((k&8191)<<13)|0;return B=(F+(k>>>13)|0)+(Zs>>>26)|0,Zs&=67108863,E[0]=tn,E[1]=rn,E[2]=Or,E[3]=Hr,E[4]=nn,E[5]=xn,E[6]=Ai,E[7]=Si,E[8]=xi,E[9]=Pn,E[10]=dn,E[11]=Xn,E[12]=Bn,E[13]=Ti,E[14]=Mi,E[15]=Ci,E[16]=Gs,E[17]=Ws,E[18]=Zs,B!==0&&(E[19]=B,S.length++),S},"comb10MulTo2"),"comb10MulTo");Math.imul||(U=K);function j(m,d,g){g.negative=d.negative^m.negative,g.length=m.length+d.length;for(var S=0,D=0,C=0;C<g.length-1;C++){var E=D;D=0;for(var B=S&67108863,$=Math.min(C,d.length-1),k=Math.max(0,C-m.length+1);k<=$;k++){var F=C-k,he=m.words[F]|0,N=d.words[k]|0,Y=he*N,J=Y&67108863;E=E+(Y/67108864|0)|0,J=J+B|0,B=J&67108863,E=E+(J>>>26)|0,D+=E>>>26,E&=67108863}g.words[C]=B,S=E,E=D}return S!==0?g.words[C]=S:g.length--,g._strip()}i(j,"bigMulTo"),a(j,"bigMulTo");function V(m,d,g){return j(m,d,g)}i(V,"jumboMulTo"),a(V,"jumboMulTo"),c.prototype.mulTo=a(i(function(d,g){var S,D=this.length+d.length;return this.length===10&&d.length===10?S=U(this,d,g):D<63?S=K(this,d,g):D<1024?S=j(this,d,g):S=V(this,d,g),S},"mulTo"),"mulTo");function G(m,d){this.x=m,this.y=d}i(G,"FFTM"),a(G,"FFTM"),G.prototype.makeRBT=a(i(function(d){for(var g=new Array(d),S=c.prototype._countBits(d)-1,D=0;D<d;D++)g[D]=this.revBin(D,S,d);return g},"makeRBT"),"makeRBT"),G.prototype.revBin=a(i(function(d,g,S){if(d===0||d===S-1)return d;for(var D=0,C=0;C<g;C++)D|=(d&1)<<g-C-1,d>>=1;return D},"revBin"),"revBin"),G.prototype.permute=a(i(function(d,g,S,D,C,E){for(var B=0;B<E;B++)D[B]=g[d[B]],C[B]=S[d[B]]},"permute"),"permute"),G.prototype.transform=a(i(function(d,g,S,D,C,E){this.permute(E,d,g,S,D,C);for(var B=1;B<C;B<<=1)for(var $=B<<1,k=Math.cos(2*Math.PI/$),F=Math.sin(2*Math.PI/$),he=0;he<C;he+=$)for(var N=k,Y=F,J=0;J<B;J++){var M=S[he+J],z=D[he+J],re=S[he+J+B],oe=D[he+J+B],ge=N*re-Y*oe;oe=N*oe+Y*re,re=ge,S[he+J]=M+re,D[he+J]=z+oe,S[he+J+B]=M-re,D[he+J+B]=z-oe,J!==$&&(ge=k*N-F*Y,Y=k*Y+F*N,N=ge)}},"transform"),"transform"),G.prototype.guessLen13b=a(i(function(d,g){var S=Math.max(g,d)|1,D=S&1,C=0;for(S=S/2|0;S;S=S>>>1)C++;return 1<<C+1+D},"guessLen13b"),"guessLen13b"),G.prototype.conjugate=a(i(function(d,g,S){if(!(S<=1))for(var D=0;D<S/2;D++){var C=d[D];d[D]=d[S-D-1],d[S-D-1]=C,C=g[D],g[D]=-g[S-D-1],g[S-D-1]=-C}},"conjugate"),"conjugate"),G.prototype.normalize13b=a(i(function(d,g){for(var S=0,D=0;D<g/2;D++){var C=Math.round(d[2*D+1]/g)*8192+Math.round(d[2*D]/g)+S;d[D]=C&67108863,C<67108864?S=0:S=C/67108864|0}return d},"normalize13b"),"normalize13b"),G.prototype.convert13b=a(i(function(d,g,S,D){for(var C=0,E=0;E<g;E++)C=C+(d[E]|0),S[2*E]=C&8191,C=C>>>13,S[2*E+1]=C&8191,C=C>>>13;for(E=2*g;E<D;++E)S[E]=0;s(C===0),s((C&-8192)===0)},"convert13b"),"convert13b"),G.prototype.stub=a(i(function(d){for(var g=new Array(d),S=0;S<d;S++)g[S]=0;return g},"stub"),"stub"),G.prototype.mulp=a(i(function(d,g,S){var D=2*this.guessLen13b(d.length,g.length),C=this.makeRBT(D),E=this.stub(D),B=new Array(D),$=new Array(D),k=new Array(D),F=new Array(D),he=new Array(D),N=new Array(D),Y=S.words;Y.length=D,this.convert13b(d.words,d.length,B,D),this.convert13b(g.words,g.length,F,D),this.transform(B,E,$,k,D,C),this.transform(F,E,he,N,D,C);for(var J=0;J<D;J++){var M=$[J]*he[J]-k[J]*N[J];k[J]=$[J]*N[J]+k[J]*he[J],$[J]=M}return this.conjugate($,k,D),this.transform($,k,Y,E,D,C),this.conjugate(Y,E,D),this.normalize13b(Y,D),S.negative=d.negative^g.negative,S.length=d.length+g.length,S._strip()},"mulp"),"mulp"),c.prototype.mul=a(i(function(d){var g=new c(null);return g.words=new Array(this.length+d.length),this.mulTo(d,g)},"mul3"),"mul"),c.prototype.mulf=a(i(function(d){var g=new c(null);return g.words=new Array(this.length+d.length),V(this,d,g)},"mulf"),"mulf"),c.prototype.imul=a(i(function(d){return this.clone().mulTo(d,this)},"imul"),"imul"),c.prototype.imuln=a(i(function(d){var g=d<0;g&&(d=-d),s(typeof d=="number"),s(d<67108864);for(var S=0,D=0;D<this.length;D++){var C=(this.words[D]|0)*d,E=(C&67108863)+(S&67108863);S>>=26,S+=C/67108864|0,S+=E>>>26,this.words[D]=E&67108863}return S!==0&&(this.words[D]=S,this.length++),g?this.ineg():this},"imuln"),"imuln"),c.prototype.muln=a(i(function(d){return this.clone().imuln(d)},"muln"),"muln"),c.prototype.sqr=a(i(function(){return this.mul(this)},"sqr"),"sqr"),c.prototype.isqr=a(i(function(){return this.imul(this.clone())},"isqr"),"isqr"),c.prototype.pow=a(i(function(d){var g=P(d);if(g.length===0)return new c(1);for(var S=this,D=0;D<g.length&&g[D]===0;D++,S=S.sqr());if(++D<g.length)for(var C=S.sqr();D<g.length;D++,C=C.sqr())g[D]!==0&&(S=S.mul(C));return S},"pow"),"pow"),c.prototype.iushln=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26,D=67108863>>>26-g<<26-g,C;if(g!==0){var E=0;for(C=0;C<this.length;C++){var B=this.words[C]&D,$=(this.words[C]|0)-B<<g;this.words[C]=$|E,E=B>>>26-g}E&&(this.words[C]=E,this.length++)}if(S!==0){for(C=this.length-1;C>=0;C--)this.words[C+S]=this.words[C];for(C=0;C<S;C++)this.words[C]=0;this.length+=S}return this._strip()},"iushln"),"iushln"),c.prototype.ishln=a(i(function(d){return s(this.negative===0),this.iushln(d)},"ishln"),"ishln"),c.prototype.iushrn=a(i(function(d,g,S){s(typeof d=="number"&&d>=0);var D;g?D=(g-g%26)/26:D=0;var C=d%26,E=Math.min((d-C)/26,this.length),B=67108863^67108863>>>C<<C,$=S;if(D-=E,D=Math.max(0,D),$){for(var k=0;k<E;k++)$.words[k]=this.words[k];$.length=E}if(E!==0)if(this.length>E)for(this.length-=E,k=0;k<this.length;k++)this.words[k]=this.words[k+E];else this.words[0]=0,this.length=1;var F=0;for(k=this.length-1;k>=0&&(F!==0||k>=D);k--){var he=this.words[k]|0;this.words[k]=F<<26-C|he>>>C,F=he&B}return $&&F!==0&&($.words[$.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},"iushrn"),"iushrn"),c.prototype.ishrn=a(i(function(d,g,S){return s(this.negative===0),this.iushrn(d,g,S)},"ishrn"),"ishrn"),c.prototype.shln=a(i(function(d){return this.clone().ishln(d)},"shln"),"shln"),c.prototype.ushln=a(i(function(d){return this.clone().iushln(d)},"ushln"),"ushln"),c.prototype.shrn=a(i(function(d){return this.clone().ishrn(d)},"shrn"),"shrn"),c.prototype.ushrn=a(i(function(d){return this.clone().iushrn(d)},"ushrn"),"ushrn"),c.prototype.testn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26,D=1<<g;if(this.length<=S)return!1;var C=this.words[S];return!!(C&D)},"testn"),"testn"),c.prototype.imaskn=a(i(function(d){s(typeof d=="number"&&d>=0);var g=d%26,S=(d-g)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(g!==0&&S++,this.length=Math.min(S,this.length),g!==0){var D=67108863^67108863>>>g<<g;this.words[this.length-1]&=D}return this._strip()},"imaskn"),"imaskn"),c.prototype.maskn=a(i(function(d){return this.clone().imaskn(d)},"maskn"),"maskn"),c.prototype.iaddn=a(i(function(d){return s(typeof d=="number"),s(d<67108864),d<0?this.isubn(-d):this.negative!==0?this.length===1&&(this.words[0]|0)<=d?(this.words[0]=d-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(d),this.negative=1,this):this._iaddn(d)},"iaddn"),"iaddn"),c.prototype._iaddn=a(i(function(d){this.words[0]+=d;for(var g=0;g<this.length&&this.words[g]>=67108864;g++)this.words[g]-=67108864,g===this.length-1?this.words[g+1]=1:this.words[g+1]++;return this.length=Math.max(this.length,g+1),this},"_iaddn"),"_iaddn"),c.prototype.isubn=a(i(function(d){if(s(typeof d=="number"),s(d<67108864),d<0)return this.iaddn(-d);if(this.negative!==0)return this.negative=0,this.iaddn(d),this.negative=1,this;if(this.words[0]-=d,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var g=0;g<this.length&&this.words[g]<0;g++)this.words[g]+=67108864,this.words[g+1]-=1;return this._strip()},"isubn"),"isubn"),c.prototype.addn=a(i(function(d){return this.clone().iaddn(d)},"addn"),"addn"),c.prototype.subn=a(i(function(d){return this.clone().isubn(d)},"subn"),"subn"),c.prototype.iabs=a(i(function(){return this.negative=0,this},"iabs"),"iabs"),c.prototype.abs=a(i(function(){return this.clone().iabs()},"abs"),"abs"),c.prototype._ishlnsubmul=a(i(function(d,g,S){var D=d.length+S,C;this._expand(D);var E,B=0;for(C=0;C<d.length;C++){E=(this.words[C+S]|0)+B;var $=(d.words[C]|0)*g;E-=$&67108863,B=(E>>26)-($/67108864|0),this.words[C+S]=E&67108863}for(;C<this.length-S;C++)E=(this.words[C+S]|0)+B,B=E>>26,this.words[C+S]=E&67108863;if(B===0)return this._strip();for(s(B===-1),B=0,C=0;C<this.length;C++)E=-(this.words[C]|0)+B,B=E>>26,this.words[C]=E&67108863;return this.negative=1,this._strip()},"_ishlnsubmul"),"_ishlnsubmul"),c.prototype._wordDiv=a(i(function(d,g){var S=this.length-d.length,D=this.clone(),C=d,E=C.words[C.length-1]|0,B=this._countBits(E);S=26-B,S!==0&&(C=C.ushln(S),D.iushln(S),E=C.words[C.length-1]|0);var $=D.length-C.length,k;if(g!=="mod"){k=new c(null),k.length=$+1,k.words=new Array(k.length);for(var F=0;F<k.length;F++)k.words[F]=0}var he=D.clone()._ishlnsubmul(C,1,$);he.negative===0&&(D=he,k&&(k.words[$]=1));for(var N=$-1;N>=0;N--){var Y=(D.words[C.length+N]|0)*67108864+(D.words[C.length+N-1]|0);for(Y=Math.min(Y/E|0,67108863),D._ishlnsubmul(C,Y,N);D.negative!==0;)Y--,D.negative=0,D._ishlnsubmul(C,1,N),D.isZero()||(D.negative^=1);k&&(k.words[N]=Y)}return k&&k._strip(),D._strip(),g!=="div"&&S!==0&&D.iushrn(S),{div:k||null,mod:D}},"_wordDiv"),"_wordDiv"),c.prototype.divmod=a(i(function(d,g,S){if(s(!d.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var D,C,E;return this.negative!==0&&d.negative===0?(E=this.neg().divmod(d,g),g!=="mod"&&(D=E.div.neg()),g!=="div"&&(C=E.mod.neg(),S&&C.negative!==0&&C.iadd(d)),{div:D,mod:C}):this.negative===0&&d.negative!==0?(E=this.divmod(d.neg(),g),g!=="mod"&&(D=E.div.neg()),{div:D,mod:E.mod}):(this.negative&d.negative)!==0?(E=this.neg().divmod(d.neg(),g),g!=="div"&&(C=E.mod.neg(),S&&C.negative!==0&&C.isub(d)),{div:E.div,mod:C}):d.length>this.length||this.cmp(d)<0?{div:new c(0),mod:this}:d.length===1?g==="div"?{div:this.divn(d.words[0]),mod:null}:g==="mod"?{div:null,mod:new c(this.modrn(d.words[0]))}:{div:this.divn(d.words[0]),mod:new c(this.modrn(d.words[0]))}:this._wordDiv(d,g)},"divmod"),"divmod"),c.prototype.div=a(i(function(d){return this.divmod(d,"div",!1).div},"div"),"div"),c.prototype.mod=a(i(function(d){return this.divmod(d,"mod",!1).mod},"mod2"),"mod"),c.prototype.umod=a(i(function(d){return this.divmod(d,"mod",!0).mod},"umod"),"umod"),c.prototype.divRound=a(i(function(d){var g=this.divmod(d);if(g.mod.isZero())return g.div;var S=g.div.negative!==0?g.mod.isub(d):g.mod,D=d.ushrn(1),C=d.andln(1),E=S.cmp(D);return E<0||C===1&&E===0?g.div:g.div.negative!==0?g.div.isubn(1):g.div.iaddn(1)},"divRound"),"divRound"),c.prototype.modrn=a(i(function(d){var g=d<0;g&&(d=-d),s(d<=67108863);for(var S=(1<<26)%d,D=0,C=this.length-1;C>=0;C--)D=(S*D+(this.words[C]|0))%d;return g?-D:D},"modrn"),"modrn"),c.prototype.modn=a(i(function(d){return this.modrn(d)},"modn"),"modn"),c.prototype.idivn=a(i(function(d){var g=d<0;g&&(d=-d),s(d<=67108863);for(var S=0,D=this.length-1;D>=0;D--){var C=(this.words[D]|0)+S*67108864;this.words[D]=C/d|0,S=C%d}return this._strip(),g?this.ineg():this},"idivn"),"idivn"),c.prototype.divn=a(i(function(d){return this.clone().idivn(d)},"divn"),"divn"),c.prototype.egcd=a(i(function(d){s(d.negative===0),s(!d.isZero());var g=this,S=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var D=new c(1),C=new c(0),E=new c(0),B=new c(1),$=0;g.isEven()&&S.isEven();)g.iushrn(1),S.iushrn(1),++$;for(var k=S.clone(),F=g.clone();!g.isZero();){for(var he=0,N=1;(g.words[0]&N)===0&&he<26;++he,N<<=1);if(he>0)for(g.iushrn(he);he-- >0;)(D.isOdd()||C.isOdd())&&(D.iadd(k),C.isub(F)),D.iushrn(1),C.iushrn(1);for(var Y=0,J=1;(S.words[0]&J)===0&&Y<26;++Y,J<<=1);if(Y>0)for(S.iushrn(Y);Y-- >0;)(E.isOdd()||B.isOdd())&&(E.iadd(k),B.isub(F)),E.iushrn(1),B.iushrn(1);g.cmp(S)>=0?(g.isub(S),D.isub(E),C.isub(B)):(S.isub(g),E.isub(D),B.isub(C))}return{a:E,b:B,gcd:S.iushln($)}},"egcd"),"egcd"),c.prototype._invmp=a(i(function(d){s(d.negative===0),s(!d.isZero());var g=this,S=d.clone();g.negative!==0?g=g.umod(d):g=g.clone();for(var D=new c(1),C=new c(0),E=S.clone();g.cmpn(1)>0&&S.cmpn(1)>0;){for(var B=0,$=1;(g.words[0]&$)===0&&B<26;++B,$<<=1);if(B>0)for(g.iushrn(B);B-- >0;)D.isOdd()&&D.iadd(E),D.iushrn(1);for(var k=0,F=1;(S.words[0]&F)===0&&k<26;++k,F<<=1);if(k>0)for(S.iushrn(k);k-- >0;)C.isOdd()&&C.iadd(E),C.iushrn(1);g.cmp(S)>=0?(g.isub(S),D.isub(C)):(S.isub(g),C.isub(D))}var he;return g.cmpn(1)===0?he=D:he=C,he.cmpn(0)<0&&he.iadd(d),he},"_invmp"),"_invmp"),c.prototype.gcd=a(i(function(d){if(this.isZero())return d.abs();if(d.isZero())return this.abs();var g=this.clone(),S=d.clone();g.negative=0,S.negative=0;for(var D=0;g.isEven()&&S.isEven();D++)g.iushrn(1),S.iushrn(1);do{for(;g.isEven();)g.iushrn(1);for(;S.isEven();)S.iushrn(1);var C=g.cmp(S);if(C<0){var E=g;g=S,S=E}else if(C===0||S.cmpn(1)===0)break;g.isub(S)}while(!0);return S.iushln(D)},"gcd"),"gcd"),c.prototype.invm=a(i(function(d){return this.egcd(d).a.umod(d)},"invm"),"invm"),c.prototype.isEven=a(i(function(){return(this.words[0]&1)===0},"isEven"),"isEven"),c.prototype.isOdd=a(i(function(){return(this.words[0]&1)===1},"isOdd"),"isOdd"),c.prototype.andln=a(i(function(d){return this.words[0]&d},"andln"),"andln"),c.prototype.bincn=a(i(function(d){s(typeof d=="number");var g=d%26,S=(d-g)/26,D=1<<g;if(this.length<=S)return this._expand(S+1),this.words[S]|=D,this;for(var C=D,E=S;C!==0&&E<this.length;E++){var B=this.words[E]|0;B+=C,C=B>>>26,B&=67108863,this.words[E]=B}return C!==0&&(this.words[E]=C,this.length++),this},"bincn"),"bincn"),c.prototype.isZero=a(i(function(){return this.length===1&&this.words[0]===0},"isZero"),"isZero"),c.prototype.cmpn=a(i(function(d){var g=d<0;if(this.negative!==0&&!g)return-1;if(this.negative===0&&g)return 1;this._strip();var S;if(this.length>1)S=1;else{g&&(d=-d),s(d<=67108863,"Number is too big");var D=this.words[0]|0;S=D===d?0:D<d?-1:1}return this.negative!==0?-S|0:S},"cmpn"),"cmpn"),c.prototype.cmp=a(i(function(d){if(this.negative!==0&&d.negative===0)return-1;if(this.negative===0&&d.negative!==0)return 1;var g=this.ucmp(d);return this.negative!==0?-g|0:g},"cmp"),"cmp"),c.prototype.ucmp=a(i(function(d){if(this.length>d.length)return 1;if(this.length<d.length)return-1;for(var g=0,S=this.length-1;S>=0;S--){var D=this.words[S]|0,C=d.words[S]|0;if(D!==C){D<C?g=-1:D>C&&(g=1);break}}return g},"ucmp"),"ucmp"),c.prototype.gtn=a(i(function(d){return this.cmpn(d)===1},"gtn"),"gtn"),c.prototype.gt=a(i(function(d){return this.cmp(d)===1},"gt"),"gt"),c.prototype.gten=a(i(function(d){return this.cmpn(d)>=0},"gten"),"gten"),c.prototype.gte=a(i(function(d){return this.cmp(d)>=0},"gte"),"gte"),c.prototype.ltn=a(i(function(d){return this.cmpn(d)===-1},"ltn"),"ltn"),c.prototype.lt=a(i(function(d){return this.cmp(d)===-1},"lt"),"lt"),c.prototype.lten=a(i(function(d){return this.cmpn(d)<=0},"lten"),"lten"),c.prototype.lte=a(i(function(d){return this.cmp(d)<=0},"lte"),"lte"),c.prototype.eqn=a(i(function(d){return this.cmpn(d)===0},"eqn"),"eqn"),c.prototype.eq=a(i(function(d){return this.cmp(d)===0},"eq4"),"eq"),c.red=a(i(function(d){return new w(d)},"red"),"red"),c.prototype.toRed=a(i(function(d){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),d.convertTo(this)._forceRed(d)},"toRed"),"toRed"),c.prototype.fromRed=a(i(function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},"fromRed"),"fromRed"),c.prototype._forceRed=a(i(function(d){return this.red=d,this},"_forceRed"),"_forceRed"),c.prototype.forceRed=a(i(function(d){return s(!this.red,"Already a number in reduction context"),this._forceRed(d)},"forceRed"),"forceRed"),c.prototype.redAdd=a(i(function(d){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,d)},"redAdd"),"redAdd"),c.prototype.redIAdd=a(i(function(d){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,d)},"redIAdd"),"redIAdd"),c.prototype.redSub=a(i(function(d){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,d)},"redSub"),"redSub"),c.prototype.redISub=a(i(function(d){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,d)},"redISub"),"redISub"),c.prototype.redShl=a(i(function(d){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,d)},"redShl"),"redShl"),c.prototype.redMul=a(i(function(d){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.mul(this,d)},"redMul"),"redMul"),c.prototype.redIMul=a(i(function(d){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,d),this.red.imul(this,d)},"redIMul"),"redIMul"),c.prototype.redSqr=a(i(function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},"redSqr"),"redSqr"),c.prototype.redISqr=a(i(function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},"redISqr"),"redISqr"),c.prototype.redSqrt=a(i(function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},"redSqrt"),"redSqrt"),c.prototype.redInvm=a(i(function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},"redInvm"),"redInvm"),c.prototype.redNeg=a(i(function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},"redNeg"),"redNeg"),c.prototype.redPow=a(i(function(d){return s(this.red&&!d.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,d)},"redPow"),"redPow");var I={k256:null,p224:null,p192:null,p25519:null};function H(m,d){this.name=m,this.p=new c(d,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i(H,"MPrime"),a(H,"MPrime"),H.prototype._tmp=a(i(function(){var d=new c(null);return d.words=new Array(Math.ceil(this.n/13)),d},"_tmp"),"_tmp"),H.prototype.ireduce=a(i(function(d){var g=d,S;do this.split(g,this.tmp),g=this.imulK(g),g=g.iadd(this.tmp),S=g.bitLength();while(S>this.n);var D=S<this.n?-1:g.ucmp(this.p);return D===0?(g.words[0]=0,g.length=1):D>0?g.isub(this.p):g.strip!==void 0?g.strip():g._strip(),g},"ireduce"),"ireduce"),H.prototype.split=a(i(function(d,g){d.iushrn(this.n,0,g)},"split"),"split"),H.prototype.imulK=a(i(function(d){return d.imul(this.k)},"imulK"),"imulK");function se(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(se,"K256"),a(se,"K256"),o(se,H),se.prototype.split=a(i(function(d,g){for(var S=4194303,D=Math.min(d.length,9),C=0;C<D;C++)g.words[C]=d.words[C];if(g.length=D,d.length<=9){d.words[0]=0,d.length=1;return}var E=d.words[9];for(g.words[g.length++]=E&S,C=10;C<d.length;C++){var B=d.words[C]|0;d.words[C-10]=(B&S)<<4|E>>>22,E=B}E>>>=22,d.words[C-10]=E,E===0&&d.length>10?d.length-=10:d.length-=9},"split"),"split"),se.prototype.imulK=a(i(function(d){d.words[d.length]=0,d.words[d.length+1]=0,d.length+=2;for(var g=0,S=0;S<d.length;S++){var D=d.words[S]|0;g+=D*977,d.words[S]=g&67108863,g=D*64+(g/67108864|0)}return d.words[d.length-1]===0&&(d.length--,d.words[d.length-1]===0&&d.length--),d},"imulK"),"imulK");function ue(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(ue,"P224"),a(ue,"P224"),o(ue,H);function me(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(me,"P192"),a(me,"P192"),o(me,H);function q(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(q,"P25519"),a(q,"P25519"),o(q,H),q.prototype.imulK=a(i(function(d){for(var g=0,S=0;S<d.length;S++){var D=(d.words[S]|0)*19+g,C=D&67108863;D>>>=26,d.words[S]=C,g=D}return g!==0&&(d.words[d.length++]=g),d},"imulK"),"imulK"),c._prime=a(i(function(d){if(I[d])return I[d];var g;if(d==="k256")g=new se;else if(d==="p224")g=new ue;else if(d==="p192")g=new me;else if(d==="p25519")g=new q;else throw new Error("Unknown prime "+d);return I[d]=g,g},"prime"),"prime");function w(m){if(typeof m=="string"){var d=c._prime(m);this.m=d.p,this.prime=d}else s(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}i(w,"Red"),a(w,"Red"),w.prototype._verify1=a(i(function(d){s(d.negative===0,"red works only with positives"),s(d.red,"red works only with red numbers")},"_verify1"),"_verify1"),w.prototype._verify2=a(i(function(d,g){s((d.negative|g.negative)===0,"red works only with positives"),s(d.red&&d.red===g.red,"red works only with red numbers")},"_verify2"),"_verify2"),w.prototype.imod=a(i(function(d){return this.prime?this.prime.ireduce(d)._forceRed(this):(b(d,d.umod(this.m)._forceRed(this)),d)},"imod"),"imod"),w.prototype.neg=a(i(function(d){return d.isZero()?d.clone():this.m.sub(d)._forceRed(this)},"neg3"),"neg"),w.prototype.add=a(i(function(d,g){this._verify2(d,g);var S=d.add(g);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},"add3"),"add"),w.prototype.iadd=a(i(function(d,g){this._verify2(d,g);var S=d.iadd(g);return S.cmp(this.m)>=0&&S.isub(this.m),S},"iadd"),"iadd"),w.prototype.sub=a(i(function(d,g){this._verify2(d,g);var S=d.sub(g);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},"sub"),"sub"),w.prototype.isub=a(i(function(d,g){this._verify2(d,g);var S=d.isub(g);return S.cmpn(0)<0&&S.iadd(this.m),S},"isub"),"isub"),w.prototype.shl=a(i(function(d,g){return this._verify1(d),this.imod(d.ushln(g))},"shl"),"shl"),w.prototype.imul=a(i(function(d,g){return this._verify2(d,g),this.imod(d.imul(g))},"imul"),"imul"),w.prototype.mul=a(i(function(d,g){return this._verify2(d,g),this.imod(d.mul(g))},"mul3"),"mul"),w.prototype.isqr=a(i(function(d){return this.imul(d,d.clone())},"isqr"),"isqr"),w.prototype.sqr=a(i(function(d){return this.mul(d,d)},"sqr"),"sqr"),w.prototype.sqrt=a(i(function(d){if(d.isZero())return d.clone();var g=this.m.andln(3);if(s(g%2===1),g===3){var S=this.m.add(new c(1)).iushrn(2);return this.pow(d,S)}for(var D=this.m.subn(1),C=0;!D.isZero()&&D.andln(1)===0;)C++,D.iushrn(1);s(!D.isZero());var E=new c(1).toRed(this),B=E.redNeg(),$=this.m.subn(1).iushrn(1),k=this.m.bitLength();for(k=new c(2*k*k).toRed(this);this.pow(k,$).cmp(B)!==0;)k.redIAdd(B);for(var F=this.pow(k,D),he=this.pow(d,D.addn(1).iushrn(1)),N=this.pow(d,D),Y=C;N.cmp(E)!==0;){for(var J=N,M=0;J.cmp(E)!==0;M++)J=J.redSqr();s(M<Y);var z=this.pow(F,new c(1).iushln(Y-M-1));he=he.redMul(z),F=z.redSqr(),N=N.redMul(F),Y=M}return he},"sqrt"),"sqrt"),w.prototype.invm=a(i(function(d){var g=d._invmp(this.m);return g.negative!==0?(g.negative=0,this.imod(g).redNeg()):this.imod(g)},"invm"),"invm"),w.prototype.pow=a(i(function(d,g){if(g.isZero())return new c(1).toRed(this);if(g.cmpn(1)===0)return d.clone();var S=4,D=new Array(1<<S);D[0]=new c(1).toRed(this),D[1]=d;for(var C=2;C<D.length;C++)D[C]=this.mul(D[C-1],d);var E=D[0],B=0,$=0,k=g.bitLength()%26;for(k===0&&(k=26),C=g.length-1;C>=0;C--){for(var F=g.words[C],he=k-1;he>=0;he--){var N=F>>he&1;if(E!==D[0]&&(E=this.sqr(E)),N===0&&B===0){$=0;continue}B<<=1,B|=N,$++,!($!==S&&(C!==0||he!==0))&&(E=this.mul(E,D[B]),$=0,B=0)}k=26}return E},"pow"),"pow"),w.prototype.convertTo=a(i(function(d){var g=d.umod(this.m);return g===d?g.clone():g},"convertTo"),"convertTo"),w.prototype.convertFrom=a(i(function(d){var g=d.clone();return g.red=null,g},"convertFrom"),"convertFrom"),c.mont=a(i(function(d){return new x(d)},"mont"),"mont");function x(m){w.call(this,m),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(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)}i(x,"Mont"),a(x,"Mont"),o(x,w),x.prototype.convertTo=a(i(function(d){return this.imod(d.ushln(this.shift))},"convertTo"),"convertTo"),x.prototype.convertFrom=a(i(function(d){var g=this.imod(d.mul(this.rinv));return g.red=null,g},"convertFrom"),"convertFrom"),x.prototype.imul=a(i(function(d,g){if(d.isZero()||g.isZero())return d.words[0]=0,d.length=1,d;var S=d.imul(g),D=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(D).iushrn(this.shift),E=C;return C.cmp(this.m)>=0?E=C.isub(this.m):C.cmpn(0)<0&&(E=C.iadd(this.m)),E._forceRed(this)},"imul"),"imul"),x.prototype.mul=a(i(function(d,g){if(d.isZero()||g.isZero())return new c(0)._forceRed(this);var S=d.mul(g),D=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),C=S.isub(D).iushrn(this.shift),E=C;return C.cmp(this.m)>=0?E=C.isub(this.m):C.cmpn(0)<0&&(E=C.iadd(this.m)),E._forceRed(this)},"mul3"),"mul"),x.prototype.invm=a(i(function(d){var g=this.imod(d._invmp(this.m).mul(this.r2));return g._forceRed(this)},"invm"),"invm")})(typeof t>"u"||t,e)}}),E$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/encode.js"(e,t){t.exports=c;var r=128,n=127,s=~n,o=Math.pow(2,31);function c(f,h,p){if(Number.MAX_SAFE_INTEGER&&f>Number.MAX_SAFE_INTEGER)throw c.bytes=0,new RangeError("Could not encode varint");h=h||[],p=p||0;for(var v=p;f>=o;)h[p++]=f&255|r,f/=128;for(;f&s;)h[p++]=f&255|r,f>>>=7;return h[p]=f|0,c.bytes=p-v+1,h}i(c,"encode9"),a(c,"encode")}}),A$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/decode.js"(e,t){t.exports=s;var r=128,n=127;function s(o,h){var f=0,h=h||0,p=0,v=h,b,y=o.length;do{if(v>=y||p>49)throw s.bytes=0,new RangeError("Could not decode varint");b=o[v++],f+=p<28?(b&n)<<p:(b&n)*Math.pow(2,p),p+=7}while(b>=r);return s.bytes=v-h,f}i(s,"read2"),a(s,"read")}}),S$=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/length.js"(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),s=Math.pow(2,21),o=Math.pow(2,28),c=Math.pow(2,35),f=Math.pow(2,42),h=Math.pow(2,49),p=Math.pow(2,56),v=Math.pow(2,63);t.exports=function(b){return b<r?1:b<n?2:b<s?3:b<o?4:b<c?5:b<f?6:b<h?7:b<p?8:b<v?9:10}}}),mm=ze({"../../../node_modules/.pnpm/varint@6.0.0/node_modules/varint/index.js"(e,t){t.exports={encode:E$(),decode:A$(),encodingLength:S$()}}}),x$=ze({"../../../node_modules/.pnpm/fast-json-stable-stringify@2.1.0/node_modules/fast-json-stable-stringify/index.js"(e,t){"use strict";t.exports=function(r,n){n||(n={}),typeof n=="function"&&(n={cmp:n});var s=typeof n.cycles=="boolean"?n.cycles:!1,o=n.cmp&&function(f){return function(h){return function(p,v){var b={key:p,value:h[p]},y={key:v,value:h[v]};return f(b,y)}}}(n.cmp),c=[];return a(i(function f(h){if(h&&h.toJSON&&typeof h.toJSON=="function"&&(h=h.toJSON()),h!==void 0){if(typeof h=="number")return isFinite(h)?""+h:"null";if(typeof h!="object")return JSON.stringify(h);var p,v;if(Array.isArray(h)){for(v="[",p=0;p<h.length;p++)p&&(v+=","),v+=f(h[p])||"null";return v+"]"}if(h===null)return"null";if(c.indexOf(h)!==-1){if(s)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var b=c.push(h)-1,y=Object.keys(h).sort(o&&o(h));for(v="",p=0;p<y.length;p++){var _=y[p],T=f(h[_]);!T||(v&&(v+=","),v+=JSON.stringify(_)+":"+T)}return c.splice(b,1),"{"+v+"}"}},"stringify2"),"stringify")(r)}}}),pd=ze({"../../../node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.js"(e,t){var r=200,n="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",c="[object Array]",f="[object Boolean]",h="[object Date]",p="[object Error]",v="[object Function]",b="[object GeneratorFunction]",y="[object Map]",_="[object Number]",T="[object Object]",O="[object Promise]",R="[object RegExp]",P="[object Set]",K="[object String]",U="[object Symbol]",j="[object WeakMap]",V="[object ArrayBuffer]",G="[object DataView]",I="[object Float32Array]",H="[object Float64Array]",se="[object Int8Array]",ue="[object Int16Array]",me="[object Int32Array]",q="[object Uint8Array]",w="[object Uint8ClampedArray]",x="[object Uint16Array]",m="[object Uint32Array]",d=/[\\^$.*+?()[\]{}|]/g,g=/\w*$/,S=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,C={};C[o]=C[c]=C[V]=C[G]=C[f]=C[h]=C[I]=C[H]=C[se]=C[ue]=C[me]=C[y]=C[_]=C[T]=C[R]=C[P]=C[K]=C[U]=C[q]=C[w]=C[x]=C[m]=!0,C[p]=C[v]=C[j]=!1;var E=typeof global=="object"&&global&&global.Object===Object&&global,B=typeof self=="object"&&self&&self.Object===Object&&self,$=E||B||Function("return this")(),k=typeof e=="object"&&e&&!e.nodeType&&e,F=k&&typeof t=="object"&&t&&!t.nodeType&&t,he=F&&F.exports===k;function N(ie,Te){return ie.set(Te[0],Te[1]),ie}i(N,"addMapEntry"),a(N,"addMapEntry");function Y(ie,Te){return ie.add(Te),ie}i(Y,"addSetEntry"),a(Y,"addSetEntry");function J(ie,Te){for(var Pe=-1,ht=ie?ie.length:0;++Pe<ht&&Te(ie[Pe],Pe,ie)!==!1;);return ie}i(J,"arrayEach"),a(J,"arrayEach");function M(ie,Te){for(var Pe=-1,ht=Te.length,qr=ie.length;++Pe<ht;)ie[qr+Pe]=Te[Pe];return ie}i(M,"arrayPush"),a(M,"arrayPush");function z(ie,Te,Pe,ht){var qr=-1,sn=ie?ie.length:0;for(ht&&sn&&(Pe=ie[++qr]);++qr<sn;)Pe=Te(Pe,ie[qr],qr,ie);return Pe}i(z,"arrayReduce"),a(z,"arrayReduce");function re(ie,Te){for(var Pe=-1,ht=Array(ie);++Pe<ie;)ht[Pe]=Te(Pe);return ht}i(re,"baseTimes"),a(re,"baseTimes");function oe(ie,Te){return ie?.[Te]}i(oe,"getValue"),a(oe,"getValue");function ge(ie){var Te=!1;if(ie!=null&&typeof ie.toString!="function")try{Te=!!(ie+"")}catch{}return Te}i(ge,"isHostObject"),a(ge,"isHostObject");function ke(ie){var Te=-1,Pe=Array(ie.size);return ie.forEach(function(ht,qr){Pe[++Te]=[qr,ht]}),Pe}i(ke,"mapToArray"),a(ke,"mapToArray");function _e(ie,Te){return function(Pe){return ie(Te(Pe))}}i(_e,"overArg"),a(_e,"overArg");function fe(ie){var Te=-1,Pe=Array(ie.size);return ie.forEach(function(ht){Pe[++Te]=ht}),Pe}i(fe,"setToArray"),a(fe,"setToArray");var Ce=Array.prototype,pe=Function.prototype,we=Object.prototype,Q=$["__core-js_shared__"],ve=function(){var ie=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),Me=pe.toString,Ue=we.hasOwnProperty,Re=we.toString,je=RegExp("^"+Me.call(Ue).replace(d,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rt=he?$.Buffer:void 0,le=$.Symbol,ce=$.Uint8Array,Z=_e(Object.getPrototypeOf,Object),ne=Object.create,ye=we.propertyIsEnumerable,Se=Ce.splice,xe=Object.getOwnPropertySymbols,De=rt?rt.isBuffer:void 0,Mt=_e(Object.keys,Object),qe=Vi($,"DataView"),He=Vi($,"Map"),Ot=Vi($,"Promise"),dt=Vi($,"Set"),mt=Vi($,"WeakMap"),Dr=Vi(Object,"create"),ct=vs(qe),ut=vs(He),lr=vs(Ot),lt=vs(dt),nt=vs(mt),ar=le?le.prototype:void 0,it=ar?ar.valueOf:void 0;function Ye(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(Ye,"Hash"),a(Ye,"Hash");function Qt(){this.__data__=Dr?Dr(null):{}}i(Qt,"hashClear"),a(Qt,"hashClear");function st(ie){return this.has(ie)&&delete this.__data__[ie]}i(st,"hashDelete"),a(st,"hashDelete");function Qe(ie){var Te=this.__data__;if(Dr){var Pe=Te[ie];return Pe===n?void 0:Pe}return Ue.call(Te,ie)?Te[ie]:void 0}i(Qe,"hashGet"),a(Qe,"hashGet");function or(ie){var Te=this.__data__;return Dr?Te[ie]!==void 0:Ue.call(Te,ie)}i(or,"hashHas"),a(or,"hashHas");function at(ie,Te){var Pe=this.__data__;return Pe[ie]=Dr&&Te===void 0?n:Te,this}i(at,"hashSet"),a(at,"hashSet"),Ye.prototype.clear=Qt,Ye.prototype.delete=st,Ye.prototype.get=Qe,Ye.prototype.has=or,Ye.prototype.set=at;function Ze(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(Ze,"ListCache"),a(Ze,"ListCache");function cr(){this.__data__=[]}i(cr,"listCacheClear"),a(cr,"listCacheClear");function ot(ie){var Te=this.__data__,Pe=dn(Te,ie);if(Pe<0)return!1;var ht=Te.length-1;return Pe==ht?Te.pop():Se.call(Te,Pe,1),!0}i(ot,"listCacheDelete"),a(ot,"listCacheDelete");function Et(ie){var Te=this.__data__,Pe=dn(Te,ie);return Pe<0?void 0:Te[Pe][1]}i(Et,"listCacheGet"),a(Et,"listCacheGet");function Sn(ie){return dn(this.__data__,ie)>-1}i(Sn,"listCacheHas"),a(Sn,"listCacheHas");function At(ie,Te){var Pe=this.__data__,ht=dn(Pe,ie);return ht<0?Pe.push([ie,Te]):Pe[ht][1]=Te,this}i(At,"listCacheSet"),a(At,"listCacheSet"),Ze.prototype.clear=cr,Ze.prototype.delete=ot,Ze.prototype.get=Et,Ze.prototype.has=Sn,Ze.prototype.set=At;function yt(ie){var Te=-1,Pe=ie?ie.length:0;for(this.clear();++Te<Pe;){var ht=ie[Te];this.set(ht[0],ht[1])}}i(yt,"MapCache"),a(yt,"MapCache");function fn(){this.__data__={hash:new Ye,map:new(He||Ze),string:new Ye}}i(fn,"mapCacheClear"),a(fn,"mapCacheClear");function er(ie){return Js(this,ie).delete(ie)}i(er,"mapCacheDelete"),a(er,"mapCacheDelete");function tr(ie){return Js(this,ie).get(ie)}i(tr,"mapCacheGet"),a(tr,"mapCacheGet");function tn(ie){return Js(this,ie).has(ie)}i(tn,"mapCacheHas"),a(tn,"mapCacheHas");function rn(ie,Te){return Js(this,ie).set(ie,Te),this}i(rn,"mapCacheSet"),a(rn,"mapCacheSet"),yt.prototype.clear=fn,yt.prototype.delete=er,yt.prototype.get=tr,yt.prototype.has=tn,yt.prototype.set=rn;function Or(ie){this.__data__=new Ze(ie)}i(Or,"Stack"),a(Or,"Stack");function Hr(){this.__data__=new Ze}i(Hr,"stackClear"),a(Hr,"stackClear");function nn(ie){return this.__data__.delete(ie)}i(nn,"stackDelete"),a(nn,"stackDelete");function xn(ie){return this.__data__.get(ie)}i(xn,"stackGet"),a(xn,"stackGet");function Ai(ie){return this.__data__.has(ie)}i(Ai,"stackHas"),a(Ai,"stackHas");function Si(ie,Te){var Pe=this.__data__;if(Pe instanceof Ze){var ht=Pe.__data__;if(!He||ht.length<r-1)return ht.push([ie,Te]),this;Pe=this.__data__=new yt(ht)}return Pe.set(ie,Te),this}i(Si,"stackSet"),a(Si,"stackSet"),Or.prototype.clear=Hr,Or.prototype.delete=nn,Or.prototype.get=xn,Or.prototype.has=Ai,Or.prototype.set=Si;function xi(ie,Te){var Pe=Al(ie)||Dd(ie)?re(ie.length,String):[],ht=Pe.length,qr=!!ht;for(var sn in ie)(Te||Ue.call(ie,sn))&&!(qr&&(sn=="length"||bl(sn,ht)))&&Pe.push(sn);return Pe}i(xi,"arrayLikeKeys"),a(xi,"arrayLikeKeys");function Pn(ie,Te,Pe){var ht=ie[Te];(!(Ue.call(ie,Te)&&Pc(ht,Pe))||Pe===void 0&&!(Te in ie))&&(ie[Te]=Pe)}i(Pn,"assignValue"),a(Pn,"assignValue");function dn(ie,Te){for(var Pe=ie.length;Pe--;)if(Pc(ie[Pe][0],Te))return Pe;return-1}i(dn,"assocIndexOf"),a(dn,"assocIndexOf");function Xn(ie,Te){return ie&&Mo(Te,Bc(Te),ie)}i(Xn,"baseAssign"),a(Xn,"baseAssign");function Bn(ie,Te,Pe,ht,qr,sn,Tn){var hn;if(ht&&(hn=sn?ht(ie,qr,sn,Tn):ht(ie)),hn!==void 0)return hn;if(!Co(ie))return ie;var Lr=Al(ie);if(Lr){if(hn=gl(ie),!Te)return ml(ie,hn)}else{var gs=ms(ie),ys=gs==v||gs==b;if(xl(ie))return Zs(ie,Te);if(gs==T||gs==o||ys&&!sn){if(ge(ie))return sn?ie:{};if(hn=Id(ys?{}:ie),!Te)return Cd(ie,Xn(hn,ie))}else{if(!C[gs])return sn?ie:{};hn=yl(ie,gs,Bn,Te)}}Tn||(Tn=new Or);var Ml=Tn.get(ie);if(Ml)return Ml;if(Tn.set(ie,hn),!Lr)var Lc=Pe?vl(ie):Bc(ie);return J(Lc||ie,function(pn,Io){Lc&&(Io=pn,pn=ie[Io]),Pn(hn,Io,Bn(pn,Te,Pe,ht,Io,ie,Tn))}),hn}i(Bn,"baseClone"),a(Bn,"baseClone");function Ti(ie){return Co(ie)?ne(ie):{}}i(Ti,"baseCreate"),a(Ti,"baseCreate");function Mi(ie,Te,Pe){var ht=Te(ie);return Al(ie)?ht:M(ht,Pe(ie))}i(Mi,"baseGetAllKeys"),a(Mi,"baseGetAllKeys");function Ci(ie){return Re.call(ie)}i(Ci,"baseGetTag"),a(Ci,"baseGetTag");function Gs(ie){if(!Co(ie)||_l(ie))return!1;var Te=Tl(ie)||ge(ie)?je:S;return Te.test(vs(ie))}i(Gs,"baseIsNative"),a(Gs,"baseIsNative");function Ws(ie){if(!El(ie))return Mt(ie);var Te=[];for(var Pe in Object(ie))Ue.call(ie,Pe)&&Pe!="constructor"&&Te.push(Pe);return Te}i(Ws,"baseKeys"),a(Ws,"baseKeys");function Zs(ie,Te){if(Te)return ie.slice();var Pe=new ie.constructor(ie.length);return ie.copy(Pe),Pe}i(Zs,"cloneBuffer"),a(Zs,"cloneBuffer");function Ca(ie){var Te=new ie.constructor(ie.byteLength);return new ce(Te).set(new ce(ie)),Te}i(Ca,"cloneArrayBuffer"),a(Ca,"cloneArrayBuffer");function Td(ie,Te){var Pe=Te?Ca(ie.buffer):ie.buffer;return new ie.constructor(Pe,ie.byteOffset,ie.byteLength)}i(Td,"cloneDataView"),a(Td,"cloneDataView");function dl(ie,Te,Pe){var ht=Te?Pe(ke(ie),!0):ke(ie);return z(ht,N,new ie.constructor)}i(dl,"cloneMap"),a(dl,"cloneMap");function To(ie){var Te=new ie.constructor(ie.source,g.exec(ie));return Te.lastIndex=ie.lastIndex,Te}i(To,"cloneRegExp"),a(To,"cloneRegExp");function hl(ie,Te,Pe){var ht=Te?Pe(fe(ie),!0):fe(ie);return z(ht,Y,new ie.constructor)}i(hl,"cloneSet"),a(hl,"cloneSet");function Md(ie){return it?Object(it.call(ie)):{}}i(Md,"cloneSymbol"),a(Md,"cloneSymbol");function pl(ie,Te){var Pe=Te?Ca(ie.buffer):ie.buffer;return new ie.constructor(Pe,ie.byteOffset,ie.length)}i(pl,"cloneTypedArray"),a(pl,"cloneTypedArray");function ml(ie,Te){var Pe=-1,ht=ie.length;for(Te||(Te=Array(ht));++Pe<ht;)Te[Pe]=ie[Pe];return Te}i(ml,"copyArray"),a(ml,"copyArray");function Mo(ie,Te,Pe,ht){Pe||(Pe={});for(var qr=-1,sn=Te.length;++qr<sn;){var Tn=Te[qr],hn=ht?ht(Pe[Tn],ie[Tn],Tn,Pe,ie):void 0;Pn(Pe,Tn,hn===void 0?ie[Tn]:hn)}return Pe}i(Mo,"copyObject"),a(Mo,"copyObject");function Cd(ie,Te){return Mo(ie,Ys(ie),Te)}i(Cd,"copySymbols"),a(Cd,"copySymbols");function vl(ie){return Mi(ie,Bc,Ys)}i(vl,"getAllKeys"),a(vl,"getAllKeys");function Js(ie,Te){var Pe=ie.__data__;return wl(Te)?Pe[typeof Te=="string"?"string":"hash"]:Pe.map}i(Js,"getMapData"),a(Js,"getMapData");function Vi(ie,Te){var Pe=oe(ie,Te);return Gs(Pe)?Pe:void 0}i(Vi,"getNative"),a(Vi,"getNative");var Ys=xe?_e(xe,Object):yr,ms=Ci;(qe&&ms(new qe(new ArrayBuffer(1)))!=G||He&&ms(new He)!=y||Ot&&ms(Ot.resolve())!=O||dt&&ms(new dt)!=P||mt&&ms(new mt)!=j)&&(ms=a(function(ie){var Te=Re.call(ie),Pe=Te==T?ie.constructor:void 0,ht=Pe?vs(Pe):void 0;if(ht)switch(ht){case ct:return G;case ut:return y;case lr:return O;case lt:return P;case nt:return j}return Te},"getTag"));function gl(ie){var Te=ie.length,Pe=ie.constructor(Te);return Te&&typeof ie[0]=="string"&&Ue.call(ie,"index")&&(Pe.index=ie.index,Pe.input=ie.input),Pe}i(gl,"initCloneArray"),a(gl,"initCloneArray");function Id(ie){return typeof ie.constructor=="function"&&!El(ie)?Ti(Z(ie)):{}}i(Id,"initCloneObject"),a(Id,"initCloneObject");function yl(ie,Te,Pe,ht){var qr=ie.constructor;switch(Te){case V:return Ca(ie);case f:case h:return new qr(+ie);case G:return Td(ie,ht);case I:case H:case se:case ue:case me:case q:case w:case x:case m:return pl(ie,ht);case y:return dl(ie,ht,Pe);case _:case K:return new qr(ie);case R:return To(ie);case P:return hl(ie,ht,Pe);case U:return Md(ie)}}i(yl,"initCloneByTag"),a(yl,"initCloneByTag");function bl(ie,Te){return Te=Te??s,!!Te&&(typeof ie=="number"||D.test(ie))&&ie>-1&&ie%1==0&&ie<Te}i(bl,"isIndex"),a(bl,"isIndex");function wl(ie){var Te=typeof ie;return Te=="string"||Te=="number"||Te=="symbol"||Te=="boolean"?ie!=="__proto__":ie===null}i(wl,"isKeyable"),a(wl,"isKeyable");function _l(ie){return!!ve&&ve in ie}i(_l,"isMasked"),a(_l,"isMasked");function El(ie){var Te=ie&&ie.constructor,Pe=typeof Te=="function"&&Te.prototype||we;return ie===Pe}i(El,"isPrototype"),a(El,"isPrototype");function vs(ie){if(ie!=null){try{return Me.call(ie)}catch{}try{return ie+""}catch{}}return""}i(vs,"toSource"),a(vs,"toSource");function kd(ie){return Bn(ie,!0,!0)}i(kd,"cloneDeep6"),a(kd,"cloneDeep");function Pc(ie,Te){return ie===Te||ie!==ie&&Te!==Te}i(Pc,"eq4"),a(Pc,"eq");function Dd(ie){return Od(ie)&&Ue.call(ie,"callee")&&(!ye.call(ie,"callee")||Re.call(ie)==o)}i(Dd,"isArguments"),a(Dd,"isArguments");var Al=Array.isArray;function Sl(ie){return ie!=null&&Rd(ie.length)&&!Tl(ie)}i(Sl,"isArrayLike2"),a(Sl,"isArrayLike");function Od(ie){return Nd(ie)&&Sl(ie)}i(Od,"isArrayLikeObject"),a(Od,"isArrayLikeObject");var xl=De||mr;function Tl(ie){var Te=Co(ie)?Re.call(ie):"";return Te==v||Te==b}i(Tl,"isFunction2"),a(Tl,"isFunction");function Rd(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=s}i(Rd,"isLength"),a(Rd,"isLength");function Co(ie){var Te=typeof ie;return!!ie&&(Te=="object"||Te=="function")}i(Co,"isObject"),a(Co,"isObject");function Nd(ie){return!!ie&&typeof ie=="object"}i(Nd,"isObjectLike"),a(Nd,"isObjectLike");function Bc(ie){return Sl(ie)?xi(ie):Ws(ie)}i(Bc,"keys"),a(Bc,"keys");function yr(){return[]}i(yr,"stubArray"),a(yr,"stubArray");function mr(){return!1}i(mr,"stubFalse"),a(mr,"stubFalse"),t.exports=kd}}),T$=ze({"../../../node_modules/.pnpm/cross-fetch@3.1.5/node_modules/cross-fetch/dist/browser-ponyfill.js"(e,t){var r=typeof self<"u"?self:e,n=function(){function o(){this.fetch=!1,this.DOMException=r.DOMException}return i(o,"F"),a(o,"F"),o.prototype=r,new o}();(function(o){var c=function(f){var h={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function p(m){return m&&DataView.prototype.isPrototypeOf(m)}if(i(p,"isDataView"),a(p,"isDataView"),h.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(m){return m&&v.indexOf(Object.prototype.toString.call(m))>-1};function y(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}i(y,"normalizeName"),a(y,"normalizeName");function _(m){return typeof m!="string"&&(m=String(m)),m}i(_,"normalizeValue"),a(_,"normalizeValue");function T(m){var d={next:function(){var g=m.shift();return{done:g===void 0,value:g}}};return h.iterable&&(d[Symbol.iterator]=function(){return d}),d}i(T,"iteratorFor"),a(T,"iteratorFor");function O(m){this.map={},m instanceof O?m.forEach(function(d,g){this.append(g,d)},this):Array.isArray(m)?m.forEach(function(d){this.append(d[0],d[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(d){this.append(d,m[d])},this)}i(O,"Headers"),a(O,"Headers"),O.prototype.append=function(m,d){m=y(m),d=_(d);var g=this.map[m];this.map[m]=g?g+", "+d:d},O.prototype.delete=function(m){delete this.map[y(m)]},O.prototype.get=function(m){return m=y(m),this.has(m)?this.map[m]:null},O.prototype.has=function(m){return this.map.hasOwnProperty(y(m))},O.prototype.set=function(m,d){this.map[y(m)]=_(d)},O.prototype.forEach=function(m,d){for(var g in this.map)this.map.hasOwnProperty(g)&&m.call(d,this.map[g],g,this)},O.prototype.keys=function(){var m=[];return this.forEach(function(d,g){m.push(g)}),T(m)},O.prototype.values=function(){var m=[];return this.forEach(function(d){m.push(d)}),T(m)},O.prototype.entries=function(){var m=[];return this.forEach(function(d,g){m.push([g,d])}),T(m)},h.iterable&&(O.prototype[Symbol.iterator]=O.prototype.entries);function R(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}i(R,"consumed"),a(R,"consumed");function P(m){return new Promise(function(d,g){m.onload=function(){d(m.result)},m.onerror=function(){g(m.error)}})}i(P,"fileReaderReady"),a(P,"fileReaderReady");function K(m){var d=new FileReader,g=P(d);return d.readAsArrayBuffer(m),g}i(K,"readBlobAsArrayBuffer"),a(K,"readBlobAsArrayBuffer");function U(m){var d=new FileReader,g=P(d);return d.readAsText(m),g}i(U,"readBlobAsText"),a(U,"readBlobAsText");function j(m){for(var d=new Uint8Array(m),g=new Array(d.length),S=0;S<d.length;S++)g[S]=String.fromCharCode(d[S]);return g.join("")}i(j,"readArrayBufferAsText"),a(j,"readArrayBufferAsText");function V(m){if(m.slice)return m.slice(0);var d=new Uint8Array(m.byteLength);return d.set(new Uint8Array(m)),d.buffer}i(V,"bufferClone"),a(V,"bufferClone");function G(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:h.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:h.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():h.arrayBuffer&&h.blob&&p(m)?(this._bodyArrayBuffer=V(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||b(m))?this._bodyArrayBuffer=V(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var m=R(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?R(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(K)}),this.text=function(){var m=R(this);if(m)return m;if(this._bodyBlob)return U(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(j(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(ue)}),this.json=function(){return this.text().then(JSON.parse)},this}i(G,"Body"),a(G,"Body");var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function H(m){var d=m.toUpperCase();return I.indexOf(d)>-1?d:m}i(H,"normalizeMethod"),a(H,"normalizeMethod");function se(m,d){d=d||{};var g=d.body;if(m instanceof se){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,d.headers||(this.headers=new O(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!g&&m._bodyInit!=null&&(g=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=d.credentials||this.credentials||"same-origin",(d.headers||!this.headers)&&(this.headers=new O(d.headers)),this.method=H(d.method||this.method||"GET"),this.mode=d.mode||this.mode||null,this.signal=d.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&g)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(g)}i(se,"Request"),a(se,"Request"),se.prototype.clone=function(){return new se(this,{body:this._bodyInit})};function ue(m){var d=new FormData;return m.trim().split("&").forEach(function(g){if(g){var S=g.split("="),D=S.shift().replace(/\+/g," "),C=S.join("=").replace(/\+/g," ");d.append(decodeURIComponent(D),decodeURIComponent(C))}}),d}i(ue,"decode9"),a(ue,"decode");function me(m){var d=new O,g=m.replace(/\r?\n[\t ]+/g," ");return g.split(/\r?\n/).forEach(function(S){var D=S.split(":"),C=D.shift().trim();if(C){var E=D.join(":").trim();d.append(C,E)}}),d}i(me,"parseHeaders"),a(me,"parseHeaders"),G.call(se.prototype);function q(m,d){d||(d={}),this.type="default",this.status=d.status===void 0?200:d.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in d?d.statusText:"OK",this.headers=new O(d.headers),this.url=d.url||"",this._initBody(m)}i(q,"Response"),a(q,"Response"),G.call(q.prototype),q.prototype.clone=function(){return new q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new O(this.headers),url:this.url})},q.error=function(){var m=new q(null,{status:0,statusText:""});return m.type="error",m};var w=[301,302,303,307,308];q.redirect=function(m,d){if(w.indexOf(d)===-1)throw new RangeError("Invalid status code");return new q(null,{status:d,headers:{location:m}})},f.DOMException=o.DOMException;try{new f.DOMException}catch{f.DOMException=function(d,g){this.message=d,this.name=g;var S=Error(d);this.stack=S.stack},f.DOMException.prototype=Object.create(Error.prototype),f.DOMException.prototype.constructor=f.DOMException}function x(m,d){return new Promise(function(g,S){var D=new se(m,d);if(D.signal&&D.signal.aborted)return S(new f.DOMException("Aborted","AbortError"));var C=new XMLHttpRequest;function E(){C.abort()}i(E,"abortXhr"),a(E,"abortXhr"),C.onload=function(){var B={status:C.status,statusText:C.statusText,headers:me(C.getAllResponseHeaders()||"")};B.url="responseURL"in C?C.responseURL:B.headers.get("X-Request-URL");var $="response"in C?C.response:C.responseText;g(new q($,B))},C.onerror=function(){S(new TypeError("Network request failed"))},C.ontimeout=function(){S(new TypeError("Network request failed"))},C.onabort=function(){S(new f.DOMException("Aborted","AbortError"))},C.open(D.method,D.url,!0),D.credentials==="include"?C.withCredentials=!0:D.credentials==="omit"&&(C.withCredentials=!1),"responseType"in C&&h.blob&&(C.responseType="blob"),D.headers.forEach(function(B,$){C.setRequestHeader($,B)}),D.signal&&(D.signal.addEventListener("abort",E),C.onreadystatechange=function(){C.readyState===4&&D.signal.removeEventListener("abort",E)}),C.send(typeof D._bodyInit>"u"?null:D._bodyInit)})}return i(x,"fetch2"),a(x,"fetch"),x.polyfill=!0,o.fetch||(o.fetch=x,o.Headers=O,o.Request=se,o.Response=q),f.Headers=O,f.Request=se,f.Response=q,f.fetch=x,Object.defineProperty(f,"__esModule",{value:!0}),f}({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var s=n;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,t.exports=e}}),M$=ze({"../../../node_modules/.pnpm/dataloader@2.2.2/node_modules/dataloader/index.js"(e,t){"use strict";var r=function(){function O(P,K){if(typeof P!="function")throw new TypeError("DataLoader must be constructed with a function which accepts "+("Array<key> and returns Promise<Array<value>>, but got: "+P+"."));this._batchLoadFn=P,this._maxBatchSize=p(K),this._batchScheduleFn=v(K),this._cacheKeyFn=b(K),this._cacheMap=y(K),this._batch=null,this.name=_(K)}i(O,"DataLoader3"),a(O,"DataLoader");var R=O.prototype;return R.load=a(i(function(K){if(K==null)throw new TypeError("The loader.load() function must be called with a value, "+("but got: "+String(K)+"."));var U=o(this),j=this._cacheMap,V=this._cacheKeyFn(K);if(j){var G=j.get(V);if(G){var I=U.cacheHits||(U.cacheHits=[]);return new Promise(function(se){I.push(function(){se(G)})})}}U.keys.push(K);var H=new Promise(function(se,ue){U.callbacks.push({resolve:se,reject:ue})});return j&&j.set(V,H),H},"load"),"load"),R.loadMany=a(i(function(K){if(!T(K))throw new TypeError("The loader.loadMany() function must be called with Array<key> "+("but got: "+K+"."));for(var U=[],j=0;j<K.length;j++)U.push(this.load(K[j]).catch(function(V){return V}));return Promise.all(U)},"loadMany"),"loadMany"),R.clear=a(i(function(K){var U=this._cacheMap;if(U){var j=this._cacheKeyFn(K);U.delete(j)}return this},"clear"),"clear"),R.clearAll=a(i(function(){var K=this._cacheMap;return K&&K.clear(),this},"clearAll"),"clearAll"),R.prime=a(i(function(K,U){var j=this._cacheMap;if(j){var V=this._cacheKeyFn(K);if(j.get(V)===void 0){var G;U instanceof Error?(G=Promise.reject(U),G.catch(function(){})):G=Promise.resolve(U),j.set(V,G)}}return this},"prime"),"prime"),O}(),n=typeof process=="object"&&typeof process.nextTick=="function"?function(O){s||(s=Promise.resolve()),s.then(function(){process.nextTick(O)})}:typeof setImmediate=="function"?function(O){setImmediate(O)}:function(O){setTimeout(O)},s;function o(O){var R=O._batch;if(R!==null&&!R.hasDispatched&&R.keys.length<O._maxBatchSize)return R;var P={hasDispatched:!1,keys:[],callbacks:[]};return O._batch=P,O._batchScheduleFn(function(){c(O,P)}),P}i(o,"getCurrentBatch"),a(o,"getCurrentBatch");function c(O,R){if(R.hasDispatched=!0,R.keys.length===0){h(R);return}var P;try{P=O._batchLoadFn(R.keys)}catch(K){return f(O,R,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function "+("errored synchronously: "+String(K)+".")))}if(!P||typeof P.then!="function")return f(O,R,new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise: "+String(P)+".")));P.then(function(K){if(!T(K))throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did "+("not return a Promise of an Array: "+String(K)+"."));if(K.length!==R.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array<key> and returns Promise<Array<value>>, but the function did not return a Promise of an Array of the same length as the Array of keys."+(`
|
|
669
669
|
|
|
670
670
|
Keys:
|
|
671
671
|
`+String(R.keys))+(`
|
|
@@ -837,7 +837,7 @@ HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
|
|
837
837
|
`)}i(UM,"asString");a(UM,"asString");var Tb=i(class extends $2{toMessage(){return super.toMessage("Ethereum")}signMessage(){let e;switch(this.type){case Zf.PERSONAL_SIGNATURE:{e=this.toMessage();break}default:{e=this.toMessage();break}}return e}},"SiweMessage");a(Tb,"SiweMessage");var $M=i(class extends $2{toMessage(){return super.toMessage("Solana")}signMessage(){let e;switch(this.type){case Zf.PERSONAL_SIGNATURE:{e=new TextEncoder().encode(this.toMessage());break}default:{e=new TextEncoder().encode(this.toMessage());break}}return e}},"SiwsMessage");a($M,"SiwsMessage");var sz=5*60,az=new Date("2022-09-20").valueOf(),j0;(function(e){function t(c){let f={h:{t:"eip4361"},p:{domain:c.domain,iat:c.issuedAt,iss:`did:pkh:eip155:${c.chainId}:${c.address}`,aud:c.uri,version:c.version,nonce:c.nonce}};return c.signature&&(f.s={t:"eip191",s:c.signature}),c.notBefore&&(f.p.nbf=c.notBefore),c.expirationTime&&(f.p.exp=c.expirationTime),c.statement&&(f.p.statement=c.statement),c.requestId&&(f.p.requestId=c.requestId),c.resources&&(f.p.resources=c.resources),f}i(t,"fromSiweMessage"),a(t,"fromSiweMessage");let r=a(function(c){try{return Promise.resolve(oj({bytes:c,codec:rl,hasher:Yu})).then(function(f){return f.value})}catch(f){return Promise.reject(f)}},"fromBlockBytes");e.fromSiweMessage=t;function n(c){let f={h:{t:"caip122"},p:{domain:c.domain,iat:c.issuedAt,iss:`did:pkh:solana:${c.chainId}:${c.address}`,aud:c.uri,version:c.version,nonce:c.nonce}};return c.signature&&(f.s={t:"solana:ed25519",s:c.signature}),c.notBefore&&(f.p.nbf=c.notBefore),c.expirationTime&&(f.p.exp=c.expirationTime),c.statement&&(f.p.statement=c.statement),c.requestId&&(f.p.requestId=c.requestId),c.resources&&(f.p.resources=c.resources),f}i(n,"fromSiwsMessage"),a(n,"fromSiwsMessage"),e.fromSiwsMessage=n,e.fromBlockBytes=r;function s(c,f={}){var h,p;if(((h=c.s)==null?void 0:h.t)==="eip191")return o(c,f);if(((p=c.s)==null?void 0:p.t)==="solana:ed25519")return jM(c,f);throw new Error("Unsupported CACAO signature type")}i(s,"verify5"),a(s,"verify"),e.verify=s;function o(c,f){if(!c.s)throw new Error("CACAO does not have a signature");let h=f.atTime?f.atTime.getTime():Date.now(),p=(f.clockSkewSecs??sz)*1e3;if(Date.parse(c.p.iat)>h+p||Date.parse(c.p.nbf)>h+p)throw new Error("CACAO is not valid yet");let v=f.revocationPhaseOutSecs?f.revocationPhaseOutSecs*1e3:0;if(!f.disableExpirationCheck&&Date.parse(c.p.exp)+v+p<h)throw new Error("CACAO has expired");let y=[xb(Tb.fromCacao(c).toMessage(),c.s.s).toLowerCase()];if(Date.parse(c.p.iat)<=az){let T=xb(FM(Tb.fromCacao(c),"Ethereum"),c.s.s).toLowerCase();y.push(T)}let _=Bu.parse(c.p.iss.replace("did:pkh:","")).address.toLowerCase();if(!y.includes(_))throw new Error("Signature does not belong to issuer")}i(o,"verifyEIP191Signature"),a(o,"verifyEIP191Signature"),e.verifyEIP191Signature=o})(j0||(j0={}));function jM(e,t){if(!e.s)throw new Error("CACAO does not have a signature");let r=t.atTime?t.atTime.getTime():Date.now();if(Date.parse(e.p.iat)>r||Date.parse(e.p.nbf)>r)throw new Error("CACAO is not valid yet");let n=t.revocationPhaseOutSecs?t.revocationPhaseOutSecs*1e3:0;if(!t.disableExpirationCheck&&Date.parse(e.p.exp)+n<r)throw new Error("CACAO has expired");let s=$M.fromCacao(e),o=e.s.s,c=s.signMessage(),f=br(o,"base58btc"),h=Bu.parse(e.p.iss.replace("did:pkh:","")).address,p=br(h,"base58btc");if(!(0,nz.verify)(p,c,f))throw new Error("Signature does not belong to issuer")}i(jM,"verifySolanaSignature");a(jM,"verifySolanaSignature");var z0;(function(e){function t(r){return ym({value:r,codec:rl,hasher:Yu})}i(t,"fromCacao"),a(t,"fromCacao"),e.fromCacao=t})(z0||(z0={}));dd();um();var oz=rr(Qu(),1);dd();function zM(){return Mr((0,oz.randomBytes)(16),"base64")}i(zM,"randomString");a(zM,"randomString");var HM="base64pad",qM="base64url";function KM(e){return Mr(e,HM)}i(KM,"encodeBase64");a(KM,"encodeBase64");function VM(e){return Mr(e,qM)}i(VM,"encodeBase64Url");a(VM,"encodeBase64Url");function GM(e){return br(e,HM)}i(GM,"decodeBase64");a(GM,"decodeBase64");function b0(e){return JSON.parse(Mr(br(e,qM)))}i(b0,"base64urlToJSON");a(b0,"base64urlToJSON");function WM(e){if(e.signatures.length>1)throw new Error("Cant convert to compact jws");return`${e.signatures[0].protected}.${e.payload}.${e.signatures[0].signature}`}i(WM,"fromDagJWS");a(WM,"fromDagJWS");function ZM(e,t){if(t){let r=t.toISOString().split(".")[0]+"Z";return`${e}?versionTime=${r}`}else return e}i(ZM,"didWithTime");a(ZM,"didWithTime");function JM(e){return e?Array.isArray(e)?e:[e]:[]}i(JM,"extractControllers");a(JM,"extractControllers");function YM(e){return"registry"in e&&"cache"in e}i(YM,"isResolver");a(YM,"isResolver");var XM=i(class{constructor({provider:e,resolver:t={},resolverOptions:r,capability:n,parent:s}={}){if(e!=null&&(this._client=new vb(e)),n){if(this._capability=n,this._parentId=this._capability.p.iss,s&&this._parentId!==s)throw new Error("Capability issuer and parent not equal")}else s&&(this._parentId=s);this.setResolver(t,r)}get capability(){if(!this._capability)throw new Error("DID has no capability attached");return this._capability}get hasCapability(){return this._capability!=null}get parent(){if(!this._parentId)throw new Error("DID has no parent DID");return this._parentId}get hasParent(){return this._parentId!=null}get id(){if(this._id==null)throw new Error("DID is not authenticated");return this._id}get authenticated(){return this._id!=null}withCapability(e){return new XM({provider:this._client?.connection,resolver:this._resolver,capability:e,parent:this._parentId})}setProvider(e){if(this._client==null)this._client=new vb(e);else if(this._client.connection!==e)throw new Error("A different provider is already set, create a new DID instance to use another provider")}setResolver(e,t){this._resolver=YM(e)?e:new dx(e,t)}async authenticate({provider:e,paths:t=[],aud:r}={}){if(e!=null&&this.setProvider(e),this._client==null)throw new Error("No provider available");let n=zM(),s=await this._client.request("did_authenticate",{nonce:n,aud:r,paths:t}),{kid:o}=await this.verifyJWS(s),c=b0(s.payload);if(!o.includes(c.did))throw new Error("Invalid authencation response, kid mismatch");if(c.nonce!==n)throw new Error("Invalid authencation response, wrong nonce");if(c.aud!==r)throw new Error("Invalid authencation response, wrong aud");if(c.exp<Date.now()/1e3)throw new Error("Invalid authencation response, expired");return this._id=c.did,this._id}async createJWS(e,t={}){if(this._client==null)throw new Error("No provider available");if(this._id==null)throw new Error("DID is not authenticated");if(this._capability){let n=await z0.fromCacao(this._capability),s=jt.asCID(n.cid);if(!s)throw new Error("Capability CID of the JWS cannot be set to the capability payload cid as they are incompatible");t.protected=t.protected||{},t.protected.cap=`ipfs://${s?.toString()}`}let{jws:r}=await this._client.request("did_createJWS",{did:this._id,...t,payload:e});return r}async createDagJWS(e,t={}){let{cid:r,linkedBlock:n}=await YT(e),s=VM(r.bytes);Object.assign(t,{linkedBlock:KM(n)});let o=await this.createJWS(s,t),c=jt.asCID(r);if(!c)throw new Error("CID of the JWS cannot be set to the encoded payload cid as they are incompatible");if(o.link=c,this._capability){let f=await z0.fromCacao(this._capability);return{jws:o,linkedBlock:n,cacaoBlock:f.bytes}}return{jws:o,linkedBlock:n}}async verifyJWS(e,t={}){typeof e!="string"&&(e=WM(e));let r=b0(e.split(".")[0]).kid;if(!r)throw new Error('No "kid" found in jws');let n=await this.resolve(r);if(!t.disableTimecheck){let h=n.didDocumentMetadata?.nextUpdate;if(h){let v=t.revocationPhaseOutSecs?t.revocationPhaseOutSecs*1e3:0,b=new Date(h).valueOf()+v;if(!(t.atTime&&t.atTime.getTime()<b))throw new Error(`invalid_jws: signature authored with a revoked DID version: ${r}`)}let p=n.didDocumentMetadata?.updated;if(p&&t.atTime&&t.atTime.getTime()<new Date(p).valueOf())throw new Error(`invalid_jws: signature authored before creation of DID version: ${r}`)}let o=n.didDocument?.id;if(t.issuer&&t.issuer===t.capability?.p.iss&&o===t.capability.p.aud)j0.verify(t.capability,{atTime:t.atTime?t.atTime:void 0,revocationPhaseOutSecs:t.revocationPhaseOutSecs});else if(t.issuer&&t.issuer!==o){let h=ZM(t.issuer,t.atTime),v=(await this.resolve(h)).didDocument?.controller,b=JM(v);if(t.capability?.s&&t.capability.p.aud===o&&b.includes(t.capability.p.iss))j0.verify(t.capability,{atTime:t.atTime?t.atTime:void 0,revocationPhaseOutSecs:t.revocationPhaseOutSecs});else if(!(o?b.includes(o):!1))throw new Error(`invalid_jws: not a valid verificationMethod for issuer: ${r}`)}let c=n.didDocument?.verificationMethod||[];Cx(e,c);let f;try{f=b0(e.split(".")[1])}catch{}return{kid:r,payload:f,didResolutionResult:n}}async createJWE(e,t,r={}){let n=await sj(t,this._resolver);return ij(e,n,r.protectedHeader,r.aad)}async createDagJWE(e,t,r={}){let n=await tM(e);return this.createJWE(n,t,r)}async decryptJWE(e,t={}){if(this._client==null)throw new Error("No provider available");if(this._id==null)throw new Error("DID is not authenticated");let{cleartext:r}=await this._client.request("did_decryptJWE",{did:this._id,...t,jwe:e});return GM(r)}async decryptDagJWE(e){let t=await this.decryptJWE(e);return rM(t)}async resolve(e){let t=await this._resolver.resolve(e);if(t.didResolutionMetadata.error){let{error:r,message:n}=t.didResolutionMetadata,s=n?`, ${n}`:"";throw new Error(`Failed to resolve ${e}: ${r}${s}`)}return t}},"DID");a(XM,"DID");function cz(e){var t=0,r=e.length,n=[];if(r%2)throw new Error("invalid hex:"+e);for(;t<r;t+=2)n.push(parseInt(e.substr(t,2),16));return new Uint8Array(n)}i(cz,"toUint8Array");a(cz,"toUint8Array");var _A=rr(mm(),1);e2();var QM={};Sr(QM,{keyToDidDoc:()=>eC});function eC(e,t){let r=`did:key:${t}`,n=`${r}#${t}`;return{id:r,verificationMethod:[{id:n,type:"Secp256k1VerificationKey2018",controller:r,publicKeyBase58:Mr(e,"base58btc")}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}i(eC,"keyToDidDoc");a(eC,"keyToDidDoc");var tC={};Sr(tC,{keyToDidDoc:()=>nC});dd();var uz=rr(hm(),1);function rC(e){let t=new Uint8Array(e.length+2);return t[0]=236,t[1]=1,t.set(e,2),`z${Mr(t,"base58btc")}`}i(rC,"encodeKey");a(rC,"encodeKey");function nC(e,t){let r=`did:key:${t}`,n=`${r}#${t}`,s=(0,uz.convertPublicKeyToX25519)(e),o=`${r}#${rC(s)}`;return{id:r,verificationMethod:[{id:n,type:"Ed25519VerificationKey2018",controller:r,publicKeyBase58:Mr(e,"base58btc")}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n],keyAgreement:[{id:o,type:"X25519KeyAgreementKey2019",controller:r,publicKeyBase58:Mr(s,"base58btc")}]}}i(nC,"keyToDidDoc2");a(nC,"keyToDidDoc");var iC={};Sr(iC,{keyToDidDoc:()=>gC,pubKeyBytesToXY:()=>H2});var sC={};Sr(sC,{ECPointDecompress:()=>dC});function aC(e){return e>=0?e:-e}i(aC,"n");a(aC,"n");function oC(e,t){if(typeof e=="number"&&(e=BigInt(e)),typeof t=="number"&&(t=BigInt(t)),e<=0n||t<=0n)throw new RangeError("a and b MUST be > 0");let r=0n,n=1n,s=1n,o=0n;for(;e!==0n;){let c=t/e,f=t%e,h=r-s*c,p=n-o*c;t=e,e=f,r=s,n=o,s=h,o=p}return{g:t,x:r,y:n}}i(oC,"r");a(oC,"r");function H0(e,t){if(typeof e=="number"&&(e=BigInt(e)),typeof t=="number"&&(t=BigInt(t)),t<=0n)throw new RangeError("n must be > 0");let r=e%t;return r<0n?r+t:r}i(H0,"f");a(H0,"f");function cC(e,t){let r=oC(H0(e,t),t);if(r.g!==1n)throw new RangeError(`${e.toString()} does not have inverse modulo ${t.toString()}`);return H0(r.x,t)}i(cC,"g");a(cC,"g");function wd(e,t,r){if(typeof e=="number"&&(e=BigInt(e)),typeof t=="number"&&(t=BigInt(t)),typeof r=="number"&&(r=BigInt(r)),r<=0n)throw new RangeError("n must be > 0");if(r===1n)return 0n;if(e=H0(e,r),t<0n)return cC(wd(e,aC(t),r),r);let n=1n;for(;t>0;)t%2n===1n&&(n=n*e%r),t/=2n,e=e**2n%r;return n}i(wd,"b");a(wd,"b");var Wn={};Sr(Wn,{pubKeyBytesToHex:()=>uC,publicKeyHexToUint8ArrayPointPair:()=>j2,publicKeyIntToUint8ArrayPointPair:()=>z2,publicKeyIntToXY:()=>fC,publicKeyToXY:()=>lC,testHexString:()=>Rm,testUint8Array:()=>ul});t2();function uC(e){if(!ul(e))throw new TypeError("input must be a Uint8Array");return Mr(e,"base16")}i(uC,"pubKeyBytesToHex");a(uC,"pubKeyBytesToHex");function lC(e){if(!Rm(e))throw new TypeError("input must be string with characters 0-9,A-F,a-f");let t=j2(e),r=Ru.encode(t.xOctet).slice(1),n=Ru.encode(t.yOctet).slice(1);return{xm:r,ym:n}}i(lC,"publicKeyToXY");a(lC,"publicKeyToXY");function j2(e){if(!Rm(e))throw new TypeError("input must be string with characters 0-9,A-F,a-f");let t=e.slice(0,e.length/2),r=e.slice(e.length/2,e.length),n=br(t,"base16"),s=br(r,"base16");return{xOctet:n,yOctet:s}}i(j2,"publicKeyHexToUint8ArrayPointPair");a(j2,"publicKeyHexToUint8ArrayPointPair");function Rm(e){let t=/^[A-Fa-f0-9]+$/i;return!!(t.exec(e)!==null&&t.test(e)&&typeof e=="string")}i(Rm,"testHexString");a(Rm,"testHexString");function ul(e){return e==null?!1:e.constructor===Uint8Array}i(ul,"testUint8Array");a(ul,"testUint8Array");function fC(e){if(e==null)throw new TypeError("input cannot be null or undefined.");if(typeof e!="object")throw new TypeError("Input must be an object with properties x and y");if(!Object.prototype.hasOwnProperty.call(e,"x")||!Object.prototype.hasOwnProperty.call(e,"y"))throw new Error("Input must have properties x and y");if(typeof e.x!="bigint"&&typeof e.y!="bigint")throw new Error("Input coordinates must be BigInt");let t=z2(e),r=Ru.encode(t.xOctet).slice(1),n=Ru.encode(t.yOctet).slice(1);return{xm:r,ym:n}}i(fC,"publicKeyIntToXY");a(fC,"publicKeyIntToXY");function z2(e){if(e==null)throw new TypeError("input cannot be null or undefined.");if(typeof e!="object")throw new TypeError("Input must be an object with properties x and y");if(!Object.prototype.hasOwnProperty.call(e,"x")||!Object.prototype.hasOwnProperty.call(e,"y"))throw new Error("Input must have properties x and y");if(typeof e.x!="bigint"&&typeof e.y!="bigint")throw new Error("Input coordinates must be BigInt");let t=e.x.toString(),r=e.y.toString(),n=br(t,"base10"),s=br(r,"base10");return{xOctet:n,yOctet:s}}i(z2,"publicKeyIntToUint8ArrayPointPair");a(z2,"publicKeyIntToUint8ArrayPointPair");function dC(e){if(!ul(e))throw new TypeError("input must be a Uint8Array");let t=BigInt(2),r=t**256n-t**224n+t**192n+t**96n-1n,n=41058363725152142129326129780047268409114441015993725554835256314039467401291n,s=(r+1n)/4n,o=BigInt(e[0]-2),c=e.subarray(1),f=BigInt(Mr(c,"base10")),h=f**3n-f*3n+n,p=wd(h,s,r);return p%2n!==o&&(p=r-p),{x:f,y:p}}i(dC,"ECPointDecompress");a(dC,"ECPointDecompress");var hC={};Sr(hC,{ECPointDecompress:()=>pC});function pC(e){if(!ul(e))throw new TypeError("input must be a Uint8Array");let t=BigInt(2),r=t**384n-t**128n-t**96n+t**32n-1n,n=27580193559959705877849011840389048093056905856361568521428707301988689241309860865136260764883745107765439761230575n,s=(r+1n)/4n,o=BigInt(e[0]-2),c=e.subarray(1),f=BigInt(Mr(c,"base10")),h=f**3n-f*3n+n,p=wd(h,s,r);return p%2n!==o&&(p=r-p),{x:f,y:p}}i(pC,"ECPointDecompress2");a(pC,"ECPointDecompress");var mC={};Sr(mC,{ECPointDecompress:()=>vC});function vC(e){if(!ul(e))throw new TypeError("input must be a Uint8Array");let r=BigInt(2)**521n-1n,n=1093849038073734274511112390766805569936207598951683748994586394495953116150735016013708737573759623248592132296706313309438452531591012912142327488478985984n,s=(r+1n)/4n,o=BigInt(e[0]-2),c=e.subarray(1),f=BigInt(Mr(c,"base10")),h=f**3n-f*3n+n,p=wd(h,s,r);return p%2n!==o&&(p=r-p),{x:f,y:p}}i(vC,"ECPointDecompress3");a(vC,"ECPointDecompress");function gC(e,t){let r=`did:key:${t}`,n=`${r}#${t}`,s=H2(e);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-256",x:s.xm,y:s.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}i(gC,"keyToDidDoc3");a(gC,"keyToDidDoc");function H2(e){if(!Wn.testUint8Array(e))throw new TypeError("input must be a Uint8Array");let t=Wn.pubKeyBytesToHex(e),r=t.length/2;if(r==64)return Wn.publicKeyToXY(t);if(r==65&&t.slice(0,2)=="04"){let n=t.slice(2);return Wn.publicKeyToXY(n)}if(r==33&&(t.slice(0,2)=="03"||t.slice(0,2)=="02")){let n=br(t,"base16"),s=sC.ECPointDecompress(n);return Wn.publicKeyIntToXY(s)}throw new Error("Unexpected pubKeyBytes")}i(H2,"pubKeyBytesToXY");a(H2,"pubKeyBytesToXY");var yC={};Sr(yC,{keyToDidDoc:()=>bC,pubKeyBytesToXY:()=>q2});function bC(e,t){let r=`did:key:${t}`,n=`${r}#${t}`,s=q2(e);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-384",x:s.xm,y:s.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}i(bC,"keyToDidDoc4");a(bC,"keyToDidDoc");function q2(e){if(!Wn.testUint8Array(e))throw new TypeError("input must be a Uint8Array");let t=Wn.pubKeyBytesToHex(e),r=t.length/2;if(r==96)return Wn.publicKeyToXY(t);if(r==97&&t.slice(0,2)=="04"){let n=t.slice(2);return Wn.publicKeyToXY(n)}if(r==49&&(t.slice(0,2)=="03"||t.slice(0,2)=="02")){let n=br(t,"base16"),s=hC.ECPointDecompress(n);return Wn.publicKeyIntToXY(s)}throw new Error("Unexpected pubKeyBytes")}i(q2,"pubKeyBytesToXY2");a(q2,"pubKeyBytesToXY");var wC={};Sr(wC,{keyToDidDoc:()=>_C,pubKeyBytesToXY:()=>K2});function _C(e,t){let r=`did:key:${t}`,n=`${r}#${t}`,s=K2(e);return{id:r,verificationMethod:[{id:n,type:"JsonWebKey2020",controller:r,publicKeyJwk:{kty:"EC",crv:"P-521",x:s.xm,y:s.ym}}],authentication:[n],assertionMethod:[n],capabilityDelegation:[n],capabilityInvocation:[n]}}i(_C,"keyToDidDoc5");a(_C,"keyToDidDoc");function K2(e){if(!Wn.testUint8Array(e))throw new TypeError("input must be a Uint8Array");let t=Wn.pubKeyBytesToHex(e);if(132<=t.length&&t.length<=134&&(t.slice(0,2)=="03"||t.slice(0,2)=="02")){let r=br(t,"base16"),n=mC.ECPointDecompress(r);return Wn.publicKeyIntToXY(n)}throw new Error("Unexpected pubKeyBytes")}i(K2,"pubKeyBytesToXY3");a(K2,"pubKeyBytesToXY");var lz="application/did+ld+json",EA="application/did+json",fz={231:QM,237:tC,4608:iC,4609:yC,4610:wC};function dz(){return{key:async(e,t,r,n)=>{let s=n.accept||EA,o={didResolutionMetadata:{contentType:s},didDocument:null,didDocumentMetadata:{}};try{let c=ss.decode(t.id),f=_A.default.decode(c),h=c.slice(_A.default.decode.bytes),p=await fz[f].keyToDidDoc(h,t.id);s===lz?(p["@context"]="https://w3id.org/did/v1",o.didDocument=p):s===EA?o.didDocument=p:(delete o.didResolutionMetadata.contentType,o.didResolutionMetadata.error="representationNotSupported")}catch(c){o.didResolutionMetadata.error="invalidDid",o.didResolutionMetadata.message=c.toString()}return o}}}i(dz,"getResolver");a(dz,"getResolver");var EC=rr(hm(),1),hz=rr(x$(),1),pz="base64pad";function Mb(e){return JSON.parse((0,hz.default)(e))}i(Mb,"toStableObject");a(Mb,"toStableObject");function AC(e){let t=new Uint8Array(e.length+2);return t[0]=237,t[1]=1,t.set(e,2),`did:key:z${Mr(t,"base58btc")}`}i(AC,"encodeDID");a(AC,"encodeDID");function Cb(e){let[t,r,n]=e.split(".");return{payload:r,signatures:[{protected:t,signature:n}]}}i(Cb,"toGeneralJWS");a(Cb,"toGeneralJWS");var AA=a(async(e,t,r,n={})=>{let s=`${t}#${t.split(":")[2]}`,o=Ax(r),c=Mb(Object.assign(n,{kid:s,alg:"EdDSA"}));return tj(typeof e=="string"?e:Mb(e),o,c)},"sign"),mz={did_authenticate:async({did:e,secretKey:t},r)=>{let n=await AA({did:e,aud:r.aud,nonce:r.nonce,paths:r.paths,exp:Math.floor(Date.now()/1e3)+600},e,t);return Cb(n)},did_createJWS:async({did:e,secretKey:t},r)=>{if(r.did.split("#")[0]!==e)throw new po(4100,`Unknown DID: ${e}`);let s=await AA(r.payload,e,t,r.protected);return{jws:Cb(s)}},did_decryptJWE:async({secretKey:e},t)=>{let r=Bx((0,EC.convertSecretKeyToX25519)(e));try{let n=await nj(t.jwe,r);return{cleartext:Mr(n,pz)}}catch(n){throw new po(-32e3,n.message)}}},vz=i(class{constructor(e){let{secretKey:t,publicKey:r}=(0,EC.generateKeyPairFromSeed)(e),n=AC(r),s=mM(mz);this._handle=async o=>await s({did:n,secretKey:t},o)}get isDidProvider(){return!0}async send(e){return await this._handle(e)}},"Ed25519Provider");a(vz,"Ed25519Provider");var SC={};Sr(SC,{JsonPatchError:()=>Br,_areEquals:()=>Lu,applyOperation:()=>co,applyPatch:()=>Nm,applyReducer:()=>TC,deepClone:()=>bz,getValueByPointer:()=>Jf,validate:()=>G2,validator:()=>Yf});var gz=function(){var e=a(function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var o in s)s.hasOwnProperty(o)&&(n[o]=s[o])},e(t,r)},"extendStatics");return function(t,r){e(t,r);function n(){this.constructor=t}i(n,"__"),a(n,"__"),t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),yz=Object.prototype.hasOwnProperty;function q0(e,t){return yz.call(e,t)}i(q0,"hasOwnProperty");a(q0,"hasOwnProperty");function K0(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var s in e)q0(e,s)&&n.push(s);return n}i(K0,"_objectKeys");a(K0,"_objectKeys");function Zn(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}i(Zn,"_deepClone");a(Zn,"_deepClone");function V0(e){for(var t=0,r=e.length,n;t<r;){if(n=e.charCodeAt(t),n>=48&&n<=57){t++;continue}return!1}return!0}i(V0,"isInteger2");a(V0,"isInteger");function ao(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}i(ao,"escapePathComponent");a(ao,"escapePathComponent");function V2(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}i(V2,"unescapePathComponent");a(V2,"unescapePathComponent");function G0(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(G0(e[t]))return!0}else if(typeof e=="object"){for(var n=K0(e),s=n.length,o=0;o<s;o++)if(G0(e[n[o]]))return!0}}return!1}i(G0,"hasUndefined");a(G0,"hasUndefined");function Ib(e,t){var r=[e];for(var n in t){var s=typeof t[n]=="object"?JSON.stringify(t[n],null,2):t[n];typeof s<"u"&&r.push(n+": "+s)}return r.join(`
|
|
838
838
|
`)}i(Ib,"patchErrorMessageFormatter");a(Ib,"patchErrorMessageFormatter");var xC=function(e){gz(t,e);function t(r,n,s,o,c){var f=this.constructor,h=e.call(this,Ib(r,{name:n,index:s,operation:o,tree:c}))||this;return h.name=n,h.index=s,h.operation=o,h.tree=c,Object.setPrototypeOf(h,f.prototype),h.message=Ib(r,{name:n,index:s,operation:o,tree:c}),h}return i(t,"PatchError2"),a(t,"PatchError"),t}(Error),Br=xC,bz=Zn,Iu={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=Jf(r,this.path);n&&(n=Zn(n));var s=co(r,{op:"remove",path:this.from}).removed;return co(r,{op:"add",path:this.path,value:s}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=Jf(r,this.from);return co(r,{op:"add",path:this.path,value:Zn(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:Lu(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},wz={add:function(e,t,r){return V0(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return{newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:Iu.move,copy:Iu.copy,test:Iu.test,_get:Iu._get};function Jf(e,t){if(t=="")return e;var r={op:"_get",path:t};return co(e,r),r.value}i(Jf,"getValueByPointer");a(Jf,"getValueByPointer");function co(e,t,r,n,s,o){if(r===void 0&&(r=!1),n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=0),r&&(typeof r=="function"?r(t,0,e,t.path):Yf(t,0)),t.path===""){var c={newDocument:e};if(t.op==="add")return c.newDocument=t.value,c;if(t.op==="replace")return c.newDocument=t.value,c.removed=e,c;if(t.op==="move"||t.op==="copy")return c.newDocument=Jf(e,t.from),t.op==="move"&&(c.removed=e),c;if(t.op==="test"){if(c.test=Lu(e,t.value),c.test===!1)throw new Br("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c.newDocument=e,c}else{if(t.op==="remove")return c.removed=e,c.newDocument=null,c;if(t.op==="_get")return t.value=e,c;if(r)throw new Br("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",o,t,e);return c}}else{n||(e=Zn(e));var f=t.path||"",h=f.split("/"),p=e,v=1,b=h.length,y=void 0,_=void 0,T=void 0;for(typeof r=="function"?T=r:T=Yf;;){if(_=h[v],_&&_.indexOf("~")!=-1&&(_=V2(_)),s&&(_=="__proto__"||_=="prototype"&&v>0&&h[v-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&y===void 0&&(p[_]===void 0?y=h.slice(0,v).join("/"):v==b-1&&(y=t.path),y!==void 0&&T(t,0,e,y)),v++,Array.isArray(p)){if(_==="-")_=p.length;else{if(r&&!V0(_))throw new Br("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",o,t,e);V0(_)&&(_=~~_)}if(v>=b){if(r&&t.op==="add"&&_>p.length)throw new Br("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",o,t,e);var c=wz[t.op].call(t,p,_,e);if(c.test===!1)throw new Br("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c}}else if(v>=b){var c=Iu[t.op].call(t,p,_,e);if(c.test===!1)throw new Br("Test operation failed","TEST_OPERATION_FAILED",o,t,e);return c}if(p=p[_],r&&v<b&&(!p||typeof p!="object"))throw new Br("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",o,t,e)}}}i(co,"applyOperation");a(co,"applyOperation");function Nm(e,t,r,n,s){if(n===void 0&&(n=!0),s===void 0&&(s=!0),r&&!Array.isArray(t))throw new Br("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=Zn(e));for(var o=new Array(t.length),c=0,f=t.length;c<f;c++)o[c]=co(e,t[c],r,!0,s,c),e=o[c].newDocument;return o.newDocument=e,o}i(Nm,"applyPatch");a(Nm,"applyPatch");function TC(e,t,r){var n=co(e,t);if(n.test===!1)throw new Br("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}i(TC,"applyReducer");a(TC,"applyReducer");function Yf(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new Br("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);if(Iu[e.op]){if(typeof e.path!="string")throw new Br("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new Br('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Br("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Br("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&G0(e.value))throw new Br("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var s=e.path.split("/").length,o=n.split("/").length;if(s!==o+1&&s!==o)throw new Br("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new Br("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var c={op:"_get",path:e.from,value:void 0},f=G2([c],r);if(f&&f.name==="OPERATION_PATH_UNRESOLVABLE")throw new Br("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Br("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}i(Yf,"validator");a(Yf,"validator");function G2(e,t,r){try{if(!Array.isArray(e))throw new Br("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Nm(Zn(t),Zn(e),r||!0);else{r=r||Yf;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0)}}catch(s){if(s instanceof Br)return s;throw s}}i(G2,"validate5");a(G2,"validate");function Lu(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=Array.isArray(e),n=Array.isArray(t),s,o,c;if(r&&n){if(o=e.length,o!=t.length)return!1;for(s=o;s--!==0;)if(!Lu(e[s],t[s]))return!1;return!0}if(r!=n)return!1;var f=Object.keys(e);if(o=f.length,o!==Object.keys(t).length)return!1;for(s=o;s--!==0;)if(!t.hasOwnProperty(f[s]))return!1;for(s=o;s--!==0;)if(c=f[s],!Lu(e[c],t[c]))return!1;return!0}return e!==e&&t!==t}i(Lu,"_areEquals");a(Lu,"_areEquals");var MC={};Sr(MC,{compare:()=>RC,generate:()=>W0,observe:()=>OC,unobserve:()=>DC});var W2=new WeakMap,_z=function(){function e(t){this.observers=new Map,this.obj=t}return i(e,"Mirror2"),a(e,"Mirror"),e}(),Ez=function(){function e(t,r){this.callback=t,this.observer=r}return i(e,"ObserverInfo2"),a(e,"ObserverInfo"),e}();function CC(e){return W2.get(e)}i(CC,"getMirror");a(CC,"getMirror");function IC(e,t){return e.observers.get(t)}i(IC,"getObserverFromMirror");a(IC,"getObserverFromMirror");function kC(e,t){e.observers.delete(t.callback)}i(kC,"removeObserverFromMirror");a(kC,"removeObserverFromMirror");function DC(e,t){t.unobserve()}i(DC,"unobserve");a(DC,"unobserve");function OC(e,t){var r=[],n,s=CC(e);if(!s)s=new _z(e),W2.set(e,s);else{var o=IC(s,t);n=o&&o.observer}if(n)return n;if(n={},s.value=Zn(e),t){n.callback=t,n.next=null;var c=a(function(){W0(n)},"dirtyCheck"),f=a(function(){clearTimeout(n.next),n.next=setTimeout(c)},"fastCheck");typeof window<"u"&&(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f))}return n.patches=r,n.object=e,n.unobserve=function(){W0(n),clearTimeout(n.next),kC(s,n),typeof window<"u"&&(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f),window.removeEventListener("change",f))},s.observers.set(t,new Ez(t,n)),n}i(OC,"observe");a(OC,"observe");function W0(e,t){t===void 0&&(t=!1);var r=W2.get(e.object);Pm(r.value,e.object,e.patches,"",t),e.patches.length&&Nm(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}i(W0,"generate2");a(W0,"generate");function Pm(e,t,r,n,s){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var o=K0(t),c=K0(e),f=!1,h=!1,p=c.length-1;p>=0;p--){var v=c[p],b=e[v];if(q0(t,v)&&!(t[v]===void 0&&b!==void 0&&Array.isArray(t)===!1)){var y=t[v];typeof b=="object"&&b!=null&&typeof y=="object"&&y!=null&&Array.isArray(b)===Array.isArray(y)?Pm(b,y,r,n+"/"+ao(v),s):b!==y&&(f=!0,s&&r.push({op:"test",path:n+"/"+ao(v),value:Zn(b)}),r.push({op:"replace",path:n+"/"+ao(v),value:Zn(y)}))}else Array.isArray(e)===Array.isArray(t)?(s&&r.push({op:"test",path:n+"/"+ao(v),value:Zn(b)}),r.push({op:"remove",path:n+"/"+ao(v)}),h=!0):(s&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),f=!0)}if(!(!h&&o.length==c.length))for(var p=0;p<o.length;p++){var v=o[p];!q0(e,v)&&t[v]!==void 0&&r.push({op:"add",path:n+"/"+ao(v),value:Zn(t[v])})}}}i(Pm,"_generate");a(Pm,"_generate");function RC(e,t,r){r===void 0&&(r=!1);var n=[];return Pm(e,t,n,"",r),n}i(RC,"compare3");a(RC,"compare");var NC=Object.assign({},SC,MC,{JsonPatchError:xC,deepClone:Zn,escapePathComponent:ao,unescapePathComponent:V2}),Az=rr(pd(),1),Sz=rr(Qu(),1),Yn;(function(e){e[e.PREFER_CACHE=0]="PREFER_CACHE",e[e.SYNC_ALWAYS=1]="SYNC_ALWAYS",e[e.NEVER_SYNC=2]="NEVER_SYNC"})(Yn||(Yn={}));var SA=rr(pd(),1);js();fd();var PC={tile:0,"caip10-link":1,model:2,MID:3,UNLOADABLE:4};function BC(e){let t=PC[e];if(typeof t<"u")return t;throw new Error(`No stream type registered for name ${e}`)}i(BC,"codeByName");a(BC,"codeByName");function LC(e){let t=Object.entries(PC).find(([,r])=>r===e);if(t)return t[0];throw new Error(`No stream type registered for index ${e}`)}i(LC,"nameByCode");a(LC,"nameByCode");var _a=i(class{},"StreamType");a(_a,"StreamType");_a.nameByCode=LC;_a.codeByName=BC;var xA=rr(mm(),1);function Ki(e){let t,r,n;return typeof e=="object"?(t=e.hashFunction,r=e.expiring,n=e.tags):t=e,(s,o,c)=>{if(c.value!=null)c.value=kb(c.value,t,r,n);else if(c.get!=null)c.get=kb(c.get,t,r,n);else throw"Only put a Memoize() decorator on a method or get accessor."}}i(Ki,"Memoize");a(Ki,"Memoize");var Vy=new Map;function kb(e,t,r=0,n){let s=Symbol("__memoized_map__");return function(...o){let c;this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:new Map});let f=this[s];if(Array.isArray(n))for(let h of n)Vy.has(h)?Vy.get(h).push(f):Vy.set(h,[f]);if(t||o.length>0||r>0){let h;t===!0?h=o.map(b=>b.toString()).join("!"):t?h=t.apply(this,o):h=o[0];let p=`${h}__timestamp`,v=!1;if(r>0)if(!f.has(p))v=!0;else{let b=f.get(p);v=Date.now()-b>r}f.has(h)&&!v?c=f.get(h):(c=e.apply(this,o),f.set(h,c),r>0&&f.set(p,Date.now()))}else{let h=this;f.has(h)?c=f.get(h):(c=e.apply(this,o),f.set(h,c))}return c}}i(kb,"getNewFunction");a(kb,"getNewFunction");var Z2=206;js();fd();om();var TA=rr(mm(),1);function _d(e){try{return e()}catch(t){return t}}i(_d,"tryCatch");a(_d,"tryCatch");js();var MA=rr(mm(),1);Ju();function hc(e){let t=MA.default.decode(e),r=MA.default.decode.bytes,n=e.subarray(r);return[t,n,r]}i(hc,"readVarint");a(hc,"readVarint");function FC(e){return e===0||e===1}i(FC,"isCidVersion");a(FC,"isCidVersion");function Db(e){let[t,r]=hc(e);if(!FC(t))throw new Error(`Unknown CID version ${t}`);let[n,s]=hc(r),[,o,c]=hc(s),[f,,h]=hc(o),p=s.subarray(0,c+h+f),v=s.subarray(c+h+f);return[jt.create(t,n,n2(p)),v]}i(Db,"readCid");a(Db,"readCid");js();fd();function Ed(e,t="StreamRef"){let[r,n]=hc(e);if(r!==Z2)throw new Error(`Invalid ${t}, does not include streamid codec`);let[s,o]=hc(n),c=Db(o),[f,h]=c;if(h.length===0)return{kind:"stream-id",type:s,genesis:f};if(h.length===1&&h[0]===0)return{kind:"commit-id",type:s,genesis:f,commit:null};{let[p]=Db(h);return{kind:"commit-id",type:s,genesis:f,commit:p}}}i(Ed,"fromBytes");a(Ed,"fromBytes");var xz=/(ceramic:\/\/|\/ceramic\/)?([a-zA-Z0-9]+)(\?commit=([a-zA-Z0-9]+))?/;function Bm(e,t="StreamRef"){let r=xz.exec(e)||[],n=r[2];if(!n)throw new Error(`Malformed ${t} string: ${e}`);let s=wo.decode(n),o=Ed(s),c=r[4];return c?{kind:"commit-id",type:o.type,genesis:o.genesis,commit:J2(o.genesis,c)}:o}i(Bm,"fromString4");a(Bm,"fromString");function UC(e){try{return typeof e=="string"?jt.parse(e):jt.asCID(e)}catch{return null}}i(UC,"parseCID");a(UC,"parseCID");function J2(e,t=null){if(!t||t==="0")return null;let r=UC(t);if(r)return e.equals(r)?null:r;throw new Error("Cannot specify commit as a number except to request commit 0 (the genesis commit)")}i(J2,"parseCommit");a(J2,"parseCommit");var Ad=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate"),zi=i(function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)},"__metadata"),$C=i(class extends Error{constructor(e){super(`Invalid StreamID bytes ${wo.encode(e)}: contains commit`)}},"InvalidStreamIDBytesError");a($C,"InvalidStreamIDBytesError");var jC=i(class extends Error{constructor(e){super(`Invalid StreamID string ${e}: contains commit`)}},"InvalidStreamIDStringError");a(jC,"InvalidStreamIDStringError");function Y2(e){let t=Ed(e,"StreamID");if(t.kind==="stream-id")return new Xt(t.type,t.genesis);throw new $C(e)}i(Y2,"fromBytes2");a(Y2,"fromBytes");function zC(e){return _d(()=>Y2(e))}i(zC,"fromBytesNoThrow");a(zC,"fromBytesNoThrow");function X2(e){let t=Bm(e,"StreamID");if(t.kind==="stream-id")return new Xt(t.type,t.genesis);throw new jC(e)}i(X2,"fromString5");a(X2,"fromString");function HC(e){return _d(()=>X2(e))}i(HC,"fromStringNoThrow");a(HC,"fromStringNoThrow");var CA=Symbol.for("@ceramicnetwork/streamid/StreamID"),Xt=i(class{constructor(e,t){if(this._tag=CA,!(e||e===0))throw new Error("StreamID constructor: type required");if(!t)throw new Error("StreamID constructor: cid required");this._type=typeof e=="string"?_a.codeByName(e):e,this._cid=typeof t=="string"?jt.parse(t):t}static isInstance(e){return typeof e=="object"&&"_tag"in e&&e._tag===CA}static async fromGenesis(e,t){let r=await ym({value:t,codec:rl,hasher:Yu});return new Xt(e,r.cid)}get type(){return this._type}get typeName(){return _a.nameByCode(this._type)}get cid(){return this._cid}get bytes(){let e=TA.default.encode(Z2),t=TA.default.encode(this.type);return lo([e,t,this.cid.bytes])}get baseID(){return new Xt(this._type,this._cid)}equals(e){return Xt.isInstance(e)?this.type===e.type&&this.cid.equals(e.cid):!1}toString(){return wo.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[Symbol.for("nodejs.util.inspect.custom")](){return`StreamID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}},"StreamID");a(Xt,"StreamID");Xt.fromBytes=Y2;Xt.fromBytesNoThrow=zC;Xt.fromString=X2;Xt.fromStringNoThrow=HC;Ad([Ki(),zi("design:type",String),zi("design:paramtypes",[])],Xt.prototype,"typeName",null);Ad([Ki(),zi("design:type",Uint8Array),zi("design:paramtypes",[])],Xt.prototype,"bytes",null);Ad([Ki(),zi("design:type",Xt),zi("design:paramtypes",[])],Xt.prototype,"baseID",null);Ad([Ki(),zi("design:type",Function),zi("design:paramtypes",[]),zi("design:returntype",String)],Xt.prototype,"toString",null);Ad([Ki(),zi("design:type",Function),zi("design:paramtypes",[]),zi("design:returntype",String)],Xt.prototype,"toUrl",null);var ll=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate2"),Jn=i(function(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)},"__metadata2"),Gy=i(function(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},"__classPrivateFieldSet"),ma=i(function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},"__classPrivateFieldGet"),Tu,lc,Pf,qC=i(class extends Error{constructor(e){super(`Error while parsing CommitID from bytes ${wo.encode(e)}: no commit information provided`)}},"InvalidCommitIDBytesError");a(qC,"InvalidCommitIDBytesError");var KC=i(class extends Error{constructor(e){super(`Error while parsing CommitID from string ${e}: no commit information provided`)}},"InvalidCommitIDStringError");a(KC,"InvalidCommitIDStringError");function Q2(e){let t=Ed(e,"CommitID");if(t.kind==="commit-id")return new Er(t.type,t.genesis,t.commit);throw new qC(e)}i(Q2,"fromBytes3");a(Q2,"fromBytes");function VC(e){return _d(()=>Q2(e))}i(VC,"fromBytesNoThrow2");a(VC,"fromBytesNoThrow");function e6(e){let t=Bm(e,"CommitID");if(t.kind==="commit-id")return new Er(t.type,t.genesis,t.commit);throw new KC(e)}i(e6,"fromString6");a(e6,"fromString");function GC(e){return _d(()=>e6(e))}i(GC,"fromStringNoThrow2");a(GC,"fromStringNoThrow");var IA=Symbol.for("@ceramicnetwork/streamid/CommitID");function WC(e,t){return new Er(e.type,e.cid,t)}i(WC,"make");a(WC,"make");var Er=i(class{constructor(e,t,r=null){if(this._tag=IA,Tu.set(this,void 0),lc.set(this,void 0),Pf.set(this,void 0),!e&&e!==0)throw new Error("constructor: type required");if(!t)throw new Error("constructor: cid required");Gy(this,Tu,typeof e=="string"?_a.codeByName(e):e,"f"),Gy(this,lc,typeof t=="string"?jt.parse(t):t,"f"),Gy(this,Pf,J2(ma(this,lc,"f"),r),"f")}static isInstance(e){return typeof e=="object"&&"_tag"in e&&e._tag===IA}get baseID(){return new Xt(ma(this,Tu,"f"),ma(this,lc,"f"))}get type(){return ma(this,Tu,"f")}get typeName(){return _a.nameByCode(ma(this,Tu,"f"))}get cid(){return ma(this,lc,"f")}get commit(){return ma(this,Pf,"f")||ma(this,lc,"f")}get bytes(){let e=xA.default.encode(Z2),t=xA.default.encode(this.type),r=ma(this,Pf,"f")?.bytes||new Uint8Array([0]);return lo([e,t,this.cid.bytes,r])}equals(e){return this.type===e.type&&this.cid.equals(e.cid)&&this.commit.equals(e.commit)}toString(){return wo.encode(this.bytes)}toUrl(){return`ceramic://${this.toString()}`}[(Tu=new WeakMap,lc=new WeakMap,Pf=new WeakMap,Symbol.for("nodejs.util.inspect.custom"))](){return`CommitID(${this.toString()})`}[Symbol.toPrimitive](){return this.toString()}},"CommitID");a(Er,"CommitID");Er.fromBytes=Q2;Er.fromBytesNoThrow=VC;Er.fromString=e6;Er.fromStringNoThrow=GC;Er.make=WC;ll([Ki(),Jn("design:type",Xt),Jn("design:paramtypes",[])],Er.prototype,"baseID",null);ll([Ki(),Jn("design:type",String),Jn("design:paramtypes",[])],Er.prototype,"typeName",null);ll([Ki(),Jn("design:type",jt),Jn("design:paramtypes",[])],Er.prototype,"commit",null);ll([Ki(),Jn("design:type",Uint8Array),Jn("design:paramtypes",[])],Er.prototype,"bytes",null);ll([Ki(),Jn("design:type",Function),Jn("design:paramtypes",[]),Jn("design:returntype",String)],Er.prototype,"toString",null);ll([Ki(),Jn("design:type",Function),Jn("design:paramtypes",[]),Jn("design:returntype",String)],Er.prototype,"toUrl",null);fd();var mo;(function(e){function t(s){let o=Ed(s);switch(o.kind){case"commit-id":return new Er(o.type,o.genesis,o.commit);case"stream-id":return new Xt(o.type,o.genesis);default:throw new Error(`Malformed StreamRef bytes: ${wo.encode(s)}`)}}i(t,"fromBytes4"),a(t,"fromBytes"),e.fromBytes=t;function r(s){let o=Bm(s);switch(o.kind){case"commit-id":return new Er(o.type,o.genesis,o.commit);case"stream-id":return new Xt(o.type,o.genesis);default:throw new Error(`Malformed StreamRef string: ${s}`)}}i(r,"fromString7"),a(r,"fromString"),e.fromString=r;function n(s){if(Xt.isInstance(s)||Er.isInstance(s))return s;if(s instanceof Uint8Array)return t(s);if(typeof s=="string")return r(s);throw new Error(`Can not build CommitID or StreamID from ${JSON.stringify(s)}`)}i(n,"from4"),a(n,"from"),e.from=n})(mo||(mo={}));var Ob=a(function(e,t){return Ob=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},Ob(e,t)},"extendStatics");function Ks(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ob(e,t);function r(){this.constructor=e}i(r,"__"),a(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}i(Ks,"__extends2");a(Ks,"__extends");function ZC(e,t,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return i(s,"adopt"),a(s,"adopt"),new(r||(r=Promise))(function(o,c){function f(v){try{p(n.next(v))}catch(b){c(b)}}i(f,"fulfilled"),a(f,"fulfilled");function h(v){try{p(n.throw(v))}catch(b){c(b)}}i(h,"rejected"),a(h,"rejected");function p(v){v.done?o(v.value):s(v.value).then(f,h)}i(p,"step"),a(p,"step"),p((n=n.apply(e,t||[])).next())})}i(ZC,"__awaiter");a(ZC,"__awaiter");function t6(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(p){return function(v){return h([p,v])}}function h(p){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,p[0]&&(r=0)),r;)try{if(n=1,s&&(o=p[0]&2?s.return:p[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,p[1])).done)return o;switch(s=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,s=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(v){p=[6,v],s=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}i(t6,"__generator");a(t6,"__generator");function wc(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}i(wc,"__values");a(wc,"__values");function Ea(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,o=[],c;try{for(;(t===void 0||t-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(f){c={error:f}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}i(Ea,"__read");a(Ea,"__read");function vo(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}i(vo,"__spreadArray");a(vo,"__spreadArray");function yc(e){return this instanceof yc?(this.v=e,this):new yc(e)}i(yc,"__await");a(yc,"__await");function JC(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),s,o=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(y){n[y]&&(s[y]=function(_){return new Promise(function(T,O){o.push([y,_,T,O])>1||f(y,_)})})}function f(y,_){try{h(n[y](_))}catch(T){b(o[0][3],T)}}function h(y){y.value instanceof yc?Promise.resolve(y.value.v).then(p,v):b(o[0][2],y)}function p(y){f("next",y)}function v(y){f("throw",y)}function b(y,_){y(_),o.shift(),o.length&&f(o[0][0],o[0][1])}}i(JC,"__asyncGenerator");a(JC,"__asyncGenerator");function YC(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof wc=="function"?wc(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(c){return new Promise(function(f,h){c=e[o](c),s(f,h,c.done,c.value)})}}function s(o,c,f,h){Promise.resolve(h).then(function(p){o({value:p,done:f})},c)}}i(YC,"__asyncValues");a(YC,"__asyncValues");function Ar(e){return typeof e=="function"}i(Ar,"isFunction");a(Ar,"isFunction");function Lm(e){var t=a(function(n){Error.call(n),n.stack=new Error().stack},"_super"),r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}i(Lm,"createErrorClass");a(Lm,"createErrorClass");var Wy=Lm(function(e){return a(i(function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
839
839
|
`+r.map(function(n,s){return s+1+") "+n.toString()}).join(`
|
|
840
|
-
`):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl"),"UnsubscriptionErrorImpl")});function Xf(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}i(Xf,"arrRemove");a(Xf,"arrRemove");var Sd=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i(e,"Subscription2"),a(e,"Subscription"),e.prototype.unsubscribe=function(){var t,r,n,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=wc(c),h=f.next();!h.done;h=f.next()){var p=h.value;p.remove(this)}}catch(O){t={error:O}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}else c.remove(this);var v=this.initialTeardown;if(Ar(v))try{v()}catch(O){o=O instanceof Wy?O.errors:[O]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var y=wc(b),_=y.next();!_.done;_=y.next()){var T=_.value;try{Rb(T)}catch(O){o=o??[],O instanceof Wy?o=vo(vo([],Ea(o)),Ea(O.errors)):o.push(O)}}}catch(O){n={error:O}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(n)throw n.error}}}if(o)throw new Wy(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Rb(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Xf(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Xf(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),XC=Sd.EMPTY;function r6(e){return e instanceof Sd||e&&"closed"in e&&Ar(e.remove)&&Ar(e.add)&&Ar(e.unsubscribe)}i(r6,"isSubscription");a(r6,"isSubscription");function Rb(e){Ar(e)?e():e.unsubscribe()}i(Rb,"execFinalizer");a(Rb,"execFinalizer");var Nc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Z0={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=Z0.delegate;return s?.setTimeout?s.setTimeout.apply(s,vo([e,t],Ea(r))):setTimeout.apply(void 0,vo([e,t],Ea(r)))},clearTimeout:function(e){var t=Z0.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function n6(e){Z0.setTimeout(function(){var t=Nc.onUnhandledError;if(t)t(e);else throw e})}i(n6,"reportUnhandledError");a(n6,"reportUnhandledError");function Nb(){}i(Nb,"noop");a(Nb,"noop");var Tz=function(){return Fm("C",void 0,void 0)}();function QC(e){return Fm("E",void 0,e)}i(QC,"errorNotification");a(QC,"errorNotification");function eI(e){return Fm("N",e,void 0)}i(eI,"nextNotification");a(eI,"nextNotification");function Fm(e,t,r){return{kind:e,value:t,error:r}}i(Fm,"createNotification");a(Fm,"createNotification");var pc=null;function zf(e){if(Nc.useDeprecatedSynchronousErrorHandling){var t=!pc;if(t&&(pc={errorThrown:!1,error:null}),e(),t){var r=pc,n=r.errorThrown,s=r.error;if(pc=null,n)throw s}}else e()}i(zf,"errorContext");a(zf,"errorContext");function tI(e){Nc.useDeprecatedSynchronousErrorHandling&&pc&&(pc.errorThrown=!0,pc.error=e)}i(tI,"captureError");a(tI,"captureError");var i6=function(e){Ks(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,r6(r)&&r.add(n)):n.destination=Iz,n}return i(t,"Subscriber2"),a(t,"Subscriber"),t.create=function(r,n,s){return new Pb(r,n,s)},t.prototype.next=function(r){this.isStopped?_0(eI(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?_0(QC(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?_0(Tz,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Sd),Mz=Function.prototype.bind;function w0(e,t){return Mz.call(e,t)}i(w0,"bind");a(w0,"bind");var Cz=function(){function e(t){this.partialObserver=t}return i(e,"ConsumerObserver2"),a(e,"ConsumerObserver"),e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Uf(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Uf(n)}else Uf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Uf(r)}},e}(),Pb=function(e){Ks(t,e);function t(r,n,s){var o=e.call(this)||this,c;if(Ar(r)||!r)c={next:r??void 0,error:n??void 0,complete:s??void 0};else{var f;o&&Nc.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&w0(r.next,f),error:r.error&&w0(r.error,f),complete:r.complete&&w0(r.complete,f)}):c=r}return o.destination=new Cz(c),o}return i(t,"SafeSubscriber2"),a(t,"SafeSubscriber"),t}(i6);function Uf(e){Nc.useDeprecatedSynchronousErrorHandling?tI(e):n6(e)}i(Uf,"handleUnhandledError");a(Uf,"handleUnhandledError");function rI(e){throw e}i(rI,"defaultErrorHandler");a(rI,"defaultErrorHandler");function _0(e,t){var r=Nc.onStoppedNotification;r&&Z0.setTimeout(function(){return r(e,t)})}i(_0,"handleStoppedNotification");a(_0,"handleStoppedNotification");var Iz={closed:!0,next:Nb,error:rI,complete:Nb},s6=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Um(e){return e}i(Um,"identity3");a(Um,"identity");function nI(e){return e.length===0?Um:e.length===1?e[0]:a(i(function(r){return e.reduce(function(n,s){return s(n)},r)},"piped"),"piped")}i(nI,"pipeFromArray");a(nI,"pipeFromArray");var ln=function(){function e(t){t&&(this._subscribe=t)}return i(e,"Observable2"),a(e,"Observable"),e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,o=sI(t)?t:new Pb(t,r,n);return zf(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Bb(r),new r(function(s,o){var c=new Pb({next:function(f){try{t(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});n.subscribe(c)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[s6]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return nI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Bb(t),new t(function(n,s){var o;r.subscribe(function(c){return o=c},function(c){return s(c)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Bb(e){var t;return(t=e??Nc.Promise)!==null&&t!==void 0?t:Promise}i(Bb,"getPromiseCtor");a(Bb,"getPromiseCtor");function iI(e){return e&&Ar(e.next)&&Ar(e.error)&&Ar(e.complete)}i(iI,"isObserver");a(iI,"isObserver");function sI(e){return e&&e instanceof i6||iI(e)&&r6(e)}i(sI,"isSubscriber");a(sI,"isSubscriber");function aI(e){return Ar(e?.lift)}i(aI,"hasLift");a(aI,"hasLift");function Vs(e){return function(t){if(aI(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}i(Vs,"operate");a(Vs,"operate");function ds(e,t,r,n,s){return new kz(e,t,r,n,s)}i(ds,"createOperatorSubscriber");a(ds,"createOperatorSubscriber");var kz=function(e){Ks(t,e);function t(r,n,s,o,c,f){var h=e.call(this,r)||this;return h.onFinalize=c,h.shouldUnsubscribe=f,h._next=n?function(p){try{n(p)}catch(v){r.error(v)}}:e.prototype._next,h._error=o?function(p){try{o(p)}catch(v){r.error(v)}finally{this.unsubscribe()}}:e.prototype._error,h._complete=s?function(){try{s()}catch(p){r.error(p)}finally{this.unsubscribe()}}:e.prototype._complete,h}return i(t,"OperatorSubscriber2"),a(t,"OperatorSubscriber"),t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(i6),Dz=Lm(function(e){return a(i(function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl"),"ObjectUnsubscribedErrorImpl")}),oI=function(e){Ks(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return i(t,"Subject2"),a(t,"Subject"),t.prototype.lift=function(r){var n=new kA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dz},t.prototype.next=function(r){var n=this;zf(function(){var s,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var c=wc(n.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(r)}}catch(p){s={error:p}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var n=this;zf(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var s=n.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;zf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,s=this,o=s.hasError,c=s.isStopped,f=s.observers;return o||c?XC:(this.currentObservers=null,f.push(r),new Sd(function(){n.currentObservers=null,Xf(f,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,o=n.thrownError,c=n.isStopped;s?r.error(o):c&&r.complete()},t.prototype.asObservable=function(){var r=new ln;return r.source=this,r},t.create=function(r,n){return new kA(r,n)},t}(ln),kA=function(e){Ks(t,e);function t(r,n){var s=e.call(this)||this;return s.destination=r,s.source=n,s}return i(t,"AnonymousSubject2"),a(t,"AnonymousSubject"),t.prototype.next=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.next)===null||s===void 0||s.call(n,r)},t.prototype.error=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.error)===null||s===void 0||s.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,s;return(s=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&s!==void 0?s:XC},t}(oI),Oz=function(e){Ks(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return i(t,"BehaviorSubject2"),a(t,"BehaviorSubject"),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,s=r.thrownError,o=r._value;if(n)throw s;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(oI),cI={now:function(){return(cI.delegate||Date).now()},delegate:void 0},Rz=function(e){Ks(t,e);function t(r,n){return e.call(this)||this}return i(t,"Action2"),a(t,"Action"),t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(Sd),J0={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=J0.delegate;return s?.setInterval?s.setInterval.apply(s,vo([e,t],Ea(r))):setInterval.apply(void 0,vo([e,t],Ea(r)))},clearInterval:function(e){var t=J0.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Nz=function(e){Ks(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.pending=!1,s}return i(t,"AsyncAction2"),a(t,"AsyncAction"),t.prototype.schedule=function(r,n){var s;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,c=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(c,o,n)),this.pending=!0,this.delay=n,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(c,this.id,n),this},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),J0.setInterval(r.flush.bind(r,this),s)},t.prototype.recycleAsyncId=function(r,n,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return n;n!=null&&J0.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(r,n);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var s=!1,o;try{this.work(r)}catch(c){s=!0,o=c||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,s=r.scheduler,o=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Xf(o,this),n!=null&&(this.id=this.recycleAsyncId(s,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Rz),DA=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return i(e,"Scheduler2"),a(e,"Scheduler"),e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=cI.now,e}(),Pz=function(e){Ks(t,e);function t(r,n){n===void 0&&(n=DA.now);var s=e.call(this,r,n)||this;return s.actions=[],s._active=!1,s}return i(t,"AsyncScheduler2"),a(t,"AsyncScheduler"),t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var s;this._active=!0;do if(s=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,s){for(;r=n.shift();)r.unsubscribe();throw s}},t}(DA),Bz=new Pz(Nz),Lz=Bz,uI=new ln(function(e){return e.complete()});function a6(e){return e&&Ar(e.schedule)}i(a6,"isScheduler");a(a6,"isScheduler");function o6(e){return e[e.length-1]}i(o6,"last");a(o6,"last");function lI(e){return a6(o6(e))?e.pop():void 0}i(lI,"popScheduler");a(lI,"popScheduler");function fI(e,t){return typeof o6(e)=="number"?e.pop():t}i(fI,"popNumber");a(fI,"popNumber");var c6=a(function(e){return e&&typeof e.length=="number"&&typeof e!="function"},"isArrayLike");function u6(e){return Ar(e?.then)}i(u6,"isPromise");a(u6,"isPromise");function l6(e){return Ar(e[s6])}i(l6,"isInteropObservable");a(l6,"isInteropObservable");function f6(e){return Symbol.asyncIterator&&Ar(e?.[Symbol.asyncIterator])}i(f6,"isAsyncIterable");a(f6,"isAsyncIterable");function d6(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}i(d6,"createInvalidObservableTypeError");a(d6,"createInvalidObservableTypeError");function dI(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}i(dI,"getSymbolIterator");a(dI,"getSymbolIterator");var hI=dI();function h6(e){return Ar(e?.[hI])}i(h6,"isIterable");a(h6,"isIterable");function p6(e){return JC(this,arguments,a(i(function(){var r,n,s,o;return t6(this,function(c){switch(c.label){case 0:r=e.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,yc(r.read())];case 3:return n=c.sent(),s=n.value,o=n.done,o?[4,yc(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,yc(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})},"readableStreamLikeToAsyncGenerator_1"),"readableStreamLikeToAsyncGenerator_1"))}i(p6,"readableStreamLikeToAsyncGenerator");a(p6,"readableStreamLikeToAsyncGenerator");function m6(e){return Ar(e?.getReader)}i(m6,"isReadableStreamLike");a(m6,"isReadableStreamLike");function Ma(e){if(e instanceof ln)return e;if(e!=null){if(l6(e))return pI(e);if(c6(e))return mI(e);if(u6(e))return vI(e);if(f6(e))return v6(e);if(h6(e))return gI(e);if(m6(e))return yI(e)}throw d6(e)}i(Ma,"innerFrom");a(Ma,"innerFrom");function pI(e){return new ln(function(t){var r=e[s6]();if(Ar(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}i(pI,"fromInteropObservable");a(pI,"fromInteropObservable");function mI(e){return new ln(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}i(mI,"fromArrayLike");a(mI,"fromArrayLike");function vI(e){return new ln(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,n6)})}i(vI,"fromPromise");a(vI,"fromPromise");function gI(e){return new ln(function(t){var r,n;try{for(var s=wc(e),o=s.next();!o.done;o=s.next()){var c=o.value;if(t.next(c),t.closed)return}}catch(f){r={error:f}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}t.complete()})}i(gI,"fromIterable");a(gI,"fromIterable");function v6(e){return new ln(function(t){bI(e,t).catch(function(r){return t.error(r)})})}i(v6,"fromAsyncIterable");a(v6,"fromAsyncIterable");function yI(e){return v6(p6(e))}i(yI,"fromReadableStreamLike");a(yI,"fromReadableStreamLike");function bI(e,t){var r,n,s,o;return ZC(this,void 0,void 0,function(){var c,f;return t6(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),r=YC(e),h.label=1;case 1:return[4,r.next()];case 2:if(n=h.sent(),!!n.done)return[3,4];if(c=n.value,t.next(c),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=h.sent(),s={error:f},[3,11];case 6:return h.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}i(bI,"process2");a(bI,"process");function ba(e,t,r,n,s){n===void 0&&(n=0),s===void 0&&(s=!1);var o=t.schedule(function(){r(),s?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!s)return o}i(ba,"executeSchedule");a(ba,"executeSchedule");function g6(e,t){return t===void 0&&(t=0),Vs(function(r,n){r.subscribe(ds(n,function(s){return ba(n,e,function(){return n.next(s)},t)},function(){return ba(n,e,function(){return n.complete()},t)},function(s){return ba(n,e,function(){return n.error(s)},t)}))})}i(g6,"observeOn");a(g6,"observeOn");function y6(e,t){return t===void 0&&(t=0),Vs(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}i(y6,"subscribeOn");a(y6,"subscribeOn");function wI(e,t){return Ma(e).pipe(y6(t),g6(t))}i(wI,"scheduleObservable");a(wI,"scheduleObservable");function _I(e,t){return Ma(e).pipe(y6(t),g6(t))}i(_I,"schedulePromise");a(_I,"schedulePromise");function EI(e,t){return new ln(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}i(EI,"scheduleArray");a(EI,"scheduleArray");function AI(e,t){return new ln(function(r){var n;return ba(r,t,function(){n=e[hI](),ba(r,t,function(){var s,o,c;try{s=n.next(),o=s.value,c=s.done}catch(f){r.error(f);return}c?r.complete():r.next(o)},0,!0)}),function(){return Ar(n?.return)&&n.return()}})}i(AI,"scheduleIterable");a(AI,"scheduleIterable");function b6(e,t){if(!e)throw new Error("Iterable cannot be null");return new ln(function(r){ba(r,t,function(){var n=e[Symbol.asyncIterator]();ba(r,t,function(){n.next().then(function(s){s.done?r.complete():r.next(s.value)})},0,!0)})})}i(b6,"scheduleAsyncIterable");a(b6,"scheduleAsyncIterable");function SI(e,t){return b6(p6(e),t)}i(SI,"scheduleReadableStreamLike");a(SI,"scheduleReadableStreamLike");function xI(e,t){if(e!=null){if(l6(e))return wI(e,t);if(c6(e))return EI(e,t);if(u6(e))return _I(e,t);if(f6(e))return b6(e,t);if(h6(e))return AI(e,t);if(m6(e))return SI(e,t)}throw d6(e)}i(xI,"scheduled");a(xI,"scheduled");function TI(e,t){return t?xI(e,t):Ma(e)}i(TI,"from3");a(TI,"from");var MI=Lm(function(e){return a(i(function(){e(this),this.name="EmptyError",this.message="no elements in sequence"},"EmptyErrorImpl"),"EmptyErrorImpl")});function CI(e){return e instanceof Date&&!isNaN(e)}i(CI,"isValidDate");a(CI,"isValidDate");function w6(e,t){return Vs(function(r,n){var s=0;r.subscribe(ds(n,function(o){n.next(e.call(t,o,s++))}))})}i(w6,"map");a(w6,"map");var Fz=Array.isArray;function II(e,t){return Fz(t)?e.apply(void 0,vo([],Ea(t))):e(t)}i(II,"callOrApply");a(II,"callOrApply");function kI(e){return w6(function(t){return II(e,t)})}i(kI,"mapOneOrManyArgs");a(kI,"mapOneOrManyArgs");function DI(e,t,r,n,s,o,c,f){var h=[],p=0,v=0,b=!1,y=a(function(){b&&!h.length&&!p&&t.complete()},"checkComplete"),_=a(function(O){return p<n?T(O):h.push(O)},"outerNext"),T=a(function(O){o&&t.next(O),p++;var R=!1;Ma(r(O,v++)).subscribe(ds(t,function(P){s?.(P),o?_(P):t.next(P)},function(){R=!0},void 0,function(){if(R)try{p--;for(var P=a(function(){var K=h.shift();c?ba(t,c,function(){return T(K)}):T(K)},"_loop_1");h.length&&p<n;)P();y()}catch(K){t.error(K)}}))},"doInnerSub");return e.subscribe(ds(t,_,function(){b=!0,y()})),function(){f?.()}}i(DI,"mergeInternals");a(DI,"mergeInternals");function $m(e,t,r){return r===void 0&&(r=1/0),Ar(t)?$m(function(n,s){return w6(function(o,c){return t(n,o,s,c)})(Ma(e(n,s)))},r):(typeof t=="number"&&(r=t),Vs(function(n,s){return DI(n,s,e,r)}))}i($m,"mergeMap");a($m,"mergeMap");function OI(e){return e===void 0&&(e=1/0),$m(Um,e)}i(OI,"mergeAll");a(OI,"mergeAll");var Uz=["addListener","removeListener"],$z=["addEventListener","removeEventListener"],jz=["on","off"];function Y0(e,t,r,n){if(Ar(r)&&(n=r,r=void 0),n)return Y0(e,t,r).pipe(kI(n));var s=Ea(PI(e)?$z.map(function(f){return function(h){return e[f](t,h,r)}}):RI(e)?Uz.map(Lb(e,t)):NI(e)?jz.map(Lb(e,t)):[],2),o=s[0],c=s[1];if(!o&&c6(e))return $m(function(f){return Y0(f,t,r)})(Ma(e));if(!o)throw new TypeError("Invalid event target");return new ln(function(f){var h=a(function(){for(var p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];return f.next(1<p.length?p:p[0])},"handler");return o(h),function(){return c(h)}})}i(Y0,"fromEvent");a(Y0,"fromEvent");function Lb(e,t){return function(r){return function(n){return e[r](t,n)}}}i(Lb,"toCommonHandlerRegistry");a(Lb,"toCommonHandlerRegistry");function RI(e){return Ar(e.addListener)&&Ar(e.removeListener)}i(RI,"isNodeStyleEventEmitter");a(RI,"isNodeStyleEventEmitter");function NI(e){return Ar(e.on)&&Ar(e.off)}i(NI,"isJQueryStyleEventEmitter");a(NI,"isJQueryStyleEventEmitter");function PI(e){return Ar(e.addEventListener)&&Ar(e.removeEventListener)}i(PI,"isEventTarget");a(PI,"isEventTarget");function _6(e,t,r){e===void 0&&(e=0),r===void 0&&(r=Lz);var n=-1;return t!=null&&(a6(t)?r=t:n=t),new ln(function(s){var o=CI(e)?+e-r.now():e;o<0&&(o=0);var c=0;return r.schedule(function(){s.closed||(s.next(c++),0<=n?this.schedule(void 0,n):s.complete())},o)})}i(_6,"timer");a(_6,"timer");function BI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lI(e),n=fI(e,1/0),s=e;return s.length?s.length===1?Ma(s[0]):OI(n)(TI(s,r)):uI}i(BI,"merge");a(BI,"merge");function LI(e,t){return Vs(function(r,n){var s=0;r.subscribe(ds(n,function(o){return e.call(t,o,s++)&&n.next(o)}))})}i(LI,"filter");a(LI,"filter");function FI(e){return Vs(function(t,r){var n=!1;t.subscribe(ds(r,function(s){n=!0,r.next(s)},function(){n||r.next(e),r.complete()}))})}i(FI,"defaultIfEmpty");a(FI,"defaultIfEmpty");function UI(e){return e<=0?function(){return uI}:Vs(function(t,r){var n=0;t.subscribe(ds(r,function(s){++n<=e&&(r.next(s),e<=n&&r.complete())}))})}i(UI,"take");a(UI,"take");function $I(e){return e===void 0&&(e=jI),Vs(function(t,r){var n=!1;t.subscribe(ds(r,function(s){n=!0,r.next(s)},function(){return n?r.complete():r.error(e())}))})}i($I,"throwIfEmpty");a($I,"throwIfEmpty");function jI(){return new MI}i(jI,"defaultErrorFactory");a(jI,"defaultErrorFactory");function zI(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?LI(function(s,o){return e(s,o,n)}):Um,UI(1),r?FI(t):$I(function(){return new MI}))}}i(zI,"first");a(zI,"first");function HI(e,t){return Vs(function(r,n){var s=t??{},o=s.leading,c=o===void 0?!0:o,f=s.trailing,h=f===void 0?!1:f,p=!1,v=null,b=null,y=!1,_=a(function(){b?.unsubscribe(),b=null,h&&(R(),y&&n.complete())},"endThrottling"),T=a(function(){b=null,y&&n.complete()},"cleanupThrottling"),O=a(function(P){return b=Ma(e(P)).subscribe(ds(n,_,T))},"startThrottle"),R=a(function(){if(p){p=!1;var P=v;v=null,n.next(P),!y&&O(P)}},"send");r.subscribe(ds(n,function(P){p=!0,v=P,!(b&&!b.closed)&&(c?R():O(P))},function(){y=!0,!(h&&p&&b&&!b.closed)&&n.complete()}))})}i(HI,"throttle");a(HI,"throttle");var OA;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(OA||(OA={}));var X0;(function(e){e[e.NOT_REQUESTED=0]="NOT_REQUESTED",e[e.PENDING=1]="PENDING",e[e.PROCESSING=2]="PROCESSING",e[e.ANCHORED=3]="ANCHORED",e[e.FAILED=4]="FAILED"})(X0||(X0={}));var Fb;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(Fb||(Fb={}));var jm=i(class extends ln{constructor(e,t){super(r=>{e.subscribe(r)}),this.state$=e,this._context=t}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:t}=this.state$.value;return(0,SA.default)(e?.content??t)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Er.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Er.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===Fb.ANCHOR).map(({cid:e})=>Er.make(this.id,e))}get state(){return(0,SA.default)(this.state$.value)}async sync(e={}){e={sync:Yn.PREFER_CACHE,...e};let t=await this.api.loadStream(this.id,e);this.state$.next(t.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}},"Stream");a(jm,"Stream");function zm(){return e=>{}}i(zm,"StreamStatic");a(zm,"StreamStatic");var zz=rr(T$(),1);function qI(e){let t=new AbortController;if(e.length===0)throw Error("Need abort signals to create a merged abort signal");return e.some(r=>r.aborted)?(t.abort(),t.signal):(BI(...e.map(r=>Y0(r,"abort"))).pipe(zI()).subscribe(()=>{t.abort()}),t.signal)}i(qI,"mergeAbortSignals");a(qI,"mergeAbortSignals");var KI=i(class{constructor(e){let t=new AbortController;if(this.signal=t.signal,e<=0){t.abort();return}this._subscription=_6(e).subscribe(()=>{t.abort()})}clear(){this._subscription?.unsubscribe()}},"TimedAbortSignal");a(KI,"TimedAbortSignal");async function VI(e,t){let r=new AbortController,n=a(()=>{r.abort()},"onAbort");return e.addEventListener("abort",n),e.aborted&&r.abort(),t(r.signal).finally(()=>{e.removeEventListener("abort",n)})}i(VI,"abortable2");a(VI,"abortable");var Hz=60*1e3*3;async function gi(e,t={}){t.body&&Object.assign(t,{body:JSON.stringify(t.body),headers:{...t.headers,"Content-Type":"application/json"}});let r=t.timeout||Hz,n=new KI(r),s=t.signal?qI([t.signal,n.signal]):n.signal,o=await VI(s,c=>(0,zz.default)(String(e),{...t,signal:c})).finally(()=>n.clear());if(!o.ok){let c=await o.text();throw new Error(`HTTP request to '${e}' failed with status '${o.statusText}': ${c}`)}return o.json()}i(gi,"fetchJson");a(gi,"fetchJson");var l0=rr(pd(),1);js();function ga(e){let t=jt.asCID(e);if(t)return t;if(typeof e=="string")return jt.parse(e);if(e instanceof Uint8Array)return jt.decode(e);throw new Error(`${e} cannot be converted to a CID`)}i(ga,"toCID");a(ga,"toCID");var RA=0,jr=i(class{static streamIdFromState(e){return new Xt(e.type,e.log[0].cid)}static serializeCommit(e){let t=(0,l0.default)(e);return jr.isSignedCommitContainer(t)?(t.jws.link=t.jws.link.toString(),t.linkedBlock=Mr(t.linkedBlock,"base64"),t.cacaoBlock&&(t.cacaoBlock=Mr(t.cacaoBlock,"base64")),t):(jr.isSignedCommit(e)&&(t.link=t.link.toString()),jr.isAnchorCommit(e)&&(t.proof=t.proof.toString()),t.id&&(t.id=t.id.toString()),t.prev&&(t.prev=t.prev.toString()),e.header?.model&&(t.header.model=Mr(e.header.model,"base64")),t)}static deserializeCommit(e){let t=(0,l0.default)(e);return jr.isSignedCommitContainer(t)?(t.jws.link=ga(t.jws.link),t.linkedBlock=br(t.linkedBlock,"base64"),t.cacaoBlock&&(t.cacaoBlock=br(t.cacaoBlock,"base64")),t):(jr.isSignedCommit(t)&&(t.link=ga(t.link)),jr.isAnchorCommit(t)&&(t.proof=ga(t.proof)),t.id&&(t.id=ga(t.id)),t.prev&&(t.prev=ga(t.prev)),t.header?.model&&(t.header.model=br(t.header.model,"base64")),t)}static serializeState(e){let t=(0,l0.default)(e);return t.log=t.log.map(r=>({...r,cid:r.cid.toString()})),t.anchorStatus!=null&&(t.anchorStatus=X0[t.anchorStatus]),t.anchorProof!=null&&(t.anchorProof.txHash=t.anchorProof.txHash.toString(),t.anchorProof.root=t.anchorProof.root.toString()),e.metadata?.model&&(t.metadata.model=e.metadata.model.toString()),e.next?.metadata?.model&&(t.next.metadata.model=e.next.metadata.model.toString()),e.metadata?.unique&&e.type!=RA&&(t.metadata.unique=Mr(t.metadata.unique,"base64")),t.doctype=_a.nameByCode(t.type),t}static deserializeState(e){if(!e)return null;let t=(0,l0.default)(e);return t.doctype&&(t.type=_a.codeByName(t.doctype),delete t.doctype),t.log=t.log.map(r=>({...r,cid:ga(r.cid)})),t.anchorProof&&(t.anchorProof.txHash=ga(t.anchorProof.txHash),t.anchorProof.root=ga(t.anchorProof.root)),t.anchorStatus&&(t.anchorStatus=X0[t.anchorStatus]),e.metadata?.model&&(t.metadata.model=Xt.fromString(e.metadata.model)),e.next?.metadata?.model&&(t.next.metadata.model=Xt.fromString(e.next.metadata.model)),e.metadata?.unique&&e.type!=RA&&(t.metadata.unique=br(e.metadata.unique,"base64")),t}static statesEqual(e,t){return JSON.stringify(jr.serializeState(e))===JSON.stringify(jr.serializeState(t))}static isStateSupersetOf(e,t){if(e.log.length<t.log.length)return!1;for(let r in t.log)if(!e.log[r].cid.equals(t.log[r].cid))return!1;return!(e.log.length===t.log.length&&e.anchorStatus!=t.anchorStatus)}static assertCommitLinksToState(e,t){let r=this.streamIdFromState(e);if(t.id&&!t.id.equals(e.log[0].cid))throw new Error(`Invalid genesis CID in commit for StreamID ${r.toString()}. Found: ${t.id}, expected ${e.log[0].cid}`);let n=e.log[e.log.length-1].cid;if(!t.prev.equals(n))throw new Error(`Commit doesn't properly point to previous commit in log. Expected ${n}, found 'prev' ${t.prev}`)}static async convertCommitToSignedCommitContainer(e,t){if(jr.isSignedCommit(e)){let r=await t.block.get(e.link);return{jws:e,linkedBlock:r}}return e}static isSignedCommitContainer(e){return e&&e.jws!==void 0}static isSignedCommit(e){return e&&e.link!==void 0}static isAnchorCommit(e){return e&&e.proof!==void 0}static isSignedCommitData(e){return e&&e.envelope!==void 0}static isAnchorCommitData(e){return e&&e.proof!==void 0}},"StreamUtils");a(jr,"StreamUtils");var GI=i(class extends Oz{next(e){let t=this.value;jr.statesEqual(t,e)||super.next(e)}},"StreamStateSubject");a(GI,"StreamStateSubject");var qz=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate3"),mi,Zy={anchor:!0,publish:!0,pin:!0,sync:Yn.PREFER_CACHE},Kz={sync:Yn.PREFER_CACHE},NA={anchor:!0,publish:!0,throwOnInvalidCommit:!0};function E0(e,t){if(typeof e?.schema=="string")try{Er.fromString(e.schema)}catch{throw new Error("Schema must be a CommitID")}let r={controllers:e?.controllers,family:e?.family,schema:e?.schema?.toString(),tags:e?.tags};if(t)e?.deterministic||(r.unique=Mr((0,Sz.randomBytes)(12),"base64")),e?.forbidControllerChange&&(r.forbidControllerChange=!0);else{if(e?.deterministic!==void 0||e?.unique!==void 0)throw new Error("Cannot change 'deterministic' or 'unique' properties on existing Streams");if(e?.forbidControllerChange!==void 0)throw new Error("Cannot change 'forbidControllerChange' property on existing Streams")}return Object.keys(r).forEach(n=>r[n]===void 0&&delete r[n]),r}i(E0,"headerFromMetadata");a(E0,"headerFromMetadata");async function Ub(e){if(!e.did)throw new Error("No DID provided");return e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`)),e.did}i(Ub,"getAuthenticatedDID");a(Ub,"getAuthenticatedDID");async function A0(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(A0,"throwReadOnlyError");a(A0,"throwReadOnlyError");var Aa=mi=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,Az.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async create(t,r,n,s={}){s={...Zy,...s},!n?.deterministic&&s.syncTimeoutSeconds==null&&(s.syncTimeoutSeconds=0);let o=s.asDID?{did:s.asDID}:t,c=await mi.makeGenesis(o,r,n);return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,c,s)}static async createFromGenesis(t,r,n={}){n={...Zy,...n},r.header?.unique&&n.syncTimeoutSeconds==null&&(n.syncTimeoutSeconds=0);let s=r.data?await mi._signDagJWS(t,r):r;return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,s,n)}static async deterministic(t,r,n={}){if(n={...Zy,...n},r={...r,deterministic:!0},r.family==null&&r.tags==null)throw new Error("Family and/or tags are required when creating a deterministic tile document");let s=await mi.makeGenesis(t,null,r);return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,s,n)}static async load(t,r,n={}){n={...Kz,...n};let s=mo.from(r);if(s.type!=mi.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${mi.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async update(t,r,n={}){n={...NA,...n};let s=n.asDID?{did:n.asDID}:this.api,o=await this.makeCommit(s,t,r),c=await this.api.applyCommit(this.id,o,n);this.state$.next(c.state)}async patch(t,r={}){r={...NA,...r};let s={header:E0(this.metadata,!1),data:t,prev:this.tip,id:this.id.cid},o=await mi._signDagJWS(this.api,s),c=await this.api.applyCommit(this.id,o,r);this.state$.next(c.state)}makeReadOnly(){this.update=A0,this.patch=A0,this.sync=A0,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}async makeCommit(t,r,n){let s=await this._makeRawCommit(r,n);return mi._signDagJWS(t,s)}async _makeRawCommit(t,r){r||(r={});let n=E0(r,!1);if(t==null&&(t=this.content),n.controllers){if(n.controllers.length!==1)throw new Error("Exactly one controller must be specified");if(!n.controllers[0])throw new Error("Controller cannot be updated to an undefined value.")}let s=NC.compare(this.content,t),o=this.state.log[0];return{header:n,data:s,prev:this.tip,id:o.cid}}static async makeGenesis(t,r,n){if(n||(n={}),!n.controllers||n.controllers.length===0)if(t.did){let c=await Ub(t);n.controllers=[c.hasParent?c.parent:c.id]}else throw new Error("No controllers specified");if(n.controllers?.length!==1)throw new Error("Exactly one controller must be specified");let s=E0(n,!0);if(n?.deterministic&&r)throw new Error("Initial content must be null when creating a deterministic Tile document");if(r==null){let c={header:s};return Cm(c),c}let o={data:r,header:s};return mi._signDagJWS(t,o)}static async _signDagJWS(t,r){return(await Ub(t)).createDagJWS(r)}},"TileDocument2"),"TileDocument");Aa.STREAM_TYPE_NAME="tile";Aa.STREAM_TYPE_ID=0;Aa=mi=qz([zm()],Aa);var Vz=rr(M$(),1);function WI(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(WI,"_checkPrivateRedeclaration2");a(WI,"_checkPrivateRedeclaration");function ZI(e,t){return t.get?t.get.call(e):t.value}i(ZI,"_classApplyDescriptorGet2");a(ZI,"_classApplyDescriptorGet");function JI(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(JI,"_classApplyDescriptorSet2");a(JI,"_classApplyDescriptorSet");function E6(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(E6,"_classExtractFieldDescriptor2");a(E6,"_classExtractFieldDescriptor");function S0(e,t){var r=E6(e,t,"get");return ZI(e,r)}i(S0,"_classPrivateFieldGet2");a(S0,"_classPrivateFieldGet");function $b(e,t,r){WI(e,t),t.set(e,r)}i($b,"_classPrivateFieldInit2");a($b,"_classPrivateFieldInit");function jb(e,t,r){var n=E6(e,t,"set");return JI(e,n,r),r}i(jb,"_classPrivateFieldSet2");a(jb,"_classPrivateFieldSet");function YI(e){return typeof e=="string"||Er.isInstance(e)||Xt.isInstance(e)?{streamId:e}:{streamId:e.streamId,genesis:e.genesis}}i(YI,"keyToQuery");a(YI,"keyToQuery");function x0(e){return typeof e=="string"?mo.from(e).toString():Er.isInstance(e)||Xt.isInstance(e)?e.toString():e.streamId.toString()}i(x0,"keyToString");a(x0,"keyToString");async function XI(e){let t=await Aa.makeGenesis({},null,{...e,deterministic:!0}),r=await Xt.fromGenesis("tile",t);return{genesis:t,streamId:r}}i(XI,"getDeterministicQuery");a(XI,"getDeterministicQuery");var Gz=a(()=>Promise.resolve([]),"tempBatchLoadFn"),f0=new WeakMap,Jy=new WeakMap,Wz=i(class extends Vz.default{cache(e){if(!S0(this,Jy))return!1;let t=e.id.toString();return this.clear(t).prime(t,e),!0}async create(e,t,r){let n=await Aa.create(S0(this,f0),e,t,r);return this.cache(n),n}async deterministic(e,t){let r=await XI(e);try{return await super.load(r)}catch{let s=await Aa.createFromGenesis(S0(this,f0),r.genesis,t);return this.cache(s),s}}async load(e){return await super.load(e)}async update(e,t,r,n){let s=x0(e);this.clear(s);let o=await this.load({streamId:s});return await o.update(t,r,n),o}constructor(e){super(Gz,{cache:!0,cacheKeyFn:x0,cacheMap:e.cache!=null&&typeof e.cache!="boolean"?e.cache:void 0}),$b(this,f0,{writable:!0,value:void 0}),$b(this,Jy,{writable:!0,value:void 0}),this._batchLoadFn=async t=>{e.cache||this.clearAll();let r=await e.ceramic.multiQuery(t.map(YI),e.multiqueryTimeout);return t.map(n=>{let s=x0(n),o=r[s];return o||new Error(`Failed to load stream: ${s}`)})},jb(this,f0,e.ceramic),jb(this,Jy,!!e.cache)}},"TileLoader");a(Wz,"TileLoader");function zb(e){return typeof e=="string"?Xt.fromString(e):e}i(zb,"typeStreamID");a(zb,"typeStreamID");function QI(e,t){let r=new URL(e);for(let[n,s]of Object.entries(t))Xt.isInstance(s)?r.searchParams.set(n,s.toString()):typeof s=="object"?r.searchParams.set(n,JSON.stringify(s)):r.searchParams.set(n,s);return r}i(QI,"serializeObjectToSearchParams");a(QI,"serializeObjectToSearchParams");function Hb(e){let t={};for(let[r,n]of Object.entries(e))Xt.isInstance(n)?t[r]=n.toString():t[r]=n;return t}i(Hb,"serializeObjectForHttpPost");a(Hb,"serializeObjectForHttpPost");var ji=i(class extends ln{constructor(e,t,r){super(n=>{this.state$.observers.length===0&&(this.periodicSubscription=_6(0,r).pipe(HI(()=>this._syncState(this.id,{sync:Yn.PREFER_CACHE}))).subscribe()),this.state$.subscribe(n).add(()=>{this.state$.observers.length===0&&this.periodicSubscription?.unsubscribe()})}),this.state$=new GI(e),this._apiUrl=new URL(t)}get value(){return this.state$.value}get state(){return this.state$.value}next(e){this.state$.next(e)}async _syncState(e,t){let r=await ji._load(e,this._apiUrl,t);this.state$.next(jr.deserializeState(r))}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}static async createFromGenesis(e,t,r,n,s){let o=new URL("./streams",e),{state:c}=await gi(o,{method:"post",body:{type:t,genesis:jr.serializeCommit(r),opts:n}});return new ji(jr.deserializeState(c),e,s)}static async applyCommit(e,t,r,n,s){let o=new URL("./commits",e),{state:c}=await gi(o,{method:"post",body:{streamId:t.toString(),commit:jr.serializeCommit(r),opts:n}});return new ji(jr.deserializeState(c),e,s)}static async _load(e,t,r){let n=QI(new URL(`./streams/${e}`,t),r),{state:s}=await gi(n);return s}static async load(e,t,r,n){let s=await ji._load(e,t,n);return new ji(jr.deserializeState(s),t,r)}static async loadStreamCommits(e,t){let r=new URL(`./commits/${e}`,t),{commits:n}=await gi(r);return n.map(s=>({cid:s.cid,value:jr.deserializeCommit(s.value)}))}complete(){this.state$.complete()}},"Document");a(ji,"Document");var Qf;(function(e){e[e.PREFER_CACHE=0]="PREFER_CACHE",e[e.SYNC_ALWAYS=1]="SYNC_ALWAYS",e[e.NEVER_SYNC=2]="NEVER_SYNC",e[e.SYNC_ON_ERROR=3]="SYNC_ON_ERROR"})(Qf||(Qf={}));var PA=rr(pd(),1),BA;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(BA||(BA={}));var qb;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(qb||(qb={}));var ek=i(class extends ln{constructor(e,t){super(r=>{e.subscribe(r)}),this.state$=e,this._context=t}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:t}=this.state$.value;return(0,PA.default)(e?.content??t)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Er.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Er.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===qb.ANCHOR).map(({cid:e})=>Er.make(this.id,e))}get state(){return(0,PA.default)(this.state$.value)}async sync(e={}){e={sync:Qf.PREFER_CACHE,...e};let t=await this.api.loadStream(this.id,e);this.state$.next(t.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}},"Stream2");a(ek,"Stream");function tk(){return e=>{}}i(tk,"StreamStatic2");a(tk,"StreamStatic");function rk(e){if(typeof e=="string"&&e.includes("@")){let[t,r]=e.split("@");if(!t||!r)throw new Error("Invalid accountId provided");return new Bu({address:t,chainId:r})}return new Bu(e)}i(rk,"normalizeAccountId");a(rk,"normalizeAccountId");var Zz="(?:%[0-9a-fA-F]{2})",LA=`(?:[a-zA-Z0-9._-]|${Zz})`,Jz="([a-z0-9]+)",Yz=`((?:${LA}*:)*(${LA}+))`,FA="[a-zA-Z0-9_.:%-]",Xz=`;${FA}+=${FA}*`,Qz=`((${Xz})*)`,eH="(/[^#?]*)?",tH="([?][^#]*)?",rH="(#.*)?",nH=new RegExp(`^did:${Jz}:${Yz}${Qz}${eH}${tH}${rH}$`);function nk(e){if(e===""||!e)return null;let t=e.match(nH);if(t){let r={did:`did:${t[1]}:${t[2]}`,method:t[1],id:t[2],didUrl:e};if(t[4]){let n=t[4].slice(1).split(";");r.params={};for(let s of n){let o=s.split("=");r.params[o[0]]=o[1]}}return t[6]&&(r.path=t[6]),t[7]&&(r.query=t[7].slice(1)),t[8]&&(r.fragment=t[8].slice(1)),r}return null}i(nk,"parse2");a(nk,"parse");var iH=rr(pd(),1),sH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate4"),fc,Yy=a(()=>{throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")},"throwReadOnlyError"),UA={anchor:!1,publish:!0,sync:Qf.PREFER_CACHE},Xy={anchor:!0,publish:!0},aH={sync:Qf.PREFER_CACHE},Fu=fc=a(i(class extends ek{constructor(){super(...arguments),this._isReadOnly=!1}get did(){return this.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,iH.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async fromAccount(t,r,n={}){n={...UA,...n};let s=rk(r),o=fc.makeGenesis(s);return fc.fromGenesis(t,o,n)}static async fromGenesis(t,r,n={}){return n={...UA,...n},t.createStreamFromGenesis(fc.STREAM_TYPE_ID,r,n)}async setDid(t,r,n={}){n={...Xy,...n};let s=typeof t=="string"?t.trim():t.id;if(nk(s)?.did!==s)throw new Error(`DID is not valid: '${s}'`);let c=await r.createLink(s);return this.setDidProof(c,n)}async setDidProof(t,r={}){r={...Xy,...r};let n=this.makeCommit(t),s=await this.api.applyCommit(this.id,n,r);this.state$.next(s.state)}async clearDid(t,r={}){r={...Xy,...r};let n=await t.createLink("");return this.setDidProof(n,r)}static async load(t,r,n={}){n={...aH,...n};let s=mo.from(r);if(s.type!=fc.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${fc.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}static makeGenesis(t){return t.chainId.namespace==="eip155"&&(t.address=t.address.toLowerCase()),{header:{controllers:[`${t.address}@${t.chainId.toString()}`],family:`caip10-${t.chainId.toString()}`}}}makeCommit(t){return{data:t,prev:this.tip,id:this.id.cid}}makeReadOnly(){this.setDidProof=Yy,this.setDid=Yy,this.sync=Yy,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}},"Caip10Link2"),"Caip10Link");Fu.STREAM_TYPE_NAME="caip10-link";Fu.STREAM_TYPE_ID=1;Fu=fc=sH([tk()],Fu);js();Ju();var oH=rr(F$(),1),cH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate5"),Bs,uH={sync:Yn.PREFER_CACHE};async function Kb(e){if(e.did==null)throw new Error("No DID provided");e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`))}i(Kb,"_ensureAuthenticated");a(Kb,"_ensureAuthenticated");async function ik(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(ik,"throwReadOnlyError3");a(ik,"throwReadOnlyError");var _c=Bs=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){return{controller:this.state$.value.metadata.controllers[0],model:Bs.MODEL}}static async create(t,r,n){Bs.assertComplete(r);let s={publish:!0,anchor:!0,pin:!0,sync:Yn.NEVER_SYNC,throwOnInvalidCommit:!0},o=await Bs._makeGenesis(t,r,n);return await t.createStreamFromGenesis(Bs.STREAM_TYPE_ID,o,s)}static assertComplete(t,r){if(!t.name)throw r?new Error(`Model with StreamID ${r.toString()} is missing a 'name' field`):new Error("Model is missing a 'name' field");if(!t.schema)throw r?new Error(`Model ${t.name} (${r.toString()}) is missing a 'schema' field`):new Error(`Model ${t.name} is missing a 'schema' field`);if(!t.accountRelation)throw r?new Error(`Model ${t.name} (${r.toString()}) is missing a 'accountRelation' field`):new Error(`Model ${t.name} is missing a 'accountRelation' field`)}static async load(t,r,n={}){n={...uH,...n};let s=mo.from(r);if(s.type!=Bs.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${Bs.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return await t.loadStream(s,n)}static async _makeGenesis(t,r,n){let s=await this._makeRawGenesis(t,r,n);return Bs._signDagJWS(t,s)}static async _makeRawGenesis(t,r,n){if(r==null)throw new Error("Genesis content cannot be null");if(!n||!n.controller)if(t.did)await Kb(t),n={controller:t.did.hasParent?t.did.parent:t.did.id};else throw new Error("No controller specified");let s={controllers:[n.controller],model:Bs.MODEL.bytes};return{data:r,header:s}}makeReadOnly(){this.sync=ik,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}static async _signDagJWS(t,r){return await Kb(t),t.did.createDagJWS(r)}},"Model2"),"Model");_c.STREAM_TYPE_NAME="model";_c.STREAM_TYPE_ID=2;_c.MODEL=function(){let e=Cm("model-v1"),t=oH.default.encode(e,"identity"),r=Nu(B0,t),n=jt.createV1(B0,r);return new Xt("UNLOADABLE",n)}();_c=Bs=cH([zm()],_c);var lH=rr(Qu(),1),fH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate6"),ns,dH={anchor:!0,publish:!0,pin:!0,sync:Yn.NEVER_SYNC,syncTimeoutSeconds:0},hH={anchor:!1,publish:!1,pin:!0,sync:Yn.PREFER_CACHE},pH={sync:Yn.PREFER_CACHE},$A={anchor:!0,publish:!0,throwOnInvalidCommit:!0};async function Vb(e){if(e.did==null)throw new Error("No DID provided");e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`))}i(Vb,"_ensureAuthenticated2");a(Vb,"_ensureAuthenticated");async function T0(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(T0,"throwReadOnlyError4");a(T0,"throwReadOnlyError");var Uu=ns=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let t=this.state$.value.metadata;return{controller:t.controllers[0],model:t.model}}static async create(t,r,n,s={}){s={...dH,...s};let o=s.asDID?{did:s.asDID}:t,c=await ns._makeGenesis(o,r,n);return t.createStreamFromGenesis(ns.STREAM_TYPE_ID,c,s)}static async single(t,r,n={}){n={...hH,...n};let s=n.asDID?{did:n.asDID}:t;r={...r,deterministic:!0};let o=await ns._makeGenesis(s,null,r);return t.createStreamFromGenesis(ns.STREAM_TYPE_ID,o,n)}static async load(t,r,n={}){n={...pH,...n};let s=mo.from(r);if(s.type!=ns.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${ns.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async replace(t,r={}){r={...$A,...r};let n=r.asDID?{did:r.asDID}:this.api,s=await this._makeCommit(n,t),o=await this.api.applyCommit(this.id,s,r);this.state$.next(o.state)}async patch(t,r={}){r={...$A,...r};let n={data:t,prev:this.tip,id:this.id.cid},s=await ns._signDagJWS(this.api,n),o=await this.api.applyCommit(this.id,s,r);this.state$.next(o.state)}makeReadOnly(){this.replace=T0,this.patch=T0,this.sync=T0,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}_makeCommit(t,r){let n=this._makeRawCommit(r);return ns._signDagJWS(t,n)}_makeRawCommit(t){return{data:NC.compare(this.content,t||{}),prev:this.tip,id:this.state.log[0].cid}}static async _makeGenesis(t,r,n){let s=await this._makeRawGenesis(t,r,n);return n.deterministic?(Cm(s),s):ns._signDagJWS(t,s)}static async _makeRawGenesis(t,r,n){if(!n.model)throw new Error("Must specify a 'model' when creating a ModelInstanceDocument");let s=n.controller;if(!s)if(t.did)await Vb(t),s=t.did.hasParent?t.did.parent:t.did.id;else throw new Error("No controller specified");let o={controllers:[s],model:n.model.bytes};return n.deterministic||(o.unique=(0,lH.randomBytes)(12)),{data:r,header:o}}static async _signDagJWS(t,r){return await Vb(t),t.did.createDagJWS(r)}},"ModelInstanceDocument2"),"ModelInstanceDocument");Uu.STREAM_TYPE_NAME="MID";Uu.STREAM_TYPE_ID=3;Uu=ns=fH([zm()],Uu);var sk=i(class{constructor(e){this._apiUrl=e}async add(e,t){let r={};t&&(r.force=!0);let n=new URL(`./pins/${e}`,this._apiUrl);await gi(n,{method:"post",body:r})}async rm(e,t){let r=new URL(`./pins/${e}`,this._apiUrl);await gi(r,{method:"delete",body:{opts:t}})}async ls(e){let t=new URL("./pins",this._apiUrl);e&&(t=new URL(`./pins/${e.toString()}`,this._apiUrl));let r=await gi(t),{pinnedStreamIds:n}=r;return{[Symbol.asyncIterator](){let s=0;return{next(){return s===n.length?Promise.resolve({value:null,done:!0}):Promise.resolve({value:n[s++],done:!1})}}}}}},"RemotePinApi");a(sk,"RemotePinApi");var ak=i(class{constructor(e){this._fetchJson=gi,this._collectionURL=new URL("./collection",e),this._countURL=new URL("./collection/count",e)}async count(e){return(await this._fetchJson(this._countURL,{method:"POST",body:Hb(e)})).count}async query(e){let t=await this._fetchJson(this._collectionURL,{method:"POST",body:Hb(e)});return{edges:t.edges.map(n=>({cursor:n.cursor,node:jr.deserializeState(n.node)})),pageInfo:t.pageInfo}}},"RemoteIndexApi");a(ak,"RemoteIndexApi");var ok=i(class{constructor(e,t){this._apiUrl=e,this._getDidFn=t,this._fetchJson=gi,this.modelsPath="./admin/models",this.getCodePath="./admin/getCode"}getCodeUrl(){return new URL(this.getCodePath,this._apiUrl)}getModelsUrl(){return new URL(this.modelsPath,this._apiUrl)}async buildJWS(e,t,r){let n=r?{models:r.map(o=>o.toString())}:void 0,s=await e.createJWS({code:t,requestPath:this.getModelsUrl().pathname,requestBody:n});return`${s.signatures[0].protected}.${s.payload}.${s.signatures[0].signature}`}async generateCode(){return(await this._fetchJson(this.getCodeUrl())).code}async startIndexingModels(e){let t=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"post",body:{jws:await this.buildJWS(this._getDidFn(),t,e)}})}async getIndexedModels(){let e=await this.generateCode();return(await this._fetchJson(this.getModelsUrl(),{headers:{Authorization:`Basic ${await this.buildJWS(this._getDidFn(),e)}`}})).models.map(r=>Xt.fromString(r))}async stopIndexingModels(e){let t=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"delete",body:{jws:await this.buildJWS(this._getDidFn(),t,e)}})}},"RemoteAdminApi");a(ok,"RemoteAdminApi");var mH="/api/v0/",vH="http://localhost:7007",gH={syncInterval:5e3},yH={anchor:!0,publish:!0,sync:Yn.PREFER_CACHE},bH={anchor:!0,publish:!0,sync:Yn.PREFER_CACHE},jA={sync:Yn.PREFER_CACHE},wH=i(class{constructor(e=vH,t={}){this._config={...gH,...t},this._apiUrl=new URL(mH,e),this._streamCache=new Map,this.context={api:this},this.pin=new sk(this._apiUrl),this.index=new ak(this._apiUrl);let r=(()=>this.did).bind(this);this.admin=new ok(this._apiUrl,r),this._streamConstructors={[Fu.STREAM_TYPE_ID]:Fu,[_c.STREAM_TYPE_ID]:_c,[Uu.STREAM_TYPE_ID]:Uu,[Aa.STREAM_TYPE_ID]:Aa}}get did(){return this.context.did}set did(e){this.context.did=e}async createStreamFromGenesis(e,t,r={}){r={...bH,...r};let n=await ji.createFromGenesis(this._apiUrl,e,t,r,this._config.syncInterval),s=this._streamCache.get(n.id.toString());return s?(jr.statesEqual(n.state,s.state)||s.next(n.state),this.buildStreamFromDocument(s)):(this._streamCache.set(n.id.toString(),n),this.buildStreamFromDocument(n))}async loadStream(e,t={}){t={...jA,...t};let r=mo.from(e),n=this._streamCache.get(r.baseID.toString());return n?await n._syncState(r,t):(n=await ji.load(r,this._apiUrl,this._config.syncInterval,t),this._streamCache.set(n.id.toString(),n)),this.buildStreamFromDocument(n)}async multiQuery(e,t){let r=e.map(o=>({...o,streamId:typeof o.streamId=="string"?o.streamId:o.streamId.toString()})),n=new URL("./multiqueries",this._apiUrl),s=await gi(n,{method:"post",body:{queries:r,timeout:t}});return Object.entries(s).reduce((o,c)=>{let[f,h]=c,p=jr.deserializeState(h),v=new ji(p,this._apiUrl,this._config.syncInterval);return o[f]=this.buildStreamFromDocument(v),o},{})}loadStreamCommits(e){let t=zb(e);return ji.loadStreamCommits(t,this._apiUrl)}async applyCommit(e,t,r={}){r={...yH,...r};let n=zb(e),s=await ji.applyCommit(this._apiUrl,n,t,r,this._config.syncInterval),o=this._streamCache.get(n.toString());return o?(o.next(s.state),this.buildStreamFromDocument(s)):(this._streamCache.set(n.toString(),s),this.buildStreamFromDocument(s))}async requestAnchor(e,t={}){t={...jA,...t};let{anchorStatus:r}=await gi(`${this._apiUrl}/streams/${e.toString()}/anchor`,{method:"post",body:{opts:t}});return r}addStreamHandler(e){this._streamConstructors[e.name]=e.stream_constructor}buildStreamFromState(e){let t=new ji(e,this._apiUrl,this._config.syncInterval);return this.buildStreamFromDocument(t)}buildStreamFromDocument(e){let t=e.state.type,r=this._streamConstructors[t];if(!r)throw new Error(`Failed to find constructor for stream ${t}`);return new r(e,this.context)}async setDID(e){this.context.did=e}async getSupportedChains(){if(this._supportedChains)return this._supportedChains;let{supportedChains:e}=await gi(this._apiUrl+"/node/chains");return this._supportedChains=e,e}async close(){Array.from(this._streamCache).map(([,e])=>{e.complete()}),this._streamCache.clear()}},"CeramicClient");a(wH,"CeramicClient");var ir;(function(e){e.assertEqual=s=>s;function t(s){}i(t,"assertIs"),a(t,"assertIs"),e.assertIs=t;function r(s){throw new Error}i(r,"assertNever"),a(r,"assertNever"),e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let c of s)o[c]=c;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(f=>typeof s[s[f]]!="number"),c={};for(let f of o)c[f]=s[f];return e.objectValues(c)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},e.find=(s,o)=>{for(let c of s)if(o(c))return c},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}i(n,"joinValues"),a(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(ir||(ir={}));var tt=ir.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=a(e=>{switch(typeof e){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return isNaN(e)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(e)?tt.array:e===null?tt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?tt.promise:typeof Map<"u"&&e instanceof Map?tt.map:typeof Set<"u"&&e instanceof Set?tt.set:typeof Date<"u"&&e instanceof Date?tt.date:tt.object;default:return tt.unknown}},"getParsedType"),Ve=ir.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"]),_H=a(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Ls=i(class extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(s){return s.message},r={_errors:[]},n=a(s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let c=r,f=0;for(;f<o.path.length;){let h=o.path[f];f===o.path.length-1?(c[h]=c[h]||{_errors:[]},c[h]._errors.push(t(o))):c[h]=c[h]||{_errors:[]},c=c[h],f++}}},"processError");return n(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ir.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}},"ZodError");a(Ls,"ZodError");Ls.create=e=>new Ls(e);var ed=a((e,t)=>{let r;switch(e.code){case Ve.invalid_type:e.received===tt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ir.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${ir.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:r="Invalid input";break;case Ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ir.joinValues(e.options)}`;break;case Ve.invalid_enum_value:r=`Invalid enum value. Expected ${ir.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:r="Invalid function arguments";break;case Ve.invalid_return_type:r="Invalid function return type";break;case Ve.invalid_date:r="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"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}"`:ir.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ve.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==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:r="Invalid input";break;case Ve.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==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:r="Invalid input";break;case Ve.custom:r="Invalid input";break;case Ve.invalid_intersection_types:r="Intersection results could not be merged";break;case Ve.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:r="Number must be finite";break;default:r=t.defaultError,ir.assertNever(e)}return{message:r}},"errorMap"),ck=ed;function uk(e){ck=e}i(uk,"setErrorMap");a(uk,"setErrorMap");function td(){return ck}i(td,"getErrorMap");a(td,"getErrorMap");var Q0=a(e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],c={...s,path:o},f="",h=n.filter(p=>!!p).slice().reverse();for(let p of h)f=p(c,{data:t,defaultError:f}).message;return{...s,path:o,message:s.message||f}},"makeIssue"),EH=[];function vt(e,t){let r=Q0({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,td(),ed].filter(n=>!!n)});e.common.issues.push(r)}i(vt,"addIssueToContext");a(vt,"addIssueToContext");var Nn=i(class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return Dt;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t)r.push({key:await n.key,value:await n.value});return Nn.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Dt;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),(typeof o.value<"u"||n.alwaysSet)&&(r[s.value]=o.value)}return{status:e.value,value:r}}},"ParseStatus");a(Nn,"ParseStatus");var Dt=Object.freeze({status:"aborted"}),lk=a(e=>({status:"dirty",value:e}),"DIRTY"),An=a(e=>({status:"valid",value:e}),"OK"),Gb=a(e=>e.status==="aborted","isAborted"),Wb=a(e=>e.status==="dirty","isDirty"),em=a(e=>e.status==="valid","isValid"),tm=a(e=>typeof Promise!==void 0&&e instanceof Promise,"isAsync"),Zt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Zt||(Zt={}));var hs=i(class{constructor(e,t,r,n){this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._path.concat(this._key)}},"ParseInputLazyPath");a(hs,"ParseInputLazyPath");var zA=a((e,t)=>{if(em(t))return{success:!0,data:t.value};{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new Ls(e.common.issues);return{success:!1,error:r}}},"handleResult");function zt(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:a((c,f)=>c.code!=="invalid_type"?{message:f.defaultError}:typeof f.data>"u"?{message:n??f.defaultError}:{message:r??f.defaultError},"customMap"),description:s}}i(zt,"processCreateParams");a(zt,"processCreateParams");var $t=i(class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return oo(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nn,ctx:{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(tm(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:(r=t?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},s=this._parseSync({data:e,path:n.path,parent:n});return zA(n,s)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},n=this._parse({data:e,path:r.path,parent:r}),s=await(tm(n)?n:Promise.resolve(n));return zA(r,s)}refine(e,t){let r=a(n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t,"getIssueProperties");return this._refinement((n,s)=>{let o=e(n),c=a(()=>s.addIssue({code:Ve.custom,...r(n)}),"setError");return typeof Promise<"u"&&o instanceof Promise?o.then(f=>f?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new Hi({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return fs.create(this)}nullable(){return yo.create(this)}nullish(){return this.optional().nullable()}array(){return ls.create(this)}promise(){return xc.create(this)}or(e){return qu.create([this,e])}and(e){return Ku.create(this,e)}transform(e){return new Hi({schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Zu({innerType:this,defaultValue:t,typeName:Tt.ZodDefault})}brand(){return new S6({typeName:Tt.ZodBranded,type:this,...zt(void 0)})}catch(e){let t=typeof e=="function"?e:()=>e;return new ad({innerType:this,defaultValue:t,typeName:Tt.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return xd.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},"ZodType");a($t,"ZodType");var AH=/^c[^\s-]{8,}$/i,SH=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,xH=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,TH=a(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}:\\d{2})|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),Sa=i(class extends $t{constructor(){super(...arguments),this._regex=(e,t,r)=>this.refinement(n=>e.test(n),{validation:t,code:Ve.invalid_string,...Zt.errToObj(r)}),this.nonempty=e=>this.min(1,Zt.errToObj(e)),this.trim=()=>new Sa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==tt.string){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.string,received:s.parsedType}),Dt}let r=new Nn,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,c=e.data.length<s.value;(o||c)&&(n=this._getOrReturnCtx(e,n),o?vt(n,{code:Ve.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&vt(n,{code:Ve.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")xH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"email",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")SH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"uuid",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")AH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"cuid",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),vt(n,{validation:"url",code:Ve.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"regex",code:Ve.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?TH(s).test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:"datetime",message:s.message}),r.dirty()):ir.assertNever(s);return{status:r.value,value:e.data}}_addCheck(e){return new Sa({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Zt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Zt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Zt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Zt.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...Zt.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Zt.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Zt.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Zt.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Zt.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Zt.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Zt.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}},"ZodString");a(Sa,"ZodString");Sa.create=e=>{var t;return new Sa({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...zt(e)})};function fk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),c=parseInt(t.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}i(fk,"floatSafeRemainder");a(fk,"floatSafeRemainder");var go=i(class extends $t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==tt.number){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.number,received:s.parsedType}),Dt}let r,n=new Nn;for(let s of this._def.checks)s.kind==="int"?ir.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?fk(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.not_finite,message:s.message}),n.dirty()):ir.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Zt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Zt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Zt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Zt.toString(t))}setLimit(e,t,r,n){return new go({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Zt.toString(n)}]})}_addCheck(e){return new go({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Zt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Zt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Zt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Zt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Zt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Zt.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Zt.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}},"ZodNumber");a(go,"ZodNumber");go.create=e=>new go({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...zt(e)});var $u=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==tt.bigint){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.bigint,received:r.parsedType}),Dt}return An(e.data)}},"ZodBigInt");a($u,"ZodBigInt");$u.create=e=>{var t;return new $u({typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...zt(e)})};var ju=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==tt.boolean){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.boolean,received:r.parsedType}),Dt}return An(e.data)}},"ZodBoolean");a(ju,"ZodBoolean");ju.create=e=>new ju({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...zt(e)});var Ec=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==tt.date){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.date,received:s.parsedType}),Dt}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_date}),Dt}let r=new Nn,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ir.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ec({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Zt.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Zt.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}},"ZodDate");a(Ec,"ZodDate");Ec.create=e=>new Ec({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...zt(e)});var rd=i(class extends $t{_parse(e){if(this._getType(e)!==tt.symbol){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.symbol,received:r.parsedType}),Dt}return An(e.data)}},"ZodSymbol");a(rd,"ZodSymbol");rd.create=e=>new rd({typeName:Tt.ZodSymbol,...zt(e)});var zu=i(class extends $t{_parse(e){if(this._getType(e)!==tt.undefined){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.undefined,received:r.parsedType}),Dt}return An(e.data)}},"ZodUndefined");a(zu,"ZodUndefined");zu.create=e=>new zu({typeName:Tt.ZodUndefined,...zt(e)});var Hu=i(class extends $t{_parse(e){if(this._getType(e)!==tt.null){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.null,received:r.parsedType}),Dt}return An(e.data)}},"ZodNull");a(Hu,"ZodNull");Hu.create=e=>new Hu({typeName:Tt.ZodNull,...zt(e)});var Ac=i(class extends $t{constructor(){super(...arguments),this._any=!0}_parse(e){return An(e.data)}},"ZodAny");a(Ac,"ZodAny");Ac.create=e=>new Ac({typeName:Tt.ZodAny,...zt(e)});var uo=i(class extends $t{constructor(){super(...arguments),this._unknown=!0}_parse(e){return An(e.data)}},"ZodUnknown");a(uo,"ZodUnknown");uo.create=e=>new uo({typeName:Tt.ZodUnknown,...zt(e)});var Fs=i(class extends $t{_parse(e){let t=this._getOrReturnCtx(e);return vt(t,{code:Ve.invalid_type,expected:tt.never,received:t.parsedType}),Dt}},"ZodNever");a(Fs,"ZodNever");Fs.create=e=>new Fs({typeName:Tt.ZodNever,...zt(e)});var nd=i(class extends $t{_parse(e){if(this._getType(e)!==tt.undefined){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.void,received:r.parsedType}),Dt}return An(e.data)}},"ZodVoid");a(nd,"ZodVoid");nd.create=e=>new nd({typeName:Tt.ZodVoid,...zt(e)});var ls=i(class extends $t{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==tt.array)return vt(t,{code:Ve.invalid_type,expected:tt.array,received:t.parsedType}),Dt;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,c=t.data.length<n.exactLength.value;(o||c)&&(vt(t,{code:o?Ve.too_big:Ve.too_small,minimum:c?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(vt(t,{code:Ve.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(vt(t,{code:Ve.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all(t.data.map((o,c)=>n.type._parseAsync(new hs(t,o,t.path,c)))).then(o=>Nn.mergeArray(r,o));let s=t.data.map((o,c)=>n.type._parseSync(new hs(t,o,t.path,c)));return Nn.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new ls({...this._def,minLength:{value:e,message:Zt.toString(t)}})}max(e,t){return new ls({...this._def,maxLength:{value:e,message:Zt.toString(t)}})}length(e,t){return new ls({...this._def,exactLength:{value:e,message:Zt.toString(t)}})}nonempty(e){return this.min(1,e)}},"ZodArray");a(ls,"ZodArray");ls.create=(e,t)=>new ls({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...zt(t)});var rm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(rm||(rm={}));var HA=a(e=>t=>new Ir({...e,shape:()=>({...e.shape(),...t})}),"AugmentFactory");function dc(e){if(e instanceof Ir){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=fs.create(dc(n))}return new Ir({...e._def,shape:()=>t})}else return e instanceof ls?ls.create(dc(e.element)):e instanceof fs?fs.create(dc(e.unwrap())):e instanceof yo?yo.create(dc(e.unwrap())):e instanceof Us?Us.create(e.items.map(t=>dc(t))):e}i(dc,"deepPartialify");a(dc,"deepPartialify");var Ir=i(class extends $t{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=HA(this._def),this.extend=HA(this._def)}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=ir.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==tt.object){let h=this._getOrReturnCtx(e);return vt(h,{code:Ve.invalid_type,expected:tt.object,received:h.parsedType}),Dt}let{status:r,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof Fs&&this._def.unknownKeys==="strip"))for(let h in n.data)o.includes(h)||c.push(h);let f=[];for(let h of o){let p=s[h],v=n.data[h];f.push({key:{status:"valid",value:h},value:p._parse(new hs(n,v,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Fs){let h=this._def.unknownKeys;if(h==="passthrough")for(let p of c)f.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(h==="strict")c.length>0&&(vt(n,{code:Ve.unrecognized_keys,keys:c}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let p of c){let v=n.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new hs(n,v,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let p of f){let v=await p.key;h.push({key:v,value:await p.value,alwaysSet:p.alwaysSet})}return h}).then(h=>Nn.mergeObjectSync(r,h)):Nn.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return Zt.errToObj,new Ir({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,s,o,c;let f=(o=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,t,r).message)!==null&&o!==void 0?o:r.defaultError;return t.code==="unrecognized_keys"?{message:(c=Zt.errToObj(e).message)!==null&&c!==void 0?c:f}:{message:f}}}:{}})}strip(){return new Ir({...this._def,unknownKeys:"strip"})}passthrough(){return new Ir({...this._def,unknownKeys:"passthrough"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new Ir({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>rm.mergeShapes(this._def.shape(),e._def.shape()),typeName:Tt.ZodObject})}catchall(e){return new Ir({...this._def,catchall:e})}pick(e){let t={};return ir.objectKeys(e).map(r=>{this.shape[r]&&(t[r]=this.shape[r])}),new Ir({...this._def,shape:()=>t})}omit(e){let t={};return ir.objectKeys(this.shape).map(r=>{ir.objectKeys(e).indexOf(r)===-1&&(t[r]=this.shape[r])}),new Ir({...this._def,shape:()=>t})}deepPartial(){return dc(this)}partial(e){let t={};if(e)return ir.objectKeys(this.shape).map(r=>{ir.objectKeys(e).indexOf(r)===-1?t[r]=this.shape[r]:t[r]=this.shape[r].optional()}),new Ir({...this._def,shape:()=>t});for(let r in this.shape){let n=this.shape[r];t[r]=n.optional()}return new Ir({...this._def,shape:()=>t})}required(e){let t={};if(e)ir.objectKeys(this.shape).map(r=>{if(ir.objectKeys(e).indexOf(r)===-1)t[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof fs;)s=s._def.innerType;t[r]=s}});else for(let r in this.shape){let s=this.shape[r];for(;s instanceof fs;)s=s._def.innerType;t[r]=s}return new Ir({...this._def,shape:()=>t})}keyof(){return A6(ir.objectKeys(this.shape))}},"ZodObject");a(Ir,"ZodObject");Ir.create=(e,t)=>new Ir({shape:()=>e,unknownKeys:"strip",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});Ir.strictCreate=(e,t)=>new Ir({shape:()=>e,unknownKeys:"strict",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});Ir.lazycreate=(e,t)=>new Ir({shape:e,unknownKeys:"strip",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});var qu=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(s){for(let c of s)if(c.result.status==="valid")return c.result;for(let c of s)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;let o=s.map(c=>new Ls(c.ctx.common.issues));return vt(t,{code:Ve.invalid_union,unionErrors:o}),Dt}if(i(n,"handleResults"),a(n,"handleResults"),t.common.async)return Promise.all(r.map(async s=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let f of r){let h={...t,common:{...t.common,issues:[]},parent:null},p=f._parseSync({data:t.data,path:t.path,parent:h});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:h}),h.common.issues.length&&o.push(h.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let c=o.map(f=>new Ls(f));return vt(t,{code:Ve.invalid_union,unionErrors:c}),Dt}}get options(){return this._def.options}},"ZodUnion");a(qu,"ZodUnion");qu.create=(e,t)=>new qu({options:e,typeName:Tt.ZodUnion,...zt(t)});var M0=a(e=>e instanceof Vu?M0(e.schema):e instanceof Hi?M0(e.innerType()):e instanceof Gu?[e.value]:e instanceof fl?e.options:e instanceof Wu?Object.keys(e.enum):e instanceof Zu?M0(e._def.innerType):e instanceof zu?[void 0]:e instanceof Hu?[null]:null,"getDiscriminator"),Hm=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.object)return vt(t,{code:Ve.invalid_type,expected:tt.object,received:t.parsedType}),Dt;let r=this.discriminator,n=t.data[r],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(vt(t,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let s of t){let o=M0(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of o){if(n.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);n.set(c,s)}}return new Hm({typeName:Tt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...zt(r)})}},"ZodDiscriminatedUnion");a(Hm,"ZodDiscriminatedUnion");function nm(e,t){let r=oo(e),n=oo(t);if(e===t)return{valid:!0,data:e};if(r===tt.object&&n===tt.object){let s=ir.objectKeys(t),o=ir.objectKeys(e).filter(f=>s.indexOf(f)!==-1),c={...e,...t};for(let f of o){let h=nm(e[f],t[f]);if(!h.valid)return{valid:!1};c[f]=h.data}return{valid:!0,data:c}}else if(r===tt.array&&n===tt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let c=e[o],f=t[o],h=nm(c,f);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return r===tt.date&&n===tt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}i(nm,"mergeValues");a(nm,"mergeValues");var Ku=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=a((s,o)=>{if(Gb(s)||Gb(o))return Dt;let c=nm(s.value,o.value);return c.valid?((Wb(s)||Wb(o))&&t.dirty(),{status:t.value,value:c.data}):(vt(r,{code:Ve.invalid_intersection_types}),Dt)},"handleParsed");return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}},"ZodIntersection");a(Ku,"ZodIntersection");Ku.create=(e,t,r)=>new Ku({left:e,right:t,typeName:Tt.ZodIntersection,...zt(r)});var Us=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.array)return vt(r,{code:Ve.invalid_type,expected:tt.array,received:r.parsedType}),Dt;if(r.data.length<this._def.items.length)return vt(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Dt;!this._def.rest&&r.data.length>this._def.items.length&&(vt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=r.data.map((o,c)=>{let f=this._def.items[c]||this._def.rest;return f?f._parse(new hs(r,o,r.path,c)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>Nn.mergeArray(t,o)):Nn.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new Us({...this._def,rest:e})}},"ZodTuple");a(Us,"ZodTuple");Us.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Us({items:e,typeName:Tt.ZodTuple,rest:null,...zt(t)})};var id=i(class extends $t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.object)return vt(r,{code:Ve.invalid_type,expected:tt.object,received:r.parsedType}),Dt;let n=[],s=this._def.keyType,o=this._def.valueType;for(let c in r.data)n.push({key:s._parse(new hs(r,c,r.path,c)),value:o._parse(new hs(r,r.data[c],r.path,c))});return r.common.async?Nn.mergeObjectAsync(t,n):Nn.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof $t?new id({keyType:e,valueType:t,typeName:Tt.ZodRecord,...zt(r)}):new id({keyType:Sa.create(),valueType:e,typeName:Tt.ZodRecord,...zt(t)})}},"ZodRecord");a(id,"ZodRecord");var sd=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.map)return vt(r,{code:Ve.invalid_type,expected:tt.map,received:r.parsedType}),Dt;let n=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([c,f],h)=>({key:n._parse(new hs(r,c,r.path,[h,"key"])),value:s._parse(new hs(r,f,r.path,[h,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let f of o){let h=await f.key,p=await f.value;if(h.status==="aborted"||p.status==="aborted")return Dt;(h.status==="dirty"||p.status==="dirty")&&t.dirty(),c.set(h.value,p.value)}return{status:t.value,value:c}})}else{let c=new Map;for(let f of o){let h=f.key,p=f.value;if(h.status==="aborted"||p.status==="aborted")return Dt;(h.status==="dirty"||p.status==="dirty")&&t.dirty(),c.set(h.value,p.value)}return{status:t.value,value:c}}}},"ZodMap");a(sd,"ZodMap");sd.create=(e,t,r)=>new sd({valueType:t,keyType:e,typeName:Tt.ZodMap,...zt(r)});var Sc=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.set)return vt(r,{code:Ve.invalid_type,expected:tt.set,received:r.parsedType}),Dt;let n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(vt(r,{code:Ve.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(vt(r,{code:Ve.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(f){let h=new Set;for(let p of f){if(p.status==="aborted")return Dt;p.status==="dirty"&&t.dirty(),h.add(p.value)}return{status:t.value,value:h}}i(o,"finalizeSet"),a(o,"finalizeSet");let c=[...r.data.values()].map((f,h)=>s._parse(new hs(r,f,r.path,h)));return r.common.async?Promise.all(c).then(f=>o(f)):o(c)}min(e,t){return new Sc({...this._def,minSize:{value:e,message:Zt.toString(t)}})}max(e,t){return new Sc({...this._def,maxSize:{value:e,message:Zt.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},"ZodSet");a(Sc,"ZodSet");Sc.create=(e,t)=>new Sc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...zt(t)});var Du=i(class extends $t{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.function)return vt(t,{code:Ve.invalid_type,expected:tt.function,received:t.parsedType}),Dt;function r(c,f){return Q0({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,td(),ed].filter(h=>!!h),issueData:{code:Ve.invalid_arguments,argumentsError:f}})}i(r,"makeArgsIssue"),a(r,"makeArgsIssue");function n(c,f){return Q0({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,td(),ed].filter(h=>!!h),issueData:{code:Ve.invalid_return_type,returnTypeError:f}})}i(n,"makeReturnsIssue"),a(n,"makeReturnsIssue");let s={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof xc?An(async(...c)=>{let f=new Ls([]),h=await this._def.args.parseAsync(c,s).catch(b=>{throw f.addIssue(r(c,b)),f}),p=await o(...h);return await this._def.returns._def.type.parseAsync(p,s).catch(b=>{throw f.addIssue(n(p,b)),f})}):An((...c)=>{let f=this._def.args.safeParse(c,s);if(!f.success)throw new Ls([r(c,f.error)]);let h=o(...f.data),p=this._def.returns.safeParse(h,s);if(!p.success)throw new Ls([n(h,p.error)]);return p.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Du({...this._def,args:Us.create(e).rest(uo.create())})}returns(e){return new Du({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Du({args:e||Us.create([]).rest(uo.create()),returns:t||uo.create(),typeName:Tt.ZodFunction,...zt(r)})}},"ZodFunction");a(Du,"ZodFunction");var Vu=i(class extends $t{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},"ZodLazy");a(Vu,"ZodLazy");Vu.create=(e,t)=>new Vu({getter:e,typeName:Tt.ZodLazy,...zt(t)});var Gu=i(class extends $t{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return vt(t,{code:Ve.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:e.data}}get value(){return this._def.value}},"ZodLiteral");a(Gu,"ZodLiteral");Gu.create=(e,t)=>new Gu({value:e,typeName:Tt.ZodLiteral,...zt(t)});function A6(e,t){return new fl({values:e,typeName:Tt.ZodEnum,...zt(t)})}i(A6,"createZodEnum");a(A6,"createZodEnum");var fl=i(class extends $t{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return vt(t,{expected:ir.joinValues(r),received:t.parsedType,code:Ve.invalid_type}),Dt}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),r=this._def.values;return vt(t,{received:t.data,code:Ve.invalid_enum_value,options:r}),Dt}return An(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}},"ZodEnum");a(fl,"ZodEnum");fl.create=A6;var Wu=i(class extends $t{_parse(e){let t=ir.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==tt.string&&r.parsedType!==tt.number){let n=ir.objectValues(t);return vt(r,{expected:ir.joinValues(n),received:r.parsedType,code:Ve.invalid_type}),Dt}if(t.indexOf(e.data)===-1){let n=ir.objectValues(t);return vt(r,{received:r.data,code:Ve.invalid_enum_value,options:n}),Dt}return An(e.data)}get enum(){return this._def.values}},"ZodNativeEnum");a(Wu,"ZodNativeEnum");Wu.create=(e,t)=>new Wu({values:e,typeName:Tt.ZodNativeEnum,...zt(t)});var xc=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.promise&&t.common.async===!1)return vt(t,{code:Ve.invalid_type,expected:tt.promise,received:t.parsedType}),Dt;let r=t.parsedType===tt.promise?t.data:Promise.resolve(t.data);return An(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}},"ZodPromise");a(xc,"ZodPromise");xc.create=(e,t)=>new xc({type:e,typeName:Tt.ZodPromise,...zt(t)});var Hi=i(class extends $t{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null;if(n.type==="preprocess"){let o=n.transform(r.data);return r.common.async?Promise.resolve(o).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}let s={addIssue:o=>{vt(r,o),o.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="refinement"){let o=a(c=>{let f=n.refinement(c,s);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c},"executeRefinement");if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?Dt:(c.status==="dirty"&&t.dirty(),o(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?Dt:(c.status==="dirty"&&t.dirty(),o(c.value).then(()=>({status:t.value,value:c.value}))))}if(n.type==="transform")if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!em(o))return o;let c=n.transform(o.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>em(o)?Promise.resolve(n.transform(o.value,s)).then(c=>({status:t.value,value:c})):o);ir.assertNever(n)}},"ZodEffects");a(Hi,"ZodEffects");Hi.create=(e,t,r)=>new Hi({schema:e,typeName:Tt.ZodEffects,effect:t,...zt(r)});Hi.createWithPreprocess=(e,t,r)=>new Hi({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...zt(r)});var fs=i(class extends $t{_parse(e){return this._getType(e)===tt.undefined?An(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"ZodOptional");a(fs,"ZodOptional");fs.create=(e,t)=>new fs({innerType:e,typeName:Tt.ZodOptional,...zt(t)});var yo=i(class extends $t{_parse(e){return this._getType(e)===tt.null?An(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"ZodNullable");a(yo,"ZodNullable");yo.create=(e,t)=>new yo({innerType:e,typeName:Tt.ZodNullable,...zt(t)});var Zu=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===tt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},"ZodDefault");a(Zu,"ZodDefault");Zu.create=(e,t)=>new Zu({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...zt(t)});var ad=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.innerType._parse({data:t.data,path:t.path,parent:t});return tm(r)?r.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.defaultValue()})):{status:"valid",value:r.status==="valid"?r.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}},"ZodCatch");a(ad,"ZodCatch");ad.create=(e,t)=>new ad({innerType:e,typeName:Tt.ZodCatch,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...zt(t)});var od=i(class extends $t{_parse(e){if(this._getType(e)!==tt.nan){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.nan,received:r.parsedType}),Dt}return{status:"valid",value:e.data}}},"ZodNaN");a(od,"ZodNaN");od.create=e=>new od({typeName:Tt.ZodNaN,...zt(e)});var MH=Symbol("zod_brand"),S6=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},"ZodBranded");a(S6,"ZodBranded");var xd=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return a(async()=>{let s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"?(t.dirty(),lk(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})},"handleAsync")();{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?Dt:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new xd({in:e,out:t,typeName:Tt.ZodPipeline})}},"ZodPipeline");a(xd,"ZodPipeline");var dk=a((e,t={},r)=>e?Ac.create().superRefine((n,s)=>{if(!e(n)){let o=typeof t=="function"?t(n):t,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:r})}}):Ac.create(),"custom"),CH={object:Ir.lazycreate},Tt;(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"})(Tt||(Tt={}));var IH=a((e,t={message:`Input not instance of ${e.name}`})=>dk(r=>r instanceof e,t,!0),"instanceOfType"),hk=Sa.create,pk=go.create,kH=od.create,DH=$u.create,mk=ju.create,OH=Ec.create,RH=rd.create,NH=zu.create,PH=Hu.create,BH=Ac.create,LH=uo.create,FH=Fs.create,UH=nd.create,$H=ls.create,jH=Ir.create,zH=Ir.strictCreate,HH=qu.create,qH=Hm.create,KH=Ku.create,VH=Us.create,GH=id.create,WH=sd.create,ZH=Sc.create,JH=Du.create,YH=Vu.create,XH=Gu.create,QH=fl.create,eq=Wu.create,tq=xc.create,qA=Hi.create,rq=fs.create,nq=yo.create,iq=Hi.createWithPreprocess,sq=xd.create,aq=a(()=>hk().optional(),"ostring"),oq=a(()=>pk().optional(),"onumber"),cq=a(()=>mk().optional(),"oboolean"),uq={string:e=>Sa.create({...e,coerce:!0}),number:e=>go.create({...e,coerce:!0}),boolean:e=>ju.create({...e,coerce:!0}),bigint:e=>$u.create({...e,coerce:!0}),date:e=>Ec.create({...e,coerce:!0})},lq=Dt,ae=Object.freeze({__proto__:null,defaultErrorMap:ed,setErrorMap:uk,getErrorMap:td,makeIssue:Q0,EMPTY_PATH:EH,addIssueToContext:vt,ParseStatus:Nn,INVALID:Dt,DIRTY:lk,OK:An,isAborted:Gb,isDirty:Wb,isValid:em,isAsync:tm,get util(){return ir},ZodParsedType:tt,getParsedType:oo,ZodType:$t,ZodString:Sa,ZodNumber:go,ZodBigInt:$u,ZodBoolean:ju,ZodDate:Ec,ZodSymbol:rd,ZodUndefined:zu,ZodNull:Hu,ZodAny:Ac,ZodUnknown:uo,ZodNever:Fs,ZodVoid:nd,ZodArray:ls,get objectUtil(){return rm},ZodObject:Ir,ZodUnion:qu,ZodDiscriminatedUnion:Hm,ZodIntersection:Ku,ZodTuple:Us,ZodRecord:id,ZodMap:sd,ZodSet:Sc,ZodFunction:Du,ZodLazy:Vu,ZodLiteral:Gu,ZodEnum:fl,ZodNativeEnum:Wu,ZodPromise:xc,ZodEffects:Hi,ZodTransformer:Hi,ZodOptional:fs,ZodNullable:yo,ZodDefault:Zu,ZodCatch:ad,ZodNaN:od,BRAND:MH,ZodBranded:S6,ZodPipeline:xd,custom:dk,Schema:$t,ZodSchema:$t,late:CH,get ZodFirstPartyTypeKind(){return Tt},coerce:uq,any:BH,array:$H,bigint:DH,boolean:mk,date:OH,discriminatedUnion:qH,effect:qA,enum:QH,function:JH,instanceof:IH,intersection:KH,lazy:YH,literal:XH,map:WH,nan:kH,nativeEnum:eq,never:FH,null:PH,nullable:nq,number:pk,object:jH,oboolean:cq,onumber:oq,optional:rq,ostring:aq,pipeline:sq,preprocess:iq,promise:tq,record:GH,set:ZH,strictObject:zH,string:hk,symbol:RH,transformer:qA,tuple:VH,undefined:NH,union:HH,unknown:LH,void:UH,NEVER:lq,ZodIssueCode:Ve,quotelessJson:_H,ZodError:Ls}),vk=ae.array(ae.string().or(ae.record(ae.any()))),fJ=ae.object({type:ae.string().optional(),narrative:ae.string().optional()}),qm=ae.string().or(ae.object({id:ae.string(),type:ae.string(),caption:ae.string().optional()})),fq=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),latitude:ae.number(),longitude:ae.number()}),dq=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),addressCountry:ae.string().optional(),addressCountryCode:ae.string().optional(),addressRegion:ae.string().optional(),addressLocality:ae.string().optional(),streetAddress:ae.string().optional(),postOfficeBoxNumber:ae.string().optional(),postalCode:ae.string().optional(),geo:fq.optional()}),hq=ae.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(ae.string()),gk=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),identifier:ae.string(),identifierType:hq}),cd=ae.string().or(ae.object({id:ae.string().optional(),type:ae.string().or(ae.string().array().nonempty().optional()),name:ae.string().optional(),url:ae.string().optional(),phone:ae.string().optional(),description:ae.string().optional(),endorsement:ae.any().array().optional(),image:qm.optional(),email:ae.string().email().optional(),address:dq.optional(),otherIdentifier:gk.array().optional(),official:ae.string().optional(),parentOrg:ae.any().optional(),familyName:ae.string().optional(),givenName:ae.string().optional(),additionalName:ae.string().optional(),patronymicName:ae.string().optional(),honorificPrefix:ae.string().optional(),honorificSuffix:ae.string().optional(),familyNamePrefix:ae.string().optional(),dateOfBirth:ae.string().optional()}).catchall(ae.any())),Zb=ae.object({id:ae.string().optional()}).catchall(ae.any()),pq=ae.object({type:ae.string(),id:ae.string()}),mq=ae.object({id:ae.string(),type:ae.string()}),vq=ae.object({id:ae.string(),type:ae.string()}).catchall(ae.any()),im=ae.object({"@context":vk,id:ae.string().optional(),type:ae.string().array().nonempty(),issuer:cd,issuanceDate:ae.string(),expirationDate:ae.string().optional(),credentialSubject:Zb.or(Zb.array()),credentialStatus:pq.optional(),credentialSchema:mq.array().optional(),refreshService:vq.optional()}).catchall(ae.any()),bo=ae.object({type:ae.string(),created:ae.string(),challenge:ae.string().optional(),domain:ae.string().optional(),nonce:ae.string().optional(),proofPurpose:ae.string(),verificationMethod:ae.string(),jws:ae.string().optional()}).catchall(ae.any()),KA=im.extend({proof:bo.or(bo.array())}),gq=ae.object({"@context":vk,id:ae.string().optional(),type:ae.string().array().nonempty(),verifiableCredential:KA.or(KA.array()).optional(),holder:ae.string().optional()}).catchall(ae.any()),dJ=gq.extend({proof:bo.or(bo.array())}),yq=ae.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(ae.string()),Km=ae.object({type:ae.string().array().nonempty(),targetCode:ae.string().optional(),targetDescription:ae.string().optional(),targetName:ae.string(),targetFramework:ae.string().optional(),targetType:yq.optional(),targetUrl:ae.string()}),bq=ae.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),wq=bq.or(ae.string()),_q=ae.object({id:ae.string().optional(),narrative:ae.string().optional()}).catchall(ae.any()),Eq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),endorsementComment:ae.string().optional()}),Aq=im.extend({credentialSubject:Eq,proof:bo.or(bo.array()).optional()}),Sq=ae.object({id:ae.string(),"@language":ae.string().optional(),version:ae.string().optional()}),xq=ae.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(ae.string()),Tq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),description:ae.string().optional(),level:ae.string().optional(),name:ae.string(),points:ae.string().optional()}).catchall(ae.any()),Mq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),allowedValue:ae.string().array().optional(),name:ae.string(),requiredLevel:ae.string().optional(),requiredValue:ae.string().optional(),resultType:xq,rubricCriterionLevel:Tq.array().optional(),valueMax:ae.string().optional(),valueMin:ae.string().optional()}).catchall(ae.any()),Cq=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),achievementType:wq.optional(),creator:cd.optional(),creditsAvailable:ae.number().optional(),criteria:_q,description:ae.string(),endorsement:Aq.array().optional(),fieldOfStudy:ae.string().optional(),humanCode:ae.string().optional(),image:qm.optional(),"@language":ae.string().optional(),name:ae.string(),otherIdentifier:gk.array().optional(),related:Sq.array().optional(),resultDescription:Mq.array().optional(),specialization:ae.string().optional(),tag:ae.string().array().optional(),version:ae.string().optional()}).catchall(ae.any()),Iq=ae.object({type:ae.string(),hashed:ae.boolean(),identityHash:ae.string(),identityType:ae.string(),salt:ae.string().optional()}),kq=ae.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),Dq=ae.object({type:ae.string().array().nonempty(),achievedLevel:ae.string().optional(),alignment:Km.array().optional(),resultDescription:ae.string().optional(),status:kq.optional(),value:ae.string().optional()}).catchall(ae.any()),VA=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),activityEndDate:ae.string().optional(),activityStartDate:ae.string().optional(),creditsEarned:ae.number().optional(),achievement:Cq.optional(),identifier:Iq.array().optional(),image:qm.optional(),licenseNumber:ae.string().optional(),narrative:ae.string().optional(),result:Dq.array().optional(),role:ae.string().optional(),source:cd.optional(),term:ae.string().optional()}).catchall(ae.any()),Oq=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),narrative:ae.string().optional(),name:ae.string().optional(),description:ae.string().optional(),genre:ae.string().optional(),audience:ae.string().optional()}).catchall(ae.any()),Rq=im.extend({name:ae.string().optional(),description:ae.string().optional(),image:qm.optional(),credentialSubject:VA.or(VA.array()),endorsement:im.array().optional(),evidence:Oq.array().optional()}),hJ=Rq.extend({proof:bo.or(bo.array())}),pJ=ae.object({checks:ae.string().array(),warnings:ae.string().array(),errors:ae.string().array()}),yk=ae.enum(["Success","Failed","Error"]),mJ=yk.enum,vJ=ae.object({check:ae.string(),status:yk,message:ae.string().optional(),details:ae.string().optional()}),gJ=ae.object({title:ae.string().optional(),createdAt:ae.string().optional(),issuer:cd.optional(),issuee:cd.optional(),credentialSubject:Zb.optional()}),yJ=ae.object({id:ae.string(),uri:ae.string()}).catchall(ae.any()),bJ=ae.object({limit:ae.number(),cursor:ae.string().optional()}),bk=ae.object({cursor:ae.string().optional(),hasMore:ae.boolean()}),Nq=ae.object({kty:ae.string(),crv:ae.string(),x:ae.string(),y:ae.string().optional(),n:ae.string().optional(),d:ae.string()}),Pq=ae.object({alg:ae.string(),iv:ae.string(),tag:ae.string(),epk:Nq.partial().optional(),kid:ae.string().optional(),apv:ae.string().optional(),apu:ae.string().optional()}),Bq=ae.object({header:Pq,encrypted_key:ae.string()}),Lq=ae.object({protected:ae.string(),iv:ae.string(),ciphertext:ae.string(),tag:ae.string(),aad:ae.string().optional(),recipients:Bq.array().optional()}),wk=ae.object({encryptedRecord:Lq,fields:ae.string().array()}).catchall(ae.any()),wJ=bk.extend({records:wk.array()}),Fq=wk.extend({id:ae.string()}),_J=bk.extend({records:Fq.array()}),Jb=ae.object({profileId:ae.string().min(3).max(40),displayName:ae.string().default(""),did:ae.string(),email:ae.string().optional(),image:ae.string().optional(),isServiceProfile:ae.boolean().default(!1).optional(),notificationsWebhook:ae.string().url().startsWith("https://").optional()}),EJ=ae.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),AJ=ae.object({uri:ae.string(),to:ae.string(),from:ae.string(),sent:ae.string().datetime(),received:ae.string().datetime().optional()}),Uq=ae.enum(["DRAFT","LIVE"]),SJ=ae.object({uri:ae.string(),name:ae.string().optional(),type:ae.string().optional(),category:ae.string().optional(),status:Uq.optional()}),xJ=ae.object({to:Jb,from:ae.string(),received:ae.string().optional()}),$q=ae.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),jq=ae.object({title:ae.string().optional(),body:ae.string().optional()}),zq=ae.object({vcUris:ae.array(ae.string()).optional(),vpUris:ae.array(ae.string()).optional()}),TJ=ae.object({type:$q,to:Jb.partial().and(ae.object({did:ae.string()})),from:Jb.partial().and(ae.object({did:ae.string()})),message:jq.optional(),data:zq.optional(),sent:ae.string().datetime().optional()}),MJ=ae.object({endpoint:ae.string(),name:ae.string(),did:ae.string().optional()}),CJ=ae.object({ttlSeconds:ae.number().optional(),totalUses:ae.number().optional()}),Hq=ae.object({endpoint:ae.string()}),IJ=ae.object({signingAuthority:Hq,relationship:ae.object({name:ae.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:ae.string()})}),Vm=a(e=>`lc:ceramic:${e}`,"streamIdToCeramicURI"),kJ=ae.string().refine(e=>e.split(":").length===3&&e.split(":")[0]==="lc","URI must be of the form lc:${storage}:${url}").refine(e=>e.split(":")[1]==="ceramic","URI must use storage type ceramic (i.e. must be lc:ceramic:${streamID})");var x6=ne.object({credentials:uc.array()}).catchall(ne.any()),_k=ne.object({id:ne.string(),title:ne.string(),storageType:ne.literal("ceramic").optional()}).catchall(ne.any()),T6=ne.object({credentials:uc.or(_k).array()}).strict();var Gm=i(async(e,{modelData:t,credentialAlias:r})=>{let n=e.invoke.getCeramicClient(),s=new Cf({ceramic:n,model:t}),o=i(async(v=r)=>{let b=await s.get(v);if(!b)return{credentials:[]};let y=await x6.spa(b);if(y.success)return y.data;let _=await T6.spa(b);if(_.success){let R={credentials:_.data.credentials.map(P=>{if("uri"in P)return P;let{title:K,id:U,storageType:j,...V}=P;return{...V,id:K,uri:`lc:ceramic:${U.replace("ceramic://","")}`}})};return await s.set(r,R),R}throw console.error(y.error),new Error("Invalid credentials list stored in IDX")},"getCredentialsListFromIdx"),c=i(async(v,b)=>{if(!v)throw new Error("Must provide id to remove");b||(b=r);let y=await o(b);return y.credentials=y.credentials.filter(_=>_.id!==v),s.set(b,y)},"removeCredentialFromIdx"),f=i(async v=>(v||(v=r),s.set(v,{credentials:[]})),"removeAllCredentialsFromIdx"),h=i(async v=>{let b=await uc.parseAsync(v);if(!b)throw new Error("record is required");if(!b.uri)throw Error("No URI provided");await e.read.get(b.uri);let y=await o(r),_=y.credentials.findIndex(T=>T.id===b.id);return _>-1?y.credentials[_]=b:y.credentials.push(b),Vm(await s.set(r,y))},"addCredentialInIdx"),p=i(async v=>{let b=uc.array().parse(v),y=await o(r);return await Promise.all(b.map(async _=>{await e.read.get(_.uri);let T=y.credentials.findIndex(O=>O.id===_.id);T>-1?y.credentials[T]=_:y.credentials.push(_)})),Vm(await s.set(r,y))},"addCredentialsInIdx");return{name:"IDX",displayName:"IDX",description:"Stores a bespoke index of credentials for an individual based on their did",index:{get:async v=>(v.debug?.("learnCard.index.IDX.get"),(await o()).credentials),add:async(v,b)=>{v.debug?.("learnCard.index.IDX.add");try{return await h(b),!0}catch(y){return console.error("Error adding credential with IDX:",y),!1}},addMany:async(v,b)=>{v.debug?.("learnCard.index.IDX.add");try{return await p(b),!0}catch(y){return console.error("Error adding credential with IDX:",y),!1}},update:async v=>(v.debug?.("learnCard.index.IDX.update"),!1),remove:async(v,b)=>{v.debug?.("learnCard.index.IDX.remove");try{return await c(b),!0}catch(y){return console.error("Error removing credential from IDX:",y),!1}},removeAll:async v=>{v.debug?.("learnCard.index.IDX.removeAll");try{return await f(),!0}catch(b){return console.error("Error removing credentials from IDX:",b),!1}}},methods:{getCredentialsListFromIdx:async(v,b=r)=>(await o(b)).credentials,getVerifiableCredentialFromIdx:async(v,b)=>{let _=(await o())?.credentials?.find(R=>R?.id===b),T=v.read.get(_?.uri),O=await s0.safeParseAsync(T);return O.success?O.data:void 0},getVerifiableCredentialsFromIdx:async v=>{let y=(await o())?.credentials?.map(_=>_?.uri)??[];return(await Promise.all(y.map(async _=>v.read.get(_)))).filter(_=>!!_)},addVerifiableCredentialInIdx:async(v,b)=>{let y=uc.parse(b);if(!y)throw new Error("record is required");if(!y.uri)throw Error("No URI provided");await v.read.get(y.uri);let _=await o(r),T=_.credentials.findIndex(O=>O.id===y.id);return T>-1?_.credentials[T]=y:_.credentials.push(y),Vm(await s.set(r,_))},removeVerifiableCredentialInIdx:async(v,b)=>c(b),removeAllVerifiableCredentialsInIdx:async()=>f(),getIDXIndex:async()=>s.get(r),setIDXIndex:async(v,b)=>s.set(r,b)}}},"getIDXPlugin");var qq=Gm;
|
|
840
|
+
`):"",this.name="UnsubscriptionError",this.errors=r},"UnsubscriptionErrorImpl"),"UnsubscriptionErrorImpl")});function Xf(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}i(Xf,"arrRemove");a(Xf,"arrRemove");var Sd=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return i(e,"Subscription2"),a(e,"Subscription"),e.prototype.unsubscribe=function(){var t,r,n,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var f=wc(c),h=f.next();!h.done;h=f.next()){var p=h.value;p.remove(this)}}catch(O){t={error:O}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}else c.remove(this);var v=this.initialTeardown;if(Ar(v))try{v()}catch(O){o=O instanceof Wy?O.errors:[O]}var b=this._finalizers;if(b){this._finalizers=null;try{for(var y=wc(b),_=y.next();!_.done;_=y.next()){var T=_.value;try{Rb(T)}catch(O){o=o??[],O instanceof Wy?o=vo(vo([],Ea(o)),Ea(O.errors)):o.push(O)}}}catch(O){n={error:O}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(n)throw n.error}}}if(o)throw new Wy(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)Rb(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Xf(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Xf(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),XC=Sd.EMPTY;function r6(e){return e instanceof Sd||e&&"closed"in e&&Ar(e.remove)&&Ar(e.add)&&Ar(e.unsubscribe)}i(r6,"isSubscription");a(r6,"isSubscription");function Rb(e){Ar(e)?e():e.unsubscribe()}i(Rb,"execFinalizer");a(Rb,"execFinalizer");var Nc={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Z0={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=Z0.delegate;return s?.setTimeout?s.setTimeout.apply(s,vo([e,t],Ea(r))):setTimeout.apply(void 0,vo([e,t],Ea(r)))},clearTimeout:function(e){var t=Z0.delegate;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function n6(e){Z0.setTimeout(function(){var t=Nc.onUnhandledError;if(t)t(e);else throw e})}i(n6,"reportUnhandledError");a(n6,"reportUnhandledError");function Nb(){}i(Nb,"noop");a(Nb,"noop");var Tz=function(){return Fm("C",void 0,void 0)}();function QC(e){return Fm("E",void 0,e)}i(QC,"errorNotification");a(QC,"errorNotification");function eI(e){return Fm("N",e,void 0)}i(eI,"nextNotification");a(eI,"nextNotification");function Fm(e,t,r){return{kind:e,value:t,error:r}}i(Fm,"createNotification");a(Fm,"createNotification");var pc=null;function zf(e){if(Nc.useDeprecatedSynchronousErrorHandling){var t=!pc;if(t&&(pc={errorThrown:!1,error:null}),e(),t){var r=pc,n=r.errorThrown,s=r.error;if(pc=null,n)throw s}}else e()}i(zf,"errorContext");a(zf,"errorContext");function tI(e){Nc.useDeprecatedSynchronousErrorHandling&&pc&&(pc.errorThrown=!0,pc.error=e)}i(tI,"captureError");a(tI,"captureError");var i6=function(e){Ks(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,r6(r)&&r.add(n)):n.destination=Iz,n}return i(t,"Subscriber2"),a(t,"Subscriber"),t.create=function(r,n,s){return new Pb(r,n,s)},t.prototype.next=function(r){this.isStopped?_0(eI(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?_0(QC(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?_0(Tz,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Sd),Mz=Function.prototype.bind;function w0(e,t){return Mz.call(e,t)}i(w0,"bind");a(w0,"bind");var Cz=function(){function e(t){this.partialObserver=t}return i(e,"ConsumerObserver2"),a(e,"ConsumerObserver"),e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Uf(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Uf(n)}else Uf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Uf(r)}},e}(),Pb=function(e){Ks(t,e);function t(r,n,s){var o=e.call(this)||this,c;if(Ar(r)||!r)c={next:r??void 0,error:n??void 0,complete:s??void 0};else{var f;o&&Nc.useDeprecatedNextContext?(f=Object.create(r),f.unsubscribe=function(){return o.unsubscribe()},c={next:r.next&&w0(r.next,f),error:r.error&&w0(r.error,f),complete:r.complete&&w0(r.complete,f)}):c=r}return o.destination=new Cz(c),o}return i(t,"SafeSubscriber2"),a(t,"SafeSubscriber"),t}(i6);function Uf(e){Nc.useDeprecatedSynchronousErrorHandling?tI(e):n6(e)}i(Uf,"handleUnhandledError");a(Uf,"handleUnhandledError");function rI(e){throw e}i(rI,"defaultErrorHandler");a(rI,"defaultErrorHandler");function _0(e,t){var r=Nc.onStoppedNotification;r&&Z0.setTimeout(function(){return r(e,t)})}i(_0,"handleStoppedNotification");a(_0,"handleStoppedNotification");var Iz={closed:!0,next:Nb,error:rI,complete:Nb},s6=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Um(e){return e}i(Um,"identity3");a(Um,"identity");function nI(e){return e.length===0?Um:e.length===1?e[0]:a(i(function(r){return e.reduce(function(n,s){return s(n)},r)},"piped"),"piped")}i(nI,"pipeFromArray");a(nI,"pipeFromArray");var ln=function(){function e(t){t&&(this._subscribe=t)}return i(e,"Observable2"),a(e,"Observable"),e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var s=this,o=sI(t)?t:new Pb(t,r,n);return zf(function(){var c=s,f=c.operator,h=c.source;o.add(f?f.call(o,h):h?s._subscribe(o):s._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=Bb(r),new r(function(s,o){var c=new Pb({next:function(f){try{t(f)}catch(h){o(h),c.unsubscribe()}},error:o,complete:s});n.subscribe(c)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[s6]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return nI(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Bb(t),new t(function(n,s){var o;r.subscribe(function(c){return o=c},function(c){return s(c)},function(){return n(o)})})},e.create=function(t){return new e(t)},e}();function Bb(e){var t;return(t=e??Nc.Promise)!==null&&t!==void 0?t:Promise}i(Bb,"getPromiseCtor");a(Bb,"getPromiseCtor");function iI(e){return e&&Ar(e.next)&&Ar(e.error)&&Ar(e.complete)}i(iI,"isObserver");a(iI,"isObserver");function sI(e){return e&&e instanceof i6||iI(e)&&r6(e)}i(sI,"isSubscriber");a(sI,"isSubscriber");function aI(e){return Ar(e?.lift)}i(aI,"hasLift");a(aI,"hasLift");function Vs(e){return function(t){if(aI(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}i(Vs,"operate");a(Vs,"operate");function ds(e,t,r,n,s){return new kz(e,t,r,n,s)}i(ds,"createOperatorSubscriber");a(ds,"createOperatorSubscriber");var kz=function(e){Ks(t,e);function t(r,n,s,o,c,f){var h=e.call(this,r)||this;return h.onFinalize=c,h.shouldUnsubscribe=f,h._next=n?function(p){try{n(p)}catch(v){r.error(v)}}:e.prototype._next,h._error=o?function(p){try{o(p)}catch(v){r.error(v)}finally{this.unsubscribe()}}:e.prototype._error,h._complete=s?function(){try{s()}catch(p){r.error(p)}finally{this.unsubscribe()}}:e.prototype._complete,h}return i(t,"OperatorSubscriber2"),a(t,"OperatorSubscriber"),t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t}(i6),Dz=Lm(function(e){return a(i(function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"},"ObjectUnsubscribedErrorImpl"),"ObjectUnsubscribedErrorImpl")}),oI=function(e){Ks(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return i(t,"Subject2"),a(t,"Subject"),t.prototype.lift=function(r){var n=new kA(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Dz},t.prototype.next=function(r){var n=this;zf(function(){var s,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var c=wc(n.currentObservers),f=c.next();!f.done;f=c.next()){var h=f.value;h.next(r)}}catch(p){s={error:p}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},t.prototype.error=function(r){var n=this;zf(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var s=n.observers;s.length;)s.shift().error(r)}})},t.prototype.complete=function(){var r=this;zf(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,s=this,o=s.hasError,c=s.isStopped,f=s.observers;return o||c?XC:(this.currentObservers=null,f.push(r),new Sd(function(){n.currentObservers=null,Xf(f,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,o=n.thrownError,c=n.isStopped;s?r.error(o):c&&r.complete()},t.prototype.asObservable=function(){var r=new ln;return r.source=this,r},t.create=function(r,n){return new kA(r,n)},t}(ln),kA=function(e){Ks(t,e);function t(r,n){var s=e.call(this)||this;return s.destination=r,s.source=n,s}return i(t,"AnonymousSubject2"),a(t,"AnonymousSubject"),t.prototype.next=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.next)===null||s===void 0||s.call(n,r)},t.prototype.error=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.error)===null||s===void 0||s.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,s;return(s=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&s!==void 0?s:XC},t}(oI),Oz=function(e){Ks(t,e);function t(r){var n=e.call(this)||this;return n._value=r,n}return i(t,"BehaviorSubject2"),a(t,"BehaviorSubject"),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var n=e.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},t.prototype.getValue=function(){var r=this,n=r.hasError,s=r.thrownError,o=r._value;if(n)throw s;return this._throwIfClosed(),o},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t}(oI),cI={now:function(){return(cI.delegate||Date).now()},delegate:void 0},Rz=function(e){Ks(t,e);function t(r,n){return e.call(this)||this}return i(t,"Action2"),a(t,"Action"),t.prototype.schedule=function(r,n){return n===void 0&&(n=0),this},t}(Sd),J0={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=J0.delegate;return s?.setInterval?s.setInterval.apply(s,vo([e,t],Ea(r))):setInterval.apply(void 0,vo([e,t],Ea(r)))},clearInterval:function(e){var t=J0.delegate;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Nz=function(e){Ks(t,e);function t(r,n){var s=e.call(this,r,n)||this;return s.scheduler=r,s.work=n,s.pending=!1,s}return i(t,"AsyncAction2"),a(t,"AsyncAction"),t.prototype.schedule=function(r,n){var s;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,c=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(c,o,n)),this.pending=!0,this.delay=n,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(c,this.id,n),this},t.prototype.requestAsyncId=function(r,n,s){return s===void 0&&(s=0),J0.setInterval(r.flush.bind(r,this),s)},t.prototype.recycleAsyncId=function(r,n,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return n;n!=null&&J0.clearInterval(n)},t.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(r,n);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,n){var s=!1,o;try{this.work(r)}catch(c){s=!0,o=c||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,s=r.scheduler,o=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Xf(o,this),n!=null&&(this.id=this.recycleAsyncId(s,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Rz),DA=function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return i(e,"Scheduler2"),a(e,"Scheduler"),e.prototype.schedule=function(t,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(n,r)},e.now=cI.now,e}(),Pz=function(e){Ks(t,e);function t(r,n){n===void 0&&(n=DA.now);var s=e.call(this,r,n)||this;return s.actions=[],s._active=!1,s}return i(t,"AsyncScheduler2"),a(t,"AsyncScheduler"),t.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var s;this._active=!0;do if(s=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,s){for(;r=n.shift();)r.unsubscribe();throw s}},t}(DA),Bz=new Pz(Nz),Lz=Bz,uI=new ln(function(e){return e.complete()});function a6(e){return e&&Ar(e.schedule)}i(a6,"isScheduler");a(a6,"isScheduler");function o6(e){return e[e.length-1]}i(o6,"last");a(o6,"last");function lI(e){return a6(o6(e))?e.pop():void 0}i(lI,"popScheduler");a(lI,"popScheduler");function fI(e,t){return typeof o6(e)=="number"?e.pop():t}i(fI,"popNumber");a(fI,"popNumber");var c6=a(function(e){return e&&typeof e.length=="number"&&typeof e!="function"},"isArrayLike");function u6(e){return Ar(e?.then)}i(u6,"isPromise");a(u6,"isPromise");function l6(e){return Ar(e[s6])}i(l6,"isInteropObservable");a(l6,"isInteropObservable");function f6(e){return Symbol.asyncIterator&&Ar(e?.[Symbol.asyncIterator])}i(f6,"isAsyncIterable");a(f6,"isAsyncIterable");function d6(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}i(d6,"createInvalidObservableTypeError");a(d6,"createInvalidObservableTypeError");function dI(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}i(dI,"getSymbolIterator");a(dI,"getSymbolIterator");var hI=dI();function h6(e){return Ar(e?.[hI])}i(h6,"isIterable");a(h6,"isIterable");function p6(e){return JC(this,arguments,a(i(function(){var r,n,s,o;return t6(this,function(c){switch(c.label){case 0:r=e.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,yc(r.read())];case 3:return n=c.sent(),s=n.value,o=n.done,o?[4,yc(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,yc(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})},"readableStreamLikeToAsyncGenerator_1"),"readableStreamLikeToAsyncGenerator_1"))}i(p6,"readableStreamLikeToAsyncGenerator");a(p6,"readableStreamLikeToAsyncGenerator");function m6(e){return Ar(e?.getReader)}i(m6,"isReadableStreamLike");a(m6,"isReadableStreamLike");function Ma(e){if(e instanceof ln)return e;if(e!=null){if(l6(e))return pI(e);if(c6(e))return mI(e);if(u6(e))return vI(e);if(f6(e))return v6(e);if(h6(e))return gI(e);if(m6(e))return yI(e)}throw d6(e)}i(Ma,"innerFrom");a(Ma,"innerFrom");function pI(e){return new ln(function(t){var r=e[s6]();if(Ar(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}i(pI,"fromInteropObservable");a(pI,"fromInteropObservable");function mI(e){return new ln(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}i(mI,"fromArrayLike");a(mI,"fromArrayLike");function vI(e){return new ln(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,n6)})}i(vI,"fromPromise");a(vI,"fromPromise");function gI(e){return new ln(function(t){var r,n;try{for(var s=wc(e),o=s.next();!o.done;o=s.next()){var c=o.value;if(t.next(c),t.closed)return}}catch(f){r={error:f}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}t.complete()})}i(gI,"fromIterable");a(gI,"fromIterable");function v6(e){return new ln(function(t){bI(e,t).catch(function(r){return t.error(r)})})}i(v6,"fromAsyncIterable");a(v6,"fromAsyncIterable");function yI(e){return v6(p6(e))}i(yI,"fromReadableStreamLike");a(yI,"fromReadableStreamLike");function bI(e,t){var r,n,s,o;return ZC(this,void 0,void 0,function(){var c,f;return t6(this,function(h){switch(h.label){case 0:h.trys.push([0,5,6,11]),r=YC(e),h.label=1;case 1:return[4,r.next()];case 2:if(n=h.sent(),!!n.done)return[3,4];if(c=n.value,t.next(c),t.closed)return[2];h.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=h.sent(),s={error:f},[3,11];case 6:return h.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:h.sent(),h.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}i(bI,"process2");a(bI,"process");function ba(e,t,r,n,s){n===void 0&&(n=0),s===void 0&&(s=!1);var o=t.schedule(function(){r(),s?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!s)return o}i(ba,"executeSchedule");a(ba,"executeSchedule");function g6(e,t){return t===void 0&&(t=0),Vs(function(r,n){r.subscribe(ds(n,function(s){return ba(n,e,function(){return n.next(s)},t)},function(){return ba(n,e,function(){return n.complete()},t)},function(s){return ba(n,e,function(){return n.error(s)},t)}))})}i(g6,"observeOn");a(g6,"observeOn");function y6(e,t){return t===void 0&&(t=0),Vs(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}i(y6,"subscribeOn");a(y6,"subscribeOn");function wI(e,t){return Ma(e).pipe(y6(t),g6(t))}i(wI,"scheduleObservable");a(wI,"scheduleObservable");function _I(e,t){return Ma(e).pipe(y6(t),g6(t))}i(_I,"schedulePromise");a(_I,"schedulePromise");function EI(e,t){return new ln(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}i(EI,"scheduleArray");a(EI,"scheduleArray");function AI(e,t){return new ln(function(r){var n;return ba(r,t,function(){n=e[hI](),ba(r,t,function(){var s,o,c;try{s=n.next(),o=s.value,c=s.done}catch(f){r.error(f);return}c?r.complete():r.next(o)},0,!0)}),function(){return Ar(n?.return)&&n.return()}})}i(AI,"scheduleIterable");a(AI,"scheduleIterable");function b6(e,t){if(!e)throw new Error("Iterable cannot be null");return new ln(function(r){ba(r,t,function(){var n=e[Symbol.asyncIterator]();ba(r,t,function(){n.next().then(function(s){s.done?r.complete():r.next(s.value)})},0,!0)})})}i(b6,"scheduleAsyncIterable");a(b6,"scheduleAsyncIterable");function SI(e,t){return b6(p6(e),t)}i(SI,"scheduleReadableStreamLike");a(SI,"scheduleReadableStreamLike");function xI(e,t){if(e!=null){if(l6(e))return wI(e,t);if(c6(e))return EI(e,t);if(u6(e))return _I(e,t);if(f6(e))return b6(e,t);if(h6(e))return AI(e,t);if(m6(e))return SI(e,t)}throw d6(e)}i(xI,"scheduled");a(xI,"scheduled");function TI(e,t){return t?xI(e,t):Ma(e)}i(TI,"from3");a(TI,"from");var MI=Lm(function(e){return a(i(function(){e(this),this.name="EmptyError",this.message="no elements in sequence"},"EmptyErrorImpl"),"EmptyErrorImpl")});function CI(e){return e instanceof Date&&!isNaN(e)}i(CI,"isValidDate");a(CI,"isValidDate");function w6(e,t){return Vs(function(r,n){var s=0;r.subscribe(ds(n,function(o){n.next(e.call(t,o,s++))}))})}i(w6,"map");a(w6,"map");var Fz=Array.isArray;function II(e,t){return Fz(t)?e.apply(void 0,vo([],Ea(t))):e(t)}i(II,"callOrApply");a(II,"callOrApply");function kI(e){return w6(function(t){return II(e,t)})}i(kI,"mapOneOrManyArgs");a(kI,"mapOneOrManyArgs");function DI(e,t,r,n,s,o,c,f){var h=[],p=0,v=0,b=!1,y=a(function(){b&&!h.length&&!p&&t.complete()},"checkComplete"),_=a(function(O){return p<n?T(O):h.push(O)},"outerNext"),T=a(function(O){o&&t.next(O),p++;var R=!1;Ma(r(O,v++)).subscribe(ds(t,function(P){s?.(P),o?_(P):t.next(P)},function(){R=!0},void 0,function(){if(R)try{p--;for(var P=a(function(){var K=h.shift();c?ba(t,c,function(){return T(K)}):T(K)},"_loop_1");h.length&&p<n;)P();y()}catch(K){t.error(K)}}))},"doInnerSub");return e.subscribe(ds(t,_,function(){b=!0,y()})),function(){f?.()}}i(DI,"mergeInternals");a(DI,"mergeInternals");function $m(e,t,r){return r===void 0&&(r=1/0),Ar(t)?$m(function(n,s){return w6(function(o,c){return t(n,o,s,c)})(Ma(e(n,s)))},r):(typeof t=="number"&&(r=t),Vs(function(n,s){return DI(n,s,e,r)}))}i($m,"mergeMap");a($m,"mergeMap");function OI(e){return e===void 0&&(e=1/0),$m(Um,e)}i(OI,"mergeAll");a(OI,"mergeAll");var Uz=["addListener","removeListener"],$z=["addEventListener","removeEventListener"],jz=["on","off"];function Y0(e,t,r,n){if(Ar(r)&&(n=r,r=void 0),n)return Y0(e,t,r).pipe(kI(n));var s=Ea(PI(e)?$z.map(function(f){return function(h){return e[f](t,h,r)}}):RI(e)?Uz.map(Lb(e,t)):NI(e)?jz.map(Lb(e,t)):[],2),o=s[0],c=s[1];if(!o&&c6(e))return $m(function(f){return Y0(f,t,r)})(Ma(e));if(!o)throw new TypeError("Invalid event target");return new ln(function(f){var h=a(function(){for(var p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];return f.next(1<p.length?p:p[0])},"handler");return o(h),function(){return c(h)}})}i(Y0,"fromEvent");a(Y0,"fromEvent");function Lb(e,t){return function(r){return function(n){return e[r](t,n)}}}i(Lb,"toCommonHandlerRegistry");a(Lb,"toCommonHandlerRegistry");function RI(e){return Ar(e.addListener)&&Ar(e.removeListener)}i(RI,"isNodeStyleEventEmitter");a(RI,"isNodeStyleEventEmitter");function NI(e){return Ar(e.on)&&Ar(e.off)}i(NI,"isJQueryStyleEventEmitter");a(NI,"isJQueryStyleEventEmitter");function PI(e){return Ar(e.addEventListener)&&Ar(e.removeEventListener)}i(PI,"isEventTarget");a(PI,"isEventTarget");function _6(e,t,r){e===void 0&&(e=0),r===void 0&&(r=Lz);var n=-1;return t!=null&&(a6(t)?r=t:n=t),new ln(function(s){var o=CI(e)?+e-r.now():e;o<0&&(o=0);var c=0;return r.schedule(function(){s.closed||(s.next(c++),0<=n?this.schedule(void 0,n):s.complete())},o)})}i(_6,"timer");a(_6,"timer");function BI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=lI(e),n=fI(e,1/0),s=e;return s.length?s.length===1?Ma(s[0]):OI(n)(TI(s,r)):uI}i(BI,"merge");a(BI,"merge");function LI(e,t){return Vs(function(r,n){var s=0;r.subscribe(ds(n,function(o){return e.call(t,o,s++)&&n.next(o)}))})}i(LI,"filter");a(LI,"filter");function FI(e){return Vs(function(t,r){var n=!1;t.subscribe(ds(r,function(s){n=!0,r.next(s)},function(){n||r.next(e),r.complete()}))})}i(FI,"defaultIfEmpty");a(FI,"defaultIfEmpty");function UI(e){return e<=0?function(){return uI}:Vs(function(t,r){var n=0;t.subscribe(ds(r,function(s){++n<=e&&(r.next(s),e<=n&&r.complete())}))})}i(UI,"take");a(UI,"take");function $I(e){return e===void 0&&(e=jI),Vs(function(t,r){var n=!1;t.subscribe(ds(r,function(s){n=!0,r.next(s)},function(){return n?r.complete():r.error(e())}))})}i($I,"throwIfEmpty");a($I,"throwIfEmpty");function jI(){return new MI}i(jI,"defaultErrorFactory");a(jI,"defaultErrorFactory");function zI(e,t){var r=arguments.length>=2;return function(n){return n.pipe(e?LI(function(s,o){return e(s,o,n)}):Um,UI(1),r?FI(t):$I(function(){return new MI}))}}i(zI,"first");a(zI,"first");function HI(e,t){return Vs(function(r,n){var s=t??{},o=s.leading,c=o===void 0?!0:o,f=s.trailing,h=f===void 0?!1:f,p=!1,v=null,b=null,y=!1,_=a(function(){b?.unsubscribe(),b=null,h&&(R(),y&&n.complete())},"endThrottling"),T=a(function(){b=null,y&&n.complete()},"cleanupThrottling"),O=a(function(P){return b=Ma(e(P)).subscribe(ds(n,_,T))},"startThrottle"),R=a(function(){if(p){p=!1;var P=v;v=null,n.next(P),!y&&O(P)}},"send");r.subscribe(ds(n,function(P){p=!0,v=P,!(b&&!b.closed)&&(c?R():O(P))},function(){y=!0,!(h&&p&&b&&!b.closed)&&n.complete()}))})}i(HI,"throttle");a(HI,"throttle");var OA;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(OA||(OA={}));var X0;(function(e){e[e.NOT_REQUESTED=0]="NOT_REQUESTED",e[e.PENDING=1]="PENDING",e[e.PROCESSING=2]="PROCESSING",e[e.ANCHORED=3]="ANCHORED",e[e.FAILED=4]="FAILED"})(X0||(X0={}));var Fb;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(Fb||(Fb={}));var jm=i(class extends ln{constructor(e,t){super(r=>{e.subscribe(r)}),this.state$=e,this._context=t}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:t}=this.state$.value;return(0,SA.default)(e?.content??t)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Er.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Er.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===Fb.ANCHOR).map(({cid:e})=>Er.make(this.id,e))}get state(){return(0,SA.default)(this.state$.value)}async sync(e={}){e={sync:Yn.PREFER_CACHE,...e};let t=await this.api.loadStream(this.id,e);this.state$.next(t.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}},"Stream");a(jm,"Stream");function zm(){return e=>{}}i(zm,"StreamStatic");a(zm,"StreamStatic");var zz=rr(T$(),1);function qI(e){let t=new AbortController;if(e.length===0)throw Error("Need abort signals to create a merged abort signal");return e.some(r=>r.aborted)?(t.abort(),t.signal):(BI(...e.map(r=>Y0(r,"abort"))).pipe(zI()).subscribe(()=>{t.abort()}),t.signal)}i(qI,"mergeAbortSignals");a(qI,"mergeAbortSignals");var KI=i(class{constructor(e){let t=new AbortController;if(this.signal=t.signal,e<=0){t.abort();return}this._subscription=_6(e).subscribe(()=>{t.abort()})}clear(){this._subscription?.unsubscribe()}},"TimedAbortSignal");a(KI,"TimedAbortSignal");async function VI(e,t){let r=new AbortController,n=a(()=>{r.abort()},"onAbort");return e.addEventListener("abort",n),e.aborted&&r.abort(),t(r.signal).finally(()=>{e.removeEventListener("abort",n)})}i(VI,"abortable2");a(VI,"abortable");var Hz=60*1e3*3;async function gi(e,t={}){t.body&&Object.assign(t,{body:JSON.stringify(t.body),headers:{...t.headers,"Content-Type":"application/json"}});let r=t.timeout||Hz,n=new KI(r),s=t.signal?qI([t.signal,n.signal]):n.signal,o=await VI(s,c=>(0,zz.default)(String(e),{...t,signal:c})).finally(()=>n.clear());if(!o.ok){let c=await o.text();throw new Error(`HTTP request to '${e}' failed with status '${o.statusText}': ${c}`)}return o.json()}i(gi,"fetchJson");a(gi,"fetchJson");var l0=rr(pd(),1);js();function ga(e){let t=jt.asCID(e);if(t)return t;if(typeof e=="string")return jt.parse(e);if(e instanceof Uint8Array)return jt.decode(e);throw new Error(`${e} cannot be converted to a CID`)}i(ga,"toCID");a(ga,"toCID");var RA=0,jr=i(class{static streamIdFromState(e){return new Xt(e.type,e.log[0].cid)}static serializeCommit(e){let t=(0,l0.default)(e);return jr.isSignedCommitContainer(t)?(t.jws.link=t.jws.link.toString(),t.linkedBlock=Mr(t.linkedBlock,"base64"),t.cacaoBlock&&(t.cacaoBlock=Mr(t.cacaoBlock,"base64")),t):(jr.isSignedCommit(e)&&(t.link=t.link.toString()),jr.isAnchorCommit(e)&&(t.proof=t.proof.toString()),t.id&&(t.id=t.id.toString()),t.prev&&(t.prev=t.prev.toString()),e.header?.model&&(t.header.model=Mr(e.header.model,"base64")),t)}static deserializeCommit(e){let t=(0,l0.default)(e);return jr.isSignedCommitContainer(t)?(t.jws.link=ga(t.jws.link),t.linkedBlock=br(t.linkedBlock,"base64"),t.cacaoBlock&&(t.cacaoBlock=br(t.cacaoBlock,"base64")),t):(jr.isSignedCommit(t)&&(t.link=ga(t.link)),jr.isAnchorCommit(t)&&(t.proof=ga(t.proof)),t.id&&(t.id=ga(t.id)),t.prev&&(t.prev=ga(t.prev)),t.header?.model&&(t.header.model=br(t.header.model,"base64")),t)}static serializeState(e){let t=(0,l0.default)(e);return t.log=t.log.map(r=>({...r,cid:r.cid.toString()})),t.anchorStatus!=null&&(t.anchorStatus=X0[t.anchorStatus]),t.anchorProof!=null&&(t.anchorProof.txHash=t.anchorProof.txHash.toString(),t.anchorProof.root=t.anchorProof.root.toString()),e.metadata?.model&&(t.metadata.model=e.metadata.model.toString()),e.next?.metadata?.model&&(t.next.metadata.model=e.next.metadata.model.toString()),e.metadata?.unique&&e.type!=RA&&(t.metadata.unique=Mr(t.metadata.unique,"base64")),t.doctype=_a.nameByCode(t.type),t}static deserializeState(e){if(!e)return null;let t=(0,l0.default)(e);return t.doctype&&(t.type=_a.codeByName(t.doctype),delete t.doctype),t.log=t.log.map(r=>({...r,cid:ga(r.cid)})),t.anchorProof&&(t.anchorProof.txHash=ga(t.anchorProof.txHash),t.anchorProof.root=ga(t.anchorProof.root)),t.anchorStatus&&(t.anchorStatus=X0[t.anchorStatus]),e.metadata?.model&&(t.metadata.model=Xt.fromString(e.metadata.model)),e.next?.metadata?.model&&(t.next.metadata.model=Xt.fromString(e.next.metadata.model)),e.metadata?.unique&&e.type!=RA&&(t.metadata.unique=br(e.metadata.unique,"base64")),t}static statesEqual(e,t){return JSON.stringify(jr.serializeState(e))===JSON.stringify(jr.serializeState(t))}static isStateSupersetOf(e,t){if(e.log.length<t.log.length)return!1;for(let r in t.log)if(!e.log[r].cid.equals(t.log[r].cid))return!1;return!(e.log.length===t.log.length&&e.anchorStatus!=t.anchorStatus)}static assertCommitLinksToState(e,t){let r=this.streamIdFromState(e);if(t.id&&!t.id.equals(e.log[0].cid))throw new Error(`Invalid genesis CID in commit for StreamID ${r.toString()}. Found: ${t.id}, expected ${e.log[0].cid}`);let n=e.log[e.log.length-1].cid;if(!t.prev.equals(n))throw new Error(`Commit doesn't properly point to previous commit in log. Expected ${n}, found 'prev' ${t.prev}`)}static async convertCommitToSignedCommitContainer(e,t){if(jr.isSignedCommit(e)){let r=await t.block.get(e.link);return{jws:e,linkedBlock:r}}return e}static isSignedCommitContainer(e){return e&&e.jws!==void 0}static isSignedCommit(e){return e&&e.link!==void 0}static isAnchorCommit(e){return e&&e.proof!==void 0}static isSignedCommitData(e){return e&&e.envelope!==void 0}static isAnchorCommitData(e){return e&&e.proof!==void 0}},"StreamUtils");a(jr,"StreamUtils");var GI=i(class extends Oz{next(e){let t=this.value;jr.statesEqual(t,e)||super.next(e)}},"StreamStateSubject");a(GI,"StreamStateSubject");var qz=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate3"),mi,Zy={anchor:!0,publish:!0,pin:!0,sync:Yn.PREFER_CACHE},Kz={sync:Yn.PREFER_CACHE},NA={anchor:!0,publish:!0,throwOnInvalidCommit:!0};function E0(e,t){if(typeof e?.schema=="string")try{Er.fromString(e.schema)}catch{throw new Error("Schema must be a CommitID")}let r={controllers:e?.controllers,family:e?.family,schema:e?.schema?.toString(),tags:e?.tags};if(t)e?.deterministic||(r.unique=Mr((0,Sz.randomBytes)(12),"base64")),e?.forbidControllerChange&&(r.forbidControllerChange=!0);else{if(e?.deterministic!==void 0||e?.unique!==void 0)throw new Error("Cannot change 'deterministic' or 'unique' properties on existing Streams");if(e?.forbidControllerChange!==void 0)throw new Error("Cannot change 'forbidControllerChange' property on existing Streams")}return Object.keys(r).forEach(n=>r[n]===void 0&&delete r[n]),r}i(E0,"headerFromMetadata");a(E0,"headerFromMetadata");async function Ub(e){if(!e.did)throw new Error("No DID provided");return e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`)),e.did}i(Ub,"getAuthenticatedDID");a(Ub,"getAuthenticatedDID");async function A0(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(A0,"throwReadOnlyError");a(A0,"throwReadOnlyError");var Aa=mi=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,Az.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async create(t,r,n,s={}){s={...Zy,...s},!n?.deterministic&&s.syncTimeoutSeconds==null&&(s.syncTimeoutSeconds=0);let o=s.asDID?{did:s.asDID}:t,c=await mi.makeGenesis(o,r,n);return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,c,s)}static async createFromGenesis(t,r,n={}){n={...Zy,...n},r.header?.unique&&n.syncTimeoutSeconds==null&&(n.syncTimeoutSeconds=0);let s=r.data?await mi._signDagJWS(t,r):r;return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,s,n)}static async deterministic(t,r,n={}){if(n={...Zy,...n},r={...r,deterministic:!0},r.family==null&&r.tags==null)throw new Error("Family and/or tags are required when creating a deterministic tile document");let s=await mi.makeGenesis(t,null,r);return t.createStreamFromGenesis(mi.STREAM_TYPE_ID,s,n)}static async load(t,r,n={}){n={...Kz,...n};let s=mo.from(r);if(s.type!=mi.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${mi.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async update(t,r,n={}){n={...NA,...n};let s=n.asDID?{did:n.asDID}:this.api,o=await this.makeCommit(s,t,r),c=await this.api.applyCommit(this.id,o,n);this.state$.next(c.state)}async patch(t,r={}){r={...NA,...r};let s={header:E0(this.metadata,!1),data:t,prev:this.tip,id:this.id.cid},o=await mi._signDagJWS(this.api,s),c=await this.api.applyCommit(this.id,o,r);this.state$.next(c.state)}makeReadOnly(){this.update=A0,this.patch=A0,this.sync=A0,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}async makeCommit(t,r,n){let s=await this._makeRawCommit(r,n);return mi._signDagJWS(t,s)}async _makeRawCommit(t,r){r||(r={});let n=E0(r,!1);if(t==null&&(t=this.content),n.controllers){if(n.controllers.length!==1)throw new Error("Exactly one controller must be specified");if(!n.controllers[0])throw new Error("Controller cannot be updated to an undefined value.")}let s=NC.compare(this.content,t),o=this.state.log[0];return{header:n,data:s,prev:this.tip,id:o.cid}}static async makeGenesis(t,r,n){if(n||(n={}),!n.controllers||n.controllers.length===0)if(t.did){let c=await Ub(t);n.controllers=[c.hasParent?c.parent:c.id]}else throw new Error("No controllers specified");if(n.controllers?.length!==1)throw new Error("Exactly one controller must be specified");let s=E0(n,!0);if(n?.deterministic&&r)throw new Error("Initial content must be null when creating a deterministic Tile document");if(r==null){let c={header:s};return Cm(c),c}let o={data:r,header:s};return mi._signDagJWS(t,o)}static async _signDagJWS(t,r){return(await Ub(t)).createDagJWS(r)}},"TileDocument2"),"TileDocument");Aa.STREAM_TYPE_NAME="tile";Aa.STREAM_TYPE_ID=0;Aa=mi=qz([zm()],Aa);var Vz=rr(M$(),1);function WI(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}i(WI,"_checkPrivateRedeclaration2");a(WI,"_checkPrivateRedeclaration");function ZI(e,t){return t.get?t.get.call(e):t.value}i(ZI,"_classApplyDescriptorGet2");a(ZI,"_classApplyDescriptorGet");function JI(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}i(JI,"_classApplyDescriptorSet2");a(JI,"_classApplyDescriptorSet");function E6(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}i(E6,"_classExtractFieldDescriptor2");a(E6,"_classExtractFieldDescriptor");function S0(e,t){var r=E6(e,t,"get");return ZI(e,r)}i(S0,"_classPrivateFieldGet2");a(S0,"_classPrivateFieldGet");function $b(e,t,r){WI(e,t),t.set(e,r)}i($b,"_classPrivateFieldInit2");a($b,"_classPrivateFieldInit");function jb(e,t,r){var n=E6(e,t,"set");return JI(e,n,r),r}i(jb,"_classPrivateFieldSet2");a(jb,"_classPrivateFieldSet");function YI(e){return typeof e=="string"||Er.isInstance(e)||Xt.isInstance(e)?{streamId:e}:{streamId:e.streamId,genesis:e.genesis}}i(YI,"keyToQuery");a(YI,"keyToQuery");function x0(e){return typeof e=="string"?mo.from(e).toString():Er.isInstance(e)||Xt.isInstance(e)?e.toString():e.streamId.toString()}i(x0,"keyToString");a(x0,"keyToString");async function XI(e){let t=await Aa.makeGenesis({},null,{...e,deterministic:!0}),r=await Xt.fromGenesis("tile",t);return{genesis:t,streamId:r}}i(XI,"getDeterministicQuery");a(XI,"getDeterministicQuery");var Gz=a(()=>Promise.resolve([]),"tempBatchLoadFn"),f0=new WeakMap,Jy=new WeakMap,Wz=i(class extends Vz.default{cache(e){if(!S0(this,Jy))return!1;let t=e.id.toString();return this.clear(t).prime(t,e),!0}async create(e,t,r){let n=await Aa.create(S0(this,f0),e,t,r);return this.cache(n),n}async deterministic(e,t){let r=await XI(e);try{return await super.load(r)}catch{let s=await Aa.createFromGenesis(S0(this,f0),r.genesis,t);return this.cache(s),s}}async load(e){return await super.load(e)}async update(e,t,r,n){let s=x0(e);this.clear(s);let o=await this.load({streamId:s});return await o.update(t,r,n),o}constructor(e){super(Gz,{cache:!0,cacheKeyFn:x0,cacheMap:e.cache!=null&&typeof e.cache!="boolean"?e.cache:void 0}),$b(this,f0,{writable:!0,value:void 0}),$b(this,Jy,{writable:!0,value:void 0}),this._batchLoadFn=async t=>{e.cache||this.clearAll();let r=await e.ceramic.multiQuery(t.map(YI),e.multiqueryTimeout);return t.map(n=>{let s=x0(n),o=r[s];return o||new Error(`Failed to load stream: ${s}`)})},jb(this,f0,e.ceramic),jb(this,Jy,!!e.cache)}},"TileLoader");a(Wz,"TileLoader");function zb(e){return typeof e=="string"?Xt.fromString(e):e}i(zb,"typeStreamID");a(zb,"typeStreamID");function QI(e,t){let r=new URL(e);for(let[n,s]of Object.entries(t))Xt.isInstance(s)?r.searchParams.set(n,s.toString()):typeof s=="object"?r.searchParams.set(n,JSON.stringify(s)):r.searchParams.set(n,s);return r}i(QI,"serializeObjectToSearchParams");a(QI,"serializeObjectToSearchParams");function Hb(e){let t={};for(let[r,n]of Object.entries(e))Xt.isInstance(n)?t[r]=n.toString():t[r]=n;return t}i(Hb,"serializeObjectForHttpPost");a(Hb,"serializeObjectForHttpPost");var ji=i(class extends ln{constructor(e,t,r){super(n=>{this.state$.observers.length===0&&(this.periodicSubscription=_6(0,r).pipe(HI(()=>this._syncState(this.id,{sync:Yn.PREFER_CACHE}))).subscribe()),this.state$.subscribe(n).add(()=>{this.state$.observers.length===0&&this.periodicSubscription?.unsubscribe()})}),this.state$=new GI(e),this._apiUrl=new URL(t)}get value(){return this.state$.value}get state(){return this.state$.value}next(e){this.state$.next(e)}async _syncState(e,t){let r=await ji._load(e,this._apiUrl,t);this.state$.next(jr.deserializeState(r))}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}static async createFromGenesis(e,t,r,n,s){let o=new URL("./streams",e),{state:c}=await gi(o,{method:"post",body:{type:t,genesis:jr.serializeCommit(r),opts:n}});return new ji(jr.deserializeState(c),e,s)}static async applyCommit(e,t,r,n,s){let o=new URL("./commits",e),{state:c}=await gi(o,{method:"post",body:{streamId:t.toString(),commit:jr.serializeCommit(r),opts:n}});return new ji(jr.deserializeState(c),e,s)}static async _load(e,t,r){let n=QI(new URL(`./streams/${e}`,t),r),{state:s}=await gi(n);return s}static async load(e,t,r,n){let s=await ji._load(e,t,n);return new ji(jr.deserializeState(s),t,r)}static async loadStreamCommits(e,t){let r=new URL(`./commits/${e}`,t),{commits:n}=await gi(r);return n.map(s=>({cid:s.cid,value:jr.deserializeCommit(s.value)}))}complete(){this.state$.complete()}},"Document");a(ji,"Document");var Qf;(function(e){e[e.PREFER_CACHE=0]="PREFER_CACHE",e[e.SYNC_ALWAYS=1]="SYNC_ALWAYS",e[e.NEVER_SYNC=2]="NEVER_SYNC",e[e.SYNC_ON_ERROR=3]="SYNC_ON_ERROR"})(Qf||(Qf={}));var PA=rr(pd(),1),BA;(function(e){e[e.GENESIS=0]="GENESIS",e[e.PARTIAL=1]="PARTIAL",e[e.SIGNED=2]="SIGNED"})(BA||(BA={}));var qb;(function(e){e[e.GENESIS=0]="GENESIS",e[e.SIGNED=1]="SIGNED",e[e.ANCHOR=2]="ANCHOR"})(qb||(qb={}));var ek=i(class extends ln{constructor(e,t){super(r=>{e.subscribe(r)}),this.state$=e,this._context=t}get id(){return new Xt(this.state$.value.type,this.state$.value.log[0].cid)}get api(){return this._context.api}get content(){let{next:e,content:t}=this.state$.value;return(0,PA.default)(e?.content??t)}get tip(){return this.state$.value.log[this.state$.value.log.length-1].cid}get commitId(){return Er.make(this.id,this.tip)}get allCommitIds(){return this.state$.value.log.map(({cid:e})=>Er.make(this.id,e))}get anchorCommitIds(){return this.state$.value.log.filter(({type:e})=>e===qb.ANCHOR).map(({cid:e})=>Er.make(this.id,e))}get state(){return(0,PA.default)(this.state$.value)}async sync(e={}){e={sync:Qf.PREFER_CACHE,...e};let t=await this.api.loadStream(this.id,e);this.state$.next(t.state)}async requestAnchor(){return this.api.requestAnchor(this.id)}},"Stream2");a(ek,"Stream");function tk(){return e=>{}}i(tk,"StreamStatic2");a(tk,"StreamStatic");function rk(e){if(typeof e=="string"&&e.includes("@")){let[t,r]=e.split("@");if(!t||!r)throw new Error("Invalid accountId provided");return new Bu({address:t,chainId:r})}return new Bu(e)}i(rk,"normalizeAccountId");a(rk,"normalizeAccountId");var Zz="(?:%[0-9a-fA-F]{2})",LA=`(?:[a-zA-Z0-9._-]|${Zz})`,Jz="([a-z0-9]+)",Yz=`((?:${LA}*:)*(${LA}+))`,FA="[a-zA-Z0-9_.:%-]",Xz=`;${FA}+=${FA}*`,Qz=`((${Xz})*)`,eH="(/[^#?]*)?",tH="([?][^#]*)?",rH="(#.*)?",nH=new RegExp(`^did:${Jz}:${Yz}${Qz}${eH}${tH}${rH}$`);function nk(e){if(e===""||!e)return null;let t=e.match(nH);if(t){let r={did:`did:${t[1]}:${t[2]}`,method:t[1],id:t[2],didUrl:e};if(t[4]){let n=t[4].slice(1).split(";");r.params={};for(let s of n){let o=s.split("=");r.params[o[0]]=o[1]}}return t[6]&&(r.path=t[6]),t[7]&&(r.query=t[7].slice(1)),t[8]&&(r.fragment=t[8].slice(1)),r}return null}i(nk,"parse2");a(nk,"parse");var iH=rr(pd(),1),sH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate4"),fc,Yy=a(()=>{throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")},"throwReadOnlyError"),UA={anchor:!1,publish:!0,sync:Qf.PREFER_CACHE},Xy={anchor:!0,publish:!0},aH={sync:Qf.PREFER_CACHE},Fu=fc=a(i(class extends ek{constructor(){super(...arguments),this._isReadOnly=!1}get did(){return this.content}get metadata(){let{next:t,metadata:r}=this.state$.value;return(0,iH.default)(t?.metadata??r)}get controllers(){return this.metadata.controllers}static async fromAccount(t,r,n={}){n={...UA,...n};let s=rk(r),o=fc.makeGenesis(s);return fc.fromGenesis(t,o,n)}static async fromGenesis(t,r,n={}){return n={...UA,...n},t.createStreamFromGenesis(fc.STREAM_TYPE_ID,r,n)}async setDid(t,r,n={}){n={...Xy,...n};let s=typeof t=="string"?t.trim():t.id;if(nk(s)?.did!==s)throw new Error(`DID is not valid: '${s}'`);let c=await r.createLink(s);return this.setDidProof(c,n)}async setDidProof(t,r={}){r={...Xy,...r};let n=this.makeCommit(t),s=await this.api.applyCommit(this.id,n,r);this.state$.next(s.state)}async clearDid(t,r={}){r={...Xy,...r};let n=await t.createLink("");return this.setDidProof(n,r)}static async load(t,r,n={}){n={...aH,...n};let s=mo.from(r);if(s.type!=fc.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${fc.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}static makeGenesis(t){return t.chainId.namespace==="eip155"&&(t.address=t.address.toLowerCase()),{header:{controllers:[`${t.address}@${t.chainId.toString()}`],family:`caip10-${t.chainId.toString()}`}}}makeCommit(t){return{data:t,prev:this.tip,id:this.id.cid}}makeReadOnly(){this.setDidProof=Yy,this.setDid=Yy,this.sync=Yy,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}},"Caip10Link2"),"Caip10Link");Fu.STREAM_TYPE_NAME="caip10-link";Fu.STREAM_TYPE_ID=1;Fu=fc=sH([tk()],Fu);js();Ju();var oH=rr(F$(),1),cH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate5"),Bs,uH={sync:Yn.PREFER_CACHE};async function Kb(e){if(e.did==null)throw new Error("No DID provided");e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`))}i(Kb,"_ensureAuthenticated");a(Kb,"_ensureAuthenticated");async function ik(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(ik,"throwReadOnlyError3");a(ik,"throwReadOnlyError");var _c=Bs=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){return{controller:this.state$.value.metadata.controllers[0],model:Bs.MODEL}}static async create(t,r,n){Bs.assertComplete(r);let s={publish:!0,anchor:!0,pin:!0,sync:Yn.NEVER_SYNC,throwOnInvalidCommit:!0},o=await Bs._makeGenesis(t,r,n);return await t.createStreamFromGenesis(Bs.STREAM_TYPE_ID,o,s)}static assertComplete(t,r){if(!t.name)throw r?new Error(`Model with StreamID ${r.toString()} is missing a 'name' field`):new Error("Model is missing a 'name' field");if(!t.schema)throw r?new Error(`Model ${t.name} (${r.toString()}) is missing a 'schema' field`):new Error(`Model ${t.name} is missing a 'schema' field`);if(!t.accountRelation)throw r?new Error(`Model ${t.name} (${r.toString()}) is missing a 'accountRelation' field`):new Error(`Model ${t.name} is missing a 'accountRelation' field`)}static async load(t,r,n={}){n={...uH,...n};let s=mo.from(r);if(s.type!=Bs.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${Bs.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return await t.loadStream(s,n)}static async _makeGenesis(t,r,n){let s=await this._makeRawGenesis(t,r,n);return Bs._signDagJWS(t,s)}static async _makeRawGenesis(t,r,n){if(r==null)throw new Error("Genesis content cannot be null");if(!n||!n.controller)if(t.did)await Kb(t),n={controller:t.did.hasParent?t.did.parent:t.did.id};else throw new Error("No controller specified");let s={controllers:[n.controller],model:Bs.MODEL.bytes};return{data:r,header:s}}makeReadOnly(){this.sync=ik,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}static async _signDagJWS(t,r){return await Kb(t),t.did.createDagJWS(r)}},"Model2"),"Model");_c.STREAM_TYPE_NAME="model";_c.STREAM_TYPE_ID=2;_c.MODEL=function(){let e=Cm("model-v1"),t=oH.default.encode(e,"identity"),r=Nu(B0,t),n=jt.createV1(B0,r);return new Xt("UNLOADABLE",n)}();_c=Bs=cH([zm()],_c);var lH=rr(Qu(),1),fH=i(function(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var f=e.length-1;f>=0;f--)(c=e[f])&&(o=(s<3?c(o):s>3?c(t,r,o):c(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o},"__decorate6"),ns,dH={anchor:!0,publish:!0,pin:!0,sync:Yn.NEVER_SYNC,syncTimeoutSeconds:0},hH={anchor:!1,publish:!1,pin:!0,sync:Yn.PREFER_CACHE},pH={sync:Yn.PREFER_CACHE},$A={anchor:!0,publish:!0,throwOnInvalidCommit:!0};async function Vb(e){if(e.did==null)throw new Error("No DID provided");e.did.authenticated||(await e.did.authenticate(),e.loggerProvider&&e.loggerProvider.getDiagnosticsLogger().imp(`Now authenticated as DID ${e.did.id}`))}i(Vb,"_ensureAuthenticated2");a(Vb,"_ensureAuthenticated");async function T0(){throw new Error("Historical stream commits cannot be modified. Load the stream without specifying a commit to make updates.")}i(T0,"throwReadOnlyError4");a(T0,"throwReadOnlyError");var Uu=ns=a(i(class extends jm{constructor(){super(...arguments),this._isReadOnly=!1}get content(){return super.content}get metadata(){let t=this.state$.value.metadata;return{controller:t.controllers[0],model:t.model}}static async create(t,r,n,s={}){s={...dH,...s};let o=s.asDID?{did:s.asDID}:t,c=await ns._makeGenesis(o,r,n);return t.createStreamFromGenesis(ns.STREAM_TYPE_ID,c,s)}static async single(t,r,n={}){n={...hH,...n};let s=n.asDID?{did:n.asDID}:t;r={...r,deterministic:!0};let o=await ns._makeGenesis(s,null,r);return t.createStreamFromGenesis(ns.STREAM_TYPE_ID,o,n)}static async load(t,r,n={}){n={...pH,...n};let s=mo.from(r);if(s.type!=ns.STREAM_TYPE_ID)throw new Error(`StreamID ${s.toString()} does not refer to a '${ns.STREAM_TYPE_NAME}' stream, but to a ${s.typeName}`);return t.loadStream(s,n)}async replace(t,r={}){r={...$A,...r};let n=r.asDID?{did:r.asDID}:this.api,s=await this._makeCommit(n,t),o=await this.api.applyCommit(this.id,s,r);this.state$.next(o.state)}async patch(t,r={}){r={...$A,...r};let n={data:t,prev:this.tip,id:this.id.cid},s=await ns._signDagJWS(this.api,n),o=await this.api.applyCommit(this.id,s,r);this.state$.next(o.state)}makeReadOnly(){this.replace=T0,this.patch=T0,this.sync=T0,this._isReadOnly=!0}get isReadOnly(){return this._isReadOnly}_makeCommit(t,r){let n=this._makeRawCommit(r);return ns._signDagJWS(t,n)}_makeRawCommit(t){return{data:NC.compare(this.content,t||{}),prev:this.tip,id:this.state.log[0].cid}}static async _makeGenesis(t,r,n){let s=await this._makeRawGenesis(t,r,n);return n.deterministic?(Cm(s),s):ns._signDagJWS(t,s)}static async _makeRawGenesis(t,r,n){if(!n.model)throw new Error("Must specify a 'model' when creating a ModelInstanceDocument");let s=n.controller;if(!s)if(t.did)await Vb(t),s=t.did.hasParent?t.did.parent:t.did.id;else throw new Error("No controller specified");let o={controllers:[s],model:n.model.bytes};return n.deterministic||(o.unique=(0,lH.randomBytes)(12)),{data:r,header:o}}static async _signDagJWS(t,r){return await Vb(t),t.did.createDagJWS(r)}},"ModelInstanceDocument2"),"ModelInstanceDocument");Uu.STREAM_TYPE_NAME="MID";Uu.STREAM_TYPE_ID=3;Uu=ns=fH([zm()],Uu);var sk=i(class{constructor(e){this._apiUrl=e}async add(e,t){let r={};t&&(r.force=!0);let n=new URL(`./pins/${e}`,this._apiUrl);await gi(n,{method:"post",body:r})}async rm(e,t){let r=new URL(`./pins/${e}`,this._apiUrl);await gi(r,{method:"delete",body:{opts:t}})}async ls(e){let t=new URL("./pins",this._apiUrl);e&&(t=new URL(`./pins/${e.toString()}`,this._apiUrl));let r=await gi(t),{pinnedStreamIds:n}=r;return{[Symbol.asyncIterator](){let s=0;return{next(){return s===n.length?Promise.resolve({value:null,done:!0}):Promise.resolve({value:n[s++],done:!1})}}}}}},"RemotePinApi");a(sk,"RemotePinApi");var ak=i(class{constructor(e){this._fetchJson=gi,this._collectionURL=new URL("./collection",e),this._countURL=new URL("./collection/count",e)}async count(e){return(await this._fetchJson(this._countURL,{method:"POST",body:Hb(e)})).count}async query(e){let t=await this._fetchJson(this._collectionURL,{method:"POST",body:Hb(e)});return{edges:t.edges.map(n=>({cursor:n.cursor,node:jr.deserializeState(n.node)})),pageInfo:t.pageInfo}}},"RemoteIndexApi");a(ak,"RemoteIndexApi");var ok=i(class{constructor(e,t){this._apiUrl=e,this._getDidFn=t,this._fetchJson=gi,this.modelsPath="./admin/models",this.getCodePath="./admin/getCode"}getCodeUrl(){return new URL(this.getCodePath,this._apiUrl)}getModelsUrl(){return new URL(this.modelsPath,this._apiUrl)}async buildJWS(e,t,r){let n=r?{models:r.map(o=>o.toString())}:void 0,s=await e.createJWS({code:t,requestPath:this.getModelsUrl().pathname,requestBody:n});return`${s.signatures[0].protected}.${s.payload}.${s.signatures[0].signature}`}async generateCode(){return(await this._fetchJson(this.getCodeUrl())).code}async startIndexingModels(e){let t=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"post",body:{jws:await this.buildJWS(this._getDidFn(),t,e)}})}async getIndexedModels(){let e=await this.generateCode();return(await this._fetchJson(this.getModelsUrl(),{headers:{Authorization:`Basic ${await this.buildJWS(this._getDidFn(),e)}`}})).models.map(r=>Xt.fromString(r))}async stopIndexingModels(e){let t=await this.generateCode();await this._fetchJson(this.getModelsUrl(),{method:"delete",body:{jws:await this.buildJWS(this._getDidFn(),t,e)}})}},"RemoteAdminApi");a(ok,"RemoteAdminApi");var mH="/api/v0/",vH="http://localhost:7007",gH={syncInterval:5e3},yH={anchor:!0,publish:!0,sync:Yn.PREFER_CACHE},bH={anchor:!0,publish:!0,sync:Yn.PREFER_CACHE},jA={sync:Yn.PREFER_CACHE},wH=i(class{constructor(e=vH,t={}){this._config={...gH,...t},this._apiUrl=new URL(mH,e),this._streamCache=new Map,this.context={api:this},this.pin=new sk(this._apiUrl),this.index=new ak(this._apiUrl);let r=(()=>this.did).bind(this);this.admin=new ok(this._apiUrl,r),this._streamConstructors={[Fu.STREAM_TYPE_ID]:Fu,[_c.STREAM_TYPE_ID]:_c,[Uu.STREAM_TYPE_ID]:Uu,[Aa.STREAM_TYPE_ID]:Aa}}get did(){return this.context.did}set did(e){this.context.did=e}async createStreamFromGenesis(e,t,r={}){r={...bH,...r};let n=await ji.createFromGenesis(this._apiUrl,e,t,r,this._config.syncInterval),s=this._streamCache.get(n.id.toString());return s?(jr.statesEqual(n.state,s.state)||s.next(n.state),this.buildStreamFromDocument(s)):(this._streamCache.set(n.id.toString(),n),this.buildStreamFromDocument(n))}async loadStream(e,t={}){t={...jA,...t};let r=mo.from(e),n=this._streamCache.get(r.baseID.toString());return n?await n._syncState(r,t):(n=await ji.load(r,this._apiUrl,this._config.syncInterval,t),this._streamCache.set(n.id.toString(),n)),this.buildStreamFromDocument(n)}async multiQuery(e,t){let r=e.map(o=>({...o,streamId:typeof o.streamId=="string"?o.streamId:o.streamId.toString()})),n=new URL("./multiqueries",this._apiUrl),s=await gi(n,{method:"post",body:{queries:r,timeout:t}});return Object.entries(s).reduce((o,c)=>{let[f,h]=c,p=jr.deserializeState(h),v=new ji(p,this._apiUrl,this._config.syncInterval);return o[f]=this.buildStreamFromDocument(v),o},{})}loadStreamCommits(e){let t=zb(e);return ji.loadStreamCommits(t,this._apiUrl)}async applyCommit(e,t,r={}){r={...yH,...r};let n=zb(e),s=await ji.applyCommit(this._apiUrl,n,t,r,this._config.syncInterval),o=this._streamCache.get(n.toString());return o?(o.next(s.state),this.buildStreamFromDocument(s)):(this._streamCache.set(n.toString(),s),this.buildStreamFromDocument(s))}async requestAnchor(e,t={}){t={...jA,...t};let{anchorStatus:r}=await gi(`${this._apiUrl}/streams/${e.toString()}/anchor`,{method:"post",body:{opts:t}});return r}addStreamHandler(e){this._streamConstructors[e.name]=e.stream_constructor}buildStreamFromState(e){let t=new ji(e,this._apiUrl,this._config.syncInterval);return this.buildStreamFromDocument(t)}buildStreamFromDocument(e){let t=e.state.type,r=this._streamConstructors[t];if(!r)throw new Error(`Failed to find constructor for stream ${t}`);return new r(e,this.context)}async setDID(e){this.context.did=e}async getSupportedChains(){if(this._supportedChains)return this._supportedChains;let{supportedChains:e}=await gi(this._apiUrl+"/node/chains");return this._supportedChains=e,e}async close(){Array.from(this._streamCache).map(([,e])=>{e.complete()}),this._streamCache.clear()}},"CeramicClient");a(wH,"CeramicClient");var ir;(function(e){e.assertEqual=s=>s;function t(s){}i(t,"assertIs"),a(t,"assertIs"),e.assertIs=t;function r(s){throw new Error}i(r,"assertNever"),a(r,"assertNever"),e.assertNever=r,e.arrayToEnum=s=>{let o={};for(let c of s)o[c]=c;return o},e.getValidEnumValues=s=>{let o=e.objectKeys(s).filter(f=>typeof s[s[f]]!="number"),c={};for(let f of o)c[f]=s[f];return e.objectValues(c)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let o=[];for(let c in s)Object.prototype.hasOwnProperty.call(s,c)&&o.push(c);return o},e.find=(s,o)=>{for(let c of s)if(o(c))return c},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,o=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(o)}i(n,"joinValues"),a(n,"joinValues"),e.joinValues=n,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(ir||(ir={}));var tt=ir.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),oo=a(e=>{switch(typeof e){case"undefined":return tt.undefined;case"string":return tt.string;case"number":return isNaN(e)?tt.nan:tt.number;case"boolean":return tt.boolean;case"function":return tt.function;case"bigint":return tt.bigint;case"symbol":return tt.symbol;case"object":return Array.isArray(e)?tt.array:e===null?tt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?tt.promise:typeof Map<"u"&&e instanceof Map?tt.map:typeof Set<"u"&&e instanceof Set?tt.set:typeof Date<"u"&&e instanceof Date?tt.date:tt.object;default:return tt.unknown}},"getParsedType"),Ve=ir.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"]),_H=a(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),Ls=i(class extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(s){return s.message},r={_errors:[]},n=a(s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let c=r,f=0;for(;f<o.path.length;){let h=o.path[f];f===o.path.length-1?(c[h]=c[h]||{_errors:[]},c[h]._errors.push(t(o))):c[h]=c[h]||{_errors:[]},c=c[h],f++}}},"processError");return n(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ir.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}},"ZodError");a(Ls,"ZodError");Ls.create=e=>new Ls(e);var ed=a((e,t)=>{let r;switch(e.code){case Ve.invalid_type:e.received===tt.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ir.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${ir.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:r="Invalid input";break;case Ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ir.joinValues(e.options)}`;break;case Ve.invalid_enum_value:r=`Invalid enum value. Expected ${ir.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:r="Invalid function arguments";break;case Ve.invalid_return_type:r="Invalid function return type";break;case Ve.invalid_date:r="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"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}"`:ir.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ve.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==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:r="Invalid input";break;case Ve.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==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:r="Invalid input";break;case Ve.custom:r="Invalid input";break;case Ve.invalid_intersection_types:r="Intersection results could not be merged";break;case Ve.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:r="Number must be finite";break;default:r=t.defaultError,ir.assertNever(e)}return{message:r}},"errorMap"),ck=ed;function uk(e){ck=e}i(uk,"setErrorMap");a(uk,"setErrorMap");function td(){return ck}i(td,"getErrorMap");a(td,"getErrorMap");var Q0=a(e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],c={...s,path:o},f="",h=n.filter(p=>!!p).slice().reverse();for(let p of h)f=p(c,{data:t,defaultError:f}).message;return{...s,path:o,message:s.message||f}},"makeIssue"),EH=[];function vt(e,t){let r=Q0({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,td(),ed].filter(n=>!!n)});e.common.issues.push(r)}i(vt,"addIssueToContext");a(vt,"addIssueToContext");var Nn=i(class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if(n.status==="aborted")return Dt;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let n of t)r.push({key:await n.key,value:await n.value});return Nn.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Dt;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),(typeof o.value<"u"||n.alwaysSet)&&(r[s.value]=o.value)}return{status:e.value,value:r}}},"ParseStatus");a(Nn,"ParseStatus");var Dt=Object.freeze({status:"aborted"}),lk=a(e=>({status:"dirty",value:e}),"DIRTY"),An=a(e=>({status:"valid",value:e}),"OK"),Gb=a(e=>e.status==="aborted","isAborted"),Wb=a(e=>e.status==="dirty","isDirty"),em=a(e=>e.status==="valid","isValid"),tm=a(e=>typeof Promise!==void 0&&e instanceof Promise,"isAsync"),Zt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Zt||(Zt={}));var hs=i(class{constructor(e,t,r,n){this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._path.concat(this._key)}},"ParseInputLazyPath");a(hs,"ParseInputLazyPath");var zA=a((e,t)=>{if(em(t))return{success:!0,data:t.value};{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new Ls(e.common.issues);return{success:!1,error:r}}},"handleResult");function zt(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:s}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:a((c,f)=>c.code!=="invalid_type"?{message:f.defaultError}:typeof f.data>"u"?{message:n??f.defaultError}:{message:r??f.defaultError},"customMap"),description:s}}i(zt,"processCreateParams");a(zt,"processCreateParams");var $t=i(class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return oo(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nn,ctx:{common:e.parent.common,data:e.data,parsedType:oo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(tm(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:(r=t?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},s=this._parseSync({data:e,path:n.path,parent:n});return zA(n,s)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:oo(e)},n=this._parse({data:e,path:r.path,parent:r}),s=await(tm(n)?n:Promise.resolve(n));return zA(r,s)}refine(e,t){let r=a(n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t,"getIssueProperties");return this._refinement((n,s)=>{let o=e(n),c=a(()=>s.addIssue({code:Ve.custom,...r(n)}),"setError");return typeof Promise<"u"&&o instanceof Promise?o.then(f=>f?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new Hi({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return fs.create(this)}nullable(){return yo.create(this)}nullish(){return this.optional().nullable()}array(){return ls.create(this)}promise(){return xc.create(this)}or(e){return qu.create([this,e])}and(e){return Ku.create(this,e)}transform(e){return new Hi({schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new Zu({innerType:this,defaultValue:t,typeName:Tt.ZodDefault})}brand(){return new S6({typeName:Tt.ZodBranded,type:this,...zt(void 0)})}catch(e){let t=typeof e=="function"?e:()=>e;return new ad({innerType:this,defaultValue:t,typeName:Tt.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return xd.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},"ZodType");a($t,"ZodType");var AH=/^c[^\s-]{8,}$/i,SH=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,xH=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,TH=a(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}:\\d{2})|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),Sa=i(class extends $t{constructor(){super(...arguments),this._regex=(e,t,r)=>this.refinement(n=>e.test(n),{validation:t,code:Ve.invalid_string,...Zt.errToObj(r)}),this.nonempty=e=>this.min(1,Zt.errToObj(e)),this.trim=()=>new Sa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==tt.string){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.string,received:s.parsedType}),Dt}let r=new Nn,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){let o=e.data.length>s.value,c=e.data.length<s.value;(o||c)&&(n=this._getOrReturnCtx(e,n),o?vt(n,{code:Ve.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&vt(n,{code:Ve.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")xH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"email",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")SH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"uuid",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")AH.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"cuid",code:Ve.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),vt(n,{validation:"url",code:Ve.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"regex",code:Ve.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="startsWith"?e.data.startsWith(s.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?TH(s).test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.invalid_string,validation:"datetime",message:s.message}),r.dirty()):ir.assertNever(s);return{status:r.value,value:e.data}}_addCheck(e){return new Sa({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Zt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Zt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Zt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Zt.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,...Zt.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Zt.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Zt.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Zt.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Zt.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Zt.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Zt.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}},"ZodString");a(Sa,"ZodString");Sa.create=e=>{var t;return new Sa({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...zt(e)})};function fk(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),c=parseInt(t.toFixed(s).replace(".",""));return o%c/Math.pow(10,s)}i(fk,"floatSafeRemainder");a(fk,"floatSafeRemainder");var go=i(class extends $t{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==tt.number){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.number,received:s.parsedType}),Dt}let r,n=new Nn;for(let s of this._def.checks)s.kind==="int"?ir.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),n.dirty()):s.kind==="multipleOf"?fk(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),vt(r,{code:Ve.not_finite,message:s.message}),n.dirty()):ir.assertNever(s);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Zt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Zt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Zt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Zt.toString(t))}setLimit(e,t,r,n){return new go({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:Zt.toString(n)}]})}_addCheck(e){return new go({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Zt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Zt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Zt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Zt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Zt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Zt.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Zt.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}},"ZodNumber");a(go,"ZodNumber");go.create=e=>new go({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...zt(e)});var $u=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==tt.bigint){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.bigint,received:r.parsedType}),Dt}return An(e.data)}},"ZodBigInt");a($u,"ZodBigInt");$u.create=e=>{var t;return new $u({typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...zt(e)})};var ju=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==tt.boolean){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.boolean,received:r.parsedType}),Dt}return An(e.data)}},"ZodBoolean");a(ju,"ZodBoolean");ju.create=e=>new ju({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...zt(e)});var Ec=i(class extends $t{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==tt.date){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_type,expected:tt.date,received:s.parsedType}),Dt}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return vt(s,{code:Ve.invalid_date}),Dt}let r=new Nn,n;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:Ve.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ir.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ec({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Zt.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Zt.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}},"ZodDate");a(Ec,"ZodDate");Ec.create=e=>new Ec({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...zt(e)});var rd=i(class extends $t{_parse(e){if(this._getType(e)!==tt.symbol){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.symbol,received:r.parsedType}),Dt}return An(e.data)}},"ZodSymbol");a(rd,"ZodSymbol");rd.create=e=>new rd({typeName:Tt.ZodSymbol,...zt(e)});var zu=i(class extends $t{_parse(e){if(this._getType(e)!==tt.undefined){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.undefined,received:r.parsedType}),Dt}return An(e.data)}},"ZodUndefined");a(zu,"ZodUndefined");zu.create=e=>new zu({typeName:Tt.ZodUndefined,...zt(e)});var Hu=i(class extends $t{_parse(e){if(this._getType(e)!==tt.null){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.null,received:r.parsedType}),Dt}return An(e.data)}},"ZodNull");a(Hu,"ZodNull");Hu.create=e=>new Hu({typeName:Tt.ZodNull,...zt(e)});var Ac=i(class extends $t{constructor(){super(...arguments),this._any=!0}_parse(e){return An(e.data)}},"ZodAny");a(Ac,"ZodAny");Ac.create=e=>new Ac({typeName:Tt.ZodAny,...zt(e)});var uo=i(class extends $t{constructor(){super(...arguments),this._unknown=!0}_parse(e){return An(e.data)}},"ZodUnknown");a(uo,"ZodUnknown");uo.create=e=>new uo({typeName:Tt.ZodUnknown,...zt(e)});var Fs=i(class extends $t{_parse(e){let t=this._getOrReturnCtx(e);return vt(t,{code:Ve.invalid_type,expected:tt.never,received:t.parsedType}),Dt}},"ZodNever");a(Fs,"ZodNever");Fs.create=e=>new Fs({typeName:Tt.ZodNever,...zt(e)});var nd=i(class extends $t{_parse(e){if(this._getType(e)!==tt.undefined){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.void,received:r.parsedType}),Dt}return An(e.data)}},"ZodVoid");a(nd,"ZodVoid");nd.create=e=>new nd({typeName:Tt.ZodVoid,...zt(e)});var ls=i(class extends $t{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==tt.array)return vt(t,{code:Ve.invalid_type,expected:tt.array,received:t.parsedType}),Dt;if(n.exactLength!==null){let o=t.data.length>n.exactLength.value,c=t.data.length<n.exactLength.value;(o||c)&&(vt(t,{code:o?Ve.too_big:Ve.too_small,minimum:c?n.exactLength.value:void 0,maximum:o?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(vt(t,{code:Ve.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(vt(t,{code:Ve.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all(t.data.map((o,c)=>n.type._parseAsync(new hs(t,o,t.path,c)))).then(o=>Nn.mergeArray(r,o));let s=t.data.map((o,c)=>n.type._parseSync(new hs(t,o,t.path,c)));return Nn.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new ls({...this._def,minLength:{value:e,message:Zt.toString(t)}})}max(e,t){return new ls({...this._def,maxLength:{value:e,message:Zt.toString(t)}})}length(e,t){return new ls({...this._def,exactLength:{value:e,message:Zt.toString(t)}})}nonempty(e){return this.min(1,e)}},"ZodArray");a(ls,"ZodArray");ls.create=(e,t)=>new ls({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...zt(t)});var rm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(rm||(rm={}));var HA=a(e=>t=>new Ir({...e,shape:()=>({...e.shape(),...t})}),"AugmentFactory");function dc(e){if(e instanceof Ir){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=fs.create(dc(n))}return new Ir({...e._def,shape:()=>t})}else return e instanceof ls?ls.create(dc(e.element)):e instanceof fs?fs.create(dc(e.unwrap())):e instanceof yo?yo.create(dc(e.unwrap())):e instanceof Us?Us.create(e.items.map(t=>dc(t))):e}i(dc,"deepPartialify");a(dc,"deepPartialify");var Ir=i(class extends $t{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=HA(this._def),this.extend=HA(this._def)}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=ir.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==tt.object){let h=this._getOrReturnCtx(e);return vt(h,{code:Ve.invalid_type,expected:tt.object,received:h.parsedType}),Dt}let{status:r,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof Fs&&this._def.unknownKeys==="strip"))for(let h in n.data)o.includes(h)||c.push(h);let f=[];for(let h of o){let p=s[h],v=n.data[h];f.push({key:{status:"valid",value:h},value:p._parse(new hs(n,v,n.path,h)),alwaysSet:h in n.data})}if(this._def.catchall instanceof Fs){let h=this._def.unknownKeys;if(h==="passthrough")for(let p of c)f.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(h==="strict")c.length>0&&(vt(n,{code:Ve.unrecognized_keys,keys:c}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let h=this._def.catchall;for(let p of c){let v=n.data[p];f.push({key:{status:"valid",value:p},value:h._parse(new hs(n,v,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let h=[];for(let p of f){let v=await p.key;h.push({key:v,value:await p.value,alwaysSet:p.alwaysSet})}return h}).then(h=>Nn.mergeObjectSync(r,h)):Nn.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return Zt.errToObj,new Ir({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,s,o,c;let f=(o=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,t,r).message)!==null&&o!==void 0?o:r.defaultError;return t.code==="unrecognized_keys"?{message:(c=Zt.errToObj(e).message)!==null&&c!==void 0?c:f}:{message:f}}}:{}})}strip(){return new Ir({...this._def,unknownKeys:"strip"})}passthrough(){return new Ir({...this._def,unknownKeys:"passthrough"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new Ir({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>rm.mergeShapes(this._def.shape(),e._def.shape()),typeName:Tt.ZodObject})}catchall(e){return new Ir({...this._def,catchall:e})}pick(e){let t={};return ir.objectKeys(e).map(r=>{this.shape[r]&&(t[r]=this.shape[r])}),new Ir({...this._def,shape:()=>t})}omit(e){let t={};return ir.objectKeys(this.shape).map(r=>{ir.objectKeys(e).indexOf(r)===-1&&(t[r]=this.shape[r])}),new Ir({...this._def,shape:()=>t})}deepPartial(){return dc(this)}partial(e){let t={};if(e)return ir.objectKeys(this.shape).map(r=>{ir.objectKeys(e).indexOf(r)===-1?t[r]=this.shape[r]:t[r]=this.shape[r].optional()}),new Ir({...this._def,shape:()=>t});for(let r in this.shape){let n=this.shape[r];t[r]=n.optional()}return new Ir({...this._def,shape:()=>t})}required(e){let t={};if(e)ir.objectKeys(this.shape).map(r=>{if(ir.objectKeys(e).indexOf(r)===-1)t[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof fs;)s=s._def.innerType;t[r]=s}});else for(let r in this.shape){let s=this.shape[r];for(;s instanceof fs;)s=s._def.innerType;t[r]=s}return new Ir({...this._def,shape:()=>t})}keyof(){return A6(ir.objectKeys(this.shape))}},"ZodObject");a(Ir,"ZodObject");Ir.create=(e,t)=>new Ir({shape:()=>e,unknownKeys:"strip",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});Ir.strictCreate=(e,t)=>new Ir({shape:()=>e,unknownKeys:"strict",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});Ir.lazycreate=(e,t)=>new Ir({shape:e,unknownKeys:"strip",catchall:Fs.create(),typeName:Tt.ZodObject,...zt(t)});var qu=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;function n(s){for(let c of s)if(c.result.status==="valid")return c.result;for(let c of s)if(c.result.status==="dirty")return t.common.issues.push(...c.ctx.common.issues),c.result;let o=s.map(c=>new Ls(c.ctx.common.issues));return vt(t,{code:Ve.invalid_union,unionErrors:o}),Dt}if(i(n,"handleResults"),a(n,"handleResults"),t.common.async)return Promise.all(r.map(async s=>{let o={...t,common:{...t.common,issues:[]},parent:null};return{result:await s._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let f of r){let h={...t,common:{...t.common,issues:[]},parent:null},p=f._parseSync({data:t.data,path:t.path,parent:h});if(p.status==="valid")return p;p.status==="dirty"&&!s&&(s={result:p,ctx:h}),h.common.issues.length&&o.push(h.common.issues)}if(s)return t.common.issues.push(...s.ctx.common.issues),s.result;let c=o.map(f=>new Ls(f));return vt(t,{code:Ve.invalid_union,unionErrors:c}),Dt}}get options(){return this._def.options}},"ZodUnion");a(qu,"ZodUnion");qu.create=(e,t)=>new qu({options:e,typeName:Tt.ZodUnion,...zt(t)});var M0=a(e=>e instanceof Vu?M0(e.schema):e instanceof Hi?M0(e.innerType()):e instanceof Gu?[e.value]:e instanceof fl?e.options:e instanceof Wu?Object.keys(e.enum):e instanceof Zu?M0(e._def.innerType):e instanceof zu?[void 0]:e instanceof Hu?[null]:null,"getDiscriminator"),Hm=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.object)return vt(t,{code:Ve.invalid_type,expected:tt.object,received:t.parsedType}),Dt;let r=this.discriminator,n=t.data[r],s=this.optionsMap.get(n);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(vt(t,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let s of t){let o=M0(s.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let c of o){if(n.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);n.set(c,s)}}return new Hm({typeName:Tt.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...zt(r)})}},"ZodDiscriminatedUnion");a(Hm,"ZodDiscriminatedUnion");function nm(e,t){let r=oo(e),n=oo(t);if(e===t)return{valid:!0,data:e};if(r===tt.object&&n===tt.object){let s=ir.objectKeys(t),o=ir.objectKeys(e).filter(f=>s.indexOf(f)!==-1),c={...e,...t};for(let f of o){let h=nm(e[f],t[f]);if(!h.valid)return{valid:!1};c[f]=h.data}return{valid:!0,data:c}}else if(r===tt.array&&n===tt.array){if(e.length!==t.length)return{valid:!1};let s=[];for(let o=0;o<e.length;o++){let c=e[o],f=t[o],h=nm(c,f);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return r===tt.date&&n===tt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}i(nm,"mergeValues");a(nm,"mergeValues");var Ku=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=a((s,o)=>{if(Gb(s)||Gb(o))return Dt;let c=nm(s.value,o.value);return c.valid?((Wb(s)||Wb(o))&&t.dirty(),{status:t.value,value:c.data}):(vt(r,{code:Ve.invalid_intersection_types}),Dt)},"handleParsed");return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}},"ZodIntersection");a(Ku,"ZodIntersection");Ku.create=(e,t,r)=>new Ku({left:e,right:t,typeName:Tt.ZodIntersection,...zt(r)});var Us=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.array)return vt(r,{code:Ve.invalid_type,expected:tt.array,received:r.parsedType}),Dt;if(r.data.length<this._def.items.length)return vt(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Dt;!this._def.rest&&r.data.length>this._def.items.length&&(vt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=r.data.map((o,c)=>{let f=this._def.items[c]||this._def.rest;return f?f._parse(new hs(r,o,r.path,c)):null}).filter(o=>!!o);return r.common.async?Promise.all(s).then(o=>Nn.mergeArray(t,o)):Nn.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new Us({...this._def,rest:e})}},"ZodTuple");a(Us,"ZodTuple");Us.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Us({items:e,typeName:Tt.ZodTuple,rest:null,...zt(t)})};var id=i(class extends $t{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.object)return vt(r,{code:Ve.invalid_type,expected:tt.object,received:r.parsedType}),Dt;let n=[],s=this._def.keyType,o=this._def.valueType;for(let c in r.data)n.push({key:s._parse(new hs(r,c,r.path,c)),value:o._parse(new hs(r,r.data[c],r.path,c))});return r.common.async?Nn.mergeObjectAsync(t,n):Nn.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof $t?new id({keyType:e,valueType:t,typeName:Tt.ZodRecord,...zt(r)}):new id({keyType:Sa.create(),valueType:e,typeName:Tt.ZodRecord,...zt(t)})}},"ZodRecord");a(id,"ZodRecord");var sd=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.map)return vt(r,{code:Ve.invalid_type,expected:tt.map,received:r.parsedType}),Dt;let n=this._def.keyType,s=this._def.valueType,o=[...r.data.entries()].map(([c,f],h)=>({key:n._parse(new hs(r,c,r.path,[h,"key"])),value:s._parse(new hs(r,f,r.path,[h,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let f of o){let h=await f.key,p=await f.value;if(h.status==="aborted"||p.status==="aborted")return Dt;(h.status==="dirty"||p.status==="dirty")&&t.dirty(),c.set(h.value,p.value)}return{status:t.value,value:c}})}else{let c=new Map;for(let f of o){let h=f.key,p=f.value;if(h.status==="aborted"||p.status==="aborted")return Dt;(h.status==="dirty"||p.status==="dirty")&&t.dirty(),c.set(h.value,p.value)}return{status:t.value,value:c}}}},"ZodMap");a(sd,"ZodMap");sd.create=(e,t,r)=>new sd({valueType:t,keyType:e,typeName:Tt.ZodMap,...zt(r)});var Sc=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==tt.set)return vt(r,{code:Ve.invalid_type,expected:tt.set,received:r.parsedType}),Dt;let n=this._def;n.minSize!==null&&r.data.size<n.minSize.value&&(vt(r,{code:Ve.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&r.data.size>n.maxSize.value&&(vt(r,{code:Ve.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let s=this._def.valueType;function o(f){let h=new Set;for(let p of f){if(p.status==="aborted")return Dt;p.status==="dirty"&&t.dirty(),h.add(p.value)}return{status:t.value,value:h}}i(o,"finalizeSet"),a(o,"finalizeSet");let c=[...r.data.values()].map((f,h)=>s._parse(new hs(r,f,r.path,h)));return r.common.async?Promise.all(c).then(f=>o(f)):o(c)}min(e,t){return new Sc({...this._def,minSize:{value:e,message:Zt.toString(t)}})}max(e,t){return new Sc({...this._def,maxSize:{value:e,message:Zt.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},"ZodSet");a(Sc,"ZodSet");Sc.create=(e,t)=>new Sc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...zt(t)});var Du=i(class extends $t{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.function)return vt(t,{code:Ve.invalid_type,expected:tt.function,received:t.parsedType}),Dt;function r(c,f){return Q0({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,td(),ed].filter(h=>!!h),issueData:{code:Ve.invalid_arguments,argumentsError:f}})}i(r,"makeArgsIssue"),a(r,"makeArgsIssue");function n(c,f){return Q0({data:c,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,td(),ed].filter(h=>!!h),issueData:{code:Ve.invalid_return_type,returnTypeError:f}})}i(n,"makeReturnsIssue"),a(n,"makeReturnsIssue");let s={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof xc?An(async(...c)=>{let f=new Ls([]),h=await this._def.args.parseAsync(c,s).catch(b=>{throw f.addIssue(r(c,b)),f}),p=await o(...h);return await this._def.returns._def.type.parseAsync(p,s).catch(b=>{throw f.addIssue(n(p,b)),f})}):An((...c)=>{let f=this._def.args.safeParse(c,s);if(!f.success)throw new Ls([r(c,f.error)]);let h=o(...f.data),p=this._def.returns.safeParse(h,s);if(!p.success)throw new Ls([n(h,p.error)]);return p.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Du({...this._def,args:Us.create(e).rest(uo.create())})}returns(e){return new Du({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Du({args:e||Us.create([]).rest(uo.create()),returns:t||uo.create(),typeName:Tt.ZodFunction,...zt(r)})}},"ZodFunction");a(Du,"ZodFunction");var Vu=i(class extends $t{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},"ZodLazy");a(Vu,"ZodLazy");Vu.create=(e,t)=>new Vu({getter:e,typeName:Tt.ZodLazy,...zt(t)});var Gu=i(class extends $t{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return vt(t,{code:Ve.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:e.data}}get value(){return this._def.value}},"ZodLiteral");a(Gu,"ZodLiteral");Gu.create=(e,t)=>new Gu({value:e,typeName:Tt.ZodLiteral,...zt(t)});function A6(e,t){return new fl({values:e,typeName:Tt.ZodEnum,...zt(t)})}i(A6,"createZodEnum");a(A6,"createZodEnum");var fl=i(class extends $t{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),r=this._def.values;return vt(t,{expected:ir.joinValues(r),received:t.parsedType,code:Ve.invalid_type}),Dt}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),r=this._def.values;return vt(t,{received:t.data,code:Ve.invalid_enum_value,options:r}),Dt}return An(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}},"ZodEnum");a(fl,"ZodEnum");fl.create=A6;var Wu=i(class extends $t{_parse(e){let t=ir.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==tt.string&&r.parsedType!==tt.number){let n=ir.objectValues(t);return vt(r,{expected:ir.joinValues(n),received:r.parsedType,code:Ve.invalid_type}),Dt}if(t.indexOf(e.data)===-1){let n=ir.objectValues(t);return vt(r,{received:r.data,code:Ve.invalid_enum_value,options:n}),Dt}return An(e.data)}get enum(){return this._def.values}},"ZodNativeEnum");a(Wu,"ZodNativeEnum");Wu.create=(e,t)=>new Wu({values:e,typeName:Tt.ZodNativeEnum,...zt(t)});var xc=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tt.promise&&t.common.async===!1)return vt(t,{code:Ve.invalid_type,expected:tt.promise,received:t.parsedType}),Dt;let r=t.parsedType===tt.promise?t.data:Promise.resolve(t.data);return An(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}},"ZodPromise");a(xc,"ZodPromise");xc.create=(e,t)=>new xc({type:e,typeName:Tt.ZodPromise,...zt(t)});var Hi=i(class extends $t{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null;if(n.type==="preprocess"){let o=n.transform(r.data);return r.common.async?Promise.resolve(o).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}let s={addIssue:o=>{vt(r,o),o.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="refinement"){let o=a(c=>{let f=n.refinement(c,s);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c},"executeRefinement");if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?Dt:(c.status==="dirty"&&t.dirty(),o(c.value),{status:t.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?Dt:(c.status==="dirty"&&t.dirty(),o(c.value).then(()=>({status:t.value,value:c.value}))))}if(n.type==="transform")if(r.common.async===!1){let o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!em(o))return o;let c=n.transform(o.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>em(o)?Promise.resolve(n.transform(o.value,s)).then(c=>({status:t.value,value:c})):o);ir.assertNever(n)}},"ZodEffects");a(Hi,"ZodEffects");Hi.create=(e,t,r)=>new Hi({schema:e,typeName:Tt.ZodEffects,effect:t,...zt(r)});Hi.createWithPreprocess=(e,t,r)=>new Hi({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...zt(r)});var fs=i(class extends $t{_parse(e){return this._getType(e)===tt.undefined?An(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"ZodOptional");a(fs,"ZodOptional");fs.create=(e,t)=>new fs({innerType:e,typeName:Tt.ZodOptional,...zt(t)});var yo=i(class extends $t{_parse(e){return this._getType(e)===tt.null?An(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"ZodNullable");a(yo,"ZodNullable");yo.create=(e,t)=>new yo({innerType:e,typeName:Tt.ZodNullable,...zt(t)});var Zu=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===tt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},"ZodDefault");a(Zu,"ZodDefault");Zu.create=(e,t)=>new Zu({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...zt(t)});var ad=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.innerType._parse({data:t.data,path:t.path,parent:t});return tm(r)?r.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.defaultValue()})):{status:"valid",value:r.status==="valid"?r.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}},"ZodCatch");a(ad,"ZodCatch");ad.create=(e,t)=>new ad({innerType:e,typeName:Tt.ZodCatch,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...zt(t)});var od=i(class extends $t{_parse(e){if(this._getType(e)!==tt.nan){let r=this._getOrReturnCtx(e);return vt(r,{code:Ve.invalid_type,expected:tt.nan,received:r.parsedType}),Dt}return{status:"valid",value:e.data}}},"ZodNaN");a(od,"ZodNaN");od.create=e=>new od({typeName:Tt.ZodNaN,...zt(e)});var MH=Symbol("zod_brand"),S6=i(class extends $t{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},"ZodBranded");a(S6,"ZodBranded");var xd=i(class extends $t{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return a(async()=>{let s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"?(t.dirty(),lk(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})},"handleAsync")();{let n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?Dt:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new xd({in:e,out:t,typeName:Tt.ZodPipeline})}},"ZodPipeline");a(xd,"ZodPipeline");var dk=a((e,t={},r)=>e?Ac.create().superRefine((n,s)=>{if(!e(n)){let o=typeof t=="function"?t(n):t,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:r})}}):Ac.create(),"custom"),CH={object:Ir.lazycreate},Tt;(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"})(Tt||(Tt={}));var IH=a((e,t={message:`Input not instance of ${e.name}`})=>dk(r=>r instanceof e,t,!0),"instanceOfType"),hk=Sa.create,pk=go.create,kH=od.create,DH=$u.create,mk=ju.create,OH=Ec.create,RH=rd.create,NH=zu.create,PH=Hu.create,BH=Ac.create,LH=uo.create,FH=Fs.create,UH=nd.create,$H=ls.create,jH=Ir.create,zH=Ir.strictCreate,HH=qu.create,qH=Hm.create,KH=Ku.create,VH=Us.create,GH=id.create,WH=sd.create,ZH=Sc.create,JH=Du.create,YH=Vu.create,XH=Gu.create,QH=fl.create,eq=Wu.create,tq=xc.create,qA=Hi.create,rq=fs.create,nq=yo.create,iq=Hi.createWithPreprocess,sq=xd.create,aq=a(()=>hk().optional(),"ostring"),oq=a(()=>pk().optional(),"onumber"),cq=a(()=>mk().optional(),"oboolean"),uq={string:e=>Sa.create({...e,coerce:!0}),number:e=>go.create({...e,coerce:!0}),boolean:e=>ju.create({...e,coerce:!0}),bigint:e=>$u.create({...e,coerce:!0}),date:e=>Ec.create({...e,coerce:!0})},lq=Dt,ae=Object.freeze({__proto__:null,defaultErrorMap:ed,setErrorMap:uk,getErrorMap:td,makeIssue:Q0,EMPTY_PATH:EH,addIssueToContext:vt,ParseStatus:Nn,INVALID:Dt,DIRTY:lk,OK:An,isAborted:Gb,isDirty:Wb,isValid:em,isAsync:tm,get util(){return ir},ZodParsedType:tt,getParsedType:oo,ZodType:$t,ZodString:Sa,ZodNumber:go,ZodBigInt:$u,ZodBoolean:ju,ZodDate:Ec,ZodSymbol:rd,ZodUndefined:zu,ZodNull:Hu,ZodAny:Ac,ZodUnknown:uo,ZodNever:Fs,ZodVoid:nd,ZodArray:ls,get objectUtil(){return rm},ZodObject:Ir,ZodUnion:qu,ZodDiscriminatedUnion:Hm,ZodIntersection:Ku,ZodTuple:Us,ZodRecord:id,ZodMap:sd,ZodSet:Sc,ZodFunction:Du,ZodLazy:Vu,ZodLiteral:Gu,ZodEnum:fl,ZodNativeEnum:Wu,ZodPromise:xc,ZodEffects:Hi,ZodTransformer:Hi,ZodOptional:fs,ZodNullable:yo,ZodDefault:Zu,ZodCatch:ad,ZodNaN:od,BRAND:MH,ZodBranded:S6,ZodPipeline:xd,custom:dk,Schema:$t,ZodSchema:$t,late:CH,get ZodFirstPartyTypeKind(){return Tt},coerce:uq,any:BH,array:$H,bigint:DH,boolean:mk,date:OH,discriminatedUnion:qH,effect:qA,enum:QH,function:JH,instanceof:IH,intersection:KH,lazy:YH,literal:XH,map:WH,nan:kH,nativeEnum:eq,never:FH,null:PH,nullable:nq,number:pk,object:jH,oboolean:cq,onumber:oq,optional:rq,ostring:aq,pipeline:sq,preprocess:iq,promise:tq,record:GH,set:ZH,strictObject:zH,string:hk,symbol:RH,transformer:qA,tuple:VH,undefined:NH,union:HH,unknown:LH,void:UH,NEVER:lq,ZodIssueCode:Ve,quotelessJson:_H,ZodError:Ls}),vk=ae.array(ae.string().or(ae.record(ae.any()))),fJ=ae.object({type:ae.string().optional(),narrative:ae.string().optional()}),qm=ae.string().or(ae.object({id:ae.string(),type:ae.string(),caption:ae.string().optional()})),fq=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),latitude:ae.number(),longitude:ae.number()}),dq=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),addressCountry:ae.string().optional(),addressCountryCode:ae.string().optional(),addressRegion:ae.string().optional(),addressLocality:ae.string().optional(),streetAddress:ae.string().optional(),postOfficeBoxNumber:ae.string().optional(),postalCode:ae.string().optional(),geo:fq.optional()}),hq=ae.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(ae.string()),gk=ae.object({type:ae.string().min(1).or(ae.string().array().nonempty()),identifier:ae.string(),identifierType:hq}),cd=ae.string().or(ae.object({id:ae.string().optional(),type:ae.string().or(ae.string().array().nonempty().optional()),name:ae.string().optional(),url:ae.string().optional(),phone:ae.string().optional(),description:ae.string().optional(),endorsement:ae.any().array().optional(),image:qm.optional(),email:ae.string().email().optional(),address:dq.optional(),otherIdentifier:gk.array().optional(),official:ae.string().optional(),parentOrg:ae.any().optional(),familyName:ae.string().optional(),givenName:ae.string().optional(),additionalName:ae.string().optional(),patronymicName:ae.string().optional(),honorificPrefix:ae.string().optional(),honorificSuffix:ae.string().optional(),familyNamePrefix:ae.string().optional(),dateOfBirth:ae.string().optional()}).catchall(ae.any())),Zb=ae.object({id:ae.string().optional()}).catchall(ae.any()),pq=ae.object({type:ae.string(),id:ae.string()}).catchall(ae.any()),mq=ae.object({id:ae.string(),type:ae.string()}).catchall(ae.any()),vq=ae.object({id:ae.string(),type:ae.string()}).catchall(ae.any()),im=ae.object({"@context":vk,id:ae.string().optional(),type:ae.string().array().nonempty(),issuer:cd,issuanceDate:ae.string(),expirationDate:ae.string().optional(),credentialSubject:Zb.or(Zb.array()),credentialStatus:pq.optional(),credentialSchema:mq.array().optional(),refreshService:vq.optional()}).catchall(ae.any()),bo=ae.object({type:ae.string(),created:ae.string(),challenge:ae.string().optional(),domain:ae.string().optional(),nonce:ae.string().optional(),proofPurpose:ae.string(),verificationMethod:ae.string(),jws:ae.string().optional()}).catchall(ae.any()),KA=im.extend({proof:bo.or(bo.array())}),gq=ae.object({"@context":vk,id:ae.string().optional(),type:ae.string().or(ae.string().array().nonempty()),verifiableCredential:KA.or(KA.array()).optional(),holder:ae.string().optional()}).catchall(ae.any()),dJ=gq.extend({proof:bo.or(bo.array())}),yq=ae.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(ae.string()),Km=ae.object({type:ae.string().array().nonempty(),targetCode:ae.string().optional(),targetDescription:ae.string().optional(),targetName:ae.string(),targetFramework:ae.string().optional(),targetType:yq.optional(),targetUrl:ae.string()}),bq=ae.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),wq=bq.or(ae.string()),_q=ae.object({id:ae.string().optional(),narrative:ae.string().optional()}).catchall(ae.any()),Eq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),endorsementComment:ae.string().optional()}),Aq=im.extend({credentialSubject:Eq,proof:bo.or(bo.array()).optional()}),Sq=ae.object({id:ae.string(),"@language":ae.string().optional(),version:ae.string().optional()}),xq=ae.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(ae.string()),Tq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),description:ae.string().optional(),level:ae.string().optional(),name:ae.string(),points:ae.string().optional()}).catchall(ae.any()),Mq=ae.object({id:ae.string(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),allowedValue:ae.string().array().optional(),name:ae.string(),requiredLevel:ae.string().optional(),requiredValue:ae.string().optional(),resultType:xq,rubricCriterionLevel:Tq.array().optional(),valueMax:ae.string().optional(),valueMin:ae.string().optional()}).catchall(ae.any()),Cq=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),alignment:Km.array().optional(),achievementType:wq.optional(),creator:cd.optional(),creditsAvailable:ae.number().optional(),criteria:_q,description:ae.string(),endorsement:Aq.array().optional(),fieldOfStudy:ae.string().optional(),humanCode:ae.string().optional(),image:qm.optional(),"@language":ae.string().optional(),name:ae.string(),otherIdentifier:gk.array().optional(),related:Sq.array().optional(),resultDescription:Mq.array().optional(),specialization:ae.string().optional(),tag:ae.string().array().optional(),version:ae.string().optional()}).catchall(ae.any()),Iq=ae.object({type:ae.string(),hashed:ae.boolean(),identityHash:ae.string(),identityType:ae.string(),salt:ae.string().optional()}),kq=ae.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),Dq=ae.object({type:ae.string().array().nonempty(),achievedLevel:ae.string().optional(),alignment:Km.array().optional(),resultDescription:ae.string().optional(),status:kq.optional(),value:ae.string().optional()}).catchall(ae.any()),VA=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),activityEndDate:ae.string().optional(),activityStartDate:ae.string().optional(),creditsEarned:ae.number().optional(),achievement:Cq.optional(),identifier:Iq.array().optional(),image:qm.optional(),licenseNumber:ae.string().optional(),narrative:ae.string().optional(),result:Dq.array().optional(),role:ae.string().optional(),source:cd.optional(),term:ae.string().optional()}).catchall(ae.any()),Oq=ae.object({id:ae.string().optional(),type:ae.string().array().nonempty(),narrative:ae.string().optional(),name:ae.string().optional(),description:ae.string().optional(),genre:ae.string().optional(),audience:ae.string().optional()}).catchall(ae.any()),Rq=im.extend({name:ae.string().optional(),description:ae.string().optional(),image:qm.optional(),credentialSubject:VA.or(VA.array()),endorsement:im.array().optional(),evidence:Oq.array().optional()}),hJ=Rq.extend({proof:bo.or(bo.array())}),pJ=ae.object({checks:ae.string().array(),warnings:ae.string().array(),errors:ae.string().array()}),yk=ae.enum(["Success","Failed","Error"]),mJ=yk.enum,vJ=ae.object({check:ae.string(),status:yk,message:ae.string().optional(),details:ae.string().optional()}),gJ=ae.object({title:ae.string().optional(),createdAt:ae.string().optional(),issuer:cd.optional(),issuee:cd.optional(),credentialSubject:Zb.optional()}),yJ=ae.object({id:ae.string(),uri:ae.string()}).catchall(ae.any()),bJ=ae.object({limit:ae.number(),cursor:ae.string().optional()}),bk=ae.object({cursor:ae.string().optional(),hasMore:ae.boolean()}),Nq=ae.object({kty:ae.string(),crv:ae.string(),x:ae.string(),y:ae.string().optional(),n:ae.string().optional(),d:ae.string()}),Pq=ae.object({alg:ae.string(),iv:ae.string(),tag:ae.string(),epk:Nq.partial().optional(),kid:ae.string().optional(),apv:ae.string().optional(),apu:ae.string().optional()}),Bq=ae.object({header:Pq,encrypted_key:ae.string()}),Lq=ae.object({protected:ae.string(),iv:ae.string(),ciphertext:ae.string(),tag:ae.string(),aad:ae.string().optional(),recipients:Bq.array().optional()}),wk=ae.object({encryptedRecord:Lq,fields:ae.string().array()}).catchall(ae.any()),wJ=bk.extend({records:wk.array()}),Fq=wk.extend({id:ae.string()}),_J=bk.extend({records:Fq.array()}),Jb=ae.object({profileId:ae.string().min(3).max(40),displayName:ae.string().default(""),did:ae.string(),email:ae.string().optional(),image:ae.string().optional(),isServiceProfile:ae.boolean().default(!1).optional(),notificationsWebhook:ae.string().url().startsWith("https://").optional()}),EJ=ae.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),AJ=ae.object({uri:ae.string(),to:ae.string(),from:ae.string(),sent:ae.string().datetime(),received:ae.string().datetime().optional()}),Uq=ae.enum(["DRAFT","LIVE"]),SJ=ae.object({uri:ae.string(),name:ae.string().optional(),type:ae.string().optional(),category:ae.string().optional(),status:Uq.optional()}),xJ=ae.object({to:Jb,from:ae.string(),received:ae.string().optional()}),$q=ae.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),jq=ae.object({title:ae.string().optional(),body:ae.string().optional()}),zq=ae.object({vcUris:ae.array(ae.string()).optional(),vpUris:ae.array(ae.string()).optional()}),TJ=ae.object({type:$q,to:Jb.partial().and(ae.object({did:ae.string()})),from:Jb.partial().and(ae.object({did:ae.string()})),message:jq.optional(),data:zq.optional(),sent:ae.string().datetime().optional()}),MJ=ae.object({endpoint:ae.string(),name:ae.string(),did:ae.string().optional()}),CJ=ae.object({ttlSeconds:ae.number().optional(),totalUses:ae.number().optional()}),Hq=ae.object({endpoint:ae.string()}),IJ=ae.object({signingAuthority:Hq,relationship:ae.object({name:ae.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:ae.string()})}),Vm=a(e=>`lc:ceramic:${e}`,"streamIdToCeramicURI"),kJ=ae.string().refine(e=>e.split(":").length===3&&e.split(":")[0]==="lc","URI must be of the form lc:${storage}:${url}").refine(e=>e.split(":")[1]==="ceramic","URI must use storage type ceramic (i.e. must be lc:ceramic:${streamID})");var x6=te.object({credentials:uc.array()}).catchall(te.any()),_k=te.object({id:te.string(),title:te.string(),storageType:te.literal("ceramic").optional()}).catchall(te.any()),T6=te.object({credentials:uc.or(_k).array()}).strict();var Gm=i(async(e,{modelData:t,credentialAlias:r})=>{let n=e.invoke.getCeramicClient(),s=new Cf({ceramic:n,model:t}),o=i(async(v=r)=>{let b=await s.get(v);if(!b)return{credentials:[]};let y=await x6.spa(b);if(y.success)return y.data;let _=await T6.spa(b);if(_.success){let R={credentials:_.data.credentials.map(P=>{if("uri"in P)return P;let{title:K,id:U,storageType:j,...V}=P;return{...V,id:K,uri:`lc:ceramic:${U.replace("ceramic://","")}`}})};return await s.set(r,R),R}throw console.error(y.error),new Error("Invalid credentials list stored in IDX")},"getCredentialsListFromIdx"),c=i(async(v,b)=>{if(!v)throw new Error("Must provide id to remove");b||(b=r);let y=await o(b);return y.credentials=y.credentials.filter(_=>_.id!==v),s.set(b,y)},"removeCredentialFromIdx"),f=i(async v=>(v||(v=r),s.set(v,{credentials:[]})),"removeAllCredentialsFromIdx"),h=i(async v=>{let b=await uc.parseAsync(v);if(!b)throw new Error("record is required");if(!b.uri)throw Error("No URI provided");await e.read.get(b.uri);let y=await o(r),_=y.credentials.findIndex(T=>T.id===b.id);return _>-1?y.credentials[_]=b:y.credentials.push(b),Vm(await s.set(r,y))},"addCredentialInIdx"),p=i(async v=>{let b=uc.array().parse(v),y=await o(r);return await Promise.all(b.map(async _=>{await e.read.get(_.uri);let T=y.credentials.findIndex(O=>O.id===_.id);T>-1?y.credentials[T]=_:y.credentials.push(_)})),Vm(await s.set(r,y))},"addCredentialsInIdx");return{name:"IDX",displayName:"IDX",description:"Stores a bespoke index of credentials for an individual based on their did",index:{get:async v=>(v.debug?.("learnCard.index.IDX.get"),(await o()).credentials),add:async(v,b)=>{v.debug?.("learnCard.index.IDX.add");try{return await h(b),!0}catch(y){return console.error("Error adding credential with IDX:",y),!1}},addMany:async(v,b)=>{v.debug?.("learnCard.index.IDX.add");try{return await p(b),!0}catch(y){return console.error("Error adding credential with IDX:",y),!1}},update:async v=>(v.debug?.("learnCard.index.IDX.update"),!1),remove:async(v,b)=>{v.debug?.("learnCard.index.IDX.remove");try{return await c(b),!0}catch(y){return console.error("Error removing credential from IDX:",y),!1}},removeAll:async v=>{v.debug?.("learnCard.index.IDX.removeAll");try{return await f(),!0}catch(b){return console.error("Error removing credentials from IDX:",b),!1}}},methods:{getCredentialsListFromIdx:async(v,b=r)=>(await o(b)).credentials,getVerifiableCredentialFromIdx:async(v,b)=>{let _=(await o())?.credentials?.find(R=>R?.id===b),T=v.read.get(_?.uri),O=await s0.safeParseAsync(T);return O.success?O.data:void 0},getVerifiableCredentialsFromIdx:async v=>{let y=(await o())?.credentials?.map(_=>_?.uri)??[];return(await Promise.all(y.map(async _=>v.read.get(_)))).filter(_=>!!_)},addVerifiableCredentialInIdx:async(v,b)=>{let y=uc.parse(b);if(!y)throw new Error("record is required");if(!y.uri)throw Error("No URI provided");await v.read.get(y.uri);let _=await o(r),T=_.credentials.findIndex(O=>O.id===y.id);return T>-1?_.credentials[T]=y:_.credentials.push(y),Vm(await s.set(r,_))},removeVerifiableCredentialInIdx:async(v,b)=>c(b),removeAllVerifiableCredentialsInIdx:async()=>f(),getIDXIndex:async()=>s.get(r),setIDXIndex:async(v,b)=>s.set(r,b)}}},"getIDXPlugin");var qq=Gm;
|
|
841
841
|
/*!
|
|
842
842
|
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
843
843
|
* (c) 2017-2021 Joachim Wester
|