@frak-labs/components 0.0.14 → 0.0.16
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/cdn/{18.7306fe07.js → 18.dad4b5ac.js} +2 -2
- package/cdn/321.67278847.js +13 -0
- package/cdn/{button-share.a805bee0.js → button-share.0447f6d8.js} +1 -1
- package/cdn/components.js +1 -1
- package/cdn/loader.js +1 -1
- package/dist/buttonShare.js +1 -1
- package/dist/buttonWallet.js +1 -1
- package/package.json +2 -2
- package/cdn/321.5f360d6d.js +0 -13
- /package/cdn/{18.7306fe07.js.LICENSE.txt → 18.dad4b5ac.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 18.
|
|
2
|
-
export const __webpack_ids__=["18"];export const __webpack_modules__={"../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPackExtension=void 0,t.JsonPackExtension=class{constructor(e,t){this.tag=e,this.val=t}}},"../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPackValue=void 0,t.JsonPackValue=class{constructor(e){this.val=e}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoder=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js");class s extends n.CborDecoderBase{readAsMap(){let e=this.reader.u8();if(e>>5==5)return this.readMap(31&e);throw 0}readMap(e){let t=this.readMinorLen(e);return t>=0?this.readMapRaw(t):this.readMapIndef()}readMapRaw(e){let t=new Map;for(let r=0;r<e;r++){let e=this.val(),r=this.val();t.set(e,r)}return t}readMapIndef(){let e=new Map;for(;255!==this.reader.peak();){let t=this.val();if(255===this.reader.peak())throw 7;let r=this.val();e.set(t,r)}return this.reader.x++,e}skipN(e){for(let t=0;t<e;t++)this.skipAny()}skipAny(){this.skipAnyRaw(this.reader.u8())}skipAnyRaw(e){let t=31&e;switch(e>>5){case 0:case 1:this.skipUNint(t);break;case 2:this.skipBin(t);break;case 3:this.skipStr(t);break;case 4:this.skipArr(t);break;case 5:this.skipObj(t);break;case 7:this.skipTkn(t);break;case 6:this.skipTag(t)}}skipMinorLen(e){if(e<=23)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1;default:throw 1}}skipUNint(e){if(!(e<=23))switch(e){case 24:return this.reader.skip(1);case 25:return this.reader.skip(2);case 26:return this.reader.skip(4);case 27:return this.reader.skip(8);default:throw 1}}skipBin(e){let t=this.skipMinorLen(e);if(t>=0)this.reader.skip(t);else{for(;255!==this.reader.peak();)this.skipBinChunk();this.reader.x++}}skipBinChunk(){let e=this.reader.u8(),t=31&e;if(2!=e>>5)throw 2;if(t>27)throw 3;this.skipBin(t)}skipStr(e){let t=this.skipMinorLen(e);if(t>=0)this.reader.skip(t);else{for(;255!==this.reader.peak();)this.skipStrChunk();this.reader.x++}}skipStrChunk(){let e=this.reader.u8(),t=31&e;if(3!=e>>5)throw 4;if(t>27)throw 5;this.skipStr(t)}skipArr(e){let t=this.skipMinorLen(e);if(t>=0)this.skipN(t);else{for(;255!==this.reader.peak();)this.skipAny();this.reader.x++}}skipObj(e){let t=this.readMinorLen(e);if(t>=0)return this.skipN(2*t);for(;255!==this.reader.peak();){if(this.skipAny(),255===this.reader.peak())throw 7;this.skipAny()}this.reader.x++}skipTag(e){if(0>this.skipMinorLen(e))throw 1;this.skipAny()}skipTkn(e){switch(e){case 24:this.reader.skip(1);return;case 25:this.reader.skip(2);return;case 26:this.reader.skip(4);return;case 27:this.reader.skip(8);return}if(!(e<=23))throw 1}validate(e,t=0,r=e.length){if(this.reader.reset(e),this.reader.x=t,this.skipAny(),this.reader.x-t!==r)throw 8}decodeLevel(e){return this.reader.reset(e),this.readLevel()}readLevel(){let e=this.reader.u8(),t=e>>5,r=31&e;switch(t){case 4:return this.readArrLevel(r);case 5:return this.readObjLevel(r);default:return super.readAnyRaw(e)}}readPrimitiveOrVal(){switch(this.reader.peak()>>5){case 4:case 5:return this.readAsValue();default:return this.val()}}readAsValue(){let e=this.reader,t=e.x;this.skipAny();let r=e.x;return new i.JsonPackValue(e.uint8.subarray(t,r))}readObjLevel(e){let t=this.readMinorLen(e);return t>=0?this.readObjRawLevel(t):this.readObjIndefLevel()}readObjRawLevel(e){let t={};for(let r=0;r<e;r++){let e=this.key(),r=this.readPrimitiveOrVal();t[e]=r}return t}readObjIndefLevel(){let e={};for(;255!==this.reader.peak();){let t=this.key();if(255===this.reader.peak())throw 7;let r=this.readPrimitiveOrVal();e[t]=r}return this.reader.x++,e}readArrLevel(e){let t=this.readMinorLen(e);return t>=0?this.readArrRawLevel(t):this.readArrIndefLevel()}readArrRawLevel(e){let t=[];for(let r=0;r<e;r++)t.push(this.readPrimitiveOrVal());return t}readArrIndefLevel(){let e=[];for(;255!==this.reader.peak();)e.push(this.readPrimitiveOrVal());return this.reader.x++,e}readHdr(e){let t=this.reader.u8();if(t>>5!==e)throw 0;let r=31&t;if(r<24)return r;switch(r){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1}throw 1}readStrHdr(){return this.readHdr(3)}readObjHdr(){return this.readHdr(5)}readArrHdr(){return this.readHdr(4)}findKey(e){let t=this.readObjHdr();for(let r=0;r<t;r++){if(this.key()===e)return this;this.skipAny()}throw 9}findIndex(e){if(e>=this.readArrHdr())throw 10;for(let t=0;t<e;t++)this.skipAny();return this}find(e){for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r?this.findKey(r):this.findIndex(r)}return this}}t.CborDecoder=s},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoderBase=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs"),i=r("../../node_modules/@jsonjoy.com/util/lib/buffers/f16.js"),s=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),o=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js"),u=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Reader.js"),a=n.__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/sharedCachedUtf8Decoder.js"));t.CborDecoderBase=class{constructor(e=new u.Reader,t=a.default){this.reader=e,this.keyDecoder=t}read(e){return this.reader.reset(e),this.val()}decode(e){return this.reader.reset(e),this.val()}val(){let e=this.reader.u8(),t=e>>5,r=31&e;return t<4?t<2?0===t?this.readUint(r):this.readNint(r):2===t?this.readBin(r):this.readStr(r):t<6?4===t?this.readArr(r):this.readObj(r):6===t?this.readTag(r):this.readTkn(r)}readAnyRaw(e){let t=e>>5,r=31&e;return t<4?t<2?0===t?this.readUint(r):this.readNint(r):2===t?this.readBin(r):this.readStr(r):t<6?4===t?this.readArr(r):this.readObj(r):6===t?this.readTag(r):this.readTkn(r)}readMinorLen(e){if(e<24)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1;default:throw 1}}readUint(e){if(e<25)return 24===e?this.reader.u8():e;if(e<27)return 25===e?this.reader.u16():this.reader.u32();{let e=this.reader.u64();return e>0x1fffffffffffff?e:Number(e)}}readNint(e){if(e<25)return 24===e?-this.reader.u8()-1:-e-1;if(e<27)return 25===e?-this.reader.u16()-1:-this.reader.u32()-1;{let e=this.reader.u64();return e>0x1ffffffffffffe?-e-BigInt(1):-Number(e)-1}}readBin(e){let t=this.reader;if(e<=23)return t.buf(e);switch(e){case 24:return t.buf(t.u8());case 25:return t.buf(t.u16());case 26:return t.buf(t.u32());case 27:return t.buf(Number(t.u64()));case 31:{let e=0,t=[];for(;255!==this.reader.peak();){let r=this.readBinChunk();e+=r.length,t.push(r)}this.reader.x++;let r=new Uint8Array(e),n=0,i=t.length;for(let e=0;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r}default:throw 1}}readBinChunk(){let e=this.reader.u8(),t=31&e;if(2!=e>>5)throw 2;if(t>27)throw 3;return this.readBin(t)}readAsStr(){let e=this.reader.u8();if(3!=e>>5)throw 11;return this.readStr(31&e)}readStr(e){let t=this.reader;if(e<=23)return t.utf8(e);switch(e){case 24:return t.utf8(t.u8());case 25:return t.utf8(t.u16());case 26:return t.utf8(t.u32());case 27:return t.utf8(Number(t.u64()));case 31:{let e="";for(;255!==t.peak();)e+=this.readStrChunk();return this.reader.x++,e}default:throw 1}}readStrLen(e){if(e<=23)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());default:throw 1}}readStrChunk(){let e=this.reader.u8(),t=31&e;if(3!=e>>5)throw 4;if(t>27)throw 5;return this.readStr(t)}readArr(e){let t=this.readMinorLen(e);return t>=0?this.readArrRaw(t):this.readArrIndef()}readArrRaw(e){let t=[];for(let r=0;r<e;r++)t.push(this.val());return t}readArrIndef(){let e=[];for(;255!==this.reader.peak();)e.push(this.val());return this.reader.x++,e}readObj(e){if(e<28){let t=e;switch(e){case 24:t=this.reader.u8();break;case 25:t=this.reader.u16();break;case 26:t=this.reader.u32();break;case 27:t=Number(this.reader.u64())}let r={};for(let e=0;e<t;e++){let e=this.key();if("__proto__"===e)throw 6;let t=this.val();r[e]=t}return r}if(31===e)return this.readObjIndef();throw 1}readObjRaw(e){let t={};for(let r=0;r<e;r++){let e=this.key(),r=this.val();t[e]=r}return t}readObjIndef(){let e={};for(;255!==this.reader.peak();){let t=this.key();if(255===this.reader.peak())throw 7;let r=this.val();e[t]=r}return this.reader.x++,e}key(){let e=this.reader.u8();if(3!=e>>5)return String(this.readAnyRaw(e));let t=this.readStrLen(31&e);if(t>31)return this.reader.utf8(t);let r=this.keyDecoder.decode(this.reader.uint8,this.reader.x,t);return this.reader.skip(t),r}readTag(e){if(e<=23)return this.readTagRaw(e);switch(e){case 24:return this.readTagRaw(this.reader.u8());case 25:return this.readTagRaw(this.reader.u16());case 26:return this.readTagRaw(this.reader.u32());case 27:return this.readTagRaw(Number(this.reader.u64()));default:throw 1}}readTagRaw(e){return new s.JsonPackExtension(e,this.val())}readTkn(e){switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 24:return new o.JsonPackValue(this.reader.u8());case 25:return this.f16();case 26:return this.reader.f32();case 27:return this.reader.f64()}if(e<=23)return new o.JsonPackValue(e);throw 1}f16(){return(0,i.decodeF16)(this.reader.u16())}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderDag.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoderDag=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js");class s extends i.CborDecoder{readTagRaw(e){let t=this.val();return 42===e?new n.JsonPackExtension(e,t):t}}t.CborDecoderDag=s},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoder=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/isFloat32.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),s=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js"),o=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js");class u extends s.CborEncoderFast{writeUnknown(e){this.writeNull()}writeAny(e){switch(typeof e){case"number":return this.writeNumber(e);case"string":return this.writeStr(e);case"boolean":return this.writer.u8(244+ +e);case"object":if(!e)return this.writer.u8(246);switch(e.constructor){case Object:return this.writeObj(e);case Array:return this.writeArr(e);case Uint8Array:return this.writeBin(e);case Map:return this.writeMap(e);case i.JsonPackExtension:return this.writeTag(e.tag,e.val);case o.JsonPackValue:let t=e.val;return this.writer.buf(t,t.length);default:if(e instanceof Uint8Array)return this.writeBin(e);if(Array.isArray(e))return this.writeArr(e);if(e instanceof Map)return this.writeMap(e);return this.writeUnknown(e)}case"undefined":return this.writeUndef();case"bigint":return this.writeBigInt(e);default:return this.writeUnknown(e)}}writeFloat(e){(0,n.isFloat32)(e)?this.writer.u8f32(250,e):this.writer.u8f64(251,e)}writeMap(e){this.writeMapHdr(e.size),e.forEach((e,t)=>{this.writeAny(t),this.writeAny(e)})}writeUndef(){this.writer.u8(247)}}t.CborEncoder=u},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderDag.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderDag=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js");class i extends n.CborEncoderStable{writeUndef(){this.writeNull()}writeFloat(e){if(e!=e||!Number.isFinite(e))return this.writeNull();this.writer.u8f64(251,e)}writeTag(e,t){42===e&&this.writeTagHdr(e),this.writeAny(t)}}t.CborEncoderDag=i},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderFast=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Writer.js"),i=Number.isSafeInteger;t.CborEncoderFast=class{constructor(e=new n.Writer){this.writer=e}encode(e){return this.writeAny(e),this.writer.flush()}encodeToSlice(e){return this.writeAny(e),this.writer.flushSlice()}writeAny(e){switch(typeof e){case"number":return this.writeNumber(e);case"string":return this.writeStr(e);case"boolean":return this.writer.u8(244+ +e);case"object":if(!e)return this.writer.u8(246);if(e.constructor===Array)return this.writeArr(e);return this.writeObj(e)}}writeCbor(){this.writer.u8u16(217,55799)}writeEnd(){this.writer.u8(255)}writeNull(){this.writer.u8(246)}writeBoolean(e){e?this.writer.u8(245):this.writer.u8(244)}writeNumber(e){i(e)?this.writeInteger(e):"bigint"==typeof e?this.writeBigInt(e):this.writeFloat(e)}writeBigInt(e){e>=0?this.writeBigUint(e):this.writeBigSint(e)}writeBigUint(e){if(e<=Number.MAX_SAFE_INTEGER)return this.writeUInteger(Number(e));this.writer.u8u64(27,e)}writeBigSint(e){if(e>=Number.MIN_SAFE_INTEGER)return this.encodeNint(Number(e));let t=-BigInt(1)-e;this.writer.u8u64(59,t)}writeInteger(e){e>=0?this.writeUInteger(e):this.encodeNint(e)}writeUInteger(e){let t=this.writer;t.ensureCapacity(9);let r=t.uint8,n=t.x;e<=23?r[n++]=0+e:e<=255?(r[n++]=24,r[n++]=e):e<=65535?(r[n++]=25,t.view.setUint16(n,e),n+=2):e<=0xffffffff?(r[n++]=26,t.view.setUint32(n,e),n+=4):(r[n++]=27,t.view.setBigUint64(n,BigInt(e)),n+=8),t.x=n}encodeNumber(e){this.writeNumber(e)}encodeInteger(e){this.writeInteger(e)}encodeUint(e){this.writeUInteger(e)}encodeNint(e){let t=-1-e,r=this.writer;r.ensureCapacity(9);let n=r.uint8,i=r.x;t<24?n[i++]=32+t:t<=255?(n[i++]=56,n[i++]=t):t<=65535?(n[i++]=57,r.view.setUint16(i,t),i+=2):t<=0xffffffff?(n[i++]=58,r.view.setUint32(i,t),i+=4):(n[i++]=59,r.view.setBigUint64(i,BigInt(t)),i+=8),r.x=i}writeFloat(e){this.writer.u8f64(251,e)}writeBin(e){let t=e.length;this.writeBinHdr(t),this.writer.buf(e,t)}writeBinHdr(e){let t=this.writer;e<=23?t.u8(64+e):e<=255?t.u16(22528+e):e<=65535?t.u8u16(89,e):e<=0xffffffff?t.u8u32(90,e):t.u8u64(91,e)}writeStr(e){let t=this.writer,r=4*e.length;t.ensureCapacity(5+r);let n=t.uint8,i=t.x;r<=23?t.x++:r<=255?(n[t.x++]=120,i=t.x,t.x++):r<=65535?(n[t.x++]=121,i=t.x,t.x+=2):(n[t.x++]=122,i=t.x,t.x+=4);let s=t.utf8(e);r<=23?n[i]=96+s:r<=255?n[i]=s:r<=65535?t.view.setUint16(i,s):t.view.setUint32(i,s)}writeStrHdr(e){let t=this.writer;e<=23?t.u8(96+e):e<=255?t.u16(30720+e):e<=65535?t.u8u16(121,e):t.u8u32(122,e)}writeAsciiStr(e){this.writeStrHdr(e.length),this.writer.ascii(e)}writeArr(e){let t=e.length;this.writeArrHdr(t);for(let r=0;r<t;r++)this.writeAny(e[r])}writeArrHdr(e){let t=this.writer;e<=23?t.u8(128+e):e<=255?t.u16(38912+e):e<=65535?t.u8u16(153,e):e<=0xffffffff?t.u8u32(154,e):t.u8u64(155,e)}writeObj(e){let t=Object.keys(e),r=t.length;this.writeObjHdr(r);for(let n=0;n<r;n++){let r=t[n];this.writeStr(r),this.writeAny(e[r])}}writeObjHdr(e){let t=this.writer;e<=23?t.u8(160+e):e<=255?t.u16(47104+e):e<=65535?t.u8u16(185,e):e<=0xffffffff?t.u8u32(186,e):t.u8u64(187,e)}writeMapHdr(e){this.writeObjHdr(e)}writeStartMap(){this.writer.u8(191)}writeTag(e,t){this.writeTagHdr(e),this.writeAny(t)}writeTagHdr(e){let t=this.writer;e<=23?t.u8(192+e):e<=255?t.u16(55296+e):e<=65535?t.u8u16(217,e):e<=0xffffffff?t.u8u32(218,e):t.u8u64(219,e)}writeTkn(e){let t=this.writer;e<=23?t.u8(224+e):e<=255&&t.u16(63488+e)}writeStartStr(){this.writer.u8(127)}writeStrChunk(e){throw Error("Not implemented")}writeEndStr(){throw Error("Not implemented")}writeStartBin(){this.writer.u8(95)}writeBinChunk(e){throw Error("Not implemented")}writeEndBin(){throw Error("Not implemented")}writeStartArr(){this.writer.u8(159)}writeArrChunk(e){throw Error("Not implemented")}writeEndArr(){this.writer.u8(255)}writeStartObj(){this.writer.u8(191)}writeObjChunk(e,t){throw Error("Not implemented")}writeEndObj(){this.writer.u8(255)}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderStable=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js"),i=r("../../node_modules/@jsonjoy.com/util/lib/sort/insertion2.js"),s=r("../../node_modules/@jsonjoy.com/util/lib/objKeyCmp.js"),o=e=>e<=23?1:e<=255?2:e<=65535?3:5;class u extends n.CborEncoder{writeObj(e){let t=Object.keys(e);(0,i.sort)(t,s.objKeyCmp);let r=t.length;this.writeObjHdr(r);for(let n=0;n<r;n++){let r=t[n];this.writeStr(r),this.writeAny(e[r])}}writeStr(e){let t=this.writer,r=e.length,n=4*r;t.ensureCapacity(5+n);let i=o(r),s=t.x,u=s+i;t.x=u;let a=t.utf8(e),l=t.uint8,c=o(a);switch(c!==i&&l.copyWithin(u+(c-i),u,u+a),c){case 1:l[s]=96+a;break;case 2:l[s]=120,l[s+1]=a;break;case 3:l[s]=121,t.view.setUint16(s+1,a);break;case 5:l[s]=122,t.view.setUint32(s+1,a)}t.x=s+c+a}writeUndef(){this.writeNull()}}t.CborEncoderStable=u},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/tslib/tslib.es6.mjs");n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/types.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderDag.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderDag.js"),t)},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/types.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},"../../node_modules/@jsonjoy.com/util/lib/buffers/Reader.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/index.js");t.Reader=class{constructor(){this.uint8=new Uint8Array([]),this.view=new DataView(this.uint8.buffer),this.x=0}reset(e){this.x=0,this.uint8=e,this.view=new DataView(e.buffer,e.byteOffset,e.length)}peak(){return this.view.getUint8(this.x)}skip(e){this.x+=e}buf(e){let t=this.x+e,r=this.uint8.subarray(this.x,t);return this.x=t,r}u8(){return this.uint8[this.x++]}i8(){return this.view.getInt8(this.x++)}u16(){let e=this.x,t=(this.uint8[e++]<<8)+this.uint8[e++];return this.x=e,t}i16(){let e=this.view.getInt16(this.x);return this.x+=2,e}u32(){let e=this.view.getUint32(this.x);return this.x+=4,e}i32(){let e=this.view.getInt32(this.x);return this.x+=4,e}u64(){let e=this.view.getBigUint64(this.x);return this.x+=8,e}i64(){let e=this.view.getBigInt64(this.x);return this.x+=8,e}f32(){let e=this.x;return this.x+=4,this.view.getFloat32(e)}f64(){let e=this.x;return this.x+=8,this.view.getFloat64(e)}utf8(e){let t=this.x;return this.x+=e,(0,n.decodeUtf8)(this.uint8,t,e)}ascii(e){let t=this.uint8,r="",n=this.x+e;for(let e=this.x;e<n;e++)r+=String.fromCharCode(t[e]);return this.x=n,r}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/Slice.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Slice=void 0,t.Slice=class{constructor(e,t,r,n){this.uint8=e,this.view=t,this.start=r,this.end=n}subarray(){return this.uint8.subarray(this.start,this.end)}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/Writer.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Slice.js"),i=new DataView(new Uint8Array([]).buffer),s="function"==typeof Buffer,o=s?Buffer.prototype.utf8Write:null,u=s?Buffer.from:null,a="undefined"!=typeof TextEncoder?new TextEncoder:null;t.Writer=class{constructor(e=65536){this.allocSize=e,this.view=i,this.x0=0,this.x=0,this.uint8=new Uint8Array(e),this.size=e,this.view=new DataView(this.uint8.buffer)}grow(e){let t=this.x0,r=this.x,n=this.uint8,i=new Uint8Array(e),s=new DataView(i.buffer),o=n.subarray(t,r);i.set(o,0),this.x=r-t,this.x0=0,this.uint8=i,this.size=e,this.view=s}ensureCapacity(e){let t=this.size,r=t-this.x;if(r<e){let n=t-this.x0+(e-r);this.grow(n<=this.allocSize?this.allocSize:2*n)}}move(e){this.ensureCapacity(e),this.x+=e}reset(){this.x0=this.x}newBuffer(e){let t=this.uint8=new Uint8Array(e);this.size=e,this.view=new DataView(t.buffer),this.x=this.x0=0}flush(){let e=this.uint8.subarray(this.x0,this.x);return this.x0=this.x,e}flushSlice(){let e=new n.Slice(this.uint8,this.view,this.x0,this.x);return this.x0=this.x,e}u8(e){this.ensureCapacity(1),this.uint8[this.x++]=e}u16(e){this.ensureCapacity(2),this.view.setUint16(this.x,e),this.x+=2}u32(e){this.ensureCapacity(4),this.view.setUint32(this.x,e),this.x+=4}i32(e){this.ensureCapacity(4),this.view.setInt32(this.x,e),this.x+=4}u64(e){this.ensureCapacity(8),this.view.setBigUint64(this.x,BigInt(e)),this.x+=8}f64(e){this.ensureCapacity(8),this.view.setFloat64(this.x,e),this.x+=8}u8u16(e,t){this.ensureCapacity(3);let r=this.x;this.uint8[r++]=e,this.uint8[r++]=t>>>8,this.uint8[r++]=255&t,this.x=r}u8u32(e,t){this.ensureCapacity(5);let r=this.x;this.uint8[r++]=e,this.view.setUint32(r,t),this.x=r+4}u8u64(e,t){this.ensureCapacity(9);let r=this.x;this.uint8[r++]=e,this.view.setBigUint64(r,BigInt(t)),this.x=r+8}u8f32(e,t){this.ensureCapacity(5);let r=this.x;this.uint8[r++]=e,this.view.setFloat32(r,t),this.x=r+4}u8f64(e,t){this.ensureCapacity(9);let r=this.x;this.uint8[r++]=e,this.view.setFloat64(r,t),this.x=r+8}buf(e,t){this.ensureCapacity(t);let r=this.x;this.uint8.set(e,r),this.x=r+t}utf8(e){let t=4*e.length;if(t<168)return this.utf8Native(e);if(o){let r=o.call(this.uint8,e,this.x,t);return this.x+=r,r}if(u){let r=this.uint8,n=r.byteOffset+this.x,i=u(r.buffer).subarray(n,n+t).write(e,0,t,"utf8");return this.x+=i,i}if(t>1024&&a){let r=a.encodeInto(e,this.uint8.subarray(this.x,this.x+t)).written;return this.x+=r,r}return this.utf8Native(e)}utf8Native(e){let t=e.length,r=this.uint8,n=this.x,i=0;for(;i<t;){let s=e.charCodeAt(i++);if((0xffffff80&s)==0){r[n++]=s;continue}if((0xfffff800&s)==0)r[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&i<t){let t=e.charCodeAt(i);(64512&t)==56320&&(i++,s=((1023&s)<<10)+(1023&t)+65536)}(0xffff0000&s)==0?r[n++]=s>>12&15|224:(r[n++]=s>>18&7|240,r[n++]=s>>12&63|128),r[n++]=s>>6&63|128}r[n++]=63&s|128}let s=n-this.x;return this.x=n,s}ascii(e){let t=e.length;this.ensureCapacity(t);let r=this.uint8,n=this.x,i=0;for(;i<t;)r[n++]=e.charCodeAt(i++);this.x=n}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/f16.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeF16=void 0;let r=Math.pow;t.decodeF16=e=>{let t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:r(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}},"../../node_modules/@jsonjoy.com/util/lib/buffers/isFloat32.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFloat32=void 0;let r=new DataView(new ArrayBuffer(4));t.isFloat32=e=>(r.setFloat32(0,e),e===r.getFloat32(0))},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/CachedUtf8Decoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CachedUtf8Decoder=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs").__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v10.js")),i=1+Math.round(0xfffffffe*Math.random());class s{constructor(e,t){this.bytes=e,this.value=t}}t.CachedUtf8Decoder=class{constructor(){this.caches=[];for(let e=0;e<31;e++)this.caches.push([])}get(e,t,r){let n=this.caches[r-1],i=n.length;e:for(let s=0;s<i;s++){let i=n[s],o=i.bytes;for(let n=0;n<r;n++)if(o[n]!==e[t+n])continue e;return i.value}return null}store(e,t){let r=this.caches[e.length-1],n=new s(e,t);if(r.length>=16)r[i^=i<<13,i^=i>>>17,((i^=i<<5)>>>0)%16+0]=n;else r.push(n)}decode(e,t,r){if(!r)return"";let i=this.get(e,t,r);if(null!==i)return i;let s=(0,n.default)(e,t,r),o=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(o,s),s}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeAscii.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAsciiMax15=t.decodeAscii=void 0;let r=String.fromCharCode;t.decodeAscii=(e,t,n)=>{let i=[];for(let r=0;r<n;r++){let r=e[t++];if(128&r)return;i.push(r)}return r.apply(String,i)},t.decodeAsciiMax15=(e,t,n)=>{if(n<4){if(n<2){if(0===n)return"";{let n=e[t++];if((128&n)>1){t-=1;return}return r(n)}}{let i=e[t++],s=e[t++];if((128&i)>0||(128&s)>0){t-=2;return}if(n<3)return r(i,s);let o=e[t++];if((128&o)>0){t-=3;return}return r(i,s,o)}}{let i=e[t++],s=e[t++],o=e[t++],u=e[t++];if((128&i)>0||(128&s)>0||(128&o)>0||(128&u)>0){t-=4;return}if(n<6){if(4===n)return r(i,s,o,u);{let n=e[t++];if((128&n)>0){t-=5;return}return r(i,s,o,u,n)}}if(n<8){let a=e[t++],l=e[t++];if((128&a)>0||(128&l)>0){t-=6;return}if(n<7)return r(i,s,o,u,a,l);let c=e[t++];if((128&c)>0){t-=7;return}return r(i,s,o,u,a,l,c)}{let a=e[t++],l=e[t++],c=e[t++],f=e[t++];if((128&a)>0||(128&l)>0||(128&c)>0||(128&f)>0){t-=8;return}if(n<10){if(8===n)return r(i,s,o,u,a,l,c,f);{let n=e[t++];if((128&n)>0){t-=9;return}return r(i,s,o,u,a,l,c,f,n)}}if(n<12){let h=e[t++],d=e[t++];if((128&h)>0||(128&d)>0){t-=10;return}if(n<11)return r(i,s,o,u,a,l,c,f,h,d);let _=e[t++];if((128&_)>0){t-=11;return}return r(i,s,o,u,a,l,c,f,h,d,_)}{let h=e[t++],d=e[t++],_=e[t++],p=e[t++];if((128&h)>0||(128&d)>0||(128&_)>0||(128&p)>0){t-=12;return}if(n<14){if(12===n)return r(i,s,o,u,a,l,c,f,h,d,_,p);{let n=e[t++];if((128&n)>0){t-=13;return}return r(i,s,o,u,a,l,c,f,h,d,_,p,n)}}{let b=e[t++],m=e[t++];if((128&b)>0||(128&m)>0){t-=14;return}if(n<15)return r(i,s,o,u,a,l,c,f,h,d,_,p,b,m);let y=e[t++];if((128&y)>0){t-=15;return}return r(i,s,o,u,a,l,c,f,h,d,_,p,b,m,y)}}}}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeUtf8=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs").__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v16.js"));t.decodeUtf8=n.default},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v10.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=String.fromCharCode;t.default=(e,t,n)=>{let i=t,s=i+n,o="";for(;i<s;){let t=e[i++];if((128&t)==0){o+=r(t);continue}let n=63&e[i++];if((224&t)==192){o+=r((31&t)<<6|n);continue}let s=63&e[i++];if((240&t)==224){o+=r((31&t)<<12|n<<6|s);continue}if((248&t)==240){let u=(7&t)<<18|n<<12|s<<6|63&e[i++];u>65535?o+=r((u-=65536)>>>10&1023|55296,u=56320|1023&u):o+=r(u)}else o+=r(t)}return o}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v16.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/tslib/tslib.es6.mjs"),i=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeAscii.js"),s=n.__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v18.js")),o="undefined"!=typeof Buffer,u=o?Buffer.prototype.utf8Slice:null,a=o?Buffer.from:null,l=(e,t,r)=>(0,i.decodeAsciiMax15)(e,t,r)??(0,s.default)(e,t,r),c=(e,t,r)=>(0,i.decodeAscii)(e,t,r)??(0,s.default)(e,t,r),f=u?(e,t,r)=>u.call(e,t,t+r):a?(e,t,r)=>a(e).subarray(t,t+r).toString("utf8"):s.default;t.default=(e,t,r)=>r<16?l(e,t,r):r<32?c(e,t,r):f(e,t,r)},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v18.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=String.fromCharCode;t.default=(e,t,n)=>{let i=t,s=i+n,o=[];for(;i<s;){let t=e[i++];if((128&t)!=0){let r=63&e[i++];if((224&t)==192)t=(31&t)<<6|r;else{let n=63&e[i++];if((240&t)==224)t=(31&t)<<12|r<<6|n;else if((248&t)==240){let s=(7&t)<<18|r<<12|n<<6|63&e[i++];if(s>65535){let e=(s-=65536)>>>10&1023|55296;t=56320|1023&s,o.push(e)}else t=s}}}o.push(t)}return r.apply(String,o)}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/sharedCachedUtf8Decoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/CachedUtf8Decoder.js");t.default=new n.CachedUtf8Decoder},"../../node_modules/@jsonjoy.com/util/lib/objKeyCmp.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.objKeyCmp=void 0,t.objKeyCmp=(e,t)=>{let r=e.length,n=t.length;return r===n?e>t?1:-1:r-n}},"../../node_modules/@jsonjoy.com/util/lib/sort/insertion2.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sort=void 0,t.sort=(e,t)=>{let r=e.length;for(let n=1;n<r;n++){let r=e[n],i=n;for(;0!==i&&t(e[i-1],r)>0;)e[i]=e[i-1],i--;e[i]=r}return e}},"../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js":function(e,t,r){r.d(t,{Z:()=>h});var n=r("../../node_modules/preact/dist/preact.module.js");function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var s=["context","children"];function o(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)t.indexOf(r=s[n])>=0||(i[r]=e[r]);return i}(e,s);return(0,n.Tm)(t,r)}function u(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,n.h)(o,i({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],s={},o=0,u=t.attributes,l=t.childNodes;for(o=u.length;o--;)"slot"!==u[o].name&&(s[u[o].name]=u[o].value,s[a(u[o].name)]=u[o].value);for(o=l.length;o--;){var c=e(l[o],null),h=l[o].slot;h?s[h]=(0,n.h)(f,{name:h},c):i[o]=c}var d=r?(0,n.h)(f,null,i):i;return(0,n.h)(r||t.nodeName.toLowerCase(),s,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?n.ZB:n.sY)(this._vdom,this._root)}function a(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function l(e,t,r){if(this._vdom){var i={};i[e]=r=null==r?void 0:r,i[a(e)]=r,this._vdom=(0,n.Tm)(this._vdom,i),(0,n.sY)(this._vdom,this._root)}}function c(){(0,n.sY)(this._vdom=null,this._root)}function f(e,t){var r=this;return(0,n.h)("slot",i({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}function h(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=u,i.prototype.attributeChangedCallback=l,i.prototype.disconnectedCallback=c,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i)}},"../../node_modules/preact/dist/preact.module.js":function(e,t,r){r.d(t,{HY:()=>g,Tm:()=>D,YM:()=>i,ZB:()=>T,az:()=>w,bR:()=>function e(t,r){return r=r||[],null==t||"boolean"==typeof t||(m(t)?t.some(function(t){e(t,r)}):r.push(t)),r},h:()=>w,sY:()=>N,wA:()=>x});var n,i,s,o,u,a,l,c,f,h,d,_={},p=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function y(e,t){for(var r in t)e[r]=t[r];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,r){var i,s,o,u={};for(o in t)"key"==o?i=t[o]:"ref"==o?s=t[o]:u[o]=t[o];if(arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===u[o]&&(u[o]=e.defaultProps[o]);return j(e,u,i,s,null)}function j(e,t,r,n,o){var u={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++s:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(u),u}function g(e){return e.children}function x(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?k(e):null}function A(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!O.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||a)(O)}function O(){for(var e,t,r,n,s,u,a=1;o.length;)o.length>a&&o.sort(l),e=o.shift(),a=o.length,e.__d&&(t=void 0,n=(r=e.__v).__e,s=[],u=[],e.__P&&((t=y({},r)).__v=r.__v+1,i.vnode&&i.vnode(t),U(e.__P,t,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,s,null==n?k(r):n,!!(32&r.__u),u),t.__v=r.__v,t.__.__k[t.__i]=t,M(s,t,u),t.__e!=n&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(t)));O.__r=0}function C(e,t,r,n,s,o,u,a,l,c,f){var h,d,b,y,w,x,A=n&&n.__k||p,O=t.length;for(l=function(e,t,r,n,s){var o,u,a,l,c,f=r.length,h=f,d=0;for(e.__k=Array(s),o=0;o<s;o++)null!=(u=t[o])&&"boolean"!=typeof u&&"function"!=typeof u?(l=o+d,(u=e.__k[o]="string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?j(null,u,null,null,null):m(u)?j(g,{children:u},null,null,null):void 0===u.constructor&&u.__b>0?j(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):u).__=e,u.__b=e.__b+1,a=null,-1!==(c=u.__i=function(e,t,r,n){var i,s,o=e.key,u=e.type,a=t[r];if(null===a&&null==e.key||a&&o==a.key&&u===a.type&&0==(2&a.__u))return r;if(n>+(null!=a&&0==(2&a.__u)))for(i=r-1,s=r+1;i>=0||s<t.length;){if(i>=0){if((a=t[i])&&0==(2&a.__u)&&o==a.key&&u===a.type)return i;i--}if(s<t.length){if((a=t[s])&&0==(2&a.__u)&&o==a.key&&u===a.type)return s;s++}}return -1}(u,r,l,h))&&(h--,(a=r[c])&&(a.__u|=2)),null==a||null===a.__v?(-1==c&&(s>f?d--:s<f&&d++),"function"!=typeof u.type&&(u.__u|=4)):c!=l&&(c==l-1?d--:c==l+1?d++:(c>l?d--:d++,u.__u|=4))):e.__k[o]=null;if(h)for(o=0;o<f;o++)null!=(a=r[o])&&0==(2&a.__u)&&(a.__e==n&&(n=k(a)),function e(t,r,n){var s,o;if(i.unmount&&i.unmount(t),(s=t.ref)&&(s.current&&s.current!==t.__e||I(s,null,r)),null!=(s=t.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){i.__e(e,r)}s.base=s.__P=null}if(s=t.__k)for(o=0;o<s.length;o++)s[o]&&e(s[o],r,n||"function"!=typeof t.type);n||v(t.__e),t.__c=t.__=t.__e=void 0}(a,a));return n}(r,t,A,l,O),h=0;h<O;h++)null!=(b=r.__k[h])&&(d=-1===b.__i?_:A[b.__i]||_,b.__i=h,x=U(e,b,d,s,o,u,a,l,c,f),y=b.__e,b.ref&&d.ref!=b.ref&&(d.ref&&I(d.ref,null,b),f.push(b.ref,b.__c||y,b)),null==w&&null!=y&&(w=y),4&b.__u||d.__k===b.__k?l=function e(t,r,n){var i,s;if("function"==typeof t.type){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,r=e(i[s],r,n));return r}t.__e!=r&&(r&&t.type&&!n.contains(r)&&(r=k(t)),n.insertBefore(t.__e,r||null),r=t.__e);do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType);return r}(b,l,e):"function"==typeof b.type&&void 0!==x?l=x:y&&(l=y.nextSibling),b.__u&=-7);return r.__e=w,l}function S(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||b.test(t)?r:r+"px"}function E(e,t,r,n,i){var s;t:if("style"==t){if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||S(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||S(e.style,t,r[t])}}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(c,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.t=n.t:(r.t=f,e.addEventListener(t,s?d:h,s)):e.removeEventListener(t,s?d:h,s);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break t}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function P(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.u)t.u=f++;else if(t.u<r.t)return;return r(i.event?i.event(t):t)}}}function U(e,t,r,s,o,u,a,l,c,f){var h,d,p,b,w,j,A,O,S,P,U,M,I,N,T,D,H,L=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),u=[l=t.__e=r.__e]),(h=i.__b)&&h(t);t:if("function"==typeof L)try{if(O=t.props,S="prototype"in L&&L.prototype.render,P=(h=L.contextType)&&s[h.__c],U=h?P?P.props.value:h.__:s,r.__c?A=(d=t.__c=r.__c).__=d.__E:(S?t.__c=d=new L(O,U):(t.__c=d=new x(O,U),d.constructor=L,d.render=B),P&&P.sub(d),d.props=O,d.state||(d.state={}),d.context=U,d.__n=s,p=d.__d=!0,d.__h=[],d._sb=[]),S&&null==d.__s&&(d.__s=d.state),S&&null!=L.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=y({},d.__s)),y(d.__s,L.getDerivedStateFromProps(O,d.__s))),b=d.props,w=d.state,d.__v=t,p)S&&null==L.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),S&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(S&&null==L.getDerivedStateFromProps&&O!==b&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(O,U),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(O,d.__s,U)||t.__v==r.__v)){for(t.__v!=r.__v&&(d.props=O,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),M=0;M<d._sb.length;M++)d.__h.push(d._sb[M]);d._sb=[],d.__h.length&&a.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(O,d.__s,U),S&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(b,w,j)})}if(d.context=U,d.props=O,d.__P=e,d.__e=!1,I=i.__r,N=0,S){for(d.state=d.__s,d.__d=!1,I&&I(t),h=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do d.__d=!1,I&&I(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++N<25);d.state=d.__s,null!=d.getChildContext&&(s=y(y({},s),d.getChildContext())),S&&!p&&null!=d.getSnapshotBeforeUpdate&&(j=d.getSnapshotBeforeUpdate(b,w)),D=h,null!=h&&h.type===g&&null==h.key&&(D=function e(t){return"object"!=typeof t||null==t?t:m(t)?t.map(e):y({},t)}(h.props.children)),l=C(e,m(D)?D:[D],t,r,s,o,u,a,l,c,f),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),A&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||null!=u){if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;u[u.indexOf(l)]=null,t.__e=l}else for(H=u.length;H--;)v(u[H])}else t.__e=r.__e,t.__k=r.__k;i.__e(e,t,r)}else null==u&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=function(e,t,r,s,o,u,a,l,c){var f,h,d,p,b,y,w,j=r.props,g=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=u){for(f=0;f<u.length;f++)if((b=u[f])&&"setAttribute"in b==!!x&&(x?b.localName==x:3==b.nodeType)){e=b,u[f]=null;break}}if(null==e){if(null==x)return document.createTextNode(g);e=document.createElementNS(o,x,g.is&&g),l&&(i.__m&&i.__m(t,u),l=!1),u=null}if(null===x)j===g||l&&e.data===g||(e.data=g);else{if(u=u&&n.call(e.childNodes),j=r.props||_,!l&&null!=u)for(j={},f=0;f<e.attributes.length;f++)j[(b=e.attributes[f]).name]=b.value;for(f in j)if(b=j[f],"children"==f);else if("dangerouslySetInnerHTML"==f)d=b;else if(!(f in g)){if("value"==f&&"defaultValue"in g||"checked"==f&&"defaultChecked"in g)continue;E(e,f,null,b,o)}for(f in g)b=g[f],"children"==f?p=b:"dangerouslySetInnerHTML"==f?h=b:"value"==f?y=b:"checked"==f?w=b:l&&"function"!=typeof b||j[f]===b||E(e,f,b,j[f],o);if(h)l||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),C("template"===t.type?e.content:e,m(p)?p:[p],t,r,s,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,u,a,u?u[0]:r.__k&&k(r,0),l,c),null!=u)for(f=u.length;f--;)v(u[f]);l||(f="value","progress"==x&&null==y?e.removeAttribute("value"):void 0===y||y===e[f]&&("progress"!=x||y)&&("option"!=x||y===j[f])||E(e,f,y,j[f],o),f="checked",void 0!==w&&w!==e[f]&&E(e,f,w,j[f],o))}return e}(r.__e,t,r,s,o,u,a,c,f);return(h=i.diffed)&&h(t),128&t.__u?void 0:l}function M(e,t,r){for(var n=0;n<r.length;n++)I(r[n],r[++n],r[++n]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function I(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,r)}}function B(e,t,r){return this.constructor(e,r)}function N(e,t,r){var s,o,u,a;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(s="function"==typeof r)?null:r&&r.__k||t.__k,u=[],a=[],U(t,e=(!s&&r||t).__k=w(g,null,[e]),o||_,_,t.namespaceURI,!s&&r?[r]:o?null:t.firstChild?n.call(t.childNodes):null,u,!s&&r?r:o?o.__e:t.firstChild,s,a),M(u,e,a)}function T(e,t){N(e,t,T)}function D(e,t,r){var i,s,o,u,a=y({},e.props);for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?s=t[o]:a[o]=void 0===t[o]&&void 0!==u?u[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),j(e.type,a,i||e.key,s||e.ref,null)}n=p.slice,i={__e:function(e,t,r,n){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},s=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},r),this.props)),e&&y(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},x.prototype.render=g,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},O.__r=0,c=/(PointerCapture)$|Capture$/i,f=0,h=P(!1),d=P(!0)},"../../node_modules/preact/hooks/dist/hooks.module.js":function(e,t,r){r.d(t,{I4:()=>j,Ye:()=>w,d4:()=>v,eJ:()=>y});var n,i,s,o,u=r("../../node_modules/preact/dist/preact.module.js"),a=0,l=[],c=u.YM,f=c.__b,h=c.__r,d=c.diffed,_=c.__c,p=c.unmount,b=c.__;function m(e,t){c.__h&&c.__h(i,e,a||t),a=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function y(e){return a=1,function(e,t,r){var s=m(n++,2);if(s.t=e,!s.__c&&(s.__=[C(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],r=s.t(t,e);t!==r&&(s.__N=[r,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.__f)){var o=function(e,t,r){if(!s.__c.__H)return!0;var n=s.__c.__H.__.filter(function(e){return!!e.__c});if(n.every(function(e){return!e.__N}))return!u||u.call(this,e,t,r);var i=s.__c.props!==e;return n.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),u&&u.call(this,e,t,r)||i};i.__f=!0;var u=i.shouldComponentUpdate,a=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=u;u=void 0,o(e,t,r),u=n}a&&a.call(this,e,t,r)},i.shouldComponentUpdate=o}return s.__N||s.__}(C,e)}function v(e,t){var r=m(n++,3);!c.__s&&O(r.__H,t)&&(r.__=e,r.u=t,i.__H.__h.push(r))}function w(e,t){var r=m(n++,7);return O(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function j(e,t){return a=8,w(function(){return e},t)}function g(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(k),e.__H.__h.forEach(A),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){i=null,f&&f(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),b&&b(e,t)},c.__r=function(e){h&&h(e),n=0;var t=(i=e.__c).__H;t&&(s===i?(t.__h=[],i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(k),t.__h.forEach(A),t.__h=[],n=0)),s=i},c.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&o===c.requestAnimationFrame||((o=c.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),x&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);x&&(t=requestAnimationFrame(r))})(g)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),s=i=null},c.__c=function(e,t){t.some(function(e){try{e.__h.forEach(k),e.__h=e.__h.filter(function(e){return!e.__||A(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],c.__e(r,e.__v)}}),_&&_(e,t)},c.unmount=function(e){p&&p(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{k(e)}catch(e){t=e}}),r.__H=void 0,t&&c.__e(t,r.__v))};var x="function"==typeof requestAnimationFrame;function k(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function A(e){var t=i;e.__c=e.__(),i=t}function O(e,t){return!e||e.length!==t.length||t.some(function(t,r){return t!==e[r]})}function C(e,t){return"function"==typeof t?t(e):t}},"../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js":function(e,t,r){r.d(t,{BX:()=>s,HY:()=>n.HY,tZ:()=>s});var n=r("../../node_modules/preact/dist/preact.module.js"),i=0;function s(e,t,r,s,o,u){t||(t={});var a,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?a=t[l]:c[l]=t[l];var f={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--i,__i:-1,__u:0,__source:o,__self:u};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return n.YM.vnode&&n.YM.vnode(f),f}},"../../node_modules/@noble/hashes/esm/_assert.js":function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function i(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}r.d(t,{$h:()=>s,eB:()=>o,gk:()=>i,k8:()=>n})},"../../node_modules/@noble/hashes/esm/utils.js":function(e,t,r){r.d(t,{GL:()=>s,Jq:()=>i,O0:()=>l,hE:()=>f,iA:()=>u,kb:()=>c,l1:()=>a,np:()=>o});var n=r("../../node_modules/@noble/hashes/esm/_assert.js");function i(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function s(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function o(e,t){return e<<32-t|e>>>t}let u=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function a(e){for(let r=0;r<e.length;r++){var t;e[r]=(t=e[r])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}}function l(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,n.gk)(e),e}class c{clone(){return this._cloneInto()}}function f(e){let t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}},"../../node_modules/class-variance-authority/dist/index.mjs":function(e,t,r){r.d(t,{cx:()=>n});let n=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n}},"../../node_modules/tslib/tslib.es6.mjs":function(e,t,r){r.r(t),r.d(t,{__addDisposableResource:()=>N,__assign:()=>s,__asyncDelegator:()=>A,__asyncGenerator:()=>k,__asyncValues:()=>O,__await:()=>x,__awaiter:()=>_,__classPrivateFieldGet:()=>M,__classPrivateFieldIn:()=>B,__classPrivateFieldSet:()=>I,__createBinding:()=>b,__decorate:()=>u,__disposeResources:()=>D,__esDecorate:()=>l,__exportStar:()=>m,__extends:()=>i,__generator:()=>p,__importDefault:()=>U,__importStar:()=>P,__makeTemplateObject:()=>C,__metadata:()=>d,__param:()=>a,__propKey:()=>f,__read:()=>v,__rest:()=>o,__rewriteRelativeImportExtension:()=>H,__runInitializers:()=>c,__setFunctionName:()=>h,__spread:()=>w,__spreadArray:()=>g,__spreadArrays:()=>j,__values:()=>y,default:()=>L});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function u(e,t,r,n){var i,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function a(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,i,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,a=n.kind,l="getter"===a?"get":"setter"===a?"set":"value",c=!t&&e?n.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),h=!1,d=r.length-1;d>=0;d--){var _={};for(var p in n)_[p]="access"===p?{}:n[p];for(var p in n.access)_.access[p]=n.access[p];_.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var b=(0,r[d])("accessor"===a?{get:f.get,set:f.set}:f[l],_);if("accessor"===a){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(u=o(b.get))&&(f.get=u),(u=o(b.set))&&(f.set=u),(u=o(b.init))&&i.unshift(u)}else(u=o(b))&&("field"===a?i.unshift(u):f[l]=u)}c&&Object.defineProperty(c,n.name,f),h=!0}function c(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function _(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{a(n.next(e))}catch(e){s(e)}}function u(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,u)}a((n=n.apply(e,t||[])).next())})}function p(e,t){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(a){return function(u){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function j(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],o=0,u=s.length;o<u;o++,i++)n[i]=s[o];return n}function g(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){s.push([e,t,r,n])>1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=i[e](t)).value instanceof x?Promise.resolve(r.value.v).then(a,l):c(s[0][2],r)}catch(e){c(s[0][3],e)}}function a(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:x(e[n](t)),done:!1}:i?i(t):t}:i}}function O(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},E=function(e){return(E=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=E(e),n=0;n<r.length;n++)"default"!==r[n]&&b(t,e,r[n]);return S(t,e),t}function U(e){return e&&e.__esModule?e:{default:e}}function M(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function I(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function B(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,r){if(null!=t){var n,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var T="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function D(e){function t(t){e.error=e.hasError?new T(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function H(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,i,s){return r?t?".jsx":".js":!n||i&&s?n+i+"."+s.toLowerCase()+"js":e}):e}let L={__extends:i,__assign:s,__rest:o,__decorate:u,__param:a,__esDecorate:l,__runInitializers:c,__propKey:f,__setFunctionName:h,__metadata:d,__awaiter:_,__generator:p,__createBinding:b,__exportStar:m,__values:y,__read:v,__spread:w,__spreadArrays:j,__spreadArray:g,__await:x,__asyncGenerator:k,__asyncDelegator:A,__asyncValues:O,__makeTemplateObject:C,__importStar:P,__importDefault:U,__classPrivateFieldGet:M,__classPrivateFieldSet:I,__classPrivateFieldIn:B,__addDisposableResource:N,__disposeResources:D,__rewriteRelativeImportExtension:H}},"../../node_modules/viem/_esm/errors/base.js":function(e,t,r){r.d(t,{G:()=>s});let n="2.23.15",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};class s extends Error{constructor(e,t={}){let r=t.cause instanceof s?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof s&&t.cause.docsPath||t.docsPath,u=i.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},"../../node_modules/viem/_esm/errors/encoding.js":function(e,t,r){r.d(t,{J5:()=>i,M6:()=>s});var n=r("../../node_modules/viem/_esm/errors/base.js");class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}n.G,n.G,n.G;class s extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},"../../node_modules/viem/_esm/utils/address/isAddressEqual.js":function(e,t,r){r.d(t,{E:()=>h});var n=r("../../node_modules/viem/_esm/errors/base.js");class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class s extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}var o=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),u=r("../../node_modules/viem/_esm/utils/hash/keccak256.js");let a=new s(8192),l=/^0x[a-fA-F0-9]{40}$/,c=new s(8192);function f(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(c.has(n))return c.get(n);let i=!!l.test(e)&&(e.toLowerCase()===e||!r||function(e,t){if(a.has(`${e}.undefined`))return a.get(`${e}.${void 0}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,u.w)((0,o.qX)(r),"bytes"),i=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&n[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let s=`0x${i.join("")}`;return a.set(`${e}.${t}`,s),s}(e)===e);return c.set(n,i),i}function h(e,t){if(!f(e,{strict:!1}))throw new i({address:e});if(!f(t,{strict:!1}))throw new i({address:t});return e.toLowerCase()===t.toLowerCase()}},"../../node_modules/viem/_esm/utils/data/concat.js":function(e,t,r){r.d(t,{SM:()=>n});function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}},"../../node_modules/viem/_esm/utils/data/isHex.js":function(e,t,r){r.d(t,{v:()=>n});function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},"../../node_modules/viem/_esm/utils/data/pad.js":function(e,t,r){r.d(t,{vk:()=>s});var n=r("../../node_modules/viem/_esm/errors/base.js");n.G;class i extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function s(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;let n=e.replace("0x","");if(n.length>2*r)throw new i({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new i({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let i=0;i<r;i++){let s="right"===t;n[s?i:r-i-1]=e[s?i:e.length-i-1]}return n}(e,{dir:t,size:r})}n.G},"../../node_modules/viem/_esm/utils/encoding/fromHex.js":function(e,t,r){r.d(t,{Yf:()=>o});var n=r("../../node_modules/viem/_esm/errors/encoding.js"),i=r("../../node_modules/viem/_esm/utils/data/isHex.js");function s(e){return(0,i.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function o(e,{size:t}){if(s(e)>t)throw new n.M6({givenSize:s(e),maxSize:t})}},"../../node_modules/viem/_esm/utils/encoding/toBytes.js":function(e,t,r){r.d(t,{O0:()=>l,nr:()=>h,qX:()=>d});var n=r("../../node_modules/viem/_esm/errors/base.js"),i=r("../../node_modules/viem/_esm/utils/data/isHex.js"),s=r("../../node_modules/viem/_esm/utils/data/pad.js"),o=r("../../node_modules/viem/_esm/utils/encoding/fromHex.js"),u=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");let a=new TextEncoder;function l(e,t={}){var r,n;return"number"==typeof e||"bigint"==typeof e?(r=e,n=t,h((0,u.eC)(r,n))):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(r,{size:t.size}),(0,s.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?h(e,t):d(e,t)}let c={zero:48,nine:57,A:65,F:70,a:97,f:102};function f(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function h(e,t={}){let r=e;t.size&&((0,o.Yf)(r,{size:t.size}),r=(0,s.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let u=i.length/2,a=new Uint8Array(u);for(let e=0,t=0;e<u;e++){let r=f(i.charCodeAt(t++)),s=f(i.charCodeAt(t++));if(void 0===r||void 0===s)throw new n.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);a[e]=16*r+s}return a}function d(e,t={}){let r=a.encode(e);return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,s.vk)(r,{dir:"right",size:t.size})):r}},"../../node_modules/viem/_esm/utils/encoding/toHex.js":function(e,t,r){r.d(t,{NC:()=>u,ci:()=>a,eC:()=>l});var n=r("../../node_modules/viem/_esm/errors/encoding.js"),i=r("../../node_modules/viem/_esm/utils/data/pad.js"),s=r("../../node_modules/viem/_esm/utils/encoding/fromHex.js");let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?function(e,t={}){return a(c.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}(e,t):a(e,t)}function a(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=o[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}function l(e,t={}){let r;let{signed:s,size:o}=t,u=BigInt(e);o?r=s?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof r&&s?-r-1n:0;if(r&&u>r||u<a){let t="bigint"==typeof e?"n":"";throw new n.J5({max:r?`${r}${t}`:void 0,min:`${a}${t}`,signed:s,size:o,value:`${e}${t}`})}let c=`0x${(s&&u<0?(1n<<BigInt(8*o))+BigInt(u):u).toString(16)}`;return o?(0,i.vk)(c,{size:o}):c}let c=new TextEncoder},"../../node_modules/viem/_esm/utils/hash/keccak256.js":function(e,t,r){r.d(t,{w:()=>E});var n=r("../../node_modules/@noble/hashes/esm/_assert.js");let i=BigInt(0x100000000-1),s=BigInt(32),o=(e,t,r)=>e<<r|t>>>32-r,u=(e,t,r)=>t<<r|e>>>32-r,a=(e,t,r)=>t<<r-32|e>>>64-r,l=(e,t,r)=>e<<r-32|t>>>64-r;var c=r("../../node_modules/@noble/hashes/esm/utils.js");let f=[],h=[],d=[],_=BigInt(0),p=BigInt(1),b=BigInt(2),m=BigInt(7),y=BigInt(256),v=BigInt(113);for(let e=0,t=p,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],f.push(2*(5*n+r)),h.push((e+1)*(e+2)/2%64);let i=_;for(let e=0;e<7;e++)(t=(t<<p^(t>>m)*v)%y)&b&&(i^=p<<(p<<BigInt(e))-p);d.push(i)}let[w,j]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:u,l:a}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>s&i)}:{h:0|Number(e>>s&i),l:0|Number(e&i)}}(e[o],t);[r[o],n[o]]=[u,a]}return[r,n]}(d,!0),g=(e,t,r)=>r>32?a(e,t,r):o(e,t,r),x=(e,t,r)=>r>32?l(e,t,r):u(e,t,r);class k extends c.kb{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.k8)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,c.Jq)(this.state)}keccak(){c.iA||(0,c.l1)(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],u=g(s,o,1)^r[n],a=x(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=u,e[t+r+1]^=a}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=h[r],s=g(t,i,n),o=x(t,i,n),u=f[r];t=e[u],i=e[u+1],e[u]=s,e[u+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=w[n],e[1]^=j[n]}r.fill(0)}(this.state32,this.rounds),c.iA||(0,c.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.$h)(this);let{blockLen:t,state:r}=this,i=(e=(0,c.O0)(e)).length;for(let n=0;n<i;){let s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.$h)(this,!1),(0,n.gk)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.k8)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.eB)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new k(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}let A=(0,c.hE)(()=>new k(136,1,32));var O=r("../../node_modules/viem/_esm/utils/data/isHex.js"),C=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),S=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");function E(e,t){let r=A((0,O.v)(e,{strict:!1})?(0,C.O0)(e):e);return"bytes"===(t||"hex")?r:(0,S.NC)(r)}},"../../node_modules/viem/_esm/utils/hash/sha256.js":function(e,t,r){r.d(t,{J:()=>_});var n=r("../../node_modules/@noble/hashes/esm/_assert.js"),i=r("../../node_modules/@noble/hashes/esm/utils.js");class s extends i.kb{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,n.$h)(this);let{view:t,buffer:r,blockLen:s}=this,o=(e=(0,i.O0)(e)).length;for(let n=0;n<o;){let u=Math.min(s-this.pos,o-n);if(u===s){let t=(0,i.GL)(e);for(;s<=o-n;n+=s)this.process(t,n);continue}r.set(e.subarray(n,n+u),this.pos),this.pos+=u,n+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.$h)(this),(0,n.eB)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:s,isLE:o}=this,{pos:u}=this;t[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>s-u&&(this.process(r,0),u=0);for(let e=u;e<s;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),s=BigInt(0xffffffff),o=Number(r>>i&s),u=Number(r&s),a=4*!!n,l=4*!n;e.setUint32(t+a,o,n),e.setUint32(t+l,u,n)}(r,s-8,BigInt(8*this.length),o),this.process(r,0);let a=(0,i.GL)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=l/4,f=this.get();if(c>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,f[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:o}=this;return e.length=n,e.pos=o,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}let o=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),u=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),a=new Uint32Array(64);class l extends s{constructor(){super(64,32,8,!1),this.A=0|u[0],this.B=0|u[1],this.C=0|u[2],this.D=0|u[3],this.E=0|u[4],this.F=0|u[5],this.G=0|u[6],this.H=0|u[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:o,H:u}=this;return[e,t,r,n,i,s,o,u]}set(e,t,r,n,i,s,o,u){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|u}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=a[e-15],r=a[e-2],n=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,s=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;a[e]=s+a[e-7]+n+a[e-16]|0}let{A:r,B:n,C:s,D:u,E:l,F:c,G:f,H:h}=this;for(let e=0;e<64;e++){var d,_,p,b;let t=h+((0,i.np)(l,6)^(0,i.np)(l,11)^(0,i.np)(l,25))+((d=l)&c^~d&f)+o[e]+a[e]|0,m=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+((_=r)&(p=n)^_&(b=s)^p&b)|0;h=f,f=c,c=l,l=u+t|0,u=s,s=n,n=r,r=t+m|0}r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,c=c+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,n,s,u,l,c,f,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let c=(0,i.hE)(()=>new l);var f=r("../../node_modules/viem/_esm/utils/data/isHex.js"),h=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),d=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");function _(e,t){let r=c((0,f.v)(e,{strict:!1})?(0,h.O0)(e):e);return"bytes"===(t||"hex")?r:(0,d.NC)(r)}}};
|
|
1
|
+
/*! For license information please see 18.dad4b5ac.js.LICENSE.txt */
|
|
2
|
+
export const __webpack_ids__=["18"];export const __webpack_modules__={"../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPackExtension=void 0,t.JsonPackExtension=class{constructor(e,t){this.tag=e,this.val=t}}},"../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPackValue=void 0,t.JsonPackValue=class{constructor(e){this.val=e}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoder=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js");class s extends n.CborDecoderBase{readAsMap(){let e=this.reader.u8();if(e>>5==5)return this.readMap(31&e);throw 0}readMap(e){let t=this.readMinorLen(e);return t>=0?this.readMapRaw(t):this.readMapIndef()}readMapRaw(e){let t=new Map;for(let r=0;r<e;r++){let e=this.val(),r=this.val();t.set(e,r)}return t}readMapIndef(){let e=new Map;for(;255!==this.reader.peak();){let t=this.val();if(255===this.reader.peak())throw 7;let r=this.val();e.set(t,r)}return this.reader.x++,e}skipN(e){for(let t=0;t<e;t++)this.skipAny()}skipAny(){this.skipAnyRaw(this.reader.u8())}skipAnyRaw(e){let t=31&e;switch(e>>5){case 0:case 1:this.skipUNint(t);break;case 2:this.skipBin(t);break;case 3:this.skipStr(t);break;case 4:this.skipArr(t);break;case 5:this.skipObj(t);break;case 7:this.skipTkn(t);break;case 6:this.skipTag(t)}}skipMinorLen(e){if(e<=23)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1;default:throw 1}}skipUNint(e){if(!(e<=23))switch(e){case 24:return this.reader.skip(1);case 25:return this.reader.skip(2);case 26:return this.reader.skip(4);case 27:return this.reader.skip(8);default:throw 1}}skipBin(e){let t=this.skipMinorLen(e);if(t>=0)this.reader.skip(t);else{for(;255!==this.reader.peak();)this.skipBinChunk();this.reader.x++}}skipBinChunk(){let e=this.reader.u8(),t=31&e;if(2!=e>>5)throw 2;if(t>27)throw 3;this.skipBin(t)}skipStr(e){let t=this.skipMinorLen(e);if(t>=0)this.reader.skip(t);else{for(;255!==this.reader.peak();)this.skipStrChunk();this.reader.x++}}skipStrChunk(){let e=this.reader.u8(),t=31&e;if(3!=e>>5)throw 4;if(t>27)throw 5;this.skipStr(t)}skipArr(e){let t=this.skipMinorLen(e);if(t>=0)this.skipN(t);else{for(;255!==this.reader.peak();)this.skipAny();this.reader.x++}}skipObj(e){let t=this.readMinorLen(e);if(t>=0)return this.skipN(2*t);for(;255!==this.reader.peak();){if(this.skipAny(),255===this.reader.peak())throw 7;this.skipAny()}this.reader.x++}skipTag(e){if(0>this.skipMinorLen(e))throw 1;this.skipAny()}skipTkn(e){switch(e){case 24:this.reader.skip(1);return;case 25:this.reader.skip(2);return;case 26:this.reader.skip(4);return;case 27:this.reader.skip(8);return}if(!(e<=23))throw 1}validate(e,t=0,r=e.length){if(this.reader.reset(e),this.reader.x=t,this.skipAny(),this.reader.x-t!==r)throw 8}decodeLevel(e){return this.reader.reset(e),this.readLevel()}readLevel(){let e=this.reader.u8(),t=e>>5,r=31&e;switch(t){case 4:return this.readArrLevel(r);case 5:return this.readObjLevel(r);default:return super.readAnyRaw(e)}}readPrimitiveOrVal(){switch(this.reader.peak()>>5){case 4:case 5:return this.readAsValue();default:return this.val()}}readAsValue(){let e=this.reader,t=e.x;this.skipAny();let r=e.x;return new i.JsonPackValue(e.uint8.subarray(t,r))}readObjLevel(e){let t=this.readMinorLen(e);return t>=0?this.readObjRawLevel(t):this.readObjIndefLevel()}readObjRawLevel(e){let t={};for(let r=0;r<e;r++){let e=this.key(),r=this.readPrimitiveOrVal();t[e]=r}return t}readObjIndefLevel(){let e={};for(;255!==this.reader.peak();){let t=this.key();if(255===this.reader.peak())throw 7;let r=this.readPrimitiveOrVal();e[t]=r}return this.reader.x++,e}readArrLevel(e){let t=this.readMinorLen(e);return t>=0?this.readArrRawLevel(t):this.readArrIndefLevel()}readArrRawLevel(e){let t=[];for(let r=0;r<e;r++)t.push(this.readPrimitiveOrVal());return t}readArrIndefLevel(){let e=[];for(;255!==this.reader.peak();)e.push(this.readPrimitiveOrVal());return this.reader.x++,e}readHdr(e){let t=this.reader.u8();if(t>>5!==e)throw 0;let r=31&t;if(r<24)return r;switch(r){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1}throw 1}readStrHdr(){return this.readHdr(3)}readObjHdr(){return this.readHdr(5)}readArrHdr(){return this.readHdr(4)}findKey(e){let t=this.readObjHdr();for(let r=0;r<t;r++){if(this.key()===e)return this;this.skipAny()}throw 9}findIndex(e){if(e>=this.readArrHdr())throw 10;for(let t=0;t<e;t++)this.skipAny();return this}find(e){for(let t=0;t<e.length;t++){let r=e[t];"string"==typeof r?this.findKey(r):this.findIndex(r)}return this}}t.CborDecoder=s},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoderBase=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs"),i=r("../../node_modules/@jsonjoy.com/util/lib/buffers/f16.js"),s=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),o=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js"),u=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Reader.js"),a=n.__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/sharedCachedUtf8Decoder.js"));t.CborDecoderBase=class{constructor(e=new u.Reader,t=a.default){this.reader=e,this.keyDecoder=t}read(e){return this.reader.reset(e),this.val()}decode(e){return this.reader.reset(e),this.val()}val(){let e=this.reader.u8(),t=e>>5,r=31&e;return t<4?t<2?0===t?this.readUint(r):this.readNint(r):2===t?this.readBin(r):this.readStr(r):t<6?4===t?this.readArr(r):this.readObj(r):6===t?this.readTag(r):this.readTkn(r)}readAnyRaw(e){let t=e>>5,r=31&e;return t<4?t<2?0===t?this.readUint(r):this.readNint(r):2===t?this.readBin(r):this.readStr(r):t<6?4===t?this.readArr(r):this.readObj(r):6===t?this.readTag(r):this.readTkn(r)}readMinorLen(e){if(e<24)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());case 31:return -1;default:throw 1}}readUint(e){if(e<25)return 24===e?this.reader.u8():e;if(e<27)return 25===e?this.reader.u16():this.reader.u32();{let e=this.reader.u64();return e>0x1fffffffffffff?e:Number(e)}}readNint(e){if(e<25)return 24===e?-this.reader.u8()-1:-e-1;if(e<27)return 25===e?-this.reader.u16()-1:-this.reader.u32()-1;{let e=this.reader.u64();return e>0x1ffffffffffffe?-e-BigInt(1):-Number(e)-1}}readBin(e){let t=this.reader;if(e<=23)return t.buf(e);switch(e){case 24:return t.buf(t.u8());case 25:return t.buf(t.u16());case 26:return t.buf(t.u32());case 27:return t.buf(Number(t.u64()));case 31:{let e=0,t=[];for(;255!==this.reader.peak();){let r=this.readBinChunk();e+=r.length,t.push(r)}this.reader.x++;let r=new Uint8Array(e),n=0,i=t.length;for(let e=0;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r}default:throw 1}}readBinChunk(){let e=this.reader.u8(),t=31&e;if(2!=e>>5)throw 2;if(t>27)throw 3;return this.readBin(t)}readAsStr(){let e=this.reader.u8();if(3!=e>>5)throw 11;return this.readStr(31&e)}readStr(e){let t=this.reader;if(e<=23)return t.utf8(e);switch(e){case 24:return t.utf8(t.u8());case 25:return t.utf8(t.u16());case 26:return t.utf8(t.u32());case 27:return t.utf8(Number(t.u64()));case 31:{let e="";for(;255!==t.peak();)e+=this.readStrChunk();return this.reader.x++,e}default:throw 1}}readStrLen(e){if(e<=23)return e;switch(e){case 24:return this.reader.u8();case 25:return this.reader.u16();case 26:return this.reader.u32();case 27:return Number(this.reader.u64());default:throw 1}}readStrChunk(){let e=this.reader.u8(),t=31&e;if(3!=e>>5)throw 4;if(t>27)throw 5;return this.readStr(t)}readArr(e){let t=this.readMinorLen(e);return t>=0?this.readArrRaw(t):this.readArrIndef()}readArrRaw(e){let t=[];for(let r=0;r<e;r++)t.push(this.val());return t}readArrIndef(){let e=[];for(;255!==this.reader.peak();)e.push(this.val());return this.reader.x++,e}readObj(e){if(e<28){let t=e;switch(e){case 24:t=this.reader.u8();break;case 25:t=this.reader.u16();break;case 26:t=this.reader.u32();break;case 27:t=Number(this.reader.u64())}let r={};for(let e=0;e<t;e++){let e=this.key();if("__proto__"===e)throw 6;let t=this.val();r[e]=t}return r}if(31===e)return this.readObjIndef();throw 1}readObjRaw(e){let t={};for(let r=0;r<e;r++){let e=this.key(),r=this.val();t[e]=r}return t}readObjIndef(){let e={};for(;255!==this.reader.peak();){let t=this.key();if(255===this.reader.peak())throw 7;let r=this.val();e[t]=r}return this.reader.x++,e}key(){let e=this.reader.u8();if(3!=e>>5)return String(this.readAnyRaw(e));let t=this.readStrLen(31&e);if(t>31)return this.reader.utf8(t);let r=this.keyDecoder.decode(this.reader.uint8,this.reader.x,t);return this.reader.skip(t),r}readTag(e){if(e<=23)return this.readTagRaw(e);switch(e){case 24:return this.readTagRaw(this.reader.u8());case 25:return this.readTagRaw(this.reader.u16());case 26:return this.readTagRaw(this.reader.u32());case 27:return this.readTagRaw(Number(this.reader.u64()));default:throw 1}}readTagRaw(e){return new s.JsonPackExtension(e,this.val())}readTkn(e){switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 24:return new o.JsonPackValue(this.reader.u8());case 25:return this.f16();case 26:return this.reader.f32();case 27:return this.reader.f64()}if(e<=23)return new o.JsonPackValue(e);throw 1}f16(){return(0,i.decodeF16)(this.reader.u16())}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderDag.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborDecoderDag=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js");class s extends i.CborDecoder{readTagRaw(e){let t=this.val();return 42===e?new n.JsonPackExtension(e,t):t}}t.CborDecoderDag=s},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoder=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/isFloat32.js"),i=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackExtension.js"),s=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js"),o=r("../../node_modules/@jsonjoy.com/json-pack/lib/JsonPackValue.js");class u extends s.CborEncoderFast{writeUnknown(e){this.writeNull()}writeAny(e){switch(typeof e){case"number":return this.writeNumber(e);case"string":return this.writeStr(e);case"boolean":return this.writer.u8(244+ +e);case"object":if(!e)return this.writer.u8(246);switch(e.constructor){case Object:return this.writeObj(e);case Array:return this.writeArr(e);case Uint8Array:return this.writeBin(e);case Map:return this.writeMap(e);case i.JsonPackExtension:return this.writeTag(e.tag,e.val);case o.JsonPackValue:let t=e.val;return this.writer.buf(t,t.length);default:if(e instanceof Uint8Array)return this.writeBin(e);if(Array.isArray(e))return this.writeArr(e);if(e instanceof Map)return this.writeMap(e);return this.writeUnknown(e)}case"undefined":return this.writeUndef();case"bigint":return this.writeBigInt(e);default:return this.writeUnknown(e)}}writeFloat(e){(0,n.isFloat32)(e)?this.writer.u8f32(250,e):this.writer.u8f64(251,e)}writeMap(e){this.writeMapHdr(e.size),e.forEach((e,t)=>{this.writeAny(t),this.writeAny(e)})}writeUndef(){this.writer.u8(247)}}t.CborEncoder=u},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderDag.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderDag=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js");class i extends n.CborEncoderStable{writeUndef(){this.writeNull()}writeFloat(e){if(e!=e||!Number.isFinite(e))return this.writeNull();this.writer.u8f64(251,e)}writeTag(e,t){42===e&&this.writeTagHdr(e),this.writeAny(t)}}t.CborEncoderDag=i},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderFast=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Writer.js"),i=Number.isSafeInteger;t.CborEncoderFast=class{constructor(e=new n.Writer){this.writer=e}encode(e){return this.writeAny(e),this.writer.flush()}encodeToSlice(e){return this.writeAny(e),this.writer.flushSlice()}writeAny(e){switch(typeof e){case"number":return this.writeNumber(e);case"string":return this.writeStr(e);case"boolean":return this.writer.u8(244+ +e);case"object":if(!e)return this.writer.u8(246);if(e.constructor===Array)return this.writeArr(e);return this.writeObj(e)}}writeCbor(){this.writer.u8u16(217,55799)}writeEnd(){this.writer.u8(255)}writeNull(){this.writer.u8(246)}writeBoolean(e){e?this.writer.u8(245):this.writer.u8(244)}writeNumber(e){i(e)?this.writeInteger(e):"bigint"==typeof e?this.writeBigInt(e):this.writeFloat(e)}writeBigInt(e){e>=0?this.writeBigUint(e):this.writeBigSint(e)}writeBigUint(e){if(e<=Number.MAX_SAFE_INTEGER)return this.writeUInteger(Number(e));this.writer.u8u64(27,e)}writeBigSint(e){if(e>=Number.MIN_SAFE_INTEGER)return this.encodeNint(Number(e));let t=-BigInt(1)-e;this.writer.u8u64(59,t)}writeInteger(e){e>=0?this.writeUInteger(e):this.encodeNint(e)}writeUInteger(e){let t=this.writer;t.ensureCapacity(9);let r=t.uint8,n=t.x;e<=23?r[n++]=0+e:e<=255?(r[n++]=24,r[n++]=e):e<=65535?(r[n++]=25,t.view.setUint16(n,e),n+=2):e<=0xffffffff?(r[n++]=26,t.view.setUint32(n,e),n+=4):(r[n++]=27,t.view.setBigUint64(n,BigInt(e)),n+=8),t.x=n}encodeNumber(e){this.writeNumber(e)}encodeInteger(e){this.writeInteger(e)}encodeUint(e){this.writeUInteger(e)}encodeNint(e){let t=-1-e,r=this.writer;r.ensureCapacity(9);let n=r.uint8,i=r.x;t<24?n[i++]=32+t:t<=255?(n[i++]=56,n[i++]=t):t<=65535?(n[i++]=57,r.view.setUint16(i,t),i+=2):t<=0xffffffff?(n[i++]=58,r.view.setUint32(i,t),i+=4):(n[i++]=59,r.view.setBigUint64(i,BigInt(t)),i+=8),r.x=i}writeFloat(e){this.writer.u8f64(251,e)}writeBin(e){let t=e.length;this.writeBinHdr(t),this.writer.buf(e,t)}writeBinHdr(e){let t=this.writer;e<=23?t.u8(64+e):e<=255?t.u16(22528+e):e<=65535?t.u8u16(89,e):e<=0xffffffff?t.u8u32(90,e):t.u8u64(91,e)}writeStr(e){let t=this.writer,r=4*e.length;t.ensureCapacity(5+r);let n=t.uint8,i=t.x;r<=23?t.x++:r<=255?(n[t.x++]=120,i=t.x,t.x++):r<=65535?(n[t.x++]=121,i=t.x,t.x+=2):(n[t.x++]=122,i=t.x,t.x+=4);let s=t.utf8(e);r<=23?n[i]=96+s:r<=255?n[i]=s:r<=65535?t.view.setUint16(i,s):t.view.setUint32(i,s)}writeStrHdr(e){let t=this.writer;e<=23?t.u8(96+e):e<=255?t.u16(30720+e):e<=65535?t.u8u16(121,e):t.u8u32(122,e)}writeAsciiStr(e){this.writeStrHdr(e.length),this.writer.ascii(e)}writeArr(e){let t=e.length;this.writeArrHdr(t);for(let r=0;r<t;r++)this.writeAny(e[r])}writeArrHdr(e){let t=this.writer;e<=23?t.u8(128+e):e<=255?t.u16(38912+e):e<=65535?t.u8u16(153,e):e<=0xffffffff?t.u8u32(154,e):t.u8u64(155,e)}writeObj(e){let t=Object.keys(e),r=t.length;this.writeObjHdr(r);for(let n=0;n<r;n++){let r=t[n];this.writeStr(r),this.writeAny(e[r])}}writeObjHdr(e){let t=this.writer;e<=23?t.u8(160+e):e<=255?t.u16(47104+e):e<=65535?t.u8u16(185,e):e<=0xffffffff?t.u8u32(186,e):t.u8u64(187,e)}writeMapHdr(e){this.writeObjHdr(e)}writeStartMap(){this.writer.u8(191)}writeTag(e,t){this.writeTagHdr(e),this.writeAny(t)}writeTagHdr(e){let t=this.writer;e<=23?t.u8(192+e):e<=255?t.u16(55296+e):e<=65535?t.u8u16(217,e):e<=0xffffffff?t.u8u32(218,e):t.u8u64(219,e)}writeTkn(e){let t=this.writer;e<=23?t.u8(224+e):e<=255&&t.u16(63488+e)}writeStartStr(){this.writer.u8(127)}writeStrChunk(e){throw Error("Not implemented")}writeEndStr(){throw Error("Not implemented")}writeStartBin(){this.writer.u8(95)}writeBinChunk(e){throw Error("Not implemented")}writeEndBin(){throw Error("Not implemented")}writeStartArr(){this.writer.u8(159)}writeArrChunk(e){throw Error("Not implemented")}writeEndArr(){this.writer.u8(255)}writeStartObj(){this.writer.u8(191)}writeObjChunk(e,t){throw Error("Not implemented")}writeEndObj(){this.writer.u8(255)}}},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CborEncoderStable=void 0;let n=r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js"),i=r("../../node_modules/@jsonjoy.com/util/lib/sort/insertion2.js"),s=r("../../node_modules/@jsonjoy.com/util/lib/objKeyCmp.js"),o=e=>e<=23?1:e<=255?2:e<=65535?3:5;class u extends n.CborEncoder{writeObj(e){let t=Object.keys(e);(0,i.sort)(t,s.objKeyCmp);let r=t.length;this.writeObjHdr(r);for(let n=0;n<r;n++){let r=t[n];this.writeStr(r),this.writeAny(e[r])}}writeStr(e){let t=this.writer,r=e.length,n=4*r;t.ensureCapacity(5+n);let i=o(r),s=t.x,u=s+i;t.x=u;let a=t.utf8(e),l=t.uint8,c=o(a);switch(c!==i&&l.copyWithin(u+(c-i),u,u+a),c){case 1:l[s]=96+a;break;case 2:l[s]=120,l[s+1]=a;break;case 3:l[s]=121,t.view.setUint16(s+1,a);break;case 5:l[s]=122,t.view.setUint32(s+1,a)}t.x=s+c+a}writeUndef(){this.writeNull()}}t.CborEncoderStable=u},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/tslib/tslib.es6.mjs");n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/types.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderFast.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoder.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderStable.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborEncoderDag.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderBase.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoder.js"),t),n.__exportStar(r("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/CborDecoderDag.js"),t)},"../../node_modules/@jsonjoy.com/json-pack/lib/cbor/types.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},"../../node_modules/@jsonjoy.com/util/lib/buffers/Reader.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/index.js");t.Reader=class{constructor(){this.uint8=new Uint8Array([]),this.view=new DataView(this.uint8.buffer),this.x=0}reset(e){this.x=0,this.uint8=e,this.view=new DataView(e.buffer,e.byteOffset,e.length)}peak(){return this.view.getUint8(this.x)}skip(e){this.x+=e}buf(e){let t=this.x+e,r=this.uint8.subarray(this.x,t);return this.x=t,r}u8(){return this.uint8[this.x++]}i8(){return this.view.getInt8(this.x++)}u16(){let e=this.x,t=(this.uint8[e++]<<8)+this.uint8[e++];return this.x=e,t}i16(){let e=this.view.getInt16(this.x);return this.x+=2,e}u32(){let e=this.view.getUint32(this.x);return this.x+=4,e}i32(){let e=this.view.getInt32(this.x);return this.x+=4,e}u64(){let e=this.view.getBigUint64(this.x);return this.x+=8,e}i64(){let e=this.view.getBigInt64(this.x);return this.x+=8,e}f32(){let e=this.x;return this.x+=4,this.view.getFloat32(e)}f64(){let e=this.x;return this.x+=8,this.view.getFloat64(e)}utf8(e){let t=this.x;return this.x+=e,(0,n.decodeUtf8)(this.uint8,t,e)}ascii(e){let t=this.uint8,r="",n=this.x+e;for(let e=this.x;e<n;e++)r+=String.fromCharCode(t[e]);return this.x=n,r}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/Slice.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Slice=void 0,t.Slice=class{constructor(e,t,r,n){this.uint8=e,this.view=t,this.start=r,this.end=n}subarray(){return this.uint8.subarray(this.start,this.end)}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/Writer.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Writer=void 0;let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/Slice.js"),i=new DataView(new Uint8Array([]).buffer),s="function"==typeof Buffer,o=s?Buffer.prototype.utf8Write:null,u=s?Buffer.from:null,a="undefined"!=typeof TextEncoder?new TextEncoder:null;t.Writer=class{constructor(e=65536){this.allocSize=e,this.view=i,this.x0=0,this.x=0,this.uint8=new Uint8Array(e),this.size=e,this.view=new DataView(this.uint8.buffer)}grow(e){let t=this.x0,r=this.x,n=this.uint8,i=new Uint8Array(e),s=new DataView(i.buffer),o=n.subarray(t,r);i.set(o,0),this.x=r-t,this.x0=0,this.uint8=i,this.size=e,this.view=s}ensureCapacity(e){let t=this.size,r=t-this.x;if(r<e){let n=t-this.x0+(e-r);this.grow(n<=this.allocSize?this.allocSize:2*n)}}move(e){this.ensureCapacity(e),this.x+=e}reset(){this.x0=this.x}newBuffer(e){let t=this.uint8=new Uint8Array(e);this.size=e,this.view=new DataView(t.buffer),this.x=this.x0=0}flush(){let e=this.uint8.subarray(this.x0,this.x);return this.x0=this.x,e}flushSlice(){let e=new n.Slice(this.uint8,this.view,this.x0,this.x);return this.x0=this.x,e}u8(e){this.ensureCapacity(1),this.uint8[this.x++]=e}u16(e){this.ensureCapacity(2),this.view.setUint16(this.x,e),this.x+=2}u32(e){this.ensureCapacity(4),this.view.setUint32(this.x,e),this.x+=4}i32(e){this.ensureCapacity(4),this.view.setInt32(this.x,e),this.x+=4}u64(e){this.ensureCapacity(8),this.view.setBigUint64(this.x,BigInt(e)),this.x+=8}f64(e){this.ensureCapacity(8),this.view.setFloat64(this.x,e),this.x+=8}u8u16(e,t){this.ensureCapacity(3);let r=this.x;this.uint8[r++]=e,this.uint8[r++]=t>>>8,this.uint8[r++]=255&t,this.x=r}u8u32(e,t){this.ensureCapacity(5);let r=this.x;this.uint8[r++]=e,this.view.setUint32(r,t),this.x=r+4}u8u64(e,t){this.ensureCapacity(9);let r=this.x;this.uint8[r++]=e,this.view.setBigUint64(r,BigInt(t)),this.x=r+8}u8f32(e,t){this.ensureCapacity(5);let r=this.x;this.uint8[r++]=e,this.view.setFloat32(r,t),this.x=r+4}u8f64(e,t){this.ensureCapacity(9);let r=this.x;this.uint8[r++]=e,this.view.setFloat64(r,t),this.x=r+8}buf(e,t){this.ensureCapacity(t);let r=this.x;this.uint8.set(e,r),this.x=r+t}utf8(e){let t=4*e.length;if(t<168)return this.utf8Native(e);if(o){let r=o.call(this.uint8,e,this.x,t);return this.x+=r,r}if(u){let r=this.uint8,n=r.byteOffset+this.x,i=u(r.buffer).subarray(n,n+t).write(e,0,t,"utf8");return this.x+=i,i}if(t>1024&&a){let r=a.encodeInto(e,this.uint8.subarray(this.x,this.x+t)).written;return this.x+=r,r}return this.utf8Native(e)}utf8Native(e){let t=e.length,r=this.uint8,n=this.x,i=0;for(;i<t;){let s=e.charCodeAt(i++);if((0xffffff80&s)==0){r[n++]=s;continue}if((0xfffff800&s)==0)r[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&i<t){let t=e.charCodeAt(i);(64512&t)==56320&&(i++,s=((1023&s)<<10)+(1023&t)+65536)}(0xffff0000&s)==0?r[n++]=s>>12&15|224:(r[n++]=s>>18&7|240,r[n++]=s>>12&63|128),r[n++]=s>>6&63|128}r[n++]=63&s|128}let s=n-this.x;return this.x=n,s}ascii(e){let t=e.length;this.ensureCapacity(t);let r=this.uint8,n=this.x,i=0;for(;i<t;)r[n++]=e.charCodeAt(i++);this.x=n}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/f16.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeF16=void 0;let r=Math.pow;t.decodeF16=e=>{let t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:r(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}},"../../node_modules/@jsonjoy.com/util/lib/buffers/isFloat32.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFloat32=void 0;let r=new DataView(new ArrayBuffer(4));t.isFloat32=e=>(r.setFloat32(0,e),e===r.getFloat32(0))},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/CachedUtf8Decoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CachedUtf8Decoder=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs").__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v10.js")),i=1+Math.round(0xfffffffe*Math.random());class s{constructor(e,t){this.bytes=e,this.value=t}}t.CachedUtf8Decoder=class{constructor(){this.caches=[];for(let e=0;e<31;e++)this.caches.push([])}get(e,t,r){let n=this.caches[r-1],i=n.length;e:for(let s=0;s<i;s++){let i=n[s],o=i.bytes;for(let n=0;n<r;n++)if(o[n]!==e[t+n])continue e;return i.value}return null}store(e,t){let r=this.caches[e.length-1],n=new s(e,t);if(r.length>=16)r[i^=i<<13,i^=i>>>17,((i^=i<<5)>>>0)%16+0]=n;else r.push(n)}decode(e,t,r){if(!r)return"";let i=this.get(e,t,r);if(null!==i)return i;let s=(0,n.default)(e,t,r),o=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(o,s),s}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeAscii.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAsciiMax15=t.decodeAscii=void 0;let r=String.fromCharCode;t.decodeAscii=(e,t,n)=>{let i=[];for(let r=0;r<n;r++){let r=e[t++];if(128&r)return;i.push(r)}return r.apply(String,i)},t.decodeAsciiMax15=(e,t,n)=>{if(n<4){if(n<2){if(0===n)return"";{let n=e[t++];if((128&n)>1){t-=1;return}return r(n)}}{let i=e[t++],s=e[t++];if((128&i)>0||(128&s)>0){t-=2;return}if(n<3)return r(i,s);let o=e[t++];if((128&o)>0){t-=3;return}return r(i,s,o)}}{let i=e[t++],s=e[t++],o=e[t++],u=e[t++];if((128&i)>0||(128&s)>0||(128&o)>0||(128&u)>0){t-=4;return}if(n<6){if(4===n)return r(i,s,o,u);{let n=e[t++];if((128&n)>0){t-=5;return}return r(i,s,o,u,n)}}if(n<8){let a=e[t++],l=e[t++];if((128&a)>0||(128&l)>0){t-=6;return}if(n<7)return r(i,s,o,u,a,l);let c=e[t++];if((128&c)>0){t-=7;return}return r(i,s,o,u,a,l,c)}{let a=e[t++],l=e[t++],c=e[t++],f=e[t++];if((128&a)>0||(128&l)>0||(128&c)>0||(128&f)>0){t-=8;return}if(n<10){if(8===n)return r(i,s,o,u,a,l,c,f);{let n=e[t++];if((128&n)>0){t-=9;return}return r(i,s,o,u,a,l,c,f,n)}}if(n<12){let h=e[t++],d=e[t++];if((128&h)>0||(128&d)>0){t-=10;return}if(n<11)return r(i,s,o,u,a,l,c,f,h,d);let _=e[t++];if((128&_)>0){t-=11;return}return r(i,s,o,u,a,l,c,f,h,d,_)}{let h=e[t++],d=e[t++],_=e[t++],p=e[t++];if((128&h)>0||(128&d)>0||(128&_)>0||(128&p)>0){t-=12;return}if(n<14){if(12===n)return r(i,s,o,u,a,l,c,f,h,d,_,p);{let n=e[t++];if((128&n)>0){t-=13;return}return r(i,s,o,u,a,l,c,f,h,d,_,p,n)}}{let b=e[t++],m=e[t++];if((128&b)>0||(128&m)>0){t-=14;return}if(n<15)return r(i,s,o,u,a,l,c,f,h,d,_,p,b,m);let y=e[t++];if((128&y)>0){t-=15;return}return r(i,s,o,u,a,l,c,f,h,d,_,p,b,m,y)}}}}}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeUtf8=void 0;let n=r("../../node_modules/tslib/tslib.es6.mjs").__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v16.js"));t.decodeUtf8=n.default},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v10.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=String.fromCharCode;t.default=(e,t,n)=>{let i=t,s=i+n,o="";for(;i<s;){let t=e[i++];if((128&t)==0){o+=r(t);continue}let n=63&e[i++];if((224&t)==192){o+=r((31&t)<<6|n);continue}let s=63&e[i++];if((240&t)==224){o+=r((31&t)<<12|n<<6|s);continue}if((248&t)==240){let u=(7&t)<<18|n<<12|s<<6|63&e[i++];u>65535?o+=r((u-=65536)>>>10&1023|55296,u=56320|1023&u):o+=r(u)}else o+=r(t)}return o}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v16.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/tslib/tslib.es6.mjs"),i=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeAscii.js"),s=n.__importDefault(r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v18.js")),o="undefined"!=typeof Buffer,u=o?Buffer.prototype.utf8Slice:null,a=o?Buffer.from:null,l=(e,t,r)=>(0,i.decodeAsciiMax15)(e,t,r)??(0,s.default)(e,t,r),c=(e,t,r)=>(0,i.decodeAscii)(e,t,r)??(0,s.default)(e,t,r),f=u?(e,t,r)=>u.call(e,t,t+r):a?(e,t,r)=>a(e).subarray(t,t+r).toString("utf8"):s.default;t.default=(e,t,r)=>r<16?l(e,t,r):r<32?c(e,t,r):f(e,t,r)},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/decodeUtf8/v18.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=String.fromCharCode;t.default=(e,t,n)=>{let i=t,s=i+n,o=[];for(;i<s;){let t=e[i++];if((128&t)!=0){let r=63&e[i++];if((224&t)==192)t=(31&t)<<6|r;else{let n=63&e[i++];if((240&t)==224)t=(31&t)<<12|r<<6|n;else if((248&t)==240){let s=(7&t)<<18|r<<12|n<<6|63&e[i++];if(s>65535){let e=(s-=65536)>>>10&1023|55296;t=56320|1023&s,o.push(e)}else t=s}}}o.push(t)}return r.apply(String,o)}},"../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/sharedCachedUtf8Decoder.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r("../../node_modules/@jsonjoy.com/util/lib/buffers/utf8/CachedUtf8Decoder.js");t.default=new n.CachedUtf8Decoder},"../../node_modules/@jsonjoy.com/util/lib/objKeyCmp.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.objKeyCmp=void 0,t.objKeyCmp=(e,t)=>{let r=e.length,n=t.length;return r===n?e>t?1:-1:r-n}},"../../node_modules/@jsonjoy.com/util/lib/sort/insertion2.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sort=void 0,t.sort=(e,t)=>{let r=e.length;for(let n=1;n<r;n++){let r=e[n],i=n;for(;0!==i&&t(e[i-1],r)>0;)e[i]=e[i-1],i--;e[i]=r}return e}},"../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js":function(e,t,r){r.d(t,{Z:()=>h});var n=r("../../node_modules/preact/dist/preact.module.js");function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var s=["context","children"];function o(e){this.getChildContext=function(){return e.context};var t=e.children,r=function(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)t.indexOf(r=s[n])>=0||(i[r]=e[r]);return i}(e,s);return(0,n.Tm)(t,r)}function u(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=(0,n.h)(o,i({},this._props,{context:e.detail.context}),function e(t,r){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],s={},o=0,u=t.attributes,l=t.childNodes;for(o=u.length;o--;)"slot"!==u[o].name&&(s[u[o].name]=u[o].value,s[a(u[o].name)]=u[o].value);for(o=l.length;o--;){var c=e(l[o],null),h=l[o].slot;h?s[h]=(0,n.h)(f,{name:h},c):i[o]=c}var d=r?(0,n.h)(f,null,i):i;return(0,n.h)(r||t.nodeName.toLowerCase(),s,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?n.ZB:n.sY)(this._vdom,this._root)}function a(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function l(e,t,r){if(this._vdom){var i={};i[e]=r=null==r?void 0:r,i[a(e)]=r,this._vdom=(0,n.Tm)(this._vdom,i),(0,n.sY)(this._vdom,this._root)}}function c(){(0,n.sY)(this._vdom=null,this._root)}function f(e,t){var r=this;return(0,n.h)("slot",i({},e,{ref:function(e){e?(r.ref=e,r._listener||(r._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",r._listener))):r.ref.removeEventListener("_preact",r._listener)}}))}function h(e,t,r,n){function i(){var t=Reflect.construct(HTMLElement,[],i);return t._vdomComponent=e,t._root=n&&n.shadow?t.attachShadow({mode:n.mode||"open"}):t,t}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=u,i.prototype.attributeChangedCallback=l,i.prototype.disconnectedCallback=c,r=r||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=r,r.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var r=typeof t;null!=t&&"string"!==r&&"boolean"!==r&&"number"!==r||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i)}},"../../node_modules/preact/dist/preact.module.js":function(e,t,r){r.d(t,{HY:()=>g,Tm:()=>D,YM:()=>i,ZB:()=>T,az:()=>w,bR:()=>function e(t,r){return r=r||[],null==t||"boolean"==typeof t||(m(t)?t.some(function(t){e(t,r)}):r.push(t)),r},h:()=>w,sY:()=>N,wA:()=>x});var n,i,s,o,u,a,l,c,f,h,d,_={},p=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function y(e,t){for(var r in t)e[r]=t[r];return e}function v(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,r){var i,s,o,u={};for(o in t)"key"==o?i=t[o]:"ref"==o?s=t[o]:u[o]=t[o];if(arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===u[o]&&(u[o]=e.defaultProps[o]);return j(e,u,i,s,null)}function j(e,t,r,n,o){var u={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++s:o,__i:-1,__u:0};return null==o&&null!=i.vnode&&i.vnode(u),u}function g(e){return e.children}function x(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?k(e):null}function A(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!O.__r++||u!==i.debounceRendering)&&((u=i.debounceRendering)||a)(O)}function O(){for(var e,t,r,n,s,u,a=1;o.length;)o.length>a&&o.sort(l),e=o.shift(),a=o.length,e.__d&&(t=void 0,n=(r=e.__v).__e,s=[],u=[],e.__P&&((t=y({},r)).__v=r.__v+1,i.vnode&&i.vnode(t),U(e.__P,t,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,s,null==n?k(r):n,!!(32&r.__u),u),t.__v=r.__v,t.__.__k[t.__i]=t,M(s,t,u),t.__e!=n&&function e(t){var r,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,r=0;r<t.__k.length;r++)if(null!=(n=t.__k[r])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return e(t)}}(t)));O.__r=0}function C(e,t,r,n,s,o,u,a,l,c,f){var h,d,b,y,w,x,A=n&&n.__k||p,O=t.length;for(l=function(e,t,r,n,s){var o,u,a,l,c,f=r.length,h=f,d=0;for(e.__k=Array(s),o=0;o<s;o++)null!=(u=t[o])&&"boolean"!=typeof u&&"function"!=typeof u?(l=o+d,(u=e.__k[o]="string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?j(null,u,null,null,null):m(u)?j(g,{children:u},null,null,null):void 0===u.constructor&&u.__b>0?j(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):u).__=e,u.__b=e.__b+1,a=null,-1!==(c=u.__i=function(e,t,r,n){var i,s,o=e.key,u=e.type,a=t[r];if(null===a&&null==e.key||a&&o==a.key&&u===a.type&&0==(2&a.__u))return r;if(n>+(null!=a&&0==(2&a.__u)))for(i=r-1,s=r+1;i>=0||s<t.length;){if(i>=0){if((a=t[i])&&0==(2&a.__u)&&o==a.key&&u===a.type)return i;i--}if(s<t.length){if((a=t[s])&&0==(2&a.__u)&&o==a.key&&u===a.type)return s;s++}}return -1}(u,r,l,h))&&(h--,(a=r[c])&&(a.__u|=2)),null==a||null===a.__v?(-1==c&&(s>f?d--:s<f&&d++),"function"!=typeof u.type&&(u.__u|=4)):c!=l&&(c==l-1?d--:c==l+1?d++:(c>l?d--:d++,u.__u|=4))):e.__k[o]=null;if(h)for(o=0;o<f;o++)null!=(a=r[o])&&0==(2&a.__u)&&(a.__e==n&&(n=k(a)),function e(t,r,n){var s,o;if(i.unmount&&i.unmount(t),(s=t.ref)&&(s.current&&s.current!==t.__e||I(s,null,r)),null!=(s=t.__c)){if(s.componentWillUnmount)try{s.componentWillUnmount()}catch(e){i.__e(e,r)}s.base=s.__P=null}if(s=t.__k)for(o=0;o<s.length;o++)s[o]&&e(s[o],r,n||"function"!=typeof t.type);n||v(t.__e),t.__c=t.__=t.__e=void 0}(a,a));return n}(r,t,A,l,O),h=0;h<O;h++)null!=(b=r.__k[h])&&(d=-1===b.__i?_:A[b.__i]||_,b.__i=h,x=U(e,b,d,s,o,u,a,l,c,f),y=b.__e,b.ref&&d.ref!=b.ref&&(d.ref&&I(d.ref,null,b),f.push(b.ref,b.__c||y,b)),null==w&&null!=y&&(w=y),4&b.__u||d.__k===b.__k?l=function e(t,r,n){var i,s;if("function"==typeof t.type){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,r=e(i[s],r,n));return r}t.__e!=r&&(r&&t.type&&!n.contains(r)&&(r=k(t)),n.insertBefore(t.__e,r||null),r=t.__e);do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType);return r}(b,l,e):"function"==typeof b.type&&void 0!==x?l=x:y&&(l=y.nextSibling),b.__u&=-7);return r.__e=w,l}function S(e,t,r){"-"==t[0]?e.setProperty(t,null==r?"":r):e[t]=null==r?"":"number"!=typeof r||b.test(t)?r:r+"px"}function E(e,t,r,n,i){var s;t:if("style"==t){if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof n&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||S(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||S(e.style,t,r[t])}}else if("o"==t[0]&&"n"==t[1])s=t!=(t=t.replace(c,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=r,r?n?r.t=n.t:(r.t=f,e.addEventListener(t,s?d:h,s)):e.removeEventListener(t,s?d:h,s);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==r?"":r;break t}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==r?"":r))}}function P(e){return function(t){if(this.l){var r=this.l[t.type+e];if(null==t.u)t.u=f++;else if(t.u<r.t)return;return r(i.event?i.event(t):t)}}}function U(e,t,r,s,o,u,a,l,c,f){var h,d,p,b,w,j,A,O,S,P,U,M,I,N,T,D,H,L=t.type;if(void 0!==t.constructor)return null;128&r.__u&&(c=!!(32&r.__u),u=[l=t.__e=r.__e]),(h=i.__b)&&h(t);t:if("function"==typeof L)try{if(O=t.props,S="prototype"in L&&L.prototype.render,P=(h=L.contextType)&&s[h.__c],U=h?P?P.props.value:h.__:s,r.__c?A=(d=t.__c=r.__c).__=d.__E:(S?t.__c=d=new L(O,U):(t.__c=d=new x(O,U),d.constructor=L,d.render=B),P&&P.sub(d),d.props=O,d.state||(d.state={}),d.context=U,d.__n=s,p=d.__d=!0,d.__h=[],d._sb=[]),S&&null==d.__s&&(d.__s=d.state),S&&null!=L.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=y({},d.__s)),y(d.__s,L.getDerivedStateFromProps(O,d.__s))),b=d.props,w=d.state,d.__v=t,p)S&&null==L.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),S&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(S&&null==L.getDerivedStateFromProps&&O!==b&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(O,U),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(O,d.__s,U)||t.__v==r.__v)){for(t.__v!=r.__v&&(d.props=O,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(e){e&&(e.__=t)}),M=0;M<d._sb.length;M++)d.__h.push(d._sb[M]);d._sb=[],d.__h.length&&a.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(O,d.__s,U),S&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(b,w,j)})}if(d.context=U,d.props=O,d.__P=e,d.__e=!1,I=i.__r,N=0,S){for(d.state=d.__s,d.__d=!1,I&&I(t),h=d.render(d.props,d.state,d.context),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[]}else do d.__d=!1,I&&I(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++N<25);d.state=d.__s,null!=d.getChildContext&&(s=y(y({},s),d.getChildContext())),S&&!p&&null!=d.getSnapshotBeforeUpdate&&(j=d.getSnapshotBeforeUpdate(b,w)),D=h,null!=h&&h.type===g&&null==h.key&&(D=function e(t){return"object"!=typeof t||null==t?t:m(t)?t.map(e):y({},t)}(h.props.children)),l=C(e,m(D)?D:[D],t,r,s,o,u,a,l,c,f),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),A&&(d.__E=d.__=null)}catch(e){if(t.__v=null,c||null!=u){if(e.then){for(t.__u|=c?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;u[u.indexOf(l)]=null,t.__e=l}else for(H=u.length;H--;)v(u[H])}else t.__e=r.__e,t.__k=r.__k;i.__e(e,t,r)}else null==u&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=function(e,t,r,s,o,u,a,l,c){var f,h,d,p,b,y,w,j=r.props,g=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=u){for(f=0;f<u.length;f++)if((b=u[f])&&"setAttribute"in b==!!x&&(x?b.localName==x:3==b.nodeType)){e=b,u[f]=null;break}}if(null==e){if(null==x)return document.createTextNode(g);e=document.createElementNS(o,x,g.is&&g),l&&(i.__m&&i.__m(t,u),l=!1),u=null}if(null===x)j===g||l&&e.data===g||(e.data=g);else{if(u=u&&n.call(e.childNodes),j=r.props||_,!l&&null!=u)for(j={},f=0;f<e.attributes.length;f++)j[(b=e.attributes[f]).name]=b.value;for(f in j)if(b=j[f],"children"==f);else if("dangerouslySetInnerHTML"==f)d=b;else if(!(f in g)){if("value"==f&&"defaultValue"in g||"checked"==f&&"defaultChecked"in g)continue;E(e,f,null,b,o)}for(f in g)b=g[f],"children"==f?p=b:"dangerouslySetInnerHTML"==f?h=b:"value"==f?y=b:"checked"==f?w=b:l&&"function"!=typeof b||j[f]===b||E(e,f,b,j[f],o);if(h)l||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),C("template"===t.type?e.content:e,m(p)?p:[p],t,r,s,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,u,a,u?u[0]:r.__k&&k(r,0),l,c),null!=u)for(f=u.length;f--;)v(u[f]);l||(f="value","progress"==x&&null==y?e.removeAttribute("value"):void 0===y||y===e[f]&&("progress"!=x||y)&&("option"!=x||y===j[f])||E(e,f,y,j[f],o),f="checked",void 0!==w&&w!==e[f]&&E(e,f,w,j[f],o))}return e}(r.__e,t,r,s,o,u,a,c,f);return(h=i.diffed)&&h(t),128&t.__u?void 0:l}function M(e,t,r){for(var n=0;n<r.length;n++)I(r[n],r[++n],r[++n]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function I(e,t,r){try{if("function"==typeof e){var n="function"==typeof e.__u;n&&e.__u(),n&&null==t||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,r)}}function B(e,t,r){return this.constructor(e,r)}function N(e,t,r){var s,o,u,a;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(s="function"==typeof r)?null:r&&r.__k||t.__k,u=[],a=[],U(t,e=(!s&&r||t).__k=w(g,null,[e]),o||_,_,t.namespaceURI,!s&&r?[r]:o?null:t.firstChild?n.call(t.childNodes):null,u,!s&&r?r:o?o.__e:t.firstChild,s,a),M(u,e,a)}function T(e,t){N(e,t,T)}function D(e,t,r){var i,s,o,u,a=y({},e.props);for(o in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)"key"==o?i=t[o]:"ref"==o?s=t[o]:a[o]=void 0===t[o]&&void 0!==u?u[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),j(e.type,a,i||e.key,s||e.ref,null)}n=p.slice,i={__e:function(e,t,r,n){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},s=0,x.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof e&&(e=e(y({},r),this.props)),e&&y(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),A(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),A(this))},x.prototype.render=g,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},O.__r=0,c=/(PointerCapture)$|Capture$/i,f=0,h=P(!1),d=P(!0)},"../../node_modules/preact/hooks/dist/hooks.module.js":function(e,t,r){r.d(t,{I4:()=>j,Ye:()=>w,d4:()=>v,eJ:()=>y});var n,i,s,o,u=r("../../node_modules/preact/dist/preact.module.js"),a=0,l=[],c=u.YM,f=c.__b,h=c.__r,d=c.diffed,_=c.__c,p=c.unmount,b=c.__;function m(e,t){c.__h&&c.__h(i,e,a||t),a=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function y(e){return a=1,function(e,t,r){var s=m(n++,2);if(s.t=e,!s.__c&&(s.__=[C(void 0,t),function(e){var t=s.__N?s.__N[0]:s.__[0],r=s.t(t,e);t!==r&&(s.__N=[r,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.__f)){var o=function(e,t,r){if(!s.__c.__H)return!0;var n=s.__c.__H.__.filter(function(e){return!!e.__c});if(n.every(function(e){return!e.__N}))return!u||u.call(this,e,t,r);var i=s.__c.props!==e;return n.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),u&&u.call(this,e,t,r)||i};i.__f=!0;var u=i.shouldComponentUpdate,a=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=u;u=void 0,o(e,t,r),u=n}a&&a.call(this,e,t,r)},i.shouldComponentUpdate=o}return s.__N||s.__}(C,e)}function v(e,t){var r=m(n++,3);!c.__s&&O(r.__H,t)&&(r.__=e,r.u=t,i.__H.__h.push(r))}function w(e,t){var r=m(n++,7);return O(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function j(e,t){return a=8,w(function(){return e},t)}function g(){for(var e;e=l.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(k),e.__H.__h.forEach(A),e.__H.__h=[]}catch(t){e.__H.__h=[],c.__e(t,e.__v)}}c.__b=function(e){i=null,f&&f(e)},c.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),b&&b(e,t)},c.__r=function(e){h&&h(e),n=0;var t=(i=e.__c).__H;t&&(s===i?(t.__h=[],i.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(k),t.__h.forEach(A),t.__h=[],n=0)),s=i},c.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==l.push(t)&&o===c.requestAnimationFrame||((o=c.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(n),x&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);x&&(t=requestAnimationFrame(r))})(g)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),s=i=null},c.__c=function(e,t){t.some(function(e){try{e.__h.forEach(k),e.__h=e.__h.filter(function(e){return!e.__||A(e)})}catch(r){t.some(function(e){e.__h&&(e.__h=[])}),t=[],c.__e(r,e.__v)}}),_&&_(e,t)},c.unmount=function(e){p&&p(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(e){try{k(e)}catch(e){t=e}}),r.__H=void 0,t&&c.__e(t,r.__v))};var x="function"==typeof requestAnimationFrame;function k(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function A(e){var t=i;e.__c=e.__(),i=t}function O(e,t){return!e||e.length!==t.length||t.some(function(t,r){return t!==e[r]})}function C(e,t){return"function"==typeof t?t(e):t}},"../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js":function(e,t,r){r.d(t,{BX:()=>s,HY:()=>n.HY,tZ:()=>s});var n=r("../../node_modules/preact/dist/preact.module.js"),i=0;function s(e,t,r,s,o,u){t||(t={});var a,l,c=t;if("ref"in c)for(l in c={},t)"ref"==l?a=t[l]:c[l]=t[l];var f={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--i,__i:-1,__u:0,__source:o,__self:u};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return n.YM.vnode&&n.YM.vnode(f),f}},"../../node_modules/@noble/hashes/esm/_assert.js":function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function i(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function o(e,t){i(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}r.d(t,{$h:()=>s,eB:()=>o,gk:()=>i,k8:()=>n})},"../../node_modules/@noble/hashes/esm/utils.js":function(e,t,r){r.d(t,{GL:()=>s,Jq:()=>i,O0:()=>l,hE:()=>f,iA:()=>u,kb:()=>c,l1:()=>a,np:()=>o});var n=r("../../node_modules/@noble/hashes/esm/_assert.js");function i(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function s(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function o(e,t){return e<<32-t|e>>>t}let u=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0];function a(e){for(let r=0;r<e.length;r++){var t;e[r]=(t=e[r])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}}function l(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),(0,n.gk)(e),e}class c{clone(){return this._cloneInto()}}function f(e){let t=t=>e().update(l(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}},"../../node_modules/class-variance-authority/dist/index.mjs":function(e,t,r){r.d(t,{cx:()=>n});let n=function(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n}},"../../node_modules/tslib/tslib.es6.mjs":function(e,t,r){r.r(t),r.d(t,{__addDisposableResource:()=>N,__assign:()=>s,__asyncDelegator:()=>A,__asyncGenerator:()=>k,__asyncValues:()=>O,__await:()=>x,__awaiter:()=>_,__classPrivateFieldGet:()=>M,__classPrivateFieldIn:()=>B,__classPrivateFieldSet:()=>I,__createBinding:()=>b,__decorate:()=>u,__disposeResources:()=>D,__esDecorate:()=>l,__exportStar:()=>m,__extends:()=>i,__generator:()=>p,__importDefault:()=>U,__importStar:()=>P,__makeTemplateObject:()=>C,__metadata:()=>d,__param:()=>a,__propKey:()=>f,__read:()=>v,__rest:()=>o,__rewriteRelativeImportExtension:()=>H,__runInitializers:()=>c,__setFunctionName:()=>h,__spread:()=>w,__spreadArray:()=>g,__spreadArrays:()=>j,__values:()=>y,default:()=>L});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function u(e,t,r,n){var i,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(i=e[u])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function a(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,i,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var u,a=n.kind,l="getter"===a?"get":"setter"===a?"set":"value",c=!t&&e?n.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),h=!1,d=r.length-1;d>=0;d--){var _={};for(var p in n)_[p]="access"===p?{}:n[p];for(var p in n.access)_.access[p]=n.access[p];_.addInitializer=function(e){if(h)throw TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var b=(0,r[d])("accessor"===a?{get:f.get,set:f.set}:f[l],_);if("accessor"===a){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw TypeError("Object expected");(u=o(b.get))&&(f.get=u),(u=o(b.set))&&(f.set=u),(u=o(b.init))&&i.unshift(u)}else(u=o(b))&&("field"===a?i.unshift(u):f[l]=u)}c&&Object.defineProperty(c,n.name,f),h=!0}function c(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function _(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{a(n.next(e))}catch(e){s(e)}}function u(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,u)}a((n=n.apply(e,t||[])).next())})}function p(e,t){var r,n,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(a){return function(u){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function y(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function j(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var s=arguments[t],o=0,u=s.length;o<u;o++,i++)n[i]=s[o];return n}function g(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){s.push([e,t,r,n])>1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=i[e](t)).value instanceof x?Promise.resolve(r.value.v).then(a,l):c(s[0][2],r)}catch(e){c(s[0][3],e)}}function a(e){u("next",e)}function l(e){u("throw",e)}function c(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:x(e[n](t)),done:!1}:i?i(t):t}:i}}function O(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=y(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},E=function(e){return(E=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=E(e),n=0;n<r.length;n++)"default"!==r[n]&&b(t,e,r[n]);return S(t,e),t}function U(e){return e&&e.__esModule?e:{default:e}}function M(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function I(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function B(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function N(e,t,r){if(null!=t){var n,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var T="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function D(e){function t(t){e.error=e.hasError?new T(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(i,function(e){return t(e),i()})}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function H(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,r,n,i,s){return r?t?".jsx":".js":!n||i&&s?n+i+"."+s.toLowerCase()+"js":e}):e}let L={__extends:i,__assign:s,__rest:o,__decorate:u,__param:a,__esDecorate:l,__runInitializers:c,__propKey:f,__setFunctionName:h,__metadata:d,__awaiter:_,__generator:p,__createBinding:b,__exportStar:m,__values:y,__read:v,__spread:w,__spreadArrays:j,__spreadArray:g,__await:x,__asyncGenerator:k,__asyncDelegator:A,__asyncValues:O,__makeTemplateObject:C,__importStar:P,__importDefault:U,__classPrivateFieldGet:M,__classPrivateFieldSet:I,__classPrivateFieldIn:B,__addDisposableResource:N,__disposeResources:D,__rewriteRelativeImportExtension:H}},"../../node_modules/viem/_esm/errors/base.js":function(e,t,r){r.d(t,{G:()=>s});let n="2.24.3",i={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n}`};class s extends Error{constructor(e,t={}){let r=t.cause instanceof s?t.cause.details:t.cause?.message?t.cause.message:t.details,o=t.cause instanceof s&&t.cause.docsPath||t.docsPath,u=i.getDocsUrl?.({...t,docsPath:o});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...r?[`Details: ${r}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}},"../../node_modules/viem/_esm/errors/encoding.js":function(e,t,r){r.d(t,{J5:()=>i,M6:()=>s});var n=r("../../node_modules/viem/_esm/errors/base.js");class i extends n.G{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}n.G,n.G,n.G;class s extends n.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}},"../../node_modules/viem/_esm/utils/address/isAddressEqual.js":function(e,t,r){r.d(t,{E:()=>h});var n=r("../../node_modules/viem/_esm/errors/base.js");class i extends n.G{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}class s extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}var o=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),u=r("../../node_modules/viem/_esm/utils/hash/keccak256.js");let a=new s(8192),l=/^0x[a-fA-F0-9]{40}$/,c=new s(8192);function f(e,t){let{strict:r=!0}=t??{},n=`${e}.${r}`;if(c.has(n))return c.get(n);let i=!!l.test(e)&&(e.toLowerCase()===e||!r||function(e,t){if(a.has(`${e}.undefined`))return a.get(`${e}.${void 0}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,u.w)((0,o.qX)(r),"bytes"),i=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&n[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let s=`0x${i.join("")}`;return a.set(`${e}.${t}`,s),s}(e)===e);return c.set(n,i),i}function h(e,t){if(!f(e,{strict:!1}))throw new i({address:e});if(!f(t,{strict:!1}))throw new i({address:t});return e.toLowerCase()===t.toLowerCase()}},"../../node_modules/viem/_esm/utils/data/concat.js":function(e,t,r){r.d(t,{SM:()=>n});function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}},"../../node_modules/viem/_esm/utils/data/isHex.js":function(e,t,r){r.d(t,{v:()=>n});function n(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},"../../node_modules/viem/_esm/utils/data/pad.js":function(e,t,r){r.d(t,{vk:()=>s});var n=r("../../node_modules/viem/_esm/errors/base.js");n.G;class i extends n.G{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}function s(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;let n=e.replace("0x","");if(n.length>2*r)throw new i({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new i({size:e.length,targetSize:r,type:"bytes"});let n=new Uint8Array(r);for(let i=0;i<r;i++){let s="right"===t;n[s?i:r-i-1]=e[s?i:e.length-i-1]}return n}(e,{dir:t,size:r})}n.G},"../../node_modules/viem/_esm/utils/encoding/fromHex.js":function(e,t,r){r.d(t,{Yf:()=>o});var n=r("../../node_modules/viem/_esm/errors/encoding.js"),i=r("../../node_modules/viem/_esm/utils/data/isHex.js");function s(e){return(0,i.v)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}function o(e,{size:t}){if(s(e)>t)throw new n.M6({givenSize:s(e),maxSize:t})}},"../../node_modules/viem/_esm/utils/encoding/toBytes.js":function(e,t,r){r.d(t,{O0:()=>l,nr:()=>h,qX:()=>d});var n=r("../../node_modules/viem/_esm/errors/base.js"),i=r("../../node_modules/viem/_esm/utils/data/isHex.js"),s=r("../../node_modules/viem/_esm/utils/data/pad.js"),o=r("../../node_modules/viem/_esm/utils/encoding/fromHex.js"),u=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");let a=new TextEncoder;function l(e,t={}){var r,n;return"number"==typeof e||"bigint"==typeof e?(r=e,n=t,h((0,u.eC)(r,n))):"boolean"==typeof e?function(e,t={}){let r=new Uint8Array(1);return(r[0]=Number(e),"number"==typeof t.size)?((0,o.Yf)(r,{size:t.size}),(0,s.vk)(r,{size:t.size})):r}(e,t):(0,i.v)(e)?h(e,t):d(e,t)}let c={zero:48,nine:57,A:65,F:70,a:97,f:102};function f(e){return e>=c.zero&&e<=c.nine?e-c.zero:e>=c.A&&e<=c.F?e-(c.A-10):e>=c.a&&e<=c.f?e-(c.a-10):void 0}function h(e,t={}){let r=e;t.size&&((0,o.Yf)(r,{size:t.size}),r=(0,s.vk)(r,{dir:"right",size:t.size}));let i=r.slice(2);i.length%2&&(i=`0${i}`);let u=i.length/2,a=new Uint8Array(u);for(let e=0,t=0;e<u;e++){let r=f(i.charCodeAt(t++)),s=f(i.charCodeAt(t++));if(void 0===r||void 0===s)throw new n.G(`Invalid byte sequence ("${i[t-2]}${i[t-1]}" in "${i}").`);a[e]=16*r+s}return a}function d(e,t={}){let r=a.encode(e);return"number"==typeof t.size?((0,o.Yf)(r,{size:t.size}),(0,s.vk)(r,{dir:"right",size:t.size})):r}},"../../node_modules/viem/_esm/utils/encoding/toHex.js":function(e,t,r){r.d(t,{NC:()=>u,ci:()=>a,eC:()=>l});var n=r("../../node_modules/viem/_esm/errors/encoding.js"),i=r("../../node_modules/viem/_esm/utils/data/pad.js"),s=r("../../node_modules/viem/_esm/utils/encoding/fromHex.js");let o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function u(e,t={}){return"number"==typeof e||"bigint"==typeof e?l(e,t):"string"==typeof e?function(e,t={}){return a(c.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,s.Yf)(r,{size:t.size}),(0,i.vk)(r,{size:t.size})):r}(e,t):a(e,t)}function a(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=o[e[t]];let n=`0x${r}`;return"number"==typeof t.size?((0,s.Yf)(n,{size:t.size}),(0,i.vk)(n,{dir:"right",size:t.size})):n}function l(e,t={}){let r;let{signed:s,size:o}=t,u=BigInt(e);o?r=s?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof r&&s?-r-1n:0;if(r&&u>r||u<a){let t="bigint"==typeof e?"n":"";throw new n.J5({max:r?`${r}${t}`:void 0,min:`${a}${t}`,signed:s,size:o,value:`${e}${t}`})}let c=`0x${(s&&u<0?(1n<<BigInt(8*o))+BigInt(u):u).toString(16)}`;return o?(0,i.vk)(c,{size:o}):c}let c=new TextEncoder},"../../node_modules/viem/_esm/utils/hash/keccak256.js":function(e,t,r){r.d(t,{w:()=>E});var n=r("../../node_modules/@noble/hashes/esm/_assert.js");let i=BigInt(0x100000000-1),s=BigInt(32),o=(e,t,r)=>e<<r|t>>>32-r,u=(e,t,r)=>t<<r|e>>>32-r,a=(e,t,r)=>t<<r-32|e>>>64-r,l=(e,t,r)=>e<<r-32|t>>>64-r;var c=r("../../node_modules/@noble/hashes/esm/utils.js");let f=[],h=[],d=[],_=BigInt(0),p=BigInt(1),b=BigInt(2),m=BigInt(7),y=BigInt(256),v=BigInt(113);for(let e=0,t=p,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],f.push(2*(5*n+r)),h.push((e+1)*(e+2)/2%64);let i=_;for(let e=0;e<7;e++)(t=(t<<p^(t>>m)*v)%y)&b&&(i^=p<<(p<<BigInt(e))-p);d.push(i)}let[w,j]=function(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:u,l:a}=function(e,t=!1){return t?{h:Number(e&i),l:Number(e>>s&i)}:{h:0|Number(e>>s&i),l:0|Number(e&i)}}(e[o],t);[r[o],n[o]]=[u,a]}return[r,n]}(d,!0),g=(e,t,r)=>r>32?a(e,t,r):o(e,t,r),x=(e,t,r)=>r>32?l(e,t,r):u(e,t,r);class k extends c.kb{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.k8)(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,c.Jq)(this.state)}keccak(){c.iA||(0,c.l1)(this.state32),function(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],u=g(s,o,1)^r[n],a=x(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=u,e[t+r+1]^=a}let t=e[2],i=e[3];for(let r=0;r<24;r++){let n=h[r],s=g(t,i,n),o=x(t,i,n),u=f[r];t=e[u],i=e[u+1],e[u]=s,e[u+1]=o}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=w[n],e[1]^=j[n]}r.fill(0)}(this.state32,this.rounds),c.iA||(0,c.l1)(this.state32),this.posOut=0,this.pos=0}update(e){(0,n.$h)(this);let{blockLen:t,state:r}=this,i=(e=(0,c.O0)(e)).length;for(let n=0;n<i;){let s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,(128&t)!=0&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.$h)(this,!1),(0,n.gk)(e),this.finish();let t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.k8)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.eB)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new k(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}let A=(0,c.hE)(()=>new k(136,1,32));var O=r("../../node_modules/viem/_esm/utils/data/isHex.js"),C=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),S=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");function E(e,t){let r=A((0,O.v)(e,{strict:!1})?(0,C.O0)(e):e);return"bytes"===(t||"hex")?r:(0,S.NC)(r)}},"../../node_modules/viem/_esm/utils/hash/sha256.js":function(e,t,r){r.d(t,{J:()=>_});var n=r("../../node_modules/@noble/hashes/esm/_assert.js"),i=r("../../node_modules/@noble/hashes/esm/utils.js");class s extends i.kb{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.GL)(this.buffer)}update(e){(0,n.$h)(this);let{view:t,buffer:r,blockLen:s}=this,o=(e=(0,i.O0)(e)).length;for(let n=0;n<o;){let u=Math.min(s-this.pos,o-n);if(u===s){let t=(0,i.GL)(e);for(;s<=o-n;n+=s)this.process(t,n);continue}r.set(e.subarray(n,n+u),this.pos),this.pos+=u,n+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.$h)(this),(0,n.eB)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:s,isLE:o}=this,{pos:u}=this;t[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>s-u&&(this.process(r,0),u=0);for(let e=u;e<s;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),s=BigInt(0xffffffff),o=Number(r>>i&s),u=Number(r&s),a=4*!!n,l=4*!n;e.setUint32(t+a,o,n),e.setUint32(t+l,u,n)}(r,s-8,BigInt(8*this.length),o),this.process(r,0);let a=(0,i.GL)(e),l=this.outputLen;if(l%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=l/4,f=this.get();if(c>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,f[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:s,pos:o}=this;return e.length=n,e.pos=o,e.finished=i,e.destroyed=s,n%t&&e.buffer.set(r),e}}let o=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),u=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),a=new Uint32Array(64);class l extends s{constructor(){super(64,32,8,!1),this.A=0|u[0],this.B=0|u[1],this.C=0|u[2],this.D=0|u[3],this.E=0|u[4],this.F=0|u[5],this.G=0|u[6],this.H=0|u[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:s,G:o,H:u}=this;return[e,t,r,n,i,s,o,u]}set(e,t,r,n,i,s,o,u){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|u}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=a[e-15],r=a[e-2],n=(0,i.np)(t,7)^(0,i.np)(t,18)^t>>>3,s=(0,i.np)(r,17)^(0,i.np)(r,19)^r>>>10;a[e]=s+a[e-7]+n+a[e-16]|0}let{A:r,B:n,C:s,D:u,E:l,F:c,G:f,H:h}=this;for(let e=0;e<64;e++){var d,_,p,b;let t=h+((0,i.np)(l,6)^(0,i.np)(l,11)^(0,i.np)(l,25))+((d=l)&c^~d&f)+o[e]+a[e]|0,m=((0,i.np)(r,2)^(0,i.np)(r,13)^(0,i.np)(r,22))+((_=r)&(p=n)^_&(b=s)^p&b)|0;h=f,f=c,c=l,l=u+t|0,u=s,s=n,n=r,r=t+m|0}r=r+this.A|0,n=n+this.B|0,s=s+this.C|0,u=u+this.D|0,l=l+this.E|0,c=c+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(r,n,s,u,l,c,f,h)}roundClean(){a.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let c=(0,i.hE)(()=>new l);var f=r("../../node_modules/viem/_esm/utils/data/isHex.js"),h=r("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),d=r("../../node_modules/viem/_esm/utils/encoding/toHex.js");function _(e,t){let r=c((0,f.v)(e,{strict:!1})?(0,h.O0)(e):e);return"bytes"===(t||"hex")?r:(0,d.NC)(r)}}};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const __webpack_ids__=["321"];export const __webpack_modules__={"./src/components/ButtonWallet/utils.ts":function(e,t,n){n.d(t,{G:()=>o});var r=n("../core/dist/actions.js");function o(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,r.s9)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}},"./src/hooks/useClientReady.ts":function(e,t,n){n.d(t,{t:()=>a});var r=n("./src/utils/clientReady.ts"),o=n("../../node_modules/preact/hooks/dist/hooks.module.js");function a(){let[e,t]=(0,o.eJ)(!0),n=(0,o.I4)(()=>{t(!1)},[]);return(0,o.d4)(()=>((0,r.D)("add",n),()=>(0,r.D)("remove",n)),[n]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,n){n.d(t,{w:()=>s});var r=n("../core/dist/index.js"),o=n("../core/dist/actions.js");async function a({targetInteraction:e}){let t=window.FrakSetup?.client;if(!t){console.warn("Frak client not ready yet");return}let{maxReferrer:n,rewards:a}=await (0,o.pO)(t);if(!n)return;let i=(0,r.Up)(t.config.metadata?.currency),s=Math.ceil(n[i]);if(e){let t=a.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(s=Math.ceil(t))}return(0,r.dN)(s,t.config.metadata?.currency)}var i=n("../../node_modules/preact/hooks/dist/hooks.module.js");function s(e,t){let[n,r]=(0,i.eJ)(void 0);return(0,i.d4)(()=>{e&&a({targetInteraction:t}).then(e=>{e&&r(e)})},[e,t]),{reward:n}}},"./src/utils/clientReady.ts":function(e,t,n){n.d(t,{D:()=>a,f:()=>o});let r="frakClientReady";function o(){let e=new CustomEvent(r);window.dispatchEvent(e)}function a(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(r,t,!1)}},"./src/utils/registerWebComponent.ts":function(e,t,n){n.d(t,{A:()=>l});var r=n("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),o=n("../core/dist/index.js"),a=n("./src/components/ButtonWallet/utils.ts"),i=n("./src/utils/clientReady.ts"),s=n("./src/utils/setup.ts");async function c(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,o.lD)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),(0,i.f)(),(0,s.N3)(e),(0,s.zK)(e),window.frakSetupInProgress=!1,function(){let e=new URLSearchParams(window.location.search).get("frakAction");e&&"share"===e&&(console.log("[Frak SDK] Auto open query param found"),(0,a.G)())}()}function l(e,t,n=[],o={shadow:!1}){if("undefined"!=typeof window){var a;a=async function(){await c()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(a,1):document.addEventListener?document.addEventListener("DOMContentLoaded",a):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&a()}),customElements.get(t)||(0,r.Z)(e,t,n,o)}}},"./src/utils/setup.ts":function(e,t,n){n.d(t,{Gt:()=>i,N3:()=>o,zK:()=>a});var r=n("../core/dist/actions.js");function o(e){window.modalBuilderSteps=(0,r.jy)(e,window.FrakSetup?.modalConfig??{})}async function a(e){console.log("referral",await (0,r.KS)(e,{modalConfig:window.FrakSetup?.modalWalletConfig}))}function i(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}},"../core/dist/actions.js":function(e,t,n){n.d(t,{KS:()=>E,jy:()=>w,pO:()=>f,s9:()=>u});var r=n("../../node_modules/viem/_esm/utils/hash/keccak256.js"),o=n("../../node_modules/viem/_esm/utils/encoding/toHex.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),i=n("../../node_modules/viem/_esm/utils/data/concat.js"),s=n("../../node_modules/viem/_esm/utils/data/pad.js"),c=n("../../node_modules/viem/_esm/utils/address/isAddressEqual.js");async function l(e,{productId:t,interaction:n,validation:a}){let i=t??function({domain:e}){let t=(e??window.location.host).replace("www.","");return(0,r.w)((0,o.NC)(t))}(e.config);return await e.request({method:"frak_sendInteraction",params:[i,n,a]})}async function d(e,{steps:t,metadata:n}){return await e.request({method:"frak_displayModal",params:[t,n,e.config.metadata]})}async function u(e,t){return await e.request({method:"frak_displayEmbeddedWallet",params:[t,e.config.metadata]})}async function f(e){return await e.request({method:"frak_getProductInformation"})}function w(e,{metadata:t,login:n,openSession:r}){return function e(t,n){async function r(e){return e&&(n.metadata=e(n.metadata??{})),await d(t,n)}return{params:n,sendTx:function(r){return e(t,{...n,steps:{...n.steps,sendTransaction:r}})},reward:function(r){return e(t,{...n,steps:{...n.steps,final:{...r,action:{key:"reward"}}}})},sharing:function(r,o){return e(t,{...n,steps:{...n.steps,final:{...o,action:{key:"sharing",options:r}}}})},display:r}}(e,{steps:{login:n??{},openSession:r??{}},metadata:t})}let m="fCtx";function p({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(m);return t?function(e){if(e&&0!==e.length)try{let t;let n=(t=e.length%4,Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(0===t?0:4-t),"=")),e=>e.charCodeAt(0)));return{r:(0,o.ci)(n,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}(t):null}let g={parse:p,replaceUrl:function({url:e,context:t}){let n,r;if(!window.location?.href||"undefined"==typeof window){console.error("No window found, can't update context");return}let o=e??window.location.href;(n=null!==t?function({url:e,context:t}){if(!e)return null;let n=p({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let o=function(e){if(e?.r)try{var t;return t=(0,a.nr)(e.r),btoa(Array.from(t,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}(r);if(!o)return null;let i=new URL(e);return i.searchParams.set(m,o),i.toString()}({url:o,context:t}):((r=new URL(o)).searchParams.delete(m),r.toString()))&&window.history.replaceState(null,"",n.toString())}},h={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31};Object.entries(h).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{});let y={createLink:()=>({handlerTypeDenominator:(0,o.NC)(h.referral),interactionData:"0xb2c0f17c"}),referred({referrer:e}){let t=(0,i.SM)(["0x010cc3b9",(0,s.vk)(e,{size:32})]);return{handlerTypeDenominator:(0,o.NC)(h.referral),interactionData:t}}};class v extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}let k={walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};async function S(e,{walletStatus:t,frakContext:n,modalConfig:r,productId:o,options:a}){let i=!1;async function s(){if(!i)return i=!0,C(e,{modalConfig:{...r,loggedIn:{action:{key:"referred"}}},walletStatus:t})}async function c(t){let n=y.referred({referrer:t});await l(e,{productId:o,interaction:n})}try{let{status:e,currentWallet:r}=await b({initialWalletStatus:t,getFreshWalletStatus:s,pushReferralInteraction:c,frakContext:n});return g.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:r}:null}),e}catch(e){return console.log("Error processing referral",{error:e}),g.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:t?.wallet}:null}),function(e){if(e instanceof v)switch(e.code){case k.walletNotConnected:return"no-wallet";case k.serverErrorForInteractionDelegation:return"no-session"}return"error"}(e)}}async function b({initialWalletStatus:e,getFreshWalletStatus:t,pushReferralInteraction:n,frakContext:r}){let o=e?.wallet;return r?.r?(o||(o=await t()),o&&(0,c.E)(r.r,o))?{status:"self-referral",currentWallet:o}:(e?.interactionSession||(o=await t()),await n(r.r),{status:"success",currentWallet:o}):{status:"no-referrer",currentWallet:o}}async function C(e,{modalConfig:t,walletStatus:n}){if(!n?.interactionSession){let n=await u(e,t??{});return n?.wallet??void 0}return n.wallet??void 0}async function E(e,{productId:t,modalConfig:n,options:r}={}){var o;let a=g.parse({url:window.location.href}),i=await e.request({method:"frak_listenToWalletStatus"}).then(e=>{var t;return t=e.interactionToken,"undefined"!=typeof window&&(t?window.sessionStorage.setItem("frak-wallet-interaction-token",t):window.sessionStorage.removeItem("frak.interaction-token")),e});try{return await S(e,{walletStatus:i,frakContext:a,modalConfig:n,productId:t,options:r})}catch(e){console.warn("Error processing referral",{error:e})}}},"../core/dist/index.js":function(e,t,n){n.d(t,{Up:()=>b,dN:()=>C,lD:()=>S,oC:()=>p,ss:()=>s,u:()=>a});var r=n("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/index.js"),o=n("../../node_modules/viem/_esm/utils/hash/sha256.js");class a extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}class i extends a{constructor(e){super(s.internalError,e)}}let s={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};class c{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve=e=>{this._resolve?.(e)};reject=e=>{this._reject?.(e)}}let l=new r.CborEncoder;function d(e){let t={...e,validationHash:u(e)};return l.encode(t)}function u(e){return(0,o.J)(l.encode(e))}let f=new r.CborDecoder;function w(e){if(!e.length)throw new a(s.corruptedResponse,"Missing compressed data");let t=function(e){try{return f.decode(e)}catch(t){return console.error("Invalid compressed data",{e:t,data:e}),null}}(e);if(!t)throw new a(s.corruptedResponse,"Invalid compressed data");if(!t?.validationHash)throw new a(s.corruptedResponse,"Missing validation hash");let{validationHash:n,...r}=t;if(u(r)!==t.validationHash)throw new a(s.corruptedResponse,"Invalid data validation hash");return t}let m="nexus-wallet-backup";class p{config;iframe;isSetupDone=!1;lastResponse=null;lastRequest=null;constructor(e,t){this.config=e,this.iframe=t,this.lastRequest=null,this.lastResponse=null}setLastResponse(e){this.lastResponse={event:e.data,origin:e.origin,timestamp:Date.now()}}setLastRequest(e,t){this.lastRequest={event:e,target:t,timestamp:Date.now()}}updateSetupStatus(e){this.isSetupDone=e}base64Encode(e){try{return btoa(JSON.stringify(e))}catch(e){return console.warn("Failed to encode debug data",e),btoa("Failed to encode data")}}getIframeStatus(){return this.iframe?{loading:this.iframe.hasAttribute("loading"),url:this.iframe.src,readyState:this.iframe.contentDocument?.readyState?+("complete"===this.iframe.contentDocument.readyState):-1,contentWindow:!!this.iframe.contentWindow,isConnected:this.iframe.isConnected}:null}getNavigatorInfo(){return navigator?{userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio}:null}gatherDebugInfo(e){let t=this.getIframeStatus(),n=this.getNavigatorInfo(),r="Unknown";return e instanceof a?r=`FrakRpcError: ${e.code} '${e.message}'`:e instanceof Error?r=e.message:"string"==typeof e&&(r=e),{timestamp:new Date().toISOString(),encodedUrl:btoa(window.location.href),encodedConfig:this.config?this.base64Encode(this.config):"no-config",navigatorInfo:n?this.base64Encode(n):"no-navigator",iframeStatus:t?this.base64Encode(t):"not-iframe",lastRequest:this.lastRequest?this.base64Encode(this.lastRequest):"No Frak request logged",lastResponse:this.lastResponse?this.base64Encode(this.lastResponse):"No Frak response logged",clientStatus:this.isSetupDone?"setup":"not-setup",error:r}}static empty(){return new p}formatDebugInfo(e){let t=this.gatherDebugInfo(e);return`
|
|
2
|
+
Debug Information:
|
|
3
|
+
-----------------
|
|
4
|
+
Timestamp: ${t.timestamp}
|
|
5
|
+
URL: ${t.encodedUrl}
|
|
6
|
+
Config: ${t.encodedConfig}
|
|
7
|
+
Navigator Info: ${t.navigatorInfo}
|
|
8
|
+
IFrame Status: ${t.iframeStatus}
|
|
9
|
+
Last Request: ${t.lastRequest}
|
|
10
|
+
Last Response: ${t.lastResponse}
|
|
11
|
+
Client Status: ${t.clientStatus}
|
|
12
|
+
Error: ${t.error}
|
|
13
|
+
`.trim()}}let g=2000001;function h({iframe:e,isVisible:t}){if(!t){e.style.width="0",e.style.height="0",e.style.border="0",e.style.position="fixed",e.style.top="-1000px",e.style.left="-1000px";return}e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="auto"}async function y({config:e,messageHandler:t,lifecycleManager:n}){async function r(){let n=e.customizations?.css;n&&t.sendEvent({clientLifecycle:"modal-css",data:{cssLink:n}})}async function o(){let n=e.customizations?.i18n;n&&t.sendEvent({clientLifecycle:"modal-i18n",data:{i18n:n}})}async function a(){if("undefined"==typeof window)return;let e=window.localStorage.getItem(m);e&&t.sendEvent({clientLifecycle:"restore-backup",data:{backup:e}})}await n.isConnected,await Promise.all([r(),o(),a()])}let v={eur:"fr-FR",usd:"en-US",gbp:"en-GB"};function k(e){return e&&e in v?e:"eur"}async function S({config:e}){let t;let n=(t=k(e.metadata?.currency),{...e,metadata:{...e.metadata,currency:t}}),r=await function({walletBaseUrl:e,config:t}){let n=document.querySelector("#frak-wallet");n&&n.remove();let r=document.createElement("iframe");return r.id="frak-wallet",r.name="frak-wallet",r.allow="publickey-credentials-get *; clipboard-write; web-share *",r.style.zIndex=g.toString(),h({iframe:r,isVisible:!1}),document.body.appendChild(r),new Promise(n=>{r?.addEventListener("load",()=>n(r)),r.src=`${t?.walletUrl??e??"https://wallet.frak.id"}/listener`})}({config:n});if(!r){console.error("Failed to create iframe");return}let o=function({config:e,iframe:t}){let n;let r=(n=new Map,{createChannel:e=>{let t=Math.random().toString(36).substring(7);return n.set(t,e),t},getRpcResolver:e=>n.get(e),removeChannel:e=>n.delete(e),destroy:()=>n.clear()}),o=function({iframe:e}){let t=new c;return{handleEvent:async n=>{switch(n.iframeLifecycle){case"connected":t.resolve(!0);break;case"do-backup":n.data.backup?localStorage.setItem(m,n.data.backup):localStorage.removeItem(m);break;case"remove-backup":localStorage.removeItem(m);break;case"show":case"hide":h({iframe:e,isVisible:"show"===n.iframeLifecycle});break;case"handshake":e.contentWindow?.postMessage({clientLifecycle:"handshake-response",data:{token:n.data.token,currentUrl:window.location.href}},"*")}},isConnected:t.promise}}({iframe:t}),l=new p(e,t),u=function({frakWalletUrl:e,iframe:t,channelManager:n,iframeLifecycleManager:r,debugInfo:o}){if("undefined"==typeof window)throw new a(s.configError,"iframe client should be used in the browser");if(!t.contentWindow)throw new a(s.configError,"The iframe does not have a product window");let i=t.contentWindow;async function c(t){if(!t.origin)return;try{if(new URL(t.origin).origin.toLowerCase()!==new URL(e).origin.toLowerCase())return}catch(e){console.log("Unable to check frak msg origin",e);return}if("object"!=typeof t.data)return;if(o.setLastResponse(t),"iframeLifecycle"in t.data){await r.handleEvent(t.data);return}if("clientLifecycle"in t.data){console.error("Client lifecycle event received on the client side, dismissing it");return}let a=t.data.id,i=n.getRpcResolver(a);i&&i(t.data)}return window.addEventListener("message",c),{sendEvent:function(t){i.postMessage(t,{targetOrigin:e}),o.setLastRequest(t,e)},cleanup:function(){window.removeEventListener("message",c)}}}({frakWalletUrl:e?.walletUrl??"https://wallet.frak.id",iframe:t,channelManager:r,iframeLifecycleManager:o,debugInfo:l}),f=async e=>{if(!await o.isConnected)throw new a(s.clientNotConnected,"The iframe provider isn't connected yet");let t=new c,n=r.createChannel(e=>{let o=w(e.data);o.error?t.reject(new a(o.error.code,o.error.message,o.error?.data)):t.resolve(o.result),r.removeChannel(n)}),i=d(e);return u.sendEvent({id:n,topic:e.method,data:i}),t.promise},g=async(e,t)=>{if(!await o.isConnected)throw new a(s.clientNotConnected,"The iframe provider isn't connected yet");let n=r.createChannel(e=>{let n=w(e.data);if(n.result)t(n.result);else throw new i("No valid result in the response")}),c=d(e);u.sendEvent({id:n,topic:e.method,data:c})},v=function(e,t){let n,r;let o=()=>e.sendEvent({clientLifecycle:"heartbeat"});function a(){n&&clearInterval(n),r&&clearTimeout(r)}return async function(){o(),n=setInterval(o,100),r=setTimeout(()=>{a(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,a()}(),a}(u,o),k=async()=>{v(),r.destroy(),u.cleanup(),t.remove()},S=y({config:e,messageHandler:u,lifecycleManager:o}).then(()=>l.updateSetupStatus(!0));return{config:e,debugInfo:l,waitForConnection:o.isConnected,waitForSetup:S,request:f,listenerRequest:g,destroy:k}}({config:n,iframe:r});if(await o.waitForSetup,!await o.waitForConnection){console.error("Failed to connect to client");return}return o}function b(e){return e?`${e}Amount`:"eurAmount"}function C(e,t){let n=t?v[t]??v.eur:v.eur,r=k(t);return e.toLocaleString(n,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2})}Object.entries({dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31}).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __webpack_ids__=["766"];export const __webpack_modules__={"./src/components/ButtonShare/index.ts":function(e,t,o){o.r(t),o.d(t,{ButtonShare:()=>S});var n=o("./src/utils/registerWebComponent.ts"),r=o("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"),a=o("../../node_modules/class-variance-authority/dist/index.mjs");let i="spinner__leaf-xtOJmT",s=({ref:e,className:t,...o})=>(0,r.BX)("span",{...o,ref:e,className:(0,a.cx)("spinner-KHk8mw"),children:[(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i})]});s.displayName="Spinner";var l=o("./src/hooks/useClientReady.ts"),c=o("./src/hooks/useReward.ts"),d=o("../core/dist/actions.js"),p=o("../../node_modules/preact/hooks/dist/hooks.module.js");let u={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},m={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},f={margin:0,fontSize:"16px",fontWeight:500},h={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},x={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},b={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function y({debugInfo:e}){let[t,o]=(0,p.eJ)(!1);return(0,r.BX)("div",{children:[(0,r.tZ)("button",{type:"button",style:b,onClick:()=>o(!t),children:"Ouvrir les informations"}),t&&(0,r.tZ)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function g({debugInfo:e}){let{copied:t,copy:o}=function(e={}){let{successDuration:t=2e3}=e,[o,n]=(0,p.eJ)(!1);return{copy:(0,p.I4)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),n(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),n(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{n(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:o}}();return(0,r.BX)("div",{style:u,children:[(0,r.tZ)("div",{style:m,children:(0,r.tZ)("h3",{style:f,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,r.BX)("p",{style:h,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,r.tZ)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:x,children:"help@frak-labs.com"})," ",(0,r.tZ)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,r.tZ)("button",{type:"button",onClick:()=>o(e??""),style:b,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,r.tZ)(y,{debugInfo:e})]})}var w=o("./src/utils/setup.ts"),k=o("../core/dist/index.js");async function v(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,d.
|
|
1
|
+
export const __webpack_ids__=["766"];export const __webpack_modules__={"./src/components/ButtonShare/index.ts":function(e,t,o){o.r(t),o.d(t,{ButtonShare:()=>S});var n=o("./src/utils/registerWebComponent.ts"),r=o("../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"),a=o("../../node_modules/class-variance-authority/dist/index.mjs");let i="spinner__leaf-xtOJmT",s=({ref:e,className:t,...o})=>(0,r.BX)("span",{...o,ref:e,className:(0,a.cx)("spinner-KHk8mw"),children:[(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i}),(0,r.tZ)("span",{className:i})]});s.displayName="Spinner";var l=o("./src/hooks/useClientReady.ts"),c=o("./src/hooks/useReward.ts"),d=o("../core/dist/actions.js"),p=o("../../node_modules/preact/hooks/dist/hooks.module.js");let u={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},m={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},f={margin:0,fontSize:"16px",fontWeight:500},h={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},x={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},b={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function y({debugInfo:e}){let[t,o]=(0,p.eJ)(!1);return(0,r.BX)("div",{children:[(0,r.tZ)("button",{type:"button",style:b,onClick:()=>o(!t),children:"Ouvrir les informations"}),t&&(0,r.tZ)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function g({debugInfo:e}){let{copied:t,copy:o}=function(e={}){let{successDuration:t=2e3}=e,[o,n]=(0,p.eJ)(!1);return{copy:(0,p.I4)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),n(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),n(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{n(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:o}}();return(0,r.BX)("div",{style:u,children:[(0,r.tZ)("div",{style:m,children:(0,r.tZ)("h3",{style:f,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,r.BX)("p",{style:h,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,r.tZ)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:x,children:"help@frak-labs.com"})," ",(0,r.tZ)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,r.tZ)("button",{type:"button",onClick:()=>o(e??""),style:b,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,r.tZ)(y,{debugInfo:e})]})}var w=o("./src/utils/setup.ts"),k=o("../core/dist/index.js");async function v(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,d.s9)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function S({text:e="Share and earn!",classname:t="",useReward:o,noRewardText:n,targetInteraction:i,showWallet:d}){let u=(0,p.Ye)(()=>void 0!==o,[o]),m=(0,p.Ye)(()=>void 0!==d,[d]),{isClientReady:f}=(0,l.t)(),{reward:h}=(0,c.w)(u&&f,i),{handleShare:x,isError:b,debugInfo:y}=function(e){let[t,o]=(0,p.eJ)(void 0),[n,r]=(0,p.eJ)(!1);return{handleShare:(0,p.I4)(async()=>{if(!window.FrakSetup?.client){console.error("Frak client not found"),o(k.oC.empty().formatDebugInfo("Frak client not found")),r(!0);return}let t=(0,w.Gt)();if(!t)throw Error("modalBuilderSteps not found");try{await t.sharing(window.FrakSetup?.modalShareConfig??{}).display(t=>({...t,targetInteraction:e}))}catch(e){if(e instanceof k.u&&e.code===k.ss.clientAborted){console.debug("User aborted the modal");return}o(window.FrakSetup.client.debugInfo.formatDebugInfo(e)),r(!0),console.error("Error while opening the modal",e)}},[e]),isError:n,debugInfo:t}}(i),S=(0,p.Ye)(()=>u?h?e.includes("{REWARD}")?e.replace("{REWARD}",h):`${e} ${h}`:n??e.replace("{REWARD}",""):e,[u,e,n,h]),Z=(0,p.I4)(async()=>await (m?v():x()),[m,x]);return(0,r.BX)(r.HY,{children:[(0,r.BX)("button",{type:"button",className:(0,a.cx)("buttonShare-F23Y9m",t,"override"),onClick:Z,children:[!f&&(0,r.tZ)(s,{})," ",S]}),b&&(0,r.tZ)(g,{debugInfo:y})]})}(0,n.A)(S,"frak-button-share",["text"],{shadow:!1})}};
|
package/cdn/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import("https://cdn.jsdelivr.net/npm/@frak-labs/components@latest/cdn/loader.js?v=
|
|
1
|
+
import("https://cdn.jsdelivr.net/npm/@frak-labs/components@latest/cdn/loader.js?v=1744798015101");
|
package/cdn/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t,r={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>""+(({438:"button-wallet",766:"button-share"})[e]||e)+"."+({18:"
|
|
1
|
+
var e,t,r={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,n),i.exports}n.m=r,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>""+(({438:"button-wallet",766:"button-share"})[e]||e)+"."+({18:"dad4b5ac",321:"67278847",438:"19a891ff",766:"0447f6d8"})[e]+".js",n.miniCssF=e=>""+({438:"button-wallet",766:"button-share"})[e]+"."+({438:"390d543a",766:"823884d0"})[e]+".css",n.h=()=>"72824c4c3420e59c",(()=>{n.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})()})(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{if("undefined"!=typeof document){var e=function(e,t,r,o,i){var a=document.createElement("link");return a.rel="stylesheet",a.type="text/css",n.nc&&(a.nonce=n.nc),a.onerror=a.onload=function(r){if(a.onerror=a.onload=null,"load"===r.type)o();else{var n=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.href||t,l=Error("Loading CSS chunk "+e+" failed.\\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=n,l.request=s,a.parentNode&&a.parentNode.removeChild(a),i(l)}},a.href=t,r?r.parentNode.insertBefore(a,r.nextSibling):document.head.appendChild(a),a},t=function(e,t){for(var r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var n=r[o],i=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(i===e||i===t))return n}for(var a=document.getElementsByTagName("style"),o=0;o<a.length;o++){var n=a[o],i=n.getAttribute("data-href");if(i===e||i===t)return n}},r={276:0};n.f.miniCss=function(o,i){if(r[o])i.push(r[o]);else if(0!==r[o]&&({438:1,766:1})[o])i.push(r[o]=new Promise(function(r,i){var a=n.miniCssF(o),s=n.p+a;if(t(a,s))return r();e(o,s,null,r,i)}).then(function(){r[o]=0},function(e){throw delete r[o],e}))}}})(),e={276:0},t=t=>{var r,o,i=t.__webpack_ids__,a=t.__webpack_modules__,s=t.__webpack_runtime__,l=0;for(r in a)n.o(a,r)&&(n.m[r]=a[r]);for(s&&s(n);l<i.length;l++)o=i[l],n.o(e,o)&&e[o]&&e[o][0](),e[i[l]]=0},n.f.j=function(r,o){var i=n.o(e,r)?e[r]:void 0;if(0!==i){if(i)o.push(i[1]);else{var a=import("./"+n.u(r)).then(t,t=>{throw 0!==e[r]&&(e[r]=void 0),t}),a=Promise.race([a,new Promise(t=>{i=e[r]=[t]})]);o.push(i[1]=a)}}};const i={"button-share":()=>Promise.all([n.e("18"),n.e("321"),n.e("766")]).then(n.bind(n,"./src/components/ButtonShare/index.ts")),"button-wallet":()=>Promise.all([n.e("18"),n.e("321"),n.e("438")]).then(n.bind(n,"./src/components/ButtonWallet/index.ts"))},a=new MutationObserver(e=>{for(let{addedNodes:t}of e)for(let e of Array.from(t))e.nodeType===Node.ELEMENT_NODE&&s(e)});async function s(e){let t=e instanceof Element?e.tagName.toLowerCase():"",r=t?.startsWith("frak-"),o=Array.from(e.querySelectorAll(":not(:defined)")).map(e=>e.tagName.toLowerCase()).filter(e=>e.startsWith("frak-"));r&&!customElements.get(t)&&o.push(t);let n=[...new Set(o)];await Promise.allSettled(n.map(e=>l(e)))}async function l(e){if(customElements.get(e))return Promise.resolve();try{let t=e.replace(/^frak-/i,"");if(!(t in i))throw Error(`Component ${e} is not supported.`);await i[t]()}catch(e){console.error(e)}}s(document.body),a.observe(document.documentElement,{subtree:!0,childList:!0});
|
package/dist/buttonShare.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"class-variance-authority";import*as a from"preact/hooks";let i="frakClientReady";function s(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(i,t,!1)}async function l(e){
|
|
1
|
+
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"class-variance-authority";import*as a from"preact/hooks";let i="frakClientReady";function s(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(i,t,!1)}async function l(e){console.log("referral",await (0,n.referralInteraction)(e,{modalConfig:window.FrakSetup?.modalWalletConfig}))}async function d(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,t.setupClient)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),function(){let e=new CustomEvent(i);window.dispatchEvent(e)}(),window.modalBuilderSteps=(0,n.modalBuilder)(e,window.FrakSetup?.modalConfig??{}),l(e),window.frakSetupInProgress=!1,function(){let e=new URLSearchParams(window.location.search).get("frakAction");e&&"share"===e&&(console.log("[Frak SDK] Auto open query param found"),function(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,n.displayEmbeddedWallet)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}())}()}let c="spinner__leaf-xtOJmT",u=({ref:e,className:t,...n})=>(0,o.jsxs)("span",{...n,ref:e,className:(0,r.cx)("spinner-KHk8mw"),children:[(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c}),(0,o.jsx)("span",{className:c})]});async function p({targetInteraction:e}){let o=window.FrakSetup?.client;if(!o){console.warn("Frak client not ready yet");return}let{maxReferrer:r,rewards:a}=await (0,n.getProductInformation)(o);if(!r)return;let i=(0,t.getCurrencyAmountKey)(o.config.metadata?.currency),s=Math.ceil(r[i]);if(e){let t=a.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(s=Math.ceil(t))}return(0,t.formatAmount)(s,o.config.metadata?.currency)}u.displayName="Spinner";let f={marginTop:"16px",padding:"16px",backgroundColor:"#FEE2E2",border:"1px solid #FCA5A5",borderRadius:"4px",color:"#991B1B"},m={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},w={margin:0,fontSize:"16px",fontWeight:500},g={fontSize:"14px",lineHeight:"1.5",margin:"0 0 12px 0"},x={color:"#991B1B",textDecoration:"underline",textUnderlineOffset:"2px"},k={display:"inline-flex",alignItems:"center",gap:"8px",marginBottom:"10px",padding:"8px 12px",backgroundColor:"white",border:"1px solid #D1D5DB",borderRadius:"4px",color:"black",fontSize:"14px",fontWeight:500};function S({debugInfo:e}){let[t,n]=(0,a.useState)(!1);return(0,o.jsxs)("div",{children:[(0,o.jsx)("button",{type:"button",style:k,onClick:()=>n(!t),children:"Ouvrir les informations"}),t&&(0,o.jsx)("textarea",{style:{display:"block",width:"100%",height:"200px",fontSize:"12px"},children:e})]})}function y({debugInfo:e}){let{copied:t,copy:n}=function(e={}){let{successDuration:t=2e3}=e,[n,o]=(0,a.useState)(!1);return{copy:(0,a.useCallback)(async e=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e),o(!0);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy"),o(!0)}catch(e){return console.error("Failed to copy text:",e),!1}finally{t.remove()}}return setTimeout(()=>{o(!1)},t),!0}catch(e){return console.error("Failed to copy text:",e),!1}},[t]),copied:n}}();return(0,o.jsxs)("div",{style:f,children:[(0,o.jsx)("div",{style:m,children:(0,o.jsx)("h3",{style:w,children:"Oups ! Nous avons rencontr\xe9 un petit probl\xe8me"})}),(0,o.jsxs)("p",{style:g,children:["Impossible d'ouvrir le menu de partage pour le moment. Si le probl\xe8me persiste, copiez les informations ci-dessous et collez-les dans votre mail \xe0"," ",(0,o.jsx)("a",{href:"mailto:help@frak-labs.com?subject=Debug",style:x,children:"help@frak-labs.com"})," ",(0,o.jsx)("br",{}),"Merci pour votre retour, nous traitons votre demande dans les plus brefs d\xe9lais."]}),(0,o.jsx)("button",{type:"button",onClick:()=>n(e??""),style:k,children:t?"Informations copi\xe9es !":"Copier les informations de d\xe9bogage"}),(0,o.jsx)(S,{debugInfo:e})]})}async function h(){if(!window.FrakSetup?.client)throw Error("Frak client not found");await (0,n.displayEmbeddedWallet)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}function b({text:e="Share and earn!",classname:n="",useReward:i,noRewardText:l,targetInteraction:d,showWallet:c}){let f=(0,a.useMemo)(()=>void 0!==i,[i]),m=(0,a.useMemo)(()=>void 0!==c,[c]),{isClientReady:w}=function(){let[e,t]=(0,a.useState)(!0),n=(0,a.useCallback)(()=>{t(!1)},[]);return(0,a.useEffect)(()=>(s("add",n),()=>s("remove",n)),[n]),{isClientReady:!e}}(),{reward:g}=function(e,t){let[n,o]=(0,a.useState)(void 0);return(0,a.useEffect)(()=>{e&&p({targetInteraction:t}).then(e=>{e&&o(e)})},[e,t]),{reward:n}}(f&&w,d),{handleShare:x,isError:k,debugInfo:S}=function(e){let[n,o]=(0,a.useState)(void 0),[r,i]=(0,a.useState)(!1);return{handleShare:(0,a.useCallback)(async()=>{if(!window.FrakSetup?.client){console.error("Frak client not found"),o(t.DebugInfoGatherer.empty().formatDebugInfo("Frak client not found")),i(!0);return}let n=function(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}();if(!n)throw Error("modalBuilderSteps not found");try{await n.sharing(window.FrakSetup?.modalShareConfig??{}).display(t=>({...t,targetInteraction:e}))}catch(e){if(e instanceof t.FrakRpcError&&e.code===t.RpcErrorCodes.clientAborted){console.debug("User aborted the modal");return}o(window.FrakSetup.client.debugInfo.formatDebugInfo(e)),i(!0),console.error("Error while opening the modal",e)}},[e]),isError:r,debugInfo:n}}(d),b=(0,a.useMemo)(()=>f?g?e.includes("{REWARD}")?e.replace("{REWARD}",g):`${e} ${g}`:l??e.replace("{REWARD}",""):e,[f,e,l,g]),F=(0,a.useCallback)(async()=>await (m?h():x()),[m,x]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{type:"button",className:(0,r.cx)("buttonShare-F23Y9m",n,"override"),onClick:F,children:[!w&&(0,o.jsx)(u,{})," ",b]}),k&&(0,o.jsx)(y,{debugInfo:S})]})}!function(t,n,o=[],r={shadow:!1}){if("undefined"!=typeof window){var a;a=async function(){await d()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(a,1):document.addEventListener?document.addEventListener("DOMContentLoaded",a):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&a()}),customElements.get(n)||(0,e.default)(t,n,o,r)}}(b,"frak-button-share",["text"],{shadow:!1});export{b as ButtonShare};
|
package/dist/buttonWallet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"preact/hooks";import*as i from"class-variance-authority";import*as a from"preact";function l(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,n.
|
|
1
|
+
import*as e from"preact-custom-element";import*as t from"@frak-labs/core-sdk";import*as n from"@frak-labs/core-sdk/actions";import*as o from"preact/jsx-runtime";import*as r from"preact/hooks";import*as i from"class-variance-authority";import*as a from"preact";function l(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,n.displayEmbeddedWallet)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}let u="frakClientReady";function c(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(u,t,!1)}async function s(e){console.log("referral",await (0,n.referralInteraction)(e,{modalConfig:window.FrakSetup?.modalWalletConfig}))}async function _(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,t.setupClient)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),function(){let e=new CustomEvent(u);window.dispatchEvent(e)}(),window.modalBuilderSteps=(0,n.modalBuilder)(e,window.FrakSetup?.modalConfig??{}),s(e),window.frakSetupInProgress=!1,function(){let e=new URLSearchParams(window.location.search).get("frakAction");e&&"share"===e&&(console.log("[Frak SDK] Auto open query param found"),l())}()}async function f({targetInteraction:e}){let o=window.FrakSetup?.client;if(!o){console.warn("Frak client not ready yet");return}let{maxReferrer:r,rewards:i}=await (0,n.getProductInformation)(o);if(!r)return;let a=(0,t.getCurrencyAmountKey)(o.config.metadata?.currency),l=Math.ceil(r[a]);if(e){let t=i.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[a]).reduce((e,t)=>t>e?t:e,0);t>0&&(l=Math.ceil(t))}return(0,t.formatAmount)(l,o.config.metadata?.currency)}let p={button:"button-aPZnsb",button__left:"button__left-fQJUnK",button__right:"button__right-TkFFFK",reward:"reward-w5dm3K"};function d(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var o in t)if("__source"!==o&&e[o]!==t[o])return!0;return!1}function m(e,t){this.props=e,this.context=t}(m.prototype=new a.Component).isPureReactComponent=!0,m.prototype.shouldComponentUpdate=function(e,t){return d(this.props,e)||d(this.state,t)};var v=a.options.__b;a.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),v&&v(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var h=a.options.__e;a.options.__e=function(e,t,n,o){if(e.then){for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}h(e,t,n,o)};var w=a.options.unmount;function y(){this.__u=0,this.o=null,this.__b=null}function g(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function k(){this.i=null,this.l=null}a.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),w&&w(e)},(y.prototype=new a.Component).__c=function(e,t){var n=t.__c,o=this;null==o.o&&(o.o=[]),o.o.push(n);var r=g(o.__v),i=!1,a=function(){i||(i=!0,n.__R=null,r?r(l):l())};n.__R=a;var l=function(){if(!--o.__u){if(o.state.__a){var e,t=o.state.__a;o.__v.__k[0]=function e(t,n,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)}),t.__c&&t.__c.__P===n&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}(t,t.__c.__P,t.__c.__O)}for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(a,a)},y.prototype.componentWillUnmount=function(){this.o=[]},y.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=function(e,t){for(var n in t)e[n]=t[n];return e}({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,o)})),t}(this.__b,n,o.__O=o.__P)}this.__b=null}var r=t.__a&&(0,a.createElement)(a.Fragment,null,e.fallback);return r&&(r.__u&=-33),[(0,a.createElement)(a.Fragment,null,t.__a?null:e.children),r]};var b=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(k.prototype=new a.Component).__a=function(e){var t=this,n=g(t.__v),o=t.l.get(e);return o[0]++,function(r){var i=function(){t.props.revealOrder?(o.push(r),b(t,e,o)):r()};n?n(i):i()}},k.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,a.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},k.prototype.componentDidUpdate=k.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){b(e,n,t)})};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,F=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,P=/[A-Z0-9]/g,E="undefined"!=typeof document;a.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(a.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var x=a.options.event;function O(){}function A(){return this.cancelBubble}function K(){return this.defaultPrevented}a.options.event=function(e){return x&&(e=x(e)),e.persist=O,e.isPropagationStopped=A,e.isDefaultPrevented=K,e.nativeEvent=e};var D={enumerable:!1,configurable:!0,get:function(){return this.class}},R=a.options.vnode;a.options.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,o={},r=-1===n.indexOf("-");for(var i in t){var l=t[i];if(!("value"===i&&"defaultValue"in t&&null==l||E&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var u,c=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===l?l="":"translate"===c&&"no"===l?l=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?i="ondblclick":"onchange"!==c||"input"!==n&&"textarea"!==n||(u=t.type,("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(u))?"onfocus"===c?i="onfocusin":"onblur"===c?i="onfocusout":F.test(i)&&(i=c):c=i="oninput":r&&C.test(i)?i=i.replace(P,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===c&&o[i=c]&&(i="oninputCapture"),o[i]=l}}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,a.toChildArray)(t.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=(0,a.toChildArray)(t.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),t.class&&!t.className?(o.class=t.class,Object.defineProperty(o,"className",D)):(t.className&&!t.class||t.class&&t.className)&&(o.class=o.className=t.className),e.props=o}(e),e.$$typeof=S,R&&R(e)};var L=a.options.__r;a.options.__r=function(e){L&&L(e),e.__c};var j=a.options.diffed;a.options.diffed=function(e){j&&j(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};let U=e=>(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 28 28",...e,children:(0,o.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M23.143 14v11.428H4.857V14M14 25.428V8.286m0 0H8.857a2.857 2.857 0 0 1 0-5.715c4 0 5.143 5.715 5.143 5.715m0 0h5.143a2.857 2.857 0 1 0 0-5.715c-4 0-5.143 5.715-5.143 5.715m-11.429 0h22.857V14H2.571z"})});function W({classname:e="",useReward:t,targetInteraction:n}){let a=(0,r.useMemo)(()=>void 0!==t,[t]),{isClientReady:u}=function(){let[e,t]=(0,r.useState)(!0),n=(0,r.useCallback)(()=>{t(!1)},[]);return(0,r.useEffect)(()=>(c("add",n),()=>c("remove",n)),[n]),{isClientReady:!e}}(),{reward:s}=function(e,t){let[n,o]=(0,r.useState)(void 0);return(0,r.useEffect)(()=>{e&&f({targetInteraction:t}).then(e=>{e&&o(e)})},[e,t]),{reward:n}}(a&&u,n),[_,d]=(0,r.useState)("right");return(0,r.useEffect)(()=>{d(window.FrakSetup?.modalWalletConfig?.metadata?.position??"right")},[]),(0,o.jsxs)("button",{type:"button","aria-label":"Open wallet",class:(0,i.cx)(p.button,"left"===_?p.button__left:p.button__right,e,"override"),disabled:!u,onClick:l,children:[(0,o.jsx)(U,{}),s&&(0,o.jsx)("span",{className:p.reward,children:s})]})}!function(t,n,o=[],r={shadow:!1}){if("undefined"!=typeof window){var i;i=async function(){await _()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(i,1):document.addEventListener?document.addEventListener("DOMContentLoaded",i):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&i()}),customElements.get(n)||(0,e.default)(t,n,o,r)}}(W,"frak-button-wallet",[],{shadow:!1});export{W as ButtonWallet};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.16",
|
|
15
15
|
"description": "Frak Wallet components, helping any person to interact with the Frak wallet.",
|
|
16
16
|
"repository": {
|
|
17
17
|
"url": "https://github.com/frak-id/wallet",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"publish": "echo 'Publishing components...'"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@frak-labs/core-sdk": "0.0.
|
|
55
|
+
"@frak-labs/core-sdk": "0.0.13",
|
|
56
56
|
"class-variance-authority": "^0.7.1",
|
|
57
57
|
"preact": "^10.26.4",
|
|
58
58
|
"preact-custom-element": "^4.3.0"
|
package/cdn/321.5f360d6d.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const __webpack_ids__=["321"];export const __webpack_modules__={"./src/components/ButtonWallet/utils.ts":function(e,t,n){n.d(t,{G:()=>o});var r=n("../core/dist/actions.js");function o(){if(!window.FrakSetup?.client){console.error("Frak client not found");return}"vibrate"in navigator?navigator.vibrate(10):console.log("Vibration not supported"),(0,r.Hq)(window.FrakSetup.client,window.FrakSetup?.modalWalletConfig??{})}},"./src/hooks/useClientReady.ts":function(e,t,n){n.d(t,{t:()=>a});var r=n("./src/utils/clientReady.ts"),o=n("../../node_modules/preact/hooks/dist/hooks.module.js");function a(){let[e,t]=(0,o.eJ)(!0),n=(0,o.I4)(()=>{t(!1)},[]);return(0,o.d4)(()=>((0,r.D)("add",n),()=>(0,r.D)("remove",n)),[n]),{isClientReady:!e}}},"./src/hooks/useReward.ts":function(e,t,n){n.d(t,{w:()=>s});var r=n("../core/dist/index.js"),o=n("../core/dist/actions.js");async function a({targetInteraction:e}){let t=window.FrakSetup?.client;if(!t){console.warn("Frak client not ready yet");return}let{maxReferrer:n,rewards:a}=await (0,o.pO)(t);if(!n)return;let i=(0,r.Up)(t.config.metadata?.currency),s=Math.ceil(n[i]);if(e){let t=a.filter(t=>t.interactionTypeKey===e).map(e=>e.referrer[i]).reduce((e,t)=>t>e?t:e,0);t>0&&(s=Math.ceil(t))}return(0,r.dN)(s,t.config.metadata?.currency)}var i=n("../../node_modules/preact/hooks/dist/hooks.module.js");function s(e,t){let[n,r]=(0,i.eJ)(void 0);return(0,i.d4)(()=>{e&&a({targetInteraction:t}).then(e=>{e&&r(e)})},[e,t]),{reward:n}}},"./src/utils/clientReady.ts":function(e,t,n){n.d(t,{D:()=>a,f:()=>o});let r="frakClientReady";function o(){let e=new CustomEvent(r);window.dispatchEvent(e)}function a(e,t){if(window.FrakSetup?.client&&"add"===e){t();return}("add"===e?window.addEventListener:window.removeEventListener)(r,t,!1)}},"./src/utils/registerWebComponent.ts":function(e,t,n){n.d(t,{A:()=>c});var r=n("../../node_modules/preact-custom-element/dist/preact-custom-element.esm.js"),o=n("../core/dist/index.js"),a=n("./src/components/ButtonWallet/utils.ts"),i=n("./src/utils/clientReady.ts"),s=n("./src/utils/setup.ts");async function l(){if(!(window.frakSetupInProgress?(console.log("[Frak SDK] Initialization already in progress"),!1):window.FrakSetup?.client?(console.log("[Frak SDK] Client already initialized"),!1):!!window.FrakSetup?.config||(console.error("[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set."),!1)))return;if(console.log("[Frak SDK] Starting initialization"),window.frakSetupInProgress=!0,!window.FrakSetup.config){console.error("[Frak SDK] Configuration not found"),window.frakSetupInProgress=!1;return}let e=await (0,o.lD)({config:window.FrakSetup.config});if(!e){console.error("[Frak SDK] Failed to create client"),window.frakSetupInProgress=!1;return}window.FrakSetup.client=e,console.log("[Frak SDK] Client initialized successfully"),(0,i.f)(),(0,s.N3)(e),(0,s.zK)(e),window.frakSetupInProgress=!1,function(){let e=new URLSearchParams(window.location.search).get("frakAction");e&&"share"===e&&(console.log("[Frak SDK] Auto open query param found"),(0,a.G)())}()}function c(e,t,n=[],o={shadow:!1}){if("undefined"!=typeof window){var a;a=async function(){await l()},"complete"===document.readyState||"interactive"===document.readyState?setTimeout(a,1):document.addEventListener?document.addEventListener("DOMContentLoaded",a):document.attachEvent("onreadystatechange",()=>{"complete"===document.readyState&&a()}),customElements.get(t)||(0,r.Z)(e,t,n,o)}}},"./src/utils/setup.ts":function(e,t,n){n.d(t,{Gt:()=>i,N3:()=>o,zK:()=>a});var r=n("../core/dist/actions.js");function o(e){window.modalBuilderSteps=(0,r.jy)(e,window.FrakSetup?.modalConfig??{})}async function a(e){if(!window.modalBuilderSteps){console.error("modalBuilderSteps not found");return}console.log("referral",await (0,r.KS)(e,{modalConfig:window.modalBuilderSteps.reward().params}))}function i(){if(!window.modalBuilderSteps)throw Error("modalBuilderSteps not found");return window.modalBuilderSteps}},"../core/dist/actions.js":function(e,t,n){n.d(t,{Hq:()=>u,KS:()=>E,jy:()=>w,pO:()=>f});var r=n("../../node_modules/viem/_esm/utils/hash/keccak256.js"),o=n("../../node_modules/viem/_esm/utils/encoding/toHex.js"),a=n("../../node_modules/viem/_esm/utils/encoding/toBytes.js"),i=n("../../node_modules/viem/_esm/utils/data/concat.js"),s=n("../../node_modules/viem/_esm/utils/data/pad.js"),l=n("../../node_modules/viem/_esm/utils/address/isAddressEqual.js");async function c(e,{productId:t,interaction:n,validation:a}){let i=t??function({domain:e}){let t=e??window.location.host;return(0,r.w)((0,o.NC)(t))}(e.config);return await e.request({method:"frak_sendInteraction",params:[i,n,a]})}async function d(e,{steps:t,metadata:n}){return await e.request({method:"frak_displayModal",params:[t,n,e.config.metadata]})}async function u(e,t){await e.request({method:"frak_displayEmbededWallet",params:[t,e.config.metadata]})}async function f(e){return await e.request({method:"frak_getProductInformation"})}function w(e,{metadata:t,login:n,openSession:r}){return function e(t,n){async function r(e){return e&&(n.metadata=e(n.metadata??{})),await d(t,n)}return{params:n,sendTx:function(r){return e(t,{...n,steps:{...n.steps,sendTransaction:r}})},reward:function(r){return e(t,{...n,steps:{...n.steps,final:{...r,action:{key:"reward"}}}})},sharing:function(r,o){return e(t,{...n,steps:{...n.steps,final:{...o,action:{key:"sharing",options:r}}}})},display:r}}(e,{steps:{login:n??{},openSession:r??{}},metadata:t})}let m="fCtx";function p({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(m);return t?function(e){if(e&&0!==e.length)try{let t;let n=(t=e.length%4,Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(0===t?0:4-t),"=")),e=>e.charCodeAt(0)));return{r:(0,o.ci)(n,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}(t):null}let g={parse:p,replaceUrl:function({url:e,context:t}){let n,r;if(!window.location?.href||"undefined"==typeof window){console.error("No window found, can't update context");return}let o=e??window.location.href;(n=null!==t?function({url:e,context:t}){if(!e)return null;let n=p({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let o=function(e){if(e?.r)try{var t;return t=(0,a.nr)(e.r),btoa(Array.from(t,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}(r);if(!o)return null;let i=new URL(e);return i.searchParams.set(m,o),i.toString()}({url:o,context:t}):((r=new URL(o)).searchParams.delete(m),r.toString()))&&window.history.replaceState(null,"",n.toString())}},h={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31};Object.entries(h).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{});let y={createLink:()=>({handlerTypeDenominator:(0,o.NC)(h.referral),interactionData:"0xb2c0f17c"}),referred({referrer:e}){let t=(0,i.SM)(["0x010cc3b9",(0,s.vk)(e,{size:32})]);return{handlerTypeDenominator:(0,o.NC)(h.referral),interactionData:t}}};class v extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}let S={walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};async function k(e,{walletStatus:t,frakContext:n,modalConfig:r,productId:o,options:a}){let i=!1;async function s(){if(!i)return i=!0,C(e,{modalConfig:r,walletStatus:t})}async function l(t){let n=y.referred({referrer:t});await c(e,{productId:o,interaction:n})}try{let{status:e,currentWallet:r}=await b({initialWalletStatus:t,getFreshWalletStatus:s,pushReferralInteraction:l,frakContext:n});return g.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:r}:null}),e}catch(e){return console.log("Error processing referral",{error:e}),g.replaceUrl({url:window.location?.href,context:a?.alwaysAppendUrl?{r:t?.wallet}:null}),function(e){if(e instanceof v)switch(e.code){case S.walletNotConnected:return"no-wallet";case S.serverErrorForInteractionDelegation:return"no-session"}return"error"}(e)}}async function b({initialWalletStatus:e,getFreshWalletStatus:t,pushReferralInteraction:n,frakContext:r}){let o=e?.wallet;return r?.r?(o||(o=await t()),o&&(0,l.E)(r.r,o))?{status:"self-referral",currentWallet:o}:(e?.interactionSession||(o=await t()),await n(r.r),{status:"success",currentWallet:o}):{status:"no-referrer",currentWallet:o}}async function C(e,{modalConfig:t,walletStatus:n}){if(!n?.interactionSession){if(!t)return;let n=await d(e,t);return n?.login?.wallet??void 0}return n.wallet??void 0}async function E(e,{productId:t,modalConfig:n,options:r}={}){var o;let a=g.parse({url:window.location.href}),i=await e.request({method:"frak_listenToWalletStatus"}).then(e=>{var t;return t=e.interactionToken,"undefined"!=typeof window&&(t?window.sessionStorage.setItem("frak-wallet-interaction-token",t):window.sessionStorage.removeItem("frak.interaction-token")),e});try{return await k(e,{walletStatus:i,frakContext:a,modalConfig:n,productId:t,options:r})}catch(e){console.warn("Error processing referral",{error:e})}}},"../core/dist/index.js":function(e,t,n){n.d(t,{Up:()=>b,dN:()=>C,lD:()=>k,oC:()=>p,ss:()=>s,u:()=>a});var r=n("../../node_modules/@jsonjoy.com/json-pack/lib/cbor/index.js"),o=n("../../node_modules/viem/_esm/utils/hash/sha256.js");class a extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}class i extends a{constructor(e){super(s.internalError,e)}}let s={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};class l{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve=e=>{this._resolve?.(e)};reject=e=>{this._reject?.(e)}}let c=new r.CborEncoder;function d(e){let t={...e,validationHash:u(e)};return c.encode(t)}function u(e){return(0,o.J)(c.encode(e))}let f=new r.CborDecoder;function w(e){if(!e.length)throw new a(s.corruptedResponse,"Missing compressed data");let t=function(e){try{return f.decode(e)}catch(t){return console.error("Invalid compressed data",{e:t,data:e}),null}}(e);if(!t)throw new a(s.corruptedResponse,"Invalid compressed data");if(!t?.validationHash)throw new a(s.corruptedResponse,"Missing validation hash");let{validationHash:n,...r}=t;if(u(r)!==t.validationHash)throw new a(s.corruptedResponse,"Invalid data validation hash");return t}let m="nexus-wallet-backup";class p{config;iframe;isSetupDone=!1;lastResponse=null;lastRequest=null;constructor(e,t){this.config=e,this.iframe=t,this.lastRequest=null,this.lastResponse=null}setLastResponse(e){this.lastResponse={event:e.data,origin:e.origin,timestamp:Date.now()}}setLastRequest(e,t){this.lastRequest={event:e,target:t,timestamp:Date.now()}}updateSetupStatus(e){this.isSetupDone=e}base64Encode(e){try{return btoa(JSON.stringify(e))}catch(e){return console.warn("Failed to encode debug data",e),btoa("Failed to encode data")}}getIframeStatus(){return this.iframe?{loading:this.iframe.hasAttribute("loading"),url:this.iframe.src,readyState:this.iframe.contentDocument?.readyState?+("complete"===this.iframe.contentDocument.readyState):-1,contentWindow:!!this.iframe.contentWindow,isConnected:this.iframe.isConnected}:null}getNavigatorInfo(){return navigator?{userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio}:null}gatherDebugInfo(e){let t=this.getIframeStatus(),n=this.getNavigatorInfo(),r="Unknown";return e instanceof a?r=`FrakRpcError: ${e.code} '${e.message}'`:e instanceof Error?r=e.message:"string"==typeof e&&(r=e),{timestamp:new Date().toISOString(),encodedUrl:btoa(window.location.href),encodedConfig:this.config?this.base64Encode(this.config):"no-config",navigatorInfo:n?this.base64Encode(n):"no-navigator",iframeStatus:t?this.base64Encode(t):"not-iframe",lastRequest:this.lastRequest?this.base64Encode(this.lastRequest):"No Frak request logged",lastResponse:this.lastResponse?this.base64Encode(this.lastResponse):"No Frak response logged",clientStatus:this.isSetupDone?"setup":"not-setup",error:r}}static empty(){return new p}formatDebugInfo(e){let t=this.gatherDebugInfo(e);return`
|
|
2
|
-
Debug Information:
|
|
3
|
-
-----------------
|
|
4
|
-
Timestamp: ${t.timestamp}
|
|
5
|
-
URL: ${t.encodedUrl}
|
|
6
|
-
Config: ${t.encodedConfig}
|
|
7
|
-
Navigator Info: ${t.navigatorInfo}
|
|
8
|
-
IFrame Status: ${t.iframeStatus}
|
|
9
|
-
Last Request: ${t.lastRequest}
|
|
10
|
-
Last Response: ${t.lastResponse}
|
|
11
|
-
Client Status: ${t.clientStatus}
|
|
12
|
-
Error: ${t.error}
|
|
13
|
-
`.trim()}}let g=2000001;function h({iframe:e,isVisible:t}){if(!t){e.style.width="0",e.style.height="0",e.style.border="0",e.style.position="fixed",e.style.top="-1000px",e.style.left="-1000px";return}e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="auto"}async function y({config:e,messageHandler:t,lifecycleManager:n}){async function r(){let n=e.customizations?.css;n&&t.sendEvent({clientLifecycle:"modal-css",data:{cssLink:n}})}async function o(){let n=e.customizations?.i18n;n&&t.sendEvent({clientLifecycle:"modal-i18n",data:{i18n:n}})}async function a(){if("undefined"==typeof window)return;let e=window.localStorage.getItem(m);e&&t.sendEvent({clientLifecycle:"restore-backup",data:{backup:e}})}await n.isConnected,await Promise.all([r(),o(),a()])}let v={eur:"fr-FR",usd:"en-US",gbp:"en-GB"};function S(e){return e&&e in v?e:"eur"}async function k({config:e}){let t;let n=(t=S(e.metadata?.currency),{...e,metadata:{...e.metadata,currency:t}}),r=await function({walletBaseUrl:e,config:t}){let n=document.querySelector("#frak-wallet");n&&n.remove();let r=document.createElement("iframe");return r.id="frak-wallet",r.name="frak-wallet",r.allow="publickey-credentials-get *; clipboard-write; web-share *",r.style.zIndex=g.toString(),h({iframe:r,isVisible:!1}),document.body.appendChild(r),new Promise(n=>{r?.addEventListener("load",()=>n(r)),r.src=`${t?.walletUrl??e??"https://wallet.frak.id"}/listener`})}({config:n});if(!r){console.error("Failed to create iframe");return}let o=function({config:e,iframe:t}){let n;let r=(n=new Map,{createChannel:e=>{let t=Math.random().toString(36).substring(7);return n.set(t,e),t},getRpcResolver:e=>n.get(e),removeChannel:e=>n.delete(e),destroy:()=>n.clear()}),o=function({iframe:e}){let t=new l;return{handleEvent:async n=>{switch(n.iframeLifecycle){case"connected":t.resolve(!0);break;case"do-backup":n.data.backup?localStorage.setItem(m,n.data.backup):localStorage.removeItem(m);break;case"remove-backup":localStorage.removeItem(m);break;case"show":case"hide":h({iframe:e,isVisible:"show"===n.iframeLifecycle});break;case"handshake":e.contentWindow?.postMessage({clientLifecycle:"handshake-response",data:{token:n.data.token,currentUrl:window.location.href}},"*")}},isConnected:t.promise}}({iframe:t}),c=new p(e,t),u=function({frakWalletUrl:e,iframe:t,channelManager:n,iframeLifecycleManager:r,debugInfo:o}){if("undefined"==typeof window)throw new a(s.configError,"iframe client should be used in the browser");if(!t.contentWindow)throw new a(s.configError,"The iframe does not have a product window");let i=t.contentWindow;async function l(t){if(!t.origin)return;try{if(new URL(t.origin).origin.toLowerCase()!==new URL(e).origin.toLowerCase())return}catch(e){console.log("Unable to check frak msg origin",e);return}if("object"!=typeof t.data)return;if(o.setLastResponse(t),"iframeLifecycle"in t.data){await r.handleEvent(t.data);return}if("clientLifecycle"in t.data){console.error("Client lifecycle event received on the client side, dismissing it");return}let a=t.data.id,i=n.getRpcResolver(a);i&&i(t.data)}return window.addEventListener("message",l),{sendEvent:function(t){i.postMessage(t,{targetOrigin:e}),o.setLastRequest(t,e)},cleanup:function(){window.removeEventListener("message",l)}}}({frakWalletUrl:e?.walletUrl??"https://wallet.frak.id",iframe:t,channelManager:r,iframeLifecycleManager:o,debugInfo:c}),f=async e=>{if(!await o.isConnected)throw new a(s.clientNotConnected,"The iframe provider isn't connected yet");let t=new l,n=r.createChannel(e=>{let o=w(e.data);o.error?t.reject(new a(o.error.code,o.error.message,o.error?.data)):t.resolve(o.result),r.removeChannel(n)}),i=d(e);return u.sendEvent({id:n,topic:e.method,data:i}),t.promise},g=async(e,t)=>{if(!await o.isConnected)throw new a(s.clientNotConnected,"The iframe provider isn't connected yet");let n=r.createChannel(e=>{let n=w(e.data);if(n.result)t(n.result);else throw new i("No valid result in the response")}),l=d(e);u.sendEvent({id:n,topic:e.method,data:l})},v=function(e,t){let n,r;let o=()=>e.sendEvent({clientLifecycle:"heartbeat"});function a(){n&&clearInterval(n),r&&clearTimeout(r)}return async function(){o(),n=setInterval(o,100),r=setTimeout(()=>{a(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,a()}(),a}(u,o),S=async()=>{v(),r.destroy(),u.cleanup(),t.remove()},k=y({config:e,messageHandler:u,lifecycleManager:o}).then(()=>c.updateSetupStatus(!0));return{config:e,debugInfo:c,waitForConnection:o.isConnected,waitForSetup:k,request:f,listenerRequest:g,destroy:S}}({config:n,iframe:r});if(await o.waitForSetup,!await o.waitForConnection){console.error("Failed to connect to client");return}return o}function b(e){return e?`${e}Amount`:"eurAmount"}function C(e,t){let n=t?v[t]??v.eur:v.eur,r=S(t);return e.toLocaleString(n,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2})}Object.entries({dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31}).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{})}};
|
|
File without changes
|