{"version":3,"file":"hooks-C0Aterus.cjs","names":["isBytes","abytes","h","aexists","clean","hexes","bytesToHex","utf8ToBytes","bytesToUtf8","toBytes","concatBytes","Hash","randomBytes","_0n","_1n","abool","isBytes_","hexToNumber","bytesToHex_","hexToBytes_","numberToVarBytesBE","equalBytes","copyBytes","asciiToBytes","bitGet","bitSet","h","concatBytes_","isHash","notImplemented","computed","abytes","u.abytes","anumber","u.anumber","bytesToHex","u.bytesToHex","u.bytesToUtf8","u.concatBytes","hexToBytes","u.hexToBytes","isBytes","u.isBytes","randomBytes","u.randomBytes","utf8ToBytes","u.utf8ToBytes","u.abool","numberToHexUnpadded","u.numberToHexUnpadded","u.hexToNumber","bytesToNumberBE","u.bytesToNumberBE","bytesToNumberLE","u.bytesToNumberLE","numberToBytesBE","u.numberToBytesBE","numberToBytesLE","u.numberToBytesLE","u.numberToVarBytesBE","ensureBytes","u.ensureBytes","u.equalBytes","copyBytes","u.copyBytes","u.asciiToBytes","inRange","u.inRange","aInRange","u.aInRange","bitLen","u.bitLen","u.bitGet","u.bitSet","bitMask","u.bitMask","createHmacDrbg","u.createHmacDrbg","u.notImplemented","memoized","u.memoized","validateObject","u.validateObject","u.isHash","HMAC","Hash","toBytes","hmac","message","_0n","_1n","_2n","_3n","_4n","number","field","_0n","_1n","window","field","transform","wbits","format","concatBytes","abytes","endo","bytesToHex","randomBytesWeb","randomBytes","hmac","nobleHmac","number","r","s","h","message","isBytes","utf8ToBytes","toBytes","h","toBytes","h","utils.hexToNumber","createView","setBigUint64","message","utils2.numberToBytesBE","utils2.bytesToHex","utils2.hexToNumber","utils2.utf8ToBytes","utils3.hexToNumber","utils3.concatBytes","utils3.numberToHexUnpadded","utils4.hexToNumber","utils4.numberToHexUnpadded","utils4.concatBytes","utils4.bytesToHex","createView2","sm2","sm3","sm4","format","process","form","format","perf","message","isArray","isFunction","src","des","errorMessages","index","context","isLiteral","parse","message","initFeatureFlags","format","format$1","message","baseCompile","baseCompile$1","errorMessages","isFunction","isArray","warnMessages","getWarnMessage","VERSION","type","resolveValue","msg","source","isArray","locale","locales","Text","ref","shallowRef","isFunction","_context","message","messages","format","i18n","global","field","Fragment","options","composer","zhCN","enUS","Modal","i18n","option","options","value","labels","values"],"sources":["../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/crypto.js","../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/utils.js","../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/utils.js","../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/hmac.js","../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/modular.js","../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/curve.js","../node_modules/.pnpm/@noble+curves@1.9.7/node_modules/@noble/curves/esm/abstract/weierstrass.js","../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/utils.js","../node_modules/.pnpm/@noble+ciphers@1.3.0/node_modules/@noble/ciphers/esm/_polyval.js","../node_modules/.pnpm/sm-crypto-v2@1.10.0/node_modules/sm-crypto-v2/dist/index.mjs","../hooks/cipher.js","../hooks/datetime.js","../hooks/network.js","../hooks/form.js","../node_modules/.pnpm/@intlify+shared@11.1.11/node_modules/@intlify/shared/dist/shared.mjs","../node_modules/.pnpm/@intlify+message-compiler@11.1.11/node_modules/@intlify/message-compiler/dist/message-compiler.mjs","../node_modules/.pnpm/@intlify+core-base@11.1.11/node_modules/@intlify/core-base/dist/core-base.mjs","../node_modules/.pnpm/@vue+devtools-api@6.6.4/node_modules/@vue/devtools-api/lib/esm/env.js","../node_modules/.pnpm/@vue+devtools-api@6.6.4/node_modules/@vue/devtools-api/lib/esm/const.js","../node_modules/.pnpm/@vue+devtools-api@6.6.4/node_modules/@vue/devtools-api/lib/esm/time.js","../node_modules/.pnpm/@vue+devtools-api@6.6.4/node_modules/@vue/devtools-api/lib/esm/proxy.js","../node_modules/.pnpm/@vue+devtools-api@6.6.4/node_modules/@vue/devtools-api/lib/esm/index.js","../node_modules/.pnpm/vue-i18n@11.1.11_vue@3.5.13/node_modules/vue-i18n/dist/vue-i18n.mjs","../locales/zh_CN.json","../locales/en_US.json","../i18n.js","../hooks/interact.js","../hooks/utils.js","../hooks/regex.js","../hooks/i18n.js"],"sourcesContent":["export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\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.\nimport { crypto } from '@noble/hashes/crypto';\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a) {\n    return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n/** Asserts something is positive integer. */\nexport function anumber(n) {\n    if (!Number.isSafeInteger(n) || n < 0)\n        throw new Error('positive integer expected, got ' + n);\n}\n/** Asserts something is Uint8Array. */\nexport function 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}\n/** Asserts something is hash */\nexport function ahash(h) {\n    if (typeof h !== 'function' || typeof h.create !== 'function')\n        throw new Error('Hash should be wrapped by utils.createHasher');\n    anumber(h.outputLen);\n    anumber(h.blockLen);\n}\n/** Asserts a hash instance has not been destroyed / finished */\nexport function 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}\n/** Asserts output is properly-sized byte array */\nexport function 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/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr) {\n    return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr) {\n    return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays) {\n    for (let i = 0; i < arrays.length; i++) {\n        arrays[i].fill(0);\n    }\n}\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr) {\n    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word, shift) {\n    return (word << (32 - shift)) | (word >>> shift);\n}\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word, shift) {\n    return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n/** The byte swap operation for uint32 */\nexport function byteSwap(word) {\n    return (((word << 24) & 0xff000000) |\n        ((word << 8) & 0xff0000) |\n        ((word >>> 8) & 0xff00) |\n        ((word >>> 24) & 0xff));\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const swap8IfBE = isLE\n    ? (n) => n\n    : (n) => byteSwap(n);\n/** @deprecated */\nexport const byteSwapIfBE = swap8IfBE;\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr) {\n    for (let i = 0; i < arr.length; i++) {\n        arr[i] = byteSwap(arr[i]);\n    }\n    return arr;\n}\nexport const swap32IfBE = isLE\n    ? (u) => u\n    : byteSwap32;\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = /* @__PURE__ */ (() => \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\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. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n    abytes(bytes);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return bytes.toHex();\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. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return Uint8Array.fromHex(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/**\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.\n */\nexport const nextTick = async () => { };\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async 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 nextTick();\n        ts += diff;\n    }\n}\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n    if (typeof str !== 'string')\n        throw new Error('string expected');\n    return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes) {\n    return new TextDecoder().decode(bytes);\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 */\nexport function toBytes(data) {\n    if (typeof data === 'string')\n        data = utf8ToBytes(data);\n    abytes(data);\n    return data;\n}\n/**\n * Helper for KDFs: consumes uint8array or string.\n * When string is passed, does utf8 decoding, using TextDecoder.\n */\nexport function kdfInputToBytes(data) {\n    if (typeof data === 'string')\n        data = utf8ToBytes(data);\n    abytes(data);\n    return data;\n}\n/** Copies several Uint8Arrays into one. */\nexport function concatBytes(...arrays) {\n    let sum = 0;\n    for (let i = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        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}\nexport function 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}\n/** For runtime check if class implements interface */\nexport class Hash {\n}\n/** Wraps hash function, creating an interface on top of it */\nexport function createHasher(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}\nexport function createOptHasher(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}\nexport function createXOFer(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}\nexport const wrapConstructor = createHasher;\nexport const wrapConstructorWithOpts = createOptHasher;\nexport const wrapXOFConstructorWithOpts = createXOFer;\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32) {\n    if (crypto && typeof crypto.getRandomValues === 'function') {\n        return crypto.getRandomValues(new Uint8Array(bytesLength));\n    }\n    // Legacy Node.js compatibility\n    if (crypto && typeof crypto.randomBytes === 'function') {\n        return Uint8Array.from(crypto.randomBytes(bytesLength));\n    }\n    throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","/**\n * Hex, bytes and number utilities.\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { abytes as abytes_, bytesToHex as bytesToHex_, concatBytes as concatBytes_, hexToBytes as hexToBytes_, isBytes as isBytes_, } from '@noble/hashes/utils.js';\nexport { abytes, anumber, bytesToHex, bytesToUtf8, concatBytes, hexToBytes, isBytes, randomBytes, utf8ToBytes, } from '@noble/hashes/utils.js';\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nexport function abool(title, value) {\n    if (typeof value !== 'boolean')\n        throw new Error(title + ' boolean expected, got ' + value);\n}\n// tmp name until v2\nexport function _abool2(value, title = '') {\n    if (typeof value !== 'boolean') {\n        const prefix = title && `\"${title}\"`;\n        throw new Error(prefix + 'expected boolean, got type=' + typeof value);\n    }\n    return value;\n}\n// tmp name until v2\n/** Asserts something is Uint8Array. */\nexport function _abytes2(value, length, title = '') {\n    const bytes = isBytes_(value);\n    const len = value?.length;\n    const needsLen = length !== undefined;\n    if (!bytes || (needsLen && len !== length)) {\n        const prefix = title && `\"${title}\" `;\n        const ofLen = needsLen ? ` of length ${length}` : '';\n        const got = bytes ? `length=${len}` : `type=${typeof value}`;\n        throw new Error(prefix + 'expected Uint8Array' + ofLen + ', got ' + got);\n    }\n    return value;\n}\n// Used in weierstrass, der\nexport function numberToHexUnpadded(num) {\n    const hex = num.toString(16);\n    return hex.length & 1 ? '0' + hex : hex;\n}\nexport function hexToNumber(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    return hex === '' ? _0n : BigInt('0x' + hex); // Big Endian\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n    return hexToNumber(bytesToHex_(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n    abytes_(bytes);\n    return hexToNumber(bytesToHex_(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n    return hexToBytes_(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n    return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n    return hexToBytes_(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'secret key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n    let res;\n    if (typeof hex === 'string') {\n        try {\n            res = hexToBytes_(hex);\n        }\n        catch (e) {\n            throw new Error(title + ' must be hex string or Uint8Array, cause: ' + e);\n        }\n    }\n    else if (isBytes_(hex)) {\n        // Uint8Array.from() instead of hash.slice() because node.js Buffer\n        // is instance of Uint8Array, and its slice() creates **mutable** copy\n        res = Uint8Array.from(hex);\n    }\n    else {\n        throw new Error(title + ' must be hex string or Uint8Array');\n    }\n    const len = res.length;\n    if (typeof expectedLength === 'number' && len !== expectedLength)\n        throw new Error(title + ' of length ' + expectedLength + ' expected, got ' + len);\n    return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n    if (a.length !== b.length)\n        return false;\n    let diff = 0;\n    for (let i = 0; i < a.length; i++)\n        diff |= a[i] ^ b[i];\n    return diff === 0;\n}\n/**\n * Copies Uint8Array. We can't use u8a.slice(), because u8a can be Buffer,\n * and Buffer#slice creates mutable copy. Never use Buffers!\n */\nexport function copyBytes(bytes) {\n    return Uint8Array.from(bytes);\n}\n/**\n * Decodes 7-bit ASCII string to Uint8Array, throws on non-ascii symbols\n * Should be safe to use for things expected to be ASCII.\n * Returns exact same result as utf8ToBytes for ASCII or throws.\n */\nexport function asciiToBytes(ascii) {\n    return Uint8Array.from(ascii, (c, i) => {\n        const charCode = c.charCodeAt(0);\n        if (c.length !== 1 || charCode > 127) {\n            throw new Error(`string contains non-ASCII character \"${ascii[i]}\" with code ${charCode} at position ${i}`);\n        }\n        return charCode;\n    });\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\n// export const utf8ToBytes: typeof utf8ToBytes_ = utf8ToBytes_;\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\n// export const bytesToUtf8: typeof bytesToUtf8_ = bytesToUtf8_;\n// Is positive bigint\nconst isPosBig = (n) => typeof n === 'bigint' && _0n <= n;\nexport function inRange(n, min, max) {\n    return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n}\n/**\n * Asserts min <= n < max. NOTE: It's < max and not <= max.\n * @example\n * aInRange('x', x, 1n, 256n); // would assume x is in (1n..255n)\n */\nexport function aInRange(title, n, min, max) {\n    // Why min <= n < max and not a (min < n < max) OR b (min <= n <= max)?\n    // consider P=256n, min=0n, max=P\n    // - a for min=0 would require -1:          `inRange('x', x, -1n, P)`\n    // - b would commonly require subtraction:  `inRange('x', x, 0n, P - 1n)`\n    // - our way is the cleanest:               `inRange('x', x, 0n, P)\n    if (!inRange(n, min, max))\n        throw new Error('expected valid ' + title + ': ' + min + ' <= n < ' + max + ', got ' + n);\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n * TODO: merge with nLength in modular\n */\nexport function bitLen(n) {\n    let len;\n    for (len = 0; n > _0n; n >>= _1n, len += 1)\n        ;\n    return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n    return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n    return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_1n << BigInt(n)) - _1n;\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n *   const drbg = createHmacDRBG<Key>(32, 32, hmac);\n *   drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n    if (typeof hashLen !== 'number' || hashLen < 2)\n        throw new Error('hashLen must be a number');\n    if (typeof qByteLen !== 'number' || qByteLen < 2)\n        throw new Error('qByteLen must be a number');\n    if (typeof hmacFn !== 'function')\n        throw new Error('hmacFn must be a function');\n    // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n    const u8n = (len) => new Uint8Array(len); // creates Uint8Array\n    const u8of = (byte) => Uint8Array.of(byte); // another shortcut\n    let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n    let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n    let i = 0; // Iterations counter, will throw when over 1000\n    const reset = () => {\n        v.fill(1);\n        k.fill(0);\n        i = 0;\n    };\n    const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n    const reseed = (seed = u8n(0)) => {\n        // HMAC-DRBG reseed() function. Steps D-G\n        k = h(u8of(0x00), seed); // k = hmac(k || v || 0x00 || seed)\n        v = h(); // v = hmac(k || v)\n        if (seed.length === 0)\n            return;\n        k = h(u8of(0x01), seed); // k = hmac(k || v || 0x01 || seed)\n        v = h(); // v = hmac(k || v)\n    };\n    const gen = () => {\n        // HMAC-DRBG generate() function\n        if (i++ >= 1000)\n            throw new Error('drbg: tried 1000 values');\n        let len = 0;\n        const out = [];\n        while (len < qByteLen) {\n            v = h();\n            const sl = v.slice();\n            out.push(sl);\n            len += v.length;\n        }\n        return concatBytes_(...out);\n    };\n    const genUntil = (seed, pred) => {\n        reset();\n        reseed(seed); // Steps D-G\n        let res = undefined; // Step H: grind until k is in [1..n-1]\n        while (!(res = pred(gen())))\n            reseed();\n        reset();\n        return res;\n    };\n    return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n    bigint: (val) => typeof val === 'bigint',\n    function: (val) => typeof val === 'function',\n    boolean: (val) => typeof val === 'boolean',\n    string: (val) => typeof val === 'string',\n    stringOrUint8Array: (val) => typeof val === 'string' || isBytes_(val),\n    isSafeInteger: (val) => Number.isSafeInteger(val),\n    array: (val) => Array.isArray(val),\n    field: (val, object) => object.Fp.isValid(val),\n    hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record<K extends string | number | symbol, T> = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n    const checkField = (fieldName, type, isOptional) => {\n        const checkVal = validatorFns[type];\n        if (typeof checkVal !== 'function')\n            throw new Error('invalid validator function');\n        const val = object[fieldName];\n        if (isOptional && val === undefined)\n            return;\n        if (!checkVal(val, object)) {\n            throw new Error('param ' + String(fieldName) + ' is invalid. Expected ' + type + ', got ' + val);\n        }\n    };\n    for (const [fieldName, type] of Object.entries(validators))\n        checkField(fieldName, type, false);\n    for (const [fieldName, type] of Object.entries(optValidators))\n        checkField(fieldName, type, true);\n    return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\nexport function isHash(val) {\n    return typeof val === 'function' && Number.isSafeInteger(val.outputLen);\n}\nexport function _validateObject(object, fields, optFields = {}) {\n    if (!object || typeof object !== 'object')\n        throw new Error('expected valid options object');\n    function checkField(fieldName, expectedType, isOpt) {\n        const val = object[fieldName];\n        if (isOpt && val === undefined)\n            return;\n        const current = typeof val;\n        if (current !== expectedType || val === null)\n            throw new Error(`param \"${fieldName}\" is invalid: expected ${expectedType}, got ${current}`);\n    }\n    Object.entries(fields).forEach(([k, v]) => checkField(k, v, false));\n    Object.entries(optFields).forEach(([k, v]) => checkField(k, v, true));\n}\n/**\n * throws not implemented error\n */\nexport const notImplemented = () => {\n    throw new Error('not implemented');\n};\n/**\n * Memoizes (caches) computation result.\n * Uses WeakMap: the value is going auto-cleaned by GC after last reference is removed.\n */\nexport function memoized(fn) {\n    const map = new WeakMap();\n    return (arg, ...args) => {\n        const val = map.get(arg);\n        if (val !== undefined)\n            return val;\n        const computed = fn(arg, ...args);\n        map.set(arg, computed);\n        return computed;\n    };\n}\n//# sourceMappingURL=utils.js.map","/**\n * Deprecated module: moved from curves/abstract/utils.js to curves/utils.js\n * @module\n */\nimport * as u from \"../utils.js\";\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const abytes = u.abytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const anumber = u.anumber;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bytesToHex = u.bytesToHex;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bytesToUtf8 = u.bytesToUtf8;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const concatBytes = u.concatBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const hexToBytes = u.hexToBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const isBytes = u.isBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const randomBytes = u.randomBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const utf8ToBytes = u.utf8ToBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const abool = u.abool;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const numberToHexUnpadded = u.numberToHexUnpadded;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const hexToNumber = u.hexToNumber;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bytesToNumberBE = u.bytesToNumberBE;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bytesToNumberLE = u.bytesToNumberLE;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const numberToBytesBE = u.numberToBytesBE;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const numberToBytesLE = u.numberToBytesLE;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const numberToVarBytesBE = u.numberToVarBytesBE;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const ensureBytes = u.ensureBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const equalBytes = u.equalBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const copyBytes = u.copyBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const asciiToBytes = u.asciiToBytes;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const inRange = u.inRange;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const aInRange = u.aInRange;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bitLen = u.bitLen;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bitGet = u.bitGet;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bitSet = u.bitSet;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const bitMask = u.bitMask;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const createHmacDrbg = u.createHmacDrbg;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const notImplemented = u.notImplemented;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const memoized = u.memoized;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const validateObject = u.validateObject;\n/** @deprecated moved to `@noble/curves/utils.js` */\nexport const isHash = u.isHash;\n//# sourceMappingURL=utils.js.map","/**\n * HMAC: RFC2104 message authentication code.\n * @module\n */\nimport { abytes, aexists, ahash, clean, Hash, toBytes } from \"./utils.js\";\nexport class HMAC extends Hash {\n    constructor(hash, _key) {\n        super();\n        this.finished = false;\n        this.destroyed = false;\n        ahash(hash);\n        const key = toBytes(_key);\n        this.iHash = hash.create();\n        if (typeof this.iHash.update !== 'function')\n            throw new Error('Expected instance of class which extends utils.Hash');\n        this.blockLen = this.iHash.blockLen;\n        this.outputLen = this.iHash.outputLen;\n        const blockLen = this.blockLen;\n        const pad = new Uint8Array(blockLen);\n        // blockLen can be bigger than outputLen\n        pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n        for (let i = 0; i < pad.length; i++)\n            pad[i] ^= 0x36;\n        this.iHash.update(pad);\n        // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n        this.oHash = hash.create();\n        // Undo internal XOR && apply outer XOR\n        for (let i = 0; i < pad.length; i++)\n            pad[i] ^= 0x36 ^ 0x5c;\n        this.oHash.update(pad);\n        clean(pad);\n    }\n    update(buf) {\n        aexists(this);\n        this.iHash.update(buf);\n        return this;\n    }\n    digestInto(out) {\n        aexists(this);\n        abytes(out, this.outputLen);\n        this.finished = true;\n        this.iHash.digestInto(out);\n        this.oHash.update(out);\n        this.oHash.digestInto(out);\n        this.destroy();\n    }\n    digest() {\n        const out = new Uint8Array(this.oHash.outputLen);\n        this.digestInto(out);\n        return out;\n    }\n    _cloneInto(to) {\n        // Create new instance without calling constructor since key already in state and we don't know it.\n        to || (to = Object.create(Object.getPrototypeOf(this), {}));\n        const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n        to = to;\n        to.finished = finished;\n        to.destroyed = destroyed;\n        to.blockLen = blockLen;\n        to.outputLen = outputLen;\n        to.oHash = oHash._cloneInto(to.oHash);\n        to.iHash = iHash._cloneInto(to.iHash);\n        return to;\n    }\n    clone() {\n        return this._cloneInto();\n    }\n    destroy() {\n        this.destroyed = true;\n        this.oHash.destroy();\n        this.iHash.destroy();\n    }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n * @example\n * import { hmac } from '@noble/hashes/hmac';\n * import { sha256 } from '@noble/hashes/sha2';\n * const mac1 = hmac(sha256, 'key', 'message');\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/**\n * Utils for modular division and fields.\n * Field over 11 is a finite (Galois) field is integer number operations `mod 11`.\n * There is no division: it is replaced by modular multiplicative inverse.\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { _validateObject, anumber, bitMask, bytesToNumberBE, bytesToNumberLE, ensureBytes, numberToBytesBE, numberToBytesLE, } from \"../utils.js\";\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = /* @__PURE__ */ BigInt(2), _3n = /* @__PURE__ */ BigInt(3);\n// prettier-ignore\nconst _4n = /* @__PURE__ */ BigInt(4), _5n = /* @__PURE__ */ BigInt(5), _7n = /* @__PURE__ */ BigInt(7);\n// prettier-ignore\nconst _8n = /* @__PURE__ */ BigInt(8), _9n = /* @__PURE__ */ BigInt(9), _16n = /* @__PURE__ */ BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n    const result = a % b;\n    return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\nexport function pow(num, power, modulo) {\n    return FpPow(Field(modulo), num, power);\n}\n/** Does `x^(2^power)` mod p. `pow2(30, 4)` == `30^(2^4)` */\nexport function pow2(x, power, modulo) {\n    let res = x;\n    while (power-- > _0n) {\n        res *= res;\n        res %= modulo;\n    }\n    return res;\n}\n/**\n * Inverses number over modulo.\n * Implemented using [Euclidean GCD](https://brilliant.org/wiki/extended-euclidean-algorithm/).\n */\nexport function invert(number, modulo) {\n    if (number === _0n)\n        throw new Error('invert: expected non-zero number');\n    if (modulo <= _0n)\n        throw new Error('invert: expected positive modulus, got ' + modulo);\n    // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n    let a = mod(number, modulo);\n    let b = modulo;\n    // prettier-ignore\n    let x = _0n, y = _1n, u = _1n, v = _0n;\n    while (a !== _0n) {\n        // JIT applies optimization if those two lines follow each other\n        const q = b / a;\n        const r = b % a;\n        const m = x - u * q;\n        const n = y - v * q;\n        // prettier-ignore\n        b = a, a = r, x = u, y = v, u = m, v = n;\n    }\n    const gcd = b;\n    if (gcd !== _1n)\n        throw new Error('invert: does not exist');\n    return mod(x, modulo);\n}\nfunction assertIsSquare(Fp, root, n) {\n    if (!Fp.eql(Fp.sqr(root), n))\n        throw new Error('Cannot find square root');\n}\n// Not all roots are possible! Example which will throw:\n// const NUM =\n// n = 72057594037927816n;\n// Fp = Field(BigInt('0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab'));\nfunction sqrt3mod4(Fp, n) {\n    const p1div4 = (Fp.ORDER + _1n) / _4n;\n    const root = Fp.pow(n, p1div4);\n    assertIsSquare(Fp, root, n);\n    return root;\n}\nfunction sqrt5mod8(Fp, n) {\n    const p5div8 = (Fp.ORDER - _5n) / _8n;\n    const n2 = Fp.mul(n, _2n);\n    const v = Fp.pow(n2, p5div8);\n    const nv = Fp.mul(n, v);\n    const i = Fp.mul(Fp.mul(nv, _2n), v);\n    const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n    assertIsSquare(Fp, root, n);\n    return root;\n}\n// Based on RFC9380, Kong algorithm\n// prettier-ignore\nfunction sqrt9mod16(P) {\n    const Fp_ = Field(P);\n    const tn = tonelliShanks(P);\n    const c1 = tn(Fp_, Fp_.neg(Fp_.ONE)); //  1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n    const c2 = tn(Fp_, c1); //  2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n    const c3 = tn(Fp_, Fp_.neg(c1)); //  3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n    const c4 = (P + _7n) / _16n; //  4. c4 = (q + 7) / 16        # Integer arithmetic\n    return (Fp, n) => {\n        let tv1 = Fp.pow(n, c4); //  1. tv1 = x^c4\n        let tv2 = Fp.mul(tv1, c1); //  2. tv2 = c1 * tv1\n        const tv3 = Fp.mul(tv1, c2); //  3. tv3 = c2 * tv1\n        const tv4 = Fp.mul(tv1, c3); //  4. tv4 = c3 * tv1\n        const e1 = Fp.eql(Fp.sqr(tv2), n); //  5.  e1 = (tv2^2) == x\n        const e2 = Fp.eql(Fp.sqr(tv3), n); //  6.  e2 = (tv3^2) == x\n        tv1 = Fp.cmov(tv1, tv2, e1); //  7. tv1 = CMOV(tv1, tv2, e1)  # Select tv2 if (tv2^2) == x\n        tv2 = Fp.cmov(tv4, tv3, e2); //  8. tv2 = CMOV(tv4, tv3, e2)  # Select tv3 if (tv3^2) == x\n        const e3 = Fp.eql(Fp.sqr(tv2), n); //  9.  e3 = (tv2^2) == x\n        const root = Fp.cmov(tv1, tv2, e3); // 10.  z = CMOV(tv1, tv2, e3)   # Select sqrt from tv1 & tv2\n        assertIsSquare(Fp, root, n);\n        return root;\n    };\n}\n/**\n * Tonelli-Shanks square root search algorithm.\n * 1. https://eprint.iacr.org/2012/685.pdf (page 12)\n * 2. Square Roots from 1; 24, 51, 10 to Dan Shanks\n * @param P field order\n * @returns function that takes field Fp (created from P) and number n\n */\nexport function tonelliShanks(P) {\n    // Initialization (precomputation).\n    // Caching initialization could boost perf by 7%.\n    if (P < _3n)\n        throw new Error('sqrt is not defined for small field');\n    // Factor P - 1 = Q * 2^S, where Q is odd\n    let Q = P - _1n;\n    let S = 0;\n    while (Q % _2n === _0n) {\n        Q /= _2n;\n        S++;\n    }\n    // Find the first quadratic non-residue Z >= 2\n    let Z = _2n;\n    const _Fp = Field(P);\n    while (FpLegendre(_Fp, Z) === 1) {\n        // Basic primality test for P. After x iterations, chance of\n        // not finding quadratic non-residue is 2^x, so 2^1000.\n        if (Z++ > 1000)\n            throw new Error('Cannot find square root: probably non-prime P');\n    }\n    // Fast-path; usually done before Z, but we do \"primality test\".\n    if (S === 1)\n        return sqrt3mod4;\n    // Slow-path\n    // TODO: test on Fp2 and others\n    let cc = _Fp.pow(Z, Q); // c = z^Q\n    const Q1div2 = (Q + _1n) / _2n;\n    return function tonelliSlow(Fp, n) {\n        if (Fp.is0(n))\n            return n;\n        // Check if n is a quadratic residue using Legendre symbol\n        if (FpLegendre(Fp, n) !== 1)\n            throw new Error('Cannot find square root');\n        // Initialize variables for the main loop\n        let M = S;\n        let c = Fp.mul(Fp.ONE, cc); // c = z^Q, move cc from field _Fp into field Fp\n        let t = Fp.pow(n, Q); // t = n^Q, first guess at the fudge factor\n        let R = Fp.pow(n, Q1div2); // R = n^((Q+1)/2), first guess at the square root\n        // Main loop\n        // while t != 1\n        while (!Fp.eql(t, Fp.ONE)) {\n            if (Fp.is0(t))\n                return Fp.ZERO; // if t=0 return R=0\n            let i = 1;\n            // Find the smallest i >= 1 such that t^(2^i) ≡ 1 (mod P)\n            let t_tmp = Fp.sqr(t); // t^(2^1)\n            while (!Fp.eql(t_tmp, Fp.ONE)) {\n                i++;\n                t_tmp = Fp.sqr(t_tmp); // t^(2^2)...\n                if (i === M)\n                    throw new Error('Cannot find square root');\n            }\n            // Calculate the exponent for b: 2^(M - i - 1)\n            const exponent = _1n << BigInt(M - i - 1); // bigint is important\n            const b = Fp.pow(c, exponent); // b = 2^(M - i - 1)\n            // Update variables\n            M = i;\n            c = Fp.sqr(b); // c = b^2\n            t = Fp.mul(t, c); // t = (t * b^2)\n            R = Fp.mul(R, b); // R = R*b\n        }\n        return R;\n    };\n}\n/**\n * Square root for a finite field. Will try optimized versions first:\n *\n * 1. P ≡ 3 (mod 4)\n * 2. P ≡ 5 (mod 8)\n * 3. P ≡ 9 (mod 16)\n * 4. Tonelli-Shanks algorithm\n *\n * Different algorithms can give different roots, it is up to user to decide which one they want.\n * For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n */\nexport function FpSqrt(P) {\n    // P ≡ 3 (mod 4) => √n = n^((P+1)/4)\n    if (P % _4n === _3n)\n        return sqrt3mod4;\n    // P ≡ 5 (mod 8) => Atkin algorithm, page 10 of https://eprint.iacr.org/2012/685.pdf\n    if (P % _8n === _5n)\n        return sqrt5mod8;\n    // P ≡ 9 (mod 16) => Kong algorithm, page 11 of https://eprint.iacr.org/2012/685.pdf (algorithm 4)\n    if (P % _16n === _9n)\n        return sqrt9mod16(P);\n    // Tonelli-Shanks algorithm\n    return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n    'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n    'eql', 'add', 'sub', 'mul', 'pow', 'div',\n    'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n    const initial = {\n        ORDER: 'bigint',\n        MASK: 'bigint',\n        BYTES: 'number',\n        BITS: 'number',\n    };\n    const opts = FIELD_FIELDS.reduce((map, val) => {\n        map[val] = 'function';\n        return map;\n    }, initial);\n    _validateObject(field, opts);\n    // const max = 16384;\n    // if (field.BYTES < 1 || field.BYTES > max) throw new Error('invalid field');\n    // if (field.BITS < 1 || field.BITS > 8 * max) throw new Error('invalid field');\n    return field;\n}\n// Generic field functions\n/**\n * Same as `pow` but for Fp: non-constant-time.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n */\nexport function FpPow(Fp, num, power) {\n    if (power < _0n)\n        throw new Error('invalid exponent, negatives unsupported');\n    if (power === _0n)\n        return Fp.ONE;\n    if (power === _1n)\n        return num;\n    let p = Fp.ONE;\n    let d = num;\n    while (power > _0n) {\n        if (power & _1n)\n            p = Fp.mul(p, d);\n        d = Fp.sqr(d);\n        power >>= _1n;\n    }\n    return p;\n}\n/**\n * Efficiently invert an array of Field elements.\n * Exception-free. Will return `undefined` for 0 elements.\n * @param passZero map 0 to 0 (instead of undefined)\n */\nexport function FpInvertBatch(Fp, nums, passZero = false) {\n    const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);\n    // Walk from first to last, multiply them by each other MOD p\n    const multipliedAcc = nums.reduce((acc, num, i) => {\n        if (Fp.is0(num))\n            return acc;\n        inverted[i] = acc;\n        return Fp.mul(acc, num);\n    }, Fp.ONE);\n    // Invert last element\n    const invertedAcc = Fp.inv(multipliedAcc);\n    // Walk from last to first, multiply them by inverted each other MOD p\n    nums.reduceRight((acc, num, i) => {\n        if (Fp.is0(num))\n            return acc;\n        inverted[i] = Fp.mul(acc, inverted[i]);\n        return Fp.mul(acc, num);\n    }, invertedAcc);\n    return inverted;\n}\n// TODO: remove\nexport function FpDiv(Fp, lhs, rhs) {\n    return Fp.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));\n}\n/**\n * Legendre symbol.\n * Legendre constant is used to calculate Legendre symbol (a | p)\n * which denotes the value of a^((p-1)/2) (mod p).\n *\n * * (a | p) ≡ 1    if a is a square (mod p), quadratic residue\n * * (a | p) ≡ -1   if a is not a square (mod p), quadratic non residue\n * * (a | p) ≡ 0    if a ≡ 0 (mod p)\n */\nexport function FpLegendre(Fp, n) {\n    // We can use 3rd argument as optional cache of this value\n    // but seems unneeded for now. The operation is very fast.\n    const p1mod2 = (Fp.ORDER - _1n) / _2n;\n    const powered = Fp.pow(n, p1mod2);\n    const yes = Fp.eql(powered, Fp.ONE);\n    const zero = Fp.eql(powered, Fp.ZERO);\n    const no = Fp.eql(powered, Fp.neg(Fp.ONE));\n    if (!yes && !zero && !no)\n        throw new Error('invalid Legendre symbol result');\n    return yes ? 1 : zero ? 0 : -1;\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(Fp, n) {\n    const l = FpLegendre(Fp, n);\n    return l === 1;\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n    // Bit size, byte size of CURVE.n\n    if (nBitLength !== undefined)\n        anumber(nBitLength);\n    const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n    const nByteLength = Math.ceil(_nBitLength / 8);\n    return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Creates a finite field. Major performance optimizations:\n * * 1. Denormalized operations like mulN instead of mul.\n * * 2. Identical object shape: never add or remove keys.\n * * 3. `Object.freeze`.\n * Fragile: always run a benchmark on a change.\n * Security note: operations don't check 'isValid' for all elements for performance reasons,\n * it is caller responsibility to check this.\n * This is low-level code, please make sure you know what you're doing.\n *\n * Note about field properties:\n * * CHARACTERISTIC p = prime number, number of elements in main subgroup.\n * * ORDER q = similar to cofactor in curves, may be composite `q = p^m`.\n *\n * @param ORDER field order, probably prime, or could be composite\n * @param bitLen how many bits the field consumes\n * @param isLE (default: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLenOrOpts, // TODO: use opts only in v2?\nisLE = false, opts = {}) {\n    if (ORDER <= _0n)\n        throw new Error('invalid field: expected ORDER > 0, got ' + ORDER);\n    let _nbitLength = undefined;\n    let _sqrt = undefined;\n    let modFromBytes = false;\n    let allowedLengths = undefined;\n    if (typeof bitLenOrOpts === 'object' && bitLenOrOpts != null) {\n        if (opts.sqrt || isLE)\n            throw new Error('cannot specify opts in two arguments');\n        const _opts = bitLenOrOpts;\n        if (_opts.BITS)\n            _nbitLength = _opts.BITS;\n        if (_opts.sqrt)\n            _sqrt = _opts.sqrt;\n        if (typeof _opts.isLE === 'boolean')\n            isLE = _opts.isLE;\n        if (typeof _opts.modFromBytes === 'boolean')\n            modFromBytes = _opts.modFromBytes;\n        allowedLengths = _opts.allowedLengths;\n    }\n    else {\n        if (typeof bitLenOrOpts === 'number')\n            _nbitLength = bitLenOrOpts;\n        if (opts.sqrt)\n            _sqrt = opts.sqrt;\n    }\n    const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, _nbitLength);\n    if (BYTES > 2048)\n        throw new Error('invalid field: expected ORDER of <= 2048 bytes');\n    let sqrtP; // cached sqrtP\n    const f = Object.freeze({\n        ORDER,\n        isLE,\n        BITS,\n        BYTES,\n        MASK: bitMask(BITS),\n        ZERO: _0n,\n        ONE: _1n,\n        allowedLengths: allowedLengths,\n        create: (num) => mod(num, ORDER),\n        isValid: (num) => {\n            if (typeof num !== 'bigint')\n                throw new Error('invalid field element: expected bigint, got ' + typeof num);\n            return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n        },\n        is0: (num) => num === _0n,\n        // is valid and invertible\n        isValidNot0: (num) => !f.is0(num) && f.isValid(num),\n        isOdd: (num) => (num & _1n) === _1n,\n        neg: (num) => mod(-num, ORDER),\n        eql: (lhs, rhs) => lhs === rhs,\n        sqr: (num) => mod(num * num, ORDER),\n        add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n        sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n        mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n        pow: (num, power) => FpPow(f, num, power),\n        div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n        // Same as above, but doesn't normalize\n        sqrN: (num) => num * num,\n        addN: (lhs, rhs) => lhs + rhs,\n        subN: (lhs, rhs) => lhs - rhs,\n        mulN: (lhs, rhs) => lhs * rhs,\n        inv: (num) => invert(num, ORDER),\n        sqrt: _sqrt ||\n            ((n) => {\n                if (!sqrtP)\n                    sqrtP = FpSqrt(ORDER);\n                return sqrtP(f, n);\n            }),\n        toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n        fromBytes: (bytes, skipValidation = true) => {\n            if (allowedLengths) {\n                if (!allowedLengths.includes(bytes.length) || bytes.length > BYTES) {\n                    throw new Error('Field.fromBytes: expected ' + allowedLengths + ' bytes, got ' + bytes.length);\n                }\n                const padded = new Uint8Array(BYTES);\n                // isLE add 0 to right, !isLE to the left.\n                padded.set(bytes, isLE ? 0 : padded.length - bytes.length);\n                bytes = padded;\n            }\n            if (bytes.length !== BYTES)\n                throw new Error('Field.fromBytes: expected ' + BYTES + ' bytes, got ' + bytes.length);\n            let scalar = isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n            if (modFromBytes)\n                scalar = mod(scalar, ORDER);\n            if (!skipValidation)\n                if (!f.isValid(scalar))\n                    throw new Error('invalid field element: outside of range 0..ORDER');\n            // NOTE: we don't validate scalar here, please use isValid. This done such way because some\n            // protocol may allow non-reduced scalar that reduced later or changed some other way.\n            return scalar;\n        },\n        // TODO: we don't need it here, move out to separate fn\n        invertBatch: (lst) => FpInvertBatch(f, lst),\n        // We can't move this out because Fp6, Fp12 implement it\n        // and it's unclear what to return in there.\n        cmov: (a, b, c) => (c ? b : a),\n    });\n    return Object.freeze(f);\n}\n// Generic random scalar, we can do same for other fields if via Fp2.mul(Fp2.ONE, Fp2.random)?\n// This allows unsafe methods like ignore bias or zero. These unsafe, but often used in different protocols (if deterministic RNG).\n// which mean we cannot force this via opts.\n// Not sure what to do with randomBytes, we can accept it inside opts if wanted.\n// Probably need to export getMinHashLength somewhere?\n// random(bytes?: Uint8Array, unsafeAllowZero = false, unsafeAllowBias = false) {\n//   const LEN = !unsafeAllowBias ? getMinHashLength(ORDER) : BYTES;\n//   if (bytes === undefined) bytes = randomBytes(LEN); // _opts.randomBytes?\n//   const num = isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n//   // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n//   const reduced = unsafeAllowZero ? mod(num, ORDER) : mod(num, ORDER - _1n) + _1n;\n//   return reduced;\n// },\nexport function FpSqrtOdd(Fp, elm) {\n    if (!Fp.isOdd)\n        throw new Error(\"Field doesn't have isOdd\");\n    const root = Fp.sqrt(elm);\n    return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n    if (!Fp.isOdd)\n        throw new Error(\"Field doesn't have isOdd\");\n    const root = Fp.sqrt(elm);\n    return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Same as mapKeyToField, but accepts less bytes (40 instead of 48 for 32-byte field).\n * Which makes it slightly more biased, less secure.\n * @deprecated use `mapKeyToField` instead\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n    hash = ensureBytes('privateHash', hash);\n    const hashLen = hash.length;\n    const minLen = nLength(groupOrder).nByteLength + 8;\n    if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n        throw new Error('hashToPrivateScalar: expected ' + minLen + '-1024 bytes of input, got ' + hashLen);\n    const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n    return mod(num, groupOrder - _1n) + _1n;\n}\n/**\n * Returns total number of bytes consumed by the field element.\n * For example, 32 bytes for usual 256-bit weierstrass curve.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of field\n */\nexport function getFieldBytesLength(fieldOrder) {\n    if (typeof fieldOrder !== 'bigint')\n        throw new Error('field order must be bigint');\n    const bitLength = fieldOrder.toString(2).length;\n    return Math.ceil(bitLength / 8);\n}\n/**\n * Returns minimal amount of bytes that can be safely reduced\n * by field order.\n * Should be 2^-128 for 128-bit curve such as P256.\n * @param fieldOrder number of field elements, usually CURVE.n\n * @returns byte length of target hash\n */\nexport function getMinHashLength(fieldOrder) {\n    const length = getFieldBytesLength(fieldOrder);\n    return length + Math.ceil(length / 2);\n}\n/**\n * \"Constant-time\" private key generation utility.\n * Can take (n + n/2) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 48 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * FIPS 186-5, A.2 https://csrc.nist.gov/publications/detail/fips/186/5/final\n * RFC 9380, https://www.rfc-editor.org/rfc/rfc9380#section-5\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. secp256k1.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function mapHashToField(key, fieldOrder, isLE = false) {\n    const len = key.length;\n    const fieldLen = getFieldBytesLength(fieldOrder);\n    const minLen = getMinHashLength(fieldOrder);\n    // No small numbers: need to understand bias story. No huge numbers: easier to detect JS timings.\n    if (len < 16 || len < minLen || len > 1024)\n        throw new Error('expected ' + minLen + '-1024 bytes of input, got ' + len);\n    const num = isLE ? bytesToNumberLE(key) : bytesToNumberBE(key);\n    // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0\n    const reduced = mod(num, fieldOrder - _1n) + _1n;\n    return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);\n}\n//# sourceMappingURL=modular.js.map","/**\n * Methods for elliptic curve multiplication by scalars.\n * Contains wNAF, pippenger.\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { bitLen, bitMask, validateObject } from \"../utils.js\";\nimport { Field, FpInvertBatch, nLength, validateField } from \"./modular.js\";\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nexport function negateCt(condition, item) {\n    const neg = item.negate();\n    return condition ? neg : item;\n}\n/**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\nexport function normalizeZ(c, points) {\n    const invertedZs = FpInvertBatch(c.Fp, points.map((p) => p.Z));\n    return points.map((p, i) => c.fromAffine(p.toAffine(invertedZs[i])));\n}\nfunction validateW(W, bits) {\n    if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n        throw new Error('invalid window size, expected [1..' + bits + '], got W=' + W);\n}\nfunction calcWOpts(W, scalarBits) {\n    validateW(W, scalarBits);\n    const windows = Math.ceil(scalarBits / W) + 1; // W=8 33. Not 32, because we skip zero\n    const windowSize = 2 ** (W - 1); // W=8 128. Not 256, because we skip zero\n    const maxNumber = 2 ** W; // W=8 256\n    const mask = bitMask(W); // W=8 255 == mask 0b11111111\n    const shiftBy = BigInt(W); // W=8 8\n    return { windows, windowSize, mask, maxNumber, shiftBy };\n}\nfunction calcOffsets(n, window, wOpts) {\n    const { windowSize, mask, maxNumber, shiftBy } = wOpts;\n    let wbits = Number(n & mask); // extract W bits.\n    let nextN = n >> shiftBy; // shift number by W bits.\n    // What actually happens here:\n    // const highestBit = Number(mask ^ (mask >> 1n));\n    // let wbits2 = wbits - 1; // skip zero\n    // if (wbits2 & highestBit) { wbits2 ^= Number(mask); // (~);\n    // split if bits > max: +224 => 256-32\n    if (wbits > windowSize) {\n        // we skip zero, which means instead of `>= size-1`, we do `> size`\n        wbits -= maxNumber; // -32, can be maxNumber - wbits, but then we need to set isNeg here.\n        nextN += _1n; // +256 (carry)\n    }\n    const offsetStart = window * windowSize;\n    const offset = offsetStart + Math.abs(wbits) - 1; // -1 because we skip zero\n    const isZero = wbits === 0; // is current window slice a 0?\n    const isNeg = wbits < 0; // is current window slice negative?\n    const isNegF = window % 2 !== 0; // fake random statement for noise\n    const offsetF = offsetStart; // fake offset for noise\n    return { nextN, offset, isZero, isNeg, isNegF, offsetF };\n}\nfunction validateMSMPoints(points, c) {\n    if (!Array.isArray(points))\n        throw new Error('array expected');\n    points.forEach((p, i) => {\n        if (!(p instanceof c))\n            throw new Error('invalid point at index ' + i);\n    });\n}\nfunction validateMSMScalars(scalars, field) {\n    if (!Array.isArray(scalars))\n        throw new Error('array of scalars expected');\n    scalars.forEach((s, i) => {\n        if (!field.isValid(s))\n            throw new Error('invalid scalar at index ' + i);\n    });\n}\n// Since points in different groups cannot be equal (different object constructor),\n// we can have single place to store precomputes.\n// Allows to make points frozen / immutable.\nconst pointPrecomputes = new WeakMap();\nconst pointWindowSizes = new WeakMap();\nfunction getW(P) {\n    // To disable precomputes:\n    // return 1;\n    return pointWindowSizes.get(P) || 1;\n}\nfunction assert0(n) {\n    if (n !== _0n)\n        throw new Error('invalid wNAF');\n}\n/**\n * Elliptic curve multiplication of Point by scalar. Fragile.\n * Table generation takes **30MB of ram and 10ms on high-end CPU**,\n * but may take much longer on slow devices. Actual generation will happen on\n * first call of `multiply()`. By default, `BASE` point is precomputed.\n *\n * Scalars should always be less than curve order: this should be checked inside of a curve itself.\n * Creates precomputation tables for fast multiplication:\n * - private scalar is split by fixed size windows of W bits\n * - every window point is collected from window's table & added to accumulator\n * - since windows are different, same point inside tables won't be accessed more than once per calc\n * - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n * - +1 window is neccessary for wNAF\n * - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n *\n * @todo Research returning 2d JS array of windows, instead of a single window.\n * This would allow windows to be in different memory locations\n */\nexport class wNAF {\n    // Parametrized with a given Point class (not individual point)\n    constructor(Point, bits) {\n        this.BASE = Point.BASE;\n        this.ZERO = Point.ZERO;\n        this.Fn = Point.Fn;\n        this.bits = bits;\n    }\n    // non-const time multiplication ladder\n    _unsafeLadder(elm, n, p = this.ZERO) {\n        let d = elm;\n        while (n > _0n) {\n            if (n & _1n)\n                p = p.add(d);\n            d = d.double();\n            n >>= _1n;\n        }\n        return p;\n    }\n    /**\n     * Creates a wNAF precomputation window. Used for caching.\n     * Default window size is set by `utils.precompute()` and is equal to 8.\n     * Number of precomputed points depends on the curve size:\n     * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n     * - 𝑊 is the window size\n     * - 𝑛 is the bitlength of the curve order.\n     * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n     * @param point Point instance\n     * @param W window size\n     * @returns precomputed point tables flattened to a single array\n     */\n    precomputeWindow(point, W) {\n        const { windows, windowSize } = calcWOpts(W, this.bits);\n        const points = [];\n        let p = point;\n        let base = p;\n        for (let window = 0; window < windows; window++) {\n            base = p;\n            points.push(base);\n            // i=1, bc we skip 0\n            for (let i = 1; i < windowSize; i++) {\n                base = base.add(p);\n                points.push(base);\n            }\n            p = base.double();\n        }\n        return points;\n    }\n    /**\n     * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n     * More compact implementation:\n     * https://github.com/paulmillr/noble-secp256k1/blob/47cb1669b6e506ad66b35fe7d76132ae97465da2/index.ts#L502-L541\n     * @returns real and fake (for const-time) points\n     */\n    wNAF(W, precomputes, n) {\n        // Scalar should be smaller than field order\n        if (!this.Fn.isValid(n))\n            throw new Error('invalid scalar');\n        // Accumulators\n        let p = this.ZERO;\n        let f = this.BASE;\n        // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n        // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n        // there is negate now: it is possible that negated element from low value\n        // would be the same as high element, which will create carry into next window.\n        // It's not obvious how this can fail, but still worth investigating later.\n        const wo = calcWOpts(W, this.bits);\n        for (let window = 0; window < wo.windows; window++) {\n            // (n === _0n) is handled and not early-exited. isEven and offsetF are used for noise\n            const { nextN, offset, isZero, isNeg, isNegF, offsetF } = calcOffsets(n, window, wo);\n            n = nextN;\n            if (isZero) {\n                // bits are 0: add garbage to fake point\n                // Important part for const-time getPublicKey: add random \"noise\" point to f.\n                f = f.add(negateCt(isNegF, precomputes[offsetF]));\n            }\n            else {\n                // bits are 1: add to result point\n                p = p.add(negateCt(isNeg, precomputes[offset]));\n            }\n        }\n        assert0(n);\n        // Return both real and fake points: JIT won't eliminate f.\n        // At this point there is a way to F be infinity-point even if p is not,\n        // which makes it less const-time: around 1 bigint multiply.\n        return { p, f };\n    }\n    /**\n     * Implements ec unsafe (non const-time) multiplication using precomputed tables and w-ary non-adjacent form.\n     * @param acc accumulator point to add result of multiplication\n     * @returns point\n     */\n    wNAFUnsafe(W, precomputes, n, acc = this.ZERO) {\n        const wo = calcWOpts(W, this.bits);\n        for (let window = 0; window < wo.windows; window++) {\n            if (n === _0n)\n                break; // Early-exit, skip 0 value\n            const { nextN, offset, isZero, isNeg } = calcOffsets(n, window, wo);\n            n = nextN;\n            if (isZero) {\n                // Window bits are 0: skip processing.\n                // Move to next window.\n                continue;\n            }\n            else {\n                const item = precomputes[offset];\n                acc = acc.add(isNeg ? item.negate() : item); // Re-using acc allows to save adds in MSM\n            }\n        }\n        assert0(n);\n        return acc;\n    }\n    getPrecomputes(W, point, transform) {\n        // Calculate precomputes on a first run, reuse them after\n        let comp = pointPrecomputes.get(point);\n        if (!comp) {\n            comp = this.precomputeWindow(point, W);\n            if (W !== 1) {\n                // Doing transform outside of if brings 15% perf hit\n                if (typeof transform === 'function')\n                    comp = transform(comp);\n                pointPrecomputes.set(point, comp);\n            }\n        }\n        return comp;\n    }\n    cached(point, scalar, transform) {\n        const W = getW(point);\n        return this.wNAF(W, this.getPrecomputes(W, point, transform), scalar);\n    }\n    unsafe(point, scalar, transform, prev) {\n        const W = getW(point);\n        if (W === 1)\n            return this._unsafeLadder(point, scalar, prev); // For W=1 ladder is ~x2 faster\n        return this.wNAFUnsafe(W, this.getPrecomputes(W, point, transform), scalar, prev);\n    }\n    // We calculate precomputes for elliptic curve point multiplication\n    // using windowed method. This specifies window size and\n    // stores precomputed values. Usually only base point would be precomputed.\n    createCache(P, W) {\n        validateW(W, this.bits);\n        pointWindowSizes.set(P, W);\n        pointPrecomputes.delete(P);\n    }\n    hasCache(elm) {\n        return getW(elm) !== 1;\n    }\n}\n/**\n * Endomorphism-specific multiplication for Koblitz curves.\n * Cost: 128 dbl, 0-256 adds.\n */\nexport function mulEndoUnsafe(Point, point, k1, k2) {\n    let acc = point;\n    let p1 = Point.ZERO;\n    let p2 = Point.ZERO;\n    while (k1 > _0n || k2 > _0n) {\n        if (k1 & _1n)\n            p1 = p1.add(acc);\n        if (k2 & _1n)\n            p2 = p2.add(acc);\n        acc = acc.double();\n        k1 >>= _1n;\n        k2 >>= _1n;\n    }\n    return { p1, p2 };\n}\n/**\n * Pippenger algorithm for multi-scalar multiplication (MSM, Pa + Qb + Rc + ...).\n * 30x faster vs naive addition on L=4096, 10x faster than precomputes.\n * For N=254bit, L=1, it does: 1024 ADD + 254 DBL. For L=5: 1536 ADD + 254 DBL.\n * Algorithmically constant-time (for same L), even when 1 point + scalar, or when scalar = 0.\n * @param c Curve Point constructor\n * @param fieldN field over CURVE.N - important that it's not over CURVE.P\n * @param points array of L curve points\n * @param scalars array of L scalars (aka secret keys / bigints)\n */\nexport function pippenger(c, fieldN, points, scalars) {\n    // If we split scalars by some window (let's say 8 bits), every chunk will only\n    // take 256 buckets even if there are 4096 scalars, also re-uses double.\n    // TODO:\n    // - https://eprint.iacr.org/2024/750.pdf\n    // - https://tches.iacr.org/index.php/TCHES/article/view/10287\n    // 0 is accepted in scalars\n    validateMSMPoints(points, c);\n    validateMSMScalars(scalars, fieldN);\n    const plength = points.length;\n    const slength = scalars.length;\n    if (plength !== slength)\n        throw new Error('arrays of points and scalars must have equal length');\n    // if (plength === 0) throw new Error('array must be of length >= 2');\n    const zero = c.ZERO;\n    const wbits = bitLen(BigInt(plength));\n    let windowSize = 1; // bits\n    if (wbits > 12)\n        windowSize = wbits - 3;\n    else if (wbits > 4)\n        windowSize = wbits - 2;\n    else if (wbits > 0)\n        windowSize = 2;\n    const MASK = bitMask(windowSize);\n    const buckets = new Array(Number(MASK) + 1).fill(zero); // +1 for zero array\n    const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n    let sum = zero;\n    for (let i = lastBits; i >= 0; i -= windowSize) {\n        buckets.fill(zero);\n        for (let j = 0; j < slength; j++) {\n            const scalar = scalars[j];\n            const wbits = Number((scalar >> BigInt(i)) & MASK);\n            buckets[wbits] = buckets[wbits].add(points[j]);\n        }\n        let resI = zero; // not using this will do small speed-up, but will lose ct\n        // Skip first bucket, because it is zero\n        for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n            sumI = sumI.add(buckets[j]);\n            resI = resI.add(sumI);\n        }\n        sum = sum.add(resI);\n        if (i !== 0)\n            for (let j = 0; j < windowSize; j++)\n                sum = sum.double();\n    }\n    return sum;\n}\n/**\n * Precomputed multi-scalar multiplication (MSM, Pa + Qb + Rc + ...).\n * @param c Curve Point constructor\n * @param fieldN field over CURVE.N - important that it's not over CURVE.P\n * @param points array of L curve points\n * @returns function which multiplies points with scaars\n */\nexport function precomputeMSMUnsafe(c, fieldN, points, windowSize) {\n    /**\n     * Performance Analysis of Window-based Precomputation\n     *\n     * Base Case (256-bit scalar, 8-bit window):\n     * - Standard precomputation requires:\n     *   - 31 additions per scalar × 256 scalars = 7,936 ops\n     *   - Plus 255 summary additions = 8,191 total ops\n     *   Note: Summary additions can be optimized via accumulator\n     *\n     * Chunked Precomputation Analysis:\n     * - Using 32 chunks requires:\n     *   - 255 additions per chunk\n     *   - 256 doublings\n     *   - Total: (255 × 32) + 256 = 8,416 ops\n     *\n     * Memory Usage Comparison:\n     * Window Size | Standard Points | Chunked Points\n     * ------------|-----------------|---------------\n     *     4-bit   |     520         |      15\n     *     8-bit   |    4,224        |     255\n     *    10-bit   |   13,824        |   1,023\n     *    16-bit   |  557,056        |  65,535\n     *\n     * Key Advantages:\n     * 1. Enables larger window sizes due to reduced memory overhead\n     * 2. More efficient for smaller scalar counts:\n     *    - 16 chunks: (16 × 255) + 256 = 4,336 ops\n     *    - ~2x faster than standard 8,191 ops\n     *\n     * Limitations:\n     * - Not suitable for plain precomputes (requires 256 constant doublings)\n     * - Performance degrades with larger scalar counts:\n     *   - Optimal for ~256 scalars\n     *   - Less efficient for 4096+ scalars (Pippenger preferred)\n     */\n    validateW(windowSize, fieldN.BITS);\n    validateMSMPoints(points, c);\n    const zero = c.ZERO;\n    const tableSize = 2 ** windowSize - 1; // table size (without zero)\n    const chunks = Math.ceil(fieldN.BITS / windowSize); // chunks of item\n    const MASK = bitMask(windowSize);\n    const tables = points.map((p) => {\n        const res = [];\n        for (let i = 0, acc = p; i < tableSize; i++) {\n            res.push(acc);\n            acc = acc.add(p);\n        }\n        return res;\n    });\n    return (scalars) => {\n        validateMSMScalars(scalars, fieldN);\n        if (scalars.length > points.length)\n            throw new Error('array of scalars must be smaller than array of points');\n        let res = zero;\n        for (let i = 0; i < chunks; i++) {\n            // No need to double if accumulator is still zero.\n            if (res !== zero)\n                for (let j = 0; j < windowSize; j++)\n                    res = res.double();\n            const shiftBy = BigInt(chunks * windowSize - (i + 1) * windowSize);\n            for (let j = 0; j < scalars.length; j++) {\n                const n = scalars[j];\n                const curr = Number((n >> shiftBy) & MASK);\n                if (!curr)\n                    continue; // skip zero scalars chunks\n                res = res.add(tables[j][curr - 1]);\n            }\n        }\n        return res;\n    };\n}\n// TODO: remove\n/** @deprecated */\nexport function validateBasic(curve) {\n    validateField(curve.Fp);\n    validateObject(curve, {\n        n: 'bigint',\n        h: 'bigint',\n        Gx: 'field',\n        Gy: 'field',\n    }, {\n        nBitLength: 'isSafeInteger',\n        nByteLength: 'isSafeInteger',\n    });\n    // Set defaults\n    return Object.freeze({\n        ...nLength(curve.n, curve.nBitLength),\n        ...curve,\n        ...{ p: curve.Fp.ORDER },\n    });\n}\nfunction createField(order, field, isLE) {\n    if (field) {\n        if (field.ORDER !== order)\n            throw new Error('Field.ORDER must match order: Fp == p, Fn == n');\n        validateField(field);\n        return field;\n    }\n    else {\n        return Field(order, { isLE });\n    }\n}\n/** Validates CURVE opts and creates fields */\nexport function _createCurveFields(type, CURVE, curveOpts = {}, FpFnLE) {\n    if (FpFnLE === undefined)\n        FpFnLE = type === 'edwards';\n    if (!CURVE || typeof CURVE !== 'object')\n        throw new Error(`expected valid ${type} CURVE object`);\n    for (const p of ['p', 'n', 'h']) {\n        const val = CURVE[p];\n        if (!(typeof val === 'bigint' && val > _0n))\n            throw new Error(`CURVE.${p} must be positive bigint`);\n    }\n    const Fp = createField(CURVE.p, curveOpts.Fp, FpFnLE);\n    const Fn = createField(CURVE.n, curveOpts.Fn, FpFnLE);\n    const _b = type === 'weierstrass' ? 'b' : 'd';\n    const params = ['Gx', 'Gy', 'a', _b];\n    for (const p of params) {\n        // @ts-ignore\n        if (!Fp.isValid(CURVE[p]))\n            throw new Error(`CURVE.${p} must be valid field element of CURVE.Fp`);\n    }\n    CURVE = Object.freeze(Object.assign({}, CURVE));\n    return { CURVE, Fp, Fn };\n}\n//# sourceMappingURL=curve.js.map","/**\n * Short Weierstrass curve methods. The formula is: y² = x³ + ax + b.\n *\n * ### Design rationale for types\n *\n * * Interaction between classes from different curves should fail:\n *   `k256.Point.BASE.add(p256.Point.BASE)`\n * * For this purpose we want to use `instanceof` operator, which is fast and works during runtime\n * * Different calls of `curve()` would return different classes -\n *   `curve(params) !== curve(params)`: if somebody decided to monkey-patch their curve,\n *   it won't affect others\n *\n * TypeScript can't infer types for classes created inside a function. Classes is one instance\n * of nominative types in TypeScript and interfaces only check for shape, so it's hard to create\n * unique type for every function call.\n *\n * We can use generic types via some param, like curve opts, but that would:\n *     1. Enable interaction between `curve(params)` and `curve(params)` (curves of same params)\n *     which is hard to debug.\n *     2. Params can be generic and we can't enforce them to be constant value:\n *     if somebody creates curve from non-constant params,\n *     it would be allowed to interact with other curves with non-constant params\n *\n * @todo https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html#unique-symbol\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac as nobleHmac } from '@noble/hashes/hmac.js';\nimport { ahash } from '@noble/hashes/utils';\nimport { _validateObject, _abool2 as abool, _abytes2 as abytes, aInRange, bitLen, bitMask, bytesToHex, bytesToNumberBE, concatBytes, createHmacDrbg, ensureBytes, hexToBytes, inRange, isBytes, memoized, numberToHexUnpadded, randomBytes as randomBytesWeb, } from \"../utils.js\";\nimport { _createCurveFields, mulEndoUnsafe, negateCt, normalizeZ, pippenger, wNAF, } from \"./curve.js\";\nimport { Field, FpInvertBatch, getMinHashLength, mapHashToField, nLength, validateField, } from \"./modular.js\";\n// We construct basis in such way that den is always positive and equals n, but num sign depends on basis (not on secret value)\nconst divNearest = (num, den) => (num + (num >= 0 ? den : -den) / _2n) / den;\n/**\n * Splits scalar for GLV endomorphism.\n */\nexport function _splitEndoScalar(k, basis, n) {\n    // Split scalar into two such that part is ~half bits: `abs(part) < sqrt(N)`\n    // Since part can be negative, we need to do this on point.\n    // TODO: verifyScalar function which consumes lambda\n    const [[a1, b1], [a2, b2]] = basis;\n    const c1 = divNearest(b2 * k, n);\n    const c2 = divNearest(-b1 * k, n);\n    // |k1|/|k2| is < sqrt(N), but can be negative.\n    // If we do `k1 mod N`, we'll get big scalar (`> sqrt(N)`): so, we do cheaper negation instead.\n    let k1 = k - c1 * a1 - c2 * a2;\n    let k2 = -c1 * b1 - c2 * b2;\n    const k1neg = k1 < _0n;\n    const k2neg = k2 < _0n;\n    if (k1neg)\n        k1 = -k1;\n    if (k2neg)\n        k2 = -k2;\n    // Double check that resulting scalar less than half bits of N: otherwise wNAF will fail.\n    // This should only happen on wrong basises. Also, math inside is too complex and I don't trust it.\n    const MAX_NUM = bitMask(Math.ceil(bitLen(n) / 2)) + _1n; // Half bits of N\n    if (k1 < _0n || k1 >= MAX_NUM || k2 < _0n || k2 >= MAX_NUM) {\n        throw new Error('splitScalar (endomorphism): failed, k=' + k);\n    }\n    return { k1neg, k1, k2neg, k2 };\n}\nfunction validateSigFormat(format) {\n    if (!['compact', 'recovered', 'der'].includes(format))\n        throw new Error('Signature format must be \"compact\", \"recovered\", or \"der\"');\n    return format;\n}\nfunction validateSigOpts(opts, def) {\n    const optsn = {};\n    for (let optName of Object.keys(def)) {\n        // @ts-ignore\n        optsn[optName] = opts[optName] === undefined ? def[optName] : opts[optName];\n    }\n    abool(optsn.lowS, 'lowS');\n    abool(optsn.prehash, 'prehash');\n    if (optsn.format !== undefined)\n        validateSigFormat(optsn.format);\n    return optsn;\n}\nexport class DERErr extends Error {\n    constructor(m = '') {\n        super(m);\n    }\n}\n/**\n * ASN.1 DER encoding utilities. ASN is very complex & fragile. Format:\n *\n *     [0x30 (SEQUENCE), bytelength, 0x02 (INTEGER), intLength, R, 0x02 (INTEGER), intLength, S]\n *\n * Docs: https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/, https://luca.ntop.org/Teaching/Appunti/asn1.html\n */\nexport const DER = {\n    // asn.1 DER encoding utils\n    Err: DERErr,\n    // Basic building block is TLV (Tag-Length-Value)\n    _tlv: {\n        encode: (tag, data) => {\n            const { Err: E } = DER;\n            if (tag < 0 || tag > 256)\n                throw new E('tlv.encode: wrong tag');\n            if (data.length & 1)\n                throw new E('tlv.encode: unpadded data');\n            const dataLen = data.length / 2;\n            const len = numberToHexUnpadded(dataLen);\n            if ((len.length / 2) & 128)\n                throw new E('tlv.encode: long form length too big');\n            // length of length with long form flag\n            const lenLen = dataLen > 127 ? numberToHexUnpadded((len.length / 2) | 128) : '';\n            const t = numberToHexUnpadded(tag);\n            return t + lenLen + len + data;\n        },\n        // v - value, l - left bytes (unparsed)\n        decode(tag, data) {\n            const { Err: E } = DER;\n            let pos = 0;\n            if (tag < 0 || tag > 256)\n                throw new E('tlv.encode: wrong tag');\n            if (data.length < 2 || data[pos++] !== tag)\n                throw new E('tlv.decode: wrong tlv');\n            const first = data[pos++];\n            const isLong = !!(first & 128); // First bit of first length byte is flag for short/long form\n            let length = 0;\n            if (!isLong)\n                length = first;\n            else {\n                // Long form: [longFlag(1bit), lengthLength(7bit), length (BE)]\n                const lenLen = first & 127;\n                if (!lenLen)\n                    throw new E('tlv.decode(long): indefinite length not supported');\n                if (lenLen > 4)\n                    throw new E('tlv.decode(long): byte length is too big'); // this will overflow u32 in js\n                const lengthBytes = data.subarray(pos, pos + lenLen);\n                if (lengthBytes.length !== lenLen)\n                    throw new E('tlv.decode: length bytes not complete');\n                if (lengthBytes[0] === 0)\n                    throw new E('tlv.decode(long): zero leftmost byte');\n                for (const b of lengthBytes)\n                    length = (length << 8) | b;\n                pos += lenLen;\n                if (length < 128)\n                    throw new E('tlv.decode(long): not minimal encoding');\n            }\n            const v = data.subarray(pos, pos + length);\n            if (v.length !== length)\n                throw new E('tlv.decode: wrong value length');\n            return { v, l: data.subarray(pos + length) };\n        },\n    },\n    // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n    // since we always use positive integers here. It must always be empty:\n    // - add zero byte if exists\n    // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n    _int: {\n        encode(num) {\n            const { Err: E } = DER;\n            if (num < _0n)\n                throw new E('integer: negative integers are not allowed');\n            let hex = numberToHexUnpadded(num);\n            // Pad with zero byte if negative flag is present\n            if (Number.parseInt(hex[0], 16) & 0b1000)\n                hex = '00' + hex;\n            if (hex.length & 1)\n                throw new E('unexpected DER parsing assertion: unpadded hex');\n            return hex;\n        },\n        decode(data) {\n            const { Err: E } = DER;\n            if (data[0] & 128)\n                throw new E('invalid signature integer: negative');\n            if (data[0] === 0x00 && !(data[1] & 128))\n                throw new E('invalid signature integer: unnecessary leading zero');\n            return bytesToNumberBE(data);\n        },\n    },\n    toSig(hex) {\n        // parse DER signature\n        const { Err: E, _int: int, _tlv: tlv } = DER;\n        const data = ensureBytes('signature', hex);\n        const { v: seqBytes, l: seqLeftBytes } = tlv.decode(0x30, data);\n        if (seqLeftBytes.length)\n            throw new E('invalid signature: left bytes after parsing');\n        const { v: rBytes, l: rLeftBytes } = tlv.decode(0x02, seqBytes);\n        const { v: sBytes, l: sLeftBytes } = tlv.decode(0x02, rLeftBytes);\n        if (sLeftBytes.length)\n            throw new E('invalid signature: left bytes after parsing');\n        return { r: int.decode(rBytes), s: int.decode(sBytes) };\n    },\n    hexFromSig(sig) {\n        const { _tlv: tlv, _int: int } = DER;\n        const rs = tlv.encode(0x02, int.encode(sig.r));\n        const ss = tlv.encode(0x02, int.encode(sig.s));\n        const seq = rs + ss;\n        return tlv.encode(0x30, seq);\n    },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function _normFnElement(Fn, key) {\n    const { BYTES: expected } = Fn;\n    let num;\n    if (typeof key === 'bigint') {\n        num = key;\n    }\n    else {\n        let bytes = ensureBytes('private key', key);\n        try {\n            num = Fn.fromBytes(bytes);\n        }\n        catch (error) {\n            throw new Error(`invalid private key: expected ui8a of size ${expected}, got ${typeof key}`);\n        }\n    }\n    if (!Fn.isValidNot0(num))\n        throw new Error('invalid private key: out of range [1..N-1]');\n    return num;\n}\n/**\n * Creates weierstrass Point constructor, based on specified curve options.\n *\n * @example\n```js\nconst opts = {\n  p: BigInt('0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff'),\n  n: BigInt('0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551'),\n  h: BigInt(1),\n  a: BigInt('0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc'),\n  b: BigInt('0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b'),\n  Gx: BigInt('0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296'),\n  Gy: BigInt('0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5'),\n};\nconst p256_Point = weierstrass(opts);\n```\n */\nexport function weierstrassN(params, extraOpts = {}) {\n    const validated = _createCurveFields('weierstrass', params, extraOpts);\n    const { Fp, Fn } = validated;\n    let CURVE = validated.CURVE;\n    const { h: cofactor, n: CURVE_ORDER } = CURVE;\n    _validateObject(extraOpts, {}, {\n        allowInfinityPoint: 'boolean',\n        clearCofactor: 'function',\n        isTorsionFree: 'function',\n        fromBytes: 'function',\n        toBytes: 'function',\n        endo: 'object',\n        wrapPrivateKey: 'boolean',\n    });\n    const { endo } = extraOpts;\n    if (endo) {\n        // validateObject(endo, { beta: 'bigint', splitScalar: 'function' });\n        if (!Fp.is0(CURVE.a) || typeof endo.beta !== 'bigint' || !Array.isArray(endo.basises)) {\n            throw new Error('invalid endo: expected \"beta\": bigint and \"basises\": array');\n        }\n    }\n    const lengths = getWLengths(Fp, Fn);\n    function assertCompressionIsSupported() {\n        if (!Fp.isOdd)\n            throw new Error('compression is not supported: Field does not have .isOdd()');\n    }\n    // Implements IEEE P1363 point encoding\n    function pointToBytes(_c, point, isCompressed) {\n        const { x, y } = point.toAffine();\n        const bx = Fp.toBytes(x);\n        abool(isCompressed, 'isCompressed');\n        if (isCompressed) {\n            assertCompressionIsSupported();\n            const hasEvenY = !Fp.isOdd(y);\n            return concatBytes(pprefix(hasEvenY), bx);\n        }\n        else {\n            return concatBytes(Uint8Array.of(0x04), bx, Fp.toBytes(y));\n        }\n    }\n    function pointFromBytes(bytes) {\n        abytes(bytes, undefined, 'Point');\n        const { publicKey: comp, publicKeyUncompressed: uncomp } = lengths; // e.g. for 32-byte: 33, 65\n        const length = bytes.length;\n        const head = bytes[0];\n        const tail = bytes.subarray(1);\n        // No actual validation is done here: use .assertValidity()\n        if (length === comp && (head === 0x02 || head === 0x03)) {\n            const x = Fp.fromBytes(tail);\n            if (!Fp.isValid(x))\n                throw new Error('bad point: is not on curve, wrong x');\n            const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n            let y;\n            try {\n                y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n            }\n            catch (sqrtError) {\n                const err = sqrtError instanceof Error ? ': ' + sqrtError.message : '';\n                throw new Error('bad point: is not on curve, sqrt error' + err);\n            }\n            assertCompressionIsSupported();\n            const isYOdd = Fp.isOdd(y); // (y & _1n) === _1n;\n            const isHeadOdd = (head & 1) === 1; // ECDSA-specific\n            if (isHeadOdd !== isYOdd)\n                y = Fp.neg(y);\n            return { x, y };\n        }\n        else if (length === uncomp && head === 0x04) {\n            // TODO: more checks\n            const L = Fp.BYTES;\n            const x = Fp.fromBytes(tail.subarray(0, L));\n            const y = Fp.fromBytes(tail.subarray(L, L * 2));\n            if (!isValidXY(x, y))\n                throw new Error('bad point: is not on curve');\n            return { x, y };\n        }\n        else {\n            throw new Error(`bad point: got length ${length}, expected compressed=${comp} or uncompressed=${uncomp}`);\n        }\n    }\n    const encodePoint = extraOpts.toBytes || pointToBytes;\n    const decodePoint = extraOpts.fromBytes || pointFromBytes;\n    function weierstrassEquation(x) {\n        const x2 = Fp.sqr(x); // x * x\n        const x3 = Fp.mul(x2, x); // x² * x\n        return Fp.add(Fp.add(x3, Fp.mul(x, CURVE.a)), CURVE.b); // x³ + a * x + b\n    }\n    // TODO: move top-level\n    /** Checks whether equation holds for given x, y: y² == x³ + ax + b */\n    function isValidXY(x, y) {\n        const left = Fp.sqr(y); // y²\n        const right = weierstrassEquation(x); // x³ + ax + b\n        return Fp.eql(left, right);\n    }\n    // Validate whether the passed curve params are valid.\n    // Test 1: equation y² = x³ + ax + b should work for generator point.\n    if (!isValidXY(CURVE.Gx, CURVE.Gy))\n        throw new Error('bad curve params: generator point');\n    // Test 2: discriminant Δ part should be non-zero: 4a³ + 27b² != 0.\n    // Guarantees curve is genus-1, smooth (non-singular).\n    const _4a3 = Fp.mul(Fp.pow(CURVE.a, _3n), _4n);\n    const _27b2 = Fp.mul(Fp.sqr(CURVE.b), BigInt(27));\n    if (Fp.is0(Fp.add(_4a3, _27b2)))\n        throw new Error('bad curve params: a or b');\n    /** Asserts coordinate is valid: 0 <= n < Fp.ORDER. */\n    function acoord(title, n, banZero = false) {\n        if (!Fp.isValid(n) || (banZero && Fp.is0(n)))\n            throw new Error(`bad point coordinate ${title}`);\n        return n;\n    }\n    function aprjpoint(other) {\n        if (!(other instanceof Point))\n            throw new Error('ProjectivePoint expected');\n    }\n    function splitEndoScalarN(k) {\n        if (!endo || !endo.basises)\n            throw new Error('no endo');\n        return _splitEndoScalar(k, endo.basises, Fn.ORDER);\n    }\n    // Memoized toAffine / validity check. They are heavy. Points are immutable.\n    // Converts Projective point to affine (x, y) coordinates.\n    // Can accept precomputed Z^-1 - for example, from invertBatch.\n    // (X, Y, Z) ∋ (x=X/Z, y=Y/Z)\n    const toAffineMemo = memoized((p, iz) => {\n        const { X, Y, Z } = p;\n        // Fast-path for normalized points\n        if (Fp.eql(Z, Fp.ONE))\n            return { x: X, y: Y };\n        const is0 = p.is0();\n        // If invZ was 0, we return zero point. However we still want to execute\n        // all operations, so we replace invZ with a random number, 1.\n        if (iz == null)\n            iz = is0 ? Fp.ONE : Fp.inv(Z);\n        const x = Fp.mul(X, iz);\n        const y = Fp.mul(Y, iz);\n        const zz = Fp.mul(Z, iz);\n        if (is0)\n            return { x: Fp.ZERO, y: Fp.ZERO };\n        if (!Fp.eql(zz, Fp.ONE))\n            throw new Error('invZ was invalid');\n        return { x, y };\n    });\n    // NOTE: on exception this will crash 'cached' and no value will be set.\n    // Otherwise true will be return\n    const assertValidMemo = memoized((p) => {\n        if (p.is0()) {\n            // (0, 1, 0) aka ZERO is invalid in most contexts.\n            // In BLS, ZERO can be serialized, so we allow it.\n            // (0, 0, 0) is invalid representation of ZERO.\n            if (extraOpts.allowInfinityPoint && !Fp.is0(p.Y))\n                return;\n            throw new Error('bad point: ZERO');\n        }\n        // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n        const { x, y } = p.toAffine();\n        if (!Fp.isValid(x) || !Fp.isValid(y))\n            throw new Error('bad point: x or y not field elements');\n        if (!isValidXY(x, y))\n            throw new Error('bad point: equation left != right');\n        if (!p.isTorsionFree())\n            throw new Error('bad point: not in prime-order subgroup');\n        return true;\n    });\n    function finishEndo(endoBeta, k1p, k2p, k1neg, k2neg) {\n        k2p = new Point(Fp.mul(k2p.X, endoBeta), k2p.Y, k2p.Z);\n        k1p = negateCt(k1neg, k1p);\n        k2p = negateCt(k2neg, k2p);\n        return k1p.add(k2p);\n    }\n    /**\n     * Projective Point works in 3d / projective (homogeneous) coordinates:(X, Y, Z) ∋ (x=X/Z, y=Y/Z).\n     * Default Point works in 2d / affine coordinates: (x, y).\n     * We're doing calculations in projective, because its operations don't require costly inversion.\n     */\n    class Point {\n        /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n        constructor(X, Y, Z) {\n            this.X = acoord('x', X);\n            this.Y = acoord('y', Y, true);\n            this.Z = acoord('z', Z);\n            Object.freeze(this);\n        }\n        static CURVE() {\n            return CURVE;\n        }\n        /** Does NOT validate if the point is valid. Use `.assertValidity()`. */\n        static fromAffine(p) {\n            const { x, y } = p || {};\n            if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n                throw new Error('invalid affine point');\n            if (p instanceof Point)\n                throw new Error('projective point not allowed');\n            // (0, 0) would've produced (0, 0, 1) - instead, we need (0, 1, 0)\n            if (Fp.is0(x) && Fp.is0(y))\n                return Point.ZERO;\n            return new Point(x, y, Fp.ONE);\n        }\n        static fromBytes(bytes) {\n            const P = Point.fromAffine(decodePoint(abytes(bytes, undefined, 'point')));\n            P.assertValidity();\n            return P;\n        }\n        static fromHex(hex) {\n            return Point.fromBytes(ensureBytes('pointHex', hex));\n        }\n        get x() {\n            return this.toAffine().x;\n        }\n        get y() {\n            return this.toAffine().y;\n        }\n        /**\n         *\n         * @param windowSize\n         * @param isLazy true will defer table computation until the first multiplication\n         * @returns\n         */\n        precompute(windowSize = 8, isLazy = true) {\n            wnaf.createCache(this, windowSize);\n            if (!isLazy)\n                this.multiply(_3n); // random number\n            return this;\n        }\n        // TODO: return `this`\n        /** A point on curve is valid if it conforms to equation. */\n        assertValidity() {\n            assertValidMemo(this);\n        }\n        hasEvenY() {\n            const { y } = this.toAffine();\n            if (!Fp.isOdd)\n                throw new Error(\"Field doesn't support isOdd\");\n            return !Fp.isOdd(y);\n        }\n        /** Compare one point to another. */\n        equals(other) {\n            aprjpoint(other);\n            const { X: X1, Y: Y1, Z: Z1 } = this;\n            const { X: X2, Y: Y2, Z: Z2 } = other;\n            const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n            const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n            return U1 && U2;\n        }\n        /** Flips point to one corresponding to (x, -y) in Affine coordinates. */\n        negate() {\n            return new Point(this.X, Fp.neg(this.Y), this.Z);\n        }\n        // Renes-Costello-Batina exception-free doubling formula.\n        // There is 30% faster Jacobian formula, but it is not complete.\n        // https://eprint.iacr.org/2015/1060, algorithm 3\n        // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n        double() {\n            const { a, b } = CURVE;\n            const b3 = Fp.mul(b, _3n);\n            const { X: X1, Y: Y1, Z: Z1 } = this;\n            let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n            let t0 = Fp.mul(X1, X1); // step 1\n            let t1 = Fp.mul(Y1, Y1);\n            let t2 = Fp.mul(Z1, Z1);\n            let t3 = Fp.mul(X1, Y1);\n            t3 = Fp.add(t3, t3); // step 5\n            Z3 = Fp.mul(X1, Z1);\n            Z3 = Fp.add(Z3, Z3);\n            X3 = Fp.mul(a, Z3);\n            Y3 = Fp.mul(b3, t2);\n            Y3 = Fp.add(X3, Y3); // step 10\n            X3 = Fp.sub(t1, Y3);\n            Y3 = Fp.add(t1, Y3);\n            Y3 = Fp.mul(X3, Y3);\n            X3 = Fp.mul(t3, X3);\n            Z3 = Fp.mul(b3, Z3); // step 15\n            t2 = Fp.mul(a, t2);\n            t3 = Fp.sub(t0, t2);\n            t3 = Fp.mul(a, t3);\n            t3 = Fp.add(t3, Z3);\n            Z3 = Fp.add(t0, t0); // step 20\n            t0 = Fp.add(Z3, t0);\n            t0 = Fp.add(t0, t2);\n            t0 = Fp.mul(t0, t3);\n            Y3 = Fp.add(Y3, t0);\n            t2 = Fp.mul(Y1, Z1); // step 25\n            t2 = Fp.add(t2, t2);\n            t0 = Fp.mul(t2, t3);\n            X3 = Fp.sub(X3, t0);\n            Z3 = Fp.mul(t2, t1);\n            Z3 = Fp.add(Z3, Z3); // step 30\n            Z3 = Fp.add(Z3, Z3);\n            return new Point(X3, Y3, Z3);\n        }\n        // Renes-Costello-Batina exception-free addition formula.\n        // There is 30% faster Jacobian formula, but it is not complete.\n        // https://eprint.iacr.org/2015/1060, algorithm 1\n        // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n        add(other) {\n            aprjpoint(other);\n            const { X: X1, Y: Y1, Z: Z1 } = this;\n            const { X: X2, Y: Y2, Z: Z2 } = other;\n            let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n            const a = CURVE.a;\n            const b3 = Fp.mul(CURVE.b, _3n);\n            let t0 = Fp.mul(X1, X2); // step 1\n            let t1 = Fp.mul(Y1, Y2);\n            let t2 = Fp.mul(Z1, Z2);\n            let t3 = Fp.add(X1, Y1);\n            let t4 = Fp.add(X2, Y2); // step 5\n            t3 = Fp.mul(t3, t4);\n            t4 = Fp.add(t0, t1);\n            t3 = Fp.sub(t3, t4);\n            t4 = Fp.add(X1, Z1);\n            let t5 = Fp.add(X2, Z2); // step 10\n            t4 = Fp.mul(t4, t5);\n            t5 = Fp.add(t0, t2);\n            t4 = Fp.sub(t4, t5);\n            t5 = Fp.add(Y1, Z1);\n            X3 = Fp.add(Y2, Z2); // step 15\n            t5 = Fp.mul(t5, X3);\n            X3 = Fp.add(t1, t2);\n            t5 = Fp.sub(t5, X3);\n            Z3 = Fp.mul(a, t4);\n            X3 = Fp.mul(b3, t2); // step 20\n            Z3 = Fp.add(X3, Z3);\n            X3 = Fp.sub(t1, Z3);\n            Z3 = Fp.add(t1, Z3);\n            Y3 = Fp.mul(X3, Z3);\n            t1 = Fp.add(t0, t0); // step 25\n            t1 = Fp.add(t1, t0);\n            t2 = Fp.mul(a, t2);\n            t4 = Fp.mul(b3, t4);\n            t1 = Fp.add(t1, t2);\n            t2 = Fp.sub(t0, t2); // step 30\n            t2 = Fp.mul(a, t2);\n            t4 = Fp.add(t4, t2);\n            t0 = Fp.mul(t1, t4);\n            Y3 = Fp.add(Y3, t0);\n            t0 = Fp.mul(t5, t4); // step 35\n            X3 = Fp.mul(t3, X3);\n            X3 = Fp.sub(X3, t0);\n            t0 = Fp.mul(t3, t1);\n            Z3 = Fp.mul(t5, Z3);\n            Z3 = Fp.add(Z3, t0); // step 40\n            return new Point(X3, Y3, Z3);\n        }\n        subtract(other) {\n            return this.add(other.negate());\n        }\n        is0() {\n            return this.equals(Point.ZERO);\n        }\n        /**\n         * Constant time multiplication.\n         * Uses wNAF method. Windowed method may be 10% faster,\n         * but takes 2x longer to generate and consumes 2x memory.\n         * Uses precomputes when available.\n         * Uses endomorphism for Koblitz curves.\n         * @param scalar by which the point would be multiplied\n         * @returns New point\n         */\n        multiply(scalar) {\n            const { endo } = extraOpts;\n            if (!Fn.isValidNot0(scalar))\n                throw new Error('invalid scalar: out of range'); // 0 is invalid\n            let point, fake; // Fake point is used to const-time mult\n            const mul = (n) => wnaf.cached(this, n, (p) => normalizeZ(Point, p));\n            /** See docs for {@link EndomorphismOpts} */\n            if (endo) {\n                const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(scalar);\n                const { p: k1p, f: k1f } = mul(k1);\n                const { p: k2p, f: k2f } = mul(k2);\n                fake = k1f.add(k2f);\n                point = finishEndo(endo.beta, k1p, k2p, k1neg, k2neg);\n            }\n            else {\n                const { p, f } = mul(scalar);\n                point = p;\n                fake = f;\n            }\n            // Normalize `z` for both points, but return only real one\n            return normalizeZ(Point, [point, fake])[0];\n        }\n        /**\n         * Non-constant-time multiplication. Uses double-and-add algorithm.\n         * It's faster, but should only be used when you don't care about\n         * an exposed secret key e.g. sig verification, which works over *public* keys.\n         */\n        multiplyUnsafe(sc) {\n            const { endo } = extraOpts;\n            const p = this;\n            if (!Fn.isValid(sc))\n                throw new Error('invalid scalar: out of range'); // 0 is valid\n            if (sc === _0n || p.is0())\n                return Point.ZERO;\n            if (sc === _1n)\n                return p; // fast-path\n            if (wnaf.hasCache(this))\n                return this.multiply(sc);\n            if (endo) {\n                const { k1neg, k1, k2neg, k2 } = splitEndoScalarN(sc);\n                const { p1, p2 } = mulEndoUnsafe(Point, p, k1, k2); // 30% faster vs wnaf.unsafe\n                return finishEndo(endo.beta, p1, p2, k1neg, k2neg);\n            }\n            else {\n                return wnaf.unsafe(p, sc);\n            }\n        }\n        multiplyAndAddUnsafe(Q, a, b) {\n            const sum = this.multiplyUnsafe(a).add(Q.multiplyUnsafe(b));\n            return sum.is0() ? undefined : sum;\n        }\n        /**\n         * Converts Projective point to affine (x, y) coordinates.\n         * @param invertedZ Z^-1 (inverted zero) - optional, precomputation is useful for invertBatch\n         */\n        toAffine(invertedZ) {\n            return toAffineMemo(this, invertedZ);\n        }\n        /**\n         * Checks whether Point is free of torsion elements (is in prime subgroup).\n         * Always torsion-free for cofactor=1 curves.\n         */\n        isTorsionFree() {\n            const { isTorsionFree } = extraOpts;\n            if (cofactor === _1n)\n                return true;\n            if (isTorsionFree)\n                return isTorsionFree(Point, this);\n            return wnaf.unsafe(this, CURVE_ORDER).is0();\n        }\n        clearCofactor() {\n            const { clearCofactor } = extraOpts;\n            if (cofactor === _1n)\n                return this; // Fast-path\n            if (clearCofactor)\n                return clearCofactor(Point, this);\n            return this.multiplyUnsafe(cofactor);\n        }\n        isSmallOrder() {\n            // can we use this.clearCofactor()?\n            return this.multiplyUnsafe(cofactor).is0();\n        }\n        toBytes(isCompressed = true) {\n            abool(isCompressed, 'isCompressed');\n            this.assertValidity();\n            return encodePoint(Point, this, isCompressed);\n        }\n        toHex(isCompressed = true) {\n            return bytesToHex(this.toBytes(isCompressed));\n        }\n        toString() {\n            return `<Point ${this.is0() ? 'ZERO' : this.toHex()}>`;\n        }\n        // TODO: remove\n        get px() {\n            return this.X;\n        }\n        get py() {\n            return this.X;\n        }\n        get pz() {\n            return this.Z;\n        }\n        toRawBytes(isCompressed = true) {\n            return this.toBytes(isCompressed);\n        }\n        _setWindowSize(windowSize) {\n            this.precompute(windowSize);\n        }\n        static normalizeZ(points) {\n            return normalizeZ(Point, points);\n        }\n        static msm(points, scalars) {\n            return pippenger(Point, Fn, points, scalars);\n        }\n        static fromPrivateKey(privateKey) {\n            return Point.BASE.multiply(_normFnElement(Fn, privateKey));\n        }\n    }\n    // base / generator point\n    Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n    // zero / infinity / identity point\n    Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO); // 0, 1, 0\n    // math field\n    Point.Fp = Fp;\n    // scalar field\n    Point.Fn = Fn;\n    const bits = Fn.BITS;\n    const wnaf = new wNAF(Point, extraOpts.endo ? Math.ceil(bits / 2) : bits);\n    Point.BASE.precompute(8); // Enable precomputes. Slows down first publicKey computation by 20ms.\n    return Point;\n}\n// Points start with byte 0x02 when y is even; otherwise 0x03\nfunction pprefix(hasEvenY) {\n    return Uint8Array.of(hasEvenY ? 0x02 : 0x03);\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n    // Generic implementation\n    const q = Fp.ORDER;\n    let l = _0n;\n    for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n        l += _1n;\n    const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n    // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n    // 2n ** c1 == 2n << (c1-1)\n    const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n    const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n    const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1)  # Integer arithmetic\n    const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2            # Integer arithmetic\n    const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1                # Integer arithmetic\n    const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1)                  # Integer arithmetic\n    const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n    const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n    let sqrtRatio = (u, v) => {\n        let tv1 = c6; // 1. tv1 = c6\n        let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n        let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n        tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n        let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n        tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n        tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n        tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n        tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n        let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n        tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n        let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n        tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n        tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n        tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n        tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n        // 17. for i in (c1, c1 - 1, ..., 2):\n        for (let i = c1; i > _1n; i--) {\n            let tv5 = i - _2n; // 18.    tv5 = i - 2\n            tv5 = _2n << (tv5 - _1n); // 19.    tv5 = 2^tv5\n            let tvv5 = Fp.pow(tv4, tv5); // 20.    tv5 = tv4^tv5\n            const e1 = Fp.eql(tvv5, Fp.ONE); // 21.    e1 = tv5 == 1\n            tv2 = Fp.mul(tv3, tv1); // 22.    tv2 = tv3 * tv1\n            tv1 = Fp.mul(tv1, tv1); // 23.    tv1 = tv1 * tv1\n            tvv5 = Fp.mul(tv4, tv1); // 24.    tv5 = tv4 * tv1\n            tv3 = Fp.cmov(tv2, tv3, e1); // 25.    tv3 = CMOV(tv2, tv3, e1)\n            tv4 = Fp.cmov(tvv5, tv4, e1); // 26.    tv4 = CMOV(tv5, tv4, e1)\n        }\n        return { isValid: isQR, value: tv3 };\n    };\n    if (Fp.ORDER % _4n === _3n) {\n        // sqrt_ratio_3mod4(u, v)\n        const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4     # Integer arithmetic\n        const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n        sqrtRatio = (u, v) => {\n            let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n            const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n            tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n            let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n            y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n            const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n            const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n            const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n            let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n            return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n        };\n    }\n    // No curves uses that\n    // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n    return sqrtRatio;\n}\n/**\n * Simplified Shallue-van de Woestijne-Ulas Method\n * https://www.rfc-editor.org/rfc/rfc9380#section-6.6.2\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n    validateField(Fp);\n    const { A, B, Z } = opts;\n    if (!Fp.isValid(A) || !Fp.isValid(B) || !Fp.isValid(Z))\n        throw new Error('mapToCurveSimpleSWU: invalid opts');\n    const sqrtRatio = SWUFpSqrtRatio(Fp, Z);\n    if (!Fp.isOdd)\n        throw new Error('Field does not have .isOdd()');\n    // Input: u, an element of F.\n    // Output: (x, y), a point on E.\n    return (u) => {\n        // prettier-ignore\n        let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n        tv1 = Fp.sqr(u); // 1.  tv1 = u^2\n        tv1 = Fp.mul(tv1, Z); // 2.  tv1 = Z * tv1\n        tv2 = Fp.sqr(tv1); // 3.  tv2 = tv1^2\n        tv2 = Fp.add(tv2, tv1); // 4.  tv2 = tv2 + tv1\n        tv3 = Fp.add(tv2, Fp.ONE); // 5.  tv3 = tv2 + 1\n        tv3 = Fp.mul(tv3, B); // 6.  tv3 = B * tv3\n        tv4 = Fp.cmov(Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7.  tv4 = CMOV(Z, -tv2, tv2 != 0)\n        tv4 = Fp.mul(tv4, A); // 8.  tv4 = A * tv4\n        tv2 = Fp.sqr(tv3); // 9.  tv2 = tv3^2\n        tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n        tv5 = Fp.mul(tv6, A); // 11. tv5 = A * tv6\n        tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n        tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n        tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n        tv5 = Fp.mul(tv6, B); // 15. tv5 = B * tv6\n        tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n        x = Fp.mul(tv1, tv3); // 17.   x = tv1 * tv3\n        const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n        y = Fp.mul(tv1, u); // 19.   y = tv1 * u  -> Z * u^3 * y1\n        y = Fp.mul(y, value); // 20.   y = y * y1\n        x = Fp.cmov(x, tv3, isValid); // 21.   x = CMOV(x, tv3, is_gx1_square)\n        y = Fp.cmov(y, value, isValid); // 22.   y = CMOV(y, y1, is_gx1_square)\n        const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23.  e1 = sgn0(u) == sgn0(y)\n        y = Fp.cmov(Fp.neg(y), y, e1); // 24.   y = CMOV(-y, y, e1)\n        const tv4_inv = FpInvertBatch(Fp, [tv4], true)[0];\n        x = Fp.mul(x, tv4_inv); // 25.   x = x / tv4\n        return { x, y };\n    };\n}\nfunction getWLengths(Fp, Fn) {\n    return {\n        secretKey: Fn.BYTES,\n        publicKey: 1 + Fp.BYTES,\n        publicKeyUncompressed: 1 + 2 * Fp.BYTES,\n        publicKeyHasPrefix: true,\n        signature: 2 * Fn.BYTES,\n    };\n}\n/**\n * Sometimes users only need getPublicKey, getSharedSecret, and secret key handling.\n * This helper ensures no signature functionality is present. Less code, smaller bundle size.\n */\nexport function ecdh(Point, ecdhOpts = {}) {\n    const { Fn } = Point;\n    const randomBytes_ = ecdhOpts.randomBytes || randomBytesWeb;\n    const lengths = Object.assign(getWLengths(Point.Fp, Fn), { seed: getMinHashLength(Fn.ORDER) });\n    function isValidSecretKey(secretKey) {\n        try {\n            return !!_normFnElement(Fn, secretKey);\n        }\n        catch (error) {\n            return false;\n        }\n    }\n    function isValidPublicKey(publicKey, isCompressed) {\n        const { publicKey: comp, publicKeyUncompressed } = lengths;\n        try {\n            const l = publicKey.length;\n            if (isCompressed === true && l !== comp)\n                return false;\n            if (isCompressed === false && l !== publicKeyUncompressed)\n                return false;\n            return !!Point.fromBytes(publicKey);\n        }\n        catch (error) {\n            return false;\n        }\n    }\n    /**\n     * Produces cryptographically secure secret key from random of size\n     * (groupLen + ceil(groupLen / 2)) with modulo bias being negligible.\n     */\n    function randomSecretKey(seed = randomBytes_(lengths.seed)) {\n        return mapHashToField(abytes(seed, lengths.seed, 'seed'), Fn.ORDER);\n    }\n    /**\n     * Computes public key for a secret key. Checks for validity of the secret key.\n     * @param isCompressed whether to return compact (default), or full key\n     * @returns Public key, full when isCompressed=false; short when isCompressed=true\n     */\n    function getPublicKey(secretKey, isCompressed = true) {\n        return Point.BASE.multiply(_normFnElement(Fn, secretKey)).toBytes(isCompressed);\n    }\n    function keygen(seed) {\n        const secretKey = randomSecretKey(seed);\n        return { secretKey, publicKey: getPublicKey(secretKey) };\n    }\n    /**\n     * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n     */\n    function isProbPub(item) {\n        if (typeof item === 'bigint')\n            return false;\n        if (item instanceof Point)\n            return true;\n        const { secretKey, publicKey, publicKeyUncompressed } = lengths;\n        if (Fn.allowedLengths || secretKey === publicKey)\n            return undefined;\n        const l = ensureBytes('key', item).length;\n        return l === publicKey || l === publicKeyUncompressed;\n    }\n    /**\n     * ECDH (Elliptic Curve Diffie Hellman).\n     * Computes shared public key from secret key A and public key B.\n     * Checks: 1) secret key validity 2) shared key is on-curve.\n     * Does NOT hash the result.\n     * @param isCompressed whether to return compact (default), or full key\n     * @returns shared public key\n     */\n    function getSharedSecret(secretKeyA, publicKeyB, isCompressed = true) {\n        if (isProbPub(secretKeyA) === true)\n            throw new Error('first arg must be private key');\n        if (isProbPub(publicKeyB) === false)\n            throw new Error('second arg must be public key');\n        const s = _normFnElement(Fn, secretKeyA);\n        const b = Point.fromHex(publicKeyB); // checks for being on-curve\n        return b.multiply(s).toBytes(isCompressed);\n    }\n    const utils = {\n        isValidSecretKey,\n        isValidPublicKey,\n        randomSecretKey,\n        // TODO: remove\n        isValidPrivateKey: isValidSecretKey,\n        randomPrivateKey: randomSecretKey,\n        normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n        precompute(windowSize = 8, point = Point.BASE) {\n            return point.precompute(windowSize, false);\n        },\n    };\n    return Object.freeze({ getPublicKey, getSharedSecret, keygen, Point, utils, lengths });\n}\n/**\n * Creates ECDSA signing interface for given elliptic curve `Point` and `hash` function.\n * We need `hash` for 2 features:\n * 1. Message prehash-ing. NOT used if `sign` / `verify` are called with `prehash: false`\n * 2. k generation in `sign`, using HMAC-drbg(hash)\n *\n * ECDSAOpts are only rarely needed.\n *\n * @example\n * ```js\n * const p256_Point = weierstrass(...);\n * const p256_sha256 = ecdsa(p256_Point, sha256);\n * const p256_sha224 = ecdsa(p256_Point, sha224);\n * const p256_sha224_r = ecdsa(p256_Point, sha224, { randomBytes: (length) => { ... } });\n * ```\n */\nexport function ecdsa(Point, hash, ecdsaOpts = {}) {\n    ahash(hash);\n    _validateObject(ecdsaOpts, {}, {\n        hmac: 'function',\n        lowS: 'boolean',\n        randomBytes: 'function',\n        bits2int: 'function',\n        bits2int_modN: 'function',\n    });\n    const randomBytes = ecdsaOpts.randomBytes || randomBytesWeb;\n    const hmac = ecdsaOpts.hmac ||\n        ((key, ...msgs) => nobleHmac(hash, key, concatBytes(...msgs)));\n    const { Fp, Fn } = Point;\n    const { ORDER: CURVE_ORDER, BITS: fnBits } = Fn;\n    const { keygen, getPublicKey, getSharedSecret, utils, lengths } = ecdh(Point, ecdsaOpts);\n    const defaultSigOpts = {\n        prehash: false,\n        lowS: typeof ecdsaOpts.lowS === 'boolean' ? ecdsaOpts.lowS : false,\n        format: undefined, //'compact' as ECDSASigFormat,\n        extraEntropy: false,\n    };\n    const defaultSigOpts_format = 'compact';\n    function isBiggerThanHalfOrder(number) {\n        const HALF = CURVE_ORDER >> _1n;\n        return number > HALF;\n    }\n    function validateRS(title, num) {\n        if (!Fn.isValidNot0(num))\n            throw new Error(`invalid signature ${title}: out of range 1..Point.Fn.ORDER`);\n        return num;\n    }\n    function validateSigLength(bytes, format) {\n        validateSigFormat(format);\n        const size = lengths.signature;\n        const sizer = format === 'compact' ? size : format === 'recovered' ? size + 1 : undefined;\n        return abytes(bytes, sizer, `${format} signature`);\n    }\n    /**\n     * ECDSA signature with its (r, s) properties. Supports compact, recovered & DER representations.\n     */\n    class Signature {\n        constructor(r, s, recovery) {\n            this.r = validateRS('r', r); // r in [1..N-1];\n            this.s = validateRS('s', s); // s in [1..N-1];\n            if (recovery != null)\n                this.recovery = recovery;\n            Object.freeze(this);\n        }\n        static fromBytes(bytes, format = defaultSigOpts_format) {\n            validateSigLength(bytes, format);\n            let recid;\n            if (format === 'der') {\n                const { r, s } = DER.toSig(abytes(bytes));\n                return new Signature(r, s);\n            }\n            if (format === 'recovered') {\n                recid = bytes[0];\n                format = 'compact';\n                bytes = bytes.subarray(1);\n            }\n            const L = Fn.BYTES;\n            const r = bytes.subarray(0, L);\n            const s = bytes.subarray(L, L * 2);\n            return new Signature(Fn.fromBytes(r), Fn.fromBytes(s), recid);\n        }\n        static fromHex(hex, format) {\n            return this.fromBytes(hexToBytes(hex), format);\n        }\n        addRecoveryBit(recovery) {\n            return new Signature(this.r, this.s, recovery);\n        }\n        recoverPublicKey(messageHash) {\n            const FIELD_ORDER = Fp.ORDER;\n            const { r, s, recovery: rec } = this;\n            if (rec == null || ![0, 1, 2, 3].includes(rec))\n                throw new Error('recovery id invalid');\n            // ECDSA recovery is hard for cofactor > 1 curves.\n            // In sign, `r = q.x mod n`, and here we recover q.x from r.\n            // While recovering q.x >= n, we need to add r+n for cofactor=1 curves.\n            // However, for cofactor>1, r+n may not get q.x:\n            // r+n*i would need to be done instead where i is unknown.\n            // To easily get i, we either need to:\n            // a. increase amount of valid recid values (4, 5...); OR\n            // b. prohibit non-prime-order signatures (recid > 1).\n            const hasCofactor = CURVE_ORDER * _2n < FIELD_ORDER;\n            if (hasCofactor && rec > 1)\n                throw new Error('recovery id is ambiguous for h>1 curve');\n            const radj = rec === 2 || rec === 3 ? r + CURVE_ORDER : r;\n            if (!Fp.isValid(radj))\n                throw new Error('recovery id 2 or 3 invalid');\n            const x = Fp.toBytes(radj);\n            const R = Point.fromBytes(concatBytes(pprefix((rec & 1) === 0), x));\n            const ir = Fn.inv(radj); // r^-1\n            const h = bits2int_modN(ensureBytes('msgHash', messageHash)); // Truncate hash\n            const u1 = Fn.create(-h * ir); // -hr^-1\n            const u2 = Fn.create(s * ir); // sr^-1\n            // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1). unsafe is fine: there is no private data.\n            const Q = Point.BASE.multiplyUnsafe(u1).add(R.multiplyUnsafe(u2));\n            if (Q.is0())\n                throw new Error('point at infinify');\n            Q.assertValidity();\n            return Q;\n        }\n        // Signatures should be low-s, to prevent malleability.\n        hasHighS() {\n            return isBiggerThanHalfOrder(this.s);\n        }\n        toBytes(format = defaultSigOpts_format) {\n            validateSigFormat(format);\n            if (format === 'der')\n                return hexToBytes(DER.hexFromSig(this));\n            const r = Fn.toBytes(this.r);\n            const s = Fn.toBytes(this.s);\n            if (format === 'recovered') {\n                if (this.recovery == null)\n                    throw new Error('recovery bit must be present');\n                return concatBytes(Uint8Array.of(this.recovery), r, s);\n            }\n            return concatBytes(r, s);\n        }\n        toHex(format) {\n            return bytesToHex(this.toBytes(format));\n        }\n        // TODO: remove\n        assertValidity() { }\n        static fromCompact(hex) {\n            return Signature.fromBytes(ensureBytes('sig', hex), 'compact');\n        }\n        static fromDER(hex) {\n            return Signature.fromBytes(ensureBytes('sig', hex), 'der');\n        }\n        normalizeS() {\n            return this.hasHighS() ? new Signature(this.r, Fn.neg(this.s), this.recovery) : this;\n        }\n        toDERRawBytes() {\n            return this.toBytes('der');\n        }\n        toDERHex() {\n            return bytesToHex(this.toBytes('der'));\n        }\n        toCompactRawBytes() {\n            return this.toBytes('compact');\n        }\n        toCompactHex() {\n            return bytesToHex(this.toBytes('compact'));\n        }\n    }\n    // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n    // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n    // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n    // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n    const bits2int = ecdsaOpts.bits2int ||\n        function bits2int_def(bytes) {\n            // Our custom check \"just in case\", for protection against DoS\n            if (bytes.length > 8192)\n                throw new Error('input is too large');\n            // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n            // for some cases, since bytes.length * 8 is not actual bitLength.\n            const num = bytesToNumberBE(bytes); // check for == u8 done here\n            const delta = bytes.length * 8 - fnBits; // truncate to nBitLength leftmost bits\n            return delta > 0 ? num >> BigInt(delta) : num;\n        };\n    const bits2int_modN = ecdsaOpts.bits2int_modN ||\n        function bits2int_modN_def(bytes) {\n            return Fn.create(bits2int(bytes)); // can't use bytesToNumberBE here\n        };\n    // Pads output with zero as per spec\n    const ORDER_MASK = bitMask(fnBits);\n    /** Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`. */\n    function int2octets(num) {\n        // IMPORTANT: the check ensures working for case `Fn.BYTES != Fn.BITS * 8`\n        aInRange('num < 2^' + fnBits, num, _0n, ORDER_MASK);\n        return Fn.toBytes(num);\n    }\n    function validateMsgAndHash(message, prehash) {\n        abytes(message, undefined, 'message');\n        return prehash ? abytes(hash(message), undefined, 'prehashed message') : message;\n    }\n    /**\n     * Steps A, D of RFC6979 3.2.\n     * Creates RFC6979 seed; converts msg/privKey to numbers.\n     * Used only in sign, not in verify.\n     *\n     * Warning: we cannot assume here that message has same amount of bytes as curve order,\n     * this will be invalid at least for P521. Also it can be bigger for P224 + SHA256.\n     */\n    function prepSig(message, privateKey, opts) {\n        if (['recovered', 'canonical'].some((k) => k in opts))\n            throw new Error('sign() legacy options not supported');\n        const { lowS, prehash, extraEntropy } = validateSigOpts(opts, defaultSigOpts);\n        message = validateMsgAndHash(message, prehash); // RFC6979 3.2 A: h1 = H(m)\n        // We can't later call bits2octets, since nested bits2int is broken for curves\n        // with fnBits % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n        // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n        const h1int = bits2int_modN(message);\n        const d = _normFnElement(Fn, privateKey); // validate secret key, convert to bigint\n        const seedArgs = [int2octets(d), int2octets(h1int)];\n        // extraEntropy. RFC6979 3.6: additional k' (optional).\n        if (extraEntropy != null && extraEntropy !== false) {\n            // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n            // gen random bytes OR pass as-is\n            const e = extraEntropy === true ? randomBytes(lengths.secretKey) : extraEntropy;\n            seedArgs.push(ensureBytes('extraEntropy', e)); // check for being bytes\n        }\n        const seed = concatBytes(...seedArgs); // Step D of RFC6979 3.2\n        const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n        // Converts signature params into point w r/s, checks result for validity.\n        // To transform k => Signature:\n        // q = k⋅G\n        // r = q.x mod n\n        // s = k^-1(m + rd) mod n\n        // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n        // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n        // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n        function k2sig(kBytes) {\n            // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n            // Important: all mod() calls here must be done over N\n            const k = bits2int(kBytes); // mod n, not mod p\n            if (!Fn.isValidNot0(k))\n                return; // Valid scalars (including k) must be in 1..N-1\n            const ik = Fn.inv(k); // k^-1 mod n\n            const q = Point.BASE.multiply(k).toAffine(); // q = k⋅G\n            const r = Fn.create(q.x); // r = q.x mod n\n            if (r === _0n)\n                return;\n            const s = Fn.create(ik * Fn.create(m + r * d)); // Not using blinding here, see comment above\n            if (s === _0n)\n                return;\n            let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n            let normS = s;\n            if (lowS && isBiggerThanHalfOrder(s)) {\n                normS = Fn.neg(s); // if lowS was passed, ensure s is always\n                recovery ^= 1; // // in the bottom half of N\n            }\n            return new Signature(r, normS, recovery); // use normS, not s\n        }\n        return { seed, k2sig };\n    }\n    /**\n     * Signs message hash with a secret key.\n     *\n     * ```\n     * sign(m, d) where\n     *   k = rfc6979_hmac_drbg(m, d)\n     *   (x, y) = G × k\n     *   r = x mod n\n     *   s = (m + dr) / k mod n\n     * ```\n     */\n    function sign(message, secretKey, opts = {}) {\n        message = ensureBytes('message', message);\n        const { seed, k2sig } = prepSig(message, secretKey, opts); // Steps A, D of RFC6979 3.2.\n        const drbg = createHmacDrbg(hash.outputLen, Fn.BYTES, hmac);\n        const sig = drbg(seed, k2sig); // Steps B, C, D, E, F, G\n        return sig;\n    }\n    function tryParsingSig(sg) {\n        // Try to deduce format\n        let sig = undefined;\n        const isHex = typeof sg === 'string' || isBytes(sg);\n        const isObj = !isHex &&\n            sg !== null &&\n            typeof sg === 'object' &&\n            typeof sg.r === 'bigint' &&\n            typeof sg.s === 'bigint';\n        if (!isHex && !isObj)\n            throw new Error('invalid signature, expected Uint8Array, hex string or Signature instance');\n        if (isObj) {\n            sig = new Signature(sg.r, sg.s);\n        }\n        else if (isHex) {\n            try {\n                sig = Signature.fromBytes(ensureBytes('sig', sg), 'der');\n            }\n            catch (derError) {\n                if (!(derError instanceof DER.Err))\n                    throw derError;\n            }\n            if (!sig) {\n                try {\n                    sig = Signature.fromBytes(ensureBytes('sig', sg), 'compact');\n                }\n                catch (error) {\n                    return false;\n                }\n            }\n        }\n        if (!sig)\n            return false;\n        return sig;\n    }\n    /**\n     * Verifies a signature against message and public key.\n     * Rejects lowS signatures by default: see {@link ECDSAVerifyOpts}.\n     * Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n     *\n     * ```\n     * verify(r, s, h, P) where\n     *   u1 = hs^-1 mod n\n     *   u2 = rs^-1 mod n\n     *   R = u1⋅G + u2⋅P\n     *   mod(R.x, n) == r\n     * ```\n     */\n    function verify(signature, message, publicKey, opts = {}) {\n        const { lowS, prehash, format } = validateSigOpts(opts, defaultSigOpts);\n        publicKey = ensureBytes('publicKey', publicKey);\n        message = validateMsgAndHash(ensureBytes('message', message), prehash);\n        if ('strict' in opts)\n            throw new Error('options.strict was renamed to lowS');\n        const sig = format === undefined\n            ? tryParsingSig(signature)\n            : Signature.fromBytes(ensureBytes('sig', signature), format);\n        if (sig === false)\n            return false;\n        try {\n            const P = Point.fromBytes(publicKey);\n            if (lowS && sig.hasHighS())\n                return false;\n            const { r, s } = sig;\n            const h = bits2int_modN(message); // mod n, not mod p\n            const is = Fn.inv(s); // s^-1 mod n\n            const u1 = Fn.create(h * is); // u1 = hs^-1 mod n\n            const u2 = Fn.create(r * is); // u2 = rs^-1 mod n\n            const R = Point.BASE.multiplyUnsafe(u1).add(P.multiplyUnsafe(u2)); // u1⋅G + u2⋅P\n            if (R.is0())\n                return false;\n            const v = Fn.create(R.x); // v = r.x mod n\n            return v === r;\n        }\n        catch (e) {\n            return false;\n        }\n    }\n    function recoverPublicKey(signature, message, opts = {}) {\n        const { prehash } = validateSigOpts(opts, defaultSigOpts);\n        message = validateMsgAndHash(message, prehash);\n        return Signature.fromBytes(signature, 'recovered').recoverPublicKey(message).toBytes();\n    }\n    return Object.freeze({\n        keygen,\n        getPublicKey,\n        getSharedSecret,\n        utils,\n        lengths,\n        Point,\n        sign,\n        verify,\n        recoverPublicKey,\n        Signature,\n        hash,\n    });\n}\n/** @deprecated use `weierstrass` in newer releases */\nexport function weierstrassPoints(c) {\n    const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n    const Point = weierstrassN(CURVE, curveOpts);\n    return _weierstrass_new_output_to_legacy(c, Point);\n}\nfunction _weierstrass_legacy_opts_to_new(c) {\n    const CURVE = {\n        a: c.a,\n        b: c.b,\n        p: c.Fp.ORDER,\n        n: c.n,\n        h: c.h,\n        Gx: c.Gx,\n        Gy: c.Gy,\n    };\n    const Fp = c.Fp;\n    let allowedLengths = c.allowedPrivateKeyLengths\n        ? Array.from(new Set(c.allowedPrivateKeyLengths.map((l) => Math.ceil(l / 2))))\n        : undefined;\n    const Fn = Field(CURVE.n, {\n        BITS: c.nBitLength,\n        allowedLengths: allowedLengths,\n        modFromBytes: c.wrapPrivateKey,\n    });\n    const curveOpts = {\n        Fp,\n        Fn,\n        allowInfinityPoint: c.allowInfinityPoint,\n        endo: c.endo,\n        isTorsionFree: c.isTorsionFree,\n        clearCofactor: c.clearCofactor,\n        fromBytes: c.fromBytes,\n        toBytes: c.toBytes,\n    };\n    return { CURVE, curveOpts };\n}\nfunction _ecdsa_legacy_opts_to_new(c) {\n    const { CURVE, curveOpts } = _weierstrass_legacy_opts_to_new(c);\n    const ecdsaOpts = {\n        hmac: c.hmac,\n        randomBytes: c.randomBytes,\n        lowS: c.lowS,\n        bits2int: c.bits2int,\n        bits2int_modN: c.bits2int_modN,\n    };\n    return { CURVE, curveOpts, hash: c.hash, ecdsaOpts };\n}\nexport function _legacyHelperEquat(Fp, a, b) {\n    /**\n     * y² = x³ + ax + b: Short weierstrass curve formula. Takes x, returns y².\n     * @returns y²\n     */\n    function weierstrassEquation(x) {\n        const x2 = Fp.sqr(x); // x * x\n        const x3 = Fp.mul(x2, x); // x² * x\n        return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x³ + a * x + b\n    }\n    return weierstrassEquation;\n}\nfunction _weierstrass_new_output_to_legacy(c, Point) {\n    const { Fp, Fn } = Point;\n    function isWithinCurveOrder(num) {\n        return inRange(num, _1n, Fn.ORDER);\n    }\n    const weierstrassEquation = _legacyHelperEquat(Fp, c.a, c.b);\n    return Object.assign({}, {\n        CURVE: c,\n        Point: Point,\n        ProjectivePoint: Point,\n        normPrivateKeyToScalar: (key) => _normFnElement(Fn, key),\n        weierstrassEquation,\n        isWithinCurveOrder,\n    });\n}\nfunction _ecdsa_new_output_to_legacy(c, _ecdsa) {\n    const Point = _ecdsa.Point;\n    return Object.assign({}, _ecdsa, {\n        ProjectivePoint: Point,\n        CURVE: Object.assign({}, c, nLength(Point.Fn.ORDER, Point.Fn.BITS)),\n    });\n}\n// _ecdsa_legacy\nexport function weierstrass(c) {\n    const { CURVE, curveOpts, hash, ecdsaOpts } = _ecdsa_legacy_opts_to_new(c);\n    const Point = weierstrassN(CURVE, curveOpts);\n    const signs = ecdsa(Point, hash, ecdsaOpts);\n    return _ecdsa_new_output_to_legacy(c, signs);\n}\n//# sourceMappingURL=weierstrass.js.map","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a) {\n    return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n/** Asserts something is boolean. */\nexport function abool(b) {\n    if (typeof b !== 'boolean')\n        throw new Error(`boolean expected, not ${b}`);\n}\n/** Asserts something is positive integer. */\nexport function anumber(n) {\n    if (!Number.isSafeInteger(n) || n < 0)\n        throw new Error('positive integer expected, got ' + n);\n}\n/** Asserts something is Uint8Array. */\nexport function 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}\n/**\n * Asserts something is hash\n * TODO: remove\n * @deprecated\n */\nexport function ahash(h) {\n    if (typeof h !== 'function' || typeof h.create !== 'function')\n        throw new Error('Hash should be wrapped by utils.createHasher');\n    anumber(h.outputLen);\n    anumber(h.blockLen);\n}\n/** Asserts a hash instance has not been destroyed / finished */\nexport function 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}\n/** Asserts output is properly-sized byte array */\nexport function 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/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr) {\n    return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr) {\n    return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays) {\n    for (let i = 0; i < arrays.length; i++) {\n        arrays[i].fill(0);\n    }\n}\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr) {\n    return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = /* @__PURE__ */ (() => \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\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. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n    abytes(bytes);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return bytes.toHex();\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. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    // @ts-ignore\n    if (hasHexBuiltin)\n        return Uint8Array.fromHex(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// Used in micro\nexport function hexToNumber(hex) {\n    if (typeof hex !== 'string')\n        throw new Error('hex string expected, got ' + typeof hex);\n    return BigInt(hex === '' ? '0' : '0x' + hex); // Big Endian\n}\n// Used in ff1\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n    return hexToNumber(bytesToHex(bytes));\n}\n// Used in micro, ff1\nexport function numberToBytesBE(n, len) {\n    return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\n// TODO: remove\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.\nexport const nextTick = async () => { };\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n    if (typeof str !== 'string')\n        throw new Error('string expected');\n    return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(new Uint8Array([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes) {\n    return new TextDecoder().decode(bytes);\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 */\nexport function toBytes(data) {\n    if (typeof data === 'string')\n        data = utf8ToBytes(data);\n    else if (isBytes(data))\n        data = copyBytes(data);\n    else\n        throw new Error('Uint8Array expected, got ' + typeof data);\n    return data;\n}\n/**\n * Checks if two U8A use same underlying buffer and overlaps.\n * This is invalid and can corrupt data.\n */\nexport function overlapBytes(a, b) {\n    return (a.buffer === b.buffer && // best we can do, may fail with an obscure Proxy\n        a.byteOffset < b.byteOffset + b.byteLength && // a starts before b end\n        b.byteOffset < a.byteOffset + a.byteLength // b starts before a end\n    );\n}\n/**\n * If input and output overlap and input starts before output, we will overwrite end of input before\n * we start processing it, so this is not supported for most ciphers (except chacha/salse, which designed with this)\n */\nexport function complexOverlapBytes(input, output) {\n    // This is very cursed. It works somehow, but I'm completely unsure,\n    // reasoning about overlapping aligned windows is very hard.\n    if (overlapBytes(input, output) && input.byteOffset < output.byteOffset)\n        throw new Error('complex overlap of input and output is not supported');\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n    let sum = 0;\n    for (let i = 0; i < arrays.length; i++) {\n        const a = arrays[i];\n        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}\nexport function checkOpts(defaults, opts) {\n    if (opts == null || typeof opts !== 'object')\n        throw new Error('options must be defined');\n    const merged = Object.assign(defaults, opts);\n    return merged;\n}\n/** Compares 2 uint8array-s in kinda constant time. */\nexport function equalBytes(a, b) {\n    if (a.length !== b.length)\n        return false;\n    let diff = 0;\n    for (let i = 0; i < a.length; i++)\n        diff |= a[i] ^ b[i];\n    return diff === 0;\n}\n// TODO: remove\n/** For runtime check if class implements interface. */\nexport class Hash {\n}\n/**\n * Wraps a cipher: validates args, ensures encrypt() can only be called once.\n * @__NO_SIDE_EFFECTS__\n */\nexport const wrapCipher = (params, constructor) => {\n    function wrappedCipher(key, ...args) {\n        // Validate key\n        abytes(key);\n        // Big-Endian hardware is rare. Just in case someone still decides to run ciphers:\n        if (!isLE)\n            throw new Error('Non little-endian hardware is not yet supported');\n        // Validate nonce if nonceLength is present\n        if (params.nonceLength !== undefined) {\n            const nonce = args[0];\n            if (!nonce)\n                throw new Error('nonce / iv required');\n            if (params.varSizeNonce)\n                abytes(nonce);\n            else\n                abytes(nonce, params.nonceLength);\n        }\n        // Validate AAD if tagLength present\n        const tagl = params.tagLength;\n        if (tagl && args[1] !== undefined) {\n            abytes(args[1]);\n        }\n        const cipher = constructor(key, ...args);\n        const checkOutput = (fnLength, output) => {\n            if (output !== undefined) {\n                if (fnLength !== 2)\n                    throw new Error('cipher output not supported');\n                abytes(output);\n            }\n        };\n        // Create wrapped cipher with validation and single-use encryption\n        let called = false;\n        const wrCipher = {\n            encrypt(data, output) {\n                if (called)\n                    throw new Error('cannot encrypt() twice with same key + nonce');\n                called = true;\n                abytes(data);\n                checkOutput(cipher.encrypt.length, output);\n                return cipher.encrypt(data, output);\n            },\n            decrypt(data, output) {\n                abytes(data);\n                if (tagl && data.length < tagl)\n                    throw new Error('invalid ciphertext length: smaller than tagLength=' + tagl);\n                checkOutput(cipher.decrypt.length, output);\n                return cipher.decrypt(data, output);\n            },\n        };\n        return wrCipher;\n    }\n    Object.assign(wrappedCipher, params);\n    return wrappedCipher;\n};\n/**\n * By default, returns u8a of length.\n * When out is available, it checks it for validity and uses it.\n */\nexport function getOutput(expectedLength, out, onlyAligned = true) {\n    if (out === undefined)\n        return new Uint8Array(expectedLength);\n    if (out.length !== expectedLength)\n        throw new Error('invalid output length, expected ' + expectedLength + ', got: ' + out.length);\n    if (onlyAligned && !isAligned32(out))\n        throw new Error('invalid output, must be aligned');\n    return out;\n}\n/** Polyfill for Safari 14. */\nexport function 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}\nexport function u64Lengths(dataLength, aadLength, isLE) {\n    abool(isLE);\n    const num = new Uint8Array(16);\n    const view = createView(num);\n    setBigUint64(view, 0, BigInt(aadLength), isLE);\n    setBigUint64(view, 8, BigInt(dataLength), isLE);\n    return num;\n}\n// Is byte array aligned to 4 byte offset (u32)?\nexport function isAligned32(bytes) {\n    return bytes.byteOffset % 4 === 0;\n}\n// copy bytes to new u8a (aligned). Because Buffer.slice is broken.\nexport function copyBytes(bytes) {\n    return Uint8Array.from(bytes);\n}\n//# sourceMappingURL=utils.js.map","/**\n * GHash from AES-GCM and its little-endian \"mirror image\" Polyval from AES-SIV.\n *\n * Implemented in terms of GHash with conversion function for keys\n * GCM GHASH from\n * [NIST SP800-38d](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf),\n * SIV from\n * [RFC 8452](https://datatracker.ietf.org/doc/html/rfc8452).\n *\n * GHASH   modulo: x^128 + x^7   + x^2   + x     + 1\n * POLYVAL modulo: x^128 + x^127 + x^126 + x^121 + 1\n *\n * @module\n */\n// prettier-ignore\nimport { abytes, aexists, aoutput, clean, copyBytes, createView, Hash, toBytes, u32, } from \"./utils.js\";\nconst BLOCK_SIZE = 16;\n// TODO: rewrite\n// temporary padding buffer\nconst ZEROS16 = /* @__PURE__ */ new Uint8Array(16);\nconst ZEROS32 = u32(ZEROS16);\nconst POLY = 0xe1; // v = 2*v % POLY\n// v = 2*v % POLY\n// NOTE: because x + x = 0 (add/sub is same), mul2(x) != x+x\n// We can multiply any number using montgomery ladder and this function (works as double, add is simple xor)\nconst mul2 = (s0, s1, s2, s3) => {\n    const hiBit = s3 & 1;\n    return {\n        s3: (s2 << 31) | (s3 >>> 1),\n        s2: (s1 << 31) | (s2 >>> 1),\n        s1: (s0 << 31) | (s1 >>> 1),\n        s0: (s0 >>> 1) ^ ((POLY << 24) & -(hiBit & 1)), // reduce % poly\n    };\n};\nconst swapLE = (n) => (((n >>> 0) & 0xff) << 24) |\n    (((n >>> 8) & 0xff) << 16) |\n    (((n >>> 16) & 0xff) << 8) |\n    ((n >>> 24) & 0xff) |\n    0;\n/**\n * `mulX_POLYVAL(ByteReverse(H))` from spec\n * @param k mutated in place\n */\nexport function _toGHASHKey(k) {\n    k.reverse();\n    const hiBit = k[15] & 1;\n    // k >>= 1\n    let carry = 0;\n    for (let i = 0; i < k.length; i++) {\n        const t = k[i];\n        k[i] = (t >>> 1) | carry;\n        carry = (t & 1) << 7;\n    }\n    k[0] ^= -hiBit & 0xe1; // if (hiBit) n ^= 0xe1000000000000000000000000000000;\n    return k;\n}\nconst estimateWindow = (bytes) => {\n    if (bytes > 64 * 1024)\n        return 8;\n    if (bytes > 1024)\n        return 4;\n    return 2;\n};\nclass GHASH {\n    // We select bits per window adaptively based on expectedLength\n    constructor(key, expectedLength) {\n        this.blockLen = BLOCK_SIZE;\n        this.outputLen = BLOCK_SIZE;\n        this.s0 = 0;\n        this.s1 = 0;\n        this.s2 = 0;\n        this.s3 = 0;\n        this.finished = false;\n        key = toBytes(key);\n        abytes(key, 16);\n        const kView = createView(key);\n        let k0 = kView.getUint32(0, false);\n        let k1 = kView.getUint32(4, false);\n        let k2 = kView.getUint32(8, false);\n        let k3 = kView.getUint32(12, false);\n        // generate table of doubled keys (half of montgomery ladder)\n        const doubles = [];\n        for (let i = 0; i < 128; i++) {\n            doubles.push({ s0: swapLE(k0), s1: swapLE(k1), s2: swapLE(k2), s3: swapLE(k3) });\n            ({ s0: k0, s1: k1, s2: k2, s3: k3 } = mul2(k0, k1, k2, k3));\n        }\n        const W = estimateWindow(expectedLength || 1024);\n        if (![1, 2, 4, 8].includes(W))\n            throw new Error('ghash: invalid window size, expected 2, 4 or 8');\n        this.W = W;\n        const bits = 128; // always 128 bits;\n        const windows = bits / W;\n        const windowSize = (this.windowSize = 2 ** W);\n        const items = [];\n        // Create precompute table for window of W bits\n        for (let w = 0; w < windows; w++) {\n            // truth table: 00, 01, 10, 11\n            for (let byte = 0; byte < windowSize; byte++) {\n                // prettier-ignore\n                let s0 = 0, s1 = 0, s2 = 0, s3 = 0;\n                for (let j = 0; j < W; j++) {\n                    const bit = (byte >>> (W - j - 1)) & 1;\n                    if (!bit)\n                        continue;\n                    const { s0: d0, s1: d1, s2: d2, s3: d3 } = doubles[W * w + j];\n                    (s0 ^= d0), (s1 ^= d1), (s2 ^= d2), (s3 ^= d3);\n                }\n                items.push({ s0, s1, s2, s3 });\n            }\n        }\n        this.t = items;\n    }\n    _updateBlock(s0, s1, s2, s3) {\n        (s0 ^= this.s0), (s1 ^= this.s1), (s2 ^= this.s2), (s3 ^= this.s3);\n        const { W, t, windowSize } = this;\n        // prettier-ignore\n        let o0 = 0, o1 = 0, o2 = 0, o3 = 0;\n        const mask = (1 << W) - 1; // 2**W will kill performance.\n        let w = 0;\n        for (const num of [s0, s1, s2, s3]) {\n            for (let bytePos = 0; bytePos < 4; bytePos++) {\n                const byte = (num >>> (8 * bytePos)) & 0xff;\n                for (let bitPos = 8 / W - 1; bitPos >= 0; bitPos--) {\n                    const bit = (byte >>> (W * bitPos)) & mask;\n                    const { s0: e0, s1: e1, s2: e2, s3: e3 } = t[w * windowSize + bit];\n                    (o0 ^= e0), (o1 ^= e1), (o2 ^= e2), (o3 ^= e3);\n                    w += 1;\n                }\n            }\n        }\n        this.s0 = o0;\n        this.s1 = o1;\n        this.s2 = o2;\n        this.s3 = o3;\n    }\n    update(data) {\n        aexists(this);\n        data = toBytes(data);\n        abytes(data);\n        const b32 = u32(data);\n        const blocks = Math.floor(data.length / BLOCK_SIZE);\n        const left = data.length % BLOCK_SIZE;\n        for (let i = 0; i < blocks; i++) {\n            this._updateBlock(b32[i * 4 + 0], b32[i * 4 + 1], b32[i * 4 + 2], b32[i * 4 + 3]);\n        }\n        if (left) {\n            ZEROS16.set(data.subarray(blocks * BLOCK_SIZE));\n            this._updateBlock(ZEROS32[0], ZEROS32[1], ZEROS32[2], ZEROS32[3]);\n            clean(ZEROS32); // clean tmp buffer\n        }\n        return this;\n    }\n    destroy() {\n        const { t } = this;\n        // clean precompute table\n        for (const elm of t) {\n            (elm.s0 = 0), (elm.s1 = 0), (elm.s2 = 0), (elm.s3 = 0);\n        }\n    }\n    digestInto(out) {\n        aexists(this);\n        aoutput(out, this);\n        this.finished = true;\n        const { s0, s1, s2, s3 } = this;\n        const o32 = u32(out);\n        o32[0] = s0;\n        o32[1] = s1;\n        o32[2] = s2;\n        o32[3] = s3;\n        return out;\n    }\n    digest() {\n        const res = new Uint8Array(BLOCK_SIZE);\n        this.digestInto(res);\n        this.destroy();\n        return res;\n    }\n}\nclass Polyval extends GHASH {\n    constructor(key, expectedLength) {\n        key = toBytes(key);\n        abytes(key);\n        const ghKey = _toGHASHKey(copyBytes(key));\n        super(ghKey, expectedLength);\n        clean(ghKey);\n    }\n    update(data) {\n        data = toBytes(data);\n        aexists(this);\n        const b32 = u32(data);\n        const left = data.length % BLOCK_SIZE;\n        const blocks = Math.floor(data.length / BLOCK_SIZE);\n        for (let i = 0; i < blocks; i++) {\n            this._updateBlock(swapLE(b32[i * 4 + 3]), swapLE(b32[i * 4 + 2]), swapLE(b32[i * 4 + 1]), swapLE(b32[i * 4 + 0]));\n        }\n        if (left) {\n            ZEROS16.set(data.subarray(blocks * BLOCK_SIZE));\n            this._updateBlock(swapLE(ZEROS32[3]), swapLE(ZEROS32[2]), swapLE(ZEROS32[1]), swapLE(ZEROS32[0]));\n            clean(ZEROS32);\n        }\n        return this;\n    }\n    digestInto(out) {\n        aexists(this);\n        aoutput(out, this);\n        this.finished = true;\n        // tmp ugly hack\n        const { s0, s1, s2, s3 } = this;\n        const o32 = u32(out);\n        o32[0] = s0;\n        o32[1] = s1;\n        o32[2] = s2;\n        o32[3] = s3;\n        return out.reverse();\n    }\n}\nfunction wrapConstructorWithKey(hashCons) {\n    const hashC = (msg, key) => hashCons(key, msg.length).update(toBytes(msg)).digest();\n    const tmp = hashCons(new Uint8Array(16), 0);\n    hashC.outputLen = tmp.outputLen;\n    hashC.blockLen = tmp.blockLen;\n    hashC.create = (key, expectedLength) => hashCons(key, expectedLength);\n    return hashC;\n}\n/** GHash MAC for AES-GCM. */\nexport const ghash = wrapConstructorWithKey((key, expectedLength) => new GHASH(key, expectedLength));\n/** Polyval MAC for AES-SIV. */\nexport const polyval = wrapConstructorWithKey((key, expectedLength) => new Polyval(key, expectedLength));\n//# sourceMappingURL=_polyval.js.map","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\n\n// src/sm2/index.ts\nvar sm2_exports = {};\n__export(sm2_exports, {\n  EmptyArray: () => EmptyArray,\n  arrayToHex: () => arrayToHex,\n  arrayToUtf8: () => arrayToUtf8,\n  calculateSharedKey: () => calculateSharedKey,\n  comparePublicKeyHex: () => comparePublicKeyHex,\n  compressPublicKeyHex: () => compressPublicKeyHex,\n  doDecrypt: () => doDecrypt,\n  doEncrypt: () => doEncrypt,\n  doSignature: () => doSignature,\n  doVerifySignature: () => doVerifySignature,\n  generateKeyPairHex: () => generateKeyPairHex,\n  getHash: () => getHash,\n  getPoint: () => getPoint,\n  getPublicKeyFromPrivateKey: () => getPublicKeyFromPrivateKey,\n  getZ: () => getZ,\n  hexToArray: () => hexToArray,\n  initRNGPool: () => initRNGPool,\n  leftPad: () => leftPad,\n  precomputePublicKey: () => precomputePublicKey,\n  utf8ToHex: () => utf8ToHex,\n  verifyPublicKey: () => verifyPublicKey\n});\n\n// src/sm2/asn1.ts\nimport * as utils from \"@noble/curves/abstract/utils\";\n\n// src/sm2/bn.ts\nvar ZERO = BigInt(0);\nvar ONE = BigInt(1);\nvar TWO = BigInt(2);\nvar THREE = BigInt(3);\n\n// src/sm2/asn1.ts\nfunction bigintToValue(bigint) {\n  let h = bigint.toString(16);\n  if (h[0] !== \"-\") {\n    if (h.length % 2 === 1)\n      h = \"0\" + h;\n    else if (!h.match(/^[0-7]/))\n      h = \"00\" + h;\n  } else {\n    h = h.substring(1);\n    let len = h.length;\n    if (len % 2 === 1)\n      len += 1;\n    else if (!h.match(/^[0-7]/))\n      len += 2;\n    let maskString = \"\";\n    for (let i = 0; i < len; i++)\n      maskString += \"f\";\n    let mask = utils.hexToNumber(maskString);\n    let output = (mask ^ bigint) + ONE;\n    h = output.toString(16).replace(/^-/, \"\");\n  }\n  return h;\n}\nvar ASN1Object = class {\n  constructor(tlv = null, t = \"00\", l = \"00\", v = \"\") {\n    this.tlv = tlv;\n    this.t = t;\n    this.l = l;\n    this.v = v;\n  }\n  /**\n   * 获取 der 编码比特流16进制串\n   */\n  getEncodedHex() {\n    if (!this.tlv) {\n      this.v = this.getValue();\n      this.l = this.getLength();\n      this.tlv = this.t + this.l + this.v;\n    }\n    return this.tlv;\n  }\n  getLength() {\n    const n = this.v.length / 2;\n    let nHex = n.toString(16);\n    if (nHex.length % 2 === 1)\n      nHex = \"0\" + nHex;\n    if (n < 128) {\n      return nHex;\n    } else {\n      const head = 128 + nHex.length / 2;\n      return head.toString(16) + nHex;\n    }\n  }\n  getValue() {\n    return \"\";\n  }\n};\nvar DERInteger = class extends ASN1Object {\n  constructor(bigint) {\n    super();\n    this.t = \"02\";\n    if (bigint)\n      this.v = bigintToValue(bigint);\n  }\n  getValue() {\n    return this.v;\n  }\n};\nvar DEROctetString = class extends ASN1Object {\n  constructor(s) {\n    super();\n    this.s = s;\n    this.t = \"04\";\n    if (s)\n      this.v = s.toLowerCase();\n  }\n  hV = \"\";\n  getValue() {\n    return this.v;\n  }\n};\nvar DERSequence = class extends ASN1Object {\n  constructor(asn1Array) {\n    super();\n    this.asn1Array = asn1Array;\n  }\n  t = \"30\";\n  getValue() {\n    this.v = this.asn1Array.map((asn1Object) => asn1Object.getEncodedHex()).join(\"\");\n    return this.v;\n  }\n};\nfunction getLenOfL(str, start) {\n  if (+str[start + 2] < 8)\n    return 1;\n  const encoded = str.slice(start + 2, start + 6);\n  const headHex = encoded.slice(0, 2);\n  const head = parseInt(headHex, 16);\n  const nHexLength = (head - 128) * 2;\n  return nHexLength;\n}\nfunction getL(str, start) {\n  const len = getLenOfL(str, start);\n  const l = str.substring(start + 2, start + 2 + len * 2);\n  if (!l)\n    return -1;\n  const bigint = +l[0] < 8 ? utils.hexToNumber(l) : utils.hexToNumber(l.substring(2));\n  return +bigint.toString();\n}\nfunction getStartOfV(str, start) {\n  const len = getLenOfL(str, start);\n  return start + (len + 1) * 2;\n}\nfunction encodeDer(r, s) {\n  const derR = new DERInteger(r);\n  const derS = new DERInteger(s);\n  const derSeq = new DERSequence([derR, derS]);\n  return derSeq.getEncodedHex();\n}\nfunction encodeEnc(x2, y, hash, cipher) {\n  const derX = new DERInteger(x2);\n  const derY = new DERInteger(y);\n  const derHash = new DEROctetString(hash);\n  const derCipher = new DEROctetString(cipher);\n  const derSeq = new DERSequence([derX, derY, derHash, derCipher]);\n  return derSeq.getEncodedHex();\n}\nfunction decodeDer(input) {\n  const start = getStartOfV(input, 0);\n  const vIndexR = getStartOfV(input, start);\n  const lR = getL(input, start);\n  const vR = input.substring(vIndexR, vIndexR + lR * 2);\n  const nextStart = vIndexR + vR.length;\n  const vIndexS = getStartOfV(input, nextStart);\n  const lS = getL(input, nextStart);\n  const vS = input.substring(vIndexS, vIndexS + lS * 2);\n  const r = utils.hexToNumber(vR);\n  const s = utils.hexToNumber(vS);\n  return { r, s };\n}\nfunction decodeEnc(input) {\n  function extractSequence(input2, start2) {\n    const vIndex = getStartOfV(input2, start2);\n    const length = getL(input2, start2);\n    const value = input2.substring(vIndex, vIndex + length * 2);\n    const nextStart = vIndex + value.length;\n    return { value, nextStart };\n  }\n  const start = getStartOfV(input, 0);\n  const { value: vR, nextStart: startS } = extractSequence(input, start);\n  const { value: vS, nextStart: startHash } = extractSequence(input, startS);\n  const { value: hash, nextStart: startCipher } = extractSequence(input, startHash);\n  const { value: cipher } = extractSequence(input, startCipher);\n  const x2 = utils.hexToNumber(vR);\n  const y = utils.hexToNumber(vS);\n  return { x: x2, y, hash, cipher };\n}\n\n// src/sm2/utils.ts\nimport * as utils2 from \"@noble/curves/abstract/utils\";\n\n// src/sm2/ec.ts\nimport { weierstrass } from \"@noble/curves/abstract/weierstrass\";\nimport { Field } from \"@noble/curves/abstract/modular\";\n\n// src/sm2/rng.ts\nvar DEFAULT_PRNG_POOL_SIZE = 16384;\nvar prngPool = new Uint8Array(0);\nvar _syncCrypto;\nasync function initRNGPool() {\n  if (\"crypto\" in globalThis) {\n    _syncCrypto = globalThis.crypto;\n    return;\n  }\n  if (prngPool.length > DEFAULT_PRNG_POOL_SIZE / 2)\n    return;\n  if (\"wx\" in globalThis && \"getRandomValues\" in globalThis.wx) {\n    prngPool = await new Promise((r) => {\n      wx.getRandomValues({\n        length: DEFAULT_PRNG_POOL_SIZE,\n        success(res) {\n          r(new Uint8Array(res.randomValues));\n        }\n      });\n    });\n  } else {\n    try {\n      if (globalThis.crypto) {\n        _syncCrypto = globalThis.crypto;\n      } else {\n        const crypto = await import(\n          /* webpackIgnore: true */\n          \"crypto\"\n        );\n        _syncCrypto = crypto.webcrypto;\n      }\n      const array = new Uint8Array(DEFAULT_PRNG_POOL_SIZE);\n      _syncCrypto.getRandomValues(array);\n      prngPool = array;\n    } catch (error) {\n      throw new Error(\"no available csprng, abort.\");\n    }\n  }\n}\ninitRNGPool();\nfunction consumePool(length) {\n  if (prngPool.length > length) {\n    const prng = prngPool.slice(0, length);\n    prngPool = prngPool.slice(length);\n    initRNGPool();\n    return prng;\n  } else {\n    throw new Error(\"random number pool is not ready or insufficient, prevent getting too long random values or too often.\");\n  }\n}\nfunction randomBytes(length = 0) {\n  const array = new Uint8Array(length);\n  if (_syncCrypto) {\n    return _syncCrypto.getRandomValues(array);\n  } else {\n    const result = consumePool(length);\n    return result;\n  }\n}\n\n// src/sm3/utils.ts\nvar u8a = (a) => a instanceof Uint8Array;\nvar createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\nvar isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;\nif (!isLE)\n  throw new Error(\"Non little-endian hardware is not supported\");\nvar hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, \"0\"));\nfunction bytesToHex(bytes) {\n  if (!u8a(bytes))\n    throw new Error(\"Uint8Array expected\");\n  let hex = \"\";\n  for (let i = 0; i < bytes.length; i++) {\n    hex += hexes[bytes[i]];\n  }\n  return hex;\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));\n}\nfunction toBytes(data) {\n  if (typeof data === \"string\")\n    data = utf8ToBytes(data);\n  if (!u8a(data))\n    throw new Error(`expected Uint8Array, got ${typeof data}`);\n  return data;\n}\nvar Hash = class {\n  // Safe version that clones internal state\n  clone() {\n    return this._cloneInto();\n  }\n};\nfunction wrapConstructor(hashCons) {\n  const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n  const tmp2 = hashCons();\n  hashC.outputLen = tmp2.outputLen;\n  hashC.blockLen = tmp2.blockLen;\n  hashC.create = () => hashCons();\n  return hashC;\n}\n\n// src/sm2/sm3.ts\nvar BoolA = (A, B, C) => A & B | A & C | B & C;\nvar BoolB = (A, B, C) => A ^ B ^ C;\nvar BoolC = (A, B, C) => A & B | ~A & C;\nfunction setBigUint64(view, byteOffset, value, isLE2) {\n  if (typeof view.setBigUint64 === \"function\")\n    return view.setBigUint64(byteOffset, value, isLE2);\n  const _32n = BigInt(32);\n  const _u32_max = BigInt(4294967295);\n  const wh = Number(value >> _32n & _u32_max);\n  const wl = Number(value & _u32_max);\n  const h = isLE2 ? 4 : 0;\n  const l = isLE2 ? 0 : 4;\n  view.setUint32(byteOffset + h, wh, isLE2);\n  view.setUint32(byteOffset + l, wl, isLE2);\n}\nfunction rotl(x2, n) {\n  const s = n & 31;\n  return x2 << s | x2 >>> 32 - s;\n}\nfunction P0(X) {\n  return X ^ rotl(X, 9) ^ rotl(X, 17);\n}\nfunction P1(X) {\n  return X ^ rotl(X, 15) ^ rotl(X, 23);\n}\nvar SHA2 = class extends Hash {\n  constructor(blockLen, outputLen, padOffset, isLE2) {\n    super();\n    this.blockLen = blockLen;\n    this.outputLen = outputLen;\n    this.padOffset = padOffset;\n    this.isLE = isLE2;\n    this.buffer = new Uint8Array(blockLen);\n    this.view = createView(this.buffer);\n  }\n  // For partial updates less than block size\n  buffer;\n  view;\n  finished = false;\n  length = 0;\n  pos = 0;\n  destroyed = false;\n  update(data) {\n    const { view, buffer, blockLen } = this;\n    data = 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      if (take === blockLen) {\n        const dataView = 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    this.finished = true;\n    const { buffer, view, blockLen, isLE: isLE2 } = this;\n    let { pos } = this;\n    buffer[pos++] = 128;\n    this.buffer.subarray(pos).fill(0);\n    if (this.padOffset > blockLen - pos) {\n      this.process(view, 0);\n      pos = 0;\n    }\n    for (let i = pos; i < blockLen; i++)\n      buffer[i] = 0;\n    setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE2);\n    this.process(view, 0);\n    const oview = createView(out);\n    const len = this.outputLen;\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], isLE2);\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 ||= 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};\nvar IV = new Uint32Array([1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214]);\nvar SM3_W = new Uint32Array(68);\nvar SM3_M = new Uint32Array(64);\nvar T1 = 2043430169;\nvar T2 = 2055708042;\nvar SM3 = class extends SHA2 {\n  // We cannot use array here since array allows indexing by variable\n  // which means optimizer/compiler cannot use registers.\n  A = IV[0] | 0;\n  B = IV[1] | 0;\n  C = IV[2] | 0;\n  D = IV[3] | 0;\n  E = IV[4] | 0;\n  F = IV[5] | 0;\n  G = IV[6] | 0;\n  H = IV[7] | 0;\n  constructor() {\n    super(64, 32, 8, false);\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    for (let i = 0; i < 16; i++, offset += 4)\n      SM3_W[i] = view.getUint32(offset, false);\n    for (let i = 16; i < 68; i++) {\n      SM3_W[i] = P1(SM3_W[i - 16] ^ SM3_W[i - 9] ^ rotl(SM3_W[i - 3], 15)) ^ rotl(SM3_W[i - 13], 7) ^ SM3_W[i - 6];\n    }\n    for (let i = 0; i < 64; i++) {\n      SM3_M[i] = SM3_W[i] ^ SM3_W[i + 4];\n    }\n    let { A, B, C, D, E, F, G, H } = this;\n    for (let j = 0; j < 64; j++) {\n      let small = j >= 0 && j <= 15;\n      let T = small ? T1 : T2;\n      let SS1 = rotl(rotl(A, 12) + E + rotl(T, j), 7);\n      let SS2 = SS1 ^ rotl(A, 12);\n      let TT1 = (small ? BoolB(A, B, C) : BoolA(A, B, C)) + D + SS2 + SM3_M[j] | 0;\n      let TT2 = (small ? BoolB(E, F, G) : BoolC(E, F, G)) + H + SS1 + SM3_W[j] | 0;\n      D = C;\n      C = rotl(B, 9);\n      B = A;\n      A = TT1;\n      H = G;\n      G = rotl(F, 19);\n      F = E;\n      E = P0(TT2);\n    }\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    SM3_W.fill(0);\n  }\n  destroy() {\n    this.set(0, 0, 0, 0, 0, 0, 0, 0);\n    this.buffer.fill(0);\n  }\n};\nvar sm3 = wrapConstructor(() => new SM3());\n\n// src/sm2/hmac.ts\nvar HMAC = class extends Hash {\n  oHash;\n  iHash;\n  blockLen;\n  outputLen;\n  finished = false;\n  destroyed = false;\n  constructor(hash, _key) {\n    super();\n    const key = toBytes(_key);\n    this.iHash = hash.create();\n    if (typeof this.iHash.update !== \"function\")\n      throw new Error(\"Expected instance of class which extends utils.Hash\");\n    this.blockLen = this.iHash.blockLen;\n    this.outputLen = this.iHash.outputLen;\n    const blockLen = this.blockLen;\n    const pad = new Uint8Array(blockLen);\n    pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n    for (let i = 0; i < pad.length; i++)\n      pad[i] ^= 54;\n    this.iHash.update(pad);\n    this.oHash = hash.create();\n    for (let i = 0; i < pad.length; i++)\n      pad[i] ^= 54 ^ 92;\n    this.oHash.update(pad);\n    pad.fill(0);\n  }\n  update(buf) {\n    this.iHash.update(buf);\n    return this;\n  }\n  digestInto(out) {\n    this.finished = true;\n    this.iHash.digestInto(out);\n    this.oHash.update(out);\n    this.oHash.digestInto(out);\n    this.destroy();\n  }\n  digest() {\n    const out = new Uint8Array(this.oHash.outputLen);\n    this.digestInto(out);\n    return out;\n  }\n  _cloneInto(to) {\n    to ||= Object.create(Object.getPrototypeOf(this), {});\n    const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n    to = to;\n    to.finished = finished;\n    to.destroyed = destroyed;\n    to.blockLen = blockLen;\n    to.outputLen = outputLen;\n    to.oHash = oHash._cloneInto(to.oHash);\n    to.iHash = iHash._cloneInto(to.iHash);\n    return to;\n  }\n  destroy() {\n    this.destroyed = true;\n    this.oHash.destroy();\n    this.iHash.destroy();\n  }\n};\nvar hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n\n// src/sm2/ec.ts\nimport { concatBytes } from \"@noble/curves/abstract/utils\";\nvar sm2Fp = Field(BigInt(\"115792089210356248756420345214020892766250353991924191454421193933289684991999\"));\nvar sm2Curve = weierstrass({\n  // sm2: short weierstrass.\n  a: BigInt(\"115792089210356248756420345214020892766250353991924191454421193933289684991996\"),\n  b: BigInt(\"18505919022281880113072981827955639221458448578012075254857346196103069175443\"),\n  Fp: sm2Fp,\n  h: ONE,\n  n: BigInt(\"115792089210356248756420345214020892766061623724957744567843809356293439045923\"),\n  Gx: BigInt(\"22963146547237050559479531362550074578802567295341616970375194840604139615431\"),\n  Gy: BigInt(\"85132369209828568825618990617112496413088388631904505083283536607588877201568\"),\n  hash: sm3,\n  hmac: (key, ...msgs) => hmac(sm3, key, concatBytes(...msgs)),\n  randomBytes\n});\nvar field = Field(BigInt(sm2Curve.CURVE.n));\n\n// src/sm2/utils.ts\nimport { mod } from \"@noble/curves/abstract/modular\";\nfunction generateKeyPairHex(str) {\n  const privateKey = str ? utils2.numberToBytesBE(mod(BigInt(str), ONE) + ONE, 32) : sm2Curve.utils.randomPrivateKey();\n  const publicKey = sm2Curve.getPublicKey(privateKey, false);\n  const privPad = leftPad(utils2.bytesToHex(privateKey), 64);\n  const pubPad = leftPad(utils2.bytesToHex(publicKey), 64);\n  return { privateKey: privPad, publicKey: pubPad };\n}\nfunction compressPublicKeyHex(s) {\n  if (s.length !== 130)\n    throw new Error(\"Invalid public key to compress\");\n  const len = (s.length - 2) / 2;\n  const xHex = s.substring(2, 2 + len);\n  const y = utils2.hexToNumber(s.substring(len + 2, len + len + 2));\n  let prefix = \"03\";\n  if (mod(y, TWO) === ZERO)\n    prefix = \"02\";\n  return prefix + xHex;\n}\nfunction utf8ToHex(input) {\n  const bytes = utils2.utf8ToBytes(input);\n  return utils2.bytesToHex(bytes);\n}\nfunction leftPad(input, num) {\n  if (input.length >= num)\n    return input;\n  return new Array(num - input.length + 1).join(\"0\") + input;\n}\nfunction arrayToHex(arr) {\n  return arr.map((item) => {\n    const hex = item.toString(16);\n    return hex.length === 1 ? \"0\" + hex : hex;\n  }).join(\"\");\n}\nfunction arrayToUtf8(arr) {\n  const str = [];\n  for (let i = 0, len = arr.length; i < len; i++) {\n    if (arr[i] >= 240 && arr[i] <= 247) {\n      str.push(String.fromCodePoint(((arr[i] & 7) << 18) + ((arr[i + 1] & 63) << 12) + ((arr[i + 2] & 63) << 6) + (arr[i + 3] & 63)));\n      i += 3;\n    } else if (arr[i] >= 224 && arr[i] <= 239) {\n      str.push(String.fromCodePoint(((arr[i] & 15) << 12) + ((arr[i + 1] & 63) << 6) + (arr[i + 2] & 63)));\n      i += 2;\n    } else if (arr[i] >= 192 && arr[i] <= 223) {\n      str.push(String.fromCodePoint(((arr[i] & 31) << 6) + (arr[i + 1] & 63)));\n      i++;\n    } else {\n      str.push(String.fromCodePoint(arr[i]));\n    }\n  }\n  return str.join(\"\");\n}\nfunction hexToArray(hexStr) {\n  let hexStrLength = hexStr.length;\n  if (hexStrLength % 2 !== 0) {\n    hexStr = leftPad(hexStr, hexStrLength + 1);\n  }\n  hexStrLength = hexStr.length;\n  const wordLength = hexStrLength / 2;\n  const words = new Uint8Array(wordLength);\n  for (let i = 0; i < wordLength; i++) {\n    words[i] = parseInt(hexStr.substring(i * 2, i * 2 + 2), 16);\n  }\n  return words;\n}\nfunction verifyPublicKey(publicKey) {\n  const point = sm2Curve.ProjectivePoint.fromHex(publicKey);\n  if (!point)\n    return false;\n  try {\n    point.assertValidity();\n    return true;\n  } catch (error) {\n    return false;\n  }\n}\nfunction comparePublicKeyHex(publicKey1, publicKey2) {\n  const point1 = sm2Curve.ProjectivePoint.fromHex(publicKey1);\n  if (!point1)\n    return false;\n  const point2 = sm2Curve.ProjectivePoint.fromHex(publicKey2);\n  if (!point2)\n    return false;\n  return point1.equals(point2);\n}\n\n// src/sm2/index.ts\nimport * as utils4 from \"@noble/curves/abstract/utils\";\n\n// src/sm2/kx.ts\nimport * as utils3 from \"@noble/curves/abstract/utils\";\nvar wPow2 = utils3.hexToNumber(\"80000000000000000000000000000000\");\nvar wPow2Sub1 = utils3.hexToNumber(\"7fffffffffffffffffffffffffffffff\");\nfunction hkdf(z, keylen) {\n  let msg = new Uint8Array(keylen);\n  let ct = 1;\n  let offset = 0;\n  let t = EmptyArray;\n  const ctShift = new Uint8Array(4);\n  const nextT = () => {\n    ctShift[0] = ct >> 24 & 255;\n    ctShift[1] = ct >> 16 & 255;\n    ctShift[2] = ct >> 8 & 255;\n    ctShift[3] = ct & 255;\n    t = sm3(utils3.concatBytes(z, ctShift));\n    ct++;\n    offset = 0;\n  };\n  nextT();\n  for (let i = 0, len = msg.length; i < len; i++) {\n    if (offset === t.length)\n      nextT();\n    msg[i] = t[offset++] & 255;\n  }\n  return msg;\n}\nfunction calculateSharedKey(keypairA, ephemeralKeypairA, publicKeyB, ephemeralPublicKeyB, sharedKeyLength, isRecipient = false, idA = \"1234567812345678\", idB = \"1234567812345678\") {\n  const RA = sm2Curve.ProjectivePoint.fromHex(ephemeralKeypairA.publicKey);\n  const RB = sm2Curve.ProjectivePoint.fromHex(ephemeralPublicKeyB);\n  const PB = sm2Curve.ProjectivePoint.fromHex(publicKeyB);\n  let ZA = getZ(keypairA.publicKey, idA);\n  let ZB = getZ(publicKeyB, idB);\n  if (isRecipient) {\n    [ZA, ZB] = [ZB, ZA];\n  }\n  const rA = utils3.hexToNumber(ephemeralKeypairA.privateKey);\n  const dA = utils3.hexToNumber(keypairA.privateKey);\n  const x1 = RA.x;\n  const x1_ = wPow2 + (x1 & wPow2Sub1);\n  const tA = field.add(dA, field.mulN(x1_, rA));\n  const x2 = RB.x;\n  const x2_ = field.add(wPow2, x2 & wPow2Sub1);\n  const U = RB.multiply(x2_).add(PB).multiply(tA);\n  const xU = hexToArray(leftPad(utils3.numberToHexUnpadded(U.x), 64));\n  const yU = hexToArray(leftPad(utils3.numberToHexUnpadded(U.y), 64));\n  const KA = hkdf(utils3.concatBytes(xU, yU, ZA, ZB), sharedKeyLength);\n  return KA;\n}\n\n// src/sm2/index.ts\nvar C1C2C3 = 0;\nvar EmptyArray = new Uint8Array();\nfunction doEncrypt(msg, publicKey, cipherMode = 1, options) {\n  const msgArr = typeof msg === \"string\" ? hexToArray(utf8ToHex(msg)) : Uint8Array.from(msg);\n  const publicKeyPoint = typeof publicKey === \"string\" ? sm2Curve.ProjectivePoint.fromHex(publicKey) : publicKey;\n  const keypair = generateKeyPairHex();\n  const k = utils4.hexToNumber(keypair.privateKey);\n  let c1 = keypair.publicKey;\n  if (c1.length > 128)\n    c1 = c1.substring(c1.length - 128);\n  const p = publicKeyPoint.multiply(k);\n  const x2 = hexToArray(leftPad(utils4.numberToHexUnpadded(p.x), 64));\n  const y2 = hexToArray(leftPad(utils4.numberToHexUnpadded(p.y), 64));\n  const c3 = bytesToHex(sm3(utils4.concatBytes(x2, msgArr, y2)));\n  xorCipherStream(x2, y2, msgArr);\n  const c2 = bytesToHex(msgArr);\n  if (options?.asn1) {\n    const point = sm2Curve.ProjectivePoint.fromHex(keypair.publicKey);\n    const encode = cipherMode === C1C2C3 ? encodeEnc(point.x, point.y, c2, c3) : encodeEnc(point.x, point.y, c3, c2);\n    return encode;\n  }\n  return cipherMode === C1C2C3 ? c1 + c2 + c3 : c1 + c3 + c2;\n}\nfunction xorCipherStream(x2, y2, msg) {\n  let ct = 1;\n  let offset = 0;\n  let t = EmptyArray;\n  const ctShift = new Uint8Array(4);\n  const nextT = () => {\n    ctShift[0] = ct >> 24 & 255;\n    ctShift[1] = ct >> 16 & 255;\n    ctShift[2] = ct >> 8 & 255;\n    ctShift[3] = ct & 255;\n    t = sm3(utils4.concatBytes(x2, y2, ctShift));\n    ct++;\n    offset = 0;\n  };\n  nextT();\n  for (let i = 0, len = msg.length; i < len; i++) {\n    if (offset === t.length)\n      nextT();\n    msg[i] ^= t[offset++] & 255;\n  }\n}\nfunction doDecrypt(encryptData, privateKey, cipherMode = 1, {\n  output = \"string\",\n  asn1 = false\n} = {}) {\n  const privateKeyInteger = utils4.hexToNumber(privateKey);\n  let c1;\n  let c2;\n  let c3;\n  if (asn1) {\n    const { x: x3, y, cipher, hash } = decodeEnc(encryptData);\n    c1 = sm2Curve.ProjectivePoint.fromAffine({ x: x3, y });\n    c3 = hash;\n    c2 = cipher;\n    if (cipherMode === C1C2C3) {\n      [c2, c3] = [c3, c2];\n    }\n  } else {\n    c1 = sm2Curve.ProjectivePoint.fromHex(\"04\" + encryptData.substring(0, 128));\n    c3 = encryptData.substring(128, 128 + 64);\n    c2 = encryptData.substring(128 + 64);\n    if (cipherMode === C1C2C3) {\n      c3 = encryptData.substring(encryptData.length - 64);\n      c2 = encryptData.substring(128, encryptData.length - 64);\n    }\n  }\n  const msg = hexToArray(c2);\n  const p = c1.multiply(privateKeyInteger);\n  const x2 = hexToArray(leftPad(utils4.numberToHexUnpadded(p.x), 64));\n  const y2 = hexToArray(leftPad(utils4.numberToHexUnpadded(p.y), 64));\n  xorCipherStream(x2, y2, msg);\n  const checkC3 = arrayToHex(Array.from(sm3(utils4.concatBytes(x2, msg, y2))));\n  if (checkC3 === c3.toLowerCase()) {\n    return output === \"array\" ? msg : arrayToUtf8(msg);\n  } else {\n    return output === \"array\" ? [] : \"\";\n  }\n}\nfunction doSignature(msg, privateKey, options = {}) {\n  let {\n    pointPool,\n    der,\n    hash,\n    publicKey,\n    userId\n  } = options;\n  let hashHex = typeof msg === \"string\" ? utf8ToHex(msg) : arrayToHex(Array.from(msg));\n  if (hash) {\n    publicKey = publicKey || getPublicKeyFromPrivateKey(privateKey);\n    hashHex = getHash(hashHex, publicKey, userId);\n  }\n  const dA = utils4.hexToNumber(privateKey);\n  const e = utils4.hexToNumber(hashHex);\n  let k = null;\n  let r = null;\n  let s = null;\n  do {\n    do {\n      let point;\n      if (pointPool && pointPool.length) {\n        point = pointPool.pop();\n      } else {\n        point = getPoint();\n      }\n      k = point.k;\n      r = field.add(e, point.x1);\n    } while (r === ZERO || r + k === sm2Curve.CURVE.n);\n    s = field.mul(field.inv(field.addN(dA, ONE)), field.subN(k, field.mulN(r, dA)));\n  } while (s === ZERO);\n  if (der)\n    return encodeDer(r, s);\n  return leftPad(utils4.numberToHexUnpadded(r), 64) + leftPad(utils4.numberToHexUnpadded(s), 64);\n}\nfunction doVerifySignature(msg, signHex, publicKey, options = {}) {\n  let hashHex;\n  const {\n    hash,\n    der,\n    userId\n  } = options;\n  const publicKeyHex = typeof publicKey === \"string\" ? publicKey : publicKey.toHex(false);\n  if (hash) {\n    hashHex = getHash(typeof msg === \"string\" ? utf8ToHex(msg) : msg, publicKeyHex, userId);\n  } else {\n    hashHex = typeof msg === \"string\" ? utf8ToHex(msg) : arrayToHex(Array.from(msg));\n  }\n  let r;\n  let s;\n  if (der) {\n    const decodeDerObj = decodeDer(signHex);\n    r = decodeDerObj.r;\n    s = decodeDerObj.s;\n  } else {\n    r = utils4.hexToNumber(signHex.substring(0, 64));\n    s = utils4.hexToNumber(signHex.substring(64));\n  }\n  const PA = typeof publicKey === \"string\" ? sm2Curve.ProjectivePoint.fromHex(publicKey) : publicKey;\n  const e = utils4.hexToNumber(hashHex);\n  const t = field.add(r, s);\n  if (t === ZERO)\n    return false;\n  const x1y1 = sm2Curve.ProjectivePoint.BASE.multiply(s).add(PA.multiply(t));\n  const R = field.add(e, x1y1.x);\n  return r === R;\n}\nfunction getZ(publicKey, userId = \"1234567812345678\") {\n  userId = utf8ToHex(userId);\n  const a = leftPad(utils4.numberToHexUnpadded(sm2Curve.CURVE.a), 64);\n  const b = leftPad(utils4.numberToHexUnpadded(sm2Curve.CURVE.b), 64);\n  const gx = leftPad(utils4.numberToHexUnpadded(sm2Curve.ProjectivePoint.BASE.x), 64);\n  const gy = leftPad(utils4.numberToHexUnpadded(sm2Curve.ProjectivePoint.BASE.y), 64);\n  let px;\n  let py;\n  if (publicKey.length === 128) {\n    px = publicKey.substring(0, 64);\n    py = publicKey.substring(64, 128);\n  } else {\n    const point = sm2Curve.ProjectivePoint.fromHex(publicKey);\n    px = leftPad(utils4.numberToHexUnpadded(point.x), 64);\n    py = leftPad(utils4.numberToHexUnpadded(point.y), 64);\n  }\n  const data = hexToArray(userId + a + b + gx + gy + px + py);\n  const entl = userId.length * 4;\n  const z = sm3(utils4.concatBytes(new Uint8Array([entl >> 8 & 255, entl & 255]), data));\n  return z;\n}\nfunction getHash(hashHex, publicKey, userId = \"1234567812345678\") {\n  const z = getZ(publicKey, userId);\n  return bytesToHex(sm3(utils4.concatBytes(z, typeof hashHex === \"string\" ? hexToArray(hashHex) : hashHex)));\n}\nfunction precomputePublicKey(publicKey, windowSize) {\n  const point = sm2Curve.ProjectivePoint.fromHex(publicKey);\n  return sm2Curve.utils.precompute(windowSize, point);\n}\nfunction getPublicKeyFromPrivateKey(privateKey) {\n  const pubKey = sm2Curve.getPublicKey(privateKey, false);\n  const pubPad = leftPad(utils4.bytesToHex(pubKey), 64);\n  return pubPad;\n}\nfunction getPoint() {\n  const keypair = generateKeyPairHex();\n  const PA = sm2Curve.ProjectivePoint.fromHex(keypair.publicKey);\n  const k = utils4.hexToNumber(keypair.privateKey);\n  return {\n    ...keypair,\n    k,\n    x1: PA.x\n  };\n}\n\n// src/sm3/index.ts\nfunction utf8ToArray(str) {\n  const arr = [];\n  for (let i = 0, len = str.length; i < len; i++) {\n    const point = str.codePointAt(i);\n    if (point <= 127) {\n      arr.push(point);\n    } else if (point <= 2047) {\n      arr.push(192 | point >>> 6);\n      arr.push(128 | point & 63);\n    } else if (point <= 55295 || point >= 57344 && point <= 65535) {\n      arr.push(224 | point >>> 12);\n      arr.push(128 | point >>> 6 & 63);\n      arr.push(128 | point & 63);\n    } else if (point >= 65536 && point <= 1114111) {\n      i++;\n      arr.push(240 | point >>> 18 & 28);\n      arr.push(128 | point >>> 12 & 63);\n      arr.push(128 | point >>> 6 & 63);\n      arr.push(128 | point & 63);\n    } else {\n      arr.push(point);\n      throw new Error(\"input is not supported\");\n    }\n  }\n  return new Uint8Array(arr);\n}\nfunction sm32(input, options) {\n  input = typeof input === \"string\" ? utf8ToArray(input) : input;\n  if (options) {\n    const mode = options.mode || \"hmac\";\n    if (mode !== \"hmac\")\n      throw new Error(\"invalid mode\");\n    let key = options.key;\n    if (!key)\n      throw new Error(\"invalid key\");\n    key = typeof key === \"string\" ? hexToArray(key) : key;\n    return bytesToHex(hmac(sm3, key, input));\n  }\n  return bytesToHex(sm3(input));\n}\n\n// src/sm4/index.ts\nvar sm4_exports = {};\n__export(sm4_exports, {\n  decrypt: () => decrypt,\n  encrypt: () => encrypt,\n  sm4: () => sm4\n});\nimport { ghash } from \"@noble/ciphers/_polyval\";\nimport { createView as createView2, setBigUint64 as setBigUint642 } from \"@noble/ciphers/utils\";\nvar DECRYPT = 0;\nvar ROUND = 32;\nvar BLOCK = 16;\nvar Sbox = Uint8Array.from([\n  214,\n  144,\n  233,\n  254,\n  204,\n  225,\n  61,\n  183,\n  22,\n  182,\n  20,\n  194,\n  40,\n  251,\n  44,\n  5,\n  43,\n  103,\n  154,\n  118,\n  42,\n  190,\n  4,\n  195,\n  170,\n  68,\n  19,\n  38,\n  73,\n  134,\n  6,\n  153,\n  156,\n  66,\n  80,\n  244,\n  145,\n  239,\n  152,\n  122,\n  51,\n  84,\n  11,\n  67,\n  237,\n  207,\n  172,\n  98,\n  228,\n  179,\n  28,\n  169,\n  201,\n  8,\n  232,\n  149,\n  128,\n  223,\n  148,\n  250,\n  117,\n  143,\n  63,\n  166,\n  71,\n  7,\n  167,\n  252,\n  243,\n  115,\n  23,\n  186,\n  131,\n  89,\n  60,\n  25,\n  230,\n  133,\n  79,\n  168,\n  104,\n  107,\n  129,\n  178,\n  113,\n  100,\n  218,\n  139,\n  248,\n  235,\n  15,\n  75,\n  112,\n  86,\n  157,\n  53,\n  30,\n  36,\n  14,\n  94,\n  99,\n  88,\n  209,\n  162,\n  37,\n  34,\n  124,\n  59,\n  1,\n  33,\n  120,\n  135,\n  212,\n  0,\n  70,\n  87,\n  159,\n  211,\n  39,\n  82,\n  76,\n  54,\n  2,\n  231,\n  160,\n  196,\n  200,\n  158,\n  234,\n  191,\n  138,\n  210,\n  64,\n  199,\n  56,\n  181,\n  163,\n  247,\n  242,\n  206,\n  249,\n  97,\n  21,\n  161,\n  224,\n  174,\n  93,\n  164,\n  155,\n  52,\n  26,\n  85,\n  173,\n  147,\n  50,\n  48,\n  245,\n  140,\n  177,\n  227,\n  29,\n  246,\n  226,\n  46,\n  130,\n  102,\n  202,\n  96,\n  192,\n  41,\n  35,\n  171,\n  13,\n  83,\n  78,\n  111,\n  213,\n  219,\n  55,\n  69,\n  222,\n  253,\n  142,\n  47,\n  3,\n  255,\n  106,\n  114,\n  109,\n  108,\n  91,\n  81,\n  141,\n  27,\n  175,\n  146,\n  187,\n  221,\n  188,\n  127,\n  17,\n  217,\n  92,\n  65,\n  31,\n  16,\n  90,\n  216,\n  10,\n  193,\n  49,\n  136,\n  165,\n  205,\n  123,\n  189,\n  45,\n  116,\n  208,\n  18,\n  184,\n  229,\n  180,\n  176,\n  137,\n  105,\n  151,\n  74,\n  12,\n  150,\n  119,\n  126,\n  101,\n  185,\n  241,\n  9,\n  197,\n  110,\n  198,\n  132,\n  24,\n  240,\n  125,\n  236,\n  58,\n  220,\n  77,\n  32,\n  121,\n  238,\n  95,\n  62,\n  215,\n  203,\n  57,\n  72\n]);\nvar CK = new Uint32Array([\n  462357,\n  472066609,\n  943670861,\n  1415275113,\n  1886879365,\n  2358483617,\n  2830087869,\n  3301692121,\n  3773296373,\n  4228057617,\n  404694573,\n  876298825,\n  1347903077,\n  1819507329,\n  2291111581,\n  2762715833,\n  3234320085,\n  3705924337,\n  4177462797,\n  337322537,\n  808926789,\n  1280531041,\n  1752135293,\n  2223739545,\n  2695343797,\n  3166948049,\n  3638552301,\n  4110090761,\n  269950501,\n  741554753,\n  1213159005,\n  1684763257\n]);\nfunction byteSub(a) {\n  return (Sbox[a >>> 24 & 255] & 255) << 24 | (Sbox[a >>> 16 & 255] & 255) << 16 | (Sbox[a >>> 8 & 255] & 255) << 8 | Sbox[a & 255] & 255;\n}\nvar x = new Uint32Array(4);\nvar tmp = new Uint32Array(4);\nfunction sms4Crypt(input, output, roundKey) {\n  let x0 = 0, x1 = 0, x2 = 0, x3 = 0, tmp0 = 0, tmp1 = 0, tmp2 = 0, tmp3 = 0;\n  tmp0 = input[0] & 255;\n  tmp1 = input[1] & 255;\n  tmp2 = input[2] & 255;\n  tmp3 = input[3] & 255;\n  x0 = tmp0 << 24 | tmp1 << 16 | tmp2 << 8 | tmp3;\n  tmp0 = input[4] & 255;\n  tmp1 = input[5] & 255;\n  tmp2 = input[6] & 255;\n  tmp3 = input[7] & 255;\n  x1 = tmp0 << 24 | tmp1 << 16 | tmp2 << 8 | tmp3;\n  tmp0 = input[8] & 255;\n  tmp1 = input[9] & 255;\n  tmp2 = input[10] & 255;\n  tmp3 = input[11] & 255;\n  x2 = tmp0 << 24 | tmp1 << 16 | tmp2 << 8 | tmp3;\n  tmp0 = input[12] & 255;\n  tmp1 = input[13] & 255;\n  tmp2 = input[14] & 255;\n  tmp3 = input[15] & 255;\n  x3 = tmp0 << 24 | tmp1 << 16 | tmp2 << 8 | tmp3;\n  for (let r = 0; r < 32; r += 4) {\n    tmp0 = x1 ^ x2 ^ x3 ^ roundKey[r];\n    tmp0 = byteSub(tmp0);\n    x0 ^= tmp0 ^ (tmp0 << 2 | tmp0 >>> 30) ^ (tmp0 << 10 | tmp0 >>> 22) ^ (tmp0 << 18 | tmp0 >>> 14) ^ (tmp0 << 24 | tmp0 >>> 8);\n    tmp1 = x2 ^ x3 ^ x0 ^ roundKey[r + 1];\n    tmp1 = byteSub(tmp1);\n    x1 ^= tmp1 ^ (tmp1 << 2 | tmp1 >>> 30) ^ (tmp1 << 10 | tmp1 >>> 22) ^ (tmp1 << 18 | tmp1 >>> 14) ^ (tmp1 << 24 | tmp1 >>> 8);\n    tmp2 = x3 ^ x0 ^ x1 ^ roundKey[r + 2];\n    tmp2 = byteSub(tmp2);\n    x2 ^= tmp2 ^ (tmp2 << 2 | tmp2 >>> 30) ^ (tmp2 << 10 | tmp2 >>> 22) ^ (tmp2 << 18 | tmp2 >>> 14) ^ (tmp2 << 24 | tmp2 >>> 8);\n    tmp3 = x0 ^ x1 ^ x2 ^ roundKey[r + 3];\n    tmp3 = byteSub(tmp3);\n    x3 ^= tmp3 ^ (tmp3 << 2 | tmp3 >>> 30) ^ (tmp3 << 10 | tmp3 >>> 22) ^ (tmp3 << 18 | tmp3 >>> 14) ^ (tmp3 << 24 | tmp3 >>> 8);\n  }\n  output[0] = x3 >>> 24 & 255;\n  output[1] = x3 >>> 16 & 255;\n  output[2] = x3 >>> 8 & 255;\n  output[3] = x3 & 255;\n  output[4] = x2 >>> 24 & 255;\n  output[5] = x2 >>> 16 & 255;\n  output[6] = x2 >>> 8 & 255;\n  output[7] = x2 & 255;\n  output[8] = x1 >>> 24 & 255;\n  output[9] = x1 >>> 16 & 255;\n  output[10] = x1 >>> 8 & 255;\n  output[11] = x1 & 255;\n  output[12] = x0 >>> 24 & 255;\n  output[13] = x0 >>> 16 & 255;\n  output[14] = x0 >>> 8 & 255;\n  output[15] = x0 & 255;\n}\nfunction sms4KeyExt(key, roundKey, cryptFlag) {\n  let x0 = 0, x1 = 0, x2 = 0, x3 = 0, mid = 0;\n  x0 = (key[0] & 255) << 24 | (key[1] & 255) << 16 | (key[2] & 255) << 8 | key[3] & 255;\n  x1 = (key[4] & 255) << 24 | (key[5] & 255) << 16 | (key[6] & 255) << 8 | key[7] & 255;\n  x2 = (key[8] & 255) << 24 | (key[9] & 255) << 16 | (key[10] & 255) << 8 | key[11] & 255;\n  x3 = (key[12] & 255) << 24 | (key[13] & 255) << 16 | (key[14] & 255) << 8 | key[15] & 255;\n  x0 ^= 2746333894;\n  x1 ^= 1453994832;\n  x2 ^= 1736282519;\n  x3 ^= 2993693404;\n  for (let r = 0; r < 32; r += 4) {\n    mid = x1 ^ x2 ^ x3 ^ CK[r + 0];\n    mid = byteSub(mid);\n    x0 ^= mid ^ (mid << 13 | mid >>> 19) ^ (mid << 23 | mid >>> 9);\n    roundKey[r + 0] = x0;\n    mid = x2 ^ x3 ^ x0 ^ CK[r + 1];\n    mid = byteSub(mid);\n    x1 ^= mid ^ (mid << 13 | mid >>> 19) ^ (mid << 23 | mid >>> 9);\n    roundKey[r + 1] = x1;\n    mid = x3 ^ x0 ^ x1 ^ CK[r + 2];\n    mid = byteSub(mid);\n    x2 ^= mid ^ (mid << 13 | mid >>> 19) ^ (mid << 23 | mid >>> 9);\n    roundKey[r + 2] = x2;\n    mid = x0 ^ x1 ^ x2 ^ CK[r + 3];\n    mid = byteSub(mid);\n    x3 ^= mid ^ (mid << 13 | mid >>> 19) ^ (mid << 23 | mid >>> 9);\n    roundKey[r + 3] = x3;\n  }\n  if (cryptFlag === DECRYPT) {\n    for (let r = 0; r < 16; r++) {\n      [roundKey[r], roundKey[31 - r]] = [roundKey[31 - r], roundKey[r]];\n    }\n  }\n}\nfunction incrementCounter(counter) {\n  for (let i = counter.length - 1; i >= 0; i--) {\n    counter[i]++;\n    if (counter[i] !== 0)\n      break;\n  }\n}\nfunction sm4Gcm(inArray, key, ivArray, aadArray, cryptFlag, tagArray) {\n  const tagLength = 16;\n  function deriveKeys() {\n    const roundKey2 = new Uint32Array(ROUND);\n    sms4KeyExt(key, roundKey2, 1);\n    const authKey = new Uint8Array(16).fill(0);\n    const h2 = new Uint8Array(16);\n    sms4Crypt(authKey, h2, roundKey2);\n    let j02;\n    if (ivArray.length === 12) {\n      j02 = new Uint8Array(16);\n      j02.set(ivArray, 0);\n      j02[15] = 1;\n    } else {\n      const g = ghash.create(h2);\n      g.update(ivArray);\n      const lenIv = new Uint8Array(16);\n      const view = createView2(lenIv);\n      setBigUint642(view, 8, BigInt(ivArray.length * 8), false);\n      g.update(lenIv);\n      j02 = g.digest();\n    }\n    const counter2 = new Uint8Array(j02);\n    incrementCounter(counter2);\n    const tagMask2 = new Uint8Array(16);\n    sms4Crypt(j02, tagMask2, roundKey2);\n    return { roundKey: roundKey2, h: h2, j0: j02, counter: counter2, tagMask: tagMask2 };\n  }\n  function computeTag(h2, data) {\n    const aadLength = aadArray.length;\n    const dataLength = data.length;\n    const g = ghash.create(h2);\n    if (aadLength > 0) {\n      g.update(aadArray);\n    }\n    g.update(data);\n    const lenBlock = new Uint8Array(16);\n    const view = createView2(lenBlock);\n    setBigUint642(view, 0, BigInt(aadLength * 8), false);\n    setBigUint642(view, 8, BigInt(dataLength * 8), false);\n    g.update(lenBlock);\n    return g.digest();\n  }\n  const { roundKey, h, j0, counter, tagMask } = deriveKeys();\n  if (cryptFlag === DECRYPT && tagArray) {\n    const calculatedTag = computeTag(h, inArray);\n    for (let i = 0; i < 16; i++) {\n      calculatedTag[i] ^= tagMask[i];\n    }\n    let tagMatch = 0;\n    for (let i = 0; i < 16; i++) {\n      tagMatch |= calculatedTag[i] ^ tagArray[i];\n    }\n    if (tagMatch !== 0) {\n      throw new Error(\"authentication tag mismatch\");\n    }\n  }\n  const outArray = new Uint8Array(inArray.length);\n  let point = 0;\n  let restLen = inArray.length;\n  while (restLen >= BLOCK) {\n    const blockOut = new Uint8Array(BLOCK);\n    sms4Crypt(counter, blockOut, roundKey);\n    for (let i = 0; i < BLOCK && i < restLen; i++) {\n      outArray[point + i] = inArray[point + i] ^ blockOut[i];\n    }\n    incrementCounter(counter);\n    point += BLOCK;\n    restLen -= BLOCK;\n  }\n  if (restLen > 0) {\n    const blockOut = new Uint8Array(BLOCK);\n    sms4Crypt(counter, blockOut, roundKey);\n    for (let i = 0; i < restLen; i++) {\n      outArray[point + i] = inArray[point + i] ^ blockOut[i];\n    }\n  }\n  if (cryptFlag !== DECRYPT) {\n    const calculatedTag = computeTag(h, outArray);\n    for (let i = 0; i < 16; i++) {\n      calculatedTag[i] ^= tagMask[i];\n    }\n    return { output: outArray, tag: calculatedTag };\n  }\n  return { output: outArray };\n}\nvar blockOutput = new Uint8Array(16);\nfunction sm4(inArray, key, cryptFlag, options = {}) {\n  let {\n    padding = \"pkcs#7\",\n    mode,\n    iv = new Uint8Array(16),\n    output,\n    associatedData,\n    outputTag,\n    tag\n  } = options;\n  if (mode === \"gcm\") {\n    const keyArray = typeof key === \"string\" ? hexToArray(key) : Uint8Array.from(key);\n    const ivArray = typeof iv === \"string\" ? hexToArray(iv) : Uint8Array.from(iv);\n    const aadArray = associatedData ? typeof associatedData === \"string\" ? hexToArray(associatedData) : Uint8Array.from(associatedData) : new Uint8Array(0);\n    let inputArray;\n    if (typeof inArray === \"string\") {\n      if (cryptFlag !== DECRYPT) {\n        inputArray = utf8ToArray(inArray);\n      } else {\n        inputArray = hexToArray(inArray);\n      }\n    } else {\n      inputArray = Uint8Array.from(inArray);\n    }\n    const tagArray = tag ? typeof tag === \"string\" ? hexToArray(tag) : Uint8Array.from(tag) : void 0;\n    const result = sm4Gcm(inputArray, keyArray, ivArray, aadArray, cryptFlag, tagArray);\n    if (output === \"array\") {\n      if (outputTag && cryptFlag !== DECRYPT) {\n        return result;\n      }\n      return result.output;\n    } else {\n      if (outputTag && cryptFlag !== DECRYPT) {\n        return {\n          output: bytesToHex(result.output),\n          tag: result.tag ? bytesToHex(result.tag) : void 0\n        };\n      }\n      if (cryptFlag !== DECRYPT) {\n        return {\n          output: bytesToHex(result.output),\n          tag: result.tag ? bytesToHex(result.tag) : void 0\n        };\n      } else {\n        return arrayToUtf8(result.output);\n      }\n    }\n  }\n  if (mode === \"cbc\") {\n    if (typeof iv === \"string\")\n      iv = hexToArray(iv);\n    if (iv.length !== 128 / 8) {\n      throw new Error(\"iv is invalid\");\n    }\n  }\n  if (typeof key === \"string\")\n    key = hexToArray(key);\n  if (key.length !== 128 / 8) {\n    throw new Error(\"key is invalid\");\n  }\n  if (typeof inArray === \"string\") {\n    if (cryptFlag !== DECRYPT) {\n      inArray = utf8ToArray(inArray);\n    } else {\n      inArray = hexToArray(inArray);\n    }\n  } else {\n    inArray = Uint8Array.from(inArray);\n  }\n  if ((padding === \"pkcs#5\" || padding === \"pkcs#7\") && cryptFlag !== DECRYPT) {\n    const paddingCount = BLOCK - inArray.length % BLOCK;\n    const newArray = new Uint8Array(inArray.length + paddingCount);\n    newArray.set(inArray, 0);\n    for (let i = 0; i < paddingCount; i++)\n      newArray[inArray.length + i] = paddingCount;\n    inArray = newArray;\n  }\n  const roundKey = new Uint32Array(ROUND);\n  sms4KeyExt(key, roundKey, cryptFlag);\n  let outArray = new Uint8Array(inArray.length);\n  let lastVector = iv;\n  let restLen = inArray.length;\n  let point = 0;\n  while (restLen >= BLOCK) {\n    const input = inArray.subarray(point, point + 16);\n    if (mode === \"cbc\") {\n      for (let i = 0; i < BLOCK; i++) {\n        if (cryptFlag !== DECRYPT) {\n          input[i] ^= lastVector[i];\n        }\n      }\n    }\n    sms4Crypt(input, blockOutput, roundKey);\n    for (let i = 0; i < BLOCK; i++) {\n      if (mode === \"cbc\") {\n        if (cryptFlag === DECRYPT) {\n          blockOutput[i] ^= lastVector[i];\n        }\n      }\n      outArray[point + i] = blockOutput[i];\n    }\n    if (mode === \"cbc\") {\n      if (cryptFlag !== DECRYPT) {\n        lastVector = blockOutput;\n      } else {\n        lastVector = input;\n      }\n    }\n    restLen -= BLOCK;\n    point += BLOCK;\n  }\n  if ((padding === \"pkcs#5\" || padding === \"pkcs#7\") && cryptFlag === DECRYPT) {\n    const len = outArray.length;\n    const paddingCount = outArray[len - 1];\n    for (let i = 1; i <= paddingCount; i++) {\n      if (outArray[len - i] !== paddingCount)\n        throw new Error(\"padding is invalid\");\n    }\n    outArray = outArray.slice(0, len - paddingCount);\n  }\n  if (output !== \"array\") {\n    if (cryptFlag !== DECRYPT) {\n      return bytesToHex(outArray);\n    } else {\n      return arrayToUtf8(outArray);\n    }\n  } else {\n    return outArray;\n  }\n}\nfunction encrypt(inArray, key, options = {}) {\n  return sm4(inArray, key, 1, options);\n}\nfunction decrypt(inArray, key, options = {}) {\n  return sm4(inArray, key, 0, options);\n}\nexport {\n  sm2_exports as sm2,\n  sm32 as sm3,\n  sm4_exports as sm4\n};\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n","/**\n * @module Cipher\n */\n\nimport { sm2, sm3, sm4 } from \"sm-crypto-v2\";\n\n/**\n *  国密 sm2\n */\nexport function useSm2() {\n  return sm2;\n}\n\n/**\n * 国密 sm3 加密\n * @param {string} msg - 密码信息\n * @param {Object} [options={}]\n * @return {*}\n */\nexport function useSm3(msg, options) {\n  return sm3(msg, options); // 杂凑\n}\n\n/**\n * 国密 sm4 加密\n * @param {string} msg - 密码信息\n * @param {string} key - 秘钥\n * @param {Object} [options={}]\n * @return {Uint8Array}\n */\nexport function useSm4Encrypt(msg, key, options) {\n  return sm4.encrypt(msg, key, options);\n}\n\n/**\n * 国密 sm4 解密\n * @param {string} encryptData - 加密信息\n * @param {string} key - 秘钥\n * @param {Object} [options={}]\n * @return {Uint8Array}\n */\nexport function useSm4Decrypt(encryptData, key, options) {\n  return sm4.encrypt(encryptData, key, options);\n}\n","/**\n * @module Datetime\n */\n\nimport dayjs from \"dayjs\";\n\n/**\n * 根据格式创建 Dayjs 对象\n * @param {string|number} date - 日期字符\n * @param {string} [format=null] - 日期格式\n * @return {dayjs.Dayjs}\n */\nexport function useDayjs(date, format) {\n  if (date && /^\\d+$/.test(date) && String(date).length <= 10) {\n    date = parseInt(`${date}000`);\n  }\n  return format ? dayjs(date, format) : dayjs(date);\n}\n\n/**\n * 格式化日期\n * @param {dayjs.Dayjs|Date} date - 日期对象\n * @param {string} [format=YYYY-MM-DD HH:mm] - 日期格式\n * @return {string}\n */\nexport function useDateFormat(date, format) {\n  if (!date) {\n    return \"\";\n  }\n\n  if (!dayjs.isDayjs(date)) {\n    date = useDayjs(date);\n  }\n\n  return date.format(format || \"YYYY-MM-DD HH:mm\");\n}\n\n/**\n * 获取日期的 Unix 时间戳\n * @param {dayjs.Dayjs|Date} date - 日期对象\n * @return {number|string}\n */\nexport function useDateUnix(date) {\n  if (!date) {\n    return \"\";\n  }\n  if (!dayjs.isDayjs(date)) {\n    date = useDayjs(date);\n  }\n\n  return date.unix();\n}\n","/**\n * @module Network\n */\n\nimport axios from \"axios\";\n\n/**\n * 请求返回状态码\n * @property {string} STATUS.STATE_CODE_SUCCESS  `SUCCESS` 成功\n * @property {string} STATUS.STATE_CODE_FAIL  `FAIL` 失败\n * @property {string} STATUS.STATE_CODE_NOT_FOUND  `NOT_FOUND` 找不到资源\n * @property {string} STATUS.STATE_CODE_INFO_NOT_COMPLETE  `INCOMPLETE` 信息不完整\n * @property {string} STATUS.STATE_CODE_NOT_ALLOWED  `NOT_ALLOWED` 无权限\n */\nexport const STATUS = {\n\tSTATE_CODE_SUCCESS: \"SUCCESS\", // 成功\n\tSTATE_CODE_FAIL: \"FAIL\", // 失败\n\tSTATE_CODE_NOT_FOUND: \"NOT_FOUND\", // 找不到资源\n\tSTATE_CODE_INFO_NOT_COMPLETE: \"INCOMPLETE\", // 信息不完整\n\tSTATE_CODE_NOT_ALLOWED: \"NOT_ALLOWED\", //没有权限\n};\n\n/**\n * STATUS 适配器，内部使用\n * @param status\n * @private\n */\nexport function _configStatus(status) {\n\tObject.keys(status).forEach(key => {\n\t\tSTATUS[key] = status[key];\n\t});\n}\n\n/**\n * 通用 AJAX 请求\n * @param {Object} [fetcher] - 用于存储请求状态的对象\n * @returns {{post(*=, *=, *=): Promise, get(*=, *=): Promise}}\n */\nexport function useFetch(fetcher) {\n\tif (!fetcher) {\n\t\tfetcher = {};\n\t}\n\tfetcher.loading = true;\n\n\treturn {\n\t\t/**\n\t\t * get请求\n\t\t * @param url\n\t\t * @param {?Object} [config] - axios config\n\t\t * @returns {Promise}\n\t\t */\n\t\tget(url, config) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\taxios\n\t\t\t\t\t.get(url, config)\n\t\t\t\t\t.then(res => {\n\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t})\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tfetcher.loading = false;\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * post请求\n\t\t * @param {string} url\n\t\t * @param {?Object} [data]\n\t\t * @param {?Object} [config] - axios config\n\t\t * @returns {Promise}\n\t\t */\n\t\tpost(url, data, config) {\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\taxios\n\t\t\t\t\t.post(url, data, config)\n\t\t\t\t\t.then(res => {\n\t\t\t\t\t\tresolve(res);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => {\n\t\t\t\t\t\treject(err);\n\t\t\t\t\t})\n\t\t\t\t\t.finally(() => {\n\t\t\t\t\t\tfetcher.loading = false;\n\t\t\t\t\t});\n\t\t\t});\n\t\t},\n\t};\n}\n\n/**\n * 分页请求\n * @param {object} pagination 分页对象\n * @param {string} pagination.uri 请求地址\n * @param {object} [pagination.params] 请求参数\n * @param {number} [pagination.page] 当前页码\n * @param {string} pagination.finishedText 加载完毕文本\n * @param {boolean} pagination.loading 加载状态\n * @param {boolean} pagination.finished 加载完毕\n * @param {boolean} pagination.error 是否错误\n * @param {string} pagination.errorText 错误文本\n * @param {boolean} pagination.empty 是否无内容\n * @param {array} pagination.items 分页数据\n *\n * @param {boolean} refresh 是否刷新\n * @param {function} [process] 数据处理函数\n *\n * @return {object} pagination 分页对象\n *\n */\nexport async function usePage(pagination, refresh, process) {\n\tpagination.finishedText = pagination.finishedText || \"加载完毕\";\n\tpagination.loading = true;\n\n\tif (!pagination.uri) {\n\t\tconsole.error(\"URI is required in pagination\");\n\t\treturn pagination;\n\t}\n\n\tlet res = {};\n\ttry {\n\t\tres = await axios.get(pagination.uri, {\n\t\t\tparams: {\n\t\t\t\t...pagination.params,\n\t\t\t\tpage: refresh || !pagination.page ? 1 : pagination.page + 1,\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tconsole.error(e);\n\t\tpagination.loading = false;\n\t\tpagination.finished = false;\n\t\tpagination.error = true;\n\t\treturn pagination;\n\t}\n\n\tif (res.status !== STATUS.STATE_CODE_SUCCESS) {\n\t\tpagination.loading = false;\n\t\tpagination.error = true;\n\t\tpagination.errorText = res.result;\n\t\treturn pagination;\n\t}\n\n\tlet result;\n\n\tif (process) {\n\t\tresult = process(res);\n\t} else {\n\t\tresult = res.result;\n\t}\n\n\tlet items = result.data;\n\n\tif (!refresh && pagination.items) {\n\t\titems = pagination.items.concat(items);\n\t}\n\n\tconst currentPage = result.current_page || result.current || result.page || 1;\n\tconst lastPage = result.last_page || result.lastPage || result.pages || 0;\n\tconst totalSize = result.total_size || result.totalSize || result.total || 0;\n\n\tpagination.loading = false;\n\tpagination.error = false;\n\tpagination.page = currentPage;\n\tpagination.items = items;\n\tpagination.finished = lastPage === 0 || lastPage === currentPage;\n\tpagination.empty = totalSize === 0;\n\n\treturn pagination;\n}\n\nexport default {\n\tSTATUS,\n\tuseFetch,\n\tusePage,\n};\n","/**\n * @module Form\n */\n\nimport {\n  cloneDeep,\n  isArray,\n  isBoolean,\n  isFunction,\n  isObject,\n  isString,\n  isUndefined,\n} from \"lodash-es\";\nimport { message } from \"ant-design-vue\";\nimport { STATUS } from \"./network\";\nimport dayjs from \"dayjs\";\n\nconst {\n  STATE_CODE_FAIL,\n  STATE_CODE_INFO_NOT_COMPLETE,\n  STATE_CODE_NOT_FOUND,\n  STATE_CODE_NOT_ALLOWED,\n  STATE_CODE_SUCCESS,\n} = STATUS;\n\n/**\n * 创建一个隐藏的表单\n *\n * @param {Object} options\n * @param {string} options.url - 请求地址\n * @param {Object} options.data  - 发送的数据\n * @param {string} [options.method=post] - 请求方法\n * @param {string} [options.csrfToken=null] - CSRF Token\n * @returns {HTMLFormElement}\n */\nexport function useHiddenForm(options) {\n  const { url, csrfToken } = options;\n  let { method, data } = options;\n\n  method = method || \"post\";\n  data = data || {};\n\n  const form = document.createElement(\"form\");\n  form.action = url;\n  form.method = method;\n  form.target = \"_blank\";\n  form.style.display = \"none\";\n\n  Object.keys(data).forEach(key => {\n    const input = document.createElement(\"input\");\n    input.type = \"hidden\";\n    input.name = key;\n    input.value = data[key];\n    form.appendChild(input);\n  });\n\n  if (!csrfToken) {\n    const input = document.createElement(\"input\");\n    input.type = \"hidden\";\n    input.name = \"_token\";\n    input.value = document.querySelector('meta[name=\"csrf-token\"]')?.getAttribute(\"content\");\n    form.appendChild(input);\n  }\n\n  document.body.appendChild(form);\n\n  return form;\n}\n\n/**\n * 处理请求结果\n *\n * @param {object} res 请求结果\n * @param {string} res.status 请求结果状态\n * @param {*} res.result 请求结果信息\n * @param {Object.<string, string|function>} ops 状态的处理对象\n */\nexport function useProcessStatus(res, ops) {\n  const { status } = res;\n  const msg = res.result;\n  const predefined = {};\n  predefined.default = \"请求失败, 请检查数据并重试\";\n  predefined[STATE_CODE_FAIL] = \"系统错误，请稍候再试\";\n  predefined[STATE_CODE_NOT_FOUND] = \"请求的内容不存在\";\n  predefined[STATE_CODE_INFO_NOT_COMPLETE] = \"信息不完整\";\n  predefined[STATE_CODE_NOT_ALLOWED] = \"没有权限\";\n\n  // 有几个常用的自定义名称\n  const special = {\n    [STATE_CODE_SUCCESS]: \"success\",\n  };\n\n  const op = ops[status] || ops[special[status]] || predefined[status] || predefined.def;\n\n  if (isString(op)) {\n    if (status === STATE_CODE_SUCCESS) {\n      message.success(op);\n    } else {\n      message.error(msg || op);\n    }\n  } else if (isFunction(op)) {\n    op();\n  }\n}\n\n/**\n * 处理正确请求结果\n *\n * @param {object} res 请求结果\n * @param {string} res.status 请求结果状态\n * @param {*} res.result 请求结果信息\n * @param {string|function} success 状态的处理对象\n */\nexport function useProcessStatusSuccess(res, success) {\n  useProcessStatus(res, { success });\n}\n\n/**\n * 处理表单提交失败\n * @param {*} e\n */\nexport function useFormFail(e) {\n  if (e && e.errorFields) {\n    e.errorFields.forEach(item => {\n      message.error(item.errors.join(\" \"));\n    });\n  } else if (!(e && e.response)) {\n    message.error(\"请检查填写项\");\n  }\n}\n\n/**\n * 表单布局\n * @property {Object} formLabel.commonLabelCol `{ span: 8, xxl: 6 }`\n * @property {Object} formLabel.commonWrapperCol `{ span: 12, xxl: 14 }`\n * @property {Object} formLabel.commonWrapperOffset `{ xs: { offset: 8, span: 12 }, xxl: { offset: 6, span: 14 } }`\n * @property {Object} formLabel.commonLabelFullCol `{ span: 8, xxl: 6 }`\n * @property {Object} formLabel.commonWrapperFullCol `{ span: 16, xxl: 18 }`\n * @property {Object} formLabel.commonWrapperFullOffset `{ xs: { offset: 8, span: 16 }, xxl: { offset: 6, span: 18 } }`\n * @property {Object} formLabel.commonLabelPartCol `{ span: 4, xxl: 3 }`\n * @property {Object} formLabel.commonWrapperPartCol `{ span: 20, xxl: 21 }`\n * @property {Object} formLabel.commonWrapperPartOffset `{ xs: { offset: 4, span: 20 }, xxl: { offset: 3, span: 21 } }`\n */\nexport const formLabel = {\n  commonLabelCol: { span: 8, xxl: 6 },\n  commonWrapperCol: { span: 12, xxl: 14 },\n  commonWrapperOffset: { xs: { offset: 8, span: 12 }, xxl: { offset: 6, span: 14 } },\n  commonLabelFullCol: { span: 8, xxl: 6 },\n  commonWrapperFullCol: { span: 16, xxl: 18 },\n  commonWrapperFullOffset: { xs: { offset: 8, span: 16 }, xxl: { offset: 6, span: 18 } },\n  commonLabelPartCol: { span: 4, xxl: 3 },\n  commonWrapperPartCol: { span: 20, xxl: 21 },\n  commonWrapperPartOffset: { xs: { offset: 4, span: 20 }, xxl: { offset: 3, span: 21 } },\n};\n\n/**\n * 处理表单数据\n * @param {Object} form\n * @param {Object} [format] 需要处理的类型\n * @param {boolean|string|Function} [format.date] `true`: 转成时间戳，`string`: 为 Format 格式, 如 `\"YYYY-MM-DD\"`, `function`: 自定义处理函数, 参数为 dayjs 对象\n * @param {boolean} [format.boolean] 布尔值处理, 如果开启则 `true` 转成 1, `false` 转成 0\n * @param {string|Function} [format.attachment] `string`: 附件字段名, `function`: 自定义处理函数, 参数为附件对象\n * @return {Object}\n */\nexport function useFormFormat(form, format) {\n  //必须先 Copy form, 否则会改变 vm model 里的引用值而导致出错\n  const newForm = cloneDeep(form);\n  format = format || {};\n  const formatter = obj => {\n    for (let key in obj) {\n      //日期处理\n\n      let date;\n      if (dayjs.isDayjs(obj[key])) {\n        date = obj[key];\n      } else if (Object.prototype.toString.call(obj[key]) === \"[object Date]\") {\n        date = dayjs(obj[key]);\n      }\n\n      if (date && format.date) {\n        if (isString(format.date)) {\n          obj[key] = date.format(format.date);\n        } else if (isFunction(format.date)) {\n          obj[key] = format.date(date);\n        } else {\n          obj[key] = obj[key].unix();\n        }\n        continue;\n      }\n\n      //布尔值处理\n      if (isBoolean(obj[key]) && format.boolean) {\n        if (format.boolean === true) {\n          obj[key] = obj[key] ? 1 : 0;\n        } else if (Array.isArray(format.boolean)) {\n          obj[key] = obj[key] ? format.boolean?.[0] || 1 : format.boolean?.[1] || 0;\n        }\n        continue;\n      }\n\n      //附件处理\n      if (format.attachment) {\n        const checker = format.attachment;\n        if (\n          isObject(obj[key]) &&\n          obj[key]._type === \"file\" &&\n          isString(checker) &&\n          !isUndefined(obj[key][checker])\n        ) {\n          obj[key] = obj[key][checker];\n          continue;\n        } else if (isObject(obj[key]) && obj[key]._type === \"file\" && isFunction(checker)) {\n          obj[key] = checker(obj[key]);\n          continue;\n        }\n      }\n\n      //数组处理\n      if (isArray(obj[key])) {\n        obj[key] = formatter(obj[key]);\n      }\n    }\n\n    return obj;\n  };\n\n  return formatter(newForm);\n}\n\nexport default {\n  useHiddenForm,\n  useProcessStatus,\n  useProcessStatusSuccess,\n  useFormFail,\n  useFormFormat,\n  formLabel,\n};\n","/*!\n  * shared v11.1.11\n  * (c) 2025 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nfunction warn(msg, err) {\n    if (typeof console !== 'undefined') {\n        console.warn(`[intlify] ` + msg);\n        /* istanbul ignore if */\n        if (err) {\n            console.warn(err.stack);\n        }\n    }\n}\nconst hasWarned = {};\nfunction warnOnce(msg) {\n    if (!hasWarned[msg]) {\n        hasWarned[msg] = true;\n        warn(msg);\n    }\n}\n\n/**\n * Original Utilities\n * written by kazuya kawaguchi\n */\nconst inBrowser = typeof window !== 'undefined';\nlet mark;\nlet measure;\nif ((process.env.NODE_ENV !== 'production')) {\n    const perf = inBrowser && window.performance;\n    if (perf &&\n        perf.mark &&\n        perf.measure &&\n        perf.clearMarks &&\n        // @ts-ignore browser compat\n        perf.clearMeasures) {\n        mark = (tag) => {\n            perf.mark(tag);\n        };\n        measure = (name, startTag, endTag) => {\n            perf.measure(name, startTag, endTag);\n            perf.clearMarks(startTag);\n            perf.clearMarks(endTag);\n        };\n    }\n}\nconst RE_ARGS = /\\{([0-9a-zA-Z]+)\\}/g;\n/* eslint-disable */\nfunction format(message, ...args) {\n    if (args.length === 1 && isObject(args[0])) {\n        args = args[0];\n    }\n    if (!args || !args.hasOwnProperty) {\n        args = {};\n    }\n    return message.replace(RE_ARGS, (match, identifier) => {\n        return args.hasOwnProperty(identifier) ? args[identifier] : '';\n    });\n}\nconst makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);\nconst generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });\nconst friendlyJSONstringify = (json) => JSON.stringify(json)\n    .replace(/\\u2028/g, '\\\\u2028')\n    .replace(/\\u2029/g, '\\\\u2029')\n    .replace(/\\u0027/g, '\\\\u0027');\nconst isNumber = (val) => typeof val === 'number' && isFinite(val);\nconst isDate = (val) => toTypeString(val) === '[object Date]';\nconst isRegExp = (val) => toTypeString(val) === '[object RegExp]';\nconst isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;\nconst assign = Object.assign;\nconst _create = Object.create;\nconst create = (obj = null) => _create(obj);\nlet _globalThis;\nconst getGlobalThis = () => {\n    // prettier-ignore\n    return (_globalThis ||\n        (_globalThis =\n            typeof globalThis !== 'undefined'\n                ? globalThis\n                : typeof self !== 'undefined'\n                    ? self\n                    : typeof window !== 'undefined'\n                        ? window\n                        : typeof global !== 'undefined'\n                            ? global\n                            : create()));\n};\nfunction escapeHtml(rawText) {\n    return rawText\n        .replace(/&/g, '&amp;') // escape `&` first to avoid double escaping\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;')\n        .replace(/\"/g, '&quot;')\n        .replace(/'/g, '&apos;')\n        .replace(/\\//g, '&#x2F;') // escape `/` to prevent closing tags or JavaScript URLs\n        .replace(/=/g, '&#x3D;'); // escape `=` to prevent attribute injection\n}\nfunction escapeAttributeValue(value) {\n    return value\n        .replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&amp;') // escape unescaped `&`\n        .replace(/\"/g, '&quot;')\n        .replace(/'/g, '&apos;')\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;');\n}\nfunction sanitizeTranslatedHtml(html) {\n    // Escape dangerous characters in attribute values\n    // Process attributes with double quotes\n    html = html.replace(/(\\w+)\\s*=\\s*\"([^\"]*)\"/g, (_, attrName, attrValue) => `${attrName}=\"${escapeAttributeValue(attrValue)}\"`);\n    // Process attributes with single quotes\n    html = html.replace(/(\\w+)\\s*=\\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);\n    // Detect and neutralize event handler attributes\n    const eventHandlerPattern = /\\s*on\\w+\\s*=\\s*[\"']?[^\"'>]+[\"']?/gi;\n    if (eventHandlerPattern.test(html)) {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warn('Potentially dangerous event handlers detected in translation. ' +\n                'Consider removing onclick, onerror, etc. from your translation messages.');\n        }\n        // Neutralize event handler attributes by escaping 'on'\n        html = html.replace(/(\\s+)(on)(\\w+\\s*=)/gi, '$1&#111;n$3');\n    }\n    // Disable javascript: URLs in various contexts\n    const javascriptUrlPattern = [\n        // In href, src, action, formaction attributes\n        /(\\s+(?:href|src|action|formaction)\\s*=\\s*[\"']?)\\s*javascript:/gi,\n        // In style attributes within url()\n        /(style\\s*=\\s*[\"'][^\"']*url\\s*\\(\\s*)javascript:/gi\n    ];\n    javascriptUrlPattern.forEach(pattern => {\n        html = html.replace(pattern, '$1javascript&#58;');\n    });\n    return html;\n}\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn(obj, key) {\n    return hasOwnProperty.call(obj, key);\n}\n/* eslint-enable */\n/**\n * Useful Utilities By Evan you\n * Modified by kazuya kawaguchi\n * MIT License\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts\n * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts\n */\nconst isArray = Array.isArray;\nconst isFunction = (val) => typeof val === 'function';\nconst isString = (val) => typeof val === 'string';\nconst isBoolean = (val) => typeof val === 'boolean';\nconst isSymbol = (val) => typeof val === 'symbol';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isObject = (val) => val !== null && typeof val === 'object';\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isPromise = (val) => {\n    return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst isPlainObject = (val) => toTypeString(val) === '[object Object]';\n// for converting list and named values to displayed strings.\nconst toDisplayString = (val) => {\n    return val == null\n        ? ''\n        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)\n            ? JSON.stringify(val, null, 2)\n            : String(val);\n};\nfunction join(items, separator = '') {\n    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');\n}\nconst RANGE = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n    const lines = source.split(/\\r?\\n/);\n    let count = 0;\n    const res = [];\n    for (let i = 0; i < lines.length; i++) {\n        count += lines[i].length + 1;\n        if (count >= start) {\n            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {\n                if (j < 0 || j >= lines.length)\n                    continue;\n                const line = j + 1;\n                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);\n                const lineLength = lines[j].length;\n                if (j === i) {\n                    // push underline\n                    const pad = start - (count - lineLength) + 1;\n                    const length = Math.max(1, end > count ? lineLength - pad : end - start);\n                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));\n                }\n                else if (j > i) {\n                    if (end > count) {\n                        const length = Math.max(Math.min(end - count, lineLength), 1);\n                        res.push(`   |  ` + '^'.repeat(length));\n                    }\n                    count += lineLength + 1;\n                }\n            }\n            break;\n        }\n    }\n    return res.join('\\n');\n}\n\n/**\n * Event emitter, forked from the below:\n * - original repository url: https://github.com/developit/mitt\n * - code url: https://github.com/developit/mitt/blob/master/src/index.ts\n * - author: Jason Miller (https://github.com/developit)\n * - license: MIT\n */\n/**\n * Create a event emitter\n *\n * @returns An event emitter\n */\nfunction createEmitter() {\n    const events = new Map();\n    const emitter = {\n        events,\n        on(event, handler) {\n            const handlers = events.get(event);\n            const added = handlers && handlers.push(handler);\n            if (!added) {\n                events.set(event, [handler]);\n            }\n        },\n        off(event, handler) {\n            const handlers = events.get(event);\n            if (handlers) {\n                handlers.splice(handlers.indexOf(handler) >>> 0, 1);\n            }\n        },\n        emit(event, payload) {\n            (events.get(event) || [])\n                .slice()\n                .map(handler => handler(payload));\n            (events.get('*') || [])\n                .slice()\n                .map(handler => handler(event, payload));\n        }\n    };\n    return emitter;\n}\n\nconst isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction deepCopy(src, des) {\n    // src and des should both be objects, and none of them can be a array\n    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {\n        throw new Error('Invalid value');\n    }\n    const stack = [{ src, des }];\n    while (stack.length) {\n        const { src, des } = stack.pop();\n        // using `Object.keys` which skips prototype properties\n        Object.keys(src).forEach(key => {\n            if (key === '__proto__') {\n                return;\n            }\n            // if src[key] is an object/array, set des[key]\n            // to empty object/array to prevent setting by reference\n            if (isObject(src[key]) && !isObject(des[key])) {\n                des[key] = Array.isArray(src[key]) ? [] : create();\n            }\n            if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {\n                // replace with src[key] when:\n                // src[key] or des[key] is not an object, or\n                // src[key] or des[key] is an array\n                des[key] = src[key];\n            }\n            else {\n                // src[key] and des[key] are both objects, merge them\n                stack.push({ src: src[key], des: des[key] });\n            }\n        });\n    }\n}\n\nexport { assign, create, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, sanitizeTranslatedHtml, toDisplayString, toTypeString, warn, warnOnce };\n","/*!\n  * message-compiler v11.1.11\n  * (c) 2025 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nimport { format, assign, join, isString } from '@intlify/shared';\n\nconst LOCATION_STUB = {\n    start: { line: 1, column: 1, offset: 0 },\n    end: { line: 1, column: 1, offset: 0 }\n};\nfunction createPosition(line, column, offset) {\n    return { line, column, offset };\n}\nfunction createLocation(start, end, source) {\n    const loc = { start, end };\n    if (source != null) {\n        loc.source = source;\n    }\n    return loc;\n}\n\nconst CompileErrorCodes = {\n    // tokenizer error codes\n    EXPECTED_TOKEN: 1,\n    INVALID_TOKEN_IN_PLACEHOLDER: 2,\n    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,\n    UNKNOWN_ESCAPE_SEQUENCE: 4,\n    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,\n    UNBALANCED_CLOSING_BRACE: 6,\n    UNTERMINATED_CLOSING_BRACE: 7,\n    EMPTY_PLACEHOLDER: 8,\n    NOT_ALLOW_NEST_PLACEHOLDER: 9,\n    INVALID_LINKED_FORMAT: 10,\n    // parser error codes\n    MUST_HAVE_MESSAGES_IN_PLURAL: 11,\n    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,\n    UNEXPECTED_EMPTY_LINKED_KEY: 13,\n    UNEXPECTED_LEXICAL_ANALYSIS: 14,\n    // generator error codes\n    UNHANDLED_CODEGEN_NODE_TYPE: 15,\n    // minifier error codes\n    UNHANDLED_MINIFIER_NODE_TYPE: 16\n};\n// Special value for higher-order compilers to pick up the last code\n// to avoid collision of error codes.\n// This should always be kept as the last item.\nconst COMPILE_ERROR_CODES_EXTEND_POINT = 17;\n/** @internal */\nconst errorMessages = {\n    // tokenizer error messages\n    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,\n    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,\n    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,\n    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\\\{0}`,\n    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,\n    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,\n    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,\n    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,\n    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,\n    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,\n    // parser error messages\n    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,\n    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,\n    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,\n    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,\n    // generator error messages\n    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,\n    // minimizer error messages\n    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`\n};\nfunction createCompileError(code, loc, options = {}) {\n    const { domain, messages, args } = options;\n    const msg = (process.env.NODE_ENV !== 'production')\n        ? format((messages || errorMessages)[code] || '', ...(args || []))\n        : code;\n    const error = new SyntaxError(String(msg));\n    error.code = code;\n    if (loc) {\n        error.location = loc;\n    }\n    error.domain = domain;\n    return error;\n}\n/** @internal */\nfunction defaultOnError(error) {\n    throw error;\n}\n\n// eslint-disable-next-line no-useless-escape\nconst RE_HTML_TAG = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nconst detectHtmlTag = (source) => RE_HTML_TAG.test(source);\n\nconst CHAR_SP = ' ';\nconst CHAR_CR = '\\r';\nconst CHAR_LF = '\\n';\nconst CHAR_LS = String.fromCharCode(0x2028);\nconst CHAR_PS = String.fromCharCode(0x2029);\nfunction createScanner(str) {\n    const _buf = str;\n    let _index = 0;\n    let _line = 1;\n    let _column = 1;\n    let _peekOffset = 0;\n    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;\n    const isLF = (index) => _buf[index] === CHAR_LF;\n    const isPS = (index) => _buf[index] === CHAR_PS;\n    const isLS = (index) => _buf[index] === CHAR_LS;\n    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);\n    const index = () => _index;\n    const line = () => _line;\n    const column = () => _column;\n    const peekOffset = () => _peekOffset;\n    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];\n    const currentChar = () => charAt(_index);\n    const currentPeek = () => charAt(_index + _peekOffset);\n    function next() {\n        _peekOffset = 0;\n        if (isLineEnd(_index)) {\n            _line++;\n            _column = 0;\n        }\n        if (isCRLF(_index)) {\n            _index++;\n        }\n        _index++;\n        _column++;\n        return _buf[_index];\n    }\n    function peek() {\n        if (isCRLF(_index + _peekOffset)) {\n            _peekOffset++;\n        }\n        _peekOffset++;\n        return _buf[_index + _peekOffset];\n    }\n    function reset() {\n        _index = 0;\n        _line = 1;\n        _column = 1;\n        _peekOffset = 0;\n    }\n    function resetPeek(offset = 0) {\n        _peekOffset = offset;\n    }\n    function skipToPeek() {\n        const target = _index + _peekOffset;\n        while (target !== _index) {\n            next();\n        }\n        _peekOffset = 0;\n    }\n    return {\n        index,\n        line,\n        column,\n        peekOffset,\n        charAt,\n        currentChar,\n        currentPeek,\n        next,\n        peek,\n        reset,\n        resetPeek,\n        skipToPeek\n    };\n}\n\nconst EOF = undefined;\nconst DOT = '.';\nconst LITERAL_DELIMITER = \"'\";\nconst ERROR_DOMAIN$3 = 'tokenizer';\nfunction createTokenizer(source, options = {}) {\n    const location = options.location !== false;\n    const _scnr = createScanner(source);\n    const currentOffset = () => _scnr.index();\n    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());\n    const _initLoc = currentPosition();\n    const _initOffset = currentOffset();\n    const _context = {\n        currentType: 13 /* TokenTypes.EOF */,\n        offset: _initOffset,\n        startLoc: _initLoc,\n        endLoc: _initLoc,\n        lastType: 13 /* TokenTypes.EOF */,\n        lastOffset: _initOffset,\n        lastStartLoc: _initLoc,\n        lastEndLoc: _initLoc,\n        braceNest: 0,\n        inLinked: false,\n        text: ''\n    };\n    const context = () => _context;\n    const { onError } = options;\n    function emitError(code, pos, offset, ...args) {\n        const ctx = context();\n        pos.column += offset;\n        pos.offset += offset;\n        if (onError) {\n            const loc = location ? createLocation(ctx.startLoc, pos) : null;\n            const err = createCompileError(code, loc, {\n                domain: ERROR_DOMAIN$3,\n                args\n            });\n            onError(err);\n        }\n    }\n    function getToken(context, type, value) {\n        context.endLoc = currentPosition();\n        context.currentType = type;\n        const token = { type };\n        if (location) {\n            token.loc = createLocation(context.startLoc, context.endLoc);\n        }\n        if (value != null) {\n            token.value = value;\n        }\n        return token;\n    }\n    const getEndToken = (context) => getToken(context, 13 /* TokenTypes.EOF */);\n    function eat(scnr, ch) {\n        if (scnr.currentChar() === ch) {\n            scnr.next();\n            return ch;\n        }\n        else {\n            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);\n            return '';\n        }\n    }\n    function peekSpaces(scnr) {\n        let buf = '';\n        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {\n            buf += scnr.currentPeek();\n            scnr.peek();\n        }\n        return buf;\n    }\n    function skipSpaces(scnr) {\n        const buf = peekSpaces(scnr);\n        scnr.skipToPeek();\n        return buf;\n    }\n    function isIdentifierStart(ch) {\n        if (ch === EOF) {\n            return false;\n        }\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            cc === 95 // _\n        );\n    }\n    function isNumberStart(ch) {\n        if (ch === EOF) {\n            return false;\n        }\n        const cc = ch.charCodeAt(0);\n        return cc >= 48 && cc <= 57; // 0-9\n    }\n    function isNamedIdentifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = isIdentifierStart(scnr.currentPeek());\n        scnr.resetPeek();\n        return ret;\n    }\n    function isListIdentifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();\n        const ret = isNumberStart(ch);\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLiteralStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 2 /* TokenTypes.BraceLeft */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === LITERAL_DELIMITER;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedDotStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 7 /* TokenTypes.LinkedAlias */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \".\" /* TokenChars.LinkedDot */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedModifierStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 8 /* TokenTypes.LinkedDot */) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = isIdentifierStart(scnr.currentPeek());\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedDelimiterStart(scnr, context) {\n        const { currentType } = context;\n        if (!(currentType === 7 /* TokenTypes.LinkedAlias */ ||\n            currentType === 11 /* TokenTypes.LinkedModifier */)) {\n            return false;\n        }\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \":\" /* TokenChars.LinkedDelimiter */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isLinkedReferStart(scnr, context) {\n        const { currentType } = context;\n        if (currentType !== 9 /* TokenTypes.LinkedDelimiter */) {\n            return false;\n        }\n        const fn = () => {\n            const ch = scnr.currentPeek();\n            if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                return isIdentifierStart(scnr.peek());\n            }\n            else if (ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                ch === \":\" /* TokenChars.LinkedDelimiter */ ||\n                ch === \".\" /* TokenChars.LinkedDot */ ||\n                ch === CHAR_SP ||\n                !ch) {\n                return false;\n            }\n            else if (ch === CHAR_LF) {\n                scnr.peek();\n                return fn();\n            }\n            else {\n                // other characters\n                return isTextStart(scnr, false);\n            }\n        };\n        const ret = fn();\n        scnr.resetPeek();\n        return ret;\n    }\n    function isPluralStart(scnr) {\n        peekSpaces(scnr);\n        const ret = scnr.currentPeek() === \"|\" /* TokenChars.Pipe */;\n        scnr.resetPeek();\n        return ret;\n    }\n    function isTextStart(scnr, reset = true) {\n        const fn = (hasSpace = false, prev = '') => {\n            const ch = scnr.currentPeek();\n            if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                return hasSpace;\n            }\n            else if (ch === \"@\" /* TokenChars.LinkedAlias */ || !ch) {\n                return hasSpace;\n            }\n            else if (ch === \"|\" /* TokenChars.Pipe */) {\n                return !(prev === CHAR_SP || prev === CHAR_LF);\n            }\n            else if (ch === CHAR_SP) {\n                scnr.peek();\n                return fn(true, CHAR_SP);\n            }\n            else if (ch === CHAR_LF) {\n                scnr.peek();\n                return fn(true, CHAR_LF);\n            }\n            else {\n                return true;\n            }\n        };\n        const ret = fn();\n        reset && scnr.resetPeek();\n        return ret;\n    }\n    function takeChar(scnr, fn) {\n        const ch = scnr.currentChar();\n        if (ch === EOF) {\n            return EOF;\n        }\n        if (fn(ch)) {\n            scnr.next();\n            return ch;\n        }\n        return null;\n    }\n    function isIdentifier(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            (cc >= 48 && cc <= 57) || // 0-9\n            cc === 95 || // _\n            cc === 36 // $\n        );\n    }\n    function takeIdentifierChar(scnr) {\n        return takeChar(scnr, isIdentifier);\n    }\n    function isNamedIdentifier(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 97 && cc <= 122) || // a-z\n            (cc >= 65 && cc <= 90) || // A-Z\n            (cc >= 48 && cc <= 57) || // 0-9\n            cc === 95 || // _\n            cc === 36 || // $\n            cc === 45 // -\n        );\n    }\n    function takeNamedIdentifierChar(scnr) {\n        return takeChar(scnr, isNamedIdentifier);\n    }\n    function isDigit(ch) {\n        const cc = ch.charCodeAt(0);\n        return cc >= 48 && cc <= 57; // 0-9\n    }\n    function takeDigit(scnr) {\n        return takeChar(scnr, isDigit);\n    }\n    function isHexDigit(ch) {\n        const cc = ch.charCodeAt(0);\n        return ((cc >= 48 && cc <= 57) || // 0-9\n            (cc >= 65 && cc <= 70) || // A-F\n            (cc >= 97 && cc <= 102)); // a-f\n    }\n    function takeHexDigit(scnr) {\n        return takeChar(scnr, isHexDigit);\n    }\n    function getDigits(scnr) {\n        let ch = '';\n        let num = '';\n        while ((ch = takeDigit(scnr))) {\n            num += ch;\n        }\n        return num;\n    }\n    function readText(scnr) {\n        let buf = '';\n        while (true) {\n            const ch = scnr.currentChar();\n            if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n                ch === \"}\" /* TokenChars.BraceRight */ ||\n                ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                !ch) {\n                break;\n            }\n            else if (ch === CHAR_SP || ch === CHAR_LF) {\n                if (isTextStart(scnr)) {\n                    buf += ch;\n                    scnr.next();\n                }\n                else if (isPluralStart(scnr)) {\n                    break;\n                }\n                else {\n                    buf += ch;\n                    scnr.next();\n                }\n            }\n            else {\n                buf += ch;\n                scnr.next();\n            }\n        }\n        return buf;\n    }\n    function readNamedIdentifier(scnr) {\n        skipSpaces(scnr);\n        let ch = '';\n        let name = '';\n        while ((ch = takeNamedIdentifierChar(scnr))) {\n            name += ch;\n        }\n        if (scnr.currentChar() === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n        }\n        return name;\n    }\n    function readListIdentifier(scnr) {\n        skipSpaces(scnr);\n        let value = '';\n        if (scnr.currentChar() === '-') {\n            scnr.next();\n            value += `-${getDigits(scnr)}`;\n        }\n        else {\n            value += getDigits(scnr);\n        }\n        if (scnr.currentChar() === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n        }\n        return value;\n    }\n    function isLiteral(ch) {\n        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;\n    }\n    function readLiteral(scnr) {\n        skipSpaces(scnr);\n        // eslint-disable-next-line no-useless-escape\n        eat(scnr, `\\'`);\n        let ch = '';\n        let literal = '';\n        while ((ch = takeChar(scnr, isLiteral))) {\n            if (ch === '\\\\') {\n                literal += readEscapeSequence(scnr);\n            }\n            else {\n                literal += ch;\n            }\n        }\n        const current = scnr.currentChar();\n        if (current === CHAR_LF || current === EOF) {\n            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);\n            // TODO: Is it correct really?\n            if (current === CHAR_LF) {\n                scnr.next();\n                // eslint-disable-next-line no-useless-escape\n                eat(scnr, `\\'`);\n            }\n            return literal;\n        }\n        // eslint-disable-next-line no-useless-escape\n        eat(scnr, `\\'`);\n        return literal;\n    }\n    function readEscapeSequence(scnr) {\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case '\\\\':\n            case `\\'`: // eslint-disable-line no-useless-escape\n                scnr.next();\n                return `\\\\${ch}`;\n            case 'u':\n                return readUnicodeEscapeSequence(scnr, ch, 4);\n            case 'U':\n                return readUnicodeEscapeSequence(scnr, ch, 6);\n            default:\n                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);\n                return '';\n        }\n    }\n    function readUnicodeEscapeSequence(scnr, unicode, digits) {\n        eat(scnr, unicode);\n        let sequence = '';\n        for (let i = 0; i < digits; i++) {\n            const ch = takeHexDigit(scnr);\n            if (!ch) {\n                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\\\${unicode}${sequence}${scnr.currentChar()}`);\n                break;\n            }\n            sequence += ch;\n        }\n        return `\\\\${unicode}${sequence}`;\n    }\n    function isInvalidIdentifier(ch) {\n        return (ch !== \"{\" /* TokenChars.BraceLeft */ &&\n            ch !== \"}\" /* TokenChars.BraceRight */ &&\n            ch !== CHAR_SP &&\n            ch !== CHAR_LF);\n    }\n    function readInvalidIdentifier(scnr) {\n        skipSpaces(scnr);\n        let ch = '';\n        let identifiers = '';\n        while ((ch = takeChar(scnr, isInvalidIdentifier))) {\n            identifiers += ch;\n        }\n        return identifiers;\n    }\n    function readLinkedModifier(scnr) {\n        let ch = '';\n        let name = '';\n        while ((ch = takeIdentifierChar(scnr))) {\n            name += ch;\n        }\n        return name;\n    }\n    function readLinkedRefer(scnr) {\n        const fn = (buf) => {\n            const ch = scnr.currentChar();\n            if (ch === \"{\" /* TokenChars.BraceLeft */ ||\n                ch === \"@\" /* TokenChars.LinkedAlias */ ||\n                ch === \"|\" /* TokenChars.Pipe */ ||\n                ch === \"(\" /* TokenChars.ParenLeft */ ||\n                ch === \")\" /* TokenChars.ParenRight */ ||\n                !ch) {\n                return buf;\n            }\n            else if (ch === CHAR_SP) {\n                return buf;\n            }\n            else if (ch === CHAR_LF || ch === DOT) {\n                buf += ch;\n                scnr.next();\n                return fn(buf);\n            }\n            else {\n                buf += ch;\n                scnr.next();\n                return fn(buf);\n            }\n        };\n        return fn('');\n    }\n    function readPlural(scnr) {\n        skipSpaces(scnr);\n        const plural = eat(scnr, \"|\" /* TokenChars.Pipe */);\n        skipSpaces(scnr);\n        return plural;\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readTokenInPlaceholder(scnr, context) {\n        let token = null;\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case \"{\" /* TokenChars.BraceLeft */:\n                if (context.braceNest >= 1) {\n                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);\n                }\n                scnr.next();\n                token = getToken(context, 2 /* TokenTypes.BraceLeft */, \"{\" /* TokenChars.BraceLeft */);\n                skipSpaces(scnr);\n                context.braceNest++;\n                return token;\n            case \"}\" /* TokenChars.BraceRight */:\n                if (context.braceNest > 0 &&\n                    context.currentType === 2 /* TokenTypes.BraceLeft */) {\n                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);\n                }\n                scnr.next();\n                token = getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n                context.braceNest--;\n                context.braceNest > 0 && skipSpaces(scnr);\n                if (context.inLinked && context.braceNest === 0) {\n                    context.inLinked = false;\n                }\n                return token;\n            case \"@\" /* TokenChars.LinkedAlias */:\n                if (context.braceNest > 0) {\n                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                }\n                token = readTokenInLinked(scnr, context) || getEndToken(context);\n                context.braceNest = 0;\n                return token;\n            default: {\n                let validNamedIdentifier = true;\n                let validListIdentifier = true;\n                let validLiteral = true;\n                if (isPluralStart(scnr)) {\n                    if (context.braceNest > 0) {\n                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                    }\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                if (context.braceNest > 0 &&\n                    (context.currentType === 4 /* TokenTypes.Named */ ||\n                        context.currentType === 5 /* TokenTypes.List */ ||\n                        context.currentType === 6 /* TokenTypes.Literal */)) {\n                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);\n                    context.braceNest = 0;\n                    return readToken(scnr, context);\n                }\n                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {\n                    token = getToken(context, 4 /* TokenTypes.Named */, readNamedIdentifier(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {\n                    token = getToken(context, 5 /* TokenTypes.List */, readListIdentifier(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if ((validLiteral = isLiteralStart(scnr, context))) {\n                    token = getToken(context, 6 /* TokenTypes.Literal */, readLiteral(scnr));\n                    skipSpaces(scnr);\n                    return token;\n                }\n                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {\n                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...\n                    token = getToken(context, 12 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));\n                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);\n                    skipSpaces(scnr);\n                    return token;\n                }\n                break;\n            }\n        }\n        return token;\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readTokenInLinked(scnr, context) {\n        const { currentType } = context;\n        let token = null;\n        const ch = scnr.currentChar();\n        if ((currentType === 7 /* TokenTypes.LinkedAlias */ ||\n            currentType === 8 /* TokenTypes.LinkedDot */ ||\n            currentType === 11 /* TokenTypes.LinkedModifier */ ||\n            currentType === 9 /* TokenTypes.LinkedDelimiter */) &&\n            (ch === CHAR_LF || ch === CHAR_SP)) {\n            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n        }\n        switch (ch) {\n            case \"@\" /* TokenChars.LinkedAlias */:\n                scnr.next();\n                token = getToken(context, 7 /* TokenTypes.LinkedAlias */, \"@\" /* TokenChars.LinkedAlias */);\n                context.inLinked = true;\n                return token;\n            case \".\" /* TokenChars.LinkedDot */:\n                skipSpaces(scnr);\n                scnr.next();\n                return getToken(context, 8 /* TokenTypes.LinkedDot */, \".\" /* TokenChars.LinkedDot */);\n            case \":\" /* TokenChars.LinkedDelimiter */:\n                skipSpaces(scnr);\n                scnr.next();\n                return getToken(context, 9 /* TokenTypes.LinkedDelimiter */, \":\" /* TokenChars.LinkedDelimiter */);\n            default:\n                if (isPluralStart(scnr)) {\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                if (isLinkedDotStart(scnr, context) ||\n                    isLinkedDelimiterStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    return readTokenInLinked(scnr, context);\n                }\n                if (isLinkedModifierStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    return getToken(context, 11 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));\n                }\n                if (isLinkedReferStart(scnr, context)) {\n                    skipSpaces(scnr);\n                    if (ch === \"{\" /* TokenChars.BraceLeft */) {\n                        // scan the placeholder\n                        return readTokenInPlaceholder(scnr, context) || token;\n                    }\n                    else {\n                        return getToken(context, 10 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));\n                    }\n                }\n                if (currentType === 7 /* TokenTypes.LinkedAlias */) {\n                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);\n                }\n                context.braceNest = 0;\n                context.inLinked = false;\n                return readToken(scnr, context);\n        }\n    }\n    // TODO: We need refactoring of token parsing ...\n    function readToken(scnr, context) {\n        let token = { type: 13 /* TokenTypes.EOF */ };\n        if (context.braceNest > 0) {\n            return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n        }\n        if (context.inLinked) {\n            return readTokenInLinked(scnr, context) || getEndToken(context);\n        }\n        const ch = scnr.currentChar();\n        switch (ch) {\n            case \"{\" /* TokenChars.BraceLeft */:\n                return readTokenInPlaceholder(scnr, context) || getEndToken(context);\n            case \"}\" /* TokenChars.BraceRight */:\n                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);\n                scnr.next();\n                return getToken(context, 3 /* TokenTypes.BraceRight */, \"}\" /* TokenChars.BraceRight */);\n            case \"@\" /* TokenChars.LinkedAlias */:\n                return readTokenInLinked(scnr, context) || getEndToken(context);\n            default: {\n                if (isPluralStart(scnr)) {\n                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));\n                    // reset\n                    context.braceNest = 0;\n                    context.inLinked = false;\n                    return token;\n                }\n                if (isTextStart(scnr)) {\n                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));\n                }\n                break;\n            }\n        }\n        return token;\n    }\n    function nextToken() {\n        const { currentType, offset, startLoc, endLoc } = _context;\n        _context.lastType = currentType;\n        _context.lastOffset = offset;\n        _context.lastStartLoc = startLoc;\n        _context.lastEndLoc = endLoc;\n        _context.offset = currentOffset();\n        _context.startLoc = currentPosition();\n        if (_scnr.currentChar() === EOF) {\n            return getToken(_context, 13 /* TokenTypes.EOF */);\n        }\n        return readToken(_scnr, _context);\n    }\n    return {\n        nextToken,\n        currentOffset,\n        currentPosition,\n        context\n    };\n}\n\nconst ERROR_DOMAIN$2 = 'parser';\n// Backslash backslash, backslash quote, uHHHH, UHHHHHH.\nconst KNOWN_ESCAPES = /(?:\\\\\\\\|\\\\'|\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{6}))/g;\nfunction fromEscapeSequence(match, codePoint4, codePoint6) {\n    switch (match) {\n        case `\\\\\\\\`:\n            return `\\\\`;\n        // eslint-disable-next-line no-useless-escape\n        case `\\\\\\'`:\n            // eslint-disable-next-line no-useless-escape\n            return `\\'`;\n        default: {\n            const codePoint = parseInt(codePoint4 || codePoint6, 16);\n            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {\n                return String.fromCodePoint(codePoint);\n            }\n            // invalid ...\n            // Replace them with U+FFFD REPLACEMENT CHARACTER.\n            return '�';\n        }\n    }\n}\nfunction createParser(options = {}) {\n    const location = options.location !== false;\n    const { onError } = options;\n    function emitError(tokenzer, code, start, offset, ...args) {\n        const end = tokenzer.currentPosition();\n        end.offset += offset;\n        end.column += offset;\n        if (onError) {\n            const loc = location ? createLocation(start, end) : null;\n            const err = createCompileError(code, loc, {\n                domain: ERROR_DOMAIN$2,\n                args\n            });\n            onError(err);\n        }\n    }\n    function startNode(type, offset, loc) {\n        const node = { type };\n        if (location) {\n            node.start = offset;\n            node.end = offset;\n            node.loc = { start: loc, end: loc };\n        }\n        return node;\n    }\n    function endNode(node, offset, pos, type) {\n        if (location) {\n            node.end = offset;\n            if (node.loc) {\n                node.loc.end = pos;\n            }\n        }\n    }\n    function parseText(tokenizer, value) {\n        const context = tokenizer.context();\n        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);\n        node.value = value;\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseList(tokenizer, index) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(5 /* NodeTypes.List */, offset, loc);\n        node.index = parseInt(index, 10);\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseNamed(tokenizer, key) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(4 /* NodeTypes.Named */, offset, loc);\n        node.key = key;\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLiteral(tokenizer, value) {\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc\n        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);\n        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);\n        tokenizer.nextToken(); // skip brach right\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLinkedModifier(tokenizer) {\n        const token = tokenizer.nextToken();\n        const context = tokenizer.context();\n        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc\n        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);\n        if (token.type !== 11 /* TokenTypes.LinkedModifier */) {\n            // empty modifier\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);\n            node.value = '';\n            endNode(node, offset, loc);\n            return {\n                nextConsumeToken: token,\n                node\n            };\n        }\n        // check token\n        if (token.value == null) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n        }\n        node.value = token.value || '';\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return {\n            node\n        };\n    }\n    function parseLinkedKey(tokenizer, value) {\n        const context = tokenizer.context();\n        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);\n        node.value = value;\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseLinked(tokenizer) {\n        const context = tokenizer.context();\n        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);\n        let token = tokenizer.nextToken();\n        if (token.type === 8 /* TokenTypes.LinkedDot */) {\n            const parsed = parseLinkedModifier(tokenizer);\n            linkedNode.modifier = parsed.node;\n            token = parsed.nextConsumeToken || tokenizer.nextToken();\n        }\n        // asset check token\n        if (token.type !== 9 /* TokenTypes.LinkedDelimiter */) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n        }\n        token = tokenizer.nextToken();\n        // skip brace left\n        if (token.type === 2 /* TokenTypes.BraceLeft */) {\n            token = tokenizer.nextToken();\n        }\n        switch (token.type) {\n            case 10 /* TokenTypes.LinkedKey */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');\n                break;\n            case 4 /* TokenTypes.Named */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseNamed(tokenizer, token.value || '');\n                break;\n            case 5 /* TokenTypes.List */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseList(tokenizer, token.value || '');\n                break;\n            case 6 /* TokenTypes.Literal */:\n                if (token.value == null) {\n                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                }\n                linkedNode.key = parseLiteral(tokenizer, token.value || '');\n                break;\n            default: {\n                // empty key\n                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);\n                const nextContext = tokenizer.context();\n                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);\n                emptyLinkedKeyNode.value = '';\n                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);\n                linkedNode.key = emptyLinkedKeyNode;\n                endNode(linkedNode, nextContext.offset, nextContext.startLoc);\n                return {\n                    nextConsumeToken: token,\n                    node: linkedNode\n                };\n            }\n        }\n        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return {\n            node: linkedNode\n        };\n    }\n    function parseMessage(tokenizer) {\n        const context = tokenizer.context();\n        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */\n            ? tokenizer.currentOffset()\n            : context.offset;\n        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.endLoc\n            : context.startLoc;\n        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);\n        node.items = [];\n        let nextToken = null;\n        do {\n            const token = nextToken || tokenizer.nextToken();\n            nextToken = null;\n            switch (token.type) {\n                case 0 /* TokenTypes.Text */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseText(tokenizer, token.value || ''));\n                    break;\n                case 5 /* TokenTypes.List */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseList(tokenizer, token.value || ''));\n                    break;\n                case 4 /* TokenTypes.Named */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseNamed(tokenizer, token.value || ''));\n                    break;\n                case 6 /* TokenTypes.Literal */:\n                    if (token.value == null) {\n                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));\n                    }\n                    node.items.push(parseLiteral(tokenizer, token.value || ''));\n                    break;\n                case 7 /* TokenTypes.LinkedAlias */: {\n                    const parsed = parseLinked(tokenizer);\n                    node.items.push(parsed.node);\n                    nextToken = parsed.nextConsumeToken || null;\n                    break;\n                }\n            }\n        } while (context.currentType !== 13 /* TokenTypes.EOF */ &&\n            context.currentType !== 1 /* TokenTypes.Pipe */);\n        // adjust message node loc\n        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.lastOffset\n            : tokenizer.currentOffset();\n        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */\n            ? context.lastEndLoc\n            : tokenizer.currentPosition();\n        endNode(node, endOffset, endLoc);\n        return node;\n    }\n    function parsePlural(tokenizer, offset, loc, msgNode) {\n        const context = tokenizer.context();\n        let hasEmptyMessage = msgNode.items.length === 0;\n        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);\n        node.cases = [];\n        node.cases.push(msgNode);\n        do {\n            const msg = parseMessage(tokenizer);\n            if (!hasEmptyMessage) {\n                hasEmptyMessage = msg.items.length === 0;\n            }\n            node.cases.push(msg);\n        } while (context.currentType !== 13 /* TokenTypes.EOF */);\n        if (hasEmptyMessage) {\n            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);\n        }\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    function parseResource(tokenizer) {\n        const context = tokenizer.context();\n        const { offset, startLoc } = context;\n        const msgNode = parseMessage(tokenizer);\n        if (context.currentType === 13 /* TokenTypes.EOF */) {\n            return msgNode;\n        }\n        else {\n            return parsePlural(tokenizer, offset, startLoc, msgNode);\n        }\n    }\n    function parse(source) {\n        const tokenizer = createTokenizer(source, assign({}, options));\n        const context = tokenizer.context();\n        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);\n        if (location && node.loc) {\n            node.loc.source = source;\n        }\n        node.body = parseResource(tokenizer);\n        if (options.onCacheKey) {\n            node.cacheKey = options.onCacheKey(source);\n        }\n        // assert whether achieved to EOF\n        if (context.currentType !== 13 /* TokenTypes.EOF */) {\n            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');\n        }\n        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());\n        return node;\n    }\n    return { parse };\n}\nfunction getTokenCaption(token) {\n    if (token.type === 13 /* TokenTypes.EOF */) {\n        return 'EOF';\n    }\n    const name = (token.value || '').replace(/\\r?\\n/gu, '\\\\n');\n    return name.length > 10 ? name.slice(0, 9) + '…' : name;\n}\n\nfunction createTransformer(ast, options = {} // eslint-disable-line\n) {\n    const _context = {\n        ast,\n        helpers: new Set()\n    };\n    const context = () => _context;\n    const helper = (name) => {\n        _context.helpers.add(name);\n        return name;\n    };\n    return { context, helper };\n}\nfunction traverseNodes(nodes, transformer) {\n    for (let i = 0; i < nodes.length; i++) {\n        traverseNode(nodes[i], transformer);\n    }\n}\nfunction traverseNode(node, transformer) {\n    // TODO: if we need pre-hook of transform, should be implemented to here\n    switch (node.type) {\n        case 1 /* NodeTypes.Plural */:\n            traverseNodes(node.cases, transformer);\n            transformer.helper(\"plural\" /* HelperNameMap.PLURAL */);\n            break;\n        case 2 /* NodeTypes.Message */:\n            traverseNodes(node.items, transformer);\n            break;\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            traverseNode(linked.key, transformer);\n            transformer.helper(\"linked\" /* HelperNameMap.LINKED */);\n            transformer.helper(\"type\" /* HelperNameMap.TYPE */);\n            break;\n        }\n        case 5 /* NodeTypes.List */:\n            transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n            transformer.helper(\"list\" /* HelperNameMap.LIST */);\n            break;\n        case 4 /* NodeTypes.Named */:\n            transformer.helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */);\n            transformer.helper(\"named\" /* HelperNameMap.NAMED */);\n            break;\n    }\n    // TODO: if we need post-hook of transform, should be implemented to here\n}\n// transform AST\nfunction transform(ast, options = {} // eslint-disable-line\n) {\n    const transformer = createTransformer(ast);\n    transformer.helper(\"normalize\" /* HelperNameMap.NORMALIZE */);\n    // traverse\n    ast.body && traverseNode(ast.body, transformer);\n    // set meta information\n    const context = transformer.context();\n    ast.helpers = Array.from(context.helpers);\n}\n\nfunction optimize(ast) {\n    const body = ast.body;\n    if (body.type === 2 /* NodeTypes.Message */) {\n        optimizeMessageNode(body);\n    }\n    else {\n        body.cases.forEach(c => optimizeMessageNode(c));\n    }\n    return ast;\n}\nfunction optimizeMessageNode(message) {\n    if (message.items.length === 1) {\n        const item = message.items[0];\n        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n            message.static = item.value;\n            delete item.value; // optimization for size\n        }\n    }\n    else {\n        const values = [];\n        for (let i = 0; i < message.items.length; i++) {\n            const item = message.items[i];\n            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {\n                break;\n            }\n            if (item.value == null) {\n                break;\n            }\n            values.push(item.value);\n        }\n        if (values.length === message.items.length) {\n            message.static = join(values);\n            for (let i = 0; i < message.items.length; i++) {\n                const item = message.items[i];\n                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {\n                    delete item.value; // optimization for size\n                }\n            }\n        }\n    }\n}\n\nconst ERROR_DOMAIN$1 = 'minifier';\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction minify(node) {\n    node.t = node.type;\n    switch (node.type) {\n        case 0 /* NodeTypes.Resource */: {\n            const resource = node;\n            minify(resource.body);\n            resource.b = resource.body;\n            delete resource.body;\n            break;\n        }\n        case 1 /* NodeTypes.Plural */: {\n            const plural = node;\n            const cases = plural.cases;\n            for (let i = 0; i < cases.length; i++) {\n                minify(cases[i]);\n            }\n            plural.c = cases;\n            delete plural.cases;\n            break;\n        }\n        case 2 /* NodeTypes.Message */: {\n            const message = node;\n            const items = message.items;\n            for (let i = 0; i < items.length; i++) {\n                minify(items[i]);\n            }\n            message.i = items;\n            delete message.items;\n            if (message.static) {\n                message.s = message.static;\n                delete message.static;\n            }\n            break;\n        }\n        case 3 /* NodeTypes.Text */:\n        case 9 /* NodeTypes.Literal */:\n        case 8 /* NodeTypes.LinkedModifier */:\n        case 7 /* NodeTypes.LinkedKey */: {\n            const valueNode = node;\n            if (valueNode.value) {\n                valueNode.v = valueNode.value;\n                delete valueNode.value;\n            }\n            break;\n        }\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            minify(linked.key);\n            linked.k = linked.key;\n            delete linked.key;\n            if (linked.modifier) {\n                minify(linked.modifier);\n                linked.m = linked.modifier;\n                delete linked.modifier;\n            }\n            break;\n        }\n        case 5 /* NodeTypes.List */: {\n            const list = node;\n            list.i = list.index;\n            delete list.index;\n            break;\n        }\n        case 4 /* NodeTypes.Named */: {\n            const named = node;\n            named.k = named.key;\n            delete named.key;\n            break;\n        }\n        default:\n            if ((process.env.NODE_ENV !== 'production')) {\n                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {\n                    domain: ERROR_DOMAIN$1,\n                    args: [node.type]\n                });\n            }\n    }\n    delete node.type;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference types=\"source-map-js\" />\nconst ERROR_DOMAIN = 'parser';\nfunction createCodeGenerator(ast, options) {\n    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;\n    const location = options.location !== false;\n    const _context = {\n        filename,\n        code: '',\n        column: 1,\n        line: 1,\n        offset: 0,\n        map: undefined,\n        breakLineCode,\n        needIndent: _needIndent,\n        indentLevel: 0\n    };\n    if (location && ast.loc) {\n        _context.source = ast.loc.source;\n    }\n    const context = () => _context;\n    function push(code, node) {\n        _context.code += code;\n    }\n    function _newline(n, withBreakLine = true) {\n        const _breakLineCode = withBreakLine ? breakLineCode : '';\n        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);\n    }\n    function indent(withNewLine = true) {\n        const level = ++_context.indentLevel;\n        withNewLine && _newline(level);\n    }\n    function deindent(withNewLine = true) {\n        const level = --_context.indentLevel;\n        withNewLine && _newline(level);\n    }\n    function newline() {\n        _newline(_context.indentLevel);\n    }\n    const helper = (key) => `_${key}`;\n    const needIndent = () => _context.needIndent;\n    return {\n        context,\n        push,\n        indent,\n        deindent,\n        newline,\n        helper,\n        needIndent\n    };\n}\nfunction generateLinkedNode(generator, node) {\n    const { helper } = generator;\n    generator.push(`${helper(\"linked\" /* HelperNameMap.LINKED */)}(`);\n    generateNode(generator, node.key);\n    if (node.modifier) {\n        generator.push(`, `);\n        generateNode(generator, node.modifier);\n        generator.push(`, _type`);\n    }\n    else {\n        generator.push(`, undefined, _type`);\n    }\n    generator.push(`)`);\n}\nfunction generateMessageNode(generator, node) {\n    const { helper, needIndent } = generator;\n    generator.push(`${helper(\"normalize\" /* HelperNameMap.NORMALIZE */)}([`);\n    generator.indent(needIndent());\n    const length = node.items.length;\n    for (let i = 0; i < length; i++) {\n        generateNode(generator, node.items[i]);\n        if (i === length - 1) {\n            break;\n        }\n        generator.push(', ');\n    }\n    generator.deindent(needIndent());\n    generator.push('])');\n}\nfunction generatePluralNode(generator, node) {\n    const { helper, needIndent } = generator;\n    if (node.cases.length > 1) {\n        generator.push(`${helper(\"plural\" /* HelperNameMap.PLURAL */)}([`);\n        generator.indent(needIndent());\n        const length = node.cases.length;\n        for (let i = 0; i < length; i++) {\n            generateNode(generator, node.cases[i]);\n            if (i === length - 1) {\n                break;\n            }\n            generator.push(', ');\n        }\n        generator.deindent(needIndent());\n        generator.push(`])`);\n    }\n}\nfunction generateResource(generator, node) {\n    if (node.body) {\n        generateNode(generator, node.body);\n    }\n    else {\n        generator.push('null');\n    }\n}\nfunction generateNode(generator, node) {\n    const { helper } = generator;\n    switch (node.type) {\n        case 0 /* NodeTypes.Resource */:\n            generateResource(generator, node);\n            break;\n        case 1 /* NodeTypes.Plural */:\n            generatePluralNode(generator, node);\n            break;\n        case 2 /* NodeTypes.Message */:\n            generateMessageNode(generator, node);\n            break;\n        case 6 /* NodeTypes.Linked */:\n            generateLinkedNode(generator, node);\n            break;\n        case 8 /* NodeTypes.LinkedModifier */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 7 /* NodeTypes.LinkedKey */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 5 /* NodeTypes.List */:\n            generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"list\" /* HelperNameMap.LIST */)}(${node.index}))`, node);\n            break;\n        case 4 /* NodeTypes.Named */:\n            generator.push(`${helper(\"interpolate\" /* HelperNameMap.INTERPOLATE */)}(${helper(\"named\" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);\n            break;\n        case 9 /* NodeTypes.Literal */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        case 3 /* NodeTypes.Text */:\n            generator.push(JSON.stringify(node.value), node);\n            break;\n        default:\n            if ((process.env.NODE_ENV !== 'production')) {\n                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {\n                    domain: ERROR_DOMAIN,\n                    args: [node.type]\n                });\n            }\n    }\n}\n// generate code from AST\nconst generate = (ast, options = {}) => {\n    const mode = isString(options.mode) ? options.mode : 'normal';\n    const filename = isString(options.filename)\n        ? options.filename\n        : 'message.intl';\n    const sourceMap = !!options.sourceMap;\n    // prettier-ignore\n    const breakLineCode = options.breakLineCode != null\n        ? options.breakLineCode\n        : mode === 'arrow'\n            ? ';'\n            : '\\n';\n    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';\n    const helpers = ast.helpers || [];\n    const generator = createCodeGenerator(ast, {\n        mode,\n        filename,\n        sourceMap,\n        breakLineCode,\n        needIndent\n    });\n    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);\n    generator.indent(needIndent);\n    if (helpers.length > 0) {\n        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);\n        generator.newline();\n    }\n    generator.push(`return `);\n    generateNode(generator, ast);\n    generator.deindent(needIndent);\n    generator.push(`}`);\n    delete ast.helpers;\n    const { code, map } = generator.context();\n    return {\n        ast,\n        code,\n        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any\n    };\n};\n\nfunction baseCompile(source, options = {}) {\n    const assignedOptions = assign({}, options);\n    const jit = !!assignedOptions.jit;\n    const enalbeMinify = !!assignedOptions.minify;\n    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;\n    // parse source codes\n    const parser = createParser(assignedOptions);\n    const ast = parser.parse(source);\n    if (!jit) {\n        // transform ASTs\n        transform(ast, assignedOptions);\n        // generate javascript codes\n        return generate(ast, assignedOptions);\n    }\n    else {\n        // optimize ASTs\n        enambeOptimize && optimize(ast);\n        // minimize ASTs\n        enalbeMinify && minify(ast);\n        // In JIT mode, no ast transform, no code generation.\n        return { ast, code: '' };\n    }\n}\n\nexport { COMPILE_ERROR_CODES_EXTEND_POINT, CompileErrorCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages };\n","/*!\n  * core-base v11.1.11\n  * (c) 2025 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nimport { getGlobalThis, isObject, hasOwn, isNumber, create, isString, isBoolean, warn, format as format$1, isFunction, isPromise, isArray, isPlainObject, assign, isRegExp, warnOnce, isEmptyObject, isDate, join, toDisplayString, sanitizeTranslatedHtml, escapeHtml, inBrowser, mark, measure, generateCodeFrame, generateFormatCacheKey } from '@intlify/shared';\nimport { detectHtmlTag, defaultOnError, baseCompile as baseCompile$1, COMPILE_ERROR_CODES_EXTEND_POINT, createCompileError } from '@intlify/message-compiler';\nexport { CompileErrorCodes, createCompileError } from '@intlify/message-compiler';\n\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n    if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n    }\n    if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n    }\n}\n\nfunction isMessageAST(val) {\n    return (isObject(val) &&\n        resolveType(val) === 0 &&\n        (hasOwn(val, 'b') || hasOwn(val, 'body')));\n}\nconst PROPS_BODY = ['b', 'body'];\nfunction resolveBody(node) {\n    return resolveProps(node, PROPS_BODY);\n}\nconst PROPS_CASES = ['c', 'cases'];\nfunction resolveCases(node) {\n    return resolveProps(node, PROPS_CASES, []);\n}\nconst PROPS_STATIC = ['s', 'static'];\nfunction resolveStatic(node) {\n    return resolveProps(node, PROPS_STATIC);\n}\nconst PROPS_ITEMS = ['i', 'items'];\nfunction resolveItems(node) {\n    return resolveProps(node, PROPS_ITEMS, []);\n}\nconst PROPS_TYPE = ['t', 'type'];\nfunction resolveType(node) {\n    return resolveProps(node, PROPS_TYPE);\n}\nconst PROPS_VALUE = ['v', 'value'];\nfunction resolveValue$1(node, type) {\n    const resolved = resolveProps(node, PROPS_VALUE);\n    if (resolved != null) {\n        return resolved;\n    }\n    else {\n        throw createUnhandleNodeError(type);\n    }\n}\nconst PROPS_MODIFIER = ['m', 'modifier'];\nfunction resolveLinkedModifier(node) {\n    return resolveProps(node, PROPS_MODIFIER);\n}\nconst PROPS_KEY = ['k', 'key'];\nfunction resolveLinkedKey(node) {\n    const resolved = resolveProps(node, PROPS_KEY);\n    if (resolved) {\n        return resolved;\n    }\n    else {\n        throw createUnhandleNodeError(6 /* NodeTypes.Linked */);\n    }\n}\nfunction resolveProps(node, props, defaultValue) {\n    for (let i = 0; i < props.length; i++) {\n        const prop = props[i];\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        if (hasOwn(node, prop) && node[prop] != null) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            return node[prop];\n        }\n    }\n    return defaultValue;\n}\nconst AST_NODE_PROPS_KEYS = [\n    ...PROPS_BODY,\n    ...PROPS_CASES,\n    ...PROPS_STATIC,\n    ...PROPS_ITEMS,\n    ...PROPS_KEY,\n    ...PROPS_MODIFIER,\n    ...PROPS_VALUE,\n    ...PROPS_TYPE\n];\nfunction createUnhandleNodeError(type) {\n    return new Error(`unhandled node type: ${type}`);\n}\n\nfunction format(ast) {\n    const msg = (ctx) => formatParts(ctx, ast);\n    return msg;\n}\nfunction formatParts(ctx, ast) {\n    const body = resolveBody(ast);\n    if (body == null) {\n        throw createUnhandleNodeError(0 /* NodeTypes.Resource */);\n    }\n    const type = resolveType(body);\n    if (type === 1 /* NodeTypes.Plural */) {\n        const plural = body;\n        const cases = resolveCases(plural);\n        return ctx.plural(cases.reduce((messages, c) => [\n            ...messages,\n            formatMessageParts(ctx, c)\n        ], []));\n    }\n    else {\n        return formatMessageParts(ctx, body);\n    }\n}\nfunction formatMessageParts(ctx, node) {\n    const static_ = resolveStatic(node);\n    if (static_ != null) {\n        return ctx.type === 'text'\n            ? static_\n            : ctx.normalize([static_]);\n    }\n    else {\n        const messages = resolveItems(node).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);\n        return ctx.normalize(messages);\n    }\n}\nfunction formatMessagePart(ctx, node) {\n    const type = resolveType(node);\n    switch (type) {\n        case 3 /* NodeTypes.Text */: {\n            return resolveValue$1(node, type);\n        }\n        case 9 /* NodeTypes.Literal */: {\n            return resolveValue$1(node, type);\n        }\n        case 4 /* NodeTypes.Named */: {\n            const named = node;\n            if (hasOwn(named, 'k') && named.k) {\n                return ctx.interpolate(ctx.named(named.k));\n            }\n            if (hasOwn(named, 'key') && named.key) {\n                return ctx.interpolate(ctx.named(named.key));\n            }\n            throw createUnhandleNodeError(type);\n        }\n        case 5 /* NodeTypes.List */: {\n            const list = node;\n            if (hasOwn(list, 'i') && isNumber(list.i)) {\n                return ctx.interpolate(ctx.list(list.i));\n            }\n            if (hasOwn(list, 'index') && isNumber(list.index)) {\n                return ctx.interpolate(ctx.list(list.index));\n            }\n            throw createUnhandleNodeError(type);\n        }\n        case 6 /* NodeTypes.Linked */: {\n            const linked = node;\n            const modifier = resolveLinkedModifier(linked);\n            const key = resolveLinkedKey(linked);\n            return ctx.linked(formatMessagePart(ctx, key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);\n        }\n        case 7 /* NodeTypes.LinkedKey */: {\n            return resolveValue$1(node, type);\n        }\n        case 8 /* NodeTypes.LinkedModifier */: {\n            return resolveValue$1(node, type);\n        }\n        default:\n            throw new Error(`unhandled node on format message part: ${type}`);\n    }\n}\n\nconst WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;\nfunction checkHtmlMessage(source, warnHtmlMessage) {\n    if (warnHtmlMessage && detectHtmlTag(source)) {\n        warn(format$1(WARN_MESSAGE, { source }));\n    }\n}\nconst defaultOnCacheKey = (message) => message;\nlet compileCache = create();\nfunction clearCompileCache() {\n    compileCache = create();\n}\nfunction baseCompile(message, options = {}) {\n    // error detecting on compile\n    let detectError = false;\n    const onError = options.onError || defaultOnError;\n    options.onError = (err) => {\n        detectError = true;\n        onError(err);\n    };\n    // compile with mesasge-compiler\n    return { ...baseCompile$1(message, options), detectError };\n}\n/* #__NO_SIDE_EFFECTS__ */\nfunction compile(message, context) {\n    if ((!__INTLIFY_DROP_MESSAGE_COMPILER__) &&\n        isString(message)) {\n        // check HTML message\n        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)\n            ? context.warnHtmlMessage\n            : true;\n        (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);\n        // check caches\n        const onCacheKey = context.onCacheKey || defaultOnCacheKey;\n        const cacheKey = onCacheKey(message);\n        const cached = compileCache[cacheKey];\n        if (cached) {\n            return cached;\n        }\n        // compile with JIT mode\n        const { ast, detectError } = baseCompile(message, {\n            ...context,\n            location: (process.env.NODE_ENV !== 'production'),\n            jit: true\n        });\n        // compose message function from AST\n        const msg = format(ast);\n        // if occurred compile error, don't cache\n        return !detectError\n            ? (compileCache[cacheKey] = msg)\n            : msg;\n    }\n    else {\n        if ((process.env.NODE_ENV !== 'production') && !isMessageAST(message)) {\n            warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);\n            return (() => message);\n        }\n        // AST case (passed from bundler)\n        const cacheKey = message.cacheKey;\n        if (cacheKey) {\n            const cached = compileCache[cacheKey];\n            if (cached) {\n                return cached;\n            }\n            // compose message function from message (AST)\n            return (compileCache[cacheKey] =\n                format(message));\n        }\n        else {\n            return format(message);\n        }\n    }\n}\n\nlet devtools = null;\nfunction setDevToolsHook(hook) {\n    devtools = hook;\n}\nfunction getDevToolsHook() {\n    return devtools;\n}\nfunction initI18nDevTools(i18n, version, meta) {\n    // TODO: queue if devtools is undefined\n    devtools &&\n        devtools.emit('i18n:init', {\n            timestamp: Date.now(),\n            i18n,\n            version,\n            meta\n        });\n}\nconst translateDevTools = \n/* #__PURE__*/ createDevToolsHook('function:translate');\nfunction createDevToolsHook(hook) {\n    return (payloads) => devtools && devtools.emit(hook, payloads);\n}\n\nconst CoreErrorCodes = {\n    INVALID_ARGUMENT: COMPILE_ERROR_CODES_EXTEND_POINT, // 17\n    INVALID_DATE_ARGUMENT: 18,\n    INVALID_ISO_DATE_ARGUMENT: 19,\n    NOT_SUPPORT_NON_STRING_MESSAGE: 20,\n    NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,\n    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,\n    NOT_SUPPORT_LOCALE_TYPE: 23\n};\nconst CORE_ERROR_CODES_EXTEND_POINT = 24;\nfunction createCoreError(code) {\n    return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages } : undefined);\n}\n/** @internal */\nconst errorMessages = {\n    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',\n    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +\n        'Make sure your Date represents a valid date.',\n    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',\n    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',\n    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'\n};\n\n/** @internal */\nfunction getLocale(context, options) {\n    return options.locale != null\n        ? resolveLocale(options.locale)\n        : resolveLocale(context.locale);\n}\nlet _resolveLocale;\n/** @internal */\nfunction resolveLocale(locale) {\n    if (isString(locale)) {\n        return locale;\n    }\n    else {\n        if (isFunction(locale)) {\n            if (locale.resolvedOnce && _resolveLocale != null) {\n                return _resolveLocale;\n            }\n            else if (locale.constructor.name === 'Function') {\n                const resolve = locale();\n                if (isPromise(resolve)) {\n                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);\n                }\n                return (_resolveLocale = resolve);\n            }\n            else {\n                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);\n            }\n        }\n        else {\n            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);\n        }\n    }\n}\n/**\n * Fallback with simple implemenation\n *\n * @remarks\n * A fallback locale function implemented with a simple fallback algorithm.\n *\n * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithSimple(ctx, fallback, start) {\n    // prettier-ignore\n    return [...new Set([\n            start,\n            ...(isArray(fallback)\n                ? fallback\n                : isObject(fallback)\n                    ? Object.keys(fallback)\n                    : isString(fallback)\n                        ? [fallback]\n                        : [start])\n        ])];\n}\n/**\n * Fallback with locale chain\n *\n * @remarks\n * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.\n *\n * @param ctx - A {@link CoreContext | context}\n * @param fallback - A {@link FallbackLocale | fallback locale}\n * @param start - A starting {@link Locale | locale}\n *\n * @returns Fallback locales\n *\n * @VueI18nSee [Fallbacking](../guide/essentials/fallback)\n *\n * @VueI18nGeneral\n */\nfunction fallbackWithLocaleChain(ctx, fallback, start) {\n    const startLocale = isString(start) ? start : DEFAULT_LOCALE;\n    const context = ctx;\n    if (!context.__localeChainCache) {\n        context.__localeChainCache = new Map();\n    }\n    let chain = context.__localeChainCache.get(startLocale);\n    if (!chain) {\n        chain = [];\n        // first block defined by start\n        let block = [start];\n        // while any intervening block found\n        while (isArray(block)) {\n            block = appendBlockToChain(chain, block, fallback);\n        }\n        // prettier-ignore\n        // last block defined by default\n        const defaults = isArray(fallback) || !isPlainObject(fallback)\n            ? fallback\n            : fallback['default']\n                ? fallback['default']\n                : null;\n        // convert defaults to array\n        block = isString(defaults) ? [defaults] : defaults;\n        if (isArray(block)) {\n            appendBlockToChain(chain, block, false);\n        }\n        context.__localeChainCache.set(startLocale, chain);\n    }\n    return chain;\n}\nfunction appendBlockToChain(chain, block, blocks) {\n    let follow = true;\n    for (let i = 0; i < block.length && isBoolean(follow); i++) {\n        const locale = block[i];\n        if (isString(locale)) {\n            follow = appendLocaleToChain(chain, block[i], blocks);\n        }\n    }\n    return follow;\n}\nfunction appendLocaleToChain(chain, locale, blocks) {\n    let follow;\n    const tokens = locale.split('-');\n    do {\n        const target = tokens.join('-');\n        follow = appendItemToChain(chain, target, blocks);\n        tokens.splice(-1, 1);\n    } while (tokens.length && follow === true);\n    return follow;\n}\nfunction appendItemToChain(chain, target, blocks) {\n    let follow = false;\n    if (!chain.includes(target)) {\n        follow = true;\n        if (target) {\n            follow = target[target.length - 1] !== '!';\n            const locale = target.replace(/!/g, '');\n            chain.push(locale);\n            if ((isArray(blocks) || isPlainObject(blocks)) &&\n                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any\n            ) {\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                follow = blocks[locale];\n            }\n        }\n    }\n    return follow;\n}\n\nconst pathStateMachine = [];\npathStateMachine[0 /* States.BEFORE_PATH */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[1 /* States.IN_PATH */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],\n    [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]\n};\npathStateMachine[2 /* States.BEFORE_IDENT */] = {\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]\n};\npathStateMachine[3 /* States.IN_IDENT */] = {\n    [\"i\" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"0\" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],\n    [\"w\" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],\n    [\".\" /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]\n};\npathStateMachine[4 /* States.IN_SUB_PATH */] = {\n    [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],\n    [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],\n    [\"[\" /* PathCharTypes.LEFT_BRACKET */]: [\n        4 /* States.IN_SUB_PATH */,\n        2 /* Actions.INC_SUB_PATH_DEPTH */\n    ],\n    [\"]\" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]\n};\npathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {\n    [\"'\" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]\n};\npathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {\n    [\"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],\n    [\"o\" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,\n    [\"l\" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]\n};\n/**\n * Check if an expression is a literal value.\n */\nconst literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral(exp) {\n    return literalValueRE.test(exp);\n}\n/**\n * Strip quotes from a string\n */\nfunction stripQuotes(str) {\n    const a = str.charCodeAt(0);\n    const b = str.charCodeAt(str.length - 1);\n    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;\n}\n/**\n * Determine the type of a character in a keypath.\n */\nfunction getPathCharType(ch) {\n    if (ch === undefined || ch === null) {\n        return \"o\" /* PathCharTypes.END_OF_FAIL */;\n    }\n    const code = ch.charCodeAt(0);\n    switch (code) {\n        case 0x5b: // [\n        case 0x5d: // ]\n        case 0x2e: // .\n        case 0x22: // \"\n        case 0x27: // '\n            return ch;\n        case 0x5f: // _\n        case 0x24: // $\n        case 0x2d: // -\n            return \"i\" /* PathCharTypes.IDENT */;\n        case 0x09: // Tab (HT)\n        case 0x0a: // Newline (LF)\n        case 0x0d: // Return (CR)\n        case 0xa0: // No-break space (NBSP)\n        case 0xfeff: // Byte Order Mark (BOM)\n        case 0x2028: // Line Separator (LS)\n        case 0x2029: // Paragraph Separator (PS)\n            return \"w\" /* PathCharTypes.WORKSPACE */;\n    }\n    return \"i\" /* PathCharTypes.IDENT */;\n}\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\nfunction formatSubPath(path) {\n    const trimmed = path.trim();\n    // invalid leading 0\n    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {\n        return false;\n    }\n    return isLiteral(trimmed)\n        ? stripQuotes(trimmed)\n        : \"*\" /* PathCharTypes.ASTARISK */ + trimmed;\n}\n/**\n * Parse a string path into an array of segments\n */\nfunction parse(path) {\n    const keys = [];\n    let index = -1;\n    let mode = 0 /* States.BEFORE_PATH */;\n    let subPathDepth = 0;\n    let c;\n    let key; // eslint-disable-line\n    let newChar;\n    let type;\n    let transition;\n    let action;\n    let typeMap;\n    const actions = [];\n    actions[0 /* Actions.APPEND */] = () => {\n        if (key === undefined) {\n            key = newChar;\n        }\n        else {\n            key += newChar;\n        }\n    };\n    actions[1 /* Actions.PUSH */] = () => {\n        if (key !== undefined) {\n            keys.push(key);\n            key = undefined;\n        }\n    };\n    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {\n        actions[0 /* Actions.APPEND */]();\n        subPathDepth++;\n    };\n    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {\n        if (subPathDepth > 0) {\n            subPathDepth--;\n            mode = 4 /* States.IN_SUB_PATH */;\n            actions[0 /* Actions.APPEND */]();\n        }\n        else {\n            subPathDepth = 0;\n            if (key === undefined) {\n                return false;\n            }\n            key = formatSubPath(key);\n            if (key === false) {\n                return false;\n            }\n            else {\n                actions[1 /* Actions.PUSH */]();\n            }\n        }\n    };\n    function maybeUnescapeQuote() {\n        const nextChar = path[index + 1];\n        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&\n            nextChar === \"'\" /* PathCharTypes.SINGLE_QUOTE */) ||\n            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&\n                nextChar === \"\\\"\" /* PathCharTypes.DOUBLE_QUOTE */)) {\n            index++;\n            newChar = '\\\\' + nextChar;\n            actions[0 /* Actions.APPEND */]();\n            return true;\n        }\n    }\n    while (mode !== null) {\n        index++;\n        c = path[index];\n        if (c === '\\\\' && maybeUnescapeQuote()) {\n            continue;\n        }\n        type = getPathCharType(c);\n        typeMap = pathStateMachine[mode];\n        transition = typeMap[type] || typeMap[\"l\" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;\n        // check parse error\n        if (transition === 8 /* States.ERROR */) {\n            return;\n        }\n        mode = transition[0];\n        if (transition[1] !== undefined) {\n            action = actions[transition[1]];\n            if (action) {\n                newChar = c;\n                if (action() === false) {\n                    return;\n                }\n            }\n        }\n        // check parse finish\n        if (mode === 7 /* States.AFTER_PATH */) {\n            return keys;\n        }\n    }\n}\n// path token cache\nconst cache = new Map();\n/**\n * key-value message resolver\n *\n * @remarks\n * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveWithKeyValue(obj, path) {\n    return isObject(obj) ? obj[path] : null;\n}\n/**\n * message resolver\n *\n * @remarks\n * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.\n *\n * @param obj - A target object to be resolved with path\n * @param path - A {@link Path | path} to resolve the value of message\n *\n * @returns A resolved {@link PathValue | path value}\n *\n * @VueI18nGeneral\n */\nfunction resolveValue(obj, path) {\n    // check object\n    if (!isObject(obj)) {\n        return null;\n    }\n    // parse path\n    let hit = cache.get(path);\n    if (!hit) {\n        hit = parse(path);\n        if (hit) {\n            cache.set(path, hit);\n        }\n    }\n    // check hit\n    if (!hit) {\n        return null;\n    }\n    // resolve path value\n    const len = hit.length;\n    let last = obj;\n    let i = 0;\n    while (i < len) {\n        const key = hit[i];\n        /**\n         * NOTE:\n         * if `key` is intlify message format AST node key and `last` is intlify message format AST, skip it.\n         * because the AST node is not a key-value structure.\n         */\n        if (AST_NODE_PROPS_KEYS.includes(key) && isMessageAST(last)) {\n            return null;\n        }\n        const val = last[key];\n        if (val === undefined) {\n            return null;\n        }\n        if (isFunction(last)) {\n            return null;\n        }\n        last = val;\n        i++;\n    }\n    return last;\n}\n\nconst CoreWarnCodes = {\n    NOT_FOUND_KEY: 1,\n    FALLBACK_TO_TRANSLATE: 2,\n    CANNOT_FORMAT_NUMBER: 3,\n    FALLBACK_TO_NUMBER_FORMAT: 4,\n    CANNOT_FORMAT_DATE: 5,\n    FALLBACK_TO_DATE_FORMAT: 6,\n    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7\n};\nconst CORE_WARN_CODES_EXTEND_POINT = 8;\n/** @internal */\nconst warnMessages = {\n    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,\n    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,\n    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,\n    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,\n    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`\n};\nfunction getWarnMessage(code, ...args) {\n    return format$1(warnMessages[code], ...args);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Intlify core-base version\n * @internal\n */\nconst VERSION = '11.1.11';\nconst NOT_REOSLVED = -1;\nconst DEFAULT_LOCALE = 'en-US';\nconst MISSING_RESOLVE_VALUE = '';\nconst capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;\nfunction getDefaultLinkedModifiers() {\n    return {\n        upper: (val, type) => {\n            // prettier-ignore\n            return type === 'text' && isString(val)\n                ? val.toUpperCase()\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? val.children.toUpperCase()\n                    : val;\n        },\n        lower: (val, type) => {\n            // prettier-ignore\n            return type === 'text' && isString(val)\n                ? val.toLowerCase()\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? val.children.toLowerCase()\n                    : val;\n        },\n        capitalize: (val, type) => {\n            // prettier-ignore\n            return (type === 'text' && isString(val)\n                ? capitalize(val)\n                : type === 'vnode' && isObject(val) && '__v_isVNode' in val\n                    ? capitalize(val.children)\n                    : val);\n        }\n    };\n}\nlet _compiler;\nfunction registerMessageCompiler(compiler) {\n    _compiler = compiler;\n}\nlet _resolver;\n/**\n * Register the message resolver\n *\n * @param resolver - A {@link MessageResolver} function\n *\n * @VueI18nGeneral\n */\nfunction registerMessageResolver(resolver) {\n    _resolver = resolver;\n}\nlet _fallbacker;\n/**\n * Register the locale fallbacker\n *\n * @param fallbacker - A {@link LocaleFallbacker} function\n *\n * @VueI18nGeneral\n */\nfunction registerLocaleFallbacker(fallbacker) {\n    _fallbacker = fallbacker;\n}\n// Additional Meta for Intlify DevTools\nlet _additionalMeta = null;\n/* #__NO_SIDE_EFFECTS__ */\nconst setAdditionalMeta = (meta) => {\n    _additionalMeta = meta;\n};\n/* #__NO_SIDE_EFFECTS__ */\nconst getAdditionalMeta = () => _additionalMeta;\nlet _fallbackContext = null;\nconst setFallbackContext = (context) => {\n    _fallbackContext = context;\n};\nconst getFallbackContext = () => _fallbackContext;\n// ID for CoreContext\nlet _cid = 0;\nfunction createCoreContext(options = {}) {\n    // setup options\n    const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;\n    const version = isString(options.version) ? options.version : VERSION;\n    const locale = isString(options.locale) || isFunction(options.locale)\n        ? options.locale\n        : DEFAULT_LOCALE;\n    const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;\n    const fallbackLocale = isArray(options.fallbackLocale) ||\n        isPlainObject(options.fallbackLocale) ||\n        isString(options.fallbackLocale) ||\n        options.fallbackLocale === false\n        ? options.fallbackLocale\n        : _locale;\n    const messages = isPlainObject(options.messages)\n        ? options.messages\n        : createResources(_locale);\n    const datetimeFormats = isPlainObject(options.datetimeFormats)\n            ? options.datetimeFormats\n            : createResources(_locale)\n        ;\n    const numberFormats = isPlainObject(options.numberFormats)\n            ? options.numberFormats\n            : createResources(_locale)\n        ;\n    const modifiers = assign(create(), options.modifiers, getDefaultLinkedModifiers());\n    const pluralRules = options.pluralRules || create();\n    const missing = isFunction(options.missing) ? options.missing : null;\n    const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n        ? options.missingWarn\n        : true;\n    const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n        ? options.fallbackWarn\n        : true;\n    const fallbackFormat = !!options.fallbackFormat;\n    const unresolving = !!options.unresolving;\n    const postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : null;\n    const processor = isPlainObject(options.processor) ? options.processor : null;\n    const warnHtmlMessage = isBoolean(options.warnHtmlMessage)\n        ? options.warnHtmlMessage\n        : true;\n    const escapeParameter = !!options.escapeParameter;\n    const messageCompiler = isFunction(options.messageCompiler)\n        ? options.messageCompiler\n        : _compiler;\n    if ((process.env.NODE_ENV !== 'production') &&\n        !false &&\n        !false &&\n        isFunction(options.messageCompiler)) {\n        warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));\n    }\n    const messageResolver = isFunction(options.messageResolver)\n        ? options.messageResolver\n        : _resolver || resolveWithKeyValue;\n    const localeFallbacker = isFunction(options.localeFallbacker)\n        ? options.localeFallbacker\n        : _fallbacker || fallbackWithSimple;\n    const fallbackContext = isObject(options.fallbackContext)\n        ? options.fallbackContext\n        : undefined;\n    // setup internal options\n    const internalOptions = options;\n    const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)\n            ? internalOptions.__datetimeFormatters\n            : new Map()\n        ;\n    const __numberFormatters = isObject(internalOptions.__numberFormatters)\n            ? internalOptions.__numberFormatters\n            : new Map()\n        ;\n    const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};\n    _cid++;\n    const context = {\n        version,\n        cid: _cid,\n        locale,\n        fallbackLocale,\n        messages,\n        modifiers,\n        pluralRules,\n        missing,\n        missingWarn,\n        fallbackWarn,\n        fallbackFormat,\n        unresolving,\n        postTranslation,\n        processor,\n        warnHtmlMessage,\n        escapeParameter,\n        messageCompiler,\n        messageResolver,\n        localeFallbacker,\n        fallbackContext,\n        onWarn,\n        __meta\n    };\n    {\n        context.datetimeFormats = datetimeFormats;\n        context.numberFormats = numberFormats;\n        context.__datetimeFormatters = __datetimeFormatters;\n        context.__numberFormatters = __numberFormatters;\n    }\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        context.__v_emitter =\n            internalOptions.__v_emitter != null\n                ? internalOptions.__v_emitter\n                : undefined;\n    }\n    // NOTE: experimental !!\n    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n        initI18nDevTools(context, version, __meta);\n    }\n    return context;\n}\nconst createResources = (locale) => ({ [locale]: create() });\n/** @internal */\nfunction isTranslateFallbackWarn(fallback, key) {\n    return fallback instanceof RegExp ? fallback.test(key) : fallback;\n}\n/** @internal */\nfunction isTranslateMissingWarn(missing, key) {\n    return missing instanceof RegExp ? missing.test(key) : missing;\n}\n/** @internal */\nfunction handleMissing(context, key, locale, missingWarn, type) {\n    const { missing, onWarn } = context;\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        const emitter = context.__v_emitter;\n        if (emitter) {\n            emitter.emit('missing', {\n                locale,\n                key,\n                type,\n                groupId: `${type}:${key}`\n            });\n        }\n    }\n    if (missing !== null) {\n        const ret = missing(context, locale, key, type);\n        return isString(ret) ? ret : key;\n    }\n    else {\n        if ((process.env.NODE_ENV !== 'production') && isTranslateMissingWarn(missingWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));\n        }\n        return key;\n    }\n}\n/** @internal */\nfunction updateFallbackLocale(ctx, locale, fallback) {\n    const context = ctx;\n    context.__localeChainCache = new Map();\n    ctx.localeFallbacker(ctx, fallback, locale);\n}\n/** @internal */\nfunction isAlmostSameLocale(locale, compareLocale) {\n    if (locale === compareLocale)\n        return false;\n    return locale.split('-')[0] === compareLocale.split('-')[0];\n}\n/** @internal */\nfunction isImplicitFallback(targetLocale, locales) {\n    const index = locales.indexOf(targetLocale);\n    if (index === -1) {\n        return false;\n    }\n    for (let i = index + 1; i < locales.length; i++) {\n        if (isAlmostSameLocale(targetLocale, locales[i])) {\n            return true;\n        }\n    }\n    return false;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst intlDefined = typeof Intl !== 'undefined';\nconst Availabilities = {\n    dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n    numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n};\n\n// implementation of `datetime` function\nfunction datetime(context, ...args) {\n    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n    const { __datetimeFormatters } = context;\n    if ((process.env.NODE_ENV !== 'production') && !Availabilities.dateTimeFormat) {\n        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));\n        return MISSING_RESOLVE_VALUE;\n    }\n    const [key, value, options, overrides] = parseDateTimeArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const part = !!options.part;\n    const locale = getLocale(context, options);\n    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n    fallbackLocale, locale);\n    if (!isString(key) || key === '') {\n        return new Intl.DateTimeFormat(locale, overrides).format(value);\n    }\n    // resolve format\n    let datetimeFormat = {};\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'datetime format';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit('fallback', {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        datetimeFormat =\n            datetimeFormats[targetLocale] || {};\n        format = datetimeFormat[key];\n        if (isPlainObject(format))\n            break;\n        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n        from = to;\n    }\n    // checking format and target locale\n    if (!isPlainObject(format) || !isString(targetLocale)) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    let id = `${targetLocale}__${key}`;\n    if (!isEmptyObject(overrides)) {\n        id = `${id}__${JSON.stringify(overrides)}`;\n    }\n    let formatter = __datetimeFormatters.get(id);\n    if (!formatter) {\n        formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));\n        __datetimeFormatters.set(id, formatter);\n    }\n    return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst DATETIME_FORMAT_OPTIONS_KEYS = [\n    'localeMatcher',\n    'weekday',\n    'era',\n    'year',\n    'month',\n    'day',\n    'hour',\n    'minute',\n    'second',\n    'timeZoneName',\n    'formatMatcher',\n    'hour12',\n    'timeZone',\n    'dateStyle',\n    'timeStyle',\n    'calendar',\n    'dayPeriod',\n    'numberingSystem',\n    'hourCycle',\n    'fractionalSecondDigits'\n];\n/** @internal */\nfunction parseDateTimeArgs(...args) {\n    const [arg1, arg2, arg3, arg4] = args;\n    const options = create();\n    let overrides = create();\n    let value;\n    if (isString(arg1)) {\n        // Only allow ISO strings - other date formats are often supported,\n        // but may cause different results in different browsers.\n        const matches = arg1.match(/(\\d{4}-\\d{2}-\\d{2})(T|\\s)?(.*)/);\n        if (!matches) {\n            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n        }\n        // Some browsers can not parse the iso datetime separated by space,\n        // this is a compromise solution by replace the 'T'/' ' with 'T'\n        const dateTime = matches[3]\n            ? matches[3].trim().startsWith('T')\n                ? `${matches[1].trim()}${matches[3].trim()}`\n                : `${matches[1].trim()}T${matches[3].trim()}`\n            : matches[1].trim();\n        value = new Date(dateTime);\n        try {\n            // This will fail if the date is not valid\n            value.toISOString();\n        }\n        catch {\n            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);\n        }\n    }\n    else if (isDate(arg1)) {\n        if (isNaN(arg1.getTime())) {\n            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);\n        }\n        value = arg1;\n    }\n    else if (isNumber(arg1)) {\n        value = arg1;\n    }\n    else {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    if (isString(arg2)) {\n        options.key = arg2;\n    }\n    else if (isPlainObject(arg2)) {\n        Object.keys(arg2).forEach(key => {\n            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {\n                overrides[key] = arg2[key];\n            }\n            else {\n                options[key] = arg2[key];\n            }\n        });\n    }\n    if (isString(arg3)) {\n        options.locale = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        overrides = arg3;\n    }\n    if (isPlainObject(arg4)) {\n        overrides = arg4;\n    }\n    return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearDateTimeFormat(ctx, locale, format) {\n    const context = ctx;\n    for (const key in format) {\n        const id = `${locale}__${key}`;\n        if (!context.__datetimeFormatters.has(id)) {\n            continue;\n        }\n        context.__datetimeFormatters.delete(id);\n    }\n}\n\n// implementation of `number` function\nfunction number(context, ...args) {\n    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;\n    const { __numberFormatters } = context;\n    if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {\n        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));\n        return MISSING_RESOLVE_VALUE;\n    }\n    const [key, value, options, overrides] = parseNumberArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const part = !!options.part;\n    const locale = getLocale(context, options);\n    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n    fallbackLocale, locale);\n    if (!isString(key) || key === '') {\n        return new Intl.NumberFormat(locale, overrides).format(value);\n    }\n    // resolve format\n    let numberFormat = {};\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'number format';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit('fallback', {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        numberFormat =\n            numberFormats[targetLocale] || {};\n        format = numberFormat[key];\n        if (isPlainObject(format))\n            break;\n        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any\n        from = to;\n    }\n    // checking format and target locale\n    if (!isPlainObject(format) || !isString(targetLocale)) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    let id = `${targetLocale}__${key}`;\n    if (!isEmptyObject(overrides)) {\n        id = `${id}__${JSON.stringify(overrides)}`;\n    }\n    let formatter = __numberFormatters.get(id);\n    if (!formatter) {\n        formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));\n        __numberFormatters.set(id, formatter);\n    }\n    return !part ? formatter.format(value) : formatter.formatToParts(value);\n}\n/** @internal */\nconst NUMBER_FORMAT_OPTIONS_KEYS = [\n    'localeMatcher',\n    'style',\n    'currency',\n    'currencyDisplay',\n    'currencySign',\n    'useGrouping',\n    'minimumIntegerDigits',\n    'minimumFractionDigits',\n    'maximumFractionDigits',\n    'minimumSignificantDigits',\n    'maximumSignificantDigits',\n    'compactDisplay',\n    'notation',\n    'signDisplay',\n    'unit',\n    'unitDisplay',\n    'roundingMode',\n    'roundingPriority',\n    'roundingIncrement',\n    'trailingZeroDisplay'\n];\n/** @internal */\nfunction parseNumberArgs(...args) {\n    const [arg1, arg2, arg3, arg4] = args;\n    const options = create();\n    let overrides = create();\n    if (!isNumber(arg1)) {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    const value = arg1;\n    if (isString(arg2)) {\n        options.key = arg2;\n    }\n    else if (isPlainObject(arg2)) {\n        Object.keys(arg2).forEach(key => {\n            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {\n                overrides[key] = arg2[key];\n            }\n            else {\n                options[key] = arg2[key];\n            }\n        });\n    }\n    if (isString(arg3)) {\n        options.locale = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        overrides = arg3;\n    }\n    if (isPlainObject(arg4)) {\n        overrides = arg4;\n    }\n    return [options.key || '', value, options, overrides];\n}\n/** @internal */\nfunction clearNumberFormat(ctx, locale, format) {\n    const context = ctx;\n    for (const key in format) {\n        const id = `${locale}__${key}`;\n        if (!context.__numberFormatters.has(id)) {\n            continue;\n        }\n        context.__numberFormatters.delete(id);\n    }\n}\n\nconst DEFAULT_MODIFIER = (str) => str;\nconst DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line\nconst DEFAULT_MESSAGE_DATA_TYPE = 'text';\nconst DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);\nconst DEFAULT_INTERPOLATE = toDisplayString;\nfunction pluralDefault(choice, choicesLength) {\n    choice = Math.abs(choice);\n    if (choicesLength === 2) {\n        // prettier-ignore\n        return choice\n            ? choice > 1\n                ? 1\n                : 0\n            : 1;\n    }\n    return choice ? Math.min(choice, 2) : 0;\n}\nfunction getPluralIndex(options) {\n    // prettier-ignore\n    const index = isNumber(options.pluralIndex)\n        ? options.pluralIndex\n        : -1;\n    // prettier-ignore\n    return options.named && (isNumber(options.named.count) || isNumber(options.named.n))\n        ? isNumber(options.named.count)\n            ? options.named.count\n            : isNumber(options.named.n)\n                ? options.named.n\n                : index\n        : index;\n}\nfunction normalizeNamed(pluralIndex, props) {\n    if (!props.count) {\n        props.count = pluralIndex;\n    }\n    if (!props.n) {\n        props.n = pluralIndex;\n    }\n}\nfunction createMessageContext(options = {}) {\n    const locale = options.locale;\n    const pluralIndex = getPluralIndex(options);\n    const pluralRule = isObject(options.pluralRules) &&\n        isString(locale) &&\n        isFunction(options.pluralRules[locale])\n        ? options.pluralRules[locale]\n        : pluralDefault;\n    const orgPluralRule = isObject(options.pluralRules) &&\n        isString(locale) &&\n        isFunction(options.pluralRules[locale])\n        ? pluralDefault\n        : undefined;\n    const plural = (messages) => {\n        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];\n    };\n    const _list = options.list || [];\n    const list = (index) => _list[index];\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const _named = options.named || create();\n    isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);\n    const named = (key) => _named[key];\n    function message(key, useLinked) {\n        // prettier-ignore\n        const msg = isFunction(options.messages)\n            ? options.messages(key, !!useLinked)\n            : isObject(options.messages)\n                ? options.messages[key]\n                : false;\n        return !msg\n            ? options.parent\n                ? options.parent.message(key) // resolve from parent messages\n                : DEFAULT_MESSAGE\n            : msg;\n    }\n    const _modifier = (name) => options.modifiers\n        ? options.modifiers[name]\n        : DEFAULT_MODIFIER;\n    const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)\n        ? options.processor.normalize\n        : DEFAULT_NORMALIZE;\n    const interpolate = isPlainObject(options.processor) &&\n        isFunction(options.processor.interpolate)\n        ? options.processor.interpolate\n        : DEFAULT_INTERPOLATE;\n    const type = isPlainObject(options.processor) && isString(options.processor.type)\n        ? options.processor.type\n        : DEFAULT_MESSAGE_DATA_TYPE;\n    const linked = (key, ...args) => {\n        const [arg1, arg2] = args;\n        let type = 'text';\n        let modifier = '';\n        if (args.length === 1) {\n            if (isObject(arg1)) {\n                modifier = arg1.modifier || modifier;\n                type = arg1.type || type;\n            }\n            else if (isString(arg1)) {\n                modifier = arg1 || modifier;\n            }\n        }\n        else if (args.length === 2) {\n            if (isString(arg1)) {\n                modifier = arg1 || modifier;\n            }\n            if (isString(arg2)) {\n                type = arg2 || type;\n            }\n        }\n        const ret = message(key, true)(ctx);\n        const msg = \n        // The message in vnode resolved with linked are returned as an array by processor.nomalize\n        type === 'vnode' && isArray(ret) && modifier\n            ? ret[0]\n            : ret;\n        return modifier ? _modifier(modifier)(msg, type) : msg;\n    };\n    const ctx = {\n        [\"list\" /* HelperNameMap.LIST */]: list,\n        [\"named\" /* HelperNameMap.NAMED */]: named,\n        [\"plural\" /* HelperNameMap.PLURAL */]: plural,\n        [\"linked\" /* HelperNameMap.LINKED */]: linked,\n        [\"message\" /* HelperNameMap.MESSAGE */]: message,\n        [\"type\" /* HelperNameMap.TYPE */]: type,\n        [\"interpolate\" /* HelperNameMap.INTERPOLATE */]: interpolate,\n        [\"normalize\" /* HelperNameMap.NORMALIZE */]: normalize,\n        [\"values\" /* HelperNameMap.VALUES */]: assign(create(), _list, _named)\n    };\n    return ctx;\n}\n\nconst NOOP_MESSAGE_FUNCTION = () => '';\nconst isMessageFunction = (val) => isFunction(val);\n// implementation of `translate` function\nfunction translate(context, ...args) {\n    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;\n    const [key, options] = parseTranslateArgs(...args);\n    const missingWarn = isBoolean(options.missingWarn)\n        ? options.missingWarn\n        : context.missingWarn;\n    const fallbackWarn = isBoolean(options.fallbackWarn)\n        ? options.fallbackWarn\n        : context.fallbackWarn;\n    const escapeParameter = isBoolean(options.escapeParameter)\n        ? options.escapeParameter\n        : context.escapeParameter;\n    const resolvedMessage = !!options.resolvedMessage;\n    // prettier-ignore\n    const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option\n        ? !isBoolean(options.default)\n            ? options.default\n            : (!messageCompiler ? () => key : key)\n        : fallbackFormat // default by `fallbackFormat` option\n            ? (!messageCompiler ? () => key : key)\n            : null;\n    const enableDefaultMsg = fallbackFormat ||\n        (defaultMsgOrKey != null &&\n            (isString(defaultMsgOrKey) || isFunction(defaultMsgOrKey)));\n    const locale = getLocale(context, options);\n    // escape params\n    escapeParameter && escapeParams(options);\n    // resolve message format\n    // eslint-disable-next-line prefer-const\n    let [formatScope, targetLocale, message] = !resolvedMessage\n        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)\n        : [\n            key,\n            locale,\n            messages[locale] || create()\n        ];\n    // NOTE:\n    //  Fix to work around `ssrTransfrom` bug in Vite.\n    //  https://github.com/vitejs/vite/issues/4306\n    //  To get around this, use temporary variables.\n    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243\n    let format = formatScope;\n    // if you use default message, set it as message format!\n    let cacheBaseKey = key;\n    if (!resolvedMessage &&\n        !(isString(format) ||\n            isMessageAST(format) ||\n            isMessageFunction(format))) {\n        if (enableDefaultMsg) {\n            format = defaultMsgOrKey;\n            cacheBaseKey = format;\n        }\n    }\n    // checking message format and target locale\n    if (!resolvedMessage &&\n        (!(isString(format) ||\n            isMessageAST(format) ||\n            isMessageFunction(format)) ||\n            !isString(targetLocale))) {\n        return unresolving ? NOT_REOSLVED : key;\n    }\n    // TODO: refactor\n    if ((process.env.NODE_ENV !== 'production') && isString(format) && context.messageCompiler == null) {\n        warn(`The message format compilation is not supported in this build. ` +\n            `Because message compiler isn't included. ` +\n            `You need to pre-compilation all message format. ` +\n            `So translate function return '${key}'.`);\n        return key;\n    }\n    // setup compile error detecting\n    let occurred = false;\n    const onError = () => {\n        occurred = true;\n    };\n    // compile message format\n    const msg = !isMessageFunction(format)\n        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)\n        : format;\n    // if occurred compile error, return the message format\n    if (occurred) {\n        return format;\n    }\n    // evaluate message with context\n    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);\n    const msgContext = createMessageContext(ctxOptions);\n    const messaged = evaluateMessage(context, msg, msgContext);\n    // if use post translation option, proceed it with handler\n    let ret = postTranslation\n        ? postTranslation(messaged, key)\n        : messaged;\n    // apply HTML sanitization for security\n    if (escapeParameter && isString(ret)) {\n        ret = sanitizeTranslatedHtml(ret);\n    }\n    // NOTE: experimental !!\n    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n        // prettier-ignore\n        const payloads = {\n            timestamp: Date.now(),\n            key: isString(key)\n                ? key\n                : isMessageFunction(format)\n                    ? format.key\n                    : '',\n            locale: targetLocale || (isMessageFunction(format)\n                ? format.locale\n                : ''),\n            format: isString(format)\n                ? format\n                : isMessageFunction(format)\n                    ? format.source\n                    : '',\n            message: ret\n        };\n        payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});\n        translateDevTools(payloads);\n    }\n    return ret;\n}\nfunction escapeParams(options) {\n    if (isArray(options.list)) {\n        options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);\n    }\n    else if (isObject(options.named)) {\n        Object.keys(options.named).forEach(key => {\n            if (isString(options.named[key])) {\n                options.named[key] = escapeHtml(options.named[key]);\n            }\n        });\n    }\n}\nfunction resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {\n    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;\n    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any\n    let message = create();\n    let targetLocale;\n    let format = null;\n    let from = locale;\n    let to = null;\n    const type = 'translate';\n    for (let i = 0; i < locales.length; i++) {\n        targetLocale = to = locales[i];\n        if ((process.env.NODE_ENV !== 'production') &&\n            locale !== targetLocale &&\n            !isAlmostSameLocale(locale, targetLocale) &&\n            isTranslateFallbackWarn(fallbackWarn, key)) {\n            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {\n                key,\n                target: targetLocale\n            }));\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {\n            const emitter = context.__v_emitter;\n            if (emitter) {\n                emitter.emit('fallback', {\n                    type,\n                    key,\n                    from,\n                    to,\n                    groupId: `${type}:${key}`\n                });\n            }\n        }\n        message =\n            messages[targetLocale] || create();\n        // for vue-devtools timeline event\n        let start = null;\n        let startTag;\n        let endTag;\n        if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n            start = window.performance.now();\n            startTag = 'intlify-message-resolve-start';\n            endTag = 'intlify-message-resolve-end';\n            mark && mark(startTag);\n        }\n        if ((format = resolveValue(message, key)) === null) {\n            // if null, resolve with object key path\n            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any\n        }\n        // for vue-devtools timeline event\n        if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n            const end = window.performance.now();\n            const emitter = context.__v_emitter;\n            if (emitter && start && format) {\n                emitter.emit('message-resolve', {\n                    type: 'message-resolve',\n                    key,\n                    message: format,\n                    time: end - start,\n                    groupId: `${type}:${key}`\n                });\n            }\n            if (startTag && endTag && mark && measure) {\n                mark(endTag);\n                measure('intlify message resolve', startTag, endTag);\n            }\n        }\n        if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {\n            break;\n        }\n        if (!isImplicitFallback(targetLocale, locales)) {\n            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any\n            key, targetLocale, missingWarn, type);\n            if (missingRet !== key) {\n                format = missingRet;\n            }\n        }\n        from = to;\n    }\n    return [format, targetLocale, message];\n}\nfunction compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {\n    const { messageCompiler, warnHtmlMessage } = context;\n    if (isMessageFunction(format)) {\n        const msg = format;\n        msg.locale = msg.locale || targetLocale;\n        msg.key = msg.key || key;\n        return msg;\n    }\n    if (messageCompiler == null) {\n        const msg = (() => format);\n        msg.locale = targetLocale;\n        msg.key = key;\n        return msg;\n    }\n    // for vue-devtools timeline event\n    let start = null;\n    let startTag;\n    let endTag;\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        start = window.performance.now();\n        startTag = 'intlify-message-compilation-start';\n        endTag = 'intlify-message-compilation-end';\n        mark && mark(startTag);\n    }\n    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        const end = window.performance.now();\n        const emitter = context.__v_emitter;\n        if (emitter && start) {\n            emitter.emit('message-compilation', {\n                type: 'message-compilation',\n                message: format,\n                time: end - start,\n                groupId: `${'translate'}:${key}`\n            });\n        }\n        if (startTag && endTag && mark && measure) {\n            mark(endTag);\n            measure('intlify message compilation', startTag, endTag);\n        }\n    }\n    msg.locale = targetLocale;\n    msg.key = key;\n    msg.source = format;\n    return msg;\n}\nfunction evaluateMessage(context, msg, msgCtx) {\n    // for vue-devtools timeline event\n    let start = null;\n    let startTag;\n    let endTag;\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        start = window.performance.now();\n        startTag = 'intlify-message-evaluation-start';\n        endTag = 'intlify-message-evaluation-end';\n        mark && mark(startTag);\n    }\n    const messaged = msg(msgCtx);\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production') && inBrowser) {\n        const end = window.performance.now();\n        const emitter = context.__v_emitter;\n        if (emitter && start) {\n            emitter.emit('message-evaluation', {\n                type: 'message-evaluation',\n                value: messaged,\n                time: end - start,\n                groupId: `${'translate'}:${msg.key}`\n            });\n        }\n        if (startTag && endTag && mark && measure) {\n            mark(endTag);\n            measure('intlify message evaluation', startTag, endTag);\n        }\n    }\n    return messaged;\n}\n/** @internal */\nfunction parseTranslateArgs(...args) {\n    const [arg1, arg2, arg3] = args;\n    const options = create();\n    if (!isString(arg1) &&\n        !isNumber(arg1) &&\n        !isMessageFunction(arg1) &&\n        !isMessageAST(arg1)) {\n        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);\n    }\n    // prettier-ignore\n    const key = isNumber(arg1)\n        ? String(arg1)\n        : isMessageFunction(arg1)\n            ? arg1\n            : arg1;\n    if (isNumber(arg2)) {\n        options.plural = arg2;\n    }\n    else if (isString(arg2)) {\n        options.default = arg2;\n    }\n    else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {\n        options.named = arg2;\n    }\n    else if (isArray(arg2)) {\n        options.list = arg2;\n    }\n    if (isNumber(arg3)) {\n        options.plural = arg3;\n    }\n    else if (isString(arg3)) {\n        options.default = arg3;\n    }\n    else if (isPlainObject(arg3)) {\n        assign(options, arg3);\n    }\n    return [key, options];\n}\nfunction getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {\n    return {\n        locale,\n        key,\n        warnHtmlMessage,\n        onError: (err) => {\n            onError && onError(err);\n            if ((process.env.NODE_ENV !== 'production')) {\n                const _source = getSourceForCodeFrame(source);\n                const message = `Message compilation error: ${err.message}`;\n                const codeFrame = err.location &&\n                    _source &&\n                    generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);\n                const emitter = context.__v_emitter;\n                if (emitter && _source) {\n                    emitter.emit('compile-error', {\n                        message: _source,\n                        error: err.message,\n                        start: err.location && err.location.start.offset,\n                        end: err.location && err.location.end.offset,\n                        groupId: `${'translate'}:${key}`\n                    });\n                }\n                console.error(codeFrame ? `${message}\\n${codeFrame}` : message);\n            }\n            else {\n                throw err;\n            }\n        },\n        onCacheKey: (source) => generateFormatCacheKey(locale, key, source)\n    };\n}\nfunction getSourceForCodeFrame(source) {\n    if (isString(source)) {\n        return source;\n    }\n    else {\n        if (source.loc && source.loc.source) {\n            return source.loc.source;\n        }\n    }\n}\nfunction getMessageContextOptions(context, locale, message, options) {\n    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;\n    const resolveMessage = (key, useLinked) => {\n        let val = resolveValue(message, key);\n        // fallback\n        if (val == null && (fallbackContext || useLinked)) {\n            const [, , message] = resolveMessageFormat(fallbackContext || context, // NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context\n            key, locale, fallbackLocale, fallbackWarn, missingWarn);\n            val = resolveValue(message, key);\n        }\n        if (isString(val) || isMessageAST(val)) {\n            let occurred = false;\n            const onError = () => {\n                occurred = true;\n            };\n            const msg = compileMessageFormat(context, key, locale, val, key, onError);\n            return !occurred\n                ? msg\n                : NOOP_MESSAGE_FUNCTION;\n        }\n        else if (isMessageFunction(val)) {\n            return val;\n        }\n        else {\n            // TODO: should be implemented warning message\n            return NOOP_MESSAGE_FUNCTION;\n        }\n    };\n    const ctxOptions = {\n        locale,\n        modifiers,\n        pluralRules,\n        messages: resolveMessage\n    };\n    if (context.processor) {\n        ctxOptions.processor = context.processor;\n    }\n    if (options.list) {\n        ctxOptions.list = options.list;\n    }\n    if (options.named) {\n        ctxOptions.named = options.named;\n    }\n    if (isNumber(options.plural)) {\n        ctxOptions.pluralIndex = options.plural;\n    }\n    return ctxOptions;\n}\n\n{\n    initFeatureFlags();\n}\n\nexport { AST_NODE_PROPS_KEYS, CORE_ERROR_CODES_EXTEND_POINT, CORE_WARN_CODES_EXTEND_POINT, CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compile, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getLocale, getWarnMessage, handleMissing, initI18nDevTools, isAlmostSameLocale, isImplicitFallback, isMessageAST, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveLocale, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };\n","export function getDevtoolsGlobalHook() {\n    return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n    // @ts-expect-error navigator and windows are not available in all environments\n    return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n        ? window\n        : typeof globalThis !== 'undefined'\n            ? globalThis\n            : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n","export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n","let supported;\nlet perf;\nexport function isPerformanceSupported() {\n    var _a;\n    if (supported !== undefined) {\n        return supported;\n    }\n    if (typeof window !== 'undefined' && window.performance) {\n        supported = true;\n        perf = window.performance;\n    }\n    else if (typeof globalThis !== 'undefined' && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n        supported = true;\n        perf = globalThis.perf_hooks.performance;\n    }\n    else {\n        supported = false;\n    }\n    return supported;\n}\nexport function now() {\n    return isPerformanceSupported() ? perf.now() : Date.now();\n}\n","import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n    constructor(plugin, hook) {\n        this.target = null;\n        this.targetQueue = [];\n        this.onQueue = [];\n        this.plugin = plugin;\n        this.hook = hook;\n        const defaultSettings = {};\n        if (plugin.settings) {\n            for (const id in plugin.settings) {\n                const item = plugin.settings[id];\n                defaultSettings[id] = item.defaultValue;\n            }\n        }\n        const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n        let currentSettings = Object.assign({}, defaultSettings);\n        try {\n            const raw = localStorage.getItem(localSettingsSaveId);\n            const data = JSON.parse(raw);\n            Object.assign(currentSettings, data);\n        }\n        catch (e) {\n            // noop\n        }\n        this.fallbacks = {\n            getSettings() {\n                return currentSettings;\n            },\n            setSettings(value) {\n                try {\n                    localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n                }\n                catch (e) {\n                    // noop\n                }\n                currentSettings = value;\n            },\n            now() {\n                return now();\n            },\n        };\n        if (hook) {\n            hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n                if (pluginId === this.plugin.id) {\n                    this.fallbacks.setSettings(value);\n                }\n            });\n        }\n        this.proxiedOn = new Proxy({}, {\n            get: (_target, prop) => {\n                if (this.target) {\n                    return this.target.on[prop];\n                }\n                else {\n                    return (...args) => {\n                        this.onQueue.push({\n                            method: prop,\n                            args,\n                        });\n                    };\n                }\n            },\n        });\n        this.proxiedTarget = new Proxy({}, {\n            get: (_target, prop) => {\n                if (this.target) {\n                    return this.target[prop];\n                }\n                else if (prop === 'on') {\n                    return this.proxiedOn;\n                }\n                else if (Object.keys(this.fallbacks).includes(prop)) {\n                    return (...args) => {\n                        this.targetQueue.push({\n                            method: prop,\n                            args,\n                            resolve: () => { },\n                        });\n                        return this.fallbacks[prop](...args);\n                    };\n                }\n                else {\n                    return (...args) => {\n                        return new Promise((resolve) => {\n                            this.targetQueue.push({\n                                method: prop,\n                                args,\n                                resolve,\n                            });\n                        });\n                    };\n                }\n            },\n        });\n    }\n    async setRealTarget(target) {\n        this.target = target;\n        for (const item of this.onQueue) {\n            this.target.on[item.method](...item.args);\n        }\n        for (const item of this.targetQueue) {\n            item.resolve(await this.target[item.method](...item.args));\n        }\n    }\n}\n","import { getDevtoolsGlobalHook, getTarget, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from './proxy.js';\nexport * from './api/index.js';\nexport * from './plugin.js';\nexport * from './time.js';\nexport function setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n    const descriptor = pluginDescriptor;\n    const target = getTarget();\n    const hook = getDevtoolsGlobalHook();\n    const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n    if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n        hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n    }\n    else {\n        const proxy = enableProxy ? new ApiProxy(descriptor, hook) : null;\n        const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n        list.push({\n            pluginDescriptor: descriptor,\n            setupFn,\n            proxy,\n        });\n        if (proxy) {\n            setupFn(proxy.proxiedTarget);\n        }\n    }\n}\n","/*!\n  * vue-i18n v11.1.11\n  * (c) 2025 kazuya kawaguchi\n  * Released under the MIT License.\n  */\nimport { CORE_ERROR_CODES_EXTEND_POINT, createCompileError, CORE_WARN_CODES_EXTEND_POINT, isMessageAST, AST_NODE_PROPS_KEYS, DEFAULT_LOCALE, updateFallbackLocale, setFallbackContext, createCoreContext, clearDateTimeFormat, clearNumberFormat, setAdditionalMeta, getFallbackContext, NOT_REOSLVED, isTranslateFallbackWarn, isTranslateMissingWarn, parseTranslateArgs, translate, MISSING_RESOLVE_VALUE, parseDateTimeArgs, datetime, parseNumberArgs, number, isMessageFunction, fallbackWithLocaleChain, NUMBER_FORMAT_OPTIONS_KEYS, DATETIME_FORMAT_OPTIONS_KEYS, registerMessageCompiler, compile, registerMessageResolver, resolveValue, registerLocaleFallbacker, setDevToolsHook } from '@intlify/core-base';\nimport { getGlobalThis, makeSymbol, format, isObject, create, isPlainObject, isArray, deepCopy, isString, hasOwn, warn, isBoolean, isRegExp, isFunction, inBrowser, assign, isNumber, createEmitter, warnOnce, isEmptyObject } from '@intlify/shared';\nimport { createVNode, Text, computed, watch, getCurrentInstance, ref, shallowRef, Fragment, defineComponent, h, effectScope, inject, onMounted, onUnmounted, isRef } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * Vue I18n Version\n *\n * @remarks\n * Semver format. Same format as the package.json `version` field.\n *\n * @VueI18nGeneral\n */\nconst VERSION = '11.1.11';\n/**\n * This is only called in esm-bundler builds.\n * istanbul-ignore-next\n */\nfunction initFeatureFlags() {\n    if (typeof __VUE_I18N_FULL_INSTALL__ !== 'boolean') {\n        getGlobalThis().__VUE_I18N_FULL_INSTALL__ = true;\n    }\n    if (typeof __VUE_I18N_LEGACY_API__ !== 'boolean') {\n        getGlobalThis().__VUE_I18N_LEGACY_API__ = true;\n    }\n    if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;\n    }\n    if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {\n        getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;\n    }\n}\n\nconst I18nErrorCodes = {\n    // composer module errors\n    UNEXPECTED_RETURN_TYPE: CORE_ERROR_CODES_EXTEND_POINT, // 24\n    // legacy module errors\n    INVALID_ARGUMENT: 25,\n    // i18n module errors\n    MUST_BE_CALL_SETUP_TOP: 26,\n    NOT_INSTALLED: 27,\n    // directive module errors\n    REQUIRED_VALUE: 28,\n    INVALID_VALUE: 29,\n    // vue-devtools errors\n    CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,\n    NOT_INSTALLED_WITH_PROVIDE: 31,\n    // unexpected error\n    UNEXPECTED_ERROR: 32,\n    // not compatible legacy vue-i18n constructor\n    NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,\n    // Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly\n    NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34\n};\nfunction createI18nError(code, ...args) {\n    return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages, args } : undefined);\n}\nconst errorMessages = {\n    [I18nErrorCodes.UNEXPECTED_RETURN_TYPE]: 'Unexpected return type in composer',\n    [I18nErrorCodes.INVALID_ARGUMENT]: 'Invalid argument',\n    [I18nErrorCodes.MUST_BE_CALL_SETUP_TOP]: 'Must be called at the top of a `setup` function',\n    [I18nErrorCodes.NOT_INSTALLED]: 'Need to install with `app.use` function',\n    [I18nErrorCodes.UNEXPECTED_ERROR]: 'Unexpected error',\n    [I18nErrorCodes.REQUIRED_VALUE]: `Required in value: {0}`,\n    [I18nErrorCodes.INVALID_VALUE]: `Invalid value`,\n    [I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: `Cannot setup vue-devtools plugin`,\n    [I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE]: 'Need to install with `provide` function',\n    [I18nErrorCodes.NOT_COMPATIBLE_LEGACY_VUE_I18N]: 'Not compatible legacy VueI18n.',\n    [I18nErrorCodes.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: 'Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly'\n};\n\nconst TranslateVNodeSymbol = \n/* #__PURE__*/ makeSymbol('__translateVNode');\nconst DatetimePartsSymbol = /* #__PURE__*/ makeSymbol('__datetimeParts');\nconst NumberPartsSymbol = /* #__PURE__*/ makeSymbol('__numberParts');\nconst EnableEmitter = /* #__PURE__*/ makeSymbol('__enableEmitter');\nconst DisableEmitter = /* #__PURE__*/ makeSymbol('__disableEmitter');\nconst SetPluralRulesSymbol = makeSymbol('__setPluralRules');\nmakeSymbol('__intlifyMeta');\nconst InejctWithOptionSymbol = \n/* #__PURE__*/ makeSymbol('__injectWithOption');\nconst DisposeSymbol = /* #__PURE__*/ makeSymbol('__dispose');\n\nconst I18nWarnCodes = {\n    FALLBACK_TO_ROOT: CORE_WARN_CODES_EXTEND_POINT, // 8\n    NOT_FOUND_PARENT_SCOPE: 9,\n    IGNORE_OBJ_FLATTEN: 10,\n    /**\n     * @deprecated will be removed at vue-i18n v12\n     */\n    DEPRECATE_LEGACY_MODE: 11,\n    /**\n     * @deprecated will be removed at vue-i18n v12\n     */\n    DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,\n    // duplicate `useI18n` calling\n    DUPLICATE_USE_I18N_CALLING: 13\n};\nconst warnMessages = {\n    [I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,\n    [I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`,\n    [I18nWarnCodes.IGNORE_OBJ_FLATTEN]: `Ignore object flatten: '{key}' key has an string value`,\n    /**\n     * @deprecated will be removed at vue-i18n v12\n     */\n    [I18nWarnCodes.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.\\nAbout how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,\n    /**\n     * @deprecated will be removed at vue-i18n v12\n     */\n    [I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: `'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`,\n    [I18nWarnCodes.DUPLICATE_USE_I18N_CALLING]: \"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.\"\n};\nfunction getWarnMessage(code, ...args) {\n    return format(warnMessages[code], ...args);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Transform flat json in obj to normal json in obj\n */\nfunction handleFlatJson(obj) {\n    // check obj\n    if (!isObject(obj)) {\n        return obj;\n    }\n    if (isMessageAST(obj)) {\n        return obj;\n    }\n    for (const key in obj) {\n        // check key\n        if (!hasOwn(obj, key)) {\n            continue;\n        }\n        // handle for normal json\n        if (!key.includes('.')) {\n            // recursive process value if value is also a object\n            if (isObject(obj[key])) {\n                handleFlatJson(obj[key]);\n            }\n        }\n        // handle for flat json, transform to normal json\n        else {\n            // go to the last object\n            const subKeys = key.split('.');\n            const lastIndex = subKeys.length - 1;\n            let currentObj = obj;\n            let hasStringValue = false;\n            for (let i = 0; i < lastIndex; i++) {\n                if (subKeys[i] === '__proto__') {\n                    throw new Error(`unsafe key: ${subKeys[i]}`);\n                }\n                if (!(subKeys[i] in currentObj)) {\n                    currentObj[subKeys[i]] = create();\n                }\n                if (!isObject(currentObj[subKeys[i]])) {\n                    (process.env.NODE_ENV !== 'production') &&\n                        warn(getWarnMessage(I18nWarnCodes.IGNORE_OBJ_FLATTEN, {\n                            key: subKeys[i]\n                        }));\n                    hasStringValue = true;\n                    break;\n                }\n                currentObj = currentObj[subKeys[i]];\n            }\n            // update last object value, delete old property\n            if (!hasStringValue) {\n                if (!isMessageAST(currentObj)) {\n                    currentObj[subKeys[lastIndex]] = obj[key];\n                    delete obj[key];\n                }\n                else {\n                    /**\n                     * NOTE:\n                     * if the last object is a message AST and subKeys[lastIndex] has message AST prop key, ignore to copy and key deletion\n                     */\n                    if (!AST_NODE_PROPS_KEYS.includes(subKeys[lastIndex])) {\n                        delete obj[key];\n                    }\n                }\n            }\n            // recursive process value if value is also a object\n            if (!isMessageAST(currentObj)) {\n                const target = currentObj[subKeys[lastIndex]];\n                if (isObject(target)) {\n                    handleFlatJson(target);\n                }\n            }\n        }\n    }\n    return obj;\n}\nfunction getLocaleMessages(locale, options) {\n    const { messages, __i18n, messageResolver, flatJson } = options;\n    // prettier-ignore\n    const ret = (isPlainObject(messages)\n        ? messages\n        : isArray(__i18n)\n            ? create()\n            : { [locale]: create() });\n    // merge locale messages of i18n custom block\n    if (isArray(__i18n)) {\n        __i18n.forEach(custom => {\n            if ('locale' in custom && 'resource' in custom) {\n                const { locale, resource } = custom;\n                if (locale) {\n                    ret[locale] = ret[locale] || create();\n                    deepCopy(resource, ret[locale]);\n                }\n                else {\n                    deepCopy(resource, ret);\n                }\n            }\n            else {\n                isString(custom) && deepCopy(JSON.parse(custom), ret);\n            }\n        });\n    }\n    // handle messages for flat json\n    if (messageResolver == null && flatJson) {\n        for (const key in ret) {\n            if (hasOwn(ret, key)) {\n                handleFlatJson(ret[key]);\n            }\n        }\n    }\n    return ret;\n}\nfunction getComponentOptions(instance) {\n    return instance.type;\n}\nfunction adjustI18nResources(gl, options, componentOptions) {\n    // prettier-ignore\n    let messages = isObject(options.messages)\n        ? options.messages\n        : create();\n    if ('__i18nGlobal' in componentOptions) {\n        messages = getLocaleMessages(gl.locale.value, {\n            messages,\n            __i18n: componentOptions.__i18nGlobal\n        });\n    }\n    // merge locale messages\n    const locales = Object.keys(messages);\n    if (locales.length) {\n        locales.forEach(locale => {\n            gl.mergeLocaleMessage(locale, messages[locale]);\n        });\n    }\n    {\n        // merge datetime formats\n        if (isObject(options.datetimeFormats)) {\n            const locales = Object.keys(options.datetimeFormats);\n            if (locales.length) {\n                locales.forEach(locale => {\n                    gl.mergeDateTimeFormat(locale, options.datetimeFormats[locale]);\n                });\n            }\n        }\n        // merge number formats\n        if (isObject(options.numberFormats)) {\n            const locales = Object.keys(options.numberFormats);\n            if (locales.length) {\n                locales.forEach(locale => {\n                    gl.mergeNumberFormat(locale, options.numberFormats[locale]);\n                });\n            }\n        }\n    }\n}\nfunction createTextNode(key) {\n    return createVNode(Text, null, key, 0);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// extend VNode interface\nconst DEVTOOLS_META = '__INTLIFY_META__';\nconst NOOP_RETURN_ARRAY = () => [];\nconst NOOP_RETURN_FALSE = () => false;\nlet composerID = 0;\nfunction defineCoreMissingHandler(missing) {\n    return ((ctx, locale, key, type) => {\n        return missing(locale, key, getCurrentInstance() || undefined, type);\n    });\n}\n// for Intlify DevTools\n/* #__NO_SIDE_EFFECTS__ */\nconst getMetaInfo = () => {\n    const instance = getCurrentInstance();\n    let meta = null;\n    return instance && (meta = getComponentOptions(instance)[DEVTOOLS_META])\n        ? { [DEVTOOLS_META]: meta }\n        : null;\n};\n/**\n * Create composer interface factory\n *\n * @internal\n */\nfunction createComposer(options = {}) {\n    const { __root, __injectWithOption } = options;\n    const _isGlobal = __root === undefined;\n    const flatJson = options.flatJson;\n    const _ref = inBrowser ? ref : shallowRef;\n    let _inheritLocale = isBoolean(options.inheritLocale)\n        ? options.inheritLocale\n        : true;\n    const _locale = _ref(\n    // prettier-ignore\n    __root && _inheritLocale\n        ? __root.locale.value\n        : isString(options.locale)\n            ? options.locale\n            : DEFAULT_LOCALE);\n    const _fallbackLocale = _ref(\n    // prettier-ignore\n    __root && _inheritLocale\n        ? __root.fallbackLocale.value\n        : isString(options.fallbackLocale) ||\n            isArray(options.fallbackLocale) ||\n            isPlainObject(options.fallbackLocale) ||\n            options.fallbackLocale === false\n            ? options.fallbackLocale\n            : _locale.value);\n    const _messages = _ref(getLocaleMessages(_locale.value, options));\n    // prettier-ignore\n    const _datetimeFormats = _ref(isPlainObject(options.datetimeFormats)\n            ? options.datetimeFormats\n            : { [_locale.value]: {} })\n        ;\n    // prettier-ignore\n    const _numberFormats = _ref(isPlainObject(options.numberFormats)\n            ? options.numberFormats\n            : { [_locale.value]: {} })\n        ;\n    // warning suppress options\n    // prettier-ignore\n    let _missingWarn = __root\n        ? __root.missingWarn\n        : isBoolean(options.missingWarn) || isRegExp(options.missingWarn)\n            ? options.missingWarn\n            : true;\n    // prettier-ignore\n    let _fallbackWarn = __root\n        ? __root.fallbackWarn\n        : isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)\n            ? options.fallbackWarn\n            : true;\n    // prettier-ignore\n    let _fallbackRoot = __root\n        ? __root.fallbackRoot\n        : isBoolean(options.fallbackRoot)\n            ? options.fallbackRoot\n            : true;\n    // configure fall back to root\n    let _fallbackFormat = !!options.fallbackFormat;\n    // runtime missing\n    let _missing = isFunction(options.missing) ? options.missing : null;\n    let _runtimeMissing = isFunction(options.missing)\n        ? defineCoreMissingHandler(options.missing)\n        : null;\n    // postTranslation handler\n    let _postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : null;\n    // prettier-ignore\n    let _warnHtmlMessage = __root\n        ? __root.warnHtmlMessage\n        : isBoolean(options.warnHtmlMessage)\n            ? options.warnHtmlMessage\n            : true;\n    let _escapeParameter = !!options.escapeParameter;\n    // custom linked modifiers\n    // prettier-ignore\n    const _modifiers = __root\n        ? __root.modifiers\n        : isPlainObject(options.modifiers)\n            ? options.modifiers\n            : {};\n    // pluralRules\n    let _pluralRules = options.pluralRules || (__root && __root.pluralRules);\n    // runtime context\n    // eslint-disable-next-line prefer-const\n    let _context;\n    const getCoreContext = () => {\n        _isGlobal && setFallbackContext(null);\n        const ctxOptions = {\n            version: VERSION,\n            locale: _locale.value,\n            fallbackLocale: _fallbackLocale.value,\n            messages: _messages.value,\n            modifiers: _modifiers,\n            pluralRules: _pluralRules,\n            missing: _runtimeMissing === null ? undefined : _runtimeMissing,\n            missingWarn: _missingWarn,\n            fallbackWarn: _fallbackWarn,\n            fallbackFormat: _fallbackFormat,\n            unresolving: true,\n            postTranslation: _postTranslation === null ? undefined : _postTranslation,\n            warnHtmlMessage: _warnHtmlMessage,\n            escapeParameter: _escapeParameter,\n            messageResolver: options.messageResolver,\n            messageCompiler: options.messageCompiler,\n            __meta: { framework: 'vue' }\n        };\n        {\n            ctxOptions.datetimeFormats = _datetimeFormats.value;\n            ctxOptions.numberFormats = _numberFormats.value;\n            ctxOptions.__datetimeFormatters = isPlainObject(_context)\n                ? _context.__datetimeFormatters\n                : undefined;\n            ctxOptions.__numberFormatters = isPlainObject(_context)\n                ? _context.__numberFormatters\n                : undefined;\n        }\n        if ((process.env.NODE_ENV !== 'production')) {\n            ctxOptions.__v_emitter = isPlainObject(_context)\n                ? _context.__v_emitter\n                : undefined;\n        }\n        const ctx = createCoreContext(ctxOptions);\n        _isGlobal && setFallbackContext(ctx);\n        return ctx;\n    };\n    _context = getCoreContext();\n    updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n    // track reactivity\n    function trackReactivityValues() {\n        return [\n                _locale.value,\n                _fallbackLocale.value,\n                _messages.value,\n                _datetimeFormats.value,\n                _numberFormats.value\n            ]\n            ;\n    }\n    // locale\n    const locale = computed({\n        get: () => _locale.value,\n        set: val => {\n            _context.locale = val;\n            _locale.value = val;\n        }\n    });\n    // fallbackLocale\n    const fallbackLocale = computed({\n        get: () => _fallbackLocale.value,\n        set: val => {\n            _context.fallbackLocale = val;\n            _fallbackLocale.value = val;\n            updateFallbackLocale(_context, _locale.value, val);\n        }\n    });\n    // messages\n    const messages = computed(() => _messages.value);\n    // datetimeFormats\n    const datetimeFormats = /* #__PURE__*/ computed(() => _datetimeFormats.value);\n    // numberFormats\n    const numberFormats = /* #__PURE__*/ computed(() => _numberFormats.value);\n    // getPostTranslationHandler\n    function getPostTranslationHandler() {\n        return isFunction(_postTranslation) ? _postTranslation : null;\n    }\n    // setPostTranslationHandler\n    function setPostTranslationHandler(handler) {\n        _postTranslation = handler;\n        _context.postTranslation = handler;\n    }\n    // getMissingHandler\n    function getMissingHandler() {\n        return _missing;\n    }\n    // setMissingHandler\n    function setMissingHandler(handler) {\n        if (handler !== null) {\n            _runtimeMissing = defineCoreMissingHandler(handler);\n        }\n        _missing = handler;\n        _context.missing = _runtimeMissing;\n    }\n    function isResolvedTranslateMessage(type, arg) {\n        return type !== 'translate' || !arg.resolvedMessage;\n    }\n    const wrapWithDeps = (fn, argumentParser, warnType, fallbackSuccess, fallbackFail, successCondition) => {\n        trackReactivityValues(); // track reactive dependency\n        // NOTE: experimental !!\n        let ret;\n        try {\n            if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n                setAdditionalMeta(getMetaInfo());\n            }\n            if (!_isGlobal) {\n                _context.fallbackContext = __root\n                    ? getFallbackContext()\n                    : undefined;\n            }\n            ret = fn(_context);\n        }\n        finally {\n            if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n                setAdditionalMeta(null);\n            }\n            if (!_isGlobal) {\n                _context.fallbackContext = undefined;\n            }\n        }\n        if ((warnType !== 'translate exists' && // for not `te` (e.g `t`)\n            isNumber(ret) &&\n            ret === NOT_REOSLVED) ||\n            (warnType === 'translate exists' && !ret) // for `te`\n        ) {\n            const [key, arg2] = argumentParser();\n            if ((process.env.NODE_ENV !== 'production') &&\n                __root &&\n                isString(key) &&\n                isResolvedTranslateMessage(warnType, arg2)) {\n                if (_fallbackRoot &&\n                    (isTranslateFallbackWarn(_fallbackWarn, key) ||\n                        isTranslateMissingWarn(_missingWarn, key))) {\n                    warn(getWarnMessage(I18nWarnCodes.FALLBACK_TO_ROOT, {\n                        key,\n                        type: warnType\n                    }));\n                }\n                // for vue-devtools timeline event\n                if ((process.env.NODE_ENV !== 'production')) {\n                    const { __v_emitter: emitter } = _context;\n                    if (emitter && _fallbackRoot) {\n                        emitter.emit('fallback', {\n                            type: warnType,\n                            key,\n                            to: 'global',\n                            groupId: `${warnType}:${key}`\n                        });\n                    }\n                }\n            }\n            return __root && _fallbackRoot\n                ? fallbackSuccess(__root)\n                : fallbackFail(key);\n        }\n        else if (successCondition(ret)) {\n            return ret;\n        }\n        else {\n            /* istanbul ignore next */\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_RETURN_TYPE);\n        }\n    };\n    // t\n    function t(...args) {\n        return wrapWithDeps(context => Reflect.apply(translate, null, [context, ...args]), () => parseTranslateArgs(...args), 'translate', root => Reflect.apply(root.t, root, [...args]), key => key, val => isString(val));\n    }\n    // rt\n    function rt(...args) {\n        const [arg1, arg2, arg3] = args;\n        if (arg3 && !isObject(arg3)) {\n            throw createI18nError(I18nErrorCodes.INVALID_ARGUMENT);\n        }\n        return t(...[arg1, arg2, assign({ resolvedMessage: true }, arg3 || {})]);\n    }\n    // d\n    function d(...args) {\n        return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => Reflect.apply(root.d, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val) || isArray(val));\n    }\n    // n\n    function n(...args) {\n        return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => Reflect.apply(root.n, root, [...args]), () => MISSING_RESOLVE_VALUE, val => isString(val) || isArray(val));\n    }\n    // for custom processor\n    function normalize(values) {\n        return values.map(val => isString(val) || isNumber(val) || isBoolean(val)\n            ? createTextNode(String(val))\n            : val);\n    }\n    const interpolate = (val) => val;\n    const processor = {\n        normalize,\n        interpolate,\n        type: 'vnode'\n    };\n    // translateVNode, using for `i18n-t` component\n    function translateVNode(...args) {\n        return wrapWithDeps(context => {\n            let ret;\n            const _context = context;\n            try {\n                _context.processor = processor;\n                ret = Reflect.apply(translate, null, [_context, ...args]);\n            }\n            finally {\n                _context.processor = null;\n            }\n            return ret;\n        }, () => parseTranslateArgs(...args), 'translate', root => root[TranslateVNodeSymbol](...args), key => [createTextNode(key)], val => isArray(val));\n    }\n    // numberParts, using for `i18n-n` component\n    function numberParts(...args) {\n        return wrapWithDeps(context => Reflect.apply(number, null, [context, ...args]), () => parseNumberArgs(...args), 'number format', root => root[NumberPartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n    }\n    // datetimeParts, using for `i18n-d` component\n    function datetimeParts(...args) {\n        return wrapWithDeps(context => Reflect.apply(datetime, null, [context, ...args]), () => parseDateTimeArgs(...args), 'datetime format', root => root[DatetimePartsSymbol](...args), NOOP_RETURN_ARRAY, val => isString(val) || isArray(val));\n    }\n    function setPluralRules(rules) {\n        _pluralRules = rules;\n        _context.pluralRules = _pluralRules;\n    }\n    // te\n    function te(key, locale) {\n        return wrapWithDeps(() => {\n            if (!key) {\n                return false;\n            }\n            const targetLocale = isString(locale) ? locale : _locale.value;\n            const message = getLocaleMessage(targetLocale);\n            const resolved = _context.messageResolver(message, key);\n            return (isMessageAST(resolved) ||\n                isMessageFunction(resolved) ||\n                isString(resolved));\n        }, () => [key], 'translate exists', root => {\n            return Reflect.apply(root.te, root, [key, locale]);\n        }, NOOP_RETURN_FALSE, val => isBoolean(val));\n    }\n    function resolveMessages(key) {\n        let messages = null;\n        const locales = fallbackWithLocaleChain(_context, _fallbackLocale.value, _locale.value);\n        for (let i = 0; i < locales.length; i++) {\n            const targetLocaleMessages = _messages.value[locales[i]] || {};\n            const messageValue = _context.messageResolver(targetLocaleMessages, key);\n            if (messageValue != null) {\n                messages = messageValue;\n                break;\n            }\n        }\n        return messages;\n    }\n    // tm\n    function tm(key) {\n        const messages = resolveMessages(key);\n        // prettier-ignore\n        return messages != null\n            ? messages\n            : __root\n                ? __root.tm(key) || {}\n                : {};\n    }\n    // getLocaleMessage\n    function getLocaleMessage(locale) {\n        return (_messages.value[locale] || {});\n    }\n    // setLocaleMessage\n    function setLocaleMessage(locale, message) {\n        if (flatJson) {\n            const _message = { [locale]: message };\n            for (const key in _message) {\n                if (hasOwn(_message, key)) {\n                    handleFlatJson(_message[key]);\n                }\n            }\n            message = _message[locale];\n        }\n        _messages.value[locale] = message;\n        _context.messages = _messages.value;\n    }\n    // mergeLocaleMessage\n    function mergeLocaleMessage(locale, message) {\n        _messages.value[locale] = _messages.value[locale] || {};\n        const _message = { [locale]: message };\n        if (flatJson) {\n            for (const key in _message) {\n                if (hasOwn(_message, key)) {\n                    handleFlatJson(_message[key]);\n                }\n            }\n        }\n        message = _message[locale];\n        deepCopy(message, _messages.value[locale]);\n        _context.messages = _messages.value;\n    }\n    // getDateTimeFormat\n    function getDateTimeFormat(locale) {\n        return _datetimeFormats.value[locale] || {};\n    }\n    // setDateTimeFormat\n    function setDateTimeFormat(locale, format) {\n        _datetimeFormats.value[locale] = format;\n        _context.datetimeFormats = _datetimeFormats.value;\n        clearDateTimeFormat(_context, locale, format);\n    }\n    // mergeDateTimeFormat\n    function mergeDateTimeFormat(locale, format) {\n        _datetimeFormats.value[locale] = assign(_datetimeFormats.value[locale] || {}, format);\n        _context.datetimeFormats = _datetimeFormats.value;\n        clearDateTimeFormat(_context, locale, format);\n    }\n    // getNumberFormat\n    function getNumberFormat(locale) {\n        return _numberFormats.value[locale] || {};\n    }\n    // setNumberFormat\n    function setNumberFormat(locale, format) {\n        _numberFormats.value[locale] = format;\n        _context.numberFormats = _numberFormats.value;\n        clearNumberFormat(_context, locale, format);\n    }\n    // mergeNumberFormat\n    function mergeNumberFormat(locale, format) {\n        _numberFormats.value[locale] = assign(_numberFormats.value[locale] || {}, format);\n        _context.numberFormats = _numberFormats.value;\n        clearNumberFormat(_context, locale, format);\n    }\n    // for debug\n    composerID++;\n    // watch root locale & fallbackLocale\n    if (__root && inBrowser) {\n        watch(__root.locale, (val) => {\n            if (_inheritLocale) {\n                _locale.value = val;\n                _context.locale = val;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        });\n        watch(__root.fallbackLocale, (val) => {\n            if (_inheritLocale) {\n                _fallbackLocale.value = val;\n                _context.fallbackLocale = val;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        });\n    }\n    // define basic composition API!\n    const composer = {\n        id: composerID,\n        locale,\n        fallbackLocale,\n        get inheritLocale() {\n            return _inheritLocale;\n        },\n        set inheritLocale(val) {\n            _inheritLocale = val;\n            if (val && __root) {\n                _locale.value = __root.locale.value;\n                _fallbackLocale.value = __root.fallbackLocale.value;\n                updateFallbackLocale(_context, _locale.value, _fallbackLocale.value);\n            }\n        },\n        get availableLocales() {\n            return Object.keys(_messages.value).sort();\n        },\n        messages,\n        get modifiers() {\n            return _modifiers;\n        },\n        get pluralRules() {\n            return _pluralRules || {};\n        },\n        get isGlobal() {\n            return _isGlobal;\n        },\n        get missingWarn() {\n            return _missingWarn;\n        },\n        set missingWarn(val) {\n            _missingWarn = val;\n            _context.missingWarn = _missingWarn;\n        },\n        get fallbackWarn() {\n            return _fallbackWarn;\n        },\n        set fallbackWarn(val) {\n            _fallbackWarn = val;\n            _context.fallbackWarn = _fallbackWarn;\n        },\n        get fallbackRoot() {\n            return _fallbackRoot;\n        },\n        set fallbackRoot(val) {\n            _fallbackRoot = val;\n        },\n        get fallbackFormat() {\n            return _fallbackFormat;\n        },\n        set fallbackFormat(val) {\n            _fallbackFormat = val;\n            _context.fallbackFormat = _fallbackFormat;\n        },\n        get warnHtmlMessage() {\n            return _warnHtmlMessage;\n        },\n        set warnHtmlMessage(val) {\n            _warnHtmlMessage = val;\n            _context.warnHtmlMessage = val;\n        },\n        get escapeParameter() {\n            return _escapeParameter;\n        },\n        set escapeParameter(val) {\n            _escapeParameter = val;\n            _context.escapeParameter = val;\n        },\n        t,\n        getLocaleMessage,\n        setLocaleMessage,\n        mergeLocaleMessage,\n        getPostTranslationHandler,\n        setPostTranslationHandler,\n        getMissingHandler,\n        setMissingHandler,\n        [SetPluralRulesSymbol]: setPluralRules\n    };\n    {\n        composer.datetimeFormats = datetimeFormats;\n        composer.numberFormats = numberFormats;\n        composer.rt = rt;\n        composer.te = te;\n        composer.tm = tm;\n        composer.d = d;\n        composer.n = n;\n        composer.getDateTimeFormat = getDateTimeFormat;\n        composer.setDateTimeFormat = setDateTimeFormat;\n        composer.mergeDateTimeFormat = mergeDateTimeFormat;\n        composer.getNumberFormat = getNumberFormat;\n        composer.setNumberFormat = setNumberFormat;\n        composer.mergeNumberFormat = mergeNumberFormat;\n        composer[InejctWithOptionSymbol] = __injectWithOption;\n        composer[TranslateVNodeSymbol] = translateVNode;\n        composer[DatetimePartsSymbol] = datetimeParts;\n        composer[NumberPartsSymbol] = numberParts;\n    }\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        composer[EnableEmitter] = (emitter) => {\n            _context.__v_emitter = emitter;\n        };\n        composer[DisableEmitter] = () => {\n            _context.__v_emitter = undefined;\n        };\n    }\n    return composer;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\nconst VUE_I18N_COMPONENT_TYPES = 'vue-i18n: composer properties';\nconst VueDevToolsLabels = {\n    'vue-devtools-plugin-vue-i18n': 'Vue I18n DevTools',\n    'vue-i18n-resource-inspector': 'Vue I18n DevTools',\n    'vue-i18n-timeline': 'Vue I18n'\n};\nconst VueDevToolsPlaceholders = {\n    'vue-i18n-resource-inspector': 'Search for scopes ...'\n};\nconst VueDevToolsTimelineColors = {\n    'vue-i18n-timeline': 0xffcd19\n};\nlet devtoolsApi;\nasync function enableDevTools(app, i18n) {\n    return new Promise((resolve, reject) => {\n        try {\n            setupDevtoolsPlugin({\n                id: 'vue-devtools-plugin-vue-i18n',\n                label: VueDevToolsLabels['vue-devtools-plugin-vue-i18n'],\n                packageName: 'vue-i18n',\n                homepage: 'https://vue-i18n.intlify.dev',\n                logo: 'https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png',\n                componentStateTypes: [VUE_I18N_COMPONENT_TYPES],\n                app: app // eslint-disable-line @typescript-eslint/no-explicit-any\n            }, api => {\n                devtoolsApi = api;\n                api.on.visitComponentTree(({ componentInstance, treeNode }) => {\n                    updateComponentTreeTags(componentInstance, treeNode, i18n);\n                });\n                api.on.inspectComponent(({ componentInstance, instanceData }) => {\n                    if (componentInstance.vnode.el &&\n                        componentInstance.vnode.el.__VUE_I18N__ &&\n                        instanceData) {\n                        if (i18n.mode === 'legacy') {\n                            // ignore global scope on legacy mode\n                            if (componentInstance.vnode.el.__VUE_I18N__ !==\n                                i18n.global.__composer) {\n                                inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n                            }\n                        }\n                        else {\n                            inspectComposer(instanceData, componentInstance.vnode.el.__VUE_I18N__);\n                        }\n                    }\n                });\n                api.addInspector({\n                    id: 'vue-i18n-resource-inspector',\n                    label: VueDevToolsLabels['vue-i18n-resource-inspector'],\n                    icon: 'language',\n                    treeFilterPlaceholder: VueDevToolsPlaceholders['vue-i18n-resource-inspector']\n                });\n                api.on.getInspectorTree(payload => {\n                    if (payload.app === app &&\n                        payload.inspectorId === 'vue-i18n-resource-inspector') {\n                        registerScope(payload, i18n);\n                    }\n                });\n                const roots = new Map();\n                api.on.getInspectorState(async (payload) => {\n                    if (payload.app === app &&\n                        payload.inspectorId === 'vue-i18n-resource-inspector') {\n                        api.unhighlightElement();\n                        inspectScope(payload, i18n);\n                        if (payload.nodeId === 'global') {\n                            if (!roots.has(payload.app)) {\n                                const [root] = await api.getComponentInstances(payload.app);\n                                roots.set(payload.app, root);\n                            }\n                            api.highlightElement(roots.get(payload.app));\n                        }\n                        else {\n                            const instance = getComponentInstance(payload.nodeId, i18n);\n                            instance && api.highlightElement(instance);\n                        }\n                    }\n                });\n                api.on.editInspectorState(payload => {\n                    if (payload.app === app &&\n                        payload.inspectorId === 'vue-i18n-resource-inspector') {\n                        editScope(payload, i18n);\n                    }\n                });\n                api.addTimelineLayer({\n                    id: 'vue-i18n-timeline',\n                    label: VueDevToolsLabels['vue-i18n-timeline'],\n                    color: VueDevToolsTimelineColors['vue-i18n-timeline']\n                });\n                resolve(true);\n            });\n        }\n        catch (e) {\n            console.error(e);\n            // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n            reject(false);\n        }\n    });\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getI18nScopeLable(instance) {\n    return (instance.type.name ||\n        instance.type.displayName ||\n        instance.type.__file ||\n        'Anonymous');\n}\nfunction updateComponentTreeTags(instance, // eslint-disable-line @typescript-eslint/no-explicit-any\ntreeNode, i18n) {\n    // prettier-ignore\n    const global = i18n.mode === 'composition'\n        ? i18n.global\n        : i18n.global.__composer;\n    if (instance && instance.vnode.el && instance.vnode.el.__VUE_I18N__) {\n        // add custom tags local scope only\n        if (instance.vnode.el.__VUE_I18N__ !== global) {\n            const tag = {\n                label: `i18n (${getI18nScopeLable(instance)} Scope)`,\n                textColor: 0x000000,\n                backgroundColor: 0xffcd19\n            };\n            treeNode.tags.push(tag);\n        }\n    }\n}\nfunction inspectComposer(instanceData, composer) {\n    const type = VUE_I18N_COMPONENT_TYPES;\n    instanceData.state.push({\n        type,\n        key: 'locale',\n        editable: true,\n        value: composer.locale.value\n    });\n    instanceData.state.push({\n        type,\n        key: 'availableLocales',\n        editable: false,\n        value: composer.availableLocales\n    });\n    instanceData.state.push({\n        type,\n        key: 'fallbackLocale',\n        editable: true,\n        value: composer.fallbackLocale.value\n    });\n    instanceData.state.push({\n        type,\n        key: 'inheritLocale',\n        editable: true,\n        value: composer.inheritLocale\n    });\n    instanceData.state.push({\n        type,\n        key: 'messages',\n        editable: false,\n        value: getLocaleMessageValue(composer.messages.value)\n    });\n    {\n        instanceData.state.push({\n            type,\n            key: 'datetimeFormats',\n            editable: false,\n            value: composer.datetimeFormats.value\n        });\n        instanceData.state.push({\n            type,\n            key: 'numberFormats',\n            editable: false,\n            value: composer.numberFormats.value\n        });\n    }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getLocaleMessageValue(messages) {\n    const value = {};\n    Object.keys(messages).forEach((key) => {\n        const v = messages[key];\n        if (isFunction(v) && 'source' in v) {\n            value[key] = getMessageFunctionDetails(v);\n        }\n        else if (isMessageAST(v) && v.loc && v.loc.source) {\n            value[key] = v.loc.source;\n        }\n        else if (isObject(v)) {\n            value[key] = getLocaleMessageValue(v);\n        }\n        else {\n            value[key] = v;\n        }\n    });\n    return value;\n}\nconst ESC = {\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    '&': '&amp;'\n};\nfunction escape(s) {\n    return s.replace(/[<>\"&]/g, escapeChar);\n}\nfunction escapeChar(a) {\n    return ESC[a] || a;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMessageFunctionDetails(func) {\n    const argString = func.source ? `(\"${escape(func.source)}\")` : `(?)`;\n    return {\n        _custom: {\n            type: 'function',\n            display: `<span>ƒ</span> ${argString}`\n        }\n    };\n}\nfunction registerScope(payload, i18n) {\n    payload.rootNodes.push({\n        id: 'global',\n        label: 'Global Scope'\n    });\n    // prettier-ignore\n    const global = i18n.mode === 'composition'\n        ? i18n.global\n        : i18n.global.__composer;\n    for (const [keyInstance, instance] of i18n.__instances) {\n        // prettier-ignore\n        const composer = i18n.mode === 'composition'\n            ? instance\n            : instance.__composer;\n        if (global === composer) {\n            continue;\n        }\n        payload.rootNodes.push({\n            id: composer.id.toString(),\n            label: `${getI18nScopeLable(keyInstance)} Scope`\n        });\n    }\n}\nfunction getComponentInstance(nodeId, i18n) {\n    let instance = null;\n    if (nodeId !== 'global') {\n        for (const [component, composer] of i18n.__instances.entries()) {\n            if (composer.id.toString() === nodeId) {\n                instance = component;\n                break;\n            }\n        }\n    }\n    return instance;\n}\nfunction getComposer$2(nodeId, i18n) {\n    if (nodeId === 'global') {\n        return i18n.mode === 'composition'\n            ? i18n.global\n            : i18n.global.__composer;\n    }\n    else {\n        const instance = Array.from(i18n.__instances.values()).find(item => item.id.toString() === nodeId);\n        if (instance) {\n            return i18n.mode === 'composition'\n                ? instance\n                : instance.__composer;\n        }\n        else {\n            return null;\n        }\n    }\n}\nfunction inspectScope(payload, i18n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n    const composer = getComposer$2(payload.nodeId, i18n);\n    if (composer) {\n        // TODO:\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        payload.state = makeScopeInspectState(composer);\n    }\n    return null;\n}\nfunction makeScopeInspectState(composer) {\n    const state = {};\n    const localeType = 'Locale related info';\n    const localeStates = [\n        {\n            type: localeType,\n            key: 'locale',\n            editable: true,\n            value: composer.locale.value\n        },\n        {\n            type: localeType,\n            key: 'fallbackLocale',\n            editable: true,\n            value: composer.fallbackLocale.value\n        },\n        {\n            type: localeType,\n            key: 'availableLocales',\n            editable: false,\n            value: composer.availableLocales\n        },\n        {\n            type: localeType,\n            key: 'inheritLocale',\n            editable: true,\n            value: composer.inheritLocale\n        }\n    ];\n    state[localeType] = localeStates;\n    const localeMessagesType = 'Locale messages info';\n    const localeMessagesStates = [\n        {\n            type: localeMessagesType,\n            key: 'messages',\n            editable: false,\n            value: getLocaleMessageValue(composer.messages.value)\n        }\n    ];\n    state[localeMessagesType] = localeMessagesStates;\n    {\n        const datetimeFormatsType = 'Datetime formats info';\n        const datetimeFormatsStates = [\n            {\n                type: datetimeFormatsType,\n                key: 'datetimeFormats',\n                editable: false,\n                value: composer.datetimeFormats.value\n            }\n        ];\n        state[datetimeFormatsType] = datetimeFormatsStates;\n        const numberFormatsType = 'Datetime formats info';\n        const numberFormatsStates = [\n            {\n                type: numberFormatsType,\n                key: 'numberFormats',\n                editable: false,\n                value: composer.numberFormats.value\n            }\n        ];\n        state[numberFormatsType] = numberFormatsStates;\n    }\n    return state;\n}\nfunction addTimelineEvent(event, payload) {\n    if (devtoolsApi) {\n        let groupId;\n        if (payload && 'groupId' in payload) {\n            groupId = payload.groupId;\n            delete payload.groupId;\n        }\n        devtoolsApi.addTimelineEvent({\n            layerId: 'vue-i18n-timeline',\n            event: {\n                title: event,\n                groupId,\n                time: Date.now(),\n                meta: {},\n                data: payload || {},\n                logType: event === 'compile-error'\n                    ? 'error'\n                    : event === 'fallback' || event === 'missing'\n                        ? 'warning'\n                        : 'default'\n            }\n        });\n    }\n}\nfunction editScope(payload, i18n) {\n    const composer = getComposer$2(payload.nodeId, i18n);\n    if (composer) {\n        const [field] = payload.path;\n        if (field === 'locale' && isString(payload.state.value)) {\n            composer.locale.value = payload.state.value;\n        }\n        else if (field === 'fallbackLocale' &&\n            (isString(payload.state.value) ||\n                isArray(payload.state.value) ||\n                isObject(payload.state.value))) {\n            composer.fallbackLocale.value = payload.state.value;\n        }\n        else if (field === 'inheritLocale' && isBoolean(payload.state.value)) {\n            composer.inheritLocale = payload.state.value;\n        }\n    }\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Convert to I18n Composer Options from VueI18n Options\n *\n * @internal\n */\nfunction convertComposerOptions(options) {\n    const locale = isString(options.locale) ? options.locale : DEFAULT_LOCALE;\n    const fallbackLocale = isString(options.fallbackLocale) ||\n        isArray(options.fallbackLocale) ||\n        isPlainObject(options.fallbackLocale) ||\n        options.fallbackLocale === false\n        ? options.fallbackLocale\n        : locale;\n    const missing = isFunction(options.missing) ? options.missing : undefined;\n    const missingWarn = isBoolean(options.silentTranslationWarn) ||\n        isRegExp(options.silentTranslationWarn)\n        ? !options.silentTranslationWarn\n        : true;\n    const fallbackWarn = isBoolean(options.silentFallbackWarn) ||\n        isRegExp(options.silentFallbackWarn)\n        ? !options.silentFallbackWarn\n        : true;\n    const fallbackRoot = isBoolean(options.fallbackRoot)\n        ? options.fallbackRoot\n        : true;\n    const fallbackFormat = !!options.formatFallbackMessages;\n    const modifiers = isPlainObject(options.modifiers) ? options.modifiers : {};\n    const pluralizationRules = options.pluralizationRules;\n    const postTranslation = isFunction(options.postTranslation)\n        ? options.postTranslation\n        : undefined;\n    const warnHtmlMessage = isString(options.warnHtmlInMessage)\n        ? options.warnHtmlInMessage !== 'off'\n        : true;\n    const escapeParameter = !!options.escapeParameterHtml;\n    const inheritLocale = isBoolean(options.sync) ? options.sync : true;\n    let messages = options.messages;\n    if (isPlainObject(options.sharedMessages)) {\n        const sharedMessages = options.sharedMessages;\n        const locales = Object.keys(sharedMessages);\n        messages = locales.reduce((messages, locale) => {\n            const message = messages[locale] || (messages[locale] = {});\n            assign(message, sharedMessages[locale]);\n            return messages;\n        }, (messages || {}));\n    }\n    const { __i18n, __root, __injectWithOption } = options;\n    const datetimeFormats = options.datetimeFormats;\n    const numberFormats = options.numberFormats;\n    const flatJson = options.flatJson;\n    return {\n        locale,\n        fallbackLocale,\n        messages,\n        flatJson,\n        datetimeFormats,\n        numberFormats,\n        missing,\n        missingWarn,\n        fallbackWarn,\n        fallbackRoot,\n        fallbackFormat,\n        modifiers,\n        pluralRules: pluralizationRules,\n        postTranslation,\n        warnHtmlMessage,\n        escapeParameter,\n        messageResolver: options.messageResolver,\n        inheritLocale,\n        __i18n,\n        __root,\n        __injectWithOption\n    };\n}\n/**\n * create VueI18n interface factory\n *\n * @internal\n *\n * @deprecated will be removed at vue-i18n v12\n */\nfunction createVueI18n(options = {}) {\n    const composer = createComposer(convertComposerOptions(options));\n    const { __extender } = options;\n    // defines VueI18n\n    const vueI18n = {\n        // id\n        id: composer.id,\n        // locale\n        get locale() {\n            return composer.locale.value;\n        },\n        set locale(val) {\n            composer.locale.value = val;\n        },\n        // fallbackLocale\n        get fallbackLocale() {\n            return composer.fallbackLocale.value;\n        },\n        set fallbackLocale(val) {\n            composer.fallbackLocale.value = val;\n        },\n        // messages\n        get messages() {\n            return composer.messages.value;\n        },\n        // datetimeFormats\n        get datetimeFormats() {\n            return composer.datetimeFormats.value;\n        },\n        // numberFormats\n        get numberFormats() {\n            return composer.numberFormats.value;\n        },\n        // availableLocales\n        get availableLocales() {\n            return composer.availableLocales;\n        },\n        // missing\n        get missing() {\n            return composer.getMissingHandler();\n        },\n        set missing(handler) {\n            composer.setMissingHandler(handler);\n        },\n        // silentTranslationWarn\n        get silentTranslationWarn() {\n            return isBoolean(composer.missingWarn)\n                ? !composer.missingWarn\n                : composer.missingWarn;\n        },\n        set silentTranslationWarn(val) {\n            composer.missingWarn = isBoolean(val) ? !val : val;\n        },\n        // silentFallbackWarn\n        get silentFallbackWarn() {\n            return isBoolean(composer.fallbackWarn)\n                ? !composer.fallbackWarn\n                : composer.fallbackWarn;\n        },\n        set silentFallbackWarn(val) {\n            composer.fallbackWarn = isBoolean(val) ? !val : val;\n        },\n        // modifiers\n        get modifiers() {\n            return composer.modifiers;\n        },\n        // formatFallbackMessages\n        get formatFallbackMessages() {\n            return composer.fallbackFormat;\n        },\n        set formatFallbackMessages(val) {\n            composer.fallbackFormat = val;\n        },\n        // postTranslation\n        get postTranslation() {\n            return composer.getPostTranslationHandler();\n        },\n        set postTranslation(handler) {\n            composer.setPostTranslationHandler(handler);\n        },\n        // sync\n        get sync() {\n            return composer.inheritLocale;\n        },\n        set sync(val) {\n            composer.inheritLocale = val;\n        },\n        // warnInHtmlMessage\n        get warnHtmlInMessage() {\n            return composer.warnHtmlMessage ? 'warn' : 'off';\n        },\n        set warnHtmlInMessage(val) {\n            composer.warnHtmlMessage = val !== 'off';\n        },\n        // escapeParameterHtml\n        get escapeParameterHtml() {\n            return composer.escapeParameter;\n        },\n        set escapeParameterHtml(val) {\n            composer.escapeParameter = val;\n        },\n        // pluralizationRules\n        get pluralizationRules() {\n            return composer.pluralRules || {};\n        },\n        // for internal\n        __composer: composer,\n        // t\n        t(...args) {\n            return Reflect.apply(composer.t, composer, [...args]);\n        },\n        // rt\n        rt(...args) {\n            return Reflect.apply(composer.rt, composer, [...args]);\n        },\n        // te\n        te(key, locale) {\n            return composer.te(key, locale);\n        },\n        // tm\n        tm(key) {\n            return composer.tm(key);\n        },\n        // getLocaleMessage\n        getLocaleMessage(locale) {\n            return composer.getLocaleMessage(locale);\n        },\n        // setLocaleMessage\n        setLocaleMessage(locale, message) {\n            composer.setLocaleMessage(locale, message);\n        },\n        // mergeLocaleMessage\n        mergeLocaleMessage(locale, message) {\n            composer.mergeLocaleMessage(locale, message);\n        },\n        // d\n        d(...args) {\n            return Reflect.apply(composer.d, composer, [...args]);\n        },\n        // getDateTimeFormat\n        getDateTimeFormat(locale) {\n            return composer.getDateTimeFormat(locale);\n        },\n        // setDateTimeFormat\n        setDateTimeFormat(locale, format) {\n            composer.setDateTimeFormat(locale, format);\n        },\n        // mergeDateTimeFormat\n        mergeDateTimeFormat(locale, format) {\n            composer.mergeDateTimeFormat(locale, format);\n        },\n        // n\n        n(...args) {\n            return Reflect.apply(composer.n, composer, [...args]);\n        },\n        // getNumberFormat\n        getNumberFormat(locale) {\n            return composer.getNumberFormat(locale);\n        },\n        // setNumberFormat\n        setNumberFormat(locale, format) {\n            composer.setNumberFormat(locale, format);\n        },\n        // mergeNumberFormat\n        mergeNumberFormat(locale, format) {\n            composer.mergeNumberFormat(locale, format);\n        }\n    };\n    vueI18n.__extender = __extender;\n    // for vue-devtools timeline event\n    if ((process.env.NODE_ENV !== 'production')) {\n        vueI18n.__enableEmitter = (emitter) => {\n            const __composer = composer;\n            __composer[EnableEmitter] && __composer[EnableEmitter](emitter);\n        };\n        vueI18n.__disableEmitter = () => {\n            const __composer = composer;\n            __composer[DisableEmitter] && __composer[DisableEmitter]();\n        };\n    }\n    return vueI18n;\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n\n/**\n * Supports compatibility for legacy vue-i18n APIs\n * This mixin is used when we use vue-i18n@v9.x or later\n */\nfunction defineMixin(vuei18n, composer, i18n) {\n    return {\n        beforeCreate() {\n            const instance = getCurrentInstance();\n            /* istanbul ignore if */\n            if (!instance) {\n                throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n            }\n            const options = this.$options;\n            if (options.i18n) {\n                const optionsI18n = options.i18n;\n                if (options.__i18n) {\n                    optionsI18n.__i18n = options.__i18n;\n                }\n                optionsI18n.__root = composer;\n                if (this === this.$root) {\n                    // merge option and gttach global\n                    this.$i18n = mergeToGlobal(vuei18n, optionsI18n);\n                }\n                else {\n                    optionsI18n.__injectWithOption = true;\n                    optionsI18n.__extender = i18n.__vueI18nExtend;\n                    // atttach local VueI18n instance\n                    this.$i18n = createVueI18n(optionsI18n);\n                    // extend VueI18n instance\n                    const _vueI18n = this.$i18n;\n                    if (_vueI18n.__extender) {\n                        _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n                    }\n                }\n            }\n            else if (options.__i18n) {\n                if (this === this.$root) {\n                    // merge option and gttach global\n                    this.$i18n = mergeToGlobal(vuei18n, options);\n                }\n                else {\n                    // atttach local VueI18n instance\n                    this.$i18n = createVueI18n({\n                        __i18n: options.__i18n,\n                        __injectWithOption: true,\n                        __extender: i18n.__vueI18nExtend,\n                        __root: composer\n                    });\n                    // extend VueI18n instance\n                    const _vueI18n = this.$i18n;\n                    if (_vueI18n.__extender) {\n                        _vueI18n.__disposer = _vueI18n.__extender(this.$i18n);\n                    }\n                }\n            }\n            else {\n                // attach global VueI18n instance\n                this.$i18n = vuei18n;\n            }\n            if (options.__i18nGlobal) {\n                adjustI18nResources(composer, options, options);\n            }\n            // defines vue-i18n legacy APIs\n            this.$t = (...args) => this.$i18n.t(...args);\n            this.$rt = (...args) => this.$i18n.rt(...args);\n            this.$te = (key, locale) => this.$i18n.te(key, locale);\n            this.$d = (...args) => this.$i18n.d(...args);\n            this.$n = (...args) => this.$i18n.n(...args);\n            this.$tm = (key) => this.$i18n.tm(key);\n            i18n.__setInstance(instance, this.$i18n);\n        },\n        mounted() {\n            /* istanbul ignore if */\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                this.$el &&\n                this.$i18n) {\n                const _vueI18n = this.$i18n;\n                this.$el.__VUE_I18N__ = _vueI18n.__composer;\n                const emitter = (this.__v_emitter =\n                    createEmitter());\n                _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n                emitter.on('*', addTimelineEvent);\n            }\n        },\n        unmounted() {\n            const instance = getCurrentInstance();\n            /* istanbul ignore if */\n            if (!instance) {\n                throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n            }\n            const _vueI18n = this.$i18n;\n            /* istanbul ignore if */\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n                !false &&\n                this.$el &&\n                this.$el.__VUE_I18N__) {\n                if (this.__v_emitter) {\n                    this.__v_emitter.off('*', addTimelineEvent);\n                    delete this.__v_emitter;\n                }\n                if (this.$i18n) {\n                    _vueI18n.__disableEmitter && _vueI18n.__disableEmitter();\n                    delete this.$el.__VUE_I18N__;\n                }\n            }\n            delete this.$t;\n            delete this.$rt;\n            delete this.$te;\n            delete this.$d;\n            delete this.$n;\n            delete this.$tm;\n            if (_vueI18n.__disposer) {\n                _vueI18n.__disposer();\n                delete _vueI18n.__disposer;\n                delete _vueI18n.__extender;\n            }\n            i18n.__deleteInstance(instance);\n            delete this.$i18n;\n        }\n    };\n}\nfunction mergeToGlobal(g, options) {\n    g.locale = options.locale || g.locale;\n    g.fallbackLocale = options.fallbackLocale || g.fallbackLocale;\n    g.missing = options.missing || g.missing;\n    g.silentTranslationWarn =\n        options.silentTranslationWarn || g.silentFallbackWarn;\n    g.silentFallbackWarn = options.silentFallbackWarn || g.silentFallbackWarn;\n    g.formatFallbackMessages =\n        options.formatFallbackMessages || g.formatFallbackMessages;\n    g.postTranslation = options.postTranslation || g.postTranslation;\n    g.warnHtmlInMessage = options.warnHtmlInMessage || g.warnHtmlInMessage;\n    g.escapeParameterHtml = options.escapeParameterHtml || g.escapeParameterHtml;\n    g.sync = options.sync || g.sync;\n    g.__composer[SetPluralRulesSymbol](options.pluralizationRules || g.pluralizationRules);\n    const messages = getLocaleMessages(g.locale, {\n        messages: options.messages,\n        __i18n: options.__i18n\n    });\n    Object.keys(messages).forEach(locale => g.mergeLocaleMessage(locale, messages[locale]));\n    if (options.datetimeFormats) {\n        Object.keys(options.datetimeFormats).forEach(locale => g.mergeDateTimeFormat(locale, options.datetimeFormats[locale]));\n    }\n    if (options.numberFormats) {\n        Object.keys(options.numberFormats).forEach(locale => g.mergeNumberFormat(locale, options.numberFormats[locale]));\n    }\n    return g;\n}\n\nconst baseFormatProps = {\n    tag: {\n        type: [String, Object]\n    },\n    locale: {\n        type: String\n    },\n    scope: {\n        type: String,\n        // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n        validator: (val /* ComponentI18nScope */) => val === 'parent' || val === 'global',\n        default: 'parent' /* ComponentI18nScope */\n    },\n    i18n: {\n        type: Object\n    }\n};\n\nfunction getInterpolateArg(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n{ slots }, // SetupContext,\nkeys) {\n    if (keys.length === 1 && keys[0] === 'default') {\n        // default slot with list\n        const ret = slots.default ? slots.default() : [];\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        return ret.reduce((slot, current) => {\n            return [\n                ...slot,\n                // prettier-ignore\n                ...(current.type === Fragment ? current.children : [current])\n            ];\n        }, []);\n    }\n    else {\n        // named slots\n        return keys.reduce((arg, key) => {\n            const slot = slots[key];\n            if (slot) {\n                arg[key] = slot();\n            }\n            return arg;\n        }, create());\n    }\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getFragmentableTag() {\n    return Fragment;\n}\n\nconst TranslationImpl = /*#__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-t',\n    props: assign({\n        keypath: {\n            type: String,\n            required: true\n        },\n        plural: {\n            type: [Number, String],\n            validator: (val) => isNumber(val) || !isNaN(val)\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const { slots, attrs } = context;\n        // NOTE: avoid https://github.com/microsoft/rushstack/issues/1050\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return () => {\n            const keys = Object.keys(slots).filter(key => key[0] !== '_');\n            const options = create();\n            if (props.locale) {\n                options.locale = props.locale;\n            }\n            if (props.plural !== undefined) {\n                options.plural = isString(props.plural) ? +props.plural : props.plural;\n            }\n            const arg = getInterpolateArg(context, keys);\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const children = i18n[TranslateVNodeSymbol](props.keypath, arg, options);\n            const assignedAttrs = assign(create(), attrs);\n            const tag = isString(props.tag) || isObject(props.tag)\n                ? props.tag\n                : getFragmentableTag();\n            return h(tag, assignedAttrs, children);\n        };\n    }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Translation Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [TranslationProps](component#translationprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Component Interpolation](../guide/advanced/component)\n *\n * @example\n * ```html\n * <div id=\"app\">\n *   <!-- ... -->\n *   <i18n keypath=\"term\" tag=\"label\" for=\"tos\">\n *     <a :href=\"url\" target=\"_blank\">{{ $t('tos') }}</a>\n *   </i18n>\n *   <!-- ... -->\n * </div>\n * ```\n * ```js\n * import { createApp } from 'vue'\n * import { createI18n } from 'vue-i18n'\n *\n * const messages = {\n *   en: {\n *     tos: 'Term of Service',\n *     term: 'I accept xxx {0}.'\n *   },\n *   ja: {\n *     tos: '利用規約',\n *     term: '私は xxx の{0}に同意します。'\n *   }\n * }\n *\n * const i18n = createI18n({\n *   locale: 'en',\n *   messages\n * })\n *\n * const app = createApp({\n *   data: {\n *     url: '/term'\n *   }\n * }).use(i18n).mount('#app')\n * ```\n *\n * @VueI18nComponent\n */\nconst Translation = TranslationImpl;\nconst I18nT = Translation;\n\nfunction isVNode(target) {\n    return isArray(target) && !isString(target[0]);\n}\nfunction renderFormatter(props, context, slotKeys, partFormatter) {\n    const { slots, attrs } = context;\n    return () => {\n        const options = { part: true };\n        let overrides = create();\n        if (props.locale) {\n            options.locale = props.locale;\n        }\n        if (isString(props.format)) {\n            options.key = props.format;\n        }\n        else if (isObject(props.format)) {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            if (isString(props.format.key)) {\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                options.key = props.format.key;\n            }\n            // Filter out number format options only\n            overrides = Object.keys(props.format).reduce((options, prop) => {\n                return slotKeys.includes(prop)\n                    ? assign(create(), options, { [prop]: props.format[prop] }) // eslint-disable-line @typescript-eslint/no-explicit-any\n                    : options;\n            }, create());\n        }\n        const parts = partFormatter(...[props.value, options, overrides]);\n        let children = [options.key];\n        if (isArray(parts)) {\n            children = parts.map((part, index) => {\n                const slot = slots[part.type];\n                const node = slot\n                    ? slot({ [part.type]: part.value, index, parts })\n                    : [part.value];\n                if (isVNode(node)) {\n                    node[0].key = `${part.type}-${index}`;\n                }\n                return node;\n            });\n        }\n        else if (isString(parts)) {\n            children = [parts];\n        }\n        const assignedAttrs = assign(create(), attrs);\n        const tag = isString(props.tag) || isObject(props.tag)\n            ? props.tag\n            : getFragmentableTag();\n        return h(tag, assignedAttrs, children);\n    };\n}\n\nconst NumberFormatImpl = /*#__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-n',\n    props: assign({\n        value: {\n            type: Number,\n            required: true\n        },\n        format: {\n            type: [String, Object]\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return renderFormatter(props, context, NUMBER_FORMAT_OPTIONS_KEYS, (...args) => \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        i18n[NumberPartsSymbol](...args));\n    }\n});\n/**\n * export the public type for h/tsx inference\n * also to avoid inline import() in generated d.ts files\n */\n/**\n * Number Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/number#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.NumberFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-numberformat)\n *\n * @VueI18nComponent\n */\nconst NumberFormat = NumberFormatImpl;\nconst I18nN = NumberFormat;\n\nfunction getComposer$1(i18n, instance) {\n    const i18nInternal = i18n;\n    if (i18n.mode === 'composition') {\n        return (i18nInternal.__getInstance(instance) || i18n.global);\n    }\n    else {\n        const vueI18n = i18nInternal.__getInstance(instance);\n        return vueI18n != null\n            ? vueI18n.__composer\n            : i18n.global.__composer;\n    }\n}\n/**\n * @deprecated will be removed at vue-i18n v12\n */\nfunction vTDirective(i18n) {\n    const _process = (binding) => {\n        if ((process.env.NODE_ENV !== 'production')) {\n            warnOnce(getWarnMessage(I18nWarnCodes.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));\n        }\n        const { instance, value } = binding;\n        /* istanbul ignore if */\n        if (!instance || !instance.$) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        const composer = getComposer$1(i18n, instance.$);\n        const parsedValue = parseValue(value);\n        return [\n            Reflect.apply(composer.t, composer, [...makeParams(parsedValue)]),\n            composer\n        ];\n    };\n    const register = (el, binding) => {\n        const [textContent, composer] = _process(binding);\n        if (inBrowser && i18n.global === composer) {\n            // global scope only\n            el.__i18nWatcher = watch(composer.locale, () => {\n                binding.instance && binding.instance.$forceUpdate();\n            });\n        }\n        el.__composer = composer;\n        el.textContent = textContent;\n    };\n    const unregister = (el) => {\n        if (inBrowser && el.__i18nWatcher) {\n            el.__i18nWatcher();\n            el.__i18nWatcher = undefined;\n            delete el.__i18nWatcher;\n        }\n        if (el.__composer) {\n            el.__composer = undefined;\n            delete el.__composer;\n        }\n    };\n    const update = (el, { value }) => {\n        if (el.__composer) {\n            const composer = el.__composer;\n            const parsedValue = parseValue(value);\n            el.textContent = Reflect.apply(composer.t, composer, [\n                ...makeParams(parsedValue)\n            ]);\n        }\n    };\n    const getSSRProps = (binding) => {\n        const [textContent] = _process(binding);\n        return { textContent };\n    };\n    return {\n        created: register,\n        unmounted: unregister,\n        beforeUpdate: update,\n        getSSRProps\n    };\n}\nfunction parseValue(value) {\n    if (isString(value)) {\n        return { path: value };\n    }\n    else if (isPlainObject(value)) {\n        if (!('path' in value)) {\n            throw createI18nError(I18nErrorCodes.REQUIRED_VALUE, 'path');\n        }\n        return value;\n    }\n    else {\n        throw createI18nError(I18nErrorCodes.INVALID_VALUE);\n    }\n}\nfunction makeParams(value) {\n    const { path, locale, args, choice, plural } = value;\n    const options = {};\n    const named = args || {};\n    if (isString(locale)) {\n        options.locale = locale;\n    }\n    if (isNumber(choice)) {\n        options.plural = choice;\n    }\n    if (isNumber(plural)) {\n        options.plural = plural;\n    }\n    return [path, named, options];\n}\n\nfunction apply(app, i18n, ...options) {\n    const pluginOptions = isPlainObject(options[0])\n        ? options[0]\n        : {};\n    const globalInstall = isBoolean(pluginOptions.globalInstall)\n        ? pluginOptions.globalInstall\n        : true;\n    if (globalInstall) {\n        [Translation.name, 'I18nT'].forEach(name => app.component(name, Translation));\n        [NumberFormat.name, 'I18nN'].forEach(name => app.component(name, NumberFormat));\n        [DatetimeFormat.name, 'I18nD'].forEach(name => app.component(name, DatetimeFormat));\n    }\n    // install directive\n    {\n        app.directive('t', vTDirective(i18n));\n    }\n}\n\n/**\n * Injection key for {@link useI18n}\n *\n * @remarks\n * The global injection key for I18n instances with `useI18n`. this injection key is used in Web Components.\n * Specify the i18n instance created by {@link createI18n} together with `provide` function.\n *\n * @VueI18nGeneral\n */\nconst I18nInjectionKey = \n/* #__PURE__*/ makeSymbol('global-vue-i18n');\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction createI18n(options = {}) {\n    // prettier-ignore\n    const __legacyMode = __VUE_I18N_LEGACY_API__ && isBoolean(options.legacy)\n            ? options.legacy\n            : __VUE_I18N_LEGACY_API__;\n    if ((process.env.NODE_ENV !== 'production') && __legacyMode) {\n        warnOnce(getWarnMessage(I18nWarnCodes.DEPRECATE_LEGACY_MODE));\n    }\n    // prettier-ignore\n    const __globalInjection = isBoolean(options.globalInjection)\n        ? options.globalInjection\n        : true;\n    const __instances = new Map();\n    const [globalScope, __global] = createGlobal(options, __legacyMode);\n    const symbol = /* #__PURE__*/ makeSymbol((process.env.NODE_ENV !== 'production') ? 'vue-i18n' : '');\n    function __getInstance(component) {\n        return __instances.get(component) || null;\n    }\n    function __setInstance(component, instance) {\n        __instances.set(component, instance);\n    }\n    function __deleteInstance(component) {\n        __instances.delete(component);\n    }\n    const i18n = {\n        // mode\n        get mode() {\n            return __VUE_I18N_LEGACY_API__ && __legacyMode\n                ? 'legacy'\n                : 'composition';\n        },\n        // install plugin\n        async install(app, ...options) {\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\n                app.__VUE_I18N__ = i18n;\n            }\n            // setup global provider\n            app.__VUE_I18N_SYMBOL__ = symbol;\n            app.provide(app.__VUE_I18N_SYMBOL__, i18n);\n            // set composer & vuei18n extend hook options from plugin options\n            if (isPlainObject(options[0])) {\n                const opts = options[0];\n                i18n.__composerExtend =\n                    opts.__composerExtend;\n                i18n.__vueI18nExtend =\n                    opts.__vueI18nExtend;\n            }\n            // global method and properties injection for Composition API\n            let globalReleaseHandler = null;\n            if (!__legacyMode && __globalInjection) {\n                globalReleaseHandler = injectGlobalFields(app, i18n.global);\n            }\n            // install built-in components and directive\n            if (__VUE_I18N_FULL_INSTALL__) {\n                apply(app, i18n, ...options);\n            }\n            // setup mixin for Legacy API\n            if (__VUE_I18N_LEGACY_API__ && __legacyMode) {\n                app.mixin(defineMixin(__global, __global.__composer, i18n));\n            }\n            // release global scope\n            const unmountApp = app.unmount;\n            app.unmount = () => {\n                globalReleaseHandler && globalReleaseHandler();\n                i18n.dispose();\n                unmountApp();\n            };\n            // setup vue-devtools plugin\n            if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && !false) {\n                const ret = await enableDevTools(app, i18n);\n                if (!ret) {\n                    throw createI18nError(I18nErrorCodes.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);\n                }\n                const emitter = createEmitter();\n                if (__legacyMode) {\n                    const _vueI18n = __global;\n                    _vueI18n.__enableEmitter && _vueI18n.__enableEmitter(emitter);\n                }\n                else {\n                    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                    const _composer = __global;\n                    _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n                }\n                emitter.on('*', addTimelineEvent);\n            }\n        },\n        // global accessor\n        get global() {\n            return __global;\n        },\n        dispose() {\n            globalScope.stop();\n        },\n        // @internal\n        __instances,\n        // @internal\n        __getInstance,\n        // @internal\n        __setInstance,\n        // @internal\n        __deleteInstance\n    };\n    return i18n;\n}\nfunction useI18n(options = {}) {\n    const instance = getCurrentInstance();\n    if (instance == null) {\n        throw createI18nError(I18nErrorCodes.MUST_BE_CALL_SETUP_TOP);\n    }\n    if (!instance.isCE &&\n        instance.appContext.app != null &&\n        !instance.appContext.app.__VUE_I18N_SYMBOL__) {\n        throw createI18nError(I18nErrorCodes.NOT_INSTALLED);\n    }\n    const i18n = getI18nInstance(instance);\n    const gl = getGlobalComposer(i18n);\n    const componentOptions = getComponentOptions(instance);\n    const scope = getScope(options, componentOptions);\n    if (scope === 'global') {\n        adjustI18nResources(gl, options, componentOptions);\n        return gl;\n    }\n    if (scope === 'parent') {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        let composer = getComposer(i18n, instance, options.__useComponent);\n        if (composer == null) {\n            if ((process.env.NODE_ENV !== 'production')) {\n                warn(getWarnMessage(I18nWarnCodes.NOT_FOUND_PARENT_SCOPE));\n            }\n            composer = gl;\n        }\n        return composer;\n    }\n    const i18nInternal = i18n;\n    let composer = i18nInternal.__getInstance(instance);\n    if (composer == null) {\n        const composerOptions = assign({}, options);\n        if ('__i18n' in componentOptions) {\n            composerOptions.__i18n = componentOptions.__i18n;\n        }\n        if (gl) {\n            composerOptions.__root = gl;\n        }\n        composer = createComposer(composerOptions);\n        if (i18nInternal.__composerExtend) {\n            composer[DisposeSymbol] =\n                i18nInternal.__composerExtend(composer);\n        }\n        setupLifeCycle(i18nInternal, instance, composer);\n        i18nInternal.__setInstance(instance, composer);\n    }\n    else {\n        if ((process.env.NODE_ENV !== 'production') && scope === 'local') {\n            warn(getWarnMessage(I18nWarnCodes.DUPLICATE_USE_I18N_CALLING));\n        }\n    }\n    return composer;\n}\nfunction createGlobal(options, legacyMode) {\n    const scope = effectScope();\n    const obj = __VUE_I18N_LEGACY_API__ && legacyMode\n        ? scope.run(() => createVueI18n(options))\n        : scope.run(() => createComposer(options));\n    if (obj == null) {\n        throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n    }\n    return [scope, obj];\n}\nfunction getI18nInstance(instance) {\n    const i18n = inject(!instance.isCE\n        ? instance.appContext.app.__VUE_I18N_SYMBOL__\n        : I18nInjectionKey);\n    /* istanbul ignore if */\n    if (!i18n) {\n        throw createI18nError(!instance.isCE\n            ? I18nErrorCodes.UNEXPECTED_ERROR\n            : I18nErrorCodes.NOT_INSTALLED_WITH_PROVIDE);\n    }\n    return i18n;\n}\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getScope(options, componentOptions) {\n    // prettier-ignore\n    return isEmptyObject(options)\n        ? ('__i18n' in componentOptions)\n            ? 'local'\n            : 'global'\n        : !options.useScope\n            ? 'local'\n            : options.useScope;\n}\nfunction getGlobalComposer(i18n) {\n    // prettier-ignore\n    return i18n.mode === 'composition'\n        ? i18n.global\n        : i18n.global.__composer;\n}\nfunction getComposer(i18n, target, useComponent = false) {\n    let composer = null;\n    const root = target.root;\n    let current = getParentComponentInstance(target, useComponent);\n    while (current != null) {\n        const i18nInternal = i18n;\n        if (i18n.mode === 'composition') {\n            composer = i18nInternal.__getInstance(current);\n        }\n        else {\n            if (__VUE_I18N_LEGACY_API__) {\n                const vueI18n = i18nInternal.__getInstance(current);\n                if (vueI18n != null) {\n                    composer = vueI18n\n                        .__composer;\n                    if (useComponent &&\n                        composer &&\n                        !composer[InejctWithOptionSymbol] // eslint-disable-line @typescript-eslint/no-explicit-any\n                    ) {\n                        composer = null;\n                    }\n                }\n            }\n        }\n        if (composer != null) {\n            break;\n        }\n        if (root === current) {\n            break;\n        }\n        current = current.parent;\n    }\n    return composer;\n}\nfunction getParentComponentInstance(target, useComponent = false) {\n    if (target == null) {\n        return null;\n    }\n    // if `useComponent: true` will be specified, we get lexical scope owner instance for use-case slots\n    return !useComponent\n        ? target.parent\n        : target.vnode.ctx || target.parent; // eslint-disable-line @typescript-eslint/no-explicit-any\n}\nfunction setupLifeCycle(i18n, target, composer) {\n    let emitter = null;\n    onMounted(() => {\n        // inject composer instance to DOM for intlify-devtools\n        if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n            !false &&\n            target.vnode.el) {\n            target.vnode.el.__VUE_I18N__ = composer;\n            emitter = createEmitter();\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            const _composer = composer;\n            _composer[EnableEmitter] && _composer[EnableEmitter](emitter);\n            emitter.on('*', addTimelineEvent);\n        }\n    }, target);\n    onUnmounted(() => {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        const _composer = composer;\n        // remove composer instance from DOM for intlify-devtools\n        if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n            !false &&\n            target.vnode.el &&\n            target.vnode.el.__VUE_I18N__) {\n            emitter && emitter.off('*', addTimelineEvent);\n            _composer[DisableEmitter] && _composer[DisableEmitter]();\n            delete target.vnode.el.__VUE_I18N__;\n        }\n        i18n.__deleteInstance(target);\n        // dispose extended resources\n        const dispose = _composer[DisposeSymbol];\n        if (dispose) {\n            dispose();\n            delete _composer[DisposeSymbol];\n        }\n    }, target);\n}\nconst globalExportProps = [\n    'locale',\n    'fallbackLocale',\n    'availableLocales'\n];\nconst globalExportMethods = ['t', 'rt', 'd', 'n', 'tm', 'te']\n    ;\nfunction injectGlobalFields(app, composer) {\n    const i18n = Object.create(null);\n    globalExportProps.forEach(prop => {\n        const desc = Object.getOwnPropertyDescriptor(composer, prop);\n        if (!desc) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        const wrap = isRef(desc.value) // check computed props\n            ? {\n                get() {\n                    return desc.value.value;\n                },\n                // eslint-disable-next-line @typescript-eslint/no-explicit-any\n                set(val) {\n                    desc.value.value = val;\n                }\n            }\n            : {\n                get() {\n                    return desc.get && desc.get();\n                }\n            };\n        Object.defineProperty(i18n, prop, wrap);\n    });\n    app.config.globalProperties.$i18n = i18n;\n    globalExportMethods.forEach(method => {\n        const desc = Object.getOwnPropertyDescriptor(composer, method);\n        if (!desc || !desc.value) {\n            throw createI18nError(I18nErrorCodes.UNEXPECTED_ERROR);\n        }\n        Object.defineProperty(app.config.globalProperties, `$${method}`, desc);\n    });\n    const dispose = () => {\n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        delete app.config.globalProperties.$i18n;\n        globalExportMethods.forEach(method => {\n            // eslint-disable-next-line @typescript-eslint/no-explicit-any\n            delete app.config.globalProperties[`$${method}`];\n        });\n    };\n    return dispose;\n}\n\nconst DatetimeFormatImpl = /* #__PURE__*/ defineComponent({\n    /* eslint-disable */\n    name: 'i18n-d',\n    props: assign({\n        value: {\n            type: [Number, Date],\n            required: true\n        },\n        format: {\n            type: [String, Object]\n        }\n    }, baseFormatProps),\n    /* eslint-enable */\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    setup(props, context) {\n        const i18n = props.i18n ||\n            useI18n({\n                useScope: props.scope,\n                __useComponent: true\n            });\n        return renderFormatter(props, context, DATETIME_FORMAT_OPTIONS_KEYS, (...args) => \n        // eslint-disable-next-line @typescript-eslint/no-explicit-any\n        i18n[DatetimePartsSymbol](...args));\n    }\n});\n/**\n * Datetime Format Component\n *\n * @remarks\n * See the following items for property about details\n *\n * @VueI18nSee [FormattableProps](component#formattableprops)\n * @VueI18nSee [BaseFormatProps](component#baseformatprops)\n * @VueI18nSee [Custom Formatting](../guide/essentials/datetime#custom-formatting)\n *\n * @VueI18nDanger\n * Not supported IE, due to no support `Intl.DateTimeFormat#formatToParts` in [IE](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\n *\n * If you want to use it, you need to use [polyfill](https://github.com/formatjs/formatjs/tree/main/packages/intl-datetimeformat)\n *\n * @VueI18nComponent\n */\nconst DatetimeFormat = DatetimeFormatImpl;\nconst I18nD = DatetimeFormat;\n\n{\n    initFeatureFlags();\n}\n// register message compiler at vue-i18n\nregisterMessageCompiler(compile);\n// register message resolver at vue-i18n\nregisterMessageResolver(resolveValue);\n// register fallback locale at vue-i18n\nregisterLocaleFallbacker(fallbackWithLocaleChain);\n// NOTE: experimental !!\nif ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {\n    const target = getGlobalThis();\n    target.__INTLIFY__ = true;\n    setDevToolsHook(target.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);\n}\nif ((process.env.NODE_ENV !== 'production')) ;\n\nexport { DatetimeFormat, I18nD, I18nInjectionKey, I18nN, I18nT, NumberFormat, Translation, VERSION, createI18n, useI18n, vTDirective };\n","{\n  \"common\": {\n    \"yes\": \"是\",\n    \"no\": \"否\",\n    \"actions\": \"操作\",\n    \"add\": \"添加\",\n    \"delete\": \"删除\",\n    \"edit\": \"编辑\",\n    \"save\": \"保存\",\n    \"confirm\": \"确定\",\n    \"cancel\": \"取消\",\n    \"close\": \"关闭\",\n    \"clear\": \"清除\",\n    \"more\": \"更多\",\n    \"action-prompt\": \"操作提示\",\n    \"close-confirm\": \"确定关闭吗？\",\n    \"delete-confirm\": \"确定删除吗？\",\n    \"cancel-confirm\": \"确定取消吗？\",\n    \"edit-confirm\": \"确定编辑吗？\",\n    \"save-confirm\": \"确定保存吗？\",\n    \"save-success\": \"保存成功\",\n    \"save-error\": \"保存失败\",\n    \"delete-success\": \"删除成功\",\n    \"delete-error\": \"删除失败\",\n    \"success\": \"成功\",\n    \"error\": \"错误\",\n    \"fail\": \"失败\",\n    \"loading\": \"加载中\",\n    \"loading-finished\": \"数据加载完毕\",\n    \"data\": \"数据\",\n    \"no-data\": \"暂无数据\",\n    \"content\": \"内容\",\n    \"no-content\": \"暂无内容\",\n    \"search\": \"搜索\",\n    \"start\": \"开始\",\n    \"end\": \"结束\"\n  },\n  \"form\": {\n    \"please-select\": \"请选择{title}\",\n    \"please-input\": \"请填写{title}\",\n    \"please-upload\": \"请上传{title}\",\n    \"search-placeholder\": \"请输入搜索内容\",\n    \"upload\": \"上传\",\n    \"upload-fail\": \"上传失败，请稍后再试\",\n    \"upload-size-limit\": \"超过服务器上传附件的大小限制\",\n    \"upload-size-max\": \"上传文件大小不能超过{size}MB\",\n    \"upload-num-max\": \"最多只能上传{num}个文件\",\n    \"options\": \"选项\",\n    \"title\": \"标题\",\n    \"row-title\": \"行标题\",\n    \"scale\": \"分值\",\n    \"attachment\": \"附件\"\n  },\n  \"search\": {\n    \"equal\": \"等于\",\n    \"not-equal\": \"不等于\",\n    \"include\": \"包含\",\n    \"exclude\": \"不包含\",\n    \"include-sub\": \"包括子级\",\n    \"less-than\": \"小于\",\n    \"greater-than\": \"大于\",\n    \"between\": \"介于\",\n    \"null\": \"为空\",\n    \"not-null\": \"不为空\",\n    \"multiple-choice-available\": \"可多选\",\n    \"start-time\": \"开始时间\",\n    \"end-time\": \"结束时间\",\n    \"last-week\": \"上周\",\n    \"last-month\": \"上个月\",\n    \"past-week\": \"过去一周\",\n    \"past-two-weeks\": \"过去两周\",\n    \"past-month\": \"过去一个月\",\n    \"past-days\": \"过去{days}天\",\n    \"textarea-placeholder\": \"搜索{title}，每行一个\",\n    \"sort-setting\": \"排序设置\",\n    \"toggle-more\": \"展示/关闭更多搜索选项\",\n    \"collapse\": \"收起\",\n    \"clear-all-search-items\": \"清除所有搜索项\",\n    \"search-items\": \"搜索条件\",\n    \"item-unit\": \"项\",\n    \"items-unit\": \"项\",\n    \"sortable-items\": \"可排序项\",\n    \"sorted-items\": \"已排序项\",\n    \"select-sorting-item\": \"请选择排序项\",\n    \"ascending\": \"升序排序\",\n    \"descending\": \"降序排序\",\n    \"remove-item\": \"移除当前项\"\n  },\n  \"table\": {\n    \"editable\": \"可编辑\",\n    \"total\": \"共 {total} 条\",\n    \"custom\": \"自定义列\",\n    \"select-all\": \"全选\",\n    \"unselect-all\": \"取消全选\",\n    \"attachment\": \"查看附件 {title}\",\n    \"copy-success\": \"复制成功\"\n  },\n  \"signature-pad\": {\n    \"agreement\": \"请先同意协议\"\n  }\n}\n","{\n  \"common\": {\n    \"yes\": \"Yes\",\n    \"no\": \"No\",\n    \"actions\": \"Actions\",\n    \"add\": \"Add\",\n    \"delete\": \"Delete\",\n    \"edit\": \"Edit\",\n    \"save\": \"Save\",\n    \"confirm\": \"Confirm\",\n    \"cancel\": \"Cancel\",\n    \"close\": \"Close\",\n    \"clear\": \"Clear\",\n    \"more\": \"More\",\n    \"action-prompt\": \"Tips\",\n    \"close-confirm\": \"Are you sure you want to close?\",\n    \"delete-confirm\": \"Are you sure you want to delete this item?\",\n    \"cancel-confirm\": \"Are you sure you want to cancel this action?\",\n    \"edit-confirm\": \"Are you sure you want to edit this item?\",\n    \"save-confirm\": \"Are you sure you want to save this item?\",\n    \"save-success\": \"Save success\",\n    \"save-error\": \"Save error\",\n    \"delete-success\": \"Delete success\",\n    \"delete-error\": \"Delete error\",\n    \"success\": \"Success\",\n    \"error\": \"Error\",\n    \"fail\": \"Fail\",\n    \"loading\": \"Loading\",\n    \"loading-finished\": \"Finished\",\n    \"data\": \"Data\",\n    \"no-data\": \"No data\",\n    \"content\": \"Content\",\n    \"no-content\": \"No content\",\n    \"search\": \"Search\",\n    \"start\": \"Start\",\n    \"end\": \"End\"\n  },\n  \"form\": {\n    \"please-select\": \"Please select {title}\",\n    \"please-input\": \"Please input {title}\",\n    \"please-upload\": \"Please upload {title}\",\n    \"search-placeholder\": \"Please enter search content\",\n    \"upload\": \"Upload\",\n    \"upload-fail\": \"Upload fail\",\n    \"upload-size-limit\": \"Exceeded the server upload attachment size limit\",\n    \"upload-size-max\": \"The maximum file size you can upload is {size}MB\",\n    \"upload-num-max\": \"You can only upload up to {num} files\",\n    \"options\": \"Options\",\n    \"title\": \"Title\",\n    \"row-title\": \"Row title\",\n    \"scale\": \"Scale\",\n    \"attachment\": \"Attachment\"\n  },\n  \"search\": {\n    \"equal\": \"Equal to\",\n    \"not-equal\": \"Not equal to\",\n    \"include\": \"Include\",\n    \"exclude\": \"Exclude\",\n    \"include-sub\": \"Include sub-level\",\n    \"less-than\": \"Less than\",\n    \"greater-than\": \"Greater than\",\n    \"between\": \"Between\",\n    \"null\": \"Null\",\n    \"not-null\": \"Not null\",\n    \"multiple-choice-available\": \"Multiple choice available\",\n    \"start-time\": \"Start time\",\n    \"end-time\": \"End time\",\n    \"last-week\": \"Last week\",\n    \"last-month\": \"Last month\",\n    \"past-week\": \"Past week\",\n    \"past-two-weeks\": \"Past two weeks\",\n    \"past-month\": \"Past month\",\n    \"past-days\": \"Past {days} days\",\n    \"textarea-placeholder\": \"Search {title}，one per line\",\n    \"sort-setting\": \"Sort setting\",\n    \"toggle-more\": \"Show/Hide More Search Options\",\n    \"collapse\": \"Collapse\",\n    \"clear-all-search-items\": \"Clear all search items\",\n    \"search-items\": \"Search\",\n    \"item-unit\": \"item\",\n    \"items-unit\": \"items\",\n    \"sortable-items\": \"Sortable items\",\n    \"sorted-items\": \"Sorted items\",\n    \"select-sorting-item\": \"Please select sorting items\",\n    \"ascending\": \"Ascending\",\n    \"descending\": \"Descending\",\n    \"remove-item\": \"Remove sorting item\"\n  },\n  \"table\": {\n    \"editable\": \"Editable\",\n    \"total\": \"Total {total}\",\n    \"custom\": \"Custom\",\n    \"select-all\": \"Select all\",\n    \"unselect-all\": \"Unselect all\",\n    \"attachment\": \"Attachment {title}\",\n    \"copy-success\": \"Copy success\"\n  },\n  \"signature-pad\": {\n    \"agreement\": \"Please check the agreement\"\n  }\n}\n","import { createI18n } from \"vue-i18n\";\n\n// 导入语言包\nimport zhCN from \"./locales/zh_CN.json\";\nimport enUS from \"./locales/en_US.json\";\n\nconst messages = {\n  zh_CN: zhCN,\n  en_US: enUS,\n};\n\nconst i18n = createI18n({\n  legacy: false,\n  locale: \"zh_CN\", // 默认语言\n  fallbackLocale: \"zh_CN\", // 回退语言\n  messages,\n});\n\nexport default i18n;\n","/**\n * @module Interact\n */\n\nimport { Modal } from \"ant-design-vue\";\nimport { isFunction } from \"lodash-es\";\nimport i18n from \"../i18n\";\n\n/**\n * 确认弹窗\n * @param {string} msg - 提示信息\n * @param {Function} [onOk=null] - 确认回调\n * @param {boolean}  [loading=false] - 是否异步加载\n * @param {Function} [onCancel=null] - 取消回调\n * @return {*}\n */\nexport function useModalConfirm(msg, onOk, loading, onCancel) {\n  const modal = Modal.confirm({\n    title: i18n.global.t(\"common.action-prompt\"),\n    content: msg || \"\",\n    onOk: () => {\n      if (onOk && isFunction(onOk)) {\n        onOk();\n      }\n      if (loading) {\n        modal.update({\n          okButtonProps: {\n            loading: true,\n          },\n        });\n        return new Promise(() => {});\n      }\n      return null;\n    },\n    onCancel: () => {\n      if (onCancel && isFunction(onCancel)) {\n        onCancel();\n      }\n    },\n  });\n  return modal;\n}\n","/**\n * @module Uitls\n */\n\nimport { find, flatMapDeep, isNull, isUndefined, reduce } from \"lodash-es\";\n\n/**\n * 从 options 中根据 value 获取 label\n * @param {string|number} value - 值\n * @param {Array} options - 选项\n * @return {string}\n */\nexport function useLabelFromOptionsValue(value, options) {\n  if (!options) {\n    return \"\";\n  }\n  const option = options.find(option => option.value === value);\n  return option ? option.label : \"\";\n}\n\n/**\n * 从嵌套的 options 中根据 value 获取 label, 如 [1, 3] => [\"东\", \"南\"]\n *\n * @param {Array} options - 嵌套的选项\n * @param {Array} values - 需要查找的值\n * @param {Object} [adapter={value: \"value\",label: \"label\",children: \"children\"}] - 选项适配器\n * @return Array\n */\nexport function useFindLabelsInValues(options, values, adapter) {\n  adapter = adapter || {\n    value: \"value\",\n    label: \"label\",\n    children: \"children\",\n  };\n\n  const labels = [];\n\n  function recursiveSearch(node) {\n    if (values.includes(node[adapter.value])) {\n      labels.push(node[adapter.label]);\n    }\n\n    if (node[adapter.children]?.length) {\n      node[adapter.children].forEach(child => {\n        recursiveSearch(child);\n      });\n    }\n  }\n\n  options.forEach(item => {\n    recursiveSearch(item);\n  });\n\n  return labels;\n}\n\n/**\n * 从 options 为 [{label: \"\", value: \"\", children: []] 样式的多层数组中，根据所给的 value 递归找出该 option\n * @param {Array} options\n * @param {Number|String} value\n * @param {Object} [adapter]\n * @return {Object|null}\n */\nexport function useFindOptionByValue(options, value, adapter) {\n  adapter = adapter || {\n    value: \"value\",\n    label: \"label\",\n    children: \"children\",\n  };\n\n  // 遍历 options 数组\n  for (let option of options) {\n    // 如果当前 option 的 value 匹配目标值，则返回当前 option\n    if (option[adapter.value] === value) {\n      return option;\n    }\n    // 如果当前 option 有子选项\n    if (option[adapter.children] && option[adapter.children].length) {\n      // 递归搜索子选项数组\n      const foundOption = useFindOptionByValue(option[adapter.children], value, adapter);\n      // 如果找到了匹配的子选项，则返回\n      if (foundOption) {\n        return foundOption;\n      }\n    }\n  }\n  // 如果未找到匹配的选项，则返回 null\n  return null;\n}\n\n/**\n * 从嵌套的 options 中根据 value 获取 label 路径, 如地区路径: [440000, 440100, 440113] => [\"广东省\", \"广州市\", \" 番禺区\"]\n * @param {Array} options - 嵌套的选项\n * @param {Array} path - 需要查找的值的路径数组\n * @param {Object} [adapter={value: \"value\",label: \"label\",children: \"children\"}] - 选项适配器\n * @return Array\n */\nexport function useFindLabelsFromPath(options, path, adapter) {\n  adapter = adapter || {\n    value: \"value\",\n    label: \"label\",\n    children: \"children\",\n  };\n\n  const labels = [];\n  reduce(\n    path,\n    (acc, value) => {\n      const item = find(acc, { [adapter.value]: value });\n      if (item) {\n        labels.push(item[adapter.label]);\n        return item[adapter.children];\n      }\n    },\n    options\n  );\n  return labels;\n}\n\n/**\n * 从嵌套的 options 中根据 value 获取 label 路径, 如地区路径: 440113 => [\"广东省\", \"广州市\", \" 番禺区\"]\n * @param options\n * @param value\n * @param adapter\n * @return {*}\n */\nexport function useFindParentLabels(options, value, adapter) {\n  adapter = adapter || {\n    value: \"value\",\n    label: \"label\",\n    children: \"children\",\n  };\n\n  const labels = [];\n\n  function findParentLabels(options, value, labels) {\n    for (const option of options) {\n      if (option[adapter.value] === value) {\n        labels.unshift(option[adapter.label]);\n        break;\n      } else if (option[adapter.children]) {\n        const childResult = findParentLabels(option[adapter.children], value, labels);\n        if (childResult.length > 0) {\n          labels.unshift(option[adapter.label]);\n          break;\n        }\n      }\n    }\n\n    return labels;\n  }\n\n  return findParentLabels(options, value, labels);\n}\n\n/**\n * 从嵌套的 options 中根据 value 获取整个 values 路径, 如地区路径: 440113 => [440000, 440100, 440113]\n * @param options\n * @param value\n * @param adapter\n * @return {*}\n */\nexport function useFindParentValues(options, value, adapter) {\n  adapter = adapter || {\n    value: \"value\",\n    label: \"label\",\n    children: \"children\",\n  };\n\n  const values = [];\n\n  function findParentValues(options, value, values) {\n    for (const option of options) {\n      if (option[adapter.value] === value) {\n        values.unshift(option[adapter.value]);\n        break;\n      } else if (option[adapter.children]) {\n        const childResult = findParentValues(option[adapter.children], value, values);\n        if (childResult.length > 0) {\n          values.unshift(option[adapter.value]);\n          break;\n        }\n      }\n    }\n\n    return values;\n  }\n\n  return findParentValues(options, value, values);\n}\n\n/**\n * let obj = {\n *     \"name\": \"西学楼1号\",\n *     \"parent\": {\n *         \"name\": \"学生宿舍\",\n *         \"parent\": {\n *             \"name\": \"宿舍区域\",\n *         }\n *     }\n * }\n * useFindPropertyRecursive(obj, 'name', 'parent') // [\"西学楼1号\", \"学生宿舍\", \"宿舍区域\"]\n *\n * 从嵌套的对象中递归获取某个属性\n * @param {Object} item 获取对象\n * @param {String} propertyKey 想获取的属性名称\n * @param {String} nestedKey 嵌套的属性\n * @return Array\n */\nexport function useFindPropertyRecursive(item, propertyKey, nestedKey) {\n  return flatMapDeep(item, (value, key) => {\n    if (key === propertyKey) {\n      return value;\n    }\n    if (key === nestedKey) {\n      return useFindPropertyRecursive(value, propertyKey, nestedKey);\n    }\n    return [];\n  });\n}\n\nconst localCacheSession = {};\nconst localSession = {\n  setItem(key, value) {\n    localCacheSession[key] = value;\n  },\n  getItem(key) {\n    return localCacheSession[key];\n  },\n  removeItem(key) {\n    delete localCacheSession[key];\n  },\n};\n\nwindow._printCache = () => {\n  console.log(JSON.parse(JSON.stringify(localCacheSession, null, 2)));\n};\n\n/**\n * 用于储存缓存的值\n * @param {*} key 缓存的 key\n * @param {*} [sessionType] 缓存的类型，默认为内存缓存\n * @returns get(默认值) 获取缓存的值，set(键, 值) 设置缓存的值\n */\nexport function useCache(key, sessionType) {\n  const cacheSession = sessionType || localSession;\n  const shouldTransform = !!sessionType; // 如果是 localStorage 之类的，则需要转换一下\n  return {\n    get(defaultValue) {\n      const value = cacheSession.getItem(key);\n      if (isNull(value) || isUndefined(value)) {\n        return defaultValue;\n      }\n      return shouldTransform ? JSON.parse(value) : value;\n    },\n    set(value) {\n      cacheSession.setItem(key, shouldTransform ? JSON.stringify(value) : value);\n    },\n    remove() {\n      cacheSession.removeItem(key);\n    },\n  };\n}\n\n/**\n * 精度安全的数值处理函数\n * @param {number|string} value 原始数字\n * @param {number} [precision=2] 小数位数（默认保留2位）\n * @returns {number}\n */\nexport function useNumber(value, precision = 2) {\n  if (typeof value !== \"number\" && isNaN(value)) {\n    return 0;\n  }\n\n  const factor = Math.pow(10, precision);\n  return Math.round(value * factor) / factor;\n}\n","/**\n * @param {String} type 类型\n * @param {Object} [options] 选项\n * @param {String} [options.message] 错误提示信息\n * @param {String} [options.mode] 模式\n * @param {String} [options.version] 版本\n * @returns {{}}\n */\nexport function useRegexRule(type, options) {\n  options = options || {};\n  const rule = {};\n\n  switch (type) {\n    case \"email\":\n      //邮箱: '90203918@qq.com', 'nbilly@126.com'\n      rule.pattern =\n        /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n      rule.message = options.message || \"请填写正确的邮箱地址\";\n      break;\n    case \"phone\":\n      //手机号码\n      if (options.mode === \"strict\") {\n        //严谨，根据工信部2019年最新公布的手机号: '008618311006933', '+8617888829981', '19119255642'\n        rule.pattern =\n          /^(?:(?:\\+|00)86)?1(?:(?:3[\\d])|(?:4[5-7|9])|(?:5[0-3|5-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\\d])|(?:9[1|8|9]))\\d{8}$/;\n      } else {\n        //宽松，只要是13,14,15,16,17,18,19开头即可: '008618311006933', '+8617888829981', '19119255642'\n        rule.pattern = /^(?:(?:\\+|00)86)?1[3-9]\\d{9}$/;\n      }\n      rule.message = options.message || \"请填写正确的手机号码\";\n      break;\n    case \"tel\":\n    case \"telephone\":\n      //座机号码\n      if (options.strict === \"strict\") {\n        //严格带区号: '0936-4211235'\n        rule.pattern = /^\\d{3}-\\d{8}$|^\\d{4}-\\d{7,8}$/;\n      } else {\n        //可带可不带: '0936-4211235','89076543'\n        rule.pattern = /^(?:\\d{3}-)?\\d{8}$|^(?:\\d{4}-)?\\d{7,8}$/;\n      }\n      rule.message = options.message || \"请填写正确的座机号码\";\n      break;\n    case \"ID\": //身份证号码\n    case \"id\":\n      if (!options.mode || [\"china\", \"cn\"].includes(options.mode?.toLowerCase())) {\n        if (options.version?.toLowerCase() === \"v1\") {\n          //一代身份证，(1代,15位数字): '123456991010193'\n          rule.pattern = /^[1-9]\\d{7}(?:0\\d|10|11|12)(?:0[1-9]|[1-2][\\d]|30|31)\\d{3}$/;\n        } else if (options.version?.toLowerCase() === \"v2\") {\n          //二代身份证，(2代,18位数字)最后一位是校验位,可能为数字或字符X: '12345619900101001X'\n          rule.pattern =\n            /^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[\\dXx]$/;\n        } else {\n          //兼容一代和二代\n          rule.pattern =\n            /(^\\d{8}(0\\d|10|11|12)([0-2]\\d|30|31)\\d{3}$)|(^\\d{6}(18|19|20)\\d{2}(0[1-9]|10|11|12)([0-2]\\d|30|31)\\d{3}(\\d|X|x)$)/;\n        }\n      } else if ([\"hk\", \"hongkong\", \"xg\", \"xianggang\"].includes(options.mode.toLowerCase())) {\n        //香港身份证: 'K034169(1)'\n        rule.pattern = /^[a-zA-Z]\\d{6}\\([\\dA]\\)$/;\n      } else if ([\"macau\", \"macao\", \"mo\", \"aomen\", \"am\"].includes(options.mode.toLowerCase())) {\n        //澳门身份证:'5686611(1)'\n        rule.pattern = /^[a-zA-Z]\\d{6}\\([\\dA]\\)$/;\n      } else if ([\"taiwan\", \"tw\"].includes(options.mode.toLowerCase())) {\n        //台湾身份证: 'U193683453'\n        rule.pattern = /^[a-zA-Z][0-9]{9}$/;\n      }\n\n      rule.message = options.message || \"请填写正确的证件号码\";\n      break;\n    case \"passport\":\n      //护照（包含香港、澳门）: 's28233515', '141234567', '159203084', 'MA1234567', 'K25345719'\n      rule.pattern =\n        /(^[EeKkGgDdSsPpHh]\\d{8}$)|(^(([Ee][a-fA-F])|([DdSsPp][Ee])|([Kk][Jj])|([Mm][Aa])|(1[45]))\\d{7}$)/;\n      rule.message = options.message || \"请填写正确的护照号码\";\n      break;\n    case \"credit-code\":\n    case \"uscc\":\n      //统一社会信用代码: '91230184MA1BUFLT44', '92371000MA3MXH0E3W'\n      rule.pattern = /^[0-9A-HJ-NPQRTUWXY]{2}\\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/;\n      rule.message = options.message || \"请填写正确的统一社会信用代码\";\n      break;\n    case \"bank-account\":\n    case \"bank\":\n      //银行账号: 6234567890, 6222026006705354217\n      //（10到30位, 覆盖对公/私账户, 参考[微信支付](https://pay.weixin.qq.com/wiki/doc/api/xiaowei.php?chapter=22_1)）\n      rule.pattern = /^[1-9]\\d{9,29}$/;\n      rule.message = options.message || \"请填写正确的银行账号\";\n      break;\n    case \"stock\":\n      //股票代码(A股): 'sz000858', 'SZ002136', 'sz300675', 'SH600600', 'sh601155'\n      rule.pattern = /^(s[hz]|S[HZ])(000[\\d]{3}|002[\\d]{3}|300[\\d]{3}|600[\\d]{3}|60[\\d]{4})$/;\n      rule.message = options.message || \"请填写正确的股票代码\";\n      break;\n    case \"url\":\n      //链接\n      if (options.mode === \"image\") {\n        //图片链接: 'https://www.abc.com/logo.png'\n        rule.pattern = /^https?:\\/\\/(.+\\/)+.+(\\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i;\n      } else if (options.mode === \"video\") {\n        //视频链接:'http://www.abc.com/video/wc.avi'\n        rule.pattern =\n          /^https?:\\/\\/(.+\\/)+.+(\\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4))$/i;\n      } else {\n        //普通链接: 'www.qq.com', 'https://baidu.com', '360.com:8080/vue/#/a=1&b=2'\n        rule.pattern =\n          /^(((ht|f)tps?):\\/\\/)?[\\w-]+(\\.[\\w-]+)+([\\w.,@?^=%&:/~+#-]*[\\w@?^=%&/~+#-])?$/;\n      }\n      rule.message = options.message || \"请填写正确的链接\";\n      break;\n    case \"md5\":\n      //md5(32位) : '21fe181c5bfc16306a6828c1f7b762e8'\n      rule.pattern = /^([a-f\\d]{32}|[A-F\\d]{32})$/;\n      rule.message = options.message || \"请填写正确的md5值\";\n      break;\n    case \"base64\":\n      //base64 : 'data:image/gif;base64,xxxx=='\n      rule.pattern =\n        /^\\s*data:(?:[a-z]+\\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\\-._~:@/?%\\s]*?)\\s*$/i;\n      rule.message = options.message || \"请填写正确的base64值\";\n      break;\n    case \"currency\":\n    case \"money\":\n      //货币\n      if (options.mode === \"positive\") {\n        //只支持正数、不支持校验千分位分隔符: 0.99, 8.99, 666\n        rule.pattern = /^\\d+(,\\d{3})*(\\.\\d{1,2})?$/;\n      } else {\n        //支持负数、千分位分隔符: 100, -0.99, 3, 234.32, -1, 900, 235.09, '12,345,678.90'\n        rule.pattern = /^-?\\d+(,\\d{3})*(\\.\\d{1,2})?$/;\n      }\n      rule.message = options.message || \"请填写正确的货币金额\";\n      break;\n    case \"chinese\":\n      //中文: '正则', '前端'\n      rule.pattern =\n        /^(?:[\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uFA0E\\uFA0F\\uFA11\\uFA13\\uFA14\\uFA1F\\uFA21\\uFA23\\uFA24\\uFA27-\\uFA29]|[\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0])+$/;\n      rule.message = options.message || \"请填写中文字符\";\n      break;\n    case \"name\":\n      //姓名\n      if (options.en || options.english) {\n        //英文: 'James', 'Kevin Wayne Durant', 'Dirk Nowitzki'\n        rule.pattern = /(^[a-zA-Z]{1}[a-zA-Z\\s]{0,20}[a-zA-Z]{1}$)/;\n      } else {\n        //中文: '葛二蛋', '凯文·杜兰特', '德克·维尔纳·诺维茨基'\n        rule.pattern = /^(?:[\\u4e00-\\u9fa5·]{2,16})$/;\n      }\n      rule.message = options.message || \"请填写正确的姓名\";\n      break;\n    case \"decimal\":\n      //小数: '0.0', '0.09'\n      rule.pattern = /^\\d+\\.\\d+$/;\n      rule.message = options.message || \"请填写正确的小数\";\n      break;\n    case \"number\":\n      //数字: 12345678\n      rule.pattern = /^\\d{1,}$/;\n      rule.message = options.message || \"请填写正确的数字\";\n      break;\n    case \"date\":\n      //日期: '1990-12-12', '2020-1-1'\n      rule.pattern = /^\\d{4}(-)(1[0-2]|0?\\d)\\1([0-2]\\d|\\d|30|31)$/;\n      rule.message = options.message || \"请填写正确的日期\";\n      break;\n    case \"time\":\n      //时间: '12:00:00', '23:59:59'\n      if (options.mode === \"12\") {\n        //12小时制: '12:00:00', '12:30:00', '12:59:59'\n        rule.pattern = /^(?:1[0-2]|0?[1-9]):[0-5]\\d:[0-5]\\d$/;\n      } else {\n        rule.pattern = /^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$/;\n      }\n      rule.message = options.message || \"请填写正确的时间\";\n      break;\n    case \"car\":\n    case \"plate-number\":\n    case \"car-number\":\n      if (options.mode === \"green\" || options.mode === \"newEnergy\") {\n        //新能源绿牌: '京AD92035', '甘G23459F'\n        rule.pattern =\n          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))$/;\n      } else if (options.mode === \"notNewEnergy\") {\n        //非新能源： '京A00599', '黑D23908'\n        rule.pattern =\n          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;\n      } else {\n        //混合: '京A12345D', '京A00599'\n        rule.pattern =\n          /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]{1}[A-HJ-NP-Z]{1}(?:(([0-9]{5}[DF])|([DF][A-HJ-NP-Z0-9][0-9]{4}))|[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1})$/;\n      }\n      rule.message = options.message || \"请填写正确的车牌号\";\n      break;\n    case \"version\":\n      //版本号: 16.3.2\n      rule.pattern = /^\\d+(?:\\.\\d+){2}$/;\n      rule.message = options.message || \"请填写正确的版本号\";\n      break;\n    case \"ip\":\n    case \"IP\":\n      //IP地址\n      if (options.mode === \"v6\" || options.mode === \"ipv6\") {\n        //IPv6地址: '2031:0000:130f:0000:0000:09c0:876a:130b', '[2031:0000:130f:0000:0000:09c0:876a:130b]:8080'\n        rule.pattern =\n          /^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\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|(\\d{1,2}))\\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/i;\n      } else {\n        //IPv4地址: '172.16.0.0','172.16.0.0:8080', '127.0.0.0', '127.0.0.0:998'\n        rule.pattern =\n          /^((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]).){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/;\n      }\n\n      rule.message = options.message || \"请填写正确的IP地址\";\n      break;\n    case \"qq\":\n      //QQ号: 123456789\n      rule.pattern = /^[1-9][0-9]{4,10}$/;\n      rule.message = options.message || \"请填写正确的QQ号\";\n      break;\n    case \"wechat\":\n      //微信号: 'github666', 'kd_-666'\n      //6至20位，以字母开头，字母，数字，减号，下划线\n      rule.pattern = /^[a-zA-Z][-_a-zA-Z0-9]{5,19}$/;\n      rule.message = options.message || \"请填写正确的微信号\";\n      break;\n    case \"alpha-numeric\":\n    case \"numeric-alpha\":\n      //字母数字: 'abc123', '123abc'\n      if (rule.mode === \"strict\") {\n        //同时有数字和英文字母\n        rule.pattern = /^(?=.*[a-zA-Z])(?=.*\\d).+$/;\n      } else {\n        rule.pattern = /^[A-Za-z0-9]+$/;\n      }\n      rule.message = options.message || \"请填写字母与数字的组合\";\n      break;\n    case \"alpha\":\n      //字母: 'abc', 'ABC'\n      if (options.mode === \"lower\" || options.mode === \"lowercase\") {\n        //小写字母\n        rule.pattern = /^[a-z]+$/;\n      } else if (options.mode === \"upper\" || options.mode === \"uppercase\") {\n        //大写字母\n        rule.pattern = /^[A-Z]+$/;\n      } else {\n        //英文字母\n        rule.pattern = /^[a-zA-Z]+$/;\n      }\n      rule.message = options.message || \"请填写正确的字母\";\n      break;\n    case \"username\":\n      //用户名，账号: 'test_name'\n      //4到16位（字母，数字，下划线，减号）\n      rule.pattern = /^[a-zA-Z0-9_-]{4,16}$/;\n      rule.message = options.message || \"请填写正确的用户名\";\n      break;\n    case \"password\":\n      //密码: '123456', 'Abcdefg'\n      //最少6位，包括至少1个大写字母，1个小写字母，1个数字，1个特殊字符\n      rule.pattern = /^\\S*(?=\\S{6,})(?=\\S*\\d)(?=\\S*[A-Z])(?=\\S*[a-z])(?=\\S*[!@#$%^&*? ])\\S*$/;\n      rule.message = options.message || \"密码必须包含大小写字母、数字和特殊字符，不少于6位\";\n      break;\n    case \"zip\":\n      //邮政编码: '734500', '100101'\n      rule.pattern = /^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\\d{4}$/;\n      rule.message = options.message || \"请填写正确的邮政编码\";\n      break;\n    case \"mac\":\n    case \"MAC\":\n      //MAC 地址: '38:f9:d3:4b:f5:51', '00-0C-29-CA-E4-66'\n      rule.pattern = /^((([a-f0-9]{2}:){5})|(([a-f0-9]{2}-){5}))[a-f0-9]{2}$/i;\n      rule.message = options.message || \"请填写正确的MAC地址\";\n      break;\n  }\n\n  return rule;\n}\n","import { useI18n } from \"vue-i18n\";\nimport { isArray } from \"lodash-es\";\n\n/**\n * 用于处理 i18n 翻译\n * 仅可在 setup 中使用，在回调或非 setup 环境无法使用\n * @param key\n * @param [options]\n * @returns {*|string}\n */\nexport function useT(key, options) {\n  const { t } = useI18n();\n  if (isArray(key)) {\n    return key.map(k => t(k, options)).join(\"\");\n  }\n  return t(key, options);\n}\n\n/**\n * 用于处理 i18n 文本拼接情况\n *\n */\nexport function useI18nJoin(first, second, options) {\n  const {\n    capitalizeFirst = true,\n    uncapitalizeSecond = true,\n    uncapitalizeSecondAll = true,\n  } = options || {};\n\n  options = options || {};\n  let { locale } = options;\n  if (!locale) {\n    locale = useI18n().locale;\n  }\n  if (locale.value.includes(\"en\")) {\n    //first 首字母大写\n    first = first.trim();\n    second = second.trim();\n    if (capitalizeFirst) {\n      first = first.charAt(0).toUpperCase() + first.slice(1);\n    }\n    if (uncapitalizeSecond) {\n      second = second.charAt(0).toLowerCase() + second.slice(1);\n    }\n    if (uncapitalizeSecondAll) {\n      second = second.toLowerCase();\n    }\n\n    return `${first} ${second}`;\n  }\n\n  return `${first}${second}`;\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,15,16,17,18,19,20,21,22,23],"mappings":"4KAAA,MAAa,EAAS,OAAO,YAAe,UAAY,WAAY,WAAa,WAAW,OAAS,IAAA,GCarG,SAAgBA,EAAQ,EAAG,CACvB,OAAO,aAAa,YAAe,YAAY,OAAO,EAAE,EAAI,EAAE,YAAY,OAAS,aAGvF,SAAgB,EAAQ,EAAG,CACvB,GAAI,CAAC,OAAO,cAAc,EAAE,EAAI,EAAI,EAChC,MAAU,MAAM,kCAAoC,EAAE,CAG9D,SAAgBC,EAAO,EAAG,GAAG,EAAS,CAClC,GAAI,CAACD,EAAQ,EAAE,CACX,MAAU,MAAM,sBAAsB,CAC1C,GAAI,EAAQ,OAAS,GAAK,CAAC,EAAQ,SAAS,EAAE,OAAO,CACjD,MAAU,MAAM,iCAAmC,EAAU,gBAAkB,EAAE,OAAO,CAGhG,SAAgB,EAAM,EAAG,CACrB,GAAI,OAAOE,GAAM,YAAc,OAAOA,EAAE,QAAW,WAC/C,MAAU,MAAM,+CAA+C,CACnE,EAAQA,EAAE,UAAU,CACpB,EAAQA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AK,EAAM,CACL,MAAM,yBAAyB,CAG7C,OAAO,IAAI,WAAW,EAAI,CAE5B,SAAS,GAAK,EAAO,EAAS,CAE5B,GADA,EAAQ,OAAO,GAAU,SAAW,GAAY,EAAM,CAAG,EACrD,EAAS,CAEX,IADa,EAAQ,MAAQ,UAChB,OACX,MAAU,MAAM,eAAe,CACjC,IAAI,EAAM,EAAQ,IAClB,GAAI,CAAC,EACH,MAAU,MAAM,cAAc,CAEhC,MADA,GAAM,OAAO,GAAQ,SAAW,EAAW,EAAI,CAAG,EAC3C,GAAW,GAAK,GAAK,EAAK,EAAM,CAAC,CAE1C,OAAO,GAAW,GAAI,EAAM,CAAC,CAI/B,IAAI,GAAc,EAAE,CACpB,GAAS,GAAa,CACpB,YAAe,GACf,YAAe,GACf,QAAW,GACZ,CAAC,CAGF,IAAI,EAAU,EACV,GAAQ,GACR,GAAQ,GACR,GAAO,WAAW,KAAK,CACzB,IACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,GACA,IACA,GACA,IACA,GACA,IACA,GACA,EACA,GACA,IACA,IACA,IACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,GACA,IACA,IACA,GACA,IACA,IACA,EACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,GACA,EACA,IACA,IACA,IACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,GACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,GACA,EACA,GACA,IACA,IACA,IACA,EACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,EACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,IACA,GACA,IACA,IACA,GACA,IACA,IACA,IACA,GACA,IACA,GACA,GACA,IACA,GACA,GACA,GACA,IACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,GACA,EACA,IACA,IACA,IACA,IACA,IACA,GACA,GACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,GACA,IACA,IACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,EACA,IACA,IACA,IACA,IACA,GACA,IACA,IACA,IACA,GACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACD,CAAC,CACE,GAAK,IAAI,YAAY,CACvB,OACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,WACD,CAAC,CACF,SAAS,GAAQ,EAAG,CAClB,OAAQ,GAAK,IAAM,GAAK,KAAO,MAAQ,IAAM,GAAK,IAAM,GAAK,KAAO,MAAQ,IAAM,GAAK,IAAM,EAAI,KAAO,MAAQ,EAAI,GAAK,EAAI,KAAO,IAE9H,IAAI,YAAY,EAAE,CAChB,IAAI,YAAY,EAAE,CAC5B,SAAS,GAAU,EAAO,EAAQ,EAAU,CAC1C,IAAI,EAAK,EAAG,EAAK,EAAG,EAAK,EAAG,EAAK,EAAG,EAAO,EAAG,EAAO,EAAG,EAAO,EAAG,EAAO,EACzE,EAAO,EAAM,GAAK,IAClB,EAAO,EAAM,GAAK,IAClB,EAAO,EAAM,GAAK,IAClB,EAAO,EAAM,GAAK,IAClB,E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