@tezos-x/octez.connect-wallet 5.0.0-beta.7 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["beacon"]=factory();else root["beacon"]=factory()})(self,()=>(()=>{var __webpack_modules__={"./node_modules/@noble/hashes/_assert.js"(__unused_webpack_module,exports){"use strict";eval("{\n/**\n * Assertion helpers\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.anumber = anumber;\nexports.abytes = abytes;\nexports.ahash = ahash;\nexports.aexists = aexists;\nexports.aoutput = aoutput;\nfunction anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error('positive integer expected, got ' + n);\n}\n// copied from utils\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nfunction abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\nfunction ahash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\nfunction aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n//# sourceMappingURL=_assert.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/_assert.js?\n}")},"./node_modules/@noble/hashes/_md.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.HashMD = exports.Maj = exports.Chi = void 0;\nexports.setBigUint64 = setBigUint64;\nconst _assert_js_1 = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/_assert.js\");\nconst utils_js_1 = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/utils.js\");\n/**\n * Merkle-Damgard hash utils.\n * @module\n */\n/**\n * Polyfill for Safari 14\n */\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n/**\n * Choice: a ? b : c\n */\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\nexports.Chi = Chi;\n/**\n * Majority function, true if any two inputs is true\n */\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\nexports.Maj = Maj;\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nclass HashMD extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.aexists)(this);\n const { view, buffer, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.aexists)(this);\n (0, _assert_js_1.aoutput)(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\nexports.HashMD = HashMD;\n//# sourceMappingURL=_md.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/_md.js?\n}")},"./node_modules/@noble/hashes/crypto.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.crypto = void 0;\nexports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/crypto.js?\n}")},"./node_modules/@noble/hashes/sha256.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.sha224 = exports.sha256 = exports.SHA256 = void 0;\nconst _md_js_1 = __webpack_require__(/*! ./_md.js */ "./node_modules/@noble/hashes/_md.js");\nconst utils_js_1 = __webpack_require__(/*! ./utils.js */ "./node_modules/@noble/hashes/utils.js");\n/**\n * SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.\n *\n * To break sha256 using birthday attack, attackers need to try 2^128 hashes.\n * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.\n *\n * Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).\n * @module\n */\n/** Round constants: first 32 bits of fractional parts of the cube roots of the first 64 primes 2..311). */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n/** Initial state: first 32 bits of fractional parts of the square roots of the first 8 primes 2..19. */\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n/**\n * Temporary buffer, not used to store anything between runs.\n * Named this way because it matches specification.\n */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends _md_js_1.HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);\n const T1 = (H + sigma1 + (0, _md_js_1.Chi)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);\n const T2 = (sigma0 + (0, _md_js_1.Maj)(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\nexports.SHA256 = SHA256;\n/**\n * Constants taken from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf.\n */\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/** SHA2-256 hash function */\nexports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());\n/** SHA2-224 hash function */\nexports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());\n//# sourceMappingURL=sha256.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/sha256.js?\n}')},"./node_modules/@noble/hashes/utils.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.byteSwap = exports.isLE = exports.rotl = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;\nexports.isBytes = isBytes;\nexports.byteSwap32 = byteSwap32;\nexports.bytesToHex = bytesToHex;\nexports.hexToBytes = hexToBytes;\nexports.asyncLoop = asyncLoop;\nexports.utf8ToBytes = utf8ToBytes;\nexports.toBytes = toBytes;\nexports.concatBytes = concatBytes;\nexports.checkOpts = checkOpts;\nexports.wrapConstructor = wrapConstructor;\nexports.wrapConstructorWithOpts = wrapConstructorWithOpts;\nexports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\nexports.randomBytes = randomBytes;\n/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nconst crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ \"./node_modules/@noble/hashes/crypto.js\");\nconst _assert_js_1 = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/_assert.js\");\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.u8 = u8;\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nexports.u32 = u32;\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.createView = createView;\n/** The rotate right (circular right shift) operation for uint32 */\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\nexports.rotr = rotr;\n/** The rotate left (circular left shift) operation for uint32 */\nconst rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexports.rotl = rotl;\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexports.isLE = (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// The byte swap operation for uint32\nconst byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\nexports.byteSwap = byteSwap;\n/** Conditionally byte swap if on a big-endian platform */\nexports.byteSwapIfBE = exports.isLE\n ? (n) => n\n : (n) => (0, exports.byteSwap)(n);\n/** In place byte swap for Uint32Array */\nfunction byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = (0, exports.byteSwap)(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n (0, _assert_js_1.abytes)(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n/**\n * Convert hex string to byte array.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nconst nextTick = async () => { };\nexports.nextTick = nextTick;\n// Returns control to thread each 'tick' ms to avoid blocking\nasync function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports.nextTick)();\n ts += diff;\n }\n}\n/**\n * Convert JS string to byte array.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nfunction utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error('utf8ToBytes expected string, got ' + typeof str);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nfunction toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n (0, _assert_js_1.abytes)(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nfunction concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n (0, _assert_js_1.abytes)(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nclass Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nexports.Hash = Hash;\nfunction checkOpts(defaults, opts) {\n if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nfunction wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nfunction wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nfunction wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nfunction randomBytes(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === 'function') {\n return crypto_1.crypto.randomBytes(bytesLength);\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/utils.js?\n}")},"./node_modules/base64-js/index.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/base64-js/index.js?\n}")},"./node_modules/broadcast-channel/dist/lib/broadcast-channel.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.OPEN_BROADCAST_CHANNELS = exports.BroadcastChannel = void 0;\nexports.clearNodeFolder = clearNodeFolder;\nexports.enforceOptions = enforceOptions;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _methodChooser = __webpack_require__(/*! ./method-chooser.js */ \"./node_modules/broadcast-channel/dist/lib/method-chooser.js\");\nvar _options = __webpack_require__(/*! ./options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\n/**\n * Contains all open channels,\n * used in tests to ensure everything is closed.\n */\nvar OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set();\nvar lastId = 0;\nvar BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) {\n // identifier of the channel to debug stuff\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = (0, _options.fillOptionsWithDefaults)(options);\n this.method = (0, _methodChooser.chooseMethod)(this.options);\n\n // isListening\n this._iL = false;\n\n /**\n * _onMessageListener\n * setting onmessage twice,\n * will overwrite the first listener\n */\n this._onML = null;\n\n /**\n * _addEventListeners\n */\n this._addEL = {\n message: [],\n internal: []\n };\n\n /**\n * Unsent message promises\n * where the sending is still in progress\n * @type {Set<Promise>}\n */\n this._uMP = new Set();\n\n /**\n * _beforeClose\n * array of promises that will be awaited\n * before the channel is closed\n */\n this._befC = [];\n\n /**\n * _preparePromise\n */\n this._prepP = null;\n _prepareChannel(this);\n};\n\n// STATICS\n\n/**\n * used to identify if someone overwrites\n * window.BroadcastChannel with this\n * See methods/native.js\n */\nBroadcastChannel._pubkey = true;\n\n/**\n * clears the tmp-folder if is node\n * @return {Promise<boolean>} true if has run, false if not node\n */\nfunction clearNodeFolder(options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n var method = (0, _methodChooser.chooseMethod)(options);\n if (method.type === 'node') {\n return method.clearNodeFolder().then(function () {\n return true;\n });\n } else {\n return _util.PROMISE_RESOLVED_FALSE;\n }\n}\n\n/**\n * if set, this method is enforced,\n * no mather what the options are\n */\nvar ENFORCED_OPTIONS;\nfunction enforceOptions(options) {\n ENFORCED_OPTIONS = options;\n}\n\n// PROTOTYPE\nBroadcastChannel.prototype = {\n postMessage: function postMessage(msg) {\n if (this.closed) {\n throw new Error('BroadcastChannel.postMessage(): ' + 'Cannot post message after channel has closed ' +\n /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, 'message', msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, 'internal', msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time: time,\n fn: fn\n };\n _removeListenerObject(this, 'message', this._onML);\n if (fn && typeof fn === 'function') {\n this._onML = listenObj;\n _addListenerObject(this, 'message', listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time: time,\n fn: fn\n };\n _addListenerObject(this, type, listenObj);\n },\n removeEventListener: function removeEventListener(type, fn) {\n var obj = this._addEL[type].find(function (obj) {\n return obj.fn === fn;\n });\n _removeListenerObject(this, type, obj);\n },\n close: function close() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : _util.PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare\n // wait until all current sending are processed\n .then(function () {\n return Promise.all(Array.from(_this._uMP));\n })\n // run before-close hooks\n .then(function () {\n return Promise.all(_this._befC.map(function (fn) {\n return fn();\n }));\n })\n // close the channel\n .then(function () {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\n\n/**\n * Post a message over the channel\n * @returns {Promise} that resolved when the message sending is done\n */\nfunction _post(broadcastChannel, type, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time: time,\n type: type,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : _util.PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function () {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n\n // add/remove to unsent messages list\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function () {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if ((0, _util.isPromise)(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function (s) {\n // used in tests to simulate slow runtime\n /*if (channel.options.prepareDelay) {\n await new Promise(res => setTimeout(res, this.options.prepareDelay));\n }*/\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0) return true;\n if (channel._addEL.internal.length > 0) return true;\n return false;\n}\nfunction _addListenerObject(channel, type, obj) {\n channel._addEL[type].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type, obj) {\n channel._addEL[type] = channel._addEL[type].filter(function (o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n // someone is listening, start subscribing\n\n var listenerFn = function listenerFn(msgObj) {\n channel._addEL[msgObj.type].forEach(function (listenerObject) {\n if (msgObj.time >= listenerObject.time) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function () {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n // no one is listening, stop subscribing\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/broadcast-channel.js?\n}")},"./node_modules/broadcast-channel/dist/lib/index.es5.js"(module,__unused_webpack_exports,__webpack_require__){"use strict";eval("{\n\nvar _index = __webpack_require__(/*! ./index.js */ \"./node_modules/broadcast-channel/dist/lib/index.js\");\n/**\n * because babel can only export on default-attribute,\n * we use this for the non-module-build\n * this ensures that users do not have to use\n * var BroadcastChannel = require('broadcast-channel').default;\n * but\n * var BroadcastChannel = require('broadcast-channel');\n */\n\nmodule.exports = {\n BroadcastChannel: _index.BroadcastChannel,\n createLeaderElection: _index.createLeaderElection,\n clearNodeFolder: _index.clearNodeFolder,\n enforceOptions: _index.enforceOptions,\n beLeader: _index.beLeader\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/index.es5.js?\n}")},"./node_modules/broadcast-channel/dist/lib/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nObject.defineProperty(exports, "BroadcastChannel", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.BroadcastChannel;\n }\n}));\nObject.defineProperty(exports, "OPEN_BROADCAST_CHANNELS", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.OPEN_BROADCAST_CHANNELS;\n }\n}));\nObject.defineProperty(exports, "beLeader", ({\n enumerable: true,\n get: function get() {\n return _leaderElectionUtil.beLeader;\n }\n}));\nObject.defineProperty(exports, "clearNodeFolder", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.clearNodeFolder;\n }\n}));\nObject.defineProperty(exports, "createLeaderElection", ({\n enumerable: true,\n get: function get() {\n return _leaderElection.createLeaderElection;\n }\n}));\nObject.defineProperty(exports, "enforceOptions", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.enforceOptions;\n }\n}));\nvar _broadcastChannel = __webpack_require__(/*! ./broadcast-channel.js */ "./node_modules/broadcast-channel/dist/lib/broadcast-channel.js");\nvar _leaderElection = __webpack_require__(/*! ./leader-election.js */ "./node_modules/broadcast-channel/dist/lib/leader-election.js");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ "./node_modules/broadcast-channel/dist/lib/leader-election-util.js");\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/index.js?\n}')},"./node_modules/broadcast-channel/dist/lib/leader-election-util.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.beLeader = beLeader;\nexports.sendLeaderMessage = sendLeaderMessage;\nvar _unload = __webpack_require__(/*! unload */ \"./node_modules/unload/dist/es/index.js\");\n/**\n * sends and internal message over the broadcast-channel\n */\nfunction sendLeaderMessage(leaderElector, action) {\n var msgJson = {\n context: 'leader',\n action: action,\n token: leaderElector.token\n };\n return leaderElector.broadcastChannel.postInternal(msgJson);\n}\nfunction beLeader(leaderElector) {\n leaderElector.isLeader = true;\n leaderElector._hasLeader = true;\n var unloadFn = (0, _unload.add)(function () {\n return leaderElector.die();\n });\n leaderElector._unl.push(unloadFn);\n var isLeaderListener = function isLeaderListener(msg) {\n if (msg.context === 'leader' && msg.action === 'apply') {\n sendLeaderMessage(leaderElector, 'tell');\n }\n if (msg.context === 'leader' && msg.action === 'tell' && !leaderElector._dpLC) {\n /**\n * another instance is also leader!\n * This can happen on rare events\n * like when the CPU is at 100% for long time\n * or the tabs are open very long and the browser throttles them.\n * @link https://github.com/pubkey/broadcast-channel/issues/414\n * @link https://github.com/pubkey/broadcast-channel/issues/385\n */\n leaderElector._dpLC = true;\n leaderElector._dpL(); // message the lib user so the app can handle the problem\n sendLeaderMessage(leaderElector, 'tell'); // ensure other leader also knows the problem\n }\n };\n leaderElector.broadcastChannel.addEventListener('internal', isLeaderListener);\n leaderElector._lstns.push(isLeaderListener);\n return sendLeaderMessage(leaderElector, 'tell');\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election-util.js?\n}")},"./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.LeaderElectionWebLock = void 0;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-util.js\");\n/**\n * A faster version of the leader elector that uses the WebLock API\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API\n */\nvar LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) {\n var _this = this;\n this.broadcastChannel = broadcastChannel;\n broadcastChannel._befC.push(function () {\n return _this.die();\n });\n this._options = options;\n this.isLeader = false;\n this.isDead = false;\n this.token = (0, _util.randomToken)();\n this._lstns = [];\n this._unl = [];\n this._dpL = function () {}; // onduplicate listener\n this._dpLC = false; // true when onduplicate called\n\n this._wKMC = {}; // stuff for cleanup\n\n // lock name\n this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name;\n};\nvar LEADER_DIE_ABORT_SIGNAL_MESSAGE = 'LeaderElectionWebLock.die() called';\nLeaderElectionWebLock.prototype = {\n hasLeader: function hasLeader() {\n var _this2 = this;\n return navigator.locks.query().then(function (locks) {\n var relevantLocks = locks.held ? locks.held.filter(function (lock) {\n return lock.name === _this2.lN;\n }) : [];\n if (relevantLocks && relevantLocks.length > 0) {\n return true;\n } else {\n return false;\n }\n });\n },\n awaitLeadership: function awaitLeadership() {\n var _this3 = this;\n if (!this._wLMP) {\n this._wKMC.c = new AbortController();\n var returnPromise = new Promise(function (res, rej) {\n _this3._wKMC.res = res;\n _this3._wKMC.rej = rej;\n });\n this._wLMP = new Promise(function (res, reject) {\n navigator.locks.request(_this3.lN, {\n signal: _this3._wKMC.c.signal\n }, function () {\n // if the lock resolved, we can drop the abort controller\n _this3._wKMC.c = undefined;\n (0, _leaderElectionUtil.beLeader)(_this3);\n res();\n return returnPromise;\n })[\"catch\"](function (err) {\n if (err.message && err.message === LEADER_DIE_ABORT_SIGNAL_MESSAGE) {\n /**\n * In this case we do nothing!\n * The leader died and awaitLeadership()\n * will never resolve. Also since this is not an error,\n * it will not throw.\n */\n } else {\n if (_this3._wKMC.rej) {\n _this3._wKMC.rej(err);\n }\n reject(err);\n }\n });\n });\n }\n return this._wLMP;\n },\n set onduplicate(_fn) {\n // Do nothing because there are no duplicates in the WebLock version\n },\n die: function die() {\n var _this4 = this;\n this._lstns.forEach(function (listener) {\n return _this4.broadcastChannel.removeEventListener('internal', listener);\n });\n this._lstns = [];\n this._unl.forEach(function (uFn) {\n return uFn.remove();\n });\n this._unl = [];\n if (this.isLeader) {\n this.isLeader = false;\n }\n this.isDead = true;\n if (this._wKMC.res) {\n this._wKMC.res();\n }\n\n /**\n * We have to fire an abort signal\n * so that the navigator.locks.request stops.\n */\n if (this._wKMC.c) {\n this._wKMC.c.abort(new Error(LEADER_DIE_ABORT_SIGNAL_MESSAGE));\n }\n return (0, _leaderElectionUtil.sendLeaderMessage)(this, 'death');\n }\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js?\n}")},"./node_modules/broadcast-channel/dist/lib/leader-election.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.createLeaderElection = createLeaderElection;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-util.js\");\nvar _leaderElectionWebLock = __webpack_require__(/*! ./leader-election-web-lock.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js\");\nvar LeaderElection = function LeaderElection(broadcastChannel, options) {\n var _this = this;\n this.broadcastChannel = broadcastChannel;\n this._options = options;\n this.isLeader = false;\n this._hasLeader = false;\n this.isDead = false;\n this.token = (0, _util.randomToken)();\n\n /**\n * Apply Queue,\n * used to ensure we do not run applyOnce()\n * in parallel.\n */\n this._aplQ = _util.PROMISE_RESOLVED_VOID;\n // amount of unfinished applyOnce() calls\n this._aplQC = 0;\n\n // things to clean up\n this._unl = []; // _unloads\n this._lstns = []; // _listeners\n this._dpL = function () {}; // onduplicate listener\n this._dpLC = false; // true when onduplicate called\n\n /**\n * Even when the own instance is not applying,\n * we still listen to messages to ensure the hasLeader flag\n * is set correctly.\n */\n var hasLeaderListener = function hasLeaderListener(msg) {\n if (msg.context === 'leader') {\n if (msg.action === 'death') {\n _this._hasLeader = false;\n }\n if (msg.action === 'tell') {\n _this._hasLeader = true;\n }\n }\n };\n this.broadcastChannel.addEventListener('internal', hasLeaderListener);\n this._lstns.push(hasLeaderListener);\n};\nLeaderElection.prototype = {\n hasLeader: function hasLeader() {\n return Promise.resolve(this._hasLeader);\n },\n /**\n * Returns true if the instance is leader,\n * false if not.\n * @async\n */\n applyOnce: function applyOnce(\n // true if the applyOnce() call came from the fallbackInterval cycle\n isFromFallbackInterval) {\n var _this2 = this;\n if (this.isLeader) {\n return (0, _util.sleep)(0, true);\n }\n if (this.isDead) {\n return (0, _util.sleep)(0, false);\n }\n\n /**\n * Already applying more than once,\n * -> wait for the apply queue to be finished.\n */\n if (this._aplQC > 1) {\n return this._aplQ;\n }\n\n /**\n * Add a new apply-run\n */\n var applyRun = function applyRun() {\n /**\n * Optimization shortcuts.\n * Directly return if a previous run\n * has already elected a leader.\n */\n if (_this2.isLeader) {\n return _util.PROMISE_RESOLVED_TRUE;\n }\n var stopCriteria = false;\n var stopCriteriaPromiseResolve;\n /**\n * Resolves when a stop criteria is reached.\n * Uses as a performance shortcut so we do not\n * have to await the responseTime when it is already clear\n * that the election failed.\n */\n var stopCriteriaPromise = new Promise(function (res) {\n stopCriteriaPromiseResolve = function stopCriteriaPromiseResolve() {\n stopCriteria = true;\n res();\n };\n });\n var handleMessage = function handleMessage(msg) {\n if (msg.context === 'leader' && msg.token != _this2.token) {\n if (msg.action === 'apply') {\n // other is applying\n if (msg.token > _this2.token) {\n /**\n * other has higher token\n * -> stop applying and let other become leader.\n */\n stopCriteriaPromiseResolve();\n }\n }\n if (msg.action === 'tell') {\n // other is already leader\n stopCriteriaPromiseResolve();\n _this2._hasLeader = true;\n }\n }\n };\n _this2.broadcastChannel.addEventListener('internal', handleMessage);\n\n /**\n * If the applyOnce() call came from the fallbackInterval,\n * we can assume that the election runs in the background and\n * not critical process is waiting for it.\n * When this is true, we give the other instances\n * more time to answer to messages in the election cycle.\n * This makes it less likely to elect duplicate leaders.\n * But also it takes longer which is not a problem because we anyway\n * run in the background.\n */\n var waitForAnswerTime = isFromFallbackInterval ? _this2._options.responseTime * 4 : _this2._options.responseTime;\n return (0, _leaderElectionUtil.sendLeaderMessage)(_this2, 'apply') // send out that this one is applying\n .then(function () {\n return Promise.race([(0, _util.sleep)(waitForAnswerTime), stopCriteriaPromise.then(function () {\n return Promise.reject(new Error());\n })]);\n })\n // send again in case another instance was just created\n .then(function () {\n return (0, _leaderElectionUtil.sendLeaderMessage)(_this2, 'apply');\n })\n // let others time to respond\n .then(function () {\n return Promise.race([(0, _util.sleep)(waitForAnswerTime), stopCriteriaPromise.then(function () {\n return Promise.reject(new Error());\n })]);\n })[\"catch\"](function () {}).then(function () {\n _this2.broadcastChannel.removeEventListener('internal', handleMessage);\n if (!stopCriteria) {\n // no stop criteria -> own is leader\n return (0, _leaderElectionUtil.beLeader)(_this2).then(function () {\n return true;\n });\n } else {\n // other is leader\n return false;\n }\n });\n };\n this._aplQC = this._aplQC + 1;\n this._aplQ = this._aplQ.then(function () {\n return applyRun();\n }).then(function () {\n _this2._aplQC = _this2._aplQC - 1;\n });\n return this._aplQ.then(function () {\n return _this2.isLeader;\n });\n },\n awaitLeadership: function awaitLeadership() {\n if (/* _awaitLeadershipPromise */\n !this._aLP) {\n this._aLP = _awaitLeadershipOnce(this);\n }\n return this._aLP;\n },\n set onduplicate(fn) {\n this._dpL = fn;\n },\n die: function die() {\n var _this3 = this;\n this._lstns.forEach(function (listener) {\n return _this3.broadcastChannel.removeEventListener('internal', listener);\n });\n this._lstns = [];\n this._unl.forEach(function (uFn) {\n return uFn.remove();\n });\n this._unl = [];\n if (this.isLeader) {\n this._hasLeader = false;\n this.isLeader = false;\n }\n this.isDead = true;\n return (0, _leaderElectionUtil.sendLeaderMessage)(this, 'death');\n }\n};\n\n/**\n * @param leaderElector {LeaderElector}\n */\nfunction _awaitLeadershipOnce(leaderElector) {\n if (leaderElector.isLeader) {\n return _util.PROMISE_RESOLVED_VOID;\n }\n return new Promise(function (res) {\n var resolved = false;\n function finish() {\n if (resolved) {\n return;\n }\n resolved = true;\n leaderElector.broadcastChannel.removeEventListener('internal', whenDeathListener);\n res(true);\n }\n\n // try once now\n leaderElector.applyOnce().then(function () {\n if (leaderElector.isLeader) {\n finish();\n }\n });\n\n /**\n * Try on fallbackInterval\n * @recursive\n */\n var _tryOnFallBack = function tryOnFallBack() {\n return (0, _util.sleep)(leaderElector._options.fallbackInterval).then(function () {\n if (leaderElector.isDead || resolved) {\n return;\n }\n if (leaderElector.isLeader) {\n finish();\n } else {\n return leaderElector.applyOnce(true).then(function () {\n if (leaderElector.isLeader) {\n finish();\n } else {\n _tryOnFallBack();\n }\n });\n }\n });\n };\n _tryOnFallBack();\n\n // try when other leader dies\n var whenDeathListener = function whenDeathListener(msg) {\n if (msg.context === 'leader' && msg.action === 'death') {\n leaderElector._hasLeader = false;\n leaderElector.applyOnce().then(function () {\n if (leaderElector.isLeader) {\n finish();\n }\n });\n }\n };\n leaderElector.broadcastChannel.addEventListener('internal', whenDeathListener);\n leaderElector._lstns.push(whenDeathListener);\n });\n}\nfunction fillOptionsWithDefaults(options, channel) {\n if (!options) options = {};\n options = JSON.parse(JSON.stringify(options));\n if (!options.fallbackInterval) {\n options.fallbackInterval = 3000;\n }\n if (!options.responseTime) {\n options.responseTime = channel.method.averageResponseTime(channel.options);\n }\n return options;\n}\nfunction createLeaderElection(channel, options) {\n if (channel._leaderElector) {\n throw new Error('BroadcastChannel already has a leader-elector');\n }\n options = fillOptionsWithDefaults(options, channel);\n var elector = (0, _util.supportsWebLockAPI)() ? new _leaderElectionWebLock.LeaderElectionWebLock(channel, options) : new LeaderElection(channel, options);\n channel._befC.push(function () {\n return elector.die();\n });\n channel._leaderElector = elector;\n return elector;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election.js?\n}")},"./node_modules/broadcast-channel/dist/lib/method-chooser.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js");\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nexports.chooseMethod = chooseMethod;\nvar _native = __webpack_require__(/*! ./methods/native.js */ "./node_modules/broadcast-channel/dist/lib/methods/native.js");\nvar _indexedDb = __webpack_require__(/*! ./methods/indexed-db.js */ "./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js");\nvar _localstorage = __webpack_require__(/*! ./methods/localstorage.js */ "./node_modules/broadcast-channel/dist/lib/methods/localstorage.js");\nvar _simulate = __webpack_require__(/*! ./methods/simulate.js */ "./node_modules/broadcast-channel/dist/lib/methods/simulate.js");\nfunction _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }\n// the line below will be removed from es5/browser builds\n\n// order is important\nvar METHODS = [_native.NativeMethod,\n// fastest\n_indexedDb.IndexedDBMethod, _localstorage.LocalstorageMethod];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n\n // the line below will be removed from es5/browser builds\n\n // directly chosen\n if (options.type) {\n if (options.type === \'simulate\') {\n // only use simulate-method if directly chosen\n return _simulate.SimulateMethod;\n }\n var ret = chooseMethods.find(function (m) {\n return m.type === options.type;\n });\n if (!ret) throw new Error(\'method-type \' + options.type + \' not found\');else return ret;\n }\n\n /**\n * if no webworker support is needed,\n * remove idb from the list so that localstorage will be chosen\n */\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function (m) {\n return m.type !== \'idb\';\n });\n }\n var useMethod = chooseMethods.find(function (method) {\n return method.canBeUsed();\n });\n if (!useMethod) {\n throw new Error("No usable method found in " + JSON.stringify(METHODS.map(function (m) {\n return m.type;\n })));\n } else {\n return useMethod;\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/method-chooser.js?\n}')},"./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TRANSACTION_SETTINGS = exports.IndexedDBMethod = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.cleanOldMessages = cleanOldMessages;\nexports.close = close;\nexports.commitIndexedDBTransaction = commitIndexedDBTransaction;\nexports.create = create;\nexports.createDatabase = createDatabase;\nexports.getAllMessages = getAllMessages;\nexports.getIdb = getIdb;\nexports.getMessagesHigherThan = getMessagesHigherThan;\nexports.getOldMessages = getOldMessages;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.removeMessagesById = removeMessagesById;\nexports.type = void 0;\nexports.writeMessage = writeMessage;\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _obliviousSet = __webpack_require__(/*! oblivious-set */ \"./node_modules/oblivious-set/dist/cjs/src/index.es5.js\");\nvar _options = __webpack_require__(/*! ../options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\n/**\n * this method uses indexeddb to store the messages\n * There is currently no observerAPI for idb\n * @link https://github.com/w3c/IndexedDB/issues/51\n * \n * When working on this, ensure to use these performance optimizations:\n * @link https://rxdb.info/slow-indexeddb.html\n */\n\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar DB_PREFIX = 'pubkey.broadcast-channel-0-';\nvar OBJECT_STORE_ID = 'messages';\n\n/**\n * Use relaxed durability for faster performance on all transactions.\n * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/\n */\nvar TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = {\n durability: 'relaxed'\n};\nvar type = exports.type = 'idb';\nfunction getIdb() {\n if (typeof indexedDB !== 'undefined') return indexedDB;\n if (typeof window !== 'undefined') {\n if (typeof window.mozIndexedDB !== 'undefined') return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== 'undefined') return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== 'undefined') return window.msIndexedDB;\n }\n return false;\n}\n\n/**\n * If possible, we should explicitly commit IndexedDB transactions\n * for better performance.\n * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/\n */\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n\n // create table\n var dbName = DB_PREFIX + channelName;\n\n /**\n * All IndexedDB databases are opened without version\n * because it is a bit faster, especially on firefox\n * @link http://nparashuram.com/IndexedDB/perf/#Open%20Database%20with%20version\n */\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function (ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: 'id',\n autoIncrement: true\n });\n };\n return new Promise(function (res, rej) {\n openRequest.onerror = function (ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function () {\n res(openRequest.result);\n };\n });\n}\n\n/**\n * writes the new message to the database\n * so other readers can find it\n */\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = Date.now();\n var writeObject = {\n uuid: readerUuid,\n time: time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], 'readwrite', TRANSACTION_SETTINGS);\n return new Promise(function (res, rej) {\n tx.oncomplete = function () {\n return res();\n };\n tx.onerror = function (ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getAllMessages(db) {\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function (res) {\n objectStore.openCursor().onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n ret.push(cursor.value);\n //alert(\"Name for SSN \" + cursor.key + \" is \" + cursor.value.name);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n\n /**\n * Optimization shortcut,\n * if getAll() can be used, do not use a cursor.\n * @link https://rxdb.info/slow-indexeddb.html\n */\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function (res, rej) {\n getAllRequest.onerror = function (err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function (e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n // Occasionally Safari will fail on IDBKeyRange.bound, this\n // catches that error, having it open the cursor to the first\n // item. When it gets data it will advance to the desired key.\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function (res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function (err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, 'readwrite', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function (id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function (res) {\n deleteRequest.onsuccess = function () {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = Date.now() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function (res) {\n objectStore.openCursor().onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n //alert(\"Name for SSN \" + cursor.key + \" is \" + cursor.value.name);\n cursor[\"continue\"]();\n } else {\n // no more old messages,\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function (tooOld) {\n return removeMessagesById(channelState, tooOld.map(function (msg) {\n return msg.id;\n }));\n });\n}\nfunction create(channelName, options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n return createDatabase(channelName).then(function (db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName: channelName,\n options: options,\n uuid: (0, _util.randomToken)(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new _obliviousSet.ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: _util.PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db: db\n };\n\n /**\n * Handle abrupt closes that do not originate from db.close().\n * This could happen, for example, if the underlying storage is\n * removed or if the user clears the database in the browser's\n * history preferences.\n */\n db.onclose = function () {\n state.closed = true;\n if (options.idb.onclose) options.idb.onclose();\n };\n\n /**\n * if service-workers are used,\n * we have no 'storage'-event if they post a message,\n * therefore we also have to set an interval\n */\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed) return;\n readNewMessages(state).then(function () {\n return (0, _util.sleep)(state.options.idb.fallbackInterval);\n }).then(function () {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid) return false; // send by own\n if (state.eMIs.has(msgObj.id)) return false; // already emitted\n if (msgObj.data.time < state.messagesCallbackTime) return false; // older then onMessageCallback\n return true;\n}\n\n/**\n * reads all new messages from the database and emits them\n */\nfunction readNewMessages(state) {\n // channel already closed\n if (state.closed) return _util.PROMISE_RESOLVED_VOID;\n\n // if no one is listening, we do not need to scan for new messages\n if (!state.messagesCallback) return _util.PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function (newerMessages) {\n var useMessages = newerMessages\n /**\n * there is a bug in iOS where the msgObj can be undefined sometimes\n * so we filter them out\n * @link https://github.com/pubkey/broadcast-channel/issues/19\n */.filter(function (msgObj) {\n return !!msgObj;\n }).map(function (msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function (msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function (msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n }); // sort by time\n useMessages.forEach(function (msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return _util.PROMISE_RESOLVED_VOID;\n });\n}\nfunction close(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function () {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function () {\n if ((0, _util.randomInt)(0, 10) === 0) {\n /* await (do not await) */\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed() {\n return !!getIdb();\n}\nfunction averageResponseTime(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = exports.IndexedDBMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/localstorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.LocalstorageMethod = void 0;\nexports.addStorageEventListener = addStorageEventListener;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.getLocalStorage = getLocalStorage;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.removeStorageEventListener = removeStorageEventListener;\nexports.storageKey = storageKey;\nexports.type = void 0;\nvar _obliviousSet = __webpack_require__(/*! oblivious-set */ \"./node_modules/oblivious-set/dist/cjs/src/index.es5.js\");\nvar _options = __webpack_require__(/*! ../options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\n/**\n * A localStorage-only method which uses localstorage and its 'storage'-event\n * This does not work inside webworkers because they have no access to localstorage\n * This is basically implemented to support IE9 or your grandmother's toaster.\n * @link https://caniuse.com/#feat=namevalue-storage\n * @link https://caniuse.com/#feat=indexeddb\n */\n\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar KEY_PREFIX = 'pubkey.broadcastChannel-';\nvar type = exports.type = 'localstorage';\n\n/**\n * copied from crosstab\n * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32\n */\nfunction getLocalStorage() {\n var localStorage;\n if (typeof window === 'undefined') return null;\n try {\n localStorage = window.localStorage;\n localStorage = window['ie8-eventlistener/storage'] || window.localStorage;\n } catch (e) {\n // New versions of Firefox throw a Security exception\n // if cookies are disabled. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153\n }\n return localStorage;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\n\n/**\n* writes the new message to the storage\n* and fires the storage-event so other readers can find it\n*/\nfunction postMessage(channelState, messageJson) {\n return new Promise(function (res) {\n (0, _util.sleep)().then(function () {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: (0, _util.randomToken)(),\n time: Date.now(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n\n /**\n * StorageEvent does not fire the 'storage' event\n * in the window that changes the state of the local storage.\n * So we fire it manually\n */\n var ev = document.createEvent('Event');\n ev.initEvent('storage', true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener('storage', listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener('storage', listener);\n}\nfunction create(channelName, options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n if (!canBeUsed()) {\n throw new Error('BroadcastChannel: localstorage cannot be used');\n }\n var uuid = (0, _util.randomToken)();\n\n /**\n * eMIs\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n var eMIs = new _obliviousSet.ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName: channelName,\n uuid: uuid,\n eMIs: eMIs // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function (msgObj) {\n if (!state.messagesCallback) return; // no listener\n if (msgObj.uuid === uuid) return; // own message\n if (!msgObj.token || eMIs.has(msgObj.token)) return; // already emitted\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime) return; // too old\n\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n var ls = getLocalStorage();\n if (!ls) return false;\n try {\n var key = '__broadcastchannel_check';\n ls.setItem(key, 'works');\n ls.removeItem(key);\n } catch (e) {\n // Safari 10 in private mode will not allow write access to local\n // storage and fail with a QuotaExceededError. See\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API#Private_Browsing_Incognito_modes\n return false;\n }\n return true;\n}\nfunction averageResponseTime() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes('safari') && !userAgent.includes('chrome')) {\n // safari is much slower so this time is higher\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = exports.LocalstorageMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/localstorage.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/native.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NativeMethod = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.type = void 0;\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar type = exports.type = 'native';\nfunction create(channelName) {\n var state = {\n time: (0, _util.microSeconds)(),\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: [] // subscriberFunctions\n };\n state.bc.onmessage = function (msgEvent) {\n if (state.messagesCallback) {\n state.messagesCallback(msgEvent.data);\n }\n };\n return state;\n}\nfunction close(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return _util.PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n // Deno runtime\n // eslint-disable-next-line\n if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) {\n return true;\n }\n\n // Browser runtime\n if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') {\n if (BroadcastChannel._pubkey) {\n throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill');\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime() {\n return 150;\n}\nvar NativeMethod = exports.NativeMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/native.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/simulate.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nexports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.type = void 0;\nvar _util = __webpack_require__(/*! ../util.js */ "./node_modules/broadcast-channel/dist/lib/util.js");\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar type = exports.type = \'simulate\';\nvar SIMULATE_CHANNELS = new Set();\nfunction create(channelName) {\n var state = {\n time: microSeconds(),\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS["delete"](channelState);\n}\nvar SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5;\nfunction postMessage(channelState, messageJson) {\n return new Promise(function (res) {\n return setTimeout(function () {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.forEach(function (channel) {\n if (channel.name === channelState.name &&\n // has same name\n channel !== channelState &&\n // not own channel\n !!channel.messagesCallback &&\n // has subscribers\n channel.time < messageJson.time // channel not created after postMessage() call\n ) {\n channel.messagesCallback(messageJson);\n }\n });\n res();\n }, SIMULATE_DELAY_TIME);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return SIMULATE_DELAY_TIME;\n}\nvar SimulateMethod = exports.SimulateMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/simulate.js?\n}')},"./node_modules/broadcast-channel/dist/lib/options.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.fillOptionsWithDefaults = fillOptionsWithDefaults;\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n\n // main\n if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true;\n\n // indexed-db\n if (!options.idb) options.idb = {};\n // after this time the messages get deleted\n if (!options.idb.ttl) options.idb.ttl = 1000 * 45;\n if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 150;\n // handles abrupt db onclose events.\n if (originalOptions.idb && typeof originalOptions.idb.onclose === 'function') options.idb.onclose = originalOptions.idb.onclose;\n\n // localstorage\n if (!options.localstorage) options.localstorage = {};\n if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60;\n\n // custom methods\n if (originalOptions.methods) options.methods = originalOptions.methods;\n\n // node\n if (!options.node) options.node = {};\n if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes;\n /**\n * On linux use 'ulimit -Hn' to get the limit of open files.\n * On ubuntu this was 4096 for me, so we use half of that as maxParallelWrites default.\n */\n if (!options.node.maxParallelWrites) options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === 'undefined') options.node.useFastPath = true;\n return options;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/options.js?\n}")},"./node_modules/broadcast-channel/dist/lib/util.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_FALSE = void 0;\nexports.isPromise = isPromise;\nexports.microSeconds = microSeconds;\nexports.randomInt = randomInt;\nexports.randomToken = randomToken;\nexports.sleep = sleep;\nexports.supportsWebLockAPI = supportsWebLockAPI;\n/**\n * returns true if the given object is a promise\n */\nfunction isPromise(obj) {\n return obj && typeof obj.then === 'function';\n}\nvar PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false);\nvar PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true);\nvar PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time) time = 0;\n return new Promise(function (res) {\n return setTimeout(function () {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\n/**\n * https://stackoverflow.com/a/8084248\n */\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\n\n/**\n * Returns the current unix time in micro-seconds,\n * WARNING: This is a pseudo-function\n * Performance.now is not reliable in webworkers, so we just make sure to never return the same time.\n * This is enough in browsers, and this function will not be used in nodejs.\n * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests.\n */\nfunction microSeconds() {\n var ret = Date.now() * 1000; // milliseconds to microseconds\n if (ret <= lastMs) {\n ret = lastMs + 1;\n }\n lastMs = ret;\n return ret;\n}\n\n/**\n * Check if WebLock API is supported.\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API\n */\nfunction supportsWebLockAPI() {\n if (typeof navigator !== 'undefined' && typeof navigator.locks !== 'undefined' && typeof navigator.locks.request === 'function') {\n return true;\n } else {\n return false;\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/util.js?\n}")},"./node_modules/buffer/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nconst base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nconst ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/buffer/index.js?\n}")},"./node_modules/ieee754/index.js"(__unused_webpack_module,exports){eval("{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/ieee754/index.js?\n}")},"./node_modules/oblivious-set/dist/cjs/src/index.es5.js"(module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nconst pkg = __importStar(__webpack_require__(/*! ./index.js */ "./node_modules/oblivious-set/dist/cjs/src/index.js"));\nmodule.exports = pkg;\n//# sourceMappingURL=index.es5.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/oblivious-set/dist/cjs/src/index.es5.js?\n}')},"./node_modules/oblivious-set/dist/cjs/src/index.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0;\n/**\n * this is a set which automatically forgets\n * a given entry when a new entry is set and the ttl\n * of the old one is over\n */\nclass ObliviousSet {\n ttl;\n map = new Map();\n /**\n * Creating calls to setTimeout() is expensive,\n * so we only do that if there is not timeout already open.\n */\n _to = false;\n constructor(ttl) {\n this.ttl = ttl;\n }\n has(value) {\n const valueTime = this.map.get(value);\n if (typeof valueTime === 'undefined') {\n return false;\n }\n if (valueTime < now() - this.ttl) {\n this.map.delete(value);\n return false;\n }\n return true;\n }\n add(value) {\n this.map.delete(value);\n this.map.set(value, now());\n /**\n * When a new value is added,\n * start the cleanup at the next tick\n * to not block the cpu for more important stuff\n * that might happen.\n */\n if (!this._to) {\n this._to = true;\n setTimeout(() => {\n this._to = false;\n removeTooOldValues(this);\n }, 0);\n }\n }\n clear() {\n this.map.clear();\n }\n}\nexports.ObliviousSet = ObliviousSet;\n/**\n * Removes all entries from the set\n * where the TTL has expired\n */\nfunction removeTooOldValues(obliviousSet) {\n const olderThen = now() - obliviousSet.ttl;\n const iterator = obliviousSet.map[Symbol.iterator]();\n /**\n * Because we can assume the new values are added at the bottom,\n * we start from the top and stop as soon as we reach a non-too-old value.\n */\n while (true) {\n const next = iterator.next().value;\n if (!next) {\n break; // no more elements\n }\n const value = next[0];\n const time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n }\n else {\n // We reached a value that is not old enough\n break;\n }\n }\n}\nexports.removeTooOldValues = removeTooOldValues;\nfunction now() {\n return Date.now();\n}\nexports.now = now;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/oblivious-set/dist/cjs/src/index.js?\n}")},"./node_modules/unload/dist/es/browser.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addBrowser: () => (/* binding */ addBrowser)\n/* harmony export */ });\n/* global WorkerGlobalScope */\n\nfunction addBrowser(fn) {\n if (typeof WorkerGlobalScope === 'function' && self instanceof WorkerGlobalScope) {\n /**\n * Because killing a worker does directly stop the excution\n * of the code, our only chance is to overwrite the close function\n * which could work some times.\n * @link https://stackoverflow.com/q/72903255/3443137\n */\n var oldClose = self.close.bind(self);\n self.close = function () {\n fn();\n return oldClose();\n };\n } else {\n /**\n * if we are on react-native, there is no window.addEventListener\n * @link https://github.com/pubkey/unload/issues/6\n */\n if (typeof window.addEventListener !== 'function') {\n return;\n }\n\n /**\n * for normal browser-windows, we use the beforeunload-event\n */\n window.addEventListener('beforeunload', function () {\n fn();\n }, true);\n\n /**\n * for iframes, we have to use the unload-event\n * @link https://stackoverflow.com/q/47533670/3443137\n */\n window.addEventListener('unload', function () {\n fn();\n }, true);\n }\n\n /**\n * TODO add fallback for safari-mobile\n * @link https://stackoverflow.com/a/26193516/3443137\n */\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/browser.js?\n}")},"./node_modules/unload/dist/es/index.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ getSize: () => (/* binding */ getSize),\n/* harmony export */ removeAll: () => (/* binding */ removeAll),\n/* harmony export */ runAll: () => (/* binding */ runAll)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/unload/dist/es/browser.js");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node.js */ "./node_modules/unload/dist/es/node.js");\n\n\n\n/**\n * Use the code directly to prevent import problems\n * with the detect-node package.\n * @link https://github.com/iliakan/detect-node/blob/master/index.js\n */\nvar isNode = Object.prototype.toString.call(typeof process !== \'undefined\' ? process : 0) === \'[object process]\';\nvar USE_METHOD = isNode ? _node_js__WEBPACK_IMPORTED_MODULE_1__.addNode : _browser_js__WEBPACK_IMPORTED_MODULE_0__.addBrowser;\nvar LISTENERS = new Set();\nvar startedListening = false;\nfunction startListening() {\n if (startedListening) {\n return;\n }\n startedListening = true;\n USE_METHOD(runAll);\n}\nfunction add(fn) {\n startListening();\n if (typeof fn !== \'function\') {\n throw new Error(\'Listener is no function\');\n }\n LISTENERS.add(fn);\n var addReturn = {\n remove: function remove() {\n return LISTENERS["delete"](fn);\n },\n run: function run() {\n LISTENERS["delete"](fn);\n return fn();\n }\n };\n return addReturn;\n}\nfunction runAll() {\n var promises = [];\n LISTENERS.forEach(function (fn) {\n promises.push(fn());\n LISTENERS["delete"](fn);\n });\n return Promise.all(promises);\n}\nfunction removeAll() {\n LISTENERS.clear();\n}\nfunction getSize() {\n return LISTENERS.size;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/index.js?\n}')},"./node_modules/unload/dist/es/node.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addNode: () => (/* binding */ addNode)\n/* harmony export */ });\nfunction addNode(fn) {\n process.on('exit', function () {\n return fn();\n });\n\n /**\n * on the following events,\n * the process will not end if there are\n * event-handlers attached,\n * therefore we have to call process.exit()\n */\n process.on('beforeExit', function () {\n return fn().then(function () {\n return process.exit();\n });\n });\n // catches ctrl+c event\n process.on('SIGINT', function () {\n return fn().then(function () {\n return process.exit();\n });\n });\n // catches uncaught exceptions\n process.on('uncaughtException', function (err) {\n return fn().then(function () {\n console.trace(err);\n process.exit(101);\n });\n });\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/node.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TezosBlockchain = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst tezos_json_1 = __importDefault(__webpack_require__(/*! @tezos-x/octez.connect-ui/data/tezos.json */ \"./packages/octez.connect-ui/src/data/tezos.json\"));\nconst message_type_1 = __webpack_require__(/*! ./types/message-type */ \"./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js\");\nconst { desktopList, extensionList, iOSList, webList } = (0, octez_connect_utils_1.loadWalletLists)(tezos_json_1.default);\nconst logger = new octez_connect_core_1.Logger('TezosBlockchain');\nclass TezosBlockchain {\n constructor() {\n // CAIP-2 namespace. Must match the `blockchainIdentifier` field on the\n // wire (PermissionRequestV3/PermissionResponseV3 — see\n // packages/octez.connect-types/src/types/beaconV3/PermissionRequest.ts)\n // and the Substrate handler's `'substrate'` convention. Previously this was\n // the coin ticker `'xtz'`, which silently broke every registry lookup\n // keyed on the wire identifier (the wallet's OutgoingResponseInterceptor\n // and the dApp's v4 fanout parser both go through `blockchains.get`).\n this.identifier = 'tezos';\n // The registry also resolves the pre-rename ticker key, so peers and\n // integrations still addressing the handler as 'xtz' keep working.\n this.legacyIdentifiers = ['xtz'];\n }\n validateRequest(input) {\n return __awaiter(this, void 0, void 0, function* () {\n if (input.type === octez_connect_types_1.BeaconMessageType.PermissionRequest) {\n // Permission requests carry appMetadata/scopes injected by the client;\n // nothing chain-specific to validate before send.\n return;\n }\n const data = input.blockchainData;\n if (!data || typeof data !== 'object') {\n throw new Error('Tezos request is missing blockchainData');\n }\n const requireFields = (fields) => {\n for (const [name, value] of fields) {\n if (value === undefined || value === null || value === '') {\n throw new Error(`Tezos ${data.type} is missing required field \"${name}\"`);\n }\n }\n };\n switch (data.type) {\n case message_type_1.TezosMessageType.operation_request:\n requireFields([\n ['network', data.network],\n ['operationDetails', data.operationDetails],\n ['sourceAddress', data.sourceAddress]\n ]);\n if (!Array.isArray(data.operationDetails) || data.operationDetails.length === 0) {\n throw new Error('Tezos operation_request requires a non-empty operationDetails array');\n }\n return;\n case message_type_1.TezosMessageType.sign_payload_request:\n requireFields([\n ['signingType', data.signingType],\n ['payload', data.payload]\n ]);\n return;\n case message_type_1.TezosMessageType.broadcast_request:\n requireFields([\n ['network', data.network],\n ['signedTransaction', data.signedTransaction]\n ]);\n return;\n case message_type_1.TezosMessageType.proof_of_event_challenge_request:\n case message_type_1.TezosMessageType.simulated_proof_of_event_challenge_request:\n requireFields([\n ['contractAddress', data.contractAddress],\n ['payload', data.payload]\n ]);\n return;\n default:\n throw new Error(`Unknown Tezos request type \"${data.type}\" — the peer speaks a newer Tezos dialect than this SDK`);\n }\n });\n }\n /**\n * Wallet-side validation of an outgoing response before it is wrapped and\n * sent. Ports the flat-v2 pipeline's permission-response checks: a usable\n * publicKey/address must be present, addresses must parse, and abstracted\n * accounts must live at a contract address.\n */\n validateResponse(message) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (message.type !== octez_connect_types_1.BeaconMessageType.PermissionResponse) {\n return;\n }\n const data = ((_a = message.blockchainData) !== null && _a !== void 0 ? _a : {});\n const fanoutEntries = data.accounts && typeof data.accounts === 'object' && !Array.isArray(data.accounts)\n ? Object.values(data.accounts)\n : [];\n const candidates = fanoutEntries.length\n ? fanoutEntries.map((raw) => {\n var _a, _b;\n return ({\n publicKey: (_a = raw === null || raw === void 0 ? void 0 : raw.publicKey) !== null && _a !== void 0 ? _a : data.publicKey,\n address: (_b = raw === null || raw === void 0 ? void 0 : raw.address) !== null && _b !== void 0 ? _b : data.address\n });\n })\n : [{ publicKey: data.publicKey, address: data.address }];\n for (const candidate of candidates) {\n const { publicKey, address: candidateAddress } = candidate;\n if (!publicKey && !candidateAddress) {\n throw new Error('PublicKey or Address must be defined');\n }\n const address = candidateAddress !== null && candidateAddress !== void 0 ? candidateAddress : (yield (0, octez_connect_utils_1.getAddressFromPublicKey)((0, octez_connect_utils_1.prefixPublicKey)(publicKey)));\n if (!(0, octez_connect_utils_1.isValidAddress)(address)) {\n throw new Error(`Invalid address: \"${address}\"`);\n }\n if (data.walletType === 'abstracted_account' && address.substring(0, 3) !== octez_connect_utils_1.CONTRACT_PREFIX) {\n throw new Error(`Invalid abstracted account address \"${address}\", it should be a ${octez_connect_utils_1.CONTRACT_PREFIX} address`);\n }\n }\n });\n }\n handleResponse(input) {\n return __awaiter(this, void 0, void 0, function* () {\n // Response-side effects are handled by the client; nothing to do here.\n if (input) {\n return;\n }\n });\n }\n getWalletLists() {\n return __awaiter(this, void 0, void 0, function* () {\n return {\n extensionList: extensionList,\n desktopList: desktopList,\n webList: webList,\n iOSList: iOSList\n };\n });\n }\n getAccountInfosFromPermissionResponse(permissionResponse, peerVersion) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c;\n const data = ((_a = permissionResponse.blockchainData) !== null && _a !== void 0 ? _a : {});\n const scopes = (_b = data.scopes) !== null && _b !== void 0 ? _b : [];\n // Canonicalize wallet-supplied keys once at ingest so every derived\n // address/identifier downstream (dApp account records AND wallet-side\n // permission records) agrees. An entry with only a publicKey gets its\n // address derived here — never stored with an empty address.\n const wirePublicKey = data.publicKey ? (0, octez_connect_utils_1.prefixPublicKey)(data.publicKey) : '';\n const wireAddress = (_c = data.address) !== null && _c !== void 0 ? _c : (wirePublicKey ? yield (0, octez_connect_utils_1.getAddressFromPublicKey)(wirePublicKey) : '');\n const isV4Session = (0, octez_connect_core_1.isMultiNetworkVersion)(peerVersion);\n const hasAccountsFanout = data.accounts && typeof data.accounts === 'object' && !Array.isArray(data.accounts);\n if (isV4Session && hasAccountsFanout && data.accounts) {\n // Reject malformed chain-id keys at ingest: a normalized key that is not\n // a valid Tezos CAIP-2 string would persist an account that no operation\n // request could ever target (resolveOperationNetwork requires CAIP-2),\n // i.e. a permanently-unusable account. Drop and log it instead.\n const validEntries = Object.entries(data.accounts).filter(([chainId]) => {\n const ok = (0, octez_connect_core_1.isValidTezosCaip2)((0, octez_connect_core_1.normalizeTezosCaip2)(chainId));\n if (!ok) {\n logger.warn('getAccountInfosFromPermissionResponse', `Dropping account under malformed CAIP-2 chain id \"${chainId}\"`);\n }\n return ok;\n });\n return Promise.all(validEntries.map((_a) => __awaiter(this, [_a], void 0, function* ([chainId, raw]) {\n var _b;\n const normalizedChainId = (0, octez_connect_core_1.normalizeTezosCaip2)(chainId);\n const publicKey = (raw === null || raw === void 0 ? void 0 : raw.publicKey) ? (0, octez_connect_utils_1.prefixPublicKey)(raw.publicKey) : wirePublicKey;\n const address = (_b = raw === null || raw === void 0 ? void 0 : raw.address) !== null && _b !== void 0 ? _b : ((raw === null || raw === void 0 ? void 0 : raw.publicKey) ? yield (0, octez_connect_utils_1.getAddressFromPublicKey)(publicKey) : wireAddress);\n const network = (0, octez_connect_core_1.networkFromTezosCaip2)(normalizedChainId, {\n name: raw === null || raw === void 0 ? void 0 : raw.name,\n rpcUrl: raw === null || raw === void 0 ? void 0 : raw.rpcUrl\n });\n return {\n accountId: yield (0, octez_connect_core_1.getAccountIdentifier)(address, network),\n address,\n publicKey,\n network,\n scopes\n };\n })));\n }\n const legacyNetwork = data.network;\n const fallbackNetwork = legacyNetwork !== null && legacyNetwork !== void 0 ? legacyNetwork : {\n type: octez_connect_types_1.NetworkType.CUSTOM,\n name: 'tezos'\n };\n return [\n {\n accountId: yield (0, octez_connect_core_1.getAccountIdentifier)(wireAddress, fallbackNetwork),\n address: wireAddress,\n publicKey: wirePublicKey,\n network: legacyNetwork,\n scopes\n }\n ];\n });\n }\n}\nexports.TezosBlockchain = TezosBlockchain;\n//# sourceMappingURL=blockchain.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosMessageType = exports.TezosBlockchain = void 0;\nvar blockchain_1 = __webpack_require__(/*! ./blockchain */ "./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js");\nObject.defineProperty(exports, "TezosBlockchain", ({ enumerable: true, get: function () { return blockchain_1.TezosBlockchain; } }));\nvar message_type_1 = __webpack_require__(/*! ./types/message-type */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js");\nObject.defineProperty(exports, "TezosMessageType", ({ enumerable: true, get: function () { return message_type_1.TezosMessageType; } }));\n__exportStar(__webpack_require__(/*! ./types/messages */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/index.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosMessageType = void 0;\n/**\n * Per-chain discriminator carried in `blockchainData.type` of wrapped Tezos\n * messages. Values deliberately reuse the pre-fork flat `BeaconMessageType`\n * wire strings so wallet UIs migrating from the flat v2 protocol keep their\n * string switches.\n */\nvar TezosMessageType;\n(function (TezosMessageType) {\n TezosMessageType["operation_request"] = "operation_request";\n TezosMessageType["operation_response"] = "operation_response";\n TezosMessageType["sign_payload_request"] = "sign_payload_request";\n TezosMessageType["sign_payload_response"] = "sign_payload_response";\n TezosMessageType["broadcast_request"] = "broadcast_request";\n TezosMessageType["broadcast_response"] = "broadcast_response";\n TezosMessageType["proof_of_event_challenge_request"] = "proof_of_event_challenge_request";\n TezosMessageType["proof_of_event_challenge_response"] = "proof_of_event_challenge_response";\n TezosMessageType["simulated_proof_of_event_challenge_request"] = "simulated_proof_of_event_challenge_request";\n TezosMessageType["simulated_proof_of_event_challenge_response"] = "simulated_proof_of_event_challenge_response";\n})(TezosMessageType || (exports.TezosMessageType = TezosMessageType = {}));\n//# sourceMappingURL=message-type.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TEZOS_BROADCAST_SCOPE = void 0;\n/**\n * Scope string for requests that are always allowed regardless of the\n * granted permission scopes (mirrors the pre-fork `checkPermissions`\n * semantics for broadcast and proof-of-event requests).\n */\nexports.TEZOS_BROADCAST_SCOPE = 'broadcast';\n//# sourceMappingURL=broadcast.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=change-account.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./permission-request */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js"), exports);\n__exportStar(__webpack_require__(/*! ./permission-response */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js"), exports);\n__exportStar(__webpack_require__(/*! ./operation */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js"), exports);\n__exportStar(__webpack_require__(/*! ./sign-payload */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js"), exports);\n__exportStar(__webpack_require__(/*! ./broadcast */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js"), exports);\n__exportStar(__webpack_require__(/*! ./proof-of-event */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js"), exports);\n__exportStar(__webpack_require__(/*! ./change-account */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=operation.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=permission-request.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=permission-response.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TEZOS_PROOF_OF_EVENT_SCOPE = void 0;\n/** Always-allowed scope, see TEZOS_BROADCAST_SCOPE. */\nexports.TEZOS_PROOF_OF_EVENT_SCOPE = 'proof_of_event';\n//# sourceMappingURL=proof-of-event.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=sign-payload.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MockAnalytics = void 0;\nclass MockAnalytics {\n track(_trigger, _section, _label, _data) {\n // console.log('##### TRACK', trigger, section, label, data)\n // noop\n }\n}\nexports.MockAnalytics = MockAnalytics;\n//# sourceMappingURL=MockAnalytics.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/MockWindow.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.clearMockWindowState = exports.windowRef = void 0;\nconst cbs = [(_) => undefined];\n/**\n * A mock for postmessage if run in node.js environment\n */\nlet windowRef = {\n postMessage: (message, _target) => {\n console.log('GOT MOCK POST MESSAGE', message);\n cbs.forEach((callbackElement) => {\n callbackElement({ data: message });\n });\n },\n addEventListener: (_name, eventCallback) => {\n cbs.push(eventCallback);\n },\n removeEventListener: (_name, eventCallback) => {\n cbs.splice(cbs.indexOf((element) => element === eventCallback), 1);\n },\n location: {\n origin: '*'\n }\n};\nexports.windowRef = windowRef;\ntry {\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exports.windowRef = windowRef = window;\n }\n}\ncatch (windowError) {\n console.log(`not defined: ${windowError}`);\n}\nconst clearMockWindowState = () => {\n cbs.length = 0;\n};\nexports.clearMockWindowState = clearMockWindowState;\n//# sourceMappingURL=MockWindow.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/MockWindow.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/Serializer.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Serializer = void 0;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\n/**\n * @internalapi\n *\n * The Serializer handles message serialization/deserialization based on protocol version\n * - Protocol v1: Base58check encoding\n * - Protocol v2+: Plain JSON\n */\nclass Serializer {\n constructor(protocolVersion = constants_1.DEFAULT_PROTOCOL_VERSION) {\n this.protocolVersion = protocolVersion;\n }\n /**\n * Serialize a message based on protocol version\n * @param message JSON object to serialize\n */\n serialize(message) {\n return __awaiter(this, void 0, void 0, function* () {\n const str = JSON.stringify(message);\n if (this.protocolVersion >= constants_1.PROTOCOL_VERSION_V2) {\n // v2+: Plain JSON\n return str;\n }\n else {\n // v1: Base58check encoding\n return bs58check_1.default.encode(Buffer.from(str));\n }\n });\n }\n /**\n * Deserialize a message based on protocol version\n * @param encoded String to be deserialized\n */\n deserialize(encoded) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof encoded !== \'string\') {\n throw new Error(\'Encoded payload needs to be a string\');\n }\n if (this.protocolVersion >= constants_1.PROTOCOL_VERSION_V2) {\n // v2+: Plain JSON\n return JSON.parse(encoded);\n }\n else {\n // v1: Base58check decoding\n const decodedBytes = bs58check_1.default.decode(encoded);\n const jsonString = Buffer.from(decodedBytes).toString(\'utf8\');\n return JSON.parse(jsonString);\n }\n });\n }\n}\nexports.Serializer = Serializer;\n//# sourceMappingURL=Serializer.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/Serializer.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst MockWindow_1 = __webpack_require__(/*! ../../MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\nconst MockAnalytics_1 = __webpack_require__(/*! ../../MockAnalytics */ "./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js");\n/**\n * @internalapi\n *\n * The beacon client is an abstract client that handles everything that is shared between all other clients.\n * Specifically, it handles managing the beaconId and and the local keypair.\n */\nclass BeaconClient {\n get beaconId() {\n return this._beaconId.promise;\n }\n get keyPair() {\n return this._keyPair.promise;\n }\n constructor(config) {\n var _a, _b;\n /** The beaconId is a public key that is used to identify one specific application (dapp or wallet).\n * This is used inside a message to specify the sender, for example.\n */\n this._beaconId = new octez_connect_utils_1.ExposedPromise();\n /**\n * The local keypair that is used for the communication encryption\n */\n this._keyPair = new octez_connect_utils_1.ExposedPromise();\n if (!config.name) {\n throw new Error(\'Name not set\');\n }\n if (!config.storage) {\n throw new Error(\'Storage not set\');\n }\n this.name = config.name;\n this.iconUrl = config.iconUrl;\n this.appUrl = (_a = config.appUrl) !== null && _a !== void 0 ? _a : MockWindow_1.windowRef.location.origin;\n this.storage = config.storage;\n this.analytics = (_b = config.analytics) !== null && _b !== void 0 ? _b : new MockAnalytics_1.MockAnalytics();\n // TODO: This is a temporary "workaround" to prevent users from creating multiple Client instances\n if (MockWindow_1.windowRef.beaconCreatedClientInstance) {\n console.error(\'[OCTEZ.CONNECT] It looks like you created multiple octez.connect SDK Client instances. This can lead to problems. Only create one instance and re-use it everywhere.\');\n }\n else {\n ;\n MockWindow_1.windowRef.beaconCreatedClientInstance = true;\n }\n this.initSDK().catch(console.error);\n }\n /**\n * This resets the SDK. After using this method, this instance is no longer usable. You will have to instanciate a new client.\n */\n destroy() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.removeBeaconEntriesFromStorage();\n MockWindow_1.windowRef.beaconCreatedClientInstance = false;\n });\n }\n /**\n * This method initializes the SDK by setting some values in the storage and generating a keypair.\n */\n initSDK() {\n return __awaiter(this, void 0, void 0, function* () {\n this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_VERSION, constants_1.SDK_VERSION).catch(console.error);\n this.loadOrCreateBeaconSecret().catch(console.error);\n return this.keyPair.then((keyPair) => {\n this._beaconId.resolve((0, octez_connect_utils_1.toHex)(keyPair.publicKey));\n });\n });\n }\n /**\n * Removes all beacon values from the storage.\n */\n removeBeaconEntriesFromStorage() {\n return __awaiter(this, void 0, void 0, function* () {\n const allKeys = Object.values(octez_connect_types_1.StorageKey);\n yield Promise.all(allKeys.map((key) => this.storage.delete(key)));\n });\n }\n /**\n * This method tries to load the seed from storage, if it doesn\'t exist, a new one will be created and persisted.\n */\n loadOrCreateBeaconSecret() {\n return __awaiter(this, void 0, void 0, function* () {\n const storageValue = yield this.storage.get(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED);\n if (storageValue && typeof storageValue === \'string\') {\n this._keyPair.resolve(yield (0, octez_connect_utils_1.getKeypairFromSeed)(storageValue));\n }\n else {\n const key = yield (0, octez_connect_utils_1.generateGUID)();\n yield this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED, key);\n this._keyPair.resolve(yield (0, octez_connect_utils_1.getKeypairFromSeed)(key));\n }\n });\n }\n}\nexports.BeaconClient = BeaconClient;\n//# sourceMappingURL=BeaconClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Client = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst BeaconClient_1 = __webpack_require__(/*! ../beacon-client/BeaconClient */ "./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js");\nconst AccountManager_1 = __webpack_require__(/*! ../../managers/AccountManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js");\nconst get_sender_id_1 = __webpack_require__(/*! ../../utils/get-sender-id */ "./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js");\nconst Logger_1 = __webpack_require__(/*! ../../utils/Logger */ "./packages/octez.connect-core/dist/cjs/src/utils/Logger.js");\nconst Serializer_1 = __webpack_require__(/*! ../../Serializer */ "./packages/octez.connect-core/dist/cjs/src/Serializer.js");\nconst message_utils_1 = __webpack_require__(/*! ../../utils/message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\nconst message_protocol_1 = __webpack_require__(/*! ../../message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nconst logger = new Logger_1.Logger(\'Client\');\n/**\n * @internalapi\n *\n * This abstract class handles the a big part of the logic that is shared between the dapp and wallet client.\n * For example, it selects and manages the transport and accounts.\n */\nclass Client extends BeaconClient_1.BeaconClient {\n get transport() {\n return this._transport.promise;\n }\n /**\n * Returns the connection status of the Client\n */\n get connectionStatus() {\n var _a, _b;\n return (_b = (_a = this._transport.promiseResult) === null || _a === void 0 ? void 0 : _a.connectionStatus) !== null && _b !== void 0 ? _b : octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n }\n /**\n * Returns whether or not the transaport is ready\n */\n get ready() {\n return this.transport.then(() => undefined);\n }\n constructor(config) {\n var _a;\n super(config);\n this.blockchains = new Map();\n /**\n * How many requests can be sent after another\n */\n this.rateLimit = 2;\n /**\n * The time window in seconds in which the "rateLimit" is checked\n */\n this.rateLimitWindowInSeconds = 5;\n /**\n * Stores the times when requests have been made to determine if the rate limit has been reached\n */\n this.requestCounter = [];\n this.transportListeners = new Map();\n this._transport = new octez_connect_utils_1.ExposedPromise();\n this.accountManager = new AccountManager_1.AccountManager(config.storage);\n this.matrixNodes = (_a = config.matrixNodes) !== null && _a !== void 0 ? _a : {};\n this.handleResponse = (message, connectionInfo) => {\n throw new Error(`not overwritten${JSON.stringify(message)} - ${JSON.stringify(connectionInfo)}`);\n };\n }\n cleanup() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.transportListeners.size) {\n return;\n }\n if (this._transport.isResolved()) {\n const transport = yield this.transport;\n yield Promise.all(Array.from(this.transportListeners.values()).map((listener) => transport.removeListener(listener)));\n this.transportListeners.clear();\n }\n });\n }\n /**\n * Register a blockchain to the client\n * @param chain The blockchain to register\n */\n addBlockchain(chain) {\n var _a;\n this.blockchains.set(chain.identifier, chain);\n for (const legacyIdentifier of (_a = chain.legacyIdentifiers) !== null && _a !== void 0 ? _a : []) {\n this.blockchains.set(legacyIdentifier, chain);\n }\n }\n /**\n * Remove a blockchain from the client by its identifier\n * @param chainIdentifier The identifier of the blockchain to remove\n */\n removeBlockchain(chainIdentifier) {\n var _a;\n const chain = this.blockchains.get(chainIdentifier);\n this.blockchains.delete(chainIdentifier);\n for (const legacyIdentifier of (_a = chain === null || chain === void 0 ? void 0 : chain.legacyIdentifiers) !== null && _a !== void 0 ? _a : []) {\n this.blockchains.delete(legacyIdentifier);\n }\n }\n /**\n * Return all locally known accounts\n */\n getAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.getAccounts();\n });\n }\n /**\n * Return the account by ID\n * @param accountIdentifier The ID of an account\n */\n getAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.getAccount(accountIdentifier);\n });\n }\n /**\n * Remove the account by ID\n * @param accountIdentifier The ID of an account\n */\n removeAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.removeAccount(accountIdentifier);\n });\n }\n /**\n * Remove all locally stored accounts\n */\n removeAllAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.removeAllAccounts();\n });\n }\n /**\n * Add a new request (current timestamp) to the pending requests, remove old ones and check if we are above the limit\n */\n addRequestAndCheckIfRateLimited() {\n return __awaiter(this, void 0, void 0, function* () {\n const now = new Date().getTime();\n this.requestCounter = this.requestCounter.filter((date) => date + this.rateLimitWindowInSeconds * 1000 > now);\n this.requestCounter.push(now);\n return this.requestCounter.length > this.rateLimit;\n });\n }\n /**\n * This method initializes the client. It will check if the connection should be established to a\n * browser extension or if the P2P transport should be used.\n *\n * @param transport A transport that can be provided by the user\n */\n init(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._transport.isResolved()) {\n return (yield this.transport).type;\n }\n yield this.setTransport(transport); // Let users define their own transport\n return transport.type;\n });\n }\n /**\n * Returns the metadata of this DApp\n */\n getOwnAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return {\n senderId: yield (0, get_sender_id_1.getSenderId)(yield this.beaconId),\n name: this.name,\n icon: this.iconUrl\n };\n });\n }\n /**\n * Return all known peers\n */\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.transport).getPeers();\n });\n }\n /**\n * Add a new peer to the known peers\n * @param peer The new peer to add\n */\n addPeer(peer) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.transport).addPeer(peer);\n });\n }\n destroy() {\n const _super = Object.create(null, {\n destroy: { get: () => super.destroy }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this._transport.isResolved()) {\n const transport = yield this.transport;\n yield this.cleanup();\n yield transport.disconnect();\n if (transport.type === octez_connect_types_1.TransportType.WALLETCONNECT) {\n yield transport.doClientCleanup(); // any because I cannot import the type definition\n }\n }\n yield _super.destroy.call(this);\n });\n }\n /**\n * A "setter" for when the transport needs to be changed.\n */\n setTransport(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n if (transport) {\n if (this._transport.isSettled()) {\n // If the promise has already been resolved we need to create a new one.\n this._transport = octez_connect_utils_1.ExposedPromise.resolve(transport);\n }\n else {\n this._transport.resolve(transport);\n }\n }\n else {\n if (this._transport.isSettled()) {\n // If the promise has already been resolved we need to create a new one.\n this._transport = new octez_connect_utils_1.ExposedPromise();\n }\n }\n });\n }\n addListener(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n // in beacon we subscribe to the transport on client init only\n // unsubscribing from the transport is only beneficial when running\n // a single page dApp.\n // However, while running a multiple tabs setup, if one of the dApps disconnects\n // the others wont\'t recover until after a page refresh\n if (this.transportListeners.has(transport.type)) {\n yield transport.removeListener(this.transportListeners.get(transport.type));\n }\n const subscription = (message, connectionInfo) => __awaiter(this, void 0, void 0, function* () {\n if (typeof message !== \'string\') {\n return;\n }\n const peer = yield this.findPeer(connectionInfo.id);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const deserializedMessage = (yield new Serializer_1.Serializer(protocolVersion).deserialize(message));\n this.handleResponse(deserializedMessage, connectionInfo);\n });\n this.transportListeners.set(transport.type, subscription);\n transport.addListener(subscription).catch((error) => logger.error(\'addListener\', error));\n });\n }\n sendDisconnectToPeer(peer, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n const id = yield (0, octez_connect_utils_1.generateGUID)();\n const senderId = yield (0, get_sender_id_1.getSenderId)(yield this.beaconId);\n // The disconnect ships in the peer\'s negotiated dialect: wrapped for\n // v3+ peers, the flat legacy shape for v2 peers (which would silently\n // ignore a wrapped envelope).\n const request = (0, message_utils_1.buildDisconnectMessage)({ id, senderId }, peer.version);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const payload = yield new Serializer_1.Serializer(protocolVersion).serialize(request);\n const selectedTransport = transport !== null && transport !== void 0 ? transport : (yield this.transport);\n yield selectedTransport.send(payload, peer);\n });\n }\n findPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!publicKey) {\n return undefined;\n }\n const transport = yield this.transport;\n const peers = yield transport.getPeers();\n return peers.find((peerInfo) => peerInfo.publicKey === publicKey);\n });\n }\n getLocalProtocolVersion() {\n const localPreferredRaw = Number((0, message_protocol_1.getPreferredMessageProtocolVersion)());\n return Number.isFinite(localPreferredRaw) && localPreferredRaw >= constants_1.DEFAULT_PROTOCOL_VERSION\n ? localPreferredRaw\n : constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n extractPeerProtocolVersion(peer) {\n if (!peer) {\n return constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n const peerProtocolRaw = typeof peer.protocolVersion === \'number\' ? peer.protocolVersion : Number(peer.protocolVersion);\n return Number.isFinite(peerProtocolRaw) && peerProtocolRaw >= constants_1.DEFAULT_PROTOCOL_VERSION\n ? peerProtocolRaw\n : constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n getPeerProtocolVersion(peer) {\n const localVersion = this.getLocalProtocolVersion();\n const peerVersion = this.extractPeerProtocolVersion(peer);\n return Math.min(peerVersion, localVersion);\n }\n}\nexports.Client = Client;\n//# sourceMappingURL=Client.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/constants.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BACKEND_URL = exports.NOTIFICATION_ORACLE_URL = exports.DEFAULT_PROTOCOL_VERSION = exports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2 = exports.PROTOCOL_VERSION_V1 = exports.BEACON_VERSION = exports.SDK_VERSION = void 0;\nexports.SDK_VERSION = '5.0.0-beta.7';\nexports.BEACON_VERSION = '4';\nexports.PROTOCOL_VERSION_V1 = 1;\nexports.PROTOCOL_VERSION_V2 = 2;\nexports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2;\nexports.DEFAULT_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V1;\nexports.NOTIFICATION_ORACLE_URL = 'https://beacon-notification-oracle.dev.gke.papers.tech';\nexports.BACKEND_URL = 'https://beacon-backend.prod.gke.papers.tech';\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/constants.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/debug.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getDebugEnabled = exports.setDebugEnabled = void 0;\nconst MockWindow_1 = __webpack_require__(/*! ./MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet debug = MockWindow_1.windowRef.beaconSdkDebugEnabled ? true : false;\nif (debug) {\n // eslint-disable-next-line no-console\n console.log(\'[BEACON]: Debug mode is ON (turned on either by the developer or a browser extension)\');\n}\nconst setDebugEnabled = (enabled) => {\n debug = enabled;\n};\nexports.setDebugEnabled = setDebugEnabled;\nconst getDebugEnabled = () => debug;\nexports.getDebugEnabled = getDebugEnabled;\n//# sourceMappingURL=debug.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/debug.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AbortedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass AbortedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.ABORTED_ERROR, \'The action was aborted by the user.\', error_codes_1.BEACON_ERROR_CODES.ABORTED_BY_USER);\n this.name = \'AbortedBeaconError\';\n this.title = \'Aborted\';\n }\n}\nexports.AbortedBeaconError = AbortedBeaconError;\n//# sourceMappingURL=AbortedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BeaconError = void 0;\n/**\n * @category Error\n */\nclass BeaconError extends Error {\n get errorType() {\n return this.type;\n }\n get fullDescription() {\n return { description: this.description };\n }\n constructor(errorType, message, code) {\n super(`[${errorType}]:${message}`);\n this.name = 'BeaconError';\n this.title = 'Error'; // Visible in the UI\n this.name = 'BeaconError';\n this.description = message;\n this.type = errorType;\n this.code = code;\n }\n}\nexports.BeaconError = BeaconError;\n//# sourceMappingURL=BeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BroadcastBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass BroadcastBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.BROADCAST_ERROR, \'The transaction could not be broadcast to the network. Please try again.\', error_codes_1.BEACON_ERROR_CODES.BROADCAST_ERROR);\n this.name = \'BroadcastBeaconError\';\n this.title = \'Broadcast Error\';\n }\n}\nexports.BroadcastBeaconError = BroadcastBeaconError;\n//# sourceMappingURL=BroadcastBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.InvalidBeaconVersionError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Raised by `compareBeaconVersion()` when either operand fails its strict\n * decimal-integer validation. SDK-internal: never serialized to the wire.\n * Consumers discriminate via `instanceof` or the `errorCode` field; the\n * BeaconErrorType is `UNKNOWN_ERROR` only to satisfy the base contract.\n *\n * @category Error\n */\nclass InvalidBeaconVersionError extends BeaconError_1.BeaconError {\n constructor(a, b) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, `Invalid peer.version comparison: a=${JSON.stringify(a)}, b=${JSON.stringify(b)}`, error_codes_1.BEACON_ERROR_CODES.INVALID_BEACON_VERSION);\n this.name = \'InvalidBeaconVersionError\';\n this.title = \'Invalid Beacon version\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.INVALID_BEACON_VERSION;\n this.a = a;\n this.b = b;\n }\n}\nexports.InvalidBeaconVersionError = InvalidBeaconVersionError;\n//# sourceMappingURL=InvalidBeaconVersionError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.InvalidRequiredMinimumVersionError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Thrown at `DAppClient` construction time when `requiredMinimumVersion` is\n * not a parseable decimal-integer string, is below `1`, or exceeds the\n * SDK\'s own `BEACON_VERSION`. Configuration error; never emitted on the wire.\n *\n * @category Error\n */\nclass InvalidRequiredMinimumVersionError extends BeaconError_1.BeaconError {\n constructor(providedValue, sdkBeaconVersion, reason) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, `Invalid requiredMinimumVersion "${providedValue}" (SDK BEACON_VERSION = "${sdkBeaconVersion}"): ${reason}`, error_codes_1.BEACON_ERROR_CODES.INVALID_REQUIRED_MINIMUM_VERSION);\n this.name = \'InvalidRequiredMinimumVersionError\';\n this.title = \'Invalid requiredMinimumVersion option\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.INVALID_REQUIRED_MINIMUM_VERSION;\n this.providedValue = providedValue;\n this.sdkBeaconVersion = sdkBeaconVersion;\n }\n}\nexports.InvalidRequiredMinimumVersionError = InvalidRequiredMinimumVersionError;\n//# sourceMappingURL=InvalidRequiredMinimumVersionError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkNotSupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NetworkNotSupportedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NETWORK_NOT_SUPPORTED, \'The wallet does not support this network. Please select another one.\', error_codes_1.BEACON_ERROR_CODES.NETWORK_NOT_SUPPORTED);\n this.name = \'NetworkNotSupportedBeaconError\';\n this.title = \'Network Error\';\n }\n}\nexports.NetworkNotSupportedBeaconError = NetworkNotSupportedBeaconError;\n//# sourceMappingURL=NetworkNotSupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NetworksUnsupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ \"./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js\");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ \"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js\");\nconst defaultMessage = (input) => {\n if (input.requestedNetworks.length === 0 && input.unsupportedNetworks.length === 0) {\n return 'Multiple networks are available in this session; specify a network argument on requestOperation.';\n }\n return `The wallet cannot serve all requested networks. Unsupported: ${input.unsupportedNetworks.join(', ')}.`;\n};\n/**\n * Raised by the dApp-side SDK when a wallet cannot serve every requested\n * network, or when `requestOperation({ network })` targets a network not in\n * the current session. SDK-internal; never emitted on the wire. Distinct\n * from the wire-level `NetworkNotSupportedBeaconError` (singular).\n *\n * @category Error\n */\nclass NetworksUnsupportedBeaconError extends BeaconError_1.BeaconError {\n constructor(input) {\n var _a;\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, (_a = input.customMessage) !== null && _a !== void 0 ? _a : defaultMessage(input), error_codes_1.BEACON_ERROR_CODES.NETWORKS_UNSUPPORTED);\n this.name = 'NetworksUnsupportedBeaconError';\n this.title = 'Networks not supported';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.NETWORKS_UNSUPPORTED;\n this.requestedNetworks = input.requestedNetworks;\n this.unsupportedNetworks = input.unsupportedNetworks;\n }\n}\nexports.NetworksUnsupportedBeaconError = NetworksUnsupportedBeaconError;\n//# sourceMappingURL=NetworksUnsupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NoAddressBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NoAddressBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NO_ADDRESS_ERROR, \'The wallet does not have an account set up. Please make sure to set up your wallet and try again.\', error_codes_1.BEACON_ERROR_CODES.NO_ADDRESS);\n this.name = \'NoAddressBeaconError\';\n this.title = \'No Address\';\n }\n}\nexports.NoAddressBeaconError = NoAddressBeaconError;\n//# sourceMappingURL=NoAddressBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NoPrivateKeyBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NoPrivateKeyBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NO_PRIVATE_KEY_FOUND_ERROR, \'The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again.\', error_codes_1.BEACON_ERROR_CODES.NO_PRIVATE_KEY);\n this.name = \'NoPrivateKeyBeaconError\';\n this.title = \'Account Not Found\';\n }\n}\nexports.NoPrivateKeyBeaconError = NoPrivateKeyBeaconError;\n//# sourceMappingURL=NoPrivateKeyBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NotGrantedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NotGrantedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NOT_GRANTED_ERROR, \'You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions.\', error_codes_1.BEACON_ERROR_CODES.PERMISSION_DENIED);\n this.name = \'NotGrantedBeaconError\';\n this.title = \'Permission Not Granted\';\n }\n}\nexports.NotGrantedBeaconError = NotGrantedBeaconError;\n//# sourceMappingURL=NotGrantedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ParametersInvalidBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass ParametersInvalidBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.PARAMETERS_INVALID_ERROR, \'Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again.\', error_codes_1.BEACON_ERROR_CODES.PARAMETERS_INVALID);\n this.name = \'ParametersInvalidBeaconError\';\n this.title = \'Parameters Invalid\';\n }\n}\nexports.ParametersInvalidBeaconError = ParametersInvalidBeaconError;\n//# sourceMappingURL=ParametersInvalidBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.SignatureTypeNotSupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass SignatureTypeNotSupportedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.SIGNATURE_TYPE_NOT_SUPPORTED, \'The wallet is not able to sign payloads of this type.\', error_codes_1.BEACON_ERROR_CODES.SIGNATURE_TYPE_NOT_SUPPORTED);\n this.name = \'SignatureTypeNotSupportedBeaconError\';\n this.title = \'Signature Type Not Supported\';\n }\n}\nexports.SignatureTypeNotSupportedBeaconError = SignatureTypeNotSupportedBeaconError;\n//# sourceMappingURL=SignatureTypeNotSupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TooManyOperationsBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass TooManyOperationsBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.TOO_MANY_OPERATIONS, \'The request contains too many transactions. Please include fewer operations and try again.\', error_codes_1.BEACON_ERROR_CODES.TOO_MANY_OPERATIONS);\n this.name = \'TooManyOperationsBeaconError\';\n this.title = \'Too Many Operations\';\n }\n}\nexports.TooManyOperationsBeaconError = TooManyOperationsBeaconError;\n//# sourceMappingURL=TooManyOperationsBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransactionInvalidBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass TransactionInvalidBeaconError extends BeaconError_1.BeaconError {\n get fullDescription() {\n return { description: this.description, data: JSON.stringify(this.data, undefined, 2) };\n }\n constructor(data) {\n super(octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR, `The transaction is invalid and the node did not accept it.`, error_codes_1.BEACON_ERROR_CODES.TRANSACTION_INVALID);\n this.data = data;\n this.name = \'TransactionInvalidBeaconError\';\n this.title = \'Transaction Invalid\';\n this.data = data;\n }\n}\nexports.TransactionInvalidBeaconError = TransactionInvalidBeaconError;\n//# sourceMappingURL=TransactionInvalidBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.UnknownBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass UnknownBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, \'An unknown error occurred. Please try again or report it to a developer.\', error_codes_1.BEACON_ERROR_CODES.UNKNOWN_ERROR);\n this.name = \'UnknownBeaconError\';\n this.title = \'Error\';\n }\n}\nexports.UnknownBeaconError = UnknownBeaconError;\n//# sourceMappingURL=UnknownBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.VersionUnsupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Raised by the dApp-side SDK when a wallet\'s `peer.version` is lower than\n * the dApp\'s declared required minimum. SDK-internal; never emitted on the\n * wire. Consumers discriminate via `instanceof` or `errorCode`.\n *\n * @category Error\n */\nclass VersionUnsupportedBeaconError extends BeaconError_1.BeaconError {\n constructor(requiredMinimumVersion, walletServedVersion, message) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, message !== null && message !== void 0 ? message : `This dApp requires Octez.connect protocol version ${requiredMinimumVersion} or higher, ` +\n `but the wallet only supports version ${walletServedVersion}. Please upgrade your wallet.`, error_codes_1.BEACON_ERROR_CODES.VERSION_UNSUPPORTED);\n this.name = \'VersionUnsupportedBeaconError\';\n this.title = \'Wallet version not supported\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.VERSION_UNSUPPORTED;\n this.requiredMinimumVersion = requiredMinimumVersion;\n this.walletServedVersion = walletServedVersion;\n }\n}\nexports.VersionUnsupportedBeaconError = VersionUnsupportedBeaconError;\n//# sourceMappingURL=VersionUnsupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js"(__unused_webpack_module,exports){"use strict";eval("{\n/**\n * Centralized error code registry for all Beacon SDK errors.\n * Error codes provide unique identifiers for debugging and support.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ERROR_CODES = exports.BEACON_ERROR_CODES = exports.BLOCKCHAIN_ERROR_CODES = exports.PM_ERROR_CODES = exports.MATRIX_ERROR_CODES = exports.WC_ERROR_CODES = void 0;\n/**\n * WalletConnect transport error codes\n * Reference: @walletconnect/utils SDK_ERRORS and INTERNAL_ERRORS\n */\nexports.WC_ERROR_CODES = {\n // Custom Beacon SDK WC errors\n INVALID_NAMESPACE: 'WC_INVALID_NAMESPACE',\n INCOMPLETE_NAMESPACE: 'WC_INCOMPLETE_NAMESPACE',\n NOT_CONNECTED: 'WC_NOT_CONNECTED',\n INVALID_SESSION: 'WC_INVALID_SESSION',\n MISSING_REQUIRED_SCOPE: 'WC_MISSING_REQUIRED_SCOPE',\n ACTIVE_NETWORK_UNSPECIFIED: 'WC_ACTIVE_NETWORK_UNSPECIFIED',\n ACTIVE_ACCOUNT_UNSPECIFIED: 'WC_ACTIVE_ACCOUNT_UNSPECIFIED',\n INVALID_NETWORK_OR_ACCOUNT: 'WC_INVALID_NETWORK_OR_ACCOUNT',\n // WC INTERNAL_ERRORS (from @walletconnect/utils)\n NOT_INITIALIZED: 'WC_NOT_INITIALIZED', // code 1\n NO_MATCHING_KEY: 'WC_NO_MATCHING_KEY', // code 2\n EXPIRED: 'WC_EXPIRED', // code 6 (session or pairing expiry)\n SESSION_EXPIRED: 'WC_SESSION_EXPIRED',\n PAIRING_EXPIRED: 'WC_PAIRING_EXPIRED',\n UNKNOWN_TYPE: 'WC_UNKNOWN_TYPE', // code 7\n MISMATCHED_TOPIC: 'WC_MISMATCHED_TOPIC', // code 8\n NON_CONFORMING_NAMESPACES: 'WC_NON_CONFORMING_NAMESPACES', // code 9\n // WC SDK_ERRORS (from @walletconnect/utils)\n INVALID_METHOD: 'WC_INVALID_METHOD', // code 1001\n INVALID_EVENT: 'WC_INVALID_EVENT', // code 1002\n INVALID_UPDATE_REQUEST: 'WC_INVALID_UPDATE_REQUEST', // code 1003\n INVALID_EXTEND_REQUEST: 'WC_INVALID_EXTEND_REQUEST', // code 1004\n INVALID_SESSION_SETTLE_REQUEST: 'WC_INVALID_SESSION_SETTLE_REQUEST', // code 1005\n UNAUTHORIZED_METHOD: 'WC_UNAUTHORIZED_METHOD', // code 3001\n UNAUTHORIZED_EVENT: 'WC_UNAUTHORIZED_EVENT', // code 3002\n UNAUTHORIZED_UPDATE_REQUEST: 'WC_UNAUTHORIZED_UPDATE_REQUEST', // code 3003\n UNAUTHORIZED_EXTEND_REQUEST: 'WC_UNAUTHORIZED_EXTEND_REQUEST', // code 3004\n USER_REJECTED: 'WC_USER_REJECTED', // code 5000\n USER_REJECTED_CHAINS: 'WC_USER_REJECTED_CHAINS', // code 5001\n USER_REJECTED_METHODS: 'WC_USER_REJECTED_METHODS', // code 5002\n USER_REJECTED_EVENTS: 'WC_USER_REJECTED_EVENTS', // code 5003\n UNSUPPORTED_CHAINS: 'WC_UNSUPPORTED_CHAINS', // code 5100\n UNSUPPORTED_METHODS: 'WC_UNSUPPORTED_METHODS', // code 5101\n UNSUPPORTED_EVENTS: 'WC_UNSUPPORTED_EVENTS', // code 5102\n UNSUPPORTED_ACCOUNTS: 'WC_UNSUPPORTED_ACCOUNTS', // code 5103\n UNSUPPORTED_NAMESPACE_KEY: 'WC_UNSUPPORTED_NAMESPACE_KEY', // code 5104\n USER_DISCONNECTED: 'WC_USER_DISCONNECTED', // code 6000\n SESSION_SETTLEMENT_FAILED: 'WC_SESSION_SETTLEMENT_FAILED', // code 7000\n WC_METHOD_UNSUPPORTED: 'WC_METHOD_UNSUPPORTED', // code 10001\n // Generic\n UNKNOWN_ERROR: 'WC_UNKNOWN_ERROR'\n};\n/**\n * Matrix/P2P transport error codes\n */\nexports.MATRIX_ERROR_CODES = {\n RELAY_TIMEOUT: 'MATRIX_RELAY_TIMEOUT',\n CONNECTION_FAILED: 'MATRIX_CONNECTION_FAILED',\n RELAY_ERROR: 'MATRIX_RELAY_ERROR',\n PEER_NOT_FOUND: 'MATRIX_PEER_NOT_FOUND',\n MESSAGE_DELIVERY_FAILED: 'MATRIX_MESSAGE_DELIVERY_FAILED',\n ROOM_JOIN_FAILED: 'MATRIX_ROOM_JOIN_FAILED'\n};\n/**\n * PostMessage transport error codes\n */\nexports.PM_ERROR_CODES = {\n EXTENSION_ERROR: 'PM_EXTENSION_ERROR',\n ORIGIN_MISMATCH: 'PM_ORIGIN_MISMATCH',\n NO_RESPONSE: 'PM_NO_RESPONSE',\n EXTENSION_NOT_FOUND: 'PM_EXTENSION_NOT_FOUND',\n MESSAGE_TIMEOUT: 'PM_MESSAGE_TIMEOUT'\n};\n/**\n * Blockchain-specific error codes\n */\nexports.BLOCKCHAIN_ERROR_CODES = {\n TEZOS_INVALID_SIGNATURE: 'TEZOS_INVALID_SIGNATURE',\n TEZOS_NETWORK_ERROR: 'TEZOS_NETWORK_ERROR',\n TEZOS_NODE_ERROR: 'TEZOS_NODE_ERROR',\n TEZOS_SIMULATION_ERROR: 'TEZOS_SIMULATION_ERROR',\n SUBSTRATE_INVALID_SIGNATURE: 'SUBSTRATE_INVALID_SIGNATURE',\n SUBSTRATE_NETWORK_ERROR: 'SUBSTRATE_NETWORK_ERROR'\n};\n/**\n * Generic Beacon error codes\n */\nexports.BEACON_ERROR_CODES = {\n ABORTED_BY_USER: 'ABORTED_BY_USER',\n NETWORK_NOT_SUPPORTED: 'NETWORK_NOT_SUPPORTED',\n PERMISSION_DENIED: 'PERMISSION_DENIED',\n NO_ADDRESS: 'NO_ADDRESS',\n NO_PRIVATE_KEY: 'NO_PRIVATE_KEY',\n PARAMETERS_INVALID: 'PARAMETERS_INVALID',\n TOO_MANY_OPERATIONS: 'TOO_MANY_OPERATIONS',\n TRANSACTION_INVALID: 'TRANSACTION_INVALID',\n BROADCAST_ERROR: 'BROADCAST_ERROR',\n SIGNATURE_TYPE_NOT_SUPPORTED: 'SIGNATURE_TYPE_NOT_SUPPORTED',\n UNKNOWN_ERROR: 'UNKNOWN_ERROR',\n VERSION_UNSUPPORTED: 'VERSION_UNSUPPORTED',\n INVALID_REQUIRED_MINIMUM_VERSION: 'INVALID_REQUIRED_MINIMUM_VERSION',\n NETWORKS_UNSUPPORTED: 'NETWORKS_UNSUPPORTED',\n INVALID_BEACON_VERSION: 'INVALID_BEACON_VERSION'\n};\n/**\n * All error codes combined\n */\nexports.ERROR_CODES = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, exports.WC_ERROR_CODES), exports.MATRIX_ERROR_CODES), exports.PM_ERROR_CODES), exports.BLOCKCHAIN_ERROR_CODES), exports.BEACON_ERROR_CODES);\n//# sourceMappingURL=error-codes.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/get-error.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkNotSupportedBeaconError = exports.BroadcastBeaconError = exports.BeaconError = void 0;\n// src/errors/index.ts\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\nObject.defineProperty(exports, "BeaconError", ({ enumerable: true, get: function () { return BeaconError_1.BeaconError; } }));\nconst BroadcastBeaconError_1 = __webpack_require__(/*! ./BroadcastBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js");\nObject.defineProperty(exports, "BroadcastBeaconError", ({ enumerable: true, get: function () { return BroadcastBeaconError_1.BroadcastBeaconError; } }));\nconst NetworkNotSupportedBeaconError_1 = __webpack_require__(/*! ./NetworkNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js");\nObject.defineProperty(exports, "NetworkNotSupportedBeaconError", ({ enumerable: true, get: function () { return NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError; } }));\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst assert_never_1 = __webpack_require__(/*! ../utils/assert-never */ "./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js");\nconst AbortedBeaconError_1 = __webpack_require__(/*! ./AbortedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js");\nconst NoAddressBeaconError_1 = __webpack_require__(/*! ./NoAddressBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js");\nconst NoPrivateKeyBeaconError_1 = __webpack_require__(/*! ./NoPrivateKeyBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js");\nconst NotGrantedBeaconError_1 = __webpack_require__(/*! ./NotGrantedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js");\nconst ParametersInvalidBeaconError_1 = __webpack_require__(/*! ./ParametersInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js");\nconst SignatureTypeNotSupportedBeaconError_1 = __webpack_require__(/*! ./SignatureTypeNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js");\nconst TooManyOperationsBeaconError_1 = __webpack_require__(/*! ./TooManyOperationsBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js");\nconst TransactionInvalidBeaconError_1 = __webpack_require__(/*! ./TransactionInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js");\nconst UnknownBeaconError_1 = __webpack_require__(/*! ./UnknownBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js");\nconst getError = (errorType, errorData) => {\n switch (errorType) {\n case octez_connect_types_1.BeaconErrorType.BROADCAST_ERROR:\n return new BroadcastBeaconError_1.BroadcastBeaconError();\n case octez_connect_types_1.BeaconErrorType.NETWORK_NOT_SUPPORTED:\n return new NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError();\n case octez_connect_types_1.BeaconErrorType.NO_ADDRESS_ERROR:\n return new NoAddressBeaconError_1.NoAddressBeaconError();\n case octez_connect_types_1.BeaconErrorType.NO_PRIVATE_KEY_FOUND_ERROR:\n return new NoPrivateKeyBeaconError_1.NoPrivateKeyBeaconError();\n case octez_connect_types_1.BeaconErrorType.NOT_GRANTED_ERROR:\n return new NotGrantedBeaconError_1.NotGrantedBeaconError();\n case octez_connect_types_1.BeaconErrorType.PARAMETERS_INVALID_ERROR:\n return new ParametersInvalidBeaconError_1.ParametersInvalidBeaconError();\n case octez_connect_types_1.BeaconErrorType.TOO_MANY_OPERATIONS:\n return new TooManyOperationsBeaconError_1.TooManyOperationsBeaconError();\n case octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR:\n return new TransactionInvalidBeaconError_1.TransactionInvalidBeaconError(errorData);\n case octez_connect_types_1.BeaconErrorType.SIGNATURE_TYPE_NOT_SUPPORTED:\n return new SignatureTypeNotSupportedBeaconError_1.SignatureTypeNotSupportedBeaconError();\n // case BeaconErrorType.ENCRYPTION_TYPE_NOT_SUPPORTED:\n // return new EncryptionTypeNotSupportedBeaconError()\n case octez_connect_types_1.BeaconErrorType.ABORTED_ERROR:\n return new AbortedBeaconError_1.AbortedBeaconError();\n case octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR:\n return new UnknownBeaconError_1.UnknownBeaconError();\n default:\n (0, assert_never_1.assertNever)(errorType);\n }\n};\nexports["default"] = getError;\n//# sourceMappingURL=get-error.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/get-error.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.isMultiNetworkVersion = exports.isAtLeastVersion = exports.compareBeaconVersion = exports.MULTI_NETWORK_FROM_VERSION = exports.MESSAGE_WRAPPED_FROM_VERSION = exports.usesWrappedMessages = exports.MultiTabChannel = exports.windowRef = exports.getAccountIdentifier = exports.getSenderId = exports.setPreferredMessageProtocolVersion = exports.getPreferredMessageProtocolVersion = exports.DEFAULT_PROTOCOL_VERSION = exports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2 = exports.PROTOCOL_VERSION_V1 = exports.BEACON_VERSION = exports.SDK_VERSION = exports.PermissionManager = exports.AppMetadataManager = exports.AccountManager = exports.PeerManager = exports.getStorage = exports.StorageValidator = exports.IndexedDBStorage = exports.WCStorage = exports.LocalStorage = exports.ChromeStorage = exports.CommunicationClient = exports.MessageBasedClient = exports.Transport = exports.InvalidBeaconVersionError = exports.NetworksUnsupportedBeaconError = exports.InvalidRequiredMinimumVersionError = exports.VersionUnsupportedBeaconError = exports.UnknownBeaconError = exports.SignatureTypeNotSupportedBeaconError = exports.TransactionInvalidBeaconError = exports.TooManyOperationsBeaconError = exports.ParametersInvalidBeaconError = exports.NotGrantedBeaconError = exports.NoPrivateKeyBeaconError = exports.NoAddressBeaconError = exports.NetworkNotSupportedBeaconError = exports.BroadcastBeaconError = exports.AbortedBeaconError = exports.BeaconError = exports.getError = exports.Client = exports.BeaconClient = void 0;\nexports.BACKEND_URL = exports.NOTIFICATION_ORACLE_URL = exports.getDebugEnabled = exports.setDebugEnabled = exports.getLogger = exports.setLogger = exports.Logger = exports.Serializer = exports.BEACON_ERROR_CODES = exports.BLOCKCHAIN_ERROR_CODES = exports.PM_ERROR_CODES = exports.MATRIX_ERROR_CODES = exports.WC_ERROR_CODES = exports.ERROR_CODES = exports.SENSITIVE_STORAGE_KEYS = exports.copyErrorContextToClipboard = exports.serializeErrorContext = exports.buildErrorContext = exports.gatherDiagnostics = exports.resolveRequiredMinimumVersion = exports.assertNever = exports.networkTypeFromTezosCaip2 = exports.tezosCaip2FromNetworkType = exports.TEZOS_NETWORK_GENESIS_IDS = exports.networkFromTezosCaip2 = exports.isValidTezosCaip2 = exports.normalizeTezosCaip2 = exports.unwrapBeaconMessage = exports.wrapBeaconMessage = exports.negotiateEnvelopeVersion = void 0;\n/**\n * General docs\n * @module public\n */\nconst Client_1 = __webpack_require__(/*! ./clients/client/Client */ "./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js");\nObject.defineProperty(exports, "Client", ({ enumerable: true, get: function () { return Client_1.Client; } }));\nconst BeaconError_1 = __webpack_require__(/*! ./errors/BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\nObject.defineProperty(exports, "BeaconError", ({ enumerable: true, get: function () { return BeaconError_1.BeaconError; } }));\nconst BroadcastBeaconError_1 = __webpack_require__(/*! ./errors/BroadcastBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js");\nObject.defineProperty(exports, "BroadcastBeaconError", ({ enumerable: true, get: function () { return BroadcastBeaconError_1.BroadcastBeaconError; } }));\nconst NetworkNotSupportedBeaconError_1 = __webpack_require__(/*! ./errors/NetworkNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js");\nObject.defineProperty(exports, "NetworkNotSupportedBeaconError", ({ enumerable: true, get: function () { return NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError; } }));\nconst NoAddressBeaconError_1 = __webpack_require__(/*! ./errors/NoAddressBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js");\nObject.defineProperty(exports, "NoAddressBeaconError", ({ enumerable: true, get: function () { return NoAddressBeaconError_1.NoAddressBeaconError; } }));\nconst NoPrivateKeyBeaconError_1 = __webpack_require__(/*! ./errors/NoPrivateKeyBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js");\nObject.defineProperty(exports, "NoPrivateKeyBeaconError", ({ enumerable: true, get: function () { return NoPrivateKeyBeaconError_1.NoPrivateKeyBeaconError; } }));\nconst NotGrantedBeaconError_1 = __webpack_require__(/*! ./errors/NotGrantedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js");\nObject.defineProperty(exports, "NotGrantedBeaconError", ({ enumerable: true, get: function () { return NotGrantedBeaconError_1.NotGrantedBeaconError; } }));\nconst ParametersInvalidBeaconError_1 = __webpack_require__(/*! ./errors/ParametersInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js");\nObject.defineProperty(exports, "ParametersInvalidBeaconError", ({ enumerable: true, get: function () { return ParametersInvalidBeaconError_1.ParametersInvalidBeaconError; } }));\nconst TooManyOperationsBeaconError_1 = __webpack_require__(/*! ./errors/TooManyOperationsBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js");\nObject.defineProperty(exports, "TooManyOperationsBeaconError", ({ enumerable: true, get: function () { return TooManyOperationsBeaconError_1.TooManyOperationsBeaconError; } }));\nconst TransactionInvalidBeaconError_1 = __webpack_require__(/*! ./errors/TransactionInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js");\nObject.defineProperty(exports, "TransactionInvalidBeaconError", ({ enumerable: true, get: function () { return TransactionInvalidBeaconError_1.TransactionInvalidBeaconError; } }));\nconst UnknownBeaconError_1 = __webpack_require__(/*! ./errors/UnknownBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js");\nObject.defineProperty(exports, "UnknownBeaconError", ({ enumerable: true, get: function () { return UnknownBeaconError_1.UnknownBeaconError; } }));\nconst Transport_1 = __webpack_require__(/*! ./transports/Transport */ "./packages/octez.connect-core/dist/cjs/src/transports/Transport.js");\nObject.defineProperty(exports, "Transport", ({ enumerable: true, get: function () { return Transport_1.Transport; } }));\nconst ChromeStorage_1 = __webpack_require__(/*! ./storage/ChromeStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js");\nObject.defineProperty(exports, "ChromeStorage", ({ enumerable: true, get: function () { return ChromeStorage_1.ChromeStorage; } }));\nconst LocalStorage_1 = __webpack_require__(/*! ./storage/LocalStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js");\nObject.defineProperty(exports, "LocalStorage", ({ enumerable: true, get: function () { return LocalStorage_1.LocalStorage; } }));\nconst getStorage_1 = __webpack_require__(/*! ./storage/getStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js");\nObject.defineProperty(exports, "getStorage", ({ enumerable: true, get: function () { return getStorage_1.getStorage; } }));\nconst Serializer_1 = __webpack_require__(/*! ./Serializer */ "./packages/octez.connect-core/dist/cjs/src/Serializer.js");\nObject.defineProperty(exports, "Serializer", ({ enumerable: true, get: function () { return Serializer_1.Serializer; } }));\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nObject.defineProperty(exports, "SDK_VERSION", ({ enumerable: true, get: function () { return constants_1.SDK_VERSION; } }));\nObject.defineProperty(exports, "BEACON_VERSION", ({ enumerable: true, get: function () { return constants_1.BEACON_VERSION; } }));\nObject.defineProperty(exports, "PROTOCOL_VERSION_V1", ({ enumerable: true, get: function () { return constants_1.PROTOCOL_VERSION_V1; } }));\nObject.defineProperty(exports, "PROTOCOL_VERSION_V2", ({ enumerable: true, get: function () { return constants_1.PROTOCOL_VERSION_V2; } }));\nObject.defineProperty(exports, "LATEST_PROTOCOL_VERSION", ({ enumerable: true, get: function () { return constants_1.LATEST_PROTOCOL_VERSION; } }));\nObject.defineProperty(exports, "DEFAULT_PROTOCOL_VERSION", ({ enumerable: true, get: function () { return constants_1.DEFAULT_PROTOCOL_VERSION; } }));\nconst message_protocol_1 = __webpack_require__(/*! ./message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nObject.defineProperty(exports, "getPreferredMessageProtocolVersion", ({ enumerable: true, get: function () { return message_protocol_1.getPreferredMessageProtocolVersion; } }));\nObject.defineProperty(exports, "setPreferredMessageProtocolVersion", ({ enumerable: true, get: function () { return message_protocol_1.setPreferredMessageProtocolVersion; } }));\nconst AccountManager_1 = __webpack_require__(/*! ./managers/AccountManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js");\nObject.defineProperty(exports, "AccountManager", ({ enumerable: true, get: function () { return AccountManager_1.AccountManager; } }));\nconst AppMetadataManager_1 = __webpack_require__(/*! ./managers/AppMetadataManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js");\nObject.defineProperty(exports, "AppMetadataManager", ({ enumerable: true, get: function () { return AppMetadataManager_1.AppMetadataManager; } }));\nconst PermissionManager_1 = __webpack_require__(/*! ./managers/PermissionManager */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js");\nObject.defineProperty(exports, "PermissionManager", ({ enumerable: true, get: function () { return PermissionManager_1.PermissionManager; } }));\nconst BeaconClient_1 = __webpack_require__(/*! ./clients/beacon-client/BeaconClient */ "./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js");\nObject.defineProperty(exports, "BeaconClient", ({ enumerable: true, get: function () { return BeaconClient_1.BeaconClient; } }));\nconst get_account_identifier_1 = __webpack_require__(/*! ./utils/get-account-identifier */ "./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js");\nObject.defineProperty(exports, "getAccountIdentifier", ({ enumerable: true, get: function () { return get_account_identifier_1.getAccountIdentifier; } }));\nconst AbortedBeaconError_1 = __webpack_require__(/*! ./errors/AbortedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js");\nObject.defineProperty(exports, "AbortedBeaconError", ({ enumerable: true, get: function () { return AbortedBeaconError_1.AbortedBeaconError; } }));\nconst get_sender_id_1 = __webpack_require__(/*! ./utils/get-sender-id */ "./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js");\nObject.defineProperty(exports, "getSenderId", ({ enumerable: true, get: function () { return get_sender_id_1.getSenderId; } }));\nconst PeerManager_1 = __webpack_require__(/*! ./managers/PeerManager */ "./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js");\nObject.defineProperty(exports, "PeerManager", ({ enumerable: true, get: function () { return PeerManager_1.PeerManager; } }));\nconst MessageBasedClient_1 = __webpack_require__(/*! ./transports/clients/MessageBasedClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js");\nObject.defineProperty(exports, "MessageBasedClient", ({ enumerable: true, get: function () { return MessageBasedClient_1.MessageBasedClient; } }));\nconst debug_1 = __webpack_require__(/*! ./debug */ "./packages/octez.connect-core/dist/cjs/src/debug.js");\nObject.defineProperty(exports, "setDebugEnabled", ({ enumerable: true, get: function () { return debug_1.setDebugEnabled; } }));\nObject.defineProperty(exports, "getDebugEnabled", ({ enumerable: true, get: function () { return debug_1.getDebugEnabled; } }));\n// import { EncryptPayloadRequest } from \'./types/beacon/messages/EncryptPayloadRequest\'\n// import { EncryptPayloadResponse } from \'./types/beacon/messages/EncryptPayloadResponse\'\n// import { EncryptionTypeNotSupportedBeaconError } from \'./errors/EncryptionTypeNotSupportedBeaconError\'\nconst SignatureTypeNotSupportedBeaconError_1 = __webpack_require__(/*! ./errors/SignatureTypeNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js");\nObject.defineProperty(exports, "SignatureTypeNotSupportedBeaconError", ({ enumerable: true, get: function () { return SignatureTypeNotSupportedBeaconError_1.SignatureTypeNotSupportedBeaconError; } }));\nconst VersionUnsupportedBeaconError_1 = __webpack_require__(/*! ./errors/VersionUnsupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js");\nObject.defineProperty(exports, "VersionUnsupportedBeaconError", ({ enumerable: true, get: function () { return VersionUnsupportedBeaconError_1.VersionUnsupportedBeaconError; } }));\nconst InvalidRequiredMinimumVersionError_1 = __webpack_require__(/*! ./errors/InvalidRequiredMinimumVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js");\nObject.defineProperty(exports, "InvalidRequiredMinimumVersionError", ({ enumerable: true, get: function () { return InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError; } }));\nconst NetworksUnsupportedBeaconError_1 = __webpack_require__(/*! ./errors/NetworksUnsupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js");\nObject.defineProperty(exports, "NetworksUnsupportedBeaconError", ({ enumerable: true, get: function () { return NetworksUnsupportedBeaconError_1.NetworksUnsupportedBeaconError; } }));\nconst InvalidBeaconVersionError_1 = __webpack_require__(/*! ./errors/InvalidBeaconVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js");\nObject.defineProperty(exports, "InvalidBeaconVersionError", ({ enumerable: true, get: function () { return InvalidBeaconVersionError_1.InvalidBeaconVersionError; } }));\nconst Logger_1 = __webpack_require__(/*! ./utils/Logger */ "./packages/octez.connect-core/dist/cjs/src/utils/Logger.js");\nObject.defineProperty(exports, "getLogger", ({ enumerable: true, get: function () { return Logger_1.getLogger; } }));\nObject.defineProperty(exports, "Logger", ({ enumerable: true, get: function () { return Logger_1.Logger; } }));\nObject.defineProperty(exports, "setLogger", ({ enumerable: true, get: function () { return Logger_1.setLogger; } }));\nconst MockWindow_1 = __webpack_require__(/*! ./MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\nObject.defineProperty(exports, "windowRef", ({ enumerable: true, get: function () { return MockWindow_1.windowRef; } }));\nconst CommunicationClient_1 = __webpack_require__(/*! ./transports/clients/CommunicationClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js");\nObject.defineProperty(exports, "CommunicationClient", ({ enumerable: true, get: function () { return CommunicationClient_1.CommunicationClient; } }));\nconst WCStorage_1 = __webpack_require__(/*! ./storage/WCStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js");\nObject.defineProperty(exports, "WCStorage", ({ enumerable: true, get: function () { return WCStorage_1.WCStorage; } }));\nconst IndexedDBStorage_1 = __webpack_require__(/*! ./storage/IndexedDBStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js");\nObject.defineProperty(exports, "IndexedDBStorage", ({ enumerable: true, get: function () { return IndexedDBStorage_1.IndexedDBStorage; } }));\nconst StorageValidator_1 = __webpack_require__(/*! ./storage/StorageValidator */ "./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js");\nObject.defineProperty(exports, "StorageValidator", ({ enumerable: true, get: function () { return StorageValidator_1.StorageValidator; } }));\nconst multi_tab_channel_1 = __webpack_require__(/*! ./utils/multi-tab-channel */ "./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js");\nObject.defineProperty(exports, "MultiTabChannel", ({ enumerable: true, get: function () { return multi_tab_channel_1.MultiTabChannel; } }));\nconst get_error_1 = __importDefault(__webpack_require__(/*! ./errors/get-error */ "./packages/octez.connect-core/dist/cjs/src/errors/get-error.js"));\nexports.getError = get_error_1.default;\nvar message_utils_1 = __webpack_require__(/*! ./utils/message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\nObject.defineProperty(exports, "usesWrappedMessages", ({ enumerable: true, get: function () { return message_utils_1.usesWrappedMessages; } }));\nObject.defineProperty(exports, "MESSAGE_WRAPPED_FROM_VERSION", ({ enumerable: true, get: function () { return message_utils_1.MESSAGE_WRAPPED_FROM_VERSION; } }));\nObject.defineProperty(exports, "MULTI_NETWORK_FROM_VERSION", ({ enumerable: true, get: function () { return message_utils_1.MULTI_NETWORK_FROM_VERSION; } }));\nObject.defineProperty(exports, "compareBeaconVersion", ({ enumerable: true, get: function () { return message_utils_1.compareBeaconVersion; } }));\nObject.defineProperty(exports, "isAtLeastVersion", ({ enumerable: true, get: function () { return message_utils_1.isAtLeastVersion; } }));\nObject.defineProperty(exports, "isMultiNetworkVersion", ({ enumerable: true, get: function () { return message_utils_1.isMultiNetworkVersion; } }));\nObject.defineProperty(exports, "negotiateEnvelopeVersion", ({ enumerable: true, get: function () { return message_utils_1.negotiateEnvelopeVersion; } }));\nObject.defineProperty(exports, "wrapBeaconMessage", ({ enumerable: true, get: function () { return message_utils_1.wrapBeaconMessage; } }));\nObject.defineProperty(exports, "unwrapBeaconMessage", ({ enumerable: true, get: function () { return message_utils_1.unwrapBeaconMessage; } }));\nvar caip2_1 = __webpack_require__(/*! ./utils/caip2 */ "./packages/octez.connect-core/dist/cjs/src/utils/caip2.js");\nObject.defineProperty(exports, "normalizeTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.normalizeTezosCaip2; } }));\nObject.defineProperty(exports, "isValidTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.isValidTezosCaip2; } }));\nObject.defineProperty(exports, "networkFromTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.networkFromTezosCaip2; } }));\nObject.defineProperty(exports, "TEZOS_NETWORK_GENESIS_IDS", ({ enumerable: true, get: function () { return caip2_1.TEZOS_NETWORK_GENESIS_IDS; } }));\nObject.defineProperty(exports, "tezosCaip2FromNetworkType", ({ enumerable: true, get: function () { return caip2_1.tezosCaip2FromNetworkType; } }));\nObject.defineProperty(exports, "networkTypeFromTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.networkTypeFromTezosCaip2; } }));\nvar assert_never_1 = __webpack_require__(/*! ./utils/assert-never */ "./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js");\nObject.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_never_1.assertNever; } }));\nvar required_minimum_version_1 = __webpack_require__(/*! ./utils/required-minimum-version */ "./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js");\nObject.defineProperty(exports, "resolveRequiredMinimumVersion", ({ enumerable: true, get: function () { return required_minimum_version_1.resolveRequiredMinimumVersion; } }));\n// Diagnostics\nvar diagnostics_1 = __webpack_require__(/*! ./utils/diagnostics */ "./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js");\nObject.defineProperty(exports, "gatherDiagnostics", ({ enumerable: true, get: function () { return diagnostics_1.gatherDiagnostics; } }));\nObject.defineProperty(exports, "buildErrorContext", ({ enumerable: true, get: function () { return diagnostics_1.buildErrorContext; } }));\nObject.defineProperty(exports, "serializeErrorContext", ({ enumerable: true, get: function () { return diagnostics_1.serializeErrorContext; } }));\nObject.defineProperty(exports, "copyErrorContextToClipboard", ({ enumerable: true, get: function () { return diagnostics_1.copyErrorContextToClipboard; } }));\nObject.defineProperty(exports, "SENSITIVE_STORAGE_KEYS", ({ enumerable: true, get: function () { return diagnostics_1.SENSITIVE_STORAGE_KEYS; } }));\n// Error codes\nvar error_codes_1 = __webpack_require__(/*! ./errors/error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nObject.defineProperty(exports, "ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.ERROR_CODES; } }));\nObject.defineProperty(exports, "WC_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.WC_ERROR_CODES; } }));\nObject.defineProperty(exports, "MATRIX_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.MATRIX_ERROR_CODES; } }));\nObject.defineProperty(exports, "PM_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.PM_ERROR_CODES; } }));\nObject.defineProperty(exports, "BLOCKCHAIN_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.BLOCKCHAIN_ERROR_CODES; } }));\nObject.defineProperty(exports, "BEACON_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.BEACON_ERROR_CODES; } }));\nvar constants_2 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nObject.defineProperty(exports, "NOTIFICATION_ORACLE_URL", ({ enumerable: true, get: function () { return constants_2.NOTIFICATION_ORACLE_URL; } }));\nObject.defineProperty(exports, "BACKEND_URL", ({ enumerable: true, get: function () { return constants_2.BACKEND_URL; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/index.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AccountManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\nconst PermissionValidator_1 = __webpack_require__(/*! ./PermissionValidator */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js");\n/**\n * @internalapi\n *\n * The AccountManager provides CRUD functionality for account entities and persists them to the provided storage.\n */\nclass AccountManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.ACCOUNTS);\n }\n getAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((account) => account.accountIdentifier === accountIdentifier);\n });\n }\n addAccount(accountInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(accountInfo, (account) => account.accountIdentifier === accountInfo.accountIdentifier);\n });\n }\n /**\n * Persist several accounts in a single read-modify-write cycle. Behaves like\n * calling {@link addAccount} for each entry (dedupe/overwrite by\n * `accountIdentifier`) but touches storage once. Used by the v4 multi-network\n * permission flow, which materialises one account per requested network.\n */\n addAccounts(accountInfos) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addMany(accountInfos, (stored, incoming) => stored.accountIdentifier === incoming.accountIdentifier);\n });\n }\n updateAccount(accountIdentifier, accountInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n const account = yield this.getAccount(accountIdentifier);\n if (!account)\n return undefined;\n const newAccount = Object.assign(Object.assign({}, account), accountInfo);\n yield this.storageManager.addOne(newAccount, (account) => account.accountIdentifier === accountIdentifier, true);\n return newAccount;\n });\n }\n removeAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((account) => account.accountIdentifier === accountIdentifier);\n });\n }\n removeAccounts(accountIdentifiers) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((account) => accountIdentifiers.includes(account.accountIdentifier));\n });\n }\n removeAllAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n hasPermission(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return PermissionValidator_1.PermissionValidator.hasPermission(message, this.getAccount.bind(this), this.getAccounts.bind(this));\n });\n }\n}\nexports.AccountManager = AccountManager;\n//# sourceMappingURL=AccountManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AppMetadataManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\n/**\n * @internalapi\n *\n * The AppMetadataManager provides CRUD functionality for app-metadata entities and persists them to the provided storage.\n */\nclass AppMetadataManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.APP_METADATA_LIST);\n }\n getAppMetadataList() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((appMetadata) => appMetadata.senderId === senderId);\n });\n }\n addAppMetadata(appMetadata) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(appMetadata, (appMetadataElement) => appMetadataElement.senderId === appMetadata.senderId);\n });\n }\n removeAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((appMetadata) => appMetadata.senderId === senderId);\n });\n }\n removeAppMetadatas(senderIds) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((appMetadata) => senderIds.includes(appMetadata.senderId));\n });\n }\n removeAllAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n}\nexports.AppMetadataManager = AppMetadataManager;\n//# sourceMappingURL=AppMetadataManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PeerManager = void 0;\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\n/**\n * @internalapi\n *\n * The PeerManager provides CRUD functionality for peer entities and persists them to the provided storage.\n */\nclass PeerManager {\n constructor(storage, key) {\n this.storageManager = new StorageManager_1.StorageManager(storage, key);\n }\n hasPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.getPeer(publicKey)) ? true : false;\n });\n }\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((peer) => peer.publicKey === publicKey);\n });\n }\n addPeer(peerInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(peerInfo, (peer) => peer.publicKey === peerInfo.publicKey);\n });\n }\n removePeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((peer) => peer.publicKey === publicKey);\n });\n }\n removePeers(publicKeys) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((peer) => publicKeys.includes(peer.publicKey));\n });\n }\n removeAllPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n}\nexports.PeerManager = PeerManager;\n//# sourceMappingURL=PeerManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\nconst PermissionValidator_1 = __webpack_require__(/*! ./PermissionValidator */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js");\n/**\n * @internalapi\n *\n * The PermissionManager provides CRUD functionality for permission entities and persists them to the provided storage.\n */\nclass PermissionManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.PERMISSION_LIST);\n }\n getPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getPermission(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((permission) => permission.accountIdentifier === accountIdentifier);\n });\n }\n addPermission(permissionInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(permissionInfo, (permission) => permission.accountIdentifier === permissionInfo.accountIdentifier &&\n permission.senderId === permissionInfo.senderId);\n });\n }\n /**\n * Persist several permissions in one read-modify-write cycle. Required for\n * the v4 multi-network fanout (N permissions from one response): N\n * concurrent `addPermission` calls race on the shared permission list and\n * the last write clobbers the others.\n */\n addPermissions(permissionInfos) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addMany(permissionInfos, (stored, incoming) => stored.accountIdentifier === incoming.accountIdentifier &&\n stored.senderId === incoming.senderId);\n });\n }\n removePermission(accountIdentifier, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((permission) => permission.accountIdentifier === accountIdentifier && permission.senderId === senderId);\n });\n }\n removePermissions(accountIdentifiers) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((permission) => accountIdentifiers.includes(permission.accountIdentifier));\n });\n }\n removeAllPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n hasPermission(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return PermissionValidator_1.PermissionValidator.hasPermission(message, this.getPermission.bind(this), this.getPermissions.bind(this));\n });\n }\n}\nexports.PermissionManager = PermissionManager;\n//# sourceMappingURL=PermissionManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionValidator = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst get_account_identifier_1 = __webpack_require__(/*! ../utils/get-account-identifier */ "./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js");\nconst caip2_1 = __webpack_require__(/*! ../utils/caip2 */ "./packages/octez.connect-core/dist/cjs/src/utils/caip2.js");\n/**\n * @internalapi\n *\n * The PermissionValidator is used to check if permissions for a certain message type have been given\n */\nclass PermissionValidator {\n /**\n * Check if permissions were given for a certain message type.\n *\n * PermissionRequest and BroadcastRequest will always return true.\n *\n * @param message octez.connect message\n */\n static hasPermission(message, getOne, getAll) {\n return __awaiter(this, void 0, void 0, function* () {\n switch (message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionRequest:\n case octez_connect_types_1.BeaconMessageType.BroadcastRequest: {\n return true;\n }\n case octez_connect_types_1.BeaconMessageType.OperationRequest: {\n // operation_request.network is now `Network | string`: on the v4 path\n // the wire carries a CAIP-2 string, which we coerce to the minimal\n // Network used to derive the account identifier (same helper the\n // permission-storage side uses, so the two ids match). Normalize first:\n // the wire accepts both the bare reference (`NetX…`) and the full\n // `tezos:NetX…` form, but permissions were stored under the normalized\n // (prefixed) chainId, so a bare reference must be prefixed before the\n // identifier is derived or the lookup misses a valid grant.\n const networkForId = typeof message.network === \'string\'\n ? (0, caip2_1.networkFromTezosCaip2)((0, caip2_1.normalizeTezosCaip2)(message.network))\n : message.network;\n const accountIdentifier = yield (0, get_account_identifier_1.getAccountIdentifier)(message.sourceAddress, networkForId);\n const permission = yield getOne(accountIdentifier);\n if (!permission) {\n return false;\n }\n return permission.scopes.includes(octez_connect_types_1.PermissionScope.OPERATION_REQUEST);\n }\n case octez_connect_types_1.BeaconMessageType.SignPayloadRequest: {\n const permissions = yield getAll();\n const filteredPermissions = permissions.filter((permission) => permission.address === message.sourceAddress);\n if (filteredPermissions.length === 0) {\n return false;\n }\n return filteredPermissions.some((permission) => permission.scopes.includes(octez_connect_types_1.PermissionScope.SIGN));\n }\n default:\n throw new Error(\'Message not handled\');\n }\n });\n }\n}\nexports.PermissionValidator = PermissionValidator;\n//# sourceMappingURL=PermissionValidator.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js"(__unused_webpack_module,exports){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.StorageManager = void 0;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nfunction fixArrayType(array) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return array;\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n/**\n * @internalapi\n *\n * The StorageManager provides CRUD functionality for specific entities and persists them to the provided storage.\n */\nclass StorageManager {\n constructor(storage, storageKey) {\n this.storage = storage;\n this.storageKey = storageKey;\n }\n getAll() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storage.get(this.storageKey))) !== null && _a !== void 0 ? _a : [];\n });\n }\n getOne(predicate) {\n return __awaiter(this, void 0, void 0, function* () {\n const entities = yield this.storage.get(this.storageKey);\n return fixArrayType(entities).find(predicate);\n });\n }\n addOne(element_1, predicate_1) {\n return __awaiter(this, arguments, void 0, function* (element, predicate, overwrite = true) {\n const entities = yield this.storage.get(this.storageKey);\n if (!fixArrayType(entities).some(predicate)) {\n fixArrayType(entities).push(element);\n }\n else if (overwrite) {\n for (let i = 0; i < entities.length; i++) {\n if (predicate(fixArrayType(entities)[i])) {\n entities[i] = element;\n }\n }\n }\n return this.storage.set(this.storageKey, entities);\n });\n }\n /**\n * Insert or update many elements in a single read-modify-write cycle.\n *\n * Equivalent to calling {@link addOne} for each element, but reads and writes\n * storage once instead of once per element. Elements are reconciled against\n * the store AND against earlier elements in the same batch (so a duplicate\n * within `elements` collapses to one), using `match(stored, incoming)` to\n * decide identity. Used for the v4 multi-network fanout, which persists one\n * account per requested network from a single permission response.\n */\n addMany(elements_1, match_1) {\n return __awaiter(this, arguments, void 0, function* (elements, match, overwrite = true) {\n if (elements.length === 0) {\n return;\n }\n const entities = yield this.storage.get(this.storageKey);\n for (const element of elements) {\n const index = fixArrayType(entities).findIndex((existing) => match(existing, element));\n if (index === -1) {\n fixArrayType(entities).push(element);\n }\n else if (overwrite) {\n entities[index] = element;\n }\n }\n return this.storage.set(this.storageKey, entities);\n });\n }\n remove(predicate) {\n return __awaiter(this, void 0, void 0, function* () {\n const entities = yield this.storage.get(this.storageKey);\n const filteredEntities = fixArrayType(entities).filter((entity) => !predicate(entity));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this.storage.set(this.storageKey, filteredEntities);\n });\n }\n removeAll() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storage.delete(this.storageKey);\n });\n }\n}\nexports.StorageManager = StorageManager;\n//# sourceMappingURL=StorageManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/message-protocol.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.setPreferredMessageProtocolVersion = exports.getPreferredMessageProtocolVersion = void 0;\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nlet preferredMessageProtocolVersion = constants_1.LATEST_PROTOCOL_VERSION;\nconst getPreferredMessageProtocolVersion = () => preferredMessageProtocolVersion;\nexports.getPreferredMessageProtocolVersion = getPreferredMessageProtocolVersion;\nconst setPreferredMessageProtocolVersion = (version) => {\n preferredMessageProtocolVersion = version;\n};\nexports.setPreferredMessageProtocolVersion = setPreferredMessageProtocolVersion;\n//# sourceMappingURL=message-protocol.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/message-protocol.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ChromeStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\n/**\n * @internalapi\n *\n * A storage that can be used in chrome extensions\n */\nclass ChromeStorage {\n static isSupported() {\n return __awaiter(this, void 0, void 0, function* () {\n return (typeof chrome !== \'undefined\' &&\n Boolean(chrome) &&\n Boolean(chrome.runtime) &&\n Boolean(chrome.runtime.id) &&\n Boolean(chrome.storage) &&\n Boolean(chrome.storage.local));\n });\n }\n get(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.get(null, (storageContent) => {\n const value = storageContent[key];\n if (value !== undefined) {\n resolve(value);\n }\n else {\n const defaultValue = octez_connect_types_1.defaultValues[key];\n if (typeof defaultValue === \'object\') {\n resolve(JSON.parse(JSON.stringify(defaultValue)));\n }\n else {\n resolve(defaultValue);\n }\n }\n });\n });\n });\n }\n set(key, value) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.set({ [key]: value }, () => {\n resolve();\n });\n });\n });\n }\n delete(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.set({ [key]: undefined }, () => {\n resolve();\n });\n });\n });\n }\n subscribeToStorageChanged(_callback) {\n return __awaiter(this, void 0, void 0, function* () {\n // TODO\n });\n }\n getPrefixedKey(key) {\n return key;\n }\n}\nexports.ChromeStorage = ChromeStorage;\n//# sourceMappingURL=ChromeStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IndexedDBStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst logger = new Logger_1.Logger('IndexedDBStorage');\nclass IndexedDBStorage extends octez_connect_types_1.Storage {\n /**\n * @param dbName Name of the database.\n * @param storeNames An array of object store names to create in the database.\n * The first store in the array will be used as the default if none is specified.\n */\n constructor(dbName = 'WALLET_CONNECT_V2_INDEXED_DB', storeNames = ['keyvaluestorage']) {\n super();\n this.dbName = dbName;\n this.storeNames = storeNames;\n this.db = null;\n this.isSupported = true;\n this.initDB()\n .then((db) => (this.db = db))\n .catch((err) => logger.error(err.message));\n }\n isIndexedDBSupported() {\n if (typeof window !== 'undefined' && 'indexedDB' in window) {\n logger.log('isIndexedDBSupported', 'IndexedDB is supported in this browser.');\n return true;\n }\n else {\n logger.error('isIndexedDBSupported', 'IndexedDB is not supported in this browser.');\n return false;\n }\n }\n initDB() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n this.isSupported = this.isIndexedDBSupported();\n if (!this.isSupported) {\n reject('IndexedDB is not supported.');\n return;\n }\n const openRequest = indexedDB.open(this.dbName);\n openRequest.onupgradeneeded = () => {\n const db = openRequest.result;\n // Create all required object stores\n this.storeNames.forEach((storeName) => {\n if (!db.objectStoreNames.contains(storeName)) {\n db.createObjectStore(storeName);\n }\n });\n };\n openRequest.onsuccess = (event) => {\n const db = event.target.result;\n // Check if all stores exist – if not, perform an upgrade.\n const missingStores = this.storeNames.filter((storeName) => !db.objectStoreNames.contains(storeName));\n if (missingStores.length > 0) {\n db.close();\n const newVersion = db.version + 1;\n const upgradeRequest = indexedDB.open(this.dbName, newVersion);\n upgradeRequest.onupgradeneeded = () => {\n const upgradedDB = upgradeRequest.result;\n missingStores.forEach((storeName) => {\n if (!upgradedDB.objectStoreNames.contains(storeName)) {\n upgradedDB.createObjectStore(storeName);\n }\n });\n };\n upgradeRequest.onsuccess = (event) => {\n this.db = event.target.result;\n resolve(this.db);\n };\n upgradeRequest.onerror = (event) => reject(event.target.error);\n }\n else {\n this.db = db;\n resolve(db);\n }\n };\n openRequest.onerror = (event) => reject(event.target.error);\n });\n });\n }\n /**\n * Performs a transaction on the given object store.\n * @param mode Transaction mode.\n * @param storeName The name of the object store.\n * @param operation The operation to perform with the object store.\n */\n transaction(mode, storeName, operation) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n var _a;\n if (!this.isSupported) {\n reject('IndexedDB is not supported.');\n return;\n }\n if (!((_a = this.db) === null || _a === void 0 ? void 0 : _a.objectStoreNames.contains(storeName))) {\n reject(`${storeName} not found. error: ${new Error().stack}`);\n return;\n }\n const transaction = this.db.transaction(storeName, mode);\n const objectStore = transaction.objectStore(storeName);\n operation(objectStore).then(resolve).catch(reject);\n });\n });\n }\n get(key, storeName = this.storeNames[0]) {\n return this.transaction('readonly', storeName, (store) => new Promise((resolve, reject) => {\n const getRequest = store.get(key);\n getRequest.onsuccess = () => resolve(getRequest.result);\n getRequest.onerror = () => reject(getRequest.error);\n }));\n }\n set(key, value, storeName = this.storeNames[0]) {\n return this.transaction('readwrite', storeName, (store) => new Promise((resolve, reject) => {\n const putRequest = store.put(value, key);\n putRequest.onsuccess = () => resolve();\n putRequest.onerror = () => reject(putRequest.error);\n }));\n }\n delete(key, storeName = this.storeNames[0]) {\n return this.transaction('readwrite', storeName, (store) => new Promise((resolve, reject) => {\n const deleteRequest = store.delete(key);\n deleteRequest.onsuccess = () => resolve();\n deleteRequest.onerror = () => reject(deleteRequest.error);\n }));\n }\n /**\n * Retrieves all values from the specified object store.\n */\n getAll(storeName) {\n return this.transaction('readonly', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const getAllRequest = store.getAll();\n getAllRequest.onsuccess = () => resolve(getAllRequest.result);\n getAllRequest.onerror = () => reject(getAllRequest.error);\n }));\n }\n /**\n * Retrieves all keys from the specified object store.\n */\n getAllKeys(storeName) {\n return this.transaction('readonly', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const getAllKeysRequest = store.getAllKeys();\n getAllKeysRequest.onsuccess = () => resolve(getAllKeysRequest.result);\n getAllKeysRequest.onerror = () => reject(getAllKeysRequest.error);\n }));\n }\n /**\n * Clears all entries from the specified object store.\n */\n clearStore(storeName) {\n return this.transaction('readwrite', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const clearRequest = store.clear();\n clearRequest.onsuccess = () => resolve();\n clearRequest.onerror = () => reject(clearRequest.error);\n }));\n }\n getPrefixedKey(key) {\n logger.debug('getPrefixedKey', key);\n throw new Error('Method not implemented.');\n }\n subscribeToStorageChanged(callback) {\n logger.debug('subscribeToStorageEvent', callback);\n throw new Error('Method not implemented.');\n }\n /**\n * Copies all key/value pairs from the source store into a target store.\n * @param targetDBName Name of the target database.\n * @param targetStoreName Name of the target object store.\n * @param skipKeys Keys to skip.\n * @param sourceStoreName (Optional) Source store name – defaults to the default store.\n */\n fillStore(targetDBName_1, targetStoreName_1) {\n return __awaiter(this, arguments, void 0, function* (targetDBName, targetStoreName, skipKeys = [], sourceStoreName = this.storeNames[0]) {\n if (!this.isSupported) {\n logger.error('fillStore', 'IndexedDB not supported.');\n return;\n }\n const targetDBRequest = indexedDB.open(targetDBName);\n targetDBRequest.onerror = (event) => {\n throw new Error(`Failed to open target database: ${event.target.error}`);\n };\n const targetDB = yield new Promise((resolve, reject) => {\n targetDBRequest.onsuccess = (event) => resolve(event.target.result);\n targetDBRequest.onerror = (event) => reject(event.target.error);\n });\n // Copy items from the source store to the target store, skipping any specified keys.\n yield this.transaction('readonly', sourceStoreName, (sourceStore) => __awaiter(this, void 0, void 0, function* () {\n const getAllRequest = sourceStore.getAll();\n const getAllKeysRequest = sourceStore.getAllKeys();\n getAllRequest.onsuccess = () => __awaiter(this, void 0, void 0, function* () {\n getAllKeysRequest.onsuccess = () => __awaiter(this, void 0, void 0, function* () {\n const items = getAllRequest.result;\n const keys = getAllKeysRequest.result;\n if (!targetDB.objectStoreNames.contains(targetStoreName)) {\n logger.error(`${targetStoreName} not found. ${new Error().stack}`);\n return;\n }\n const targetTransaction = targetDB.transaction(targetStoreName, 'readwrite');\n const targetStore = targetTransaction.objectStore(targetStoreName);\n keys\n .filter((key) => !skipKeys.includes(key.toString()))\n .forEach((key, index) => {\n targetStore.put(items[index], key);\n });\n targetTransaction.onerror = (event) => {\n logger.error('Transaction error: ', event.target.error);\n };\n });\n });\n getAllKeysRequest.onerror = () => {\n logger.error('Failed to getAllKeys from source:', getAllKeysRequest.error);\n };\n getAllRequest.onerror = () => {\n logger.error('Failed to getAll from source:', getAllRequest.error);\n };\n }));\n });\n }\n}\nexports.IndexedDBStorage = IndexedDBStorage;\n//# sourceMappingURL=IndexedDBStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.LocalStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\n/**\n * @internalapi\n *\n * A storage that can be used in the browser\n */\nclass LocalStorage extends octez_connect_types_1.Storage {\n constructor(prefix) {\n super();\n this.prefix = prefix;\n }\n static isSupported() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(Boolean(typeof window !== 'undefined') && Boolean(window.localStorage));\n });\n }\n get(key) {\n return __awaiter(this, void 0, void 0, function* () {\n const value = localStorage.getItem(this.getPrefixedKey(key));\n if (!value) {\n if (typeof octez_connect_types_1.defaultValues[key] === 'object') {\n return JSON.parse(JSON.stringify(octez_connect_types_1.defaultValues[key]));\n }\n else {\n return octez_connect_types_1.defaultValues[key];\n }\n }\n else {\n try {\n return JSON.parse(value);\n }\n catch (jsonParseError) {\n return value; // TODO: Validate storage\n }\n }\n });\n }\n set(key, value) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof value === 'string') {\n return localStorage.setItem(this.getPrefixedKey(key), value);\n }\n else {\n return localStorage.setItem(this.getPrefixedKey(key), JSON.stringify(value));\n }\n });\n }\n delete(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(localStorage.removeItem(this.getPrefixedKey(key)));\n });\n }\n subscribeToStorageChanged(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n window.addEventListener('storage', (event) => {\n if (!event.key) {\n callback({\n eventType: 'storageCleared',\n key: null,\n oldValue: null,\n newValue: null\n });\n }\n else {\n callback({\n eventType: 'entryModified',\n key: this.getPrefixedKey(event.key),\n oldValue: event.oldValue,\n newValue: event.newValue\n });\n }\n }, false);\n });\n }\n getPrefixedKey(key) {\n return this.prefix ? `${this.prefix}-${key}` : key;\n }\n}\nexports.LocalStorage = LocalStorage;\n//# sourceMappingURL=LocalStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.StorageValidator = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nclass StorageValidator {\n constructor(storage) {\n this.storage = storage;\n }\n validateNumber(param) {\n return typeof param === 'number' && !isNaN(param);\n }\n validateText(param) {\n return typeof param === 'string';\n }\n validateBoolean(param) {\n return typeof param === 'boolean';\n }\n validateArray(param) {\n return Array.isArray(param);\n }\n objHasProperty(obj, path) {\n if (!obj)\n return false; // Return false if the object is null or undefined\n const properties = path.split('.'); // Split the path into individual properties\n let current = obj;\n for (const property of properties) {\n // If the property doesn't exist, return false\n if (!current.hasOwnProperty(property)) {\n return false;\n }\n // Move to the next level in the path\n current = current[property];\n }\n return true;\n }\n innerValidate(value, type, prop) {\n if (!value) {\n return true;\n }\n switch (type) {\n case 'num':\n return this.validateNumber(value);\n case 'str':\n return this.validateText(value);\n case 'bol':\n return this.validateBoolean(value);\n case 'obj':\n return this.objHasProperty(value, prop);\n case 'arr':\n return this.validateArray(value);\n default:\n return false;\n }\n }\n validate() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.BEACON_SDK_VERSION), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.MULTI_NODE_SETUP_DONE), 'bol')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_WALLET), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.ACCOUNTS), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.APP_METADATA_LIST), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.PERMISSION_LIST), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.ACTIVE_ACCOUNT), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.LAST_SELECTED_WALLET), 'obj', 'key')) {\n return false;\n }\n return true;\n });\n }\n}\nexports.StorageValidator = StorageValidator;\n//# sourceMappingURL=StorageValidator.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.WCStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst LocalStorage_1 = __webpack_require__(/*! ./LocalStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js\");\nconst IndexedDBStorage_1 = __webpack_require__(/*! ./IndexedDBStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js\");\nclass WCStorage {\n constructor() {\n this.localStorage = new LocalStorage_1.LocalStorage();\n this.indexedDB = new IndexedDBStorage_1.IndexedDBStorage();\n this.channel = new BroadcastChannel('WALLET_CONNECT_V2_INDEXED_DB');\n this.channel.onmessage = this.onMessage.bind(this);\n this.channel.onmessageerror = this.onError.bind(this);\n }\n onMessage(message) {\n this.onMessageHandler && this.onMessageHandler(message.data.type);\n }\n onError({ data }) {\n this.onErrorHandler && this.onErrorHandler(data);\n }\n notify(type) {\n var _a;\n (_a = this.channel) === null || _a === void 0 ? void 0 : _a.postMessage({ type });\n }\n hasPairings() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const pairings = (_a = (yield this.indexedDB.get(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING))) !== null && _a !== void 0 ? _a : '[]';\n if (pairings.length) {\n return true;\n }\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n return ((_b = (yield this.localStorage.get(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING))) !== null && _b !== void 0 ? _b : '[]') !== '[]';\n }\n return false;\n });\n }\n hasSessions() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const sessions = (_a = (yield this.indexedDB.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION))) !== null && _a !== void 0 ? _a : '[]';\n if (sessions.length) {\n return true;\n }\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n return ((_b = (yield this.localStorage.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION))) !== null && _b !== void 0 ? _b : '[]') !== '[]';\n }\n return false;\n });\n }\n backup() {\n this.indexedDB\n .fillStore('beacon', 'bug_report', [octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN])\n .catch((error) => console.error(error.message));\n }\n resetState() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.indexedDB.clearStore();\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n yield Promise.all([\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_MESSAGES),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CLIENT_PROPOSAL),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_SUBSCRIPTION),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_HISTORY),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_EXPIRER)\n ]);\n }\n });\n }\n}\nexports.WCStorage = WCStorage;\n//# sourceMappingURL=WCStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStorage = void 0;\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst ChromeStorage_1 = __webpack_require__(/*! ./ChromeStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js\");\nconst LocalStorage_1 = __webpack_require__(/*! ./LocalStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js\");\nconst logger = new Logger_1.Logger('STORAGE');\n/**\n * Get a supported storage on this platform\n */\nconst getStorage = () => __awaiter(void 0, void 0, void 0, function* () {\n if (yield ChromeStorage_1.ChromeStorage.isSupported()) {\n logger.log('getStorage', 'USING CHROME STORAGE');\n return new ChromeStorage_1.ChromeStorage();\n }\n else if (yield LocalStorage_1.LocalStorage.isSupported()) {\n logger.log('getStorage', 'USING LOCAL STORAGE');\n return new LocalStorage_1.LocalStorage();\n }\n else {\n throw new Error('no storage type supported');\n }\n});\nexports.getStorage = getStorage;\n//# sourceMappingURL=getStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/transports/Transport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Transport = void 0;\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new Logger_1.Logger('Transport');\n/**\n * @internalapi\n *\n *\n */\nclass Transport {\n setEventHandler(event, fun) {\n this.client.eventHandlers.set(event, fun);\n }\n /**\n * Return the status of the connection\n */\n get connectionStatus() {\n return this._isConnected;\n }\n constructor(name, client, peerManager) {\n /**\n * The type of the transport\n */\n this.type = octez_connect_types_1.TransportType.POST_MESSAGE;\n /**\n * The status of the transport\n */\n this._isConnected = octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n /**\n * The listeners that will be notified when new messages are coming in\n */\n this.listeners = [];\n this.name = name;\n this.client = client;\n this.peerManager = peerManager;\n }\n /**\n * Returns a promise that resolves to true if the transport is available, false if it is not\n */\n static isAvailable() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(false);\n });\n }\n /**\n * Connect the transport\n */\n connect() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('connect');\n this._isConnected = octez_connect_types_1.TransportStatus.CONNECTED;\n return;\n });\n }\n /**\n * Disconnect the transport\n */\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('disconnect');\n this._isConnected = octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n return;\n });\n }\n /**\n * Send a message through the transport\n *\n * @param message The message to send\n * @param recipient The recipient of the message\n */\n send(message, peer) {\n return __awaiter(this, void 0, void 0, function* () {\n if (peer) {\n return this.client.sendMessage(message, peer);\n }\n else {\n const knownPeers = yield this.getPeers();\n // A broadcast request has to be sent everywhere.\n const promises = knownPeers.map((peerEl) => this.client.sendMessage(message, peerEl));\n return (yield Promise.all(promises))[0];\n }\n });\n }\n /**\n * Add a listener to be called when a new message is received\n *\n * @param listener The listener that will be registered\n */\n addListener(listener) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.debug('addListener');\n this.listeners.push(listener);\n return;\n });\n }\n /**\n * Remove a listener\n *\n * @param listener\n */\n removeListener(listener) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removeListener');\n this.listeners = this.listeners.filter((element) => element !== listener);\n return;\n });\n }\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.peerManager.getPeers(); // TODO: Fix type\n });\n }\n addPeer(newPeer_1) {\n return __awaiter(this, arguments, void 0, function* (newPeer, _sendPairingResponse = true) {\n logger.log('addPeer', 'adding peer', newPeer);\n yield this.peerManager.addPeer(newPeer); // TODO: Fix type\n yield this.listen(newPeer.publicKey);\n });\n }\n removePeer(peerToBeRemoved) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removePeer', 'removing peer', peerToBeRemoved);\n yield this.peerManager.removePeer(peerToBeRemoved.publicKey);\n if (this.client) {\n yield this.client.unsubscribeFromEncryptedMessage(peerToBeRemoved.publicKey);\n }\n });\n }\n removeAllPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removeAllPeers');\n yield this.peerManager.removeAllPeers();\n if (this.client) {\n yield this.client.unsubscribeFromEncryptedMessages();\n }\n });\n }\n /**\n * Notify the listeners when a new message comes in\n *\n * @param message Message\n * @param connectionInfo Context info about the connection\n */\n notifyListeners(message, connectionInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.listeners.length === 0) {\n logger.warn('notifyListeners', '0 listeners notified!', this);\n }\n else {\n logger.log('notifyListeners', `Notifying ${this.listeners.length} listeners`, this);\n }\n this.listeners.forEach((listener) => {\n listener(message, connectionInfo);\n });\n return;\n });\n }\n}\nexports.Transport = Transport;\n//# sourceMappingURL=Transport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/Transport.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.CommunicationClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst x25519_session_1 = __webpack_require__(/*! @stablelib/x25519-session */ "./node_modules/@stablelib/x25519-session/lib/x25519-session.js");\n/**\n * @internalapi\n *\n *\n */\nclass CommunicationClient {\n constructor(keyPair) {\n this.keyPair = keyPair;\n this.eventHandlers = new Map();\n // todo move OS\n this.isMobileOS = () => /(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet|Windows Phone|SymbianOS|Kindle)/i.test(navigator.userAgent);\n }\n /**\n * Get the public key\n */\n getPublicKey() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (0, octez_connect_utils_1.toHex)((_a = this.keyPair) === null || _a === void 0 ? void 0 : _a.publicKey);\n });\n }\n /**\n * get the public key hash\n */\n getPublicKeyHash() {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, octez_connect_utils_1.getHexHash)(this.keyPair.publicKey);\n });\n }\n /**\n * Create a cryptobox server\n *\n * @param otherPublicKey\n * @param selfKeypair\n */\n createCryptoBoxServer(otherPublicKey, selfKeypair) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, x25519_session_1.serverSessionKeys)({\n publicKey: (0, octez_connect_utils_1.convertPublicKeyToX25519)(selfKeypair.publicKey),\n secretKey: (0, octez_connect_utils_1.convertSecretKeyToX25519)(selfKeypair.secretKey)\n }, (0, octez_connect_utils_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey, \'hex\')));\n });\n }\n /**\n * Create a cryptobox client\n *\n * @param otherPublicKey\n * @param selfKeypair\n */\n createCryptoBoxClient(otherPublicKey, selfKeypair) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, x25519_session_1.clientSessionKeys)({\n publicKey: (0, octez_connect_utils_1.convertPublicKeyToX25519)(selfKeypair.publicKey),\n secretKey: (0, octez_connect_utils_1.convertSecretKeyToX25519)(selfKeypair.secretKey)\n }, (0, octez_connect_utils_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey, \'hex\')));\n });\n }\n /**\n * Encrypt a message for a specific publicKey (receiver, asymmetric)\n *\n * @param recipientPublicKey\n * @param message\n */\n encryptMessageAsymmetric(recipientPublicKey, message) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, octez_connect_utils_1.sealCryptobox)(message, Buffer.from(recipientPublicKey, \'hex\'));\n });\n }\n}\nexports.CommunicationClient = CommunicationClient;\n//# sourceMappingURL=CommunicationClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MessageBasedClient = void 0;\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst message_protocol_1 = __webpack_require__(/*! ../../message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst CommunicationClient_1 = __webpack_require__(/*! ./CommunicationClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\n/**\n * @internalapi\n *\n *\n */\nclass MessageBasedClient extends CommunicationClient_1.CommunicationClient {\n constructor(name, keyPair) {\n super(keyPair);\n this.name = name;\n this.init().catch(console.error);\n }\n /**\n * start the client and make sure all dependencies are ready\n */\n start() {\n return __awaiter(this, void 0, void 0, function* () {\n yield Promise.resolve();\n });\n }\n /**\n * Get the pairing request information. This will be shared with the peer during the connection setup\n */\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n return new octez_connect_types_1.PostMessagePairingRequest(yield (0, octez_connect_utils_1.generateGUID)(), this.name, yield this.getPublicKey(), constants_1.BEACON_VERSION, (0, message_protocol_1.getPreferredMessageProtocolVersion)());\n });\n }\n /**\n * Get the pairing response information. This will be shared with the peer during the connection setup\n */\n getPairingResponseInfo(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return new octez_connect_types_1.PostMessagePairingResponse(request.id, this.name, yield this.getPublicKey(), request.version, (0, message_protocol_1.getPreferredMessageProtocolVersion)());\n });\n }\n /**\n * Unsubscribe from encrypted messages from a specific peer\n *\n * @param senderPublicKey\n */\n unsubscribeFromEncryptedMessage(senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const listener = this.activeListeners.get(senderPublicKey);\n if (!listener) {\n return;\n }\n this.activeListeners.delete(senderPublicKey);\n });\n }\n /**\n * Unsubscribe from all encrypted messages\n */\n unsubscribeFromEncryptedMessages() {\n return __awaiter(this, void 0, void 0, function* () {\n this.activeListeners.clear();\n });\n }\n /**\n * Decrypt a message from a specific peer\n *\n * @param senderPublicKey\n * @param payload\n */\n decryptMessage(senderPublicKey, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxServer(senderPublicKey, this.keyPair);\n const hexPayload = Buffer.from(payload, \'hex\');\n if (hexPayload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n return yield (0, octez_connect_utils_1.decryptCryptoboxPayload)(hexPayload, sharedKey.receive);\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n throw new Error(\'Could not decrypt message\');\n });\n }\n /**\n * Encrypt a message for a specific publicKey (receiver)\n *\n * @param recipientPublicKey\n * @param message\n */\n encryptMessage(recipientPublicKey, message) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxClient(recipientPublicKey, this.keyPair);\n return (0, octez_connect_utils_1.encryptCryptoboxPayload)(message, sharedKey.send);\n });\n }\n}\nexports.MessageBasedClient = MessageBasedClient;\n//# sourceMappingURL=MessageBasedClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getLogger = exports.setLogger = exports.Logger = exports.InternalLogger = void 0;\nconst debug_1 = __webpack_require__(/*! ../debug */ \"./packages/octez.connect-core/dist/cjs/src/debug.js\");\n/**\n * The logger that is used internally\n */\nclass InternalLogger {\n constructor() { }\n debug(name, method, ...args) {\n this._log('debug', name, method, args);\n }\n log(name, method, ...args) {\n this._log('log', name, method, args);\n }\n warn(name, method, ...args) {\n this._log('warn', name, method, args);\n }\n error(name, method, ...args) {\n this._log('error', name, method, args);\n }\n time(start, label) {\n start ? console.time(label) : console.timeEnd(label);\n }\n timeLog(name, method, ...args) {\n this._log('timeLog', name, method, args);\n }\n _log(type, name, method, args = []) {\n if (!(0, debug_1.getDebugEnabled)()) {\n return;\n }\n let groupText = `[BEACON] ${new Date().toISOString()} [${name}](${method})`;\n let data = args;\n if (args[0] && typeof args[0] === 'string') {\n groupText += ` ${args[0]}`;\n data = args.slice(1);\n }\n switch (type) {\n case 'error':\n console.group(groupText);\n console.error(...data);\n break;\n case 'warn':\n console.group(groupText);\n console.warn(...data);\n break;\n case 'debug':\n console.groupCollapsed(groupText);\n console.debug(...data);\n break;\n case 'timeLog':\n console.group(groupText);\n console.timeLog(...data);\n break;\n default:\n console.group(groupText);\n console.log(...data);\n }\n console.groupEnd();\n // echo.group(echo.asWarning(`[BEACON] ${message}`))\n // echo.log(echo.asWarning(`[${this.name}]`), echo.asAlert(`(${method})`), ...args)\n // echo.groupEnd()\n }\n}\nexports.InternalLogger = InternalLogger;\nclass Logger {\n constructor(service) {\n this.name = service;\n }\n debug(method, ...args) {\n logger.debug(this.name, method, args);\n }\n log(method, ...args) {\n logger.log(this.name, method, args);\n }\n warn(method, ...args) {\n logger.warn(this.name, method, args);\n }\n error(method, ...args) {\n logger.error(this.name, method, args);\n }\n time(start, label) {\n logger.time(start, label);\n }\n timeLog(method, ...args) {\n logger.timeLog(method, args);\n }\n}\nexports.Logger = Logger;\nconst loggerWrapper = new Logger('');\nlet logger = new InternalLogger();\nconst setLogger = (newLogger) => {\n logger = newLogger;\n};\nexports.setLogger = setLogger;\nconst getLogger = () => loggerWrapper;\nexports.getLogger = getLogger;\n//# sourceMappingURL=Logger.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/Logger.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js"(__unused_webpack_module,exports){"use strict";eval('{\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.assertNever = assertNever;\n/**\n * Exhaustiveness guard for if/else chains and switch/cases.\n *\n * Compile time: passing anything but `never` is a type error, so adding a new\n * union member without handling it fails to build. Runtime: an untrusted value\n * (e.g. an unknown message or error type from the wire) can still reach the\n * default branch, so throw an actionable error naming that value instead of\n * silently returning — callers previously received `undefined` and failed\n * later with no context.\n *\n * @param empty The value that should be unreachable\n */\nfunction assertNever(empty) {\n var _a;\n let repr;\n try {\n repr = (_a = JSON.stringify(empty)) !== null && _a !== void 0 ? _a : String(empty);\n }\n catch (_b) {\n repr = String(empty);\n }\n if (repr.length > 200) {\n repr = `${repr.slice(0, 200)}…`;\n }\n throw new Error(`assertNever: reached unreachable case with unexpected value: ${repr}`);\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=assert-never.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/caip2.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.networkTypeFromTezosCaip2 = exports.tezosCaip2FromNetworkType = exports.TEZOS_NETWORK_GENESIS_IDS = exports.networkFromTezosCaip2 = exports.isValidTezosCaip2 = exports.normalizeTezosCaip2 = void 0;\n/**\n * CAIP-2 chain id helpers, scoped to the Tezos namespace (`tezos:<reference>`).\n *\n * The wire format accepts both the bare reference (`NetXsqzbfFenSTS`) and the\n * full CAIP-2 string (`tezos:NetXsqzbfFenSTS`); SDK code consistently stores\n * and routes on the full form.\n */\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst TEZOS_CAIP2_PREFIX = 'tezos:';\nconst TEZOS_CAIP2_RE = /^tezos:[A-Za-z0-9]+$/;\n/**\n * Returns `chainId` with the `tezos:` prefix added if absent. No validation\n * is performed; use `isValidTezosCaip2` at API boundaries.\n */\nconst normalizeTezosCaip2 = (chainId) => chainId.startsWith(TEZOS_CAIP2_PREFIX) ? chainId : `${TEZOS_CAIP2_PREFIX}${chainId}`;\nexports.normalizeTezosCaip2 = normalizeTezosCaip2;\n/**\n * Whether `value` is a syntactically valid Tezos CAIP-2 chain id\n * (`tezos:<alphanumeric reference>`).\n */\nconst isValidTezosCaip2 = (value) => TEZOS_CAIP2_RE.test(value);\nexports.isValidTezosCaip2 = isValidTezosCaip2;\n/**\n * Build the minimal `Network` for a Tezos CAIP-2 chain id. Single source of\n * truth for the `{ type: CUSTOM, chainId, ... }` shape, so the network used\n * to derive an account identifier is constructed identically everywhere\n * (permission storage, operation-request lookup, stale-scheme scan). `name`\n * defaults to the chain id when the wallet supplies no human label.\n */\nconst networkFromTezosCaip2 = (chainId, opts) => {\n var _a;\n return ({\n type: octez_connect_types_1.NetworkType.CUSTOM,\n name: (_a = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _a !== void 0 ? _a : chainId,\n rpcUrl: opts === null || opts === void 0 ? void 0 : opts.rpcUrl,\n chainId\n });\n};\nexports.networkFromTezosCaip2 = networkFromTezosCaip2;\n/**\n * Canonical NetworkType → genesis chain id (CAIP-2 reference) table.\n *\n * Applied ONLY at boundaries that must translate between the named-network\n * vocabulary (WalletConnect session namespaces use `tezos:<name>`) and the\n * genesis-keyed CAIP-2 vocabulary of the beacon v4 multi-network protocol.\n *\n * Sourcing rule: ids are read from the network's own RPC\n * (`/chains/main/chain_id`) and locked by unit test — never guessed. Networks\n * without an entry are not statically mappable and multi-network requests for\n * them can only travel over transports that pass chain ids through opaquely\n * (P2P/postmessage):\n * - WEEKLYNET / DAILYNET rotate their genesis on every reset.\n * - CUSTOM has no fixed genesis by definition.\n * - TALLINNNET / SEOULNET / TEZLINK_SHADOWNET / TEZOSX_PREVIEWNET /\n * TEZOSX_SHADOWNET currently publish no queryable RPC in the teztnets\n * registry; add their ids here (RPC-sourced) when available.\n * If a long-running network relaunches with a new genesis, its entry must be\n * updated in the same change that bumps the supported network.\n */\nexports.TEZOS_NETWORK_GENESIS_IDS = {\n [octez_connect_types_1.NetworkType.MAINNET]: 'NetXdQprcVkpaWU',\n [octez_connect_types_1.NetworkType.GHOSTNET]: 'NetXnHfVqm9iesp',\n [octez_connect_types_1.NetworkType.SHADOWNET]: 'NetXsqzbfFenSTS',\n // Tezos X L2 (Michelson runtime) mainnet. Maintainer-supplied id — no\n // public RPC was reachable at the time of adding; re-verify against\n // `/chains/main/chain_id` once one ships.\n [octez_connect_types_1.NetworkType.TEZOSX_MAINNET]: 'NetXohUVN5QWR4f',\n [octez_connect_types_1.NetworkType.USHUAIANET]: 'NetXpX8WSZkAZZA'\n};\n/**\n * Full CAIP-2 chain id (`tezos:NetX…`) for a named network, or `undefined`\n * when the network has no statically known genesis (see\n * {@link TEZOS_NETWORK_GENESIS_IDS}).\n */\nconst tezosCaip2FromNetworkType = (type) => {\n const genesis = exports.TEZOS_NETWORK_GENESIS_IDS[type];\n return genesis === undefined ? undefined : `${TEZOS_CAIP2_PREFIX}${genesis}`;\n};\nexports.tezosCaip2FromNetworkType = tezosCaip2FromNetworkType;\n/**\n * Named network for a CAIP-2 chain id (bare or `tezos:`-prefixed), or\n * `undefined` when the id does not belong to a statically mapped network.\n */\nconst networkTypeFromTezosCaip2 = (chainId) => {\n const normalized = (0, exports.normalizeTezosCaip2)(chainId);\n const reference = normalized.slice(TEZOS_CAIP2_PREFIX.length);\n return Object.keys(exports.TEZOS_NETWORK_GENESIS_IDS).find((type) => exports.TEZOS_NETWORK_GENESIS_IDS[type] === reference);\n};\nexports.networkTypeFromTezosCaip2 = networkTypeFromTezosCaip2;\n//# sourceMappingURL=caip2.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/caip2.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SENSITIVE_STORAGE_KEYS = void 0;\nexports.gatherDiagnostics = gatherDiagnostics;\nexports.buildErrorContext = buildErrorContext;\nexports.serializeErrorContext = serializeErrorContext;\nexports.copyErrorContextToClipboard = copyErrorContextToClipboard;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst package_json_1 = __importDefault(__webpack_require__(/*! ../../package.json */ \"./packages/octez.connect-core/dist/cjs/package.json\"));\nconst BeaconError_1 = __webpack_require__(/*! ../errors/BeaconError */ \"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js\");\n/**\n * Storage keys that contain sensitive information and should be filtered out\n */\nexports.SENSITIVE_STORAGE_KEYS = [\n octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED,\n octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN,\n octez_connect_types_1.StorageKey.PUSH_TOKENS\n];\n/**\n * Gathers diagnostic information from storage for error reporting.\n * Automatically filters sensitive keys for privacy.\n *\n * @param storage - The storage instance to read from\n * @param transport - Optional transport type being used\n * @returns Promise resolving to diagnostic snapshot\n */\nfunction gatherDiagnostics(storage, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n try {\n // Get SDK version\n const sdkVersion = package_json_1.default.version;\n // Get active account\n const activeAccountValue = yield storage.get(octez_connect_types_1.StorageKey.ACTIVE_ACCOUNT);\n const activeAccount = typeof activeAccountValue === 'string'\n ? activeAccountValue\n : activeAccountValue && typeof activeAccountValue === 'object'\n ? (_a = activeAccountValue.accountIdentifier) !== null && _a !== void 0 ? _a : activeAccountValue.address\n : undefined;\n // Get last selected wallet\n const lastSelectedWalletValue = yield storage.get(octez_connect_types_1.StorageKey.LAST_SELECTED_WALLET);\n const lastSelectedWallet = lastSelectedWalletValue && typeof lastSelectedWalletValue === 'object'\n ? (_b = lastSelectedWalletValue.name) !== null && _b !== void 0 ? _b : lastSelectedWalletValue.key\n : typeof lastSelectedWalletValue === 'string'\n ? lastSelectedWalletValue\n : undefined;\n // Get accounts count\n const accounts = yield storage.get(octez_connect_types_1.StorageKey.ACCOUNTS);\n const accountCount = Array.isArray(accounts) ? accounts.length : 0;\n // Get peers count (try different storage keys based on transport)\n let peerCount = 0;\n try {\n const p2pPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP);\n const wcPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP);\n const pmPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP);\n peerCount =\n (Array.isArray(p2pPeers) ? p2pPeers.length : 0) +\n (Array.isArray(wcPeers) ? wcPeers.length : 0) +\n (Array.isArray(pmPeers) ? pmPeers.length : 0);\n }\n catch (_c) {\n // Ignore peer count errors\n }\n // Get WalletConnect session info if applicable\n let walletConnectSession;\n if (transport === octez_connect_types_1.TransportType.WALLETCONNECT) {\n try {\n const wcSession = yield storage.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION);\n if (wcSession && typeof wcSession === 'object') {\n const sessionData = wcSession;\n // Extract relevant session info safely\n walletConnectSession = {\n topic: typeof sessionData.topic === 'string' ? sessionData.topic : undefined,\n expiry: typeof sessionData.expiry === 'number' ? sessionData.expiry : undefined,\n accounts: Array.isArray(sessionData.accounts) && sessionData.accounts.every((a) => typeof a === 'string')\n ? sessionData.accounts\n : undefined,\n networks: undefined, // Would need to extract from namespaces\n permissions: undefined // Would need to extract from namespaces\n };\n }\n }\n catch (_d) {\n // Ignore WC session errors\n }\n }\n // Gather additional non-sensitive storage data\n const storageData = {};\n const keysToInclude = [\n octez_connect_types_1.StorageKey.BEACON_SDK_VERSION,\n octez_connect_types_1.StorageKey.WC_INIT_ERROR,\n octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE,\n octez_connect_types_1.StorageKey.PERMISSION_LIST\n ];\n for (const key of keysToInclude) {\n try {\n const value = yield storage.get(key);\n if (value !== undefined) {\n storageData[key] = value;\n }\n }\n catch (_e) {\n // Ignore individual key errors\n }\n }\n return {\n sdkVersion,\n transport,\n activeAccount,\n lastSelectedWallet,\n walletConnectSession,\n accountCount,\n peerCount,\n storage: Object.keys(storageData).length > 0 ? storageData : undefined\n };\n }\n catch (error) {\n // If diagnostic gathering fails, return minimal info\n return {\n sdkVersion: package_json_1.default.version,\n transport\n };\n }\n });\n}\n/**\n * Builds a complete error context from an error and storage state.\n *\n * @param error - The BeaconError or Error instance\n * @param storage - The storage instance to read diagnostic data from\n * @param transport - Optional transport type being used\n * @returns Promise resolving to complete error context\n */\nfunction buildErrorContext(error, storage, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n const diagnostics = yield gatherDiagnostics(storage, transport);\n // If it's a BeaconError, we have structured information\n if (error instanceof BeaconError_1.BeaconError) {\n const errorData = error.data;\n // Prefer transport-specific error code from errorData if available\n const errorDataObj = errorData && typeof errorData === 'object' ? errorData : undefined;\n const errorCode = (errorDataObj && typeof errorDataObj.errorCode === 'string')\n ? errorDataObj.errorCode\n : error.code;\n return {\n errorCode,\n errorType: error.type,\n message: error.title || error.message,\n technicalDetails: error.description,\n errorData,\n timestamp: Date.now(),\n diagnostics\n };\n }\n // For generic errors, create basic context\n return {\n errorCode: 'UNKNOWN_ERROR',\n errorType: octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR,\n message: error.message || 'An unknown error occurred',\n timestamp: Date.now(),\n diagnostics\n };\n });\n}\n/**\n * Serializes error context to formatted JSON string for copying.\n *\n * @param errorContext - The error context to serialize\n * @returns Formatted JSON string\n */\nfunction serializeErrorContext(errorContext) {\n return JSON.stringify(errorContext, null, 2);\n}\n/**\n * Copies error context to clipboard (browser only).\n *\n * @param errorContext - The error context to copy\n * @returns Promise resolving to true if successful, false otherwise\n */\nfunction copyErrorContextToClipboard(errorContext) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const jsonString = serializeErrorContext(errorContext);\n if (typeof navigator !== 'undefined' && ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText)) {\n yield navigator.clipboard.writeText(jsonString);\n return true;\n }\n return false;\n }\n catch (_b) {\n return false;\n }\n });\n}\n//# sourceMappingURL=diagnostics.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getAccountIdentifier = void 0;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ "./node_modules/@stablelib/utf8/lib/utf8.js");\n/**\n * @internalapi\n *\n * Generate a deterministic account identifier based on an address and a network\n *\n * @param address\n * @param network\n */\nconst getAccountIdentifier = (address, network) => __awaiter(void 0, void 0, void 0, function* () {\n // v4 multi-network accounts carry a CAIP-2 chainId. Key the identifier on\n // (address, chainId) alone: chainId is the canonical, stable network key,\n // whereas the human-facing `name`/`rpcUrl` differ between the wallet\'s\n // permission response and the dApp\'s later operation requests. Including\n // them would make the persisted identifier irreproducible at lookup time\n // (and collapse distinct chains that happen to share a name). Legacy\n // accounts (no chainId) keep the original scheme so their already-persisted\n // identifiers are unchanged.\n const data = [];\n if (network.chainId) {\n data.push(address, `chainId:${network.chainId}`);\n }\n else {\n data.push(address, network.type);\n if (network.name) {\n data.push(`name:${network.name}`);\n }\n if (network.rpcUrl) {\n data.push(`rpc:${network.rpcUrl}`);\n }\n }\n const buffer = Buffer.from((0, blake2b_1.hash)((0, utf8_1.encode)(data.join(\'-\')), 10));\n return bs58check_1.default.encode(buffer);\n});\nexports.getAccountIdentifier = getAccountIdentifier;\n//# sourceMappingURL=get-account-identifier.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getSenderId = void 0;\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst isHex = (str) => /^[A-F0-9]+$/i.test(str);\n/**\n * @internalapi\n *\n * Generate a deterministic sender identifier based on a public key\n *\n * @param publicKey\n */\nconst getSenderId = (publicKey) => __awaiter(void 0, void 0, void 0, function* () {\n if (!isHex(publicKey)) {\n console.error(\'PublicKey needs to be in hex format!\');\n }\n const buffer = Buffer.from((0, blake2b_1.hash)(Buffer.from(publicKey, \'hex\'), 5));\n return bs58check_1.default.encode(buffer);\n});\nexports.getSenderId = getSenderId;\n//# sourceMappingURL=get-sender-id.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.buildDisconnectMessage = exports.unwrapBeaconMessage = exports.wrapBeaconMessage = exports.negotiateEnvelopeVersion = exports.LEGACY_ENVELOPE_VERSION = exports.usesWrappedMessages = exports.isMultiNetworkVersion = exports.isAtLeastVersion = exports.compareBeaconVersion = exports.parseStrictDecimalInteger = exports.MULTI_NETWORK_FROM_VERSION = exports.MESSAGE_WRAPPED_FROM_VERSION = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst constants_1 = __webpack_require__(/*! ../constants */ \"./packages/octez.connect-core/dist/cjs/src/constants.js\");\nconst InvalidBeaconVersionError_1 = __webpack_require__(/*! ../errors/InvalidBeaconVersionError */ \"./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js\");\nexports.MESSAGE_WRAPPED_FROM_VERSION = 3;\n// peer.version at or above which the multi-network (v4) protocol applies.\nexports.MULTI_NETWORK_FROM_VERSION = '4';\n// Strict decimal-integer: a lone `0` or non-zero digit followed by digits.\n// Rejects leading zeros on multi-digit values (e.g. `'04'`). A lone `0` is\n// kept valid so legacy compat paths can use it as a fallback/unknown version.\nconst DECIMAL_INTEGER_RE = /^(0|[1-9]\\d*)$/;\nconst parseStrictDecimalInteger = (value) => {\n if (typeof value !== 'string') {\n return null;\n }\n if (!DECIMAL_INTEGER_RE.test(value)) {\n return null;\n }\n const parsed = Number(value);\n if (!Number.isFinite(parsed) || parsed > Number.MAX_SAFE_INTEGER) {\n return null;\n }\n return parsed;\n};\nexports.parseStrictDecimalInteger = parseStrictDecimalInteger;\n/**\n * Compare two `peer.version` strings as strict decimal integers.\n *\n * Returns < 0 if `a < b`, 0 if equal, > 0 if `a > b` — same convention as\n * `Array.prototype.sort` comparators.\n *\n * Throws `InvalidBeaconVersionError` if either operand is not a decimal-\n * integer string in `[0, Number.MAX_SAFE_INTEGER]`. Leading signs, leading\n * zeros, decimal points, exponent notation, hex, whitespace, `'NaN'` and\n * `'Infinity'` all reject.\n *\n * @category Utility\n */\nconst compareBeaconVersion = (a, b) => {\n const na = (0, exports.parseStrictDecimalInteger)(a);\n const nb = (0, exports.parseStrictDecimalInteger)(b);\n if (na === null || nb === null) {\n throw new InvalidBeaconVersionError_1.InvalidBeaconVersionError(a, b);\n }\n return na - nb;\n};\nexports.compareBeaconVersion = compareBeaconVersion;\n/**\n * Whether `version` is a valid peer.version at or above `threshold`.\n *\n * Single source of truth for the \"is this peer at least version X\" decision.\n * Returns `false` for an absent version and for any value that fails the\n * strict decimal-integer contract of `compareBeaconVersion` — i.e. malformed\n * or untrusted input is always treated as below the threshold, so a hostile\n * peer cannot trip a higher-version code path.\n *\n * @category Utility\n */\nconst isAtLeastVersion = (version, threshold) => {\n if (version === undefined) {\n return false;\n }\n try {\n return (0, exports.compareBeaconVersion)(version, threshold) >= 0;\n }\n catch (_a) {\n return false;\n }\n};\nexports.isAtLeastVersion = isAtLeastVersion;\n/**\n * Whether `version` is at or above the multi-network (v4) threshold.\n *\n * @category Utility\n */\nconst isMultiNetworkVersion = (version) => (0, exports.isAtLeastVersion)(version, exports.MULTI_NETWORK_FROM_VERSION);\nexports.isMultiNetworkVersion = isMultiNetworkVersion;\nconst usesWrappedMessages = (version) => {\n // Use the same strict decimal-integer contract as compareBeaconVersion so\n // wrapped-message routing agrees with the v4/multi-network routing: a loose\n // value like '3.0', ' 3 ' or '03' (which Number() would accept) is treated\n // as malformed and routed as non-wrapped rather than inconsistently.\n const parsed = (0, exports.parseStrictDecimalInteger)(version);\n return parsed !== null && parsed >= exports.MESSAGE_WRAPPED_FROM_VERSION;\n};\nexports.usesWrappedMessages = usesWrappedMessages;\n/** The flat legacy wire dialect served to peers below the wrapped baseline. */\nexports.LEGACY_ENVELOPE_VERSION = '2';\n/**\n * The envelope version to stamp on an outgoing message for a peer that\n * declared `peerVersion` at pairing: `min(peerVersion, BEACON_VERSION)` with\n * a floor at the flat legacy dialect ('2').\n *\n * This is the backward-compatibility pivot: a peer that declared '2' — or\n * never declared a version at all (legacy pairings, WalletConnect peers,\n * malformed values) — is served the flat v2 dialect it has always spoken; a\n * v3 peer receives '3' wrapped envelopes and never sees v4 payload fields;\n * a v4 peer gets the full wrapped v4 wire. Callers pick the message SHAPE\n * with `usesWrappedMessages(negotiated)` and gate v4 fields (`networks`/\n * `accounts`) on `isMultiNetworkVersion(negotiated)`.\n *\n * @category Utility\n */\nconst negotiateEnvelopeVersion = (peerVersion) => {\n if (!(0, exports.isAtLeastVersion)(peerVersion, String(exports.MESSAGE_WRAPPED_FROM_VERSION))) {\n return exports.LEGACY_ENVELOPE_VERSION;\n }\n return (0, exports.isAtLeastVersion)(peerVersion, constants_1.BEACON_VERSION) ? constants_1.BEACON_VERSION : peerVersion;\n};\nexports.negotiateEnvelopeVersion = negotiateEnvelopeVersion;\n/**\n * Build a wrapped beacon envelope. Single source of truth for the\n * `{ id, version, senderId, message }` wire shape so senders cannot drift.\n *\n * @category Utility\n */\nconst wrapBeaconMessage = (envelope, message) => ({\n id: envelope.id,\n version: envelope.version,\n senderId: envelope.senderId,\n message\n});\nexports.wrapBeaconMessage = wrapBeaconMessage;\n/**\n * Extract the inner payload of a wrapped beacon envelope, or `undefined`\n * when the candidate's version does not follow the wrapped (v3+) contract.\n * Callers must treat `undefined` as \"not a wrapped message\" and drop or\n * tombstone it — never fall back to reading flat fields.\n *\n * @category Utility\n */\nconst unwrapBeaconMessage = (candidate) => ((0, exports.usesWrappedMessages)(candidate.version) ? candidate.message : undefined);\nexports.unwrapBeaconMessage = unwrapBeaconMessage;\n/**\n * Build a disconnect message in the peer's negotiated dialect: a wrapped\n * envelope for v3+ peers, the flat legacy shape for v2 peers. A legacy peer\n * routes on the top-level `type` and would silently ignore a wrapped\n * envelope — the goodbye must be spoken in the dialect the peer parses.\n *\n * @category Utility\n */\nconst buildDisconnectMessage = (envelope, peerVersion) => {\n const version = (0, exports.negotiateEnvelopeVersion)(peerVersion);\n return (0, exports.usesWrappedMessages)(version)\n ? (0, exports.wrapBeaconMessage)({ id: envelope.id, version, senderId: envelope.senderId }, { type: octez_connect_types_1.BeaconMessageType.Disconnect })\n : {\n id: envelope.id,\n version,\n senderId: envelope.senderId,\n type: octez_connect_types_1.BeaconMessageType.Disconnect\n };\n};\nexports.buildDisconnectMessage = buildDisconnectMessage;\n//# sourceMappingURL=message-utils.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MultiTabChannel = void 0;\nconst broadcast_channel_1 = __webpack_require__(/*! broadcast-channel */ \"./node_modules/broadcast-channel/dist/lib/index.es5.js\");\nclass MultiTabChannel {\n constructor(name, onBCMessageHandler, onElectedLeaderHandler) {\n this.eventListeners = [\n () => this.onBeforeUnloadHandler(),\n (message) => this.onMessageHandler(message)\n ];\n // Auxiliary variable needed for handling beforeUnload.\n // Closing a tab causes the elector to be killed immediately\n this.wasLeader = false;\n this.initialized = false;\n this.onBCMessageHandler = onBCMessageHandler;\n this.onElectedLeaderHandler = onElectedLeaderHandler;\n this.channel = new broadcast_channel_1.BroadcastChannel(name);\n this.elector = (0, broadcast_channel_1.createLeaderElection)(this.channel);\n }\n init() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.initialized) {\n return;\n }\n const hasLeader = yield this.elector.hasLeader();\n if (!hasLeader) {\n yield this.elector.awaitLeadership();\n this.wasLeader = this.isLeader();\n }\n this.channel.onmessage = this.eventListeners[1];\n window === null || window === void 0 ? void 0 : window.addEventListener('beforeunload', this.eventListeners[0]);\n this.initialized = true;\n });\n }\n onBeforeUnloadHandler() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.wasLeader) {\n yield this.elector.die();\n this.postMessage({ type: 'LEADER_DEAD' });\n }\n window === null || window === void 0 ? void 0 : window.removeEventListener('beforeunload', this.eventListeners[0]);\n this.channel.removeEventListener('message', this.eventListeners[1]);\n });\n }\n onMessageHandler(message) {\n return __awaiter(this, void 0, void 0, function* () {\n if (message.type === 'LEADER_DEAD') {\n yield this.elector.awaitLeadership();\n this.wasLeader = this.isLeader();\n if (this.isLeader()) {\n this.onElectedLeaderHandler();\n }\n return;\n }\n this.onBCMessageHandler(message);\n });\n }\n isLeader() {\n return this.elector.isLeader;\n }\n getLeadership() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.elector.awaitLeadership();\n });\n }\n hasLeader() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.elector.hasLeader();\n });\n }\n postMessage(message) {\n this.channel.postMessage(message);\n }\n}\nexports.MultiTabChannel = MultiTabChannel;\n//# sourceMappingURL=multi-tab-channel.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.resolveRequiredMinimumVersion = exports.DEFAULT_REQUIRED_MINIMUM_VERSION = void 0;\nconst constants_1 = __webpack_require__(/*! ../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst InvalidRequiredMinimumVersionError_1 = __webpack_require__(/*! ../errors/InvalidRequiredMinimumVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js");\nconst message_utils_1 = __webpack_require__(/*! ./message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\n/**\n * Default minimum wallet version the dApp accepts when the option is omitted.\n *\n * Deliberately the lowest protocol version still supported, so the gate is\n * effectively opt-in: by default every wallet the SDK can talk to (v2/v3/v4)\n * is accepted, preserving backward compatibility. A dApp that needs the v4\n * multi-network protocol sets `requiredMinimumVersion: \'4\'` explicitly.\n */\nexports.DEFAULT_REQUIRED_MINIMUM_VERSION = \'2\';\n/**\n * Resolve a dApp\'s `requiredMinimumVersion` option against the SDK\'s\n * `BEACON_VERSION`. Returns {@link DEFAULT_REQUIRED_MINIMUM_VERSION} when\n * undefined; otherwise validates the supplied value is a decimal-integer\n * string in `[1, BEACON_VERSION]` and returns it unchanged.\n *\n * Throws `InvalidRequiredMinimumVersionError` for any malformed,\n * out-of-range, or future-version input.\n */\nconst resolveRequiredMinimumVersion = (providedValue) => {\n if (providedValue === undefined) {\n return exports.DEFAULT_REQUIRED_MINIMUM_VERSION;\n }\n // Validate against the SAME strict contract compareBeaconVersion enforces,\n // up front, so every rejection here is an InvalidRequiredMinimumVersionError\n // rather than a leaked InvalidBeaconVersionError from the comparison below.\n // Reuse parseStrictDecimalInteger (the single owner of that contract) instead\n // of re-declaring the regex + MAX_SAFE_INTEGER bound here.\n const parsed = (0, message_utils_1.parseStrictDecimalInteger)(providedValue);\n if (parsed === null) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, \'value must be a decimal-integer string (e.g. "3", "4")\');\n }\n if (parsed < 1) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, \'value must be >= 1\');\n }\n if ((0, message_utils_1.compareBeaconVersion)(providedValue, constants_1.BEACON_VERSION) > 0) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, `value cannot exceed the SDK\'s own BEACON_VERSION (${constants_1.BEACON_VERSION})`);\n }\n return providedValue;\n};\nexports.resolveRequiredMinimumVersion = resolveRequiredMinimumVersion;\n//# sourceMappingURL=required-minimum-version.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.P2PTransport = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ "./packages/octez.connect-core/dist/cjs/src/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst P2PCommunicationClient_1 = __webpack_require__(/*! ./communication-client/P2PCommunicationClient */ "./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js");\nconst logger = new octez_connect_core_1.Logger(\'P2PTransport\');\n/**\n * @internalapi\n *\n *\n */\nclass P2PTransport extends octez_connect_core_1.Transport {\n constructor(name, keyPair, storage, matrixNodes, storageKey, iconUrl, appUrl) {\n super(name, new P2PCommunicationClient_1.P2PCommunicationClient(name, keyPair, 1, storage, matrixNodes, iconUrl, appUrl), new octez_connect_core_1.PeerManager(storage, storageKey));\n this.type = octez_connect_types_1.TransportType.P2P;\n }\n static isAvailable() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(true);\n });\n }\n connect() {\n const _super = Object.create(null, {\n connect: { get: () => super.connect }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this._isConnected !== octez_connect_types_1.TransportStatus.NOT_CONNECTED) {\n return;\n }\n logger.log(\'connect\');\n this._isConnected = octez_connect_types_1.TransportStatus.CONNECTING;\n yield this.client.start();\n const knownPeers = yield this.getPeers();\n if (knownPeers.length > 0) {\n logger.log(\'connect\', `connecting to ${knownPeers.length} peers`);\n const connectionPromises = knownPeers.map((peer) => __awaiter(this, void 0, void 0, function* () { return this.listen(peer.publicKey); }));\n Promise.all(connectionPromises).catch((error) => logger.error(\'connect\', error));\n }\n yield this.startOpenChannelListener();\n return _super.connect.call(this);\n });\n }\n disconnect() {\n const _super = Object.create(null, {\n disconnect: { get: () => super.disconnect }\n });\n return __awaiter(this, void 0, void 0, function* () {\n yield this.client.stop();\n return _super.disconnect.call(this);\n });\n }\n startOpenChannelListener() {\n return __awaiter(this, void 0, void 0, function* () {\n //\n });\n }\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.client.getPairingRequestInfo();\n });\n }\n listen(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.client\n .listenForEncryptedMessage(publicKey, (message) => {\n const connectionContext = {\n origin: octez_connect_types_1.Origin.P2P,\n id: publicKey\n };\n this.notifyListeners(message, connectionContext).catch((error) => {\n throw error;\n });\n })\n .catch((error) => {\n throw error;\n });\n });\n }\n}\nexports.P2PTransport = P2PTransport;\n//# sourceMappingURL=P2PTransport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.P2PCommunicationClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst MatrixClient_1 = __webpack_require__(/*! ../matrix-client/MatrixClient */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js\");\nconst MatrixClientEvent_1 = __webpack_require__(/*! ../matrix-client/models/MatrixClientEvent */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js\");\nconst MatrixMessage_1 = __webpack_require__(/*! ../matrix-client/models/MatrixMessage */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ \"./node_modules/@stablelib/utf8/lib/utf8.js\");\nconst logger = new octez_connect_core_1.Logger('P2PCommunicationClient');\nconst RESPONSE_WAIT_TIME_MS = 60000; // total wait time for all the probes\nconst REGIONS_AND_SERVERS = {\n [octez_connect_types_1.Regions.EUROPE_WEST]: [\n 'beacon-node-1.octez.io',\n 'beacon-node-2.octez.io',\n 'beacon-node-3.octez.io',\n 'beacon-node-4.octez.io',\n 'beacon-node-5.octez.io',\n 'beacon-node-6.octez.io',\n 'beacon-node-7.octez.io',\n 'beacon-node-8.octez.io'\n ],\n [octez_connect_types_1.Regions.NORTH_AMERICA_EAST]: [],\n [octez_connect_types_1.Regions.NORTH_AMERICA_WEST]: [],\n [octez_connect_types_1.Regions.ASIA_EAST]: [],\n [octez_connect_types_1.Regions.AUSTRALIA]: []\n};\nconst sleep = (time) => {\n return new Promise((resolve) => setTimeout(resolve, time));\n};\n/**\n * @internalapi\n */\nclass P2PCommunicationClient extends octez_connect_core_1.CommunicationClient {\n constructor(name, keyPair, replicationCount, storage, matrixNodes, iconUrl, appUrl) {\n super(keyPair);\n this.name = name;\n this.replicationCount = replicationCount;\n this.storage = storage;\n this.iconUrl = iconUrl;\n this.appUrl = appUrl;\n this.client = new octez_connect_utils_1.ExposedPromise();\n this.activeListeners = new Map();\n this.ignoredRooms = [];\n this.loginCounter = 0;\n logger.log('constructor', 'P2PCommunicationClient created');\n this.ENABLED_RELAY_SERVERS = REGIONS_AND_SERVERS;\n if (matrixNodes) {\n this.ENABLED_RELAY_SERVERS = Object.assign(Object.assign({}, REGIONS_AND_SERVERS), matrixNodes);\n }\n }\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n const info = new octez_connect_types_1.P2PPairingRequest(yield (0, octez_connect_utils_1.generateGUID)(), this.name, yield this.getPublicKey(), octez_connect_core_1.BEACON_VERSION, (yield this.getRelayServer()).server, (0, octez_connect_core_1.getPreferredMessageProtocolVersion)());\n if (this.iconUrl) {\n info.icon = this.iconUrl;\n }\n if (this.appUrl) {\n info.appUrl = this.appUrl;\n }\n return info;\n });\n }\n getPairingResponseInfo(request) {\n return __awaiter(this, void 0, void 0, function* () {\n const info = new octez_connect_types_1.P2PPairingResponse(request.id, this.name, yield this.getPublicKey(), request.version, (yield this.getRelayServer()).server, (0, octez_connect_core_1.getPreferredMessageProtocolVersion)());\n if (this.iconUrl) {\n info.icon = this.iconUrl;\n }\n if (this.appUrl) {\n info.appUrl = this.appUrl;\n }\n return info;\n });\n }\n /**\n * To get the fastest region, we can't simply do one request, because sometimes,\n * DNS and SSL handshakes make \"faster\" connections slower. So we need to do 2 requests\n * and check which request was the fastest after 1s.\n */\n findBestRegionAndGetServer() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (this.selectedRegion) {\n return (_a = this.relayServer) === null || _a === void 0 ? void 0 : _a.promiseResult;\n }\n const probes = Object.entries(this.ENABLED_RELAY_SERVERS)\n .flatMap(([region, servers]) => servers.map((server) => ({ server, region: region })))\n .sort(() => Math.random() - 0.5);\n const results = [];\n const probePromises = probes.map(({ server, region }) => (() => __awaiter(this, void 0, void 0, function* () {\n const start = Date.now();\n try {\n const info = yield this.getBeaconInfo(server);\n results.push({\n server,\n region,\n time: Date.now() - start,\n timestamp: info.timestamp\n });\n }\n catch (err) {\n logger.warn(`probe for ${server} failed:`, err);\n // swallow the error so Promise.all never rejects\n }\n }))());\n // 3) Wait until either:\n // • all probes settle (fast regions), or\n // • we hit our global timeout\n yield Promise.race([Promise.all(probePromises), sleep(RESPONSE_WAIT_TIME_MS)]);\n // 4) If nobody replied, bail out\n if (results.length === 0) {\n throw new Error('No server responded.');\n }\n // 5) Pick the lowest-latency reply\n const best = results.reduce((a, b) => (b.time < a.time ? b : a));\n this.selectedRegion = best.region;\n return { server: best.server, timestamp: best.timestamp };\n });\n }\n getRelayServer() {\n return __awaiter(this, void 0, void 0, function* () {\n // Fast path: in-memory cached relay server that's still fresh\n if (this.relayServer) {\n const currentPromise = this.relayServer;\n const relayServer = yield this.relayServer.promise;\n if (Date.now() - relayServer.localTimestamp < 60 * 1000) {\n return { server: relayServer.server, timestamp: relayServer.timestamp };\n }\n try {\n const info = yield this.getBeaconInfo(relayServer.server);\n const refreshedPromise = octez_connect_utils_1.ExposedPromise.resolve({\n server: relayServer.server,\n timestamp: info.timestamp,\n localTimestamp: new Date().getTime()\n });\n if (this.relayServer === currentPromise) {\n this.relayServer = refreshedPromise;\n }\n return { server: relayServer.server, timestamp: info.timestamp };\n }\n catch (error) {\n logger.log('getRelayServer', `cached server ${relayServer.server} is unreachable, resetting`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((e) => logger.log(e));\n // Only reset if this promise instance is still current (not replaced by another caller)\n const replacementRelayPromise = this.relayServer;\n if (replacementRelayPromise === currentPromise) {\n this.relayServer = undefined;\n this.selectedRegion = undefined;\n }\n else if (replacementRelayPromise) {\n // Another caller replaced the promise while we were waiting.\n // Reuse that result instead of racing into a second discovery.\n const latestRelayServer = yield replacementRelayPromise.promise;\n return { server: latestRelayServer.server, timestamp: latestRelayServer.timestamp };\n }\n // Fall through to discovery below\n }\n }\n // Another caller may have created a new in-flight promise while we were handling stale cache.\n // Reuse it instead of replacing it with a new promise.\n if (this.relayServer) {\n const relayServer = yield this.relayServer.promise;\n return { server: relayServer.server, timestamp: relayServer.timestamp };\n }\n // First caller creates the promise; concurrent callers will await it above\n const discoveryPromise = new octez_connect_utils_1.ExposedPromise();\n this.relayServer = discoveryPromise;\n try {\n // Try the localStorage-cached node first\n const node = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE);\n if (node && node.length > 0) {\n try {\n const info = yield this.getBeaconInfo(node);\n discoveryPromise.resolve({\n server: node,\n timestamp: info.timestamp,\n localTimestamp: new Date().getTime()\n });\n return { server: node, timestamp: info.timestamp };\n }\n catch (error) {\n // #12: a transient offline state shouldn't cost the user their pairing.\n // Only drop the stored node when the device is actually online; if it\n // reports offline, retain the node and skip rediscovery this cycle so\n // the same node can be retried once connectivity returns. `navigator`\n // being undefined (Node/SSR) is treated as online — existing behavior.\n if (typeof navigator !== 'undefined' && navigator.onLine === false) {\n logger.log('getRelayServer', `stored node ${node} is unreachable but device is offline; retaining node and skipping discovery`);\n throw error;\n }\n logger.log('getRelayServer', `stored node ${node} is unreachable, falling through to discovery`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((e) => logger.log(e));\n }\n }\n // Full discovery: probe all servers, pick the fastest\n const server = yield this.findBestRegionAndGetServer();\n if (!server) {\n throw new Error('No servers found');\n }\n this.storage\n .set(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE, server.server)\n .catch((error) => logger.log(error));\n discoveryPromise.resolve({\n server: server.server,\n timestamp: server.timestamp,\n localTimestamp: new Date().getTime()\n });\n return { server: server.server, timestamp: server.timestamp };\n }\n catch (error) {\n // Always settle the ExposedPromise so concurrent callers don't hang forever\n discoveryPromise.reject(error);\n if (this.relayServer === discoveryPromise) {\n this.relayServer = undefined;\n }\n throw error;\n }\n });\n }\n getBeaconInfo(server) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield fetch(`https://${server}/_synapse/client/beacon/info`, {\n signal: AbortSignal.timeout(10000)\n });\n if (!response.ok) {\n throw new Error(`getBeaconInfo ${server} failed: ${response.status} ${response.statusText}`);\n }\n const data = (yield response.json());\n return {\n region: data.region,\n known_servers: data.known_servers,\n timestamp: Math.floor(data.timestamp)\n };\n });\n }\n tryJoinRooms(roomId_1) {\n return __awaiter(this, arguments, void 0, function* (roomId, retry = 1) {\n try {\n yield (yield this.client.promise).joinRooms(roomId);\n }\n catch (error) {\n if (retry <= 10 && error.errcode === 'M_FORBIDDEN') {\n // If we join the room too fast after receiving the invite, the server can accidentally reject our join. This seems to be a problem only when using a federated multi-node setup. Usually waiting for a couple milliseconds solves the issue, but to handle lag, we will keep retrying for 2 seconds.\n logger.log(`Retrying to join...`, error);\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\n yield this.tryJoinRooms(roomId, retry + 1);\n }), 200);\n }\n else {\n logger.log(`Failed to join after ${retry} tries.`, error);\n }\n }\n });\n }\n start() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n logger.log('start', 'starting client');\n logger.log('start', `connecting to server`);\n const relayServer = yield this.getRelayServer();\n const client = MatrixClient_1.MatrixClient.create({\n baseUrl: `https://${relayServer.server}`,\n storage: this.storage\n });\n this.initialListener = (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.initialEvent && this.initialEvent.timestamp && event && event.timestamp) {\n if (this.initialEvent.timestamp < event.timestamp) {\n this.initialEvent = event;\n }\n }\n else {\n this.initialEvent = event;\n }\n });\n client.subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, this.initialListener);\n client.subscribe(MatrixClientEvent_1.MatrixClientEventType.INVITE, (event) => __awaiter(this, void 0, void 0, function* () {\n let member;\n if (event.content.members.length === 1) {\n // If there is only one member we know it's a new room\n // TODO: Use the \"sender\" of the event instead\n member = event.content.members[0];\n }\n yield this.tryJoinRooms(event.content.roomId);\n if (member) {\n yield this.updateRelayServer(member);\n yield this.updatePeerRoom(member, event.content.roomId);\n }\n }));\n if (!relayServer.timestamp) {\n throw new Error('No timestamp received from relay server');\n }\n const time = Math.floor(relayServer.timestamp);\n const loginString = `login:${Math.floor(time / (5 * 60))}`;\n logger.log('start', `login ${loginString}, ${yield this.getPublicKeyHash()} on ${relayServer.server}`);\n const loginRawDigest = (0, blake2b_1.hash)((0, utf8_1.encode)(loginString), 32);\n const secretKey = (_a = this.keyPair.secretKey) !== null && _a !== void 0 ? _a : this.keyPair.privateKey;\n const rawSignature = (0, octez_connect_utils_1.sign)(secretKey, loginRawDigest);\n try {\n yield client.start({\n id: yield this.getPublicKeyHash(),\n password: `ed:${(0, octez_connect_utils_1.toHex)(rawSignature)}:${yield this.getPublicKey()}`,\n deviceId: (0, octez_connect_utils_1.toHex)(this.keyPair.publicKey)\n });\n }\n catch (error) {\n logger.error('start', 'Could not log in, retrying', error);\n if (error.errcode === 'M_USER_DEACTIVATED') {\n yield this.generateNewKeyPair();\n yield this.reset();\n throw new Error('The account is deactivated.');\n }\n yield this.reset(); // If we can't log in, let's reset\n if (!this.selectedRegion) {\n throw new Error('No region selected.');\n }\n if (this.loginCounter <= ((_b = this.ENABLED_RELAY_SERVERS[this.selectedRegion]) !== null && _b !== void 0 ? _b : []).length) {\n this.loginCounter++;\n this.start();\n return;\n }\n else {\n logger.error('start', 'Tried to log in to every known beacon node, but no login was successful.');\n throw new Error('Could not connect to any beacon nodes. Try again later.');\n }\n }\n logger.log('start', 'login successful, client is ready');\n this.client.resolve(client);\n // Check for any pending invites that we may have missed during the initial sync\n logger.log('start', 'checking for pending invites');\n const invites = yield client.invitedRooms;\n logger.log('start', `found ${invites.length} pending invites`);\n const myUserId = `@${yield this.getPublicKeyHash()}:${relayServer.server}`;\n for (const invite of invites) {\n logger.log('start', `joining invited room: ${invite.id}`);\n yield this.tryJoinRooms(invite.id);\n // Update the peer room mapping for this invite\n if (invite.members.length > 0) {\n const member = invite.members.find((m) => m !== myUserId);\n if (member) {\n yield this.updateRelayServer(member);\n yield this.updatePeerRoom(member, invite.id);\n }\n }\n }\n });\n }\n stop() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('stop', 'stopping client');\n if (this.client.isResolved()) {\n yield (yield this.client.promise).stop().catch((error) => logger.error(error));\n }\n yield this.reset();\n });\n }\n reset() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('reset', 'resetting connection');\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS).catch((error) => logger.log(error));\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE).catch((error) => logger.log(error));\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((error) => logger.log(error));\n // Instead of resetting everything, maybe we should make sure a new instance is created?\n this.relayServer = undefined;\n this.client = new octez_connect_utils_1.ExposedPromise();\n this.initialEvent = undefined;\n this.initialListener = undefined;\n });\n }\n listenForEncryptedMessage(senderPublicKey, messageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.activeListeners.has(senderPublicKey)) {\n return;\n }\n logger.log('listenForEncryptedMessage', `start listening for encrypted messages from publicKey ${senderPublicKey}`);\n const sharedKey = yield this.createCryptoBoxServer(senderPublicKey, this.keyPair);\n const callbackFunction = (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.isTextMessage(event.content) && (yield this.isSender(event, senderPublicKey))) {\n let payload;\n yield this.updateRelayServer(event.content.message.sender);\n yield this.updatePeerRoom(event.content.message.sender, event.content.roomId);\n try {\n payload = Buffer.from(event.content.message.content, 'hex');\n // content can be non-hex if it's a connection open request\n }\n catch (_a) {\n /* */\n }\n if (payload && payload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n const decryptedMessage = yield (0, octez_connect_utils_1.decryptCryptoboxPayload)(payload, sharedKey.receive);\n logger.log('listenForEncryptedMessage', `received a message from ${senderPublicKey}`, decryptedMessage);\n // logger.log(\n // 'listenForEncryptedMessage',\n // 'encrypted message received',\n // decryptedMessage,\n // await new Serializer().deserialize(decryptedMessage)\n // )\n // console.log('calculated sender ID', await getSenderId(senderPublicKey))\n // TODO: Add check for correct decryption key / sender ID\n messageCallback(decryptedMessage);\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n }\n });\n this.activeListeners.set(senderPublicKey, callbackFunction);\n (yield this.client.promise).subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, callbackFunction);\n const lastEvent = this.initialEvent;\n if (lastEvent &&\n lastEvent.timestamp &&\n new Date().getTime() - lastEvent.timestamp < 5 * 60 * 1000) {\n logger.log('listenForEncryptedMessage', 'Handling previous event');\n yield callbackFunction(lastEvent);\n }\n else {\n logger.log('listenForEncryptedMessage', 'No previous event found');\n }\n const initialListener = this.initialListener;\n if (initialListener) {\n ;\n (yield this.client.promise).unsubscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, initialListener);\n }\n this.initialListener = undefined;\n this.initialEvent = undefined;\n });\n }\n unsubscribeFromEncryptedMessage(senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const listener = this.activeListeners.get(senderPublicKey);\n if (!listener) {\n return;\n }\n ;\n (yield this.client.promise).unsubscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, listener);\n this.activeListeners.delete(senderPublicKey);\n });\n }\n unsubscribeFromEncryptedMessages() {\n return __awaiter(this, void 0, void 0, function* () {\n ;\n (yield this.client.promise).unsubscribeAll(MatrixClientEvent_1.MatrixClientEventType.MESSAGE);\n this.activeListeners.clear();\n });\n }\n sendMessage(message, peer) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxClient(peer.publicKey, this.keyPair);\n const recipientHash = yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(peer.publicKey, 'hex'));\n const recipient = (0, octez_connect_utils_1.recipientString)(recipientHash, peer.relayServer);\n const roomId = yield this.getRelevantRoom(recipient);\n // Before we send the message, we have to wait for the join to be accepted.\n // await this.waitForJoin(roomId) // TODO: This can probably be removed because we are now waiting inside the get room method\n const encryptedMessage = yield (0, octez_connect_utils_1.encryptCryptoboxPayload)(message, sharedKey.send);\n logger.log('sendMessage', 'sending encrypted message', peer.publicKey, roomId, message);\n try {\n yield (yield this.client.promise).sendTextMessage(roomId, encryptedMessage);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED') {\n logger.log('sendMessage', 'request cancelled while stopping transport');\n return;\n }\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN') {\n logger.log(`sendMessage`, `M_FORBIDDEN`, roomId, error);\n yield this.deleteRoomIdFromRooms(roomId);\n const newRoomId = yield this.getRelevantRoom(recipient);\n logger.log(`sendMessage`, `Old room deleted, new room created`, newRoomId);\n try {\n yield (yield this.client.promise).sendTextMessage(newRoomId, encryptedMessage);\n }\n catch (innerError) {\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.code) === 'ERR_CANCELED') {\n logger.log('sendMessage', 'inner request cancelled while stopping transport');\n return;\n }\n logger.log(`sendMessage`, `inner error`, newRoomId, innerError);\n }\n }\n else {\n logger.log(`sendMessage`, `unexpected error`, error);\n }\n }\n });\n }\n updatePeerRoom(sender, roomId) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`updatePeerRoom`, sender, roomId);\n // Sender is in the format \"@pubkeyhash:relayserver.tld\"\n const split = sender.split(':');\n if (split.length < 2 || !split[0].startsWith('@')) {\n throw new Error('Invalid sender');\n }\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const room = roomIds[sender];\n if (room === roomId) {\n logger.debug(`updatePeerRoom`, `rooms are the same, not updating`);\n }\n logger.debug(`updatePeerRoom`, `current room`, room, 'new room', roomId);\n if (room && room[1]) {\n // If we have a room already, let's ignore it. We need to do this, otherwise it will be loaded from the matrix cache.\n logger.log(`updatePeerRoom`, `adding room \"${room[1]}\" to ignored array`);\n this.ignoredRooms.push(room[1]);\n }\n roomIds[sender] = roomId;\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, roomIds);\n // TODO: We also need to delete the room from the sync state\n // If we need to delete a room, we can assume the local state is not up to date anymore, so we can reset the state\n });\n }\n deleteRoomIdFromRooms(roomId) {\n return __awaiter(this, void 0, void 0, function* () {\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const newRoomIds = Object.entries(roomIds)\n .filter((entry) => entry[1] !== roomId)\n .reduce((pv, cv) => (Object.assign(Object.assign({}, pv), { [cv[0]]: cv[1] })), {});\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, newRoomIds);\n // TODO: We also need to delete the room from the sync state\n // If we need to delete a room, we can assume the local state is not up to date anymore, so we can reset the state\n this.ignoredRooms.push(roomId);\n });\n }\n listenForChannelOpening(messageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.debug(`listenForChannelOpening`);\n (yield this.client.promise).subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.isTextMessage(event.content) && (yield this.isChannelOpenMessage(event.content))) {\n logger.log(`listenForChannelOpening`, `channel opening received, trying to decrypt`, JSON.stringify(event));\n yield this.updateRelayServer(event.content.message.sender);\n yield this.updatePeerRoom(event.content.message.sender, event.content.roomId);\n const splits = event.content.message.content.split(':');\n const payload = Buffer.from(splits[splits.length - 1], 'hex');\n if (payload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n const rawResponse = JSON.parse(yield (0, octez_connect_utils_1.openCryptobox)(payload, this.keyPair.publicKey, this.keyPair.secretKey));\n const normalizedProtocol = Number(rawResponse.protocolVersion);\n const pairingResponse = Object.assign(Object.assign({}, rawResponse), { protocolVersion: Number.isFinite(normalizedProtocol) ? normalizedProtocol : undefined });\n logger.log(`listenForChannelOpening`, `channel opening received and decrypted`, JSON.stringify(pairingResponse));\n messageCallback(Object.assign(Object.assign({}, pairingResponse), { senderId: yield (0, octez_connect_core_1.getSenderId)(pairingResponse.publicKey) }));\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n }\n }));\n });\n }\n waitForJoin(roomId_1) {\n return __awaiter(this, arguments, void 0, function* (roomId, retry = 0) {\n // Rooms are updated as new events come in. `client.getRoomById` only accesses memory, it does not do any network requests.\n // TODO: Improve to listen to \"JOIN\" event\n const room = yield (yield this.client.promise).getRoomById(roomId);\n logger.log(`waitForJoin`, `Currently ${room.members.length} members, we need at least 2`);\n if (room.members.length >= 2) {\n return;\n }\n else {\n if (retry < 10) {\n logger.log(`Waiting for join... Try: ${retry}`);\n return new Promise((resolve) => {\n // Exponential backoff: 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s, 512s\n const backoffMs = 1000 * Math.pow(2, retry);\n setTimeout(() => {\n resolve(this.waitForJoin(roomId, retry + 1));\n }, backoffMs);\n });\n }\n else {\n throw new Error(`No one joined after ${retry} tries. Room may be orphaned.`);\n }\n }\n });\n }\n sendPairingResponse(pairingRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n logger.log(`sendPairingResponse`);\n const recipientHash = yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(pairingRequest.publicKey, 'hex'));\n const recipient = (0, octez_connect_utils_1.recipientString)(recipientHash, pairingRequest.relayServer);\n // We force room creation here because if we \"re-pair\", we need to make sure that we don't send it to an old room.\n let roomId;\n let roomWasReused = false;\n try {\n roomId = yield (yield this.client.promise).createTrustedPrivateRoom(recipient);\n logger.debug(`sendPairingResponse`, `Connecting to room \"${roomId}\"`);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN' && ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.includes('already in the room'))) {\n logger.log(`sendPairingResponse`, `M_FORBIDDEN during room creation, finding existing room instead`, error);\n roomWasReused = true;\n // Handle 403 response when invite was sent. Find the existing room, but first, clear our local state to force a fresh lookup\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const oldRoomId = roomIds[recipient];\n if (oldRoomId) {\n logger.log(`sendPairingResponse`, `Clearing old room \"${oldRoomId}\" from local cache`);\n yield this.deleteRoomIdFromRooms(oldRoomId);\n }\n // Now use getRelevantJoinedRoom which will find the existing room from the server\n // or clear state if we're in an unrecoverable situation with orphaned rooms\n try {\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n logger.log(`sendPairingResponse`, `Using existing room \"${roomId}\" from server`);\n }\n catch (innerError) {\n // If we still get M_FORBIDDEN here, it means we have orphaned rooms and the state was cleared\n // We need to stop the client and reconnect to get a fresh sync\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.errcode) === 'M_FORBIDDEN' &&\n ((_b = innerError === null || innerError === void 0 ? void 0 : innerError.error) === null || _b === void 0 ? void 0 : _b.includes('already in the room'))) {\n logger.log(`sendPairingResponse`, `Still getting M_FORBIDDEN after state clear, stopping and restarting client`);\n yield this.stop();\n yield this.start();\n // Try one more time with fresh state\n try {\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n logger.log(`sendPairingResponse`, `Successfully found room \"${roomId}\" after restart`);\n }\n catch (finalError) {\n logger.error(`sendPairingResponse`, `Failed to recover after restart`, finalError);\n throw new Error('Unable to pair. Please clear your browser storage and try again.');\n }\n }\n else {\n logger.log(`sendPairingResponse`, `Failed to find existing room`, innerError);\n throw error; // Re-throw original error if we can't recover\n }\n }\n }\n else {\n throw error; // Re-throw if it's not the specific error we're handling\n }\n }\n yield this.updatePeerRoom(recipient, roomId);\n // Check if the other party is in the room\n const room = yield (yield this.client.promise).getRoomById(roomId);\n const hasRecipient = room.members.some((member) => member === recipient);\n if (!hasRecipient) {\n logger.log(`sendPairingResponse`, `Recipient not in room, inviting them to \"${roomId}\"`);\n // The recipient is not in the room. We need to invite them.\n // Since we're reusing a room, the recipient might have been invited before but never joined.\n // Try to invite them again.\n try {\n yield (yield this.client.promise).inviteToRooms(recipient, roomId);\n logger.log(`sendPairingResponse`, `Invited recipient to room, waiting for join`);\n yield this.waitForJoin(roomId);\n }\n catch (inviteError) {\n logger.error(`sendPairingResponse`, `Failed to invite recipient to room`, inviteError);\n // If invite fails, we're in a bad state. The user should clear storage.\n throw new Error('Unable to invite dApp to room. Please clear your browser storage and try again.');\n }\n }\n else if (!roomWasReused) {\n // Room was newly created, wait for the other party to join\n yield this.waitForJoin(roomId);\n logger.debug(`sendPairingResponse`, `Successfully joined room.`);\n }\n else {\n // Room was reused and recipient is already in it\n logger.log(`sendPairingResponse`, `Room was reused and recipient is already a member. Sending message immediately.`);\n }\n // TODO: remove v1 backwards-compatibility\n const message = typeof pairingRequest.version === 'undefined'\n ? yield this.getPublicKey() // v1\n : JSON.stringify(yield this.getPairingResponseInfo(pairingRequest)); // v2\n logger.debug(`sendPairingResponse`, `Sending pairing response`, message);\n const encryptedMessage = yield this.encryptMessageAsymmetric(pairingRequest.publicKey, message);\n const msg = ['@channel-open', recipient, encryptedMessage].join(':');\n try {\n yield (yield this.client.promise).sendTextMessage(roomId, msg);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED') {\n logger.log('sendPairingResponse', 'request cancelled while stopping transport');\n return;\n }\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN') {\n logger.log(`sendPairingResponse`, `M_FORBIDDEN`, roomId, error);\n yield this.deleteRoomIdFromRooms(roomId);\n const newRoomId = yield this.getRelevantRoom(recipient);\n logger.log(`sendPairingResponse`, `Old room deleted, new room created`, newRoomId);\n try {\n yield (yield this.client.promise).sendTextMessage(newRoomId, msg);\n }\n catch (innerError) {\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.code) === 'ERR_CANCELED') {\n logger.log('sendPairingResponse', 'inner request cancelled while stopping transport');\n return;\n }\n logger.log(`sendPairingResponse`, `inner error`, newRoomId, innerError);\n }\n }\n else {\n logger.log(`sendPairingResponse`, `unexpected error`, error);\n }\n }\n });\n }\n isTextMessage(content) {\n return content.message.type === MatrixMessage_1.MatrixMessageType.TEXT;\n }\n updateRelayServer(sender) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`updateRelayServer`, sender);\n // Sender is in the format \"@pubkeyhash:relayserver.tld\"\n const split = sender.split(':');\n if (split.length < 2 || !split[0].startsWith('@')) {\n throw new Error('Invalid sender');\n }\n const senderHash = split.shift();\n const relayServer = split.join(':');\n const manager = localStorage.getItem('beacon:communication-peers-dapp')\n ? new octez_connect_core_1.PeerManager(this.storage, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP)\n : new octez_connect_core_1.PeerManager(this.storage, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET);\n const peers = yield manager.getPeers();\n const promiseArray = peers.map((peer) => __awaiter(this, void 0, void 0, function* () {\n const hash = `@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(peer.publicKey, 'hex'))}`;\n if (hash === senderHash) {\n if (peer.relayServer !== relayServer) {\n peer.relayServer = relayServer;\n yield manager.addPeer(peer);\n }\n }\n }));\n yield Promise.all(promiseArray);\n });\n }\n isChannelOpenMessage(content) {\n return __awaiter(this, void 0, void 0, function* () {\n return content.message.content.startsWith(`@channel-open:@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(yield this.getPublicKey(), 'hex'))}`);\n });\n }\n isSender(event, senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return event.content.message.sender.startsWith(`@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(senderPublicKey, 'hex'))}`);\n });\n }\n generateNewKeyPair() {\n return __awaiter(this, void 0, void 0, function* () {\n const newSeed = yield (0, octez_connect_utils_1.generateGUID)();\n console.warn(`The current user ID has been deactivated. Generating new ID: ${newSeed}`);\n this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED, newSeed);\n this.keyPair = yield (0, octez_connect_utils_1.getKeypairFromSeed)(newSeed);\n });\n }\n getRelevantRoom(recipient) {\n return __awaiter(this, void 0, void 0, function* () {\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n let roomId = roomIds[recipient];\n if (!roomId) {\n logger.log(`getRelevantRoom`, `No room found for peer ${recipient}, checking joined ones.`);\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n roomIds[recipient] = room.id;\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, roomIds);\n }\n logger.log(`getRelevantRoom`, `Using room ${roomId}`);\n return roomId;\n });\n }\n getRelevantJoinedRoom(recipient) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const joinedRooms = yield (yield this.client.promise).joinedRooms;\n logger.log('checking joined rooms', joinedRooms, recipient);\n const relevantRooms = joinedRooms\n .filter((roomElement) => !this.ignoredRooms.some((id) => roomElement.id === id))\n .filter((roomElement) => roomElement.members.some((member) => member === recipient));\n let room;\n // If we found relevant rooms, use them even if there are ignored rooms\n if (relevantRooms.length > 0) {\n room = relevantRooms[0];\n logger.log(`getRelevantJoinedRoom`, `channel already open, reusing room ${room.id}`);\n }\n else {\n // No relevant rooms found. If we have ignored rooms, we're in a bad state and need to reset.\n if (this.ignoredRooms.length > 0) {\n logger.log(`getRelevantJoinedRoom`, `no relevant rooms found but have ${this.ignoredRooms.length} ignored rooms, clearing Matrix state`);\n // Clear the Matrix preserved state to force a fresh sync on next connection\n yield this.storage\n .delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE)\n .catch((error) => logger.log(error));\n yield this.storage\n .delete(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS)\n .catch((error) => logger.log(error));\n // Clear ignored rooms list since we're resetting\n this.ignoredRooms.length = 0;\n }\n logger.log(`getRelevantJoinedRoom`, `no relevant rooms found, creating new one`);\n try {\n const roomId = yield (yield this.client.promise).createTrustedPrivateRoom(recipient);\n room = yield (yield this.client.promise).getRoomById(roomId);\n logger.log(`getRelevantJoinedRoom`, `waiting for other party to join room: ${room.id}`);\n yield this.waitForJoin(roomId);\n logger.log(`getRelevantJoinedRoom`, `new room created and peer invited: ${room.id}`);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN' && ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.includes('already in the room'))) {\n // Server knows about a room we don't have locally\n // Clear preserved state so next reconnect gets a fresh sync\n logger.log(`getRelevantJoinedRoom`, `M_FORBIDDEN on room creation, clearing preserved state for fresh sync on reconnect`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE).catch((e) => logger.log(e));\n // Re-throw the error so caller (sendPairingResponse) can handle the restart\n throw error;\n }\n throw error;\n }\n }\n return room;\n });\n }\n}\nexports.P2PCommunicationClient = P2PCommunicationClient;\n//# sourceMappingURL=P2PCommunicationClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.P2PTransport = exports.P2PCommunicationClient = void 0;\nvar P2PCommunicationClient_1 = __webpack_require__(/*! ./communication-client/P2PCommunicationClient */ "./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js");\nObject.defineProperty(exports, "P2PCommunicationClient", ({ enumerable: true, get: function () { return P2PCommunicationClient_1.P2PCommunicationClient; } }));\nvar P2PTransport_1 = __webpack_require__(/*! ./P2PTransport */ "./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js");\nObject.defineProperty(exports, "P2PTransport", ({ enumerable: true, get: function () { return P2PTransport_1.P2PTransport; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/index.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js"(__unused_webpack_module,exports){"use strict";eval("{\n// https://gist.github.com/mudge/5830382?permalink_comment_id=2658721#gistcomment-2658721\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EventEmitter = void 0;\nclass EventEmitter {\n constructor() {\n this.events = {};\n }\n on(event, listener) {\n if (typeof this.events[event] !== 'object') {\n this.events[event] = [];\n }\n this.events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n if (typeof this.events[event] !== 'object') {\n return;\n }\n if (!listener) {\n this.events[event] = [];\n return;\n }\n const idx = this.events[event].indexOf(listener);\n if (idx > -1) {\n this.events[event].splice(idx, 1);\n }\n }\n removeAllListeners() {\n Object.keys(this.events).forEach((event) => this.events[event].splice(0, this.events[event].length));\n }\n emit(event, ...args) {\n if (typeof this.events[event] !== 'object') {\n return;\n }\n ;\n [...this.events[event]].forEach((listener) => listener.apply(this, args));\n }\n once(event, listener) {\n const remove = this.on(event, (...args) => {\n remove();\n listener.apply(this, args);\n });\n return remove;\n }\n}\nexports.EventEmitter = EventEmitter;\n//# sourceMappingURL=EventEmitter.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst MatrixClientStore_1 = __webpack_require__(/*! ./MatrixClientStore */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js\");\nconst MatrixHttpClient_1 = __webpack_require__(/*! ./MatrixHttpClient */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js\");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js\");\nconst MatrixRoomService_1 = __webpack_require__(/*! ./services/MatrixRoomService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js\");\nconst MatrixUserService_1 = __webpack_require__(/*! ./services/MatrixUserService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js\");\nconst MatrixEventService_1 = __webpack_require__(/*! ./services/MatrixEventService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js\");\nconst MatrixClientEventEmitter_1 = __webpack_require__(/*! ./MatrixClientEventEmitter */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixClient');\nconst IMMEDIATE_POLLING_RETRIES = 3;\nconst RETRY_INTERVAL = 5000;\n/**\n * The matrix client used to connect to the matrix network\n */\nclass MatrixClient {\n constructor(store, eventEmitter, userService, roomService, eventService, httpClient) {\n this.store = store;\n this.eventEmitter = eventEmitter;\n this.userService = userService;\n this.roomService = roomService;\n this.eventService = eventService;\n this.httpClient = httpClient;\n this.isActive = true;\n this._isReady = new octez_connect_utils_1.ExposedPromise();\n this.store.onStateChanged((oldState, newState, stateChange) => {\n this.eventEmitter.onStateChanged(oldState, newState, stateChange);\n }, 'rooms');\n }\n /**\n * Create a matrix client based on the options provided\n *\n * @param config\n */\n static create(config) {\n const store = new MatrixClientStore_1.MatrixClientStore(config.storage);\n const eventEmitter = new MatrixClientEventEmitter_1.MatrixClientEventEmitter();\n const httpClient = new MatrixHttpClient_1.MatrixHttpClient(config.baseUrl);\n const accountService = new MatrixUserService_1.MatrixUserService(httpClient);\n const roomService = new MatrixRoomService_1.MatrixRoomService(httpClient);\n const eventService = new MatrixEventService_1.MatrixEventService(httpClient);\n return new MatrixClient(store, eventEmitter, accountService, roomService, eventService, httpClient);\n }\n /**\n * Return all the rooms we are currently part of\n */\n get joinedRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.JOINED));\n }));\n }\n /**\n * Return all the rooms to which we have received invitations\n */\n get invitedRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED));\n }));\n }\n /**\n * Return all the rooms that we left\n */\n get leftRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.LEFT));\n }));\n }\n /**\n * Initiate the connection to the matrix node and log in\n *\n * @param user\n */\n start(user) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.userService.login(user.id, user.password, user.deviceId);\n yield this.store.update({\n accessToken: response.access_token\n });\n this.isActive = true;\n const initialPollingResult = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n yield this.poll(0, (pollingResponse) => __awaiter(this, void 0, void 0, function* () {\n if (!this.store.get('isRunning')) {\n resolve();\n }\n yield this.store.update({\n isRunning: true,\n syncToken: pollingResponse.next_batch,\n pollingTimeout: 30000,\n pollingRetries: 0,\n rooms: MatrixRoom_1.MatrixRoom.fromSync(pollingResponse.rooms)\n });\n }), (error) => __awaiter(this, void 0, void 0, function* () {\n if (!this.store.get('isRunning')) {\n reject(error);\n }\n yield this.store.update({\n isRunning: false,\n pollingRetries: this.store.get('pollingRetries') + 1\n });\n }));\n }));\n initialPollingResult\n .then(() => {\n this._isReady.resolve();\n })\n .catch(console.error);\n return initialPollingResult;\n });\n }\n isConnected() {\n return __awaiter(this, void 0, void 0, function* () {\n return this._isReady.promise;\n });\n }\n /**\n * Stop all running requests\n */\n stop() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`MATRIX CLIENT STOPPED`);\n this.isActive = false;\n this._isReady = new octez_connect_utils_1.ExposedPromise();\n yield this.store.update({\n isRunning: false\n });\n return this.httpClient.cancelAllRequests();\n });\n }\n /**\n * Subscribe to new matrix events\n *\n * @param event\n * @param listener\n */\n subscribe(event, listener) {\n this.eventEmitter.on(event, listener);\n }\n /**\n * Unsubscribe from matrix events\n *\n * @param event\n * @param listener\n */\n unsubscribe(event, listener) {\n if (listener) {\n this.eventEmitter.removeListener(event, listener);\n }\n }\n /**\n * Unsubscribe from all matrix events of this type\n *\n * @param event\n * @param listener\n */\n unsubscribeAll(event) {\n this.eventEmitter.removeListener(event);\n }\n getRoomById(id) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n return this.store.getRoom(id);\n });\n }\n /**\n * Create a private room with the supplied members\n *\n * @param members Members that will be in the room\n */\n createTrustedPrivateRoom(...members) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n return this.requiresAuthorization('createRoom', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n const response = yield this.roomService.createRoom(accessToken, {\n room_version: '5',\n invite: members,\n preset: 'public_chat',\n is_direct: true\n });\n return response.room_id;\n }));\n });\n }\n /**\n * Invite user to rooms\n *\n * @param user The user to be invited\n * @param roomsOrIds The rooms the user will be invited to\n */\n inviteToRooms(user, ...roomsOrIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('invite', (accessToken) => Promise.all(roomsOrIds.map((roomOrId) => {\n const room = this.store.getRoom(roomOrId);\n this.roomService\n .inviteToRoom(accessToken, user, room)\n .catch((error) => logger.warn('inviteToRooms', error));\n })));\n });\n }\n /**\n * Join rooms\n *\n * @param roomsOrIds\n */\n joinRooms(...roomsOrIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('join', (accessToken) => Promise.all(roomsOrIds.map((roomOrId) => {\n const room = this.store.getRoom(roomOrId);\n return this.roomService.joinRoom(accessToken, room);\n })));\n });\n }\n /**\n * Send a text message\n *\n * @param roomOrId\n * @param message\n */\n sendTextMessage(roomId, message) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('send', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n const txnId = yield this.createTxnId();\n return this.eventService.sendMessage(accessToken, roomId, {\n msgtype: 'm.text',\n body: message\n }, txnId);\n }));\n });\n }\n /**\n * Poll the server to get the latest data and get notified of changes\n *\n * @param interval\n * @param onSyncSuccess\n * @param onSyncError\n */\n poll(interval, onSyncSuccess, onSyncError) {\n return __awaiter(this, void 0, void 0, function* () {\n const store = this.store;\n const sync = this.sync.bind(this);\n const pollSync = (resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n let syncingRetries = 0;\n try {\n const response = yield sync();\n onSyncSuccess(response);\n }\n catch (error) {\n onSyncError(error);\n syncingRetries = store.get('pollingRetries');\n // console.warn('Could not sync:', error)\n if (this.isActive) {\n logger.log(`Retry syncing... ${syncingRetries} retries so far`);\n }\n }\n finally {\n if (this.isActive) {\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\n yield pollSync(resolve, reject);\n }), syncingRetries > IMMEDIATE_POLLING_RETRIES ? RETRY_INTERVAL + interval : interval);\n }\n else {\n reject(new Error(`Syncing stopped manually.`));\n }\n }\n });\n return new Promise(pollSync);\n });\n }\n /**\n * Get state from server\n */\n sync() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.requiresAuthorization('sync', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n return this.eventService.sync(accessToken, {\n pollingTimeout: this.store.get('pollingTimeout'),\n syncToken: this.store.get('syncToken')\n });\n }));\n });\n }\n /**\n * A helper method that makes sure an access token is provided\n *\n * @param name\n * @param action\n */\n requiresAuthorization(name, action) {\n return __awaiter(this, void 0, void 0, function* () {\n const storedToken = this.store.get('accessToken');\n if (!storedToken) {\n return Promise.reject(`${name} requires authorization but no access token has been provided.`);\n }\n return action(storedToken);\n });\n }\n /**\n * Create a transaction ID\n */\n createTxnId() {\n return __awaiter(this, void 0, void 0, function* () {\n const timestamp = new Date().getTime();\n const counter = this.store.get('txnNo');\n yield this.store.update({\n txnNo: counter + 1\n });\n return `m${timestamp}.${counter}`;\n });\n }\n}\nexports.MatrixClient = MatrixClient;\n//# sourceMappingURL=MatrixClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixClientEventEmitter = void 0;\nconst EventEmitter_1 = __webpack_require__(/*! ./EventEmitter */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js");\nconst MatrixClientEvent_1 = __webpack_require__(/*! ./models/MatrixClientEvent */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js");\nclass MatrixClientEventEmitter extends EventEmitter_1.EventEmitter {\n constructor() {\n super(...arguments);\n this.eventEmitProviders = new Map([\n [MatrixClientEvent_1.MatrixClientEventType.INVITE, () => [this.isInvite, this.emitInvite.bind(this)]],\n [MatrixClientEvent_1.MatrixClientEventType.MESSAGE, () => [this.isMessage, this.emitMessage.bind(this)]]\n ]);\n }\n /**\n * This method is called every time the state is changed\n *\n * @param _oldState\n * @param _newState\n * @param stateChange\n */\n onStateChanged(_oldState, _newState, stateChange) {\n for (const event of (0, octez_connect_utils_1.keys)(MatrixClientEvent_1.MatrixClientEventType)) {\n this.emitIfEvent(MatrixClientEvent_1.MatrixClientEventType[event], stateChange);\n }\n }\n /**\n * Emit the message if we have listeners registered for that type\n *\n * @param eventType\n * @param object\n */\n emitIfEvent(eventType, object) {\n const provider = this.eventEmitProviders.get(eventType);\n if (provider) {\n const [predicate, emitter] = provider();\n if (predicate(object)) {\n emitter(eventType, object);\n }\n }\n }\n /**\n * Emit a client event\n *\n * @param eventType\n * @param content\n */\n emitClientEvent(eventType, content, timestamp) {\n this.emit(eventType, {\n type: eventType,\n content,\n timestamp\n });\n }\n /**\n * Check if event is an invite\n *\n * @param stateChange\n */\n isInvite(stateChange) {\n return stateChange.rooms\n ? stateChange.rooms.some((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED)\n : false;\n }\n /**\n * Emit an invite\n *\n * @param eventType\n * @param stateChange\n */\n emitInvite(eventType, stateChange) {\n stateChange.rooms\n .filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED)\n .map((room) => [room.id, room.members])\n .forEach(([id, members]) => {\n this.emitClientEvent(eventType, {\n roomId: id,\n members: members\n });\n });\n }\n /**\n * Check if event is a message\n *\n * @param stateChange\n */\n isMessage(stateChange) {\n return stateChange.rooms ? stateChange.rooms.some((room) => room.messages.length > 0) : false;\n }\n /**\n * Emit an event to all rooms\n *\n * @param eventType\n * @param stateChange\n */\n emitMessage(eventType, stateChange) {\n stateChange.rooms\n .filter((room) => room.messages.length > 0)\n .map((room) => room.messages.map((message) => [room.id, message, message.timestamp]))\n .reduce((flatten, toFlatten) => flatten.concat(toFlatten), [])\n .forEach(([roomId, message, timestamp]) => {\n this.emitClientEvent(eventType, {\n roomId,\n message\n }, timestamp);\n });\n }\n}\nexports.MatrixClientEventEmitter = MatrixClientEventEmitter;\n//# sourceMappingURL=MatrixClientEventEmitter.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixClientStore = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixClientStore');\nconst PRESERVED_FIELDS = ['syncToken', 'rooms'];\n/**\n * The class managing the local state of matrix\n */\nclass MatrixClientStore {\n constructor(storage) {\n this.storage = storage;\n /**\n * The state of the matrix client\n */\n this.state = {\n isRunning: false,\n userId: undefined,\n deviceId: undefined,\n txnNo: 0,\n accessToken: undefined,\n syncToken: undefined,\n pollingTimeout: undefined,\n pollingRetries: 0,\n rooms: {}\n };\n /**\n * Listeners that will be called when the state changes\n */\n this.onStateChangedListeners = new Map();\n this.waitReadyPromise = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.initFromStorage();\n resolve();\n }\n catch (error) {\n reject(error);\n }\n }));\n }\n /**\n * Get an item from the state\n *\n * @param key\n */\n get(key) {\n return this.state[key];\n }\n /**\n * Get the room from an ID or room instance\n *\n * @param roomOrId\n */\n getRoom(roomOrId) {\n const room = MatrixRoom_1.MatrixRoom.from(roomOrId, MatrixRoom_1.MatrixRoomStatus.UNKNOWN);\n return this.state.rooms[room.id] || room;\n }\n /**\n * Update the state with a partial state\n *\n * @param stateUpdate\n */\n update(stateUpdate) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.waitReady();\n const oldState = Object.assign({}, this.state);\n this.setState(stateUpdate);\n this.updateStorage(stateUpdate);\n this.notifyListeners(oldState, this.state, stateUpdate);\n });\n }\n /**\n * Register listeners that are called once the state has changed\n *\n * @param listener\n * @param subscribed\n */\n onStateChanged(listener, ...subscribed) {\n if (subscribed.length > 0) {\n subscribed.forEach((key) => {\n this.onStateChangedListeners.set(key, listener);\n });\n }\n else {\n this.onStateChangedListeners.set('all', listener);\n }\n }\n /**\n * A promise that resolves once the client is ready\n */\n waitReady() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.waitReadyPromise;\n });\n }\n /**\n * Read state from storage\n */\n initFromStorage() {\n return __awaiter(this, void 0, void 0, function* () {\n const preserved = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE);\n this.setState(preserved);\n });\n }\n /**\n * Prepare data before persisting it in storage\n *\n * @param toStore\n */\n prepareData(toStore) {\n const requiresPreparation = ['rooms'];\n const toStoreCopy = requiresPreparation.some((key) => toStore[key] !== undefined)\n ? JSON.parse(JSON.stringify(toStore))\n : toStore;\n // there is no need for saving messages in a persistent storage\n Object.values(toStoreCopy.rooms || {}).forEach((room) => {\n room.messages = [];\n });\n return toStoreCopy;\n }\n /**\n * Persist state in storage\n *\n * @param stateUpdate\n */\n updateStorage(stateUpdate) {\n const updatedCachedFields = Object.entries(stateUpdate).filter(([key, value]) => PRESERVED_FIELDS.includes(key) && Boolean(value));\n if (updatedCachedFields.length > 0) {\n const filteredState = {};\n PRESERVED_FIELDS.forEach((key) => {\n filteredState[key] = this.state[key];\n });\n // sync method, latest-wins write — observe rejection so it surfaces in logs.\n this.storage\n .set(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE, this.prepareData(filteredState))\n .catch((error) => logger.error('updateStorage', 'failed to persist matrix state', error));\n }\n }\n /**\n * Set the state\n *\n * @param partialState\n */\n setState(partialState) {\n this.state = {\n isRunning: partialState.isRunning || this.state.isRunning,\n userId: partialState.userId || this.state.userId,\n deviceId: partialState.deviceId || this.state.deviceId,\n txnNo: partialState.txnNo || this.state.txnNo,\n accessToken: partialState.accessToken || this.state.accessToken,\n syncToken: partialState.syncToken || this.state.syncToken,\n pollingTimeout: partialState.pollingTimeout || this.state.pollingTimeout,\n pollingRetries: partialState.pollingRetries || this.state.pollingRetries,\n rooms: this.mergeRooms(this.state.rooms, partialState.rooms)\n };\n }\n /**\n * Merge room records and eliminate duplicates\n *\n * @param oldRooms\n * @param _newRooms\n */\n mergeRooms(oldRooms, _newRooms) {\n if (!_newRooms) {\n return oldRooms;\n }\n const newRooms = Array.isArray(_newRooms) ? _newRooms : Object.values(_newRooms);\n const merged = Object.assign({}, oldRooms);\n newRooms.forEach((newRoom) => {\n merged[newRoom.id] = MatrixRoom_1.MatrixRoom.merge(newRoom, oldRooms[newRoom.id]);\n });\n return merged;\n }\n /**\n * Notify listeners of state changes\n *\n * @param oldState\n * @param newState\n * @param stateChange\n */\n notifyListeners(oldState, newState, stateChange) {\n const listenForAll = this.onStateChangedListeners.get('all');\n if (listenForAll) {\n listenForAll(oldState, newState, stateChange);\n }\n (0, octez_connect_utils_1.keys)(stateChange)\n .filter((key) => stateChange[key] !== undefined)\n .forEach((key) => {\n const listener = this.onStateChangedListeners.get(key);\n if (listener) {\n listener(oldState, newState, stateChange);\n }\n });\n }\n}\nexports.MatrixClientStore = MatrixClientStore;\n//# sourceMappingURL=MatrixClientStore.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixHttpClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixHttpClient');\nconst CLIENT_API_R0 = '/_matrix/client/r0';\n/**\n * Handling the HTTP connection to the matrix synapse node\n */\nclass MatrixHttpClient {\n constructor(baseUrl) {\n this.baseUrl = baseUrl;\n this.abortController = new AbortController();\n }\n /**\n * Get data from the synapse node\n */\n get(endpoint, params, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('GET', endpoint, options, params);\n });\n }\n /**\n * Post data to the synapse node\n */\n post(endpoint, body, options, params) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('POST', endpoint, options, params, body);\n });\n }\n /**\n * Put data to the synapse node\n */\n put(endpoint, body, options, params) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('PUT', endpoint, options, params, body);\n });\n }\n cancelAllRequests() {\n return __awaiter(this, void 0, void 0, function* () {\n this.abortController.abort('Manually cancelled');\n this.abortController = new AbortController();\n });\n }\n /**\n * Send a request to the synapse node\n */\n send(method, endpoint, config, requestParams, data) {\n return __awaiter(this, void 0, void 0, function* () {\n const headers = {};\n if (data !== undefined) {\n headers['Content-Type'] = 'application/json';\n }\n if (config === null || config === void 0 ? void 0 : config.accessToken) {\n headers.Authorization = `Bearer ${config.accessToken}`;\n }\n const params = requestParams ? this.getParams(requestParams) : undefined;\n const url = this.buildUrl(this.apiUrl(CLIENT_API_R0), endpoint, params);\n let response;\n try {\n response = yield fetch(url, {\n method,\n headers,\n body: data !== undefined ? JSON.stringify(data) : undefined,\n signal: this.abortController.signal\n });\n }\n catch (error) {\n if (this.isCancellationError(error)) {\n logger.log('send', 'request cancelled');\n }\n else {\n logger.error('send', error.name, error.message);\n }\n throw error;\n }\n const payload = yield this.parseBody(response);\n if (!response.ok) {\n logger.error('send', String(response.status), response.statusText, payload);\n throw payload;\n }\n return payload;\n });\n }\n parseBody(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const text = yield response.text();\n if (!text) {\n return undefined;\n }\n try {\n return JSON.parse(text);\n }\n catch (_a) {\n return text;\n }\n });\n }\n buildUrl(base, endpoint, params) {\n const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\n let url = `${base}${path}`;\n if (params && Object.keys(params).length > 0) {\n const search = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n search.append(key, String(value));\n }\n url += `?${search.toString()}`;\n }\n return url;\n }\n getParams(_params) {\n if (!_params) {\n return undefined;\n }\n const params = {};\n for (const [key, value] of Object.entries(_params)) {\n if (value !== undefined) {\n params[key] = value;\n }\n }\n return params;\n }\n isCancellationError(error) {\n return (error instanceof DOMException\n ? error.name === 'AbortError'\n : (error === null || error === void 0 ? void 0 : error.name) === 'AbortError' ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED');\n }\n /**\n * Construct API URL\n */\n apiUrl(...parts) {\n const apiBase = this.baseUrl.endsWith('/') ? this.baseUrl.slice(0, -1) : this.baseUrl;\n const apiParts = parts.map((path) => (path.startsWith('/') ? path.slice(1) : path));\n return [apiBase, ...apiParts].join('/');\n }\n}\nexports.MatrixHttpClient = MatrixHttpClient;\n//# sourceMappingURL=MatrixHttpClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixClientEventType = void 0;\nvar MatrixClientEventType;\n(function (MatrixClientEventType) {\n MatrixClientEventType["INVITE"] = "invite";\n MatrixClientEventType["MESSAGE"] = "message";\n})(MatrixClientEventType || (exports.MatrixClientEventType = MatrixClientEventType = {}));\n//# sourceMappingURL=MatrixClientEvent.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixMessage = exports.MatrixMessageType = void 0;\nconst events_1 = __webpack_require__(/*! ../utils/events */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js");\nvar MatrixMessageType;\n(function (MatrixMessageType) {\n MatrixMessageType["TEXT"] = "m.text";\n})(MatrixMessageType || (exports.MatrixMessageType = MatrixMessageType = {}));\nclass MatrixMessage {\n /**\n * Construct a message from a message event\n *\n * @param event\n */\n static from(event) {\n if ((0, events_1.isTextMessageEvent)(event)) {\n return new MatrixMessage(event.content.msgtype, event.sender, event.content.body, event.origin_server_ts);\n }\n // for now only text messages are supported\n return undefined;\n }\n constructor(type, sender, content, timestamp) {\n this.type = type;\n this.sender = sender;\n this.content = content;\n this.timestamp = timestamp;\n }\n}\nexports.MatrixMessage = MatrixMessage;\n//# sourceMappingURL=MatrixMessage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixRoom = exports.MatrixRoomStatus = void 0;\nconst events_1 = __webpack_require__(/*! ../utils/events */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js");\nconst MatrixMessage_1 = __webpack_require__(/*! ./MatrixMessage */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js");\nvar MatrixRoomStatus;\n(function (MatrixRoomStatus) {\n MatrixRoomStatus[MatrixRoomStatus["UNKNOWN"] = 0] = "UNKNOWN";\n MatrixRoomStatus[MatrixRoomStatus["JOINED"] = 1] = "JOINED";\n MatrixRoomStatus[MatrixRoomStatus["INVITED"] = 2] = "INVITED";\n MatrixRoomStatus[MatrixRoomStatus["LEFT"] = 3] = "LEFT";\n})(MatrixRoomStatus || (exports.MatrixRoomStatus = MatrixRoomStatus = {}));\nclass MatrixRoom {\n /**\n * Reconstruct rooms from a sync response\n *\n * @param roomSync\n */\n static fromSync(roomSync) {\n var _a, _b, _c;\n if (!roomSync) {\n return [];\n }\n function create(rooms, creator) {\n return Object.entries(rooms).map(([id, room]) => creator(id, room));\n }\n return [\n ...create((_a = roomSync.join) !== null && _a !== void 0 ? _a : {}, MatrixRoom.fromJoined),\n ...create((_b = roomSync.invite) !== null && _b !== void 0 ? _b : {}, MatrixRoom.fromInvited),\n ...create((_c = roomSync.leave) !== null && _c !== void 0 ? _c : {}, MatrixRoom.fromLeft)\n ];\n }\n /**\n * Reconstruct a room from an ID or object\n *\n * @param roomOrId\n * @param status\n */\n static from(roomOrId, status) {\n return typeof roomOrId === \'string\'\n ? new MatrixRoom(roomOrId, status || MatrixRoomStatus.UNKNOWN)\n : status !== undefined\n ? new MatrixRoom(roomOrId.id, status, roomOrId.members, roomOrId.messages)\n : roomOrId;\n }\n /**\n * Merge new and old state and remove duplicates\n *\n * @param newState\n * @param previousState\n */\n static merge(newState, previousState) {\n if (!previousState || previousState.id !== newState.id) {\n return MatrixRoom.from(newState);\n }\n return new MatrixRoom(newState.id, newState.status, [...previousState.members, ...newState.members].filter((member, index, array) => array.indexOf(member) === index), [...previousState.messages, ...newState.messages]);\n }\n /**\n * Create a room from a join\n *\n * @param id\n * @param joined\n */\n static fromJoined(id, joined) {\n const events = [...joined.state.events, ...joined.timeline.events];\n const members = MatrixRoom.getMembersFromEvents(events);\n const messages = MatrixRoom.getMessagesFromEvents(events);\n return new MatrixRoom(id, MatrixRoomStatus.JOINED, members, messages);\n }\n /**\n * Create a room from an invite\n *\n * @param id\n * @param invited\n */\n static fromInvited(id, invited) {\n const members = MatrixRoom.getMembersFromEvents(invited.invite_state.events);\n return new MatrixRoom(id, MatrixRoomStatus.INVITED, members);\n }\n /**\n * Create a room from a leave\n *\n * @param id\n * @param left\n */\n static fromLeft(id, left) {\n const events = [...left.state.events, ...left.timeline.events];\n const members = MatrixRoom.getMembersFromEvents(events);\n const messages = MatrixRoom.getMessagesFromEvents(events);\n return new MatrixRoom(id, MatrixRoomStatus.LEFT, members, messages);\n }\n /**\n * Extract members from an event\n *\n * @param events\n */\n static getMembersFromEvents(events) {\n return MatrixRoom.getUniqueEvents(events.filter((event) => (0, events_1.isCreateEvent)(event) || (0, events_1.isJoinEvent)(event)))\n .map((event) => event.sender)\n .filter((member, index, array) => array.indexOf(member) === index);\n }\n /**\n * Extract messages from an event\n *\n * @param events\n */\n static getMessagesFromEvents(events) {\n return MatrixRoom.getUniqueEvents(events.filter(events_1.isMessageEvent))\n .map((event) => MatrixMessage_1.MatrixMessage.from(event))\n .filter(Boolean);\n }\n /**\n * Get unique events and remove duplicates\n *\n * @param events\n */\n static getUniqueEvents(events) {\n const eventIds = {};\n const uniqueEvents = [];\n events.forEach((event, index) => {\n const eventId = event.event_id;\n if (eventId === undefined || !(eventId in eventIds)) {\n if (eventId !== undefined) {\n eventIds[eventId] = index;\n }\n uniqueEvents.push(event);\n }\n });\n return uniqueEvents;\n }\n constructor(id, status = MatrixRoomStatus.UNKNOWN, members = [], messages = []) {\n this.id = id;\n this.status = status;\n this.members = members;\n this.messages = messages;\n }\n}\nexports.MatrixRoom = MatrixRoom;\n//# sourceMappingURL=MatrixRoom.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js"(__unused_webpack_module,exports){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixEventService = void 0;\n/**\n * A service to help with matrix event management\n */\nclass MatrixEventService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n this.cachedPromises = new Map();\n }\n /**\n * Get the latest state from the matrix node\n *\n * @param accessToken\n * @param options\n */\n sync(accessToken, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.withCache('sync', () => this.httpClient.get('/sync', {\n timeout: options ? options.pollingTimeout : undefined,\n since: options ? options.syncToken : undefined\n }, { accessToken }));\n });\n }\n /**\n * Send a message to a room\n *\n * @param accessToken\n * @param room\n * @param content\n * @param txnId\n */\n sendMessage(accessToken, roomId, content, txnId) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => this.scheduleEvent({\n accessToken,\n roomId,\n type: 'm.room.message',\n content,\n txnId,\n onSuccess: resolve,\n onError: reject\n }));\n });\n }\n /**\n * Schedules an event to be sent to the node\n *\n * @param event\n */\n scheduleEvent(event) {\n // TODO: actual scheduling\n this.sendEvent(event);\n }\n /**\n * Send an event to the matrix node\n *\n * @param scheduledEvent\n */\n sendEvent(scheduledEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const { roomId, type, txnId, content, accessToken } = scheduledEvent;\n try {\n const response = yield this.httpClient.put(`/rooms/${encodeURIComponent(roomId)}/send/${type}/${encodeURIComponent(txnId)}`, content, { accessToken });\n scheduledEvent.onSuccess(response);\n }\n catch (error) {\n scheduledEvent.onError(error);\n }\n });\n }\n /**\n * Check the cache when interacting with the Matrix node, if there is an already ongoing call for the specified key, return its promise instead of duplicating the call.\n *\n * @param key\n * @param promiseProvider\n */\n withCache(key, promiseProvider) {\n let promise = this.cachedPromises.get(key);\n if (!promise) {\n promise = promiseProvider().finally(() => {\n this.cachedPromises.delete(key);\n });\n this.cachedPromises.set(key, promise);\n }\n return promise;\n }\n}\nexports.MatrixEventService = MatrixEventService;\n//# sourceMappingURL=MatrixEventService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixRoomService = void 0;\nconst MatrixRoom_1 = __webpack_require__(/*! ../models/MatrixRoom */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js");\n/**\n * A service to help with matrix room management\n */\nclass MatrixRoomService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n /**\n * Create a room\n *\n * @param accessToken\n * @param config\n */\n createRoom(accessToken_1) {\n return __awaiter(this, arguments, void 0, function* (accessToken, config = {}) {\n return this.httpClient.post(\'/createRoom\', config, { accessToken });\n });\n }\n /**\n * Invite a user to a room\n *\n * @param accessToken\n * @param user\n * @param room\n */\n inviteToRoom(accessToken, user, room) {\n return __awaiter(this, void 0, void 0, function* () {\n if (room.status !== MatrixRoom_1.MatrixRoomStatus.JOINED && room.status !== MatrixRoom_1.MatrixRoomStatus.UNKNOWN) {\n return Promise.reject(`User is not a member of room ${room.id}.`);\n }\n return this.httpClient.post(`/rooms/${encodeURIComponent(room.id)}/invite`, { user_id: user }, { accessToken });\n });\n }\n /**\n * Join a specific room\n *\n * @param accessToken\n * @param room\n */\n joinRoom(accessToken, room) {\n return __awaiter(this, void 0, void 0, function* () {\n if (room.status === MatrixRoom_1.MatrixRoomStatus.JOINED) {\n return Promise.resolve({ room_id: room.id });\n }\n return this.httpClient.post(`/rooms/${encodeURIComponent(room.id)}/join`, {}, { accessToken });\n });\n }\n /**\n * Get all joined rooms\n *\n * @param accessToken\n */\n getJoinedRooms(accessToken) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.httpClient.get(`/joined_rooms`, undefined, { accessToken });\n });\n }\n}\nexports.MatrixRoomService = MatrixRoomService;\n//# sourceMappingURL=MatrixRoomService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js"(__unused_webpack_module,exports){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixUserService = void 0;\nclass MatrixUserService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n /**\n * Log in to the matrix node with username and password\n *\n * @param user\n * @param password\n * @param deviceId\n */\n login(user, password, deviceId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.httpClient.post('/login', {\n type: 'm.login.password',\n identifier: {\n type: 'm.id.user',\n user\n },\n password,\n device_id: deviceId\n });\n });\n }\n}\nexports.MatrixUserService = MatrixUserService;\n//# sourceMappingURL=MatrixUserService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isTextMessageEvent = exports.isMessageEvent = exports.isJoinEvent = exports.isCreateEvent = void 0;\nconst MatrixMessage_1 = __webpack_require__(/*! ../models/MatrixMessage */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js\");\n/**\n * Check if an event is a create event\n *\n * @param event MatrixStateEvent\n */\nconst isCreateEvent = (event) => event.type === 'm.room.create' && event.content instanceof Object && 'creator' in event.content;\nexports.isCreateEvent = isCreateEvent;\n/**\n * Check if an event is a join event\n *\n * @param event MatrixStateEvent\n */\nconst isJoinEvent = (event) => event.type === 'm.room.member' &&\n event.content instanceof Object &&\n 'membership' in event.content &&\n // eslint-disable-next-line dot-notation\n event.content['membership'] === 'join';\nexports.isJoinEvent = isJoinEvent;\n/**\n * Check if an event is a message event\n *\n * @param event MatrixStateEvent\n */\nconst isMessageEvent = (event) => event.type === 'm.room.message';\nexports.isMessageEvent = isMessageEvent;\n/**\n * Check if an event is a text message event\n *\n * @param event MatrixStateEvent\n */\nconst isTextMessageEvent = (event) => (0, exports.isMessageEvent)(event) &&\n event.content instanceof Object &&\n 'msgtype' in event.content &&\n // eslint-disable-next-line dot-notation\n event.content['msgtype'] === MatrixMessage_1.MatrixMessageType.TEXT;\nexports.isTextMessageEvent = isTextMessageEvent;\n//# sourceMappingURL=events.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js?\n}")},"./packages/octez.connect-types/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ColorMode = exports.defaultValues = exports.ExtendedWalletConnectPairingResponse = exports.ExtendedWalletConnectPairingRequest = exports.WalletConnectPairingRequest = exports.WalletConnectPairingResponse = exports.ExtendedP2PPairingResponse = exports.ExtendedP2PPairingRequest = exports.P2PPairingResponse = exports.P2PPairingRequest = exports.ExtendedPostMessagePairingResponse = exports.ExtendedPostMessagePairingRequest = exports.PostMessagePairingResponse = exports.PostMessagePairingRequest = exports.StorageKey = exports.Storage = exports.TransportType = exports.TransportStatus = exports.BeaconErrorType = exports.ExtensionMessageTarget = exports.SigningType = exports.Origin = exports.PermissionScope = exports.BeaconMessageType = exports.NetworkType = exports.TezosOperationType = void 0;\nconst BeaconMessageType_1 = __webpack_require__(/*! ./types/beacon/BeaconMessageType */ "./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js");\nObject.defineProperty(exports, "BeaconMessageType", ({ enumerable: true, get: function () { return BeaconMessageType_1.BeaconMessageType; } }));\nconst PermissionScope_1 = __webpack_require__(/*! ./types/beacon/PermissionScope */ "./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js");\nObject.defineProperty(exports, "PermissionScope", ({ enumerable: true, get: function () { return PermissionScope_1.PermissionScope; } }));\nconst NetworkType_1 = __webpack_require__(/*! ./types/beacon/NetworkType */ "./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js");\nObject.defineProperty(exports, "NetworkType", ({ enumerable: true, get: function () { return NetworkType_1.NetworkType; } }));\nconst OperationTypes_1 = __webpack_require__(/*! ./types/tezos/OperationTypes */ "./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js");\nObject.defineProperty(exports, "TezosOperationType", ({ enumerable: true, get: function () { return OperationTypes_1.TezosOperationType; } }));\nconst Origin_1 = __webpack_require__(/*! ./types/Origin */ "./packages/octez.connect-types/dist/cjs/types/Origin.js");\nObject.defineProperty(exports, "Origin", ({ enumerable: true, get: function () { return Origin_1.Origin; } }));\nconst ExtensionMessageTarget_1 = __webpack_require__(/*! ./types/ExtensionMessageTarget */ "./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js");\nObject.defineProperty(exports, "ExtensionMessageTarget", ({ enumerable: true, get: function () { return ExtensionMessageTarget_1.ExtensionMessageTarget; } }));\nconst BeaconErrorType_1 = __webpack_require__(/*! ./types/BeaconErrorType */ "./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js");\nObject.defineProperty(exports, "BeaconErrorType", ({ enumerable: true, get: function () { return BeaconErrorType_1.BeaconErrorType; } }));\nconst TransportStatus_1 = __webpack_require__(/*! ./types/transport/TransportStatus */ "./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js");\nObject.defineProperty(exports, "TransportStatus", ({ enumerable: true, get: function () { return TransportStatus_1.TransportStatus; } }));\nconst TransportType_1 = __webpack_require__(/*! ./types/transport/TransportType */ "./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js");\nObject.defineProperty(exports, "TransportType", ({ enumerable: true, get: function () { return TransportType_1.TransportType; } }));\nconst Storage_1 = __webpack_require__(/*! ./types/storage/Storage */ "./packages/octez.connect-types/dist/cjs/types/storage/Storage.js");\nObject.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return Storage_1.Storage; } }));\nconst StorageKey_1 = __webpack_require__(/*! ./types/storage/StorageKey */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js");\nObject.defineProperty(exports, "StorageKey", ({ enumerable: true, get: function () { return StorageKey_1.StorageKey; } }));\nconst StorageKeyReturnDefaults_1 = __webpack_require__(/*! ./types/storage/StorageKeyReturnDefaults */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js");\nObject.defineProperty(exports, "defaultValues", ({ enumerable: true, get: function () { return StorageKeyReturnDefaults_1.defaultValues; } }));\nconst P2PPairingRequest_1 = __webpack_require__(/*! ./types/P2PPairingRequest */ "./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js");\nObject.defineProperty(exports, "ExtendedP2PPairingRequest", ({ enumerable: true, get: function () { return P2PPairingRequest_1.ExtendedP2PPairingRequest; } }));\nObject.defineProperty(exports, "P2PPairingRequest", ({ enumerable: true, get: function () { return P2PPairingRequest_1.P2PPairingRequest; } }));\nconst SigningType_1 = __webpack_require__(/*! ./types/beacon/SigningType */ "./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js");\nObject.defineProperty(exports, "SigningType", ({ enumerable: true, get: function () { return SigningType_1.SigningType; } }));\nconst P2PPairingResponse_1 = __webpack_require__(/*! ./types/P2PPairingResponse */ "./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js");\nObject.defineProperty(exports, "ExtendedP2PPairingResponse", ({ enumerable: true, get: function () { return P2PPairingResponse_1.ExtendedP2PPairingResponse; } }));\nObject.defineProperty(exports, "P2PPairingResponse", ({ enumerable: true, get: function () { return P2PPairingResponse_1.P2PPairingResponse; } }));\nconst PostMessagePairingRequest_1 = __webpack_require__(/*! ./types/PostMessagePairingRequest */ "./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js");\nObject.defineProperty(exports, "ExtendedPostMessagePairingRequest", ({ enumerable: true, get: function () { return PostMessagePairingRequest_1.ExtendedPostMessagePairingRequest; } }));\nObject.defineProperty(exports, "PostMessagePairingRequest", ({ enumerable: true, get: function () { return PostMessagePairingRequest_1.PostMessagePairingRequest; } }));\nconst WalletConnectPairingResponse_1 = __webpack_require__(/*! ./types/WalletConnectPairingResponse */ "./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js");\nObject.defineProperty(exports, "ExtendedWalletConnectPairingResponse", ({ enumerable: true, get: function () { return WalletConnectPairingResponse_1.ExtendedWalletConnectPairingResponse; } }));\nObject.defineProperty(exports, "WalletConnectPairingResponse", ({ enumerable: true, get: function () { return WalletConnectPairingResponse_1.WalletConnectPairingResponse; } }));\nconst WalletConnectPairingRequest_1 = __webpack_require__(/*! ./types/WalletConnectPairingRequest */ "./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js");\nObject.defineProperty(exports, "ExtendedWalletConnectPairingRequest", ({ enumerable: true, get: function () { return WalletConnectPairingRequest_1.ExtendedWalletConnectPairingRequest; } }));\nObject.defineProperty(exports, "WalletConnectPairingRequest", ({ enumerable: true, get: function () { return WalletConnectPairingRequest_1.WalletConnectPairingRequest; } }));\nconst PostMessagePairingResponse_1 = __webpack_require__(/*! ./types/PostMessagePairingResponse */ "./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js");\nObject.defineProperty(exports, "ExtendedPostMessagePairingResponse", ({ enumerable: true, get: function () { return PostMessagePairingResponse_1.ExtendedPostMessagePairingResponse; } }));\nObject.defineProperty(exports, "PostMessagePairingResponse", ({ enumerable: true, get: function () { return PostMessagePairingResponse_1.PostMessagePairingResponse; } }));\nconst ColorMode_1 = __webpack_require__(/*! ./types/ColorMode */ "./packages/octez.connect-types/dist/cjs/types/ColorMode.js");\nObject.defineProperty(exports, "ColorMode", ({ enumerable: true, get: function () { return ColorMode_1.ColorMode; } }));\n__exportStar(__webpack_require__(/*! ./types/AnalyticsInterface */ "./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/beaconV3/PermissionRequest */ "./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/ui */ "./packages/octez.connect-types/dist/cjs/types/ui.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/Regions */ "./packages/octez.connect-types/dist/cjs/types/Regions.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/index.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=AnalyticsInterface.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconErrorType = void 0;\nvar BeaconErrorType;\n(function (BeaconErrorType) {\n /**\n * {@link BroadcastBeaconError}\n *\n * Will be returned if the user chooses that the transaction is broadcast but there is an error (eg. node not available).\n *\n * Returned by: Broadcast | Operation Request\n */\n BeaconErrorType["BROADCAST_ERROR"] = "BROADCAST_ERROR";\n /**\n * {@link NetworkNotSupportedBeaconError}\n *\n * Will be returned if the selected network is not supported by the wallet / extension.\n *\n * Returned by: Permission\n */\n BeaconErrorType["NETWORK_NOT_SUPPORTED"] = "NETWORK_NOT_SUPPORTED";\n /**\n * {@link NoAddressBeaconError}\n *\n * Will be returned if there is no address present for the protocol / network requested.\n *\n * Returned by: Permission\n */\n BeaconErrorType["NO_ADDRESS_ERROR"] = "NO_ADDRESS_ERROR";\n /**\n * {@link NoPrivateKeyBeaconError}\n *\n * Will be returned if the private key matching the sourceAddress could not be found.\n *\n * Returned by: Sign\n */\n BeaconErrorType["NO_PRIVATE_KEY_FOUND_ERROR"] = "NO_PRIVATE_KEY_FOUND_ERROR";\n /**\n * {@link NotGrantedBeaconError}\n *\n * Will be returned if the signature was blocked // (Not needed?) Permission: Will be returned if the permissions requested by the App were not granted.\n *\n * Returned by: Sign\n */\n BeaconErrorType["NOT_GRANTED_ERROR"] = "NOT_GRANTED_ERROR";\n /**\n * {@link ParametersInvalidBeaconError}\n *\n * Will be returned if any of the parameters are invalid.\n *\n * Returned by: Operation Request\n */\n BeaconErrorType["PARAMETERS_INVALID_ERROR"] = "PARAMETERS_INVALID_ERROR";\n /**\n * {@link TooManyOperationsBeaconError}\n *\n * Will be returned if too many operations were in the request and they were not able to fit into a single operation group.\n *\n * Returned by: Operation Request\n */\n BeaconErrorType["TOO_MANY_OPERATIONS"] = "TOO_MANY_OPERATIONS";\n /**\n * {@link TransactionInvalidBeaconError}\n *\n * Will be returned if the transaction is not parsable or is rejected by the node.\n *\n * Returned by: Broadcast\n */\n BeaconErrorType["TRANSACTION_INVALID_ERROR"] = "TRANSACTION_INVALID_ERROR";\n /**\n * {@link SignatureTypeNotSupportedBeaconError}\n *\n * Will be returned if the signing type is not supported.\n *\n * Returned by: Sign\n */\n BeaconErrorType["SIGNATURE_TYPE_NOT_SUPPORTED"] = "SIGNATURE_TYPE_NOT_SUPPORTED";\n // TODO: ENCRYPTION\n // /**\n // * {@link EncryptionTypeNotSupportedBeaconError}\n // *\n // * Will be returned if the encryption type is not supported.\n // *\n // * Returned by: Encrypt\n // */\n // ENCRYPTION_TYPE_NOT_SUPPORTED = \'ENCRYPTION_TYPE_NOT_SUPPORTED\',\n /**\n * {@link AbortedBeaconError}\n *\n * Will be returned if the request was aborted by the user or the wallet.\n *\n * Returned by: Permission | Operation Request | Sign Request | Broadcast\n */\n BeaconErrorType["ABORTED_ERROR"] = "ABORTED_ERROR";\n /**\n * {@link UnknownBeaconError}\n *\n * Used as a wildcard if an unexpected error occured.\n *\n * Returned by: Permission | Operation Request | Sign Request | Broadcast\n */\n BeaconErrorType["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";\n})(BeaconErrorType || (exports.BeaconErrorType = BeaconErrorType = {}));\n//# sourceMappingURL=BeaconErrorType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ColorMode.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ColorMode = void 0;\nvar ColorMode;\n(function (ColorMode) {\n ColorMode["LIGHT"] = "light";\n ColorMode["DARK"] = "dark";\n})(ColorMode || (exports.ColorMode = ColorMode = {}));\n//# sourceMappingURL=ColorMode.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ColorMode.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtensionMessageTarget = void 0;\n/**\n * @internalapi\n */\nvar ExtensionMessageTarget;\n(function (ExtensionMessageTarget) {\n ExtensionMessageTarget["BACKGROUND"] = "toBackground";\n ExtensionMessageTarget["PAGE"] = "toPage";\n ExtensionMessageTarget["EXTENSION"] = "toExtension";\n})(ExtensionMessageTarget || (exports.ExtensionMessageTarget = ExtensionMessageTarget = {}));\n//# sourceMappingURL=ExtensionMessageTarget.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/Origin.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Origin = void 0;\n/**\n * @internalapi\n */\nvar Origin;\n(function (Origin) {\n Origin["WEBSITE"] = "website";\n Origin["EXTENSION"] = "extension";\n Origin["P2P"] = "p2p";\n Origin["WALLETCONNECT"] = "walletconnect";\n})(Origin || (exports.Origin = Origin = {}));\n//# sourceMappingURL=Origin.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/Origin.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedP2PPairingRequest = exports.P2PPairingRequest = void 0;\n/**\n * @internalapi\n */\nclass P2PPairingRequest {\n constructor(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl) {\n this.type = 'p2p-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.relayServer = relayServer;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.P2PPairingRequest = P2PPairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedP2PPairingRequest extends P2PPairingRequest {\n constructor(id, name, publicKey, version, relayServer, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedP2PPairingRequest = ExtendedP2PPairingRequest;\n//# sourceMappingURL=P2PPairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedP2PPairingResponse = exports.P2PPairingResponse = void 0;\n/**\n * @internalapi\n */\nclass P2PPairingResponse {\n constructor(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl) {\n this.type = \'p2p-pairing-request\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.relayServer = relayServer;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.P2PPairingResponse = P2PPairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedP2PPairingResponse extends P2PPairingResponse {\n constructor(id, name, publicKey, version, relayServer, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedP2PPairingResponse = ExtendedP2PPairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=P2PPairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedPostMessagePairingRequest = exports.PostMessagePairingRequest = void 0;\n/**\n * @internalapi\n */\nclass PostMessagePairingRequest {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = 'postmessage-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.PostMessagePairingRequest = PostMessagePairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedPostMessagePairingRequest extends PostMessagePairingRequest {\n constructor(id, name, publicKey, version, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedPostMessagePairingRequest = ExtendedPostMessagePairingRequest;\n//# sourceMappingURL=PostMessagePairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedPostMessagePairingResponse = exports.PostMessagePairingResponse = void 0;\n/**\n * @internalapi\n */\nclass PostMessagePairingResponse {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = \'postmessage-pairing-response\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.PostMessagePairingResponse = PostMessagePairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedPostMessagePairingResponse extends PostMessagePairingResponse {\n constructor(id, name, publicKey, version, senderId, extensionId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n this.extensionId = extensionId;\n }\n}\nexports.ExtendedPostMessagePairingResponse = ExtendedPostMessagePairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=PostMessagePairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/Regions.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Regions = void 0;\n/**\n * Geographic region where a beacon node is located. This list can be changed in the future to be more specific, but for now it should cover most general areas.\n */\nvar Regions;\n(function (Regions) {\n Regions["EUROPE_EAST"] = "europe-east";\n Regions["EUROPE_WEST"] = "europe-west";\n Regions["NORTH_AMERICA_EAST"] = "north-america-east";\n Regions["NORTH_AMERICA_WEST"] = "north-america-west";\n Regions["CENTRAL_AMERICA"] = "central-america";\n Regions["SOUTH_AMERICA"] = "south-america";\n Regions["ASIA_EAST"] = "asia-east";\n Regions["ASIA_WEST"] = "asia-west";\n Regions["AFRICA"] = "africa";\n Regions["AUSTRALIA"] = "australia";\n})(Regions || (exports.Regions = Regions = {}));\n//# sourceMappingURL=Regions.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/Regions.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedWalletConnectPairingRequest = exports.WalletConnectPairingRequest = void 0;\n/**\n * @internalapi\n */\nclass WalletConnectPairingRequest {\n constructor(id, name, publicKey, version, uri, protocolVersion, icon, appUrl) {\n this.type = 'walletconnect-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n this.uri = uri;\n }\n}\nexports.WalletConnectPairingRequest = WalletConnectPairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedWalletConnectPairingRequest extends WalletConnectPairingRequest {\n constructor(id, name, publicKey, version, senderId, uri, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, uri, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedWalletConnectPairingRequest = ExtendedWalletConnectPairingRequest;\n//# sourceMappingURL=WalletConnectPairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedWalletConnectPairingResponse = exports.WalletConnectPairingResponse = void 0;\n/**\n * @internalapi\n */\nclass WalletConnectPairingResponse {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = \'walletconnect-pairing-response\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.WalletConnectPairingResponse = WalletConnectPairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedWalletConnectPairingResponse extends WalletConnectPairingResponse {\n constructor(id, name, publicKey, version, senderId, extensionId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n this.extensionId = extensionId;\n }\n}\nexports.ExtendedWalletConnectPairingResponse = ExtendedWalletConnectPairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=WalletConnectPairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconMessageType = void 0;\nvar BeaconMessageType;\n(function (BeaconMessageType) {\n BeaconMessageType["BlockchainRequest"] = "blockchain_request";\n BeaconMessageType["PermissionRequest"] = "permission_request";\n BeaconMessageType["SignPayloadRequest"] = "sign_payload_request";\n // EncryptPayloadRequest = \'encrypt_payload_request\',\n BeaconMessageType["OperationRequest"] = "operation_request";\n BeaconMessageType["BroadcastRequest"] = "broadcast_request";\n BeaconMessageType["ChangeAccountRequest"] = "change_account_request";\n BeaconMessageType["BlockchainResponse"] = "blockchain_response";\n BeaconMessageType["PermissionResponse"] = "permission_response";\n BeaconMessageType["SignPayloadResponse"] = "sign_payload_response";\n // EncryptPayloadResponse = \'encrypt_payload_response\',\n BeaconMessageType["ProofOfEventChallengeRequest"] = "proof_of_event_challenge_request";\n BeaconMessageType["ProofOfEventChallengeResponse"] = "proof_of_event_challenge_response";\n BeaconMessageType["SimulatedProofOfEventChallengeRequest"] = "simulated_proof_of_event_challenge_request";\n BeaconMessageType["SimulatedProofOfEventChallengeResponse"] = "simulated_proof_of_event_challenge_response";\n BeaconMessageType["OperationResponse"] = "operation_response";\n BeaconMessageType["BroadcastResponse"] = "broadcast_response";\n BeaconMessageType["Acknowledge"] = "acknowledge";\n BeaconMessageType["Disconnect"] = "disconnect";\n BeaconMessageType["Error"] = "error";\n})(BeaconMessageType || (exports.BeaconMessageType = BeaconMessageType = {}));\n//# sourceMappingURL=BeaconMessageType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkType = void 0;\nvar NetworkType;\n(function (NetworkType) {\n NetworkType["MAINNET"] = "mainnet";\n /** @deprecated Ghostnet is succeeded by shadownet. */\n NetworkType["GHOSTNET"] = "ghostnet";\n NetworkType["WEEKLYNET"] = "weeklynet";\n NetworkType["DAILYNET"] = "dailynet";\n /** @deprecated Seoulnet is succeeded by tallinnnet. */\n NetworkType["SEOULNET"] = "seoulnet";\n NetworkType["SHADOWNET"] = "shadownet";\n NetworkType["TALLINNNET"] = "tallinnnet";\n NetworkType["TEZLINK_SHADOWNET"] = "tezlink-shadownet";\n NetworkType["TEZOSX_PREVIEWNET"] = "tezosx-previewnet";\n /** Tezos X L2 (Michelson runtime) — long-lived mainnet deployment. */\n NetworkType["TEZOSX_MAINNET"] = "tezosx-mainnet";\n /** Tezos X L2 (Michelson runtime) — shadownet deployment. */\n NetworkType["TEZOSX_SHADOWNET"] = "tezosx-shadownet";\n NetworkType["USHUAIANET"] = "ushuaianet";\n NetworkType["CUSTOM"] = "custom";\n})(NetworkType || (exports.NetworkType = NetworkType = {}));\n//# sourceMappingURL=NetworkType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionScope = void 0;\nvar PermissionScope;\n(function (PermissionScope) {\n PermissionScope["SIGN"] = "sign";\n PermissionScope["OPERATION_REQUEST"] = "operation_request";\n PermissionScope["ENCRYPT"] = "encrypt";\n PermissionScope["NOTIFICATION"] = "notification";\n PermissionScope["THRESHOLD"] = "threshold"; // Allows the DApp to sign transactions below a certain threshold. This is currently not fully defined and unused\n})(PermissionScope || (exports.PermissionScope = PermissionScope = {}));\n//# sourceMappingURL=PermissionScope.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.SigningType = void 0;\nvar SigningType;\n(function (SigningType) {\n SigningType["RAW"] = "raw";\n SigningType["OPERATION"] = "operation";\n SigningType["MICHELINE"] = "micheline"; // "05" prefix\n})(SigningType || (exports.SigningType = SigningType = {}));\n//# sourceMappingURL=SigningType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=PermissionRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/Storage.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Storage = void 0;\n/**\n * @internalapi\n *\n * The storage used in the SDK\n */\nclass Storage {\n /**\n * Returns a promise that resolves to true if the storage option is available on this platform.\n */\n static isSupported() {\n return Promise.resolve(false);\n }\n}\nexports.Storage = Storage;\n//# sourceMappingURL=Storage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/Storage.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.StorageKey = void 0;\n/**\n * @internalapi\n */\nvar StorageKey;\n(function (StorageKey) {\n StorageKey["TRANSPORT_P2P_PEERS_DAPP"] = "beacon:communication-peers-dapp";\n StorageKey["TRANSPORT_P2P_PEERS_WALLET"] = "beacon:communication-peers-wallet";\n StorageKey["TRANSPORT_POSTMESSAGE_PEERS_DAPP"] = "beacon:postmessage-peers-dapp";\n StorageKey["TRANSPORT_POSTMESSAGE_PEERS_WALLET"] = "beacon:postmessage-peers-wallet";\n StorageKey["TRANSPORT_WALLETCONNECT_PEERS_DAPP"] = "beacon:walletconnect-peers-dapp";\n StorageKey["LAST_SELECTED_WALLET"] = "beacon:last-selected-wallet";\n StorageKey["ACCOUNTS"] = "beacon:accounts";\n StorageKey["ACTIVE_ACCOUNT"] = "beacon:active-account";\n StorageKey["PUSH_TOKENS"] = "beacon:push-tokens";\n StorageKey["BEACON_SDK_SECRET_SEED"] = "beacon:sdk-secret-seed";\n StorageKey["BEACON_LAST_ERROR"] = "beacon:beacon-last-error";\n StorageKey["APP_METADATA_LIST"] = "beacon:app-metadata-list";\n StorageKey["PERMISSION_LIST"] = "beacon:permissions";\n StorageKey["ONGOING_PROOF_OF_EVENT_CHALLENGES"] = "beacon:ongoing-proof-of-event-challenges";\n StorageKey["BEACON_SDK_VERSION"] = "beacon:sdk_version";\n StorageKey["MATRIX_PRESERVED_STATE"] = "beacon:sdk-matrix-preserved-state";\n StorageKey["MATRIX_PEER_ROOM_IDS"] = "beacon:matrix-peer-rooms";\n StorageKey["MATRIX_SELECTED_NODE"] = "beacon:matrix-selected-node";\n StorageKey["MULTI_NODE_SETUP_DONE"] = "beacon:multi-node-setup";\n StorageKey["USER_ID"] = "beacon:user-id";\n StorageKey["ENABLE_METRICS"] = "beacon:enable_metrics";\n StorageKey["WC_INIT_ERROR"] = "beacon:wc-init-error";\n StorageKey["WC_2_CORE_PAIRING"] = "wc@2:core:0.3:pairing";\n StorageKey["WC_2_CLIENT_SESSION"] = "wc@2:client:0.3:session";\n StorageKey["WC_2_CORE_KEYCHAIN"] = "wc@2:core:0.3:keychain";\n StorageKey["WC_2_CORE_MESSAGES"] = "wc@2:core:0.3:messages";\n StorageKey["WC_2_CLIENT_PROPOSAL"] = "wc@2:client:0.3:proposal";\n StorageKey["WC_2_CORE_SUBSCRIPTION"] = "wc@2:core:0.3:subscription";\n StorageKey["WC_2_CORE_HISTORY"] = "wc@2:core:0.3:history";\n StorageKey["WC_2_CORE_EXPIRER"] = "wc@2:core:0.3:expirer";\n})(StorageKey || (exports.StorageKey = StorageKey = {}));\n//# sourceMappingURL=StorageKey.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.defaultValues = void 0;\nconst StorageKey_1 = __webpack_require__(/*! ./StorageKey */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js");\n/**\n * @internalapi\n */\nexports.defaultValues = {\n [StorageKey_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET]: [],\n [StorageKey_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_WALLET]: [],\n [StorageKey_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.LAST_SELECTED_WALLET]: undefined,\n [StorageKey_1.StorageKey.ACCOUNTS]: [],\n [StorageKey_1.StorageKey.ACTIVE_ACCOUNT]: undefined,\n [StorageKey_1.StorageKey.PUSH_TOKENS]: [],\n [StorageKey_1.StorageKey.BEACON_SDK_SECRET_SEED]: undefined,\n [StorageKey_1.StorageKey.BEACON_LAST_ERROR]: undefined,\n [StorageKey_1.StorageKey.APP_METADATA_LIST]: [],\n [StorageKey_1.StorageKey.PERMISSION_LIST]: [],\n [StorageKey_1.StorageKey.ONGOING_PROOF_OF_EVENT_CHALLENGES]: [],\n [StorageKey_1.StorageKey.BEACON_SDK_VERSION]: undefined,\n [StorageKey_1.StorageKey.MATRIX_PRESERVED_STATE]: {},\n [StorageKey_1.StorageKey.MATRIX_PEER_ROOM_IDS]: {},\n [StorageKey_1.StorageKey.MATRIX_SELECTED_NODE]: undefined,\n [StorageKey_1.StorageKey.MULTI_NODE_SETUP_DONE]: undefined,\n [StorageKey_1.StorageKey.WC_2_CLIENT_SESSION]: undefined,\n [StorageKey_1.StorageKey.USER_ID]: undefined,\n [StorageKey_1.StorageKey.ENABLE_METRICS]: undefined,\n [StorageKey_1.StorageKey.WC_INIT_ERROR]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_PAIRING]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_KEYCHAIN]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_MESSAGES]: undefined,\n [StorageKey_1.StorageKey.WC_2_CLIENT_PROPOSAL]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_SUBSCRIPTION]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_HISTORY]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_EXPIRER]: undefined\n};\n//# sourceMappingURL=StorageKeyReturnDefaults.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosOperationType = void 0;\n/**\n * @publicapi\n * @category Tezos\n */\nvar TezosOperationType;\n(function (TezosOperationType) {\n TezosOperationType["ACTIVATE_ACCOUNT"] = "activate_account";\n TezosOperationType["ATTESTATION"] = "attestation";\n TezosOperationType["ATTESTATIONS_AGGREGATE"] = "attestations_aggregate";\n TezosOperationType["ATTESTATION_WITH_DAL"] = "attestation_with_dal";\n TezosOperationType["BALLOT"] = "ballot";\n TezosOperationType["DAL_PUBLISH_COMMITMENT"] = "dal_publish_commitment";\n TezosOperationType["DELEGATION"] = "delegation";\n TezosOperationType["DRAIN_DELEGATE"] = "drain_delegate";\n TezosOperationType["DOUBLE_ATTESTATION_EVIDENCE"] = "double_attestation_evidence";\n TezosOperationType["DOUBLE_BAKING_EVIDENCE"] = "double_baking_evidence";\n TezosOperationType["DOUBLE_ENDORSEMENT_EVIDENCE"] = "double_endorsement_evidence";\n TezosOperationType["DOUBLE_PREATTESTATION_EVIDENCE"] = "double_preattestation_evidence";\n TezosOperationType["DOUBLE_PREENDORSEMENT_EVIDENCE"] = "double_preendorsement_evidence";\n TezosOperationType["ENDORSEMENT"] = "endorsement";\n TezosOperationType["ENDORSEMENT_WITH_DAL"] = "endorsement_with_dal";\n TezosOperationType["EVENT"] = "event";\n TezosOperationType["FAILING_NOOP"] = "failing_noop";\n TezosOperationType["INCREASE_PAID_STORAGE"] = "increase_paid_storage";\n TezosOperationType["ORIGINATION"] = "origination";\n TezosOperationType["PREATTESTATION"] = "preattestation";\n TezosOperationType["PREATTESTATIONS_AGGREGATE"] = "preattestations_aggregate";\n TezosOperationType["PREENDORSEMENT"] = "preendorsement";\n TezosOperationType["PROPOSALS"] = "proposals";\n TezosOperationType["REGISTER_GLOBAL_CONSTANT"] = "register_global_constant";\n TezosOperationType["REVEAL"] = "reveal";\n TezosOperationType["SEED_NONCE_REVELATION"] = "seed_nonce_revelation";\n TezosOperationType["SET_DEPOSITS_LIMIT"] = "set_deposits_limit";\n TezosOperationType["SMART_ROLLUP_ADD_MESSAGES"] = "smart_rollup_add_messages";\n TezosOperationType["SMART_ROLLUP_CEMENT"] = "smart_rollup_cement";\n TezosOperationType["SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message";\n TezosOperationType["SMART_ROLLUP_ORIGINATE"] = "smart_rollup_originate";\n TezosOperationType["SMART_ROLLUP_PUBLISH"] = "smart_rollup_publish";\n TezosOperationType["SMART_ROLLUP_RECOVER_BOND"] = "smart_rollup_recover_bond";\n TezosOperationType["SMART_ROLLUP_REFUTE"] = "smart_rollup_refute";\n TezosOperationType["SMART_ROLLUP_TIMEOUT"] = "smart_rollup_timeout";\n TezosOperationType["TICKET_UPDATES"] = "ticket_updates";\n TezosOperationType["TRANSACTION"] = "transaction";\n TezosOperationType["TRANSFER_TICKET"] = "transfer_ticket";\n TezosOperationType["UPDATE_CONSENSUS_KEY"] = "update_consensus_key";\n TezosOperationType["UPDATE_COMPANION_KEY"] = "update_companion_key";\n TezosOperationType["VDF_REVELATION"] = "vdf_revelation";\n TezosOperationType["DOUBLE_CONSENSUS_OPERATION_EVIDENCE"] = "double_consensus_operation_evidence";\n TezosOperationType["DAL_ENTRAPMENT_EVIDENCE"] = "dal_entrapment_evidence";\n})(TezosOperationType || (exports.TezosOperationType = TezosOperationType = {}));\n//# sourceMappingURL=OperationTypes.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransportStatus = void 0;\nvar TransportStatus;\n(function (TransportStatus) {\n TransportStatus["NOT_CONNECTED"] = "NOT_CONNECTED";\n TransportStatus["CONNECTING"] = "CONNECTING";\n TransportStatus["CONNECTED"] = "CONNECTED";\n TransportStatus["SECONDARY_TAB_CONNECTED"] = "SECONDARY_TAB_CONNECTED";\n})(TransportStatus || (exports.TransportStatus = TransportStatus = {}));\n//# sourceMappingURL=TransportStatus.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransportType = void 0;\n/**\n * @internalapi\n */\nvar TransportType;\n(function (TransportType) {\n TransportType["CHROME_MESSAGE"] = "chrome_message";\n TransportType["WALLETCONNECT"] = "walletconnect";\n TransportType["POST_MESSAGE"] = "post_message";\n TransportType["LEDGER"] = "ledger";\n TransportType["P2P"] = "p2p";\n})(TransportType || (exports.TransportType = TransportType = {}));\n//# sourceMappingURL=TransportType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ui.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nconst NetworkType_1 = __webpack_require__(/*! ./beacon/NetworkType */ "./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js");\n//# sourceMappingURL=ui.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ui.js?\n}')},"./packages/octez.connect-utils/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.secretbox_MACBYTES = exports.secretbox_NONCEBYTES = exports.CONTRACT_PREFIX = exports.loadWalletLists = exports.generateGUID = exports.sign = exports.generateKeyPairFromSeed = exports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = exports.createSenderSessionKey = exports.createReceiverSessionKey = exports.isPublicKeySC = exports.encodePoeChallengePayload = exports.prefixPublicKey = exports.isValidAddress = exports.signMessage = exports.recipientString = exports.openCryptobox = exports.sealCryptobox = exports.getHexHash = exports.encryptCryptoboxPayload = exports.decryptCryptoboxPayload = exports.getAddressFromPublicKey = exports.toHex = exports.getKeypairFromSeed = exports.ExposedPromiseStatus = exports.ExposedPromise = exports.keys = void 0;\nvar keys_1 = __webpack_require__(/*! ./utils/keys */ "./packages/octez.connect-utils/dist/cjs/utils/keys.js");\nObject.defineProperty(exports, "keys", ({ enumerable: true, get: function () { return keys_1.keys; } }));\nvar exposed_promise_1 = __webpack_require__(/*! ./utils/exposed-promise */ "./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js");\nObject.defineProperty(exports, "ExposedPromise", ({ enumerable: true, get: function () { return exposed_promise_1.ExposedPromise; } }));\nObject.defineProperty(exports, "ExposedPromiseStatus", ({ enumerable: true, get: function () { return exposed_promise_1.ExposedPromiseStatus; } }));\nvar crypto_1 = __webpack_require__(/*! ./utils/crypto */ "./packages/octez.connect-utils/dist/cjs/utils/crypto.js");\nObject.defineProperty(exports, "getKeypairFromSeed", ({ enumerable: true, get: function () { return crypto_1.getKeypairFromSeed; } }));\nObject.defineProperty(exports, "toHex", ({ enumerable: true, get: function () { return crypto_1.toHex; } }));\nObject.defineProperty(exports, "getAddressFromPublicKey", ({ enumerable: true, get: function () { return crypto_1.getAddressFromPublicKey; } }));\nObject.defineProperty(exports, "decryptCryptoboxPayload", ({ enumerable: true, get: function () { return crypto_1.decryptCryptoboxPayload; } }));\nObject.defineProperty(exports, "encryptCryptoboxPayload", ({ enumerable: true, get: function () { return crypto_1.encryptCryptoboxPayload; } }));\nObject.defineProperty(exports, "getHexHash", ({ enumerable: true, get: function () { return crypto_1.getHexHash; } }));\nObject.defineProperty(exports, "sealCryptobox", ({ enumerable: true, get: function () { return crypto_1.sealCryptobox; } }));\nObject.defineProperty(exports, "openCryptobox", ({ enumerable: true, get: function () { return crypto_1.openCryptobox; } }));\nObject.defineProperty(exports, "recipientString", ({ enumerable: true, get: function () { return crypto_1.recipientString; } }));\nObject.defineProperty(exports, "signMessage", ({ enumerable: true, get: function () { return crypto_1.signMessage; } }));\nObject.defineProperty(exports, "isValidAddress", ({ enumerable: true, get: function () { return crypto_1.isValidAddress; } }));\nObject.defineProperty(exports, "prefixPublicKey", ({ enumerable: true, get: function () { return crypto_1.prefixPublicKey; } }));\nObject.defineProperty(exports, "encodePoeChallengePayload", ({ enumerable: true, get: function () { return crypto_1.encodePoeChallengePayload; } }));\nObject.defineProperty(exports, "isPublicKeySC", ({ enumerable: true, get: function () { return crypto_1.isPublicKeySC; } }));\nObject.defineProperty(exports, "createReceiverSessionKey", ({ enumerable: true, get: function () { return crypto_1.createReceiverSessionKey; } }));\nObject.defineProperty(exports, "createSenderSessionKey", ({ enumerable: true, get: function () { return crypto_1.createSenderSessionKey; } }));\nvar ed25519_1 = __webpack_require__(/*! ./utils/ed25519 */ "./packages/octez.connect-utils/dist/cjs/utils/ed25519.js");\nObject.defineProperty(exports, "convertPublicKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertPublicKeyToX25519; } }));\nObject.defineProperty(exports, "convertSecretKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertSecretKeyToX25519; } }));\nObject.defineProperty(exports, "generateKeyPairFromSeed", ({ enumerable: true, get: function () { return ed25519_1.generateKeyPairFromSeed; } }));\nObject.defineProperty(exports, "sign", ({ enumerable: true, get: function () { return ed25519_1.sign; } }));\nvar generate_uuid_1 = __webpack_require__(/*! ./utils/generate-uuid */ "./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js");\nObject.defineProperty(exports, "generateGUID", ({ enumerable: true, get: function () { return generate_uuid_1.generateGUID; } }));\nvar wallet_list_loader_1 = __webpack_require__(/*! ./wallet-list-loader */ "./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js");\nObject.defineProperty(exports, "loadWalletLists", ({ enumerable: true, get: function () { return wallet_list_loader_1.loadWalletLists; } }));\nexports.CONTRACT_PREFIX = \'KT1\';\nexports.secretbox_NONCEBYTES = 24; // crypto_secretbox_NONCEBYTES\nexports.secretbox_MACBYTES = 16; // crypto_secretbox_MACBYTES\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/index.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/crypto.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidAddress = exports.signMessage = exports.secretbox_MACBYTES = exports.secretbox_NONCEBYTES = void 0;\nexports.toHex = toHex;\nexports.getHexHash = getHexHash;\nexports.getKeypairFromSeed = getKeypairFromSeed;\nexports.encryptCryptoboxPayload = encryptCryptoboxPayload;\nexports.decryptCryptoboxPayload = decryptCryptoboxPayload;\nexports.sealCryptobox = sealCryptobox;\nexports.openCryptobox = openCryptobox;\nexports.getAddressFromPublicKey = getAddressFromPublicKey;\nexports.prefixPublicKey = prefixPublicKey;\nexports.recipientString = recipientString;\nexports.encodePoeChallengePayload = encodePoeChallengePayload;\nexports.isPublicKeySC = isPublicKeySC;\nexports.createReceiverSessionKey = createReceiverSessionKey;\nexports.createSenderSessionKey = createSenderSessionKey;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ \"./node_modules/bs58check/src/cjs/index.cjs\"));\nconst nacl_1 = __webpack_require__(/*! @stablelib/nacl */ \"./node_modules/@stablelib/nacl/lib/nacl.js\");\nconst random_1 = __webpack_require__(/*! @stablelib/random */ \"./node_modules/@stablelib/random/lib/random.js\");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ \"./node_modules/@stablelib/utf8/lib/utf8.js\");\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst x25519_session_1 = __webpack_require__(/*! @stablelib/x25519-session */ \"./node_modules/@stablelib/x25519-session/lib/x25519-session.js\");\nconst blake2b_2 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst bytes_1 = __webpack_require__(/*! @stablelib/bytes */ \"./node_modules/@stablelib/bytes/lib/bytes.js\");\nconst ed25519_1 = __webpack_require__(/*! ./ed25519 */ \"./packages/octez.connect-utils/dist/cjs/utils/ed25519.js\");\nexports.secretbox_NONCEBYTES = 24; // crypto_secretbox_NONCEBYTES\nexports.secretbox_MACBYTES = 16; // crypto_secretbox_MACBYTES\nconst POE_CHALLENGE_BYTES_LENGTH = 20;\nconst POE_CHALLENGE_PREFIX = 110;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\n/**\n * Convert a value to hex\n *\n * @param value\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction toHex(value) {\n return Buffer.from(value).toString('hex');\n}\n/**\n * Get the hex hash of a value\n *\n * @param key\n */\nfunction getHexHash(key) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof key === 'string') {\n return toHex((0, blake2b_1.hash)((0, utf8_1.encode)(key), 32));\n }\n return toHex((0, blake2b_1.hash)(key, 32));\n });\n}\n/**\n * Get a keypair from a seed\n *\n * @param seed\n */\nfunction getKeypairFromSeed(seed) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, ed25519_1.generateKeyPairFromSeed)((0, blake2b_1.hash)((0, utf8_1.encode)(seed), 32));\n });\n}\n/**\n * Encrypt a message with a shared key\n *\n * @param message\n * @param sharedKey\n */\nfunction encryptCryptoboxPayload(message, sharedKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const nonce = Buffer.from((0, random_1.randomBytes)(exports.secretbox_NONCEBYTES));\n const combinedPayload = Buffer.concat([\n nonce,\n Buffer.from((0, nacl_1.secretBox)(sharedKey, nonce, Buffer.from(message, 'utf8')))\n ]);\n return toHex(combinedPayload);\n });\n}\n/**\n * Decrypt a message with a shared key\n *\n * @param payload\n * @param sharedKey\n */\nfunction decryptCryptoboxPayload(payload, sharedKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const nonce = payload.slice(0, exports.secretbox_NONCEBYTES);\n const ciphertext = payload.slice(exports.secretbox_NONCEBYTES);\n const openBox = (0, nacl_1.openSecretBox)(sharedKey, nonce, ciphertext);\n if (!openBox) {\n throw new Error('Decryption failed');\n }\n return Buffer.from(openBox).toString('utf8');\n });\n}\n/**\n * Encrypt a message with a public key\n *\n * @param payload\n * @param publicKey\n */\nfunction sealCryptobox(payload, otherPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const kxOtherPublicKey = (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey)); // Secret bytes to scalar bytes\n const keypair = (0, nacl_1.generateKeyPair)();\n const state = new blake2b_2.BLAKE2b(24);\n const nonce = state.update(keypair.publicKey, 32).update(kxOtherPublicKey, 32).digest();\n const bytesPayload = typeof payload === 'string' ? (0, utf8_1.encode)(payload) : payload;\n const encryptedMessage = (0, nacl_1.box)(kxOtherPublicKey, keypair.secretKey, nonce, bytesPayload);\n return toHex((0, bytes_1.concat)(keypair.publicKey, encryptedMessage));\n });\n}\n/**\n * Decrypt a message with public + private key\n *\n * @param encryptedPayload\n * @param publicKey\n * @param privateKey\n */\nfunction openCryptobox(encryptedPayload, publicKey, privateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const kxSelfPrivateKey = (0, ed25519_1.convertSecretKeyToX25519)(Buffer.from(privateKey)); // Secret bytes to scalar bytes\n const kxSelfPublicKey = (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(publicKey)); // Secret bytes to scalar bytes\n const bytesPayload = typeof encryptedPayload === 'string' ? (0, utf8_1.encode)(encryptedPayload) : encryptedPayload;\n const epk = bytesPayload.slice(0, 32);\n const ciphertext = bytesPayload.slice(32);\n const state = new blake2b_2.BLAKE2b(24);\n const nonce = state.update(epk, 32).update(kxSelfPublicKey, 32).digest();\n const decryptedMessage2 = (0, nacl_1.openBox)(epk, kxSelfPrivateKey, nonce, ciphertext);\n if (!decryptedMessage2) {\n throw new Error('Decryption failed');\n }\n return Buffer.from(decryptedMessage2).toString();\n });\n}\n/**\n * Get an address from the public key\n *\n * @param publicKey\n */\nfunction getAddressFromPublicKey(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const prefixes = {\n // tz1...\n edpk: {\n length: 54,\n prefix: Buffer.from(new Uint8Array([6, 161, 159]))\n },\n // tz2...\n sppk: {\n length: 55,\n prefix: Buffer.from(new Uint8Array([6, 161, 161]))\n },\n // tz3...\n p2pk: {\n length: 55,\n prefix: Buffer.from(new Uint8Array([6, 161, 164]))\n },\n // tz4...\n BLpk: {\n length: 76,\n prefix: Buffer.from(new Uint8Array([6, 161, 166]))\n },\n // tz5... (ML-DSA-44, Ushuaia U025). Constants from octez src/lib_crypto/base58.ml:\n // mdpk public key prefix [13,7,237,67] (encoded length 1802); tz5 address prefix [6,161,169].\n // The 4-byte mdpk prefix is stripped by decoded.slice(key.length) just like the other types.\n mdpk: {\n length: 1802,\n prefix: Buffer.from(new Uint8Array([6, 161, 169]))\n }\n };\n let prefix;\n let plainPublicKey;\n if (publicKey.length === 64) {\n prefix = prefixes.edpk.prefix;\n plainPublicKey = publicKey;\n }\n else {\n const entries = Object.entries(prefixes);\n for (let index = 0; index < entries.length; index++) {\n const [key, value] = entries[index];\n if (publicKey.startsWith(key) && publicKey.length === value.length) {\n prefix = value.prefix;\n const decoded = bs58check_1.default.decode(publicKey);\n plainPublicKey = Buffer.from(decoded.slice(key.length, decoded.length)).toString('hex');\n break;\n }\n }\n }\n if (!prefix || !plainPublicKey) {\n throw new Error(`invalid publicKey: ${publicKey}`);\n }\n const payload = (0, blake2b_1.hash)(Buffer.from(plainPublicKey, 'hex'), 20);\n return bs58check_1.default.encode(Buffer.concat([prefix, Buffer.from(payload)]));\n });\n}\n/**\n * Prefix the public key if it's not prefixed\n *\n * @param publicKey\n */\nfunction prefixPublicKey(publicKey) {\n if (publicKey.length !== 64) {\n return publicKey;\n }\n const payload = Buffer.from(publicKey, 'hex');\n return bs58check_1.default.encode(Buffer.concat([new Uint8Array([13, 15, 37, 217]), Buffer.from(payload)]));\n}\n/**\n * Get the recipient string used in the matrix message\n *\n * @param recipientHash\n * @param relayServer\n */\nfunction recipientString(recipientHash, relayServer) {\n return `@${recipientHash}:${relayServer}`;\n}\nconst toBuffer = (message) => __awaiter(void 0, void 0, void 0, function* () {\n if (message.length % 2 !== 0) {\n return (0, utf8_1.encode)(message);\n }\n let adjustedMessage = message;\n if (message.startsWith('0x')) {\n adjustedMessage = message.slice(2);\n }\n const buffer = Buffer.from(adjustedMessage, 'hex');\n if (buffer.length === adjustedMessage.length / 2) {\n return buffer;\n }\n return (0, utf8_1.encode)(message);\n});\nconst coinlibhash = (message_1, ...args_1) => __awaiter(void 0, [message_1, ...args_1], void 0, function* (message, size = 32) {\n return (0, blake2b_1.hash)(message, size);\n});\nconst signMessage = (message, keypair) => __awaiter(void 0, void 0, void 0, function* () {\n const bufferMessage = yield toBuffer(message);\n const edsigPrefix = new Uint8Array([9, 245, 205, 134, 18]);\n const hash = yield coinlibhash(bufferMessage);\n const rawSignature = (0, ed25519_1.sign)(keypair.secretKey, hash);\n const signature = bs58check_1.default.encode(Buffer.concat([Buffer.from(edsigPrefix), Buffer.from(rawSignature)]));\n return signature;\n});\nexports.signMessage = signMessage;\nconst isValidAddress = (address) => {\n const prefixes = ['tz1', 'tz2', 'tz3', 'tz4', 'tz5', 'KT1', 'txr1', 'sr1'];\n if (!prefixes.some((p) => address.toLowerCase().startsWith(p.toLowerCase()))) {\n return false;\n }\n try {\n bs58check_1.default.decode(address);\n }\n catch (error) {\n return false;\n }\n return true;\n};\nexports.isValidAddress = isValidAddress;\nfunction encodePoeChallengePayload(payload) {\n const poeBlake2b = new blake2b_2.BLAKE2b(POE_CHALLENGE_BYTES_LENGTH);\n return bs58check_1.default.encode(Buffer.concat([\n new Uint8Array([POE_CHALLENGE_PREFIX]),\n Buffer.from(poeBlake2b.update(Buffer.from(payload)).digest())\n ]));\n}\n/**\n * Shallow Check (SC): Perform a superficial check to determine if the string contains a public key.\n * Do not use this function to validate the key itself.\n * @param publicKey the public key to analyze\n * @returns true if it contains a known prefix, false otherwise\n */\nfunction isPublicKeySC(publicKey) {\n if (!publicKey) {\n return false;\n }\n return (publicKey.startsWith('edpk') ||\n publicKey.startsWith('sppk') ||\n publicKey.startsWith('p2pk') ||\n publicKey.startsWith('BLpk') ||\n publicKey.startsWith('mdpk'));\n}\n/**\n * Create session keys for receiving encrypted messages from a peer.\n * Use sharedKey.receive for decryption with decryptCryptoboxPayload.\n *\n * @param selfKeyPair Your Ed25519 keypair\n * @param senderPublicKey The sender's public key (hex string)\n * @returns Session keys with .receive for decryption\n */\nfunction createReceiverSessionKey(selfKeyPair, senderPublicKey) {\n return (0, x25519_session_1.serverSessionKeys)({\n publicKey: (0, ed25519_1.convertPublicKeyToX25519)(selfKeyPair.publicKey),\n secretKey: (0, ed25519_1.convertSecretKeyToX25519)(selfKeyPair.secretKey)\n }, (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(senderPublicKey, 'hex')));\n}\n/**\n * Create session keys for sending encrypted messages to a peer.\n * Use sharedKey.send for encryption with encryptCryptoboxPayload.\n *\n * @param selfKeyPair Your Ed25519 keypair\n * @param receiverPublicKey The receiver's public key (hex string)\n * @returns Session keys with .send for encryption\n */\nfunction createSenderSessionKey(selfKeyPair, receiverPublicKey) {\n return (0, x25519_session_1.clientSessionKeys)({\n publicKey: (0, ed25519_1.convertPublicKeyToX25519)(selfKeyPair.publicKey),\n secretKey: (0, ed25519_1.convertSecretKeyToX25519)(selfKeyPair.secretKey)\n }, (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(receiverPublicKey, 'hex')));\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/crypto.js?\n}")},"./packages/octez.connect-utils/dist/cjs/utils/ed25519.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.sign = exports.generateKeyPairFromSeed = exports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = void 0;\nconst ed25519_1 = __webpack_require__(/*! @stablelib/ed25519 */ "./node_modules/@stablelib/ed25519/lib/ed25519.js");\nObject.defineProperty(exports, "convertPublicKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertPublicKeyToX25519; } }));\nObject.defineProperty(exports, "convertSecretKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertSecretKeyToX25519; } }));\nObject.defineProperty(exports, "generateKeyPairFromSeed", ({ enumerable: true, get: function () { return ed25519_1.generateKeyPairFromSeed; } }));\nObject.defineProperty(exports, "sign", ({ enumerable: true, get: function () { return ed25519_1.sign; } }));\n//# sourceMappingURL=ed25519.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/ed25519.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExposedPromise = exports.ExposedPromiseStatus = void 0;\nvar ExposedPromiseStatus;\n(function (ExposedPromiseStatus) {\n ExposedPromiseStatus["PENDING"] = "pending";\n ExposedPromiseStatus["RESOLVED"] = "resolved";\n ExposedPromiseStatus["REJECTED"] = "rejected";\n})(ExposedPromiseStatus || (exports.ExposedPromiseStatus = ExposedPromiseStatus = {}));\nconst notInitialized = () => {\n throw new Error(\'ExposedPromise not initialized yet.\');\n};\n/**\n * Exposed promise allow you to create a promise and then resolve it later, from the outside\n */\nclass ExposedPromise {\n get promise() {\n return this._promise;\n }\n get resolve() {\n return this._resolve;\n }\n get reject() {\n return this._reject;\n }\n get status() {\n return this._status;\n }\n get promiseResult() {\n return this._promiseResult;\n }\n get promiseError() {\n return this._promiseError;\n }\n constructor() {\n this._resolve = notInitialized;\n this._reject = notInitialized;\n this._status = ExposedPromiseStatus.PENDING;\n this._promise = new Promise((innerResolve, innerReject) => {\n this._resolve = (value) => {\n if (this.isSettled()) {\n return;\n }\n this._promiseResult = value;\n innerResolve(value);\n this._status = ExposedPromiseStatus.RESOLVED;\n return;\n };\n this._reject = (reason) => {\n if (this.isSettled()) {\n return;\n }\n this._promiseError = reason;\n innerReject(reason);\n this._status = ExposedPromiseStatus.REJECTED;\n return;\n };\n });\n }\n static resolve(value) {\n const promise = new ExposedPromise();\n promise.resolve(value);\n return promise;\n }\n static reject(reason) {\n const promise = new ExposedPromise();\n promise.reject(reason);\n return promise;\n }\n isPending() {\n return this.status === ExposedPromiseStatus.PENDING;\n }\n isResolved() {\n return this.status === ExposedPromiseStatus.RESOLVED;\n }\n isRejected() {\n return this.status === ExposedPromiseStatus.REJECTED;\n }\n isSettled() {\n return this.isResolved() || this.isRejected();\n }\n}\nexports.ExposedPromise = ExposedPromise;\n//# sourceMappingURL=exposed-promise.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.generateGUID = generateGUID;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nconst random_1 = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/**\n * Generate a random GUID\n */\nfunction generateGUID() {\n return __awaiter(this, void 0, void 0, function* () {\n const buf = (0, random_1.randomBytes)(16);\n return [buf.slice(0, 4), buf.slice(4, 6), buf.slice(6, 8), buf.slice(8, 10), buf.slice(10, 16)]\n .map(function (subbuf) {\n return Buffer.from(subbuf).toString(\'hex\');\n })\n .join(\'-\');\n });\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=generate-uuid.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/keys.js"(__unused_webpack_module,exports){"use strict";eval('{\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.keys = keys;\n/**\n * A helper function to improve typings of object keys\n *\n * @param obj Object\n */\nfunction keys(obj) {\n return Object.keys(obj);\n}\n//# sourceMappingURL=keys.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/keys.js?\n}')},"./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.loadWalletLists = loadWalletLists;\n/**\n * Loads and type-casts wallet lists from a registry JSON\n */\nfunction loadWalletLists(registry) {\n return {\n extensionList: registry.extensionList,\n desktopList: registry.desktopList,\n webList: registry.webList,\n iOSList: registry.iOSList\n };\n}\n//# sourceMappingURL=wallet-list-loader.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js?\n}')},"./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.WalletClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_blockchain_tezos_1 = __webpack_require__(/*! @tezos-x/octez.connect-blockchain-tezos */ \"./packages/octez.connect-blockchain-tezos/dist/cjs/index.js\");\nconst WalletP2PTransport_1 = __webpack_require__(/*! ../transports/WalletP2PTransport */ \"./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js\");\nconst IncomingRequestInterceptor_1 = __webpack_require__(/*! ../interceptors/IncomingRequestInterceptor */ \"./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js\");\nconst OutgoingResponseInterceptor_1 = __webpack_require__(/*! ../interceptors/OutgoingResponseInterceptor */ \"./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js\");\nconst logger = new octez_connect_core_1.Logger('WalletClient');\n/**\n * @publicapi\n *\n * The WalletClient has to be used in the wallet. It handles all the logic related to connecting to beacon-compatible\n * dapps and handling/responding to requests.\n *\n * @warning For browser extensions: The WalletClient maintains a persistent connection that polls relay servers\n * every 30 seconds. Call `destroy()` when the client is no longer needed to stop polling and free resources.\n * For extensions, consider conditional initialization - only connect when there are existing peers or when\n * a new pairing request arrives. See the README for lifecycle management best practices.\n *\n * @category Wallet\n */\nclass WalletClient extends octez_connect_core_1.Client {\n get isConnected() {\n return this._isConnected.promise;\n }\n constructor(config) {\n super(Object.assign({ storage: config && config.storage ? config.storage : new octez_connect_core_1.LocalStorage() }, config));\n /**\n * Returns whether or not the transport is connected\n */\n this._isConnected = new octez_connect_utils_1.ExposedPromise();\n /**\n * This array stores pending requests, meaning requests we received and have not yet handled / sent a response.\n */\n this.pendingRequests = [];\n this.permissionManager = new octez_connect_core_1.PermissionManager(this.storage);\n this.appMetadataManager = new octez_connect_core_1.AppMetadataManager(this.storage);\n // Tezos is the default chain: the wrapped-only pipeline needs the\n // registry handler for every request/response, so registration is no\n // longer a consumer obligation. addBlockchain stays public — a later\n // registration under 'tezos' overrides this default.\n this.addBlockchain(new octez_connect_blockchain_tezos_1.TezosBlockchain());\n }\n init() {\n const _super = Object.create(null, {\n init: { get: () => super.init }\n });\n return __awaiter(this, void 0, void 0, function* () {\n const keyPair = yield this.keyPair; // We wait for keypair here so the P2P Transport creation is not delayed and causing issues\n const p2pTransport = new WalletP2PTransport_1.WalletP2PTransport(this.name, keyPair, this.storage, this.matrixNodes, this.iconUrl, this.appUrl);\n return _super.init.call(this, p2pTransport);\n });\n }\n /**\n * This method initiates a connection to the P2P network and registers a callback that will be called\n * whenever a message is received.\n *\n * @param newMessageCallback The callback that will be invoked for every message the transport receives.\n */\n connect(newMessageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n this.handleResponse = (message, connectionContext) => __awaiter(this, void 0, void 0, function* () {\n // Define valid request types that wallets should process\n const validRequestTypes = [\n octez_connect_types_1.BeaconMessageType.PermissionRequest,\n octez_connect_types_1.BeaconMessageType.OperationRequest,\n octez_connect_types_1.BeaconMessageType.SignPayloadRequest,\n octez_connect_types_1.BeaconMessageType.BroadcastRequest,\n octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeRequest,\n octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeRequest,\n octez_connect_types_1.BeaconMessageType.BlockchainRequest,\n octez_connect_types_1.BeaconMessageType.ChangeAccountRequest\n ];\n if ((0, octez_connect_core_1.usesWrappedMessages)(message.version)) {\n const typedMessage = message;\n if (typedMessage.message.type === octez_connect_types_1.BeaconMessageType.Disconnect) {\n return this.disconnect(typedMessage.senderId);\n }\n // Filter out response types (echoed back from Matrix room)\n if (!validRequestTypes.includes(typedMessage.message.type)) {\n return;\n }\n if (!this.pendingRequests.some((request) => request[0].id === message.id)) {\n this.pendingRequests.push([typedMessage, connectionContext]);\n yield this.sendAcknowledgeResponse(typedMessage, connectionContext);\n yield IncomingRequestInterceptor_1.IncomingRequestInterceptor.intercept({\n message: typedMessage,\n connectionInfo: connectionContext,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: newMessageCallback\n });\n }\n }\n else {\n // Legacy flat v2 dialect (a v4.8.x dApp): served transparently — the\n // flat request is already the shape wallet apps consume, and the\n // response is emitted back in the same dialect (see\n // OutgoingResponseInterceptor).\n const typedMessage = message;\n if (typedMessage.type === octez_connect_types_1.BeaconMessageType.Disconnect) {\n return this.disconnect(typedMessage.senderId);\n }\n // Filter out response types (echoed back from Matrix room)\n if (!validRequestTypes.includes(typedMessage.type)) {\n return;\n }\n if (!this.pendingRequests.some((request) => request[0].id === message.id)) {\n this.pendingRequests.push([typedMessage, connectionContext]);\n if (typedMessage.version && typedMessage.version !== '1') {\n yield this.sendAcknowledgeResponse(typedMessage, connectionContext);\n }\n yield IncomingRequestInterceptor_1.IncomingRequestInterceptor.intercept({\n message: typedMessage,\n connectionInfo: connectionContext,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: newMessageCallback\n });\n }\n }\n });\n return this._connect();\n });\n }\n getRegisterPushChallenge(backendUrl_1, accountPublicKey_1) {\n return __awaiter(this, arguments, void 0, function* (backendUrl, accountPublicKey, oracleUrl = octez_connect_core_1.NOTIFICATION_ORACLE_URL) {\n // Check if account is already registered\n const challengeResponse = yield fetch(`${oracleUrl}/challenge`);\n if (!challengeResponse.ok) {\n throw new Error(`getRegisterPushChallenge failed: ${challengeResponse.status} ${challengeResponse.statusText}`);\n }\n const challenge = yield challengeResponse.json();\n const constructedString = [\n 'Tezos Signed Message: ',\n challenge.id,\n challenge.timestamp,\n accountPublicKey,\n backendUrl\n ].join(' ');\n const bytes = (0, octez_connect_utils_1.toHex)(constructedString);\n const payloadBytes = `05` + `01${bytes.length.toString(16).padStart(8, '0')}${bytes}`;\n return {\n challenge,\n payloadToSign: payloadBytes\n };\n });\n }\n registerPush(challenge_1, signature_1, backendUrl_1, accountPublicKey_1, protocolIdentifier_1, deviceId_1) {\n return __awaiter(this, arguments, void 0, function* (challenge, signature, backendUrl, accountPublicKey, protocolIdentifier, deviceId, oracleUrl = octez_connect_core_1.NOTIFICATION_ORACLE_URL) {\n const tokens = yield this.storage.get(octez_connect_types_1.StorageKey.PUSH_TOKENS);\n const token = tokens.find((el) => el.publicKey === accountPublicKey && el.backendUrl === backendUrl);\n if (token) {\n return token;\n }\n const registerResponse = yield fetch(`${oracleUrl}/register`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n name: this.name,\n challenge,\n accountPublicKey,\n signature,\n backendUrl,\n protocolIdentifier,\n deviceId\n })\n });\n if (!registerResponse.ok) {\n throw new Error(`registerPush failed: ${registerResponse.status} ${registerResponse.statusText}`);\n }\n const register = yield registerResponse.json();\n const newToken = {\n publicKey: accountPublicKey,\n backendUrl,\n accessToken: register.accessToken,\n managementToken: register.managementToken\n };\n tokens.push(newToken);\n yield this.storage.set(octez_connect_types_1.StorageKey.PUSH_TOKENS, tokens);\n return newToken;\n });\n }\n /**\n * The method will attempt to initiate a connection using the active transport.\n */\n _connect() {\n return __awaiter(this, arguments, void 0, function* (attempts = 3) {\n const transport = (yield this.transport);\n if (attempts == 0 || transport.connectionStatus !== octez_connect_types_1.TransportStatus.NOT_CONNECTED) {\n return;\n }\n try {\n yield transport.connect();\n }\n catch (err) {\n logger.warn('_connect', err.message);\n yield transport.disconnect();\n yield this._connect(--attempts);\n return;\n }\n transport\n .addListener((message, connectionInfo) => __awaiter(this, void 0, void 0, function* () {\n if (typeof message === 'string') {\n const peer = yield this.findPeer(connectionInfo.id);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const deserializedMessage = (yield new octez_connect_core_1.Serializer(protocolVersion).deserialize(message));\n this.handleResponse(deserializedMessage, connectionInfo);\n }\n }))\n .catch((error) => logger.log('_connect', error));\n this._isConnected.resolve(true);\n });\n }\n /**\n * This method sends a response for a specific request back to the DApp\n *\n * @param message The BeaconResponseMessage that will be sent back to the DApp\n */\n respond(message) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('RESPONSE', message);\n const request = this.pendingRequests.find((pendingRequest) => pendingRequest[0].id === message.id);\n if (!request) {\n throw new Error('No matching request found!');\n }\n this.pendingRequests = this.pendingRequests.filter((pendingRequest) => pendingRequest[0].id !== message.id);\n yield OutgoingResponseInterceptor_1.OutgoingResponseInterceptor.intercept({\n senderId: yield (0, octez_connect_core_1.getSenderId)(yield this.beaconId),\n request: request[0],\n message,\n ownAppMetadata: yield this.getOwnAppMetadata(),\n permissionManager: this.permissionManager,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: (response) => __awaiter(this, void 0, void 0, function* () {\n yield this.respondToMessage(response, request[1]);\n }),\n blockchains: this.blockchains\n });\n });\n }\n getAppMetadataList() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.getAppMetadataList();\n });\n }\n getAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.getAppMetadata(senderId);\n });\n }\n removeAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.removeAppMetadata(senderId);\n });\n }\n removeAllAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.removeAllAppMetadata();\n });\n }\n getPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.getPermissions();\n });\n }\n getPermission(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.getPermission(accountIdentifier);\n });\n }\n removePermission(accountIdentifier, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.removePermission(accountIdentifier, senderId);\n });\n }\n removeAllPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.removeAllPermissions();\n });\n }\n getPeerInfo(peer) {\n return __awaiter(this, void 0, void 0, function* () {\n const senderId = yield (0, octez_connect_core_1.getSenderId)(peer.publicKey);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n if (peer instanceof octez_connect_types_1.PostMessagePairingRequest || peer instanceof octez_connect_types_1.ExtendedPostMessagePairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedPostMessagePairingRequest(base.id, base.name, base.publicKey, base.version, senderId, protocolVersion, base.icon, base.appUrl);\n }\n if (peer instanceof octez_connect_types_1.P2PPairingRequest || peer instanceof octez_connect_types_1.ExtendedP2PPairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedP2PPairingRequest(base.id, base.name, base.publicKey, base.version, base.relayServer, senderId, protocolVersion, base.icon, base.appUrl);\n }\n if (peer instanceof octez_connect_types_1.WalletConnectPairingRequest ||\n peer instanceof octez_connect_types_1.ExtendedWalletConnectPairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedWalletConnectPairingRequest(base.id, base.name, base.publicKey, base.version, senderId, base.uri, protocolVersion, base.icon, base.appUrl);\n }\n return Object.assign(Object.assign({}, peer), { senderId,\n protocolVersion });\n });\n }\n /**\n * Add a new peer to the known peers\n * @param peer The new peer to add\n */\n addPeer(peer_1) {\n return __awaiter(this, arguments, void 0, function* (peer, sendPairingResponse = true) {\n return (yield this.transport).addPeer(yield this.getPeerInfo(peer), sendPairingResponse);\n });\n }\n removePeer(peer_1) {\n return __awaiter(this, arguments, void 0, function* (peer, sendDisconnectToPeer = false) {\n const removePeerResult = (yield this.transport).removePeer(peer);\n yield this.removePermissionsForPeers([peer]);\n if (sendDisconnectToPeer) {\n yield this.sendDisconnectToPeer(peer);\n }\n return removePeerResult;\n });\n }\n removeAllPeers() {\n return __awaiter(this, arguments, void 0, function* (sendDisconnectToPeers = false) {\n const peers = yield (yield this.transport).getPeers();\n const removePeerResult = (yield this.transport).removeAllPeers();\n yield this.removePermissionsForPeers(peers);\n if (sendDisconnectToPeers) {\n const disconnectPromises = peers.map((peer) => this.sendDisconnectToPeer(peer));\n yield Promise.all(disconnectPromises);\n }\n return removePeerResult;\n });\n }\n removePermissionsForPeers(peersToRemove) {\n return __awaiter(this, void 0, void 0, function* () {\n const permissions = yield this.permissionManager.getPermissions();\n const peerIdsToRemove = peersToRemove.map((peer) => peer.senderId);\n // Remove all permissions with origin of the specified peer\n const permissionsToRemove = permissions.filter((permission) => peerIdsToRemove.includes(permission.appMetadata.senderId));\n const permissionIdentifiersToRemove = permissionsToRemove.map((permissionInfo) => permissionInfo.accountIdentifier);\n yield this.permissionManager.removePermissions(permissionIdentifiersToRemove);\n });\n }\n /**\n * Send an acknowledge message back to the sender\n *\n * @param message The message that was received\n */\n sendAcknowledgeResponse(request, connectionContext) {\n return __awaiter(this, void 0, void 0, function* () {\n // Acknowledge the message\n const acknowledgeResponse = {\n id: request.id,\n type: octez_connect_types_1.BeaconMessageType.Acknowledge\n };\n yield OutgoingResponseInterceptor_1.OutgoingResponseInterceptor.intercept({\n senderId: yield (0, octez_connect_core_1.getSenderId)(yield this.beaconId),\n request,\n message: acknowledgeResponse,\n ownAppMetadata: yield this.getOwnAppMetadata(),\n permissionManager: this.permissionManager,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: (response) => __awaiter(this, void 0, void 0, function* () {\n yield this.respondToMessage(response, connectionContext);\n }),\n blockchains: this.blockchains\n });\n });\n }\n /**\n * An internal method to send a BeaconMessage to the DApp\n *\n * @param response Send a message back to the DApp\n */\n respondToMessage(response, connectionContext) {\n return __awaiter(this, void 0, void 0, function* () {\n let peer;\n if (connectionContext) {\n peer = yield this.findPeer(connectionContext.id);\n }\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const serializedMessage = yield new octez_connect_core_1.Serializer(protocolVersion).serialize(response);\n if (connectionContext) {\n yield (yield this.transport).send(serializedMessage, peer);\n }\n else {\n yield (yield this.transport).send(serializedMessage);\n }\n });\n }\n disconnect(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n const transport = yield this.transport;\n const peers = yield transport.getPeers();\n const peer = peers.find((peerEl) => peerEl.senderId === senderId);\n if (peer) {\n yield this.removePeer(peer);\n }\n return;\n });\n }\n}\nexports.WalletClient = WalletClient;\n//# sourceMappingURL=WalletClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.WalletClient = void 0;\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-core */ "./packages/octez.connect-core/dist/cjs/src/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-transport-matrix */ "./packages/octez.connect-transport-matrix/dist/cjs/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js"), exports);\nconst WalletClient_1 = __webpack_require__(/*! ./client/WalletClient */ "./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js");\nObject.defineProperty(exports, "WalletClient", ({ enumerable: true, get: function () { return WalletClient_1.WalletClient; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/index.js?\n}')},"./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IncomingRequestInterceptor = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst logger = new octez_connect_core_1.Logger('IncomingRequestInterceptor');\n// Chain identifiers whose wrapped payloads are normalized back to the flat\n// request shapes Tezos wallet apps have always consumed ('xtz' is the\n// pre-rename legacy identifier). Other chains (e.g. substrate) keep the\n// wrapped pass-through of the generic API.\nconst TEZOS_IDENTIFIERS = ['tezos', 'xtz'];\n// Wrapped Tezos blockchainData discriminators → the flat BeaconMessageType\n// the wallet app receives. Values reuse the pre-fork wire strings.\nconst TEZOS_PAYLOAD_TO_FLAT_TYPE = {\n operation_request: octez_connect_types_1.BeaconMessageType.OperationRequest,\n sign_payload_request: octez_connect_types_1.BeaconMessageType.SignPayloadRequest,\n broadcast_request: octez_connect_types_1.BeaconMessageType.BroadcastRequest,\n proof_of_event_challenge_request: octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeRequest,\n simulated_proof_of_event_challenge_request: octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeRequest\n};\n/**\n * @internalapi\n *\n * The IncomingRequestInterceptor is used in the WalletClient to intercept an\n * incoming (wrapped) request, enrich it with app metadata, and — for Tezos\n * payloads — normalize it to the flat request shape wallet apps consume, so\n * apps never see envelopes or version strings.\n */\nclass IncomingRequestInterceptor {\n /**\n * The method that is called during the interception\n *\n * @param config\n */\n static intercept(config) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('INTERCEPTING REQUEST', config.message);\n // Negotiated wire: flat '2' arrivals are the legacy dialect (a v4.8.x\n // dApp) and already carry the shape wallet apps consume — they only need\n // enrichment. Wrapped arrivals (v3+) are unwrapped and, for Tezos\n // payloads, normalized to the same flat shapes. Anything else (absent or\n // malformed version — untrusted input) is dropped, never dispatched.\n if ((0, octez_connect_core_1.usesWrappedMessages)(config.message.version)) {\n yield IncomingRequestInterceptor.handleWrappedMessage(config);\n }\n else if (config.message.version === '2') {\n yield IncomingRequestInterceptor.handleFlatMessage(config);\n }\n else {\n logger.warn('intercept', `Dropping message with unsupported version ${JSON.stringify(config.message.version)}`);\n }\n });\n }\n // Legacy flat v2 dialect: enrich with app metadata and pass through — the\n // output shape is identical to the wrapped path's flat normalization, so\n // wallet apps cannot tell which dialect the dApp spoke.\n static handleFlatMessage(config) {\n return __awaiter(this, void 0, void 0, function* () {\n const { connectionInfo, appMetadataManager, interceptorCallback } = config;\n const message = config.message;\n if (message.type === octez_connect_types_1.BeaconMessageType.PermissionRequest) {\n // TODO: Remove v1 compatibility in later version\n let dappMetadata = message.appMetadata;\n const legacyBeaconId = dappMetadata.beaconId;\n if (legacyBeaconId && !dappMetadata.senderId) {\n dappMetadata = Object.assign(Object.assign({}, dappMetadata), { senderId: legacyBeaconId });\n delete dappMetadata.beaconId;\n }\n yield appMetadataManager.addAppMetadata(dappMetadata);\n interceptorCallback(Object.assign(Object.assign({}, message), { appMetadata: dappMetadata }), connectionInfo);\n return;\n }\n const appMetadata = yield IncomingRequestInterceptor.getAppMetadata(appMetadataManager, message.senderId);\n interceptorCallback(Object.assign({ appMetadata }, message), connectionInfo);\n });\n }\n static getAppMetadata(appMetadataManager, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n const appMetadata = yield appMetadataManager.getAppMetadata(senderId);\n if (!appMetadata) {\n throw new Error('AppMetadata not found');\n }\n return appMetadata;\n });\n }\n static handleWrappedMessage(config) {\n return __awaiter(this, void 0, void 0, function* () {\n const { message: msg, connectionInfo, appMetadataManager, interceptorCallback } = config;\n const wrappedMessage = msg;\n const v3Message = wrappedMessage.message;\n const isTezos = TEZOS_IDENTIFIERS.includes(v3Message.blockchainIdentifier);\n switch (v3Message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionRequest:\n {\n const appMetadata = Object.assign(Object.assign({}, v3Message.blockchainData.appMetadata), { senderId: msg.senderId // Make sure we use the actual senderId, not what the dApp told us\n });\n yield appMetadataManager.addAppMetadata(appMetadata);\n if (isTezos) {\n // Flat normalization: {type, id, senderId, version, appMetadata,\n // network, networks?, scopes} — exactly the pre-fork shape.\n const payload = Object.assign({}, v3Message.blockchainData);\n delete payload.appMetadata;\n const request = Object.assign({ type: octez_connect_types_1.BeaconMessageType.PermissionRequest, id: wrappedMessage.id, version: wrappedMessage.version, senderId: wrappedMessage.senderId, appMetadata }, payload);\n interceptorCallback(request, connectionInfo);\n }\n else {\n interceptorCallback(wrappedMessage, connectionInfo);\n }\n }\n break;\n case octez_connect_types_1.BeaconMessageType.BlockchainRequest:\n {\n const blockchainRequest = v3Message;\n const payloadType = blockchainRequest.blockchainData.type;\n const flatType = payloadType ? TEZOS_PAYLOAD_TO_FLAT_TYPE[payloadType] : undefined;\n if (isTezos && flatType) {\n const appMetadata = yield IncomingRequestInterceptor.getAppMetadata(appMetadataManager, msg.senderId);\n const payload = Object.assign({}, blockchainRequest.blockchainData);\n delete payload.type;\n delete payload.scope;\n const request = Object.assign({ type: flatType, id: wrappedMessage.id, version: wrappedMessage.version, senderId: wrappedMessage.senderId, appMetadata }, payload);\n interceptorCallback(request, connectionInfo);\n }\n else {\n interceptorCallback(Object.assign({}, wrappedMessage), connectionInfo);\n }\n }\n break;\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(v3Message);\n }\n });\n }\n}\nexports.IncomingRequestInterceptor = IncomingRequestInterceptor;\n//# sourceMappingURL=IncomingRequestInterceptor.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.OutgoingResponseInterceptor = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new octez_connect_core_1.Logger('OutgoingResponseInterceptor');\n// The wallet app's `respond()` input is either one of the flat convenience\n// shapes (unchanged public API — Tezos wallets never see wrapped envelopes)\n// or an already-wrapped message from the generic chain-agnostic API.\nconst isWrappedInput = (message) => message.message !== undefined;\n// Maps each flat Tezos response type to its wrapped blockchainData\n// discriminator (the pre-fork flat wire strings, kept verbatim).\nconst FLAT_RESPONSE_PAYLOAD_TYPES = {\n [octez_connect_types_1.BeaconMessageType.OperationResponse]: 'operation_response',\n [octez_connect_types_1.BeaconMessageType.SignPayloadResponse]: 'sign_payload_response',\n [octez_connect_types_1.BeaconMessageType.BroadcastResponse]: 'broadcast_response',\n [octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeResponse]: 'proof_of_event_challenge_response',\n [octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeResponse]: 'simulated_proof_of_event_challenge_response'\n};\n/**\n * @internalapi\n *\n * The OutgoingResponseInterceptor is used in the WalletClient to intercept an\n * outgoing response, wrap it onto the (wrapped-only) wire, validate it via the\n * blockchain registry, and persist granted permissions.\n */\nclass OutgoingResponseInterceptor {\n static intercept(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (isWrappedInput(config.message)) {\n yield OutgoingResponseInterceptor.handleWrappedInput(config);\n }\n else {\n yield OutgoingResponseInterceptor.handleFlatInput(config);\n }\n });\n }\n // Generic chain-agnostic wallet API: the app responds with an\n // already-wrapped message (substrate flow, examples/wallet-v3.html).\n static handleWrappedInput(config) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { senderId, request, message: msg, ownAppMetadata, interceptorCallback, blockchains } = config;\n const wrappedMessage = msg;\n const v3Message = wrappedMessage.message;\n // The pre-fork escape hatch that leaked flat Acknowledge/Error messages\n // through unwrapped is gone: those now arrive as flat inputs and are\n // wrapped in handleFlatInput.\n if (v3Message === undefined) {\n throw new Error('Malformed wrapped response: missing message payload');\n }\n const blockchain = OutgoingResponseInterceptor.requireBlockchain(blockchains, v3Message.blockchainIdentifier);\n switch (v3Message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionResponse:\n {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)({ id: wrappedMessage.id, version: request.version, senderId }, {\n blockchainIdentifier: v3Message.blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.PermissionResponse,\n blockchainData: Object.assign(Object.assign({}, v3Message.blockchainData), { appMetadata: ownAppMetadata })\n });\n yield OutgoingResponseInterceptor.persistGrantedPermissions(config, blockchain, response);\n interceptorCallback(response);\n }\n break;\n case octez_connect_types_1.BeaconMessageType.BlockchainResponse:\n {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)({ id: wrappedMessage.id, version: request.version, senderId }, {\n blockchainIdentifier: v3Message.blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.BlockchainResponse,\n blockchainData: Object.assign({}, wrappedMessage.message.blockchainData)\n });\n yield ((_a = blockchain.validateResponse) === null || _a === void 0 ? void 0 : _a.call(blockchain, response.message));\n interceptorCallback(response);\n }\n break;\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(v3Message);\n }\n });\n }\n // Flat convenience inputs: the unchanged wallet-app API. Each flat response\n // is serialized onto the wire here; the app never handles envelopes.\n // The wire dialect echoes the REQUEST's: wrapped for v3+ requests, flat v2\n // for legacy (v4.8.x) dApps — validation and permission persistence run on\n // the same internal (wrapped) representation regardless.\n static handleFlatInput(config) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { senderId, request, message, interceptorCallback, blockchains, ownAppMetadata } = config;\n // Legacy dialect: the response must be parseable by the flat-v2 peer\n // that sent the request.\n const legacyDialect = !(0, octez_connect_core_1.usesWrappedMessages)(request.version);\n const requestInner = request.message;\n const blockchainIdentifier = (_a = requestInner === null || requestInner === void 0 ? void 0 : requestInner.blockchainIdentifier) !== null && _a !== void 0 ? _a : 'tezos';\n const envelope = { id: message.id, version: request.version, senderId };\n switch (message.type) {\n case octez_connect_types_1.BeaconMessageType.Error: {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.Error,\n blockchainData: undefined,\n error: { type: message.errorType },\n description: message.description\n });\n if (message.errorType === octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR && message.errorData) {\n const errorData = message.errorData;\n // Check if error data is in correct format\n if (Array.isArray(errorData) &&\n errorData.every((item) => Boolean(item.kind) && Boolean(item.id))) {\n response.message.error.data = message.errorData;\n }\n else {\n logger.warn('ErrorData provided is not in correct format. It needs to be an array of RPC errors. It will not be included in the message sent to the dApp');\n }\n }\n if (legacyDialect) {\n const flatResponse = {\n type: octez_connect_types_1.BeaconMessageType.Error,\n version: request.version,\n senderId,\n id: message.id,\n errorType: message.errorType\n };\n if (response.message.error.data !== undefined) {\n flatResponse.errorData = response.message.error.data;\n }\n interceptorCallback(flatResponse);\n }\n else {\n interceptorCallback(response);\n }\n break;\n }\n case octez_connect_types_1.BeaconMessageType.Acknowledge: {\n if (legacyDialect) {\n interceptorCallback({\n type: octez_connect_types_1.BeaconMessageType.Acknowledge,\n version: request.version,\n senderId,\n id: message.id\n });\n break;\n }\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n type: octez_connect_types_1.BeaconMessageType.Acknowledge\n });\n interceptorCallback(response);\n break;\n }\n case octez_connect_types_1.BeaconMessageType.PermissionResponse: {\n const blockchain = OutgoingResponseInterceptor.requireBlockchain(blockchains, blockchainIdentifier);\n const flat = message;\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.PermissionResponse,\n blockchainData: {\n appMetadata: ownAppMetadata,\n scopes: flat.scopes,\n publicKey: flat.publicKey,\n address: flat.address,\n network: flat.network,\n accounts: flat.accounts,\n walletType: flat.walletType,\n verificationType: flat.verificationType,\n threshold: flat.threshold,\n notification: flat.notification\n }\n });\n // Validation + batched persistence always run on the internal\n // wrapped representation, whichever dialect goes on the wire.\n yield OutgoingResponseInterceptor.persistGrantedPermissions(config, blockchain, response);\n if (legacyDialect) {\n interceptorCallback(Object.assign({ senderId, version: request.version, appMetadata: ownAppMetadata }, message));\n }\n else {\n interceptorCallback(response);\n }\n break;\n }\n case octez_connect_types_1.BeaconMessageType.OperationResponse:\n case octez_connect_types_1.BeaconMessageType.SignPayloadResponse:\n case octez_connect_types_1.BeaconMessageType.BroadcastResponse:\n case octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeResponse:\n case octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeResponse: {\n if (legacyDialect) {\n interceptorCallback(Object.assign({ senderId, version: request.version }, message));\n break;\n }\n const payloadType = FLAT_RESPONSE_PAYLOAD_TYPES[message.type];\n const payload = Object.assign({}, message);\n delete payload.id;\n delete payload.type;\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.BlockchainResponse,\n blockchainData: Object.assign({ type: payloadType }, payload)\n });\n interceptorCallback(response);\n break;\n }\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(message);\n }\n });\n }\n static requireBlockchain(blockchains, identifier) {\n const blockchain = blockchains.get(identifier);\n if (blockchain === undefined) {\n throw new Error(`Blockchain \"${identifier}\" not supported`);\n }\n return blockchain;\n }\n // Shared permission persistence for both input styles: validate the\n // response via the chain handler (ported flat-v2 address/publicKey/\n // abstracted-account checks), parse it into per-network accounts, and\n // persist all grants in ONE batched write (N racing addPermission calls\n // used to lose updates on the shared permission list).\n static persistGrantedPermissions(config, blockchain, response) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { request, permissionManager, appMetadataManager } = config;\n yield ((_a = blockchain.validateResponse) === null || _a === void 0 ? void 0 : _a.call(blockchain, response.message));\n const appMetadata = yield appMetadataManager.getAppMetadata(request.senderId);\n if (!appMetadata) {\n throw new Error('AppMetadata not found');\n }\n // This wallet just served the response, so the routing key for the\n // parser is its own BEACON_VERSION.\n const accountInfos = yield blockchain.getAccountInfosFromPermissionResponse(response.message, octez_connect_core_1.BEACON_VERSION);\n const permissions = accountInfos.map((accountInfo) => {\n var _a;\n return ({\n accountIdentifier: accountInfo.accountId,\n senderId: request.senderId,\n appMetadata,\n website: '',\n address: accountInfo.address,\n publicKey: accountInfo.publicKey,\n network: (_a = accountInfo.network) !== null && _a !== void 0 ? _a : OutgoingResponseInterceptor.networkFromRequest(request),\n scopes: accountInfo.scopes,\n connectedAt: new Date().getTime()\n });\n });\n yield permissionManager.addPermissions(permissions);\n });\n }\n // Network echo for permission records whose parser entry carries no\n // network: prefer what the dApp actually requested over a blind MAINNET\n // default (kept only as the logged last resort). Reads the wrapped\n // payload for v3+ requests and the top-level field for flat v2 requests.\n static networkFromRequest(request) {\n const data = request.message !== undefined\n ? request.message.blockchainData\n : request;\n const requestedNetwork = data === null || data === void 0 ? void 0 : data.network;\n if (requestedNetwork && typeof requestedNetwork === 'object') {\n return requestedNetwork;\n }\n const requestedNetworks = data === null || data === void 0 ? void 0 : data.networks;\n if (Array.isArray(requestedNetworks) && requestedNetworks.length > 0) {\n const first = requestedNetworks[0];\n if (first === null || first === void 0 ? void 0 : first.chainId) {\n return (0, octez_connect_core_1.networkFromTezosCaip2)((0, octez_connect_core_1.normalizeTezosCaip2)(first.chainId), { name: first.name });\n }\n }\n logger.warn('networkFromRequest', 'Permission request carried no network; defaulting the stored permission to MAINNET');\n return { type: octez_connect_types_1.NetworkType.MAINNET };\n }\n}\nexports.OutgoingResponseInterceptor = OutgoingResponseInterceptor;\n//# sourceMappingURL=OutgoingResponseInterceptor.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.WalletP2PTransport = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst octez_connect_transport_matrix_1 = __webpack_require__(/*! @tezos-x/octez.connect-transport-matrix */ "./packages/octez.connect-transport-matrix/dist/cjs/index.js");\n// const logger = new Logger(\'DappP2PTransport\')\n/**\n * @internalapi\n *\n *\n */\nclass WalletP2PTransport extends octez_connect_transport_matrix_1.P2PTransport {\n constructor(name, keyPair, storage, matrixNodes, iconUrl, appUrl) {\n super(name, keyPair, storage, matrixNodes, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET, iconUrl, appUrl);\n }\n addPeer(newPeer_1) {\n const _super = Object.create(null, {\n addPeer: { get: () => super.addPeer }\n });\n return __awaiter(this, arguments, void 0, function* (newPeer, sendPairingResponse = true) {\n yield _super.addPeer.call(this, newPeer);\n if (sendPairingResponse) {\n yield this.client.sendPairingResponse(newPeer); // TODO: Should we have a confirmation here?\n }\n });\n }\n}\nexports.WalletP2PTransport = WalletP2PTransport;\n//# sourceMappingURL=WalletP2PTransport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js?\n}')},"./node_modules/base-x/src/cjs/index.cjs"(__unused_webpack_module,exports){"use strict";eval("{\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nObject.defineProperty(exports, \"__esModule\", ({ value: true }))\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n const BASE_MAP = new Uint8Array(256)\n for (let j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (let i = 0; i < ALPHABET.length; i++) {\n const x = ALPHABET.charAt(i)\n const xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n const BASE = ALPHABET.length\n const LEADER = ALPHABET.charAt(0)\n const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n // eslint-disable-next-line no-empty\n if (source instanceof Uint8Array) { } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n let zeroes = 0\n let length = 0\n let pbegin = 0\n const pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n const size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n const b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n let carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n let i = 0\n for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n let it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n let str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n let psz = 0\n // Skip and count leading '1's.\n let zeroes = 0\n let length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n const b256 = new Uint8Array(size)\n // Process the characters.\n while (psz < source.length) {\n // Find code of next character\n const charCode = source.charCodeAt(psz)\n // Base map can not be indexed using char code\n if (charCode > 255) { return }\n // Decode character\n let carry = BASE_MAP[charCode]\n // Invalid character\n if (carry === 255) { return }\n let i = 0\n for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n let it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n const vch = new Uint8Array(zeroes + (size - it4))\n let j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n const buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode,\n decodeUnsafe,\n decode\n }\n}\nexports[\"default\"] = base\n\n\n//# sourceURL=webpack://beacon/./node_modules/base-x/src/cjs/index.cjs?\n}")},"./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js"(module){eval('{function _typeof(o) {\n "@babel/helpers - typeof";\n\n return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js?\n}')},"./node_modules/bs58/src/cjs/index.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar base_x_1 = __importDefault(__webpack_require__(/*! base-x */ "./node_modules/base-x/src/cjs/index.cjs"));\nvar ALPHABET = \'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\';\nexports["default"] = (0, base_x_1.default)(ALPHABET);\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58/src/cjs/index.cjs?\n}')},"./node_modules/bs58check/src/cjs/base.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = default_1;\nvar bs58_1 = __importDefault(__webpack_require__(/*! bs58 */ "./node_modules/bs58/src/cjs/index.cjs"));\nfunction default_1(checksumFn) {\n // Encode a buffer as a base58-check encoded string\n function encode(payload) {\n var payloadU8 = Uint8Array.from(payload);\n var checksum = checksumFn(payloadU8);\n var length = payloadU8.length + 4;\n var both = new Uint8Array(length);\n both.set(payloadU8, 0);\n both.set(checksum.subarray(0, 4), payloadU8.length);\n return bs58_1.default.encode(both);\n }\n function decodeRaw(buffer) {\n var payload = buffer.slice(0, -4);\n var checksum = buffer.slice(-4);\n var newChecksum = checksumFn(payload);\n // eslint-disable-next-line\n if (checksum[0] ^ newChecksum[0] |\n checksum[1] ^ newChecksum[1] |\n checksum[2] ^ newChecksum[2] |\n checksum[3] ^ newChecksum[3])\n return;\n return payload;\n }\n // Decode a base58-check encoded string to a buffer, no result if checksum is wrong\n function decodeUnsafe(str) {\n var buffer = bs58_1.default.decodeUnsafe(str);\n if (buffer == null)\n return;\n return decodeRaw(buffer);\n }\n function decode(str) {\n var buffer = bs58_1.default.decode(str);\n var payload = decodeRaw(buffer);\n if (payload == null)\n throw new Error(\'Invalid checksum\');\n return payload;\n }\n return {\n encode: encode,\n decode: decode,\n decodeUnsafe: decodeUnsafe\n };\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58check/src/cjs/base.cjs?\n}')},"./node_modules/bs58check/src/cjs/index.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "./node_modules/@noble/hashes/sha256.js");\nvar base_js_1 = __importDefault(__webpack_require__(/*! ./base.cjs */ "./node_modules/bs58check/src/cjs/base.cjs"));\n// SHA256(SHA256(buffer))\nfunction sha256x2(buffer) {\n return (0, sha256_1.sha256)((0, sha256_1.sha256)(buffer));\n}\nexports["default"] = (0, base_js_1.default)(sha256x2);\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58check/src/cjs/index.cjs?\n}')},"./node_modules/@stablelib/binary/lib/binary.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ readFloat32BE: () => (/* binding */ readFloat32BE),\n/* harmony export */ readFloat32LE: () => (/* binding */ readFloat32LE),\n/* harmony export */ readFloat64BE: () => (/* binding */ readFloat64BE),\n/* harmony export */ readFloat64LE: () => (/* binding */ readFloat64LE),\n/* harmony export */ readInt16BE: () => (/* binding */ readInt16BE),\n/* harmony export */ readInt16LE: () => (/* binding */ readInt16LE),\n/* harmony export */ readInt32BE: () => (/* binding */ readInt32BE),\n/* harmony export */ readInt32LE: () => (/* binding */ readInt32LE),\n/* harmony export */ readInt64BE: () => (/* binding */ readInt64BE),\n/* harmony export */ readInt64LE: () => (/* binding */ readInt64LE),\n/* harmony export */ readUint16BE: () => (/* binding */ readUint16BE),\n/* harmony export */ readUint16LE: () => (/* binding */ readUint16LE),\n/* harmony export */ readUint32BE: () => (/* binding */ readUint32BE),\n/* harmony export */ readUint32LE: () => (/* binding */ readUint32LE),\n/* harmony export */ readUint64BE: () => (/* binding */ readUint64BE),\n/* harmony export */ readUint64LE: () => (/* binding */ readUint64LE),\n/* harmony export */ readUintBE: () => (/* binding */ readUintBE),\n/* harmony export */ readUintLE: () => (/* binding */ readUintLE),\n/* harmony export */ writeFloat32BE: () => (/* binding */ writeFloat32BE),\n/* harmony export */ writeFloat32LE: () => (/* binding */ writeFloat32LE),\n/* harmony export */ writeFloat64BE: () => (/* binding */ writeFloat64BE),\n/* harmony export */ writeFloat64LE: () => (/* binding */ writeFloat64LE),\n/* harmony export */ writeInt16BE: () => (/* binding */ writeInt16BE),\n/* harmony export */ writeInt16LE: () => (/* binding */ writeInt16LE),\n/* harmony export */ writeInt32BE: () => (/* binding */ writeInt32BE),\n/* harmony export */ writeInt32LE: () => (/* binding */ writeInt32LE),\n/* harmony export */ writeInt64BE: () => (/* binding */ writeInt64BE),\n/* harmony export */ writeInt64LE: () => (/* binding */ writeInt64LE),\n/* harmony export */ writeUint16BE: () => (/* binding */ writeUint16BE),\n/* harmony export */ writeUint16LE: () => (/* binding */ writeUint16LE),\n/* harmony export */ writeUint32BE: () => (/* binding */ writeUint32BE),\n/* harmony export */ writeUint32LE: () => (/* binding */ writeUint32LE),\n/* harmony export */ writeUint64BE: () => (/* binding */ writeUint64BE),\n/* harmony export */ writeUint64LE: () => (/* binding */ writeUint64LE),\n/* harmony export */ writeUintBE: () => (/* binding */ writeUintBE),\n/* harmony export */ writeUintLE: () => (/* binding */ writeUintLE)\n/* harmony export */ });\n/* harmony import */ var _stablelib_int__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/int */ "./node_modules/@stablelib/int/lib/int.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package binary provides functions for encoding and decoding numbers in byte arrays.\n */\n\n// TODO(dchest): add asserts for correct value ranges and array offsets.\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16BE(array, offset = 0) {\n return (((array[offset + 0] << 8) | array[offset + 1]) << 16) >> 16;\n}\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16BE(array, offset = 0) {\n return ((array[offset + 0] << 8) | array[offset + 1]) >>> 0;\n}\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16LE(array, offset = 0) {\n return (((array[offset + 1] << 8) | array[offset]) << 16) >> 16;\n}\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16LE(array, offset = 0) {\n return ((array[offset + 1] << 8) | array[offset]) >>> 0;\n}\n/**\n * Writes 2-byte big-endian representation of 16-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16BE(value, out = new Uint8Array(2), offset = 0) {\n out[offset + 0] = value >>> 8;\n out[offset + 1] = value >>> 0;\n return out;\n}\nconst writeInt16BE = writeUint16BE;\n/**\n * Writes 2-byte little-endian representation of 16-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16LE(value, out = new Uint8Array(2), offset = 0) {\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n return out;\n}\nconst writeInt16LE = writeUint16LE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32BE(array, offset = 0) {\n return (array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3];\n}\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32BE(array, offset = 0) {\n return ((array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3]) >>> 0;\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32LE(array, offset = 0) {\n return (array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset];\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32LE(array, offset = 0) {\n return ((array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset]) >>> 0;\n}\n/**\n * Writes 4-byte big-endian representation of 32-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32BE(value, out = new Uint8Array(4), offset = 0) {\n out[offset + 0] = value >>> 24;\n out[offset + 1] = value >>> 16;\n out[offset + 2] = value >>> 8;\n out[offset + 3] = value >>> 0;\n return out;\n}\nconst writeInt32BE = writeUint32BE;\n/**\n * Writes 4-byte little-endian representation of 32-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32LE(value, out = new Uint8Array(4), offset = 0) {\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n out[offset + 2] = value >>> 16;\n out[offset + 3] = value >>> 24;\n return out;\n}\nconst writeInt32LE = writeUint32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64BE(array, offset = 0) {\n const hi = readInt32BE(array, offset);\n const lo = readInt32BE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64BE(array, offset = 0) {\n const hi = readUint32BE(array, offset);\n const lo = readUint32BE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64LE(array, offset = 0) {\n const lo = readInt32LE(array, offset);\n const hi = readInt32LE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64LE(array, offset = 0) {\n const lo = readUint32LE(array, offset);\n const hi = readUint32LE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\n/**\n * Writes 8-byte big-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64BE(value, out = new Uint8Array(8), offset = 0) {\n writeUint32BE(value / 0x100000000 >>> 0, out, offset);\n writeUint32BE(value >>> 0, out, offset + 4);\n return out;\n}\nconst writeInt64BE = writeUint64BE;\n/**\n * Writes 8-byte little-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64LE(value, out = new Uint8Array(8), offset = 0) {\n writeUint32LE(value >>> 0, out, offset);\n writeUint32LE(value / 0x100000000 >>> 0, out, offset + 4);\n return out;\n}\nconst writeInt64LE = writeUint64LE;\n/**\n * Reads bytes from array starting at offset as big-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintBE(bitLength, array, offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("readUintBE supports only bitLengths divisible by 8");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error("readUintBE: array is too short for the given bitLength");\n }\n let result = 0;\n let mul = 1;\n for (let i = bitLength / 8 + offset - 1; i >= offset; i--) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\n/**\n * Reads bytes from array starting at offset as little-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintLE(bitLength, array, offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("readUintLE supports only bitLengths divisible by 8");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error("readUintLE: array is too short for the given bitLength");\n }\n let result = 0;\n let mul = 1;\n for (let i = offset; i < offset + bitLength / 8; i++) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\n/**\n * Writes a big-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintBE(bitLength, value, out = new Uint8Array(bitLength / 8), offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("writeUintBE supports only bitLengths divisible by 8");\n }\n if (!(0,_stablelib_int__WEBPACK_IMPORTED_MODULE_0__.isSafeInteger)(value)) {\n throw new Error("writeUintBE value must be an integer");\n }\n let div = 1;\n for (let i = bitLength / 8 + offset - 1; i >= offset; i--) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\n/**\n * Writes a little-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintLE(bitLength, value, out = new Uint8Array(bitLength / 8), offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("writeUintLE supports only bitLengths divisible by 8");\n }\n if (!(0,_stablelib_int__WEBPACK_IMPORTED_MODULE_0__.isSafeInteger)(value)) {\n throw new Error("writeUintLE value must be an integer");\n }\n let div = 1;\n for (let i = offset; i < offset + bitLength / 8; i++) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32BE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset);\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32LE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset, true);\n}\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * 64-bit floating-point number ("double") and returns it.\n */\nfunction readFloat64BE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset);\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * 64-bit floating-point number ("double") and returns it.\n */\nfunction readFloat64LE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset, true);\n}\n/**\n * Writes 4-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32BE(value, out = new Uint8Array(4), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value);\n return out;\n}\n/**\n * Writes 4-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32LE(value, out = new Uint8Array(4), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value, true);\n return out;\n}\n/**\n * Writes 8-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64BE(value, out = new Uint8Array(8), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value);\n return out;\n}\n/**\n * Writes 8-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64LE(value, out = new Uint8Array(8), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value, true);\n return out;\n}\n//# sourceMappingURL=binary.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/binary/lib/binary.js?\n}')},"./node_modules/@stablelib/blake2b/lib/blake2b.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BLAKE2b: () => (/* binding */ BLAKE2b),\n/* harmony export */ BLOCK_SIZE: () => (/* binding */ BLOCK_SIZE),\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ KEY_LENGTH: () => (/* binding */ KEY_LENGTH),\n/* harmony export */ MAX_FANOUT: () => (/* binding */ MAX_FANOUT),\n/* harmony export */ MAX_LEAF_SIZE: () => (/* binding */ MAX_LEAF_SIZE),\n/* harmony export */ MAX_MAX_DEPTH: () => (/* binding */ MAX_MAX_DEPTH),\n/* harmony export */ PERSONALIZATION_LENGTH: () => (/* binding */ PERSONALIZATION_LENGTH),\n/* harmony export */ SALT_LENGTH: () => (/* binding */ SALT_LENGTH),\n/* harmony export */ hash: () => (/* binding */ hash)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2017 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst BLOCK_SIZE = 128;\nconst DIGEST_LENGTH = 64;\nconst KEY_LENGTH = 64;\nconst PERSONALIZATION_LENGTH = 16;\nconst SALT_LENGTH = 16;\nconst MAX_LEAF_SIZE = Math.pow(2, 32) - 1;\nconst MAX_FANOUT = 255;\nconst MAX_MAX_DEPTH = 255; // not a typo\nconst IV = new Uint32Array([\n // low bits // high bits\n 0xf3bcc908, 0x6a09e667,\n 0x84caa73b, 0xbb67ae85,\n 0xfe94f82b, 0x3c6ef372,\n 0x5f1d36f1, 0xa54ff53a,\n 0xade682d1, 0x510e527f,\n 0x2b3e6c1f, 0x9b05688c,\n 0xfb41bd6b, 0x1f83d9ab,\n 0x137e2179, 0x5be0cd19,\n]);\n// Note: sigma values are doubled since we store\n// 64-bit ints as two 32-bit ints in arrays.\nconst SIGMA = [\n [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],\n [28, 20, 8, 16, 18, 30, 26, 12, 2, 24, 0, 4, 22, 14, 10, 6],\n [22, 16, 24, 0, 10, 4, 30, 26, 20, 28, 6, 12, 14, 2, 18, 8],\n [14, 18, 6, 2, 26, 24, 22, 28, 4, 12, 10, 20, 8, 0, 30, 16],\n [18, 0, 10, 14, 4, 8, 20, 30, 28, 2, 22, 24, 12, 16, 6, 26],\n [4, 24, 12, 20, 0, 22, 16, 6, 8, 26, 14, 10, 30, 28, 2, 18],\n [24, 10, 2, 30, 28, 26, 8, 20, 0, 14, 12, 6, 18, 4, 16, 22],\n [26, 22, 14, 28, 24, 2, 6, 18, 10, 0, 30, 8, 16, 12, 4, 20],\n [12, 30, 28, 18, 22, 6, 0, 16, 24, 4, 26, 14, 2, 8, 20, 10],\n [20, 4, 16, 8, 14, 12, 2, 10, 30, 22, 18, 28, 6, 24, 26, 0],\n [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],\n [28, 20, 8, 16, 18, 30, 26, 12, 2, 24, 0, 4, 22, 14, 10, 6]\n];\n/**\n * BLAKE2b hash function.\n */\nclass BLAKE2b {\n digestLength;\n blockSize = BLOCK_SIZE;\n // Note: Int32Arrays for state and message are used for performance reasons.\n _state = new Int32Array(IV); // hash state, initialized with IV\n _buffer = new Uint8Array(BLOCK_SIZE); // buffer for data\n _bufferLength = 0; // number of bytes in buffer\n _ctr = new Uint32Array(4);\n _flag = new Uint32Array(4);\n _lastNode = false;\n _finished = false;\n _vtmp = new Uint32Array(32);\n _mtmp = new Uint32Array(32);\n _paddedKey; // copy of zero-padded key if present\n _initialState; // initial state after initialization\n constructor(digestLength = 64, config) {\n this.digestLength = digestLength;\n // Validate digest length.\n if (digestLength < 1 || digestLength > DIGEST_LENGTH) {\n throw new Error("blake2b: wrong digest length");\n }\n // Validate config, if present.\n if (config) {\n this.validateConfig(config);\n }\n // Get key length from config.\n let keyLength = 0;\n if (config && config.key) {\n keyLength = config.key.length;\n }\n // Get tree fanout and maxDepth from config.\n let fanout = 1;\n let maxDepth = 1;\n if (config && config.tree) {\n fanout = config.tree.fanout;\n maxDepth = config.tree.maxDepth;\n }\n // Xor common parameters into state.\n this._state[0] ^= digestLength | (keyLength << 8) | (fanout << 16) | (maxDepth << 24);\n // Xor tree parameters into state.\n if (config && config.tree) {\n this._state[1] ^= config.tree.leafSize;\n this._state[2] ^= config.tree.nodeOffsetLowBits;\n this._state[3] ^= config.tree.nodeOffsetHighBits;\n this._state[4] ^= config.tree.nodeDepth | (config.tree.innerDigestLength << 8);\n this._lastNode = config.tree.lastNode;\n }\n // Xor salt into state.\n if (config && config.salt) {\n this._state[8] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 0);\n this._state[9] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 4);\n this._state[10] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 8);\n this._state[11] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 12);\n }\n // Xor personalization into state.\n if (config && config.personalization) {\n this._state[12] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 0);\n this._state[13] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 4);\n this._state[14] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 8);\n this._state[15] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 12);\n }\n // Save a copy of initialized state for reset.\n this._initialState = new Uint32Array(this._state);\n // Process key.\n if (config && config.key && keyLength > 0) {\n this._paddedKey = new Uint8Array(BLOCK_SIZE);\n this._paddedKey.set(config.key);\n // Put padded key into buffer.\n this._buffer.set(this._paddedKey);\n this._bufferLength = BLOCK_SIZE;\n }\n }\n reset() {\n // Restore initial state.\n this._state.set(this._initialState);\n if (this._paddedKey) {\n // Put padded key into buffer.\n this._buffer.set(this._paddedKey);\n this._bufferLength = BLOCK_SIZE;\n }\n else {\n this._bufferLength = 0;\n }\n // Clear counters and flags.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._flag);\n this._finished = false;\n return this;\n }\n validateConfig(config) {\n if (config.key && config.key.length > KEY_LENGTH) {\n throw new Error("blake2b: wrong key length");\n }\n if (config.salt && config.salt.length !== SALT_LENGTH) {\n throw new Error("blake2b: wrong salt length");\n }\n if (config.personalization &&\n config.personalization.length !== PERSONALIZATION_LENGTH) {\n throw new Error("blake2b: wrong personalization length");\n }\n if (config.tree) {\n if (config.tree.fanout < 0 || config.tree.fanout > MAX_FANOUT) {\n throw new Error("blake2b: wrong tree fanout");\n }\n if (config.tree.maxDepth < 0 || config.tree.maxDepth > MAX_MAX_DEPTH) {\n throw new Error("blake2b: wrong tree depth");\n }\n if (config.tree.leafSize < 0 || config.tree.leafSize > MAX_LEAF_SIZE) {\n throw new Error("blake2b: wrong leaf size");\n }\n if (config.tree.innerDigestLength < 0 ||\n config.tree.innerDigestLength > DIGEST_LENGTH) {\n throw new Error("blake2b: wrong tree inner digest length");\n }\n }\n }\n update(data, dataLength = data.length) {\n if (this._finished) {\n throw new Error("blake2b: can\'t update because hash was finished.");\n }\n const left = BLOCK_SIZE - this._bufferLength;\n let dataPos = 0;\n if (dataLength === 0) {\n return this;\n }\n // Finish buffer.\n if (dataLength > left) {\n for (let i = 0; i < left; i++) {\n this._buffer[this._bufferLength + i] = data[dataPos + i];\n }\n this._processBlock(BLOCK_SIZE);\n dataPos += left;\n dataLength -= left;\n this._bufferLength = 0;\n }\n // Process data blocks.\n while (dataLength > BLOCK_SIZE) {\n for (let i = 0; i < BLOCK_SIZE; i++) {\n this._buffer[i] = data[dataPos + i];\n }\n this._processBlock(BLOCK_SIZE);\n dataPos += BLOCK_SIZE;\n dataLength -= BLOCK_SIZE;\n this._bufferLength = 0;\n }\n // Copy leftovers to buffer.\n for (let i = 0; i < dataLength; i++) {\n this._buffer[this._bufferLength + i] = data[dataPos + i];\n }\n this._bufferLength += dataLength;\n return this;\n }\n finish(out) {\n if (!this._finished) {\n for (let i = this._bufferLength; i < BLOCK_SIZE; i++) {\n this._buffer[i] = 0;\n }\n // Set last block flag.\n this._flag[0] = 0xffffffff;\n this._flag[1] = 0xffffffff;\n // Set last node flag if last node in tree.\n if (this._lastNode) {\n this._flag[2] = 0xffffffff;\n this._flag[3] = 0xffffffff;\n }\n this._processBlock(this._bufferLength);\n this._finished = true;\n }\n // Reuse buffer as temporary space for digest.\n const tmp = this._buffer.subarray(0, 64);\n for (let i = 0; i < 16; i++) {\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(this._state[i], tmp, i * 4);\n }\n out.set(tmp.subarray(0, out.length));\n return this;\n }\n digest() {\n const out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n }\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._vtmp);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._mtmp);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._state);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._initialState);\n if (this._paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._paddedKey);\n }\n this._bufferLength = 0;\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._flag);\n this._lastNode = false;\n this._finished = false;\n }\n saveState() {\n if (this._finished) {\n throw new Error("blake2b: cannot save finished state");\n }\n return {\n state: new Uint32Array(this._state),\n buffer: new Uint8Array(this._buffer),\n bufferLength: this._bufferLength,\n ctr: new Uint32Array(this._ctr),\n flag: new Uint32Array(this._flag),\n lastNode: this._lastNode,\n paddedKey: this._paddedKey ? new Uint8Array(this._paddedKey) : undefined,\n initialState: new Uint32Array(this._initialState)\n };\n }\n restoreState(savedState) {\n this._state.set(savedState.state);\n this._buffer.set(savedState.buffer);\n this._bufferLength = savedState.bufferLength;\n this._ctr.set(savedState.ctr);\n this._flag.set(savedState.flag);\n this._lastNode = savedState.lastNode;\n if (this._paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._paddedKey);\n }\n this._paddedKey = savedState.paddedKey ? new Uint8Array(savedState.paddedKey) : undefined;\n this._initialState.set(savedState.initialState);\n return this;\n }\n cleanSavedState(savedState) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.state);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.initialState);\n if (savedState.paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.paddedKey);\n }\n savedState.bufferLength = 0;\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.flag);\n savedState.lastNode = false;\n }\n _G(v, al, bl, cl, dl, ah, bh, ch, dh, ml0, mh0, ml1, mh1) {\n let vla = v[al], vha = v[ah], vlb = v[bl], vhb = v[bh], vlc = v[cl], vhc = v[ch], vld = v[dl], vhd = v[dh];\n // 64-bit: va += vb\n let w = vla & 0xffff, x = vla >>> 16, y = vha & 0xffff, z = vha >>> 16;\n w += vlb & 0xffff;\n x += vlb >>> 16;\n y += vhb & 0xffff;\n z += vhb >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: va += m[sigma[r][2 * i + 0]]\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += ml0 & 0xffff;\n x += ml0 >>> 16;\n y += mh0 & 0xffff;\n z += mh0 >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: vd ^= va\n vld ^= vla;\n vhd ^= vha;\n // 64-bit: rot(vd, 32)\n w = vhd;\n vhd = vld;\n vld = w;\n // 64-bit: vc += vd\n w = vlc & 0xffff;\n x = vlc >>> 16;\n y = vhc & 0xffff;\n z = vhc >>> 16;\n w += vld & 0xffff;\n x += vld >>> 16;\n y += vhd & 0xffff;\n z += vhd >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vhc = (y & 0xffff) | (z << 16);\n vlc = (w & 0xffff) | (x << 16);\n // 64-bit: vb ^= vc\n vlb ^= vlc;\n vhb ^= vhc;\n // 64-bit: rot(vb, 24)\n w = vlb << 8 | vhb >>> 24;\n vlb = vhb << 8 | vlb >>> 24;\n vhb = w;\n // 64-bit: va += vb\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += vlb & 0xffff;\n x += vlb >>> 16;\n y += vhb & 0xffff;\n z += vhb >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: va += m[sigma[r][2 * i + 1]\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += ml1 & 0xffff;\n x += ml1 >>> 16;\n y += mh1 & 0xffff;\n z += mh1 >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: vd ^= va\n vld ^= vla;\n vhd ^= vha;\n // 64-bit: rot(vd, 16)\n w = vld << 16 | vhd >>> 16;\n vld = vhd << 16 | vld >>> 16;\n vhd = w;\n // 64-bit: vc += vd\n w = vlc & 0xffff;\n x = vlc >>> 16;\n y = vhc & 0xffff;\n z = vhc >>> 16;\n w += vld & 0xffff;\n x += vld >>> 16;\n y += vhd & 0xffff;\n z += vhd >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vhc = (y & 0xffff) | (z << 16);\n vlc = (w & 0xffff) | (x << 16);\n // 64-bit: vb ^= vc\n vlb ^= vlc;\n vhb ^= vhc;\n // 64-bit: rot(vb, 63)\n w = vhb << 1 | vlb >>> 31;\n vlb = vlb << 1 | vhb >>> 31;\n vhb = w;\n v[al] = vla;\n v[ah] = vha;\n v[bl] = vlb;\n v[bh] = vhb;\n v[cl] = vlc;\n v[ch] = vhc;\n v[dl] = vld;\n v[dh] = vhd;\n }\n _incrementCounter(n) {\n for (let i = 0; i < 3; i++) {\n let a = this._ctr[i] + n;\n this._ctr[i] = a >>> 0;\n if (this._ctr[i] === a) {\n return;\n }\n n = 1;\n }\n }\n _processBlock(length) {\n this._incrementCounter(length);\n let v = this._vtmp;\n v.set(this._state);\n v.set(IV, 16);\n v[12 * 2 + 0] ^= this._ctr[0];\n v[12 * 2 + 1] ^= this._ctr[1];\n v[13 * 2 + 0] ^= this._ctr[2];\n v[13 * 2 + 1] ^= this._ctr[3];\n v[14 * 2 + 0] ^= this._flag[0];\n v[14 * 2 + 1] ^= this._flag[1];\n v[15 * 2 + 0] ^= this._flag[2];\n v[15 * 2 + 1] ^= this._flag[3];\n let m = this._mtmp;\n for (let i = 0; i < 32; i++) {\n m[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(this._buffer, i * 4);\n }\n for (let r = 0; r < 12; r++) {\n this._G(v, 0, 8, 16, 24, 1, 9, 17, 25, m[SIGMA[r][0]], m[SIGMA[r][0] + 1], m[SIGMA[r][1]], m[SIGMA[r][1] + 1]);\n this._G(v, 2, 10, 18, 26, 3, 11, 19, 27, m[SIGMA[r][2]], m[SIGMA[r][2] + 1], m[SIGMA[r][3]], m[SIGMA[r][3] + 1]);\n this._G(v, 4, 12, 20, 28, 5, 13, 21, 29, m[SIGMA[r][4]], m[SIGMA[r][4] + 1], m[SIGMA[r][5]], m[SIGMA[r][5] + 1]);\n this._G(v, 6, 14, 22, 30, 7, 15, 23, 31, m[SIGMA[r][6]], m[SIGMA[r][6] + 1], m[SIGMA[r][7]], m[SIGMA[r][7] + 1]);\n this._G(v, 0, 10, 20, 30, 1, 11, 21, 31, m[SIGMA[r][8]], m[SIGMA[r][8] + 1], m[SIGMA[r][9]], m[SIGMA[r][9] + 1]);\n this._G(v, 2, 12, 22, 24, 3, 13, 23, 25, m[SIGMA[r][10]], m[SIGMA[r][10] + 1], m[SIGMA[r][11]], m[SIGMA[r][11] + 1]);\n this._G(v, 4, 14, 16, 26, 5, 15, 17, 27, m[SIGMA[r][12]], m[SIGMA[r][12] + 1], m[SIGMA[r][13]], m[SIGMA[r][13] + 1]);\n this._G(v, 6, 8, 18, 28, 7, 9, 19, 29, m[SIGMA[r][14]], m[SIGMA[r][14] + 1], m[SIGMA[r][15]], m[SIGMA[r][15] + 1]);\n }\n for (let i = 0; i < 16; i++) {\n this._state[i] ^= v[i] ^ v[i + 16];\n }\n }\n}\nfunction hash(data, digestLength = DIGEST_LENGTH, config) {\n const h = new BLAKE2b(digestLength, config);\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n//# sourceMappingURL=blake2b.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/blake2b/lib/blake2b.js?\n}')},"./node_modules/@stablelib/bytes/lib/bytes.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ concat: () => (/* binding */ concat)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package bytes provides functions for dealing with byte arrays.\n */\n/**\n * Concatenates byte arrays.\n */\nfunction concat(...arrays) {\n // Calculate sum of lengths of all arrays.\n let totalLength = 0;\n for (let i = 0; i < arrays.length; i++) {\n totalLength += arrays[i].length;\n }\n // Allocate new array of calculated length.\n const result = new Uint8Array(totalLength);\n // Copy all arrays into result.\n let offset = 0;\n for (let i = 0; i < arrays.length; i++) {\n const arg = arrays[i];\n result.set(arg, offset);\n offset += arg.length;\n }\n return result;\n}\n//# sourceMappingURL=bytes.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/bytes/lib/bytes.js?\n}")},"./node_modules/@stablelib/constant-time/lib/constant-time.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: () => (/* binding */ compare),\n/* harmony export */ equal: () => (/* binding */ equal),\n/* harmony export */ lessOrEqual: () => (/* binding */ lessOrEqual),\n/* harmony export */ select: () => (/* binding */ select)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package constant-time provides functions for performing algorithmically constant-time operations.\n */\n/**\n * NOTE! Due to the inability to guarantee real constant time evaluation of\n * anything in JavaScript VM, this is module is the best effort.\n */\n/**\n * Returns resultIfOne if subject is 1, or resultIfZero if subject is 0.\n *\n * Supports only 32-bit integers, so resultIfOne or resultIfZero are not\n * integers, they'll be converted to them with bitwise operations.\n */\nfunction select(subject, resultIfOne, resultIfZero) {\n return (~(subject - 1) & resultIfOne) | ((subject - 1) & resultIfZero);\n}\n/**\n * Returns 1 if a <= b, or 0 if not.\n * Arguments must be positive 32-bit integers less than or equal to 2^31 - 1.\n */\nfunction lessOrEqual(a, b) {\n return (((a | 0) - (b | 0) - 1) >>> 31) & 1;\n}\n/**\n * Returns 1 if a and b are of equal length and their contents\n * are equal, or 0 otherwise.\n *\n * Note that unlike in equal(), zero-length inputs are considered\n * the same, so this function will return 1.\n */\nfunction compare(a, b) {\n if (a.length !== b.length) {\n return 0;\n }\n let result = 0;\n for (let i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return (1 & ((result - 1) >>> 8));\n}\n/**\n * Returns true if a and b are of equal non-zero length,\n * and their contents are equal, or false otherwise.\n *\n * Note that unlike in compare() zero-length inputs are considered\n * _not_ equal, so this function will return false.\n */\nfunction equal(a, b) {\n if (a.length === 0 || b.length === 0) {\n return false;\n }\n return compare(a, b) !== 0;\n}\n//# sourceMappingURL=constant-time.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/constant-time/lib/constant-time.js?\n}")},"./node_modules/@stablelib/ed25519/lib/ed25519.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PUBLIC_KEY_LENGTH: () => (/* binding */ PUBLIC_KEY_LENGTH),\n/* harmony export */ SECRET_KEY_LENGTH: () => (/* binding */ SECRET_KEY_LENGTH),\n/* harmony export */ SEED_LENGTH: () => (/* binding */ SEED_LENGTH),\n/* harmony export */ SIGNATURE_LENGTH: () => (/* binding */ SIGNATURE_LENGTH),\n/* harmony export */ convertPublicKeyToX25519: () => (/* binding */ convertPublicKeyToX25519),\n/* harmony export */ convertSecretKeyToX25519: () => (/* binding */ convertSecretKeyToX25519),\n/* harmony export */ extractPublicKeyFromSecretKey: () => (/* binding */ extractPublicKeyFromSecretKey),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ sign: () => (/* binding */ sign),\n/* harmony export */ verify: () => (/* binding */ verify)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/sha512 */ "./node_modules/@stablelib/sha512/lib/sha512.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\nconst SIGNATURE_LENGTH = 64;\nconst PUBLIC_KEY_LENGTH = 32;\nconst SECRET_KEY_LENGTH = 64;\nconst SEED_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst gf0 = gf();\nconst gf1 = gf([1]);\nconst D = gf([\n 0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070,\n 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203\n]);\nconst D2 = gf([\n 0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0,\n 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406\n]);\nconst X = gf([\n 0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c,\n 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169\n]);\nconst Y = gf([\n 0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666,\n 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666\n]);\nconst I = gf([\n 0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43,\n 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83\n]);\nfunction set25519(r, a) {\n for (let i = 0; i < 16; i++) {\n r[i] = a[i] | 0;\n }\n}\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction verify32(x, y) {\n let d = 0;\n for (let i = 0; i < 32; i++) {\n d |= x[i] ^ y[i];\n }\n return (1 & ((d - 1) >>> 8)) - 1;\n}\nfunction neq25519(a, b) {\n const c = new Uint8Array(32);\n const d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return verify32(c, d);\n}\nfunction par25519(a) {\n const d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 253; a >= 0; a--) {\n square(c, c);\n if (a !== 2 && a !== 4) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction pow2523(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 250; a >= 0; a--) {\n square(c, c);\n if (a !== 1) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction edadd(p, q) {\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf();\n sub(a, p[1], p[0]);\n sub(t, q[1], q[0]);\n mul(a, a, t);\n add(b, p[0], p[1]);\n add(t, q[0], q[1]);\n mul(b, b, t);\n mul(c, p[3], q[3]);\n mul(c, c, D2);\n mul(d, p[2], q[2]);\n add(d, d, d);\n sub(e, b, a);\n sub(f, d, c);\n add(g, d, c);\n add(h, b, a);\n mul(p[0], e, f);\n mul(p[1], h, g);\n mul(p[2], g, f);\n mul(p[3], e, h);\n}\nfunction cswap(p, q, b) {\n for (let i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\nfunction pack(r, p) {\n const tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n mul(tx, p[0], zi);\n mul(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\nfunction scalarmult(p, q, s) {\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (let i = 255; i >= 0; --i) {\n const b = (s[(i / 8) | 0] >> (i & 7)) & 1;\n cswap(p, q, b);\n edadd(q, p);\n edadd(p, p);\n cswap(p, q, b);\n }\n}\nfunction scalarbase(p, s) {\n const q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n mul(q[3], X, Y);\n scalarmult(p, q, s);\n}\n// Generates key pair from secret 32-byte seed.\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== SEED_LENGTH) {\n throw new Error(`ed25519: seed must be ${SEED_LENGTH} bytes`);\n }\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(seed);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const publicKey = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n scalarbase(p, d);\n pack(publicKey, p);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n}\nfunction generateKeyPair(prng) {\n const seed = (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(seed);\n return result;\n}\nfunction extractPublicKeyFromSecretKey(secretKey) {\n if (secretKey.length !== SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${SECRET_KEY_LENGTH} bytes`);\n }\n return new Uint8Array(secretKey.subarray(32));\n}\nconst L = new Uint8Array([\n 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2,\n 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10\n]);\nfunction modL(r, x) {\n let carry;\n let i;\n let j;\n let k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = Math.floor((x[j] + 128) / 256);\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++) {\n x[j] -= carry * L[j];\n }\n for (i = 0; i < 32; i++) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\nfunction iscanonical(s) {\n let c = 0;\n let n = 1;\n for (let i = 31; i >= 0; i--) {\n c |= ((s[i] - L[i]) >> 8) & n;\n n &= ((s[i] ^ L[i]) - 1) >> 8;\n }\n return c !== 0;\n}\nfunction ispkcanonical(p) {\n let c = ((p[0] - 0xed) >> 8) & 1;\n for (let i = 1; i < 31; i++) {\n c |= p[i] ^ 0xff;\n }\n c |= (p[31] & 0x7f) ^ 0x7f;\n return c !== 0;\n}\nfunction reduce(r) {\n const x = new Float64Array(64);\n for (let i = 0; i < 64; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 64; i++) {\n r[i] = 0;\n }\n modL(r, x);\n}\n// Returns 64-byte signature of the message under the 64-byte secret key.\nfunction sign(secretKey, message) {\n if (secretKey.length !== SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${SECRET_KEY_LENGTH} bytes`);\n }\n const x = new Float64Array(64);\n const p = [gf(), gf(), gf(), gf()];\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const signature = new Uint8Array(64);\n signature.set(d.subarray(32), 32);\n const hs = new _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.SHA512();\n hs.update(signature.subarray(32));\n hs.update(message);\n const r = hs.digest();\n hs.clean();\n reduce(r);\n scalarbase(p, r);\n pack(signature, p);\n hs.reset();\n hs.update(signature.subarray(0, 32));\n hs.update(secretKey.subarray(32));\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n for (let i = 0; i < 32; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 32; i++) {\n for (let j = 0; j < 32; j++) {\n x[i + j] += h[i] * d[j];\n }\n }\n modL(signature.subarray(32), x);\n return signature;\n}\nfunction unpackneg(r, p) {\n const t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n square(num, r[1]);\n mul(den, num, D);\n sub(num, num, r[2]);\n add(den, r[2], den);\n square(den2, den);\n square(den4, den2);\n mul(den6, den4, den2);\n mul(t, den6, num);\n mul(t, t, den);\n pow2523(t, t);\n mul(t, t, num);\n mul(t, t, den);\n mul(t, t, den);\n mul(r[0], t, den);\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n mul(r[0], r[0], I);\n }\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n return -1;\n }\n if (par25519(r[0]) === (p[31] >> 7)) {\n sub(r[0], gf0, r[0]);\n }\n mul(r[3], r[0], r[1]);\n return 0;\n}\nfunction verify(publicKey, message, signature) {\n const t = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n const q = [gf(), gf(), gf(), gf()];\n if (signature.length !== SIGNATURE_LENGTH) {\n throw new Error(`ed25519: signature must be ${SIGNATURE_LENGTH} bytes`);\n }\n if (publicKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error(`ed25519: public key must be ${PUBLIC_KEY_LENGTH} bytes`);\n }\n if (!iscanonical(signature.subarray(32))) {\n return false;\n }\n if (!ispkcanonical(publicKey)) {\n return false;\n }\n if (unpackneg(q, publicKey)) {\n return false;\n }\n const hs = new _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.SHA512();\n hs.update(signature.subarray(0, 32));\n hs.update(publicKey);\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n scalarmult(p, q, h);\n scalarbase(q, signature.subarray(32));\n edadd(p, q);\n pack(t, p);\n if (verify32(signature, t)) {\n return false;\n }\n return true;\n}\n/**\n * Convert Ed25519 public key to X25519 public key.\n *\n * Throws if given an invalid public key.\n */\nfunction convertPublicKeyToX25519(publicKey) {\n let q = [gf(), gf(), gf(), gf()];\n if (unpackneg(q, publicKey)) {\n throw new Error("Ed25519: invalid public key");\n }\n // Formula: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p\n let a = gf();\n let b = gf();\n let y = q[1];\n add(a, gf1, y);\n sub(b, gf1, y);\n inv25519(b, b);\n mul(a, a, b);\n let z = new Uint8Array(32);\n pack25519(z, a);\n return z;\n}\n/**\n * Convert Ed25519 secret (private) key to X25519 secret key.\n */\nfunction convertSecretKeyToX25519(secretKey) {\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const o = new Uint8Array(d.subarray(0, 32));\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(d);\n return o;\n}\n//# sourceMappingURL=ed25519.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/ed25519/lib/ed25519.js?\n}')},"./node_modules/@stablelib/int/lib/int.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_SAFE_INTEGER: () => (/* binding */ MAX_SAFE_INTEGER),\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ isInteger: () => (/* binding */ isInteger),\n/* harmony export */ isSafeInteger: () => (/* binding */ isSafeInteger),\n/* harmony export */ mul: () => (/* binding */ mul),\n/* harmony export */ rotl: () => (/* binding */ rotl),\n/* harmony export */ rotr: () => (/* binding */ rotr),\n/* harmony export */ sub: () => (/* binding */ sub)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package int provides helper functions for integerss.\n */\n/** 32-bit integer multiplication. */\nconst mul = Math.imul;\n/** 32-bit integer addition. */\nfunction add(a, b) {\n return (a + b) | 0;\n}\n/** 32-bit integer subtraction. */\nfunction sub(a, b) {\n return (a - b) | 0;\n}\n/** 32-bit integer left rotation */\nfunction rotl(x, n) {\n return x << n | x >>> (32 - n);\n}\n/** 32-bit integer left rotation */\nfunction rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}\n/**\n * Returns true if the argument is an integer number.\n */\nconst isInteger = Number.isInteger;\n/**\n * Math.pow(2, 53) - 1\n */\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n/**\n * Returns true if the argument is a safe integer number\n * (-MIN_SAFE_INTEGER < number <= MAX_SAFE_INTEGER)\n */\nconst isSafeInteger = Number.isSafeInteger;\n//# sourceMappingURL=int.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/int/lib/int.js?\n}")},"./node_modules/@stablelib/nacl/lib/box.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ box: () => (/* binding */ box),\n/* harmony export */ generateKeyPair: () => (/* reexport safe */ _stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair),\n/* harmony export */ openBox: () => (/* binding */ openBox),\n/* harmony export */ precomputeSharedKey: () => (/* binding */ precomputeSharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/xsalsa20 */ "./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js");\n/* harmony import */ var _secretbox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./secretbox.js */ "./node_modules/@stablelib/nacl/lib/secretbox.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\n\nconst zeros16 = new Uint8Array(16);\nfunction precomputeSharedKey(theirPublicKey, mySecretKey) {\n // Compute scalar multiplication result.\n const key = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__.scalarMult)(mySecretKey, theirPublicKey);\n // Hash key with HSalsa function.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_1__.hsalsa)(key, zeros16, key);\n return key;\n}\nfunction box(theirPublicKey, mySecretKey, nonce, data) {\n const sharedKey = precomputeSharedKey(theirPublicKey, mySecretKey);\n const result = (0,_secretbox_js__WEBPACK_IMPORTED_MODULE_2__.secretBox)(sharedKey, nonce, data);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__.wipe)(sharedKey);\n return result;\n}\nfunction openBox(theirPublicKey, mySecretKey, nonce, data) {\n const sharedKey = precomputeSharedKey(theirPublicKey, mySecretKey);\n const result = (0,_secretbox_js__WEBPACK_IMPORTED_MODULE_2__.openSecretBox)(sharedKey, nonce, data);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__.wipe)(sharedKey);\n return result;\n}\n//# sourceMappingURL=box.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/box.js?\n}')},"./node_modules/@stablelib/nacl/lib/nacl.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ box: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.box),\n/* harmony export */ generateKey: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.generateKey),\n/* harmony export */ generateKeyPair: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair),\n/* harmony export */ openBox: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.openBox),\n/* harmony export */ openSecretBox: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.openSecretBox),\n/* harmony export */ precomputeSharedKey: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.precomputeSharedKey),\n/* harmony export */ secretBox: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.secretBox)\n/* harmony export */ });\n/* harmony import */ var _box_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./box.js */ "./node_modules/@stablelib/nacl/lib/box.js");\n/* harmony import */ var _secretbox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./secretbox.js */ "./node_modules/@stablelib/nacl/lib/secretbox.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package nacl implements NaCl (Networking and Cryptography library) cryptography.\n */\n\n\n//# sourceMappingURL=nacl.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/nacl.js?\n}')},"./node_modules/@stablelib/nacl/lib/secretbox.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateKey: () => (/* binding */ generateKey),\n/* harmony export */ openSecretBox: () => (/* binding */ openSecretBox),\n/* harmony export */ secretBox: () => (/* binding */ secretBox)\n/* harmony export */ });\n/* harmony import */ var _stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/xsalsa20 */ "./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js");\n/* harmony import */ var _stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/poly1305 */ "./node_modules/@stablelib/poly1305/lib/poly1305.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\nfunction secretBox(key, nonce, data) {\n if (nonce.length !== 24) {\n throw new Error("secretBox nonce must be 24 bytes");\n }\n const firstBlock = new Uint8Array(64);\n // Allocate place for nonce and counter.\n const nonceCounter = new Uint8Array(24 + 8);\n // Set first bytes to nonce. Last 8 bytes will be counter.\n nonceCounter.set(nonce);\n // Generate first block of XSalsa20 stream, of which\n // first 32 bytes will be authentication key, and the rest\n // will be used for encryption.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.stream)(key, nonceCounter, firstBlock, 8);\n // Allocate result, which will contain 16-byte authenticator\n // concatenated with ciphertext.\n const result = new Uint8Array(16 + data.length);\n // Encrypt first 32 bytes of data with last 32 bytes of generated stream.\n for (let i = 0; i < 32 && i < data.length; i++) {\n result[16 + i] = data[i] ^ firstBlock[32 + i];\n }\n // Encrypt the rest of data.\n if (data.length > 32) {\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.streamXOR)(key, nonceCounter, data.subarray(32), result.subarray(16 + 32), 8);\n }\n // Calculate Poly1305 authenticator of encrypted data using\n // authentication key in the first block of XSalsa20 stream.\n const auth = (0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.oneTimeAuth)(firstBlock.subarray(0, 32), result.subarray(16));\n // Copy authenticator to the beginning of result.\n for (let i = 0; i < auth.length; i++) {\n result[i] = auth[i];\n }\n // Clean auth.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(auth);\n // Clean first block.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(firstBlock);\n // Clean nonceCounter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(nonceCounter);\n return result;\n}\nfunction openSecretBox(key, nonce, box) {\n if (nonce.length !== 24) {\n throw new Error("secretBox nonce must be 24 bytes");\n }\n if (box.length < 16) {\n throw new Error("secretBox data must be at least 16 bytes");\n }\n const firstBlock = new Uint8Array(64);\n // Allocate place for nonce and counter.\n const nonceCounter = new Uint8Array(24 + 8);\n // Set first bytes to nonce. Last 8 bytes will be counter.\n nonceCounter.set(nonce);\n // Generate first block of XSalsa20 stream, of which\n // first 32 bytes will be authentication key, and the rest\n // will be used for encryption.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.stream)(key, nonceCounter, firstBlock, 8);\n // Calculate Poly1305 authenticator of encrypted data using\n // authentication key in the first block of XSalsa20 stream.\n const auth = (0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.oneTimeAuth)(firstBlock.subarray(0, 32), box.subarray(16));\n // Check authenticator.\n if (!(0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.equal)(auth, box.subarray(0, 16))) {\n // Authenticator is incorrect: ciphertext or authenticator\n // was corrupted, maybe maliciously.\n return null;\n }\n // Authenticator verifies, so we can decrypt ciphertext.\n const ciphertext = box.subarray(16);\n // Allocate result array.\n const result = new Uint8Array(ciphertext.length);\n // Decrypt first 32 bytes of box with last 32 bytes of generated stream.\n for (let i = 0; i < 32 && i < ciphertext.length; i++) {\n result[i] = ciphertext[i] ^ firstBlock[32 + i];\n }\n // Decrypt the rest of data.\n if (ciphertext.length > 32) {\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.streamXOR)(key, nonceCounter, ciphertext.subarray(32), result.subarray(32), 8);\n }\n // Clean auth.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(auth);\n // Clean first block.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(firstBlock);\n // Clean nonceCounter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(nonceCounter);\n return result;\n}\n/** Generates a 32-byte random secret key. */\nfunction generateKey(prng) {\n return (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_3__.randomBytes)(32, prng);\n}\n//# sourceMappingURL=secretbox.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/secretbox.js?\n}')},"./node_modules/@stablelib/poly1305/lib/poly1305.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ Poly1305: () => (/* binding */ Poly1305),\n/* harmony export */ equal: () => (/* binding */ equal),\n/* harmony export */ oneTimeAuth: () => (/* binding */ oneTimeAuth)\n/* harmony export */ });\n/* harmony import */ var _stablelib_constant_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/constant-time */ "./node_modules/@stablelib/constant-time/lib/constant-time.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package poly1305 implements Poly1305 one-time message authentication algorithm.\n */\n\n\nconst DIGEST_LENGTH = 16;\n// Port of Andrew Moon\'s Poly1305-donna-16. Public domain.\n// https://github.com/floodyberry/poly1305-donna\n/**\n * Poly1305 computes 16-byte authenticator of message using\n * a one-time 32-byte key.\n *\n * Important: key should be used for only one message,\n * it should never repeat.\n */\nclass Poly1305 {\n digestLength = DIGEST_LENGTH;\n _buffer = new Uint8Array(16);\n _r = new Uint16Array(10);\n _h = new Uint16Array(10);\n _pad = new Uint16Array(8);\n _leftover = 0;\n _fin = 0;\n _finished = false;\n constructor(key) {\n let t0 = key[0] | key[1] << 8;\n this._r[0] = (t0) & 0x1fff;\n let t1 = key[2] | key[3] << 8;\n this._r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n let t2 = key[4] | key[5] << 8;\n this._r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n let t3 = key[6] | key[7] << 8;\n this._r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n let t4 = key[8] | key[9] << 8;\n this._r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this._r[5] = ((t4 >>> 1)) & 0x1ffe;\n let t5 = key[10] | key[11] << 8;\n this._r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n let t6 = key[12] | key[13] << 8;\n this._r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n let t7 = key[14] | key[15] << 8;\n this._r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this._r[9] = ((t7 >>> 5)) & 0x007f;\n this._pad[0] = key[16] | key[17] << 8;\n this._pad[1] = key[18] | key[19] << 8;\n this._pad[2] = key[20] | key[21] << 8;\n this._pad[3] = key[22] | key[23] << 8;\n this._pad[4] = key[24] | key[25] << 8;\n this._pad[5] = key[26] | key[27] << 8;\n this._pad[6] = key[28] | key[29] << 8;\n this._pad[7] = key[30] | key[31] << 8;\n }\n _blocks(m, mpos, bytes) {\n let hibit = this._fin ? 0 : 1 << 11;\n let h0 = this._h[0], h1 = this._h[1], h2 = this._h[2], h3 = this._h[3], h4 = this._h[4], h5 = this._h[5], h6 = this._h[6], h7 = this._h[7], h8 = this._h[8], h9 = this._h[9];\n let r0 = this._r[0], r1 = this._r[1], r2 = this._r[2], r3 = this._r[3], r4 = this._r[4], r5 = this._r[5], r6 = this._r[6], r7 = this._r[7], r8 = this._r[8], r9 = this._r[9];\n while (bytes >= 16) {\n let t0 = m[mpos + 0] | m[mpos + 1] << 8;\n h0 += (t0) & 0x1fff;\n let t1 = m[mpos + 2] | m[mpos + 3] << 8;\n h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n let t2 = m[mpos + 4] | m[mpos + 5] << 8;\n h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;\n let t3 = m[mpos + 6] | m[mpos + 7] << 8;\n h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n let t4 = m[mpos + 8] | m[mpos + 9] << 8;\n h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;\n h5 += ((t4 >>> 1)) & 0x1fff;\n let t5 = m[mpos + 10] | m[mpos + 11] << 8;\n h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n let t6 = m[mpos + 12] | m[mpos + 13] << 8;\n h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;\n let t7 = m[mpos + 14] | m[mpos + 15] << 8;\n h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n h9 += ((t7 >>> 5)) | hibit;\n let c = 0;\n let d0 = c;\n d0 += h0 * r0;\n d0 += h1 * (5 * r9);\n d0 += h2 * (5 * r8);\n d0 += h3 * (5 * r7);\n d0 += h4 * (5 * r6);\n c = (d0 >>> 13);\n d0 &= 0x1fff;\n d0 += h5 * (5 * r5);\n d0 += h6 * (5 * r4);\n d0 += h7 * (5 * r3);\n d0 += h8 * (5 * r2);\n d0 += h9 * (5 * r1);\n c += (d0 >>> 13);\n d0 &= 0x1fff;\n let d1 = c;\n d1 += h0 * r1;\n d1 += h1 * r0;\n d1 += h2 * (5 * r9);\n d1 += h3 * (5 * r8);\n d1 += h4 * (5 * r7);\n c = (d1 >>> 13);\n d1 &= 0x1fff;\n d1 += h5 * (5 * r6);\n d1 += h6 * (5 * r5);\n d1 += h7 * (5 * r4);\n d1 += h8 * (5 * r3);\n d1 += h9 * (5 * r2);\n c += (d1 >>> 13);\n d1 &= 0x1fff;\n let d2 = c;\n d2 += h0 * r2;\n d2 += h1 * r1;\n d2 += h2 * r0;\n d2 += h3 * (5 * r9);\n d2 += h4 * (5 * r8);\n c = (d2 >>> 13);\n d2 &= 0x1fff;\n d2 += h5 * (5 * r7);\n d2 += h6 * (5 * r6);\n d2 += h7 * (5 * r5);\n d2 += h8 * (5 * r4);\n d2 += h9 * (5 * r3);\n c += (d2 >>> 13);\n d2 &= 0x1fff;\n let d3 = c;\n d3 += h0 * r3;\n d3 += h1 * r2;\n d3 += h2 * r1;\n d3 += h3 * r0;\n d3 += h4 * (5 * r9);\n c = (d3 >>> 13);\n d3 &= 0x1fff;\n d3 += h5 * (5 * r8);\n d3 += h6 * (5 * r7);\n d3 += h7 * (5 * r6);\n d3 += h8 * (5 * r5);\n d3 += h9 * (5 * r4);\n c += (d3 >>> 13);\n d3 &= 0x1fff;\n let d4 = c;\n d4 += h0 * r4;\n d4 += h1 * r3;\n d4 += h2 * r2;\n d4 += h3 * r1;\n d4 += h4 * r0;\n c = (d4 >>> 13);\n d4 &= 0x1fff;\n d4 += h5 * (5 * r9);\n d4 += h6 * (5 * r8);\n d4 += h7 * (5 * r7);\n d4 += h8 * (5 * r6);\n d4 += h9 * (5 * r5);\n c += (d4 >>> 13);\n d4 &= 0x1fff;\n let d5 = c;\n d5 += h0 * r5;\n d5 += h1 * r4;\n d5 += h2 * r3;\n d5 += h3 * r2;\n d5 += h4 * r1;\n c = (d5 >>> 13);\n d5 &= 0x1fff;\n d5 += h5 * r0;\n d5 += h6 * (5 * r9);\n d5 += h7 * (5 * r8);\n d5 += h8 * (5 * r7);\n d5 += h9 * (5 * r6);\n c += (d5 >>> 13);\n d5 &= 0x1fff;\n let d6 = c;\n d6 += h0 * r6;\n d6 += h1 * r5;\n d6 += h2 * r4;\n d6 += h3 * r3;\n d6 += h4 * r2;\n c = (d6 >>> 13);\n d6 &= 0x1fff;\n d6 += h5 * r1;\n d6 += h6 * r0;\n d6 += h7 * (5 * r9);\n d6 += h8 * (5 * r8);\n d6 += h9 * (5 * r7);\n c += (d6 >>> 13);\n d6 &= 0x1fff;\n let d7 = c;\n d7 += h0 * r7;\n d7 += h1 * r6;\n d7 += h2 * r5;\n d7 += h3 * r4;\n d7 += h4 * r3;\n c = (d7 >>> 13);\n d7 &= 0x1fff;\n d7 += h5 * r2;\n d7 += h6 * r1;\n d7 += h7 * r0;\n d7 += h8 * (5 * r9);\n d7 += h9 * (5 * r8);\n c += (d7 >>> 13);\n d7 &= 0x1fff;\n let d8 = c;\n d8 += h0 * r8;\n d8 += h1 * r7;\n d8 += h2 * r6;\n d8 += h3 * r5;\n d8 += h4 * r4;\n c = (d8 >>> 13);\n d8 &= 0x1fff;\n d8 += h5 * r3;\n d8 += h6 * r2;\n d8 += h7 * r1;\n d8 += h8 * r0;\n d8 += h9 * (5 * r9);\n c += (d8 >>> 13);\n d8 &= 0x1fff;\n let d9 = c;\n d9 += h0 * r9;\n d9 += h1 * r8;\n d9 += h2 * r7;\n d9 += h3 * r6;\n d9 += h4 * r5;\n c = (d9 >>> 13);\n d9 &= 0x1fff;\n d9 += h5 * r4;\n d9 += h6 * r3;\n d9 += h7 * r2;\n d9 += h8 * r1;\n d9 += h9 * r0;\n c += (d9 >>> 13);\n d9 &= 0x1fff;\n c = (((c << 2) + c)) | 0;\n c = (c + d0) | 0;\n d0 = c & 0x1fff;\n c = (c >>> 13);\n d1 += c;\n h0 = d0;\n h1 = d1;\n h2 = d2;\n h3 = d3;\n h4 = d4;\n h5 = d5;\n h6 = d6;\n h7 = d7;\n h8 = d8;\n h9 = d9;\n mpos += 16;\n bytes -= 16;\n }\n this._h[0] = h0;\n this._h[1] = h1;\n this._h[2] = h2;\n this._h[3] = h3;\n this._h[4] = h4;\n this._h[5] = h5;\n this._h[6] = h6;\n this._h[7] = h7;\n this._h[8] = h8;\n this._h[9] = h9;\n }\n finish(mac, macpos = 0) {\n const g = new Uint16Array(10);\n let c;\n let mask;\n let f;\n let i;\n if (this._leftover) {\n i = this._leftover;\n this._buffer[i++] = 1;\n for (; i < 16; i++) {\n this._buffer[i] = 0;\n }\n this._fin = 1;\n this._blocks(this._buffer, 0, 16);\n }\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n for (i = 2; i < 10; i++) {\n this._h[i] += c;\n c = this._h[i] >>> 13;\n this._h[i] &= 0x1fff;\n }\n this._h[0] += (c * 5);\n c = this._h[0] >>> 13;\n this._h[0] &= 0x1fff;\n this._h[1] += c;\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n this._h[2] += c;\n g[0] = this._h[0] + 5;\n c = g[0] >>> 13;\n g[0] &= 0x1fff;\n for (i = 1; i < 10; i++) {\n g[i] = this._h[i] + c;\n c = g[i] >>> 13;\n g[i] &= 0x1fff;\n }\n g[9] -= (1 << 13);\n mask = (c ^ 1) - 1;\n for (i = 0; i < 10; i++) {\n g[i] &= mask;\n }\n mask = ~mask;\n for (i = 0; i < 10; i++) {\n this._h[i] = (this._h[i] & mask) | g[i];\n }\n this._h[0] = ((this._h[0]) | (this._h[1] << 13)) & 0xffff;\n this._h[1] = ((this._h[1] >>> 3) | (this._h[2] << 10)) & 0xffff;\n this._h[2] = ((this._h[2] >>> 6) | (this._h[3] << 7)) & 0xffff;\n this._h[3] = ((this._h[3] >>> 9) | (this._h[4] << 4)) & 0xffff;\n this._h[4] = ((this._h[4] >>> 12) | (this._h[5] << 1) | (this._h[6] << 14)) & 0xffff;\n this._h[5] = ((this._h[6] >>> 2) | (this._h[7] << 11)) & 0xffff;\n this._h[6] = ((this._h[7] >>> 5) | (this._h[8] << 8)) & 0xffff;\n this._h[7] = ((this._h[8] >>> 8) | (this._h[9] << 5)) & 0xffff;\n f = this._h[0] + this._pad[0];\n this._h[0] = f & 0xffff;\n for (i = 1; i < 8; i++) {\n f = (((this._h[i] + this._pad[i]) | 0) + (f >>> 16)) | 0;\n this._h[i] = f & 0xffff;\n }\n mac[macpos + 0] = this._h[0] >>> 0;\n mac[macpos + 1] = this._h[0] >>> 8;\n mac[macpos + 2] = this._h[1] >>> 0;\n mac[macpos + 3] = this._h[1] >>> 8;\n mac[macpos + 4] = this._h[2] >>> 0;\n mac[macpos + 5] = this._h[2] >>> 8;\n mac[macpos + 6] = this._h[3] >>> 0;\n mac[macpos + 7] = this._h[3] >>> 8;\n mac[macpos + 8] = this._h[4] >>> 0;\n mac[macpos + 9] = this._h[4] >>> 8;\n mac[macpos + 10] = this._h[5] >>> 0;\n mac[macpos + 11] = this._h[5] >>> 8;\n mac[macpos + 12] = this._h[6] >>> 0;\n mac[macpos + 13] = this._h[6] >>> 8;\n mac[macpos + 14] = this._h[7] >>> 0;\n mac[macpos + 15] = this._h[7] >>> 8;\n this._finished = true;\n return this;\n }\n update(m) {\n let mpos = 0;\n let bytes = m.length;\n let want;\n if (this._leftover) {\n want = (16 - this._leftover);\n if (want > bytes) {\n want = bytes;\n }\n for (let i = 0; i < want; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n bytes -= want;\n mpos += want;\n this._leftover += want;\n if (this._leftover < 16) {\n return this;\n }\n this._blocks(this._buffer, 0, 16);\n this._leftover = 0;\n }\n if (bytes >= 16) {\n want = bytes - (bytes % 16);\n this._blocks(m, mpos, want);\n mpos += want;\n bytes -= want;\n }\n if (bytes) {\n for (let i = 0; i < bytes; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n this._leftover += bytes;\n }\n return this;\n }\n digest() {\n // TODO(dchest): it behaves differently than other hashes/HMAC,\n // because it throws when finished — others just return saved result.\n if (this._finished) {\n throw new Error("Poly1305 was finished");\n }\n let mac = new Uint8Array(16);\n this.finish(mac);\n return mac;\n }\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._r);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._h);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._pad);\n this._leftover = 0;\n this._fin = 0;\n this._finished = true; // mark as finished even if not\n return this;\n }\n}\n/**\n * Returns 16-byte authenticator of data using a one-time 32-byte key.\n *\n * Important: key should be used for only one message, it should never repeat.\n */\nfunction oneTimeAuth(key, data) {\n const h = new Poly1305(key);\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n/**\n * Returns true if two authenticators are 16-byte long and equal.\n * Uses contant-time comparison to avoid leaking timing information.\n */\nfunction equal(a, b) {\n if (a.length !== DIGEST_LENGTH || b.length !== DIGEST_LENGTH) {\n return false;\n }\n return (0,_stablelib_constant_time__WEBPACK_IMPORTED_MODULE_0__.equal)(a, b);\n}\n//# sourceMappingURL=poly1305.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/poly1305/lib/poly1305.js?\n}')},"./node_modules/@stablelib/random/lib/random.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaultRandomSource: () => (/* binding */ defaultRandomSource),\n/* harmony export */ randomBytes: () => (/* binding */ randomBytes),\n/* harmony export */ randomString: () => (/* binding */ randomString),\n/* harmony export */ randomStringForEntropy: () => (/* binding */ randomStringForEntropy),\n/* harmony export */ randomUint32: () => (/* binding */ randomUint32)\n/* harmony export */ });\n/* harmony import */ var _source_system_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./source/system.js */ "./node_modules/@stablelib/random/lib/source/system.js");\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\nconst defaultRandomSource = new _source_system_js__WEBPACK_IMPORTED_MODULE_0__.SystemRandomSource();\nfunction randomBytes(length, prng = defaultRandomSource) {\n return prng.randomBytes(length);\n}\n/**\n * Returns a uniformly random unsigned 32-bit integer.\n */\nfunction randomUint32(prng = defaultRandomSource) {\n // Generate 4-byte random buffer.\n const buf = randomBytes(4, prng);\n // Convert bytes from buffer into a 32-bit integer.\n // It\'s not important which byte order to use, since\n // the result is random.\n const result = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_1__.readUint32LE)(buf);\n // Clean the buffer.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(buf);\n return result;\n}\n/** 62 alphanumeric characters for default charset of randomString() */\nconst ALPHANUMERIC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";\n/**\n * Returns a uniform random string of the given length\n * with characters from the given charset.\n *\n * Charset must not have more than 256 characters.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomString(length, charset = ALPHANUMERIC, prng = defaultRandomSource) {\n if (charset.length < 2) {\n throw new Error("randomString charset is too short");\n }\n if (charset.length > 256) {\n throw new Error("randomString charset is too long");\n }\n let out = \'\';\n const charsLen = charset.length;\n const maxByte = 256 - (256 % charsLen);\n while (length > 0) {\n const buf = randomBytes(Math.ceil(length * 256 / maxByte), prng);\n for (let i = 0; i < buf.length && length > 0; i++) {\n const randomByte = buf[i];\n if (randomByte < maxByte) {\n out += charset.charAt(randomByte % charsLen);\n length--;\n }\n }\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(buf);\n }\n return out;\n}\n/**\n * Returns uniform random string containing at least the given\n * number of bits of entropy.\n *\n * For example, randomStringForEntropy(128) will return a 22-character\n * alphanumeric string, while randomStringForEntropy(128, "0123456789")\n * will return a 39-character numeric string, both will contain at\n * least 128 bits of entropy.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomStringForEntropy(bits, charset = ALPHANUMERIC, prng = defaultRandomSource) {\n const length = Math.ceil(bits / (Math.log(charset.length) / Math.LN2));\n return randomString(length, charset, prng);\n}\n//# sourceMappingURL=random.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/random/lib/random.js?\n}')},"./node_modules/@stablelib/random/lib/source/system.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SystemRandomSource: () => (/* binding */ SystemRandomSource)\n/* harmony export */ });\n// Copyright (C) 2024 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nconst QUOTA = 65536;\nclass SystemRandomSource {\n isAvailable = false;\n isInstantiated = false;\n constructor() {\n if (typeof crypto !== "undefined" && \'getRandomValues\' in crypto) {\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n randomBytes(length) {\n if (!this.isAvailable) {\n throw new Error("System random byte generator is not available.");\n }\n const out = new Uint8Array(length);\n for (let i = 0; i < out.length; i += QUOTA) {\n crypto.getRandomValues(out.subarray(i, i + Math.min(out.length - i, QUOTA)));\n }\n return out;\n }\n}\n//# sourceMappingURL=system.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/random/lib/source/system.js?\n}')},"./node_modules/@stablelib/salsa20/lib/salsa20.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stream: () => (/* binding */ stream),\n/* harmony export */ streamXOR: () => (/* binding */ streamXOR)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package salsa20 implements Salsa20 stream cipher.\n */\n\n\n// Number of Salsa20 rounds (Salsa20/20).\nconst ROUNDS = 20;\n/**\n * Applies the Salsa20 core function to 16-byte input,\n * 32-byte key key, and puts the result into 64-byte array out.\n */\nfunction core(out, input, key) {\n let j0 = 0x61707865; // "expa"\n let j1 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n let j2 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n let j3 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n let j4 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n let j5 = 0x3320646E; // "nd 3"\n let j6 = (input[3] << 24) | (input[2] << 16) | (input[1] << 8) | input[0];\n let j7 = (input[7] << 24) | (input[6] << 16) | (input[5] << 8) | input[4];\n let j8 = (input[11] << 24) | (input[10] << 16) | (input[9] << 8) | input[8];\n let j9 = (input[15] << 24) | (input[14] << 16) | (input[13] << 8) | input[12];\n let j10 = 0x79622D32; // "2-by"\n let j11 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n let j12 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n let j13 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n let j14 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n let j15 = 0x6B206574; // "te k"\n let x0 = j0;\n let x1 = j1;\n let x2 = j2;\n let x3 = j3;\n let x4 = j4;\n let x5 = j5;\n let x6 = j6;\n let x7 = j7;\n let x8 = j8;\n let x9 = j9;\n let x10 = j10;\n let x11 = j11;\n let x12 = j12;\n let x13 = j13;\n let x14 = j14;\n let x15 = j15;\n let u;\n for (let i = 0; i < ROUNDS; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u << 7 | u >>> (32 - 7);\n u = x4 + x0 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x4 | 0;\n x12 ^= u << 13 | u >>> (32 - 13);\n u = x12 + x8 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x1 | 0;\n x9 ^= u << 7 | u >>> (32 - 7);\n u = x9 + x5 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x9 | 0;\n x1 ^= u << 13 | u >>> (32 - 13);\n u = x1 + x13 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x6 | 0;\n x14 ^= u << 7 | u >>> (32 - 7);\n u = x14 + x10 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x14 | 0;\n x6 ^= u << 13 | u >>> (32 - 13);\n u = x6 + x2 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x11 | 0;\n x3 ^= u << 7 | u >>> (32 - 7);\n u = x3 + x15 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x3 | 0;\n x11 ^= u << 13 | u >>> (32 - 13);\n u = x11 + x7 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n u = x0 + x3 | 0;\n x1 ^= u << 7 | u >>> (32 - 7);\n u = x1 + x0 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x1 | 0;\n x3 ^= u << 13 | u >>> (32 - 13);\n u = x3 + x2 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x4 | 0;\n x6 ^= u << 7 | u >>> (32 - 7);\n u = x6 + x5 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x6 | 0;\n x4 ^= u << 13 | u >>> (32 - 13);\n u = x4 + x7 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x9 | 0;\n x11 ^= u << 7 | u >>> (32 - 7);\n u = x11 + x10 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x11 | 0;\n x9 ^= u << 13 | u >>> (32 - 13);\n u = x9 + x8 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x14 | 0;\n x12 ^= u << 7 | u >>> (32 - 7);\n u = x12 + x15 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x12 | 0;\n x14 ^= u << 13 | u >>> (32 - 13);\n u = x14 + x13 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x0 + j0 | 0, out, 0);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x1 + j1 | 0, out, 4);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x2 + j2 | 0, out, 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x3 + j3 | 0, out, 12);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x4 + j4 | 0, out, 16);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x5 + j5 | 0, out, 20);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x6 + j6 | 0, out, 24);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x7 + j7 | 0, out, 28);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x8 + j8 | 0, out, 32);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x9 + j9 | 0, out, 36);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x10 + j10 | 0, out, 40);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x11 + j11 | 0, out, 44);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x12 + j12 | 0, out, 48);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x13 + j13 | 0, out, 52);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x14 + j14 | 0, out, 56);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x15 + j15 | 0, out, 60);\n}\n/**\n * Encrypt src with Salsa20/20 stream generated for the given 32-byte key\n * and 8-byte and write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * Never use the same key and nonce to encrypt more than one message.\n *\n * If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte\n * array with stream counter in first nonceInplaceCounterLength bytes and nonce\n * in the last remaining bytes. The counter will be incremented inplace for\n * each Salsa20 block. This is useful if you need to encrypt one stream of data\n * in chunks.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength = 0) {\n // We only support 256-bit keys.\n if (key.length !== 32) {\n throw new Error("Salsa20: key size must be 32 bytes");\n }\n if (dst.length < src.length) {\n throw new Error("Salsa20: destination is shorter than source");\n }\n let nc;\n let counterStart;\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 8) {\n throw new Error("Salsa20 nonce must be 8 bytes");\n }\n nc = new Uint8Array(16);\n // First bytes of nc are nonce, set it.\n nc.set(nonce);\n // Last bytes are counter.\n counterStart = nonce.length;\n }\n else {\n if (nonce.length !== 16) {\n throw new Error("Salsa20 nonce with counter must be 16 bytes");\n }\n // This will update passed nonce with counter inplace.\n nc = nonce;\n counterStart = 16 - nonceInplaceCounterLength;\n }\n // Allocate temporary space for Salsa20 block.\n const block = new Uint8Array(64);\n for (let i = 0; i < src.length; i += 64) {\n // Generate a block.\n core(block, nc, key);\n // XOR block bytes with src into dst.\n for (let j = i; j < i + 64 && j < src.length; j++) {\n dst[j] = src[j] ^ block[j - i];\n }\n // Increment counter.\n incrementCounter(nc, counterStart, nc.length - counterStart);\n }\n // Cleanup temporary space.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(block);\n if (nonceInplaceCounterLength === 0) {\n // Cleanup counter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(nc);\n }\n return dst;\n}\n/**\n * Generate Salsa20/20 stream for the given 32-byte key and 8-byte nonce\n * and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * If nonceInplaceCounterLength is not 0, it behaves the same\n * with respect to the nonce as described in streamXOR documentation.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength = 0) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\nfunction incrementCounter(counter, pos, len) {\n let carry = 1;\n while (len--) {\n carry = carry + (counter[pos] & 0xff) | 0;\n counter[pos] = carry & 0xff;\n carry >>>= 8;\n pos++;\n }\n if (carry > 0) {\n throw new Error("Salsa20: counter overflow");\n }\n}\n//# sourceMappingURL=salsa20.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/salsa20/lib/salsa20.js?\n}')},"./node_modules/@stablelib/sha512/lib/sha512.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BLOCK_SIZE: () => (/* binding */ BLOCK_SIZE),\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ SHA512: () => (/* binding */ SHA512),\n/* harmony export */ hash: () => (/* binding */ hash)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst DIGEST_LENGTH = 64;\nconst BLOCK_SIZE = 128;\n/**\n * SHA-2-512 cryptographic hash algorithm.\n */\nclass SHA512 {\n /** Length of hash output */\n digestLength = DIGEST_LENGTH;\n /** Block size */\n blockSize = BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n _stateHi = new Int32Array(8); // hash state, high bytes\n _stateLo = new Int32Array(8); // hash state, low bytes\n _tempHi = new Int32Array(16); // temporary state, high bytes\n _tempLo = new Int32Array(16); // temporary state, low bytes\n _buffer = new Uint8Array(256); // buffer for data to hash\n _bufferLength = 0; // number of bytes in buffer\n _bytesHashed = 0; // number of total bytes hashed\n _finished = false; // indicates whether the hash was finalized\n constructor() {\n this.reset();\n }\n _initState() {\n this._stateHi[0] = 0x6a09e667;\n this._stateHi[1] = 0xbb67ae85;\n this._stateHi[2] = 0x3c6ef372;\n this._stateHi[3] = 0xa54ff53a;\n this._stateHi[4] = 0x510e527f;\n this._stateHi[5] = 0x9b05688c;\n this._stateHi[6] = 0x1f83d9ab;\n this._stateHi[7] = 0x5be0cd19;\n this._stateLo[0] = 0xf3bcc908;\n this._stateLo[1] = 0x84caa73b;\n this._stateLo[2] = 0xfe94f82b;\n this._stateLo[3] = 0x5f1d36f1;\n this._stateLo[4] = 0xade682d1;\n this._stateLo[5] = 0x2b3e6c1f;\n this._stateLo[6] = 0xfb41bd6b;\n this._stateLo[7] = 0x137e2179;\n }\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n reset() {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n }\n /**\n * Cleans internal buffers and resets hash state.\n */\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._tempHi);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._tempLo);\n this.reset();\n }\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n update(data, dataLength = data.length) {\n if (this._finished) {\n throw new Error("SHA512: can\'t update because hash was finished.");\n }\n let dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < BLOCK_SIZE && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n }\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n finish(out) {\n if (!this._finished) {\n const bytesHashed = this._bytesHashed;\n const left = this._bufferLength;\n const bitLenHi = (bytesHashed / 0x20000000) | 0;\n const bitLenLo = bytesHashed << 3;\n const padLength = (bytesHashed % 128 < 112) ? 128 : 256;\n this._buffer[left] = 0x80;\n for (let i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(bitLenHi, this._buffer, padLength - 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (let i = 0; i < this.digestLength / 8; i++) {\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(this._stateHi[i], out, i * 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(this._stateLo[i], out, i * 8 + 4);\n }\n return this;\n }\n /**\n * Returns the final hash digest.\n */\n digest() {\n const out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n }\n /**\n * Function useful for HMAC/PBKDF2 optimization. Returns hash state to be\n * used with restoreState(). Only chain value is saved, not buffers or\n * other state variables.\n */\n saveState() {\n if (this._finished) {\n throw new Error("SHA256: cannot save finished state");\n }\n return {\n stateHi: new Int32Array(this._stateHi),\n stateLo: new Int32Array(this._stateLo),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n }\n /**\n * Function useful for HMAC/PBKDF2 optimization. Restores state saved by\n * saveState() and sets bytesHashed to the given value.\n */\n restoreState(savedState) {\n this._stateHi.set(savedState.stateHi);\n this._stateLo.set(savedState.stateLo);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n }\n /**\n * Cleans state returned by saveState().\n */\n cleanSavedState(savedState) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.stateHi);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.stateLo);\n if (savedState.buffer) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n }\n}\n// Constants\nconst K = new Int32Array([\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]);\nfunction hashBlocks(wh, wl, hh, hl, m, pos, len) {\n let ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];\n let h, l;\n let th, tl;\n let a, b, c, d;\n while (len >= 128) {\n for (let i = 0; i < 16; i++) {\n const j = 8 * i + pos;\n wh[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32BE)(m, j);\n wl[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32BE)(m, j + 4);\n }\n for (let i = 0; i < 80; i++) {\n let bh0 = ah0;\n let bh1 = ah1;\n let bh2 = ah2;\n let bh3 = ah3;\n let bh4 = ah4;\n let bh5 = ah5;\n let bh6 = ah6;\n let bh7 = ah7;\n let bl0 = al0;\n let bl1 = al1;\n let bl2 = al2;\n let bl3 = al3;\n let bl4 = al4;\n let bl5 = al5;\n let bl6 = al6;\n let bl7 = al7;\n // add\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma1\n h = ((ah4 >>> 14) | (al4 << (32 - 14))) ^ ((ah4 >>> 18) |\n (al4 << (32 - 18))) ^ ((al4 >>> (41 - 32)) | (ah4 << (32 - (41 - 32))));\n l = ((al4 >>> 14) | (ah4 << (32 - 14))) ^ ((al4 >>> 18) |\n (ah4 << (32 - 18))) ^ ((ah4 >>> (41 - 32)) | (al4 << (32 - (41 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // K\n h = K[i * 2];\n l = K[i * 2 + 1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // w\n h = wh[i % 16];\n l = wl[i % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n th = c & 0xffff | d << 16;\n tl = a & 0xffff | b << 16;\n // add\n h = th;\n l = tl;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma0\n h = ((ah0 >>> 28) | (al0 << (32 - 28))) ^ ((al0 >>> (34 - 32)) |\n (ah0 << (32 - (34 - 32)))) ^ ((al0 >>> (39 - 32)) | (ah0 << (32 - (39 - 32))));\n l = ((al0 >>> 28) | (ah0 << (32 - 28))) ^ ((ah0 >>> (34 - 32)) |\n (al0 << (32 - (34 - 32)))) ^ ((ah0 >>> (39 - 32)) | (al0 << (32 - (39 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n // add\n h = bh3;\n l = bl3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = th;\n l = tl;\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n if (i % 16 === 15) {\n for (let j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = wh[(j + 9) % 16];\n l = wl[(j + 9) % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma0\n th = wh[(j + 1) % 16];\n tl = wl[(j + 1) % 16];\n h = ((th >>> 1) | (tl << (32 - 1))) ^ ((th >>> 8) |\n (tl << (32 - 8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32 - 1))) ^ ((tl >>> 8) |\n (th << (32 - 8))) ^ ((tl >>> 7) | (th << (32 - 7)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma1\n th = wh[(j + 14) % 16];\n tl = wl[(j + 14) % 16];\n h = ((th >>> 19) | (tl << (32 - 19))) ^ ((tl >>> (61 - 32)) |\n (th << (32 - (61 - 32)))) ^ (th >>> 6);\n l = ((tl >>> 19) | (th << (32 - 19))) ^ ((th >>> (61 - 32)) |\n (tl << (32 - (61 - 32)))) ^ ((tl >>> 6) | (th << (32 - 6)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n // add\n h = ah0;\n l = al0;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[0];\n l = hl[0];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n h = ah1;\n l = al1;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[1];\n l = hl[1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n h = ah2;\n l = al2;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[2];\n l = hl[2];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n h = ah3;\n l = al3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[3];\n l = hl[3];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n h = ah4;\n l = al4;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[4];\n l = hl[4];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n h = ah5;\n l = al5;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[5];\n l = hl[5];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n h = ah6;\n l = al6;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[6];\n l = hl[6];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[7];\n l = hl[7];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n pos += 128;\n len -= 128;\n }\n return pos;\n}\nfunction hash(data) {\n const h = new SHA512();\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n//# sourceMappingURL=sha512.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/sha512/lib/sha512.js?\n}')},"./node_modules/@stablelib/utf8/lib/utf8.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ encodedLength: () => (/* binding */ encodedLength)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nconst INVALID_UTF16 = "utf8: invalid string";\nconst INVALID_UTF8 = "utf8: invalid source encoding";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n // Calculate result length and allocate output array.\n // encodedLength() validates string and throws errors,\n // so we don\'t need repeat validation here.\n const arr = new Uint8Array(encodedLength(s));\n let pos = 0;\n for (let i = 0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n if (c >= 0xd800 && c <= 0xdbff) {\n c = ((c - 0xd800) << 10) + (s.charCodeAt(++i) - 0xdc00) + 0x10000;\n }\n if (c < 0x80) {\n arr[pos++] = c;\n }\n else if (c < 0x800) {\n arr[pos++] = 0xc0 | (c >> 6);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n else if (c < 0x10000) {\n arr[pos++] = 0xe0 | (c >> 12);\n arr[pos++] = 0x80 | ((c >> 6) & 0x3f);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n else {\n arr[pos++] = 0xf0 | (c >> 18);\n arr[pos++] = 0x80 | ((c >> 12) & 0x3f);\n arr[pos++] = 0x80 | ((c >> 6) & 0x3f);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n }\n return arr;\n}\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n let result = 0;\n for (let i = 0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n if (c >= 0xd800 && c <= 0xdbff) {\n // High surrogate, must be followed by low surrogate.\n if (i === s.length - 1) {\n throw new Error(INVALID_UTF16);\n }\n i++;\n const c2 = s.charCodeAt(i);\n if (c2 < 0xdc00 || c2 > 0xdfff) {\n throw new Error(INVALID_UTF16);\n }\n c = ((c - 0xd800) << 10) + (c2 - 0xdc00) + 0x10000;\n }\n else if (c >= 0xdc00 && c <= 0xdfff) {\n // Low surrogate without preceding high surrogate.\n throw new Error(INVALID_UTF16);\n }\n if (c < 0x80) {\n result += 1;\n }\n else if (c < 0x800) {\n result += 2;\n }\n else if (c < 0x10000) {\n result += 3;\n }\n else {\n result += 4;\n }\n }\n return result;\n}\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n const chars = [];\n for (let i = 0; i < arr.length; i++) {\n let b = arr[i];\n if (b & 0x80) {\n let min;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n const n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n const n2 = arr[++i];\n const n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join("");\n}\n//# sourceMappingURL=utf8.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/utf8/lib/utf8.js?\n}')},"./node_modules/@stablelib/wipe/lib/wipe.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ wipe: () => (/* binding */ wipe)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Sets all values in the given array to zero and returns it.\n *\n * The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\nfunction wipe(array) {\n // Right now it's similar to array.fill(0). If it turns\n // out that runtimes optimize this call away, maybe\n // we can try something else.\n for (let i = 0; i < array.length; i++) {\n array[i] = 0;\n }\n return array;\n}\n//# sourceMappingURL=wipe.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/wipe/lib/wipe.js?\n}")},"./node_modules/@stablelib/x25519-session/lib/keyagreement.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ACCEPT_MESSAGE_LENGTH: () => (/* binding */ ACCEPT_MESSAGE_LENGTH),\n/* harmony export */ OFFER_MESSAGE_LENGTH: () => (/* binding */ OFFER_MESSAGE_LENGTH),\n/* harmony export */ SAVED_STATE_LENGTH: () => (/* binding */ SAVED_STATE_LENGTH),\n/* harmony export */ SECRET_SEED_LENGTH: () => (/* binding */ SECRET_SEED_LENGTH),\n/* harmony export */ X25519Session: () => (/* binding */ X25519Session)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _x25519_session_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./x25519-session.js */ "./node_modules/@stablelib/x25519-session/lib/x25519-session.js");\n// Copyright (C) 2020 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\n/** Constants for key agreement */\nconst OFFER_MESSAGE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.PUBLIC_KEY_LENGTH;\nconst ACCEPT_MESSAGE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.PUBLIC_KEY_LENGTH;\nconst SAVED_STATE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH;\nconst SECRET_SEED_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH;\n/**\n * X25519 key agreement using ephemeral key pairs.\n *\n * Note that unless this key agreement is combined with an authentication\n * method, such as public key signatures, it\'s vulnerable to man-in-the-middle\n * attacks.\n */\nclass X25519Session {\n offerMessageLength = OFFER_MESSAGE_LENGTH;\n acceptMessageLength = ACCEPT_MESSAGE_LENGTH;\n sharedKeyLength = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SHARED_KEY_LENGTH;\n savedStateLength = SAVED_STATE_LENGTH;\n _seed;\n _keyPair;\n _sharedKey;\n _sessionKeys;\n constructor(secretSeed, prng) {\n this._seed = secretSeed || (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH, prng);\n }\n saveState() {\n return new Uint8Array(this._seed);\n }\n restoreState(savedState) {\n this._seed = new Uint8Array(savedState);\n return this;\n }\n clean() {\n if (this._seed) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._seed);\n }\n if (this._keyPair) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._keyPair.secretKey);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._keyPair.publicKey);\n }\n if (this._sharedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sharedKey);\n }\n if (this._sessionKeys) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sessionKeys.receive);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sessionKeys.send);\n }\n }\n offer() {\n this._keyPair = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.generateKeyPairFromSeed)(this._seed);\n return new Uint8Array(this._keyPair.publicKey);\n }\n accept(offerMsg) {\n if (this._keyPair) {\n throw new Error("X25519Session: accept shouldn\'t be called by offering party");\n }\n if (offerMsg.length !== this.offerMessageLength) {\n throw new Error("X25519Session: incorrect offer message length");\n }\n if (this._sharedKey) {\n throw new Error("X25519Session: accept was already called");\n }\n const keyPair = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.generateKeyPairFromSeed)(this._seed);\n this._sharedKey = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.sharedKey)(keyPair.secretKey, offerMsg);\n this._sessionKeys = (0,_x25519_session_js__WEBPACK_IMPORTED_MODULE_3__.clientSessionKeysFromSharedKey)(this._sharedKey, keyPair.publicKey, offerMsg);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(keyPair.secretKey);\n return keyPair.publicKey;\n }\n finish(acceptMsg) {\n if (acceptMsg.length !== this.acceptMessageLength) {\n throw new Error("X25519Session: incorrect accept message length");\n }\n if (!this._keyPair) {\n throw new Error("X25519Session: no offer state");\n }\n if (this._sharedKey) {\n throw new Error("X25519Session: finish was already called");\n }\n this._sharedKey = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.sharedKey)(this._keyPair.secretKey, acceptMsg);\n this._sessionKeys = (0,_x25519_session_js__WEBPACK_IMPORTED_MODULE_3__.serverSessionKeysFromSharedKey)(this._sharedKey, this._keyPair.publicKey, acceptMsg);\n return this;\n }\n getSharedKey() {\n if (!this._sharedKey) {\n throw new Error("X25519Session: no shared key established");\n }\n return new Uint8Array(this._sharedKey);\n }\n getSessionKeys() {\n if (!this._sessionKeys) {\n throw new Error("X25519Session: no shared key established");\n }\n return {\n receive: new Uint8Array(this._sessionKeys.receive),\n send: new Uint8Array(this._sessionKeys.send),\n };\n }\n}\n//# sourceMappingURL=keyagreement.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519-session/lib/keyagreement.js?\n}')},"./node_modules/@stablelib/x25519-session/lib/x25519-session.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ X25519Session: () => (/* reexport safe */ _keyagreement_js__WEBPACK_IMPORTED_MODULE_2__.X25519Session),\n/* harmony export */ clientSessionKeys: () => (/* binding */ clientSessionKeys),\n/* harmony export */ clientSessionKeysFromSharedKey: () => (/* binding */ clientSessionKeysFromSharedKey),\n/* harmony export */ serverSessionKeys: () => (/* binding */ serverSessionKeys),\n/* harmony export */ serverSessionKeysFromSharedKey: () => (/* binding */ serverSessionKeysFromSharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _keyagreement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keyagreement.js */ "./node_modules/@stablelib/x25519-session/lib/keyagreement.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package x25519-session implements libsodium compatible session keys generation based on X25519 key agreement.\n */\n\n\n\nconst SESSION_KEY_LENGTH = 32;\n/**\n * Generates server-side session encryption keys from the shared key obtained during agreement phase.\n */\nfunction serverSessionKeysFromSharedKey(sharedKey, myPublicKey, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const state = new hash();\n if (state.digestLength !== SESSION_KEY_LENGTH * 2) {\n throw new Error("X25519: incorrect digest length");\n }\n const h = state.update(sharedKey).update(theirPublicKey).update(myPublicKey).digest();\n return {\n send: h.subarray(0, SESSION_KEY_LENGTH),\n receive: h.subarray(SESSION_KEY_LENGTH),\n };\n}\n/**\n * Generates client-side session encryption keys from the shared key obtained during agreement phase.\n */\nfunction clientSessionKeysFromSharedKey(sharedKey, myPublicKey, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const state = new hash();\n if (state.digestLength !== SESSION_KEY_LENGTH * 2) {\n throw new Error("X25519: incorrect digest length");\n }\n const h = state.update(sharedKey).update(myPublicKey).update(theirPublicKey).digest();\n return {\n receive: h.subarray(0, SESSION_KEY_LENGTH),\n send: h.subarray(SESSION_KEY_LENGTH),\n };\n}\n/**\n * Generates server-side session encryption keys. Uses a key pair and a peer\'s public key to generate the shared key.\n */\nfunction serverSessionKeys(myKeyPair, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const sk = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__.sharedKey)(myKeyPair.secretKey, theirPublicKey);\n return serverSessionKeysFromSharedKey(sk, myKeyPair.publicKey, theirPublicKey, hash);\n}\n/**\n * Generates client-side session encryption keys. Uses a key pair and a peer\'s public key to generate the shared key.\n */\nfunction clientSessionKeys(myKeyPair, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const sk = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__.sharedKey)(myKeyPair.secretKey, theirPublicKey);\n return clientSessionKeysFromSharedKey(sk, myKeyPair.publicKey, theirPublicKey, hash);\n}\n//# sourceMappingURL=x25519-session.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519-session/lib/x25519-session.js?\n}')},"./node_modules/@stablelib/x25519/lib/x25519.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PUBLIC_KEY_LENGTH: () => (/* binding */ PUBLIC_KEY_LENGTH),\n/* harmony export */ SECRET_KEY_LENGTH: () => (/* binding */ SECRET_KEY_LENGTH),\n/* harmony export */ SHARED_KEY_LENGTH: () => (/* binding */ SHARED_KEY_LENGTH),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ scalarMult: () => (/* binding */ scalarMult),\n/* harmony export */ scalarMultBase: () => (/* binding */ scalarMultBase),\n/* harmony export */ sharedKey: () => (/* binding */ sharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst PUBLIC_KEY_LENGTH = 32;\nconst SECRET_KEY_LENGTH = 32;\nconst SHARED_KEY_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst _121665 = gf([0xdb41, 1]);\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, inp) {\n const c = gf();\n for (let i = 0; i < 16; i++) {\n c[i] = inp[i];\n }\n for (let i = 253; i >= 0; i--) {\n square(c, c);\n if (i !== 2 && i !== 4) {\n mul(c, c, inp);\n }\n }\n for (let i = 0; i < 16; i++) {\n o[i] = c[i];\n }\n}\nfunction scalarMult(n, p) {\n const z = new Uint8Array(32);\n const x = new Float64Array(80);\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf();\n for (let i = 0; i < 31; i++) {\n z[i] = n[i];\n }\n z[31] = (n[31] & 127) | 64;\n z[0] &= 248;\n unpack25519(x, p);\n for (let i = 0; i < 16; i++) {\n b[i] = x[i];\n }\n a[0] = d[0] = 1;\n for (let i = 254; i >= 0; --i) {\n const r = (z[i >>> 3] >>> (i & 7)) & 1;\n sel25519(a, b, r);\n sel25519(c, d, r);\n add(e, a, c);\n sub(a, a, c);\n add(c, b, d);\n sub(b, b, d);\n square(d, e);\n square(f, a);\n mul(a, c, a);\n mul(c, b, e);\n add(e, a, c);\n sub(a, a, c);\n square(b, a);\n sub(c, d, f);\n mul(a, c, _121665);\n add(a, a, d);\n mul(c, c, a);\n mul(a, d, f);\n mul(d, b, x);\n square(b, e);\n sel25519(a, b, r);\n sel25519(c, d, r);\n }\n for (let i = 0; i < 16; i++) {\n x[i + 16] = a[i];\n x[i + 32] = c[i];\n x[i + 48] = b[i];\n x[i + 64] = d[i];\n }\n const x32 = x.subarray(32);\n const x16 = x.subarray(16);\n inv25519(x32, x32);\n mul(x16, x16, x32);\n const q = new Uint8Array(32);\n pack25519(q, x16);\n return q;\n}\nfunction scalarMultBase(n) {\n return scalarMult(n, _9);\n}\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== SECRET_KEY_LENGTH) {\n throw new Error(`x25519: seed must be ${SECRET_KEY_LENGTH} bytes`);\n }\n const secretKey = new Uint8Array(seed);\n const publicKey = scalarMultBase(secretKey);\n return {\n publicKey,\n secretKey\n };\n}\nfunction generateKeyPair(prng) {\n const seed = (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(seed);\n return result;\n}\n/**\n * Returns a shared key between our secret key and a peer\'s public key.\n *\n * Throws an error if the given keys are of wrong length.\n *\n * If rejectZero is true throws if the calculated shared key is all-zero.\n * From RFC 7748:\n *\n * > Protocol designers using Diffie-Hellman over the curves defined in\n * > this document must not assume "contributory behavior". Specially,\n * > contributory behavior means that both parties\' private keys\n * > contribute to the resulting shared key. Since curve25519 and\n * > curve448 have cofactors of 8 and 4 (respectively), an input point of\n * > small order will eliminate any contribution from the other party\'s\n * > private key. This situation can be detected by checking for the all-\n * > zero output, which implementations MAY do, as specified in Section 6.\n * > However, a large number of existing implementations do not do this.\n *\n * IMPORTANT: the returned key is a raw result of scalar multiplication.\n * To use it as a key material, hash it with a cryptographic hash function.\n */\nfunction sharedKey(mySecretKey, theirPublicKey, rejectZero = false) {\n if (mySecretKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error("X25519: incorrect secret key length");\n }\n if (theirPublicKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error("X25519: incorrect public key length");\n }\n const result = scalarMult(mySecretKey, theirPublicKey);\n if (rejectZero) {\n let zeros = 0;\n for (let i = 0; i < result.length; i++) {\n zeros |= result[i];\n }\n if (zeros === 0) {\n throw new Error("X25519: invalid shared key");\n }\n }\n return result;\n}\n//# sourceMappingURL=x25519.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519/lib/x25519.js?\n}')},"./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hsalsa: () => (/* binding */ hsalsa),\n/* harmony export */ stream: () => (/* binding */ stream),\n/* harmony export */ streamXOR: () => (/* binding */ streamXOR)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_salsa20__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/salsa20 */ "./node_modules/@stablelib/salsa20/lib/salsa20.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package xsalsa20 implements XSalsa20 stream cipher.\n */\n\n\n\n/**\n * Encrypt src with Salsa20/20 stream generated for the given 32-byte key\n * and 24-byte and write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * Never use the same key and nonce to encrypt more than one message.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength = 0) {\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 24) {\n throw new Error("XSalsa20 nonce must be 24 bytes");\n }\n }\n else {\n if (nonce.length !== 32) {\n throw new Error("XSalsa20 nonce with counter must be 32 bytes");\n }\n }\n // Use HSalsa one-way function to transform first 16 bytes of\n // 24-byte extended nonce and key into a new key for Salsa\n // stream -- "subkey".\n const subkey = hsalsa(key, nonce.subarray(0, 16), new Uint8Array(32));\n // Use last 8 bytes of 24-byte extended nonce as an actual nonce,\n // and a subkey derived in the previous step as key to encrypt.\n //\n // If nonceInplaceCounterLength > 0, we\'ll still pass the correct\n // nonce || counter, as we don\'t limit the end of nonce subarray.\n const result = (0,_stablelib_salsa20__WEBPACK_IMPORTED_MODULE_1__.streamXOR)(subkey, nonce.subarray(16), src, dst, nonceInplaceCounterLength);\n // Clean subkey.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(subkey);\n return result;\n}\n/**\n * Generate Salsa20/20 stream for the given 32-byte key and\n * 24-byte nonce and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength = 0) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\n// Number of Salsa20 rounds (Salsa20/20).\nconst ROUNDS = 20;\n/**\n * HSalsa20 is a one-way function used in XSalsa20 to extend nonce,\n * and in NaCl to hash X25519 shared keys. It takes 32-byte key and\n * 16-byte src and writes 32-byte result into dst and returns it.\n */\nfunction hsalsa(key, src, dst) {\n let x0 = 0x61707865; // "expa"\n let x1 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n let x2 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n let x3 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n let x4 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n let x5 = 0x3320646E; // "nd 3"\n let x6 = (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0];\n let x7 = (src[7] << 24) | (src[6] << 16) | (src[5] << 8) | src[4];\n let x8 = (src[11] << 24) | (src[10] << 16) | (src[9] << 8) | src[8];\n let x9 = (src[15] << 24) | (src[14] << 16) | (src[13] << 8) | src[12];\n let x10 = 0x79622D32; // "2-by"\n let x11 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n let x12 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n let x13 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n let x14 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n let x15 = 0x6B206574; // "te k"\n let u;\n for (let i = 0; i < ROUNDS; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u << 7 | u >>> (32 - 7);\n u = x4 + x0 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x4 | 0;\n x12 ^= u << 13 | u >>> (32 - 13);\n u = x12 + x8 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x1 | 0;\n x9 ^= u << 7 | u >>> (32 - 7);\n u = x9 + x5 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x9 | 0;\n x1 ^= u << 13 | u >>> (32 - 13);\n u = x1 + x13 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x6 | 0;\n x14 ^= u << 7 | u >>> (32 - 7);\n u = x14 + x10 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x14 | 0;\n x6 ^= u << 13 | u >>> (32 - 13);\n u = x6 + x2 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x11 | 0;\n x3 ^= u << 7 | u >>> (32 - 7);\n u = x3 + x15 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x3 | 0;\n x11 ^= u << 13 | u >>> (32 - 13);\n u = x11 + x7 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n u = x0 + x3 | 0;\n x1 ^= u << 7 | u >>> (32 - 7);\n u = x1 + x0 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x1 | 0;\n x3 ^= u << 13 | u >>> (32 - 13);\n u = x3 + x2 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x4 | 0;\n x6 ^= u << 7 | u >>> (32 - 7);\n u = x6 + x5 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x6 | 0;\n x4 ^= u << 13 | u >>> (32 - 13);\n u = x4 + x7 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x9 | 0;\n x11 ^= u << 7 | u >>> (32 - 7);\n u = x11 + x10 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x11 | 0;\n x9 ^= u << 13 | u >>> (32 - 13);\n u = x9 + x8 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x14 | 0;\n x12 ^= u << 7 | u >>> (32 - 7);\n u = x12 + x15 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x12 | 0;\n x14 ^= u << 13 | u >>> (32 - 13);\n u = x14 + x13 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x0, dst, 0);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x5, dst, 4);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x10, dst, 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x15, dst, 12);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x6, dst, 16);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x7, dst, 20);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x8, dst, 24);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x9, dst, 28);\n return dst;\n}\n//# sourceMappingURL=xsalsa20.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js?\n}')},"./packages/octez.connect-core/dist/cjs/package.json"(module){"use strict";eval('{module.exports = /*#__PURE__*/JSON.parse(\'{"name":"@tezos-x/octez.connect-core","version":"5.0.0-beta.7","description":"This package contains internal methods that are used by both the dApp and wallet client.","author":"Blockchain Infra <blockchain.infra@trili.tech>","homepage":"https://octez-connect.tezos.com","license":"ISC","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","exports":{"require":"./dist/cjs/src/index.js","import":"./dist/esm/src/index.js"},"directories":{"lib":"dist/esm","test":"__tests__"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/trilitech/octez.connect.git"},"scripts":{"tsc":"tsc -p tsconfig.json && tsc -p tsconfig-cjs.json","test":"jest"},"bugs":{"url":"https://github.com/trilitech/octez.connect/issues"},"dependencies":{"@stablelib/blake2b":"^2.0.1","@stablelib/nacl":"^2.0.1","@stablelib/utf8":"^2.1.0","@stablelib/x25519-session":"^2.0.1","@tezos-x/octez.connect-types":"5.0.0-beta.7","@tezos-x/octez.connect-utils":"5.0.0-beta.7","broadcast-channel":"^7.3.0","bs58check":"4.0.0"}}\');\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/package.json?\n}')},"./packages/octez.connect-ui/src/data/tezos.json"(module){"use strict";eval('{module.exports = /*#__PURE__*/JSON.parse(\'{"version":"1.0.3","updated":"2026-06-17T10:06:49.849Z","extensionList":[{"key":"temple_chrome","id":"ookjlbkiijinhpmnjffcofjonbfbgaoc","name":"Temple Wallet Chrome","shortName":"Temple","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTP9/Ev/fP/9pFP9/H//pSv+KH/96Ffd1FvdOBPiOI/l+GvqHHPtzFv9yFf/rT//pTfhwFfhtFf/pTvzkS/uKIPl1GPqPI/qIH/qBG/p5GPyMIvqBHPp/G/p2Fv/rTf7nTP3hSv7bR/3VRP3QQf3MQP3KP/zGPP/qTf/nTfuRI/uNIvt8GfhYCvhUB/hQBvhIAv3MQfqRI/qHHvp7GfqMIfmEHvmBHfl6Gfl5Gfl1F/lyFvl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9N5HxrGD42ZH4XHnsr8TwRAfuhGU+1AMwJ5/GR4Ou/IsMrmBMV8F81DwZKINUCrjkngq//udtb4Tl32EAk3OV1EJETKIFUC6i8/OTDD3/92PFHv/nY40+cOHHymdtfhFdzAiHEBYIkUAKpFrB+9pM6/5D88+zZSzo8kyq6EWYBEhrrVAlw3GXKOnz8vdTXI98nUMyaJKDihVcm9sb+oFEgcCtxv0kCqu944R3GOIspgegmYJIAmvHCq6MHYa5FNwGTBKCsw8uD9cdvAqESMEnAkg7PueNEbyC6vKE2gUAJmCSg+pYXnrncgxDi8+gmYJIAmtHhuTx6488B2gfNuEkCMK/DSxV8MCqAJDgYKAGTBNzQ4SVsfx4hLm1A0qESyOCuUz39LJh6AAzgX1kjAuoHyB0rA5Ac6APVnwM+uo42wXD3OX56K7zKX+wjF+EN2liFhDNygcuPPqoZcwroHzRaX4gm+xFiY1VdRXKg0PnNEbDIuLcNTg5E8q8IImQywfxGCVh+rR4+Pn8Vkkw2mN8sATTL+Fb+aLvXCvl8Lp8L5jdMAGY5k8TmR6FQyOcywfzGCVh008v8fWiCzm+WgOVfcs6dYov5zRKgbyU+0EL+H/65BhMFoAR2oLe1/GYKWOQt5f+wZsats1GWn8lhC9JDf1Ysf1yDxWKxWCwWi8VisVgsFovFYrFYLBaLxWKxWCwWi8VisVgsFovFYrFYLBaLxdKM/wEeKolcwOa4zAAAAABJRU5ErkJggg==","link":"https://templewallet.com/"},{"key":"temple_firefox","id":"{34ac229e-1cf5-4e4c-8a77-988155c4360f}","name":"Temple Wallet Firefox","shortName":"Temple","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTP9/Ev/fP/9pFP9/H//pSv+KH/96Ffd1FvdOBPiOI/l+GvqHHPtzFv9yFf/rT//pTfhwFfhtFf/pTvzkS/uKIPl1GPqPI/qIH/qBG/p5GPyMIvqBH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Ifsb2IVICRACGoRlNtYD139BW/kcGwvk5Zz0NNoF7oBlP+b3DW/mPhfKvMZfuBptAMesvgVQLuCpI4nxjCD423PxcHt1x3ywkCX7bcKoFVIiE4I8OBV//VZVfMhb3k4VANALNaKoFrL9N5HxrGD42ZH4XHnsr8TwRAfuhGU+1AMwJ5/GR4Ou/IsMrmBMV8F81DwZKINUCrjkngq//udtb4Tl32EAk3OV1EJETKIFUC6i8/OTDD3/92PFHv/nY40+cOHHymdtfhFdzAiHEBYIkUAKpFrB+9pM6/5D88+zZSzo8kyq6EWYBEhrrVAlw3GXKOnz8vdTXI98nUMyaJKDihVcm9sb+oFEgcCtxv0kCqu944R3GOIspgegmYJIAmvHCq6MHYa5FNwGTBKCsw8uD9cdvAqESMEnAkg7PueNEbyC6vKE2gUAJmCSg+pYXnrncgxDi8+gmYJIAmtHhuTx6488B2gfNuEkCMK/DSxV8MCqAJDgYKAGTBNzQ4SVsfx4hLm1A0qESyOCuUz39LJh6AAzgX1kjAuoHyB0rA5Ac6APVnwM+uo42wXD3OX56K7zKX+wjF+EN2liFhDNygcuPPqoZcwroHzRaX4gm+xFiY1VdRXKg0PnNEbDIuLcNTg5E8q8IImQywfxGCVh+rR4+Pn8Vkkw2mN8sATTL+Fb+aLvXCvl8Lp8L5jdMAGY5k8TmR6FQyOcywfzGCVh008v8fWiCzm+WgOVfcs6dYov5zRKgbyU+0EL+H/65BhMFoAR2oLe1/GYKWOQt5f+wZsats1GWn8lhC9JDf1Ysf1yDxWKxWCwWi8VisVgsFovFYrFYLBaLxWKxWCwWi8VisVgsFovFYrFYLBaLxdKM/wEeKolcwOa4zAAAAABJRU5ErkJggg==","link":"https://templewallet.com/"},{"key":"nightly_chrome","id":"fiikommddbeccaoicoejoniammnalkfa","name":"Nightly","shortName":"Nightly","color":"#6067F9","logo":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm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MjggMzguMDAxMiA4LjQwNjE5QzM5LjMyOTggMTMuMDQ1MSAzOC43NTczIDE4LjkyNDQgMzYuNjY1NCAyMy4xOTYzWiIgZmlsbD0iI0Y3RjdGNyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI4MTdfMTQ1NCI+CjxyZWN0IHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgcng9IjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==","link":"https://nightly.app/download"}],"desktopList":[{"key":"infinity_wallet","name":"Infinity Wallet","shortName":"Infinity Wallet","color":"rgb(52, 147, 218)","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTFNsWS1FQCAtOxYdNxceOBkgPBkgPR0kQxkhPhYcNyY3Pyg6PjRQQzxhSiY5QB0lQxwlQzVURB0mQxcoRh0mQhcdNh0mQhwnORwlQig6RBMYMR0lQhwkQRsjPxwhPhwgPBwfOxwdORoeOhwlQRkgPBYzVRU9YBNNchJWexBjjBREaRYtUBNRehsaNQ15ogmXygam1wOy3QO44wK96AWq2Qie0AuGsxcqSxocNxJciwmQxQeh0ASu2gO03g9plRwYMgWs2QHB7QDK9gHF8QqNwBY4WQWp2AmTxxwVLwek1hskQA5ymhogPgiazRkiPxohPQOx2xoiPgSw2xwSKwSx3BkgPRkfOx0OJxYlQwWt2gao2Ael1wii1gif1Aih1QuJwgyCvAx+uA15sQuHvhkjQA50sA5wqgaw5xBsqRNkpRJnqg9rowic0AqUzBReoBFjmhohPBVXpAmc0wej1gap3RFvsguNxwas4AWw4wyBrhF0uAW06BNRhBQ/axgdOAan1xoiPRkZMw2R0AuW0QmYzwqa1BRIdgel3Aig1RkbNRkXMBkgOxgfOxkfOgqb0wuX0Qub2Qes6QyT0Ame1Amk4guZ0hcMHxB4uxB8wQqe3BgIGxgeOQqh3wip5hgeOBccNhYPJBcVLRcWLxB/xBFrrxCEyRYbNBYSKA6NzRYaMw+JyxYaNA6MzRccNhCFyhYTKhNVixgfOhcdNw6PzxVapxCGyhVdqhcbNg+LzBUZMw+HyxYbNQ2Y3BVmsxYbNQ2U2RJ4wRN9xhGByA+M0xcbNhccNxGDyQ+P2hUYMhUYMQ+U4hCJ0hR0wBQWLxRxvhMVLhKAyBKDzxOAzRN6xRKG1hJ/yBKL2xN8xhQ5ZhQXLxQYMRN+xxMVLRQXMBN5xRV7zxN7xxRuuxR4xRR1wxZ0wxIULBZvwRVqtxQYMRQYMBMWLhVirxIWLxZSoBV2xBZOmxZKkxZywxV4zRZ0yBZxwhUaMxV/1RZxxRMWLxIVLRATLBIVLBATKxEULBIULUshqcwAAAD/dFJOUwADNl6JrMbh8ta6gk4mCZP2+hb///2Z/3L/nc3/////////////////////////////////////////////////////////////////8v/2////////+v////////////////////////////////////////////////////////////////////////b////////////////////////y///////////////////////////////6////9v//////////////////////////////////////////////////////////8vr///b/////////////////8Pv24bfz9xQAABypSURBVHgB7NPVdQBRCEVRnrsyFum/zbh7fgd2B/ewgG8IqbSxzp9BiCblAv9QpWrGBuf7OIHenbtvoP7YQEzVYuh4IguuuPpgUp5/mb+Fjme0rt5uvyWYeQsDz2tYLeF7tSQ78NxGVPPb/dk4PL01aCngK1PZgQTsaPJXBeYRkIqYK3wgKO1HtLl+dX+6BURVAUlZonxbQGSL1Jgi4EUxK1JzcUx4NpNHelyuhB/gninwqGwDSToq3BMqIEmrlXBvGqRKVbijAlIVCwDUy4FUjSwAZES69ARQDum6kiBaR7p6BmmQsgOURco20AEpi2AcUhbAeiRsCeA6ErZ68AMp6xyAA3AADkAZB+AAHIADcADKOAAH4AAcgANwAA7AATgAVRyAA3AADrBTdh/gmrJbZstDPVEljqOvcPu9W0BQrnUDODNoDDJBQGXSDbolvfeevP+3/9neRHDccnbTk/PN72CbdABJzigqoGRkabInFRb/g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LPdwW2hWAq6AUAfLXY1FlHJw5wNx1A7n489vQh02iyorRt8BXLJjLmcjDqM9kKJyD4BxAApHuOTeSYoY5ZfXy9xvjp6b6c2RU54eqKIrjHsfs5phMEj78FD3ZRvxUEUwtoPQfSPctJqeyAkbvkijpy6Sy3+5pnxdYVZXCP5XqJRoZxup1Z8N4OzwltBNPzXALAVVtgObb3WyIJUjstnuOED88S3BIRfP9ufxJ8IAkcx38NaU8hgJ6v//Esi3F5Xuy1npPmXHC7BX5QAf+3V0crDcNgFMdPknbDmETIRSj0/V9HvBbiZWCMPoA2zawMZehUb+35fm/w/ckh/44EWAM8MZMAEkACSAAJIAHIAzwykwBrgHtmbwGemUkACSABJMCR2YS5HpktkAAS4IGZBJAAEkACZGZrgCUzm9CoA9QZ4+GFWYNt1AFGdDfUASzM7sQswfe58MoDcDcVWqfZAWZfeFkNeJsLrdsI6g1MGis3Fla9xyqkWjhVE0D9BKwHmJ9AdQFn2hZCOUW8G+bCp3l8iKnwOQ+AdwRdxCW3K1Rq7xUuKbK/8PP9UMGNxPefC1jm+1dB97lQ6LzCNcF3rWxebiYqXKeis8eybTX5gO8FPYxlw5beRCj8JOrBzmWTauuND/iNitqkcXMN8sF2zgf8ifLadMnu27xswDS30abB6ajw1SvRwA5bpybZkwAAAABJRU5ErkJggg==","deepLink":"infinity://","downloadLink":"https://infinitywallet.io/download"},{"key":"umami_desktop","name":"Umami","shortName":"Umami","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjY2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADY2NgAAAAAAAEZGRgAAAAAAAAAAAA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gGMQbZDHOuKG3ZISIzYMEm1H7lwmiD4U9FW/Fw/ROCNduDUiovdUdneatUr1rnrVUvLeyO/krBdwckYn5Whvz0/Kls5gi+5iiSQLwE3sBflKmQ5P54WMfk2OXPQjTND5IKfZBSV7dQpGmepGApJdHZdVBSPtspypB3Np9sDD8N5UZdqvjxO8qH8O/pa4HlqOzvVY2FnXngYnbEv4JZWXvqLw926I0AwCWXXxk5nmOj8wkmuWbu+3DpS8PSmXEfbHyAV6ldVED6Gm8wrKoAZIYyoka4BhD2aKYASIxmBJiBmjCktZEDKB1YVsVMUAdIyVNvAC6Dw5l8QKswmktIlqAygrG/BQtwBbGSVWxAuyoeGNdFymA/hvvJEQK8Iz3VFmcAFUVE2xWRAmQ8mEivy5IgBymqIkRoIlplLoIAfYVTKX+8H6AJxUfiG17PUDbwIeMbW8HaF/gE7GQlwM8GfiUWvdugH0VM1BqukcDJBTMxl/xYoBUDjPblL0XoHqOL1ATurcC6M9ZfM1G1UsBdn7jy6T/Kl4JkHrM4k+slaNeCKCtpvGnSsHodw+g3fjwN1YKxe8c4L5Zwt9S8z/07xlATx7HMBfpzI/odwuw9HSwgjky4olk6rsEeNluxg3Mn+LzB4IhORxZWswA0UhYDgUDg3MJs/sfgVqtpj6cO7QAAAAASUVORK5CYII=","deepLink":"umami://","downloadLink":"https://umamiwallet.com/#download"},{"key":"atomex_desktop","name":"Atomex Wallet","shortName":"Atomex","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAEFUExURf////v7/dzh7rfB3Zyq0Iqbx4eYxo2dyN7j7/b3+7C72Wl+tzBOnB4+k7S/2/j5++vu9i5Mm+7w9ytKmqCu0v39/uDl8FJrrFZuruXo8sTN4zNQnczT57vF3ylImTVSn+Lm8U9oq5mnzi1LmvLz+a242LK92mF4tGyBuPn6/P3+/tbc7B8/lJWkzIWWxY6eyX6RwtPZ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MvF3OdNWGxatZRqjuyKWSPSJc4TcsKiX3kwt2YXPXM9nkK2jc75ziBaP0cT1IST7RlO7Lcj1kqOp63ssLFIsRmBnH1TgwwIC1VLweev609ZTsLT+Anu6o4J3FyyK1IIxnf+hJ4KeAOwnkqOCkR+WnF51dU7qXhVhN8dUsgoLXB95zpD/2F/Oz6ArUOfOco7sPWzlikoeoaq1neBcie0D2IiPSppQ1PM1aEI/6sktgN4rFTz2YBtDKnmDktSASh5bsIsPKjnCp4CvsJv0Y47h8gVYqFLJB4BWk5/021/lM0xXa1CR7oFNFEdUoB8DSPNvubuku4UJ9RCVhS5gD62CcnS0Y/7H6P28XMQXrSYtaKZgD0PlMdDV5VeJ3aQ7hX/c6LRA34A9rI1obh2G4wedvxk9nJdfMNa7pCXP+7CHIE1dujC2fzzMVPi7fBkGDy0Kwx4Ory0N2fXVt7zOL7RTAAd9WpQ9WJb4UHcpfLHfHhauf+8h7hEtGt3DHl5uOVdsE5Oiq2+azr8cAhjSsiFs4jjHOfQapuu1h4UGP+2mgFaBll3CLmrXnEnvYI74zttdKWAkKrSsUoddeHKcoZGEknUu4Aa28b3LqWJhqPFyAT9gH9G3BifofT8UDbiAV9jIwXqmwa+ednpQ1eQCdmErqeqjpvNvW8GbCNRluYAM7CbQTg6a/ezu649qEZYUuIBnyJHhAgqQ444L6EOONy5gD3J84wJ8kGOVCziBHPe0Tj+EHJE8LdMCcPYouAdJarQsDEkCeVqkvUAUHy06hywXFVpS2YQw57RkAGlONVoQikKcVVqwDYH2qCx4AIGKT1T0XoRI/jyVaG4I1Q5RQewYYh13aSp/DMHSBZq4TEO0s8GIc4xeXyBd+YEz3d60IF/Aq3GqvDcAZwh8XHLC5UcADuK+6if4j0S/5IfjuNwbyaHPN+xsuF34oz04EAAAAAAQ5G89wQYVAAAAAAAAAAAAAAAAAAAAvABvNHg1nikL0gAAAABJRU5ErkJggg==","deepLink":"atomex://","downloadLink":"https://atomex.me/"}],"webList":[{"key":"metamask_tezos_web","name":"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ns24qsq2qMGun8Ctnr+xnMCtnr+tnsKun5+PhcGtn8CtnpOFfL6rnMSvor+tno1/dcGtnsizn7+snsazo8CtoM+6rMS1o8CtncCtn8CtnmhbnQoAAAD/dFJOUwABqJ04Aj+VFf3//9p3Iil+//IJY///97paD2TB+/9Uuv///+2ao///qRn4/+CH//8Q/xT//0jy//////2I/8f/Bar/reT/av/zr/8w/8wa/11QCv+R/3D/s+j/1P+1OLeI////////////tf////+//4n//yH/7P//f0jcbwQ50p/JLuQo/////16QfN7Q+S4h//////////////////9uxP///7j//14V////////p////+3///9L//+a////////////////////////////////////////////////////V9D//63/FH79//9T8P//Nd3/wgWb/2j/JPiR4FlN4HEAABGzSURBVHgB7M4xAQAABAAw0D+zSwpbggUAAAAAAAAc8nu8epbaukByIwaiMDzhpJeZsR3LzMzMzHj/a6xWS2MZitr0HUH1/lJv4Rv8+v3jj0Li7z/Y2d3bV7bKweHuERyfKBROAeDs/OLy6lrZEtc3t3f3ZwDwoFB4BO7pGVHz//evbZi+VsOY7gk4vULAYARhx4SI5sMNT+HAYmaMWW0gHNuJChDOHMjd3d5sbApOPn3Gudzw7oGkAEFkwPCVRuvZwBR+ebRe9sqn88MHPV0BwpEJuUAwZA4fbOD0hYgNBKoGTkHNfY9vQjwF5+ZMP3rH3sXcoPZAWIDwpAvgB6/WE1fWLu5JeNkHX9IPE1IEV5DEZsUvZsvBuqefZl8iGZAcn5AWILhdqBKKZteWgjPLp68Sy8GUB9oCBH8ygCqBfMETX8v080zNV/SDQNnAXyPMkrHipPSqf4WSevpCpAyzHNupCxDcMZSEKtnq6qZfCTFJLQez1ckLEPxFH8ryiUZTWbpmg09fZmr5YY4U2RUkyURwWrpdWvL022k2rSPPn6qBU1ggF8MZWGVvaSlUuxUmk+dP24BcgJxBD2e5KIgUyKff/5i+PH9YKEX5B0jKEZxtQJ1CqT1gsw3PYDGjnbIASa6G84y6Vbrpj9g84yeQvfBuX89pJEEYwNvZNC9KK9+TdWjqChQcOCfQg8qR4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amask.tezos.com/","shadownet":"https://metamask.tezos.com/","ushuaianet":"https://metamask.tezos.com/"}},{"key":"kukai_web","name":"Kukai Wallet","shortName":"Kukai","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGzUExURUdwTFxf81ti91pi9Vpi9lpj91ti9lpi9Vpi9lti9Vtj9lph9ltj+Fhk+lpi9Vpi9Vpj9Vpi91tj9lpj9lth9Fpj9ltj91tj9Vpj9Vpi9lxk91pj9lpi9Uht/1tj9lpi9lpi9T9//15f9Vtj9Vpj91pj9lpi9lph9Vlh9lpi9llh9lph9lti9l1l9m51936F+IyR+Zec+aOo+qyw+7S3+7m9+73A/Li7+6uv+6On+n2D+Gx092py94eN+bzA+9TX/evs/vz9/////+nq/mlw92Fp9oOJ+Kmt+szO/O7v/uzt/mBo9lxk9tfZ/fv7//r6/46U+cDE/PLy/vHy/r7C/F9n9l5m9omP+cPG/Pf3//b2/4iO+XN697K1+66y+3B399LU/f7+/8/R/J6j+ufo/uXn/pyh+qCk+pKX+YGH+Nze/dnb/XuC+Gdv92Vt95OY+aer+pWa+fPz/ru++7Cz++Pk/W929/n5/2Rs95SZ+ba5+5me+oWL+GJq9/Dx/vT1/nqA+HZ9+LK2+3h++JCW+fj4/6Gm+sjK/MbJ/O3u/p6i+s7Q/MrM/NHT/d/h/cvN/LG1+xasxoQAAAAtdFJOUwAWQ22Rrsne7fr/RCVqp+E2jNo5GHoxpPe3Ian9B4B/1wQbw+dbdVqCH6+OauxlcVsAAAyFSURBVHgB5NOFgQJREAPQ4BBg3d1P+2/v3BWXP6+CkQQr6/UHw9F4Mp3xhM2mk/FoOJj3sFuLpabzrOjacoEdMUyLZ8kybWzNcS2eMct1sA3Pn/HMBb63+fojKiE0sIkopiqSOMK60iygQoI8xVrsgoopbKyuzGZUTpKVWFFVU0l1hZXYDRXV2FhBG1BZQYt/dQkVlnT4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vSCKAlcfF0rnR5k5PFgFa39uPV3PDuFjeEglAVi8uYNcs+sXuLAIzu0u/sGo2LtArtk+QOqdw3tY0/a6ZR0DyTfrdtInzpjZEV4dLMfxd9l2D/nJQRwDqC/SXxXAGfxcr6a8Oq1W+jOAPq4mBc32eQVzy3PcciMziDyM9FfLIIO/KS929E72JhTb6t7fjEKL4GxxrC5He0nL3Upm8M4hZdcKGGHuiSswMYtf3EkJethM743/Ezloag4CRJYvY3TPukoDC0RaYmdECCbhr3CERzZrJ++vHScQd4zYJKZzNgsnMXJyE3DZukRir46MNbfbTDovE3DJukqTyDya0mD9USNJN4wbJCk2XpuDTVGk6RLJuGNdJXCqXH4dnj/K5FIn7yrhGQbD6utMZuJZJR9otCsI1w/iOAhJ/mEiewpGZTDyMU0C+MwzjWwrSwGB0aHgkhgvEHgwPRQdHKUjfGobxPQUv1N/XsdHV3RO+/7Penki0s6OvLUTB+/6n8ukB4ZkwiAFw6m7qrm3f/3y/+bHGO88JBgmAJQVbAsCeYu3x3Y5i9fhuS7F0/LCX3QDApFAmfjI0iuQY+MWmSDZ+syiShT86CuQCoiMQbPGPNcXx8S/PoTBOi//EFCbG/8KEoiQhXtA1ChLoeKWhIA1eS3OKkad4Q1ZQiCLDm3SHIjg63lEHFCAo8a6KAlT4QETlRfhQJHx/oAqU7n+FT5UOleXUOIBeUFGFjoNkOZWUZzhQ2gRUjtakOJyeUDGJjqOEsUOFOE2IY7W+Oj3wPZxi61IJnYVTWbbDJ6fZFs5hmHs+sb1p4Gz6bv+k2++2uJDlar3hU9msV0tc1mAxGk+ms7nGB6bNZ9PJeDQc4FBfAUtabrw8UGQDAAAAAElFTkSuQmCC","supportedInteractionStandards":["wallet_connect"],"links":{"mainnet":"https://wallet.kukai.app","shadownet":"https://shadownet.kukai.app"}},{"key":"tzsafe","name":"TzSafe","shortName":"TzSafe","color":"rgb(235, 52, 72)","logo":"data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjYw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yLTEuMDM5LjE4OS0yLjA3OC4zNzctMy4xMTcuNDcyLTEuOTg0LjA5NC0zLjY4NC0uMjgzLTUuMjg5LTEuMzIyLS4zNzgtLjI4My0uNzU2LS40NzItMS4wMzktLjg1bC02LjgwMS02LjA0M2MtMS42MDUtMS40MTYtMi4yNjctMy40OTMtMS43LTUuNTcuNTY3LTIuMTcyIDIuMjY3LTMuNjgzIDQuNTM0LTQuMDZoLjA5NC4xODkuMTg5LjA5NGwuMjg0LS4wOTVoLjA5NGwxLjAzOS0uMjgzaC4wOTVsLjc1NS0uMTg5aC4wOTVsLjM3Ny0uMDk0YzQuOTEyLTEuMzIyIDkuNjM0LTMuNTg4IDE0LjU0Ni02Ljk4Ny4zNzgtLjI4My43NTYtLjU2NyAxLjEzMy0uNzU2bC41NjctLjQ3MmMuMDk0IDAgLjA5NS0uMDk0LjE4OS0uMDk0LjA5NC0uMDk1LjI4My0uMTg5LjM3OC0uMjgzIDIuMTcyLTEuNyA0LjQzOS0zLjU4OCA2LjcwNi01LjY2NSAyLjU1LTIuMzYxIDYuNDIyLTIuNDU1IDkuMDY3LS4xODkgMCAwIC4wOTUgMCAuMDk1LjA5NGwzLjQgMy4wMjFjLjA5NC4wOTUuMDk0LjA5NS4xODkuMTg5Ljk0NC45NDUgMS41MTEgMi4wNzggMS41MTEgMy41ODguMTg5IDQuMjQ5LTMuMzA2IDEwLjAwOS01LjY2NyAxMi40NjNsLS4zNzguMzc4czAgMC0uMDk0LjA5NWwtLjk0NS45NDRjLTQuMDYxIDMuNDkzLTguMTIzIDYuNTE1LTEyLjE4NCA4LjU5MnoiLz48L2c+PC9zdmc+","links":{"mainnet":"https://tzsafe.marigold.dev"}}],"iOSList":[{"key":"airgap_ios","name":"AirGap Wallet","shortName":"AirGap","color":"rgb(4, 235, 204)","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGVUEx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pv+fIpB7rhR/gN6IVSah1hokYha3RROY0/ql85FSkuZMZKA38cs7FPzj2om4yLY5SynTpfblkM2qO6c7XpRwAAAAAAAAAAAAAAAAAAAAA5Ap22b7Lc553ygAAAABJRU5ErkJggg==","universalLink":"https://app.altme.io/app/download"},{"key":"temple_ios","name":"Temple Wallet","shortName":"Temple","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURRweIRsdIBsdH0dwTBoaJRweIBsdHxwdIB0fHxweIRwfHxweIBsdIBsgIBseIhsdIBoaIQAAABsdIBsdIBsdIBseIBsdIBseIB0dHRseIBsdIBseIBsdIf/kTPPeS0Y+JvzOQfysMf3CO/2/OvpuE/uYKPyuMvyfKvyhK/yxM/7VRP7XRfy0NfykLb2xQvPhTP/tT//sT//rT//qTv7qTv7pTv/pTv/oTf7oTf7nTf/nTf/mTf/mTP7lTP7kS/7jS/7iS/7iSv7hSv7gSv7fSv7fSf7eSf7dSP7cSP7bR/3bR/3aR/7aR/7ZRv3ZRv3YRv3XRv3XRf7WRf3VRP3URP7TRP7SQ/3RQv3QQv3PQv3OQf3NQf3MQPzMQP3LQPzLQP3KP/3JP/zIPvzHPvzGPvzGPf3FPf3EPP26N/ucKf29OfyqMPyoL/ynL/7YRvy3NvuVJ/uUJvuSJfuRJfuQJPuPJPuOI/uNI/uMIvuLIvuKIfuJIfuIIPuHIPuGH/uFH/qEHvqDHfqCHfqBHPqAHPp/G/p+G/p9G/p8Gvp7Gvp6Gvp5Gfp4Gfp3GPp2GPl1F/p0F/pzFvpyFvpxFfpwFflvFItFGvlrEvpqEvlpEvloEflnEPlmEPllEPlkD/ljD/liDvlhDvlgDflfDfleDfldDPlcDPlbC/laC/lZCvlYCvlXCflWCflVCPlUCPlTB/lSB/lRBvlQBvhPBvhOBfhNBPhLA/hKA/hIAvhHAvhGAfhFAfhCAEUlG0UoHEQ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://"},{"key":"atomex_ios","name":"Atomex Wallet","shortName":"Atomex","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAEyUExURQUUKQoZLSw5S1Zgb3J6hoSLloqSm3R8iFRebSo3SQ8eMltlc6uxuOrs7f///1ljcQ0cMBknOoiQmu3u8BYkOPDx8+/w8W53gwgXLCYzRsXIzcDEySMwQ0dSYujq7Ofo6kBLW1BbafP09eXm6cfKz77Cx3Z+ihwpPBQiNmFreLS5v6mutgwaLwcWKjM/UP7+/3uDjo2UnZSao15odTZCU+zt72RtepCXoB8sP8rN0UtWZfb29/X19kNOXlJca8PHzP39/v39/bG2vRIgNHiAjE5YZwYVKTpGVmx1gd7g47e7wZedpn6GkeDi5fv7/Pj5+YCIkvz8/ZKZoru/xC87TdXX26Knr9HU2D1JWZqgqfb3+Glyf2NsedfZ3a6zus7R1a+0u/r6+mZvfNnb3p6krKSqsRcRKsgAAAXHSURBVHgB7MExAQAABAAwoH9lIbzbghcAAAAAAAAAAAAAAAAAAACyevbYua+9xLUoDOBfPIoG5DPSDDbslRCm2x3EsVKG6b3P+7/CIUwfINnhKlmZ/9V+gPVbZbfYyOiYriF64onxJH9Ijk8YiJTJVJp/So5kEBnaaJbdclMmoiE/zd5mZhEFc/Psp7AA+RaX2N/SIqSbW6KbJekxoM/T3XIekhkr9LKqQbA1epuCXOs5ekuuQ6wUVaQg1UaaKubjEGqTaiYg1BbVbEOmYo5qkhZEKtlUY+sQKUFVYxCpTFXDEOkGVY1ApJtUFfsXARL9ywG3ol4Fbke9DyhmqeaO9W8WkOlu1KfBTJoqknFIdS/KXYBjJ0dv6UnIVY5uF/SNsUsv0xok0+/Q3Xwesu3t083BIaQ72md/B0eQby/JfuYPEQX6Cns7ziMajHKO3dLDRUTGTqzrllhqHZGS2dxK3+c3lfTJrSqiJ15KlGM3YqeJkoGoWH9QOkOEJQ5oj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ntK/wc1oxzAKYJj/WuLXexVHYquOYCXCBBrbrrCP9hPEyZUfeAAthAo5uGXgs0f0u8eFKFuhgM4RtDEz6euP6zOnLxcW9iAL7scwHvIccwB7EKOxxzAKuT4ygFsQ44RDiAm879VdW8gxxObvtklyGEs07eCgWhnwW1IckTfJiBJvECf5qsQJUaf7kGW2QP6cpCHMPfoy01Ik5mnD8lJiHOLPmxCoG0qG7cg86MJRZ83IJK+TCWFIQh1nqSC9DnEul2np+XbECy/Sw/v8xCtet2ii9bLKqTbe8u+Pj84g3zGcIE9LQ/HEQ3xT7vs8v51HBEydPo4x5+yq2UdkaPpixe1WKp2sTj0f3twIAAAAIAA6P2lJ9igagAAAAAAAAAAAAAAAAAAAPgYKLGcd1nT6swAAAAASUVORK5CYII=","universalLink":"https://atomex.me","deepLink":"atomex://"},{"key":"umami_ios","name":"Umami Mobile","shortName":"Umami Mobile","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjY2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADY2NgAAAAAAAEZGRgAAAAAAAAAAAAAAAAAAAAAAAJ2dnQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMTExP/8+/7v6v7p4v7x7f7q5P/z8P7u6P/28//6+f3UxvumivmBWfhkM/dQGfdPGPl0Sf3b0PqFX/hhL/qWdP7f1fuojfqTcf3Rw/hsPfhiMfqYd/hcKfdW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IxmBJiBmjCktZEDKB1YVsVMUAdIyVNvAC6Dw5l8QKswmktIlqAygrG/BQtwBbGSVWxAuyoeGNdFymA/hvvJEQK8Iz3VFmcAFUVE2xWRAmQ8mEivy5IgBymqIkRoIlplLoIAfYVTKX+8H6AJxUfiG17PUDbwIeMbW8HaF/gE7GQlwM8GfiUWvdugH0VM1BqukcDJBTMxl/xYoBUDjPblL0XoHqOL1ATurcC6M9ZfM1G1UsBdn7jy6T/Kl4JkHrM4k+slaNeCKCtpvGnSsHodw+g3fjwN1YKxe8c4L5Zwt9S8z/07xlATx7HMBfpzI/odwuw9HSwgjky4olk6rsEeNluxg3Mn+LzB4IhORxZWswA0UhYDgUDg3MJs/sfgVqtpj6cO7QAAAAASUVORK5CYII=","deepLink":"umami://","universalLink":"https://umamiwallet.com/"},{"key":"trust_ios","name":"Trust Wallet","shortName":"Trust Wallet","color":"","supportedInteractionStandards":["wallet_connect"],"logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGeUExURTN1u0dwTENDwCpxuDFzuTV0uzFxvDF1uTJzuTR3ujN3vTB3uDR3tjV1uzN0uzN2ujJ2ujV1ujF1ujVyujR3vTR3uzF3uDB0uzN2ujN0uzJ0uzJ1uzJ1ujJ1uzNzujJ1ujN1uzJ1ujN1ujN0uzJ0uzJ1uzN1vDJ1uTN0uzN0uTN1ujJ0ujN1uzN0uzJ0ujJ1uzJ2ujJ2uTJ0uzJ1ujJ0uzJ0ujN0u/////7+//3+//39/vv8/vn7/fj6/fb5/PP3+/H2++/0+uzz+erx+Ofv9+Tt9uLs9d/q9d3o9Nrm89fl8tXj8dPh8NHg8M7f783d7svc7snb7cbZ7cTX68LW68HV6r/U6rzS6brQ6LfP57TM5rDK5a7I5KvG46jE4qTC4aPA4J++356935y83pq73Zm63Ze53ZS33JC02oyx2Ymv2Ieu14Ss1oGq1X2n1Hql03ej0n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ZyYg++E5lIOE3PIIQa7aRX4Q3IOMRqiFmq5080jByCCHVeAA5mXiPnwwOb0DMA9yCqMxeyoKgW/gPPO3fuARPuwRVCw+rVVBV8LAqBXUTHnZTQV2Fh11VUKoGnlWjFJS6D8/671EA1+BZ148CuFDj3TvgKAD1Izzqp78DuPwUnlR3+e8A1EN40kP1OYB/wZO++RKAqoYH/aw+B+DNS6D+2j8CUFVe7EH/DODrP+ExdV9pAag78Jg7Sg/g4mN4yuOLtgDUtafwkPrryh6AugcPuaeOB3DxF3jGrxccAlBXfodH/HFFOQWgbtTBE+puKOcA1A/18ID671WuANRteMBtpQeguYuKd1dpoDyWwF2lg7K5XY8KVn9b2UDZ/VCHilX3vXIMQHfjd1SoP26ofAJQV35BRfr1isovAHXhXj0qztN7F5VbALrrj1FhHl9TjqCcXbxThwry552LyhlULl9V1aNSVH2tcoHK7drPqAjV36rcoNx887AOZe7pw2+VGyh3l3+qQRmr+fGycgd1ouv3yzSDmvvXL6iTQOXj6s2qWpSV2qqbV1U+oPJ16btbD6of/fakDiWs7knto+oHt767lPfX+j8k62eaeGs9AwAAAABJRU5ErkJggg==","universalLink":"https://link.trustwallet.com","deepLink":"trust://"},{"key":"exodus_mobile","name":"Exodus Mobile","shortName":"Exodus","color":"","logo":"data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAwIDMwMCAzMDAiIHdpZHRoPSIzMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIyNTYuODc1IiB4Mj0iMTcxLjMiIHkxPSIzMjAuNjI1IiB5Mj0iLTMyLjk0NTkiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj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EyNy43NTQtODMuNzY0NXY0Ni44MzMybDgxLjk1NiA1My4yNTU4LTkuNjQyIDMwLjUwOWgtNzIuMzE0djM4LjgwNGg3Mi4zMTRsOS42NDIgMzAuNTA5LTgxLjk1NiA1My4yNTZ2NDYuODMzbDEyNy43NTQtODMuNDk3LTIwLjg5LTY2LjM2OXoiIGZpbGw9InVybCgjYSkiLz48cGF0aCBkPSJtNTkuMzAwNyAxNjkuNDAyaDcyLjA0NTN2LTM4LjgwNGgtNzIuMzEzMWwtOS4zNzQtMzAuNTA5IDgxLjY4NzEtNTMuMjU1OHYtNDYuODMzMmwtMTI3Ljc1MzQ3IDgzLjc2NDUgMjAuODkwNTcgNjYuMzY5NS0yMC44OTA1NyA2Ni4zNjkgMTI4LjAyMTQ3IDgzLjQ5N3YtNDYuODMzbC04MS45NTUxLTUzLjI1NnoiIGZpbGw9InVybCgjYSkiLz48ZyBtYXNrPSJ1cmwoI2MpIj48cGF0aCBkPSJtMy43NTAyNCAwaDI5Mi41djMwMGgtMjkyLjV6IiBmaWxsPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==","supportedInteractionStandards":["beacon"],"deepLink":"exodus://wc","universalLink":"https://www.exodus.com/"},{"key":"kukai_ios","name":"Kukai Wallet","shortName":"Kukai","color":"","logo":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGzUExURUdwTFxf81ti91pi9Vpi9lpj91ti9lpi9Vpi9lti9Vtj9lph9ltj+Fhk+lpi9Vpi9Vpj9Vpi91tj9lpj9lth9Fpj9ltj91tj9Vpj9Vpi9lxk91pj9lpi9Uht/1tj9lpi9lpi9T9//15f9Vtj9Vpj91pj9lpi9lph9Vlh9lpi9llh9lph9lti9l1l9m51936F+IyR+Zec+aOo+qyw+7S3+7m9+73A/Li7+6uv+6On+n2D+Gx092py94eN+bzA+9TX/evs/vz9/////+nq/mlw92Fp9oO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O+/7Penki0s6OvLUTB+/6n8ukB4ZkwiAFw6m7qrm3f/3y/+bHGO88JBgmAJQVbAsCeYu3x3Y5i9fhuS7F0/LCX3QDApFAmfjI0iuQY+MWmSDZ+syiShT86CuQCoiMQbPGPNcXx8S/PoTBOi//EFCbG/8KEoiQhXtA1ChLoeKWhIA1eS3OKkad4Q1ZQiCLDm3SHIjg63lEHFCAo8a6KAlT4QETlRfhQJHx/oAqU7n+FT5UOleXUOIBeUFGFjoNkOZWUZzhQ2gRUjtakOJyeUDGJjqOEsUOFOE2IY7W+Oj3wPZxi61IJnYVTWbbDJ6fZFs5hmHs+sb1p4Gz6bv+k2++2uJDlar3hU9msV0tc1mAxGk+ms7nGB6bNZ9PJeDQc4FBfAUtabrw8UGQDAAAAAElFTkSuQmCC","supportedInteractionStandards":["wallet_connect"],"universalLink":"https://wallet.kukai.app","deepLink":"kukai://"},{"key":"fireblocks_ios","name":"Fireblocks Wallet","shortName":"Fireblocks","color":"","logo":"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMTIgMTEyIiB3aWR0aD0iMTAwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTEyIDBjLjU1MjI4NSAwIDEgLjQ0NzcxNTI1IDEgMXYxMTFjMCAuNTUyMjg1LS40NDc3MTUgMS0xIDFoLTExMWMtLjU1MjI4NDc1IDAtMS0uNDQ3NzE1LTEtMXYtMTExYzAtLjU1MjI4NDc1LjQ0NzcxNTI1LTEgMS0xem0tNTUuNTAwMjUxMSAzMS4zODg4ODg5LTMxLjM4ODg4ODkgNTAuMjIyMjIyMmg2Mi43Nzc3Nzc4eiIgZmlsbD0iIzAwMmU3ZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+","supportedInteractionStandards":["wallet_connect"],"universalLink":""},{"key":"nightly_ios","name":"Nightly","shortName":"Nightly","color":"#6067F9","logo":"data:image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S42NzY5IDMyLjI4MzQgMTkuMzUwMSAzMS4wODcgMTYuODY5MkMzMy44OTgyIDE0Ljc4NDYgMzYuMjY5IDEyLjgwMjggMzguMDAxMiA4LjQwNjE5QzM5LjMyOTggMTMuMDQ1MSAzOC43NTczIDE4LjkyNDQgMzYuNjY1NCAyMy4xOTYzWiIgZmlsbD0iI0Y3RjdGNyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI4MTdfMTQ1NCI+CjxyZWN0IHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgcng9IjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==","supportedInteractionStandards":["wallet_connect","beacon"],"universalLink":"","deepLink":"nightly://"}]}\');\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-ui/src/data/tezos.json?\n}')}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};if(!(moduleId in __webpack_modules__)){delete __webpack_module_cache__[moduleId];var e=new Error("Cannot find module '"+moduleId+"'");e.code="MODULE_NOT_FOUND";throw e}__webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__);return module.exports}(()=>{__webpack_require__.d=(exports,definition)=>{for(var key in definition){if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){Object.defineProperty(exports,key,{enumerable:true,get:definition[key]})}}}})();(()=>{__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop)})();(()=>{__webpack_require__.r=exports=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})}})();var __webpack_exports__=__webpack_require__("./packages/octez.connect-wallet/dist/cjs/index.js");return __webpack_exports__})());
1
+ (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["beacon"]=factory();else root["beacon"]=factory()})(self,()=>(()=>{var __webpack_modules__={"./node_modules/@noble/hashes/_assert.js"(__unused_webpack_module,exports){"use strict";eval("{\n/**\n * Assertion helpers\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.anumber = anumber;\nexports.abytes = abytes;\nexports.ahash = ahash;\nexports.aexists = aexists;\nexports.aoutput = aoutput;\nfunction anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error('positive integer expected, got ' + n);\n}\n// copied from utils\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nfunction abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\nfunction ahash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\nfunction aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n//# sourceMappingURL=_assert.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/_assert.js?\n}")},"./node_modules/@noble/hashes/_md.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.HashMD = exports.Maj = exports.Chi = void 0;\nexports.setBigUint64 = setBigUint64;\nconst _assert_js_1 = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/_assert.js\");\nconst utils_js_1 = __webpack_require__(/*! ./utils.js */ \"./node_modules/@noble/hashes/utils.js\");\n/**\n * Merkle-Damgard hash utils.\n * @module\n */\n/**\n * Polyfill for Safari 14\n */\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n/**\n * Choice: a ? b : c\n */\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\nexports.Chi = Chi;\n/**\n * Majority function, true if any two inputs is true\n */\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\nexports.Maj = Maj;\n/**\n * Merkle-Damgard hash construction base class.\n * Could be used to create MD5, RIPEMD, SHA1, SHA2.\n */\nclass HashMD extends utils_js_1.Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = (0, utils_js_1.createView)(this.buffer);\n }\n update(data) {\n (0, _assert_js_1.aexists)(this);\n const { view, buffer, blockLen } = this;\n data = (0, utils_js_1.toBytes)(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = (0, utils_js_1.createView)(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n (0, _assert_js_1.aexists)(this);\n (0, _assert_js_1.aoutput)(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in\n // current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = (0, utils_js_1.createView)(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\nexports.HashMD = HashMD;\n//# sourceMappingURL=_md.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/_md.js?\n}")},"./node_modules/@noble/hashes/crypto.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.crypto = void 0;\nexports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/crypto.js?\n}")},"./node_modules/@noble/hashes/sha256.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.sha224 = exports.sha256 = exports.SHA256 = void 0;\nconst _md_js_1 = __webpack_require__(/*! ./_md.js */ "./node_modules/@noble/hashes/_md.js");\nconst utils_js_1 = __webpack_require__(/*! ./utils.js */ "./node_modules/@noble/hashes/utils.js");\n/**\n * SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.\n *\n * To break sha256 using birthday attack, attackers need to try 2^128 hashes.\n * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.\n *\n * Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).\n * @module\n */\n/** Round constants: first 32 bits of fractional parts of the cube roots of the first 64 primes 2..311). */\n// prettier-ignore\nconst SHA256_K = /* @__PURE__ */ new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n/** Initial state: first 32 bits of fractional parts of the square roots of the first 8 primes 2..19. */\n// prettier-ignore\nconst SHA256_IV = /* @__PURE__ */ new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n/**\n * Temporary buffer, not used to store anything between runs.\n * Named this way because it matches specification.\n */\nconst SHA256_W = /* @__PURE__ */ new Uint32Array(64);\nclass SHA256 extends _md_js_1.HashMD {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = SHA256_IV[0] | 0;\n this.B = SHA256_IV[1] | 0;\n this.C = SHA256_IV[2] | 0;\n this.D = SHA256_IV[3] | 0;\n this.E = SHA256_IV[4] | 0;\n this.F = SHA256_IV[5] | 0;\n this.G = SHA256_IV[6] | 0;\n this.H = SHA256_IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = (0, utils_js_1.rotr)(W15, 7) ^ (0, utils_js_1.rotr)(W15, 18) ^ (W15 >>> 3);\n const s1 = (0, utils_js_1.rotr)(W2, 17) ^ (0, utils_js_1.rotr)(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = (0, utils_js_1.rotr)(E, 6) ^ (0, utils_js_1.rotr)(E, 11) ^ (0, utils_js_1.rotr)(E, 25);\n const T1 = (H + sigma1 + (0, _md_js_1.Chi)(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = (0, utils_js_1.rotr)(A, 2) ^ (0, utils_js_1.rotr)(A, 13) ^ (0, utils_js_1.rotr)(A, 22);\n const T2 = (sigma0 + (0, _md_js_1.Maj)(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\nexports.SHA256 = SHA256;\n/**\n * Constants taken from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf.\n */\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/** SHA2-256 hash function */\nexports.sha256 = (0, utils_js_1.wrapConstructor)(() => new SHA256());\n/** SHA2-224 hash function */\nexports.sha224 = (0, utils_js_1.wrapConstructor)(() => new SHA224());\n//# sourceMappingURL=sha256.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/sha256.js?\n}')},"./node_modules/@noble/hashes/utils.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.byteSwap = exports.isLE = exports.rotl = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;\nexports.isBytes = isBytes;\nexports.byteSwap32 = byteSwap32;\nexports.bytesToHex = bytesToHex;\nexports.hexToBytes = hexToBytes;\nexports.asyncLoop = asyncLoop;\nexports.utf8ToBytes = utf8ToBytes;\nexports.toBytes = toBytes;\nexports.concatBytes = concatBytes;\nexports.checkOpts = checkOpts;\nexports.wrapConstructor = wrapConstructor;\nexports.wrapConstructorWithOpts = wrapConstructorWithOpts;\nexports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;\nexports.randomBytes = randomBytes;\n/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nconst crypto_1 = __webpack_require__(/*! @noble/hashes/crypto */ \"./node_modules/@noble/hashes/crypto.js\");\nconst _assert_js_1 = __webpack_require__(/*! ./_assert.js */ \"./node_modules/@noble/hashes/_assert.js\");\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n// Cast array to different type\nconst u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.u8 = u8;\nconst u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\nexports.u32 = u32;\n// Cast array to view\nconst createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\nexports.createView = createView;\n/** The rotate right (circular right shift) operation for uint32 */\nconst rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\nexports.rotr = rotr;\n/** The rotate left (circular left shift) operation for uint32 */\nconst rotl = (word, shift) => (word << shift) | ((word >>> (32 - shift)) >>> 0);\nexports.rotl = rotl;\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexports.isLE = (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// The byte swap operation for uint32\nconst byteSwap = (word) => ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff);\nexports.byteSwap = byteSwap;\n/** Conditionally byte swap if on a big-endian platform */\nexports.byteSwapIfBE = exports.isLE\n ? (n) => n\n : (n) => (0, exports.byteSwap)(n);\n/** In place byte swap for Uint32Array */\nfunction byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = (0, exports.byteSwap)(arr[i]);\n }\n}\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nfunction bytesToHex(bytes) {\n (0, _assert_js_1.abytes)(bytes);\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n/**\n * Convert hex string to byte array.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nfunction hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nconst nextTick = async () => { };\nexports.nextTick = nextTick;\n// Returns control to thread each 'tick' ms to avoid blocking\nasync function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await (0, exports.nextTick)();\n ts += diff;\n }\n}\n/**\n * Convert JS string to byte array.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nfunction utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error('utf8ToBytes expected string, got ' + typeof str);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nfunction toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n (0, _assert_js_1.abytes)(data);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nfunction concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n (0, _assert_js_1.abytes)(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// For runtime check if class implements interface\nclass Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nexports.Hash = Hash;\nfunction checkOpts(defaults, opts) {\n if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nfunction wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nfunction wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nfunction wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nfunction randomBytes(bytesLength = 32) {\n if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === 'function') {\n return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === 'function') {\n return crypto_1.crypto.randomBytes(bytesLength);\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@noble/hashes/utils.js?\n}")},"./node_modules/base64-js/index.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/base64-js/index.js?\n}")},"./node_modules/broadcast-channel/dist/lib/broadcast-channel.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.OPEN_BROADCAST_CHANNELS = exports.BroadcastChannel = void 0;\nexports.clearNodeFolder = clearNodeFolder;\nexports.enforceOptions = enforceOptions;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _methodChooser = __webpack_require__(/*! ./method-chooser.js */ \"./node_modules/broadcast-channel/dist/lib/method-chooser.js\");\nvar _options = __webpack_require__(/*! ./options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\n/**\n * Contains all open channels,\n * used in tests to ensure everything is closed.\n */\nvar OPEN_BROADCAST_CHANNELS = exports.OPEN_BROADCAST_CHANNELS = new Set();\nvar lastId = 0;\nvar BroadcastChannel = exports.BroadcastChannel = function BroadcastChannel(name, options) {\n // identifier of the channel to debug stuff\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = (0, _options.fillOptionsWithDefaults)(options);\n this.method = (0, _methodChooser.chooseMethod)(this.options);\n\n // isListening\n this._iL = false;\n\n /**\n * _onMessageListener\n * setting onmessage twice,\n * will overwrite the first listener\n */\n this._onML = null;\n\n /**\n * _addEventListeners\n */\n this._addEL = {\n message: [],\n internal: []\n };\n\n /**\n * Unsent message promises\n * where the sending is still in progress\n * @type {Set<Promise>}\n */\n this._uMP = new Set();\n\n /**\n * _beforeClose\n * array of promises that will be awaited\n * before the channel is closed\n */\n this._befC = [];\n\n /**\n * _preparePromise\n */\n this._prepP = null;\n _prepareChannel(this);\n};\n\n// STATICS\n\n/**\n * used to identify if someone overwrites\n * window.BroadcastChannel with this\n * See methods/native.js\n */\nBroadcastChannel._pubkey = true;\n\n/**\n * clears the tmp-folder if is node\n * @return {Promise<boolean>} true if has run, false if not node\n */\nfunction clearNodeFolder(options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n var method = (0, _methodChooser.chooseMethod)(options);\n if (method.type === 'node') {\n return method.clearNodeFolder().then(function () {\n return true;\n });\n } else {\n return _util.PROMISE_RESOLVED_FALSE;\n }\n}\n\n/**\n * if set, this method is enforced,\n * no mather what the options are\n */\nvar ENFORCED_OPTIONS;\nfunction enforceOptions(options) {\n ENFORCED_OPTIONS = options;\n}\n\n// PROTOTYPE\nBroadcastChannel.prototype = {\n postMessage: function postMessage(msg) {\n if (this.closed) {\n throw new Error('BroadcastChannel.postMessage(): ' + 'Cannot post message after channel has closed ' +\n /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, 'message', msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, 'internal', msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time: time,\n fn: fn\n };\n _removeListenerObject(this, 'message', this._onML);\n if (fn && typeof fn === 'function') {\n this._onML = listenObj;\n _addListenerObject(this, 'message', listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time: time,\n fn: fn\n };\n _addListenerObject(this, type, listenObj);\n },\n removeEventListener: function removeEventListener(type, fn) {\n var obj = this._addEL[type].find(function (obj) {\n return obj.fn === fn;\n });\n _removeListenerObject(this, type, obj);\n },\n close: function close() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : _util.PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare\n // wait until all current sending are processed\n .then(function () {\n return Promise.all(Array.from(_this._uMP));\n })\n // run before-close hooks\n .then(function () {\n return Promise.all(_this._befC.map(function (fn) {\n return fn();\n }));\n })\n // close the channel\n .then(function () {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\n\n/**\n * Post a message over the channel\n * @returns {Promise} that resolved when the message sending is done\n */\nfunction _post(broadcastChannel, type, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time: time,\n type: type,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : _util.PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function () {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n\n // add/remove to unsent messages list\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function () {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if ((0, _util.isPromise)(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function (s) {\n // used in tests to simulate slow runtime\n /*if (channel.options.prepareDelay) {\n await new Promise(res => setTimeout(res, this.options.prepareDelay));\n }*/\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0) return true;\n if (channel._addEL.internal.length > 0) return true;\n return false;\n}\nfunction _addListenerObject(channel, type, obj) {\n channel._addEL[type].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type, obj) {\n channel._addEL[type] = channel._addEL[type].filter(function (o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n // someone is listening, start subscribing\n\n var listenerFn = function listenerFn(msgObj) {\n channel._addEL[msgObj.type].forEach(function (listenerObject) {\n if (msgObj.time >= listenerObject.time) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function () {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n // no one is listening, stop subscribing\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/broadcast-channel.js?\n}")},"./node_modules/broadcast-channel/dist/lib/index.es5.js"(module,__unused_webpack_exports,__webpack_require__){"use strict";eval("{\n\nvar _index = __webpack_require__(/*! ./index.js */ \"./node_modules/broadcast-channel/dist/lib/index.js\");\n/**\n * because babel can only export on default-attribute,\n * we use this for the non-module-build\n * this ensures that users do not have to use\n * var BroadcastChannel = require('broadcast-channel').default;\n * but\n * var BroadcastChannel = require('broadcast-channel');\n */\n\nmodule.exports = {\n BroadcastChannel: _index.BroadcastChannel,\n createLeaderElection: _index.createLeaderElection,\n clearNodeFolder: _index.clearNodeFolder,\n enforceOptions: _index.enforceOptions,\n beLeader: _index.beLeader\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/index.es5.js?\n}")},"./node_modules/broadcast-channel/dist/lib/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nObject.defineProperty(exports, "BroadcastChannel", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.BroadcastChannel;\n }\n}));\nObject.defineProperty(exports, "OPEN_BROADCAST_CHANNELS", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.OPEN_BROADCAST_CHANNELS;\n }\n}));\nObject.defineProperty(exports, "beLeader", ({\n enumerable: true,\n get: function get() {\n return _leaderElectionUtil.beLeader;\n }\n}));\nObject.defineProperty(exports, "clearNodeFolder", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.clearNodeFolder;\n }\n}));\nObject.defineProperty(exports, "createLeaderElection", ({\n enumerable: true,\n get: function get() {\n return _leaderElection.createLeaderElection;\n }\n}));\nObject.defineProperty(exports, "enforceOptions", ({\n enumerable: true,\n get: function get() {\n return _broadcastChannel.enforceOptions;\n }\n}));\nvar _broadcastChannel = __webpack_require__(/*! ./broadcast-channel.js */ "./node_modules/broadcast-channel/dist/lib/broadcast-channel.js");\nvar _leaderElection = __webpack_require__(/*! ./leader-election.js */ "./node_modules/broadcast-channel/dist/lib/leader-election.js");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ "./node_modules/broadcast-channel/dist/lib/leader-election-util.js");\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/index.js?\n}')},"./node_modules/broadcast-channel/dist/lib/leader-election-util.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.beLeader = beLeader;\nexports.sendLeaderMessage = sendLeaderMessage;\nvar _unload = __webpack_require__(/*! unload */ \"./node_modules/unload/dist/es/index.js\");\n/**\n * sends and internal message over the broadcast-channel\n */\nfunction sendLeaderMessage(leaderElector, action) {\n var msgJson = {\n context: 'leader',\n action: action,\n token: leaderElector.token\n };\n return leaderElector.broadcastChannel.postInternal(msgJson);\n}\nfunction beLeader(leaderElector) {\n leaderElector.isLeader = true;\n leaderElector._hasLeader = true;\n var unloadFn = (0, _unload.add)(function () {\n return leaderElector.die();\n });\n leaderElector._unl.push(unloadFn);\n var isLeaderListener = function isLeaderListener(msg) {\n if (msg.context === 'leader' && msg.action === 'apply') {\n sendLeaderMessage(leaderElector, 'tell');\n }\n if (msg.context === 'leader' && msg.action === 'tell' && !leaderElector._dpLC) {\n /**\n * another instance is also leader!\n * This can happen on rare events\n * like when the CPU is at 100% for long time\n * or the tabs are open very long and the browser throttles them.\n * @link https://github.com/pubkey/broadcast-channel/issues/414\n * @link https://github.com/pubkey/broadcast-channel/issues/385\n */\n leaderElector._dpLC = true;\n leaderElector._dpL(); // message the lib user so the app can handle the problem\n sendLeaderMessage(leaderElector, 'tell'); // ensure other leader also knows the problem\n }\n };\n leaderElector.broadcastChannel.addEventListener('internal', isLeaderListener);\n leaderElector._lstns.push(isLeaderListener);\n return sendLeaderMessage(leaderElector, 'tell');\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election-util.js?\n}")},"./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.LeaderElectionWebLock = void 0;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-util.js\");\n/**\n * A faster version of the leader elector that uses the WebLock API\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API\n */\nvar LeaderElectionWebLock = exports.LeaderElectionWebLock = function LeaderElectionWebLock(broadcastChannel, options) {\n var _this = this;\n this.broadcastChannel = broadcastChannel;\n broadcastChannel._befC.push(function () {\n return _this.die();\n });\n this._options = options;\n this.isLeader = false;\n this.isDead = false;\n this.token = (0, _util.randomToken)();\n this._lstns = [];\n this._unl = [];\n this._dpL = function () {}; // onduplicate listener\n this._dpLC = false; // true when onduplicate called\n\n this._wKMC = {}; // stuff for cleanup\n\n // lock name\n this.lN = 'pubkey-bc||' + broadcastChannel.method.type + '||' + broadcastChannel.name;\n};\nvar LEADER_DIE_ABORT_SIGNAL_MESSAGE = 'LeaderElectionWebLock.die() called';\nLeaderElectionWebLock.prototype = {\n hasLeader: function hasLeader() {\n var _this2 = this;\n return navigator.locks.query().then(function (locks) {\n var relevantLocks = locks.held ? locks.held.filter(function (lock) {\n return lock.name === _this2.lN;\n }) : [];\n if (relevantLocks && relevantLocks.length > 0) {\n return true;\n } else {\n return false;\n }\n });\n },\n awaitLeadership: function awaitLeadership() {\n var _this3 = this;\n if (!this._wLMP) {\n this._wKMC.c = new AbortController();\n var returnPromise = new Promise(function (res, rej) {\n _this3._wKMC.res = res;\n _this3._wKMC.rej = rej;\n });\n this._wLMP = new Promise(function (res, reject) {\n navigator.locks.request(_this3.lN, {\n signal: _this3._wKMC.c.signal\n }, function () {\n // if the lock resolved, we can drop the abort controller\n _this3._wKMC.c = undefined;\n (0, _leaderElectionUtil.beLeader)(_this3);\n res();\n return returnPromise;\n })[\"catch\"](function (err) {\n if (err.message && err.message === LEADER_DIE_ABORT_SIGNAL_MESSAGE) {\n /**\n * In this case we do nothing!\n * The leader died and awaitLeadership()\n * will never resolve. Also since this is not an error,\n * it will not throw.\n */\n } else {\n if (_this3._wKMC.rej) {\n _this3._wKMC.rej(err);\n }\n reject(err);\n }\n });\n });\n }\n return this._wLMP;\n },\n set onduplicate(_fn) {\n // Do nothing because there are no duplicates in the WebLock version\n },\n die: function die() {\n var _this4 = this;\n this._lstns.forEach(function (listener) {\n return _this4.broadcastChannel.removeEventListener('internal', listener);\n });\n this._lstns = [];\n this._unl.forEach(function (uFn) {\n return uFn.remove();\n });\n this._unl = [];\n if (this.isLeader) {\n this.isLeader = false;\n }\n this.isDead = true;\n if (this._wKMC.res) {\n this._wKMC.res();\n }\n\n /**\n * We have to fire an abort signal\n * so that the navigator.locks.request stops.\n */\n if (this._wKMC.c) {\n this._wKMC.c.abort(new Error(LEADER_DIE_ABORT_SIGNAL_MESSAGE));\n }\n return (0, _leaderElectionUtil.sendLeaderMessage)(this, 'death');\n }\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js?\n}")},"./node_modules/broadcast-channel/dist/lib/leader-election.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.createLeaderElection = createLeaderElection;\nvar _util = __webpack_require__(/*! ./util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _leaderElectionUtil = __webpack_require__(/*! ./leader-election-util.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-util.js\");\nvar _leaderElectionWebLock = __webpack_require__(/*! ./leader-election-web-lock.js */ \"./node_modules/broadcast-channel/dist/lib/leader-election-web-lock.js\");\nvar LeaderElection = function LeaderElection(broadcastChannel, options) {\n var _this = this;\n this.broadcastChannel = broadcastChannel;\n this._options = options;\n this.isLeader = false;\n this._hasLeader = false;\n this.isDead = false;\n this.token = (0, _util.randomToken)();\n\n /**\n * Apply Queue,\n * used to ensure we do not run applyOnce()\n * in parallel.\n */\n this._aplQ = _util.PROMISE_RESOLVED_VOID;\n // amount of unfinished applyOnce() calls\n this._aplQC = 0;\n\n // things to clean up\n this._unl = []; // _unloads\n this._lstns = []; // _listeners\n this._dpL = function () {}; // onduplicate listener\n this._dpLC = false; // true when onduplicate called\n\n /**\n * Even when the own instance is not applying,\n * we still listen to messages to ensure the hasLeader flag\n * is set correctly.\n */\n var hasLeaderListener = function hasLeaderListener(msg) {\n if (msg.context === 'leader') {\n if (msg.action === 'death') {\n _this._hasLeader = false;\n }\n if (msg.action === 'tell') {\n _this._hasLeader = true;\n }\n }\n };\n this.broadcastChannel.addEventListener('internal', hasLeaderListener);\n this._lstns.push(hasLeaderListener);\n};\nLeaderElection.prototype = {\n hasLeader: function hasLeader() {\n return Promise.resolve(this._hasLeader);\n },\n /**\n * Returns true if the instance is leader,\n * false if not.\n * @async\n */\n applyOnce: function applyOnce(\n // true if the applyOnce() call came from the fallbackInterval cycle\n isFromFallbackInterval) {\n var _this2 = this;\n if (this.isLeader) {\n return (0, _util.sleep)(0, true);\n }\n if (this.isDead) {\n return (0, _util.sleep)(0, false);\n }\n\n /**\n * Already applying more than once,\n * -> wait for the apply queue to be finished.\n */\n if (this._aplQC > 1) {\n return this._aplQ;\n }\n\n /**\n * Add a new apply-run\n */\n var applyRun = function applyRun() {\n /**\n * Optimization shortcuts.\n * Directly return if a previous run\n * has already elected a leader.\n */\n if (_this2.isLeader) {\n return _util.PROMISE_RESOLVED_TRUE;\n }\n var stopCriteria = false;\n var stopCriteriaPromiseResolve;\n /**\n * Resolves when a stop criteria is reached.\n * Uses as a performance shortcut so we do not\n * have to await the responseTime when it is already clear\n * that the election failed.\n */\n var stopCriteriaPromise = new Promise(function (res) {\n stopCriteriaPromiseResolve = function stopCriteriaPromiseResolve() {\n stopCriteria = true;\n res();\n };\n });\n var handleMessage = function handleMessage(msg) {\n if (msg.context === 'leader' && msg.token != _this2.token) {\n if (msg.action === 'apply') {\n // other is applying\n if (msg.token > _this2.token) {\n /**\n * other has higher token\n * -> stop applying and let other become leader.\n */\n stopCriteriaPromiseResolve();\n }\n }\n if (msg.action === 'tell') {\n // other is already leader\n stopCriteriaPromiseResolve();\n _this2._hasLeader = true;\n }\n }\n };\n _this2.broadcastChannel.addEventListener('internal', handleMessage);\n\n /**\n * If the applyOnce() call came from the fallbackInterval,\n * we can assume that the election runs in the background and\n * not critical process is waiting for it.\n * When this is true, we give the other instances\n * more time to answer to messages in the election cycle.\n * This makes it less likely to elect duplicate leaders.\n * But also it takes longer which is not a problem because we anyway\n * run in the background.\n */\n var waitForAnswerTime = isFromFallbackInterval ? _this2._options.responseTime * 4 : _this2._options.responseTime;\n return (0, _leaderElectionUtil.sendLeaderMessage)(_this2, 'apply') // send out that this one is applying\n .then(function () {\n return Promise.race([(0, _util.sleep)(waitForAnswerTime), stopCriteriaPromise.then(function () {\n return Promise.reject(new Error());\n })]);\n })\n // send again in case another instance was just created\n .then(function () {\n return (0, _leaderElectionUtil.sendLeaderMessage)(_this2, 'apply');\n })\n // let others time to respond\n .then(function () {\n return Promise.race([(0, _util.sleep)(waitForAnswerTime), stopCriteriaPromise.then(function () {\n return Promise.reject(new Error());\n })]);\n })[\"catch\"](function () {}).then(function () {\n _this2.broadcastChannel.removeEventListener('internal', handleMessage);\n if (!stopCriteria) {\n // no stop criteria -> own is leader\n return (0, _leaderElectionUtil.beLeader)(_this2).then(function () {\n return true;\n });\n } else {\n // other is leader\n return false;\n }\n });\n };\n this._aplQC = this._aplQC + 1;\n this._aplQ = this._aplQ.then(function () {\n return applyRun();\n }).then(function () {\n _this2._aplQC = _this2._aplQC - 1;\n });\n return this._aplQ.then(function () {\n return _this2.isLeader;\n });\n },\n awaitLeadership: function awaitLeadership() {\n if (/* _awaitLeadershipPromise */\n !this._aLP) {\n this._aLP = _awaitLeadershipOnce(this);\n }\n return this._aLP;\n },\n set onduplicate(fn) {\n this._dpL = fn;\n },\n die: function die() {\n var _this3 = this;\n this._lstns.forEach(function (listener) {\n return _this3.broadcastChannel.removeEventListener('internal', listener);\n });\n this._lstns = [];\n this._unl.forEach(function (uFn) {\n return uFn.remove();\n });\n this._unl = [];\n if (this.isLeader) {\n this._hasLeader = false;\n this.isLeader = false;\n }\n this.isDead = true;\n return (0, _leaderElectionUtil.sendLeaderMessage)(this, 'death');\n }\n};\n\n/**\n * @param leaderElector {LeaderElector}\n */\nfunction _awaitLeadershipOnce(leaderElector) {\n if (leaderElector.isLeader) {\n return _util.PROMISE_RESOLVED_VOID;\n }\n return new Promise(function (res) {\n var resolved = false;\n function finish() {\n if (resolved) {\n return;\n }\n resolved = true;\n leaderElector.broadcastChannel.removeEventListener('internal', whenDeathListener);\n res(true);\n }\n\n // try once now\n leaderElector.applyOnce().then(function () {\n if (leaderElector.isLeader) {\n finish();\n }\n });\n\n /**\n * Try on fallbackInterval\n * @recursive\n */\n var _tryOnFallBack = function tryOnFallBack() {\n return (0, _util.sleep)(leaderElector._options.fallbackInterval).then(function () {\n if (leaderElector.isDead || resolved) {\n return;\n }\n if (leaderElector.isLeader) {\n finish();\n } else {\n return leaderElector.applyOnce(true).then(function () {\n if (leaderElector.isLeader) {\n finish();\n } else {\n _tryOnFallBack();\n }\n });\n }\n });\n };\n _tryOnFallBack();\n\n // try when other leader dies\n var whenDeathListener = function whenDeathListener(msg) {\n if (msg.context === 'leader' && msg.action === 'death') {\n leaderElector._hasLeader = false;\n leaderElector.applyOnce().then(function () {\n if (leaderElector.isLeader) {\n finish();\n }\n });\n }\n };\n leaderElector.broadcastChannel.addEventListener('internal', whenDeathListener);\n leaderElector._lstns.push(whenDeathListener);\n });\n}\nfunction fillOptionsWithDefaults(options, channel) {\n if (!options) options = {};\n options = JSON.parse(JSON.stringify(options));\n if (!options.fallbackInterval) {\n options.fallbackInterval = 3000;\n }\n if (!options.responseTime) {\n options.responseTime = channel.method.averageResponseTime(channel.options);\n }\n return options;\n}\nfunction createLeaderElection(channel, options) {\n if (channel._leaderElector) {\n throw new Error('BroadcastChannel already has a leader-elector');\n }\n options = fillOptionsWithDefaults(options, channel);\n var elector = (0, _util.supportsWebLockAPI)() ? new _leaderElectionWebLock.LeaderElectionWebLock(channel, options) : new LeaderElection(channel, options);\n channel._befC.push(function () {\n return elector.die();\n });\n channel._leaderElector = elector;\n return elector;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/leader-election.js?\n}")},"./node_modules/broadcast-channel/dist/lib/method-chooser.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js");\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nexports.chooseMethod = chooseMethod;\nvar _native = __webpack_require__(/*! ./methods/native.js */ "./node_modules/broadcast-channel/dist/lib/methods/native.js");\nvar _indexedDb = __webpack_require__(/*! ./methods/indexed-db.js */ "./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js");\nvar _localstorage = __webpack_require__(/*! ./methods/localstorage.js */ "./node_modules/broadcast-channel/dist/lib/methods/localstorage.js");\nvar _simulate = __webpack_require__(/*! ./methods/simulate.js */ "./node_modules/broadcast-channel/dist/lib/methods/simulate.js");\nfunction _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }\n// the line below will be removed from es5/browser builds\n\n// order is important\nvar METHODS = [_native.NativeMethod,\n// fastest\n_indexedDb.IndexedDBMethod, _localstorage.LocalstorageMethod];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n\n // the line below will be removed from es5/browser builds\n\n // directly chosen\n if (options.type) {\n if (options.type === \'simulate\') {\n // only use simulate-method if directly chosen\n return _simulate.SimulateMethod;\n }\n var ret = chooseMethods.find(function (m) {\n return m.type === options.type;\n });\n if (!ret) throw new Error(\'method-type \' + options.type + \' not found\');else return ret;\n }\n\n /**\n * if no webworker support is needed,\n * remove idb from the list so that localstorage will be chosen\n */\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function (m) {\n return m.type !== \'idb\';\n });\n }\n var useMethod = chooseMethods.find(function (method) {\n return method.canBeUsed();\n });\n if (!useMethod) {\n throw new Error("No usable method found in " + JSON.stringify(METHODS.map(function (m) {\n return m.type;\n })));\n } else {\n return useMethod;\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/method-chooser.js?\n}')},"./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TRANSACTION_SETTINGS = exports.IndexedDBMethod = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.cleanOldMessages = cleanOldMessages;\nexports.close = close;\nexports.commitIndexedDBTransaction = commitIndexedDBTransaction;\nexports.create = create;\nexports.createDatabase = createDatabase;\nexports.getAllMessages = getAllMessages;\nexports.getIdb = getIdb;\nexports.getMessagesHigherThan = getMessagesHigherThan;\nexports.getOldMessages = getOldMessages;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.removeMessagesById = removeMessagesById;\nexports.type = void 0;\nexports.writeMessage = writeMessage;\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar _obliviousSet = __webpack_require__(/*! oblivious-set */ \"./node_modules/oblivious-set/dist/cjs/src/index.es5.js\");\nvar _options = __webpack_require__(/*! ../options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\n/**\n * this method uses indexeddb to store the messages\n * There is currently no observerAPI for idb\n * @link https://github.com/w3c/IndexedDB/issues/51\n * \n * When working on this, ensure to use these performance optimizations:\n * @link https://rxdb.info/slow-indexeddb.html\n */\n\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar DB_PREFIX = 'pubkey.broadcast-channel-0-';\nvar OBJECT_STORE_ID = 'messages';\n\n/**\n * Use relaxed durability for faster performance on all transactions.\n * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/\n */\nvar TRANSACTION_SETTINGS = exports.TRANSACTION_SETTINGS = {\n durability: 'relaxed'\n};\nvar type = exports.type = 'idb';\nfunction getIdb() {\n if (typeof indexedDB !== 'undefined') return indexedDB;\n if (typeof window !== 'undefined') {\n if (typeof window.mozIndexedDB !== 'undefined') return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== 'undefined') return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== 'undefined') return window.msIndexedDB;\n }\n return false;\n}\n\n/**\n * If possible, we should explicitly commit IndexedDB transactions\n * for better performance.\n * @link https://nolanlawson.com/2021/08/22/speeding-up-indexeddb-reads-and-writes/\n */\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n\n // create table\n var dbName = DB_PREFIX + channelName;\n\n /**\n * All IndexedDB databases are opened without version\n * because it is a bit faster, especially on firefox\n * @link http://nparashuram.com/IndexedDB/perf/#Open%20Database%20with%20version\n */\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function (ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: 'id',\n autoIncrement: true\n });\n };\n return new Promise(function (res, rej) {\n openRequest.onerror = function (ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function () {\n res(openRequest.result);\n };\n });\n}\n\n/**\n * writes the new message to the database\n * so other readers can find it\n */\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = Date.now();\n var writeObject = {\n uuid: readerUuid,\n time: time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], 'readwrite', TRANSACTION_SETTINGS);\n return new Promise(function (res, rej) {\n tx.oncomplete = function () {\n return res();\n };\n tx.onerror = function (ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getAllMessages(db) {\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function (res) {\n objectStore.openCursor().onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n ret.push(cursor.value);\n //alert(\"Name for SSN \" + cursor.key + \" is \" + cursor.value.name);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n\n /**\n * Optimization shortcut,\n * if getAll() can be used, do not use a cursor.\n * @link https://rxdb.info/slow-indexeddb.html\n */\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function (res, rej) {\n getAllRequest.onerror = function (err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function (e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n // Occasionally Safari will fail on IDBKeyRange.bound, this\n // catches that error, having it open the cursor to the first\n // item. When it gets data it will advance to the desired key.\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function (res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function (err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, 'readwrite', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function (id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function (res) {\n deleteRequest.onsuccess = function () {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = Date.now() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, 'readonly', TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function (res) {\n objectStore.openCursor().onsuccess = function (ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n //alert(\"Name for SSN \" + cursor.key + \" is \" + cursor.value.name);\n cursor[\"continue\"]();\n } else {\n // no more old messages,\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function (tooOld) {\n return removeMessagesById(channelState, tooOld.map(function (msg) {\n return msg.id;\n }));\n });\n}\nfunction create(channelName, options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n return createDatabase(channelName).then(function (db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName: channelName,\n options: options,\n uuid: (0, _util.randomToken)(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new _obliviousSet.ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: _util.PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db: db\n };\n\n /**\n * Handle abrupt closes that do not originate from db.close().\n * This could happen, for example, if the underlying storage is\n * removed or if the user clears the database in the browser's\n * history preferences.\n */\n db.onclose = function () {\n state.closed = true;\n if (options.idb.onclose) options.idb.onclose();\n };\n\n /**\n * if service-workers are used,\n * we have no 'storage'-event if they post a message,\n * therefore we also have to set an interval\n */\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed) return;\n readNewMessages(state).then(function () {\n return (0, _util.sleep)(state.options.idb.fallbackInterval);\n }).then(function () {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid) return false; // send by own\n if (state.eMIs.has(msgObj.id)) return false; // already emitted\n if (msgObj.data.time < state.messagesCallbackTime) return false; // older then onMessageCallback\n return true;\n}\n\n/**\n * reads all new messages from the database and emits them\n */\nfunction readNewMessages(state) {\n // channel already closed\n if (state.closed) return _util.PROMISE_RESOLVED_VOID;\n\n // if no one is listening, we do not need to scan for new messages\n if (!state.messagesCallback) return _util.PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function (newerMessages) {\n var useMessages = newerMessages\n /**\n * there is a bug in iOS where the msgObj can be undefined sometimes\n * so we filter them out\n * @link https://github.com/pubkey/broadcast-channel/issues/19\n */.filter(function (msgObj) {\n return !!msgObj;\n }).map(function (msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function (msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function (msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n }); // sort by time\n useMessages.forEach(function (msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return _util.PROMISE_RESOLVED_VOID;\n });\n}\nfunction close(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function () {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function () {\n if ((0, _util.randomInt)(0, 10) === 0) {\n /* await (do not await) */\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed() {\n return !!getIdb();\n}\nfunction averageResponseTime(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = exports.IndexedDBMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/indexed-db.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/localstorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.LocalstorageMethod = void 0;\nexports.addStorageEventListener = addStorageEventListener;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.getLocalStorage = getLocalStorage;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.removeStorageEventListener = removeStorageEventListener;\nexports.storageKey = storageKey;\nexports.type = void 0;\nvar _obliviousSet = __webpack_require__(/*! oblivious-set */ \"./node_modules/oblivious-set/dist/cjs/src/index.es5.js\");\nvar _options = __webpack_require__(/*! ../options.js */ \"./node_modules/broadcast-channel/dist/lib/options.js\");\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\n/**\n * A localStorage-only method which uses localstorage and its 'storage'-event\n * This does not work inside webworkers because they have no access to localstorage\n * This is basically implemented to support IE9 or your grandmother's toaster.\n * @link https://caniuse.com/#feat=namevalue-storage\n * @link https://caniuse.com/#feat=indexeddb\n */\n\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar KEY_PREFIX = 'pubkey.broadcastChannel-';\nvar type = exports.type = 'localstorage';\n\n/**\n * copied from crosstab\n * @link https://github.com/tejacques/crosstab/blob/master/src/crosstab.js#L32\n */\nfunction getLocalStorage() {\n var localStorage;\n if (typeof window === 'undefined') return null;\n try {\n localStorage = window.localStorage;\n localStorage = window['ie8-eventlistener/storage'] || window.localStorage;\n } catch (e) {\n // New versions of Firefox throw a Security exception\n // if cookies are disabled. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1028153\n }\n return localStorage;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\n\n/**\n* writes the new message to the storage\n* and fires the storage-event so other readers can find it\n*/\nfunction postMessage(channelState, messageJson) {\n return new Promise(function (res) {\n (0, _util.sleep)().then(function () {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: (0, _util.randomToken)(),\n time: Date.now(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n\n /**\n * StorageEvent does not fire the 'storage' event\n * in the window that changes the state of the local storage.\n * So we fire it manually\n */\n var ev = document.createEvent('Event');\n ev.initEvent('storage', true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener('storage', listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener('storage', listener);\n}\nfunction create(channelName, options) {\n options = (0, _options.fillOptionsWithDefaults)(options);\n if (!canBeUsed()) {\n throw new Error('BroadcastChannel: localstorage cannot be used');\n }\n var uuid = (0, _util.randomToken)();\n\n /**\n * eMIs\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n var eMIs = new _obliviousSet.ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName: channelName,\n uuid: uuid,\n eMIs: eMIs // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function (msgObj) {\n if (!state.messagesCallback) return; // no listener\n if (msgObj.uuid === uuid) return; // own message\n if (!msgObj.token || eMIs.has(msgObj.token)) return; // already emitted\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime) return; // too old\n\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n var ls = getLocalStorage();\n if (!ls) return false;\n try {\n var key = '__broadcastchannel_check';\n ls.setItem(key, 'works');\n ls.removeItem(key);\n } catch (e) {\n // Safari 10 in private mode will not allow write access to local\n // storage and fail with a QuotaExceededError. See\n // https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API#Private_Browsing_Incognito_modes\n return false;\n }\n return true;\n}\nfunction averageResponseTime() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes('safari') && !userAgent.includes('chrome')) {\n // safari is much slower so this time is higher\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = exports.LocalstorageMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/localstorage.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/native.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NativeMethod = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.type = void 0;\nvar _util = __webpack_require__(/*! ../util.js */ \"./node_modules/broadcast-channel/dist/lib/util.js\");\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar type = exports.type = 'native';\nfunction create(channelName) {\n var state = {\n time: (0, _util.microSeconds)(),\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: [] // subscriberFunctions\n };\n state.bc.onmessage = function (msgEvent) {\n if (state.messagesCallback) {\n state.messagesCallback(msgEvent.data);\n }\n };\n return state;\n}\nfunction close(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return _util.PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n // Deno runtime\n // eslint-disable-next-line\n if (typeof globalThis !== 'undefined' && globalThis.Deno && globalThis.Deno.args) {\n return true;\n }\n\n // Browser runtime\n if ((typeof window !== 'undefined' || typeof self !== 'undefined') && typeof BroadcastChannel === 'function') {\n if (BroadcastChannel._pubkey) {\n throw new Error('BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill');\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime() {\n return 150;\n}\nvar NativeMethod = exports.NativeMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/native.js?\n}")},"./node_modules/broadcast-channel/dist/lib/methods/simulate.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\n\nObject.defineProperty(exports, "__esModule", ({\n value: true\n}));\nexports.SimulateMethod = exports.SIMULATE_DELAY_TIME = void 0;\nexports.averageResponseTime = averageResponseTime;\nexports.canBeUsed = canBeUsed;\nexports.close = close;\nexports.create = create;\nexports.microSeconds = void 0;\nexports.onMessage = onMessage;\nexports.postMessage = postMessage;\nexports.type = void 0;\nvar _util = __webpack_require__(/*! ../util.js */ "./node_modules/broadcast-channel/dist/lib/util.js");\nvar microSeconds = exports.microSeconds = _util.microSeconds;\nvar type = exports.type = \'simulate\';\nvar SIMULATE_CHANNELS = new Set();\nfunction create(channelName) {\n var state = {\n time: microSeconds(),\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS["delete"](channelState);\n}\nvar SIMULATE_DELAY_TIME = exports.SIMULATE_DELAY_TIME = 5;\nfunction postMessage(channelState, messageJson) {\n return new Promise(function (res) {\n return setTimeout(function () {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.forEach(function (channel) {\n if (channel.name === channelState.name &&\n // has same name\n channel !== channelState &&\n // not own channel\n !!channel.messagesCallback &&\n // has subscribers\n channel.time < messageJson.time // channel not created after postMessage() call\n ) {\n channel.messagesCallback(messageJson);\n }\n });\n res();\n }, SIMULATE_DELAY_TIME);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return SIMULATE_DELAY_TIME;\n}\nvar SimulateMethod = exports.SimulateMethod = {\n create: create,\n close: close,\n onMessage: onMessage,\n postMessage: postMessage,\n canBeUsed: canBeUsed,\n type: type,\n averageResponseTime: averageResponseTime,\n microSeconds: microSeconds\n};\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/methods/simulate.js?\n}')},"./node_modules/broadcast-channel/dist/lib/options.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.fillOptionsWithDefaults = fillOptionsWithDefaults;\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n\n // main\n if (typeof options.webWorkerSupport === 'undefined') options.webWorkerSupport = true;\n\n // indexed-db\n if (!options.idb) options.idb = {};\n // after this time the messages get deleted\n if (!options.idb.ttl) options.idb.ttl = 1000 * 45;\n if (!options.idb.fallbackInterval) options.idb.fallbackInterval = 150;\n // handles abrupt db onclose events.\n if (originalOptions.idb && typeof originalOptions.idb.onclose === 'function') options.idb.onclose = originalOptions.idb.onclose;\n\n // localstorage\n if (!options.localstorage) options.localstorage = {};\n if (!options.localstorage.removeTimeout) options.localstorage.removeTimeout = 1000 * 60;\n\n // custom methods\n if (originalOptions.methods) options.methods = originalOptions.methods;\n\n // node\n if (!options.node) options.node = {};\n if (!options.node.ttl) options.node.ttl = 1000 * 60 * 2; // 2 minutes;\n /**\n * On linux use 'ulimit -Hn' to get the limit of open files.\n * On ubuntu this was 4096 for me, so we use half of that as maxParallelWrites default.\n */\n if (!options.node.maxParallelWrites) options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === 'undefined') options.node.useFastPath = true;\n return options;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/options.js?\n}")},"./node_modules/broadcast-channel/dist/lib/util.js"(__unused_webpack_module,exports){"use strict";eval("{\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_FALSE = void 0;\nexports.isPromise = isPromise;\nexports.microSeconds = microSeconds;\nexports.randomInt = randomInt;\nexports.randomToken = randomToken;\nexports.sleep = sleep;\nexports.supportsWebLockAPI = supportsWebLockAPI;\n/**\n * returns true if the given object is a promise\n */\nfunction isPromise(obj) {\n return obj && typeof obj.then === 'function';\n}\nvar PROMISE_RESOLVED_FALSE = exports.PROMISE_RESOLVED_FALSE = Promise.resolve(false);\nvar PROMISE_RESOLVED_TRUE = exports.PROMISE_RESOLVED_TRUE = Promise.resolve(true);\nvar PROMISE_RESOLVED_VOID = exports.PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time) time = 0;\n return new Promise(function (res) {\n return setTimeout(function () {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\n\n/**\n * https://stackoverflow.com/a/8084248\n */\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\n\n/**\n * Returns the current unix time in micro-seconds,\n * WARNING: This is a pseudo-function\n * Performance.now is not reliable in webworkers, so we just make sure to never return the same time.\n * This is enough in browsers, and this function will not be used in nodejs.\n * The main reason for this hack is to ensure that BroadcastChannel behaves equal to production when it is used in fast-running unit tests.\n */\nfunction microSeconds() {\n var ret = Date.now() * 1000; // milliseconds to microseconds\n if (ret <= lastMs) {\n ret = lastMs + 1;\n }\n lastMs = ret;\n return ret;\n}\n\n/**\n * Check if WebLock API is supported.\n * @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API\n */\nfunction supportsWebLockAPI() {\n if (typeof navigator !== 'undefined' && typeof navigator.locks !== 'undefined' && typeof navigator.locks.request === 'function') {\n return true;\n } else {\n return false;\n }\n}\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/dist/lib/util.js?\n}")},"./node_modules/buffer/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\n\nconst base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nconst ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/buffer/index.js?\n}")},"./node_modules/ieee754/index.js"(__unused_webpack_module,exports){eval("{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/ieee754/index.js?\n}")},"./node_modules/oblivious-set/dist/cjs/src/index.es5.js"(module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, "default", { enumerable: true, value: v });\n}) : function(o, v) {\n o["default"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nconst pkg = __importStar(__webpack_require__(/*! ./index.js */ "./node_modules/oblivious-set/dist/cjs/src/index.js"));\nmodule.exports = pkg;\n//# sourceMappingURL=index.es5.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/oblivious-set/dist/cjs/src/index.es5.js?\n}')},"./node_modules/oblivious-set/dist/cjs/src/index.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.now = exports.removeTooOldValues = exports.ObliviousSet = void 0;\n/**\n * this is a set which automatically forgets\n * a given entry when a new entry is set and the ttl\n * of the old one is over\n */\nclass ObliviousSet {\n ttl;\n map = new Map();\n /**\n * Creating calls to setTimeout() is expensive,\n * so we only do that if there is not timeout already open.\n */\n _to = false;\n constructor(ttl) {\n this.ttl = ttl;\n }\n has(value) {\n const valueTime = this.map.get(value);\n if (typeof valueTime === 'undefined') {\n return false;\n }\n if (valueTime < now() - this.ttl) {\n this.map.delete(value);\n return false;\n }\n return true;\n }\n add(value) {\n this.map.delete(value);\n this.map.set(value, now());\n /**\n * When a new value is added,\n * start the cleanup at the next tick\n * to not block the cpu for more important stuff\n * that might happen.\n */\n if (!this._to) {\n this._to = true;\n setTimeout(() => {\n this._to = false;\n removeTooOldValues(this);\n }, 0);\n }\n }\n clear() {\n this.map.clear();\n }\n}\nexports.ObliviousSet = ObliviousSet;\n/**\n * Removes all entries from the set\n * where the TTL has expired\n */\nfunction removeTooOldValues(obliviousSet) {\n const olderThen = now() - obliviousSet.ttl;\n const iterator = obliviousSet.map[Symbol.iterator]();\n /**\n * Because we can assume the new values are added at the bottom,\n * we start from the top and stop as soon as we reach a non-too-old value.\n */\n while (true) {\n const next = iterator.next().value;\n if (!next) {\n break; // no more elements\n }\n const value = next[0];\n const time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n }\n else {\n // We reached a value that is not old enough\n break;\n }\n }\n}\nexports.removeTooOldValues = removeTooOldValues;\nfunction now() {\n return Date.now();\n}\nexports.now = now;\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/oblivious-set/dist/cjs/src/index.js?\n}")},"./node_modules/unload/dist/es/browser.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addBrowser: () => (/* binding */ addBrowser)\n/* harmony export */ });\n/* global WorkerGlobalScope */\n\nfunction addBrowser(fn) {\n if (typeof WorkerGlobalScope === 'function' && self instanceof WorkerGlobalScope) {\n /**\n * Because killing a worker does directly stop the excution\n * of the code, our only chance is to overwrite the close function\n * which could work some times.\n * @link https://stackoverflow.com/q/72903255/3443137\n */\n var oldClose = self.close.bind(self);\n self.close = function () {\n fn();\n return oldClose();\n };\n } else {\n /**\n * if we are on react-native, there is no window.addEventListener\n * @link https://github.com/pubkey/unload/issues/6\n */\n if (typeof window.addEventListener !== 'function') {\n return;\n }\n\n /**\n * for normal browser-windows, we use the beforeunload-event\n */\n window.addEventListener('beforeunload', function () {\n fn();\n }, true);\n\n /**\n * for iframes, we have to use the unload-event\n * @link https://stackoverflow.com/q/47533670/3443137\n */\n window.addEventListener('unload', function () {\n fn();\n }, true);\n }\n\n /**\n * TODO add fallback for safari-mobile\n * @link https://stackoverflow.com/a/26193516/3443137\n */\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/browser.js?\n}")},"./node_modules/unload/dist/es/index.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ getSize: () => (/* binding */ getSize),\n/* harmony export */ removeAll: () => (/* binding */ removeAll),\n/* harmony export */ runAll: () => (/* binding */ runAll)\n/* harmony export */ });\n/* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browser.js */ "./node_modules/unload/dist/es/browser.js");\n/* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node.js */ "./node_modules/unload/dist/es/node.js");\n\n\n\n/**\n * Use the code directly to prevent import problems\n * with the detect-node package.\n * @link https://github.com/iliakan/detect-node/blob/master/index.js\n */\nvar isNode = Object.prototype.toString.call(typeof process !== \'undefined\' ? process : 0) === \'[object process]\';\nvar USE_METHOD = isNode ? _node_js__WEBPACK_IMPORTED_MODULE_1__.addNode : _browser_js__WEBPACK_IMPORTED_MODULE_0__.addBrowser;\nvar LISTENERS = new Set();\nvar startedListening = false;\nfunction startListening() {\n if (startedListening) {\n return;\n }\n startedListening = true;\n USE_METHOD(runAll);\n}\nfunction add(fn) {\n startListening();\n if (typeof fn !== \'function\') {\n throw new Error(\'Listener is no function\');\n }\n LISTENERS.add(fn);\n var addReturn = {\n remove: function remove() {\n return LISTENERS["delete"](fn);\n },\n run: function run() {\n LISTENERS["delete"](fn);\n return fn();\n }\n };\n return addReturn;\n}\nfunction runAll() {\n var promises = [];\n LISTENERS.forEach(function (fn) {\n promises.push(fn());\n LISTENERS["delete"](fn);\n });\n return Promise.all(promises);\n}\nfunction removeAll() {\n LISTENERS.clear();\n}\nfunction getSize() {\n return LISTENERS.size;\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/index.js?\n}')},"./node_modules/unload/dist/es/node.js"(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addNode: () => (/* binding */ addNode)\n/* harmony export */ });\nfunction addNode(fn) {\n process.on('exit', function () {\n return fn();\n });\n\n /**\n * on the following events,\n * the process will not end if there are\n * event-handlers attached,\n * therefore we have to call process.exit()\n */\n process.on('beforeExit', function () {\n return fn().then(function () {\n return process.exit();\n });\n });\n // catches ctrl+c event\n process.on('SIGINT', function () {\n return fn().then(function () {\n return process.exit();\n });\n });\n // catches uncaught exceptions\n process.on('uncaughtException', function (err) {\n return fn().then(function () {\n console.trace(err);\n process.exit(101);\n });\n });\n}\n\n//# sourceURL=webpack://beacon/./node_modules/unload/dist/es/node.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TezosBlockchain = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst bundled_wallet_registry_1 = __webpack_require__(/*! ./data/bundled-wallet-registry */ \"./packages/octez.connect-blockchain-tezos/dist/cjs/data/bundled-wallet-registry.js\");\nconst message_type_1 = __webpack_require__(/*! ./types/message-type */ \"./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js\");\nlet walletListsPromise;\n// Fetch-first with bundled fallback: the live list comes from the\n// wallet-list repo's CDN, so new wallets reach dApps without an SDK\n// release; the generated snapshot keeps the alert working offline. A\n// failed fetch is not cached, so the next call retries.\nconst resolveWalletLists = () => {\n walletListsPromise !== null && walletListsPromise !== void 0 ? walletListsPromise : (walletListsPromise = (0, octez_connect_utils_1.fetchWalletListsFromGitHub)('tezos').then((registry) => {\n if (registry === null) {\n walletListsPromise = undefined;\n }\n return (0, octez_connect_utils_1.loadWalletLists)(registry !== null && registry !== void 0 ? registry : bundled_wallet_registry_1.bundledWalletRegistry);\n }));\n return walletListsPromise;\n};\nconst logger = new octez_connect_core_1.Logger('TezosBlockchain');\nclass TezosBlockchain {\n constructor() {\n // CAIP-2 namespace. Must match the `blockchainIdentifier` field on the\n // wire (PermissionRequestV3/PermissionResponseV3 — see\n // packages/octez.connect-types/src/types/beaconV3/PermissionRequest.ts)\n // and the Substrate handler's `'substrate'` convention. Previously this was\n // the coin ticker `'xtz'`, which silently broke every registry lookup\n // keyed on the wire identifier (the wallet's OutgoingResponseInterceptor\n // and the dApp's v4 fanout parser both go through `blockchains.get`).\n this.identifier = 'tezos';\n // The registry also resolves the pre-rename ticker key, so peers and\n // integrations still addressing the handler as 'xtz' keep working.\n this.legacyIdentifiers = ['xtz'];\n }\n validateRequest(input) {\n return __awaiter(this, void 0, void 0, function* () {\n if (input.type === octez_connect_types_1.BeaconMessageType.PermissionRequest) {\n // Permission requests carry appMetadata/scopes injected by the client;\n // nothing chain-specific to validate before send.\n return;\n }\n const data = input.blockchainData;\n if (!data || typeof data !== 'object') {\n throw new Error('Tezos request is missing blockchainData');\n }\n const requireFields = (fields) => {\n for (const [name, value] of fields) {\n if (value === undefined || value === null || value === '') {\n throw new Error(`Tezos ${data.type} is missing required field \"${name}\"`);\n }\n }\n };\n switch (data.type) {\n case message_type_1.TezosMessageType.operation_request:\n requireFields([\n ['network', data.network],\n ['operationDetails', data.operationDetails],\n ['sourceAddress', data.sourceAddress]\n ]);\n if (!Array.isArray(data.operationDetails) || data.operationDetails.length === 0) {\n throw new Error('Tezos operation_request requires a non-empty operationDetails array');\n }\n return;\n case message_type_1.TezosMessageType.sign_payload_request:\n requireFields([\n ['signingType', data.signingType],\n ['payload', data.payload]\n ]);\n return;\n case message_type_1.TezosMessageType.broadcast_request:\n requireFields([\n ['network', data.network],\n ['signedTransaction', data.signedTransaction]\n ]);\n return;\n case message_type_1.TezosMessageType.proof_of_event_challenge_request:\n case message_type_1.TezosMessageType.simulated_proof_of_event_challenge_request:\n requireFields([\n ['contractAddress', data.contractAddress],\n ['payload', data.payload]\n ]);\n return;\n default:\n throw new Error(`Unknown Tezos request type \"${data.type}\" — the peer speaks a newer Tezos dialect than this SDK`);\n }\n });\n }\n /**\n * Wallet-side validation of an outgoing response before it is wrapped and\n * sent. Ports the flat-v2 pipeline's permission-response checks: a usable\n * publicKey/address must be present, addresses must parse, and abstracted\n * accounts must live at a contract address.\n */\n validateResponse(message) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (message.type !== octez_connect_types_1.BeaconMessageType.PermissionResponse) {\n return;\n }\n const data = ((_a = message.blockchainData) !== null && _a !== void 0 ? _a : {});\n const fanoutEntries = data.accounts && typeof data.accounts === 'object' && !Array.isArray(data.accounts)\n ? Object.values(data.accounts)\n : [];\n const candidates = fanoutEntries.length\n ? fanoutEntries.map((raw) => {\n var _a, _b;\n return ({\n publicKey: (_a = raw === null || raw === void 0 ? void 0 : raw.publicKey) !== null && _a !== void 0 ? _a : data.publicKey,\n address: (_b = raw === null || raw === void 0 ? void 0 : raw.address) !== null && _b !== void 0 ? _b : data.address\n });\n })\n : [{ publicKey: data.publicKey, address: data.address }];\n for (const candidate of candidates) {\n const { publicKey, address: candidateAddress } = candidate;\n if (!publicKey && !candidateAddress) {\n throw new Error('PublicKey or Address must be defined');\n }\n const address = candidateAddress !== null && candidateAddress !== void 0 ? candidateAddress : (yield (0, octez_connect_utils_1.getAddressFromPublicKey)((0, octez_connect_utils_1.prefixPublicKey)(publicKey)));\n if (!(0, octez_connect_utils_1.isValidAddress)(address)) {\n throw new Error(`Invalid address: \"${address}\"`);\n }\n if (data.walletType === 'abstracted_account' && address.substring(0, 3) !== octez_connect_utils_1.CONTRACT_PREFIX) {\n throw new Error(`Invalid abstracted account address \"${address}\", it should be a ${octez_connect_utils_1.CONTRACT_PREFIX} address`);\n }\n }\n });\n }\n handleResponse(input) {\n return __awaiter(this, void 0, void 0, function* () {\n // Response-side effects are handled by the client; nothing to do here.\n if (input) {\n return;\n }\n });\n }\n getWalletLists() {\n return __awaiter(this, void 0, void 0, function* () {\n return resolveWalletLists();\n });\n }\n getAccountInfosFromPermissionResponse(permissionResponse, peerVersion) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c;\n const data = ((_a = permissionResponse.blockchainData) !== null && _a !== void 0 ? _a : {});\n const scopes = (_b = data.scopes) !== null && _b !== void 0 ? _b : [];\n // Canonicalize wallet-supplied keys once at ingest so every derived\n // address/identifier downstream (dApp account records AND wallet-side\n // permission records) agrees. An entry with only a publicKey gets its\n // address derived here — never stored with an empty address.\n const wirePublicKey = data.publicKey ? (0, octez_connect_utils_1.prefixPublicKey)(data.publicKey) : '';\n const wireAddress = (_c = data.address) !== null && _c !== void 0 ? _c : (wirePublicKey ? yield (0, octez_connect_utils_1.getAddressFromPublicKey)(wirePublicKey) : '');\n const isV4Session = (0, octez_connect_core_1.isMultiNetworkVersion)(peerVersion);\n const hasAccountsFanout = data.accounts && typeof data.accounts === 'object' && !Array.isArray(data.accounts);\n if (isV4Session && hasAccountsFanout && data.accounts) {\n // Reject malformed chain-id keys at ingest: a normalized key that is not\n // a valid Tezos CAIP-2 string would persist an account that no operation\n // request could ever target (resolveOperationNetwork requires CAIP-2),\n // i.e. a permanently-unusable account. Drop and log it instead.\n const validEntries = Object.entries(data.accounts).filter(([chainId]) => {\n const ok = (0, octez_connect_core_1.isValidTezosCaip2)((0, octez_connect_core_1.normalizeTezosCaip2)(chainId));\n if (!ok) {\n logger.warn('getAccountInfosFromPermissionResponse', `Dropping account under malformed CAIP-2 chain id \"${chainId}\"`);\n }\n return ok;\n });\n return Promise.all(validEntries.map((_a) => __awaiter(this, [_a], void 0, function* ([chainId, raw]) {\n var _b;\n const normalizedChainId = (0, octez_connect_core_1.normalizeTezosCaip2)(chainId);\n const publicKey = (raw === null || raw === void 0 ? void 0 : raw.publicKey) ? (0, octez_connect_utils_1.prefixPublicKey)(raw.publicKey) : wirePublicKey;\n const address = (_b = raw === null || raw === void 0 ? void 0 : raw.address) !== null && _b !== void 0 ? _b : ((raw === null || raw === void 0 ? void 0 : raw.publicKey) ? yield (0, octez_connect_utils_1.getAddressFromPublicKey)(publicKey) : wireAddress);\n const network = (0, octez_connect_core_1.networkFromTezosCaip2)(normalizedChainId, {\n name: raw === null || raw === void 0 ? void 0 : raw.name,\n rpcUrl: raw === null || raw === void 0 ? void 0 : raw.rpcUrl\n });\n return {\n accountId: yield (0, octez_connect_core_1.getAccountIdentifier)(address, network),\n address,\n publicKey,\n network,\n scopes\n };\n })));\n }\n const legacyNetwork = data.network;\n const fallbackNetwork = legacyNetwork !== null && legacyNetwork !== void 0 ? legacyNetwork : {\n type: octez_connect_types_1.NetworkType.CUSTOM,\n name: 'tezos'\n };\n return [\n {\n accountId: yield (0, octez_connect_core_1.getAccountIdentifier)(wireAddress, fallbackNetwork),\n address: wireAddress,\n publicKey: wirePublicKey,\n network: legacyNetwork,\n scopes\n }\n ];\n });\n }\n}\nexports.TezosBlockchain = TezosBlockchain;\n//# sourceMappingURL=blockchain.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/data/bundled-wallet-registry.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.bundledWalletRegistry = void 0;\n// Generated by scripts/download-wallet-lists.ts from\n// trilitech/octez.connect-wallet-list v1.0.3 — do not edit by hand.\n// Offline fallback for the CDN fetch in getWalletLists().\nexports.bundledWalletRegistry = {\n "version": "1.0.3",\n "updated": "2026-06-17T10:06:49.849Z",\n "extensionList": [\n {\n "key": "temple_chrome",\n "id": "ookjlbkiijinhpmnjffcofjonbfbgaoc",\n "name": "Temple Wallet Chrome",\n "shortName": "Temple",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTP9/Ev/fP/9pFP9/H//pSv+KH/96Ffd1FvdOBPiOI/l+GvqHHPtzFv9yFf/rT//pTfhwFfhtFf/pTvzkS/uKIPl1GPqPI/qIH/qBG/p5GPyMIvqBHPp/G/p2Fv/rTf7nTP3hSv7bR/3VRP3QQf3MQP3KP/zGPP/qTf/nTfuRI/uNIvt8GfhYCvhUB/hQBvhIAv3MQfqRI/qHHvp7GfqMIfmEHvmBHfl6Gfl5Gfl1F/lyFvlnD//rTfhsE/hrE/hpEvhoEf/tT//pTf3mS/uOIvp+GvdPBflhDPlZCvlVCPhOBPhLA/hCAPqUJfqOI/mFHvl5GPqPI/mKIPmGH/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TDD3/92PFHv/nY40+cOHHymdtfhFdzAiHEBYIkUAKpFrB+9pM6/5D88+zZSzo8kyq6EWYBEhrrVAlw3GXKOnz8vdTXI98nUMyaJKDihVcm9sb+oFEgcCtxv0kCqu944R3GOIspgegmYJIAmvHCq6MHYa5FNwGTBKCsw8uD9cdvAqESMEnAkg7PueNEbyC6vKE2gUAJmCSg+pYXnrncgxDi8+gmYJIAmtHhuTx6488B2gfNuEkCMK/DSxV8MCqAJDgYKAGTBNzQ4SVsfx4hLm1A0qESyOCuUz39LJh6AAzgX1kjAuoHyB0rA5Ac6APVnwM+uo42wXD3OX56K7zKX+wjF+EN2liFhDNygcuPPqoZcwroHzRaX4gm+xFiY1VdRXKg0PnNEbDIuLcNTg5E8q8IImQywfxGCVh+rR4+Pn8Vkkw2mN8sATTL+Fb+aLvXCvl8Lp8L5jdMAGY5k8TmR6FQyOcywfzGCVh008v8fWiCzm+WgOVfcs6dYov5zRKgbyU+0EL+H/65BhMFoAR2oLe1/GYKWOQt5f+wZsats1GWn8lhC9JDf1Ysf1yDxWKxWCwWi8VisVgsFovFYrFYLBaLxWKxWCwWi8VisVgsFovFYrFYLBaLxdKM/wEeKolcwOa4zAAAAABJRU5ErkJggg==",\n "link": "https://templewallet.com/"\n },\n {\n "key": "temple_firefox",\n "id": "{34ac229e-1cf5-4e4c-8a77-988155c4360f}",\n "name": "Temple Wallet Firefox",\n "shortName": "Temple",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTP9/Ev/fP/9pFP9/H//pSv+KH/96Ffd1FvdOBPiOI/l+GvqHHPtzFv9yFf/rT//pTfhwFfhtFf/pTvzkS/uKIPl1GPqPI/qIH/qBG/p5GPyMIvqBHPp/G/p2Fv/rTf7nTP3hSv7bR/3VRP3QQf3MQP3KP/zGPP/qTf/nTfuRI/uNIvt8GfhYCvhU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4nxjCD423PxcHt1x3ywkCX7bcKoFVIiE4I8OBV//VZVfMhb3k4VANALNaKoFrL9N5HxrGD42ZH4XHnsr8TwRAfuhGU+1AMwJ5/GR4Ou/IsMrmBMV8F81DwZKINUCrjkngq//udtb4Tl32EAk3OV1EJETKIFUC6i8/OTDD3/92PFHv/nY40+cOHHymdtfhFdzAiHEBYIkUAKpFrB+9pM6/5D88+zZSzo8kyq6EWYBEhrrVAlw3GXKOnz8vdTXI98nUMyaJKDihVcm9sb+oFEgcCtxv0kCqu944R3GOIspgegmYJIAmvHCq6MHYa5FNwGTBKCsw8uD9cdvAqESMEnAkg7PueNEbyC6vKE2gUAJmCSg+pYXnrncgxDi8+gmYJIAmtHhuTx6488B2gfNuEkCMK/DSxV8MCqAJDgYKAGTBNzQ4SVsfx4hLm1A0qESyOCuUz39LJh6AAzgX1kjAuoHyB0rA5Ac6APVnwM+uo42wXD3OX56K7zKX+wjF+EN2liFhDNygcuPPqoZcwroHzRaX4gm+xFiY1VdRXKg0PnNEbDIuLcNTg5E8q8IImQywfxGCVh+rR4+Pn8Vkkw2mN8sATTL+Fb+aLvXCvl8Lp8L5jdMAGY5k8TmR6FQyOcywfzGCVh008v8fWiCzm+WgOVfcs6dYov5zRKgbyU+0EL+H/65BhMFoAR2oLe1/GYKWOQt5f+wZsats1GWn8lhC9JDf1Ysf1yDxWKxWCwWi8VisVgsFovFYrFYLBaLxWKxWCwWi8VisVgsFovFYrFYLBaLxdKM/wEeKolcwOa4zAAAAABJRU5ErkJggg==",\n "link": "https://templewallet.com/"\n },\n {\n "key": "nightly_chrome",\n "id": "fiikommddbeccaoicoejoniammnalkfa",\n "name": "Nightly",\n "shortName": "Nightly",\n "color": "#6067F9",\n "logo": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3Z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43NTczIDE4LjkyNDQgMzYuNjY1NCAyMy4xOTYzWiIgZmlsbD0iI0Y3RjdGNyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI4MTdfMTQ1NCI+CjxyZWN0IHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgcng9IjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",\n "link": "https://nightly.app/download"\n }\n ],\n "desktopList": [\n {\n "key": "infinity_wallet",\n "name": "Infinity Wallet",\n "shortName": "Infinity Wallet",\n "color": "rgb(52, 147, 218)",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTFNsWS1FQCAtOxYdNxceOBkgPBkgPR0kQxkhPhYcNyY3Pyg6PjRQQzxhSiY5QB0lQxwlQzVURB0mQxcoRh0mQhcdNh0mQhwnORwlQig6RBMYMR0lQhwkQRsjPxwhPhwgPBwfOxwdORoeOhwlQRkgPBYzVRU9YBNNchJWexBjjBREaRYtUBNRehsaNQ15ogmXygam1wOy3QO44wK96AWq2Qie0AuGsxcqSxocNxJciwmQxQeh0ASu2gO03g9plRwYMgWs2QHB7QDK9gHF8QqNwBY4WQWp2AmTxxwVLwek1hskQA5ymhogPgiazRkiPxohPQOx2xoiPgSw2xwSKwSx3BkgPRkfOx0OJxYlQwWt2gao2Ael1wii1gif1Aih1QuJwgyCvAx+uA15sQuHvhkjQA50sA5wqgaw5xBsqRNkpRJnqg9rowic0AqUzBReoBFjmhohPBVXpAmc0wej1gap3RFvsguNxwas4AWw4wyBrhF0uAW06BNRhBQ/axgdOAan1xoiPRkZMw2R0AuW0QmYzwqa1BRIdgel3Aig1RkbNRkXMBkgOxgfOxkfOgqb0wuX0Qub2Qes6QyT0Ame1Amk4guZ0hcMHxB4uxB8wQqe3BgIGxgeOQqh3wip5hgeOBccNhYPJBcVLRcWLxB/xBFrrxCEyRYbNBYSKA6NzRYaMw+JyxYaNA6MzRccNhCFyhYTKhNVixgfOhcdNw6PzxVapxCGyhVdqhcbNg+LzBUZMw+HyxYbNQ2Y3BVmsxYbNQ2U2RJ4wRN9xhGByA+M0xcbNhccNxGDyQ+P2hUYMhUYMQ+U4hCJ0hR0wBQWLxRxvhMVLhKAyBKDzxOAzRN6xRKG1hJ/yBKL2xN8xhQ5ZhQXLxQYMRN+xxMVLRQXMBN5xRV7zxN7xxRuuxR4xRR1wxZ0wxIULBZvwRVqtxQYMRQYMBMWLhVirxIWLxZSoBV2xBZOmxZKkxZywxV4zRZ0yBZxwhUaMxV/1RZxxRMWLxIVLRATLBIVLBATKxEULBIULUshqcwAAAD/dFJOUwADNl6JrMbh8ta6gk4mCZP2+hb///2Z/3L/nc3/////////////////////////////////////////////////////////////////8v/2////////+v////////////////////////////////////////////////////////////////////////b////////////////////////y///////////////////////////////6////9v//////////////////////////////////////////////////////////8vr///b/////////////////8Pv24bfz9xQAABypSURBVHgB7NPVdQBRCEVRnrsyFum/zbh7fgd2B/ewgG8IqbSxzp9BiCblAv9QpWrGBuf7OIHenbtvoP7YQEzVYuh4IguuuPpgUp5/mb+Fjme0rt5uvyWYeQsDz2tYLeF7tSQ78NxGVPPb/dk4PL01aCngK1PZgQTsaPJXBeYRkIqYK3wgKO1HtLl+dX+6BURVAUlZonxbQGSL1Jgi4EUxK1JzcUx4NpNHelyuhB/gninwqGwDSToq3BMqIEmrlXBvGqRKVbijAlIVCwDUy4FUjSwAZES69ARQDum6kiBaR7p6BmmQsgOURco20AEpi2AcUhbAeiRsCeA6ErZ68AMp6xyAA3AADkAZB+AAHIADcADKOAAH4AAcgANwAA7AATgAVRyAA3AADrBTdh/gmrJbZstDPVEljqOvcPu9W0BQrnUDODNoDDJBQGXSDbolvfeevP+3/9neRHDccnbTk/PN72CbdABJzigqoGRkabInFRb/gACymlVzuZyqKGpOVeGLjDZxs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Jw5wNx1A7n489vQh02iyorRt8BXLJjLmcjDqM9kKJyD4BxAApHuOTeSYoY5ZfXy9xvjp6b6c2RU54eqKIrjHsfs5phMEj78FD3ZRvxUEUwtoPQfSPctJqeyAkbvkijpy6Sy3+5pnxdYVZXCP5XqJRoZxup1Z8N4OzwltBNPzXALAVVtgObb3WyIJUjstnuOED88S3BIRfP9ufxJ8IAkcx38NaU8hgJ6v//Esi3F5Xuy1npPmXHC7BX5QAf+3V0crDcNgFMdPknbDmETIRSj0/V9HvBbiZWCMPoA2zawMZehUb+35fm/w/ckh/44EWAM8MZMAEkACSAAJIAHIAzwykwBrgHtmbwGemUkACSABJMCR2YS5HpktkAAS4IGZBJAAEkACZGZrgCUzm9CoA9QZ4+GFWYNt1AFGdDfUASzM7sQswfe58MoDcDcVWqfZAWZfeFkNeJsLrdsI6g1MGis3Fla9xyqkWjhVE0D9BKwHmJ9AdQFn2hZCOUW8G+bCp3l8iKnwOQ+AdwRdxCW3K1Rq7xUuKbK/8PP9UMGNxPefC1jm+1dB97lQ6LzCNcF3rWxebiYqXKeis8eybTX5gO8FPYxlw5beRCj8JOrBzmWTauuND/iNitqkcXMN8sF2zgf8ifLadMnu27xswDS30abB6ajw1SvRwA5bpybZkwAAAABJRU5ErkJggg==",\n "deepLink": "infinity://",\n "downloadLink": "https://infinitywallet.io/download"\n },\n {\n "key": "umami_desktop",\n "name": "Umami",\n "shortName": "Umami",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjY2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADY2NgAAAAAAAEZGRgAAAAAAAAAA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ettgGMQbZDHOuKG3ZISIzYMEm1H7lwmiD4U9FW/Fw/ROCNduDUiovdUdneatUr1rnrVUvLeyO/krBdwckYn5Whvz0/Kls5gi+5iiSQLwE3sBflKmQ5P54WMfk2OXPQjTND5IKfZBSV7dQpGmepGApJdHZdVBSPtspypB3Np9sDD8N5UZdqvjxO8qH8O/pa4HlqOzvVY2FnXngYnbEv4JZWXvqLw926I0AwCWXXxk5nmOj8wkmuWbu+3DpS8PSmXEfbHyAV6ldVED6Gm8wrKoAZIYyoka4BhD2aKYASIxmBJiBmjCktZEDKB1YVsVMUAdIyVNvAC6Dw5l8QKswmktIlqAygrG/BQtwBbGSVWxAuyoeGNdFymA/hvvJEQK8Iz3VFmcAFUVE2xWRAmQ8mEivy5IgBymqIkRoIlplLoIAfYVTKX+8H6AJxUfiG17PUDbwIeMbW8HaF/gE7GQlwM8GfiUWvdugH0VM1BqukcDJBTMxl/xYoBUDjPblL0XoHqOL1ATurcC6M9ZfM1G1UsBdn7jy6T/Kl4JkHrM4k+slaNeCKCtpvGnSsHodw+g3fjwN1YKxe8c4L5Zwt9S8z/07xlATx7HMBfpzI/odwuw9HSwgjky4olk6rsEeNluxg3Mn+LzB4IhORxZWswA0UhYDgUDg3MJs/sfgVqtpj6cO7QAAAAASUVORK5CYII=",\n "deepLink": "umami://",\n "downloadLink": "https://umamiwallet.com/#download"\n },\n {\n "key": "atomex_desktop",\n "name": "Atomex Wallet",\n "shortName": "Atomex",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAEFUExURf////v7/dzh7rfB3Zyq0Iqbx4eYxo2dyN7j7/b3+7C72Wl+tzBOnB4+k7S/2/j5++vu9i5Mm+7w9ytKmqCu0v39/uDl8FJrrFZuruXo8sTN4zNQnczT57vF3ylImTVSn+Lm8U9oq5mnzi1LmvLz+a242LK92mF4tGyBuPn6/P3+/tb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/scSwoci0pt+SVNm1nKuakLKglZeIfpmKgIN3bt6YYNm5o819QtK9r9CUYcCtns24qsq2qMGun8Ctnr+xnMCtnr+tnsKun5+PhcGtn8CtnpOFfL6rnMSvor+tno1/dcGtnsizn7+snsazo8CtoM+6rMS1o8CtncCtn8CtnmhbnQoAAAD/dFJOUwABqJ04Aj+VFf3//9p3Iil+//IJY///97paD2TB+/9Uuv///+2ao///qRn4/+CH//8Q/xT//0jy//////2I/8f/Bar/reT/av/zr/8w/8wa/11QCv+R/3D/s+j/1P+1OLeI////////////tf////+//4n//yH/7P//f0jcbwQ50p/JLuQo/////16QfN7Q+S4h//////////////////9uxP///7j//14V////////p////+3///9L//+a////////////////////////////////////////////////////V9D//63/FH79//9T8P//Nd3/wgWb/2j/JPiR4FlN4HEAABGzSURBVHgB7M4xAQAABAAw0D+zSwpbggUAAAAAAAAc8nu8epbaukByIwaiMDzhpJeZsR3LzMzMzHj/a6xWS2MZitr0HUH1/lJv4Rv8+v3jj0Li7z/Y2d3bV7bKweHuERyfKBROAeDs/OLy6lrZEtc3t3f3ZwDwoFB4BO7pGVHz//evbZi+VsOY7gk4vULAYARhx4SI5sMNT+HAYmaMWW0gHNuJChDOHMjd3d5sbApOPn3Gudzw7oGkAEFkwPCVRuvZwBR+ebRe9sqn88MHPV0BwpEJuUAwZA4fbOD0hYgNBKoGTkHNfY9vQjwF5+ZMP3rH3sXcoPZAWIDwpAvgB6/WE1fWLu5JeNkHX9IPE1IEV5DEZsUvZsvBuqefZl8iGZAcn5AWILhdqBKKZteWgjPLp68Sy8GUB9oCBH8ygCqBfMETX8v080zNV/SDQNnAXyPMkrHipPSqf4WSevpCpAyzHNupCxDcMZSEKtnq6qZfCTFJLQez1ckLEPxFH8ryiUZTWbpmg09fZmr5YY4U2RUkyURwWrpdWvL022k2rSPPn6qBU1ggF8MZWGVvaSlUuxUmk+dP24BcgJxBD2e5KIgUyKff/5i+PH9YKEX5B0jKEZxtQJ1CqT1gsw3PYDGjnbIASa6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tBVVVVVVVVVVVVAJHQDv9WGRoSAAAAAElFTkSuQmCC",\n "links": {\n "mainnet": "https://metamask.tezos.com/",\n "shadownet": "https://metamask.tezos.com/",\n "ushuaianet": "https://metamask.tezos.com/"\n }\n },\n {\n "key": "kukai_web",\n "name": "Kukai Wallet",\n "shortName": "Kukai",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGzUExURUdwTFxf81ti91pi9Vpi9lpj91ti9lpi9Vpi9lti9Vtj9lph9ltj+Fhk+lpi9Vpi9Vpj9Vpi91tj9lpj9lth9Fpj9ltj91tj9Vpj9Vpi9lxk91pj9lpi9Uht/1tj9lpi9lpi9T9//15f9Vtj9Vpj91pj9lpi9lph9Vlh9lpi9llh9lph9lti9l1l9m51936F+IyR+Zec+aOo+qyw+7S3+7m9+73A/Li7+6uv+6On+n2D+Gx092py94eN+bzA+9TX/evs/vz9/////+nq/mlw92Fp9oOJ+Kmt+szO/O7v/uzt/mBo9lxk9tfZ/fv7//r6/46U+cDE/PLy/vHy/r7C/F9n9l5m9omP+cPG/Pf3//b2/4iO+XN697K1+66y+3B399LU/f7+/8/R/J6j+ufo/uXn/pyh+qCk+pKX+YGH+Nze/dnb/XuC+Gdv92Vt95OY+aer+pWa+fPz/ru++7Cz++Pk/W929/n5/2Rs95SZ+ba5+5me+oWL+GJq9/Dx/vT1/nqA+HZ9+LK2+3h++JCW+fj4/6Gm+sjK/MbJ/O3u/p6i+s7Q/MrM/NHT/d/h/cvN/LG1+xasxoQAAAAtdFJOUwAWQ22Rrsne7fr/RCVqp+E2jNo5GHoxpPe3Ian9B4B/1wQbw+dbdVqCH6+OauxlcVsAAAyFSURBVHgB5NOFgQJREAPQ4BBg3d1P+2/v3BWXP6+CkQQr6/UHw9F4Mp3xhM2mk/FoOJj3sFuLpabzrOjacoEdMUyLZ8kybWzNcS2eMct1sA3P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s9kVo0Wov03P/waswGs33WAMV1tJj1ImsAeopWInBkZg4tZo45QOMxWsphgzkAfUFL2SPuAItbaCFbDfYAlLPROnISs8I9aBnvSCKAlcfF0rnR5k5PFgFa39uPV3PDuFjeEglAVi8uYNcs+sXuLAIzu0u/sGo2LtArtk+QOqdw3tY0/a6ZR0DyTfrdtInzpjZEV4dLMfxd9l2D/nJQRwDqC/SXxXAGfxcr6a8Oq1W+jOAPq4mBc32eQVzy3PcciMziDyM9FfLIIO/KS929E72JhTb6t7fjEKL4GxxrC5He0nL3Upm8M4hZdcKGGHuiSswMYtf3EkJethM743/Ezloag4CRJYvY3TPukoDC0RaYmdECCbhr3CERzZrJ++vHScQd4zYJKZzNgsnMXJyE3DZukRir46MNbfbTDovE3DJukqTyDya0mD9USNJN4wbJCk2XpuDTVGk6RLJuGNdJXCqXH4dnj/K5FIn7yrhGQbD6utMZuJZJR9otCsI1w/iOAhJ/mEiewpGZTDyMU0C+MwzjWwrSwGB0aHgkhgvEHgwPRQdHKUjfGobxPQUv1N/XsdHV3RO+/7Penki0s6OvLUTB+/6n8ukB4ZkwiAFw6m7qrm3f/3y/+bHGO88JBgmAJQVbAsCeYu3x3Y5i9fhuS7F0/LCX3QDApFAmfjI0iuQY+MWmSDZ+syiShT86CuQCoiMQbPGPNcXx8S/PoTBOi//EFCbG/8KEoiQhXtA1ChLoeKWhIA1eS3OKkad4Q1ZQiCLDm3SHIjg63lEHFCAo8a6KAlT4QETlRfhQJHx/oAqU7n+FT5UOleXUOIBeUFGFjoNkOZWUZzhQ2gRUjtakOJyeUDGJjqOEsUOFOE2IY7W+Oj3wPZxi61IJnYVTWbbDJ6fZFs5hmHs+sb1p4Gz6bv+k2++2uJDlar3hU9msV0tc1mAxGk+ms7nGB6bNZ9PJeDQc4FBfAUtabrw8UGQDAAAAAElFTkSuQmCC",\n "supportedInteractionStandards": [\n "wallet_connect"\n ],\n "links": {\n "mainnet": "https://wallet.kukai.app",\n "shadownet": "https://shadownet.kukai.app"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ap_ios",\n "name": "AirGap Wallet",\n "shortName": "AirGap",\n "color": "rgb(4, 235, 204)",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGVUExURf///+v593rVylzMv8nt6c3u6kjGt0vGuL/r5fn9/ZTc1BW2pAKxnu/6+Pz+/i29rQOxnljKvdz08f3+/rfo4tjy7vT7+w60on/WzPH6+dXx7gSxniK6qanj3HLSxwqzoULDtZfe1Re3pQWyn2fPw+j39f7//7vp5DG+rpHc1Pn8/FHIu+X29GvQxAiyoNDv653f2BK1o2TOwuP189nu6q3Z0lLCtH3Vy/7+/t/w7bHb1KTVzfX8++Tz8Lbd16Hg2eb08bje2K3l3ur19Lrf2TjAsej18r3g2z7CtKXVzii8rGDNwDzBsrTm4eHx7zW/sDC/sPv9/Zre1/f7+9Lq5qXi2xy4p4XYzur39u739sfm4KjXzx25qKbWznfTyNTr6K/a09vz8FTKvI3b0cHj3cTs58/p5Si7q9ny79bs6Rm3pt3v7b7h3ILXzk3HuVnFuOD08uz29fH590TEtt3z8bPc1dLw7cXk33HRxszn46vY0fX6+oja0CW7qvz9/fT6+W3QxbHm39bw7VbLvhK0ovP5+G/TyH9EGu4AAA4HSURBVHgB7NM1gkIBDEXREZz73XB32P/6qHG38E6ZNNEfERERERERERERebTfv//cbjRfKJa+ov1ypQpVZzvseuAHofn2o9gDINlOpBlAVqvb7r9RbHJsANBqu4afv9OFEwOAXt7q8/cHcMYAGI7GBtufTGdw3gCgOl+Ye/6lz/kDAC+eWGp/tW7vPhjSWMI1jj+mE18JZj1gJwZFgxWjN+jYO6YdQzRRQyT2ftW0I9GUc0/u17695t2FnZ0dBA+/T+D+XWaZmd2lvYNIKgDRjc5Lc/iRriiRdADq6H54KQ7f6On9B3ISgCj6qKzgDz/W1y+E0wBE9x8MFPbQPzgkhEoAotphT+Ee/sioEKoBiFrGvIV5/OMTQrgRgGi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hksmsjedtBlgq7I6hsvo285oPGuAhe8bc7i8Tl72W7yEqJKIKHC1IoJLLnx8+nHiJ5iS9+eH834UFRUVFRUVFRUVFRUVFRUVFRUVafWvqZo1JusBMdMAAAAASUVORK5CYII=",\n "universalLink": "https://wallet.airgap.it",\n "deepLink": "airgap-wallet://"\n },\n {\n "key": "altme_wallet",\n "name": "Altme Wallet",\n "shortName": "Altme",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURVgA/1IF/3dD/6SH/9/U/+/p//n3//37//38//Hr/+ff/4dh/04F/1oM/1IW/1ce/2oy/41g/7ue//r3//7///Pu/3g8/1IS/1YS/1kG/1ch/3FA/6F+/9bH//Pt///+/+Ta/7GS/4FD/3tS/7ae/+3n/8q3/4hc/04M/1kI/1kF//v5/2Ak/1gO/3BG//Xw/76l/4NR/08B/1UN/1cL/0UF/2g2/6mH/7iV/2EH/5Zq/9rM/14h/1IM/1kk/6WD/0wB/9LA/0QB/0kF/2cu/597/+nh/+bd/1cQ/1cG//j1/7+i/5Vg/9zQ/5l5/04X/00P//Dq/4pl//Xx/6qL/+zl/2gp/18m/2o5/7Sb/+7o//Tv/6+I/1gF/9TG/829/zwJ/1YJ/2Uj/1IZ/1UV/5Zy/9fK/5Jv/1YF/7GN/+rj/3Uy/8m0//f0/1on/1sT//3+/8Gq/5d0/14X/1UP/z0F/9C9/20j/7ma/14i/7KZ/0IG/+ng/6V4/18M/z8N/8Gt/6l9/00J/1oJ/97S/2Mx/76n/3ZH//r2/24u/3hA/4JZ/4JM/5Bs/5tl/41T/5Bp/4NV/1or/8mu//j0/5tu/zsP/7aZ///9/6+V/2Qe/45O/10A/2IT/2AD/4I3/1sE/1gV/1Qd/zoB/0QL/1gB/1cA/1gC/1kH/1wY/14a/1gD/1sO/1oW/1sQ/10c/2Au/1sc/1kN/1UC/4Np/14f/1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4c4DgJhFMfBgy9HmJUdOAFqL1BXwVkQvUPdioFmm61AbFKFxYCBhAS3qN0TVJBN2qQpHVPJjPm/5Kdf8vn3OSaTv/0k68grp93fI+ffjYyjdV+kx4VKD23bxZH7OZ210r0bxe5FNOa3EkFRfcju/xnPXVVf/oJ7VqXydqiG3tNL+1U11FamQ3kwincpv+fIpB7rhR/gN6IVSah1hokYha3RROY0/ql85FSkuZMZKA38cs7FPzj2om4yLY5SynTpfblkM2qO6c7XpRwAAAAAAAAAAAAAAAAAAAAA5Ap22b7Lc553ygAAAABJRU5ErkJggg==",\n "universalLink": "https://app.altme.io/app/download"\n },\n {\n "key": "temple_ios",\n "name": "Temple Wallet",\n "shortName": "Temple",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURRweIRsdIBsdH0dwTBoaJRweIBsdHxwdIB0fHxweIRwfHxweIBsdIBsgIBseIhsdIBoaIQAAABsdIBsdIBsdIBseIBsdIBseIB0dHRseIBsdIBseIBsdIf/kTPPeS0Y+JvzOQfysMf3CO/2/OvpuE/uYKPyuMvyfKvyhK/yxM/7VRP7XRfy0NfykLb2xQvPhTP/tT//sT//rT//qTv7qTv7pTv/pTv/oTf7oTf7nTf/nTf/mTf/mTP7lTP7kS/7jS/7iS/7iSv7hSv7gSv7fSv7fSf7eSf7dSP7cSP7bR/3bR/3aR/7aR/7ZRv3ZRv3YRv3XRv3XRf7WRf3VRP3URP7TRP7SQ/3RQv3QQv3PQv3OQf3NQf3MQPzMQP3LQPzLQP3KP/3JP/zIPvzHPvzGPvzGPf3FPf3EPP26N/ucKf29OfyqMPyoL/ynL/7YRvy3NvuVJ/uUJvuSJfuRJfuQJPuPJPuOI/uNI/uMIvuLIvuKIfuJIfuIIPuHIPuGH/uFH/qEHvqDHfqCHfqBHPqAHPp/G/p+G/p9G/p8Gvp7Gvp6Gvp5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jUBdVpt0SDUbmXrE5BYXBijIYwtxN2/LgGJcFIz4s9uyiLrFJDYdKIYcDSa4q9fQGKi3WGA6ZwwcZyAZMclzHQGNP1MmM6OB9l6mJpcmGegmF+YnMrWA9l6mdgyOTM7N79N9DHaNj83OzO5ZWLdsf4PXD3Hd48z+HMAAAAASUVORK5CYII=",\n "universalLink": "https://templewallet.com",\n "deepLink": "temple://"\n },\n {\n "key": "atomex_ios",\n "name": "Atomex Wallet",\n "shortName": "Atomex",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAEyUExURQUUKQoZLSw5S1Zgb3J6hoSLloqSm3R8iFRebSo3SQ8eMltlc6uxuOrs7f///1ljcQ0cMBknOoiQmu3u8BYkOPDx8+/w8W53gwgXLCYzRsXIzcDEySMwQ0dSYujq7Ofo6kBLW1BbafP09eXm6cfKz77Cx3Z+ihwpPBQiNmFreLS5v6mutgwaLwcWKjM/UP7+/3uDjo2UnZSao15odTZCU+zt72RtepCXoB8sP8rN0UtWZfb29/X19kNOXlJca8PHzP39/v39/bG2vRIgNHiAjE5YZwYVKTpGVmx1gd7g47e7wZedpn6GkeDi5fv7/Pj5+YCIkvz8/ZKZoru/xC87TdXX26Knr9HU2D1JWZqgqfb3+Glyf2NsedfZ3a6zus7R1a+0u/r6+mZvfNnb3p6krKSqsRcRKsgAAAXHSURBVHgB7MExAQAABAAwoH9lIbzbghcAAAAAAAAAAAAAAAAAAACyevbYua+9xLUoDOBfPIoG5DPSDDbslRCm2x3EsVKG6b3P+7/CIUwfINnhKlmZ/9V+gPVbZbfYyOiYriF64onxJH9Ijk8YiJTJVJp/So5kEBnaaJbdclMmoiE/zd5mZhEFc/Psp7AA+RaX2N/SIqSbW6KbJekxoM/T3XIekhkr9LKqQbA1epuCXOs5ekuuQ6wUVaQg1UaaKubjEGqTaiYg1BbVbEOmYo5qkhZEKt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gmG3Qkz0Hx+2nNv/SePszI2jv6cv7IoLhHT2919BRvF2b3ufflvfgGKNPEwiG0kd6sH9P2TuJr8sV/mE+A8BapU/HVlj+h7qy8Ifi+cOVJn9zCGCoRZ8aTxAM1c90lc6j23ria8Hmd6VvydSvhwiI20t0UTlCb2Y7EFps2zK/lVO/3p8hII6a7Mu+gIvJxLPHZcNZ7NO3VzsIiv+W2EdrCkrmOIA9BMaLOntK/wc1oxzAKYJj/WuLXexVHYquOYCXCBBrbrrCP9hPEyZUfeAAthAo5uGXgs0f0u8eFKFuhgM4RtDEz6euP6zOnLxcW9iAL7scwHvIccwB7EKOxxzAKuT4ygFsQ44RDiAm879VdW8gxxObvtklyGEs07eCgWhnwW1IckTfJiBJvECf5qsQJUaf7kGW2QP6cpCHMPfoy01Ik5mnD8lJiHOLPmxCoG0qG7cg86MJRZ83IJK+TCWFIQh1nqSC9DnEul2np+XbECy/Sw/v8xCtet2ii9bLKqTbe8u+Pj84g3zGcIE9LQ/HEQ3xT7vs8v51HBEydPo4x5+yq2UdkaPpixe1WKp2sTj0f3twIAAAAIAA6P2lJ9igagAAAAAAAAAAAAAAAAAAAPgYKLGcd1nT6swAAAAASUVORK5CYII=",\n "universalLink": "https://atomex.me",\n "deepLink": "atomex://"\n },\n {\n "key": "umami_ios",\n "name": "Umami Mobile",\n "shortName": "Umami Mobile",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUdwTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANjY2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADY2NgAAAAAAAEZGRgAAAAAAAAAAAAAAAAAAAAAAAJ2dnQAAAAAAAAAAAAA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4U9FW/Fw/ROCNduDUiovdUdneatUr1rnrVUvLeyO/krBdwckYn5Whvz0/Kls5gi+5iiSQLwE3sBflKmQ5P54WMfk2OXPQjTND5IKfZBSV7dQpGmepGApJdHZdVBSPtspypB3Np9sDD8N5UZdqvjxO8qH8O/pa4HlqOzvVY2FnXngYnbEv4JZWXvqLw926I0AwCWXXxk5nmOj8wkmuWbu+3DpS8PSmXEfbHyAV6ldVED6Gm8wrKoAZIYyoka4BhD2aKYASIxmBJiBmjCktZEDKB1YVsVMUAdIyVNvAC6Dw5l8QKswmktIlqAygrG/BQtwBbGSVWxAuyoeGNdFymA/hvvJEQK8Iz3VFmcAFUVE2xWRAmQ8mEivy5IgBymqIkRoIlplLoIAfYVTKX+8H6AJxUfiG17PUDbwIeMbW8HaF/gE7GQlwM8GfiUWvdugH0VM1BqukcDJBTMxl/xYoBUDjPblL0XoHqOL1ATurcC6M9ZfM1G1UsBdn7jy6T/Kl4JkHrM4k+slaNeCKCtpvGnSsHodw+g3fjwN1YKxe8c4L5Zwt9S8z/07xlATx7HMBfpzI/odwuw9HSwgjky4olk6rsEeNluxg3Mn+LzB4IhORxZWswA0UhYDgUDg3MJs/sfgVqtpj6cO7QAAAAASUVORK5CYII=",\n "deepLink": "umami://",\n "universalLink": "https://umamiwallet.com/"\n },\n {\n "key": "trust_ios",\n "name": "Trust Wallet",\n "shortName": "Trust Wallet",\n "color": "",\n "supportedInteractionStandards": [\n "wallet_connect"\n ],\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAGeUExURTN1u0dwTENDwCpxuDFzuTV0uzFxvDF1uTJzuTR3ujN3vTB3uDR3tjV1uzN0uzN2ujJ2ujV1ujF1ujVyujR3vTR3uzF3uDB0uzN2ujN0uzJ0uzJ1uzJ1ujJ1uzNzujJ1ujN1uzJ1ujN1ujN0uzJ0uzJ1uzN1vDJ1uTN0uz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CufKMp2Kx30lXTuyzKyWKIrlrilq31uOvbRZk5eOOjq95tfGbFg3QVWrBQfhIv6apxMoMjiQhdBSbTKE9LYboKrwLIzATopuF1EmUrE2uhG9/Y4ccOuupdR1lLTzbRTchPN+ElC+Vub8THIoXeZ1EB3Adc96G5Uqx1s1D+sX1UEGuhjQUZ3EWFybxrZt661lCBUqM+5qV1zkJl2o7wZI0TaVQsaz7EE/TvoqKl3TtSaBEVb6uLufjepOEBVq7nQccmzKuDgGQfjwvMZCS+/hNIsD4006YrAQFPUAsZyYg++E5lIOE3PIIQa7aRX4Q3IOMRqiFmq5080jByCCHVeAA5mXiPnwwOb0DMA9yCqMxeyoKgW/gPPO3fuARPuwRVCw+rVVBV8LAqBXUTHnZTQV2Fh11VUKoGnlWjFJS6D8/671EA1+BZ148CuFDj3TvgKAD1Izzqp78DuPwUnlR3+e8A1EN40kP1OYB/wZO++RKAqoYH/aw+B+DNS6D+2j8CUFVe7EH/DODrP+ExdV9pAag78Jg7Sg/g4mN4yuOLtgDUtafwkPrryh6AugcPuaeOB3DxF3jGrxccAlBXfodH/HFFOQWgbtTBE+puKOcA1A/18ID671WuANRteMBtpQeguYuKd1dpoDyWwF2lg7K5XY8KVn9b2UDZ/VCHilX3vXIMQHfjd1SoP26ofAJQV35BRfr1isovAHXhXj0qztN7F5VbALrrj1FhHl9TjqCcXbxThwry552LyhlULl9V1aNSVH2tcoHK7drPqAjV36rcoNx887AOZe7pw2+VGyh3l3+qQRmr+fGycgd1ouv3yzSDmvvXL6iTQOXj6s2qWpSV2qqbV1U+oPJ16btbD6of/fakDiWs7knto+oHt767lPfX+j8k62eaeGs9AwAAAABJRU5ErkJggg==",\n "universalLink": "https://link.trustwallet.com",\n "deepLink": "trust://"\n },\n {\n "key": "exodus_mobile",\n "name": "Exodus Mobile",\n "shortName": "Exodus",\n "color": "",\n "logo": "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjMwMCIgdmlld0JveD0iMCAw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woI2EpIi8+PHBhdGggZD0ibTU5LjMwMSAxNjkuNDAyaDcyLjA0NnYtMzguODA0aC03Mi4zMTM4bC05LjM3NC0zMC41MDkgODEuNjg3OC01My4yNTU4di00Ni44MzMybC0xMjcuNzU0MjMgODMuNzY0NSAyMC44OTA2MyA2Ni4zNjk1LTIwLjg5MDYzIDY2LjM2OSAxMjguMDIyMjMgODMuNDk3di00Ni44MzNsLTgxLjk1NTgtNTMuMjU2eiIgZmlsbD0idXJsKCNhKSIvPjwvbWFzaz48cGF0aCBkPSJtMjk4LjIwMyA4My43NjQ1LTEyNy43NTQtODMuNzY0NXY0Ni44MzMybDgxLjk1NiA1My4yNTU4LTkuNjQyIDMwLjUwOWgtNzIuMzE0djM4LjgwNGg3Mi4zMTRsOS42NDIgMzAuNTA5LTgxLjk1NiA1My4yNTZ2NDYuODMzbDEyNy43NTQtODMuNDk3LTIwLjg5LTY2LjM2OXoiIGZpbGw9InVybCgjYSkiLz48cGF0aCBkPSJtNTkuMzAwNyAxNjkuNDAyaDcyLjA0NTN2LTM4LjgwNGgtNzIuMzEzMWwtOS4zNzQtMzAuNTA5IDgxLjY4NzEtNTMuMjU1OHYtNDYuODMzMmwtMTI3Ljc1MzQ3IDgzLjc2NDUgMjAuODkwNTcgNjYuMzY5NS0yMC44OTA1NyA2Ni4zNjkgMTI4LjAyMTQ3IDgzLjQ5N3YtNDYuODMzbC04MS45NTUxLTUzLjI1NnoiIGZpbGw9InVybCgjYSkiLz48ZyBtYXNrPSJ1cmwoI2MpIj48cGF0aCBkPSJtMy43NTAyNCAwaDI5Mi41djMwMGgtMjkyLjV6IiBmaWxsPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",\n "supportedInteractionStandards": [\n "beacon"\n ],\n "deepLink": "exodus://wc",\n "universalLink": "https://www.exodus.com/"\n },\n {\n "key": "kukai_ios",\n "name": "Kukai Wallet",\n "shortName": "Kukai",\n "color": "",\n "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEU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Gfxcr6a8Oq1W+jOAPq4mBc32eQVzy3PcciMziDyM9FfLIIO/KS929E72JhTb6t7fjEKL4GxxrC5He0nL3Upm8M4hZdcKGGHuiSswMYtf3EkJethM743/Ezloag4CRJYvY3TPukoDC0RaYmdECCbhr3CERzZrJ++vHScQd4zYJKZzNgsnMXJyE3DZukRir46MNbfbTDovE3DJukqTyDya0mD9USNJN4wbJCk2XpuDTVGk6RLJuGNdJXCqXH4dnj/K5FIn7yrhGQbD6utMZuJZJR9otCsI1w/iOAhJ/mEiewpGZTDyMU0C+MwzjWwrSwGB0aHgkhgvEHgwPRQdHKUjfGobxPQUv1N/XsdHV3RO+/7Penki0s6OvLUTB+/6n8ukB4ZkwiAFw6m7qrm3f/3y/+bHGO88JBgmAJQVbAsCeYu3x3Y5i9fhuS7F0/LCX3QDApFAmfjI0iuQY+MWmSDZ+syiShT86CuQCoiMQbPGPNcXx8S/PoTBOi//EFCbG/8KEoiQhXtA1ChLoeKWhIA1eS3OKkad4Q1ZQiCLDm3SHIjg63lEHFCAo8a6KAlT4QETlRfhQJHx/oAqU7n+FT5UOleXUOIBeUFGFjoNkOZWUZzhQ2gRUjtakOJyeUDGJjqOEsUOFOE2IY7W+Oj3wPZxi61IJnYVTWbbDJ6fZFs5hmHs+sb1p4Gz6bv+k2++2uJDlar3hU9msV0tc1mAxGk+ms7nGB6bNZ9PJeDQc4FBfAUtabrw8UGQDAAAAAElFTkSuQmCC",\n "supportedInteractionStandards": [\n "wallet_connect"\n ],\n "universalLink": "https://wallet.kukai.app",\n "deepLink": "kukai://"\n },\n {\n "key": "fireblocks_ios",\n "name": "Fireblocks Wallet",\n "shortName": "Fireblocks",\n "color": "",\n "logo": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMDAiIHZpZXdCb3g9IjAgMCAxMTIgMTEyIiB3aWR0aD0iMTAwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTEyIDBjLjU1MjI4NSAwIDEgLjQ0NzcxNTI1IDEgMXYxMTFjMCAuNTUyMjg1LS40NDc3MTUgMS0xIDFoLTExMWMtLjU1MjI4NDc1IDAtMS0uNDQ3NzE1LTEtMXYtMTExYzAtLjU1MjI4NDc1LjQ0NzcxNTI1LTEgMS0xem0tNTUuNTAwMjUxMSAzMS4zODg4ODg5LTMxLjM4ODg4ODkgNTAuMjIyMjIyMmg2Mi43Nzc3Nzc4eiIgZmlsbD0iIzAwMmU3ZiIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+",\n "supportedInteractionStandards": [\n "wallet_connect"\n ],\n "universalLink": ""\n },\n {\n "key": "nightly_ios",\n "name": "Nightly",\n "shortName": "Nightly",\n "color": "#6067F9",\n "logo": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI4MTdfMTQ1NCkiPgo8cGF0aCBkPSJNMCAwSDQ4VjQ4SDBWMFoiIGZpbGw9IiMxODFDMkYiLz4KPHBhdGggZD0iTTM4LjUxNSA1LjI1QzM1Ljc2OTkgOS4wODE0NyAzMi4zMzQ4IDExLjczODUgMjguMjc1NyAxMy41MTQ4QzI2Ljg2NjUgMTMuMTI1OCAyNS40MjA1IDEyLjkyNzYgMjMuOTk2NSAxMi45NDIzQzIyLjU3MjYgMTIuOTI3NiAyMS4xMjY2IDEzLjEzMzEgMTkuNzE3MyAxMy41MTQ4QzE1LjY1ODMgMTEuNzMxMiAxMi4yMjMyIDkuMDg4ODEgOS40NzgwMyA1LjI1QzguNjQ4NjIgNy4zMzQ1NiA1LjQ1NTcyIDE0LjUyNzcgOS4yODcyIDI0LjU4MzVDOS4yODcyIDI0LjU4MzUgOC4wNjE0MiAyOS44MzE2IDEw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zguODA4NCAyMy45OTY1IDM4LjgwODRDMjUuMTcwOSAzOC44MDg0IDI2LjEyNTEgMzkuNjUyNSAyNi4xMjUxIDQwLjY4NzVDMjYuMTI1MSA0MS43Mjk3IDI1LjE3MDkgNDIuNTY2NSAyMy45OTY1IDQyLjU2NjVaTTMwLjY3NTkgMzAuNzM0NEMyOS4zNCAzMS4zMjE2IDI4Ljc2NzUgMzAuNTI4OSAyNy4wMjggMzEuNTc4NUMyNy4xMzgxIDI4LjI0NjIgMzAuNDE5IDI3LjE2NzIgMzIuNjY1MSAyOC41NzY1QzMyLjY2NTEgMjguNTY5MSAzMi4zMTI3IDMwLjAwNzggMzAuNjc1OSAzMC43MzQ0Wk0zNi42NjU0IDIzLjE5NjNDMzQuNTI5NCAyMS42NzY5IDMyLjI4MzQgMTkuMzUwMSAzMS4wODcgMTYuODY5MkMzMy44OTgyIDE0Ljc4NDYgMzYuMjY5IDEyLjgwMjggMzguMDAxMiA4LjQwNjE5QzM5LjMyOTggMTMuMDQ1MSAzOC43NTczIDE4LjkyNDQgMzYuNjY1NCAyMy4xOTYzWiIgZmlsbD0iI0Y3RjdGNyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzI4MTdfMTQ1NCI+CjxyZWN0IHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgcng9IjgiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==",\n "supportedInteractionStandards": [\n "wallet_connect",\n "beacon"\n ],\n "universalLink": "",\n "deepLink": "nightly://"\n }\n ]\n};\n//# sourceMappingURL=bundled-wallet-registry.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/data/bundled-wallet-registry.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosMessageType = exports.TezosBlockchain = void 0;\nvar blockchain_1 = __webpack_require__(/*! ./blockchain */ "./packages/octez.connect-blockchain-tezos/dist/cjs/blockchain.js");\nObject.defineProperty(exports, "TezosBlockchain", ({ enumerable: true, get: function () { return blockchain_1.TezosBlockchain; } }));\nvar message_type_1 = __webpack_require__(/*! ./types/message-type */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js");\nObject.defineProperty(exports, "TezosMessageType", ({ enumerable: true, get: function () { return message_type_1.TezosMessageType; } }));\n__exportStar(__webpack_require__(/*! ./types/messages */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/index.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosMessageType = void 0;\n/**\n * Per-chain discriminator carried in `blockchainData.type` of wrapped Tezos\n * messages. Values deliberately reuse the pre-fork flat `BeaconMessageType`\n * wire strings so wallet UIs migrating from the flat v2 protocol keep their\n * string switches.\n */\nvar TezosMessageType;\n(function (TezosMessageType) {\n TezosMessageType["operation_request"] = "operation_request";\n TezosMessageType["operation_response"] = "operation_response";\n TezosMessageType["sign_payload_request"] = "sign_payload_request";\n TezosMessageType["sign_payload_response"] = "sign_payload_response";\n TezosMessageType["broadcast_request"] = "broadcast_request";\n TezosMessageType["broadcast_response"] = "broadcast_response";\n TezosMessageType["proof_of_event_challenge_request"] = "proof_of_event_challenge_request";\n TezosMessageType["proof_of_event_challenge_response"] = "proof_of_event_challenge_response";\n TezosMessageType["simulated_proof_of_event_challenge_request"] = "simulated_proof_of_event_challenge_request";\n TezosMessageType["simulated_proof_of_event_challenge_response"] = "simulated_proof_of_event_challenge_response";\n})(TezosMessageType || (exports.TezosMessageType = TezosMessageType = {}));\n//# sourceMappingURL=message-type.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/message-type.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TEZOS_BROADCAST_SCOPE = void 0;\n/**\n * Scope string for requests that are always allowed regardless of the\n * granted permission scopes (mirrors the pre-fork `checkPermissions`\n * semantics for broadcast and proof-of-event requests).\n */\nexports.TEZOS_BROADCAST_SCOPE = 'broadcast';\n//# sourceMappingURL=broadcast.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=change-account.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n__exportStar(__webpack_require__(/*! ./permission-request */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js"), exports);\n__exportStar(__webpack_require__(/*! ./permission-response */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js"), exports);\n__exportStar(__webpack_require__(/*! ./operation */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js"), exports);\n__exportStar(__webpack_require__(/*! ./sign-payload */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js"), exports);\n__exportStar(__webpack_require__(/*! ./broadcast */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/broadcast.js"), exports);\n__exportStar(__webpack_require__(/*! ./proof-of-event */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js"), exports);\n__exportStar(__webpack_require__(/*! ./change-account */ "./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/change-account.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/index.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=operation.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/operation.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=permission-request.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-request.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=permission-response.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/permission-response.js?\n}')},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.TEZOS_PROOF_OF_EVENT_SCOPE = void 0;\n/** Always-allowed scope, see TEZOS_BROADCAST_SCOPE. */\nexports.TEZOS_PROOF_OF_EVENT_SCOPE = 'proof_of_event';\n//# sourceMappingURL=proof-of-event.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/proof-of-event.js?\n}")},"./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=sign-payload.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-blockchain-tezos/dist/cjs/types/messages/sign-payload.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MockAnalytics = void 0;\nclass MockAnalytics {\n track(_trigger, _section, _label, _data) {\n // console.log('##### TRACK', trigger, section, label, data)\n // noop\n }\n}\nexports.MockAnalytics = MockAnalytics;\n//# sourceMappingURL=MockAnalytics.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/MockWindow.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.clearMockWindowState = exports.windowRef = void 0;\nconst cbs = [(_) => undefined];\n/**\n * A mock for postmessage if run in node.js environment\n */\nlet windowRef = {\n postMessage: (message, _target) => {\n console.log('GOT MOCK POST MESSAGE', message);\n cbs.forEach((callbackElement) => {\n callbackElement({ data: message });\n });\n },\n addEventListener: (_name, eventCallback) => {\n cbs.push(eventCallback);\n },\n removeEventListener: (_name, eventCallback) => {\n cbs.splice(cbs.indexOf((element) => element === eventCallback), 1);\n },\n location: {\n origin: '*'\n }\n};\nexports.windowRef = windowRef;\ntry {\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n exports.windowRef = windowRef = window;\n }\n}\ncatch (windowError) {\n console.log(`not defined: ${windowError}`);\n}\nconst clearMockWindowState = () => {\n cbs.length = 0;\n};\nexports.clearMockWindowState = clearMockWindowState;\n//# sourceMappingURL=MockWindow.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/MockWindow.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/Serializer.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Serializer = void 0;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\n/**\n * @internalapi\n *\n * The Serializer handles message serialization/deserialization based on protocol version\n * - Protocol v1: Base58check encoding\n * - Protocol v2+: Plain JSON\n */\nclass Serializer {\n constructor(protocolVersion = constants_1.DEFAULT_PROTOCOL_VERSION) {\n this.protocolVersion = protocolVersion;\n }\n /**\n * Serialize a message based on protocol version\n * @param message JSON object to serialize\n */\n serialize(message) {\n return __awaiter(this, void 0, void 0, function* () {\n const str = JSON.stringify(message);\n if (this.protocolVersion >= constants_1.PROTOCOL_VERSION_V2) {\n // v2+: Plain JSON\n return str;\n }\n else {\n // v1: Base58check encoding\n return bs58check_1.default.encode(Buffer.from(str));\n }\n });\n }\n /**\n * Deserialize a message based on protocol version\n * @param encoded String to be deserialized\n */\n deserialize(encoded) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof encoded !== \'string\') {\n throw new Error(\'Encoded payload needs to be a string\');\n }\n if (this.protocolVersion >= constants_1.PROTOCOL_VERSION_V2) {\n // v2+: Plain JSON\n return JSON.parse(encoded);\n }\n else {\n // v1: Base58check decoding\n const decodedBytes = bs58check_1.default.decode(encoded);\n const jsonString = Buffer.from(decodedBytes).toString(\'utf8\');\n return JSON.parse(jsonString);\n }\n });\n }\n}\nexports.Serializer = Serializer;\n//# sourceMappingURL=Serializer.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/Serializer.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst MockWindow_1 = __webpack_require__(/*! ../../MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\nconst MockAnalytics_1 = __webpack_require__(/*! ../../MockAnalytics */ "./packages/octez.connect-core/dist/cjs/src/MockAnalytics.js");\n/**\n * @internalapi\n *\n * The beacon client is an abstract client that handles everything that is shared between all other clients.\n * Specifically, it handles managing the beaconId and and the local keypair.\n */\nclass BeaconClient {\n get beaconId() {\n return this._beaconId.promise;\n }\n get keyPair() {\n return this._keyPair.promise;\n }\n constructor(config) {\n var _a, _b;\n /** The beaconId is a public key that is used to identify one specific application (dapp or wallet).\n * This is used inside a message to specify the sender, for example.\n */\n this._beaconId = new octez_connect_utils_1.ExposedPromise();\n /**\n * The local keypair that is used for the communication encryption\n */\n this._keyPair = new octez_connect_utils_1.ExposedPromise();\n if (!config.name) {\n throw new Error(\'Name not set\');\n }\n if (!config.storage) {\n throw new Error(\'Storage not set\');\n }\n this.name = config.name;\n this.iconUrl = config.iconUrl;\n this.appUrl = (_a = config.appUrl) !== null && _a !== void 0 ? _a : MockWindow_1.windowRef.location.origin;\n this.storage = config.storage;\n this.analytics = (_b = config.analytics) !== null && _b !== void 0 ? _b : new MockAnalytics_1.MockAnalytics();\n // TODO: This is a temporary "workaround" to prevent users from creating multiple Client instances\n if (MockWindow_1.windowRef.beaconCreatedClientInstance) {\n console.error(\'[OCTEZ.CONNECT] It looks like you created multiple octez.connect SDK Client instances. This can lead to problems. Only create one instance and re-use it everywhere.\');\n }\n else {\n ;\n MockWindow_1.windowRef.beaconCreatedClientInstance = true;\n }\n this.initSDK().catch(console.error);\n }\n /**\n * This resets the SDK. After using this method, this instance is no longer usable. You will have to instanciate a new client.\n */\n destroy() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.removeBeaconEntriesFromStorage();\n MockWindow_1.windowRef.beaconCreatedClientInstance = false;\n });\n }\n /**\n * This method initializes the SDK by setting some values in the storage and generating a keypair.\n */\n initSDK() {\n return __awaiter(this, void 0, void 0, function* () {\n this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_VERSION, constants_1.SDK_VERSION).catch(console.error);\n this.loadOrCreateBeaconSecret().catch(console.error);\n return this.keyPair.then((keyPair) => {\n this._beaconId.resolve((0, octez_connect_utils_1.toHex)(keyPair.publicKey));\n });\n });\n }\n /**\n * Removes all beacon values from the storage.\n */\n removeBeaconEntriesFromStorage() {\n return __awaiter(this, void 0, void 0, function* () {\n const allKeys = Object.values(octez_connect_types_1.StorageKey);\n yield Promise.all(allKeys.map((key) => this.storage.delete(key)));\n });\n }\n /**\n * This method tries to load the seed from storage, if it doesn\'t exist, a new one will be created and persisted.\n */\n loadOrCreateBeaconSecret() {\n return __awaiter(this, void 0, void 0, function* () {\n const storageValue = yield this.storage.get(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED);\n if (storageValue && typeof storageValue === \'string\') {\n this._keyPair.resolve(yield (0, octez_connect_utils_1.getKeypairFromSeed)(storageValue));\n }\n else {\n const key = yield (0, octez_connect_utils_1.generateGUID)();\n yield this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED, key);\n this._keyPair.resolve(yield (0, octez_connect_utils_1.getKeypairFromSeed)(key));\n }\n });\n }\n}\nexports.BeaconClient = BeaconClient;\n//# sourceMappingURL=BeaconClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Client = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst BeaconClient_1 = __webpack_require__(/*! ../beacon-client/BeaconClient */ "./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js");\nconst AccountManager_1 = __webpack_require__(/*! ../../managers/AccountManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js");\nconst get_sender_id_1 = __webpack_require__(/*! ../../utils/get-sender-id */ "./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js");\nconst Logger_1 = __webpack_require__(/*! ../../utils/Logger */ "./packages/octez.connect-core/dist/cjs/src/utils/Logger.js");\nconst Serializer_1 = __webpack_require__(/*! ../../Serializer */ "./packages/octez.connect-core/dist/cjs/src/Serializer.js");\nconst message_utils_1 = __webpack_require__(/*! ../../utils/message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\nconst message_protocol_1 = __webpack_require__(/*! ../../message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nconst logger = new Logger_1.Logger(\'Client\');\n/**\n * @internalapi\n *\n * This abstract class handles the a big part of the logic that is shared between the dapp and wallet client.\n * For example, it selects and manages the transport and accounts.\n */\nclass Client extends BeaconClient_1.BeaconClient {\n get transport() {\n return this._transport.promise;\n }\n /**\n * Returns the connection status of the Client\n */\n get connectionStatus() {\n var _a, _b;\n return (_b = (_a = this._transport.promiseResult) === null || _a === void 0 ? void 0 : _a.connectionStatus) !== null && _b !== void 0 ? _b : octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n }\n /**\n * Returns whether or not the transaport is ready\n */\n get ready() {\n return this.transport.then(() => undefined);\n }\n constructor(config) {\n var _a;\n super(config);\n this.blockchains = new Map();\n /**\n * How many requests can be sent after another\n */\n this.rateLimit = 2;\n /**\n * The time window in seconds in which the "rateLimit" is checked\n */\n this.rateLimitWindowInSeconds = 5;\n /**\n * Stores the times when requests have been made to determine if the rate limit has been reached\n */\n this.requestCounter = [];\n this.transportListeners = new Map();\n this._transport = new octez_connect_utils_1.ExposedPromise();\n this.accountManager = new AccountManager_1.AccountManager(config.storage);\n this.matrixNodes = (_a = config.matrixNodes) !== null && _a !== void 0 ? _a : {};\n this.handleResponse = (message, connectionInfo) => {\n throw new Error(`not overwritten${JSON.stringify(message)} - ${JSON.stringify(connectionInfo)}`);\n };\n }\n cleanup() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.transportListeners.size) {\n return;\n }\n if (this._transport.isResolved()) {\n const transport = yield this.transport;\n yield Promise.all(Array.from(this.transportListeners.values()).map((listener) => transport.removeListener(listener)));\n this.transportListeners.clear();\n }\n });\n }\n /**\n * Register a blockchain to the client\n * @param chain The blockchain to register\n */\n addBlockchain(chain) {\n var _a;\n this.blockchains.set(chain.identifier, chain);\n for (const legacyIdentifier of (_a = chain.legacyIdentifiers) !== null && _a !== void 0 ? _a : []) {\n this.blockchains.set(legacyIdentifier, chain);\n }\n }\n /**\n * Remove a blockchain from the client by its identifier\n * @param chainIdentifier The identifier of the blockchain to remove\n */\n removeBlockchain(chainIdentifier) {\n var _a;\n const chain = this.blockchains.get(chainIdentifier);\n this.blockchains.delete(chainIdentifier);\n for (const legacyIdentifier of (_a = chain === null || chain === void 0 ? void 0 : chain.legacyIdentifiers) !== null && _a !== void 0 ? _a : []) {\n this.blockchains.delete(legacyIdentifier);\n }\n }\n /**\n * Return all locally known accounts\n */\n getAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.getAccounts();\n });\n }\n /**\n * Return the account by ID\n * @param accountIdentifier The ID of an account\n */\n getAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.getAccount(accountIdentifier);\n });\n }\n /**\n * Remove the account by ID\n * @param accountIdentifier The ID of an account\n */\n removeAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.removeAccount(accountIdentifier);\n });\n }\n /**\n * Remove all locally stored accounts\n */\n removeAllAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.accountManager.removeAllAccounts();\n });\n }\n /**\n * Add a new request (current timestamp) to the pending requests, remove old ones and check if we are above the limit\n */\n addRequestAndCheckIfRateLimited() {\n return __awaiter(this, void 0, void 0, function* () {\n const now = new Date().getTime();\n this.requestCounter = this.requestCounter.filter((date) => date + this.rateLimitWindowInSeconds * 1000 > now);\n this.requestCounter.push(now);\n return this.requestCounter.length > this.rateLimit;\n });\n }\n /**\n * This method initializes the client. It will check if the connection should be established to a\n * browser extension or if the P2P transport should be used.\n *\n * @param transport A transport that can be provided by the user\n */\n init(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._transport.isResolved()) {\n return (yield this.transport).type;\n }\n yield this.setTransport(transport); // Let users define their own transport\n return transport.type;\n });\n }\n /**\n * Returns the metadata of this DApp\n */\n getOwnAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return {\n senderId: yield (0, get_sender_id_1.getSenderId)(yield this.beaconId),\n name: this.name,\n icon: this.iconUrl\n };\n });\n }\n /**\n * Return all known peers\n */\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.transport).getPeers();\n });\n }\n /**\n * Add a new peer to the known peers\n * @param peer The new peer to add\n */\n addPeer(peer) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.transport).addPeer(peer);\n });\n }\n destroy() {\n const _super = Object.create(null, {\n destroy: { get: () => super.destroy }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this._transport.isResolved()) {\n const transport = yield this.transport;\n yield this.cleanup();\n yield transport.disconnect();\n if (transport.type === octez_connect_types_1.TransportType.WALLETCONNECT) {\n yield transport.doClientCleanup(); // any because I cannot import the type definition\n }\n }\n yield _super.destroy.call(this);\n });\n }\n /**\n * A "setter" for when the transport needs to be changed.\n */\n setTransport(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n if (transport) {\n if (this._transport.isSettled()) {\n // If the promise has already been resolved we need to create a new one.\n this._transport = octez_connect_utils_1.ExposedPromise.resolve(transport);\n }\n else {\n this._transport.resolve(transport);\n }\n }\n else {\n if (this._transport.isSettled()) {\n // If the promise has already been resolved we need to create a new one.\n this._transport = new octez_connect_utils_1.ExposedPromise();\n }\n }\n });\n }\n addListener(transport) {\n return __awaiter(this, void 0, void 0, function* () {\n // in beacon we subscribe to the transport on client init only\n // unsubscribing from the transport is only beneficial when running\n // a single page dApp.\n // However, while running a multiple tabs setup, if one of the dApps disconnects\n // the others wont\'t recover until after a page refresh\n if (this.transportListeners.has(transport.type)) {\n yield transport.removeListener(this.transportListeners.get(transport.type));\n }\n const subscription = (message, connectionInfo) => __awaiter(this, void 0, void 0, function* () {\n if (typeof message !== \'string\') {\n return;\n }\n const peer = yield this.findPeer(connectionInfo.id);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const deserializedMessage = (yield new Serializer_1.Serializer(protocolVersion).deserialize(message));\n this.handleResponse(deserializedMessage, connectionInfo);\n });\n this.transportListeners.set(transport.type, subscription);\n transport.addListener(subscription).catch((error) => logger.error(\'addListener\', error));\n });\n }\n sendDisconnectToPeer(peer, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n const id = yield (0, octez_connect_utils_1.generateGUID)();\n const senderId = yield (0, get_sender_id_1.getSenderId)(yield this.beaconId);\n // The disconnect ships in the peer\'s negotiated dialect: wrapped for\n // v3+ peers, the flat legacy shape for v2 peers (which would silently\n // ignore a wrapped envelope).\n const request = (0, message_utils_1.buildDisconnectMessage)({ id, senderId }, peer.version);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const payload = yield new Serializer_1.Serializer(protocolVersion).serialize(request);\n const selectedTransport = transport !== null && transport !== void 0 ? transport : (yield this.transport);\n yield selectedTransport.send(payload, peer);\n });\n }\n findPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!publicKey) {\n return undefined;\n }\n const transport = yield this.transport;\n const peers = yield transport.getPeers();\n return peers.find((peerInfo) => peerInfo.publicKey === publicKey);\n });\n }\n getLocalProtocolVersion() {\n const localPreferredRaw = Number((0, message_protocol_1.getPreferredMessageProtocolVersion)());\n return Number.isFinite(localPreferredRaw) && localPreferredRaw >= constants_1.DEFAULT_PROTOCOL_VERSION\n ? localPreferredRaw\n : constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n extractPeerProtocolVersion(peer) {\n if (!peer) {\n return constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n const peerProtocolRaw = typeof peer.protocolVersion === \'number\' ? peer.protocolVersion : Number(peer.protocolVersion);\n return Number.isFinite(peerProtocolRaw) && peerProtocolRaw >= constants_1.DEFAULT_PROTOCOL_VERSION\n ? peerProtocolRaw\n : constants_1.DEFAULT_PROTOCOL_VERSION;\n }\n getPeerProtocolVersion(peer) {\n const localVersion = this.getLocalProtocolVersion();\n const peerVersion = this.extractPeerProtocolVersion(peer);\n return Math.min(peerVersion, localVersion);\n }\n}\nexports.Client = Client;\n//# sourceMappingURL=Client.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/constants.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BACKEND_URL = exports.NOTIFICATION_ORACLE_URL = exports.DEFAULT_PROTOCOL_VERSION = exports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2 = exports.PROTOCOL_VERSION_V1 = exports.BEACON_VERSION = exports.SDK_VERSION = void 0;\nexports.SDK_VERSION = '5.0.1';\nexports.BEACON_VERSION = '4';\nexports.PROTOCOL_VERSION_V1 = 1;\nexports.PROTOCOL_VERSION_V2 = 2;\nexports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2;\nexports.DEFAULT_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V1;\nexports.NOTIFICATION_ORACLE_URL = 'https://beacon-notification-oracle.dev.gke.papers.tech';\nexports.BACKEND_URL = 'https://beacon-backend.prod.gke.papers.tech';\n//# sourceMappingURL=constants.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/constants.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/debug.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getDebugEnabled = exports.setDebugEnabled = void 0;\nconst MockWindow_1 = __webpack_require__(/*! ./MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nlet debug = MockWindow_1.windowRef.beaconSdkDebugEnabled ? true : false;\nif (debug) {\n // eslint-disable-next-line no-console\n console.log(\'[BEACON]: Debug mode is ON (turned on either by the developer or a browser extension)\');\n}\nconst setDebugEnabled = (enabled) => {\n debug = enabled;\n};\nexports.setDebugEnabled = setDebugEnabled;\nconst getDebugEnabled = () => debug;\nexports.getDebugEnabled = getDebugEnabled;\n//# sourceMappingURL=debug.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/debug.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AbortedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass AbortedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.ABORTED_ERROR, \'The action was aborted by the user.\', error_codes_1.BEACON_ERROR_CODES.ABORTED_BY_USER);\n this.name = \'AbortedBeaconError\';\n this.title = \'Aborted\';\n }\n}\nexports.AbortedBeaconError = AbortedBeaconError;\n//# sourceMappingURL=AbortedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.BeaconError = void 0;\n/**\n * @category Error\n */\nclass BeaconError extends Error {\n get errorType() {\n return this.type;\n }\n get fullDescription() {\n return { description: this.description };\n }\n constructor(errorType, message, code) {\n super(`[${errorType}]:${message}`);\n this.name = 'BeaconError';\n this.title = 'Error'; // Visible in the UI\n this.name = 'BeaconError';\n this.description = message;\n this.type = errorType;\n this.code = code;\n }\n}\nexports.BeaconError = BeaconError;\n//# sourceMappingURL=BeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BroadcastBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass BroadcastBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.BROADCAST_ERROR, \'The transaction could not be broadcast to the network. Please try again.\', error_codes_1.BEACON_ERROR_CODES.BROADCAST_ERROR);\n this.name = \'BroadcastBeaconError\';\n this.title = \'Broadcast Error\';\n }\n}\nexports.BroadcastBeaconError = BroadcastBeaconError;\n//# sourceMappingURL=BroadcastBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.InvalidBeaconVersionError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Raised by `compareBeaconVersion()` when either operand fails its strict\n * decimal-integer validation. SDK-internal: never serialized to the wire.\n * Consumers discriminate via `instanceof` or the `errorCode` field; the\n * BeaconErrorType is `UNKNOWN_ERROR` only to satisfy the base contract.\n *\n * @category Error\n */\nclass InvalidBeaconVersionError extends BeaconError_1.BeaconError {\n constructor(a, b) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, `Invalid peer.version comparison: a=${JSON.stringify(a)}, b=${JSON.stringify(b)}`, error_codes_1.BEACON_ERROR_CODES.INVALID_BEACON_VERSION);\n this.name = \'InvalidBeaconVersionError\';\n this.title = \'Invalid Beacon version\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.INVALID_BEACON_VERSION;\n this.a = a;\n this.b = b;\n }\n}\nexports.InvalidBeaconVersionError = InvalidBeaconVersionError;\n//# sourceMappingURL=InvalidBeaconVersionError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.InvalidRequiredMinimumVersionError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Thrown at `DAppClient` construction time when `requiredMinimumVersion` is\n * not a parseable decimal-integer string, is below `1`, or exceeds the\n * SDK\'s own `BEACON_VERSION`. Configuration error; never emitted on the wire.\n *\n * @category Error\n */\nclass InvalidRequiredMinimumVersionError extends BeaconError_1.BeaconError {\n constructor(providedValue, sdkBeaconVersion, reason) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, `Invalid requiredMinimumVersion "${providedValue}" (SDK BEACON_VERSION = "${sdkBeaconVersion}"): ${reason}`, error_codes_1.BEACON_ERROR_CODES.INVALID_REQUIRED_MINIMUM_VERSION);\n this.name = \'InvalidRequiredMinimumVersionError\';\n this.title = \'Invalid requiredMinimumVersion option\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.INVALID_REQUIRED_MINIMUM_VERSION;\n this.providedValue = providedValue;\n this.sdkBeaconVersion = sdkBeaconVersion;\n }\n}\nexports.InvalidRequiredMinimumVersionError = InvalidRequiredMinimumVersionError;\n//# sourceMappingURL=InvalidRequiredMinimumVersionError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkNotSupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NetworkNotSupportedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NETWORK_NOT_SUPPORTED, \'The wallet does not support this network. Please select another one.\', error_codes_1.BEACON_ERROR_CODES.NETWORK_NOT_SUPPORTED);\n this.name = \'NetworkNotSupportedBeaconError\';\n this.title = \'Network Error\';\n }\n}\nexports.NetworkNotSupportedBeaconError = NetworkNotSupportedBeaconError;\n//# sourceMappingURL=NetworkNotSupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.NetworksUnsupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ \"./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js\");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ \"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js\");\nconst defaultMessage = (input) => {\n if (input.requestedNetworks.length === 0 && input.unsupportedNetworks.length === 0) {\n return 'Multiple networks are available in this session; specify a network argument on requestOperation.';\n }\n return `The wallet cannot serve all requested networks. Unsupported: ${input.unsupportedNetworks.join(', ')}.`;\n};\n/**\n * Raised by the dApp-side SDK when a wallet cannot serve every requested\n * network, or when `requestOperation({ network })` targets a network not in\n * the current session. SDK-internal; never emitted on the wire. Distinct\n * from the wire-level `NetworkNotSupportedBeaconError` (singular).\n *\n * @category Error\n */\nclass NetworksUnsupportedBeaconError extends BeaconError_1.BeaconError {\n constructor(input) {\n var _a;\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, (_a = input.customMessage) !== null && _a !== void 0 ? _a : defaultMessage(input), error_codes_1.BEACON_ERROR_CODES.NETWORKS_UNSUPPORTED);\n this.name = 'NetworksUnsupportedBeaconError';\n this.title = 'Networks not supported';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.NETWORKS_UNSUPPORTED;\n this.requestedNetworks = input.requestedNetworks;\n this.unsupportedNetworks = input.unsupportedNetworks;\n }\n}\nexports.NetworksUnsupportedBeaconError = NetworksUnsupportedBeaconError;\n//# sourceMappingURL=NetworksUnsupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NoAddressBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NoAddressBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NO_ADDRESS_ERROR, \'The wallet does not have an account set up. Please make sure to set up your wallet and try again.\', error_codes_1.BEACON_ERROR_CODES.NO_ADDRESS);\n this.name = \'NoAddressBeaconError\';\n this.title = \'No Address\';\n }\n}\nexports.NoAddressBeaconError = NoAddressBeaconError;\n//# sourceMappingURL=NoAddressBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NoPrivateKeyBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NoPrivateKeyBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NO_PRIVATE_KEY_FOUND_ERROR, \'The account you are trying to interact with is not available. Please make sure to add the account to your wallet and try again.\', error_codes_1.BEACON_ERROR_CODES.NO_PRIVATE_KEY);\n this.name = \'NoPrivateKeyBeaconError\';\n this.title = \'Account Not Found\';\n }\n}\nexports.NoPrivateKeyBeaconError = NoPrivateKeyBeaconError;\n//# sourceMappingURL=NoPrivateKeyBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NotGrantedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass NotGrantedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.NOT_GRANTED_ERROR, \'You do not have the necessary permissions to perform this action. Please initiate another permission request and give the necessary permissions.\', error_codes_1.BEACON_ERROR_CODES.PERMISSION_DENIED);\n this.name = \'NotGrantedBeaconError\';\n this.title = \'Permission Not Granted\';\n }\n}\nexports.NotGrantedBeaconError = NotGrantedBeaconError;\n//# sourceMappingURL=NotGrantedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ParametersInvalidBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass ParametersInvalidBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.PARAMETERS_INVALID_ERROR, \'Some of the parameters you provided are invalid and the request could not be completed. Please check your inputs and try again.\', error_codes_1.BEACON_ERROR_CODES.PARAMETERS_INVALID);\n this.name = \'ParametersInvalidBeaconError\';\n this.title = \'Parameters Invalid\';\n }\n}\nexports.ParametersInvalidBeaconError = ParametersInvalidBeaconError;\n//# sourceMappingURL=ParametersInvalidBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.SignatureTypeNotSupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass SignatureTypeNotSupportedBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.SIGNATURE_TYPE_NOT_SUPPORTED, \'The wallet is not able to sign payloads of this type.\', error_codes_1.BEACON_ERROR_CODES.SIGNATURE_TYPE_NOT_SUPPORTED);\n this.name = \'SignatureTypeNotSupportedBeaconError\';\n this.title = \'Signature Type Not Supported\';\n }\n}\nexports.SignatureTypeNotSupportedBeaconError = SignatureTypeNotSupportedBeaconError;\n//# sourceMappingURL=SignatureTypeNotSupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TooManyOperationsBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass TooManyOperationsBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.TOO_MANY_OPERATIONS, \'The request contains too many transactions. Please include fewer operations and try again.\', error_codes_1.BEACON_ERROR_CODES.TOO_MANY_OPERATIONS);\n this.name = \'TooManyOperationsBeaconError\';\n this.title = \'Too Many Operations\';\n }\n}\nexports.TooManyOperationsBeaconError = TooManyOperationsBeaconError;\n//# sourceMappingURL=TooManyOperationsBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransactionInvalidBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass TransactionInvalidBeaconError extends BeaconError_1.BeaconError {\n get fullDescription() {\n return { description: this.description, data: JSON.stringify(this.data, undefined, 2) };\n }\n constructor(data) {\n super(octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR, `The transaction is invalid and the node did not accept it.`, error_codes_1.BEACON_ERROR_CODES.TRANSACTION_INVALID);\n this.data = data;\n this.name = \'TransactionInvalidBeaconError\';\n this.title = \'Transaction Invalid\';\n this.data = data;\n }\n}\nexports.TransactionInvalidBeaconError = TransactionInvalidBeaconError;\n//# sourceMappingURL=TransactionInvalidBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.UnknownBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * @category Error\n */\nclass UnknownBeaconError extends BeaconError_1.BeaconError {\n constructor() {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, \'An unknown error occurred. Please try again or report it to a developer.\', error_codes_1.BEACON_ERROR_CODES.UNKNOWN_ERROR);\n this.name = \'UnknownBeaconError\';\n this.title = \'Error\';\n }\n}\nexports.UnknownBeaconError = UnknownBeaconError;\n//# sourceMappingURL=UnknownBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.VersionUnsupportedBeaconError = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst error_codes_1 = __webpack_require__(/*! ./error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\n/**\n * Raised by the dApp-side SDK when a wallet\'s `peer.version` is lower than\n * the dApp\'s declared required minimum. SDK-internal; never emitted on the\n * wire. Consumers discriminate via `instanceof` or `errorCode`.\n *\n * @category Error\n */\nclass VersionUnsupportedBeaconError extends BeaconError_1.BeaconError {\n constructor(requiredMinimumVersion, walletServedVersion, message) {\n super(octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR, message !== null && message !== void 0 ? message : `This dApp requires Octez.connect protocol version ${requiredMinimumVersion} or higher, ` +\n `but the wallet only supports version ${walletServedVersion}. Please upgrade your wallet.`, error_codes_1.BEACON_ERROR_CODES.VERSION_UNSUPPORTED);\n this.name = \'VersionUnsupportedBeaconError\';\n this.title = \'Wallet version not supported\';\n this.errorCode = error_codes_1.BEACON_ERROR_CODES.VERSION_UNSUPPORTED;\n this.requiredMinimumVersion = requiredMinimumVersion;\n this.walletServedVersion = walletServedVersion;\n }\n}\nexports.VersionUnsupportedBeaconError = VersionUnsupportedBeaconError;\n//# sourceMappingURL=VersionUnsupportedBeaconError.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js"(__unused_webpack_module,exports){"use strict";eval("{\n/**\n * Centralized error code registry for all Beacon SDK errors.\n * Error codes provide unique identifiers for debugging and support.\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ERROR_CODES = exports.BEACON_ERROR_CODES = exports.BLOCKCHAIN_ERROR_CODES = exports.PM_ERROR_CODES = exports.MATRIX_ERROR_CODES = exports.WC_ERROR_CODES = void 0;\n/**\n * WalletConnect transport error codes\n * Reference: @walletconnect/utils SDK_ERRORS and INTERNAL_ERRORS\n */\nexports.WC_ERROR_CODES = {\n // Custom Beacon SDK WC errors\n INVALID_NAMESPACE: 'WC_INVALID_NAMESPACE',\n INCOMPLETE_NAMESPACE: 'WC_INCOMPLETE_NAMESPACE',\n NOT_CONNECTED: 'WC_NOT_CONNECTED',\n INVALID_SESSION: 'WC_INVALID_SESSION',\n MISSING_REQUIRED_SCOPE: 'WC_MISSING_REQUIRED_SCOPE',\n ACTIVE_NETWORK_UNSPECIFIED: 'WC_ACTIVE_NETWORK_UNSPECIFIED',\n ACTIVE_ACCOUNT_UNSPECIFIED: 'WC_ACTIVE_ACCOUNT_UNSPECIFIED',\n INVALID_NETWORK_OR_ACCOUNT: 'WC_INVALID_NETWORK_OR_ACCOUNT',\n // WC INTERNAL_ERRORS (from @walletconnect/utils)\n NOT_INITIALIZED: 'WC_NOT_INITIALIZED', // code 1\n NO_MATCHING_KEY: 'WC_NO_MATCHING_KEY', // code 2\n EXPIRED: 'WC_EXPIRED', // code 6 (session or pairing expiry)\n SESSION_EXPIRED: 'WC_SESSION_EXPIRED',\n PAIRING_EXPIRED: 'WC_PAIRING_EXPIRED',\n UNKNOWN_TYPE: 'WC_UNKNOWN_TYPE', // code 7\n MISMATCHED_TOPIC: 'WC_MISMATCHED_TOPIC', // code 8\n NON_CONFORMING_NAMESPACES: 'WC_NON_CONFORMING_NAMESPACES', // code 9\n // WC SDK_ERRORS (from @walletconnect/utils)\n INVALID_METHOD: 'WC_INVALID_METHOD', // code 1001\n INVALID_EVENT: 'WC_INVALID_EVENT', // code 1002\n INVALID_UPDATE_REQUEST: 'WC_INVALID_UPDATE_REQUEST', // code 1003\n INVALID_EXTEND_REQUEST: 'WC_INVALID_EXTEND_REQUEST', // code 1004\n INVALID_SESSION_SETTLE_REQUEST: 'WC_INVALID_SESSION_SETTLE_REQUEST', // code 1005\n UNAUTHORIZED_METHOD: 'WC_UNAUTHORIZED_METHOD', // code 3001\n UNAUTHORIZED_EVENT: 'WC_UNAUTHORIZED_EVENT', // code 3002\n UNAUTHORIZED_UPDATE_REQUEST: 'WC_UNAUTHORIZED_UPDATE_REQUEST', // code 3003\n UNAUTHORIZED_EXTEND_REQUEST: 'WC_UNAUTHORIZED_EXTEND_REQUEST', // code 3004\n USER_REJECTED: 'WC_USER_REJECTED', // code 5000\n USER_REJECTED_CHAINS: 'WC_USER_REJECTED_CHAINS', // code 5001\n USER_REJECTED_METHODS: 'WC_USER_REJECTED_METHODS', // code 5002\n USER_REJECTED_EVENTS: 'WC_USER_REJECTED_EVENTS', // code 5003\n UNSUPPORTED_CHAINS: 'WC_UNSUPPORTED_CHAINS', // code 5100\n UNSUPPORTED_METHODS: 'WC_UNSUPPORTED_METHODS', // code 5101\n UNSUPPORTED_EVENTS: 'WC_UNSUPPORTED_EVENTS', // code 5102\n UNSUPPORTED_ACCOUNTS: 'WC_UNSUPPORTED_ACCOUNTS', // code 5103\n UNSUPPORTED_NAMESPACE_KEY: 'WC_UNSUPPORTED_NAMESPACE_KEY', // code 5104\n USER_DISCONNECTED: 'WC_USER_DISCONNECTED', // code 6000\n SESSION_SETTLEMENT_FAILED: 'WC_SESSION_SETTLEMENT_FAILED', // code 7000\n WC_METHOD_UNSUPPORTED: 'WC_METHOD_UNSUPPORTED', // code 10001\n // Generic\n UNKNOWN_ERROR: 'WC_UNKNOWN_ERROR'\n};\n/**\n * Matrix/P2P transport error codes\n */\nexports.MATRIX_ERROR_CODES = {\n RELAY_TIMEOUT: 'MATRIX_RELAY_TIMEOUT',\n CONNECTION_FAILED: 'MATRIX_CONNECTION_FAILED',\n RELAY_ERROR: 'MATRIX_RELAY_ERROR',\n PEER_NOT_FOUND: 'MATRIX_PEER_NOT_FOUND',\n MESSAGE_DELIVERY_FAILED: 'MATRIX_MESSAGE_DELIVERY_FAILED',\n ROOM_JOIN_FAILED: 'MATRIX_ROOM_JOIN_FAILED'\n};\n/**\n * PostMessage transport error codes\n */\nexports.PM_ERROR_CODES = {\n EXTENSION_ERROR: 'PM_EXTENSION_ERROR',\n ORIGIN_MISMATCH: 'PM_ORIGIN_MISMATCH',\n NO_RESPONSE: 'PM_NO_RESPONSE',\n EXTENSION_NOT_FOUND: 'PM_EXTENSION_NOT_FOUND',\n MESSAGE_TIMEOUT: 'PM_MESSAGE_TIMEOUT'\n};\n/**\n * Blockchain-specific error codes\n */\nexports.BLOCKCHAIN_ERROR_CODES = {\n TEZOS_INVALID_SIGNATURE: 'TEZOS_INVALID_SIGNATURE',\n TEZOS_NETWORK_ERROR: 'TEZOS_NETWORK_ERROR',\n TEZOS_NODE_ERROR: 'TEZOS_NODE_ERROR',\n TEZOS_SIMULATION_ERROR: 'TEZOS_SIMULATION_ERROR',\n SUBSTRATE_INVALID_SIGNATURE: 'SUBSTRATE_INVALID_SIGNATURE',\n SUBSTRATE_NETWORK_ERROR: 'SUBSTRATE_NETWORK_ERROR'\n};\n/**\n * Generic Beacon error codes\n */\nexports.BEACON_ERROR_CODES = {\n ABORTED_BY_USER: 'ABORTED_BY_USER',\n NETWORK_NOT_SUPPORTED: 'NETWORK_NOT_SUPPORTED',\n PERMISSION_DENIED: 'PERMISSION_DENIED',\n NO_ADDRESS: 'NO_ADDRESS',\n NO_PRIVATE_KEY: 'NO_PRIVATE_KEY',\n PARAMETERS_INVALID: 'PARAMETERS_INVALID',\n TOO_MANY_OPERATIONS: 'TOO_MANY_OPERATIONS',\n TRANSACTION_INVALID: 'TRANSACTION_INVALID',\n BROADCAST_ERROR: 'BROADCAST_ERROR',\n SIGNATURE_TYPE_NOT_SUPPORTED: 'SIGNATURE_TYPE_NOT_SUPPORTED',\n UNKNOWN_ERROR: 'UNKNOWN_ERROR',\n VERSION_UNSUPPORTED: 'VERSION_UNSUPPORTED',\n INVALID_REQUIRED_MINIMUM_VERSION: 'INVALID_REQUIRED_MINIMUM_VERSION',\n NETWORKS_UNSUPPORTED: 'NETWORKS_UNSUPPORTED',\n INVALID_BEACON_VERSION: 'INVALID_BEACON_VERSION'\n};\n/**\n * All error codes combined\n */\nexports.ERROR_CODES = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, exports.WC_ERROR_CODES), exports.MATRIX_ERROR_CODES), exports.PM_ERROR_CODES), exports.BLOCKCHAIN_ERROR_CODES), exports.BEACON_ERROR_CODES);\n//# sourceMappingURL=error-codes.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/errors/get-error.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkNotSupportedBeaconError = exports.BroadcastBeaconError = exports.BeaconError = void 0;\n// src/errors/index.ts\nconst BeaconError_1 = __webpack_require__(/*! ./BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\nObject.defineProperty(exports, "BeaconError", ({ enumerable: true, get: function () { return BeaconError_1.BeaconError; } }));\nconst BroadcastBeaconError_1 = __webpack_require__(/*! ./BroadcastBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js");\nObject.defineProperty(exports, "BroadcastBeaconError", ({ enumerable: true, get: function () { return BroadcastBeaconError_1.BroadcastBeaconError; } }));\nconst NetworkNotSupportedBeaconError_1 = __webpack_require__(/*! ./NetworkNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js");\nObject.defineProperty(exports, "NetworkNotSupportedBeaconError", ({ enumerable: true, get: function () { return NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError; } }));\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst assert_never_1 = __webpack_require__(/*! ../utils/assert-never */ "./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js");\nconst AbortedBeaconError_1 = __webpack_require__(/*! ./AbortedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js");\nconst NoAddressBeaconError_1 = __webpack_require__(/*! ./NoAddressBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js");\nconst NoPrivateKeyBeaconError_1 = __webpack_require__(/*! ./NoPrivateKeyBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js");\nconst NotGrantedBeaconError_1 = __webpack_require__(/*! ./NotGrantedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js");\nconst ParametersInvalidBeaconError_1 = __webpack_require__(/*! ./ParametersInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js");\nconst SignatureTypeNotSupportedBeaconError_1 = __webpack_require__(/*! ./SignatureTypeNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js");\nconst TooManyOperationsBeaconError_1 = __webpack_require__(/*! ./TooManyOperationsBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js");\nconst TransactionInvalidBeaconError_1 = __webpack_require__(/*! ./TransactionInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js");\nconst UnknownBeaconError_1 = __webpack_require__(/*! ./UnknownBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js");\nconst getError = (errorType, errorData) => {\n switch (errorType) {\n case octez_connect_types_1.BeaconErrorType.BROADCAST_ERROR:\n return new BroadcastBeaconError_1.BroadcastBeaconError();\n case octez_connect_types_1.BeaconErrorType.NETWORK_NOT_SUPPORTED:\n return new NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError();\n case octez_connect_types_1.BeaconErrorType.NO_ADDRESS_ERROR:\n return new NoAddressBeaconError_1.NoAddressBeaconError();\n case octez_connect_types_1.BeaconErrorType.NO_PRIVATE_KEY_FOUND_ERROR:\n return new NoPrivateKeyBeaconError_1.NoPrivateKeyBeaconError();\n case octez_connect_types_1.BeaconErrorType.NOT_GRANTED_ERROR:\n return new NotGrantedBeaconError_1.NotGrantedBeaconError();\n case octez_connect_types_1.BeaconErrorType.PARAMETERS_INVALID_ERROR:\n return new ParametersInvalidBeaconError_1.ParametersInvalidBeaconError();\n case octez_connect_types_1.BeaconErrorType.TOO_MANY_OPERATIONS:\n return new TooManyOperationsBeaconError_1.TooManyOperationsBeaconError();\n case octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR:\n return new TransactionInvalidBeaconError_1.TransactionInvalidBeaconError(errorData);\n case octez_connect_types_1.BeaconErrorType.SIGNATURE_TYPE_NOT_SUPPORTED:\n return new SignatureTypeNotSupportedBeaconError_1.SignatureTypeNotSupportedBeaconError();\n // case BeaconErrorType.ENCRYPTION_TYPE_NOT_SUPPORTED:\n // return new EncryptionTypeNotSupportedBeaconError()\n case octez_connect_types_1.BeaconErrorType.ABORTED_ERROR:\n return new AbortedBeaconError_1.AbortedBeaconError();\n case octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR:\n return new UnknownBeaconError_1.UnknownBeaconError();\n default:\n (0, assert_never_1.assertNever)(errorType);\n }\n};\nexports["default"] = getError;\n//# sourceMappingURL=get-error.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/errors/get-error.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.isMultiNetworkVersion = exports.isAtLeastVersion = exports.compareBeaconVersion = exports.MULTI_NETWORK_FROM_VERSION = exports.MESSAGE_WRAPPED_FROM_VERSION = exports.usesWrappedMessages = exports.MultiTabChannel = exports.windowRef = exports.getAccountIdentifier = exports.getSenderId = exports.setPreferredMessageProtocolVersion = exports.getPreferredMessageProtocolVersion = exports.DEFAULT_PROTOCOL_VERSION = exports.LATEST_PROTOCOL_VERSION = exports.PROTOCOL_VERSION_V2 = exports.PROTOCOL_VERSION_V1 = exports.BEACON_VERSION = exports.SDK_VERSION = exports.PermissionManager = exports.AppMetadataManager = exports.AccountManager = exports.PeerManager = exports.getStorage = exports.StorageValidator = exports.IndexedDBStorage = exports.WCStorage = exports.LocalStorage = exports.ChromeStorage = exports.CommunicationClient = exports.MessageBasedClient = exports.Transport = exports.InvalidBeaconVersionError = exports.NetworksUnsupportedBeaconError = exports.InvalidRequiredMinimumVersionError = exports.VersionUnsupportedBeaconError = exports.UnknownBeaconError = exports.SignatureTypeNotSupportedBeaconError = exports.TransactionInvalidBeaconError = exports.TooManyOperationsBeaconError = exports.ParametersInvalidBeaconError = exports.NotGrantedBeaconError = exports.NoPrivateKeyBeaconError = exports.NoAddressBeaconError = exports.NetworkNotSupportedBeaconError = exports.BroadcastBeaconError = exports.AbortedBeaconError = exports.BeaconError = exports.getError = exports.Client = exports.BeaconClient = void 0;\nexports.BACKEND_URL = exports.NOTIFICATION_ORACLE_URL = exports.getDebugEnabled = exports.setDebugEnabled = exports.getLogger = exports.setLogger = exports.Logger = exports.Serializer = exports.BEACON_ERROR_CODES = exports.BLOCKCHAIN_ERROR_CODES = exports.PM_ERROR_CODES = exports.MATRIX_ERROR_CODES = exports.WC_ERROR_CODES = exports.ERROR_CODES = exports.SENSITIVE_STORAGE_KEYS = exports.copyErrorContextToClipboard = exports.serializeErrorContext = exports.buildErrorContext = exports.gatherDiagnostics = exports.resolveRequiredMinimumVersion = exports.assertNever = exports.networkTypeFromTezosCaip2 = exports.tezosCaip2FromNetworkType = exports.TEZOS_NETWORK_GENESIS_IDS = exports.networkFromTezosCaip2 = exports.isValidTezosCaip2 = exports.normalizeTezosCaip2 = exports.unwrapBeaconMessage = exports.wrapBeaconMessage = exports.negotiateEnvelopeVersion = void 0;\n/**\n * General docs\n * @module public\n */\nconst Client_1 = __webpack_require__(/*! ./clients/client/Client */ "./packages/octez.connect-core/dist/cjs/src/clients/client/Client.js");\nObject.defineProperty(exports, "Client", ({ enumerable: true, get: function () { return Client_1.Client; } }));\nconst BeaconError_1 = __webpack_require__(/*! ./errors/BeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js");\nObject.defineProperty(exports, "BeaconError", ({ enumerable: true, get: function () { return BeaconError_1.BeaconError; } }));\nconst BroadcastBeaconError_1 = __webpack_require__(/*! ./errors/BroadcastBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/BroadcastBeaconError.js");\nObject.defineProperty(exports, "BroadcastBeaconError", ({ enumerable: true, get: function () { return BroadcastBeaconError_1.BroadcastBeaconError; } }));\nconst NetworkNotSupportedBeaconError_1 = __webpack_require__(/*! ./errors/NetworkNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworkNotSupportedBeaconError.js");\nObject.defineProperty(exports, "NetworkNotSupportedBeaconError", ({ enumerable: true, get: function () { return NetworkNotSupportedBeaconError_1.NetworkNotSupportedBeaconError; } }));\nconst NoAddressBeaconError_1 = __webpack_require__(/*! ./errors/NoAddressBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoAddressBeaconError.js");\nObject.defineProperty(exports, "NoAddressBeaconError", ({ enumerable: true, get: function () { return NoAddressBeaconError_1.NoAddressBeaconError; } }));\nconst NoPrivateKeyBeaconError_1 = __webpack_require__(/*! ./errors/NoPrivateKeyBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NoPrivateKeyBeaconError.js");\nObject.defineProperty(exports, "NoPrivateKeyBeaconError", ({ enumerable: true, get: function () { return NoPrivateKeyBeaconError_1.NoPrivateKeyBeaconError; } }));\nconst NotGrantedBeaconError_1 = __webpack_require__(/*! ./errors/NotGrantedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NotGrantedBeaconError.js");\nObject.defineProperty(exports, "NotGrantedBeaconError", ({ enumerable: true, get: function () { return NotGrantedBeaconError_1.NotGrantedBeaconError; } }));\nconst ParametersInvalidBeaconError_1 = __webpack_require__(/*! ./errors/ParametersInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/ParametersInvalidBeaconError.js");\nObject.defineProperty(exports, "ParametersInvalidBeaconError", ({ enumerable: true, get: function () { return ParametersInvalidBeaconError_1.ParametersInvalidBeaconError; } }));\nconst TooManyOperationsBeaconError_1 = __webpack_require__(/*! ./errors/TooManyOperationsBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TooManyOperationsBeaconError.js");\nObject.defineProperty(exports, "TooManyOperationsBeaconError", ({ enumerable: true, get: function () { return TooManyOperationsBeaconError_1.TooManyOperationsBeaconError; } }));\nconst TransactionInvalidBeaconError_1 = __webpack_require__(/*! ./errors/TransactionInvalidBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/TransactionInvalidBeaconError.js");\nObject.defineProperty(exports, "TransactionInvalidBeaconError", ({ enumerable: true, get: function () { return TransactionInvalidBeaconError_1.TransactionInvalidBeaconError; } }));\nconst UnknownBeaconError_1 = __webpack_require__(/*! ./errors/UnknownBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/UnknownBeaconError.js");\nObject.defineProperty(exports, "UnknownBeaconError", ({ enumerable: true, get: function () { return UnknownBeaconError_1.UnknownBeaconError; } }));\nconst Transport_1 = __webpack_require__(/*! ./transports/Transport */ "./packages/octez.connect-core/dist/cjs/src/transports/Transport.js");\nObject.defineProperty(exports, "Transport", ({ enumerable: true, get: function () { return Transport_1.Transport; } }));\nconst ChromeStorage_1 = __webpack_require__(/*! ./storage/ChromeStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js");\nObject.defineProperty(exports, "ChromeStorage", ({ enumerable: true, get: function () { return ChromeStorage_1.ChromeStorage; } }));\nconst LocalStorage_1 = __webpack_require__(/*! ./storage/LocalStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js");\nObject.defineProperty(exports, "LocalStorage", ({ enumerable: true, get: function () { return LocalStorage_1.LocalStorage; } }));\nconst getStorage_1 = __webpack_require__(/*! ./storage/getStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js");\nObject.defineProperty(exports, "getStorage", ({ enumerable: true, get: function () { return getStorage_1.getStorage; } }));\nconst Serializer_1 = __webpack_require__(/*! ./Serializer */ "./packages/octez.connect-core/dist/cjs/src/Serializer.js");\nObject.defineProperty(exports, "Serializer", ({ enumerable: true, get: function () { return Serializer_1.Serializer; } }));\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nObject.defineProperty(exports, "SDK_VERSION", ({ enumerable: true, get: function () { return constants_1.SDK_VERSION; } }));\nObject.defineProperty(exports, "BEACON_VERSION", ({ enumerable: true, get: function () { return constants_1.BEACON_VERSION; } }));\nObject.defineProperty(exports, "PROTOCOL_VERSION_V1", ({ enumerable: true, get: function () { return constants_1.PROTOCOL_VERSION_V1; } }));\nObject.defineProperty(exports, "PROTOCOL_VERSION_V2", ({ enumerable: true, get: function () { return constants_1.PROTOCOL_VERSION_V2; } }));\nObject.defineProperty(exports, "LATEST_PROTOCOL_VERSION", ({ enumerable: true, get: function () { return constants_1.LATEST_PROTOCOL_VERSION; } }));\nObject.defineProperty(exports, "DEFAULT_PROTOCOL_VERSION", ({ enumerable: true, get: function () { return constants_1.DEFAULT_PROTOCOL_VERSION; } }));\nconst message_protocol_1 = __webpack_require__(/*! ./message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nObject.defineProperty(exports, "getPreferredMessageProtocolVersion", ({ enumerable: true, get: function () { return message_protocol_1.getPreferredMessageProtocolVersion; } }));\nObject.defineProperty(exports, "setPreferredMessageProtocolVersion", ({ enumerable: true, get: function () { return message_protocol_1.setPreferredMessageProtocolVersion; } }));\nconst AccountManager_1 = __webpack_require__(/*! ./managers/AccountManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js");\nObject.defineProperty(exports, "AccountManager", ({ enumerable: true, get: function () { return AccountManager_1.AccountManager; } }));\nconst AppMetadataManager_1 = __webpack_require__(/*! ./managers/AppMetadataManager */ "./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js");\nObject.defineProperty(exports, "AppMetadataManager", ({ enumerable: true, get: function () { return AppMetadataManager_1.AppMetadataManager; } }));\nconst PermissionManager_1 = __webpack_require__(/*! ./managers/PermissionManager */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js");\nObject.defineProperty(exports, "PermissionManager", ({ enumerable: true, get: function () { return PermissionManager_1.PermissionManager; } }));\nconst BeaconClient_1 = __webpack_require__(/*! ./clients/beacon-client/BeaconClient */ "./packages/octez.connect-core/dist/cjs/src/clients/beacon-client/BeaconClient.js");\nObject.defineProperty(exports, "BeaconClient", ({ enumerable: true, get: function () { return BeaconClient_1.BeaconClient; } }));\nconst get_account_identifier_1 = __webpack_require__(/*! ./utils/get-account-identifier */ "./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js");\nObject.defineProperty(exports, "getAccountIdentifier", ({ enumerable: true, get: function () { return get_account_identifier_1.getAccountIdentifier; } }));\nconst AbortedBeaconError_1 = __webpack_require__(/*! ./errors/AbortedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/AbortedBeaconError.js");\nObject.defineProperty(exports, "AbortedBeaconError", ({ enumerable: true, get: function () { return AbortedBeaconError_1.AbortedBeaconError; } }));\nconst get_sender_id_1 = __webpack_require__(/*! ./utils/get-sender-id */ "./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js");\nObject.defineProperty(exports, "getSenderId", ({ enumerable: true, get: function () { return get_sender_id_1.getSenderId; } }));\nconst PeerManager_1 = __webpack_require__(/*! ./managers/PeerManager */ "./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js");\nObject.defineProperty(exports, "PeerManager", ({ enumerable: true, get: function () { return PeerManager_1.PeerManager; } }));\nconst MessageBasedClient_1 = __webpack_require__(/*! ./transports/clients/MessageBasedClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js");\nObject.defineProperty(exports, "MessageBasedClient", ({ enumerable: true, get: function () { return MessageBasedClient_1.MessageBasedClient; } }));\nconst debug_1 = __webpack_require__(/*! ./debug */ "./packages/octez.connect-core/dist/cjs/src/debug.js");\nObject.defineProperty(exports, "setDebugEnabled", ({ enumerable: true, get: function () { return debug_1.setDebugEnabled; } }));\nObject.defineProperty(exports, "getDebugEnabled", ({ enumerable: true, get: function () { return debug_1.getDebugEnabled; } }));\n// import { EncryptPayloadRequest } from \'./types/beacon/messages/EncryptPayloadRequest\'\n// import { EncryptPayloadResponse } from \'./types/beacon/messages/EncryptPayloadResponse\'\n// import { EncryptionTypeNotSupportedBeaconError } from \'./errors/EncryptionTypeNotSupportedBeaconError\'\nconst SignatureTypeNotSupportedBeaconError_1 = __webpack_require__(/*! ./errors/SignatureTypeNotSupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/SignatureTypeNotSupportedBeaconError.js");\nObject.defineProperty(exports, "SignatureTypeNotSupportedBeaconError", ({ enumerable: true, get: function () { return SignatureTypeNotSupportedBeaconError_1.SignatureTypeNotSupportedBeaconError; } }));\nconst VersionUnsupportedBeaconError_1 = __webpack_require__(/*! ./errors/VersionUnsupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/VersionUnsupportedBeaconError.js");\nObject.defineProperty(exports, "VersionUnsupportedBeaconError", ({ enumerable: true, get: function () { return VersionUnsupportedBeaconError_1.VersionUnsupportedBeaconError; } }));\nconst InvalidRequiredMinimumVersionError_1 = __webpack_require__(/*! ./errors/InvalidRequiredMinimumVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js");\nObject.defineProperty(exports, "InvalidRequiredMinimumVersionError", ({ enumerable: true, get: function () { return InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError; } }));\nconst NetworksUnsupportedBeaconError_1 = __webpack_require__(/*! ./errors/NetworksUnsupportedBeaconError */ "./packages/octez.connect-core/dist/cjs/src/errors/NetworksUnsupportedBeaconError.js");\nObject.defineProperty(exports, "NetworksUnsupportedBeaconError", ({ enumerable: true, get: function () { return NetworksUnsupportedBeaconError_1.NetworksUnsupportedBeaconError; } }));\nconst InvalidBeaconVersionError_1 = __webpack_require__(/*! ./errors/InvalidBeaconVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js");\nObject.defineProperty(exports, "InvalidBeaconVersionError", ({ enumerable: true, get: function () { return InvalidBeaconVersionError_1.InvalidBeaconVersionError; } }));\nconst Logger_1 = __webpack_require__(/*! ./utils/Logger */ "./packages/octez.connect-core/dist/cjs/src/utils/Logger.js");\nObject.defineProperty(exports, "getLogger", ({ enumerable: true, get: function () { return Logger_1.getLogger; } }));\nObject.defineProperty(exports, "Logger", ({ enumerable: true, get: function () { return Logger_1.Logger; } }));\nObject.defineProperty(exports, "setLogger", ({ enumerable: true, get: function () { return Logger_1.setLogger; } }));\nconst MockWindow_1 = __webpack_require__(/*! ./MockWindow */ "./packages/octez.connect-core/dist/cjs/src/MockWindow.js");\nObject.defineProperty(exports, "windowRef", ({ enumerable: true, get: function () { return MockWindow_1.windowRef; } }));\nconst CommunicationClient_1 = __webpack_require__(/*! ./transports/clients/CommunicationClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js");\nObject.defineProperty(exports, "CommunicationClient", ({ enumerable: true, get: function () { return CommunicationClient_1.CommunicationClient; } }));\nconst WCStorage_1 = __webpack_require__(/*! ./storage/WCStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js");\nObject.defineProperty(exports, "WCStorage", ({ enumerable: true, get: function () { return WCStorage_1.WCStorage; } }));\nconst IndexedDBStorage_1 = __webpack_require__(/*! ./storage/IndexedDBStorage */ "./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js");\nObject.defineProperty(exports, "IndexedDBStorage", ({ enumerable: true, get: function () { return IndexedDBStorage_1.IndexedDBStorage; } }));\nconst StorageValidator_1 = __webpack_require__(/*! ./storage/StorageValidator */ "./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js");\nObject.defineProperty(exports, "StorageValidator", ({ enumerable: true, get: function () { return StorageValidator_1.StorageValidator; } }));\nconst multi_tab_channel_1 = __webpack_require__(/*! ./utils/multi-tab-channel */ "./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js");\nObject.defineProperty(exports, "MultiTabChannel", ({ enumerable: true, get: function () { return multi_tab_channel_1.MultiTabChannel; } }));\nconst get_error_1 = __importDefault(__webpack_require__(/*! ./errors/get-error */ "./packages/octez.connect-core/dist/cjs/src/errors/get-error.js"));\nexports.getError = get_error_1.default;\nvar message_utils_1 = __webpack_require__(/*! ./utils/message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\nObject.defineProperty(exports, "usesWrappedMessages", ({ enumerable: true, get: function () { return message_utils_1.usesWrappedMessages; } }));\nObject.defineProperty(exports, "MESSAGE_WRAPPED_FROM_VERSION", ({ enumerable: true, get: function () { return message_utils_1.MESSAGE_WRAPPED_FROM_VERSION; } }));\nObject.defineProperty(exports, "MULTI_NETWORK_FROM_VERSION", ({ enumerable: true, get: function () { return message_utils_1.MULTI_NETWORK_FROM_VERSION; } }));\nObject.defineProperty(exports, "compareBeaconVersion", ({ enumerable: true, get: function () { return message_utils_1.compareBeaconVersion; } }));\nObject.defineProperty(exports, "isAtLeastVersion", ({ enumerable: true, get: function () { return message_utils_1.isAtLeastVersion; } }));\nObject.defineProperty(exports, "isMultiNetworkVersion", ({ enumerable: true, get: function () { return message_utils_1.isMultiNetworkVersion; } }));\nObject.defineProperty(exports, "negotiateEnvelopeVersion", ({ enumerable: true, get: function () { return message_utils_1.negotiateEnvelopeVersion; } }));\nObject.defineProperty(exports, "wrapBeaconMessage", ({ enumerable: true, get: function () { return message_utils_1.wrapBeaconMessage; } }));\nObject.defineProperty(exports, "unwrapBeaconMessage", ({ enumerable: true, get: function () { return message_utils_1.unwrapBeaconMessage; } }));\nvar caip2_1 = __webpack_require__(/*! ./utils/caip2 */ "./packages/octez.connect-core/dist/cjs/src/utils/caip2.js");\nObject.defineProperty(exports, "normalizeTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.normalizeTezosCaip2; } }));\nObject.defineProperty(exports, "isValidTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.isValidTezosCaip2; } }));\nObject.defineProperty(exports, "networkFromTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.networkFromTezosCaip2; } }));\nObject.defineProperty(exports, "TEZOS_NETWORK_GENESIS_IDS", ({ enumerable: true, get: function () { return caip2_1.TEZOS_NETWORK_GENESIS_IDS; } }));\nObject.defineProperty(exports, "tezosCaip2FromNetworkType", ({ enumerable: true, get: function () { return caip2_1.tezosCaip2FromNetworkType; } }));\nObject.defineProperty(exports, "networkTypeFromTezosCaip2", ({ enumerable: true, get: function () { return caip2_1.networkTypeFromTezosCaip2; } }));\nvar assert_never_1 = __webpack_require__(/*! ./utils/assert-never */ "./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js");\nObject.defineProperty(exports, "assertNever", ({ enumerable: true, get: function () { return assert_never_1.assertNever; } }));\nvar required_minimum_version_1 = __webpack_require__(/*! ./utils/required-minimum-version */ "./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js");\nObject.defineProperty(exports, "resolveRequiredMinimumVersion", ({ enumerable: true, get: function () { return required_minimum_version_1.resolveRequiredMinimumVersion; } }));\n// Diagnostics\nvar diagnostics_1 = __webpack_require__(/*! ./utils/diagnostics */ "./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js");\nObject.defineProperty(exports, "gatherDiagnostics", ({ enumerable: true, get: function () { return diagnostics_1.gatherDiagnostics; } }));\nObject.defineProperty(exports, "buildErrorContext", ({ enumerable: true, get: function () { return diagnostics_1.buildErrorContext; } }));\nObject.defineProperty(exports, "serializeErrorContext", ({ enumerable: true, get: function () { return diagnostics_1.serializeErrorContext; } }));\nObject.defineProperty(exports, "copyErrorContextToClipboard", ({ enumerable: true, get: function () { return diagnostics_1.copyErrorContextToClipboard; } }));\nObject.defineProperty(exports, "SENSITIVE_STORAGE_KEYS", ({ enumerable: true, get: function () { return diagnostics_1.SENSITIVE_STORAGE_KEYS; } }));\n// Error codes\nvar error_codes_1 = __webpack_require__(/*! ./errors/error-codes */ "./packages/octez.connect-core/dist/cjs/src/errors/error-codes.js");\nObject.defineProperty(exports, "ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.ERROR_CODES; } }));\nObject.defineProperty(exports, "WC_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.WC_ERROR_CODES; } }));\nObject.defineProperty(exports, "MATRIX_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.MATRIX_ERROR_CODES; } }));\nObject.defineProperty(exports, "PM_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.PM_ERROR_CODES; } }));\nObject.defineProperty(exports, "BLOCKCHAIN_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.BLOCKCHAIN_ERROR_CODES; } }));\nObject.defineProperty(exports, "BEACON_ERROR_CODES", ({ enumerable: true, get: function () { return error_codes_1.BEACON_ERROR_CODES; } }));\nvar constants_2 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nObject.defineProperty(exports, "NOTIFICATION_ORACLE_URL", ({ enumerable: true, get: function () { return constants_2.NOTIFICATION_ORACLE_URL; } }));\nObject.defineProperty(exports, "BACKEND_URL", ({ enumerable: true, get: function () { return constants_2.BACKEND_URL; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/index.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AccountManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\nconst PermissionValidator_1 = __webpack_require__(/*! ./PermissionValidator */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js");\n/**\n * @internalapi\n *\n * The AccountManager provides CRUD functionality for account entities and persists them to the provided storage.\n */\nclass AccountManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.ACCOUNTS);\n }\n getAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((account) => account.accountIdentifier === accountIdentifier);\n });\n }\n addAccount(accountInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(accountInfo, (account) => account.accountIdentifier === accountInfo.accountIdentifier);\n });\n }\n /**\n * Persist several accounts in a single read-modify-write cycle. Behaves like\n * calling {@link addAccount} for each entry (dedupe/overwrite by\n * `accountIdentifier`) but touches storage once. Used by the v4 multi-network\n * permission flow, which materialises one account per requested network.\n */\n addAccounts(accountInfos) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addMany(accountInfos, (stored, incoming) => stored.accountIdentifier === incoming.accountIdentifier);\n });\n }\n updateAccount(accountIdentifier, accountInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n const account = yield this.getAccount(accountIdentifier);\n if (!account)\n return undefined;\n const newAccount = Object.assign(Object.assign({}, account), accountInfo);\n yield this.storageManager.addOne(newAccount, (account) => account.accountIdentifier === accountIdentifier, true);\n return newAccount;\n });\n }\n removeAccount(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((account) => account.accountIdentifier === accountIdentifier);\n });\n }\n removeAccounts(accountIdentifiers) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((account) => accountIdentifiers.includes(account.accountIdentifier));\n });\n }\n removeAllAccounts() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n hasPermission(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return PermissionValidator_1.PermissionValidator.hasPermission(message, this.getAccount.bind(this), this.getAccounts.bind(this));\n });\n }\n}\nexports.AccountManager = AccountManager;\n//# sourceMappingURL=AccountManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/AccountManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.AppMetadataManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\n/**\n * @internalapi\n *\n * The AppMetadataManager provides CRUD functionality for app-metadata entities and persists them to the provided storage.\n */\nclass AppMetadataManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.APP_METADATA_LIST);\n }\n getAppMetadataList() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((appMetadata) => appMetadata.senderId === senderId);\n });\n }\n addAppMetadata(appMetadata) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(appMetadata, (appMetadataElement) => appMetadataElement.senderId === appMetadata.senderId);\n });\n }\n removeAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((appMetadata) => appMetadata.senderId === senderId);\n });\n }\n removeAppMetadatas(senderIds) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((appMetadata) => senderIds.includes(appMetadata.senderId));\n });\n }\n removeAllAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n}\nexports.AppMetadataManager = AppMetadataManager;\n//# sourceMappingURL=AppMetadataManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/AppMetadataManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PeerManager = void 0;\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\n/**\n * @internalapi\n *\n * The PeerManager provides CRUD functionality for peer entities and persists them to the provided storage.\n */\nclass PeerManager {\n constructor(storage, key) {\n this.storageManager = new StorageManager_1.StorageManager(storage, key);\n }\n hasPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield this.getPeer(publicKey)) ? true : false;\n });\n }\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getPeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((peer) => peer.publicKey === publicKey);\n });\n }\n addPeer(peerInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(peerInfo, (peer) => peer.publicKey === peerInfo.publicKey);\n });\n }\n removePeer(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((peer) => peer.publicKey === publicKey);\n });\n }\n removePeers(publicKeys) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((peer) => publicKeys.includes(peer.publicKey));\n });\n }\n removeAllPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n}\nexports.PeerManager = PeerManager;\n//# sourceMappingURL=PeerManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PeerManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionManager = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst StorageManager_1 = __webpack_require__(/*! ./StorageManager */ "./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js");\nconst PermissionValidator_1 = __webpack_require__(/*! ./PermissionValidator */ "./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js");\n/**\n * @internalapi\n *\n * The PermissionManager provides CRUD functionality for permission entities and persists them to the provided storage.\n */\nclass PermissionManager {\n constructor(storage) {\n this.storageManager = new StorageManager_1.StorageManager(storage, octez_connect_types_1.StorageKey.PERMISSION_LIST);\n }\n getPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storageManager.getAll())) !== null && _a !== void 0 ? _a : [];\n });\n }\n getPermission(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.getOne((permission) => permission.accountIdentifier === accountIdentifier);\n });\n }\n addPermission(permissionInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addOne(permissionInfo, (permission) => permission.accountIdentifier === permissionInfo.accountIdentifier &&\n permission.senderId === permissionInfo.senderId);\n });\n }\n /**\n * Persist several permissions in one read-modify-write cycle. Required for\n * the v4 multi-network fanout (N permissions from one response): N\n * concurrent `addPermission` calls race on the shared permission list and\n * the last write clobbers the others.\n */\n addPermissions(permissionInfos) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.addMany(permissionInfos, (stored, incoming) => stored.accountIdentifier === incoming.accountIdentifier &&\n stored.senderId === incoming.senderId);\n });\n }\n removePermission(accountIdentifier, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((permission) => permission.accountIdentifier === accountIdentifier && permission.senderId === senderId);\n });\n }\n removePermissions(accountIdentifiers) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.remove((permission) => accountIdentifiers.includes(permission.accountIdentifier));\n });\n }\n removeAllPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storageManager.removeAll();\n });\n }\n hasPermission(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return PermissionValidator_1.PermissionValidator.hasPermission(message, this.getPermission.bind(this), this.getPermissions.bind(this));\n });\n }\n}\nexports.PermissionManager = PermissionManager;\n//# sourceMappingURL=PermissionManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PermissionManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionValidator = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst get_account_identifier_1 = __webpack_require__(/*! ../utils/get-account-identifier */ "./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js");\nconst caip2_1 = __webpack_require__(/*! ../utils/caip2 */ "./packages/octez.connect-core/dist/cjs/src/utils/caip2.js");\n/**\n * @internalapi\n *\n * The PermissionValidator is used to check if permissions for a certain message type have been given\n */\nclass PermissionValidator {\n /**\n * Check if permissions were given for a certain message type.\n *\n * PermissionRequest and BroadcastRequest will always return true.\n *\n * @param message octez.connect message\n */\n static hasPermission(message, getOne, getAll) {\n return __awaiter(this, void 0, void 0, function* () {\n switch (message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionRequest:\n case octez_connect_types_1.BeaconMessageType.BroadcastRequest: {\n return true;\n }\n case octez_connect_types_1.BeaconMessageType.OperationRequest: {\n // operation_request.network is now `Network | string`: on the v4 path\n // the wire carries a CAIP-2 string, which we coerce to the minimal\n // Network used to derive the account identifier (same helper the\n // permission-storage side uses, so the two ids match). Normalize first:\n // the wire accepts both the bare reference (`NetX…`) and the full\n // `tezos:NetX…` form, but permissions were stored under the normalized\n // (prefixed) chainId, so a bare reference must be prefixed before the\n // identifier is derived or the lookup misses a valid grant.\n const networkForId = typeof message.network === \'string\'\n ? (0, caip2_1.networkFromTezosCaip2)((0, caip2_1.normalizeTezosCaip2)(message.network))\n : message.network;\n const accountIdentifier = yield (0, get_account_identifier_1.getAccountIdentifier)(message.sourceAddress, networkForId);\n const permission = yield getOne(accountIdentifier);\n if (!permission) {\n return false;\n }\n return permission.scopes.includes(octez_connect_types_1.PermissionScope.OPERATION_REQUEST);\n }\n case octez_connect_types_1.BeaconMessageType.SignPayloadRequest: {\n const permissions = yield getAll();\n const filteredPermissions = permissions.filter((permission) => permission.address === message.sourceAddress);\n if (filteredPermissions.length === 0) {\n return false;\n }\n return filteredPermissions.some((permission) => permission.scopes.includes(octez_connect_types_1.PermissionScope.SIGN));\n }\n default:\n throw new Error(\'Message not handled\');\n }\n });\n }\n}\nexports.PermissionValidator = PermissionValidator;\n//# sourceMappingURL=PermissionValidator.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/PermissionValidator.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js"(__unused_webpack_module,exports){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.StorageManager = void 0;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nfunction fixArrayType(array) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return array;\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n/**\n * @internalapi\n *\n * The StorageManager provides CRUD functionality for specific entities and persists them to the provided storage.\n */\nclass StorageManager {\n constructor(storage, storageKey) {\n this.storage = storage;\n this.storageKey = storageKey;\n }\n getAll() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (_a = (yield this.storage.get(this.storageKey))) !== null && _a !== void 0 ? _a : [];\n });\n }\n getOne(predicate) {\n return __awaiter(this, void 0, void 0, function* () {\n const entities = yield this.storage.get(this.storageKey);\n return fixArrayType(entities).find(predicate);\n });\n }\n addOne(element_1, predicate_1) {\n return __awaiter(this, arguments, void 0, function* (element, predicate, overwrite = true) {\n const entities = yield this.storage.get(this.storageKey);\n if (!fixArrayType(entities).some(predicate)) {\n fixArrayType(entities).push(element);\n }\n else if (overwrite) {\n for (let i = 0; i < entities.length; i++) {\n if (predicate(fixArrayType(entities)[i])) {\n entities[i] = element;\n }\n }\n }\n return this.storage.set(this.storageKey, entities);\n });\n }\n /**\n * Insert or update many elements in a single read-modify-write cycle.\n *\n * Equivalent to calling {@link addOne} for each element, but reads and writes\n * storage once instead of once per element. Elements are reconciled against\n * the store AND against earlier elements in the same batch (so a duplicate\n * within `elements` collapses to one), using `match(stored, incoming)` to\n * decide identity. Used for the v4 multi-network fanout, which persists one\n * account per requested network from a single permission response.\n */\n addMany(elements_1, match_1) {\n return __awaiter(this, arguments, void 0, function* (elements, match, overwrite = true) {\n if (elements.length === 0) {\n return;\n }\n const entities = yield this.storage.get(this.storageKey);\n for (const element of elements) {\n const index = fixArrayType(entities).findIndex((existing) => match(existing, element));\n if (index === -1) {\n fixArrayType(entities).push(element);\n }\n else if (overwrite) {\n entities[index] = element;\n }\n }\n return this.storage.set(this.storageKey, entities);\n });\n }\n remove(predicate) {\n return __awaiter(this, void 0, void 0, function* () {\n const entities = yield this.storage.get(this.storageKey);\n const filteredEntities = fixArrayType(entities).filter((entity) => !predicate(entity));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this.storage.set(this.storageKey, filteredEntities);\n });\n }\n removeAll() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.storage.delete(this.storageKey);\n });\n }\n}\nexports.StorageManager = StorageManager;\n//# sourceMappingURL=StorageManager.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/managers/StorageManager.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/message-protocol.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.setPreferredMessageProtocolVersion = exports.getPreferredMessageProtocolVersion = void 0;\nconst constants_1 = __webpack_require__(/*! ./constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nlet preferredMessageProtocolVersion = constants_1.LATEST_PROTOCOL_VERSION;\nconst getPreferredMessageProtocolVersion = () => preferredMessageProtocolVersion;\nexports.getPreferredMessageProtocolVersion = getPreferredMessageProtocolVersion;\nconst setPreferredMessageProtocolVersion = (version) => {\n preferredMessageProtocolVersion = version;\n};\nexports.setPreferredMessageProtocolVersion = setPreferredMessageProtocolVersion;\n//# sourceMappingURL=message-protocol.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/message-protocol.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ChromeStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\n/**\n * @internalapi\n *\n * A storage that can be used in chrome extensions\n */\nclass ChromeStorage {\n static isSupported() {\n return __awaiter(this, void 0, void 0, function* () {\n return (typeof chrome !== \'undefined\' &&\n Boolean(chrome) &&\n Boolean(chrome.runtime) &&\n Boolean(chrome.runtime.id) &&\n Boolean(chrome.storage) &&\n Boolean(chrome.storage.local));\n });\n }\n get(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.get(null, (storageContent) => {\n const value = storageContent[key];\n if (value !== undefined) {\n resolve(value);\n }\n else {\n const defaultValue = octez_connect_types_1.defaultValues[key];\n if (typeof defaultValue === \'object\') {\n resolve(JSON.parse(JSON.stringify(defaultValue)));\n }\n else {\n resolve(defaultValue);\n }\n }\n });\n });\n });\n }\n set(key, value) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.set({ [key]: value }, () => {\n resolve();\n });\n });\n });\n }\n delete(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => {\n chrome.storage.local.set({ [key]: undefined }, () => {\n resolve();\n });\n });\n });\n }\n subscribeToStorageChanged(_callback) {\n return __awaiter(this, void 0, void 0, function* () {\n // TODO\n });\n }\n getPrefixedKey(key) {\n return key;\n }\n}\nexports.ChromeStorage = ChromeStorage;\n//# sourceMappingURL=ChromeStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IndexedDBStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst logger = new Logger_1.Logger('IndexedDBStorage');\nclass IndexedDBStorage extends octez_connect_types_1.Storage {\n /**\n * @param dbName Name of the database.\n * @param storeNames An array of object store names to create in the database.\n * The first store in the array will be used as the default if none is specified.\n */\n constructor(dbName = 'WALLET_CONNECT_V2_INDEXED_DB', storeNames = ['keyvaluestorage']) {\n super();\n this.dbName = dbName;\n this.storeNames = storeNames;\n this.db = null;\n this.isSupported = true;\n this.initDB()\n .then((db) => (this.db = db))\n .catch((err) => logger.error(err.message));\n }\n isIndexedDBSupported() {\n if (typeof window !== 'undefined' && 'indexedDB' in window) {\n logger.log('isIndexedDBSupported', 'IndexedDB is supported in this browser.');\n return true;\n }\n else {\n logger.error('isIndexedDBSupported', 'IndexedDB is not supported in this browser.');\n return false;\n }\n }\n initDB() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n this.isSupported = this.isIndexedDBSupported();\n if (!this.isSupported) {\n reject('IndexedDB is not supported.');\n return;\n }\n const openRequest = indexedDB.open(this.dbName);\n openRequest.onupgradeneeded = () => {\n const db = openRequest.result;\n // Create all required object stores\n this.storeNames.forEach((storeName) => {\n if (!db.objectStoreNames.contains(storeName)) {\n db.createObjectStore(storeName);\n }\n });\n };\n openRequest.onsuccess = (event) => {\n const db = event.target.result;\n // Check if all stores exist – if not, perform an upgrade.\n const missingStores = this.storeNames.filter((storeName) => !db.objectStoreNames.contains(storeName));\n if (missingStores.length > 0) {\n db.close();\n const newVersion = db.version + 1;\n const upgradeRequest = indexedDB.open(this.dbName, newVersion);\n upgradeRequest.onupgradeneeded = () => {\n const upgradedDB = upgradeRequest.result;\n missingStores.forEach((storeName) => {\n if (!upgradedDB.objectStoreNames.contains(storeName)) {\n upgradedDB.createObjectStore(storeName);\n }\n });\n };\n upgradeRequest.onsuccess = (event) => {\n this.db = event.target.result;\n resolve(this.db);\n };\n upgradeRequest.onerror = (event) => reject(event.target.error);\n }\n else {\n this.db = db;\n resolve(db);\n }\n };\n openRequest.onerror = (event) => reject(event.target.error);\n });\n });\n }\n /**\n * Performs a transaction on the given object store.\n * @param mode Transaction mode.\n * @param storeName The name of the object store.\n * @param operation The operation to perform with the object store.\n */\n transaction(mode, storeName, operation) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n var _a;\n if (!this.isSupported) {\n reject('IndexedDB is not supported.');\n return;\n }\n if (!((_a = this.db) === null || _a === void 0 ? void 0 : _a.objectStoreNames.contains(storeName))) {\n reject(`${storeName} not found. error: ${new Error().stack}`);\n return;\n }\n const transaction = this.db.transaction(storeName, mode);\n const objectStore = transaction.objectStore(storeName);\n operation(objectStore).then(resolve).catch(reject);\n });\n });\n }\n get(key, storeName = this.storeNames[0]) {\n return this.transaction('readonly', storeName, (store) => new Promise((resolve, reject) => {\n const getRequest = store.get(key);\n getRequest.onsuccess = () => resolve(getRequest.result);\n getRequest.onerror = () => reject(getRequest.error);\n }));\n }\n set(key, value, storeName = this.storeNames[0]) {\n return this.transaction('readwrite', storeName, (store) => new Promise((resolve, reject) => {\n const putRequest = store.put(value, key);\n putRequest.onsuccess = () => resolve();\n putRequest.onerror = () => reject(putRequest.error);\n }));\n }\n delete(key, storeName = this.storeNames[0]) {\n return this.transaction('readwrite', storeName, (store) => new Promise((resolve, reject) => {\n const deleteRequest = store.delete(key);\n deleteRequest.onsuccess = () => resolve();\n deleteRequest.onerror = () => reject(deleteRequest.error);\n }));\n }\n /**\n * Retrieves all values from the specified object store.\n */\n getAll(storeName) {\n return this.transaction('readonly', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const getAllRequest = store.getAll();\n getAllRequest.onsuccess = () => resolve(getAllRequest.result);\n getAllRequest.onerror = () => reject(getAllRequest.error);\n }));\n }\n /**\n * Retrieves all keys from the specified object store.\n */\n getAllKeys(storeName) {\n return this.transaction('readonly', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const getAllKeysRequest = store.getAllKeys();\n getAllKeysRequest.onsuccess = () => resolve(getAllKeysRequest.result);\n getAllKeysRequest.onerror = () => reject(getAllKeysRequest.error);\n }));\n }\n /**\n * Clears all entries from the specified object store.\n */\n clearStore(storeName) {\n return this.transaction('readwrite', storeName || this.storeNames[0], (store) => new Promise((resolve, reject) => {\n const clearRequest = store.clear();\n clearRequest.onsuccess = () => resolve();\n clearRequest.onerror = () => reject(clearRequest.error);\n }));\n }\n getPrefixedKey(key) {\n logger.debug('getPrefixedKey', key);\n throw new Error('Method not implemented.');\n }\n subscribeToStorageChanged(callback) {\n logger.debug('subscribeToStorageEvent', callback);\n throw new Error('Method not implemented.');\n }\n /**\n * Copies all key/value pairs from the source store into a target store.\n * @param targetDBName Name of the target database.\n * @param targetStoreName Name of the target object store.\n * @param skipKeys Keys to skip.\n * @param sourceStoreName (Optional) Source store name – defaults to the default store.\n */\n fillStore(targetDBName_1, targetStoreName_1) {\n return __awaiter(this, arguments, void 0, function* (targetDBName, targetStoreName, skipKeys = [], sourceStoreName = this.storeNames[0]) {\n if (!this.isSupported) {\n logger.error('fillStore', 'IndexedDB not supported.');\n return;\n }\n const targetDBRequest = indexedDB.open(targetDBName);\n targetDBRequest.onerror = (event) => {\n throw new Error(`Failed to open target database: ${event.target.error}`);\n };\n const targetDB = yield new Promise((resolve, reject) => {\n targetDBRequest.onsuccess = (event) => resolve(event.target.result);\n targetDBRequest.onerror = (event) => reject(event.target.error);\n });\n // Copy items from the source store to the target store, skipping any specified keys.\n yield this.transaction('readonly', sourceStoreName, (sourceStore) => __awaiter(this, void 0, void 0, function* () {\n const getAllRequest = sourceStore.getAll();\n const getAllKeysRequest = sourceStore.getAllKeys();\n getAllRequest.onsuccess = () => __awaiter(this, void 0, void 0, function* () {\n getAllKeysRequest.onsuccess = () => __awaiter(this, void 0, void 0, function* () {\n const items = getAllRequest.result;\n const keys = getAllKeysRequest.result;\n if (!targetDB.objectStoreNames.contains(targetStoreName)) {\n logger.error(`${targetStoreName} not found. ${new Error().stack}`);\n return;\n }\n const targetTransaction = targetDB.transaction(targetStoreName, 'readwrite');\n const targetStore = targetTransaction.objectStore(targetStoreName);\n keys\n .filter((key) => !skipKeys.includes(key.toString()))\n .forEach((key, index) => {\n targetStore.put(items[index], key);\n });\n targetTransaction.onerror = (event) => {\n logger.error('Transaction error: ', event.target.error);\n };\n });\n });\n getAllKeysRequest.onerror = () => {\n logger.error('Failed to getAllKeys from source:', getAllKeysRequest.error);\n };\n getAllRequest.onerror = () => {\n logger.error('Failed to getAll from source:', getAllRequest.error);\n };\n }));\n });\n }\n}\nexports.IndexedDBStorage = IndexedDBStorage;\n//# sourceMappingURL=IndexedDBStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.LocalStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\n/**\n * @internalapi\n *\n * A storage that can be used in the browser\n */\nclass LocalStorage extends octez_connect_types_1.Storage {\n constructor(prefix) {\n super();\n this.prefix = prefix;\n }\n static isSupported() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(Boolean(typeof window !== 'undefined') && Boolean(window.localStorage));\n });\n }\n get(key) {\n return __awaiter(this, void 0, void 0, function* () {\n const value = localStorage.getItem(this.getPrefixedKey(key));\n if (!value) {\n if (typeof octez_connect_types_1.defaultValues[key] === 'object') {\n return JSON.parse(JSON.stringify(octez_connect_types_1.defaultValues[key]));\n }\n else {\n return octez_connect_types_1.defaultValues[key];\n }\n }\n else {\n try {\n return JSON.parse(value);\n }\n catch (jsonParseError) {\n return value; // TODO: Validate storage\n }\n }\n });\n }\n set(key, value) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof value === 'string') {\n return localStorage.setItem(this.getPrefixedKey(key), value);\n }\n else {\n return localStorage.setItem(this.getPrefixedKey(key), JSON.stringify(value));\n }\n });\n }\n delete(key) {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(localStorage.removeItem(this.getPrefixedKey(key)));\n });\n }\n subscribeToStorageChanged(callback) {\n return __awaiter(this, void 0, void 0, function* () {\n window.addEventListener('storage', (event) => {\n if (!event.key) {\n callback({\n eventType: 'storageCleared',\n key: null,\n oldValue: null,\n newValue: null\n });\n }\n else {\n callback({\n eventType: 'entryModified',\n key: this.getPrefixedKey(event.key),\n oldValue: event.oldValue,\n newValue: event.newValue\n });\n }\n }, false);\n });\n }\n getPrefixedKey(key) {\n return this.prefix ? `${this.prefix}-${key}` : key;\n }\n}\nexports.LocalStorage = LocalStorage;\n//# sourceMappingURL=LocalStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.StorageValidator = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nclass StorageValidator {\n constructor(storage) {\n this.storage = storage;\n }\n validateNumber(param) {\n return typeof param === 'number' && !isNaN(param);\n }\n validateText(param) {\n return typeof param === 'string';\n }\n validateBoolean(param) {\n return typeof param === 'boolean';\n }\n validateArray(param) {\n return Array.isArray(param);\n }\n objHasProperty(obj, path) {\n if (!obj)\n return false; // Return false if the object is null or undefined\n const properties = path.split('.'); // Split the path into individual properties\n let current = obj;\n for (const property of properties) {\n // If the property doesn't exist, return false\n if (!current.hasOwnProperty(property)) {\n return false;\n }\n // Move to the next level in the path\n current = current[property];\n }\n return true;\n }\n innerValidate(value, type, prop) {\n if (!value) {\n return true;\n }\n switch (type) {\n case 'num':\n return this.validateNumber(value);\n case 'str':\n return this.validateText(value);\n case 'bol':\n return this.validateBoolean(value);\n case 'obj':\n return this.objHasProperty(value, prop);\n case 'arr':\n return this.validateArray(value);\n default:\n return false;\n }\n }\n validate() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.BEACON_SDK_VERSION), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.MULTI_NODE_SETUP_DONE), 'bol')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_WALLET), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.ACCOUNTS), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.APP_METADATA_LIST), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.PERMISSION_LIST), 'arr')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.ACTIVE_ACCOUNT), 'str')) {\n return false;\n }\n if (!this.innerValidate(yield this.storage.get(octez_connect_types_1.StorageKey.LAST_SELECTED_WALLET), 'obj', 'key')) {\n return false;\n }\n return true;\n });\n }\n}\nexports.StorageValidator = StorageValidator;\n//# sourceMappingURL=StorageValidator.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/StorageValidator.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.WCStorage = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst LocalStorage_1 = __webpack_require__(/*! ./LocalStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js\");\nconst IndexedDBStorage_1 = __webpack_require__(/*! ./IndexedDBStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/IndexedDBStorage.js\");\nclass WCStorage {\n constructor() {\n this.localStorage = new LocalStorage_1.LocalStorage();\n this.indexedDB = new IndexedDBStorage_1.IndexedDBStorage();\n this.channel = new BroadcastChannel('WALLET_CONNECT_V2_INDEXED_DB');\n this.channel.onmessage = this.onMessage.bind(this);\n this.channel.onmessageerror = this.onError.bind(this);\n }\n onMessage(message) {\n this.onMessageHandler && this.onMessageHandler(message.data.type);\n }\n onError({ data }) {\n this.onErrorHandler && this.onErrorHandler(data);\n }\n notify(type) {\n var _a;\n (_a = this.channel) === null || _a === void 0 ? void 0 : _a.postMessage({ type });\n }\n hasPairings() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const pairings = (_a = (yield this.indexedDB.get(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING))) !== null && _a !== void 0 ? _a : '[]';\n if (pairings.length) {\n return true;\n }\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n return ((_b = (yield this.localStorage.get(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING))) !== null && _b !== void 0 ? _b : '[]') !== '[]';\n }\n return false;\n });\n }\n hasSessions() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n const sessions = (_a = (yield this.indexedDB.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION))) !== null && _a !== void 0 ? _a : '[]';\n if (sessions.length) {\n return true;\n }\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n return ((_b = (yield this.localStorage.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION))) !== null && _b !== void 0 ? _b : '[]') !== '[]';\n }\n return false;\n });\n }\n backup() {\n this.indexedDB\n .fillStore('beacon', 'bug_report', [octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN])\n .catch((error) => console.error(error.message));\n }\n resetState() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.indexedDB.clearStore();\n if (yield LocalStorage_1.LocalStorage.isSupported()) {\n yield Promise.all([\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_PAIRING),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_MESSAGES),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CLIENT_PROPOSAL),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_SUBSCRIPTION),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_HISTORY),\n this.localStorage.delete(octez_connect_types_1.StorageKey.WC_2_CORE_EXPIRER)\n ]);\n }\n });\n }\n}\nexports.WCStorage = WCStorage;\n//# sourceMappingURL=WCStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/WCStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStorage = void 0;\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst ChromeStorage_1 = __webpack_require__(/*! ./ChromeStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/ChromeStorage.js\");\nconst LocalStorage_1 = __webpack_require__(/*! ./LocalStorage */ \"./packages/octez.connect-core/dist/cjs/src/storage/LocalStorage.js\");\nconst logger = new Logger_1.Logger('STORAGE');\n/**\n * Get a supported storage on this platform\n */\nconst getStorage = () => __awaiter(void 0, void 0, void 0, function* () {\n if (yield ChromeStorage_1.ChromeStorage.isSupported()) {\n logger.log('getStorage', 'USING CHROME STORAGE');\n return new ChromeStorage_1.ChromeStorage();\n }\n else if (yield LocalStorage_1.LocalStorage.isSupported()) {\n logger.log('getStorage', 'USING LOCAL STORAGE');\n return new LocalStorage_1.LocalStorage();\n }\n else {\n throw new Error('no storage type supported');\n }\n});\nexports.getStorage = getStorage;\n//# sourceMappingURL=getStorage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/storage/getStorage.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/transports/Transport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Transport = void 0;\nconst Logger_1 = __webpack_require__(/*! ../utils/Logger */ \"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new Logger_1.Logger('Transport');\n/**\n * @internalapi\n *\n *\n */\nclass Transport {\n setEventHandler(event, fun) {\n this.client.eventHandlers.set(event, fun);\n }\n /**\n * Return the status of the connection\n */\n get connectionStatus() {\n return this._isConnected;\n }\n constructor(name, client, peerManager) {\n /**\n * The type of the transport\n */\n this.type = octez_connect_types_1.TransportType.POST_MESSAGE;\n /**\n * The status of the transport\n */\n this._isConnected = octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n /**\n * The listeners that will be notified when new messages are coming in\n */\n this.listeners = [];\n this.name = name;\n this.client = client;\n this.peerManager = peerManager;\n }\n /**\n * Returns a promise that resolves to true if the transport is available, false if it is not\n */\n static isAvailable() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(false);\n });\n }\n /**\n * Connect the transport\n */\n connect() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('connect');\n this._isConnected = octez_connect_types_1.TransportStatus.CONNECTED;\n return;\n });\n }\n /**\n * Disconnect the transport\n */\n disconnect() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('disconnect');\n this._isConnected = octez_connect_types_1.TransportStatus.NOT_CONNECTED;\n return;\n });\n }\n /**\n * Send a message through the transport\n *\n * @param message The message to send\n * @param recipient The recipient of the message\n */\n send(message, peer) {\n return __awaiter(this, void 0, void 0, function* () {\n if (peer) {\n return this.client.sendMessage(message, peer);\n }\n else {\n const knownPeers = yield this.getPeers();\n // A broadcast request has to be sent everywhere.\n const promises = knownPeers.map((peerEl) => this.client.sendMessage(message, peerEl));\n return (yield Promise.all(promises))[0];\n }\n });\n }\n /**\n * Add a listener to be called when a new message is received\n *\n * @param listener The listener that will be registered\n */\n addListener(listener) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.debug('addListener');\n this.listeners.push(listener);\n return;\n });\n }\n /**\n * Remove a listener\n *\n * @param listener\n */\n removeListener(listener) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removeListener');\n this.listeners = this.listeners.filter((element) => element !== listener);\n return;\n });\n }\n getPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.peerManager.getPeers(); // TODO: Fix type\n });\n }\n addPeer(newPeer_1) {\n return __awaiter(this, arguments, void 0, function* (newPeer, _sendPairingResponse = true) {\n logger.log('addPeer', 'adding peer', newPeer);\n yield this.peerManager.addPeer(newPeer); // TODO: Fix type\n yield this.listen(newPeer.publicKey);\n });\n }\n removePeer(peerToBeRemoved) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removePeer', 'removing peer', peerToBeRemoved);\n yield this.peerManager.removePeer(peerToBeRemoved.publicKey);\n if (this.client) {\n yield this.client.unsubscribeFromEncryptedMessage(peerToBeRemoved.publicKey);\n }\n });\n }\n removeAllPeers() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('removeAllPeers');\n yield this.peerManager.removeAllPeers();\n if (this.client) {\n yield this.client.unsubscribeFromEncryptedMessages();\n }\n });\n }\n /**\n * Notify the listeners when a new message comes in\n *\n * @param message Message\n * @param connectionInfo Context info about the connection\n */\n notifyListeners(message, connectionInfo) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.listeners.length === 0) {\n logger.warn('notifyListeners', '0 listeners notified!', this);\n }\n else {\n logger.log('notifyListeners', `Notifying ${this.listeners.length} listeners`, this);\n }\n this.listeners.forEach((listener) => {\n listener(message, connectionInfo);\n });\n return;\n });\n }\n}\nexports.Transport = Transport;\n//# sourceMappingURL=Transport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/Transport.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.CommunicationClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst x25519_session_1 = __webpack_require__(/*! @stablelib/x25519-session */ "./node_modules/@stablelib/x25519-session/lib/x25519-session.js");\n/**\n * @internalapi\n *\n *\n */\nclass CommunicationClient {\n constructor(keyPair) {\n this.keyPair = keyPair;\n this.eventHandlers = new Map();\n // todo move OS\n this.isMobileOS = () => /(Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet|Windows Phone|SymbianOS|Kindle)/i.test(navigator.userAgent);\n }\n /**\n * Get the public key\n */\n getPublicKey() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n return (0, octez_connect_utils_1.toHex)((_a = this.keyPair) === null || _a === void 0 ? void 0 : _a.publicKey);\n });\n }\n /**\n * get the public key hash\n */\n getPublicKeyHash() {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, octez_connect_utils_1.getHexHash)(this.keyPair.publicKey);\n });\n }\n /**\n * Create a cryptobox server\n *\n * @param otherPublicKey\n * @param selfKeypair\n */\n createCryptoBoxServer(otherPublicKey, selfKeypair) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, x25519_session_1.serverSessionKeys)({\n publicKey: (0, octez_connect_utils_1.convertPublicKeyToX25519)(selfKeypair.publicKey),\n secretKey: (0, octez_connect_utils_1.convertSecretKeyToX25519)(selfKeypair.secretKey)\n }, (0, octez_connect_utils_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey, \'hex\')));\n });\n }\n /**\n * Create a cryptobox client\n *\n * @param otherPublicKey\n * @param selfKeypair\n */\n createCryptoBoxClient(otherPublicKey, selfKeypair) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, x25519_session_1.clientSessionKeys)({\n publicKey: (0, octez_connect_utils_1.convertPublicKeyToX25519)(selfKeypair.publicKey),\n secretKey: (0, octez_connect_utils_1.convertSecretKeyToX25519)(selfKeypair.secretKey)\n }, (0, octez_connect_utils_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey, \'hex\')));\n });\n }\n /**\n * Encrypt a message for a specific publicKey (receiver, asymmetric)\n *\n * @param recipientPublicKey\n * @param message\n */\n encryptMessageAsymmetric(recipientPublicKey, message) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, octez_connect_utils_1.sealCryptobox)(message, Buffer.from(recipientPublicKey, \'hex\'));\n });\n }\n}\nexports.CommunicationClient = CommunicationClient;\n//# sourceMappingURL=CommunicationClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MessageBasedClient = void 0;\nconst constants_1 = __webpack_require__(/*! ../../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst message_protocol_1 = __webpack_require__(/*! ../../message-protocol */ "./packages/octez.connect-core/dist/cjs/src/message-protocol.js");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst CommunicationClient_1 = __webpack_require__(/*! ./CommunicationClient */ "./packages/octez.connect-core/dist/cjs/src/transports/clients/CommunicationClient.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\n/**\n * @internalapi\n *\n *\n */\nclass MessageBasedClient extends CommunicationClient_1.CommunicationClient {\n constructor(name, keyPair) {\n super(keyPair);\n this.name = name;\n this.init().catch(console.error);\n }\n /**\n * start the client and make sure all dependencies are ready\n */\n start() {\n return __awaiter(this, void 0, void 0, function* () {\n yield Promise.resolve();\n });\n }\n /**\n * Get the pairing request information. This will be shared with the peer during the connection setup\n */\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n return new octez_connect_types_1.PostMessagePairingRequest(yield (0, octez_connect_utils_1.generateGUID)(), this.name, yield this.getPublicKey(), constants_1.BEACON_VERSION, (0, message_protocol_1.getPreferredMessageProtocolVersion)());\n });\n }\n /**\n * Get the pairing response information. This will be shared with the peer during the connection setup\n */\n getPairingResponseInfo(request) {\n return __awaiter(this, void 0, void 0, function* () {\n return new octez_connect_types_1.PostMessagePairingResponse(request.id, this.name, yield this.getPublicKey(), request.version, (0, message_protocol_1.getPreferredMessageProtocolVersion)());\n });\n }\n /**\n * Unsubscribe from encrypted messages from a specific peer\n *\n * @param senderPublicKey\n */\n unsubscribeFromEncryptedMessage(senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const listener = this.activeListeners.get(senderPublicKey);\n if (!listener) {\n return;\n }\n this.activeListeners.delete(senderPublicKey);\n });\n }\n /**\n * Unsubscribe from all encrypted messages\n */\n unsubscribeFromEncryptedMessages() {\n return __awaiter(this, void 0, void 0, function* () {\n this.activeListeners.clear();\n });\n }\n /**\n * Decrypt a message from a specific peer\n *\n * @param senderPublicKey\n * @param payload\n */\n decryptMessage(senderPublicKey, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxServer(senderPublicKey, this.keyPair);\n const hexPayload = Buffer.from(payload, \'hex\');\n if (hexPayload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n return yield (0, octez_connect_utils_1.decryptCryptoboxPayload)(hexPayload, sharedKey.receive);\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n throw new Error(\'Could not decrypt message\');\n });\n }\n /**\n * Encrypt a message for a specific publicKey (receiver)\n *\n * @param recipientPublicKey\n * @param message\n */\n encryptMessage(recipientPublicKey, message) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxClient(recipientPublicKey, this.keyPair);\n return (0, octez_connect_utils_1.encryptCryptoboxPayload)(message, sharedKey.send);\n });\n }\n}\nexports.MessageBasedClient = MessageBasedClient;\n//# sourceMappingURL=MessageBasedClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/transports/clients/MessageBasedClient.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/Logger.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getLogger = exports.setLogger = exports.Logger = exports.InternalLogger = void 0;\nconst debug_1 = __webpack_require__(/*! ../debug */ \"./packages/octez.connect-core/dist/cjs/src/debug.js\");\n/**\n * The logger that is used internally\n */\nclass InternalLogger {\n constructor() { }\n debug(name, method, ...args) {\n this._log('debug', name, method, args);\n }\n log(name, method, ...args) {\n this._log('log', name, method, args);\n }\n warn(name, method, ...args) {\n this._log('warn', name, method, args);\n }\n error(name, method, ...args) {\n this._log('error', name, method, args);\n }\n time(start, label) {\n start ? console.time(label) : console.timeEnd(label);\n }\n timeLog(name, method, ...args) {\n this._log('timeLog', name, method, args);\n }\n _log(type, name, method, args = []) {\n if (!(0, debug_1.getDebugEnabled)()) {\n return;\n }\n let groupText = `[BEACON] ${new Date().toISOString()} [${name}](${method})`;\n let data = args;\n if (args[0] && typeof args[0] === 'string') {\n groupText += ` ${args[0]}`;\n data = args.slice(1);\n }\n switch (type) {\n case 'error':\n console.group(groupText);\n console.error(...data);\n break;\n case 'warn':\n console.group(groupText);\n console.warn(...data);\n break;\n case 'debug':\n console.groupCollapsed(groupText);\n console.debug(...data);\n break;\n case 'timeLog':\n console.group(groupText);\n console.timeLog(...data);\n break;\n default:\n console.group(groupText);\n console.log(...data);\n }\n console.groupEnd();\n // echo.group(echo.asWarning(`[BEACON] ${message}`))\n // echo.log(echo.asWarning(`[${this.name}]`), echo.asAlert(`(${method})`), ...args)\n // echo.groupEnd()\n }\n}\nexports.InternalLogger = InternalLogger;\nclass Logger {\n constructor(service) {\n this.name = service;\n }\n debug(method, ...args) {\n logger.debug(this.name, method, args);\n }\n log(method, ...args) {\n logger.log(this.name, method, args);\n }\n warn(method, ...args) {\n logger.warn(this.name, method, args);\n }\n error(method, ...args) {\n logger.error(this.name, method, args);\n }\n time(start, label) {\n logger.time(start, label);\n }\n timeLog(method, ...args) {\n logger.timeLog(method, args);\n }\n}\nexports.Logger = Logger;\nconst loggerWrapper = new Logger('');\nlet logger = new InternalLogger();\nconst setLogger = (newLogger) => {\n logger = newLogger;\n};\nexports.setLogger = setLogger;\nconst getLogger = () => loggerWrapper;\nexports.getLogger = getLogger;\n//# sourceMappingURL=Logger.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/Logger.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js"(__unused_webpack_module,exports){"use strict";eval('{\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.assertNever = assertNever;\n/**\n * Exhaustiveness guard for if/else chains and switch/cases.\n *\n * Compile time: passing anything but `never` is a type error, so adding a new\n * union member without handling it fails to build. Runtime: an untrusted value\n * (e.g. an unknown message or error type from the wire) can still reach the\n * default branch, so throw an actionable error naming that value instead of\n * silently returning — callers previously received `undefined` and failed\n * later with no context.\n *\n * @param empty The value that should be unreachable\n */\nfunction assertNever(empty) {\n var _a;\n let repr;\n try {\n repr = (_a = JSON.stringify(empty)) !== null && _a !== void 0 ? _a : String(empty);\n }\n catch (_b) {\n repr = String(empty);\n }\n if (repr.length > 200) {\n repr = `${repr.slice(0, 200)}…`;\n }\n throw new Error(`assertNever: reached unreachable case with unexpected value: ${repr}`);\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=assert-never.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/assert-never.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/caip2.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.networkTypeFromTezosCaip2 = exports.tezosCaip2FromNetworkType = exports.TEZOS_NETWORK_GENESIS_IDS = exports.networkFromTezosCaip2 = exports.isValidTezosCaip2 = exports.normalizeTezosCaip2 = void 0;\n/**\n * CAIP-2 chain id helpers, scoped to the Tezos namespace (`tezos:<reference>`).\n *\n * The wire format accepts both the bare reference (`NetXsqzbfFenSTS`) and the\n * full CAIP-2 string (`tezos:NetXsqzbfFenSTS`); SDK code consistently stores\n * and routes on the full form.\n */\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst TEZOS_CAIP2_PREFIX = 'tezos:';\nconst TEZOS_CAIP2_RE = /^tezos:[A-Za-z0-9]+$/;\n/**\n * Returns `chainId` with the `tezos:` prefix added if absent. No validation\n * is performed; use `isValidTezosCaip2` at API boundaries.\n */\nconst normalizeTezosCaip2 = (chainId) => chainId.startsWith(TEZOS_CAIP2_PREFIX) ? chainId : `${TEZOS_CAIP2_PREFIX}${chainId}`;\nexports.normalizeTezosCaip2 = normalizeTezosCaip2;\n/**\n * Whether `value` is a syntactically valid Tezos CAIP-2 chain id\n * (`tezos:<alphanumeric reference>`).\n */\nconst isValidTezosCaip2 = (value) => TEZOS_CAIP2_RE.test(value);\nexports.isValidTezosCaip2 = isValidTezosCaip2;\n/**\n * Build the minimal `Network` for a Tezos CAIP-2 chain id. Single source of\n * truth for the `{ type: CUSTOM, chainId, ... }` shape, so the network used\n * to derive an account identifier is constructed identically everywhere\n * (permission storage, operation-request lookup, stale-scheme scan). `name`\n * defaults to the chain id when the wallet supplies no human label.\n */\nconst networkFromTezosCaip2 = (chainId, opts) => {\n var _a;\n return ({\n type: octez_connect_types_1.NetworkType.CUSTOM,\n name: (_a = opts === null || opts === void 0 ? void 0 : opts.name) !== null && _a !== void 0 ? _a : chainId,\n rpcUrl: opts === null || opts === void 0 ? void 0 : opts.rpcUrl,\n chainId\n });\n};\nexports.networkFromTezosCaip2 = networkFromTezosCaip2;\n/**\n * Canonical NetworkType → genesis chain id (CAIP-2 reference) table.\n *\n * Applied ONLY at boundaries that must translate between the named-network\n * vocabulary (WalletConnect session namespaces use `tezos:<name>`) and the\n * genesis-keyed CAIP-2 vocabulary of the beacon v4 multi-network protocol.\n *\n * Sourcing rule: ids are read from the network's own RPC\n * (`/chains/main/chain_id`) and locked by unit test — never guessed. Networks\n * without an entry are not statically mappable and multi-network requests for\n * them can only travel over transports that pass chain ids through opaquely\n * (P2P/postmessage):\n * - WEEKLYNET / DAILYNET rotate their genesis on every reset.\n * - CUSTOM has no fixed genesis by definition.\n * - TALLINNNET / SEOULNET / TEZLINK_SHADOWNET / TEZOSX_PREVIEWNET /\n * TEZOSX_SHADOWNET currently publish no queryable RPC in the teztnets\n * registry; add their ids here (RPC-sourced) when available.\n * If a long-running network relaunches with a new genesis, its entry must be\n * updated in the same change that bumps the supported network.\n */\nexports.TEZOS_NETWORK_GENESIS_IDS = {\n [octez_connect_types_1.NetworkType.MAINNET]: 'NetXdQprcVkpaWU',\n [octez_connect_types_1.NetworkType.GHOSTNET]: 'NetXnHfVqm9iesp',\n [octez_connect_types_1.NetworkType.SHADOWNET]: 'NetXsqzbfFenSTS',\n // Tezos X L2 (Michelson runtime) mainnet. Maintainer-supplied id — no\n // public RPC was reachable at the time of adding; re-verify against\n // `/chains/main/chain_id` once one ships.\n [octez_connect_types_1.NetworkType.TEZOSX_MAINNET]: 'NetXohUVN5QWR4f',\n [octez_connect_types_1.NetworkType.USHUAIANET]: 'NetXpX8WSZkAZZA'\n};\n/**\n * Full CAIP-2 chain id (`tezos:NetX…`) for a named network, or `undefined`\n * when the network has no statically known genesis (see\n * {@link TEZOS_NETWORK_GENESIS_IDS}).\n */\nconst tezosCaip2FromNetworkType = (type) => {\n const genesis = exports.TEZOS_NETWORK_GENESIS_IDS[type];\n return genesis === undefined ? undefined : `${TEZOS_CAIP2_PREFIX}${genesis}`;\n};\nexports.tezosCaip2FromNetworkType = tezosCaip2FromNetworkType;\n/**\n * Named network for a CAIP-2 chain id (bare or `tezos:`-prefixed), or\n * `undefined` when the id does not belong to a statically mapped network.\n */\nconst networkTypeFromTezosCaip2 = (chainId) => {\n const normalized = (0, exports.normalizeTezosCaip2)(chainId);\n const reference = normalized.slice(TEZOS_CAIP2_PREFIX.length);\n return Object.keys(exports.TEZOS_NETWORK_GENESIS_IDS).find((type) => exports.TEZOS_NETWORK_GENESIS_IDS[type] === reference);\n};\nexports.networkTypeFromTezosCaip2 = networkTypeFromTezosCaip2;\n//# sourceMappingURL=caip2.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/caip2.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.SENSITIVE_STORAGE_KEYS = void 0;\nexports.gatherDiagnostics = gatherDiagnostics;\nexports.buildErrorContext = buildErrorContext;\nexports.serializeErrorContext = serializeErrorContext;\nexports.copyErrorContextToClipboard = copyErrorContextToClipboard;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst package_json_1 = __importDefault(__webpack_require__(/*! ../../package.json */ \"./packages/octez.connect-core/dist/cjs/package.json\"));\nconst BeaconError_1 = __webpack_require__(/*! ../errors/BeaconError */ \"./packages/octez.connect-core/dist/cjs/src/errors/BeaconError.js\");\n/**\n * Storage keys that contain sensitive information and should be filtered out\n */\nexports.SENSITIVE_STORAGE_KEYS = [\n octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED,\n octez_connect_types_1.StorageKey.WC_2_CORE_KEYCHAIN,\n octez_connect_types_1.StorageKey.PUSH_TOKENS\n];\n/**\n * Gathers diagnostic information from storage for error reporting.\n * Automatically filters sensitive keys for privacy.\n *\n * @param storage - The storage instance to read from\n * @param transport - Optional transport type being used\n * @returns Promise resolving to diagnostic snapshot\n */\nfunction gatherDiagnostics(storage, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n try {\n // Get SDK version\n const sdkVersion = package_json_1.default.version;\n // Get active account\n const activeAccountValue = yield storage.get(octez_connect_types_1.StorageKey.ACTIVE_ACCOUNT);\n const activeAccount = typeof activeAccountValue === 'string'\n ? activeAccountValue\n : activeAccountValue && typeof activeAccountValue === 'object'\n ? (_a = activeAccountValue.accountIdentifier) !== null && _a !== void 0 ? _a : activeAccountValue.address\n : undefined;\n // Get last selected wallet\n const lastSelectedWalletValue = yield storage.get(octez_connect_types_1.StorageKey.LAST_SELECTED_WALLET);\n const lastSelectedWallet = lastSelectedWalletValue && typeof lastSelectedWalletValue === 'object'\n ? (_b = lastSelectedWalletValue.name) !== null && _b !== void 0 ? _b : lastSelectedWalletValue.key\n : typeof lastSelectedWalletValue === 'string'\n ? lastSelectedWalletValue\n : undefined;\n // Get accounts count\n const accounts = yield storage.get(octez_connect_types_1.StorageKey.ACCOUNTS);\n const accountCount = Array.isArray(accounts) ? accounts.length : 0;\n // Get peers count (try different storage keys based on transport)\n let peerCount = 0;\n try {\n const p2pPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP);\n const wcPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP);\n const pmPeers = yield storage.get(octez_connect_types_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP);\n peerCount =\n (Array.isArray(p2pPeers) ? p2pPeers.length : 0) +\n (Array.isArray(wcPeers) ? wcPeers.length : 0) +\n (Array.isArray(pmPeers) ? pmPeers.length : 0);\n }\n catch (_c) {\n // Ignore peer count errors\n }\n // Get WalletConnect session info if applicable\n let walletConnectSession;\n if (transport === octez_connect_types_1.TransportType.WALLETCONNECT) {\n try {\n const wcSession = yield storage.get(octez_connect_types_1.StorageKey.WC_2_CLIENT_SESSION);\n if (wcSession && typeof wcSession === 'object') {\n const sessionData = wcSession;\n // Extract relevant session info safely\n walletConnectSession = {\n topic: typeof sessionData.topic === 'string' ? sessionData.topic : undefined,\n expiry: typeof sessionData.expiry === 'number' ? sessionData.expiry : undefined,\n accounts: Array.isArray(sessionData.accounts) && sessionData.accounts.every((a) => typeof a === 'string')\n ? sessionData.accounts\n : undefined,\n networks: undefined, // Would need to extract from namespaces\n permissions: undefined // Would need to extract from namespaces\n };\n }\n }\n catch (_d) {\n // Ignore WC session errors\n }\n }\n // Gather additional non-sensitive storage data\n const storageData = {};\n const keysToInclude = [\n octez_connect_types_1.StorageKey.BEACON_SDK_VERSION,\n octez_connect_types_1.StorageKey.WC_INIT_ERROR,\n octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE,\n octez_connect_types_1.StorageKey.PERMISSION_LIST\n ];\n for (const key of keysToInclude) {\n try {\n const value = yield storage.get(key);\n if (value !== undefined) {\n storageData[key] = value;\n }\n }\n catch (_e) {\n // Ignore individual key errors\n }\n }\n return {\n sdkVersion,\n transport,\n activeAccount,\n lastSelectedWallet,\n walletConnectSession,\n accountCount,\n peerCount,\n storage: Object.keys(storageData).length > 0 ? storageData : undefined\n };\n }\n catch (error) {\n // If diagnostic gathering fails, return minimal info\n return {\n sdkVersion: package_json_1.default.version,\n transport\n };\n }\n });\n}\n/**\n * Builds a complete error context from an error and storage state.\n *\n * @param error - The BeaconError or Error instance\n * @param storage - The storage instance to read diagnostic data from\n * @param transport - Optional transport type being used\n * @returns Promise resolving to complete error context\n */\nfunction buildErrorContext(error, storage, transport) {\n return __awaiter(this, void 0, void 0, function* () {\n const diagnostics = yield gatherDiagnostics(storage, transport);\n // If it's a BeaconError, we have structured information\n if (error instanceof BeaconError_1.BeaconError) {\n const errorData = error.data;\n // Prefer transport-specific error code from errorData if available\n const errorDataObj = errorData && typeof errorData === 'object' ? errorData : undefined;\n const errorCode = (errorDataObj && typeof errorDataObj.errorCode === 'string')\n ? errorDataObj.errorCode\n : error.code;\n return {\n errorCode,\n errorType: error.type,\n message: error.title || error.message,\n technicalDetails: error.description,\n errorData,\n timestamp: Date.now(),\n diagnostics\n };\n }\n // For generic errors, create basic context\n return {\n errorCode: 'UNKNOWN_ERROR',\n errorType: octez_connect_types_1.BeaconErrorType.UNKNOWN_ERROR,\n message: error.message || 'An unknown error occurred',\n timestamp: Date.now(),\n diagnostics\n };\n });\n}\n/**\n * Serializes error context to formatted JSON string for copying.\n *\n * @param errorContext - The error context to serialize\n * @returns Formatted JSON string\n */\nfunction serializeErrorContext(errorContext) {\n return JSON.stringify(errorContext, null, 2);\n}\n/**\n * Copies error context to clipboard (browser only).\n *\n * @param errorContext - The error context to copy\n * @returns Promise resolving to true if successful, false otherwise\n */\nfunction copyErrorContextToClipboard(errorContext) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const jsonString = serializeErrorContext(errorContext);\n if (typeof navigator !== 'undefined' && ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText)) {\n yield navigator.clipboard.writeText(jsonString);\n return true;\n }\n return false;\n }\n catch (_b) {\n return false;\n }\n });\n}\n//# sourceMappingURL=diagnostics.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/diagnostics.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getAccountIdentifier = void 0;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ "./node_modules/@stablelib/utf8/lib/utf8.js");\n/**\n * @internalapi\n *\n * Generate a deterministic account identifier based on an address and a network\n *\n * @param address\n * @param network\n */\nconst getAccountIdentifier = (address, network) => __awaiter(void 0, void 0, void 0, function* () {\n // v4 multi-network accounts carry a CAIP-2 chainId. Key the identifier on\n // (address, chainId) alone: chainId is the canonical, stable network key,\n // whereas the human-facing `name`/`rpcUrl` differ between the wallet\'s\n // permission response and the dApp\'s later operation requests. Including\n // them would make the persisted identifier irreproducible at lookup time\n // (and collapse distinct chains that happen to share a name). Legacy\n // accounts (no chainId) keep the original scheme so their already-persisted\n // identifiers are unchanged.\n const data = [];\n if (network.chainId) {\n data.push(address, `chainId:${network.chainId}`);\n }\n else {\n data.push(address, network.type);\n if (network.name) {\n data.push(`name:${network.name}`);\n }\n if (network.rpcUrl) {\n data.push(`rpc:${network.rpcUrl}`);\n }\n }\n const buffer = Buffer.from((0, blake2b_1.hash)((0, utf8_1.encode)(data.join(\'-\')), 10));\n return bs58check_1.default.encode(buffer);\n});\nexports.getAccountIdentifier = getAccountIdentifier;\n//# sourceMappingURL=get-account-identifier.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/get-account-identifier.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.getSenderId = void 0;\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ "./node_modules/bs58check/src/cjs/index.cjs"));\nconst isHex = (str) => /^[A-F0-9]+$/i.test(str);\n/**\n * @internalapi\n *\n * Generate a deterministic sender identifier based on a public key\n *\n * @param publicKey\n */\nconst getSenderId = (publicKey) => __awaiter(void 0, void 0, void 0, function* () {\n if (!isHex(publicKey)) {\n console.error(\'PublicKey needs to be in hex format!\');\n }\n const buffer = Buffer.from((0, blake2b_1.hash)(Buffer.from(publicKey, \'hex\'), 5));\n return bs58check_1.default.encode(buffer);\n});\nexports.getSenderId = getSenderId;\n//# sourceMappingURL=get-sender-id.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/get-sender-id.js?\n}')},"./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.buildDisconnectMessage = exports.unwrapBeaconMessage = exports.wrapBeaconMessage = exports.negotiateEnvelopeVersion = exports.LEGACY_ENVELOPE_VERSION = exports.usesWrappedMessages = exports.isMultiNetworkVersion = exports.isAtLeastVersion = exports.compareBeaconVersion = exports.parseStrictDecimalInteger = exports.MULTI_NETWORK_FROM_VERSION = exports.MESSAGE_WRAPPED_FROM_VERSION = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst constants_1 = __webpack_require__(/*! ../constants */ \"./packages/octez.connect-core/dist/cjs/src/constants.js\");\nconst InvalidBeaconVersionError_1 = __webpack_require__(/*! ../errors/InvalidBeaconVersionError */ \"./packages/octez.connect-core/dist/cjs/src/errors/InvalidBeaconVersionError.js\");\nexports.MESSAGE_WRAPPED_FROM_VERSION = 3;\n// peer.version at or above which the multi-network (v4) protocol applies.\nexports.MULTI_NETWORK_FROM_VERSION = '4';\n// Strict decimal-integer: a lone `0` or non-zero digit followed by digits.\n// Rejects leading zeros on multi-digit values (e.g. `'04'`). A lone `0` is\n// kept valid so legacy compat paths can use it as a fallback/unknown version.\nconst DECIMAL_INTEGER_RE = /^(0|[1-9]\\d*)$/;\nconst parseStrictDecimalInteger = (value) => {\n if (typeof value !== 'string') {\n return null;\n }\n if (!DECIMAL_INTEGER_RE.test(value)) {\n return null;\n }\n const parsed = Number(value);\n if (!Number.isFinite(parsed) || parsed > Number.MAX_SAFE_INTEGER) {\n return null;\n }\n return parsed;\n};\nexports.parseStrictDecimalInteger = parseStrictDecimalInteger;\n/**\n * Compare two `peer.version` strings as strict decimal integers.\n *\n * Returns < 0 if `a < b`, 0 if equal, > 0 if `a > b` — same convention as\n * `Array.prototype.sort` comparators.\n *\n * Throws `InvalidBeaconVersionError` if either operand is not a decimal-\n * integer string in `[0, Number.MAX_SAFE_INTEGER]`. Leading signs, leading\n * zeros, decimal points, exponent notation, hex, whitespace, `'NaN'` and\n * `'Infinity'` all reject.\n *\n * @category Utility\n */\nconst compareBeaconVersion = (a, b) => {\n const na = (0, exports.parseStrictDecimalInteger)(a);\n const nb = (0, exports.parseStrictDecimalInteger)(b);\n if (na === null || nb === null) {\n throw new InvalidBeaconVersionError_1.InvalidBeaconVersionError(a, b);\n }\n return na - nb;\n};\nexports.compareBeaconVersion = compareBeaconVersion;\n/**\n * Whether `version` is a valid peer.version at or above `threshold`.\n *\n * Single source of truth for the \"is this peer at least version X\" decision.\n * Returns `false` for an absent version and for any value that fails the\n * strict decimal-integer contract of `compareBeaconVersion` — i.e. malformed\n * or untrusted input is always treated as below the threshold, so a hostile\n * peer cannot trip a higher-version code path.\n *\n * @category Utility\n */\nconst isAtLeastVersion = (version, threshold) => {\n if (version === undefined) {\n return false;\n }\n try {\n return (0, exports.compareBeaconVersion)(version, threshold) >= 0;\n }\n catch (_a) {\n return false;\n }\n};\nexports.isAtLeastVersion = isAtLeastVersion;\n/**\n * Whether `version` is at or above the multi-network (v4) threshold.\n *\n * @category Utility\n */\nconst isMultiNetworkVersion = (version) => (0, exports.isAtLeastVersion)(version, exports.MULTI_NETWORK_FROM_VERSION);\nexports.isMultiNetworkVersion = isMultiNetworkVersion;\nconst usesWrappedMessages = (version) => {\n // Use the same strict decimal-integer contract as compareBeaconVersion so\n // wrapped-message routing agrees with the v4/multi-network routing: a loose\n // value like '3.0', ' 3 ' or '03' (which Number() would accept) is treated\n // as malformed and routed as non-wrapped rather than inconsistently.\n const parsed = (0, exports.parseStrictDecimalInteger)(version);\n return parsed !== null && parsed >= exports.MESSAGE_WRAPPED_FROM_VERSION;\n};\nexports.usesWrappedMessages = usesWrappedMessages;\n/** The flat legacy wire dialect served to peers below the wrapped baseline. */\nexports.LEGACY_ENVELOPE_VERSION = '2';\n/**\n * The envelope version to stamp on an outgoing message for a peer that\n * declared `peerVersion` at pairing: `min(peerVersion, BEACON_VERSION)` with\n * a floor at the flat legacy dialect ('2').\n *\n * This is the backward-compatibility pivot: a peer that declared '2' — or\n * never declared a version at all (legacy pairings, WalletConnect peers,\n * malformed values) — is served the flat v2 dialect it has always spoken; a\n * v3 peer receives '3' wrapped envelopes and never sees v4 payload fields;\n * a v4 peer gets the full wrapped v4 wire. Callers pick the message SHAPE\n * with `usesWrappedMessages(negotiated)` and gate v4 fields (`networks`/\n * `accounts`) on `isMultiNetworkVersion(negotiated)`.\n *\n * @category Utility\n */\nconst negotiateEnvelopeVersion = (peerVersion) => {\n if (!(0, exports.isAtLeastVersion)(peerVersion, String(exports.MESSAGE_WRAPPED_FROM_VERSION))) {\n return exports.LEGACY_ENVELOPE_VERSION;\n }\n return (0, exports.isAtLeastVersion)(peerVersion, constants_1.BEACON_VERSION) ? constants_1.BEACON_VERSION : peerVersion;\n};\nexports.negotiateEnvelopeVersion = negotiateEnvelopeVersion;\n/**\n * Build a wrapped beacon envelope. Single source of truth for the\n * `{ id, version, senderId, message }` wire shape so senders cannot drift.\n *\n * @category Utility\n */\nconst wrapBeaconMessage = (envelope, message) => ({\n id: envelope.id,\n version: envelope.version,\n senderId: envelope.senderId,\n message\n});\nexports.wrapBeaconMessage = wrapBeaconMessage;\n/**\n * Extract the inner payload of a wrapped beacon envelope, or `undefined`\n * when the candidate's version does not follow the wrapped (v3+) contract.\n * Callers must treat `undefined` as \"not a wrapped message\" and drop or\n * tombstone it — never fall back to reading flat fields.\n *\n * @category Utility\n */\nconst unwrapBeaconMessage = (candidate) => ((0, exports.usesWrappedMessages)(candidate.version) ? candidate.message : undefined);\nexports.unwrapBeaconMessage = unwrapBeaconMessage;\n/**\n * Build a disconnect message in the peer's negotiated dialect: a wrapped\n * envelope for v3+ peers, the flat legacy shape for v2 peers. A legacy peer\n * routes on the top-level `type` and would silently ignore a wrapped\n * envelope — the goodbye must be spoken in the dialect the peer parses.\n *\n * @category Utility\n */\nconst buildDisconnectMessage = (envelope, peerVersion) => {\n const version = (0, exports.negotiateEnvelopeVersion)(peerVersion);\n return (0, exports.usesWrappedMessages)(version)\n ? (0, exports.wrapBeaconMessage)({ id: envelope.id, version, senderId: envelope.senderId }, { type: octez_connect_types_1.BeaconMessageType.Disconnect })\n : {\n id: envelope.id,\n version,\n senderId: envelope.senderId,\n type: octez_connect_types_1.BeaconMessageType.Disconnect\n };\n};\nexports.buildDisconnectMessage = buildDisconnectMessage;\n//# sourceMappingURL=message-utils.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MultiTabChannel = void 0;\nconst broadcast_channel_1 = __webpack_require__(/*! broadcast-channel */ \"./node_modules/broadcast-channel/dist/lib/index.es5.js\");\nclass MultiTabChannel {\n constructor(name, onBCMessageHandler, onElectedLeaderHandler) {\n this.eventListeners = [\n () => this.onBeforeUnloadHandler(),\n (message) => this.onMessageHandler(message)\n ];\n // Auxiliary variable needed for handling beforeUnload.\n // Closing a tab causes the elector to be killed immediately\n this.wasLeader = false;\n this.initialized = false;\n this.onBCMessageHandler = onBCMessageHandler;\n this.onElectedLeaderHandler = onElectedLeaderHandler;\n this.channel = new broadcast_channel_1.BroadcastChannel(name);\n this.elector = (0, broadcast_channel_1.createLeaderElection)(this.channel);\n }\n init() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.initialized) {\n return;\n }\n const hasLeader = yield this.elector.hasLeader();\n if (!hasLeader) {\n yield this.elector.awaitLeadership();\n this.wasLeader = this.isLeader();\n }\n this.channel.onmessage = this.eventListeners[1];\n window === null || window === void 0 ? void 0 : window.addEventListener('beforeunload', this.eventListeners[0]);\n this.initialized = true;\n });\n }\n onBeforeUnloadHandler() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.wasLeader) {\n yield this.elector.die();\n this.postMessage({ type: 'LEADER_DEAD' });\n }\n window === null || window === void 0 ? void 0 : window.removeEventListener('beforeunload', this.eventListeners[0]);\n this.channel.removeEventListener('message', this.eventListeners[1]);\n });\n }\n onMessageHandler(message) {\n return __awaiter(this, void 0, void 0, function* () {\n if (message.type === 'LEADER_DEAD') {\n yield this.elector.awaitLeadership();\n this.wasLeader = this.isLeader();\n if (this.isLeader()) {\n this.onElectedLeaderHandler();\n }\n return;\n }\n this.onBCMessageHandler(message);\n });\n }\n isLeader() {\n return this.elector.isLeader;\n }\n getLeadership() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.elector.awaitLeadership();\n });\n }\n hasLeader() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.elector.hasLeader();\n });\n }\n postMessage(message) {\n this.channel.postMessage(message);\n }\n}\nexports.MultiTabChannel = MultiTabChannel;\n//# sourceMappingURL=multi-tab-channel.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/multi-tab-channel.js?\n}")},"./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.resolveRequiredMinimumVersion = exports.DEFAULT_REQUIRED_MINIMUM_VERSION = void 0;\nconst constants_1 = __webpack_require__(/*! ../constants */ "./packages/octez.connect-core/dist/cjs/src/constants.js");\nconst InvalidRequiredMinimumVersionError_1 = __webpack_require__(/*! ../errors/InvalidRequiredMinimumVersionError */ "./packages/octez.connect-core/dist/cjs/src/errors/InvalidRequiredMinimumVersionError.js");\nconst message_utils_1 = __webpack_require__(/*! ./message-utils */ "./packages/octez.connect-core/dist/cjs/src/utils/message-utils.js");\n/**\n * Default minimum wallet version the dApp accepts when the option is omitted.\n *\n * Deliberately the lowest protocol version still supported, so the gate is\n * effectively opt-in: by default every wallet the SDK can talk to (v2/v3/v4)\n * is accepted, preserving backward compatibility. A dApp that needs the v4\n * multi-network protocol sets `requiredMinimumVersion: \'4\'` explicitly.\n */\nexports.DEFAULT_REQUIRED_MINIMUM_VERSION = \'2\';\n/**\n * Resolve a dApp\'s `requiredMinimumVersion` option against the SDK\'s\n * `BEACON_VERSION`. Returns {@link DEFAULT_REQUIRED_MINIMUM_VERSION} when\n * undefined; otherwise validates the supplied value is a decimal-integer\n * string in `[1, BEACON_VERSION]` and returns it unchanged.\n *\n * Throws `InvalidRequiredMinimumVersionError` for any malformed,\n * out-of-range, or future-version input.\n */\nconst resolveRequiredMinimumVersion = (providedValue) => {\n if (providedValue === undefined) {\n return exports.DEFAULT_REQUIRED_MINIMUM_VERSION;\n }\n // Validate against the SAME strict contract compareBeaconVersion enforces,\n // up front, so every rejection here is an InvalidRequiredMinimumVersionError\n // rather than a leaked InvalidBeaconVersionError from the comparison below.\n // Reuse parseStrictDecimalInteger (the single owner of that contract) instead\n // of re-declaring the regex + MAX_SAFE_INTEGER bound here.\n const parsed = (0, message_utils_1.parseStrictDecimalInteger)(providedValue);\n if (parsed === null) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, \'value must be a decimal-integer string (e.g. "3", "4")\');\n }\n if (parsed < 1) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, \'value must be >= 1\');\n }\n if ((0, message_utils_1.compareBeaconVersion)(providedValue, constants_1.BEACON_VERSION) > 0) {\n throw new InvalidRequiredMinimumVersionError_1.InvalidRequiredMinimumVersionError(providedValue, constants_1.BEACON_VERSION, `value cannot exceed the SDK\'s own BEACON_VERSION (${constants_1.BEACON_VERSION})`);\n }\n return providedValue;\n};\nexports.resolveRequiredMinimumVersion = resolveRequiredMinimumVersion;\n//# sourceMappingURL=required-minimum-version.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/src/utils/required-minimum-version.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.P2PTransport = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ "./packages/octez.connect-core/dist/cjs/src/index.js");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst P2PCommunicationClient_1 = __webpack_require__(/*! ./communication-client/P2PCommunicationClient */ "./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js");\nconst logger = new octez_connect_core_1.Logger(\'P2PTransport\');\n/**\n * @internalapi\n *\n *\n */\nclass P2PTransport extends octez_connect_core_1.Transport {\n constructor(name, keyPair, storage, matrixNodes, storageKey, iconUrl, appUrl) {\n super(name, new P2PCommunicationClient_1.P2PCommunicationClient(name, keyPair, 1, storage, matrixNodes, iconUrl, appUrl), new octez_connect_core_1.PeerManager(storage, storageKey));\n this.type = octez_connect_types_1.TransportType.P2P;\n }\n static isAvailable() {\n return __awaiter(this, void 0, void 0, function* () {\n return Promise.resolve(true);\n });\n }\n connect() {\n const _super = Object.create(null, {\n connect: { get: () => super.connect }\n });\n return __awaiter(this, void 0, void 0, function* () {\n if (this._isConnected !== octez_connect_types_1.TransportStatus.NOT_CONNECTED) {\n return;\n }\n logger.log(\'connect\');\n this._isConnected = octez_connect_types_1.TransportStatus.CONNECTING;\n yield this.client.start();\n const knownPeers = yield this.getPeers();\n if (knownPeers.length > 0) {\n logger.log(\'connect\', `connecting to ${knownPeers.length} peers`);\n const connectionPromises = knownPeers.map((peer) => __awaiter(this, void 0, void 0, function* () { return this.listen(peer.publicKey); }));\n Promise.all(connectionPromises).catch((error) => logger.error(\'connect\', error));\n }\n yield this.startOpenChannelListener();\n return _super.connect.call(this);\n });\n }\n disconnect() {\n const _super = Object.create(null, {\n disconnect: { get: () => super.disconnect }\n });\n return __awaiter(this, void 0, void 0, function* () {\n yield this.client.stop();\n return _super.disconnect.call(this);\n });\n }\n startOpenChannelListener() {\n return __awaiter(this, void 0, void 0, function* () {\n //\n });\n }\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.client.getPairingRequestInfo();\n });\n }\n listen(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.client\n .listenForEncryptedMessage(publicKey, (message) => {\n const connectionContext = {\n origin: octez_connect_types_1.Origin.P2P,\n id: publicKey\n };\n this.notifyListeners(message, connectionContext).catch((error) => {\n throw error;\n });\n })\n .catch((error) => {\n throw error;\n });\n });\n }\n}\nexports.P2PTransport = P2PTransport;\n//# sourceMappingURL=P2PTransport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.P2PCommunicationClient = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst MatrixClient_1 = __webpack_require__(/*! ../matrix-client/MatrixClient */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js\");\nconst MatrixClientEvent_1 = __webpack_require__(/*! ../matrix-client/models/MatrixClientEvent */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js\");\nconst MatrixMessage_1 = __webpack_require__(/*! ../matrix-client/models/MatrixMessage */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ \"./node_modules/@stablelib/utf8/lib/utf8.js\");\nconst logger = new octez_connect_core_1.Logger('P2PCommunicationClient');\nconst RESPONSE_WAIT_TIME_MS = 60000; // total wait time for all the probes\nconst REGIONS_AND_SERVERS = {\n [octez_connect_types_1.Regions.EUROPE_WEST]: [\n 'beacon-node-1.octez.io',\n 'beacon-node-2.octez.io',\n 'beacon-node-3.octez.io',\n 'beacon-node-4.octez.io',\n 'beacon-node-5.octez.io',\n 'beacon-node-6.octez.io',\n 'beacon-node-7.octez.io',\n 'beacon-node-8.octez.io'\n ],\n [octez_connect_types_1.Regions.NORTH_AMERICA_EAST]: [],\n [octez_connect_types_1.Regions.NORTH_AMERICA_WEST]: [],\n [octez_connect_types_1.Regions.ASIA_EAST]: [],\n [octez_connect_types_1.Regions.AUSTRALIA]: []\n};\nconst sleep = (time) => {\n return new Promise((resolve) => setTimeout(resolve, time));\n};\n/**\n * @internalapi\n */\nclass P2PCommunicationClient extends octez_connect_core_1.CommunicationClient {\n constructor(name, keyPair, replicationCount, storage, matrixNodes, iconUrl, appUrl) {\n super(keyPair);\n this.name = name;\n this.replicationCount = replicationCount;\n this.storage = storage;\n this.iconUrl = iconUrl;\n this.appUrl = appUrl;\n this.client = new octez_connect_utils_1.ExposedPromise();\n this.activeListeners = new Map();\n this.ignoredRooms = [];\n this.loginCounter = 0;\n logger.log('constructor', 'P2PCommunicationClient created');\n this.ENABLED_RELAY_SERVERS = REGIONS_AND_SERVERS;\n if (matrixNodes) {\n this.ENABLED_RELAY_SERVERS = Object.assign(Object.assign({}, REGIONS_AND_SERVERS), matrixNodes);\n }\n }\n getPairingRequestInfo() {\n return __awaiter(this, void 0, void 0, function* () {\n const info = new octez_connect_types_1.P2PPairingRequest(yield (0, octez_connect_utils_1.generateGUID)(), this.name, yield this.getPublicKey(), octez_connect_core_1.BEACON_VERSION, (yield this.getRelayServer()).server, (0, octez_connect_core_1.getPreferredMessageProtocolVersion)());\n if (this.iconUrl) {\n info.icon = this.iconUrl;\n }\n if (this.appUrl) {\n info.appUrl = this.appUrl;\n }\n return info;\n });\n }\n getPairingResponseInfo(request) {\n return __awaiter(this, void 0, void 0, function* () {\n const info = new octez_connect_types_1.P2PPairingResponse(request.id, this.name, yield this.getPublicKey(), request.version, (yield this.getRelayServer()).server, (0, octez_connect_core_1.getPreferredMessageProtocolVersion)());\n if (this.iconUrl) {\n info.icon = this.iconUrl;\n }\n if (this.appUrl) {\n info.appUrl = this.appUrl;\n }\n return info;\n });\n }\n /**\n * To get the fastest region, we can't simply do one request, because sometimes,\n * DNS and SSL handshakes make \"faster\" connections slower. So we need to do 2 requests\n * and check which request was the fastest after 1s.\n */\n findBestRegionAndGetServer() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (this.selectedRegion) {\n return (_a = this.relayServer) === null || _a === void 0 ? void 0 : _a.promiseResult;\n }\n const probes = Object.entries(this.ENABLED_RELAY_SERVERS)\n .flatMap(([region, servers]) => servers.map((server) => ({ server, region: region })))\n .sort(() => Math.random() - 0.5);\n const results = [];\n const probePromises = probes.map(({ server, region }) => (() => __awaiter(this, void 0, void 0, function* () {\n const start = Date.now();\n try {\n const info = yield this.getBeaconInfo(server);\n results.push({\n server,\n region,\n time: Date.now() - start,\n timestamp: info.timestamp\n });\n }\n catch (err) {\n logger.warn(`probe for ${server} failed:`, err);\n // swallow the error so Promise.all never rejects\n }\n }))());\n // 3) Wait until either:\n // • all probes settle (fast regions), or\n // • we hit our global timeout\n yield Promise.race([Promise.all(probePromises), sleep(RESPONSE_WAIT_TIME_MS)]);\n // 4) If nobody replied, bail out\n if (results.length === 0) {\n throw new Error('No server responded.');\n }\n // 5) Pick the lowest-latency reply\n const best = results.reduce((a, b) => (b.time < a.time ? b : a));\n this.selectedRegion = best.region;\n return { server: best.server, timestamp: best.timestamp };\n });\n }\n getRelayServer() {\n return __awaiter(this, void 0, void 0, function* () {\n // Fast path: in-memory cached relay server that's still fresh\n if (this.relayServer) {\n const currentPromise = this.relayServer;\n const relayServer = yield this.relayServer.promise;\n if (Date.now() - relayServer.localTimestamp < 60 * 1000) {\n return { server: relayServer.server, timestamp: relayServer.timestamp };\n }\n try {\n const info = yield this.getBeaconInfo(relayServer.server);\n const refreshedPromise = octez_connect_utils_1.ExposedPromise.resolve({\n server: relayServer.server,\n timestamp: info.timestamp,\n localTimestamp: new Date().getTime()\n });\n if (this.relayServer === currentPromise) {\n this.relayServer = refreshedPromise;\n }\n return { server: relayServer.server, timestamp: info.timestamp };\n }\n catch (error) {\n logger.log('getRelayServer', `cached server ${relayServer.server} is unreachable, resetting`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((e) => logger.log(e));\n // Only reset if this promise instance is still current (not replaced by another caller)\n const replacementRelayPromise = this.relayServer;\n if (replacementRelayPromise === currentPromise) {\n this.relayServer = undefined;\n this.selectedRegion = undefined;\n }\n else if (replacementRelayPromise) {\n // Another caller replaced the promise while we were waiting.\n // Reuse that result instead of racing into a second discovery.\n const latestRelayServer = yield replacementRelayPromise.promise;\n return { server: latestRelayServer.server, timestamp: latestRelayServer.timestamp };\n }\n // Fall through to discovery below\n }\n }\n // Another caller may have created a new in-flight promise while we were handling stale cache.\n // Reuse it instead of replacing it with a new promise.\n if (this.relayServer) {\n const relayServer = yield this.relayServer.promise;\n return { server: relayServer.server, timestamp: relayServer.timestamp };\n }\n // First caller creates the promise; concurrent callers will await it above\n const discoveryPromise = new octez_connect_utils_1.ExposedPromise();\n this.relayServer = discoveryPromise;\n try {\n // Try the localStorage-cached node first\n const node = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE);\n if (node && node.length > 0) {\n try {\n const info = yield this.getBeaconInfo(node);\n discoveryPromise.resolve({\n server: node,\n timestamp: info.timestamp,\n localTimestamp: new Date().getTime()\n });\n return { server: node, timestamp: info.timestamp };\n }\n catch (error) {\n // #12: a transient offline state shouldn't cost the user their pairing.\n // Only drop the stored node when the device is actually online; if it\n // reports offline, retain the node and skip rediscovery this cycle so\n // the same node can be retried once connectivity returns. `navigator`\n // being undefined (Node/SSR) is treated as online — existing behavior.\n if (typeof navigator !== 'undefined' && navigator.onLine === false) {\n logger.log('getRelayServer', `stored node ${node} is unreachable but device is offline; retaining node and skipping discovery`);\n throw error;\n }\n logger.log('getRelayServer', `stored node ${node} is unreachable, falling through to discovery`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((e) => logger.log(e));\n }\n }\n // Full discovery: probe all servers, pick the fastest\n const server = yield this.findBestRegionAndGetServer();\n if (!server) {\n throw new Error('No servers found');\n }\n this.storage\n .set(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE, server.server)\n .catch((error) => logger.log(error));\n discoveryPromise.resolve({\n server: server.server,\n timestamp: server.timestamp,\n localTimestamp: new Date().getTime()\n });\n return { server: server.server, timestamp: server.timestamp };\n }\n catch (error) {\n // Always settle the ExposedPromise so concurrent callers don't hang forever\n discoveryPromise.reject(error);\n if (this.relayServer === discoveryPromise) {\n this.relayServer = undefined;\n }\n throw error;\n }\n });\n }\n getBeaconInfo(server) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield fetch(`https://${server}/_synapse/client/beacon/info`, {\n signal: AbortSignal.timeout(10000)\n });\n if (!response.ok) {\n throw new Error(`getBeaconInfo ${server} failed: ${response.status} ${response.statusText}`);\n }\n const data = (yield response.json());\n return {\n region: data.region,\n known_servers: data.known_servers,\n timestamp: Math.floor(data.timestamp)\n };\n });\n }\n tryJoinRooms(roomId_1) {\n return __awaiter(this, arguments, void 0, function* (roomId, retry = 1) {\n try {\n yield (yield this.client.promise).joinRooms(roomId);\n }\n catch (error) {\n if (retry <= 10 && error.errcode === 'M_FORBIDDEN') {\n // If we join the room too fast after receiving the invite, the server can accidentally reject our join. This seems to be a problem only when using a federated multi-node setup. Usually waiting for a couple milliseconds solves the issue, but to handle lag, we will keep retrying for 2 seconds.\n logger.log(`Retrying to join...`, error);\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\n yield this.tryJoinRooms(roomId, retry + 1);\n }), 200);\n }\n else {\n logger.log(`Failed to join after ${retry} tries.`, error);\n }\n }\n });\n }\n start() {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n logger.log('start', 'starting client');\n logger.log('start', `connecting to server`);\n const relayServer = yield this.getRelayServer();\n const client = MatrixClient_1.MatrixClient.create({\n baseUrl: `https://${relayServer.server}`,\n storage: this.storage\n });\n this.initialListener = (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.initialEvent && this.initialEvent.timestamp && event && event.timestamp) {\n if (this.initialEvent.timestamp < event.timestamp) {\n this.initialEvent = event;\n }\n }\n else {\n this.initialEvent = event;\n }\n });\n client.subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, this.initialListener);\n client.subscribe(MatrixClientEvent_1.MatrixClientEventType.INVITE, (event) => __awaiter(this, void 0, void 0, function* () {\n let member;\n if (event.content.members.length === 1) {\n // If there is only one member we know it's a new room\n // TODO: Use the \"sender\" of the event instead\n member = event.content.members[0];\n }\n yield this.tryJoinRooms(event.content.roomId);\n if (member) {\n yield this.updateRelayServer(member);\n yield this.updatePeerRoom(member, event.content.roomId);\n }\n }));\n if (!relayServer.timestamp) {\n throw new Error('No timestamp received from relay server');\n }\n const time = Math.floor(relayServer.timestamp);\n const loginString = `login:${Math.floor(time / (5 * 60))}`;\n logger.log('start', `login ${loginString}, ${yield this.getPublicKeyHash()} on ${relayServer.server}`);\n const loginRawDigest = (0, blake2b_1.hash)((0, utf8_1.encode)(loginString), 32);\n const secretKey = (_a = this.keyPair.secretKey) !== null && _a !== void 0 ? _a : this.keyPair.privateKey;\n const rawSignature = (0, octez_connect_utils_1.sign)(secretKey, loginRawDigest);\n try {\n yield client.start({\n id: yield this.getPublicKeyHash(),\n password: `ed:${(0, octez_connect_utils_1.toHex)(rawSignature)}:${yield this.getPublicKey()}`,\n deviceId: (0, octez_connect_utils_1.toHex)(this.keyPair.publicKey)\n });\n }\n catch (error) {\n logger.error('start', 'Could not log in, retrying', error);\n if (error.errcode === 'M_USER_DEACTIVATED') {\n yield this.generateNewKeyPair();\n yield this.reset();\n throw new Error('The account is deactivated.');\n }\n yield this.reset(); // If we can't log in, let's reset\n if (!this.selectedRegion) {\n throw new Error('No region selected.');\n }\n if (this.loginCounter <= ((_b = this.ENABLED_RELAY_SERVERS[this.selectedRegion]) !== null && _b !== void 0 ? _b : []).length) {\n this.loginCounter++;\n this.start();\n return;\n }\n else {\n logger.error('start', 'Tried to log in to every known beacon node, but no login was successful.');\n throw new Error('Could not connect to any beacon nodes. Try again later.');\n }\n }\n logger.log('start', 'login successful, client is ready');\n this.client.resolve(client);\n // Check for any pending invites that we may have missed during the initial sync\n logger.log('start', 'checking for pending invites');\n const invites = yield client.invitedRooms;\n logger.log('start', `found ${invites.length} pending invites`);\n const myUserId = `@${yield this.getPublicKeyHash()}:${relayServer.server}`;\n for (const invite of invites) {\n logger.log('start', `joining invited room: ${invite.id}`);\n yield this.tryJoinRooms(invite.id);\n // Update the peer room mapping for this invite\n if (invite.members.length > 0) {\n const member = invite.members.find((m) => m !== myUserId);\n if (member) {\n yield this.updateRelayServer(member);\n yield this.updatePeerRoom(member, invite.id);\n }\n }\n }\n });\n }\n stop() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('stop', 'stopping client');\n if (this.client.isResolved()) {\n yield (yield this.client.promise).stop().catch((error) => logger.error(error));\n }\n yield this.reset();\n });\n }\n reset() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('reset', 'resetting connection');\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS).catch((error) => logger.log(error));\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE).catch((error) => logger.log(error));\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_SELECTED_NODE).catch((error) => logger.log(error));\n // Instead of resetting everything, maybe we should make sure a new instance is created?\n this.relayServer = undefined;\n this.client = new octez_connect_utils_1.ExposedPromise();\n this.initialEvent = undefined;\n this.initialListener = undefined;\n });\n }\n listenForEncryptedMessage(senderPublicKey, messageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.activeListeners.has(senderPublicKey)) {\n return;\n }\n logger.log('listenForEncryptedMessage', `start listening for encrypted messages from publicKey ${senderPublicKey}`);\n const sharedKey = yield this.createCryptoBoxServer(senderPublicKey, this.keyPair);\n const callbackFunction = (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.isTextMessage(event.content) && (yield this.isSender(event, senderPublicKey))) {\n let payload;\n yield this.updateRelayServer(event.content.message.sender);\n yield this.updatePeerRoom(event.content.message.sender, event.content.roomId);\n try {\n payload = Buffer.from(event.content.message.content, 'hex');\n // content can be non-hex if it's a connection open request\n }\n catch (_a) {\n /* */\n }\n if (payload && payload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n const decryptedMessage = yield (0, octez_connect_utils_1.decryptCryptoboxPayload)(payload, sharedKey.receive);\n logger.log('listenForEncryptedMessage', `received a message from ${senderPublicKey}`, decryptedMessage);\n // logger.log(\n // 'listenForEncryptedMessage',\n // 'encrypted message received',\n // decryptedMessage,\n // await new Serializer().deserialize(decryptedMessage)\n // )\n // console.log('calculated sender ID', await getSenderId(senderPublicKey))\n // TODO: Add check for correct decryption key / sender ID\n messageCallback(decryptedMessage);\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n }\n });\n this.activeListeners.set(senderPublicKey, callbackFunction);\n (yield this.client.promise).subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, callbackFunction);\n const lastEvent = this.initialEvent;\n if (lastEvent &&\n lastEvent.timestamp &&\n new Date().getTime() - lastEvent.timestamp < 5 * 60 * 1000) {\n logger.log('listenForEncryptedMessage', 'Handling previous event');\n yield callbackFunction(lastEvent);\n }\n else {\n logger.log('listenForEncryptedMessage', 'No previous event found');\n }\n const initialListener = this.initialListener;\n if (initialListener) {\n ;\n (yield this.client.promise).unsubscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, initialListener);\n }\n this.initialListener = undefined;\n this.initialEvent = undefined;\n });\n }\n unsubscribeFromEncryptedMessage(senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const listener = this.activeListeners.get(senderPublicKey);\n if (!listener) {\n return;\n }\n ;\n (yield this.client.promise).unsubscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, listener);\n this.activeListeners.delete(senderPublicKey);\n });\n }\n unsubscribeFromEncryptedMessages() {\n return __awaiter(this, void 0, void 0, function* () {\n ;\n (yield this.client.promise).unsubscribeAll(MatrixClientEvent_1.MatrixClientEventType.MESSAGE);\n this.activeListeners.clear();\n });\n }\n sendMessage(message, peer) {\n return __awaiter(this, void 0, void 0, function* () {\n const sharedKey = yield this.createCryptoBoxClient(peer.publicKey, this.keyPair);\n const recipientHash = yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(peer.publicKey, 'hex'));\n const recipient = (0, octez_connect_utils_1.recipientString)(recipientHash, peer.relayServer);\n const roomId = yield this.getRelevantRoom(recipient);\n // Before we send the message, we have to wait for the join to be accepted.\n // await this.waitForJoin(roomId) // TODO: This can probably be removed because we are now waiting inside the get room method\n const encryptedMessage = yield (0, octez_connect_utils_1.encryptCryptoboxPayload)(message, sharedKey.send);\n logger.log('sendMessage', 'sending encrypted message', peer.publicKey, roomId, message);\n try {\n yield (yield this.client.promise).sendTextMessage(roomId, encryptedMessage);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED') {\n logger.log('sendMessage', 'request cancelled while stopping transport');\n return;\n }\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN') {\n logger.log(`sendMessage`, `M_FORBIDDEN`, roomId, error);\n yield this.deleteRoomIdFromRooms(roomId);\n const newRoomId = yield this.getRelevantRoom(recipient);\n logger.log(`sendMessage`, `Old room deleted, new room created`, newRoomId);\n try {\n yield (yield this.client.promise).sendTextMessage(newRoomId, encryptedMessage);\n }\n catch (innerError) {\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.code) === 'ERR_CANCELED') {\n logger.log('sendMessage', 'inner request cancelled while stopping transport');\n return;\n }\n logger.log(`sendMessage`, `inner error`, newRoomId, innerError);\n }\n }\n else {\n logger.log(`sendMessage`, `unexpected error`, error);\n }\n }\n });\n }\n updatePeerRoom(sender, roomId) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`updatePeerRoom`, sender, roomId);\n // Sender is in the format \"@pubkeyhash:relayserver.tld\"\n const split = sender.split(':');\n if (split.length < 2 || !split[0].startsWith('@')) {\n throw new Error('Invalid sender');\n }\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const room = roomIds[sender];\n if (room === roomId) {\n logger.debug(`updatePeerRoom`, `rooms are the same, not updating`);\n }\n logger.debug(`updatePeerRoom`, `current room`, room, 'new room', roomId);\n if (room && room[1]) {\n // If we have a room already, let's ignore it. We need to do this, otherwise it will be loaded from the matrix cache.\n logger.log(`updatePeerRoom`, `adding room \"${room[1]}\" to ignored array`);\n this.ignoredRooms.push(room[1]);\n }\n roomIds[sender] = roomId;\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, roomIds);\n // TODO: We also need to delete the room from the sync state\n // If we need to delete a room, we can assume the local state is not up to date anymore, so we can reset the state\n });\n }\n deleteRoomIdFromRooms(roomId) {\n return __awaiter(this, void 0, void 0, function* () {\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const newRoomIds = Object.entries(roomIds)\n .filter((entry) => entry[1] !== roomId)\n .reduce((pv, cv) => (Object.assign(Object.assign({}, pv), { [cv[0]]: cv[1] })), {});\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, newRoomIds);\n // TODO: We also need to delete the room from the sync state\n // If we need to delete a room, we can assume the local state is not up to date anymore, so we can reset the state\n this.ignoredRooms.push(roomId);\n });\n }\n listenForChannelOpening(messageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.debug(`listenForChannelOpening`);\n (yield this.client.promise).subscribe(MatrixClientEvent_1.MatrixClientEventType.MESSAGE, (event) => __awaiter(this, void 0, void 0, function* () {\n if (this.isTextMessage(event.content) && (yield this.isChannelOpenMessage(event.content))) {\n logger.log(`listenForChannelOpening`, `channel opening received, trying to decrypt`, JSON.stringify(event));\n yield this.updateRelayServer(event.content.message.sender);\n yield this.updatePeerRoom(event.content.message.sender, event.content.roomId);\n const splits = event.content.message.content.split(':');\n const payload = Buffer.from(splits[splits.length - 1], 'hex');\n if (payload.length >= octez_connect_utils_1.secretbox_NONCEBYTES + octez_connect_utils_1.secretbox_MACBYTES) {\n try {\n const rawResponse = JSON.parse(yield (0, octez_connect_utils_1.openCryptobox)(payload, this.keyPair.publicKey, this.keyPair.secretKey));\n const normalizedProtocol = Number(rawResponse.protocolVersion);\n const pairingResponse = Object.assign(Object.assign({}, rawResponse), { protocolVersion: Number.isFinite(normalizedProtocol) ? normalizedProtocol : undefined });\n logger.log(`listenForChannelOpening`, `channel opening received and decrypted`, JSON.stringify(pairingResponse));\n messageCallback(Object.assign(Object.assign({}, pairingResponse), { senderId: yield (0, octez_connect_core_1.getSenderId)(pairingResponse.publicKey) }));\n }\n catch (decryptionError) {\n /* NO-OP. We try to decode every message, but some might not be addressed to us. */\n }\n }\n }\n }));\n });\n }\n waitForJoin(roomId_1) {\n return __awaiter(this, arguments, void 0, function* (roomId, retry = 0) {\n // Rooms are updated as new events come in. `client.getRoomById` only accesses memory, it does not do any network requests.\n // TODO: Improve to listen to \"JOIN\" event\n const room = yield (yield this.client.promise).getRoomById(roomId);\n logger.log(`waitForJoin`, `Currently ${room.members.length} members, we need at least 2`);\n if (room.members.length >= 2) {\n return;\n }\n else {\n if (retry < 10) {\n logger.log(`Waiting for join... Try: ${retry}`);\n return new Promise((resolve) => {\n // Exponential backoff: 1s, 2s, 4s, 8s, 16s, 32s, 64s, 128s, 256s, 512s\n const backoffMs = 1000 * Math.pow(2, retry);\n setTimeout(() => {\n resolve(this.waitForJoin(roomId, retry + 1));\n }, backoffMs);\n });\n }\n else {\n throw new Error(`No one joined after ${retry} tries. Room may be orphaned.`);\n }\n }\n });\n }\n sendPairingResponse(pairingRequest) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a, _b;\n logger.log(`sendPairingResponse`);\n const recipientHash = yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(pairingRequest.publicKey, 'hex'));\n const recipient = (0, octez_connect_utils_1.recipientString)(recipientHash, pairingRequest.relayServer);\n // We force room creation here because if we \"re-pair\", we need to make sure that we don't send it to an old room.\n let roomId;\n let roomWasReused = false;\n try {\n roomId = yield (yield this.client.promise).createTrustedPrivateRoom(recipient);\n logger.debug(`sendPairingResponse`, `Connecting to room \"${roomId}\"`);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN' && ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.includes('already in the room'))) {\n logger.log(`sendPairingResponse`, `M_FORBIDDEN during room creation, finding existing room instead`, error);\n roomWasReused = true;\n // Handle 403 response when invite was sent. Find the existing room, but first, clear our local state to force a fresh lookup\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n const oldRoomId = roomIds[recipient];\n if (oldRoomId) {\n logger.log(`sendPairingResponse`, `Clearing old room \"${oldRoomId}\" from local cache`);\n yield this.deleteRoomIdFromRooms(oldRoomId);\n }\n // Now use getRelevantJoinedRoom which will find the existing room from the server\n // or clear state if we're in an unrecoverable situation with orphaned rooms\n try {\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n logger.log(`sendPairingResponse`, `Using existing room \"${roomId}\" from server`);\n }\n catch (innerError) {\n // If we still get M_FORBIDDEN here, it means we have orphaned rooms and the state was cleared\n // We need to stop the client and reconnect to get a fresh sync\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.errcode) === 'M_FORBIDDEN' &&\n ((_b = innerError === null || innerError === void 0 ? void 0 : innerError.error) === null || _b === void 0 ? void 0 : _b.includes('already in the room'))) {\n logger.log(`sendPairingResponse`, `Still getting M_FORBIDDEN after state clear, stopping and restarting client`);\n yield this.stop();\n yield this.start();\n // Try one more time with fresh state\n try {\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n logger.log(`sendPairingResponse`, `Successfully found room \"${roomId}\" after restart`);\n }\n catch (finalError) {\n logger.error(`sendPairingResponse`, `Failed to recover after restart`, finalError);\n throw new Error('Unable to pair. Please clear your browser storage and try again.');\n }\n }\n else {\n logger.log(`sendPairingResponse`, `Failed to find existing room`, innerError);\n throw error; // Re-throw original error if we can't recover\n }\n }\n }\n else {\n throw error; // Re-throw if it's not the specific error we're handling\n }\n }\n yield this.updatePeerRoom(recipient, roomId);\n // Check if the other party is in the room\n const room = yield (yield this.client.promise).getRoomById(roomId);\n const hasRecipient = room.members.some((member) => member === recipient);\n if (!hasRecipient) {\n logger.log(`sendPairingResponse`, `Recipient not in room, inviting them to \"${roomId}\"`);\n // The recipient is not in the room. We need to invite them.\n // Since we're reusing a room, the recipient might have been invited before but never joined.\n // Try to invite them again.\n try {\n yield (yield this.client.promise).inviteToRooms(recipient, roomId);\n logger.log(`sendPairingResponse`, `Invited recipient to room, waiting for join`);\n yield this.waitForJoin(roomId);\n }\n catch (inviteError) {\n logger.error(`sendPairingResponse`, `Failed to invite recipient to room`, inviteError);\n // If invite fails, we're in a bad state. The user should clear storage.\n throw new Error('Unable to invite dApp to room. Please clear your browser storage and try again.');\n }\n }\n else if (!roomWasReused) {\n // Room was newly created, wait for the other party to join\n yield this.waitForJoin(roomId);\n logger.debug(`sendPairingResponse`, `Successfully joined room.`);\n }\n else {\n // Room was reused and recipient is already in it\n logger.log(`sendPairingResponse`, `Room was reused and recipient is already a member. Sending message immediately.`);\n }\n // TODO: remove v1 backwards-compatibility\n const message = typeof pairingRequest.version === 'undefined'\n ? yield this.getPublicKey() // v1\n : JSON.stringify(yield this.getPairingResponseInfo(pairingRequest)); // v2\n logger.debug(`sendPairingResponse`, `Sending pairing response`, message);\n const encryptedMessage = yield this.encryptMessageAsymmetric(pairingRequest.publicKey, message);\n const msg = ['@channel-open', recipient, encryptedMessage].join(':');\n try {\n yield (yield this.client.promise).sendTextMessage(roomId, msg);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED') {\n logger.log('sendPairingResponse', 'request cancelled while stopping transport');\n return;\n }\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN') {\n logger.log(`sendPairingResponse`, `M_FORBIDDEN`, roomId, error);\n yield this.deleteRoomIdFromRooms(roomId);\n const newRoomId = yield this.getRelevantRoom(recipient);\n logger.log(`sendPairingResponse`, `Old room deleted, new room created`, newRoomId);\n try {\n yield (yield this.client.promise).sendTextMessage(newRoomId, msg);\n }\n catch (innerError) {\n if ((innerError === null || innerError === void 0 ? void 0 : innerError.code) === 'ERR_CANCELED') {\n logger.log('sendPairingResponse', 'inner request cancelled while stopping transport');\n return;\n }\n logger.log(`sendPairingResponse`, `inner error`, newRoomId, innerError);\n }\n }\n else {\n logger.log(`sendPairingResponse`, `unexpected error`, error);\n }\n }\n });\n }\n isTextMessage(content) {\n return content.message.type === MatrixMessage_1.MatrixMessageType.TEXT;\n }\n updateRelayServer(sender) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`updateRelayServer`, sender);\n // Sender is in the format \"@pubkeyhash:relayserver.tld\"\n const split = sender.split(':');\n if (split.length < 2 || !split[0].startsWith('@')) {\n throw new Error('Invalid sender');\n }\n const senderHash = split.shift();\n const relayServer = split.join(':');\n const manager = localStorage.getItem('beacon:communication-peers-dapp')\n ? new octez_connect_core_1.PeerManager(this.storage, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP)\n : new octez_connect_core_1.PeerManager(this.storage, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET);\n const peers = yield manager.getPeers();\n const promiseArray = peers.map((peer) => __awaiter(this, void 0, void 0, function* () {\n const hash = `@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(peer.publicKey, 'hex'))}`;\n if (hash === senderHash) {\n if (peer.relayServer !== relayServer) {\n peer.relayServer = relayServer;\n yield manager.addPeer(peer);\n }\n }\n }));\n yield Promise.all(promiseArray);\n });\n }\n isChannelOpenMessage(content) {\n return __awaiter(this, void 0, void 0, function* () {\n return content.message.content.startsWith(`@channel-open:@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(yield this.getPublicKey(), 'hex'))}`);\n });\n }\n isSender(event, senderPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n return event.content.message.sender.startsWith(`@${yield (0, octez_connect_utils_1.getHexHash)(Buffer.from(senderPublicKey, 'hex'))}`);\n });\n }\n generateNewKeyPair() {\n return __awaiter(this, void 0, void 0, function* () {\n const newSeed = yield (0, octez_connect_utils_1.generateGUID)();\n console.warn(`The current user ID has been deactivated. Generating new ID: ${newSeed}`);\n this.storage.set(octez_connect_types_1.StorageKey.BEACON_SDK_SECRET_SEED, newSeed);\n this.keyPair = yield (0, octez_connect_utils_1.getKeypairFromSeed)(newSeed);\n });\n }\n getRelevantRoom(recipient) {\n return __awaiter(this, void 0, void 0, function* () {\n const roomIds = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS);\n let roomId = roomIds[recipient];\n if (!roomId) {\n logger.log(`getRelevantRoom`, `No room found for peer ${recipient}, checking joined ones.`);\n const room = yield this.getRelevantJoinedRoom(recipient);\n roomId = room.id;\n roomIds[recipient] = room.id;\n yield this.storage.set(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS, roomIds);\n }\n logger.log(`getRelevantRoom`, `Using room ${roomId}`);\n return roomId;\n });\n }\n getRelevantJoinedRoom(recipient) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const joinedRooms = yield (yield this.client.promise).joinedRooms;\n logger.log('checking joined rooms', joinedRooms, recipient);\n const relevantRooms = joinedRooms\n .filter((roomElement) => !this.ignoredRooms.some((id) => roomElement.id === id))\n .filter((roomElement) => roomElement.members.some((member) => member === recipient));\n let room;\n // If we found relevant rooms, use them even if there are ignored rooms\n if (relevantRooms.length > 0) {\n room = relevantRooms[0];\n logger.log(`getRelevantJoinedRoom`, `channel already open, reusing room ${room.id}`);\n }\n else {\n // No relevant rooms found. If we have ignored rooms, we're in a bad state and need to reset.\n if (this.ignoredRooms.length > 0) {\n logger.log(`getRelevantJoinedRoom`, `no relevant rooms found but have ${this.ignoredRooms.length} ignored rooms, clearing Matrix state`);\n // Clear the Matrix preserved state to force a fresh sync on next connection\n yield this.storage\n .delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE)\n .catch((error) => logger.log(error));\n yield this.storage\n .delete(octez_connect_types_1.StorageKey.MATRIX_PEER_ROOM_IDS)\n .catch((error) => logger.log(error));\n // Clear ignored rooms list since we're resetting\n this.ignoredRooms.length = 0;\n }\n logger.log(`getRelevantJoinedRoom`, `no relevant rooms found, creating new one`);\n try {\n const roomId = yield (yield this.client.promise).createTrustedPrivateRoom(recipient);\n room = yield (yield this.client.promise).getRoomById(roomId);\n logger.log(`getRelevantJoinedRoom`, `waiting for other party to join room: ${room.id}`);\n yield this.waitForJoin(roomId);\n logger.log(`getRelevantJoinedRoom`, `new room created and peer invited: ${room.id}`);\n }\n catch (error) {\n if ((error === null || error === void 0 ? void 0 : error.errcode) === 'M_FORBIDDEN' && ((_a = error === null || error === void 0 ? void 0 : error.error) === null || _a === void 0 ? void 0 : _a.includes('already in the room'))) {\n // Server knows about a room we don't have locally\n // Clear preserved state so next reconnect gets a fresh sync\n logger.log(`getRelevantJoinedRoom`, `M_FORBIDDEN on room creation, clearing preserved state for fresh sync on reconnect`);\n yield this.storage.delete(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE).catch((e) => logger.log(e));\n // Re-throw the error so caller (sendPairingResponse) can handle the restart\n throw error;\n }\n throw error;\n }\n }\n return room;\n });\n }\n}\nexports.P2PCommunicationClient = P2PCommunicationClient;\n//# sourceMappingURL=P2PCommunicationClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.P2PTransport = exports.P2PCommunicationClient = void 0;\nvar P2PCommunicationClient_1 = __webpack_require__(/*! ./communication-client/P2PCommunicationClient */ "./packages/octez.connect-transport-matrix/dist/cjs/communication-client/P2PCommunicationClient.js");\nObject.defineProperty(exports, "P2PCommunicationClient", ({ enumerable: true, get: function () { return P2PCommunicationClient_1.P2PCommunicationClient; } }));\nvar P2PTransport_1 = __webpack_require__(/*! ./P2PTransport */ "./packages/octez.connect-transport-matrix/dist/cjs/P2PTransport.js");\nObject.defineProperty(exports, "P2PTransport", ({ enumerable: true, get: function () { return P2PTransport_1.P2PTransport; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/index.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js"(__unused_webpack_module,exports){"use strict";eval("{\n// https://gist.github.com/mudge/5830382?permalink_comment_id=2658721#gistcomment-2658721\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.EventEmitter = void 0;\nclass EventEmitter {\n constructor() {\n this.events = {};\n }\n on(event, listener) {\n if (typeof this.events[event] !== 'object') {\n this.events[event] = [];\n }\n this.events[event].push(listener);\n return () => this.removeListener(event, listener);\n }\n removeListener(event, listener) {\n if (typeof this.events[event] !== 'object') {\n return;\n }\n if (!listener) {\n this.events[event] = [];\n return;\n }\n const idx = this.events[event].indexOf(listener);\n if (idx > -1) {\n this.events[event].splice(idx, 1);\n }\n }\n removeAllListeners() {\n Object.keys(this.events).forEach((event) => this.events[event].splice(0, this.events[event].length));\n }\n emit(event, ...args) {\n if (typeof this.events[event] !== 'object') {\n return;\n }\n ;\n [...this.events[event]].forEach((listener) => listener.apply(this, args));\n }\n once(event, listener) {\n const remove = this.on(event, (...args) => {\n remove();\n listener.apply(this, args);\n });\n return remove;\n }\n}\nexports.EventEmitter = EventEmitter;\n//# sourceMappingURL=EventEmitter.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst MatrixClientStore_1 = __webpack_require__(/*! ./MatrixClientStore */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js\");\nconst MatrixHttpClient_1 = __webpack_require__(/*! ./MatrixHttpClient */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js\");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js\");\nconst MatrixRoomService_1 = __webpack_require__(/*! ./services/MatrixRoomService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js\");\nconst MatrixUserService_1 = __webpack_require__(/*! ./services/MatrixUserService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js\");\nconst MatrixEventService_1 = __webpack_require__(/*! ./services/MatrixEventService */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js\");\nconst MatrixClientEventEmitter_1 = __webpack_require__(/*! ./MatrixClientEventEmitter */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixClient');\nconst IMMEDIATE_POLLING_RETRIES = 3;\nconst RETRY_INTERVAL = 5000;\n/**\n * The matrix client used to connect to the matrix network\n */\nclass MatrixClient {\n constructor(store, eventEmitter, userService, roomService, eventService, httpClient) {\n this.store = store;\n this.eventEmitter = eventEmitter;\n this.userService = userService;\n this.roomService = roomService;\n this.eventService = eventService;\n this.httpClient = httpClient;\n this.isActive = true;\n this._isReady = new octez_connect_utils_1.ExposedPromise();\n this.store.onStateChanged((oldState, newState, stateChange) => {\n this.eventEmitter.onStateChanged(oldState, newState, stateChange);\n }, 'rooms');\n }\n /**\n * Create a matrix client based on the options provided\n *\n * @param config\n */\n static create(config) {\n const store = new MatrixClientStore_1.MatrixClientStore(config.storage);\n const eventEmitter = new MatrixClientEventEmitter_1.MatrixClientEventEmitter();\n const httpClient = new MatrixHttpClient_1.MatrixHttpClient(config.baseUrl);\n const accountService = new MatrixUserService_1.MatrixUserService(httpClient);\n const roomService = new MatrixRoomService_1.MatrixRoomService(httpClient);\n const eventService = new MatrixEventService_1.MatrixEventService(httpClient);\n return new MatrixClient(store, eventEmitter, accountService, roomService, eventService, httpClient);\n }\n /**\n * Return all the rooms we are currently part of\n */\n get joinedRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.JOINED));\n }));\n }\n /**\n * Return all the rooms to which we have received invitations\n */\n get invitedRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED));\n }));\n }\n /**\n * Return all the rooms that we left\n */\n get leftRooms() {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n resolve(Object.values(this.store.get('rooms')).filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.LEFT));\n }));\n }\n /**\n * Initiate the connection to the matrix node and log in\n *\n * @param user\n */\n start(user) {\n return __awaiter(this, void 0, void 0, function* () {\n const response = yield this.userService.login(user.id, user.password, user.deviceId);\n yield this.store.update({\n accessToken: response.access_token\n });\n this.isActive = true;\n const initialPollingResult = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n yield this.poll(0, (pollingResponse) => __awaiter(this, void 0, void 0, function* () {\n if (!this.store.get('isRunning')) {\n resolve();\n }\n yield this.store.update({\n isRunning: true,\n syncToken: pollingResponse.next_batch,\n pollingTimeout: 30000,\n pollingRetries: 0,\n rooms: MatrixRoom_1.MatrixRoom.fromSync(pollingResponse.rooms)\n });\n }), (error) => __awaiter(this, void 0, void 0, function* () {\n if (!this.store.get('isRunning')) {\n reject(error);\n }\n yield this.store.update({\n isRunning: false,\n pollingRetries: this.store.get('pollingRetries') + 1\n });\n }));\n }));\n initialPollingResult\n .then(() => {\n this._isReady.resolve();\n })\n .catch(console.error);\n return initialPollingResult;\n });\n }\n isConnected() {\n return __awaiter(this, void 0, void 0, function* () {\n return this._isReady.promise;\n });\n }\n /**\n * Stop all running requests\n */\n stop() {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log(`MATRIX CLIENT STOPPED`);\n this.isActive = false;\n this._isReady = new octez_connect_utils_1.ExposedPromise();\n yield this.store.update({\n isRunning: false\n });\n return this.httpClient.cancelAllRequests();\n });\n }\n /**\n * Subscribe to new matrix events\n *\n * @param event\n * @param listener\n */\n subscribe(event, listener) {\n this.eventEmitter.on(event, listener);\n }\n /**\n * Unsubscribe from matrix events\n *\n * @param event\n * @param listener\n */\n unsubscribe(event, listener) {\n if (listener) {\n this.eventEmitter.removeListener(event, listener);\n }\n }\n /**\n * Unsubscribe from all matrix events of this type\n *\n * @param event\n * @param listener\n */\n unsubscribeAll(event) {\n this.eventEmitter.removeListener(event);\n }\n getRoomById(id) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n return this.store.getRoom(id);\n });\n }\n /**\n * Create a private room with the supplied members\n *\n * @param members Members that will be in the room\n */\n createTrustedPrivateRoom(...members) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n return this.requiresAuthorization('createRoom', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n const response = yield this.roomService.createRoom(accessToken, {\n room_version: '5',\n invite: members,\n preset: 'public_chat',\n is_direct: true\n });\n return response.room_id;\n }));\n });\n }\n /**\n * Invite user to rooms\n *\n * @param user The user to be invited\n * @param roomsOrIds The rooms the user will be invited to\n */\n inviteToRooms(user, ...roomsOrIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('invite', (accessToken) => Promise.all(roomsOrIds.map((roomOrId) => {\n const room = this.store.getRoom(roomOrId);\n this.roomService\n .inviteToRoom(accessToken, user, room)\n .catch((error) => logger.warn('inviteToRooms', error));\n })));\n });\n }\n /**\n * Join rooms\n *\n * @param roomsOrIds\n */\n joinRooms(...roomsOrIds) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('join', (accessToken) => Promise.all(roomsOrIds.map((roomOrId) => {\n const room = this.store.getRoom(roomOrId);\n return this.roomService.joinRoom(accessToken, room);\n })));\n });\n }\n /**\n * Send a text message\n *\n * @param roomOrId\n * @param message\n */\n sendTextMessage(roomId, message) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.isConnected();\n yield this.requiresAuthorization('send', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n const txnId = yield this.createTxnId();\n return this.eventService.sendMessage(accessToken, roomId, {\n msgtype: 'm.text',\n body: message\n }, txnId);\n }));\n });\n }\n /**\n * Poll the server to get the latest data and get notified of changes\n *\n * @param interval\n * @param onSyncSuccess\n * @param onSyncError\n */\n poll(interval, onSyncSuccess, onSyncError) {\n return __awaiter(this, void 0, void 0, function* () {\n const store = this.store;\n const sync = this.sync.bind(this);\n const pollSync = (resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n let syncingRetries = 0;\n try {\n const response = yield sync();\n onSyncSuccess(response);\n }\n catch (error) {\n onSyncError(error);\n syncingRetries = store.get('pollingRetries');\n // console.warn('Could not sync:', error)\n if (this.isActive) {\n logger.log(`Retry syncing... ${syncingRetries} retries so far`);\n }\n }\n finally {\n if (this.isActive) {\n setTimeout(() => __awaiter(this, void 0, void 0, function* () {\n yield pollSync(resolve, reject);\n }), syncingRetries > IMMEDIATE_POLLING_RETRIES ? RETRY_INTERVAL + interval : interval);\n }\n else {\n reject(new Error(`Syncing stopped manually.`));\n }\n }\n });\n return new Promise(pollSync);\n });\n }\n /**\n * Get state from server\n */\n sync() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.requiresAuthorization('sync', (accessToken) => __awaiter(this, void 0, void 0, function* () {\n return this.eventService.sync(accessToken, {\n pollingTimeout: this.store.get('pollingTimeout'),\n syncToken: this.store.get('syncToken')\n });\n }));\n });\n }\n /**\n * A helper method that makes sure an access token is provided\n *\n * @param name\n * @param action\n */\n requiresAuthorization(name, action) {\n return __awaiter(this, void 0, void 0, function* () {\n const storedToken = this.store.get('accessToken');\n if (!storedToken) {\n return Promise.reject(`${name} requires authorization but no access token has been provided.`);\n }\n return action(storedToken);\n });\n }\n /**\n * Create a transaction ID\n */\n createTxnId() {\n return __awaiter(this, void 0, void 0, function* () {\n const timestamp = new Date().getTime();\n const counter = this.store.get('txnNo');\n yield this.store.update({\n txnNo: counter + 1\n });\n return `m${timestamp}.${counter}`;\n });\n }\n}\nexports.MatrixClient = MatrixClient;\n//# sourceMappingURL=MatrixClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixClientEventEmitter = void 0;\nconst EventEmitter_1 = __webpack_require__(/*! ./EventEmitter */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/EventEmitter.js");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js");\nconst MatrixClientEvent_1 = __webpack_require__(/*! ./models/MatrixClientEvent */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js");\nclass MatrixClientEventEmitter extends EventEmitter_1.EventEmitter {\n constructor() {\n super(...arguments);\n this.eventEmitProviders = new Map([\n [MatrixClientEvent_1.MatrixClientEventType.INVITE, () => [this.isInvite, this.emitInvite.bind(this)]],\n [MatrixClientEvent_1.MatrixClientEventType.MESSAGE, () => [this.isMessage, this.emitMessage.bind(this)]]\n ]);\n }\n /**\n * This method is called every time the state is changed\n *\n * @param _oldState\n * @param _newState\n * @param stateChange\n */\n onStateChanged(_oldState, _newState, stateChange) {\n for (const event of (0, octez_connect_utils_1.keys)(MatrixClientEvent_1.MatrixClientEventType)) {\n this.emitIfEvent(MatrixClientEvent_1.MatrixClientEventType[event], stateChange);\n }\n }\n /**\n * Emit the message if we have listeners registered for that type\n *\n * @param eventType\n * @param object\n */\n emitIfEvent(eventType, object) {\n const provider = this.eventEmitProviders.get(eventType);\n if (provider) {\n const [predicate, emitter] = provider();\n if (predicate(object)) {\n emitter(eventType, object);\n }\n }\n }\n /**\n * Emit a client event\n *\n * @param eventType\n * @param content\n */\n emitClientEvent(eventType, content, timestamp) {\n this.emit(eventType, {\n type: eventType,\n content,\n timestamp\n });\n }\n /**\n * Check if event is an invite\n *\n * @param stateChange\n */\n isInvite(stateChange) {\n return stateChange.rooms\n ? stateChange.rooms.some((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED)\n : false;\n }\n /**\n * Emit an invite\n *\n * @param eventType\n * @param stateChange\n */\n emitInvite(eventType, stateChange) {\n stateChange.rooms\n .filter((room) => room.status === MatrixRoom_1.MatrixRoomStatus.INVITED)\n .map((room) => [room.id, room.members])\n .forEach(([id, members]) => {\n this.emitClientEvent(eventType, {\n roomId: id,\n members: members\n });\n });\n }\n /**\n * Check if event is a message\n *\n * @param stateChange\n */\n isMessage(stateChange) {\n return stateChange.rooms ? stateChange.rooms.some((room) => room.messages.length > 0) : false;\n }\n /**\n * Emit an event to all rooms\n *\n * @param eventType\n * @param stateChange\n */\n emitMessage(eventType, stateChange) {\n stateChange.rooms\n .filter((room) => room.messages.length > 0)\n .map((room) => room.messages.map((message) => [room.id, message, message.timestamp]))\n .reduce((flatten, toFlatten) => flatten.concat(toFlatten), [])\n .forEach(([roomId, message, timestamp]) => {\n this.emitClientEvent(eventType, {\n roomId,\n message\n }, timestamp);\n });\n }\n}\nexports.MatrixClientEventEmitter = MatrixClientEventEmitter;\n//# sourceMappingURL=MatrixClientEventEmitter.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientEventEmitter.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixClientStore = void 0;\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst MatrixRoom_1 = __webpack_require__(/*! ./models/MatrixRoom */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixClientStore');\nconst PRESERVED_FIELDS = ['syncToken', 'rooms'];\n/**\n * The class managing the local state of matrix\n */\nclass MatrixClientStore {\n constructor(storage) {\n this.storage = storage;\n /**\n * The state of the matrix client\n */\n this.state = {\n isRunning: false,\n userId: undefined,\n deviceId: undefined,\n txnNo: 0,\n accessToken: undefined,\n syncToken: undefined,\n pollingTimeout: undefined,\n pollingRetries: 0,\n rooms: {}\n };\n /**\n * Listeners that will be called when the state changes\n */\n this.onStateChangedListeners = new Map();\n this.waitReadyPromise = new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.initFromStorage();\n resolve();\n }\n catch (error) {\n reject(error);\n }\n }));\n }\n /**\n * Get an item from the state\n *\n * @param key\n */\n get(key) {\n return this.state[key];\n }\n /**\n * Get the room from an ID or room instance\n *\n * @param roomOrId\n */\n getRoom(roomOrId) {\n const room = MatrixRoom_1.MatrixRoom.from(roomOrId, MatrixRoom_1.MatrixRoomStatus.UNKNOWN);\n return this.state.rooms[room.id] || room;\n }\n /**\n * Update the state with a partial state\n *\n * @param stateUpdate\n */\n update(stateUpdate) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.waitReady();\n const oldState = Object.assign({}, this.state);\n this.setState(stateUpdate);\n this.updateStorage(stateUpdate);\n this.notifyListeners(oldState, this.state, stateUpdate);\n });\n }\n /**\n * Register listeners that are called once the state has changed\n *\n * @param listener\n * @param subscribed\n */\n onStateChanged(listener, ...subscribed) {\n if (subscribed.length > 0) {\n subscribed.forEach((key) => {\n this.onStateChangedListeners.set(key, listener);\n });\n }\n else {\n this.onStateChangedListeners.set('all', listener);\n }\n }\n /**\n * A promise that resolves once the client is ready\n */\n waitReady() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.waitReadyPromise;\n });\n }\n /**\n * Read state from storage\n */\n initFromStorage() {\n return __awaiter(this, void 0, void 0, function* () {\n const preserved = yield this.storage.get(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE);\n this.setState(preserved);\n });\n }\n /**\n * Prepare data before persisting it in storage\n *\n * @param toStore\n */\n prepareData(toStore) {\n const requiresPreparation = ['rooms'];\n const toStoreCopy = requiresPreparation.some((key) => toStore[key] !== undefined)\n ? JSON.parse(JSON.stringify(toStore))\n : toStore;\n // there is no need for saving messages in a persistent storage\n Object.values(toStoreCopy.rooms || {}).forEach((room) => {\n room.messages = [];\n });\n return toStoreCopy;\n }\n /**\n * Persist state in storage\n *\n * @param stateUpdate\n */\n updateStorage(stateUpdate) {\n const updatedCachedFields = Object.entries(stateUpdate).filter(([key, value]) => PRESERVED_FIELDS.includes(key) && Boolean(value));\n if (updatedCachedFields.length > 0) {\n const filteredState = {};\n PRESERVED_FIELDS.forEach((key) => {\n filteredState[key] = this.state[key];\n });\n // sync method, latest-wins write — observe rejection so it surfaces in logs.\n this.storage\n .set(octez_connect_types_1.StorageKey.MATRIX_PRESERVED_STATE, this.prepareData(filteredState))\n .catch((error) => logger.error('updateStorage', 'failed to persist matrix state', error));\n }\n }\n /**\n * Set the state\n *\n * @param partialState\n */\n setState(partialState) {\n this.state = {\n isRunning: partialState.isRunning || this.state.isRunning,\n userId: partialState.userId || this.state.userId,\n deviceId: partialState.deviceId || this.state.deviceId,\n txnNo: partialState.txnNo || this.state.txnNo,\n accessToken: partialState.accessToken || this.state.accessToken,\n syncToken: partialState.syncToken || this.state.syncToken,\n pollingTimeout: partialState.pollingTimeout || this.state.pollingTimeout,\n pollingRetries: partialState.pollingRetries || this.state.pollingRetries,\n rooms: this.mergeRooms(this.state.rooms, partialState.rooms)\n };\n }\n /**\n * Merge room records and eliminate duplicates\n *\n * @param oldRooms\n * @param _newRooms\n */\n mergeRooms(oldRooms, _newRooms) {\n if (!_newRooms) {\n return oldRooms;\n }\n const newRooms = Array.isArray(_newRooms) ? _newRooms : Object.values(_newRooms);\n const merged = Object.assign({}, oldRooms);\n newRooms.forEach((newRoom) => {\n merged[newRoom.id] = MatrixRoom_1.MatrixRoom.merge(newRoom, oldRooms[newRoom.id]);\n });\n return merged;\n }\n /**\n * Notify listeners of state changes\n *\n * @param oldState\n * @param newState\n * @param stateChange\n */\n notifyListeners(oldState, newState, stateChange) {\n const listenForAll = this.onStateChangedListeners.get('all');\n if (listenForAll) {\n listenForAll(oldState, newState, stateChange);\n }\n (0, octez_connect_utils_1.keys)(stateChange)\n .filter((key) => stateChange[key] !== undefined)\n .forEach((key) => {\n const listener = this.onStateChangedListeners.get(key);\n if (listener) {\n listener(oldState, newState, stateChange);\n }\n });\n }\n}\nexports.MatrixClientStore = MatrixClientStore;\n//# sourceMappingURL=MatrixClientStore.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixClientStore.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixHttpClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst logger = new octez_connect_core_1.Logger('MatrixHttpClient');\nconst CLIENT_API_R0 = '/_matrix/client/r0';\n/**\n * Handling the HTTP connection to the matrix synapse node\n */\nclass MatrixHttpClient {\n constructor(baseUrl) {\n this.baseUrl = baseUrl;\n this.abortController = new AbortController();\n }\n /**\n * Get data from the synapse node\n */\n get(endpoint, params, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('GET', endpoint, options, params);\n });\n }\n /**\n * Post data to the synapse node\n */\n post(endpoint, body, options, params) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('POST', endpoint, options, params, body);\n });\n }\n /**\n * Put data to the synapse node\n */\n put(endpoint, body, options, params) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.send('PUT', endpoint, options, params, body);\n });\n }\n cancelAllRequests() {\n return __awaiter(this, void 0, void 0, function* () {\n this.abortController.abort('Manually cancelled');\n this.abortController = new AbortController();\n });\n }\n /**\n * Send a request to the synapse node\n */\n send(method, endpoint, config, requestParams, data) {\n return __awaiter(this, void 0, void 0, function* () {\n const headers = {};\n if (data !== undefined) {\n headers['Content-Type'] = 'application/json';\n }\n if (config === null || config === void 0 ? void 0 : config.accessToken) {\n headers.Authorization = `Bearer ${config.accessToken}`;\n }\n const params = requestParams ? this.getParams(requestParams) : undefined;\n const url = this.buildUrl(this.apiUrl(CLIENT_API_R0), endpoint, params);\n let response;\n try {\n response = yield fetch(url, {\n method,\n headers,\n body: data !== undefined ? JSON.stringify(data) : undefined,\n signal: this.abortController.signal\n });\n }\n catch (error) {\n if (this.isCancellationError(error)) {\n logger.log('send', 'request cancelled');\n }\n else {\n logger.error('send', error.name, error.message);\n }\n throw error;\n }\n const payload = yield this.parseBody(response);\n if (!response.ok) {\n logger.error('send', String(response.status), response.statusText, payload);\n throw payload;\n }\n return payload;\n });\n }\n parseBody(response) {\n return __awaiter(this, void 0, void 0, function* () {\n const text = yield response.text();\n if (!text) {\n return undefined;\n }\n try {\n return JSON.parse(text);\n }\n catch (_a) {\n return text;\n }\n });\n }\n buildUrl(base, endpoint, params) {\n const path = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;\n let url = `${base}${path}`;\n if (params && Object.keys(params).length > 0) {\n const search = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n search.append(key, String(value));\n }\n url += `?${search.toString()}`;\n }\n return url;\n }\n getParams(_params) {\n if (!_params) {\n return undefined;\n }\n const params = {};\n for (const [key, value] of Object.entries(_params)) {\n if (value !== undefined) {\n params[key] = value;\n }\n }\n return params;\n }\n isCancellationError(error) {\n return (error instanceof DOMException\n ? error.name === 'AbortError'\n : (error === null || error === void 0 ? void 0 : error.name) === 'AbortError' ||\n (error === null || error === void 0 ? void 0 : error.code) === 'ERR_CANCELED');\n }\n /**\n * Construct API URL\n */\n apiUrl(...parts) {\n const apiBase = this.baseUrl.endsWith('/') ? this.baseUrl.slice(0, -1) : this.baseUrl;\n const apiParts = parts.map((path) => (path.startsWith('/') ? path.slice(1) : path));\n return [apiBase, ...apiParts].join('/');\n }\n}\nexports.MatrixHttpClient = MatrixHttpClient;\n//# sourceMappingURL=MatrixHttpClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/MatrixHttpClient.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixClientEventType = void 0;\nvar MatrixClientEventType;\n(function (MatrixClientEventType) {\n MatrixClientEventType["INVITE"] = "invite";\n MatrixClientEventType["MESSAGE"] = "message";\n})(MatrixClientEventType || (exports.MatrixClientEventType = MatrixClientEventType = {}));\n//# sourceMappingURL=MatrixClientEvent.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixClientEvent.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixMessage = exports.MatrixMessageType = void 0;\nconst events_1 = __webpack_require__(/*! ../utils/events */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js");\nvar MatrixMessageType;\n(function (MatrixMessageType) {\n MatrixMessageType["TEXT"] = "m.text";\n})(MatrixMessageType || (exports.MatrixMessageType = MatrixMessageType = {}));\nclass MatrixMessage {\n /**\n * Construct a message from a message event\n *\n * @param event\n */\n static from(event) {\n if ((0, events_1.isTextMessageEvent)(event)) {\n return new MatrixMessage(event.content.msgtype, event.sender, event.content.body, event.origin_server_ts);\n }\n // for now only text messages are supported\n return undefined;\n }\n constructor(type, sender, content, timestamp) {\n this.type = type;\n this.sender = sender;\n this.content = content;\n this.timestamp = timestamp;\n }\n}\nexports.MatrixMessage = MatrixMessage;\n//# sourceMappingURL=MatrixMessage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixRoom = exports.MatrixRoomStatus = void 0;\nconst events_1 = __webpack_require__(/*! ../utils/events */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js");\nconst MatrixMessage_1 = __webpack_require__(/*! ./MatrixMessage */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js");\nvar MatrixRoomStatus;\n(function (MatrixRoomStatus) {\n MatrixRoomStatus[MatrixRoomStatus["UNKNOWN"] = 0] = "UNKNOWN";\n MatrixRoomStatus[MatrixRoomStatus["JOINED"] = 1] = "JOINED";\n MatrixRoomStatus[MatrixRoomStatus["INVITED"] = 2] = "INVITED";\n MatrixRoomStatus[MatrixRoomStatus["LEFT"] = 3] = "LEFT";\n})(MatrixRoomStatus || (exports.MatrixRoomStatus = MatrixRoomStatus = {}));\nclass MatrixRoom {\n /**\n * Reconstruct rooms from a sync response\n *\n * @param roomSync\n */\n static fromSync(roomSync) {\n var _a, _b, _c;\n if (!roomSync) {\n return [];\n }\n function create(rooms, creator) {\n return Object.entries(rooms).map(([id, room]) => creator(id, room));\n }\n return [\n ...create((_a = roomSync.join) !== null && _a !== void 0 ? _a : {}, MatrixRoom.fromJoined),\n ...create((_b = roomSync.invite) !== null && _b !== void 0 ? _b : {}, MatrixRoom.fromInvited),\n ...create((_c = roomSync.leave) !== null && _c !== void 0 ? _c : {}, MatrixRoom.fromLeft)\n ];\n }\n /**\n * Reconstruct a room from an ID or object\n *\n * @param roomOrId\n * @param status\n */\n static from(roomOrId, status) {\n return typeof roomOrId === \'string\'\n ? new MatrixRoom(roomOrId, status || MatrixRoomStatus.UNKNOWN)\n : status !== undefined\n ? new MatrixRoom(roomOrId.id, status, roomOrId.members, roomOrId.messages)\n : roomOrId;\n }\n /**\n * Merge new and old state and remove duplicates\n *\n * @param newState\n * @param previousState\n */\n static merge(newState, previousState) {\n if (!previousState || previousState.id !== newState.id) {\n return MatrixRoom.from(newState);\n }\n return new MatrixRoom(newState.id, newState.status, [...previousState.members, ...newState.members].filter((member, index, array) => array.indexOf(member) === index), [...previousState.messages, ...newState.messages]);\n }\n /**\n * Create a room from a join\n *\n * @param id\n * @param joined\n */\n static fromJoined(id, joined) {\n const events = [...joined.state.events, ...joined.timeline.events];\n const members = MatrixRoom.getMembersFromEvents(events);\n const messages = MatrixRoom.getMessagesFromEvents(events);\n return new MatrixRoom(id, MatrixRoomStatus.JOINED, members, messages);\n }\n /**\n * Create a room from an invite\n *\n * @param id\n * @param invited\n */\n static fromInvited(id, invited) {\n const members = MatrixRoom.getMembersFromEvents(invited.invite_state.events);\n return new MatrixRoom(id, MatrixRoomStatus.INVITED, members);\n }\n /**\n * Create a room from a leave\n *\n * @param id\n * @param left\n */\n static fromLeft(id, left) {\n const events = [...left.state.events, ...left.timeline.events];\n const members = MatrixRoom.getMembersFromEvents(events);\n const messages = MatrixRoom.getMessagesFromEvents(events);\n return new MatrixRoom(id, MatrixRoomStatus.LEFT, members, messages);\n }\n /**\n * Extract members from an event\n *\n * @param events\n */\n static getMembersFromEvents(events) {\n return MatrixRoom.getUniqueEvents(events.filter((event) => (0, events_1.isCreateEvent)(event) || (0, events_1.isJoinEvent)(event)))\n .map((event) => event.sender)\n .filter((member, index, array) => array.indexOf(member) === index);\n }\n /**\n * Extract messages from an event\n *\n * @param events\n */\n static getMessagesFromEvents(events) {\n return MatrixRoom.getUniqueEvents(events.filter(events_1.isMessageEvent))\n .map((event) => MatrixMessage_1.MatrixMessage.from(event))\n .filter(Boolean);\n }\n /**\n * Get unique events and remove duplicates\n *\n * @param events\n */\n static getUniqueEvents(events) {\n const eventIds = {};\n const uniqueEvents = [];\n events.forEach((event, index) => {\n const eventId = event.event_id;\n if (eventId === undefined || !(eventId in eventIds)) {\n if (eventId !== undefined) {\n eventIds[eventId] = index;\n }\n uniqueEvents.push(event);\n }\n });\n return uniqueEvents;\n }\n constructor(id, status = MatrixRoomStatus.UNKNOWN, members = [], messages = []) {\n this.id = id;\n this.status = status;\n this.members = members;\n this.messages = messages;\n }\n}\nexports.MatrixRoom = MatrixRoom;\n//# sourceMappingURL=MatrixRoom.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js"(__unused_webpack_module,exports){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixEventService = void 0;\n/**\n * A service to help with matrix event management\n */\nclass MatrixEventService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n this.cachedPromises = new Map();\n }\n /**\n * Get the latest state from the matrix node\n *\n * @param accessToken\n * @param options\n */\n sync(accessToken, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.withCache('sync', () => this.httpClient.get('/sync', {\n timeout: options ? options.pollingTimeout : undefined,\n since: options ? options.syncToken : undefined\n }, { accessToken }));\n });\n }\n /**\n * Send a message to a room\n *\n * @param accessToken\n * @param room\n * @param content\n * @param txnId\n */\n sendMessage(accessToken, roomId, content, txnId) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => this.scheduleEvent({\n accessToken,\n roomId,\n type: 'm.room.message',\n content,\n txnId,\n onSuccess: resolve,\n onError: reject\n }));\n });\n }\n /**\n * Schedules an event to be sent to the node\n *\n * @param event\n */\n scheduleEvent(event) {\n // TODO: actual scheduling\n this.sendEvent(event);\n }\n /**\n * Send an event to the matrix node\n *\n * @param scheduledEvent\n */\n sendEvent(scheduledEvent) {\n return __awaiter(this, void 0, void 0, function* () {\n const { roomId, type, txnId, content, accessToken } = scheduledEvent;\n try {\n const response = yield this.httpClient.put(`/rooms/${encodeURIComponent(roomId)}/send/${type}/${encodeURIComponent(txnId)}`, content, { accessToken });\n scheduledEvent.onSuccess(response);\n }\n catch (error) {\n scheduledEvent.onError(error);\n }\n });\n }\n /**\n * Check the cache when interacting with the Matrix node, if there is an already ongoing call for the specified key, return its promise instead of duplicating the call.\n *\n * @param key\n * @param promiseProvider\n */\n withCache(key, promiseProvider) {\n let promise = this.cachedPromises.get(key);\n if (!promise) {\n promise = promiseProvider().finally(() => {\n this.cachedPromises.delete(key);\n });\n this.cachedPromises.set(key, promise);\n }\n return promise;\n }\n}\nexports.MatrixEventService = MatrixEventService;\n//# sourceMappingURL=MatrixEventService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixEventService.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.MatrixRoomService = void 0;\nconst MatrixRoom_1 = __webpack_require__(/*! ../models/MatrixRoom */ "./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixRoom.js");\n/**\n * A service to help with matrix room management\n */\nclass MatrixRoomService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n /**\n * Create a room\n *\n * @param accessToken\n * @param config\n */\n createRoom(accessToken_1) {\n return __awaiter(this, arguments, void 0, function* (accessToken, config = {}) {\n return this.httpClient.post(\'/createRoom\', config, { accessToken });\n });\n }\n /**\n * Invite a user to a room\n *\n * @param accessToken\n * @param user\n * @param room\n */\n inviteToRoom(accessToken, user, room) {\n return __awaiter(this, void 0, void 0, function* () {\n if (room.status !== MatrixRoom_1.MatrixRoomStatus.JOINED && room.status !== MatrixRoom_1.MatrixRoomStatus.UNKNOWN) {\n return Promise.reject(`User is not a member of room ${room.id}.`);\n }\n return this.httpClient.post(`/rooms/${encodeURIComponent(room.id)}/invite`, { user_id: user }, { accessToken });\n });\n }\n /**\n * Join a specific room\n *\n * @param accessToken\n * @param room\n */\n joinRoom(accessToken, room) {\n return __awaiter(this, void 0, void 0, function* () {\n if (room.status === MatrixRoom_1.MatrixRoomStatus.JOINED) {\n return Promise.resolve({ room_id: room.id });\n }\n return this.httpClient.post(`/rooms/${encodeURIComponent(room.id)}/join`, {}, { accessToken });\n });\n }\n /**\n * Get all joined rooms\n *\n * @param accessToken\n */\n getJoinedRooms(accessToken) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.httpClient.get(`/joined_rooms`, undefined, { accessToken });\n });\n }\n}\nexports.MatrixRoomService = MatrixRoomService;\n//# sourceMappingURL=MatrixRoomService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixRoomService.js?\n}')},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js"(__unused_webpack_module,exports){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MatrixUserService = void 0;\nclass MatrixUserService {\n constructor(httpClient) {\n this.httpClient = httpClient;\n }\n /**\n * Log in to the matrix node with username and password\n *\n * @param user\n * @param password\n * @param deviceId\n */\n login(user, password, deviceId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.httpClient.post('/login', {\n type: 'm.login.password',\n identifier: {\n type: 'm.id.user',\n user\n },\n password,\n device_id: deviceId\n });\n });\n }\n}\nexports.MatrixUserService = MatrixUserService;\n//# sourceMappingURL=MatrixUserService.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/services/MatrixUserService.js?\n}")},"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isTextMessageEvent = exports.isMessageEvent = exports.isJoinEvent = exports.isCreateEvent = void 0;\nconst MatrixMessage_1 = __webpack_require__(/*! ../models/MatrixMessage */ \"./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/models/MatrixMessage.js\");\n/**\n * Check if an event is a create event\n *\n * @param event MatrixStateEvent\n */\nconst isCreateEvent = (event) => event.type === 'm.room.create' && event.content instanceof Object && 'creator' in event.content;\nexports.isCreateEvent = isCreateEvent;\n/**\n * Check if an event is a join event\n *\n * @param event MatrixStateEvent\n */\nconst isJoinEvent = (event) => event.type === 'm.room.member' &&\n event.content instanceof Object &&\n 'membership' in event.content &&\n // eslint-disable-next-line dot-notation\n event.content['membership'] === 'join';\nexports.isJoinEvent = isJoinEvent;\n/**\n * Check if an event is a message event\n *\n * @param event MatrixStateEvent\n */\nconst isMessageEvent = (event) => event.type === 'm.room.message';\nexports.isMessageEvent = isMessageEvent;\n/**\n * Check if an event is a text message event\n *\n * @param event MatrixStateEvent\n */\nconst isTextMessageEvent = (event) => (0, exports.isMessageEvent)(event) &&\n event.content instanceof Object &&\n 'msgtype' in event.content &&\n // eslint-disable-next-line dot-notation\n event.content['msgtype'] === MatrixMessage_1.MatrixMessageType.TEXT;\nexports.isTextMessageEvent = isTextMessageEvent;\n//# sourceMappingURL=events.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-transport-matrix/dist/cjs/matrix-client/utils/events.js?\n}")},"./packages/octez.connect-types/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ColorMode = exports.defaultValues = exports.ExtendedWalletConnectPairingResponse = exports.ExtendedWalletConnectPairingRequest = exports.WalletConnectPairingRequest = exports.WalletConnectPairingResponse = exports.ExtendedP2PPairingResponse = exports.ExtendedP2PPairingRequest = exports.P2PPairingResponse = exports.P2PPairingRequest = exports.ExtendedPostMessagePairingResponse = exports.ExtendedPostMessagePairingRequest = exports.PostMessagePairingResponse = exports.PostMessagePairingRequest = exports.StorageKey = exports.Storage = exports.TransportType = exports.TransportStatus = exports.BeaconErrorType = exports.ExtensionMessageTarget = exports.SigningType = exports.Origin = exports.PermissionScope = exports.BeaconMessageType = exports.NetworkType = exports.TezosOperationType = void 0;\nconst BeaconMessageType_1 = __webpack_require__(/*! ./types/beacon/BeaconMessageType */ "./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js");\nObject.defineProperty(exports, "BeaconMessageType", ({ enumerable: true, get: function () { return BeaconMessageType_1.BeaconMessageType; } }));\nconst PermissionScope_1 = __webpack_require__(/*! ./types/beacon/PermissionScope */ "./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js");\nObject.defineProperty(exports, "PermissionScope", ({ enumerable: true, get: function () { return PermissionScope_1.PermissionScope; } }));\nconst NetworkType_1 = __webpack_require__(/*! ./types/beacon/NetworkType */ "./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js");\nObject.defineProperty(exports, "NetworkType", ({ enumerable: true, get: function () { return NetworkType_1.NetworkType; } }));\nconst OperationTypes_1 = __webpack_require__(/*! ./types/tezos/OperationTypes */ "./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js");\nObject.defineProperty(exports, "TezosOperationType", ({ enumerable: true, get: function () { return OperationTypes_1.TezosOperationType; } }));\nconst Origin_1 = __webpack_require__(/*! ./types/Origin */ "./packages/octez.connect-types/dist/cjs/types/Origin.js");\nObject.defineProperty(exports, "Origin", ({ enumerable: true, get: function () { return Origin_1.Origin; } }));\nconst ExtensionMessageTarget_1 = __webpack_require__(/*! ./types/ExtensionMessageTarget */ "./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js");\nObject.defineProperty(exports, "ExtensionMessageTarget", ({ enumerable: true, get: function () { return ExtensionMessageTarget_1.ExtensionMessageTarget; } }));\nconst BeaconErrorType_1 = __webpack_require__(/*! ./types/BeaconErrorType */ "./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js");\nObject.defineProperty(exports, "BeaconErrorType", ({ enumerable: true, get: function () { return BeaconErrorType_1.BeaconErrorType; } }));\nconst TransportStatus_1 = __webpack_require__(/*! ./types/transport/TransportStatus */ "./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js");\nObject.defineProperty(exports, "TransportStatus", ({ enumerable: true, get: function () { return TransportStatus_1.TransportStatus; } }));\nconst TransportType_1 = __webpack_require__(/*! ./types/transport/TransportType */ "./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js");\nObject.defineProperty(exports, "TransportType", ({ enumerable: true, get: function () { return TransportType_1.TransportType; } }));\nconst Storage_1 = __webpack_require__(/*! ./types/storage/Storage */ "./packages/octez.connect-types/dist/cjs/types/storage/Storage.js");\nObject.defineProperty(exports, "Storage", ({ enumerable: true, get: function () { return Storage_1.Storage; } }));\nconst StorageKey_1 = __webpack_require__(/*! ./types/storage/StorageKey */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js");\nObject.defineProperty(exports, "StorageKey", ({ enumerable: true, get: function () { return StorageKey_1.StorageKey; } }));\nconst StorageKeyReturnDefaults_1 = __webpack_require__(/*! ./types/storage/StorageKeyReturnDefaults */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js");\nObject.defineProperty(exports, "defaultValues", ({ enumerable: true, get: function () { return StorageKeyReturnDefaults_1.defaultValues; } }));\nconst P2PPairingRequest_1 = __webpack_require__(/*! ./types/P2PPairingRequest */ "./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js");\nObject.defineProperty(exports, "ExtendedP2PPairingRequest", ({ enumerable: true, get: function () { return P2PPairingRequest_1.ExtendedP2PPairingRequest; } }));\nObject.defineProperty(exports, "P2PPairingRequest", ({ enumerable: true, get: function () { return P2PPairingRequest_1.P2PPairingRequest; } }));\nconst SigningType_1 = __webpack_require__(/*! ./types/beacon/SigningType */ "./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js");\nObject.defineProperty(exports, "SigningType", ({ enumerable: true, get: function () { return SigningType_1.SigningType; } }));\nconst P2PPairingResponse_1 = __webpack_require__(/*! ./types/P2PPairingResponse */ "./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js");\nObject.defineProperty(exports, "ExtendedP2PPairingResponse", ({ enumerable: true, get: function () { return P2PPairingResponse_1.ExtendedP2PPairingResponse; } }));\nObject.defineProperty(exports, "P2PPairingResponse", ({ enumerable: true, get: function () { return P2PPairingResponse_1.P2PPairingResponse; } }));\nconst PostMessagePairingRequest_1 = __webpack_require__(/*! ./types/PostMessagePairingRequest */ "./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js");\nObject.defineProperty(exports, "ExtendedPostMessagePairingRequest", ({ enumerable: true, get: function () { return PostMessagePairingRequest_1.ExtendedPostMessagePairingRequest; } }));\nObject.defineProperty(exports, "PostMessagePairingRequest", ({ enumerable: true, get: function () { return PostMessagePairingRequest_1.PostMessagePairingRequest; } }));\nconst WalletConnectPairingResponse_1 = __webpack_require__(/*! ./types/WalletConnectPairingResponse */ "./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js");\nObject.defineProperty(exports, "ExtendedWalletConnectPairingResponse", ({ enumerable: true, get: function () { return WalletConnectPairingResponse_1.ExtendedWalletConnectPairingResponse; } }));\nObject.defineProperty(exports, "WalletConnectPairingResponse", ({ enumerable: true, get: function () { return WalletConnectPairingResponse_1.WalletConnectPairingResponse; } }));\nconst WalletConnectPairingRequest_1 = __webpack_require__(/*! ./types/WalletConnectPairingRequest */ "./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js");\nObject.defineProperty(exports, "ExtendedWalletConnectPairingRequest", ({ enumerable: true, get: function () { return WalletConnectPairingRequest_1.ExtendedWalletConnectPairingRequest; } }));\nObject.defineProperty(exports, "WalletConnectPairingRequest", ({ enumerable: true, get: function () { return WalletConnectPairingRequest_1.WalletConnectPairingRequest; } }));\nconst PostMessagePairingResponse_1 = __webpack_require__(/*! ./types/PostMessagePairingResponse */ "./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js");\nObject.defineProperty(exports, "ExtendedPostMessagePairingResponse", ({ enumerable: true, get: function () { return PostMessagePairingResponse_1.ExtendedPostMessagePairingResponse; } }));\nObject.defineProperty(exports, "PostMessagePairingResponse", ({ enumerable: true, get: function () { return PostMessagePairingResponse_1.PostMessagePairingResponse; } }));\nconst ColorMode_1 = __webpack_require__(/*! ./types/ColorMode */ "./packages/octez.connect-types/dist/cjs/types/ColorMode.js");\nObject.defineProperty(exports, "ColorMode", ({ enumerable: true, get: function () { return ColorMode_1.ColorMode; } }));\n__exportStar(__webpack_require__(/*! ./types/AnalyticsInterface */ "./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/beaconV3/PermissionRequest */ "./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/ui */ "./packages/octez.connect-types/dist/cjs/types/ui.js"), exports);\n__exportStar(__webpack_require__(/*! ./types/Regions */ "./packages/octez.connect-types/dist/cjs/types/Regions.js"), exports);\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/index.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=AnalyticsInterface.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/AnalyticsInterface.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconErrorType = void 0;\nvar BeaconErrorType;\n(function (BeaconErrorType) {\n /**\n * {@link BroadcastBeaconError}\n *\n * Will be returned if the user chooses that the transaction is broadcast but there is an error (eg. node not available).\n *\n * Returned by: Broadcast | Operation Request\n */\n BeaconErrorType["BROADCAST_ERROR"] = "BROADCAST_ERROR";\n /**\n * {@link NetworkNotSupportedBeaconError}\n *\n * Will be returned if the selected network is not supported by the wallet / extension.\n *\n * Returned by: Permission\n */\n BeaconErrorType["NETWORK_NOT_SUPPORTED"] = "NETWORK_NOT_SUPPORTED";\n /**\n * {@link NoAddressBeaconError}\n *\n * Will be returned if there is no address present for the protocol / network requested.\n *\n * Returned by: Permission\n */\n BeaconErrorType["NO_ADDRESS_ERROR"] = "NO_ADDRESS_ERROR";\n /**\n * {@link NoPrivateKeyBeaconError}\n *\n * Will be returned if the private key matching the sourceAddress could not be found.\n *\n * Returned by: Sign\n */\n BeaconErrorType["NO_PRIVATE_KEY_FOUND_ERROR"] = "NO_PRIVATE_KEY_FOUND_ERROR";\n /**\n * {@link NotGrantedBeaconError}\n *\n * Will be returned if the signature was blocked // (Not needed?) Permission: Will be returned if the permissions requested by the App were not granted.\n *\n * Returned by: Sign\n */\n BeaconErrorType["NOT_GRANTED_ERROR"] = "NOT_GRANTED_ERROR";\n /**\n * {@link ParametersInvalidBeaconError}\n *\n * Will be returned if any of the parameters are invalid.\n *\n * Returned by: Operation Request\n */\n BeaconErrorType["PARAMETERS_INVALID_ERROR"] = "PARAMETERS_INVALID_ERROR";\n /**\n * {@link TooManyOperationsBeaconError}\n *\n * Will be returned if too many operations were in the request and they were not able to fit into a single operation group.\n *\n * Returned by: Operation Request\n */\n BeaconErrorType["TOO_MANY_OPERATIONS"] = "TOO_MANY_OPERATIONS";\n /**\n * {@link TransactionInvalidBeaconError}\n *\n * Will be returned if the transaction is not parsable or is rejected by the node.\n *\n * Returned by: Broadcast\n */\n BeaconErrorType["TRANSACTION_INVALID_ERROR"] = "TRANSACTION_INVALID_ERROR";\n /**\n * {@link SignatureTypeNotSupportedBeaconError}\n *\n * Will be returned if the signing type is not supported.\n *\n * Returned by: Sign\n */\n BeaconErrorType["SIGNATURE_TYPE_NOT_SUPPORTED"] = "SIGNATURE_TYPE_NOT_SUPPORTED";\n // TODO: ENCRYPTION\n // /**\n // * {@link EncryptionTypeNotSupportedBeaconError}\n // *\n // * Will be returned if the encryption type is not supported.\n // *\n // * Returned by: Encrypt\n // */\n // ENCRYPTION_TYPE_NOT_SUPPORTED = \'ENCRYPTION_TYPE_NOT_SUPPORTED\',\n /**\n * {@link AbortedBeaconError}\n *\n * Will be returned if the request was aborted by the user or the wallet.\n *\n * Returned by: Permission | Operation Request | Sign Request | Broadcast\n */\n BeaconErrorType["ABORTED_ERROR"] = "ABORTED_ERROR";\n /**\n * {@link UnknownBeaconError}\n *\n * Used as a wildcard if an unexpected error occured.\n *\n * Returned by: Permission | Operation Request | Sign Request | Broadcast\n */\n BeaconErrorType["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";\n})(BeaconErrorType || (exports.BeaconErrorType = BeaconErrorType = {}));\n//# sourceMappingURL=BeaconErrorType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/BeaconErrorType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ColorMode.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ColorMode = void 0;\nvar ColorMode;\n(function (ColorMode) {\n ColorMode["LIGHT"] = "light";\n ColorMode["DARK"] = "dark";\n})(ColorMode || (exports.ColorMode = ColorMode = {}));\n//# sourceMappingURL=ColorMode.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ColorMode.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtensionMessageTarget = void 0;\n/**\n * @internalapi\n */\nvar ExtensionMessageTarget;\n(function (ExtensionMessageTarget) {\n ExtensionMessageTarget["BACKGROUND"] = "toBackground";\n ExtensionMessageTarget["PAGE"] = "toPage";\n ExtensionMessageTarget["EXTENSION"] = "toExtension";\n})(ExtensionMessageTarget || (exports.ExtensionMessageTarget = ExtensionMessageTarget = {}));\n//# sourceMappingURL=ExtensionMessageTarget.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ExtensionMessageTarget.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/Origin.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Origin = void 0;\n/**\n * @internalapi\n */\nvar Origin;\n(function (Origin) {\n Origin["WEBSITE"] = "website";\n Origin["EXTENSION"] = "extension";\n Origin["P2P"] = "p2p";\n Origin["WALLETCONNECT"] = "walletconnect";\n})(Origin || (exports.Origin = Origin = {}));\n//# sourceMappingURL=Origin.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/Origin.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedP2PPairingRequest = exports.P2PPairingRequest = void 0;\n/**\n * @internalapi\n */\nclass P2PPairingRequest {\n constructor(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl) {\n this.type = 'p2p-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.relayServer = relayServer;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.P2PPairingRequest = P2PPairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedP2PPairingRequest extends P2PPairingRequest {\n constructor(id, name, publicKey, version, relayServer, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedP2PPairingRequest = ExtendedP2PPairingRequest;\n//# sourceMappingURL=P2PPairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/P2PPairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedP2PPairingResponse = exports.P2PPairingResponse = void 0;\n/**\n * @internalapi\n */\nclass P2PPairingResponse {\n constructor(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl) {\n this.type = \'p2p-pairing-request\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.relayServer = relayServer;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.P2PPairingResponse = P2PPairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedP2PPairingResponse extends P2PPairingResponse {\n constructor(id, name, publicKey, version, relayServer, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, relayServer, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedP2PPairingResponse = ExtendedP2PPairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=P2PPairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/P2PPairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedPostMessagePairingRequest = exports.PostMessagePairingRequest = void 0;\n/**\n * @internalapi\n */\nclass PostMessagePairingRequest {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = 'postmessage-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.PostMessagePairingRequest = PostMessagePairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedPostMessagePairingRequest extends PostMessagePairingRequest {\n constructor(id, name, publicKey, version, senderId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedPostMessagePairingRequest = ExtendedPostMessagePairingRequest;\n//# sourceMappingURL=PostMessagePairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/PostMessagePairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedPostMessagePairingResponse = exports.PostMessagePairingResponse = void 0;\n/**\n * @internalapi\n */\nclass PostMessagePairingResponse {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = \'postmessage-pairing-response\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.PostMessagePairingResponse = PostMessagePairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedPostMessagePairingResponse extends PostMessagePairingResponse {\n constructor(id, name, publicKey, version, senderId, extensionId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n this.extensionId = extensionId;\n }\n}\nexports.ExtendedPostMessagePairingResponse = ExtendedPostMessagePairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=PostMessagePairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/PostMessagePairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/Regions.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Regions = void 0;\n/**\n * Geographic region where a beacon node is located. This list can be changed in the future to be more specific, but for now it should cover most general areas.\n */\nvar Regions;\n(function (Regions) {\n Regions["EUROPE_EAST"] = "europe-east";\n Regions["EUROPE_WEST"] = "europe-west";\n Regions["NORTH_AMERICA_EAST"] = "north-america-east";\n Regions["NORTH_AMERICA_WEST"] = "north-america-west";\n Regions["CENTRAL_AMERICA"] = "central-america";\n Regions["SOUTH_AMERICA"] = "south-america";\n Regions["ASIA_EAST"] = "asia-east";\n Regions["ASIA_WEST"] = "asia-west";\n Regions["AFRICA"] = "africa";\n Regions["AUSTRALIA"] = "australia";\n})(Regions || (exports.Regions = Regions = {}));\n//# sourceMappingURL=Regions.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/Regions.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js"(__unused_webpack_module,exports){"use strict";eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ExtendedWalletConnectPairingRequest = exports.WalletConnectPairingRequest = void 0;\n/**\n * @internalapi\n */\nclass WalletConnectPairingRequest {\n constructor(id, name, publicKey, version, uri, protocolVersion, icon, appUrl) {\n this.type = 'walletconnect-pairing-request';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n this.uri = uri;\n }\n}\nexports.WalletConnectPairingRequest = WalletConnectPairingRequest;\n/**\n * @internalapi\n */\nclass ExtendedWalletConnectPairingRequest extends WalletConnectPairingRequest {\n constructor(id, name, publicKey, version, senderId, uri, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, uri, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n }\n}\nexports.ExtendedWalletConnectPairingRequest = ExtendedWalletConnectPairingRequest;\n//# sourceMappingURL=WalletConnectPairingRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingRequest.js?\n}")},"./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExtendedWalletConnectPairingResponse = exports.WalletConnectPairingResponse = void 0;\n/**\n * @internalapi\n */\nclass WalletConnectPairingResponse {\n constructor(id, name, publicKey, version, protocolVersion, icon, appUrl) {\n this.type = \'walletconnect-pairing-response\';\n this.id = id;\n this.name = name;\n this.icon = icon;\n this.appUrl = appUrl;\n this.publicKey = publicKey;\n this.version = version;\n this.protocolVersion = protocolVersion;\n }\n}\nexports.WalletConnectPairingResponse = WalletConnectPairingResponse;\n/**\n * @internalapi\n */\nclass ExtendedWalletConnectPairingResponse extends WalletConnectPairingResponse {\n constructor(id, name, publicKey, version, senderId, extensionId, protocolVersion, icon, appUrl) {\n super(id, name, publicKey, version, protocolVersion, icon, appUrl);\n this.senderId = senderId;\n this.extensionId = extensionId;\n }\n}\nexports.ExtendedWalletConnectPairingResponse = ExtendedWalletConnectPairingResponse;\n// TODO: Rename to "WalletPeerInfo"?\n//# sourceMappingURL=WalletConnectPairingResponse.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/WalletConnectPairingResponse.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.BeaconMessageType = void 0;\nvar BeaconMessageType;\n(function (BeaconMessageType) {\n BeaconMessageType["BlockchainRequest"] = "blockchain_request";\n BeaconMessageType["PermissionRequest"] = "permission_request";\n BeaconMessageType["SignPayloadRequest"] = "sign_payload_request";\n // EncryptPayloadRequest = \'encrypt_payload_request\',\n BeaconMessageType["OperationRequest"] = "operation_request";\n BeaconMessageType["BroadcastRequest"] = "broadcast_request";\n BeaconMessageType["ChangeAccountRequest"] = "change_account_request";\n BeaconMessageType["BlockchainResponse"] = "blockchain_response";\n BeaconMessageType["PermissionResponse"] = "permission_response";\n BeaconMessageType["SignPayloadResponse"] = "sign_payload_response";\n // EncryptPayloadResponse = \'encrypt_payload_response\',\n BeaconMessageType["ProofOfEventChallengeRequest"] = "proof_of_event_challenge_request";\n BeaconMessageType["ProofOfEventChallengeResponse"] = "proof_of_event_challenge_response";\n BeaconMessageType["SimulatedProofOfEventChallengeRequest"] = "simulated_proof_of_event_challenge_request";\n BeaconMessageType["SimulatedProofOfEventChallengeResponse"] = "simulated_proof_of_event_challenge_response";\n BeaconMessageType["OperationResponse"] = "operation_response";\n BeaconMessageType["BroadcastResponse"] = "broadcast_response";\n BeaconMessageType["Acknowledge"] = "acknowledge";\n BeaconMessageType["Disconnect"] = "disconnect";\n BeaconMessageType["Error"] = "error";\n})(BeaconMessageType || (exports.BeaconMessageType = BeaconMessageType = {}));\n//# sourceMappingURL=BeaconMessageType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/BeaconMessageType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.NetworkType = void 0;\nvar NetworkType;\n(function (NetworkType) {\n NetworkType["MAINNET"] = "mainnet";\n /** @deprecated Ghostnet is succeeded by shadownet. */\n NetworkType["GHOSTNET"] = "ghostnet";\n NetworkType["WEEKLYNET"] = "weeklynet";\n NetworkType["DAILYNET"] = "dailynet";\n /** @deprecated Seoulnet is succeeded by tallinnnet. */\n NetworkType["SEOULNET"] = "seoulnet";\n NetworkType["SHADOWNET"] = "shadownet";\n NetworkType["TALLINNNET"] = "tallinnnet";\n NetworkType["TEZLINK_SHADOWNET"] = "tezlink-shadownet";\n NetworkType["TEZOSX_PREVIEWNET"] = "tezosx-previewnet";\n /** Tezos X L2 (Michelson runtime) — long-lived mainnet deployment. */\n NetworkType["TEZOSX_MAINNET"] = "tezosx-mainnet";\n /** Tezos X L2 (Michelson runtime) — shadownet deployment. */\n NetworkType["TEZOSX_SHADOWNET"] = "tezosx-shadownet";\n NetworkType["USHUAIANET"] = "ushuaianet";\n NetworkType["CUSTOM"] = "custom";\n})(NetworkType || (exports.NetworkType = NetworkType = {}));\n//# sourceMappingURL=NetworkType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.PermissionScope = void 0;\nvar PermissionScope;\n(function (PermissionScope) {\n PermissionScope["SIGN"] = "sign";\n PermissionScope["OPERATION_REQUEST"] = "operation_request";\n PermissionScope["ENCRYPT"] = "encrypt";\n PermissionScope["NOTIFICATION"] = "notification";\n PermissionScope["THRESHOLD"] = "threshold"; // Allows the DApp to sign transactions below a certain threshold. This is currently not fully defined and unused\n})(PermissionScope || (exports.PermissionScope = PermissionScope = {}));\n//# sourceMappingURL=PermissionScope.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/PermissionScope.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.SigningType = void 0;\nvar SigningType;\n(function (SigningType) {\n SigningType["RAW"] = "raw";\n SigningType["OPERATION"] = "operation";\n SigningType["MICHELINE"] = "micheline"; // "05" prefix\n})(SigningType || (exports.SigningType = SigningType = {}));\n//# sourceMappingURL=SigningType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beacon/SigningType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\n//# sourceMappingURL=PermissionRequest.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/beaconV3/PermissionRequest.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/Storage.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.Storage = void 0;\n/**\n * @internalapi\n *\n * The storage used in the SDK\n */\nclass Storage {\n /**\n * Returns a promise that resolves to true if the storage option is available on this platform.\n */\n static isSupported() {\n return Promise.resolve(false);\n }\n}\nexports.Storage = Storage;\n//# sourceMappingURL=Storage.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/Storage.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.StorageKey = void 0;\n/**\n * @internalapi\n */\nvar StorageKey;\n(function (StorageKey) {\n StorageKey["TRANSPORT_P2P_PEERS_DAPP"] = "beacon:communication-peers-dapp";\n StorageKey["TRANSPORT_P2P_PEERS_WALLET"] = "beacon:communication-peers-wallet";\n StorageKey["TRANSPORT_POSTMESSAGE_PEERS_DAPP"] = "beacon:postmessage-peers-dapp";\n StorageKey["TRANSPORT_POSTMESSAGE_PEERS_WALLET"] = "beacon:postmessage-peers-wallet";\n StorageKey["TRANSPORT_WALLETCONNECT_PEERS_DAPP"] = "beacon:walletconnect-peers-dapp";\n StorageKey["LAST_SELECTED_WALLET"] = "beacon:last-selected-wallet";\n StorageKey["ACCOUNTS"] = "beacon:accounts";\n StorageKey["ACTIVE_ACCOUNT"] = "beacon:active-account";\n StorageKey["PUSH_TOKENS"] = "beacon:push-tokens";\n StorageKey["BEACON_SDK_SECRET_SEED"] = "beacon:sdk-secret-seed";\n StorageKey["BEACON_LAST_ERROR"] = "beacon:beacon-last-error";\n StorageKey["APP_METADATA_LIST"] = "beacon:app-metadata-list";\n StorageKey["PERMISSION_LIST"] = "beacon:permissions";\n StorageKey["ONGOING_PROOF_OF_EVENT_CHALLENGES"] = "beacon:ongoing-proof-of-event-challenges";\n StorageKey["BEACON_SDK_VERSION"] = "beacon:sdk_version";\n StorageKey["MATRIX_PRESERVED_STATE"] = "beacon:sdk-matrix-preserved-state";\n StorageKey["MATRIX_PEER_ROOM_IDS"] = "beacon:matrix-peer-rooms";\n StorageKey["MATRIX_SELECTED_NODE"] = "beacon:matrix-selected-node";\n StorageKey["MULTI_NODE_SETUP_DONE"] = "beacon:multi-node-setup";\n StorageKey["USER_ID"] = "beacon:user-id";\n StorageKey["ENABLE_METRICS"] = "beacon:enable_metrics";\n StorageKey["WC_INIT_ERROR"] = "beacon:wc-init-error";\n StorageKey["WC_2_CORE_PAIRING"] = "wc@2:core:0.3:pairing";\n StorageKey["WC_2_CLIENT_SESSION"] = "wc@2:client:0.3:session";\n StorageKey["WC_2_CORE_KEYCHAIN"] = "wc@2:core:0.3:keychain";\n StorageKey["WC_2_CORE_MESSAGES"] = "wc@2:core:0.3:messages";\n StorageKey["WC_2_CLIENT_PROPOSAL"] = "wc@2:client:0.3:proposal";\n StorageKey["WC_2_CORE_SUBSCRIPTION"] = "wc@2:core:0.3:subscription";\n StorageKey["WC_2_CORE_HISTORY"] = "wc@2:core:0.3:history";\n StorageKey["WC_2_CORE_EXPIRER"] = "wc@2:core:0.3:expirer";\n})(StorageKey || (exports.StorageKey = StorageKey = {}));\n//# sourceMappingURL=StorageKey.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.defaultValues = void 0;\nconst StorageKey_1 = __webpack_require__(/*! ./StorageKey */ "./packages/octez.connect-types/dist/cjs/types/storage/StorageKey.js");\n/**\n * @internalapi\n */\nexports.defaultValues = {\n [StorageKey_1.StorageKey.TRANSPORT_P2P_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET]: [],\n [StorageKey_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.TRANSPORT_POSTMESSAGE_PEERS_WALLET]: [],\n [StorageKey_1.StorageKey.TRANSPORT_WALLETCONNECT_PEERS_DAPP]: [],\n [StorageKey_1.StorageKey.LAST_SELECTED_WALLET]: undefined,\n [StorageKey_1.StorageKey.ACCOUNTS]: [],\n [StorageKey_1.StorageKey.ACTIVE_ACCOUNT]: undefined,\n [StorageKey_1.StorageKey.PUSH_TOKENS]: [],\n [StorageKey_1.StorageKey.BEACON_SDK_SECRET_SEED]: undefined,\n [StorageKey_1.StorageKey.BEACON_LAST_ERROR]: undefined,\n [StorageKey_1.StorageKey.APP_METADATA_LIST]: [],\n [StorageKey_1.StorageKey.PERMISSION_LIST]: [],\n [StorageKey_1.StorageKey.ONGOING_PROOF_OF_EVENT_CHALLENGES]: [],\n [StorageKey_1.StorageKey.BEACON_SDK_VERSION]: undefined,\n [StorageKey_1.StorageKey.MATRIX_PRESERVED_STATE]: {},\n [StorageKey_1.StorageKey.MATRIX_PEER_ROOM_IDS]: {},\n [StorageKey_1.StorageKey.MATRIX_SELECTED_NODE]: undefined,\n [StorageKey_1.StorageKey.MULTI_NODE_SETUP_DONE]: undefined,\n [StorageKey_1.StorageKey.WC_2_CLIENT_SESSION]: undefined,\n [StorageKey_1.StorageKey.USER_ID]: undefined,\n [StorageKey_1.StorageKey.ENABLE_METRICS]: undefined,\n [StorageKey_1.StorageKey.WC_INIT_ERROR]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_PAIRING]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_KEYCHAIN]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_MESSAGES]: undefined,\n [StorageKey_1.StorageKey.WC_2_CLIENT_PROPOSAL]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_SUBSCRIPTION]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_HISTORY]: undefined,\n [StorageKey_1.StorageKey.WC_2_CORE_EXPIRER]: undefined\n};\n//# sourceMappingURL=StorageKeyReturnDefaults.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/storage/StorageKeyReturnDefaults.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TezosOperationType = void 0;\n/**\n * @publicapi\n * @category Tezos\n */\nvar TezosOperationType;\n(function (TezosOperationType) {\n TezosOperationType["ACTIVATE_ACCOUNT"] = "activate_account";\n TezosOperationType["ATTESTATION"] = "attestation";\n TezosOperationType["ATTESTATIONS_AGGREGATE"] = "attestations_aggregate";\n TezosOperationType["ATTESTATION_WITH_DAL"] = "attestation_with_dal";\n TezosOperationType["BALLOT"] = "ballot";\n TezosOperationType["DAL_PUBLISH_COMMITMENT"] = "dal_publish_commitment";\n TezosOperationType["DELEGATION"] = "delegation";\n TezosOperationType["DRAIN_DELEGATE"] = "drain_delegate";\n TezosOperationType["DOUBLE_ATTESTATION_EVIDENCE"] = "double_attestation_evidence";\n TezosOperationType["DOUBLE_BAKING_EVIDENCE"] = "double_baking_evidence";\n TezosOperationType["DOUBLE_ENDORSEMENT_EVIDENCE"] = "double_endorsement_evidence";\n TezosOperationType["DOUBLE_PREATTESTATION_EVIDENCE"] = "double_preattestation_evidence";\n TezosOperationType["DOUBLE_PREENDORSEMENT_EVIDENCE"] = "double_preendorsement_evidence";\n TezosOperationType["ENDORSEMENT"] = "endorsement";\n TezosOperationType["ENDORSEMENT_WITH_DAL"] = "endorsement_with_dal";\n TezosOperationType["EVENT"] = "event";\n TezosOperationType["FAILING_NOOP"] = "failing_noop";\n TezosOperationType["INCREASE_PAID_STORAGE"] = "increase_paid_storage";\n TezosOperationType["ORIGINATION"] = "origination";\n TezosOperationType["PREATTESTATION"] = "preattestation";\n TezosOperationType["PREATTESTATIONS_AGGREGATE"] = "preattestations_aggregate";\n TezosOperationType["PREENDORSEMENT"] = "preendorsement";\n TezosOperationType["PROPOSALS"] = "proposals";\n TezosOperationType["REGISTER_GLOBAL_CONSTANT"] = "register_global_constant";\n TezosOperationType["REVEAL"] = "reveal";\n TezosOperationType["SEED_NONCE_REVELATION"] = "seed_nonce_revelation";\n TezosOperationType["SET_DEPOSITS_LIMIT"] = "set_deposits_limit";\n TezosOperationType["SMART_ROLLUP_ADD_MESSAGES"] = "smart_rollup_add_messages";\n TezosOperationType["SMART_ROLLUP_CEMENT"] = "smart_rollup_cement";\n TezosOperationType["SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message";\n TezosOperationType["SMART_ROLLUP_ORIGINATE"] = "smart_rollup_originate";\n TezosOperationType["SMART_ROLLUP_PUBLISH"] = "smart_rollup_publish";\n TezosOperationType["SMART_ROLLUP_RECOVER_BOND"] = "smart_rollup_recover_bond";\n TezosOperationType["SMART_ROLLUP_REFUTE"] = "smart_rollup_refute";\n TezosOperationType["SMART_ROLLUP_TIMEOUT"] = "smart_rollup_timeout";\n TezosOperationType["TICKET_UPDATES"] = "ticket_updates";\n TezosOperationType["TRANSACTION"] = "transaction";\n TezosOperationType["TRANSFER_TICKET"] = "transfer_ticket";\n TezosOperationType["UPDATE_CONSENSUS_KEY"] = "update_consensus_key";\n TezosOperationType["UPDATE_COMPANION_KEY"] = "update_companion_key";\n TezosOperationType["VDF_REVELATION"] = "vdf_revelation";\n TezosOperationType["DOUBLE_CONSENSUS_OPERATION_EVIDENCE"] = "double_consensus_operation_evidence";\n TezosOperationType["DAL_ENTRAPMENT_EVIDENCE"] = "dal_entrapment_evidence";\n})(TezosOperationType || (exports.TezosOperationType = TezosOperationType = {}));\n//# sourceMappingURL=OperationTypes.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/tezos/OperationTypes.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransportStatus = void 0;\nvar TransportStatus;\n(function (TransportStatus) {\n TransportStatus["NOT_CONNECTED"] = "NOT_CONNECTED";\n TransportStatus["CONNECTING"] = "CONNECTING";\n TransportStatus["CONNECTED"] = "CONNECTED";\n TransportStatus["SECONDARY_TAB_CONNECTED"] = "SECONDARY_TAB_CONNECTED";\n})(TransportStatus || (exports.TransportStatus = TransportStatus = {}));\n//# sourceMappingURL=TransportStatus.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/transport/TransportStatus.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.TransportType = void 0;\n/**\n * @internalapi\n */\nvar TransportType;\n(function (TransportType) {\n TransportType["CHROME_MESSAGE"] = "chrome_message";\n TransportType["WALLETCONNECT"] = "walletconnect";\n TransportType["POST_MESSAGE"] = "post_message";\n TransportType["LEDGER"] = "ledger";\n TransportType["P2P"] = "p2p";\n})(TransportType || (exports.TransportType = TransportType = {}));\n//# sourceMappingURL=TransportType.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/transport/TransportType.js?\n}')},"./packages/octez.connect-types/dist/cjs/types/ui.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nconst NetworkType_1 = __webpack_require__(/*! ./beacon/NetworkType */ "./packages/octez.connect-types/dist/cjs/types/beacon/NetworkType.js");\n//# sourceMappingURL=ui.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-types/dist/cjs/types/ui.js?\n}')},"./packages/octez.connect-utils/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.secretbox_MACBYTES = exports.secretbox_NONCEBYTES = exports.CONTRACT_PREFIX = exports.fetchWalletListsFromGitHub = exports.loadWalletLists = exports.generateGUID = exports.sign = exports.generateKeyPairFromSeed = exports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = exports.createSenderSessionKey = exports.createReceiverSessionKey = exports.isPublicKeySC = exports.encodePoeChallengePayload = exports.prefixPublicKey = exports.isValidAddress = exports.signMessage = exports.recipientString = exports.openCryptobox = exports.sealCryptobox = exports.getHexHash = exports.encryptCryptoboxPayload = exports.decryptCryptoboxPayload = exports.getAddressFromPublicKey = exports.toHex = exports.getKeypairFromSeed = exports.ExposedPromiseStatus = exports.ExposedPromise = exports.keys = void 0;\nvar keys_1 = __webpack_require__(/*! ./utils/keys */ "./packages/octez.connect-utils/dist/cjs/utils/keys.js");\nObject.defineProperty(exports, "keys", ({ enumerable: true, get: function () { return keys_1.keys; } }));\nvar exposed_promise_1 = __webpack_require__(/*! ./utils/exposed-promise */ "./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js");\nObject.defineProperty(exports, "ExposedPromise", ({ enumerable: true, get: function () { return exposed_promise_1.ExposedPromise; } }));\nObject.defineProperty(exports, "ExposedPromiseStatus", ({ enumerable: true, get: function () { return exposed_promise_1.ExposedPromiseStatus; } }));\nvar crypto_1 = __webpack_require__(/*! ./utils/crypto */ "./packages/octez.connect-utils/dist/cjs/utils/crypto.js");\nObject.defineProperty(exports, "getKeypairFromSeed", ({ enumerable: true, get: function () { return crypto_1.getKeypairFromSeed; } }));\nObject.defineProperty(exports, "toHex", ({ enumerable: true, get: function () { return crypto_1.toHex; } }));\nObject.defineProperty(exports, "getAddressFromPublicKey", ({ enumerable: true, get: function () { return crypto_1.getAddressFromPublicKey; } }));\nObject.defineProperty(exports, "decryptCryptoboxPayload", ({ enumerable: true, get: function () { return crypto_1.decryptCryptoboxPayload; } }));\nObject.defineProperty(exports, "encryptCryptoboxPayload", ({ enumerable: true, get: function () { return crypto_1.encryptCryptoboxPayload; } }));\nObject.defineProperty(exports, "getHexHash", ({ enumerable: true, get: function () { return crypto_1.getHexHash; } }));\nObject.defineProperty(exports, "sealCryptobox", ({ enumerable: true, get: function () { return crypto_1.sealCryptobox; } }));\nObject.defineProperty(exports, "openCryptobox", ({ enumerable: true, get: function () { return crypto_1.openCryptobox; } }));\nObject.defineProperty(exports, "recipientString", ({ enumerable: true, get: function () { return crypto_1.recipientString; } }));\nObject.defineProperty(exports, "signMessage", ({ enumerable: true, get: function () { return crypto_1.signMessage; } }));\nObject.defineProperty(exports, "isValidAddress", ({ enumerable: true, get: function () { return crypto_1.isValidAddress; } }));\nObject.defineProperty(exports, "prefixPublicKey", ({ enumerable: true, get: function () { return crypto_1.prefixPublicKey; } }));\nObject.defineProperty(exports, "encodePoeChallengePayload", ({ enumerable: true, get: function () { return crypto_1.encodePoeChallengePayload; } }));\nObject.defineProperty(exports, "isPublicKeySC", ({ enumerable: true, get: function () { return crypto_1.isPublicKeySC; } }));\nObject.defineProperty(exports, "createReceiverSessionKey", ({ enumerable: true, get: function () { return crypto_1.createReceiverSessionKey; } }));\nObject.defineProperty(exports, "createSenderSessionKey", ({ enumerable: true, get: function () { return crypto_1.createSenderSessionKey; } }));\nvar ed25519_1 = __webpack_require__(/*! ./utils/ed25519 */ "./packages/octez.connect-utils/dist/cjs/utils/ed25519.js");\nObject.defineProperty(exports, "convertPublicKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertPublicKeyToX25519; } }));\nObject.defineProperty(exports, "convertSecretKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertSecretKeyToX25519; } }));\nObject.defineProperty(exports, "generateKeyPairFromSeed", ({ enumerable: true, get: function () { return ed25519_1.generateKeyPairFromSeed; } }));\nObject.defineProperty(exports, "sign", ({ enumerable: true, get: function () { return ed25519_1.sign; } }));\nvar generate_uuid_1 = __webpack_require__(/*! ./utils/generate-uuid */ "./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js");\nObject.defineProperty(exports, "generateGUID", ({ enumerable: true, get: function () { return generate_uuid_1.generateGUID; } }));\nvar wallet_list_loader_1 = __webpack_require__(/*! ./wallet-list-loader */ "./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js");\nObject.defineProperty(exports, "loadWalletLists", ({ enumerable: true, get: function () { return wallet_list_loader_1.loadWalletLists; } }));\nvar wallet_list_fetcher_1 = __webpack_require__(/*! ./wallet-list-fetcher */ "./packages/octez.connect-utils/dist/cjs/wallet-list-fetcher.js");\nObject.defineProperty(exports, "fetchWalletListsFromGitHub", ({ enumerable: true, get: function () { return wallet_list_fetcher_1.fetchWalletListsFromGitHub; } }));\nexports.CONTRACT_PREFIX = \'KT1\';\nexports.secretbox_NONCEBYTES = 24; // crypto_secretbox_NONCEBYTES\nexports.secretbox_MACBYTES = 16; // crypto_secretbox_MACBYTES\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/index.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/crypto.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ \"./node_modules/buffer/index.js\")[\"Buffer\"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isValidAddress = exports.signMessage = exports.secretbox_MACBYTES = exports.secretbox_NONCEBYTES = void 0;\nexports.toHex = toHex;\nexports.getHexHash = getHexHash;\nexports.getKeypairFromSeed = getKeypairFromSeed;\nexports.encryptCryptoboxPayload = encryptCryptoboxPayload;\nexports.decryptCryptoboxPayload = decryptCryptoboxPayload;\nexports.sealCryptobox = sealCryptobox;\nexports.openCryptobox = openCryptobox;\nexports.getAddressFromPublicKey = getAddressFromPublicKey;\nexports.prefixPublicKey = prefixPublicKey;\nexports.recipientString = recipientString;\nexports.encodePoeChallengePayload = encodePoeChallengePayload;\nexports.isPublicKeySC = isPublicKeySC;\nexports.createReceiverSessionKey = createReceiverSessionKey;\nexports.createSenderSessionKey = createSenderSessionKey;\nconst bs58check_1 = __importDefault(__webpack_require__(/*! bs58check */ \"./node_modules/bs58check/src/cjs/index.cjs\"));\nconst nacl_1 = __webpack_require__(/*! @stablelib/nacl */ \"./node_modules/@stablelib/nacl/lib/nacl.js\");\nconst random_1 = __webpack_require__(/*! @stablelib/random */ \"./node_modules/@stablelib/random/lib/random.js\");\nconst utf8_1 = __webpack_require__(/*! @stablelib/utf8 */ \"./node_modules/@stablelib/utf8/lib/utf8.js\");\nconst blake2b_1 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst x25519_session_1 = __webpack_require__(/*! @stablelib/x25519-session */ \"./node_modules/@stablelib/x25519-session/lib/x25519-session.js\");\nconst blake2b_2 = __webpack_require__(/*! @stablelib/blake2b */ \"./node_modules/@stablelib/blake2b/lib/blake2b.js\");\nconst bytes_1 = __webpack_require__(/*! @stablelib/bytes */ \"./node_modules/@stablelib/bytes/lib/bytes.js\");\nconst ed25519_1 = __webpack_require__(/*! ./ed25519 */ \"./packages/octez.connect-utils/dist/cjs/utils/ed25519.js\");\nexports.secretbox_NONCEBYTES = 24; // crypto_secretbox_NONCEBYTES\nexports.secretbox_MACBYTES = 16; // crypto_secretbox_MACBYTES\nconst POE_CHALLENGE_BYTES_LENGTH = 20;\nconst POE_CHALLENGE_PREFIX = 110;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\n/**\n * Convert a value to hex\n *\n * @param value\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction toHex(value) {\n return Buffer.from(value).toString('hex');\n}\n/**\n * Get the hex hash of a value\n *\n * @param key\n */\nfunction getHexHash(key) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof key === 'string') {\n return toHex((0, blake2b_1.hash)((0, utf8_1.encode)(key), 32));\n }\n return toHex((0, blake2b_1.hash)(key, 32));\n });\n}\n/**\n * Get a keypair from a seed\n *\n * @param seed\n */\nfunction getKeypairFromSeed(seed) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, ed25519_1.generateKeyPairFromSeed)((0, blake2b_1.hash)((0, utf8_1.encode)(seed), 32));\n });\n}\n/**\n * Encrypt a message with a shared key\n *\n * @param message\n * @param sharedKey\n */\nfunction encryptCryptoboxPayload(message, sharedKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const nonce = Buffer.from((0, random_1.randomBytes)(exports.secretbox_NONCEBYTES));\n const combinedPayload = Buffer.concat([\n nonce,\n Buffer.from((0, nacl_1.secretBox)(sharedKey, nonce, Buffer.from(message, 'utf8')))\n ]);\n return toHex(combinedPayload);\n });\n}\n/**\n * Decrypt a message with a shared key\n *\n * @param payload\n * @param sharedKey\n */\nfunction decryptCryptoboxPayload(payload, sharedKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const nonce = payload.slice(0, exports.secretbox_NONCEBYTES);\n const ciphertext = payload.slice(exports.secretbox_NONCEBYTES);\n const openBox = (0, nacl_1.openSecretBox)(sharedKey, nonce, ciphertext);\n if (!openBox) {\n throw new Error('Decryption failed');\n }\n return Buffer.from(openBox).toString('utf8');\n });\n}\n/**\n * Encrypt a message with a public key\n *\n * @param payload\n * @param publicKey\n */\nfunction sealCryptobox(payload, otherPublicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const kxOtherPublicKey = (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(otherPublicKey)); // Secret bytes to scalar bytes\n const keypair = (0, nacl_1.generateKeyPair)();\n const state = new blake2b_2.BLAKE2b(24);\n const nonce = state.update(keypair.publicKey, 32).update(kxOtherPublicKey, 32).digest();\n const bytesPayload = typeof payload === 'string' ? (0, utf8_1.encode)(payload) : payload;\n const encryptedMessage = (0, nacl_1.box)(kxOtherPublicKey, keypair.secretKey, nonce, bytesPayload);\n return toHex((0, bytes_1.concat)(keypair.publicKey, encryptedMessage));\n });\n}\n/**\n * Decrypt a message with public + private key\n *\n * @param encryptedPayload\n * @param publicKey\n * @param privateKey\n */\nfunction openCryptobox(encryptedPayload, publicKey, privateKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const kxSelfPrivateKey = (0, ed25519_1.convertSecretKeyToX25519)(Buffer.from(privateKey)); // Secret bytes to scalar bytes\n const kxSelfPublicKey = (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(publicKey)); // Secret bytes to scalar bytes\n const bytesPayload = typeof encryptedPayload === 'string' ? (0, utf8_1.encode)(encryptedPayload) : encryptedPayload;\n const epk = bytesPayload.slice(0, 32);\n const ciphertext = bytesPayload.slice(32);\n const state = new blake2b_2.BLAKE2b(24);\n const nonce = state.update(epk, 32).update(kxSelfPublicKey, 32).digest();\n const decryptedMessage2 = (0, nacl_1.openBox)(epk, kxSelfPrivateKey, nonce, ciphertext);\n if (!decryptedMessage2) {\n throw new Error('Decryption failed');\n }\n return Buffer.from(decryptedMessage2).toString();\n });\n}\n/**\n * Get an address from the public key\n *\n * @param publicKey\n */\nfunction getAddressFromPublicKey(publicKey) {\n return __awaiter(this, void 0, void 0, function* () {\n const prefixes = {\n // tz1...\n edpk: {\n length: 54,\n prefix: Buffer.from(new Uint8Array([6, 161, 159]))\n },\n // tz2...\n sppk: {\n length: 55,\n prefix: Buffer.from(new Uint8Array([6, 161, 161]))\n },\n // tz3...\n p2pk: {\n length: 55,\n prefix: Buffer.from(new Uint8Array([6, 161, 164]))\n },\n // tz4...\n BLpk: {\n length: 76,\n prefix: Buffer.from(new Uint8Array([6, 161, 166]))\n },\n // tz5... (ML-DSA-44, Ushuaia U025). Constants from octez src/lib_crypto/base58.ml:\n // mdpk public key prefix [13,7,237,67] (encoded length 1802); tz5 address prefix [6,161,169].\n // The 4-byte mdpk prefix is stripped by decoded.slice(key.length) just like the other types.\n mdpk: {\n length: 1802,\n prefix: Buffer.from(new Uint8Array([6, 161, 169]))\n }\n };\n let prefix;\n let plainPublicKey;\n if (publicKey.length === 64) {\n prefix = prefixes.edpk.prefix;\n plainPublicKey = publicKey;\n }\n else {\n const entries = Object.entries(prefixes);\n for (let index = 0; index < entries.length; index++) {\n const [key, value] = entries[index];\n if (publicKey.startsWith(key) && publicKey.length === value.length) {\n prefix = value.prefix;\n const decoded = bs58check_1.default.decode(publicKey);\n plainPublicKey = Buffer.from(decoded.slice(key.length, decoded.length)).toString('hex');\n break;\n }\n }\n }\n if (!prefix || !plainPublicKey) {\n throw new Error(`invalid publicKey: ${publicKey}`);\n }\n const payload = (0, blake2b_1.hash)(Buffer.from(plainPublicKey, 'hex'), 20);\n return bs58check_1.default.encode(Buffer.concat([prefix, Buffer.from(payload)]));\n });\n}\n/**\n * Prefix the public key if it's not prefixed\n *\n * @param publicKey\n */\nfunction prefixPublicKey(publicKey) {\n if (publicKey.length !== 64) {\n return publicKey;\n }\n const payload = Buffer.from(publicKey, 'hex');\n return bs58check_1.default.encode(Buffer.concat([new Uint8Array([13, 15, 37, 217]), Buffer.from(payload)]));\n}\n/**\n * Get the recipient string used in the matrix message\n *\n * @param recipientHash\n * @param relayServer\n */\nfunction recipientString(recipientHash, relayServer) {\n return `@${recipientHash}:${relayServer}`;\n}\nconst toBuffer = (message) => __awaiter(void 0, void 0, void 0, function* () {\n if (message.length % 2 !== 0) {\n return (0, utf8_1.encode)(message);\n }\n let adjustedMessage = message;\n if (message.startsWith('0x')) {\n adjustedMessage = message.slice(2);\n }\n const buffer = Buffer.from(adjustedMessage, 'hex');\n if (buffer.length === adjustedMessage.length / 2) {\n return buffer;\n }\n return (0, utf8_1.encode)(message);\n});\nconst coinlibhash = (message_1, ...args_1) => __awaiter(void 0, [message_1, ...args_1], void 0, function* (message, size = 32) {\n return (0, blake2b_1.hash)(message, size);\n});\nconst signMessage = (message, keypair) => __awaiter(void 0, void 0, void 0, function* () {\n const bufferMessage = yield toBuffer(message);\n const edsigPrefix = new Uint8Array([9, 245, 205, 134, 18]);\n const hash = yield coinlibhash(bufferMessage);\n const rawSignature = (0, ed25519_1.sign)(keypair.secretKey, hash);\n const signature = bs58check_1.default.encode(Buffer.concat([Buffer.from(edsigPrefix), Buffer.from(rawSignature)]));\n return signature;\n});\nexports.signMessage = signMessage;\nconst isValidAddress = (address) => {\n const prefixes = ['tz1', 'tz2', 'tz3', 'tz4', 'tz5', 'KT1', 'txr1', 'sr1'];\n if (!prefixes.some((p) => address.toLowerCase().startsWith(p.toLowerCase()))) {\n return false;\n }\n try {\n bs58check_1.default.decode(address);\n }\n catch (error) {\n return false;\n }\n return true;\n};\nexports.isValidAddress = isValidAddress;\nfunction encodePoeChallengePayload(payload) {\n const poeBlake2b = new blake2b_2.BLAKE2b(POE_CHALLENGE_BYTES_LENGTH);\n return bs58check_1.default.encode(Buffer.concat([\n new Uint8Array([POE_CHALLENGE_PREFIX]),\n Buffer.from(poeBlake2b.update(Buffer.from(payload)).digest())\n ]));\n}\n/**\n * Shallow Check (SC): Perform a superficial check to determine if the string contains a public key.\n * Do not use this function to validate the key itself.\n * @param publicKey the public key to analyze\n * @returns true if it contains a known prefix, false otherwise\n */\nfunction isPublicKeySC(publicKey) {\n if (!publicKey) {\n return false;\n }\n return (publicKey.startsWith('edpk') ||\n publicKey.startsWith('sppk') ||\n publicKey.startsWith('p2pk') ||\n publicKey.startsWith('BLpk') ||\n publicKey.startsWith('mdpk'));\n}\n/**\n * Create session keys for receiving encrypted messages from a peer.\n * Use sharedKey.receive for decryption with decryptCryptoboxPayload.\n *\n * @param selfKeyPair Your Ed25519 keypair\n * @param senderPublicKey The sender's public key (hex string)\n * @returns Session keys with .receive for decryption\n */\nfunction createReceiverSessionKey(selfKeyPair, senderPublicKey) {\n return (0, x25519_session_1.serverSessionKeys)({\n publicKey: (0, ed25519_1.convertPublicKeyToX25519)(selfKeyPair.publicKey),\n secretKey: (0, ed25519_1.convertSecretKeyToX25519)(selfKeyPair.secretKey)\n }, (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(senderPublicKey, 'hex')));\n}\n/**\n * Create session keys for sending encrypted messages to a peer.\n * Use sharedKey.send for encryption with encryptCryptoboxPayload.\n *\n * @param selfKeyPair Your Ed25519 keypair\n * @param receiverPublicKey The receiver's public key (hex string)\n * @returns Session keys with .send for encryption\n */\nfunction createSenderSessionKey(selfKeyPair, receiverPublicKey) {\n return (0, x25519_session_1.clientSessionKeys)({\n publicKey: (0, ed25519_1.convertPublicKeyToX25519)(selfKeyPair.publicKey),\n secretKey: (0, ed25519_1.convertSecretKeyToX25519)(selfKeyPair.secretKey)\n }, (0, ed25519_1.convertPublicKeyToX25519)(Buffer.from(receiverPublicKey, 'hex')));\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=crypto.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/crypto.js?\n}")},"./packages/octez.connect-utils/dist/cjs/utils/ed25519.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.sign = exports.generateKeyPairFromSeed = exports.convertSecretKeyToX25519 = exports.convertPublicKeyToX25519 = void 0;\nconst ed25519_1 = __webpack_require__(/*! @stablelib/ed25519 */ "./node_modules/@stablelib/ed25519/lib/ed25519.js");\nObject.defineProperty(exports, "convertPublicKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertPublicKeyToX25519; } }));\nObject.defineProperty(exports, "convertSecretKeyToX25519", ({ enumerable: true, get: function () { return ed25519_1.convertSecretKeyToX25519; } }));\nObject.defineProperty(exports, "generateKeyPairFromSeed", ({ enumerable: true, get: function () { return ed25519_1.generateKeyPairFromSeed; } }));\nObject.defineProperty(exports, "sign", ({ enumerable: true, get: function () { return ed25519_1.sign; } }));\n//# sourceMappingURL=ed25519.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/ed25519.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.ExposedPromise = exports.ExposedPromiseStatus = void 0;\nvar ExposedPromiseStatus;\n(function (ExposedPromiseStatus) {\n ExposedPromiseStatus["PENDING"] = "pending";\n ExposedPromiseStatus["RESOLVED"] = "resolved";\n ExposedPromiseStatus["REJECTED"] = "rejected";\n})(ExposedPromiseStatus || (exports.ExposedPromiseStatus = ExposedPromiseStatus = {}));\nconst notInitialized = () => {\n throw new Error(\'ExposedPromise not initialized yet.\');\n};\n/**\n * Exposed promise allow you to create a promise and then resolve it later, from the outside\n */\nclass ExposedPromise {\n get promise() {\n return this._promise;\n }\n get resolve() {\n return this._resolve;\n }\n get reject() {\n return this._reject;\n }\n get status() {\n return this._status;\n }\n get promiseResult() {\n return this._promiseResult;\n }\n get promiseError() {\n return this._promiseError;\n }\n constructor() {\n this._resolve = notInitialized;\n this._reject = notInitialized;\n this._status = ExposedPromiseStatus.PENDING;\n this._promise = new Promise((innerResolve, innerReject) => {\n this._resolve = (value) => {\n if (this.isSettled()) {\n return;\n }\n this._promiseResult = value;\n innerResolve(value);\n this._status = ExposedPromiseStatus.RESOLVED;\n return;\n };\n this._reject = (reason) => {\n if (this.isSettled()) {\n return;\n }\n this._promiseError = reason;\n innerReject(reason);\n this._status = ExposedPromiseStatus.REJECTED;\n return;\n };\n });\n }\n static resolve(value) {\n const promise = new ExposedPromise();\n promise.resolve(value);\n return promise;\n }\n static reject(reason) {\n const promise = new ExposedPromise();\n promise.reject(reason);\n return promise;\n }\n isPending() {\n return this.status === ExposedPromiseStatus.PENDING;\n }\n isResolved() {\n return this.status === ExposedPromiseStatus.RESOLVED;\n }\n isRejected() {\n return this.status === ExposedPromiseStatus.REJECTED;\n }\n isSettled() {\n return this.isResolved() || this.isRejected();\n }\n}\nexports.ExposedPromise = ExposedPromise;\n//# sourceMappingURL=exposed-promise.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/exposed-promise.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{/* provided dependency */ var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")["Buffer"];\n\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.generateGUID = generateGUID;\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nconst random_1 = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/**\n * Generate a random GUID\n */\nfunction generateGUID() {\n return __awaiter(this, void 0, void 0, function* () {\n const buf = (0, random_1.randomBytes)(16);\n return [buf.slice(0, 4), buf.slice(4, 6), buf.slice(6, 8), buf.slice(8, 10), buf.slice(10, 16)]\n .map(function (subbuf) {\n return Buffer.from(subbuf).toString(\'hex\');\n })\n .join(\'-\');\n });\n}\n/* eslint-enable prefer-arrow/prefer-arrow-functions */\n//# sourceMappingURL=generate-uuid.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/generate-uuid.js?\n}')},"./packages/octez.connect-utils/dist/cjs/utils/keys.js"(__unused_webpack_module,exports){"use strict";eval('{\n/* eslint-disable prefer-arrow/prefer-arrow-functions */\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.keys = keys;\n/**\n * A helper function to improve typings of object keys\n *\n * @param obj Object\n */\nfunction keys(obj) {\n return Object.keys(obj);\n}\n//# sourceMappingURL=keys.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/utils/keys.js?\n}')},"./packages/octez.connect-utils/dist/cjs/wallet-list-fetcher.js"(__unused_webpack_module,exports){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.fetchWalletListsFromGitHub = void 0;\n// jsDelivr serves the committed dist/ folder of the wallet-list repo's git\n// tree; @latest resolves to the newest semver tag, so publishing a\n// wallet-list release reaches dApps without an SDK release (~12h edge cache).\nconst JSDELIVR_BASE_URL = 'https://cdn.jsdelivr.net/gh/trilitech/octez.connect-wallet-list@latest';\nconst FETCH_TIMEOUT = 5000;\n// Logos are already base64 in both bundled and GitHub JSON, no conversion needed\n/**\n * Fetch wallet lists from GitHub (jsDelivr CDN)\n * Returns null on error (caller should use bundled fallback)\n */\nconst fetchWalletListsFromGitHub = (blockchain) => __awaiter(void 0, void 0, void 0, function* () {\n try {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT);\n const response = yield fetch(`${JSDELIVR_BASE_URL}/dist/${blockchain}.json`, {\n signal: controller.signal,\n cache: 'default' // Use browser's HTTP cache\n });\n clearTimeout(timeoutId);\n if (!response.ok) {\n // eslint-disable-next-line no-console\n console.warn(`Failed to fetch wallet list from GitHub: ${response.status}`);\n return null;\n }\n const registry = yield response.json();\n // eslint-disable-next-line no-console\n console.log(`Loaded wallet list from GitHub (version ${registry.version}, updated ${registry.updated})`);\n return registry;\n }\n catch (error) {\n if (error instanceof Error && error.name === 'AbortError') {\n // eslint-disable-next-line no-console\n console.warn('Wallet list fetch timed out, using bundled version');\n }\n else {\n // eslint-disable-next-line no-console\n console.warn('Failed to fetch wallet list from GitHub, using bundled version:', error);\n }\n return null;\n }\n});\nexports.fetchWalletListsFromGitHub = fetchWalletListsFromGitHub;\n//# sourceMappingURL=wallet-list-fetcher.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/wallet-list-fetcher.js?\n}")},"./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js"(__unused_webpack_module,exports){"use strict";eval('{\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.loadWalletLists = loadWalletLists;\n/**\n * Loads and type-casts wallet lists from a registry JSON\n */\nfunction loadWalletLists(registry) {\n return {\n extensionList: registry.extensionList,\n desktopList: registry.desktopList,\n webList: registry.webList,\n iOSList: registry.iOSList\n };\n}\n//# sourceMappingURL=wallet-list-loader.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-utils/dist/cjs/wallet-list-loader.js?\n}')},"./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.WalletClient = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_utils_1 = __webpack_require__(/*! @tezos-x/octez.connect-utils */ \"./packages/octez.connect-utils/dist/cjs/index.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_blockchain_tezos_1 = __webpack_require__(/*! @tezos-x/octez.connect-blockchain-tezos */ \"./packages/octez.connect-blockchain-tezos/dist/cjs/index.js\");\nconst WalletP2PTransport_1 = __webpack_require__(/*! ../transports/WalletP2PTransport */ \"./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js\");\nconst IncomingRequestInterceptor_1 = __webpack_require__(/*! ../interceptors/IncomingRequestInterceptor */ \"./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js\");\nconst OutgoingResponseInterceptor_1 = __webpack_require__(/*! ../interceptors/OutgoingResponseInterceptor */ \"./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js\");\nconst logger = new octez_connect_core_1.Logger('WalletClient');\n/**\n * @publicapi\n *\n * The WalletClient has to be used in the wallet. It handles all the logic related to connecting to beacon-compatible\n * dapps and handling/responding to requests.\n *\n * @warning For browser extensions: The WalletClient maintains a persistent connection that polls relay servers\n * every 30 seconds. Call `destroy()` when the client is no longer needed to stop polling and free resources.\n * For extensions, consider conditional initialization - only connect when there are existing peers or when\n * a new pairing request arrives. See the README for lifecycle management best practices.\n *\n * @category Wallet\n */\nclass WalletClient extends octez_connect_core_1.Client {\n get isConnected() {\n return this._isConnected.promise;\n }\n constructor(config) {\n super(Object.assign({ storage: config && config.storage ? config.storage : new octez_connect_core_1.LocalStorage() }, config));\n /**\n * Returns whether or not the transport is connected\n */\n this._isConnected = new octez_connect_utils_1.ExposedPromise();\n /**\n * This array stores pending requests, meaning requests we received and have not yet handled / sent a response.\n */\n this.pendingRequests = [];\n this.permissionManager = new octez_connect_core_1.PermissionManager(this.storage);\n this.appMetadataManager = new octez_connect_core_1.AppMetadataManager(this.storage);\n // Tezos is the default chain: the wrapped-only pipeline needs the\n // registry handler for every request/response, so registration is no\n // longer a consumer obligation. addBlockchain stays public — a later\n // registration under 'tezos' overrides this default.\n this.addBlockchain(new octez_connect_blockchain_tezos_1.TezosBlockchain());\n }\n init() {\n const _super = Object.create(null, {\n init: { get: () => super.init }\n });\n return __awaiter(this, void 0, void 0, function* () {\n const keyPair = yield this.keyPair; // We wait for keypair here so the P2P Transport creation is not delayed and causing issues\n const p2pTransport = new WalletP2PTransport_1.WalletP2PTransport(this.name, keyPair, this.storage, this.matrixNodes, this.iconUrl, this.appUrl);\n return _super.init.call(this, p2pTransport);\n });\n }\n /**\n * This method initiates a connection to the P2P network and registers a callback that will be called\n * whenever a message is received.\n *\n * @param newMessageCallback The callback that will be invoked for every message the transport receives.\n */\n connect(newMessageCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n this.handleResponse = (message, connectionContext) => __awaiter(this, void 0, void 0, function* () {\n // Define valid request types that wallets should process\n const validRequestTypes = [\n octez_connect_types_1.BeaconMessageType.PermissionRequest,\n octez_connect_types_1.BeaconMessageType.OperationRequest,\n octez_connect_types_1.BeaconMessageType.SignPayloadRequest,\n octez_connect_types_1.BeaconMessageType.BroadcastRequest,\n octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeRequest,\n octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeRequest,\n octez_connect_types_1.BeaconMessageType.BlockchainRequest,\n octez_connect_types_1.BeaconMessageType.ChangeAccountRequest\n ];\n if ((0, octez_connect_core_1.usesWrappedMessages)(message.version)) {\n const typedMessage = message;\n if (typedMessage.message.type === octez_connect_types_1.BeaconMessageType.Disconnect) {\n return this.disconnect(typedMessage.senderId);\n }\n // Filter out response types (echoed back from Matrix room)\n if (!validRequestTypes.includes(typedMessage.message.type)) {\n return;\n }\n if (!this.pendingRequests.some((request) => request[0].id === message.id)) {\n this.pendingRequests.push([typedMessage, connectionContext]);\n yield this.sendAcknowledgeResponse(typedMessage, connectionContext);\n yield IncomingRequestInterceptor_1.IncomingRequestInterceptor.intercept({\n message: typedMessage,\n connectionInfo: connectionContext,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: newMessageCallback\n });\n }\n }\n else {\n // Legacy flat v2 dialect (a v4.8.x dApp): served transparently — the\n // flat request is already the shape wallet apps consume, and the\n // response is emitted back in the same dialect (see\n // OutgoingResponseInterceptor).\n const typedMessage = message;\n if (typedMessage.type === octez_connect_types_1.BeaconMessageType.Disconnect) {\n return this.disconnect(typedMessage.senderId);\n }\n // Filter out response types (echoed back from Matrix room)\n if (!validRequestTypes.includes(typedMessage.type)) {\n return;\n }\n if (!this.pendingRequests.some((request) => request[0].id === message.id)) {\n this.pendingRequests.push([typedMessage, connectionContext]);\n if (typedMessage.version && typedMessage.version !== '1') {\n yield this.sendAcknowledgeResponse(typedMessage, connectionContext);\n }\n yield IncomingRequestInterceptor_1.IncomingRequestInterceptor.intercept({\n message: typedMessage,\n connectionInfo: connectionContext,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: newMessageCallback\n });\n }\n }\n });\n return this._connect();\n });\n }\n getRegisterPushChallenge(backendUrl_1, accountPublicKey_1) {\n return __awaiter(this, arguments, void 0, function* (backendUrl, accountPublicKey, oracleUrl = octez_connect_core_1.NOTIFICATION_ORACLE_URL) {\n // Check if account is already registered\n const challengeResponse = yield fetch(`${oracleUrl}/challenge`);\n if (!challengeResponse.ok) {\n throw new Error(`getRegisterPushChallenge failed: ${challengeResponse.status} ${challengeResponse.statusText}`);\n }\n const challenge = yield challengeResponse.json();\n const constructedString = [\n 'Tezos Signed Message: ',\n challenge.id,\n challenge.timestamp,\n accountPublicKey,\n backendUrl\n ].join(' ');\n const bytes = (0, octez_connect_utils_1.toHex)(constructedString);\n const payloadBytes = `05` + `01${bytes.length.toString(16).padStart(8, '0')}${bytes}`;\n return {\n challenge,\n payloadToSign: payloadBytes\n };\n });\n }\n registerPush(challenge_1, signature_1, backendUrl_1, accountPublicKey_1, protocolIdentifier_1, deviceId_1) {\n return __awaiter(this, arguments, void 0, function* (challenge, signature, backendUrl, accountPublicKey, protocolIdentifier, deviceId, oracleUrl = octez_connect_core_1.NOTIFICATION_ORACLE_URL) {\n const tokens = yield this.storage.get(octez_connect_types_1.StorageKey.PUSH_TOKENS);\n const token = tokens.find((el) => el.publicKey === accountPublicKey && el.backendUrl === backendUrl);\n if (token) {\n return token;\n }\n const registerResponse = yield fetch(`${oracleUrl}/register`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n name: this.name,\n challenge,\n accountPublicKey,\n signature,\n backendUrl,\n protocolIdentifier,\n deviceId\n })\n });\n if (!registerResponse.ok) {\n throw new Error(`registerPush failed: ${registerResponse.status} ${registerResponse.statusText}`);\n }\n const register = yield registerResponse.json();\n const newToken = {\n publicKey: accountPublicKey,\n backendUrl,\n accessToken: register.accessToken,\n managementToken: register.managementToken\n };\n tokens.push(newToken);\n yield this.storage.set(octez_connect_types_1.StorageKey.PUSH_TOKENS, tokens);\n return newToken;\n });\n }\n /**\n * The method will attempt to initiate a connection using the active transport.\n */\n _connect() {\n return __awaiter(this, arguments, void 0, function* (attempts = 3) {\n const transport = (yield this.transport);\n if (attempts == 0 || transport.connectionStatus !== octez_connect_types_1.TransportStatus.NOT_CONNECTED) {\n return;\n }\n try {\n yield transport.connect();\n }\n catch (err) {\n logger.warn('_connect', err.message);\n yield transport.disconnect();\n yield this._connect(--attempts);\n return;\n }\n transport\n .addListener((message, connectionInfo) => __awaiter(this, void 0, void 0, function* () {\n if (typeof message === 'string') {\n const peer = yield this.findPeer(connectionInfo.id);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const deserializedMessage = (yield new octez_connect_core_1.Serializer(protocolVersion).deserialize(message));\n this.handleResponse(deserializedMessage, connectionInfo);\n }\n }))\n .catch((error) => logger.log('_connect', error));\n this._isConnected.resolve(true);\n });\n }\n /**\n * This method sends a response for a specific request back to the DApp\n *\n * @param message The BeaconResponseMessage that will be sent back to the DApp\n */\n respond(message) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('RESPONSE', message);\n const request = this.pendingRequests.find((pendingRequest) => pendingRequest[0].id === message.id);\n if (!request) {\n throw new Error('No matching request found!');\n }\n this.pendingRequests = this.pendingRequests.filter((pendingRequest) => pendingRequest[0].id !== message.id);\n yield OutgoingResponseInterceptor_1.OutgoingResponseInterceptor.intercept({\n senderId: yield (0, octez_connect_core_1.getSenderId)(yield this.beaconId),\n request: request[0],\n message,\n ownAppMetadata: yield this.getOwnAppMetadata(),\n permissionManager: this.permissionManager,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: (response) => __awaiter(this, void 0, void 0, function* () {\n yield this.respondToMessage(response, request[1]);\n }),\n blockchains: this.blockchains\n });\n });\n }\n getAppMetadataList() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.getAppMetadataList();\n });\n }\n getAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.getAppMetadata(senderId);\n });\n }\n removeAppMetadata(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.removeAppMetadata(senderId);\n });\n }\n removeAllAppMetadata() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.appMetadataManager.removeAllAppMetadata();\n });\n }\n getPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.getPermissions();\n });\n }\n getPermission(accountIdentifier) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.getPermission(accountIdentifier);\n });\n }\n removePermission(accountIdentifier, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.removePermission(accountIdentifier, senderId);\n });\n }\n removeAllPermissions() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.permissionManager.removeAllPermissions();\n });\n }\n getPeerInfo(peer) {\n return __awaiter(this, void 0, void 0, function* () {\n const senderId = yield (0, octez_connect_core_1.getSenderId)(peer.publicKey);\n const protocolVersion = this.getPeerProtocolVersion(peer);\n if (peer instanceof octez_connect_types_1.PostMessagePairingRequest || peer instanceof octez_connect_types_1.ExtendedPostMessagePairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedPostMessagePairingRequest(base.id, base.name, base.publicKey, base.version, senderId, protocolVersion, base.icon, base.appUrl);\n }\n if (peer instanceof octez_connect_types_1.P2PPairingRequest || peer instanceof octez_connect_types_1.ExtendedP2PPairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedP2PPairingRequest(base.id, base.name, base.publicKey, base.version, base.relayServer, senderId, protocolVersion, base.icon, base.appUrl);\n }\n if (peer instanceof octez_connect_types_1.WalletConnectPairingRequest ||\n peer instanceof octez_connect_types_1.ExtendedWalletConnectPairingRequest) {\n const base = peer;\n return new octez_connect_types_1.ExtendedWalletConnectPairingRequest(base.id, base.name, base.publicKey, base.version, senderId, base.uri, protocolVersion, base.icon, base.appUrl);\n }\n return Object.assign(Object.assign({}, peer), { senderId,\n protocolVersion });\n });\n }\n /**\n * Add a new peer to the known peers\n * @param peer The new peer to add\n */\n addPeer(peer_1) {\n return __awaiter(this, arguments, void 0, function* (peer, sendPairingResponse = true) {\n return (yield this.transport).addPeer(yield this.getPeerInfo(peer), sendPairingResponse);\n });\n }\n removePeer(peer_1) {\n return __awaiter(this, arguments, void 0, function* (peer, sendDisconnectToPeer = false) {\n const removePeerResult = (yield this.transport).removePeer(peer);\n yield this.removePermissionsForPeers([peer]);\n if (sendDisconnectToPeer) {\n yield this.sendDisconnectToPeer(peer);\n }\n return removePeerResult;\n });\n }\n removeAllPeers() {\n return __awaiter(this, arguments, void 0, function* (sendDisconnectToPeers = false) {\n const peers = yield (yield this.transport).getPeers();\n const removePeerResult = (yield this.transport).removeAllPeers();\n yield this.removePermissionsForPeers(peers);\n if (sendDisconnectToPeers) {\n const disconnectPromises = peers.map((peer) => this.sendDisconnectToPeer(peer));\n yield Promise.all(disconnectPromises);\n }\n return removePeerResult;\n });\n }\n removePermissionsForPeers(peersToRemove) {\n return __awaiter(this, void 0, void 0, function* () {\n const permissions = yield this.permissionManager.getPermissions();\n const peerIdsToRemove = peersToRemove.map((peer) => peer.senderId);\n // Remove all permissions with origin of the specified peer\n const permissionsToRemove = permissions.filter((permission) => peerIdsToRemove.includes(permission.appMetadata.senderId));\n const permissionIdentifiersToRemove = permissionsToRemove.map((permissionInfo) => permissionInfo.accountIdentifier);\n yield this.permissionManager.removePermissions(permissionIdentifiersToRemove);\n });\n }\n /**\n * Send an acknowledge message back to the sender\n *\n * @param message The message that was received\n */\n sendAcknowledgeResponse(request, connectionContext) {\n return __awaiter(this, void 0, void 0, function* () {\n // Acknowledge the message\n const acknowledgeResponse = {\n id: request.id,\n type: octez_connect_types_1.BeaconMessageType.Acknowledge\n };\n yield OutgoingResponseInterceptor_1.OutgoingResponseInterceptor.intercept({\n senderId: yield (0, octez_connect_core_1.getSenderId)(yield this.beaconId),\n request,\n message: acknowledgeResponse,\n ownAppMetadata: yield this.getOwnAppMetadata(),\n permissionManager: this.permissionManager,\n appMetadataManager: this.appMetadataManager,\n interceptorCallback: (response) => __awaiter(this, void 0, void 0, function* () {\n yield this.respondToMessage(response, connectionContext);\n }),\n blockchains: this.blockchains\n });\n });\n }\n /**\n * An internal method to send a BeaconMessage to the DApp\n *\n * @param response Send a message back to the DApp\n */\n respondToMessage(response, connectionContext) {\n return __awaiter(this, void 0, void 0, function* () {\n let peer;\n if (connectionContext) {\n peer = yield this.findPeer(connectionContext.id);\n }\n const protocolVersion = this.getPeerProtocolVersion(peer);\n const serializedMessage = yield new octez_connect_core_1.Serializer(protocolVersion).serialize(response);\n if (connectionContext) {\n yield (yield this.transport).send(serializedMessage, peer);\n }\n else {\n yield (yield this.transport).send(serializedMessage);\n }\n });\n }\n disconnect(senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n const transport = yield this.transport;\n const peers = yield transport.getPeers();\n const peer = peers.find((peerEl) => peerEl.senderId === senderId);\n if (peer) {\n yield this.removePeer(peer);\n }\n return;\n });\n }\n}\nexports.WalletClient = WalletClient;\n//# sourceMappingURL=WalletClient.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/index.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.WalletClient = void 0;\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-core */ "./packages/octez.connect-core/dist/cjs/src/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-transport-matrix */ "./packages/octez.connect-transport-matrix/dist/cjs/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js"), exports);\n__exportStar(__webpack_require__(/*! @tezos-x/octez.connect-utils */ "./packages/octez.connect-utils/dist/cjs/index.js"), exports);\nconst WalletClient_1 = __webpack_require__(/*! ./client/WalletClient */ "./packages/octez.connect-wallet/dist/cjs/client/WalletClient.js");\nObject.defineProperty(exports, "WalletClient", ({ enumerable: true, get: function () { return WalletClient_1.WalletClient; } }));\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/index.js?\n}')},"./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IncomingRequestInterceptor = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst logger = new octez_connect_core_1.Logger('IncomingRequestInterceptor');\n// Chain identifiers whose wrapped payloads are normalized back to the flat\n// request shapes Tezos wallet apps have always consumed ('xtz' is the\n// pre-rename legacy identifier). Other chains (e.g. substrate) keep the\n// wrapped pass-through of the generic API.\nconst TEZOS_IDENTIFIERS = ['tezos', 'xtz'];\n// Wrapped Tezos blockchainData discriminators → the flat BeaconMessageType\n// the wallet app receives. Values reuse the pre-fork wire strings.\nconst TEZOS_PAYLOAD_TO_FLAT_TYPE = {\n operation_request: octez_connect_types_1.BeaconMessageType.OperationRequest,\n sign_payload_request: octez_connect_types_1.BeaconMessageType.SignPayloadRequest,\n broadcast_request: octez_connect_types_1.BeaconMessageType.BroadcastRequest,\n proof_of_event_challenge_request: octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeRequest,\n simulated_proof_of_event_challenge_request: octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeRequest\n};\n/**\n * @internalapi\n *\n * The IncomingRequestInterceptor is used in the WalletClient to intercept an\n * incoming (wrapped) request, enrich it with app metadata, and — for Tezos\n * payloads — normalize it to the flat request shape wallet apps consume, so\n * apps never see envelopes or version strings.\n */\nclass IncomingRequestInterceptor {\n /**\n * The method that is called during the interception\n *\n * @param config\n */\n static intercept(config) {\n return __awaiter(this, void 0, void 0, function* () {\n logger.log('INTERCEPTING REQUEST', config.message);\n // Negotiated wire: flat '2' arrivals are the legacy dialect (a v4.8.x\n // dApp) and already carry the shape wallet apps consume — they only need\n // enrichment. Wrapped arrivals (v3+) are unwrapped and, for Tezos\n // payloads, normalized to the same flat shapes. Anything else (absent or\n // malformed version — untrusted input) is dropped, never dispatched.\n if ((0, octez_connect_core_1.usesWrappedMessages)(config.message.version)) {\n yield IncomingRequestInterceptor.handleWrappedMessage(config);\n }\n else if (config.message.version === '2') {\n yield IncomingRequestInterceptor.handleFlatMessage(config);\n }\n else {\n logger.warn('intercept', `Dropping message with unsupported version ${JSON.stringify(config.message.version)}`);\n }\n });\n }\n // Legacy flat v2 dialect: enrich with app metadata and pass through — the\n // output shape is identical to the wrapped path's flat normalization, so\n // wallet apps cannot tell which dialect the dApp spoke.\n static handleFlatMessage(config) {\n return __awaiter(this, void 0, void 0, function* () {\n const { connectionInfo, appMetadataManager, interceptorCallback } = config;\n const message = config.message;\n if (message.type === octez_connect_types_1.BeaconMessageType.PermissionRequest) {\n // TODO: Remove v1 compatibility in later version\n let dappMetadata = message.appMetadata;\n const legacyBeaconId = dappMetadata.beaconId;\n if (legacyBeaconId && !dappMetadata.senderId) {\n dappMetadata = Object.assign(Object.assign({}, dappMetadata), { senderId: legacyBeaconId });\n delete dappMetadata.beaconId;\n }\n yield appMetadataManager.addAppMetadata(dappMetadata);\n interceptorCallback(Object.assign(Object.assign({}, message), { appMetadata: dappMetadata }), connectionInfo);\n return;\n }\n const appMetadata = yield IncomingRequestInterceptor.getAppMetadata(appMetadataManager, message.senderId);\n interceptorCallback(Object.assign({ appMetadata }, message), connectionInfo);\n });\n }\n static getAppMetadata(appMetadataManager, senderId) {\n return __awaiter(this, void 0, void 0, function* () {\n const appMetadata = yield appMetadataManager.getAppMetadata(senderId);\n if (!appMetadata) {\n throw new Error('AppMetadata not found');\n }\n return appMetadata;\n });\n }\n static handleWrappedMessage(config) {\n return __awaiter(this, void 0, void 0, function* () {\n const { message: msg, connectionInfo, appMetadataManager, interceptorCallback } = config;\n const wrappedMessage = msg;\n const v3Message = wrappedMessage.message;\n const isTezos = TEZOS_IDENTIFIERS.includes(v3Message.blockchainIdentifier);\n switch (v3Message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionRequest:\n {\n const appMetadata = Object.assign(Object.assign({}, v3Message.blockchainData.appMetadata), { senderId: msg.senderId // Make sure we use the actual senderId, not what the dApp told us\n });\n yield appMetadataManager.addAppMetadata(appMetadata);\n if (isTezos) {\n // Flat normalization: {type, id, senderId, version, appMetadata,\n // network, networks?, scopes} — exactly the pre-fork shape.\n const payload = Object.assign({}, v3Message.blockchainData);\n delete payload.appMetadata;\n const request = Object.assign({ type: octez_connect_types_1.BeaconMessageType.PermissionRequest, id: wrappedMessage.id, version: wrappedMessage.version, senderId: wrappedMessage.senderId, appMetadata }, payload);\n interceptorCallback(request, connectionInfo);\n }\n else {\n interceptorCallback(wrappedMessage, connectionInfo);\n }\n }\n break;\n case octez_connect_types_1.BeaconMessageType.BlockchainRequest:\n {\n const blockchainRequest = v3Message;\n const payloadType = blockchainRequest.blockchainData.type;\n const flatType = payloadType ? TEZOS_PAYLOAD_TO_FLAT_TYPE[payloadType] : undefined;\n if (isTezos && flatType) {\n const appMetadata = yield IncomingRequestInterceptor.getAppMetadata(appMetadataManager, msg.senderId);\n const payload = Object.assign({}, blockchainRequest.blockchainData);\n delete payload.type;\n delete payload.scope;\n const request = Object.assign({ type: flatType, id: wrappedMessage.id, version: wrappedMessage.version, senderId: wrappedMessage.senderId, appMetadata }, payload);\n interceptorCallback(request, connectionInfo);\n }\n else {\n interceptorCallback(Object.assign({}, wrappedMessage), connectionInfo);\n }\n }\n break;\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(v3Message);\n }\n });\n }\n}\nexports.IncomingRequestInterceptor = IncomingRequestInterceptor;\n//# sourceMappingURL=IncomingRequestInterceptor.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/interceptors/IncomingRequestInterceptor.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.OutgoingResponseInterceptor = void 0;\nconst octez_connect_core_1 = __webpack_require__(/*! @tezos-x/octez.connect-core */ \"./packages/octez.connect-core/dist/cjs/src/index.js\");\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ \"./packages/octez.connect-types/dist/cjs/index.js\");\nconst logger = new octez_connect_core_1.Logger('OutgoingResponseInterceptor');\n// The wallet app's `respond()` input is either one of the flat convenience\n// shapes (unchanged public API — Tezos wallets never see wrapped envelopes)\n// or an already-wrapped message from the generic chain-agnostic API.\nconst isWrappedInput = (message) => message.message !== undefined;\n// Maps each flat Tezos response type to its wrapped blockchainData\n// discriminator (the pre-fork flat wire strings, kept verbatim).\nconst FLAT_RESPONSE_PAYLOAD_TYPES = {\n [octez_connect_types_1.BeaconMessageType.OperationResponse]: 'operation_response',\n [octez_connect_types_1.BeaconMessageType.SignPayloadResponse]: 'sign_payload_response',\n [octez_connect_types_1.BeaconMessageType.BroadcastResponse]: 'broadcast_response',\n [octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeResponse]: 'proof_of_event_challenge_response',\n [octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeResponse]: 'simulated_proof_of_event_challenge_response'\n};\n/**\n * @internalapi\n *\n * The OutgoingResponseInterceptor is used in the WalletClient to intercept an\n * outgoing response, wrap it onto the (wrapped-only) wire, validate it via the\n * blockchain registry, and persist granted permissions.\n */\nclass OutgoingResponseInterceptor {\n static intercept(config) {\n return __awaiter(this, void 0, void 0, function* () {\n if (isWrappedInput(config.message)) {\n yield OutgoingResponseInterceptor.handleWrappedInput(config);\n }\n else {\n yield OutgoingResponseInterceptor.handleFlatInput(config);\n }\n });\n }\n // Generic chain-agnostic wallet API: the app responds with an\n // already-wrapped message (substrate flow, examples/wallet-v3.html).\n static handleWrappedInput(config) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { senderId, request, message: msg, ownAppMetadata, interceptorCallback, blockchains } = config;\n const wrappedMessage = msg;\n const v3Message = wrappedMessage.message;\n // The pre-fork escape hatch that leaked flat Acknowledge/Error messages\n // through unwrapped is gone: those now arrive as flat inputs and are\n // wrapped in handleFlatInput.\n if (v3Message === undefined) {\n throw new Error('Malformed wrapped response: missing message payload');\n }\n const blockchain = OutgoingResponseInterceptor.requireBlockchain(blockchains, v3Message.blockchainIdentifier);\n switch (v3Message.type) {\n case octez_connect_types_1.BeaconMessageType.PermissionResponse:\n {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)({ id: wrappedMessage.id, version: request.version, senderId }, {\n blockchainIdentifier: v3Message.blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.PermissionResponse,\n blockchainData: Object.assign(Object.assign({}, v3Message.blockchainData), { appMetadata: ownAppMetadata })\n });\n yield OutgoingResponseInterceptor.persistGrantedPermissions(config, blockchain, response);\n interceptorCallback(response);\n }\n break;\n case octez_connect_types_1.BeaconMessageType.BlockchainResponse:\n {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)({ id: wrappedMessage.id, version: request.version, senderId }, {\n blockchainIdentifier: v3Message.blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.BlockchainResponse,\n blockchainData: Object.assign({}, wrappedMessage.message.blockchainData)\n });\n yield ((_a = blockchain.validateResponse) === null || _a === void 0 ? void 0 : _a.call(blockchain, response.message));\n interceptorCallback(response);\n }\n break;\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(v3Message);\n }\n });\n }\n // Flat convenience inputs: the unchanged wallet-app API. Each flat response\n // is serialized onto the wire here; the app never handles envelopes.\n // The wire dialect echoes the REQUEST's: wrapped for v3+ requests, flat v2\n // for legacy (v4.8.x) dApps — validation and permission persistence run on\n // the same internal (wrapped) representation regardless.\n static handleFlatInput(config) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { senderId, request, message, interceptorCallback, blockchains, ownAppMetadata } = config;\n // Legacy dialect: the response must be parseable by the flat-v2 peer\n // that sent the request.\n const legacyDialect = !(0, octez_connect_core_1.usesWrappedMessages)(request.version);\n const requestInner = request.message;\n const blockchainIdentifier = (_a = requestInner === null || requestInner === void 0 ? void 0 : requestInner.blockchainIdentifier) !== null && _a !== void 0 ? _a : 'tezos';\n const envelope = { id: message.id, version: request.version, senderId };\n switch (message.type) {\n case octez_connect_types_1.BeaconMessageType.Error: {\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.Error,\n blockchainData: undefined,\n error: { type: message.errorType },\n description: message.description\n });\n if (message.errorType === octez_connect_types_1.BeaconErrorType.TRANSACTION_INVALID_ERROR && message.errorData) {\n const errorData = message.errorData;\n // Check if error data is in correct format\n if (Array.isArray(errorData) &&\n errorData.every((item) => Boolean(item.kind) && Boolean(item.id))) {\n response.message.error.data = message.errorData;\n }\n else {\n logger.warn('ErrorData provided is not in correct format. It needs to be an array of RPC errors. It will not be included in the message sent to the dApp');\n }\n }\n if (legacyDialect) {\n const flatResponse = {\n type: octez_connect_types_1.BeaconMessageType.Error,\n version: request.version,\n senderId,\n id: message.id,\n errorType: message.errorType\n };\n if (response.message.error.data !== undefined) {\n flatResponse.errorData = response.message.error.data;\n }\n interceptorCallback(flatResponse);\n }\n else {\n interceptorCallback(response);\n }\n break;\n }\n case octez_connect_types_1.BeaconMessageType.Acknowledge: {\n if (legacyDialect) {\n interceptorCallback({\n type: octez_connect_types_1.BeaconMessageType.Acknowledge,\n version: request.version,\n senderId,\n id: message.id\n });\n break;\n }\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n type: octez_connect_types_1.BeaconMessageType.Acknowledge\n });\n interceptorCallback(response);\n break;\n }\n case octez_connect_types_1.BeaconMessageType.PermissionResponse: {\n const blockchain = OutgoingResponseInterceptor.requireBlockchain(blockchains, blockchainIdentifier);\n const flat = message;\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.PermissionResponse,\n blockchainData: {\n appMetadata: ownAppMetadata,\n scopes: flat.scopes,\n publicKey: flat.publicKey,\n address: flat.address,\n network: flat.network,\n accounts: flat.accounts,\n walletType: flat.walletType,\n verificationType: flat.verificationType,\n threshold: flat.threshold,\n notification: flat.notification\n }\n });\n // Validation + batched persistence always run on the internal\n // wrapped representation, whichever dialect goes on the wire.\n yield OutgoingResponseInterceptor.persistGrantedPermissions(config, blockchain, response);\n if (legacyDialect) {\n interceptorCallback(Object.assign({ senderId, version: request.version, appMetadata: ownAppMetadata }, message));\n }\n else {\n interceptorCallback(response);\n }\n break;\n }\n case octez_connect_types_1.BeaconMessageType.OperationResponse:\n case octez_connect_types_1.BeaconMessageType.SignPayloadResponse:\n case octez_connect_types_1.BeaconMessageType.BroadcastResponse:\n case octez_connect_types_1.BeaconMessageType.ProofOfEventChallengeResponse:\n case octez_connect_types_1.BeaconMessageType.SimulatedProofOfEventChallengeResponse: {\n if (legacyDialect) {\n interceptorCallback(Object.assign({ senderId, version: request.version }, message));\n break;\n }\n const payloadType = FLAT_RESPONSE_PAYLOAD_TYPES[message.type];\n const payload = Object.assign({}, message);\n delete payload.id;\n delete payload.type;\n const response = (0, octez_connect_core_1.wrapBeaconMessage)(envelope, {\n blockchainIdentifier,\n type: octez_connect_types_1.BeaconMessageType.BlockchainResponse,\n blockchainData: Object.assign({ type: payloadType }, payload)\n });\n interceptorCallback(response);\n break;\n }\n default:\n logger.log('intercept', 'Message not handled');\n (0, octez_connect_core_1.assertNever)(message);\n }\n });\n }\n static requireBlockchain(blockchains, identifier) {\n const blockchain = blockchains.get(identifier);\n if (blockchain === undefined) {\n throw new Error(`Blockchain \"${identifier}\" not supported`);\n }\n return blockchain;\n }\n // Shared permission persistence for both input styles: validate the\n // response via the chain handler (ported flat-v2 address/publicKey/\n // abstracted-account checks), parse it into per-network accounts, and\n // persist all grants in ONE batched write (N racing addPermission calls\n // used to lose updates on the shared permission list).\n static persistGrantedPermissions(config, blockchain, response) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const { request, permissionManager, appMetadataManager } = config;\n yield ((_a = blockchain.validateResponse) === null || _a === void 0 ? void 0 : _a.call(blockchain, response.message));\n const appMetadata = yield appMetadataManager.getAppMetadata(request.senderId);\n if (!appMetadata) {\n throw new Error('AppMetadata not found');\n }\n // This wallet just served the response, so the routing key for the\n // parser is its own BEACON_VERSION.\n const accountInfos = yield blockchain.getAccountInfosFromPermissionResponse(response.message, octez_connect_core_1.BEACON_VERSION);\n const permissions = accountInfos.map((accountInfo) => {\n var _a;\n return ({\n accountIdentifier: accountInfo.accountId,\n senderId: request.senderId,\n appMetadata,\n website: '',\n address: accountInfo.address,\n publicKey: accountInfo.publicKey,\n network: (_a = accountInfo.network) !== null && _a !== void 0 ? _a : OutgoingResponseInterceptor.networkFromRequest(request),\n scopes: accountInfo.scopes,\n connectedAt: new Date().getTime()\n });\n });\n yield permissionManager.addPermissions(permissions);\n });\n }\n // Network echo for permission records whose parser entry carries no\n // network: prefer what the dApp actually requested over a blind MAINNET\n // default (kept only as the logged last resort). Reads the wrapped\n // payload for v3+ requests and the top-level field for flat v2 requests.\n static networkFromRequest(request) {\n const data = request.message !== undefined\n ? request.message.blockchainData\n : request;\n const requestedNetwork = data === null || data === void 0 ? void 0 : data.network;\n if (requestedNetwork && typeof requestedNetwork === 'object') {\n return requestedNetwork;\n }\n const requestedNetworks = data === null || data === void 0 ? void 0 : data.networks;\n if (Array.isArray(requestedNetworks) && requestedNetworks.length > 0) {\n const first = requestedNetworks[0];\n if (first === null || first === void 0 ? void 0 : first.chainId) {\n return (0, octez_connect_core_1.networkFromTezosCaip2)((0, octez_connect_core_1.normalizeTezosCaip2)(first.chainId), { name: first.name });\n }\n }\n logger.warn('networkFromRequest', 'Permission request carried no network; defaulting the stored permission to MAINNET');\n return { type: octez_connect_types_1.NetworkType.MAINNET };\n }\n}\nexports.OutgoingResponseInterceptor = OutgoingResponseInterceptor;\n//# sourceMappingURL=OutgoingResponseInterceptor.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/interceptors/OutgoingResponseInterceptor.js?\n}")},"./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports.WalletP2PTransport = void 0;\nconst octez_connect_types_1 = __webpack_require__(/*! @tezos-x/octez.connect-types */ "./packages/octez.connect-types/dist/cjs/index.js");\nconst octez_connect_transport_matrix_1 = __webpack_require__(/*! @tezos-x/octez.connect-transport-matrix */ "./packages/octez.connect-transport-matrix/dist/cjs/index.js");\n// const logger = new Logger(\'DappP2PTransport\')\n/**\n * @internalapi\n *\n *\n */\nclass WalletP2PTransport extends octez_connect_transport_matrix_1.P2PTransport {\n constructor(name, keyPair, storage, matrixNodes, iconUrl, appUrl) {\n super(name, keyPair, storage, matrixNodes, octez_connect_types_1.StorageKey.TRANSPORT_P2P_PEERS_WALLET, iconUrl, appUrl);\n }\n addPeer(newPeer_1) {\n const _super = Object.create(null, {\n addPeer: { get: () => super.addPeer }\n });\n return __awaiter(this, arguments, void 0, function* (newPeer, sendPairingResponse = true) {\n yield _super.addPeer.call(this, newPeer);\n if (sendPairingResponse) {\n yield this.client.sendPairingResponse(newPeer); // TODO: Should we have a confirmation here?\n }\n });\n }\n}\nexports.WalletP2PTransport = WalletP2PTransport;\n//# sourceMappingURL=WalletP2PTransport.js.map\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-wallet/dist/cjs/transports/WalletP2PTransport.js?\n}')},"./node_modules/base-x/src/cjs/index.cjs"(__unused_webpack_module,exports){"use strict";eval("{\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nObject.defineProperty(exports, \"__esModule\", ({ value: true }))\nfunction base (ALPHABET) {\n if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n const BASE_MAP = new Uint8Array(256)\n for (let j = 0; j < BASE_MAP.length; j++) {\n BASE_MAP[j] = 255\n }\n for (let i = 0; i < ALPHABET.length; i++) {\n const x = ALPHABET.charAt(i)\n const xc = x.charCodeAt(0)\n if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n BASE_MAP[xc] = i\n }\n const BASE = ALPHABET.length\n const LEADER = ALPHABET.charAt(0)\n const FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n const iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n function encode (source) {\n // eslint-disable-next-line no-empty\n if (source instanceof Uint8Array) { } else if (ArrayBuffer.isView(source)) {\n source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n } else if (Array.isArray(source)) {\n source = Uint8Array.from(source)\n }\n if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n if (source.length === 0) { return '' }\n // Skip & count leading zeroes.\n let zeroes = 0\n let length = 0\n let pbegin = 0\n const pend = source.length\n while (pbegin !== pend && source[pbegin] === 0) {\n pbegin++\n zeroes++\n }\n // Allocate enough space in big-endian base58 representation.\n const size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n const b58 = new Uint8Array(size)\n // Process the bytes.\n while (pbegin !== pend) {\n let carry = source[pbegin]\n // Apply \"b58 = b58 * 256 + ch\".\n let i = 0\n for (let it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n carry += (256 * b58[it1]) >>> 0\n b58[it1] = (carry % BASE) >>> 0\n carry = (carry / BASE) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n pbegin++\n }\n // Skip leading zeroes in base58 result.\n let it2 = size - length\n while (it2 !== size && b58[it2] === 0) {\n it2++\n }\n // Translate the result into a string.\n let str = LEADER.repeat(zeroes)\n for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n return str\n }\n function decodeUnsafe (source) {\n if (typeof source !== 'string') { throw new TypeError('Expected String') }\n if (source.length === 0) { return new Uint8Array() }\n let psz = 0\n // Skip and count leading '1's.\n let zeroes = 0\n let length = 0\n while (source[psz] === LEADER) {\n zeroes++\n psz++\n }\n // Allocate enough space in big-endian base256 representation.\n const size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n const b256 = new Uint8Array(size)\n // Process the characters.\n while (psz < source.length) {\n // Find code of next character\n const charCode = source.charCodeAt(psz)\n // Base map can not be indexed using char code\n if (charCode > 255) { return }\n // Decode character\n let carry = BASE_MAP[charCode]\n // Invalid character\n if (carry === 255) { return }\n let i = 0\n for (let it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n carry += (BASE * b256[it3]) >>> 0\n b256[it3] = (carry % 256) >>> 0\n carry = (carry / 256) >>> 0\n }\n if (carry !== 0) { throw new Error('Non-zero carry') }\n length = i\n psz++\n }\n // Skip leading zeroes in b256.\n let it4 = size - length\n while (it4 !== size && b256[it4] === 0) {\n it4++\n }\n const vch = new Uint8Array(zeroes + (size - it4))\n let j = zeroes\n while (it4 !== size) {\n vch[j++] = b256[it4++]\n }\n return vch\n }\n function decode (string) {\n const buffer = decodeUnsafe(string)\n if (buffer) { return buffer }\n throw new Error('Non-base' + BASE + ' character')\n }\n return {\n encode,\n decodeUnsafe,\n decode\n }\n}\nexports[\"default\"] = base\n\n\n//# sourceURL=webpack://beacon/./node_modules/base-x/src/cjs/index.cjs?\n}")},"./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js"(module){eval('{function _typeof(o) {\n "@babel/helpers - typeof";\n\n return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;\n }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;\n\n//# sourceURL=webpack://beacon/./node_modules/broadcast-channel/node_modules/@babel/runtime/helpers/typeof.js?\n}')},"./node_modules/bs58/src/cjs/index.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar base_x_1 = __importDefault(__webpack_require__(/*! base-x */ "./node_modules/base-x/src/cjs/index.cjs"));\nvar ALPHABET = \'123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\';\nexports["default"] = (0, base_x_1.default)(ALPHABET);\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58/src/cjs/index.cjs?\n}')},"./node_modules/bs58check/src/cjs/base.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nexports["default"] = default_1;\nvar bs58_1 = __importDefault(__webpack_require__(/*! bs58 */ "./node_modules/bs58/src/cjs/index.cjs"));\nfunction default_1(checksumFn) {\n // Encode a buffer as a base58-check encoded string\n function encode(payload) {\n var payloadU8 = Uint8Array.from(payload);\n var checksum = checksumFn(payloadU8);\n var length = payloadU8.length + 4;\n var both = new Uint8Array(length);\n both.set(payloadU8, 0);\n both.set(checksum.subarray(0, 4), payloadU8.length);\n return bs58_1.default.encode(both);\n }\n function decodeRaw(buffer) {\n var payload = buffer.slice(0, -4);\n var checksum = buffer.slice(-4);\n var newChecksum = checksumFn(payload);\n // eslint-disable-next-line\n if (checksum[0] ^ newChecksum[0] |\n checksum[1] ^ newChecksum[1] |\n checksum[2] ^ newChecksum[2] |\n checksum[3] ^ newChecksum[3])\n return;\n return payload;\n }\n // Decode a base58-check encoded string to a buffer, no result if checksum is wrong\n function decodeUnsafe(str) {\n var buffer = bs58_1.default.decodeUnsafe(str);\n if (buffer == null)\n return;\n return decodeRaw(buffer);\n }\n function decode(str) {\n var buffer = bs58_1.default.decode(str);\n var payload = decodeRaw(buffer);\n if (payload == null)\n throw new Error(\'Invalid checksum\');\n return payload;\n }\n return {\n encode: encode,\n decode: decode,\n decodeUnsafe: decodeUnsafe\n };\n}\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58check/src/cjs/base.cjs?\n}')},"./node_modules/bs58check/src/cjs/index.cjs"(__unused_webpack_module,exports,__webpack_require__){"use strict";eval('{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { "default": mod };\n};\nObject.defineProperty(exports, "__esModule", ({ value: true }));\nvar sha256_1 = __webpack_require__(/*! @noble/hashes/sha256 */ "./node_modules/@noble/hashes/sha256.js");\nvar base_js_1 = __importDefault(__webpack_require__(/*! ./base.cjs */ "./node_modules/bs58check/src/cjs/base.cjs"));\n// SHA256(SHA256(buffer))\nfunction sha256x2(buffer) {\n return (0, sha256_1.sha256)((0, sha256_1.sha256)(buffer));\n}\nexports["default"] = (0, base_js_1.default)(sha256x2);\n\n\n//# sourceURL=webpack://beacon/./node_modules/bs58check/src/cjs/index.cjs?\n}')},"./node_modules/@stablelib/binary/lib/binary.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ readFloat32BE: () => (/* binding */ readFloat32BE),\n/* harmony export */ readFloat32LE: () => (/* binding */ readFloat32LE),\n/* harmony export */ readFloat64BE: () => (/* binding */ readFloat64BE),\n/* harmony export */ readFloat64LE: () => (/* binding */ readFloat64LE),\n/* harmony export */ readInt16BE: () => (/* binding */ readInt16BE),\n/* harmony export */ readInt16LE: () => (/* binding */ readInt16LE),\n/* harmony export */ readInt32BE: () => (/* binding */ readInt32BE),\n/* harmony export */ readInt32LE: () => (/* binding */ readInt32LE),\n/* harmony export */ readInt64BE: () => (/* binding */ readInt64BE),\n/* harmony export */ readInt64LE: () => (/* binding */ readInt64LE),\n/* harmony export */ readUint16BE: () => (/* binding */ readUint16BE),\n/* harmony export */ readUint16LE: () => (/* binding */ readUint16LE),\n/* harmony export */ readUint32BE: () => (/* binding */ readUint32BE),\n/* harmony export */ readUint32LE: () => (/* binding */ readUint32LE),\n/* harmony export */ readUint64BE: () => (/* binding */ readUint64BE),\n/* harmony export */ readUint64LE: () => (/* binding */ readUint64LE),\n/* harmony export */ readUintBE: () => (/* binding */ readUintBE),\n/* harmony export */ readUintLE: () => (/* binding */ readUintLE),\n/* harmony export */ writeFloat32BE: () => (/* binding */ writeFloat32BE),\n/* harmony export */ writeFloat32LE: () => (/* binding */ writeFloat32LE),\n/* harmony export */ writeFloat64BE: () => (/* binding */ writeFloat64BE),\n/* harmony export */ writeFloat64LE: () => (/* binding */ writeFloat64LE),\n/* harmony export */ writeInt16BE: () => (/* binding */ writeInt16BE),\n/* harmony export */ writeInt16LE: () => (/* binding */ writeInt16LE),\n/* harmony export */ writeInt32BE: () => (/* binding */ writeInt32BE),\n/* harmony export */ writeInt32LE: () => (/* binding */ writeInt32LE),\n/* harmony export */ writeInt64BE: () => (/* binding */ writeInt64BE),\n/* harmony export */ writeInt64LE: () => (/* binding */ writeInt64LE),\n/* harmony export */ writeUint16BE: () => (/* binding */ writeUint16BE),\n/* harmony export */ writeUint16LE: () => (/* binding */ writeUint16LE),\n/* harmony export */ writeUint32BE: () => (/* binding */ writeUint32BE),\n/* harmony export */ writeUint32LE: () => (/* binding */ writeUint32LE),\n/* harmony export */ writeUint64BE: () => (/* binding */ writeUint64BE),\n/* harmony export */ writeUint64LE: () => (/* binding */ writeUint64LE),\n/* harmony export */ writeUintBE: () => (/* binding */ writeUintBE),\n/* harmony export */ writeUintLE: () => (/* binding */ writeUintLE)\n/* harmony export */ });\n/* harmony import */ var _stablelib_int__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/int */ "./node_modules/@stablelib/int/lib/int.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package binary provides functions for encoding and decoding numbers in byte arrays.\n */\n\n// TODO(dchest): add asserts for correct value ranges and array offsets.\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16BE(array, offset = 0) {\n return (((array[offset + 0] << 8) | array[offset + 1]) << 16) >> 16;\n}\n/**\n * Reads 2 bytes from array starting at offset as big-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16BE(array, offset = 0) {\n return ((array[offset + 0] << 8) | array[offset + 1]) >>> 0;\n}\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * signed 16-bit integer and returns it.\n */\nfunction readInt16LE(array, offset = 0) {\n return (((array[offset + 1] << 8) | array[offset]) << 16) >> 16;\n}\n/**\n * Reads 2 bytes from array starting at offset as little-endian\n * unsigned 16-bit integer and returns it.\n */\nfunction readUint16LE(array, offset = 0) {\n return ((array[offset + 1] << 8) | array[offset]) >>> 0;\n}\n/**\n * Writes 2-byte big-endian representation of 16-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16BE(value, out = new Uint8Array(2), offset = 0) {\n out[offset + 0] = value >>> 8;\n out[offset + 1] = value >>> 0;\n return out;\n}\nconst writeInt16BE = writeUint16BE;\n/**\n * Writes 2-byte little-endian representation of 16-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 2-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint16LE(value, out = new Uint8Array(2), offset = 0) {\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n return out;\n}\nconst writeInt16LE = writeUint16LE;\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32BE(array, offset = 0) {\n return (array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3];\n}\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32BE(array, offset = 0) {\n return ((array[offset] << 24) |\n (array[offset + 1] << 16) |\n (array[offset + 2] << 8) |\n array[offset + 3]) >>> 0;\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * signed 32-bit integer and returns it.\n */\nfunction readInt32LE(array, offset = 0) {\n return (array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset];\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * unsigned 32-bit integer and returns it.\n */\nfunction readUint32LE(array, offset = 0) {\n return ((array[offset + 3] << 24) |\n (array[offset + 2] << 16) |\n (array[offset + 1] << 8) |\n array[offset]) >>> 0;\n}\n/**\n * Writes 4-byte big-endian representation of 32-bit unsigned\n * value to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32BE(value, out = new Uint8Array(4), offset = 0) {\n out[offset + 0] = value >>> 24;\n out[offset + 1] = value >>> 16;\n out[offset + 2] = value >>> 8;\n out[offset + 3] = value >>> 0;\n return out;\n}\nconst writeInt32BE = writeUint32BE;\n/**\n * Writes 4-byte little-endian representation of 32-bit unsigned\n * value to array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint32LE(value, out = new Uint8Array(4), offset = 0) {\n out[offset + 0] = value >>> 0;\n out[offset + 1] = value >>> 8;\n out[offset + 2] = value >>> 16;\n out[offset + 3] = value >>> 24;\n return out;\n}\nconst writeInt32LE = writeUint32LE;\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64BE(array, offset = 0) {\n const hi = readInt32BE(array, offset);\n const lo = readInt32BE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64BE(array, offset = 0) {\n const hi = readUint32BE(array, offset);\n const lo = readUint32BE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * signed 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports exact\n * numbers in range -9007199254740991 to 9007199254740991.\n * If the number stored in the byte array is outside this range,\n * the result is not exact.\n */\nfunction readInt64LE(array, offset = 0) {\n const lo = readInt32LE(array, offset);\n const hi = readInt32LE(array, offset + 4);\n return hi * 0x100000000 + lo - ((lo >> 31) * 0x100000000);\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * unsigned 64-bit integer and returns it.\n *\n * IMPORTANT: due to JavaScript limitation, supports values up to 2^53-1.\n */\nfunction readUint64LE(array, offset = 0) {\n const lo = readUint32LE(array, offset);\n const hi = readUint32LE(array, offset + 4);\n return hi * 0x100000000 + lo;\n}\n/**\n * Writes 8-byte big-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64BE(value, out = new Uint8Array(8), offset = 0) {\n writeUint32BE(value / 0x100000000 >>> 0, out, offset);\n writeUint32BE(value >>> 0, out, offset + 4);\n return out;\n}\nconst writeInt64BE = writeUint64BE;\n/**\n * Writes 8-byte little-endian representation of 64-bit unsigned\n * value to byte array starting at offset.\n *\n * Due to JavaScript limitation, supports values up to 2^53-1.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeUint64LE(value, out = new Uint8Array(8), offset = 0) {\n writeUint32LE(value >>> 0, out, offset);\n writeUint32LE(value / 0x100000000 >>> 0, out, offset + 4);\n return out;\n}\nconst writeInt64LE = writeUint64LE;\n/**\n * Reads bytes from array starting at offset as big-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintBE(bitLength, array, offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("readUintBE supports only bitLengths divisible by 8");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error("readUintBE: array is too short for the given bitLength");\n }\n let result = 0;\n let mul = 1;\n for (let i = bitLength / 8 + offset - 1; i >= offset; i--) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\n/**\n * Reads bytes from array starting at offset as little-endian\n * unsigned bitLen-bit integer and returns it.\n *\n * Supports bit lengths divisible by 8, up to 48.\n */\nfunction readUintLE(bitLength, array, offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("readUintLE supports only bitLengths divisible by 8");\n }\n if (bitLength / 8 > array.length - offset) {\n throw new Error("readUintLE: array is too short for the given bitLength");\n }\n let result = 0;\n let mul = 1;\n for (let i = offset; i < offset + bitLength / 8; i++) {\n result += array[i] * mul;\n mul *= 256;\n }\n return result;\n}\n/**\n * Writes a big-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintBE(bitLength, value, out = new Uint8Array(bitLength / 8), offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("writeUintBE supports only bitLengths divisible by 8");\n }\n if (!(0,_stablelib_int__WEBPACK_IMPORTED_MODULE_0__.isSafeInteger)(value)) {\n throw new Error("writeUintBE value must be an integer");\n }\n let div = 1;\n for (let i = bitLength / 8 + offset - 1; i >= offset; i--) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\n/**\n * Writes a little-endian representation of bitLen-bit unsigned\n * value to array starting at offset.\n *\n * Supports bit lengths divisible by 8, up to 48.\n *\n * If byte array is not given, creates a new one.\n *\n * Returns the output byte array.\n */\nfunction writeUintLE(bitLength, value, out = new Uint8Array(bitLength / 8), offset = 0) {\n // TODO(dchest): implement support for bitLengths non-divisible by 8\n if (bitLength % 8 !== 0) {\n throw new Error("writeUintLE supports only bitLengths divisible by 8");\n }\n if (!(0,_stablelib_int__WEBPACK_IMPORTED_MODULE_0__.isSafeInteger)(value)) {\n throw new Error("writeUintLE value must be an integer");\n }\n let div = 1;\n for (let i = offset; i < offset + bitLength / 8; i++) {\n out[i] = (value / div) & 0xff;\n div *= 256;\n }\n return out;\n}\n/**\n * Reads 4 bytes from array starting at offset as big-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32BE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset);\n}\n/**\n * Reads 4 bytes from array starting at offset as little-endian\n * 32-bit floating-point number and returns it.\n */\nfunction readFloat32LE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat32(offset, true);\n}\n/**\n * Reads 8 bytes from array starting at offset as big-endian\n * 64-bit floating-point number ("double") and returns it.\n */\nfunction readFloat64BE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset);\n}\n/**\n * Reads 8 bytes from array starting at offset as little-endian\n * 64-bit floating-point number ("double") and returns it.\n */\nfunction readFloat64LE(array, offset = 0) {\n const view = new DataView(array.buffer, array.byteOffset, array.byteLength);\n return view.getFloat64(offset, true);\n}\n/**\n * Writes 4-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32BE(value, out = new Uint8Array(4), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value);\n return out;\n}\n/**\n * Writes 4-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 4-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat32LE(value, out = new Uint8Array(4), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat32(offset, value, true);\n return out;\n}\n/**\n * Writes 8-byte big-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64BE(value, out = new Uint8Array(8), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value);\n return out;\n}\n/**\n * Writes 8-byte little-endian floating-point representation of value\n * to byte array starting at offset.\n *\n * If byte array is not given, creates a new 8-byte one.\n *\n * Returns the output byte array.\n */\nfunction writeFloat64LE(value, out = new Uint8Array(8), offset = 0) {\n const view = new DataView(out.buffer, out.byteOffset, out.byteLength);\n view.setFloat64(offset, value, true);\n return out;\n}\n//# sourceMappingURL=binary.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/binary/lib/binary.js?\n}')},"./node_modules/@stablelib/blake2b/lib/blake2b.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BLAKE2b: () => (/* binding */ BLAKE2b),\n/* harmony export */ BLOCK_SIZE: () => (/* binding */ BLOCK_SIZE),\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ KEY_LENGTH: () => (/* binding */ KEY_LENGTH),\n/* harmony export */ MAX_FANOUT: () => (/* binding */ MAX_FANOUT),\n/* harmony export */ MAX_LEAF_SIZE: () => (/* binding */ MAX_LEAF_SIZE),\n/* harmony export */ MAX_MAX_DEPTH: () => (/* binding */ MAX_MAX_DEPTH),\n/* harmony export */ PERSONALIZATION_LENGTH: () => (/* binding */ PERSONALIZATION_LENGTH),\n/* harmony export */ SALT_LENGTH: () => (/* binding */ SALT_LENGTH),\n/* harmony export */ hash: () => (/* binding */ hash)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2017 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst BLOCK_SIZE = 128;\nconst DIGEST_LENGTH = 64;\nconst KEY_LENGTH = 64;\nconst PERSONALIZATION_LENGTH = 16;\nconst SALT_LENGTH = 16;\nconst MAX_LEAF_SIZE = Math.pow(2, 32) - 1;\nconst MAX_FANOUT = 255;\nconst MAX_MAX_DEPTH = 255; // not a typo\nconst IV = new Uint32Array([\n // low bits // high bits\n 0xf3bcc908, 0x6a09e667,\n 0x84caa73b, 0xbb67ae85,\n 0xfe94f82b, 0x3c6ef372,\n 0x5f1d36f1, 0xa54ff53a,\n 0xade682d1, 0x510e527f,\n 0x2b3e6c1f, 0x9b05688c,\n 0xfb41bd6b, 0x1f83d9ab,\n 0x137e2179, 0x5be0cd19,\n]);\n// Note: sigma values are doubled since we store\n// 64-bit ints as two 32-bit ints in arrays.\nconst SIGMA = [\n [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],\n [28, 20, 8, 16, 18, 30, 26, 12, 2, 24, 0, 4, 22, 14, 10, 6],\n [22, 16, 24, 0, 10, 4, 30, 26, 20, 28, 6, 12, 14, 2, 18, 8],\n [14, 18, 6, 2, 26, 24, 22, 28, 4, 12, 10, 20, 8, 0, 30, 16],\n [18, 0, 10, 14, 4, 8, 20, 30, 28, 2, 22, 24, 12, 16, 6, 26],\n [4, 24, 12, 20, 0, 22, 16, 6, 8, 26, 14, 10, 30, 28, 2, 18],\n [24, 10, 2, 30, 28, 26, 8, 20, 0, 14, 12, 6, 18, 4, 16, 22],\n [26, 22, 14, 28, 24, 2, 6, 18, 10, 0, 30, 8, 16, 12, 4, 20],\n [12, 30, 28, 18, 22, 6, 0, 16, 24, 4, 26, 14, 2, 8, 20, 10],\n [20, 4, 16, 8, 14, 12, 2, 10, 30, 22, 18, 28, 6, 24, 26, 0],\n [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],\n [28, 20, 8, 16, 18, 30, 26, 12, 2, 24, 0, 4, 22, 14, 10, 6]\n];\n/**\n * BLAKE2b hash function.\n */\nclass BLAKE2b {\n digestLength;\n blockSize = BLOCK_SIZE;\n // Note: Int32Arrays for state and message are used for performance reasons.\n _state = new Int32Array(IV); // hash state, initialized with IV\n _buffer = new Uint8Array(BLOCK_SIZE); // buffer for data\n _bufferLength = 0; // number of bytes in buffer\n _ctr = new Uint32Array(4);\n _flag = new Uint32Array(4);\n _lastNode = false;\n _finished = false;\n _vtmp = new Uint32Array(32);\n _mtmp = new Uint32Array(32);\n _paddedKey; // copy of zero-padded key if present\n _initialState; // initial state after initialization\n constructor(digestLength = 64, config) {\n this.digestLength = digestLength;\n // Validate digest length.\n if (digestLength < 1 || digestLength > DIGEST_LENGTH) {\n throw new Error("blake2b: wrong digest length");\n }\n // Validate config, if present.\n if (config) {\n this.validateConfig(config);\n }\n // Get key length from config.\n let keyLength = 0;\n if (config && config.key) {\n keyLength = config.key.length;\n }\n // Get tree fanout and maxDepth from config.\n let fanout = 1;\n let maxDepth = 1;\n if (config && config.tree) {\n fanout = config.tree.fanout;\n maxDepth = config.tree.maxDepth;\n }\n // Xor common parameters into state.\n this._state[0] ^= digestLength | (keyLength << 8) | (fanout << 16) | (maxDepth << 24);\n // Xor tree parameters into state.\n if (config && config.tree) {\n this._state[1] ^= config.tree.leafSize;\n this._state[2] ^= config.tree.nodeOffsetLowBits;\n this._state[3] ^= config.tree.nodeOffsetHighBits;\n this._state[4] ^= config.tree.nodeDepth | (config.tree.innerDigestLength << 8);\n this._lastNode = config.tree.lastNode;\n }\n // Xor salt into state.\n if (config && config.salt) {\n this._state[8] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 0);\n this._state[9] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 4);\n this._state[10] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 8);\n this._state[11] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.salt, 12);\n }\n // Xor personalization into state.\n if (config && config.personalization) {\n this._state[12] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 0);\n this._state[13] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 4);\n this._state[14] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 8);\n this._state[15] ^= (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(config.personalization, 12);\n }\n // Save a copy of initialized state for reset.\n this._initialState = new Uint32Array(this._state);\n // Process key.\n if (config && config.key && keyLength > 0) {\n this._paddedKey = new Uint8Array(BLOCK_SIZE);\n this._paddedKey.set(config.key);\n // Put padded key into buffer.\n this._buffer.set(this._paddedKey);\n this._bufferLength = BLOCK_SIZE;\n }\n }\n reset() {\n // Restore initial state.\n this._state.set(this._initialState);\n if (this._paddedKey) {\n // Put padded key into buffer.\n this._buffer.set(this._paddedKey);\n this._bufferLength = BLOCK_SIZE;\n }\n else {\n this._bufferLength = 0;\n }\n // Clear counters and flags.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._flag);\n this._finished = false;\n return this;\n }\n validateConfig(config) {\n if (config.key && config.key.length > KEY_LENGTH) {\n throw new Error("blake2b: wrong key length");\n }\n if (config.salt && config.salt.length !== SALT_LENGTH) {\n throw new Error("blake2b: wrong salt length");\n }\n if (config.personalization &&\n config.personalization.length !== PERSONALIZATION_LENGTH) {\n throw new Error("blake2b: wrong personalization length");\n }\n if (config.tree) {\n if (config.tree.fanout < 0 || config.tree.fanout > MAX_FANOUT) {\n throw new Error("blake2b: wrong tree fanout");\n }\n if (config.tree.maxDepth < 0 || config.tree.maxDepth > MAX_MAX_DEPTH) {\n throw new Error("blake2b: wrong tree depth");\n }\n if (config.tree.leafSize < 0 || config.tree.leafSize > MAX_LEAF_SIZE) {\n throw new Error("blake2b: wrong leaf size");\n }\n if (config.tree.innerDigestLength < 0 ||\n config.tree.innerDigestLength > DIGEST_LENGTH) {\n throw new Error("blake2b: wrong tree inner digest length");\n }\n }\n }\n update(data, dataLength = data.length) {\n if (this._finished) {\n throw new Error("blake2b: can\'t update because hash was finished.");\n }\n const left = BLOCK_SIZE - this._bufferLength;\n let dataPos = 0;\n if (dataLength === 0) {\n return this;\n }\n // Finish buffer.\n if (dataLength > left) {\n for (let i = 0; i < left; i++) {\n this._buffer[this._bufferLength + i] = data[dataPos + i];\n }\n this._processBlock(BLOCK_SIZE);\n dataPos += left;\n dataLength -= left;\n this._bufferLength = 0;\n }\n // Process data blocks.\n while (dataLength > BLOCK_SIZE) {\n for (let i = 0; i < BLOCK_SIZE; i++) {\n this._buffer[i] = data[dataPos + i];\n }\n this._processBlock(BLOCK_SIZE);\n dataPos += BLOCK_SIZE;\n dataLength -= BLOCK_SIZE;\n this._bufferLength = 0;\n }\n // Copy leftovers to buffer.\n for (let i = 0; i < dataLength; i++) {\n this._buffer[this._bufferLength + i] = data[dataPos + i];\n }\n this._bufferLength += dataLength;\n return this;\n }\n finish(out) {\n if (!this._finished) {\n for (let i = this._bufferLength; i < BLOCK_SIZE; i++) {\n this._buffer[i] = 0;\n }\n // Set last block flag.\n this._flag[0] = 0xffffffff;\n this._flag[1] = 0xffffffff;\n // Set last node flag if last node in tree.\n if (this._lastNode) {\n this._flag[2] = 0xffffffff;\n this._flag[3] = 0xffffffff;\n }\n this._processBlock(this._bufferLength);\n this._finished = true;\n }\n // Reuse buffer as temporary space for digest.\n const tmp = this._buffer.subarray(0, 64);\n for (let i = 0; i < 16; i++) {\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(this._state[i], tmp, i * 4);\n }\n out.set(tmp.subarray(0, out.length));\n return this;\n }\n digest() {\n const out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n }\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._vtmp);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._mtmp);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._state);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._initialState);\n if (this._paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._paddedKey);\n }\n this._bufferLength = 0;\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._flag);\n this._lastNode = false;\n this._finished = false;\n }\n saveState() {\n if (this._finished) {\n throw new Error("blake2b: cannot save finished state");\n }\n return {\n state: new Uint32Array(this._state),\n buffer: new Uint8Array(this._buffer),\n bufferLength: this._bufferLength,\n ctr: new Uint32Array(this._ctr),\n flag: new Uint32Array(this._flag),\n lastNode: this._lastNode,\n paddedKey: this._paddedKey ? new Uint8Array(this._paddedKey) : undefined,\n initialState: new Uint32Array(this._initialState)\n };\n }\n restoreState(savedState) {\n this._state.set(savedState.state);\n this._buffer.set(savedState.buffer);\n this._bufferLength = savedState.bufferLength;\n this._ctr.set(savedState.ctr);\n this._flag.set(savedState.flag);\n this._lastNode = savedState.lastNode;\n if (this._paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._paddedKey);\n }\n this._paddedKey = savedState.paddedKey ? new Uint8Array(savedState.paddedKey) : undefined;\n this._initialState.set(savedState.initialState);\n return this;\n }\n cleanSavedState(savedState) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.state);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.initialState);\n if (savedState.paddedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.paddedKey);\n }\n savedState.bufferLength = 0;\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.ctr);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.flag);\n savedState.lastNode = false;\n }\n _G(v, al, bl, cl, dl, ah, bh, ch, dh, ml0, mh0, ml1, mh1) {\n let vla = v[al], vha = v[ah], vlb = v[bl], vhb = v[bh], vlc = v[cl], vhc = v[ch], vld = v[dl], vhd = v[dh];\n // 64-bit: va += vb\n let w = vla & 0xffff, x = vla >>> 16, y = vha & 0xffff, z = vha >>> 16;\n w += vlb & 0xffff;\n x += vlb >>> 16;\n y += vhb & 0xffff;\n z += vhb >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: va += m[sigma[r][2 * i + 0]]\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += ml0 & 0xffff;\n x += ml0 >>> 16;\n y += mh0 & 0xffff;\n z += mh0 >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: vd ^= va\n vld ^= vla;\n vhd ^= vha;\n // 64-bit: rot(vd, 32)\n w = vhd;\n vhd = vld;\n vld = w;\n // 64-bit: vc += vd\n w = vlc & 0xffff;\n x = vlc >>> 16;\n y = vhc & 0xffff;\n z = vhc >>> 16;\n w += vld & 0xffff;\n x += vld >>> 16;\n y += vhd & 0xffff;\n z += vhd >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vhc = (y & 0xffff) | (z << 16);\n vlc = (w & 0xffff) | (x << 16);\n // 64-bit: vb ^= vc\n vlb ^= vlc;\n vhb ^= vhc;\n // 64-bit: rot(vb, 24)\n w = vlb << 8 | vhb >>> 24;\n vlb = vhb << 8 | vlb >>> 24;\n vhb = w;\n // 64-bit: va += vb\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += vlb & 0xffff;\n x += vlb >>> 16;\n y += vhb & 0xffff;\n z += vhb >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: va += m[sigma[r][2 * i + 1]\n w = vla & 0xffff;\n x = vla >>> 16;\n y = vha & 0xffff;\n z = vha >>> 16;\n w += ml1 & 0xffff;\n x += ml1 >>> 16;\n y += mh1 & 0xffff;\n z += mh1 >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vha = (y & 0xffff) | (z << 16);\n vla = (w & 0xffff) | (x << 16);\n // 64-bit: vd ^= va\n vld ^= vla;\n vhd ^= vha;\n // 64-bit: rot(vd, 16)\n w = vld << 16 | vhd >>> 16;\n vld = vhd << 16 | vld >>> 16;\n vhd = w;\n // 64-bit: vc += vd\n w = vlc & 0xffff;\n x = vlc >>> 16;\n y = vhc & 0xffff;\n z = vhc >>> 16;\n w += vld & 0xffff;\n x += vld >>> 16;\n y += vhd & 0xffff;\n z += vhd >>> 16;\n x += w >>> 16;\n y += x >>> 16;\n z += y >>> 16;\n vhc = (y & 0xffff) | (z << 16);\n vlc = (w & 0xffff) | (x << 16);\n // 64-bit: vb ^= vc\n vlb ^= vlc;\n vhb ^= vhc;\n // 64-bit: rot(vb, 63)\n w = vhb << 1 | vlb >>> 31;\n vlb = vlb << 1 | vhb >>> 31;\n vhb = w;\n v[al] = vla;\n v[ah] = vha;\n v[bl] = vlb;\n v[bh] = vhb;\n v[cl] = vlc;\n v[ch] = vhc;\n v[dl] = vld;\n v[dh] = vhd;\n }\n _incrementCounter(n) {\n for (let i = 0; i < 3; i++) {\n let a = this._ctr[i] + n;\n this._ctr[i] = a >>> 0;\n if (this._ctr[i] === a) {\n return;\n }\n n = 1;\n }\n }\n _processBlock(length) {\n this._incrementCounter(length);\n let v = this._vtmp;\n v.set(this._state);\n v.set(IV, 16);\n v[12 * 2 + 0] ^= this._ctr[0];\n v[12 * 2 + 1] ^= this._ctr[1];\n v[13 * 2 + 0] ^= this._ctr[2];\n v[13 * 2 + 1] ^= this._ctr[3];\n v[14 * 2 + 0] ^= this._flag[0];\n v[14 * 2 + 1] ^= this._flag[1];\n v[15 * 2 + 0] ^= this._flag[2];\n v[15 * 2 + 1] ^= this._flag[3];\n let m = this._mtmp;\n for (let i = 0; i < 32; i++) {\n m[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32LE)(this._buffer, i * 4);\n }\n for (let r = 0; r < 12; r++) {\n this._G(v, 0, 8, 16, 24, 1, 9, 17, 25, m[SIGMA[r][0]], m[SIGMA[r][0] + 1], m[SIGMA[r][1]], m[SIGMA[r][1] + 1]);\n this._G(v, 2, 10, 18, 26, 3, 11, 19, 27, m[SIGMA[r][2]], m[SIGMA[r][2] + 1], m[SIGMA[r][3]], m[SIGMA[r][3] + 1]);\n this._G(v, 4, 12, 20, 28, 5, 13, 21, 29, m[SIGMA[r][4]], m[SIGMA[r][4] + 1], m[SIGMA[r][5]], m[SIGMA[r][5] + 1]);\n this._G(v, 6, 14, 22, 30, 7, 15, 23, 31, m[SIGMA[r][6]], m[SIGMA[r][6] + 1], m[SIGMA[r][7]], m[SIGMA[r][7] + 1]);\n this._G(v, 0, 10, 20, 30, 1, 11, 21, 31, m[SIGMA[r][8]], m[SIGMA[r][8] + 1], m[SIGMA[r][9]], m[SIGMA[r][9] + 1]);\n this._G(v, 2, 12, 22, 24, 3, 13, 23, 25, m[SIGMA[r][10]], m[SIGMA[r][10] + 1], m[SIGMA[r][11]], m[SIGMA[r][11] + 1]);\n this._G(v, 4, 14, 16, 26, 5, 15, 17, 27, m[SIGMA[r][12]], m[SIGMA[r][12] + 1], m[SIGMA[r][13]], m[SIGMA[r][13] + 1]);\n this._G(v, 6, 8, 18, 28, 7, 9, 19, 29, m[SIGMA[r][14]], m[SIGMA[r][14] + 1], m[SIGMA[r][15]], m[SIGMA[r][15] + 1]);\n }\n for (let i = 0; i < 16; i++) {\n this._state[i] ^= v[i] ^ v[i + 16];\n }\n }\n}\nfunction hash(data, digestLength = DIGEST_LENGTH, config) {\n const h = new BLAKE2b(digestLength, config);\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n//# sourceMappingURL=blake2b.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/blake2b/lib/blake2b.js?\n}')},"./node_modules/@stablelib/bytes/lib/bytes.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ concat: () => (/* binding */ concat)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package bytes provides functions for dealing with byte arrays.\n */\n/**\n * Concatenates byte arrays.\n */\nfunction concat(...arrays) {\n // Calculate sum of lengths of all arrays.\n let totalLength = 0;\n for (let i = 0; i < arrays.length; i++) {\n totalLength += arrays[i].length;\n }\n // Allocate new array of calculated length.\n const result = new Uint8Array(totalLength);\n // Copy all arrays into result.\n let offset = 0;\n for (let i = 0; i < arrays.length; i++) {\n const arg = arrays[i];\n result.set(arg, offset);\n offset += arg.length;\n }\n return result;\n}\n//# sourceMappingURL=bytes.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/bytes/lib/bytes.js?\n}")},"./node_modules/@stablelib/constant-time/lib/constant-time.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ compare: () => (/* binding */ compare),\n/* harmony export */ equal: () => (/* binding */ equal),\n/* harmony export */ lessOrEqual: () => (/* binding */ lessOrEqual),\n/* harmony export */ select: () => (/* binding */ select)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package constant-time provides functions for performing algorithmically constant-time operations.\n */\n/**\n * NOTE! Due to the inability to guarantee real constant time evaluation of\n * anything in JavaScript VM, this is module is the best effort.\n */\n/**\n * Returns resultIfOne if subject is 1, or resultIfZero if subject is 0.\n *\n * Supports only 32-bit integers, so resultIfOne or resultIfZero are not\n * integers, they'll be converted to them with bitwise operations.\n */\nfunction select(subject, resultIfOne, resultIfZero) {\n return (~(subject - 1) & resultIfOne) | ((subject - 1) & resultIfZero);\n}\n/**\n * Returns 1 if a <= b, or 0 if not.\n * Arguments must be positive 32-bit integers less than or equal to 2^31 - 1.\n */\nfunction lessOrEqual(a, b) {\n return (((a | 0) - (b | 0) - 1) >>> 31) & 1;\n}\n/**\n * Returns 1 if a and b are of equal length and their contents\n * are equal, or 0 otherwise.\n *\n * Note that unlike in equal(), zero-length inputs are considered\n * the same, so this function will return 1.\n */\nfunction compare(a, b) {\n if (a.length !== b.length) {\n return 0;\n }\n let result = 0;\n for (let i = 0; i < a.length; i++) {\n result |= a[i] ^ b[i];\n }\n return (1 & ((result - 1) >>> 8));\n}\n/**\n * Returns true if a and b are of equal non-zero length,\n * and their contents are equal, or false otherwise.\n *\n * Note that unlike in compare() zero-length inputs are considered\n * _not_ equal, so this function will return false.\n */\nfunction equal(a, b) {\n if (a.length === 0 || b.length === 0) {\n return false;\n }\n return compare(a, b) !== 0;\n}\n//# sourceMappingURL=constant-time.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/constant-time/lib/constant-time.js?\n}")},"./node_modules/@stablelib/ed25519/lib/ed25519.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PUBLIC_KEY_LENGTH: () => (/* binding */ PUBLIC_KEY_LENGTH),\n/* harmony export */ SECRET_KEY_LENGTH: () => (/* binding */ SECRET_KEY_LENGTH),\n/* harmony export */ SEED_LENGTH: () => (/* binding */ SEED_LENGTH),\n/* harmony export */ SIGNATURE_LENGTH: () => (/* binding */ SIGNATURE_LENGTH),\n/* harmony export */ convertPublicKeyToX25519: () => (/* binding */ convertPublicKeyToX25519),\n/* harmony export */ convertSecretKeyToX25519: () => (/* binding */ convertSecretKeyToX25519),\n/* harmony export */ extractPublicKeyFromSecretKey: () => (/* binding */ extractPublicKeyFromSecretKey),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ sign: () => (/* binding */ sign),\n/* harmony export */ verify: () => (/* binding */ verify)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/sha512 */ "./node_modules/@stablelib/sha512/lib/sha512.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\nconst SIGNATURE_LENGTH = 64;\nconst PUBLIC_KEY_LENGTH = 32;\nconst SECRET_KEY_LENGTH = 64;\nconst SEED_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst gf0 = gf();\nconst gf1 = gf([1]);\nconst D = gf([\n 0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070,\n 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203\n]);\nconst D2 = gf([\n 0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0,\n 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406\n]);\nconst X = gf([\n 0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c,\n 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169\n]);\nconst Y = gf([\n 0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666,\n 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666\n]);\nconst I = gf([\n 0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43,\n 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83\n]);\nfunction set25519(r, a) {\n for (let i = 0; i < 16; i++) {\n r[i] = a[i] | 0;\n }\n}\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction verify32(x, y) {\n let d = 0;\n for (let i = 0; i < 32; i++) {\n d |= x[i] ^ y[i];\n }\n return (1 & ((d - 1) >>> 8)) - 1;\n}\nfunction neq25519(a, b) {\n const c = new Uint8Array(32);\n const d = new Uint8Array(32);\n pack25519(c, a);\n pack25519(d, b);\n return verify32(c, d);\n}\nfunction par25519(a) {\n const d = new Uint8Array(32);\n pack25519(d, a);\n return d[0] & 1;\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 253; a >= 0; a--) {\n square(c, c);\n if (a !== 2 && a !== 4) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction pow2523(o, i) {\n const c = gf();\n let a;\n for (a = 0; a < 16; a++) {\n c[a] = i[a];\n }\n for (a = 250; a >= 0; a--) {\n square(c, c);\n if (a !== 1) {\n mul(c, c, i);\n }\n }\n for (a = 0; a < 16; a++) {\n o[a] = c[a];\n }\n}\nfunction edadd(p, q) {\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf(), g = gf(), h = gf(), t = gf();\n sub(a, p[1], p[0]);\n sub(t, q[1], q[0]);\n mul(a, a, t);\n add(b, p[0], p[1]);\n add(t, q[0], q[1]);\n mul(b, b, t);\n mul(c, p[3], q[3]);\n mul(c, c, D2);\n mul(d, p[2], q[2]);\n add(d, d, d);\n sub(e, b, a);\n sub(f, d, c);\n add(g, d, c);\n add(h, b, a);\n mul(p[0], e, f);\n mul(p[1], h, g);\n mul(p[2], g, f);\n mul(p[3], e, h);\n}\nfunction cswap(p, q, b) {\n for (let i = 0; i < 4; i++) {\n sel25519(p[i], q[i], b);\n }\n}\nfunction pack(r, p) {\n const tx = gf(), ty = gf(), zi = gf();\n inv25519(zi, p[2]);\n mul(tx, p[0], zi);\n mul(ty, p[1], zi);\n pack25519(r, ty);\n r[31] ^= par25519(tx) << 7;\n}\nfunction scalarmult(p, q, s) {\n set25519(p[0], gf0);\n set25519(p[1], gf1);\n set25519(p[2], gf1);\n set25519(p[3], gf0);\n for (let i = 255; i >= 0; --i) {\n const b = (s[(i / 8) | 0] >> (i & 7)) & 1;\n cswap(p, q, b);\n edadd(q, p);\n edadd(p, p);\n cswap(p, q, b);\n }\n}\nfunction scalarbase(p, s) {\n const q = [gf(), gf(), gf(), gf()];\n set25519(q[0], X);\n set25519(q[1], Y);\n set25519(q[2], gf1);\n mul(q[3], X, Y);\n scalarmult(p, q, s);\n}\n// Generates key pair from secret 32-byte seed.\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== SEED_LENGTH) {\n throw new Error(`ed25519: seed must be ${SEED_LENGTH} bytes`);\n }\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(seed);\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const publicKey = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n scalarbase(p, d);\n pack(publicKey, p);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey\n };\n}\nfunction generateKeyPair(prng) {\n const seed = (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(seed);\n return result;\n}\nfunction extractPublicKeyFromSecretKey(secretKey) {\n if (secretKey.length !== SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${SECRET_KEY_LENGTH} bytes`);\n }\n return new Uint8Array(secretKey.subarray(32));\n}\nconst L = new Uint8Array([\n 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2,\n 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10\n]);\nfunction modL(r, x) {\n let carry;\n let i;\n let j;\n let k;\n for (i = 63; i >= 32; --i) {\n carry = 0;\n for (j = i - 32, k = i - 12; j < k; ++j) {\n x[j] += carry - 16 * x[i] * L[j - (i - 32)];\n carry = Math.floor((x[j] + 128) / 256);\n x[j] -= carry * 256;\n }\n x[j] += carry;\n x[i] = 0;\n }\n carry = 0;\n for (j = 0; j < 32; j++) {\n x[j] += carry - (x[31] >> 4) * L[j];\n carry = x[j] >> 8;\n x[j] &= 255;\n }\n for (j = 0; j < 32; j++) {\n x[j] -= carry * L[j];\n }\n for (i = 0; i < 32; i++) {\n x[i + 1] += x[i] >> 8;\n r[i] = x[i] & 255;\n }\n}\nfunction iscanonical(s) {\n let c = 0;\n let n = 1;\n for (let i = 31; i >= 0; i--) {\n c |= ((s[i] - L[i]) >> 8) & n;\n n &= ((s[i] ^ L[i]) - 1) >> 8;\n }\n return c !== 0;\n}\nfunction ispkcanonical(p) {\n let c = ((p[0] - 0xed) >> 8) & 1;\n for (let i = 1; i < 31; i++) {\n c |= p[i] ^ 0xff;\n }\n c |= (p[31] & 0x7f) ^ 0x7f;\n return c !== 0;\n}\nfunction reduce(r) {\n const x = new Float64Array(64);\n for (let i = 0; i < 64; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 64; i++) {\n r[i] = 0;\n }\n modL(r, x);\n}\n// Returns 64-byte signature of the message under the 64-byte secret key.\nfunction sign(secretKey, message) {\n if (secretKey.length !== SECRET_KEY_LENGTH) {\n throw new Error(`ed25519: secret key must be ${SECRET_KEY_LENGTH} bytes`);\n }\n const x = new Float64Array(64);\n const p = [gf(), gf(), gf(), gf()];\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const signature = new Uint8Array(64);\n signature.set(d.subarray(32), 32);\n const hs = new _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.SHA512();\n hs.update(signature.subarray(32));\n hs.update(message);\n const r = hs.digest();\n hs.clean();\n reduce(r);\n scalarbase(p, r);\n pack(signature, p);\n hs.reset();\n hs.update(signature.subarray(0, 32));\n hs.update(secretKey.subarray(32));\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n for (let i = 0; i < 32; i++) {\n x[i] = r[i];\n }\n for (let i = 0; i < 32; i++) {\n for (let j = 0; j < 32; j++) {\n x[i + j] += h[i] * d[j];\n }\n }\n modL(signature.subarray(32), x);\n return signature;\n}\nfunction unpackneg(r, p) {\n const t = gf(), chk = gf(), num = gf(), den = gf(), den2 = gf(), den4 = gf(), den6 = gf();\n set25519(r[2], gf1);\n unpack25519(r[1], p);\n square(num, r[1]);\n mul(den, num, D);\n sub(num, num, r[2]);\n add(den, r[2], den);\n square(den2, den);\n square(den4, den2);\n mul(den6, den4, den2);\n mul(t, den6, num);\n mul(t, t, den);\n pow2523(t, t);\n mul(t, t, num);\n mul(t, t, den);\n mul(t, t, den);\n mul(r[0], t, den);\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n mul(r[0], r[0], I);\n }\n square(chk, r[0]);\n mul(chk, chk, den);\n if (neq25519(chk, num)) {\n return -1;\n }\n if (par25519(r[0]) === (p[31] >> 7)) {\n sub(r[0], gf0, r[0]);\n }\n mul(r[3], r[0], r[1]);\n return 0;\n}\nfunction verify(publicKey, message, signature) {\n const t = new Uint8Array(32);\n const p = [gf(), gf(), gf(), gf()];\n const q = [gf(), gf(), gf(), gf()];\n if (signature.length !== SIGNATURE_LENGTH) {\n throw new Error(`ed25519: signature must be ${SIGNATURE_LENGTH} bytes`);\n }\n if (publicKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error(`ed25519: public key must be ${PUBLIC_KEY_LENGTH} bytes`);\n }\n if (!iscanonical(signature.subarray(32))) {\n return false;\n }\n if (!ispkcanonical(publicKey)) {\n return false;\n }\n if (unpackneg(q, publicKey)) {\n return false;\n }\n const hs = new _stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.SHA512();\n hs.update(signature.subarray(0, 32));\n hs.update(publicKey);\n hs.update(message);\n const h = hs.digest();\n reduce(h);\n scalarmult(p, q, h);\n scalarbase(q, signature.subarray(32));\n edadd(p, q);\n pack(t, p);\n if (verify32(signature, t)) {\n return false;\n }\n return true;\n}\n/**\n * Convert Ed25519 public key to X25519 public key.\n *\n * Throws if given an invalid public key.\n */\nfunction convertPublicKeyToX25519(publicKey) {\n let q = [gf(), gf(), gf(), gf()];\n if (unpackneg(q, publicKey)) {\n throw new Error("Ed25519: invalid public key");\n }\n // Formula: montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p\n let a = gf();\n let b = gf();\n let y = q[1];\n add(a, gf1, y);\n sub(b, gf1, y);\n inv25519(b, b);\n mul(a, a, b);\n let z = new Uint8Array(32);\n pack25519(z, a);\n return z;\n}\n/**\n * Convert Ed25519 secret (private) key to X25519 secret key.\n */\nfunction convertSecretKeyToX25519(secretKey) {\n const d = (0,_stablelib_sha512__WEBPACK_IMPORTED_MODULE_1__.hash)(secretKey.subarray(0, 32));\n d[0] &= 248;\n d[31] &= 127;\n d[31] |= 64;\n const o = new Uint8Array(d.subarray(0, 32));\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(d);\n return o;\n}\n//# sourceMappingURL=ed25519.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/ed25519/lib/ed25519.js?\n}')},"./node_modules/@stablelib/int/lib/int.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ MAX_SAFE_INTEGER: () => (/* binding */ MAX_SAFE_INTEGER),\n/* harmony export */ add: () => (/* binding */ add),\n/* harmony export */ isInteger: () => (/* binding */ isInteger),\n/* harmony export */ isSafeInteger: () => (/* binding */ isSafeInteger),\n/* harmony export */ mul: () => (/* binding */ mul),\n/* harmony export */ rotl: () => (/* binding */ rotl),\n/* harmony export */ rotr: () => (/* binding */ rotr),\n/* harmony export */ sub: () => (/* binding */ sub)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package int provides helper functions for integerss.\n */\n/** 32-bit integer multiplication. */\nconst mul = Math.imul;\n/** 32-bit integer addition. */\nfunction add(a, b) {\n return (a + b) | 0;\n}\n/** 32-bit integer subtraction. */\nfunction sub(a, b) {\n return (a - b) | 0;\n}\n/** 32-bit integer left rotation */\nfunction rotl(x, n) {\n return x << n | x >>> (32 - n);\n}\n/** 32-bit integer left rotation */\nfunction rotr(x, n) {\n return x << (32 - n) | x >>> n;\n}\n/**\n * Returns true if the argument is an integer number.\n */\nconst isInteger = Number.isInteger;\n/**\n * Math.pow(2, 53) - 1\n */\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;\n/**\n * Returns true if the argument is a safe integer number\n * (-MIN_SAFE_INTEGER < number <= MAX_SAFE_INTEGER)\n */\nconst isSafeInteger = Number.isSafeInteger;\n//# sourceMappingURL=int.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/int/lib/int.js?\n}")},"./node_modules/@stablelib/nacl/lib/box.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ box: () => (/* binding */ box),\n/* harmony export */ generateKeyPair: () => (/* reexport safe */ _stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair),\n/* harmony export */ openBox: () => (/* binding */ openBox),\n/* harmony export */ precomputeSharedKey: () => (/* binding */ precomputeSharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/xsalsa20 */ "./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js");\n/* harmony import */ var _secretbox_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./secretbox.js */ "./node_modules/@stablelib/nacl/lib/secretbox.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\n\nconst zeros16 = new Uint8Array(16);\nfunction precomputeSharedKey(theirPublicKey, mySecretKey) {\n // Compute scalar multiplication result.\n const key = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_0__.scalarMult)(mySecretKey, theirPublicKey);\n // Hash key with HSalsa function.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_1__.hsalsa)(key, zeros16, key);\n return key;\n}\nfunction box(theirPublicKey, mySecretKey, nonce, data) {\n const sharedKey = precomputeSharedKey(theirPublicKey, mySecretKey);\n const result = (0,_secretbox_js__WEBPACK_IMPORTED_MODULE_2__.secretBox)(sharedKey, nonce, data);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__.wipe)(sharedKey);\n return result;\n}\nfunction openBox(theirPublicKey, mySecretKey, nonce, data) {\n const sharedKey = precomputeSharedKey(theirPublicKey, mySecretKey);\n const result = (0,_secretbox_js__WEBPACK_IMPORTED_MODULE_2__.openSecretBox)(sharedKey, nonce, data);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_3__.wipe)(sharedKey);\n return result;\n}\n//# sourceMappingURL=box.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/box.js?\n}')},"./node_modules/@stablelib/nacl/lib/nacl.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ box: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.box),\n/* harmony export */ generateKey: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.generateKey),\n/* harmony export */ generateKeyPair: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.generateKeyPair),\n/* harmony export */ openBox: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.openBox),\n/* harmony export */ openSecretBox: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.openSecretBox),\n/* harmony export */ precomputeSharedKey: () => (/* reexport safe */ _box_js__WEBPACK_IMPORTED_MODULE_0__.precomputeSharedKey),\n/* harmony export */ secretBox: () => (/* reexport safe */ _secretbox_js__WEBPACK_IMPORTED_MODULE_1__.secretBox)\n/* harmony export */ });\n/* harmony import */ var _box_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./box.js */ "./node_modules/@stablelib/nacl/lib/box.js");\n/* harmony import */ var _secretbox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./secretbox.js */ "./node_modules/@stablelib/nacl/lib/secretbox.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package nacl implements NaCl (Networking and Cryptography library) cryptography.\n */\n\n\n//# sourceMappingURL=nacl.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/nacl.js?\n}')},"./node_modules/@stablelib/nacl/lib/secretbox.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ generateKey: () => (/* binding */ generateKey),\n/* harmony export */ openSecretBox: () => (/* binding */ openSecretBox),\n/* harmony export */ secretBox: () => (/* binding */ secretBox)\n/* harmony export */ });\n/* harmony import */ var _stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/xsalsa20 */ "./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js");\n/* harmony import */ var _stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/poly1305 */ "./node_modules/@stablelib/poly1305/lib/poly1305.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\nfunction secretBox(key, nonce, data) {\n if (nonce.length !== 24) {\n throw new Error("secretBox nonce must be 24 bytes");\n }\n const firstBlock = new Uint8Array(64);\n // Allocate place for nonce and counter.\n const nonceCounter = new Uint8Array(24 + 8);\n // Set first bytes to nonce. Last 8 bytes will be counter.\n nonceCounter.set(nonce);\n // Generate first block of XSalsa20 stream, of which\n // first 32 bytes will be authentication key, and the rest\n // will be used for encryption.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.stream)(key, nonceCounter, firstBlock, 8);\n // Allocate result, which will contain 16-byte authenticator\n // concatenated with ciphertext.\n const result = new Uint8Array(16 + data.length);\n // Encrypt first 32 bytes of data with last 32 bytes of generated stream.\n for (let i = 0; i < 32 && i < data.length; i++) {\n result[16 + i] = data[i] ^ firstBlock[32 + i];\n }\n // Encrypt the rest of data.\n if (data.length > 32) {\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.streamXOR)(key, nonceCounter, data.subarray(32), result.subarray(16 + 32), 8);\n }\n // Calculate Poly1305 authenticator of encrypted data using\n // authentication key in the first block of XSalsa20 stream.\n const auth = (0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.oneTimeAuth)(firstBlock.subarray(0, 32), result.subarray(16));\n // Copy authenticator to the beginning of result.\n for (let i = 0; i < auth.length; i++) {\n result[i] = auth[i];\n }\n // Clean auth.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(auth);\n // Clean first block.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(firstBlock);\n // Clean nonceCounter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(nonceCounter);\n return result;\n}\nfunction openSecretBox(key, nonce, box) {\n if (nonce.length !== 24) {\n throw new Error("secretBox nonce must be 24 bytes");\n }\n if (box.length < 16) {\n throw new Error("secretBox data must be at least 16 bytes");\n }\n const firstBlock = new Uint8Array(64);\n // Allocate place for nonce and counter.\n const nonceCounter = new Uint8Array(24 + 8);\n // Set first bytes to nonce. Last 8 bytes will be counter.\n nonceCounter.set(nonce);\n // Generate first block of XSalsa20 stream, of which\n // first 32 bytes will be authentication key, and the rest\n // will be used for encryption.\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.stream)(key, nonceCounter, firstBlock, 8);\n // Calculate Poly1305 authenticator of encrypted data using\n // authentication key in the first block of XSalsa20 stream.\n const auth = (0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.oneTimeAuth)(firstBlock.subarray(0, 32), box.subarray(16));\n // Check authenticator.\n if (!(0,_stablelib_poly1305__WEBPACK_IMPORTED_MODULE_1__.equal)(auth, box.subarray(0, 16))) {\n // Authenticator is incorrect: ciphertext or authenticator\n // was corrupted, maybe maliciously.\n return null;\n }\n // Authenticator verifies, so we can decrypt ciphertext.\n const ciphertext = box.subarray(16);\n // Allocate result array.\n const result = new Uint8Array(ciphertext.length);\n // Decrypt first 32 bytes of box with last 32 bytes of generated stream.\n for (let i = 0; i < 32 && i < ciphertext.length; i++) {\n result[i] = ciphertext[i] ^ firstBlock[32 + i];\n }\n // Decrypt the rest of data.\n if (ciphertext.length > 32) {\n (0,_stablelib_xsalsa20__WEBPACK_IMPORTED_MODULE_0__.streamXOR)(key, nonceCounter, ciphertext.subarray(32), result.subarray(32), 8);\n }\n // Clean auth.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(auth);\n // Clean first block.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(firstBlock);\n // Clean nonceCounter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(nonceCounter);\n return result;\n}\n/** Generates a 32-byte random secret key. */\nfunction generateKey(prng) {\n return (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_3__.randomBytes)(32, prng);\n}\n//# sourceMappingURL=secretbox.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/nacl/lib/secretbox.js?\n}')},"./node_modules/@stablelib/poly1305/lib/poly1305.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ Poly1305: () => (/* binding */ Poly1305),\n/* harmony export */ equal: () => (/* binding */ equal),\n/* harmony export */ oneTimeAuth: () => (/* binding */ oneTimeAuth)\n/* harmony export */ });\n/* harmony import */ var _stablelib_constant_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/constant-time */ "./node_modules/@stablelib/constant-time/lib/constant-time.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package poly1305 implements Poly1305 one-time message authentication algorithm.\n */\n\n\nconst DIGEST_LENGTH = 16;\n// Port of Andrew Moon\'s Poly1305-donna-16. Public domain.\n// https://github.com/floodyberry/poly1305-donna\n/**\n * Poly1305 computes 16-byte authenticator of message using\n * a one-time 32-byte key.\n *\n * Important: key should be used for only one message,\n * it should never repeat.\n */\nclass Poly1305 {\n digestLength = DIGEST_LENGTH;\n _buffer = new Uint8Array(16);\n _r = new Uint16Array(10);\n _h = new Uint16Array(10);\n _pad = new Uint16Array(8);\n _leftover = 0;\n _fin = 0;\n _finished = false;\n constructor(key) {\n let t0 = key[0] | key[1] << 8;\n this._r[0] = (t0) & 0x1fff;\n let t1 = key[2] | key[3] << 8;\n this._r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n let t2 = key[4] | key[5] << 8;\n this._r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03;\n let t3 = key[6] | key[7] << 8;\n this._r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n let t4 = key[8] | key[9] << 8;\n this._r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff;\n this._r[5] = ((t4 >>> 1)) & 0x1ffe;\n let t5 = key[10] | key[11] << 8;\n this._r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n let t6 = key[12] | key[13] << 8;\n this._r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81;\n let t7 = key[14] | key[15] << 8;\n this._r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n this._r[9] = ((t7 >>> 5)) & 0x007f;\n this._pad[0] = key[16] | key[17] << 8;\n this._pad[1] = key[18] | key[19] << 8;\n this._pad[2] = key[20] | key[21] << 8;\n this._pad[3] = key[22] | key[23] << 8;\n this._pad[4] = key[24] | key[25] << 8;\n this._pad[5] = key[26] | key[27] << 8;\n this._pad[6] = key[28] | key[29] << 8;\n this._pad[7] = key[30] | key[31] << 8;\n }\n _blocks(m, mpos, bytes) {\n let hibit = this._fin ? 0 : 1 << 11;\n let h0 = this._h[0], h1 = this._h[1], h2 = this._h[2], h3 = this._h[3], h4 = this._h[4], h5 = this._h[5], h6 = this._h[6], h7 = this._h[7], h8 = this._h[8], h9 = this._h[9];\n let r0 = this._r[0], r1 = this._r[1], r2 = this._r[2], r3 = this._r[3], r4 = this._r[4], r5 = this._r[5], r6 = this._r[6], r7 = this._r[7], r8 = this._r[8], r9 = this._r[9];\n while (bytes >= 16) {\n let t0 = m[mpos + 0] | m[mpos + 1] << 8;\n h0 += (t0) & 0x1fff;\n let t1 = m[mpos + 2] | m[mpos + 3] << 8;\n h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff;\n let t2 = m[mpos + 4] | m[mpos + 5] << 8;\n h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff;\n let t3 = m[mpos + 6] | m[mpos + 7] << 8;\n h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff;\n let t4 = m[mpos + 8] | m[mpos + 9] << 8;\n h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff;\n h5 += ((t4 >>> 1)) & 0x1fff;\n let t5 = m[mpos + 10] | m[mpos + 11] << 8;\n h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff;\n let t6 = m[mpos + 12] | m[mpos + 13] << 8;\n h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff;\n let t7 = m[mpos + 14] | m[mpos + 15] << 8;\n h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff;\n h9 += ((t7 >>> 5)) | hibit;\n let c = 0;\n let d0 = c;\n d0 += h0 * r0;\n d0 += h1 * (5 * r9);\n d0 += h2 * (5 * r8);\n d0 += h3 * (5 * r7);\n d0 += h4 * (5 * r6);\n c = (d0 >>> 13);\n d0 &= 0x1fff;\n d0 += h5 * (5 * r5);\n d0 += h6 * (5 * r4);\n d0 += h7 * (5 * r3);\n d0 += h8 * (5 * r2);\n d0 += h9 * (5 * r1);\n c += (d0 >>> 13);\n d0 &= 0x1fff;\n let d1 = c;\n d1 += h0 * r1;\n d1 += h1 * r0;\n d1 += h2 * (5 * r9);\n d1 += h3 * (5 * r8);\n d1 += h4 * (5 * r7);\n c = (d1 >>> 13);\n d1 &= 0x1fff;\n d1 += h5 * (5 * r6);\n d1 += h6 * (5 * r5);\n d1 += h7 * (5 * r4);\n d1 += h8 * (5 * r3);\n d1 += h9 * (5 * r2);\n c += (d1 >>> 13);\n d1 &= 0x1fff;\n let d2 = c;\n d2 += h0 * r2;\n d2 += h1 * r1;\n d2 += h2 * r0;\n d2 += h3 * (5 * r9);\n d2 += h4 * (5 * r8);\n c = (d2 >>> 13);\n d2 &= 0x1fff;\n d2 += h5 * (5 * r7);\n d2 += h6 * (5 * r6);\n d2 += h7 * (5 * r5);\n d2 += h8 * (5 * r4);\n d2 += h9 * (5 * r3);\n c += (d2 >>> 13);\n d2 &= 0x1fff;\n let d3 = c;\n d3 += h0 * r3;\n d3 += h1 * r2;\n d3 += h2 * r1;\n d3 += h3 * r0;\n d3 += h4 * (5 * r9);\n c = (d3 >>> 13);\n d3 &= 0x1fff;\n d3 += h5 * (5 * r8);\n d3 += h6 * (5 * r7);\n d3 += h7 * (5 * r6);\n d3 += h8 * (5 * r5);\n d3 += h9 * (5 * r4);\n c += (d3 >>> 13);\n d3 &= 0x1fff;\n let d4 = c;\n d4 += h0 * r4;\n d4 += h1 * r3;\n d4 += h2 * r2;\n d4 += h3 * r1;\n d4 += h4 * r0;\n c = (d4 >>> 13);\n d4 &= 0x1fff;\n d4 += h5 * (5 * r9);\n d4 += h6 * (5 * r8);\n d4 += h7 * (5 * r7);\n d4 += h8 * (5 * r6);\n d4 += h9 * (5 * r5);\n c += (d4 >>> 13);\n d4 &= 0x1fff;\n let d5 = c;\n d5 += h0 * r5;\n d5 += h1 * r4;\n d5 += h2 * r3;\n d5 += h3 * r2;\n d5 += h4 * r1;\n c = (d5 >>> 13);\n d5 &= 0x1fff;\n d5 += h5 * r0;\n d5 += h6 * (5 * r9);\n d5 += h7 * (5 * r8);\n d5 += h8 * (5 * r7);\n d5 += h9 * (5 * r6);\n c += (d5 >>> 13);\n d5 &= 0x1fff;\n let d6 = c;\n d6 += h0 * r6;\n d6 += h1 * r5;\n d6 += h2 * r4;\n d6 += h3 * r3;\n d6 += h4 * r2;\n c = (d6 >>> 13);\n d6 &= 0x1fff;\n d6 += h5 * r1;\n d6 += h6 * r0;\n d6 += h7 * (5 * r9);\n d6 += h8 * (5 * r8);\n d6 += h9 * (5 * r7);\n c += (d6 >>> 13);\n d6 &= 0x1fff;\n let d7 = c;\n d7 += h0 * r7;\n d7 += h1 * r6;\n d7 += h2 * r5;\n d7 += h3 * r4;\n d7 += h4 * r3;\n c = (d7 >>> 13);\n d7 &= 0x1fff;\n d7 += h5 * r2;\n d7 += h6 * r1;\n d7 += h7 * r0;\n d7 += h8 * (5 * r9);\n d7 += h9 * (5 * r8);\n c += (d7 >>> 13);\n d7 &= 0x1fff;\n let d8 = c;\n d8 += h0 * r8;\n d8 += h1 * r7;\n d8 += h2 * r6;\n d8 += h3 * r5;\n d8 += h4 * r4;\n c = (d8 >>> 13);\n d8 &= 0x1fff;\n d8 += h5 * r3;\n d8 += h6 * r2;\n d8 += h7 * r1;\n d8 += h8 * r0;\n d8 += h9 * (5 * r9);\n c += (d8 >>> 13);\n d8 &= 0x1fff;\n let d9 = c;\n d9 += h0 * r9;\n d9 += h1 * r8;\n d9 += h2 * r7;\n d9 += h3 * r6;\n d9 += h4 * r5;\n c = (d9 >>> 13);\n d9 &= 0x1fff;\n d9 += h5 * r4;\n d9 += h6 * r3;\n d9 += h7 * r2;\n d9 += h8 * r1;\n d9 += h9 * r0;\n c += (d9 >>> 13);\n d9 &= 0x1fff;\n c = (((c << 2) + c)) | 0;\n c = (c + d0) | 0;\n d0 = c & 0x1fff;\n c = (c >>> 13);\n d1 += c;\n h0 = d0;\n h1 = d1;\n h2 = d2;\n h3 = d3;\n h4 = d4;\n h5 = d5;\n h6 = d6;\n h7 = d7;\n h8 = d8;\n h9 = d9;\n mpos += 16;\n bytes -= 16;\n }\n this._h[0] = h0;\n this._h[1] = h1;\n this._h[2] = h2;\n this._h[3] = h3;\n this._h[4] = h4;\n this._h[5] = h5;\n this._h[6] = h6;\n this._h[7] = h7;\n this._h[8] = h8;\n this._h[9] = h9;\n }\n finish(mac, macpos = 0) {\n const g = new Uint16Array(10);\n let c;\n let mask;\n let f;\n let i;\n if (this._leftover) {\n i = this._leftover;\n this._buffer[i++] = 1;\n for (; i < 16; i++) {\n this._buffer[i] = 0;\n }\n this._fin = 1;\n this._blocks(this._buffer, 0, 16);\n }\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n for (i = 2; i < 10; i++) {\n this._h[i] += c;\n c = this._h[i] >>> 13;\n this._h[i] &= 0x1fff;\n }\n this._h[0] += (c * 5);\n c = this._h[0] >>> 13;\n this._h[0] &= 0x1fff;\n this._h[1] += c;\n c = this._h[1] >>> 13;\n this._h[1] &= 0x1fff;\n this._h[2] += c;\n g[0] = this._h[0] + 5;\n c = g[0] >>> 13;\n g[0] &= 0x1fff;\n for (i = 1; i < 10; i++) {\n g[i] = this._h[i] + c;\n c = g[i] >>> 13;\n g[i] &= 0x1fff;\n }\n g[9] -= (1 << 13);\n mask = (c ^ 1) - 1;\n for (i = 0; i < 10; i++) {\n g[i] &= mask;\n }\n mask = ~mask;\n for (i = 0; i < 10; i++) {\n this._h[i] = (this._h[i] & mask) | g[i];\n }\n this._h[0] = ((this._h[0]) | (this._h[1] << 13)) & 0xffff;\n this._h[1] = ((this._h[1] >>> 3) | (this._h[2] << 10)) & 0xffff;\n this._h[2] = ((this._h[2] >>> 6) | (this._h[3] << 7)) & 0xffff;\n this._h[3] = ((this._h[3] >>> 9) | (this._h[4] << 4)) & 0xffff;\n this._h[4] = ((this._h[4] >>> 12) | (this._h[5] << 1) | (this._h[6] << 14)) & 0xffff;\n this._h[5] = ((this._h[6] >>> 2) | (this._h[7] << 11)) & 0xffff;\n this._h[6] = ((this._h[7] >>> 5) | (this._h[8] << 8)) & 0xffff;\n this._h[7] = ((this._h[8] >>> 8) | (this._h[9] << 5)) & 0xffff;\n f = this._h[0] + this._pad[0];\n this._h[0] = f & 0xffff;\n for (i = 1; i < 8; i++) {\n f = (((this._h[i] + this._pad[i]) | 0) + (f >>> 16)) | 0;\n this._h[i] = f & 0xffff;\n }\n mac[macpos + 0] = this._h[0] >>> 0;\n mac[macpos + 1] = this._h[0] >>> 8;\n mac[macpos + 2] = this._h[1] >>> 0;\n mac[macpos + 3] = this._h[1] >>> 8;\n mac[macpos + 4] = this._h[2] >>> 0;\n mac[macpos + 5] = this._h[2] >>> 8;\n mac[macpos + 6] = this._h[3] >>> 0;\n mac[macpos + 7] = this._h[3] >>> 8;\n mac[macpos + 8] = this._h[4] >>> 0;\n mac[macpos + 9] = this._h[4] >>> 8;\n mac[macpos + 10] = this._h[5] >>> 0;\n mac[macpos + 11] = this._h[5] >>> 8;\n mac[macpos + 12] = this._h[6] >>> 0;\n mac[macpos + 13] = this._h[6] >>> 8;\n mac[macpos + 14] = this._h[7] >>> 0;\n mac[macpos + 15] = this._h[7] >>> 8;\n this._finished = true;\n return this;\n }\n update(m) {\n let mpos = 0;\n let bytes = m.length;\n let want;\n if (this._leftover) {\n want = (16 - this._leftover);\n if (want > bytes) {\n want = bytes;\n }\n for (let i = 0; i < want; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n bytes -= want;\n mpos += want;\n this._leftover += want;\n if (this._leftover < 16) {\n return this;\n }\n this._blocks(this._buffer, 0, 16);\n this._leftover = 0;\n }\n if (bytes >= 16) {\n want = bytes - (bytes % 16);\n this._blocks(m, mpos, want);\n mpos += want;\n bytes -= want;\n }\n if (bytes) {\n for (let i = 0; i < bytes; i++) {\n this._buffer[this._leftover + i] = m[mpos + i];\n }\n this._leftover += bytes;\n }\n return this;\n }\n digest() {\n // TODO(dchest): it behaves differently than other hashes/HMAC,\n // because it throws when finished — others just return saved result.\n if (this._finished) {\n throw new Error("Poly1305 was finished");\n }\n let mac = new Uint8Array(16);\n this.finish(mac);\n return mac;\n }\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._r);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._h);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._pad);\n this._leftover = 0;\n this._fin = 0;\n this._finished = true; // mark as finished even if not\n return this;\n }\n}\n/**\n * Returns 16-byte authenticator of data using a one-time 32-byte key.\n *\n * Important: key should be used for only one message, it should never repeat.\n */\nfunction oneTimeAuth(key, data) {\n const h = new Poly1305(key);\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n/**\n * Returns true if two authenticators are 16-byte long and equal.\n * Uses contant-time comparison to avoid leaking timing information.\n */\nfunction equal(a, b) {\n if (a.length !== DIGEST_LENGTH || b.length !== DIGEST_LENGTH) {\n return false;\n }\n return (0,_stablelib_constant_time__WEBPACK_IMPORTED_MODULE_0__.equal)(a, b);\n}\n//# sourceMappingURL=poly1305.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/poly1305/lib/poly1305.js?\n}')},"./node_modules/@stablelib/random/lib/random.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaultRandomSource: () => (/* binding */ defaultRandomSource),\n/* harmony export */ randomBytes: () => (/* binding */ randomBytes),\n/* harmony export */ randomString: () => (/* binding */ randomString),\n/* harmony export */ randomStringForEntropy: () => (/* binding */ randomStringForEntropy),\n/* harmony export */ randomUint32: () => (/* binding */ randomUint32)\n/* harmony export */ });\n/* harmony import */ var _source_system_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./source/system.js */ "./node_modules/@stablelib/random/lib/source/system.js");\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\nconst defaultRandomSource = new _source_system_js__WEBPACK_IMPORTED_MODULE_0__.SystemRandomSource();\nfunction randomBytes(length, prng = defaultRandomSource) {\n return prng.randomBytes(length);\n}\n/**\n * Returns a uniformly random unsigned 32-bit integer.\n */\nfunction randomUint32(prng = defaultRandomSource) {\n // Generate 4-byte random buffer.\n const buf = randomBytes(4, prng);\n // Convert bytes from buffer into a 32-bit integer.\n // It\'s not important which byte order to use, since\n // the result is random.\n const result = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_1__.readUint32LE)(buf);\n // Clean the buffer.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(buf);\n return result;\n}\n/** 62 alphanumeric characters for default charset of randomString() */\nconst ALPHANUMERIC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";\n/**\n * Returns a uniform random string of the given length\n * with characters from the given charset.\n *\n * Charset must not have more than 256 characters.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomString(length, charset = ALPHANUMERIC, prng = defaultRandomSource) {\n if (charset.length < 2) {\n throw new Error("randomString charset is too short");\n }\n if (charset.length > 256) {\n throw new Error("randomString charset is too long");\n }\n let out = \'\';\n const charsLen = charset.length;\n const maxByte = 256 - (256 % charsLen);\n while (length > 0) {\n const buf = randomBytes(Math.ceil(length * 256 / maxByte), prng);\n for (let i = 0; i < buf.length && length > 0; i++) {\n const randomByte = buf[i];\n if (randomByte < maxByte) {\n out += charset.charAt(randomByte % charsLen);\n length--;\n }\n }\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(buf);\n }\n return out;\n}\n/**\n * Returns uniform random string containing at least the given\n * number of bits of entropy.\n *\n * For example, randomStringForEntropy(128) will return a 22-character\n * alphanumeric string, while randomStringForEntropy(128, "0123456789")\n * will return a 39-character numeric string, both will contain at\n * least 128 bits of entropy.\n *\n * Default charset generates case-sensitive alphanumeric\n * strings (0-9, A-Z, a-z).\n */\nfunction randomStringForEntropy(bits, charset = ALPHANUMERIC, prng = defaultRandomSource) {\n const length = Math.ceil(bits / (Math.log(charset.length) / Math.LN2));\n return randomString(length, charset, prng);\n}\n//# sourceMappingURL=random.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/random/lib/random.js?\n}')},"./node_modules/@stablelib/random/lib/source/system.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SystemRandomSource: () => (/* binding */ SystemRandomSource)\n/* harmony export */ });\n// Copyright (C) 2024 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nconst QUOTA = 65536;\nclass SystemRandomSource {\n isAvailable = false;\n isInstantiated = false;\n constructor() {\n if (typeof crypto !== "undefined" && \'getRandomValues\' in crypto) {\n this.isAvailable = true;\n this.isInstantiated = true;\n }\n }\n randomBytes(length) {\n if (!this.isAvailable) {\n throw new Error("System random byte generator is not available.");\n }\n const out = new Uint8Array(length);\n for (let i = 0; i < out.length; i += QUOTA) {\n crypto.getRandomValues(out.subarray(i, i + Math.min(out.length - i, QUOTA)));\n }\n return out;\n }\n}\n//# sourceMappingURL=system.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/random/lib/source/system.js?\n}')},"./node_modules/@stablelib/salsa20/lib/salsa20.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stream: () => (/* binding */ stream),\n/* harmony export */ streamXOR: () => (/* binding */ streamXOR)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package salsa20 implements Salsa20 stream cipher.\n */\n\n\n// Number of Salsa20 rounds (Salsa20/20).\nconst ROUNDS = 20;\n/**\n * Applies the Salsa20 core function to 16-byte input,\n * 32-byte key key, and puts the result into 64-byte array out.\n */\nfunction core(out, input, key) {\n let j0 = 0x61707865; // "expa"\n let j1 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n let j2 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n let j3 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n let j4 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n let j5 = 0x3320646E; // "nd 3"\n let j6 = (input[3] << 24) | (input[2] << 16) | (input[1] << 8) | input[0];\n let j7 = (input[7] << 24) | (input[6] << 16) | (input[5] << 8) | input[4];\n let j8 = (input[11] << 24) | (input[10] << 16) | (input[9] << 8) | input[8];\n let j9 = (input[15] << 24) | (input[14] << 16) | (input[13] << 8) | input[12];\n let j10 = 0x79622D32; // "2-by"\n let j11 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n let j12 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n let j13 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n let j14 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n let j15 = 0x6B206574; // "te k"\n let x0 = j0;\n let x1 = j1;\n let x2 = j2;\n let x3 = j3;\n let x4 = j4;\n let x5 = j5;\n let x6 = j6;\n let x7 = j7;\n let x8 = j8;\n let x9 = j9;\n let x10 = j10;\n let x11 = j11;\n let x12 = j12;\n let x13 = j13;\n let x14 = j14;\n let x15 = j15;\n let u;\n for (let i = 0; i < ROUNDS; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u << 7 | u >>> (32 - 7);\n u = x4 + x0 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x4 | 0;\n x12 ^= u << 13 | u >>> (32 - 13);\n u = x12 + x8 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x1 | 0;\n x9 ^= u << 7 | u >>> (32 - 7);\n u = x9 + x5 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x9 | 0;\n x1 ^= u << 13 | u >>> (32 - 13);\n u = x1 + x13 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x6 | 0;\n x14 ^= u << 7 | u >>> (32 - 7);\n u = x14 + x10 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x14 | 0;\n x6 ^= u << 13 | u >>> (32 - 13);\n u = x6 + x2 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x11 | 0;\n x3 ^= u << 7 | u >>> (32 - 7);\n u = x3 + x15 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x3 | 0;\n x11 ^= u << 13 | u >>> (32 - 13);\n u = x11 + x7 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n u = x0 + x3 | 0;\n x1 ^= u << 7 | u >>> (32 - 7);\n u = x1 + x0 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x1 | 0;\n x3 ^= u << 13 | u >>> (32 - 13);\n u = x3 + x2 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x4 | 0;\n x6 ^= u << 7 | u >>> (32 - 7);\n u = x6 + x5 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x6 | 0;\n x4 ^= u << 13 | u >>> (32 - 13);\n u = x4 + x7 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x9 | 0;\n x11 ^= u << 7 | u >>> (32 - 7);\n u = x11 + x10 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x11 | 0;\n x9 ^= u << 13 | u >>> (32 - 13);\n u = x9 + x8 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x14 | 0;\n x12 ^= u << 7 | u >>> (32 - 7);\n u = x12 + x15 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x12 | 0;\n x14 ^= u << 13 | u >>> (32 - 13);\n u = x14 + x13 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x0 + j0 | 0, out, 0);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x1 + j1 | 0, out, 4);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x2 + j2 | 0, out, 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x3 + j3 | 0, out, 12);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x4 + j4 | 0, out, 16);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x5 + j5 | 0, out, 20);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x6 + j6 | 0, out, 24);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x7 + j7 | 0, out, 28);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x8 + j8 | 0, out, 32);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x9 + j9 | 0, out, 36);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x10 + j10 | 0, out, 40);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x11 + j11 | 0, out, 44);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x12 + j12 | 0, out, 48);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x13 + j13 | 0, out, 52);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x14 + j14 | 0, out, 56);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x15 + j15 | 0, out, 60);\n}\n/**\n * Encrypt src with Salsa20/20 stream generated for the given 32-byte key\n * and 8-byte and write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * Never use the same key and nonce to encrypt more than one message.\n *\n * If nonceInplaceCounterLength is not 0, the nonce is assumed to be a 16-byte\n * array with stream counter in first nonceInplaceCounterLength bytes and nonce\n * in the last remaining bytes. The counter will be incremented inplace for\n * each Salsa20 block. This is useful if you need to encrypt one stream of data\n * in chunks.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength = 0) {\n // We only support 256-bit keys.\n if (key.length !== 32) {\n throw new Error("Salsa20: key size must be 32 bytes");\n }\n if (dst.length < src.length) {\n throw new Error("Salsa20: destination is shorter than source");\n }\n let nc;\n let counterStart;\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 8) {\n throw new Error("Salsa20 nonce must be 8 bytes");\n }\n nc = new Uint8Array(16);\n // First bytes of nc are nonce, set it.\n nc.set(nonce);\n // Last bytes are counter.\n counterStart = nonce.length;\n }\n else {\n if (nonce.length !== 16) {\n throw new Error("Salsa20 nonce with counter must be 16 bytes");\n }\n // This will update passed nonce with counter inplace.\n nc = nonce;\n counterStart = 16 - nonceInplaceCounterLength;\n }\n // Allocate temporary space for Salsa20 block.\n const block = new Uint8Array(64);\n for (let i = 0; i < src.length; i += 64) {\n // Generate a block.\n core(block, nc, key);\n // XOR block bytes with src into dst.\n for (let j = i; j < i + 64 && j < src.length; j++) {\n dst[j] = src[j] ^ block[j - i];\n }\n // Increment counter.\n incrementCounter(nc, counterStart, nc.length - counterStart);\n }\n // Cleanup temporary space.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(block);\n if (nonceInplaceCounterLength === 0) {\n // Cleanup counter.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(nc);\n }\n return dst;\n}\n/**\n * Generate Salsa20/20 stream for the given 32-byte key and 8-byte nonce\n * and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * If nonceInplaceCounterLength is not 0, it behaves the same\n * with respect to the nonce as described in streamXOR documentation.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength = 0) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\nfunction incrementCounter(counter, pos, len) {\n let carry = 1;\n while (len--) {\n carry = carry + (counter[pos] & 0xff) | 0;\n counter[pos] = carry & 0xff;\n carry >>>= 8;\n pos++;\n }\n if (carry > 0) {\n throw new Error("Salsa20: counter overflow");\n }\n}\n//# sourceMappingURL=salsa20.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/salsa20/lib/salsa20.js?\n}')},"./node_modules/@stablelib/sha512/lib/sha512.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BLOCK_SIZE: () => (/* binding */ BLOCK_SIZE),\n/* harmony export */ DIGEST_LENGTH: () => (/* binding */ DIGEST_LENGTH),\n/* harmony export */ SHA512: () => (/* binding */ SHA512),\n/* harmony export */ hash: () => (/* binding */ hash)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst DIGEST_LENGTH = 64;\nconst BLOCK_SIZE = 128;\n/**\n * SHA-2-512 cryptographic hash algorithm.\n */\nclass SHA512 {\n /** Length of hash output */\n digestLength = DIGEST_LENGTH;\n /** Block size */\n blockSize = BLOCK_SIZE;\n // Note: Int32Array is used instead of Uint32Array for performance reasons.\n _stateHi = new Int32Array(8); // hash state, high bytes\n _stateLo = new Int32Array(8); // hash state, low bytes\n _tempHi = new Int32Array(16); // temporary state, high bytes\n _tempLo = new Int32Array(16); // temporary state, low bytes\n _buffer = new Uint8Array(256); // buffer for data to hash\n _bufferLength = 0; // number of bytes in buffer\n _bytesHashed = 0; // number of total bytes hashed\n _finished = false; // indicates whether the hash was finalized\n constructor() {\n this.reset();\n }\n _initState() {\n this._stateHi[0] = 0x6a09e667;\n this._stateHi[1] = 0xbb67ae85;\n this._stateHi[2] = 0x3c6ef372;\n this._stateHi[3] = 0xa54ff53a;\n this._stateHi[4] = 0x510e527f;\n this._stateHi[5] = 0x9b05688c;\n this._stateHi[6] = 0x1f83d9ab;\n this._stateHi[7] = 0x5be0cd19;\n this._stateLo[0] = 0xf3bcc908;\n this._stateLo[1] = 0x84caa73b;\n this._stateLo[2] = 0xfe94f82b;\n this._stateLo[3] = 0x5f1d36f1;\n this._stateLo[4] = 0xade682d1;\n this._stateLo[5] = 0x2b3e6c1f;\n this._stateLo[6] = 0xfb41bd6b;\n this._stateLo[7] = 0x137e2179;\n }\n /**\n * Resets hash state making it possible\n * to re-use this instance to hash other data.\n */\n reset() {\n this._initState();\n this._bufferLength = 0;\n this._bytesHashed = 0;\n this._finished = false;\n return this;\n }\n /**\n * Cleans internal buffers and resets hash state.\n */\n clean() {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._buffer);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._tempHi);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._tempLo);\n this.reset();\n }\n /**\n * Updates hash state with the given data.\n *\n * Throws error when trying to update already finalized hash:\n * instance must be reset to update it again.\n */\n update(data, dataLength = data.length) {\n if (this._finished) {\n throw new Error("SHA512: can\'t update because hash was finished.");\n }\n let dataPos = 0;\n this._bytesHashed += dataLength;\n if (this._bufferLength > 0) {\n while (this._bufferLength < BLOCK_SIZE && dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n if (this._bufferLength === this.blockSize) {\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, this.blockSize);\n this._bufferLength = 0;\n }\n }\n if (dataLength >= this.blockSize) {\n dataPos = hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, data, dataPos, dataLength);\n dataLength %= this.blockSize;\n }\n while (dataLength > 0) {\n this._buffer[this._bufferLength++] = data[dataPos++];\n dataLength--;\n }\n return this;\n }\n /**\n * Finalizes hash state and puts hash into out.\n * If hash was already finalized, puts the same value.\n */\n finish(out) {\n if (!this._finished) {\n const bytesHashed = this._bytesHashed;\n const left = this._bufferLength;\n const bitLenHi = (bytesHashed / 0x20000000) | 0;\n const bitLenLo = bytesHashed << 3;\n const padLength = (bytesHashed % 128 < 112) ? 128 : 256;\n this._buffer[left] = 0x80;\n for (let i = left + 1; i < padLength - 8; i++) {\n this._buffer[i] = 0;\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(bitLenHi, this._buffer, padLength - 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(bitLenLo, this._buffer, padLength - 4);\n hashBlocks(this._tempHi, this._tempLo, this._stateHi, this._stateLo, this._buffer, 0, padLength);\n this._finished = true;\n }\n for (let i = 0; i < this.digestLength / 8; i++) {\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(this._stateHi[i], out, i * 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32BE)(this._stateLo[i], out, i * 8 + 4);\n }\n return this;\n }\n /**\n * Returns the final hash digest.\n */\n digest() {\n const out = new Uint8Array(this.digestLength);\n this.finish(out);\n return out;\n }\n /**\n * Function useful for HMAC/PBKDF2 optimization. Returns hash state to be\n * used with restoreState(). Only chain value is saved, not buffers or\n * other state variables.\n */\n saveState() {\n if (this._finished) {\n throw new Error("SHA256: cannot save finished state");\n }\n return {\n stateHi: new Int32Array(this._stateHi),\n stateLo: new Int32Array(this._stateLo),\n buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : undefined,\n bufferLength: this._bufferLength,\n bytesHashed: this._bytesHashed\n };\n }\n /**\n * Function useful for HMAC/PBKDF2 optimization. Restores state saved by\n * saveState() and sets bytesHashed to the given value.\n */\n restoreState(savedState) {\n this._stateHi.set(savedState.stateHi);\n this._stateLo.set(savedState.stateLo);\n this._bufferLength = savedState.bufferLength;\n if (savedState.buffer) {\n this._buffer.set(savedState.buffer);\n }\n this._bytesHashed = savedState.bytesHashed;\n this._finished = false;\n return this;\n }\n /**\n * Cleans state returned by saveState().\n */\n cleanSavedState(savedState) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.stateHi);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.stateLo);\n if (savedState.buffer) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(savedState.buffer);\n }\n savedState.bufferLength = 0;\n savedState.bytesHashed = 0;\n }\n}\n// Constants\nconst K = new Int32Array([\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n]);\nfunction hashBlocks(wh, wl, hh, hl, m, pos, len) {\n let ah0 = hh[0], ah1 = hh[1], ah2 = hh[2], ah3 = hh[3], ah4 = hh[4], ah5 = hh[5], ah6 = hh[6], ah7 = hh[7], al0 = hl[0], al1 = hl[1], al2 = hl[2], al3 = hl[3], al4 = hl[4], al5 = hl[5], al6 = hl[6], al7 = hl[7];\n let h, l;\n let th, tl;\n let a, b, c, d;\n while (len >= 128) {\n for (let i = 0; i < 16; i++) {\n const j = 8 * i + pos;\n wh[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32BE)(m, j);\n wl[i] = (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.readUint32BE)(m, j + 4);\n }\n for (let i = 0; i < 80; i++) {\n let bh0 = ah0;\n let bh1 = ah1;\n let bh2 = ah2;\n let bh3 = ah3;\n let bh4 = ah4;\n let bh5 = ah5;\n let bh6 = ah6;\n let bh7 = ah7;\n let bl0 = al0;\n let bl1 = al1;\n let bl2 = al2;\n let bl3 = al3;\n let bl4 = al4;\n let bl5 = al5;\n let bl6 = al6;\n let bl7 = al7;\n // add\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma1\n h = ((ah4 >>> 14) | (al4 << (32 - 14))) ^ ((ah4 >>> 18) |\n (al4 << (32 - 18))) ^ ((al4 >>> (41 - 32)) | (ah4 << (32 - (41 - 32))));\n l = ((al4 >>> 14) | (ah4 << (32 - 14))) ^ ((al4 >>> 18) |\n (ah4 << (32 - 18))) ^ ((ah4 >>> (41 - 32)) | (al4 << (32 - (41 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Ch\n h = (ah4 & ah5) ^ (~ah4 & ah6);\n l = (al4 & al5) ^ (~al4 & al6);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // K\n h = K[i * 2];\n l = K[i * 2 + 1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // w\n h = wh[i % 16];\n l = wl[i % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n th = c & 0xffff | d << 16;\n tl = a & 0xffff | b << 16;\n // add\n h = th;\n l = tl;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n // Sigma0\n h = ((ah0 >>> 28) | (al0 << (32 - 28))) ^ ((al0 >>> (34 - 32)) |\n (ah0 << (32 - (34 - 32)))) ^ ((al0 >>> (39 - 32)) | (ah0 << (32 - (39 - 32))));\n l = ((al0 >>> 28) | (ah0 << (32 - 28))) ^ ((ah0 >>> (34 - 32)) |\n (al0 << (32 - (34 - 32)))) ^ ((ah0 >>> (39 - 32)) | (al0 << (32 - (39 - 32))));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // Maj\n h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2);\n l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2);\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh7 = (c & 0xffff) | (d << 16);\n bl7 = (a & 0xffff) | (b << 16);\n // add\n h = bh3;\n l = bl3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = th;\n l = tl;\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n bh3 = (c & 0xffff) | (d << 16);\n bl3 = (a & 0xffff) | (b << 16);\n ah1 = bh0;\n ah2 = bh1;\n ah3 = bh2;\n ah4 = bh3;\n ah5 = bh4;\n ah6 = bh5;\n ah7 = bh6;\n ah0 = bh7;\n al1 = bl0;\n al2 = bl1;\n al3 = bl2;\n al4 = bl3;\n al5 = bl4;\n al6 = bl5;\n al7 = bl6;\n al0 = bl7;\n if (i % 16 === 15) {\n for (let j = 0; j < 16; j++) {\n // add\n h = wh[j];\n l = wl[j];\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = wh[(j + 9) % 16];\n l = wl[(j + 9) % 16];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma0\n th = wh[(j + 1) % 16];\n tl = wl[(j + 1) % 16];\n h = ((th >>> 1) | (tl << (32 - 1))) ^ ((th >>> 8) |\n (tl << (32 - 8))) ^ (th >>> 7);\n l = ((tl >>> 1) | (th << (32 - 1))) ^ ((tl >>> 8) |\n (th << (32 - 8))) ^ ((tl >>> 7) | (th << (32 - 7)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n // sigma1\n th = wh[(j + 14) % 16];\n tl = wl[(j + 14) % 16];\n h = ((th >>> 19) | (tl << (32 - 19))) ^ ((tl >>> (61 - 32)) |\n (th << (32 - (61 - 32)))) ^ (th >>> 6);\n l = ((tl >>> 19) | (th << (32 - 19))) ^ ((th >>> (61 - 32)) |\n (tl << (32 - (61 - 32)))) ^ ((tl >>> 6) | (th << (32 - 6)));\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n wh[j] = (c & 0xffff) | (d << 16);\n wl[j] = (a & 0xffff) | (b << 16);\n }\n }\n }\n // add\n h = ah0;\n l = al0;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[0];\n l = hl[0];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[0] = ah0 = (c & 0xffff) | (d << 16);\n hl[0] = al0 = (a & 0xffff) | (b << 16);\n h = ah1;\n l = al1;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[1];\n l = hl[1];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[1] = ah1 = (c & 0xffff) | (d << 16);\n hl[1] = al1 = (a & 0xffff) | (b << 16);\n h = ah2;\n l = al2;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[2];\n l = hl[2];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[2] = ah2 = (c & 0xffff) | (d << 16);\n hl[2] = al2 = (a & 0xffff) | (b << 16);\n h = ah3;\n l = al3;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[3];\n l = hl[3];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[3] = ah3 = (c & 0xffff) | (d << 16);\n hl[3] = al3 = (a & 0xffff) | (b << 16);\n h = ah4;\n l = al4;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[4];\n l = hl[4];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[4] = ah4 = (c & 0xffff) | (d << 16);\n hl[4] = al4 = (a & 0xffff) | (b << 16);\n h = ah5;\n l = al5;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[5];\n l = hl[5];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[5] = ah5 = (c & 0xffff) | (d << 16);\n hl[5] = al5 = (a & 0xffff) | (b << 16);\n h = ah6;\n l = al6;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[6];\n l = hl[6];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[6] = ah6 = (c & 0xffff) | (d << 16);\n hl[6] = al6 = (a & 0xffff) | (b << 16);\n h = ah7;\n l = al7;\n a = l & 0xffff;\n b = l >>> 16;\n c = h & 0xffff;\n d = h >>> 16;\n h = hh[7];\n l = hl[7];\n a += l & 0xffff;\n b += l >>> 16;\n c += h & 0xffff;\n d += h >>> 16;\n b += a >>> 16;\n c += b >>> 16;\n d += c >>> 16;\n hh[7] = ah7 = (c & 0xffff) | (d << 16);\n hl[7] = al7 = (a & 0xffff) | (b << 16);\n pos += 128;\n len -= 128;\n }\n return pos;\n}\nfunction hash(data) {\n const h = new SHA512();\n h.update(data);\n const digest = h.digest();\n h.clean();\n return digest;\n}\n//# sourceMappingURL=sha512.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/sha512/lib/sha512.js?\n}')},"./node_modules/@stablelib/utf8/lib/utf8.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ decode: () => (/* binding */ decode),\n/* harmony export */ encode: () => (/* binding */ encode),\n/* harmony export */ encodedLength: () => (/* binding */ encodedLength)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nconst INVALID_UTF16 = "utf8: invalid string";\nconst INVALID_UTF8 = "utf8: invalid source encoding";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n // Calculate result length and allocate output array.\n // encodedLength() validates string and throws errors,\n // so we don\'t need repeat validation here.\n const arr = new Uint8Array(encodedLength(s));\n let pos = 0;\n for (let i = 0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n if (c >= 0xd800 && c <= 0xdbff) {\n c = ((c - 0xd800) << 10) + (s.charCodeAt(++i) - 0xdc00) + 0x10000;\n }\n if (c < 0x80) {\n arr[pos++] = c;\n }\n else if (c < 0x800) {\n arr[pos++] = 0xc0 | (c >> 6);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n else if (c < 0x10000) {\n arr[pos++] = 0xe0 | (c >> 12);\n arr[pos++] = 0x80 | ((c >> 6) & 0x3f);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n else {\n arr[pos++] = 0xf0 | (c >> 18);\n arr[pos++] = 0x80 | ((c >> 12) & 0x3f);\n arr[pos++] = 0x80 | ((c >> 6) & 0x3f);\n arr[pos++] = 0x80 | (c & 0x3f);\n }\n }\n return arr;\n}\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n let result = 0;\n for (let i = 0; i < s.length; i++) {\n let c = s.charCodeAt(i);\n if (c >= 0xd800 && c <= 0xdbff) {\n // High surrogate, must be followed by low surrogate.\n if (i === s.length - 1) {\n throw new Error(INVALID_UTF16);\n }\n i++;\n const c2 = s.charCodeAt(i);\n if (c2 < 0xdc00 || c2 > 0xdfff) {\n throw new Error(INVALID_UTF16);\n }\n c = ((c - 0xd800) << 10) + (c2 - 0xdc00) + 0x10000;\n }\n else if (c >= 0xdc00 && c <= 0xdfff) {\n // Low surrogate without preceding high surrogate.\n throw new Error(INVALID_UTF16);\n }\n if (c < 0x80) {\n result += 1;\n }\n else if (c < 0x800) {\n result += 2;\n }\n else if (c < 0x10000) {\n result += 3;\n }\n else {\n result += 4;\n }\n }\n return result;\n}\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n const chars = [];\n for (let i = 0; i < arr.length; i++) {\n let b = arr[i];\n if (b & 0x80) {\n let min;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n const n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n const n1 = arr[++i];\n const n2 = arr[++i];\n const n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join("");\n}\n//# sourceMappingURL=utf8.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/utf8/lib/utf8.js?\n}')},"./node_modules/@stablelib/wipe/lib/wipe.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ wipe: () => (/* binding */ wipe)\n/* harmony export */ });\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Sets all values in the given array to zero and returns it.\n *\n * The fact that it sets bytes to zero can be relied on.\n *\n * There is no guarantee that this function makes data disappear from memory,\n * as runtime implementation can, for example, have copying garbage collector\n * that will make copies of sensitive data before we wipe it. Or that an\n * operating system will write our data to swap or sleep image. Another thing\n * is that an optimizing compiler can remove calls to this function or make it\n * no-op. There's nothing we can do with it, so we just do our best and hope\n * that everything will be okay and good will triumph over evil.\n */\nfunction wipe(array) {\n // Right now it's similar to array.fill(0). If it turns\n // out that runtimes optimize this call away, maybe\n // we can try something else.\n for (let i = 0; i < array.length; i++) {\n array[i] = 0;\n }\n return array;\n}\n//# sourceMappingURL=wipe.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/wipe/lib/wipe.js?\n}")},"./node_modules/@stablelib/x25519-session/lib/keyagreement.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ACCEPT_MESSAGE_LENGTH: () => (/* binding */ ACCEPT_MESSAGE_LENGTH),\n/* harmony export */ OFFER_MESSAGE_LENGTH: () => (/* binding */ OFFER_MESSAGE_LENGTH),\n/* harmony export */ SAVED_STATE_LENGTH: () => (/* binding */ SAVED_STATE_LENGTH),\n/* harmony export */ SECRET_SEED_LENGTH: () => (/* binding */ SECRET_SEED_LENGTH),\n/* harmony export */ X25519Session: () => (/* binding */ X25519Session)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _x25519_session_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./x25519-session.js */ "./node_modules/@stablelib/x25519-session/lib/x25519-session.js");\n// Copyright (C) 2020 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\n\n\n/** Constants for key agreement */\nconst OFFER_MESSAGE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.PUBLIC_KEY_LENGTH;\nconst ACCEPT_MESSAGE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.PUBLIC_KEY_LENGTH;\nconst SAVED_STATE_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH;\nconst SECRET_SEED_LENGTH = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH;\n/**\n * X25519 key agreement using ephemeral key pairs.\n *\n * Note that unless this key agreement is combined with an authentication\n * method, such as public key signatures, it\'s vulnerable to man-in-the-middle\n * attacks.\n */\nclass X25519Session {\n offerMessageLength = OFFER_MESSAGE_LENGTH;\n acceptMessageLength = ACCEPT_MESSAGE_LENGTH;\n sharedKeyLength = _stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SHARED_KEY_LENGTH;\n savedStateLength = SAVED_STATE_LENGTH;\n _seed;\n _keyPair;\n _sharedKey;\n _sessionKeys;\n constructor(secretSeed, prng) {\n this._seed = secretSeed || (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.SECRET_KEY_LENGTH, prng);\n }\n saveState() {\n return new Uint8Array(this._seed);\n }\n restoreState(savedState) {\n this._seed = new Uint8Array(savedState);\n return this;\n }\n clean() {\n if (this._seed) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._seed);\n }\n if (this._keyPair) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._keyPair.secretKey);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._keyPair.publicKey);\n }\n if (this._sharedKey) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sharedKey);\n }\n if (this._sessionKeys) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sessionKeys.receive);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(this._sessionKeys.send);\n }\n }\n offer() {\n this._keyPair = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.generateKeyPairFromSeed)(this._seed);\n return new Uint8Array(this._keyPair.publicKey);\n }\n accept(offerMsg) {\n if (this._keyPair) {\n throw new Error("X25519Session: accept shouldn\'t be called by offering party");\n }\n if (offerMsg.length !== this.offerMessageLength) {\n throw new Error("X25519Session: incorrect offer message length");\n }\n if (this._sharedKey) {\n throw new Error("X25519Session: accept was already called");\n }\n const keyPair = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.generateKeyPairFromSeed)(this._seed);\n this._sharedKey = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.sharedKey)(keyPair.secretKey, offerMsg);\n this._sessionKeys = (0,_x25519_session_js__WEBPACK_IMPORTED_MODULE_3__.clientSessionKeysFromSharedKey)(this._sharedKey, keyPair.publicKey, offerMsg);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(keyPair.secretKey);\n return keyPair.publicKey;\n }\n finish(acceptMsg) {\n if (acceptMsg.length !== this.acceptMessageLength) {\n throw new Error("X25519Session: incorrect accept message length");\n }\n if (!this._keyPair) {\n throw new Error("X25519Session: no offer state");\n }\n if (this._sharedKey) {\n throw new Error("X25519Session: finish was already called");\n }\n this._sharedKey = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_2__.sharedKey)(this._keyPair.secretKey, acceptMsg);\n this._sessionKeys = (0,_x25519_session_js__WEBPACK_IMPORTED_MODULE_3__.serverSessionKeysFromSharedKey)(this._sharedKey, this._keyPair.publicKey, acceptMsg);\n return this;\n }\n getSharedKey() {\n if (!this._sharedKey) {\n throw new Error("X25519Session: no shared key established");\n }\n return new Uint8Array(this._sharedKey);\n }\n getSessionKeys() {\n if (!this._sessionKeys) {\n throw new Error("X25519Session: no shared key established");\n }\n return {\n receive: new Uint8Array(this._sessionKeys.receive),\n send: new Uint8Array(this._sessionKeys.send),\n };\n }\n}\n//# sourceMappingURL=keyagreement.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519-session/lib/keyagreement.js?\n}')},"./node_modules/@stablelib/x25519-session/lib/x25519-session.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ X25519Session: () => (/* reexport safe */ _keyagreement_js__WEBPACK_IMPORTED_MODULE_2__.X25519Session),\n/* harmony export */ clientSessionKeys: () => (/* binding */ clientSessionKeys),\n/* harmony export */ clientSessionKeysFromSharedKey: () => (/* binding */ clientSessionKeysFromSharedKey),\n/* harmony export */ serverSessionKeys: () => (/* binding */ serverSessionKeys),\n/* harmony export */ serverSessionKeysFromSharedKey: () => (/* binding */ serverSessionKeysFromSharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/blake2b */ "./node_modules/@stablelib/blake2b/lib/blake2b.js");\n/* harmony import */ var _stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/x25519 */ "./node_modules/@stablelib/x25519/lib/x25519.js");\n/* harmony import */ var _keyagreement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keyagreement.js */ "./node_modules/@stablelib/x25519-session/lib/keyagreement.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package x25519-session implements libsodium compatible session keys generation based on X25519 key agreement.\n */\n\n\n\nconst SESSION_KEY_LENGTH = 32;\n/**\n * Generates server-side session encryption keys from the shared key obtained during agreement phase.\n */\nfunction serverSessionKeysFromSharedKey(sharedKey, myPublicKey, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const state = new hash();\n if (state.digestLength !== SESSION_KEY_LENGTH * 2) {\n throw new Error("X25519: incorrect digest length");\n }\n const h = state.update(sharedKey).update(theirPublicKey).update(myPublicKey).digest();\n return {\n send: h.subarray(0, SESSION_KEY_LENGTH),\n receive: h.subarray(SESSION_KEY_LENGTH),\n };\n}\n/**\n * Generates client-side session encryption keys from the shared key obtained during agreement phase.\n */\nfunction clientSessionKeysFromSharedKey(sharedKey, myPublicKey, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const state = new hash();\n if (state.digestLength !== SESSION_KEY_LENGTH * 2) {\n throw new Error("X25519: incorrect digest length");\n }\n const h = state.update(sharedKey).update(myPublicKey).update(theirPublicKey).digest();\n return {\n receive: h.subarray(0, SESSION_KEY_LENGTH),\n send: h.subarray(SESSION_KEY_LENGTH),\n };\n}\n/**\n * Generates server-side session encryption keys. Uses a key pair and a peer\'s public key to generate the shared key.\n */\nfunction serverSessionKeys(myKeyPair, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const sk = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__.sharedKey)(myKeyPair.secretKey, theirPublicKey);\n return serverSessionKeysFromSharedKey(sk, myKeyPair.publicKey, theirPublicKey, hash);\n}\n/**\n * Generates client-side session encryption keys. Uses a key pair and a peer\'s public key to generate the shared key.\n */\nfunction clientSessionKeys(myKeyPair, theirPublicKey, hash = _stablelib_blake2b__WEBPACK_IMPORTED_MODULE_0__.BLAKE2b) {\n const sk = (0,_stablelib_x25519__WEBPACK_IMPORTED_MODULE_1__.sharedKey)(myKeyPair.secretKey, theirPublicKey);\n return clientSessionKeysFromSharedKey(sk, myKeyPair.publicKey, theirPublicKey, hash);\n}\n//# sourceMappingURL=x25519-session.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519-session/lib/x25519-session.js?\n}')},"./node_modules/@stablelib/x25519/lib/x25519.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ PUBLIC_KEY_LENGTH: () => (/* binding */ PUBLIC_KEY_LENGTH),\n/* harmony export */ SECRET_KEY_LENGTH: () => (/* binding */ SECRET_KEY_LENGTH),\n/* harmony export */ SHARED_KEY_LENGTH: () => (/* binding */ SHARED_KEY_LENGTH),\n/* harmony export */ generateKeyPair: () => (/* binding */ generateKeyPair),\n/* harmony export */ generateKeyPairFromSeed: () => (/* binding */ generateKeyPairFromSeed),\n/* harmony export */ scalarMult: () => (/* binding */ scalarMult),\n/* harmony export */ scalarMultBase: () => (/* binding */ scalarMultBase),\n/* harmony export */ sharedKey: () => (/* binding */ sharedKey)\n/* harmony export */ });\n/* harmony import */ var _stablelib_random__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/random */ "./node_modules/@stablelib/random/lib/random.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n\n\nconst PUBLIC_KEY_LENGTH = 32;\nconst SECRET_KEY_LENGTH = 32;\nconst SHARED_KEY_LENGTH = 32;\n// Returns new zero-filled 16-element GF (Float64Array).\n// If passed an array of numbers, prefills the returned\n// array with them.\n//\n// We use Float64Array, because we need 48-bit numbers\n// for this implementation.\nfunction gf(init) {\n const r = new Float64Array(16);\n if (init) {\n for (let i = 0; i < init.length; i++) {\n r[i] = init[i];\n }\n }\n return r;\n}\n// Base point.\nconst _9 = new Uint8Array(32);\n_9[0] = 9;\nconst _121665 = gf([0xdb41, 1]);\nfunction car25519(o) {\n let c = 1;\n for (let i = 0; i < 16; i++) {\n let v = o[i] + c + 65535;\n c = Math.floor(v / 65536);\n o[i] = v - c * 65536;\n }\n o[0] += c - 1 + 37 * (c - 1);\n}\nfunction sel25519(p, q, b) {\n const c = ~(b - 1);\n for (let i = 0; i < 16; i++) {\n const t = c & (p[i] ^ q[i]);\n p[i] ^= t;\n q[i] ^= t;\n }\n}\nfunction pack25519(o, n) {\n const m = gf();\n const t = gf();\n for (let i = 0; i < 16; i++) {\n t[i] = n[i];\n }\n car25519(t);\n car25519(t);\n car25519(t);\n for (let j = 0; j < 2; j++) {\n m[0] = t[0] - 0xffed;\n for (let i = 1; i < 15; i++) {\n m[i] = t[i] - 0xffff - ((m[i - 1] >> 16) & 1);\n m[i - 1] &= 0xffff;\n }\n m[15] = t[15] - 0x7fff - ((m[14] >> 16) & 1);\n const b = (m[15] >> 16) & 1;\n m[14] &= 0xffff;\n sel25519(t, m, 1 - b);\n }\n for (let i = 0; i < 16; i++) {\n o[2 * i] = t[i] & 0xff;\n o[2 * i + 1] = t[i] >> 8;\n }\n}\nfunction unpack25519(o, n) {\n for (let i = 0; i < 16; i++) {\n o[i] = n[2 * i] + (n[2 * i + 1] << 8);\n }\n o[15] &= 0x7fff;\n}\nfunction add(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] + b[i];\n }\n}\nfunction sub(o, a, b) {\n for (let i = 0; i < 16; i++) {\n o[i] = a[i] - b[i];\n }\n}\nfunction mul(o, a, b) {\n let v, c, t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11], b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n v = a[0];\n t0 += v * b0;\n t1 += v * b1;\n t2 += v * b2;\n t3 += v * b3;\n t4 += v * b4;\n t5 += v * b5;\n t6 += v * b6;\n t7 += v * b7;\n t8 += v * b8;\n t9 += v * b9;\n t10 += v * b10;\n t11 += v * b11;\n t12 += v * b12;\n t13 += v * b13;\n t14 += v * b14;\n t15 += v * b15;\n v = a[1];\n t1 += v * b0;\n t2 += v * b1;\n t3 += v * b2;\n t4 += v * b3;\n t5 += v * b4;\n t6 += v * b5;\n t7 += v * b6;\n t8 += v * b7;\n t9 += v * b8;\n t10 += v * b9;\n t11 += v * b10;\n t12 += v * b11;\n t13 += v * b12;\n t14 += v * b13;\n t15 += v * b14;\n t16 += v * b15;\n v = a[2];\n t2 += v * b0;\n t3 += v * b1;\n t4 += v * b2;\n t5 += v * b3;\n t6 += v * b4;\n t7 += v * b5;\n t8 += v * b6;\n t9 += v * b7;\n t10 += v * b8;\n t11 += v * b9;\n t12 += v * b10;\n t13 += v * b11;\n t14 += v * b12;\n t15 += v * b13;\n t16 += v * b14;\n t17 += v * b15;\n v = a[3];\n t3 += v * b0;\n t4 += v * b1;\n t5 += v * b2;\n t6 += v * b3;\n t7 += v * b4;\n t8 += v * b5;\n t9 += v * b6;\n t10 += v * b7;\n t11 += v * b8;\n t12 += v * b9;\n t13 += v * b10;\n t14 += v * b11;\n t15 += v * b12;\n t16 += v * b13;\n t17 += v * b14;\n t18 += v * b15;\n v = a[4];\n t4 += v * b0;\n t5 += v * b1;\n t6 += v * b2;\n t7 += v * b3;\n t8 += v * b4;\n t9 += v * b5;\n t10 += v * b6;\n t11 += v * b7;\n t12 += v * b8;\n t13 += v * b9;\n t14 += v * b10;\n t15 += v * b11;\n t16 += v * b12;\n t17 += v * b13;\n t18 += v * b14;\n t19 += v * b15;\n v = a[5];\n t5 += v * b0;\n t6 += v * b1;\n t7 += v * b2;\n t8 += v * b3;\n t9 += v * b4;\n t10 += v * b5;\n t11 += v * b6;\n t12 += v * b7;\n t13 += v * b8;\n t14 += v * b9;\n t15 += v * b10;\n t16 += v * b11;\n t17 += v * b12;\n t18 += v * b13;\n t19 += v * b14;\n t20 += v * b15;\n v = a[6];\n t6 += v * b0;\n t7 += v * b1;\n t8 += v * b2;\n t9 += v * b3;\n t10 += v * b4;\n t11 += v * b5;\n t12 += v * b6;\n t13 += v * b7;\n t14 += v * b8;\n t15 += v * b9;\n t16 += v * b10;\n t17 += v * b11;\n t18 += v * b12;\n t19 += v * b13;\n t20 += v * b14;\n t21 += v * b15;\n v = a[7];\n t7 += v * b0;\n t8 += v * b1;\n t9 += v * b2;\n t10 += v * b3;\n t11 += v * b4;\n t12 += v * b5;\n t13 += v * b6;\n t14 += v * b7;\n t15 += v * b8;\n t16 += v * b9;\n t17 += v * b10;\n t18 += v * b11;\n t19 += v * b12;\n t20 += v * b13;\n t21 += v * b14;\n t22 += v * b15;\n v = a[8];\n t8 += v * b0;\n t9 += v * b1;\n t10 += v * b2;\n t11 += v * b3;\n t12 += v * b4;\n t13 += v * b5;\n t14 += v * b6;\n t15 += v * b7;\n t16 += v * b8;\n t17 += v * b9;\n t18 += v * b10;\n t19 += v * b11;\n t20 += v * b12;\n t21 += v * b13;\n t22 += v * b14;\n t23 += v * b15;\n v = a[9];\n t9 += v * b0;\n t10 += v * b1;\n t11 += v * b2;\n t12 += v * b3;\n t13 += v * b4;\n t14 += v * b5;\n t15 += v * b6;\n t16 += v * b7;\n t17 += v * b8;\n t18 += v * b9;\n t19 += v * b10;\n t20 += v * b11;\n t21 += v * b12;\n t22 += v * b13;\n t23 += v * b14;\n t24 += v * b15;\n v = a[10];\n t10 += v * b0;\n t11 += v * b1;\n t12 += v * b2;\n t13 += v * b3;\n t14 += v * b4;\n t15 += v * b5;\n t16 += v * b6;\n t17 += v * b7;\n t18 += v * b8;\n t19 += v * b9;\n t20 += v * b10;\n t21 += v * b11;\n t22 += v * b12;\n t23 += v * b13;\n t24 += v * b14;\n t25 += v * b15;\n v = a[11];\n t11 += v * b0;\n t12 += v * b1;\n t13 += v * b2;\n t14 += v * b3;\n t15 += v * b4;\n t16 += v * b5;\n t17 += v * b6;\n t18 += v * b7;\n t19 += v * b8;\n t20 += v * b9;\n t21 += v * b10;\n t22 += v * b11;\n t23 += v * b12;\n t24 += v * b13;\n t25 += v * b14;\n t26 += v * b15;\n v = a[12];\n t12 += v * b0;\n t13 += v * b1;\n t14 += v * b2;\n t15 += v * b3;\n t16 += v * b4;\n t17 += v * b5;\n t18 += v * b6;\n t19 += v * b7;\n t20 += v * b8;\n t21 += v * b9;\n t22 += v * b10;\n t23 += v * b11;\n t24 += v * b12;\n t25 += v * b13;\n t26 += v * b14;\n t27 += v * b15;\n v = a[13];\n t13 += v * b0;\n t14 += v * b1;\n t15 += v * b2;\n t16 += v * b3;\n t17 += v * b4;\n t18 += v * b5;\n t19 += v * b6;\n t20 += v * b7;\n t21 += v * b8;\n t22 += v * b9;\n t23 += v * b10;\n t24 += v * b11;\n t25 += v * b12;\n t26 += v * b13;\n t27 += v * b14;\n t28 += v * b15;\n v = a[14];\n t14 += v * b0;\n t15 += v * b1;\n t16 += v * b2;\n t17 += v * b3;\n t18 += v * b4;\n t19 += v * b5;\n t20 += v * b6;\n t21 += v * b7;\n t22 += v * b8;\n t23 += v * b9;\n t24 += v * b10;\n t25 += v * b11;\n t26 += v * b12;\n t27 += v * b13;\n t28 += v * b14;\n t29 += v * b15;\n v = a[15];\n t15 += v * b0;\n t16 += v * b1;\n t17 += v * b2;\n t18 += v * b3;\n t19 += v * b4;\n t20 += v * b5;\n t21 += v * b6;\n t22 += v * b7;\n t23 += v * b8;\n t24 += v * b9;\n t25 += v * b10;\n t26 += v * b11;\n t27 += v * b12;\n t28 += v * b13;\n t29 += v * b14;\n t30 += v * b15;\n t0 += 38 * t16;\n t1 += 38 * t17;\n t2 += 38 * t18;\n t3 += 38 * t19;\n t4 += 38 * t20;\n t5 += 38 * t21;\n t6 += 38 * t22;\n t7 += 38 * t23;\n t8 += 38 * t24;\n t9 += 38 * t25;\n t10 += 38 * t26;\n t11 += 38 * t27;\n t12 += 38 * t28;\n t13 += 38 * t29;\n t14 += 38 * t30;\n // t15 left as is\n // first car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n // second car\n c = 1;\n v = t0 + c + 65535;\n c = Math.floor(v / 65536);\n t0 = v - c * 65536;\n v = t1 + c + 65535;\n c = Math.floor(v / 65536);\n t1 = v - c * 65536;\n v = t2 + c + 65535;\n c = Math.floor(v / 65536);\n t2 = v - c * 65536;\n v = t3 + c + 65535;\n c = Math.floor(v / 65536);\n t3 = v - c * 65536;\n v = t4 + c + 65535;\n c = Math.floor(v / 65536);\n t4 = v - c * 65536;\n v = t5 + c + 65535;\n c = Math.floor(v / 65536);\n t5 = v - c * 65536;\n v = t6 + c + 65535;\n c = Math.floor(v / 65536);\n t6 = v - c * 65536;\n v = t7 + c + 65535;\n c = Math.floor(v / 65536);\n t7 = v - c * 65536;\n v = t8 + c + 65535;\n c = Math.floor(v / 65536);\n t8 = v - c * 65536;\n v = t9 + c + 65535;\n c = Math.floor(v / 65536);\n t9 = v - c * 65536;\n v = t10 + c + 65535;\n c = Math.floor(v / 65536);\n t10 = v - c * 65536;\n v = t11 + c + 65535;\n c = Math.floor(v / 65536);\n t11 = v - c * 65536;\n v = t12 + c + 65535;\n c = Math.floor(v / 65536);\n t12 = v - c * 65536;\n v = t13 + c + 65535;\n c = Math.floor(v / 65536);\n t13 = v - c * 65536;\n v = t14 + c + 65535;\n c = Math.floor(v / 65536);\n t14 = v - c * 65536;\n v = t15 + c + 65535;\n c = Math.floor(v / 65536);\n t15 = v - c * 65536;\n t0 += c - 1 + 37 * (c - 1);\n o[0] = t0;\n o[1] = t1;\n o[2] = t2;\n o[3] = t3;\n o[4] = t4;\n o[5] = t5;\n o[6] = t6;\n o[7] = t7;\n o[8] = t8;\n o[9] = t9;\n o[10] = t10;\n o[11] = t11;\n o[12] = t12;\n o[13] = t13;\n o[14] = t14;\n o[15] = t15;\n}\nfunction square(o, a) {\n mul(o, a, a);\n}\nfunction inv25519(o, inp) {\n const c = gf();\n for (let i = 0; i < 16; i++) {\n c[i] = inp[i];\n }\n for (let i = 253; i >= 0; i--) {\n square(c, c);\n if (i !== 2 && i !== 4) {\n mul(c, c, inp);\n }\n }\n for (let i = 0; i < 16; i++) {\n o[i] = c[i];\n }\n}\nfunction scalarMult(n, p) {\n const z = new Uint8Array(32);\n const x = new Float64Array(80);\n const a = gf(), b = gf(), c = gf(), d = gf(), e = gf(), f = gf();\n for (let i = 0; i < 31; i++) {\n z[i] = n[i];\n }\n z[31] = (n[31] & 127) | 64;\n z[0] &= 248;\n unpack25519(x, p);\n for (let i = 0; i < 16; i++) {\n b[i] = x[i];\n }\n a[0] = d[0] = 1;\n for (let i = 254; i >= 0; --i) {\n const r = (z[i >>> 3] >>> (i & 7)) & 1;\n sel25519(a, b, r);\n sel25519(c, d, r);\n add(e, a, c);\n sub(a, a, c);\n add(c, b, d);\n sub(b, b, d);\n square(d, e);\n square(f, a);\n mul(a, c, a);\n mul(c, b, e);\n add(e, a, c);\n sub(a, a, c);\n square(b, a);\n sub(c, d, f);\n mul(a, c, _121665);\n add(a, a, d);\n mul(c, c, a);\n mul(a, d, f);\n mul(d, b, x);\n square(b, e);\n sel25519(a, b, r);\n sel25519(c, d, r);\n }\n for (let i = 0; i < 16; i++) {\n x[i + 16] = a[i];\n x[i + 32] = c[i];\n x[i + 48] = b[i];\n x[i + 64] = d[i];\n }\n const x32 = x.subarray(32);\n const x16 = x.subarray(16);\n inv25519(x32, x32);\n mul(x16, x16, x32);\n const q = new Uint8Array(32);\n pack25519(q, x16);\n return q;\n}\nfunction scalarMultBase(n) {\n return scalarMult(n, _9);\n}\nfunction generateKeyPairFromSeed(seed) {\n if (seed.length !== SECRET_KEY_LENGTH) {\n throw new Error(`x25519: seed must be ${SECRET_KEY_LENGTH} bytes`);\n }\n const secretKey = new Uint8Array(seed);\n const publicKey = scalarMultBase(secretKey);\n return {\n publicKey,\n secretKey\n };\n}\nfunction generateKeyPair(prng) {\n const seed = (0,_stablelib_random__WEBPACK_IMPORTED_MODULE_0__.randomBytes)(32, prng);\n const result = generateKeyPairFromSeed(seed);\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_1__.wipe)(seed);\n return result;\n}\n/**\n * Returns a shared key between our secret key and a peer\'s public key.\n *\n * Throws an error if the given keys are of wrong length.\n *\n * If rejectZero is true throws if the calculated shared key is all-zero.\n * From RFC 7748:\n *\n * > Protocol designers using Diffie-Hellman over the curves defined in\n * > this document must not assume "contributory behavior". Specially,\n * > contributory behavior means that both parties\' private keys\n * > contribute to the resulting shared key. Since curve25519 and\n * > curve448 have cofactors of 8 and 4 (respectively), an input point of\n * > small order will eliminate any contribution from the other party\'s\n * > private key. This situation can be detected by checking for the all-\n * > zero output, which implementations MAY do, as specified in Section 6.\n * > However, a large number of existing implementations do not do this.\n *\n * IMPORTANT: the returned key is a raw result of scalar multiplication.\n * To use it as a key material, hash it with a cryptographic hash function.\n */\nfunction sharedKey(mySecretKey, theirPublicKey, rejectZero = false) {\n if (mySecretKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error("X25519: incorrect secret key length");\n }\n if (theirPublicKey.length !== PUBLIC_KEY_LENGTH) {\n throw new Error("X25519: incorrect public key length");\n }\n const result = scalarMult(mySecretKey, theirPublicKey);\n if (rejectZero) {\n let zeros = 0;\n for (let i = 0; i < result.length; i++) {\n zeros |= result[i];\n }\n if (zeros === 0) {\n throw new Error("X25519: invalid shared key");\n }\n }\n return result;\n}\n//# sourceMappingURL=x25519.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/x25519/lib/x25519.js?\n}')},"./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js"(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hsalsa: () => (/* binding */ hsalsa),\n/* harmony export */ stream: () => (/* binding */ stream),\n/* harmony export */ streamXOR: () => (/* binding */ streamXOR)\n/* harmony export */ });\n/* harmony import */ var _stablelib_binary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @stablelib/binary */ "./node_modules/@stablelib/binary/lib/binary.js");\n/* harmony import */ var _stablelib_salsa20__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @stablelib/salsa20 */ "./node_modules/@stablelib/salsa20/lib/salsa20.js");\n/* harmony import */ var _stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @stablelib/wipe */ "./node_modules/@stablelib/wipe/lib/wipe.js");\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n/**\n * Package xsalsa20 implements XSalsa20 stream cipher.\n */\n\n\n\n/**\n * Encrypt src with Salsa20/20 stream generated for the given 32-byte key\n * and 24-byte and write the result into dst and return it.\n *\n * dst and src may be the same, but otherwise must not overlap.\n *\n * Never use the same key and nonce to encrypt more than one message.\n */\nfunction streamXOR(key, nonce, src, dst, nonceInplaceCounterLength = 0) {\n if (nonceInplaceCounterLength === 0) {\n if (nonce.length !== 24) {\n throw new Error("XSalsa20 nonce must be 24 bytes");\n }\n }\n else {\n if (nonce.length !== 32) {\n throw new Error("XSalsa20 nonce with counter must be 32 bytes");\n }\n }\n // Use HSalsa one-way function to transform first 16 bytes of\n // 24-byte extended nonce and key into a new key for Salsa\n // stream -- "subkey".\n const subkey = hsalsa(key, nonce.subarray(0, 16), new Uint8Array(32));\n // Use last 8 bytes of 24-byte extended nonce as an actual nonce,\n // and a subkey derived in the previous step as key to encrypt.\n //\n // If nonceInplaceCounterLength > 0, we\'ll still pass the correct\n // nonce || counter, as we don\'t limit the end of nonce subarray.\n const result = (0,_stablelib_salsa20__WEBPACK_IMPORTED_MODULE_1__.streamXOR)(subkey, nonce.subarray(16), src, dst, nonceInplaceCounterLength);\n // Clean subkey.\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(subkey);\n return result;\n}\n/**\n * Generate Salsa20/20 stream for the given 32-byte key and\n * 24-byte nonce and write it into dst and return it.\n *\n * Never use the same key and nonce to generate more than one stream.\n *\n * stream is like streamXOR with all-zero src.\n */\nfunction stream(key, nonce, dst, nonceInplaceCounterLength = 0) {\n (0,_stablelib_wipe__WEBPACK_IMPORTED_MODULE_2__.wipe)(dst);\n return streamXOR(key, nonce, dst, dst, nonceInplaceCounterLength);\n}\n// Number of Salsa20 rounds (Salsa20/20).\nconst ROUNDS = 20;\n/**\n * HSalsa20 is a one-way function used in XSalsa20 to extend nonce,\n * and in NaCl to hash X25519 shared keys. It takes 32-byte key and\n * 16-byte src and writes 32-byte result into dst and returns it.\n */\nfunction hsalsa(key, src, dst) {\n let x0 = 0x61707865; // "expa"\n let x1 = (key[3] << 24) | (key[2] << 16) | (key[1] << 8) | key[0];\n let x2 = (key[7] << 24) | (key[6] << 16) | (key[5] << 8) | key[4];\n let x3 = (key[11] << 24) | (key[10] << 16) | (key[9] << 8) | key[8];\n let x4 = (key[15] << 24) | (key[14] << 16) | (key[13] << 8) | key[12];\n let x5 = 0x3320646E; // "nd 3"\n let x6 = (src[3] << 24) | (src[2] << 16) | (src[1] << 8) | src[0];\n let x7 = (src[7] << 24) | (src[6] << 16) | (src[5] << 8) | src[4];\n let x8 = (src[11] << 24) | (src[10] << 16) | (src[9] << 8) | src[8];\n let x9 = (src[15] << 24) | (src[14] << 16) | (src[13] << 8) | src[12];\n let x10 = 0x79622D32; // "2-by"\n let x11 = (key[19] << 24) | (key[18] << 16) | (key[17] << 8) | key[16];\n let x12 = (key[23] << 24) | (key[22] << 16) | (key[21] << 8) | key[20];\n let x13 = (key[27] << 24) | (key[26] << 16) | (key[25] << 8) | key[24];\n let x14 = (key[31] << 24) | (key[30] << 16) | (key[29] << 8) | key[28];\n let x15 = 0x6B206574; // "te k"\n let u;\n for (let i = 0; i < ROUNDS; i += 2) {\n u = x0 + x12 | 0;\n x4 ^= u << 7 | u >>> (32 - 7);\n u = x4 + x0 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x4 | 0;\n x12 ^= u << 13 | u >>> (32 - 13);\n u = x12 + x8 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x1 | 0;\n x9 ^= u << 7 | u >>> (32 - 7);\n u = x9 + x5 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x9 | 0;\n x1 ^= u << 13 | u >>> (32 - 13);\n u = x1 + x13 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x6 | 0;\n x14 ^= u << 7 | u >>> (32 - 7);\n u = x14 + x10 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x14 | 0;\n x6 ^= u << 13 | u >>> (32 - 13);\n u = x6 + x2 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x11 | 0;\n x3 ^= u << 7 | u >>> (32 - 7);\n u = x3 + x15 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x3 | 0;\n x11 ^= u << 13 | u >>> (32 - 13);\n u = x11 + x7 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n u = x0 + x3 | 0;\n x1 ^= u << 7 | u >>> (32 - 7);\n u = x1 + x0 | 0;\n x2 ^= u << 9 | u >>> (32 - 9);\n u = x2 + x1 | 0;\n x3 ^= u << 13 | u >>> (32 - 13);\n u = x3 + x2 | 0;\n x0 ^= u << 18 | u >>> (32 - 18);\n u = x5 + x4 | 0;\n x6 ^= u << 7 | u >>> (32 - 7);\n u = x6 + x5 | 0;\n x7 ^= u << 9 | u >>> (32 - 9);\n u = x7 + x6 | 0;\n x4 ^= u << 13 | u >>> (32 - 13);\n u = x4 + x7 | 0;\n x5 ^= u << 18 | u >>> (32 - 18);\n u = x10 + x9 | 0;\n x11 ^= u << 7 | u >>> (32 - 7);\n u = x11 + x10 | 0;\n x8 ^= u << 9 | u >>> (32 - 9);\n u = x8 + x11 | 0;\n x9 ^= u << 13 | u >>> (32 - 13);\n u = x9 + x8 | 0;\n x10 ^= u << 18 | u >>> (32 - 18);\n u = x15 + x14 | 0;\n x12 ^= u << 7 | u >>> (32 - 7);\n u = x12 + x15 | 0;\n x13 ^= u << 9 | u >>> (32 - 9);\n u = x13 + x12 | 0;\n x14 ^= u << 13 | u >>> (32 - 13);\n u = x14 + x13 | 0;\n x15 ^= u << 18 | u >>> (32 - 18);\n }\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x0, dst, 0);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x5, dst, 4);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x10, dst, 8);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x15, dst, 12);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x6, dst, 16);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x7, dst, 20);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x8, dst, 24);\n (0,_stablelib_binary__WEBPACK_IMPORTED_MODULE_0__.writeUint32LE)(x9, dst, 28);\n return dst;\n}\n//# sourceMappingURL=xsalsa20.js.map\n\n//# sourceURL=webpack://beacon/./node_modules/@stablelib/xsalsa20/lib/xsalsa20.js?\n}')},"./packages/octez.connect-core/dist/cjs/package.json"(module){"use strict";eval('{module.exports = /*#__PURE__*/JSON.parse(\'{"name":"@tezos-x/octez.connect-core","version":"5.0.1","description":"This package contains internal methods that are used by both the dApp and wallet client.","author":"Blockchain Infra <blockchain.infra@trili.tech>","homepage":"https://octez-connect.tezos.com","license":"ISC","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","exports":{"require":"./dist/cjs/src/index.js","import":"./dist/esm/src/index.js"},"directories":{"lib":"dist/esm","test":"__tests__"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/trilitech/octez.connect.git"},"scripts":{"tsc":"tsc -p tsconfig.json && tsc -p tsconfig-cjs.json","test":"jest"},"bugs":{"url":"https://github.com/trilitech/octez.connect/issues"},"dependencies":{"@stablelib/blake2b":"^2.0.1","@stablelib/nacl":"^2.0.1","@stablelib/utf8":"^2.1.0","@stablelib/x25519-session":"^2.0.1","@tezos-x/octez.connect-types":"5.0.1","@tezos-x/octez.connect-utils":"5.0.1","broadcast-channel":"^7.3.0","bs58check":"4.0.0"}}\');\n\n//# sourceURL=webpack://beacon/./packages/octez.connect-core/dist/cjs/package.json?\n}')}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};if(!(moduleId in __webpack_modules__)){delete __webpack_module_cache__[moduleId];var e=new Error("Cannot find module '"+moduleId+"'");e.code="MODULE_NOT_FOUND";throw e}__webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__);return module.exports}(()=>{__webpack_require__.d=(exports,definition)=>{for(var key in definition){if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){Object.defineProperty(exports,key,{enumerable:true,get:definition[key]})}}}})();(()=>{__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop)})();(()=>{__webpack_require__.r=exports=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})}})();var __webpack_exports__=__webpack_require__("./packages/octez.connect-wallet/dist/cjs/index.js");return __webpack_exports__})());