diff --git a/index.js b/index.js deleted file mode 100755 index 6f6cc95..0000000 --- a/index.js +++ /dev/null @@ -1,123108 +0,0 @@ -// @bun -var __create = Object.create; -var __getProtoOf = Object.getPrototypeOf; -var __defProp = Object.defineProperty; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __reExport = (target, mod, secondTarget) => { - for (let key of __getOwnPropNames(mod)) - if (!__hasOwnProp.call(target, key) && key !== "default") - __defProp(target, key, { - get: () => mod[key], - enumerable: true - }); - if (secondTarget) { - for (let key of __getOwnPropNames(mod)) - if (!__hasOwnProp.call(secondTarget, key) && key !== "default") - __defProp(secondTarget, key, { - get: () => mod[key], - enumerable: true - }); - return secondTarget; - } -}; -var __toESM = (mod, isNodeMode, target) => { - target = mod != null ? __create(__getProtoOf(mod)) : {}; - const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target; - for (let key of __getOwnPropNames(mod)) - if (!__hasOwnProp.call(to, key)) - __defProp(to, key, { - get: () => mod[key], - enumerable: true - }); - return to; -}; -var __moduleCache = /* @__PURE__ */ new WeakMap; -var __toCommonJS = (from) => { - var entry = __moduleCache.get(from), desc; - if (entry) - return entry; - entry = __defProp({}, "__esModule", { value: true }); - if (from && typeof from === "object" || typeof from === "function") - __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, { - get: () => from[key], - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable - })); - __moduleCache.set(from, entry); - return entry; -}; -var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); -var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res); - -// node_modules/@discordjs/collection/dist/index.js -var require_dist = __commonJS((exports, module) => { - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __export = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export(src_exports, { - Collection: () => Collection, - version: () => version - }); - module.exports = __toCommonJS2(src_exports); - var Collection = class _Collection extends Map { - static { - __name(this, "Collection"); - } - ensure(key, defaultValueGenerator) { - if (this.has(key)) - return this.get(key); - if (typeof defaultValueGenerator !== "function") - throw new TypeError(`${defaultValueGenerator} is not a function`); - const defaultValue = defaultValueGenerator(key, this); - this.set(key, defaultValue); - return defaultValue; - } - hasAll(...keys) { - return keys.every((key) => super.has(key)); - } - hasAny(...keys) { - return keys.some((key) => super.has(key)); - } - first(amount) { - if (amount === undefined) - return this.values().next().value; - if (amount < 0) - return this.last(amount * -1); - amount = Math.min(this.size, amount); - const iter = this.values(); - return Array.from({ length: amount }, () => iter.next().value); - } - firstKey(amount) { - if (amount === undefined) - return this.keys().next().value; - if (amount < 0) - return this.lastKey(amount * -1); - amount = Math.min(this.size, amount); - const iter = this.keys(); - return Array.from({ length: amount }, () => iter.next().value); - } - last(amount) { - const arr = [...this.values()]; - if (amount === undefined) - return arr[arr.length - 1]; - if (amount < 0) - return this.first(amount * -1); - if (!amount) - return []; - return arr.slice(-amount); - } - lastKey(amount) { - const arr = [...this.keys()]; - if (amount === undefined) - return arr[arr.length - 1]; - if (amount < 0) - return this.firstKey(amount * -1); - if (!amount) - return []; - return arr.slice(-amount); - } - at(index) { - index = Math.floor(index); - const arr = [...this.values()]; - return arr.at(index); - } - keyAt(index) { - index = Math.floor(index); - const arr = [...this.keys()]; - return arr.at(index); - } - random(amount) { - const arr = [...this.values()]; - if (amount === undefined) - return arr[Math.floor(Math.random() * arr.length)]; - if (!arr.length || !amount) - return []; - return Array.from({ length: Math.min(amount, arr.length) }, () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]); - } - randomKey(amount) { - const arr = [...this.keys()]; - if (amount === undefined) - return arr[Math.floor(Math.random() * arr.length)]; - if (!arr.length || !amount) - return []; - return Array.from({ length: Math.min(amount, arr.length) }, () => arr.splice(Math.floor(Math.random() * arr.length), 1)[0]); - } - reverse() { - const entries = [...this.entries()].reverse(); - this.clear(); - for (const [key, value] of entries) - this.set(key, value); - return this; - } - find(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - for (const [key, val] of this) { - if (fn(val, key, this)) - return val; - } - return; - } - findKey(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - for (const [key, val] of this) { - if (fn(val, key, this)) - return key; - } - return; - } - findLast(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const entries = [...this.entries()]; - for (let index = entries.length - 1;index >= 0; index--) { - const val = entries[index][1]; - const key = entries[index][0]; - if (fn(val, key, this)) - return val; - } - return; - } - findLastKey(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const entries = [...this.entries()]; - for (let index = entries.length - 1;index >= 0; index--) { - const key = entries[index][0]; - const val = entries[index][1]; - if (fn(val, key, this)) - return key; - } - return; - } - sweep(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const previousSize = this.size; - for (const [key, val] of this) { - if (fn(val, key, this)) - this.delete(key); - } - return previousSize - this.size; - } - filter(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const results = new this.constructor[Symbol.species]; - for (const [key, val] of this) { - if (fn(val, key, this)) - results.set(key, val); - } - return results; - } - partition(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const results = [ - new this.constructor[Symbol.species], - new this.constructor[Symbol.species] - ]; - for (const [key, val] of this) { - if (fn(val, key, this)) { - results[0].set(key, val); - } else { - results[1].set(key, val); - } - } - return results; - } - flatMap(fn, thisArg) { - const collections = this.map(fn, thisArg); - return new this.constructor[Symbol.species]().concat(...collections); - } - map(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const iter = this.entries(); - return Array.from({ length: this.size }, () => { - const [key, value] = iter.next().value; - return fn(value, key, this); - }); - } - mapValues(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - const coll = new this.constructor[Symbol.species]; - for (const [key, val] of this) - coll.set(key, fn(val, key, this)); - return coll; - } - some(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - for (const [key, val] of this) { - if (fn(val, key, this)) - return true; - } - return false; - } - every(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - for (const [key, val] of this) { - if (!fn(val, key, this)) - return false; - } - return true; - } - reduce(fn, initialValue) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - let accumulator; - const iterator = this.entries(); - if (initialValue === undefined) { - if (this.size === 0) - throw new TypeError("Reduce of empty collection with no initial value"); - accumulator = iterator.next().value[1]; - } else { - accumulator = initialValue; - } - for (const [key, value] of iterator) { - accumulator = fn(accumulator, value, key, this); - } - return accumulator; - } - reduceRight(fn, initialValue) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - const entries = [...this.entries()]; - let accumulator; - let index; - if (initialValue === undefined) { - if (entries.length === 0) - throw new TypeError("Reduce of empty collection with no initial value"); - accumulator = entries[entries.length - 1][1]; - index = entries.length - 1; - } else { - accumulator = initialValue; - index = entries.length; - } - while (--index >= 0) { - const key = entries[index][0]; - const val = entries[index][1]; - accumulator = fn(accumulator, val, key, this); - } - return accumulator; - } - each(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - for (const [key, value] of this) { - fn(value, key, this); - } - return this; - } - tap(fn, thisArg) { - if (typeof fn !== "function") - throw new TypeError(`${fn} is not a function`); - if (thisArg !== undefined) - fn = fn.bind(thisArg); - fn(this); - return this; - } - clone() { - return new this.constructor[Symbol.species](this); - } - concat(...collections) { - const newColl = this.clone(); - for (const coll of collections) { - for (const [key, val] of coll) - newColl.set(key, val); - } - return newColl; - } - equals(collection) { - if (!collection) - return false; - if (this === collection) - return true; - if (this.size !== collection.size) - return false; - for (const [key, value] of this) { - if (!collection.has(key) || value !== collection.get(key)) { - return false; - } - } - return true; - } - sort(compareFunction = _Collection.defaultSort) { - const entries = [...this.entries()]; - entries.sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])); - super.clear(); - for (const [key, value] of entries) { - super.set(key, value); - } - return this; - } - intersection(other) { - const coll = new this.constructor[Symbol.species]; - for (const [key, value] of this) { - if (other.has(key)) - coll.set(key, value); - } - return coll; - } - union(other) { - const coll = new this.constructor[Symbol.species](this); - for (const [key, value] of other) { - if (!coll.has(key)) - coll.set(key, value); - } - return coll; - } - difference(other) { - const coll = new this.constructor[Symbol.species]; - for (const [key, value] of this) { - if (!other.has(key)) - coll.set(key, value); - } - return coll; - } - symmetricDifference(other) { - const coll = new this.constructor[Symbol.species]; - for (const [key, value] of this) { - if (!other.has(key)) - coll.set(key, value); - } - for (const [key, value] of other) { - if (!this.has(key)) - coll.set(key, value); - } - return coll; - } - merge(other, whenInSelf, whenInOther, whenInBoth) { - const coll = new this.constructor[Symbol.species]; - const keys = /* @__PURE__ */ new Set([...this.keys(), ...other.keys()]); - for (const key of keys) { - const hasInSelf = this.has(key); - const hasInOther = other.has(key); - if (hasInSelf && hasInOther) { - const result = whenInBoth(this.get(key), other.get(key), key); - if (result.keep) - coll.set(key, result.value); - } else if (hasInSelf) { - const result = whenInSelf(this.get(key), key); - if (result.keep) - coll.set(key, result.value); - } else if (hasInOther) { - const result = whenInOther(other.get(key), key); - if (result.keep) - coll.set(key, result.value); - } - } - return coll; - } - toReversed() { - return new this.constructor[Symbol.species](this).reverse(); - } - toSorted(compareFunction = _Collection.defaultSort) { - return new this.constructor[Symbol.species](this).sort((av, bv, ak, bk) => compareFunction(av, bv, ak, bk)); - } - toJSON() { - return [...this.entries()]; - } - static defaultSort(firstValue, secondValue) { - return Number(firstValue > secondValue) || Number(firstValue === secondValue) - 1; - } - static combineEntries(entries, combine) { - const coll = new _Collection; - for (const [key, value] of entries) { - if (coll.has(key)) { - coll.set(key, combine(coll.get(key), value, key)); - } else { - coll.set(key, value); - } - } - return coll; - } - }; - var version = "2.1.1"; -}); - -// node_modules/fetch-cookie/node_modules/tough-cookie/node_modules/tldts/dist/cjs/index.js -var require_cjs = __commonJS((exports) => { - function shareSameDomainSuffix(hostname, vhost) { - if (hostname.endsWith(vhost)) { - return hostname.length === vhost.length || hostname[hostname.length - vhost.length - 1] === "."; - } - return false; - } - function extractDomainWithSuffix(hostname, publicSuffix) { - const publicSuffixIndex = hostname.length - publicSuffix.length - 2; - const lastDotBeforeSuffixIndex = hostname.lastIndexOf(".", publicSuffixIndex); - if (lastDotBeforeSuffixIndex === -1) { - return hostname; - } - return hostname.slice(lastDotBeforeSuffixIndex + 1); - } - function getDomain$1(suffix, hostname, options) { - if (options.validHosts !== null) { - const validHosts = options.validHosts; - for (const vhost of validHosts) { - if (shareSameDomainSuffix(hostname, vhost)) { - return vhost; - } - } - } - let numberOfLeadingDots = 0; - if (hostname.startsWith(".")) { - while (numberOfLeadingDots < hostname.length && hostname[numberOfLeadingDots] === ".") { - numberOfLeadingDots += 1; - } - } - if (suffix.length === hostname.length - numberOfLeadingDots) { - return null; - } - return extractDomainWithSuffix(hostname, suffix); - } - function getDomainWithoutSuffix$1(domain, suffix) { - return domain.slice(0, -suffix.length - 1); - } - function extractHostname(url, urlIsValidHostname) { - let start = 0; - let end = url.length; - let hasUpper = false; - if (!urlIsValidHostname) { - if (url.startsWith("data:")) { - return null; - } - while (start < url.length && url.charCodeAt(start) <= 32) { - start += 1; - } - while (end > start + 1 && url.charCodeAt(end - 1) <= 32) { - end -= 1; - } - if (url.charCodeAt(start) === 47 && url.charCodeAt(start + 1) === 47) { - start += 2; - } else { - const indexOfProtocol = url.indexOf(":/", start); - if (indexOfProtocol !== -1) { - const protocolSize = indexOfProtocol - start; - const c0 = url.charCodeAt(start); - const c1 = url.charCodeAt(start + 1); - const c2 = url.charCodeAt(start + 2); - const c3 = url.charCodeAt(start + 3); - const c4 = url.charCodeAt(start + 4); - if (protocolSize === 5 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112 && c4 === 115) - ; - else if (protocolSize === 4 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112) - ; - else if (protocolSize === 3 && c0 === 119 && c1 === 115 && c2 === 115) - ; - else if (protocolSize === 2 && c0 === 119 && c1 === 115) - ; - else { - for (let i = start;i < indexOfProtocol; i += 1) { - const lowerCaseCode = url.charCodeAt(i) | 32; - if (!(lowerCaseCode >= 97 && lowerCaseCode <= 122 || lowerCaseCode >= 48 && lowerCaseCode <= 57 || lowerCaseCode === 46 || lowerCaseCode === 45 || lowerCaseCode === 43)) { - return null; - } - } - } - start = indexOfProtocol + 2; - while (url.charCodeAt(start) === 47) { - start += 1; - } - } - } - let indexOfIdentifier = -1; - let indexOfClosingBracket = -1; - let indexOfPort = -1; - for (let i = start;i < end; i += 1) { - const code = url.charCodeAt(i); - if (code === 35 || code === 47 || code === 63) { - end = i; - break; - } else if (code === 64) { - indexOfIdentifier = i; - } else if (code === 93) { - indexOfClosingBracket = i; - } else if (code === 58) { - indexOfPort = i; - } else if (code >= 65 && code <= 90) { - hasUpper = true; - } - } - if (indexOfIdentifier !== -1 && indexOfIdentifier > start && indexOfIdentifier < end) { - start = indexOfIdentifier + 1; - } - if (url.charCodeAt(start) === 91) { - if (indexOfClosingBracket !== -1) { - return url.slice(start + 1, indexOfClosingBracket).toLowerCase(); - } - return null; - } else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) { - end = indexOfPort; - } - } - while (end > start + 1 && url.charCodeAt(end - 1) === 46) { - end -= 1; - } - const hostname = start !== 0 || end !== url.length ? url.slice(start, end) : url; - if (hasUpper) { - return hostname.toLowerCase(); - } - return hostname; - } - function isProbablyIpv4(hostname) { - if (hostname.length < 7) { - return false; - } - if (hostname.length > 15) { - return false; - } - let numberOfDots = 0; - for (let i = 0;i < hostname.length; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46) { - numberOfDots += 1; - } else if (code < 48 || code > 57) { - return false; - } - } - return numberOfDots === 3 && hostname.charCodeAt(0) !== 46 && hostname.charCodeAt(hostname.length - 1) !== 46; - } - function isProbablyIpv6(hostname) { - if (hostname.length < 3) { - return false; - } - let start = hostname.startsWith("[") ? 1 : 0; - let end = hostname.length; - if (hostname[end - 1] === "]") { - end -= 1; - } - if (end - start > 39) { - return false; - } - let hasColon = false; - for (;start < end; start += 1) { - const code = hostname.charCodeAt(start); - if (code === 58) { - hasColon = true; - } else if (!(code >= 48 && code <= 57 || code >= 97 && code <= 102 || code >= 65 && code <= 90)) { - return false; - } - } - return hasColon; - } - function isIp(hostname) { - return isProbablyIpv6(hostname) || isProbablyIpv4(hostname); - } - function isValidAscii(code) { - return code >= 97 && code <= 122 || code >= 48 && code <= 57 || code > 127; - } - function isValidHostname(hostname) { - if (hostname.length > 255) { - return false; - } - if (hostname.length === 0) { - return false; - } - if (!isValidAscii(hostname.charCodeAt(0)) && hostname.charCodeAt(0) !== 46 && hostname.charCodeAt(0) !== 95) { - return false; - } - let lastDotIndex = -1; - let lastCharCode = -1; - const len = hostname.length; - for (let i = 0;i < len; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46) { - if (i - lastDotIndex > 64 || lastCharCode === 46 || lastCharCode === 45 || lastCharCode === 95) { - return false; - } - lastDotIndex = i; - } else if (!(isValidAscii(code) || code === 45 || code === 95)) { - return false; - } - lastCharCode = code; - } - return len - lastDotIndex - 1 <= 63 && lastCharCode !== 45; - } - function setDefaultsImpl({ allowIcannDomains = true, allowPrivateDomains = false, detectIp = true, extractHostname: extractHostname2 = true, mixedInputs = true, validHosts = null, validateHostname = true }) { - return { - allowIcannDomains, - allowPrivateDomains, - detectIp, - extractHostname: extractHostname2, - mixedInputs, - validHosts, - validateHostname - }; - } - function setDefaults(options) { - if (options === undefined) { - return DEFAULT_OPTIONS; - } - return setDefaultsImpl(options); - } - function getSubdomain$1(hostname, domain) { - if (domain.length === hostname.length) { - return ""; - } - return hostname.slice(0, -domain.length - 1); - } - function getEmptyResult() { - return { - domain: null, - domainWithoutSuffix: null, - hostname: null, - isIcann: null, - isIp: null, - isPrivate: null, - publicSuffix: null, - subdomain: null - }; - } - function resetResult(result) { - result.domain = null; - result.domainWithoutSuffix = null; - result.hostname = null; - result.isIcann = null; - result.isIp = null; - result.isPrivate = null; - result.publicSuffix = null; - result.subdomain = null; - } - function parseImpl(url, step, suffixLookup2, partialOptions, result) { - const options = setDefaults(partialOptions); - if (typeof url !== "string") { - return result; - } - if (!options.extractHostname) { - result.hostname = url; - } else if (options.mixedInputs) { - result.hostname = extractHostname(url, isValidHostname(url)); - } else { - result.hostname = extractHostname(url, false); - } - if (options.detectIp && result.hostname !== null) { - result.isIp = isIp(result.hostname); - if (result.isIp) { - return result; - } - } - if (options.validateHostname && options.extractHostname && result.hostname !== null && !isValidHostname(result.hostname)) { - result.hostname = null; - return result; - } - if (step === 0 || result.hostname === null) { - return result; - } - suffixLookup2(result.hostname, options, result); - if (step === 2 || result.publicSuffix === null) { - return result; - } - result.domain = getDomain$1(result.publicSuffix, result.hostname, options); - if (step === 3 || result.domain === null) { - return result; - } - result.subdomain = getSubdomain$1(result.hostname, result.domain); - if (step === 4) { - return result; - } - result.domainWithoutSuffix = getDomainWithoutSuffix$1(result.domain, result.publicSuffix); - return result; - } - function fastPathLookup(hostname, options, out) { - if (!options.allowPrivateDomains && hostname.length > 3) { - const last = hostname.length - 1; - const c3 = hostname.charCodeAt(last); - const c2 = hostname.charCodeAt(last - 1); - const c1 = hostname.charCodeAt(last - 2); - const c0 = hostname.charCodeAt(last - 3); - if (c3 === 109 && c2 === 111 && c1 === 99 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "com"; - return true; - } else if (c3 === 103 && c2 === 114 && c1 === 111 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "org"; - return true; - } else if (c3 === 117 && c2 === 100 && c1 === 101 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "edu"; - return true; - } else if (c3 === 118 && c2 === 111 && c1 === 103 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "gov"; - return true; - } else if (c3 === 116 && c2 === 101 && c1 === 110 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "net"; - return true; - } else if (c3 === 101 && c2 === 100 && c1 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "de"; - return true; - } - } - return false; - } - function lookupInTrie(parts, trie, index, allowedMask) { - let result = null; - let node = trie; - while (node !== undefined) { - if ((node[0] & allowedMask) !== 0) { - result = { - index: index + 1, - isIcann: (node[0] & 1) !== 0, - isPrivate: (node[0] & 2) !== 0 - }; - } - if (index === -1) { - break; - } - const succ = node[1]; - node = Object.prototype.hasOwnProperty.call(succ, parts[index]) ? succ[parts[index]] : succ["*"]; - index -= 1; - } - return result; - } - function suffixLookup(hostname, options, out) { - var _a; - if (fastPathLookup(hostname, options, out)) { - return; - } - const hostnameParts = hostname.split("."); - const allowedMask = (options.allowPrivateDomains ? 2 : 0) | (options.allowIcannDomains ? 1 : 0); - const exceptionMatch = lookupInTrie(hostnameParts, exceptions, hostnameParts.length - 1, allowedMask); - if (exceptionMatch !== null) { - out.isIcann = exceptionMatch.isIcann; - out.isPrivate = exceptionMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(exceptionMatch.index + 1).join("."); - return; - } - const rulesMatch = lookupInTrie(hostnameParts, rules, hostnameParts.length - 1, allowedMask); - if (rulesMatch !== null) { - out.isIcann = rulesMatch.isIcann; - out.isPrivate = rulesMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(rulesMatch.index).join("."); - return; - } - out.isIcann = false; - out.isPrivate = false; - out.publicSuffix = (_a = hostnameParts[hostnameParts.length - 1]) !== null && _a !== undefined ? _a : null; - } - function parse(url, options = {}) { - return parseImpl(url, 5, suffixLookup, options, getEmptyResult()); - } - function getHostname(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 0, suffixLookup, options, RESULT).hostname; - } - function getPublicSuffix(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 2, suffixLookup, options, RESULT).publicSuffix; - } - function getDomain(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 3, suffixLookup, options, RESULT).domain; - } - function getSubdomain(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 4, suffixLookup, options, RESULT).subdomain; - } - function getDomainWithoutSuffix(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 5, suffixLookup, options, RESULT).domainWithoutSuffix; - } - var DEFAULT_OPTIONS = setDefaultsImpl({}); - var exceptions = function() { - const _0 = [1, {}], _1 = [0, { city: _0 }]; - const exceptions2 = [0, { ck: [0, { www: _0 }], jp: [0, { kawasaki: _1, kitakyushu: _1, kobe: _1, nagoya: _1, sapporo: _1, sendai: _1, yokohama: _1 }] }]; - return exceptions2; - }(); - var rules = function() { - const _2 = [1, {}], _3 = [2, {}], _4 = [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2 }], _5 = [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2 }], _6 = [0, { "*": _3 }], _7 = [2, { s: _6 }], _8 = [0, { relay: _3 }], _9 = [2, { id: _3 }], _10 = [1, { gov: _2 }], _11 = [0, { airflow: _6, "lambda-url": _3, "transfer-webapp": _3 }], _12 = [0, { airflow: _6, "transfer-webapp": _3 }], _13 = [0, { "transfer-webapp": _3 }], _14 = [0, { "transfer-webapp": _3, "transfer-webapp-fips": _3 }], _15 = [0, { notebook: _3, studio: _3 }], _16 = [0, { labeling: _3, notebook: _3, studio: _3 }], _17 = [0, { notebook: _3 }], _18 = [0, { labeling: _3, notebook: _3, "notebook-fips": _3, studio: _3 }], _19 = [0, { notebook: _3, "notebook-fips": _3, studio: _3, "studio-fips": _3 }], _20 = [0, { shop: _3 }], _21 = [0, { "*": _2 }], _22 = [1, { co: _3 }], _23 = [0, { objects: _3 }], _24 = [2, { "eu-west-1": _3, "us-east-1": _3 }], _25 = [2, { nodes: _3 }], _26 = [0, { my: _3 }], _27 = [0, { s3: _3, "s3-accesspoint": _3, "s3-website": _3 }], _28 = [0, { s3: _3, "s3-accesspoint": _3 }], _29 = [0, { direct: _3 }], _30 = [0, { "webview-assets": _3 }], _31 = [0, { vfs: _3, "webview-assets": _3 }], _32 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, cloud9: _31 }], _33 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _28, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, cloud9: _31 }], _34 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "analytics-gateway": _3, "aws-cloud9": _30, cloud9: _31 }], _35 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3 }], _36 = [0, { s3: _3, "s3-accesspoint": _3, "s3-accesspoint-fips": _3, "s3-fips": _3, "s3-website": _3 }], _37 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _36, s3: _3, "s3-accesspoint": _3, "s3-accesspoint-fips": _3, "s3-fips": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, cloud9: _31 }], _38 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _36, s3: _3, "s3-accesspoint": _3, "s3-accesspoint-fips": _3, "s3-fips": _3, "s3-object-lambda": _3, "s3-website": _3 }], _39 = [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _36, s3: _3, "s3-accesspoint": _3, "s3-accesspoint-fips": _3, "s3-deprecated": _3, "s3-fips": _3, "s3-object-lambda": _3, "s3-website": _3, "analytics-gateway": _3, "aws-cloud9": _30, cloud9: _31 }], _40 = [0, { auth: _3 }], _41 = [0, { auth: _3, "auth-fips": _3 }], _42 = [0, { "auth-fips": _3 }], _43 = [0, { apps: _3 }], _44 = [0, { paas: _3 }], _45 = [2, { eu: _3 }], _46 = [0, { app: _3 }], _47 = [0, { site: _3 }], _48 = [1, { com: _2, edu: _2, net: _2, org: _2 }], _49 = [0, { j: _3 }], _50 = [0, { dyn: _3 }], _51 = [2, { web: _3 }], _52 = [1, { co: _2, com: _2, edu: _2, gov: _2, net: _2, org: _2 }], _53 = [0, { p: _3 }], _54 = [0, { user: _3 }], _55 = [1, { ms: _3 }], _56 = [0, { cdn: _3 }], _57 = [2, { raw: _6 }], _58 = [0, { cust: _3, reservd: _3 }], _59 = [0, { cust: _3 }], _60 = [0, { s3: _3 }], _61 = [1, { biz: _2, com: _2, edu: _2, gov: _2, info: _2, net: _2, org: _2 }], _62 = [0, { ipfs: _3 }], _63 = [1, { framer: _3 }], _64 = [0, { forgot: _3 }], _65 = [0, { blob: _3, file: _3, web: _3 }], _66 = [0, { core: _65, servicebus: _3 }], _67 = [1, { gs: _2 }], _68 = [0, { nes: _2 }], _69 = [1, { k12: _2, cc: _2, lib: _2 }], _70 = [1, { cc: _2 }], _71 = [1, { cc: _2, lib: _2 }]; - const rules2 = [0, { ac: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, drr: _3, feedback: _3, forms: _3 }], ad: _2, ae: [1, { ac: _2, co: _2, gov: _2, mil: _2, net: _2, org: _2, sch: _2 }], aero: [1, { airline: _2, airport: _2, "accident-investigation": _2, "accident-prevention": _2, aerobatic: _2, aeroclub: _2, aerodrome: _2, agents: _2, "air-surveillance": _2, "air-traffic-control": _2, aircraft: _2, airtraffic: _2, ambulance: _2, association: _2, author: _2, ballooning: _2, broker: _2, caa: _2, cargo: _2, catering: _2, certification: _2, championship: _2, charter: _2, civilaviation: _2, club: _2, conference: _2, consultant: _2, consulting: _2, control: _2, council: _2, crew: _2, design: _2, dgca: _2, educator: _2, emergency: _2, engine: _2, engineer: _2, entertainment: _2, equipment: _2, exchange: _2, express: _2, federation: _2, flight: _2, freight: _2, fuel: _2, gliding: _2, government: _2, groundhandling: _2, group: _2, hanggliding: _2, homebuilt: _2, insurance: _2, journal: _2, journalist: _2, leasing: _2, logistics: _2, magazine: _2, maintenance: _2, marketplace: _2, media: _2, microlight: _2, modelling: _2, navigation: _2, parachuting: _2, paragliding: _2, "passenger-association": _2, pilot: _2, press: _2, production: _2, recreation: _2, repbody: _2, res: _2, research: _2, rotorcraft: _2, safety: _2, scientist: _2, services: _2, show: _2, skydiving: _2, software: _2, student: _2, taxi: _2, trader: _2, trading: _2, trainer: _2, union: _2, workinggroup: _2, works: _2 }], af: _4, ag: [1, { co: _2, com: _2, net: _2, nom: _2, org: _2, obj: _3 }], ai: [1, { com: _2, net: _2, off: _2, org: _2, uwu: _3, framer: _3, kiloapps: _3 }], al: _5, am: [1, { co: _2, com: _2, commune: _2, net: _2, org: _2, radio: _3 }], ao: [1, { co: _2, ed: _2, edu: _2, gov: _2, gv: _2, it: _2, og: _2, org: _2, pb: _2 }], aq: _2, ar: [1, { bet: _2, com: _2, coop: _2, edu: _2, gob: _2, gov: _2, int: _2, mil: _2, musica: _2, mutual: _2, net: _2, org: _2, seg: _2, senasa: _2, tur: _2 }], arpa: [1, { e164: _2, home: _2, "in-addr": _2, ip6: _2, iris: _2, uri: _2, urn: _2 }], as: _10, asia: [1, { cloudns: _3, daemon: _3, dix: _3 }], at: [1, { "4": _3, ac: [1, { sth: _2 }], co: _2, gv: _2, or: _2, funkfeuer: [0, { wien: _3 }], futurecms: [0, { "*": _3, ex: _6, in: _6 }], futurehosting: _3, futuremailing: _3, ortsinfo: [0, { ex: _6, kunden: _6 }], biz: _3, info: _3, "123webseite": _3, priv: _3, my: _3, myspreadshop: _3, "12hp": _3, "2ix": _3, "4lima": _3, "lima-city": _3 }], au: [1, { asn: _2, com: [1, { cloudlets: [0, { mel: _3 }], myspreadshop: _3 }], edu: [1, { act: _2, catholic: _2, nsw: _2, nt: _2, qld: _2, sa: _2, tas: _2, vic: _2, wa: _2 }], gov: [1, { qld: _2, sa: _2, tas: _2, vic: _2, wa: _2 }], id: _2, net: _2, org: _2, conf: _2, oz: _2, act: _2, nsw: _2, nt: _2, qld: _2, sa: _2, tas: _2, vic: _2, wa: _2, hrsn: [0, { vps: _3 }] }], aw: [1, { com: _2 }], ax: _2, az: [1, { biz: _2, co: _2, com: _2, edu: _2, gov: _2, info: _2, int: _2, mil: _2, name: _2, net: _2, org: _2, pp: _2, pro: _2 }], ba: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, brendly: _20, rs: _3 }], bb: [1, { biz: _2, co: _2, com: _2, edu: _2, gov: _2, info: _2, net: _2, org: _2, store: _2, tv: _2 }], bd: [1, { ac: _2, ai: _2, co: _2, com: _2, edu: _2, gov: _2, id: _2, info: _2, it: _2, mil: _2, net: _2, org: _2, sch: _2, tv: _2 }], be: [1, { ac: _2, cloudns: _3, webhosting: _3, interhostsolutions: [0, { cloud: _3 }], kuleuven: [0, { ezproxy: _3 }], my: _3, "123website": _3, myspreadshop: _3, transurl: _6 }], bf: _10, bg: [1, { "0": _2, "1": _2, "2": _2, "3": _2, "4": _2, "5": _2, "6": _2, "7": _2, "8": _2, "9": _2, a: _2, b: _2, c: _2, d: _2, e: _2, f: _2, g: _2, h: _2, i: _2, j: _2, k: _2, l: _2, m: _2, n: _2, o: _2, p: _2, q: _2, r: _2, s: _2, t: _2, u: _2, v: _2, w: _2, x: _2, y: _2, z: _2, barsy: _3 }], bh: _4, bi: [1, { co: _2, com: _2, edu: _2, or: _2, org: _2 }], biz: [1, { activetrail: _3, "cloud-ip": _3, cloudns: _3, jozi: _3, dyndns: _3, "for-better": _3, "for-more": _3, "for-some": _3, "for-the": _3, selfip: _3, webhop: _3, orx: _3, mmafan: _3, myftp: _3, "no-ip": _3, dscloud: _3 }], bj: [1, { africa: _2, agro: _2, architectes: _2, assur: _2, avocats: _2, co: _2, com: _2, eco: _2, econo: _2, edu: _2, info: _2, loisirs: _2, money: _2, net: _2, org: _2, ote: _2, restaurant: _2, resto: _2, tourism: _2, univ: _2 }], bm: _4, bn: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, co: _3 }], bo: [1, { com: _2, edu: _2, gob: _2, int: _2, mil: _2, net: _2, org: _2, tv: _2, web: _2, academia: _2, agro: _2, arte: _2, blog: _2, bolivia: _2, ciencia: _2, cooperativa: _2, democracia: _2, deporte: _2, ecologia: _2, economia: _2, empresa: _2, indigena: _2, industria: _2, info: _2, medicina: _2, movimiento: _2, musica: _2, natural: _2, nombre: _2, noticias: _2, patria: _2, plurinacional: _2, politica: _2, profesional: _2, pueblo: _2, revista: _2, salud: _2, tecnologia: _2, tksat: _2, transporte: _2, wiki: _2 }], br: [1, { "9guacu": _2, abc: _2, adm: _2, adv: _2, agr: _2, aju: _2, am: _2, anani: _2, aparecida: _2, api: _2, app: _2, arq: _2, art: _2, ato: _2, b: _2, barueri: _2, belem: _2, bet: _2, bhz: _2, bib: _2, bio: _2, blog: _2, bmd: _2, boavista: _2, bsb: _2, campinagrande: _2, campinas: _2, caxias: _2, cim: _2, cng: _2, cnt: _2, com: [1, { simplesite: _3 }], contagem: _2, coop: _2, coz: _2, cri: _2, cuiaba: _2, curitiba: _2, def: _2, des: _2, det: _2, dev: _2, ecn: _2, eco: _2, edu: _2, emp: _2, enf: _2, eng: _2, esp: _2, etc: _2, eti: _2, far: _2, feira: _2, flog: _2, floripa: _2, fm: _2, fnd: _2, fortal: _2, fot: _2, foz: _2, fst: _2, g12: _2, geo: _2, ggf: _2, goiania: _2, gov: [1, { ac: _2, al: _2, am: _2, ap: _2, ba: _2, ce: _2, df: _2, es: _2, go: _2, ma: _2, mg: _2, ms: _2, mt: _2, pa: _2, pb: _2, pe: _2, pi: _2, pr: _2, rj: _2, rn: _2, ro: _2, rr: _2, rs: _2, sc: _2, se: _2, sp: _2, to: _2 }], gru: _2, ia: _2, imb: _2, ind: _2, inf: _2, jab: _2, jampa: _2, jdf: _2, joinville: _2, jor: _2, jus: _2, leg: [1, { ac: _3, al: _3, am: _3, ap: _3, ba: _3, ce: _3, df: _3, es: _3, go: _3, ma: _3, mg: _3, ms: _3, mt: _3, pa: _3, pb: _3, pe: _3, pi: _3, pr: _3, rj: _3, rn: _3, ro: _3, rr: _3, rs: _3, sc: _3, se: _3, sp: _3, to: _3 }], leilao: _2, lel: _2, log: _2, londrina: _2, macapa: _2, maceio: _2, manaus: _2, maringa: _2, mat: _2, med: _2, mil: _2, morena: _2, mp: _2, mus: _2, natal: _2, net: _2, niteroi: _2, nom: _21, not: _2, ntr: _2, odo: _2, ong: _2, org: _2, osasco: _2, palmas: _2, poa: _2, ppg: _2, pro: _2, psc: _2, psi: _2, pvh: _2, qsl: _2, radio: _2, rec: _2, recife: _2, rep: _2, ribeirao: _2, rio: _2, riobranco: _2, riopreto: _2, salvador: _2, sampa: _2, santamaria: _2, santoandre: _2, saobernardo: _2, saogonca: _2, seg: _2, sjc: _2, slg: _2, slz: _2, social: _2, sorocaba: _2, srv: _2, taxi: _2, tc: _2, tec: _2, teo: _2, the: _2, tmp: _2, trd: _2, tur: _2, tv: _2, udi: _2, vet: _2, vix: _2, vlog: _2, wiki: _2, xyz: _2, zlg: _2, tche: _3 }], bs: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, we: _3 }], bt: _4, bv: _2, bw: [1, { ac: _2, co: _2, gov: _2, net: _2, org: _2 }], by: [1, { gov: _2, mil: _2, com: _2, of: _2, mediatech: _3 }], bz: [1, { co: _2, com: _2, edu: _2, gov: _2, net: _2, org: _2, za: _3, mydns: _3, gsj: _3 }], ca: [1, { ab: _2, bc: _2, mb: _2, nb: _2, nf: _2, nl: _2, ns: _2, nt: _2, nu: _2, on: _2, pe: _2, qc: _2, sk: _2, yk: _2, gc: _2, barsy: _3, awdev: _6, co: _3, "no-ip": _3, onid: _3, myspreadshop: _3, box: _3 }], cat: _2, cc: [1, { cleverapps: _3, "cloud-ip": _3, cloudns: _3, ccwu: _3, ftpaccess: _3, "game-server": _3, myphotos: _3, scrapping: _3, twmail: _3, csx: _3, fantasyleague: _3, spawn: [0, { instances: _3 }], ec: _3, eu: _3, gu: _3, uk: _3, us: _3 }], cd: [1, { gov: _2, cc: _3 }], cf: _2, cg: _2, ch: [1, { square7: _3, cloudns: _3, cloudscale: [0, { cust: _3, lpg: _23, rma: _23 }], objectstorage: [0, { lpg: _3, rma: _3 }], flow: [0, { ae: [0, { alp1: _3 }], appengine: _3 }], "linkyard-cloud": _3, gotdns: _3, dnsking: _3, "123website": _3, myspreadshop: _3, firenet: [0, { "*": _3, svc: _6 }], "12hp": _3, "2ix": _3, "4lima": _3, "lima-city": _3 }], ci: [1, { ac: _2, "xn--aroport-bya": _2, "a\xE9roport": _2, asso: _2, co: _2, com: _2, ed: _2, edu: _2, go: _2, gouv: _2, int: _2, net: _2, or: _2, org: _2, us: _3 }], ck: _21, cl: [1, { co: _2, gob: _2, gov: _2, mil: _2, cloudns: _3 }], cm: [1, { co: _2, com: _2, gov: _2, net: _2 }], cn: [1, { ac: _2, com: [1, { amazonaws: [0, { "cn-north-1": [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, rds: _6, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-deprecated": _3, "s3-object-lambda": _3, "s3-website": _3 }], "cn-northwest-1": [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, rds: _6, dualstack: _28, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3 }], compute: _6, airflow: [0, { "cn-north-1": _6, "cn-northwest-1": _6 }], eb: [0, { "cn-north-1": _3, "cn-northwest-1": _3 }], elb: _6 }], amazonwebservices: [0, { on: [0, { "cn-north-1": _12, "cn-northwest-1": _12 }] }], sagemaker: [0, { "cn-north-1": _15, "cn-northwest-1": _15 }] }], edu: _2, gov: _2, mil: _2, net: _2, org: _2, "xn--55qx5d": _2, "\u516C\u53F8": _2, "xn--od0alg": _2, "\u7DB2\u7D61": _2, "xn--io0a7i": _2, "\u7F51\u7EDC": _2, ah: _2, bj: _2, cq: _2, fj: _2, gd: _2, gs: _2, gx: _2, gz: _2, ha: _2, hb: _2, he: _2, hi: _2, hk: _2, hl: _2, hn: _2, jl: _2, js: _2, jx: _2, ln: _2, mo: _2, nm: _2, nx: _2, qh: _2, sc: _2, sd: _2, sh: [1, { as: _3 }], sn: _2, sx: _2, tj: _2, tw: _2, xj: _2, xz: _2, yn: _2, zj: _2, "canva-apps": _3, canvasite: _26, myqnapcloud: _3, quickconnect: _29 }], co: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, nom: _2, org: _2, carrd: _3, crd: _3, otap: _6, hidns: _3, leadpages: _3, lpages: _3, mypi: _3, xmit: _6, rdpa: [0, { clusters: _6, srvrless: _6 }], firewalledreplit: _9, repl: _9, supabase: [2, { realtime: _3, storage: _3 }], umso: _3 }], com: [1, { a2hosted: _3, cpserver: _3, adobeaemcloud: [2, { dev: _6 }], africa: _3, auiusercontent: _6, aivencloud: _3, alibabacloudcs: _3, kasserver: _3, amazonaws: [0, { "af-south-1": _32, "ap-east-1": _33, "ap-northeast-1": _34, "ap-northeast-2": _34, "ap-northeast-3": _32, "ap-south-1": _34, "ap-south-2": _35, "ap-southeast-1": _34, "ap-southeast-2": _34, "ap-southeast-3": _35, "ap-southeast-4": _35, "ap-southeast-5": [0, { "execute-api": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-deprecated": _3, "s3-object-lambda": _3, "s3-website": _3 }], "ca-central-1": _37, "ca-west-1": _38, "eu-central-1": _34, "eu-central-2": _35, "eu-north-1": _33, "eu-south-1": _32, "eu-south-2": _35, "eu-west-1": [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-deprecated": _3, "s3-object-lambda": _3, "s3-website": _3, "analytics-gateway": _3, "aws-cloud9": _30, cloud9: _31 }], "eu-west-2": _33, "eu-west-3": _32, "il-central-1": [0, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _27, s3: _3, "s3-accesspoint": _3, "s3-object-lambda": _3, "s3-website": _3, "aws-cloud9": _30, cloud9: [0, { vfs: _3 }] }], "me-central-1": _35, "me-south-1": _33, "sa-east-1": _32, "us-east-1": [2, { "execute-api": _3, "emrappui-prod": _3, "emrnotebooks-prod": _3, "emrstudio-prod": _3, dualstack: _36, s3: _3, "s3-accesspoint": _3, "s3-accesspoint-fips": _3, "s3-deprecated": _3, "s3-fips": _3, "s3-object-lambda": _3, "s3-website": _3, "analytics-gateway": _3, "aws-cloud9": _30, cloud9: _31 }], "us-east-2": _39, "us-gov-east-1": _38, "us-gov-west-1": _38, "us-west-1": _37, "us-west-2": _39, compute: _6, "compute-1": _6, airflow: [0, { "af-south-1": _6, "ap-east-1": _6, "ap-northeast-1": _6, "ap-northeast-2": _6, "ap-northeast-3": _6, "ap-south-1": _6, "ap-south-2": _6, "ap-southeast-1": _6, "ap-southeast-2": _6, "ap-southeast-3": _6, "ap-southeast-4": _6, "ap-southeast-5": _6, "ap-southeast-7": _6, "ca-central-1": _6, "ca-west-1": _6, "eu-central-1": _6, "eu-central-2": _6, "eu-north-1": _6, "eu-south-1": _6, "eu-south-2": _6, "eu-west-1": _6, "eu-west-2": _6, "eu-west-3": _6, "il-central-1": _6, "me-central-1": _6, "me-south-1": _6, "sa-east-1": _6, "us-east-1": _6, "us-east-2": _6, "us-west-1": _6, "us-west-2": _6 }], rds: [0, { "af-south-1": _6, "ap-east-1": _6, "ap-east-2": _6, "ap-northeast-1": _6, "ap-northeast-2": _6, "ap-northeast-3": _6, "ap-south-1": _6, "ap-south-2": _6, "ap-southeast-1": _6, "ap-southeast-2": _6, "ap-southeast-3": _6, "ap-southeast-4": _6, "ap-southeast-5": _6, "ap-southeast-6": _6, "ap-southeast-7": _6, "ca-central-1": _6, "ca-west-1": _6, "eu-central-1": _6, "eu-central-2": _6, "eu-west-1": _6, "eu-west-2": _6, "eu-west-3": _6, "il-central-1": _6, "me-central-1": _6, "me-south-1": _6, "mx-central-1": _6, "sa-east-1": _6, "us-east-1": _6, "us-east-2": _6, "us-gov-east-1": _6, "us-gov-west-1": _6, "us-northeast-1": _6, "us-west-1": _6, "us-west-2": _6 }], s3: _3, "s3-1": _3, "s3-ap-east-1": _3, "s3-ap-northeast-1": _3, "s3-ap-northeast-2": _3, "s3-ap-northeast-3": _3, "s3-ap-south-1": _3, "s3-ap-southeast-1": _3, "s3-ap-southeast-2": _3, "s3-ca-central-1": _3, "s3-eu-central-1": _3, "s3-eu-north-1": _3, "s3-eu-west-1": _3, "s3-eu-west-2": _3, "s3-eu-west-3": _3, "s3-external-1": _3, "s3-fips-us-gov-east-1": _3, "s3-fips-us-gov-west-1": _3, "s3-global": [0, { accesspoint: [0, { mrap: _3 }] }], "s3-me-south-1": _3, "s3-sa-east-1": _3, "s3-us-east-2": _3, "s3-us-gov-east-1": _3, "s3-us-gov-west-1": _3, "s3-us-west-1": _3, "s3-us-west-2": _3, "s3-website-ap-northeast-1": _3, "s3-website-ap-southeast-1": _3, "s3-website-ap-southeast-2": _3, "s3-website-eu-west-1": _3, "s3-website-sa-east-1": _3, "s3-website-us-east-1": _3, "s3-website-us-gov-west-1": _3, "s3-website-us-west-1": _3, "s3-website-us-west-2": _3, elb: _6 }], amazoncognito: [0, { "af-south-1": _40, "ap-east-1": _40, "ap-northeast-1": _40, "ap-northeast-2": _40, "ap-northeast-3": _40, "ap-south-1": _40, "ap-south-2": _40, "ap-southeast-1": _40, "ap-southeast-2": _40, "ap-southeast-3": _40, "ap-southeast-4": _40, "ap-southeast-5": _40, "ap-southeast-7": _40, "ca-central-1": _40, "ca-west-1": _40, "eu-central-1": _40, "eu-central-2": _40, "eu-north-1": _40, "eu-south-1": _40, "eu-south-2": _40, "eu-west-1": _40, "eu-west-2": _40, "eu-west-3": _40, "il-central-1": _40, "me-central-1": _40, "me-south-1": _40, "mx-central-1": _40, "sa-east-1": _40, "us-east-1": _41, "us-east-2": _41, "us-gov-east-1": _42, "us-gov-west-1": _42, "us-west-1": _41, "us-west-2": _41 }], amplifyapp: _3, awsapprunner: _6, awsapps: _3, elasticbeanstalk: [2, { "af-south-1": _3, "ap-east-1": _3, "ap-northeast-1": _3, "ap-northeast-2": _3, "ap-northeast-3": _3, "ap-south-1": _3, "ap-southeast-1": _3, "ap-southeast-2": _3, "ap-southeast-3": _3, "ap-southeast-5": _3, "ap-southeast-7": _3, "ca-central-1": _3, "eu-central-1": _3, "eu-north-1": _3, "eu-south-1": _3, "eu-south-2": _3, "eu-west-1": _3, "eu-west-2": _3, "eu-west-3": _3, "il-central-1": _3, "me-central-1": _3, "me-south-1": _3, "sa-east-1": _3, "us-east-1": _3, "us-east-2": _3, "us-gov-east-1": _3, "us-gov-west-1": _3, "us-west-1": _3, "us-west-2": _3 }], awsglobalaccelerator: _3, siiites: _3, appspacehosted: _3, appspaceusercontent: _3, "on-aptible": _3, myasustor: _3, "balena-devices": _3, boutir: _3, bplaced: _3, cafjs: _3, "canva-apps": _3, "canva-hosted-embed": _3, canvacode: _3, "rice-labs": _3, "cdn77-storage": _3, br: _3, cn: _3, de: _3, eu: _3, jpn: _3, mex: _3, ru: _3, sa: _3, uk: _3, us: _3, za: _3, "clever-cloud": [0, { services: _6 }], abrdns: _3, dnsabr: _3, "ip-ddns": _3, jdevcloud: _3, wpdevcloud: _3, "cf-ipfs": _3, "cloudflare-ipfs": _3, trycloudflare: _3, co: _3, devinapps: _6, builtwithdark: _3, datadetect: [0, { demo: _3, instance: _3 }], dattolocal: _3, dattorelay: _3, dattoweb: _3, mydatto: _3, digitaloceanspaces: _6, discordsays: _3, discordsez: _3, drayddns: _3, dreamhosters: _3, durumis: _3, blogdns: _3, cechire: _3, dnsalias: _3, dnsdojo: _3, doesntexist: _3, dontexist: _3, doomdns: _3, "dyn-o-saur": _3, dynalias: _3, "dyndns-at-home": _3, "dyndns-at-work": _3, "dyndns-blog": _3, "dyndns-free": _3, "dyndns-home": _3, "dyndns-ip": _3, "dyndns-mail": _3, "dyndns-office": _3, "dyndns-pics": _3, "dyndns-remote": _3, "dyndns-server": _3, "dyndns-web": _3, "dyndns-wiki": _3, "dyndns-work": _3, "est-a-la-maison": _3, "est-a-la-masion": _3, "est-le-patron": _3, "est-mon-blogueur": _3, "from-ak": _3, "from-al": _3, "from-ar": _3, "from-ca": _3, "from-ct": _3, "from-dc": _3, "from-de": _3, "from-fl": _3, "from-ga": _3, "from-hi": _3, "from-ia": _3, "from-id": _3, "from-il": _3, "from-in": _3, "from-ks": _3, "from-ky": _3, "from-ma": _3, "from-md": _3, "from-mi": _3, "from-mn": _3, "from-mo": _3, "from-ms": _3, "from-mt": _3, "from-nc": _3, "from-nd": _3, "from-ne": _3, "from-nh": _3, "from-nj": _3, "from-nm": _3, "from-nv": _3, "from-oh": _3, "from-ok": _3, "from-or": _3, "from-pa": _3, "from-pr": _3, "from-ri": _3, "from-sc": _3, "from-sd": _3, "from-tn": _3, "from-tx": _3, "from-ut": _3, "from-va": _3, "from-vt": _3, "from-wa": _3, "from-wi": _3, "from-wv": _3, "from-wy": _3, getmyip: _3, gotdns: _3, "hobby-site": _3, homelinux: _3, homeunix: _3, iamallama: _3, "is-a-anarchist": _3, "is-a-blogger": _3, "is-a-bookkeeper": _3, "is-a-bulls-fan": _3, "is-a-caterer": _3, "is-a-chef": _3, "is-a-conservative": _3, "is-a-cpa": _3, "is-a-cubicle-slave": _3, "is-a-democrat": _3, "is-a-designer": _3, "is-a-doctor": _3, "is-a-financialadvisor": _3, "is-a-geek": _3, "is-a-green": _3, "is-a-guru": _3, "is-a-hard-worker": _3, "is-a-hunter": _3, "is-a-landscaper": _3, "is-a-lawyer": _3, "is-a-liberal": _3, "is-a-libertarian": _3, "is-a-llama": _3, "is-a-musician": _3, "is-a-nascarfan": _3, "is-a-nurse": _3, "is-a-painter": _3, "is-a-personaltrainer": _3, "is-a-photographer": _3, "is-a-player": _3, "is-a-republican": _3, "is-a-rockstar": _3, "is-a-socialist": _3, "is-a-student": _3, "is-a-teacher": _3, "is-a-techie": _3, "is-a-therapist": _3, "is-an-accountant": _3, "is-an-actor": _3, "is-an-actress": _3, "is-an-anarchist": _3, "is-an-artist": _3, "is-an-engineer": _3, "is-an-entertainer": _3, "is-certified": _3, "is-gone": _3, "is-into-anime": _3, "is-into-cars": _3, "is-into-cartoons": _3, "is-into-games": _3, "is-leet": _3, "is-not-certified": _3, "is-slick": _3, "is-uberleet": _3, "is-with-theband": _3, "isa-geek": _3, "isa-hockeynut": _3, issmarterthanyou: _3, "likes-pie": _3, likescandy: _3, "neat-url": _3, "saves-the-whales": _3, selfip: _3, "sells-for-less": _3, "sells-for-u": _3, servebbs: _3, "simple-url": _3, "space-to-rent": _3, "teaches-yoga": _3, writesthisblog: _3, "1cooldns": _3, bumbleshrimp: _3, ddnsfree: _3, ddnsgeek: _3, ddnsguru: _3, dynuddns: _3, dynuhosting: _3, giize: _3, gleeze: _3, kozow: _3, loseyourip: _3, ooguy: _3, pivohosting: _3, theworkpc: _3, wiredbladehosting: _3, emergentagent: [0, { preview: _3 }], mytuleap: _3, "tuleap-partners": _3, encoreapi: _3, evennode: [0, { "eu-1": _3, "eu-2": _3, "eu-3": _3, "eu-4": _3, "us-1": _3, "us-2": _3, "us-3": _3, "us-4": _3 }], onfabrica: _3, "fastly-edge": _3, "fastly-terrarium": _3, "fastvps-server": _3, mydobiss: _3, firebaseapp: _3, fldrv: _3, framercanvas: _3, "freebox-os": _3, freeboxos: _3, freemyip: _3, aliases121: _3, gentapps: _3, gentlentapis: _3, githubusercontent: _3, "0emm": _6, appspot: [2, { r: _6 }], blogspot: _3, codespot: _3, googleapis: _3, googlecode: _3, pagespeedmobilizer: _3, withgoogle: _3, withyoutube: _3, grayjayleagues: _3, hatenablog: _3, hatenadiary: _3, "hercules-app": _3, "hercules-dev": _3, herokuapp: _3, gr: _3, smushcdn: _3, wphostedmail: _3, wpmucdn: _3, pixolino: _3, "apps-1and1": _3, "live-website": _3, "webspace-host": _3, dopaas: _3, "hosted-by-previder": _44, hosteur: [0, { "rag-cloud": _3, "rag-cloud-ch": _3 }], "ik-server": [0, { jcloud: _3, "jcloud-ver-jpc": _3 }], jelastic: [0, { demo: _3 }], massivegrid: _44, wafaicloud: [0, { jed: _3, ryd: _3 }], "eu1-plenit": _3, "la1-plenit": _3, "us1-plenit": _3, webadorsite: _3, "on-forge": _3, "on-vapor": _3, lpusercontent: _3, linode: [0, { members: _3, nodebalancer: _6 }], linodeobjects: _6, linodeusercontent: [0, { ip: _3 }], localtonet: _3, lovableproject: _3, barsycenter: _3, barsyonline: _3, lutrausercontent: _6, magicpatternsapp: _3, modelscape: _3, mwcloudnonprod: _3, polyspace: _3, mazeplay: _3, miniserver: _3, atmeta: _3, fbsbx: _43, meteorapp: _45, routingthecloud: _3, "same-app": _3, "same-preview": _3, mydbserver: _3, mochausercontent: _3, hostedpi: _3, "mythic-beasts": [0, { caracal: _3, customer: _3, fentiger: _3, lynx: _3, ocelot: _3, oncilla: _3, onza: _3, sphinx: _3, vs: _3, x: _3, yali: _3 }], nospamproxy: [0, { cloud: [2, { o365: _3 }] }], "4u": _3, nfshost: _3, "3utilities": _3, blogsyte: _3, ciscofreak: _3, damnserver: _3, ddnsking: _3, ditchyourip: _3, dnsiskinky: _3, dynns: _3, geekgalaxy: _3, "health-carereform": _3, homesecuritymac: _3, homesecuritypc: _3, myactivedirectory: _3, mysecuritycamera: _3, myvnc: _3, "net-freaks": _3, onthewifi: _3, point2this: _3, quicksytes: _3, securitytactics: _3, servebeer: _3, servecounterstrike: _3, serveexchange: _3, serveftp: _3, servegame: _3, servehalflife: _3, servehttp: _3, servehumour: _3, serveirc: _3, servemp3: _3, servep2p: _3, servepics: _3, servequake: _3, servesarcasm: _3, stufftoread: _3, unusualperson: _3, workisboring: _3, myiphost: _3, observableusercontent: [0, { static: _3 }], simplesite: _3, oaiusercontent: _6, orsites: _3, operaunite: _3, "customer-oci": [0, { "*": _3, oci: _6, ocp: _6, ocs: _6 }], oraclecloudapps: _6, oraclegovcloudapps: _6, "authgear-staging": _3, authgearapps: _3, outsystemscloud: _3, ownprovider: _3, pgfog: _3, pagexl: _3, gotpantheon: _3, paywhirl: _6, forgeblocks: _3, upsunapp: _3, "postman-echo": _3, prgmr: [0, { xen: _3 }], "project-study": [0, { dev: _3 }], pythonanywhere: _45, qa2: _3, "alpha-myqnapcloud": _3, "dev-myqnapcloud": _3, mycloudnas: _3, mynascloud: _3, myqnapcloud: _3, qualifioapp: _3, ladesk: _3, qualyhqpartner: _6, qualyhqportal: _6, qbuser: _3, quipelements: _6, rackmaze: _3, "readthedocs-hosted": _3, rhcloud: _3, onrender: _3, render: _46, "subsc-pay": _3, "180r": _3, dojin: _3, sakuratan: _3, sakuraweb: _3, x0: _3, code: [0, { builder: _6, "dev-builder": _6, "stg-builder": _6 }], salesforce: [0, { platform: [0, { "code-builder-stg": [0, { test: [0, { "001": _6 }] }] }] }], logoip: _3, scrysec: _3, "firewall-gateway": _3, myshopblocks: _3, myshopify: _3, shopitsite: _3, "1kapp": _3, appchizi: _3, applinzi: _3, sinaapp: _3, vipsinaapp: _3, streamlitapp: _3, "try-snowplow": _3, "playstation-cloud": _3, myspreadshop: _3, "w-corp-staticblitz": _3, "w-credentialless-staticblitz": _3, "w-staticblitz": _3, "stackhero-network": _3, stdlib: [0, { api: _3 }], strapiapp: [2, { media: _3 }], "streak-link": _3, streaklinks: _3, streakusercontent: _3, "temp-dns": _3, dsmynas: _3, familyds: _3, mytabit: _3, taveusercontent: _3, "tb-hosting": _47, reservd: _3, thingdustdata: _3, "townnews-staging": _3, typeform: [0, { pro: _3 }], hk: _3, it: _3, "deus-canvas": _3, vultrobjects: _6, wafflecell: _3, hotelwithflight: _3, "reserve-online": _3, cprapid: _3, pleskns: _3, remotewd: _3, wiardweb: [0, { pages: _3 }], "drive-platform": _3, "base44-sandbox": _3, wixsite: _3, wixstudio: _3, messwithdns: _3, "woltlab-demo": _3, wpenginepowered: [2, { js: _3 }], xnbay: [2, { u2: _3, "u2-local": _3 }], xtooldevice: _3, yolasite: _3 }], coop: _2, cr: [1, { ac: _2, co: _2, ed: _2, fi: _2, go: _2, or: _2, sa: _2 }], cu: [1, { com: _2, edu: _2, gob: _2, inf: _2, nat: _2, net: _2, org: _2 }], cv: [1, { com: _2, edu: _2, id: _2, int: _2, net: _2, nome: _2, org: _2, publ: _2 }], cw: _48, cx: [1, { gov: _2, cloudns: _3, ath: _3, info: _3, assessments: _3, calculators: _3, funnels: _3, paynow: _3, quizzes: _3, researched: _3, tests: _3 }], cy: [1, { ac: _2, biz: _2, com: [1, { scaleforce: _49 }], ekloges: _2, gov: _2, ltd: _2, mil: _2, net: _2, org: _2, press: _2, pro: _2, tm: _2 }], cz: [1, { gov: _2, contentproxy9: [0, { rsc: _3 }], realm: _3, e4: _3, co: _3, metacentrum: [0, { cloud: _6, custom: _3 }], muni: [0, { cloud: [0, { flt: _3, usr: _3 }] }] }], de: [1, { bplaced: _3, square7: _3, "bwcloud-os-instance": _6, com: _3, cosidns: _50, dnsupdater: _3, "dynamisches-dns": _3, "internet-dns": _3, "l-o-g-i-n": _3, ddnss: [2, { dyn: _3, dyndns: _3 }], "dyn-ip24": _3, dyndns1: _3, "home-webserver": [2, { dyn: _3 }], "myhome-server": _3, dnshome: _3, fuettertdasnetz: _3, isteingeek: _3, istmein: _3, lebtimnetz: _3, leitungsen: _3, traeumtgerade: _3, frusky: _6, goip: _3, "xn--gnstigbestellen-zvb": _3, "g\xFCnstigbestellen": _3, "xn--gnstigliefern-wob": _3, "g\xFCnstigliefern": _3, "hs-heilbronn": [0, { it: [0, { pages: _3, "pages-research": _3 }] }], "dyn-berlin": _3, "in-berlin": _3, "in-brb": _3, "in-butter": _3, "in-dsl": _3, "in-vpn": _3, iservschule: _3, "mein-iserv": _3, schuldock: _3, schulplattform: _3, schulserver: _3, "test-iserv": _3, keymachine: _3, co: _3, "git-repos": _3, "lcube-server": _3, "svn-repos": _3, barsy: _3, webspaceconfig: _3, "123webseite": _3, rub: _3, "ruhr-uni-bochum": [2, { noc: [0, { io: _3 }] }], logoip: _3, "firewall-gateway": _3, "my-gateway": _3, "my-router": _3, spdns: _3, my: _3, speedpartner: [0, { customer: _3 }], myspreadshop: _3, "taifun-dns": _3, "12hp": _3, "2ix": _3, "4lima": _3, "lima-city": _3, "virtual-user": _3, virtualuser: _3, "community-pro": _3, diskussionsbereich: _3, xenonconnect: _6 }], dj: _2, dk: [1, { biz: _3, co: _3, firm: _3, reg: _3, store: _3, "123hjemmeside": _3, myspreadshop: _3 }], dm: _52, do: [1, { art: _2, com: _2, edu: _2, gob: _2, gov: _2, mil: _2, net: _2, org: _2, sld: _2, web: _2 }], dz: [1, { art: _2, asso: _2, com: _2, edu: _2, gov: _2, net: _2, org: _2, pol: _2, soc: _2, tm: _2 }], ec: [1, { abg: _2, adm: _2, agron: _2, arqt: _2, art: _2, bar: _2, chef: _2, com: _2, cont: _2, cpa: _2, cue: _2, dent: _2, dgn: _2, disco: _2, doc: _2, edu: _2, eng: _2, esm: _2, fin: _2, fot: _2, gal: _2, gob: _2, gov: _2, gye: _2, ibr: _2, info: _2, k12: _2, lat: _2, loj: _2, med: _2, mil: _2, mktg: _2, mon: _2, net: _2, ntr: _2, odont: _2, org: _2, pro: _2, prof: _2, psic: _2, psiq: _2, pub: _2, rio: _2, rrpp: _2, sal: _2, tech: _2, tul: _2, tur: _2, uio: _2, vet: _2, xxx: _2, base: _3, official: _3 }], edu: [1, { rit: [0, { "git-pages": _3 }] }], ee: [1, { aip: _2, com: _2, edu: _2, fie: _2, gov: _2, lib: _2, med: _2, org: _2, pri: _2, riik: _2 }], eg: [1, { ac: _2, com: _2, edu: _2, eun: _2, gov: _2, info: _2, me: _2, mil: _2, name: _2, net: _2, org: _2, sci: _2, sport: _2, tv: _2 }], er: _21, es: [1, { com: _2, edu: _2, gob: _2, nom: _2, org: _2, "123miweb": _3, myspreadshop: _3 }], et: [1, { biz: _2, com: _2, edu: _2, gov: _2, info: _2, name: _2, net: _2, org: _2 }], eu: [1, { amazonwebservices: [0, { on: [0, { "eusc-de-east-1": [0, { "cognito-idp": _40 }] }] }], cloudns: _3, prvw: _3, deuxfleurs: _3, dogado: [0, { jelastic: _3 }], barsy: _3, spdns: _3, nxa: _6, directwp: _3, transurl: _6 }], fi: [1, { aland: _2, dy: _3, "xn--hkkinen-5wa": _3, "h\xE4kkinen": _3, iki: _3, cloudplatform: [0, { fi: _3 }], datacenter: [0, { demo: _3, paas: _3 }], kapsi: _3, "123kotisivu": _3, myspreadshop: _3 }], fj: [1, { ac: _2, biz: _2, com: _2, edu: _2, gov: _2, id: _2, info: _2, mil: _2, name: _2, net: _2, org: _2, pro: _2 }], fk: _21, fm: [1, { com: _2, edu: _2, net: _2, org: _2, radio: _3, user: _6 }], fo: _2, fr: [1, { asso: _2, com: _2, gouv: _2, nom: _2, prd: _2, tm: _2, avoues: _2, cci: _2, greta: _2, "huissier-justice": _2, "fbx-os": _3, fbxos: _3, "freebox-os": _3, freeboxos: _3, goupile: _3, kdns: _3, "123siteweb": _3, "on-web": _3, "chirurgiens-dentistes-en-france": _3, dedibox: _3, aeroport: _3, avocat: _3, chambagri: _3, "chirurgiens-dentistes": _3, "experts-comptables": _3, medecin: _3, notaires: _3, pharmacien: _3, port: _3, veterinaire: _3, myspreadshop: _3, ynh: _3 }], ga: _2, gb: _2, gd: [1, { edu: _2, gov: _2 }], ge: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, pvt: _2, school: _2 }], gf: _2, gg: [1, { co: _2, net: _2, org: _2, ply: [0, { at: _6, d6: _3 }], botdash: _3, kaas: _3, stackit: _3, panel: [2, { daemon: _3 }] }], gh: [1, { biz: _2, com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2 }], gi: [1, { com: _2, edu: _2, gov: _2, ltd: _2, mod: _2, org: _2 }], gl: [1, { co: _2, com: _2, edu: _2, net: _2, org: _2 }], gm: _2, gn: [1, { ac: _2, com: _2, edu: _2, gov: _2, net: _2, org: _2 }], gov: _2, gp: [1, { asso: _2, com: _2, edu: _2, mobi: _2, net: _2, org: _2 }], gq: _2, gr: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, barsy: _3, simplesite: _3 }], gs: _2, gt: [1, { com: _2, edu: _2, gob: _2, ind: _2, mil: _2, net: _2, org: _2 }], gu: [1, { com: _2, edu: _2, gov: _2, guam: _2, info: _2, net: _2, org: _2, web: _2 }], gw: [1, { nx: _3 }], gy: _52, hk: [1, { com: _2, edu: _2, gov: _2, idv: _2, net: _2, org: _2, "xn--ciqpn": _2, "\u4E2A\u4EBA": _2, "xn--gmqw5a": _2, "\u500B\u4EBA": _2, "xn--55qx5d": _2, "\u516C\u53F8": _2, "xn--mxtq1m": _2, "\u653F\u5E9C": _2, "xn--lcvr32d": _2, "\u654E\u80B2": _2, "xn--wcvs22d": _2, "\u6559\u80B2": _2, "xn--gmq050i": _2, "\u7B87\u4EBA": _2, "xn--uc0atv": _2, "\u7D44\u7E54": _2, "xn--uc0ay4a": _2, "\u7D44\u7EC7": _2, "xn--od0alg": _2, "\u7DB2\u7D61": _2, "xn--zf0avx": _2, "\u7DB2\u7EDC": _2, "xn--mk0axi": _2, "\u7EC4\u7E54": _2, "xn--tn0ag": _2, "\u7EC4\u7EC7": _2, "xn--od0aq3b": _2, "\u7F51\u7D61": _2, "xn--io0a7i": _2, "\u7F51\u7EDC": _2, inc: _3, ltd: _3 }], hm: _2, hn: [1, { com: _2, edu: _2, gob: _2, mil: _2, net: _2, org: _2 }], hr: [1, { com: _2, from: _2, iz: _2, name: _2, brendly: _20 }], ht: [1, { adult: _2, art: _2, asso: _2, com: _2, coop: _2, edu: _2, firm: _2, gouv: _2, info: _2, med: _2, net: _2, org: _2, perso: _2, pol: _2, pro: _2, rel: _2, shop: _2, rt: _3 }], hu: [1, { "2000": _2, agrar: _2, bolt: _2, casino: _2, city: _2, co: _2, erotica: _2, erotika: _2, film: _2, forum: _2, games: _2, hotel: _2, info: _2, ingatlan: _2, jogasz: _2, konyvelo: _2, lakas: _2, media: _2, news: _2, org: _2, priv: _2, reklam: _2, sex: _2, shop: _2, sport: _2, suli: _2, szex: _2, tm: _2, tozsde: _2, utazas: _2, video: _2 }], id: [1, { ac: _2, biz: _2, co: _2, desa: _2, go: _2, kop: _2, mil: _2, my: _2, net: _2, or: _2, ponpes: _2, sch: _2, web: _2, "xn--9tfky": _2, "\u1B29\u1B2E\u1B36": _2, e: _3, zone: _3 }], ie: [1, { gov: _2, myspreadshop: _3 }], il: [1, { ac: _2, co: [1, { ravpage: _3, mytabit: _3, tabitorder: _3 }], gov: _2, idf: _2, k12: _2, muni: _2, net: _2, org: _2 }], "xn--4dbrk0ce": [1, { "xn--4dbgdty6c": _2, "xn--5dbhl8d": _2, "xn--8dbq2a": _2, "xn--hebda8b": _2 }], "\u05D9\u05E9\u05E8\u05D0\u05DC": [1, { "\u05D0\u05E7\u05D3\u05DE\u05D9\u05D4": _2, "\u05D9\u05E9\u05D5\u05D1": _2, "\u05E6\u05D4\u05DC": _2, "\u05DE\u05DE\u05E9\u05DC": _2 }], im: [1, { ac: _2, co: [1, { ltd: _2, plc: _2 }], com: _2, net: _2, org: _2, tt: _2, tv: _2 }], in: [1, { "5g": _2, "6g": _2, ac: _2, ai: _2, am: _2, bank: _2, bihar: _2, biz: _2, business: _2, ca: _2, cn: _2, co: _2, com: _2, coop: _2, cs: _2, delhi: _2, dr: _2, edu: _2, er: _2, fin: _2, firm: _2, gen: _2, gov: _2, gujarat: _2, ind: _2, info: _2, int: _2, internet: _2, io: _2, me: _2, mil: _2, net: _2, nic: _2, org: _2, pg: _2, post: _2, pro: _2, res: _2, travel: _2, tv: _2, uk: _2, up: _2, us: _2, cloudns: _3, barsy: _3, web: _3, indevs: _3, supabase: _3 }], info: [1, { cloudns: _3, "dynamic-dns": _3, "barrel-of-knowledge": _3, "barrell-of-knowledge": _3, dyndns: _3, "for-our": _3, "groks-the": _3, "groks-this": _3, "here-for-more": _3, knowsitall: _3, selfip: _3, webhop: _3, barsy: _3, mayfirst: _3, mittwald: _3, mittwaldserver: _3, typo3server: _3, dvrcam: _3, ilovecollege: _3, "no-ip": _3, forumz: _3, nsupdate: _3, dnsupdate: _3, "v-info": _3 }], int: [1, { eu: _2 }], io: [1, { "2038": _3, co: _2, com: _2, edu: _2, gov: _2, mil: _2, net: _2, nom: _2, org: _2, "on-acorn": _6, myaddr: _3, apigee: _3, "b-data": _3, beagleboard: _3, bitbucket: _3, bluebite: _3, boxfuse: _3, brave: _7, browsersafetymark: _3, bubble: _56, bubbleapps: _3, bigv: [0, { uk0: _3 }], cleverapps: _3, cloudbeesusercontent: _3, dappnode: [0, { dyndns: _3 }], darklang: _3, definima: _3, dedyn: _3, icp0: _57, icp1: _57, qzz: _3, "fh-muenster": _3, gitbook: _3, github: _3, gitlab: _3, lolipop: _3, "hasura-app": _3, hostyhosting: _3, hypernode: _3, moonscale: _6, beebyte: _44, beebyteapp: [0, { sekd1: _3 }], jele: _3, keenetic: _3, kiloapps: _3, webthings: _3, loginline: _3, barsy: _3, azurecontainer: _6, ngrok: [2, { ap: _3, au: _3, eu: _3, in: _3, jp: _3, sa: _3, us: _3 }], nodeart: [0, { stage: _3 }], pantheonsite: _3, forgerock: [0, { id: _3 }], pstmn: [2, { mock: _3 }], protonet: _3, qcx: [2, { sys: _6 }], qoto: _3, vaporcloud: _3, myrdbx: _3, "rb-hosting": _47, "on-k3s": _6, "on-rio": _6, readthedocs: _3, resindevice: _3, resinstaging: [0, { devices: _3 }], hzc: _3, sandcats: _3, scrypted: [0, { client: _3 }], "mo-siemens": _3, lair: _43, stolos: _6, musician: _3, utwente: _3, edugit: _3, telebit: _3, thingdust: [0, { dev: _58, disrec: _58, prod: _59, testing: _58 }], tickets: _3, webflow: _3, webflowtest: _3, "drive-platform": _3, editorx: _3, wixstudio: _3, basicserver: _3, virtualserver: _3 }], iq: _5, ir: [1, { ac: _2, co: _2, gov: _2, id: _2, net: _2, org: _2, sch: _2, "xn--mgba3a4f16a": _2, "\u0627\u06CC\u0631\u0627\u0646": _2, "xn--mgba3a4fra": _2, "\u0627\u064A\u0631\u0627\u0646": _2, arvanedge: _3, vistablog: _3 }], is: _2, it: [1, { edu: _2, gov: _2, abr: _2, abruzzo: _2, "aosta-valley": _2, aostavalley: _2, bas: _2, basilicata: _2, cal: _2, calabria: _2, cam: _2, campania: _2, "emilia-romagna": _2, emiliaromagna: _2, emr: _2, "friuli-v-giulia": _2, "friuli-ve-giulia": _2, "friuli-vegiulia": _2, "friuli-venezia-giulia": _2, "friuli-veneziagiulia": _2, "friuli-vgiulia": _2, "friuliv-giulia": _2, "friulive-giulia": _2, friulivegiulia: _2, "friulivenezia-giulia": _2, friuliveneziagiulia: _2, friulivgiulia: _2, fvg: _2, laz: _2, lazio: _2, lig: _2, liguria: _2, lom: _2, lombardia: _2, lombardy: _2, lucania: _2, mar: _2, marche: _2, mol: _2, molise: _2, piedmont: _2, piemonte: _2, pmn: _2, pug: _2, puglia: _2, sar: _2, sardegna: _2, sardinia: _2, sic: _2, sicilia: _2, sicily: _2, taa: _2, tos: _2, toscana: _2, "trentin-sud-tirol": _2, "xn--trentin-sd-tirol-rzb": _2, "trentin-s\xFCd-tirol": _2, "trentin-sudtirol": _2, "xn--trentin-sdtirol-7vb": _2, "trentin-s\xFCdtirol": _2, "trentin-sued-tirol": _2, "trentin-suedtirol": _2, trentino: _2, "trentino-a-adige": _2, "trentino-aadige": _2, "trentino-alto-adige": _2, "trentino-altoadige": _2, "trentino-s-tirol": _2, "trentino-stirol": _2, "trentino-sud-tirol": _2, "xn--trentino-sd-tirol-c3b": _2, "trentino-s\xFCd-tirol": _2, "trentino-sudtirol": _2, "xn--trentino-sdtirol-szb": _2, "trentino-s\xFCdtirol": _2, "trentino-sued-tirol": _2, "trentino-suedtirol": _2, "trentinoa-adige": _2, trentinoaadige: _2, "trentinoalto-adige": _2, trentinoaltoadige: _2, "trentinos-tirol": _2, trentinostirol: _2, "trentinosud-tirol": _2, "xn--trentinosd-tirol-rzb": _2, "trentinos\xFCd-tirol": _2, trentinosudtirol: _2, "xn--trentinosdtirol-7vb": _2, "trentinos\xFCdtirol": _2, "trentinosued-tirol": _2, trentinosuedtirol: _2, "trentinsud-tirol": _2, "xn--trentinsd-tirol-6vb": _2, "trentins\xFCd-tirol": _2, trentinsudtirol: _2, "xn--trentinsdtirol-nsb": _2, "trentins\xFCdtirol": _2, "trentinsued-tirol": _2, trentinsuedtirol: _2, tuscany: _2, umb: _2, umbria: _2, "val-d-aosta": _2, "val-daosta": _2, "vald-aosta": _2, valdaosta: _2, "valle-aosta": _2, "valle-d-aosta": _2, "valle-daosta": _2, valleaosta: _2, "valled-aosta": _2, valledaosta: _2, "vallee-aoste": _2, "xn--valle-aoste-ebb": _2, "vall\xE9e-aoste": _2, "vallee-d-aoste": _2, "xn--valle-d-aoste-ehb": _2, "vall\xE9e-d-aoste": _2, valleeaoste: _2, "xn--valleaoste-e7a": _2, "vall\xE9eaoste": _2, valleedaoste: _2, "xn--valledaoste-ebb": _2, "vall\xE9edaoste": _2, vao: _2, vda: _2, ven: _2, veneto: _2, ag: _2, agrigento: _2, al: _2, alessandria: _2, "alto-adige": _2, altoadige: _2, an: _2, ancona: _2, "andria-barletta-trani": _2, "andria-trani-barletta": _2, andriabarlettatrani: _2, andriatranibarletta: _2, ao: _2, aosta: _2, aoste: _2, ap: _2, aq: _2, aquila: _2, ar: _2, arezzo: _2, "ascoli-piceno": _2, ascolipiceno: _2, asti: _2, at: _2, av: _2, avellino: _2, ba: _2, balsan: _2, "balsan-sudtirol": _2, "xn--balsan-sdtirol-nsb": _2, "balsan-s\xFCdtirol": _2, "balsan-suedtirol": _2, bari: _2, "barletta-trani-andria": _2, barlettatraniandria: _2, belluno: _2, benevento: _2, bergamo: _2, bg: _2, bi: _2, biella: _2, bl: _2, bn: _2, bo: _2, bologna: _2, bolzano: _2, "bolzano-altoadige": _2, bozen: _2, "bozen-sudtirol": _2, "xn--bozen-sdtirol-2ob": _2, "bozen-s\xFCdtirol": _2, "bozen-suedtirol": _2, br: _2, brescia: _2, brindisi: _2, bs: _2, bt: _2, bulsan: _2, "bulsan-sudtirol": _2, "xn--bulsan-sdtirol-nsb": _2, "bulsan-s\xFCdtirol": _2, "bulsan-suedtirol": _2, bz: _2, ca: _2, cagliari: _2, caltanissetta: _2, "campidano-medio": _2, campidanomedio: _2, campobasso: _2, "carbonia-iglesias": _2, carboniaiglesias: _2, "carrara-massa": _2, carraramassa: _2, caserta: _2, catania: _2, catanzaro: _2, cb: _2, ce: _2, "cesena-forli": _2, "xn--cesena-forl-mcb": _2, "cesena-forl\xEC": _2, cesenaforli: _2, "xn--cesenaforl-i8a": _2, "cesenaforl\xEC": _2, ch: _2, chieti: _2, ci: _2, cl: _2, cn: _2, co: _2, como: _2, cosenza: _2, cr: _2, cremona: _2, crotone: _2, cs: _2, ct: _2, cuneo: _2, cz: _2, "dell-ogliastra": _2, dellogliastra: _2, en: _2, enna: _2, fc: _2, fe: _2, fermo: _2, ferrara: _2, fg: _2, fi: _2, firenze: _2, florence: _2, fm: _2, foggia: _2, "forli-cesena": _2, "xn--forl-cesena-fcb": _2, "forl\xEC-cesena": _2, forlicesena: _2, "xn--forlcesena-c8a": _2, "forl\xECcesena": _2, fr: _2, frosinone: _2, ge: _2, genoa: _2, genova: _2, go: _2, gorizia: _2, gr: _2, grosseto: _2, "iglesias-carbonia": _2, iglesiascarbonia: _2, im: _2, imperia: _2, is: _2, isernia: _2, kr: _2, "la-spezia": _2, laquila: _2, laspezia: _2, latina: _2, lc: _2, le: _2, lecce: _2, lecco: _2, li: _2, livorno: _2, lo: _2, lodi: _2, lt: _2, lu: _2, lucca: _2, macerata: _2, mantova: _2, "massa-carrara": _2, massacarrara: _2, matera: _2, mb: _2, mc: _2, me: _2, "medio-campidano": _2, mediocampidano: _2, messina: _2, mi: _2, milan: _2, milano: _2, mn: _2, mo: _2, modena: _2, monza: _2, "monza-brianza": _2, "monza-e-della-brianza": _2, monzabrianza: _2, monzaebrianza: _2, monzaedellabrianza: _2, ms: _2, mt: _2, na: _2, naples: _2, napoli: _2, no: _2, novara: _2, nu: _2, nuoro: _2, og: _2, ogliastra: _2, "olbia-tempio": _2, olbiatempio: _2, or: _2, oristano: _2, ot: _2, pa: _2, padova: _2, padua: _2, palermo: _2, parma: _2, pavia: _2, pc: _2, pd: _2, pe: _2, perugia: _2, "pesaro-urbino": _2, pesarourbino: _2, pescara: _2, pg: _2, pi: _2, piacenza: _2, pisa: _2, pistoia: _2, pn: _2, po: _2, pordenone: _2, potenza: _2, pr: _2, prato: _2, pt: _2, pu: _2, pv: _2, pz: _2, ra: _2, ragusa: _2, ravenna: _2, rc: _2, re: _2, "reggio-calabria": _2, "reggio-emilia": _2, reggiocalabria: _2, reggioemilia: _2, rg: _2, ri: _2, rieti: _2, rimini: _2, rm: _2, rn: _2, ro: _2, roma: _2, rome: _2, rovigo: _2, sa: _2, salerno: _2, sassari: _2, savona: _2, si: _2, siena: _2, siracusa: _2, so: _2, sondrio: _2, sp: _2, sr: _2, ss: _2, "xn--sdtirol-n2a": _2, "s\xFCdtirol": _2, suedtirol: _2, sv: _2, ta: _2, taranto: _2, te: _2, "tempio-olbia": _2, tempioolbia: _2, teramo: _2, terni: _2, tn: _2, to: _2, torino: _2, tp: _2, tr: _2, "trani-andria-barletta": _2, "trani-barletta-andria": _2, traniandriabarletta: _2, tranibarlettaandria: _2, trapani: _2, trento: _2, treviso: _2, trieste: _2, ts: _2, turin: _2, tv: _2, ud: _2, udine: _2, "urbino-pesaro": _2, urbinopesaro: _2, va: _2, varese: _2, vb: _2, vc: _2, ve: _2, venezia: _2, venice: _2, verbania: _2, vercelli: _2, verona: _2, vi: _2, "vibo-valentia": _2, vibovalentia: _2, vicenza: _2, viterbo: _2, vr: _2, vs: _2, vt: _2, vv: _2, ibxos: _3, iliadboxos: _3, neen: [0, { jc: _3 }], "123homepage": _3, "16-b": _3, "32-b": _3, "64-b": _3, myspreadshop: _3, syncloud: _3 }], je: [1, { co: _2, net: _2, org: _2, of: _3 }], jm: _21, jo: [1, { agri: _2, ai: _2, com: _2, edu: _2, eng: _2, fm: _2, gov: _2, mil: _2, net: _2, org: _2, per: _2, phd: _2, sch: _2, tv: _2 }], jobs: _2, jp: [1, { ac: _2, ad: _2, co: _2, ed: _2, go: _2, gr: _2, lg: _2, ne: [1, { aseinet: _54, gehirn: _3, ivory: _3, "mail-box": _3, mints: _3, mokuren: _3, opal: _3, sakura: _3, sumomo: _3, topaz: _3 }], or: _2, aichi: [1, { aisai: _2, ama: _2, anjo: _2, asuke: _2, chiryu: _2, chita: _2, fuso: _2, gamagori: _2, handa: _2, hazu: _2, hekinan: _2, higashiura: _2, ichinomiya: _2, inazawa: _2, inuyama: _2, isshiki: _2, iwakura: _2, kanie: _2, kariya: _2, kasugai: _2, kira: _2, kiyosu: _2, komaki: _2, konan: _2, kota: _2, mihama: _2, miyoshi: _2, nishio: _2, nisshin: _2, obu: _2, oguchi: _2, oharu: _2, okazaki: _2, owariasahi: _2, seto: _2, shikatsu: _2, shinshiro: _2, shitara: _2, tahara: _2, takahama: _2, tobishima: _2, toei: _2, togo: _2, tokai: _2, tokoname: _2, toyoake: _2, toyohashi: _2, toyokawa: _2, toyone: _2, toyota: _2, tsushima: _2, yatomi: _2 }], akita: [1, { akita: _2, daisen: _2, fujisato: _2, gojome: _2, hachirogata: _2, happou: _2, higashinaruse: _2, honjo: _2, honjyo: _2, ikawa: _2, kamikoani: _2, kamioka: _2, katagami: _2, kazuno: _2, kitaakita: _2, kosaka: _2, kyowa: _2, misato: _2, mitane: _2, moriyoshi: _2, nikaho: _2, noshiro: _2, odate: _2, oga: _2, ogata: _2, semboku: _2, yokote: _2, yurihonjo: _2 }], aomori: [1, { aomori: _2, gonohe: _2, hachinohe: _2, hashikami: _2, hiranai: _2, hirosaki: _2, itayanagi: _2, kuroishi: _2, misawa: _2, mutsu: _2, nakadomari: _2, noheji: _2, oirase: _2, owani: _2, rokunohe: _2, sannohe: _2, shichinohe: _2, shingo: _2, takko: _2, towada: _2, tsugaru: _2, tsuruta: _2 }], chiba: [1, { abiko: _2, asahi: _2, chonan: _2, chosei: _2, choshi: _2, chuo: _2, funabashi: _2, futtsu: _2, hanamigawa: _2, ichihara: _2, ichikawa: _2, ichinomiya: _2, inzai: _2, isumi: _2, kamagaya: _2, kamogawa: _2, kashiwa: _2, katori: _2, katsuura: _2, kimitsu: _2, kisarazu: _2, kozaki: _2, kujukuri: _2, kyonan: _2, matsudo: _2, midori: _2, mihama: _2, minamiboso: _2, mobara: _2, mutsuzawa: _2, nagara: _2, nagareyama: _2, narashino: _2, narita: _2, noda: _2, oamishirasato: _2, omigawa: _2, onjuku: _2, otaki: _2, sakae: _2, sakura: _2, shimofusa: _2, shirako: _2, shiroi: _2, shisui: _2, sodegaura: _2, sosa: _2, tako: _2, tateyama: _2, togane: _2, tohnosho: _2, tomisato: _2, urayasu: _2, yachimata: _2, yachiyo: _2, yokaichiba: _2, yokoshibahikari: _2, yotsukaido: _2 }], ehime: [1, { ainan: _2, honai: _2, ikata: _2, imabari: _2, iyo: _2, kamijima: _2, kihoku: _2, kumakogen: _2, masaki: _2, matsuno: _2, matsuyama: _2, namikata: _2, niihama: _2, ozu: _2, saijo: _2, seiyo: _2, shikokuchuo: _2, tobe: _2, toon: _2, uchiko: _2, uwajima: _2, yawatahama: _2 }], fukui: [1, { echizen: _2, eiheiji: _2, fukui: _2, ikeda: _2, katsuyama: _2, mihama: _2, minamiechizen: _2, obama: _2, ohi: _2, ono: _2, sabae: _2, sakai: _2, takahama: _2, tsuruga: _2, wakasa: _2 }], fukuoka: [1, { ashiya: _2, buzen: _2, chikugo: _2, chikuho: _2, chikujo: _2, chikushino: _2, chikuzen: _2, chuo: _2, dazaifu: _2, fukuchi: _2, hakata: _2, higashi: _2, hirokawa: _2, hisayama: _2, iizuka: _2, inatsuki: _2, kaho: _2, kasuga: _2, kasuya: _2, kawara: _2, keisen: _2, koga: _2, kurate: _2, kurogi: _2, kurume: _2, minami: _2, miyako: _2, miyama: _2, miyawaka: _2, mizumaki: _2, munakata: _2, nakagawa: _2, nakama: _2, nishi: _2, nogata: _2, ogori: _2, okagaki: _2, okawa: _2, oki: _2, omuta: _2, onga: _2, onojo: _2, oto: _2, saigawa: _2, sasaguri: _2, shingu: _2, shinyoshitomi: _2, shonai: _2, soeda: _2, sue: _2, tachiarai: _2, tagawa: _2, takata: _2, toho: _2, toyotsu: _2, tsuiki: _2, ukiha: _2, umi: _2, usui: _2, yamada: _2, yame: _2, yanagawa: _2, yukuhashi: _2 }], fukushima: [1, { aizubange: _2, aizumisato: _2, aizuwakamatsu: _2, asakawa: _2, bandai: _2, date: _2, fukushima: _2, furudono: _2, futaba: _2, hanawa: _2, higashi: _2, hirata: _2, hirono: _2, iitate: _2, inawashiro: _2, ishikawa: _2, iwaki: _2, izumizaki: _2, kagamiishi: _2, kaneyama: _2, kawamata: _2, kitakata: _2, kitashiobara: _2, koori: _2, koriyama: _2, kunimi: _2, miharu: _2, mishima: _2, namie: _2, nango: _2, nishiaizu: _2, nishigo: _2, okuma: _2, omotego: _2, ono: _2, otama: _2, samegawa: _2, shimogo: _2, shirakawa: _2, showa: _2, soma: _2, sukagawa: _2, taishin: _2, tamakawa: _2, tanagura: _2, tenei: _2, yabuki: _2, yamato: _2, yamatsuri: _2, yanaizu: _2, yugawa: _2 }], gifu: [1, { anpachi: _2, ena: _2, gifu: _2, ginan: _2, godo: _2, gujo: _2, hashima: _2, hichiso: _2, hida: _2, higashishirakawa: _2, ibigawa: _2, ikeda: _2, kakamigahara: _2, kani: _2, kasahara: _2, kasamatsu: _2, kawaue: _2, kitagata: _2, mino: _2, minokamo: _2, mitake: _2, mizunami: _2, motosu: _2, nakatsugawa: _2, ogaki: _2, sakahogi: _2, seki: _2, sekigahara: _2, shirakawa: _2, tajimi: _2, takayama: _2, tarui: _2, toki: _2, tomika: _2, wanouchi: _2, yamagata: _2, yaotsu: _2, yoro: _2 }], gunma: [1, { annaka: _2, chiyoda: _2, fujioka: _2, higashiagatsuma: _2, isesaki: _2, itakura: _2, kanna: _2, kanra: _2, katashina: _2, kawaba: _2, kiryu: _2, kusatsu: _2, maebashi: _2, meiwa: _2, midori: _2, minakami: _2, naganohara: _2, nakanojo: _2, nanmoku: _2, numata: _2, oizumi: _2, ora: _2, ota: _2, shibukawa: _2, shimonita: _2, shinto: _2, showa: _2, takasaki: _2, takayama: _2, tamamura: _2, tatebayashi: _2, tomioka: _2, tsukiyono: _2, tsumagoi: _2, ueno: _2, yoshioka: _2 }], hiroshima: [1, { asaminami: _2, daiwa: _2, etajima: _2, fuchu: _2, fukuyama: _2, hatsukaichi: _2, higashihiroshima: _2, hongo: _2, jinsekikogen: _2, kaita: _2, kui: _2, kumano: _2, kure: _2, mihara: _2, miyoshi: _2, naka: _2, onomichi: _2, osakikamijima: _2, otake: _2, saka: _2, sera: _2, seranishi: _2, shinichi: _2, shobara: _2, takehara: _2 }], hokkaido: [1, { abashiri: _2, abira: _2, aibetsu: _2, akabira: _2, akkeshi: _2, asahikawa: _2, ashibetsu: _2, ashoro: _2, assabu: _2, atsuma: _2, bibai: _2, biei: _2, bifuka: _2, bihoro: _2, biratori: _2, chippubetsu: _2, chitose: _2, date: _2, ebetsu: _2, embetsu: _2, eniwa: _2, erimo: _2, esan: _2, esashi: _2, fukagawa: _2, fukushima: _2, furano: _2, furubira: _2, haboro: _2, hakodate: _2, hamatonbetsu: _2, hidaka: _2, higashikagura: _2, higashikawa: _2, hiroo: _2, hokuryu: _2, hokuto: _2, honbetsu: _2, horokanai: _2, horonobe: _2, ikeda: _2, imakane: _2, ishikari: _2, iwamizawa: _2, iwanai: _2, kamifurano: _2, kamikawa: _2, kamishihoro: _2, kamisunagawa: _2, kamoenai: _2, kayabe: _2, kembuchi: _2, kikonai: _2, kimobetsu: _2, kitahiroshima: _2, kitami: _2, kiyosato: _2, koshimizu: _2, kunneppu: _2, kuriyama: _2, kuromatsunai: _2, kushiro: _2, kutchan: _2, kyowa: _2, mashike: _2, matsumae: _2, mikasa: _2, minamifurano: _2, mombetsu: _2, moseushi: _2, mukawa: _2, muroran: _2, naie: _2, nakagawa: _2, nakasatsunai: _2, nakatombetsu: _2, nanae: _2, nanporo: _2, nayoro: _2, nemuro: _2, niikappu: _2, niki: _2, nishiokoppe: _2, noboribetsu: _2, numata: _2, obihiro: _2, obira: _2, oketo: _2, okoppe: _2, otaru: _2, otobe: _2, otofuke: _2, otoineppu: _2, oumu: _2, ozora: _2, pippu: _2, rankoshi: _2, rebun: _2, rikubetsu: _2, rishiri: _2, rishirifuji: _2, saroma: _2, sarufutsu: _2, shakotan: _2, shari: _2, shibecha: _2, shibetsu: _2, shikabe: _2, shikaoi: _2, shimamaki: _2, shimizu: _2, shimokawa: _2, shinshinotsu: _2, shintoku: _2, shiranuka: _2, shiraoi: _2, shiriuchi: _2, sobetsu: _2, sunagawa: _2, taiki: _2, takasu: _2, takikawa: _2, takinoue: _2, teshikaga: _2, tobetsu: _2, tohma: _2, tomakomai: _2, tomari: _2, toya: _2, toyako: _2, toyotomi: _2, toyoura: _2, tsubetsu: _2, tsukigata: _2, urakawa: _2, urausu: _2, uryu: _2, utashinai: _2, wakkanai: _2, wassamu: _2, yakumo: _2, yoichi: _2 }], hyogo: [1, { aioi: _2, akashi: _2, ako: _2, amagasaki: _2, aogaki: _2, asago: _2, ashiya: _2, awaji: _2, fukusaki: _2, goshiki: _2, harima: _2, himeji: _2, ichikawa: _2, inagawa: _2, itami: _2, kakogawa: _2, kamigori: _2, kamikawa: _2, kasai: _2, kasuga: _2, kawanishi: _2, miki: _2, minamiawaji: _2, nishinomiya: _2, nishiwaki: _2, ono: _2, sanda: _2, sannan: _2, sasayama: _2, sayo: _2, shingu: _2, shinonsen: _2, shiso: _2, sumoto: _2, taishi: _2, taka: _2, takarazuka: _2, takasago: _2, takino: _2, tamba: _2, tatsuno: _2, toyooka: _2, yabu: _2, yashiro: _2, yoka: _2, yokawa: _2 }], ibaraki: [1, { ami: _2, asahi: _2, bando: _2, chikusei: _2, daigo: _2, fujishiro: _2, hitachi: _2, hitachinaka: _2, hitachiomiya: _2, hitachiota: _2, ibaraki: _2, ina: _2, inashiki: _2, itako: _2, iwama: _2, joso: _2, kamisu: _2, kasama: _2, kashima: _2, kasumigaura: _2, koga: _2, miho: _2, mito: _2, moriya: _2, naka: _2, namegata: _2, oarai: _2, ogawa: _2, omitama: _2, ryugasaki: _2, sakai: _2, sakuragawa: _2, shimodate: _2, shimotsuma: _2, shirosato: _2, sowa: _2, suifu: _2, takahagi: _2, tamatsukuri: _2, tokai: _2, tomobe: _2, tone: _2, toride: _2, tsuchiura: _2, tsukuba: _2, uchihara: _2, ushiku: _2, yachiyo: _2, yamagata: _2, yawara: _2, yuki: _2 }], ishikawa: [1, { anamizu: _2, hakui: _2, hakusan: _2, kaga: _2, kahoku: _2, kanazawa: _2, kawakita: _2, komatsu: _2, nakanoto: _2, nanao: _2, nomi: _2, nonoichi: _2, noto: _2, shika: _2, suzu: _2, tsubata: _2, tsurugi: _2, uchinada: _2, wajima: _2 }], iwate: [1, { fudai: _2, fujisawa: _2, hanamaki: _2, hiraizumi: _2, hirono: _2, ichinohe: _2, ichinoseki: _2, iwaizumi: _2, iwate: _2, joboji: _2, kamaishi: _2, kanegasaki: _2, karumai: _2, kawai: _2, kitakami: _2, kuji: _2, kunohe: _2, kuzumaki: _2, miyako: _2, mizusawa: _2, morioka: _2, ninohe: _2, noda: _2, ofunato: _2, oshu: _2, otsuchi: _2, rikuzentakata: _2, shiwa: _2, shizukuishi: _2, sumita: _2, tanohata: _2, tono: _2, yahaba: _2, yamada: _2 }], kagawa: [1, { ayagawa: _2, higashikagawa: _2, kanonji: _2, kotohira: _2, manno: _2, marugame: _2, mitoyo: _2, naoshima: _2, sanuki: _2, tadotsu: _2, takamatsu: _2, tonosho: _2, uchinomi: _2, utazu: _2, zentsuji: _2 }], kagoshima: [1, { akune: _2, amami: _2, hioki: _2, isa: _2, isen: _2, izumi: _2, kagoshima: _2, kanoya: _2, kawanabe: _2, kinko: _2, kouyama: _2, makurazaki: _2, matsumoto: _2, minamitane: _2, nakatane: _2, nishinoomote: _2, satsumasendai: _2, soo: _2, tarumizu: _2, yusui: _2 }], kanagawa: [1, { aikawa: _2, atsugi: _2, ayase: _2, chigasaki: _2, ebina: _2, fujisawa: _2, hadano: _2, hakone: _2, hiratsuka: _2, isehara: _2, kaisei: _2, kamakura: _2, kiyokawa: _2, matsuda: _2, minamiashigara: _2, miura: _2, nakai: _2, ninomiya: _2, odawara: _2, oi: _2, oiso: _2, sagamihara: _2, samukawa: _2, tsukui: _2, yamakita: _2, yamato: _2, yokosuka: _2, yugawara: _2, zama: _2, zushi: _2 }], kochi: [1, { aki: _2, geisei: _2, hidaka: _2, higashitsuno: _2, ino: _2, kagami: _2, kami: _2, kitagawa: _2, kochi: _2, mihara: _2, motoyama: _2, muroto: _2, nahari: _2, nakamura: _2, nankoku: _2, nishitosa: _2, niyodogawa: _2, ochi: _2, okawa: _2, otoyo: _2, otsuki: _2, sakawa: _2, sukumo: _2, susaki: _2, tosa: _2, tosashimizu: _2, toyo: _2, tsuno: _2, umaji: _2, yasuda: _2, yusuhara: _2 }], kumamoto: [1, { amakusa: _2, arao: _2, aso: _2, choyo: _2, gyokuto: _2, kamiamakusa: _2, kikuchi: _2, kumamoto: _2, mashiki: _2, mifune: _2, minamata: _2, minamioguni: _2, nagasu: _2, nishihara: _2, oguni: _2, ozu: _2, sumoto: _2, takamori: _2, uki: _2, uto: _2, yamaga: _2, yamato: _2, yatsushiro: _2 }], kyoto: [1, { ayabe: _2, fukuchiyama: _2, higashiyama: _2, ide: _2, ine: _2, joyo: _2, kameoka: _2, kamo: _2, kita: _2, kizu: _2, kumiyama: _2, kyotamba: _2, kyotanabe: _2, kyotango: _2, maizuru: _2, minami: _2, minamiyamashiro: _2, miyazu: _2, muko: _2, nagaokakyo: _2, nakagyo: _2, nantan: _2, oyamazaki: _2, sakyo: _2, seika: _2, tanabe: _2, uji: _2, ujitawara: _2, wazuka: _2, yamashina: _2, yawata: _2 }], mie: [1, { asahi: _2, inabe: _2, ise: _2, kameyama: _2, kawagoe: _2, kiho: _2, kisosaki: _2, kiwa: _2, komono: _2, kumano: _2, kuwana: _2, matsusaka: _2, meiwa: _2, mihama: _2, minamiise: _2, misugi: _2, miyama: _2, nabari: _2, shima: _2, suzuka: _2, tado: _2, taiki: _2, taki: _2, tamaki: _2, toba: _2, tsu: _2, udono: _2, ureshino: _2, watarai: _2, yokkaichi: _2 }], miyagi: [1, { furukawa: _2, higashimatsushima: _2, ishinomaki: _2, iwanuma: _2, kakuda: _2, kami: _2, kawasaki: _2, marumori: _2, matsushima: _2, minamisanriku: _2, misato: _2, murata: _2, natori: _2, ogawara: _2, ohira: _2, onagawa: _2, osaki: _2, rifu: _2, semine: _2, shibata: _2, shichikashuku: _2, shikama: _2, shiogama: _2, shiroishi: _2, tagajo: _2, taiwa: _2, tome: _2, tomiya: _2, wakuya: _2, watari: _2, yamamoto: _2, zao: _2 }], miyazaki: [1, { aya: _2, ebino: _2, gokase: _2, hyuga: _2, kadogawa: _2, kawaminami: _2, kijo: _2, kitagawa: _2, kitakata: _2, kitaura: _2, kobayashi: _2, kunitomi: _2, kushima: _2, mimata: _2, miyakonojo: _2, miyazaki: _2, morotsuka: _2, nichinan: _2, nishimera: _2, nobeoka: _2, saito: _2, shiiba: _2, shintomi: _2, takaharu: _2, takanabe: _2, takazaki: _2, tsuno: _2 }], nagano: [1, { achi: _2, agematsu: _2, anan: _2, aoki: _2, asahi: _2, azumino: _2, chikuhoku: _2, chikuma: _2, chino: _2, fujimi: _2, hakuba: _2, hara: _2, hiraya: _2, iida: _2, iijima: _2, iiyama: _2, iizuna: _2, ikeda: _2, ikusaka: _2, ina: _2, karuizawa: _2, kawakami: _2, kiso: _2, kisofukushima: _2, kitaaiki: _2, komagane: _2, komoro: _2, matsukawa: _2, matsumoto: _2, miasa: _2, minamiaiki: _2, minamimaki: _2, minamiminowa: _2, minowa: _2, miyada: _2, miyota: _2, mochizuki: _2, nagano: _2, nagawa: _2, nagiso: _2, nakagawa: _2, nakano: _2, nozawaonsen: _2, obuse: _2, ogawa: _2, okaya: _2, omachi: _2, omi: _2, ookuwa: _2, ooshika: _2, otaki: _2, otari: _2, sakae: _2, sakaki: _2, saku: _2, sakuho: _2, shimosuwa: _2, shinanomachi: _2, shiojiri: _2, suwa: _2, suzaka: _2, takagi: _2, takamori: _2, takayama: _2, tateshina: _2, tatsuno: _2, togakushi: _2, togura: _2, tomi: _2, ueda: _2, wada: _2, yamagata: _2, yamanouchi: _2, yasaka: _2, yasuoka: _2 }], nagasaki: [1, { chijiwa: _2, futsu: _2, goto: _2, hasami: _2, hirado: _2, iki: _2, isahaya: _2, kawatana: _2, kuchinotsu: _2, matsuura: _2, nagasaki: _2, obama: _2, omura: _2, oseto: _2, saikai: _2, sasebo: _2, seihi: _2, shimabara: _2, shinkamigoto: _2, togitsu: _2, tsushima: _2, unzen: _2 }], nara: [1, { ando: _2, gose: _2, heguri: _2, higashiyoshino: _2, ikaruga: _2, ikoma: _2, kamikitayama: _2, kanmaki: _2, kashiba: _2, kashihara: _2, katsuragi: _2, kawai: _2, kawakami: _2, kawanishi: _2, koryo: _2, kurotaki: _2, mitsue: _2, miyake: _2, nara: _2, nosegawa: _2, oji: _2, ouda: _2, oyodo: _2, sakurai: _2, sango: _2, shimoichi: _2, shimokitayama: _2, shinjo: _2, soni: _2, takatori: _2, tawaramoto: _2, tenkawa: _2, tenri: _2, uda: _2, yamatokoriyama: _2, yamatotakada: _2, yamazoe: _2, yoshino: _2 }], niigata: [1, { aga: _2, agano: _2, gosen: _2, itoigawa: _2, izumozaki: _2, joetsu: _2, kamo: _2, kariwa: _2, kashiwazaki: _2, minamiuonuma: _2, mitsuke: _2, muika: _2, murakami: _2, myoko: _2, nagaoka: _2, niigata: _2, ojiya: _2, omi: _2, sado: _2, sanjo: _2, seiro: _2, seirou: _2, sekikawa: _2, shibata: _2, tagami: _2, tainai: _2, tochio: _2, tokamachi: _2, tsubame: _2, tsunan: _2, uonuma: _2, yahiko: _2, yoita: _2, yuzawa: _2 }], oita: [1, { beppu: _2, bungoono: _2, bungotakada: _2, hasama: _2, hiji: _2, himeshima: _2, hita: _2, kamitsue: _2, kokonoe: _2, kuju: _2, kunisaki: _2, kusu: _2, oita: _2, saiki: _2, taketa: _2, tsukumi: _2, usa: _2, usuki: _2, yufu: _2 }], okayama: [1, { akaiwa: _2, asakuchi: _2, bizen: _2, hayashima: _2, ibara: _2, kagamino: _2, kasaoka: _2, kibichuo: _2, kumenan: _2, kurashiki: _2, maniwa: _2, misaki: _2, nagi: _2, niimi: _2, nishiawakura: _2, okayama: _2, satosho: _2, setouchi: _2, shinjo: _2, shoo: _2, soja: _2, takahashi: _2, tamano: _2, tsuyama: _2, wake: _2, yakage: _2 }], okinawa: [1, { aguni: _2, ginowan: _2, ginoza: _2, gushikami: _2, haebaru: _2, higashi: _2, hirara: _2, iheya: _2, ishigaki: _2, ishikawa: _2, itoman: _2, izena: _2, kadena: _2, kin: _2, kitadaito: _2, kitanakagusuku: _2, kumejima: _2, kunigami: _2, minamidaito: _2, motobu: _2, nago: _2, naha: _2, nakagusuku: _2, nakijin: _2, nanjo: _2, nishihara: _2, ogimi: _2, okinawa: _2, onna: _2, shimoji: _2, taketomi: _2, tarama: _2, tokashiki: _2, tomigusuku: _2, tonaki: _2, urasoe: _2, uruma: _2, yaese: _2, yomitan: _2, yonabaru: _2, yonaguni: _2, zamami: _2 }], osaka: [1, { abeno: _2, chihayaakasaka: _2, chuo: _2, daito: _2, fujiidera: _2, habikino: _2, hannan: _2, higashiosaka: _2, higashisumiyoshi: _2, higashiyodogawa: _2, hirakata: _2, ibaraki: _2, ikeda: _2, izumi: _2, izumiotsu: _2, izumisano: _2, kadoma: _2, kaizuka: _2, kanan: _2, kashiwara: _2, katano: _2, kawachinagano: _2, kishiwada: _2, kita: _2, kumatori: _2, matsubara: _2, minato: _2, minoh: _2, misaki: _2, moriguchi: _2, neyagawa: _2, nishi: _2, nose: _2, osakasayama: _2, sakai: _2, sayama: _2, sennan: _2, settsu: _2, shijonawate: _2, shimamoto: _2, suita: _2, tadaoka: _2, taishi: _2, tajiri: _2, takaishi: _2, takatsuki: _2, tondabayashi: _2, toyonaka: _2, toyono: _2, yao: _2 }], saga: [1, { ariake: _2, arita: _2, fukudomi: _2, genkai: _2, hamatama: _2, hizen: _2, imari: _2, kamimine: _2, kanzaki: _2, karatsu: _2, kashima: _2, kitagata: _2, kitahata: _2, kiyama: _2, kouhoku: _2, kyuragi: _2, nishiarita: _2, ogi: _2, omachi: _2, ouchi: _2, saga: _2, shiroishi: _2, taku: _2, tara: _2, tosu: _2, yoshinogari: _2 }], saitama: [1, { arakawa: _2, asaka: _2, chichibu: _2, fujimi: _2, fujimino: _2, fukaya: _2, hanno: _2, hanyu: _2, hasuda: _2, hatogaya: _2, hatoyama: _2, hidaka: _2, higashichichibu: _2, higashimatsuyama: _2, honjo: _2, ina: _2, iruma: _2, iwatsuki: _2, kamiizumi: _2, kamikawa: _2, kamisato: _2, kasukabe: _2, kawagoe: _2, kawaguchi: _2, kawajima: _2, kazo: _2, kitamoto: _2, koshigaya: _2, kounosu: _2, kuki: _2, kumagaya: _2, matsubushi: _2, minano: _2, misato: _2, miyashiro: _2, miyoshi: _2, moroyama: _2, nagatoro: _2, namegawa: _2, niiza: _2, ogano: _2, ogawa: _2, ogose: _2, okegawa: _2, omiya: _2, otaki: _2, ranzan: _2, ryokami: _2, saitama: _2, sakado: _2, satte: _2, sayama: _2, shiki: _2, shiraoka: _2, soka: _2, sugito: _2, toda: _2, tokigawa: _2, tokorozawa: _2, tsurugashima: _2, urawa: _2, warabi: _2, yashio: _2, yokoze: _2, yono: _2, yorii: _2, yoshida: _2, yoshikawa: _2, yoshimi: _2 }], shiga: [1, { aisho: _2, gamo: _2, higashiomi: _2, hikone: _2, koka: _2, konan: _2, kosei: _2, koto: _2, kusatsu: _2, maibara: _2, moriyama: _2, nagahama: _2, nishiazai: _2, notogawa: _2, omihachiman: _2, otsu: _2, ritto: _2, ryuoh: _2, takashima: _2, takatsuki: _2, torahime: _2, toyosato: _2, yasu: _2 }], shimane: [1, { akagi: _2, ama: _2, gotsu: _2, hamada: _2, higashiizumo: _2, hikawa: _2, hikimi: _2, izumo: _2, kakinoki: _2, masuda: _2, matsue: _2, misato: _2, nishinoshima: _2, ohda: _2, okinoshima: _2, okuizumo: _2, shimane: _2, tamayu: _2, tsuwano: _2, unnan: _2, yakumo: _2, yasugi: _2, yatsuka: _2 }], shizuoka: [1, { arai: _2, atami: _2, fuji: _2, fujieda: _2, fujikawa: _2, fujinomiya: _2, fukuroi: _2, gotemba: _2, haibara: _2, hamamatsu: _2, higashiizu: _2, ito: _2, iwata: _2, izu: _2, izunokuni: _2, kakegawa: _2, kannami: _2, kawanehon: _2, kawazu: _2, kikugawa: _2, kosai: _2, makinohara: _2, matsuzaki: _2, minamiizu: _2, mishima: _2, morimachi: _2, nishiizu: _2, numazu: _2, omaezaki: _2, shimada: _2, shimizu: _2, shimoda: _2, shizuoka: _2, susono: _2, yaizu: _2, yoshida: _2 }], tochigi: [1, { ashikaga: _2, bato: _2, haga: _2, ichikai: _2, iwafune: _2, kaminokawa: _2, kanuma: _2, karasuyama: _2, kuroiso: _2, mashiko: _2, mibu: _2, moka: _2, motegi: _2, nasu: _2, nasushiobara: _2, nikko: _2, nishikata: _2, nogi: _2, ohira: _2, ohtawara: _2, oyama: _2, sakura: _2, sano: _2, shimotsuke: _2, shioya: _2, takanezawa: _2, tochigi: _2, tsuga: _2, ujiie: _2, utsunomiya: _2, yaita: _2 }], tokushima: [1, { aizumi: _2, anan: _2, ichiba: _2, itano: _2, kainan: _2, komatsushima: _2, matsushige: _2, mima: _2, minami: _2, miyoshi: _2, mugi: _2, nakagawa: _2, naruto: _2, sanagochi: _2, shishikui: _2, tokushima: _2, wajiki: _2 }], tokyo: [1, { adachi: _2, akiruno: _2, akishima: _2, aogashima: _2, arakawa: _2, bunkyo: _2, chiyoda: _2, chofu: _2, chuo: _2, edogawa: _2, fuchu: _2, fussa: _2, hachijo: _2, hachioji: _2, hamura: _2, higashikurume: _2, higashimurayama: _2, higashiyamato: _2, hino: _2, hinode: _2, hinohara: _2, inagi: _2, itabashi: _2, katsushika: _2, kita: _2, kiyose: _2, kodaira: _2, koganei: _2, kokubunji: _2, komae: _2, koto: _2, kouzushima: _2, kunitachi: _2, machida: _2, meguro: _2, minato: _2, mitaka: _2, mizuho: _2, musashimurayama: _2, musashino: _2, nakano: _2, nerima: _2, ogasawara: _2, okutama: _2, ome: _2, oshima: _2, ota: _2, setagaya: _2, shibuya: _2, shinagawa: _2, shinjuku: _2, suginami: _2, sumida: _2, tachikawa: _2, taito: _2, tama: _2, toshima: _2 }], tottori: [1, { chizu: _2, hino: _2, kawahara: _2, koge: _2, kotoura: _2, misasa: _2, nanbu: _2, nichinan: _2, sakaiminato: _2, tottori: _2, wakasa: _2, yazu: _2, yonago: _2 }], toyama: [1, { asahi: _2, fuchu: _2, fukumitsu: _2, funahashi: _2, himi: _2, imizu: _2, inami: _2, johana: _2, kamiichi: _2, kurobe: _2, nakaniikawa: _2, namerikawa: _2, nanto: _2, nyuzen: _2, oyabe: _2, taira: _2, takaoka: _2, tateyama: _2, toga: _2, tonami: _2, toyama: _2, unazuki: _2, uozu: _2, yamada: _2 }], wakayama: [1, { arida: _2, aridagawa: _2, gobo: _2, hashimoto: _2, hidaka: _2, hirogawa: _2, inami: _2, iwade: _2, kainan: _2, kamitonda: _2, katsuragi: _2, kimino: _2, kinokawa: _2, kitayama: _2, koya: _2, koza: _2, kozagawa: _2, kudoyama: _2, kushimoto: _2, mihama: _2, misato: _2, nachikatsuura: _2, shingu: _2, shirahama: _2, taiji: _2, tanabe: _2, wakayama: _2, yuasa: _2, yura: _2 }], yamagata: [1, { asahi: _2, funagata: _2, higashine: _2, iide: _2, kahoku: _2, kaminoyama: _2, kaneyama: _2, kawanishi: _2, mamurogawa: _2, mikawa: _2, murayama: _2, nagai: _2, nakayama: _2, nanyo: _2, nishikawa: _2, obanazawa: _2, oe: _2, oguni: _2, ohkura: _2, oishida: _2, sagae: _2, sakata: _2, sakegawa: _2, shinjo: _2, shirataka: _2, shonai: _2, takahata: _2, tendo: _2, tozawa: _2, tsuruoka: _2, yamagata: _2, yamanobe: _2, yonezawa: _2, yuza: _2 }], yamaguchi: [1, { abu: _2, hagi: _2, hikari: _2, hofu: _2, iwakuni: _2, kudamatsu: _2, mitou: _2, nagato: _2, oshima: _2, shimonoseki: _2, shunan: _2, tabuse: _2, tokuyama: _2, toyota: _2, ube: _2, yuu: _2 }], yamanashi: [1, { chuo: _2, doshi: _2, fuefuki: _2, fujikawa: _2, fujikawaguchiko: _2, fujiyoshida: _2, hayakawa: _2, hokuto: _2, ichikawamisato: _2, kai: _2, kofu: _2, koshu: _2, kosuge: _2, "minami-alps": _2, minobu: _2, nakamichi: _2, nanbu: _2, narusawa: _2, nirasaki: _2, nishikatsura: _2, oshino: _2, otsuki: _2, showa: _2, tabayama: _2, tsuru: _2, uenohara: _2, yamanakako: _2, yamanashi: _2 }], "xn--ehqz56n": _2, "\u4E09\u91CD": _2, "xn--1lqs03n": _2, "\u4EAC\u90FD": _2, "xn--qqqt11m": _2, "\u4F50\u8CC0": _2, "xn--f6qx53a": _2, "\u5175\u5EAB": _2, "xn--djrs72d6uy": _2, "\u5317\u6D77\u9053": _2, "xn--mkru45i": _2, "\u5343\u8449": _2, "xn--0trq7p7nn": _2, "\u548C\u6B4C\u5C71": _2, "xn--5js045d": _2, "\u57FC\u7389": _2, "xn--kbrq7o": _2, "\u5927\u5206": _2, "xn--pssu33l": _2, "\u5927\u962A": _2, "xn--ntsq17g": _2, "\u5948\u826F": _2, "xn--uisz3g": _2, "\u5BAE\u57CE": _2, "xn--6btw5a": _2, "\u5BAE\u5D0E": _2, "xn--1ctwo": _2, "\u5BCC\u5C71": _2, "xn--6orx2r": _2, "\u5C71\u53E3": _2, "xn--rht61e": _2, "\u5C71\u5F62": _2, "xn--rht27z": _2, "\u5C71\u68A8": _2, "xn--nit225k": _2, "\u5C90\u961C": _2, "xn--rht3d": _2, "\u5CA1\u5C71": _2, "xn--djty4k": _2, "\u5CA9\u624B": _2, "xn--klty5x": _2, "\u5CF6\u6839": _2, "xn--kltx9a": _2, "\u5E83\u5CF6": _2, "xn--kltp7d": _2, "\u5FB3\u5CF6": _2, "xn--c3s14m": _2, "\u611B\u5A9B": _2, "xn--vgu402c": _2, "\u611B\u77E5": _2, "xn--efvn9s": _2, "\u65B0\u6F5F": _2, "xn--1lqs71d": _2, "\u6771\u4EAC": _2, "xn--4pvxs": _2, "\u6803\u6728": _2, "xn--uuwu58a": _2, "\u6C96\u7E04": _2, "xn--zbx025d": _2, "\u6ECB\u8CC0": _2, "xn--8pvr4u": _2, "\u718A\u672C": _2, "xn--5rtp49c": _2, "\u77F3\u5DDD": _2, "xn--ntso0iqx3a": _2, "\u795E\u5948\u5DDD": _2, "xn--elqq16h": _2, "\u798F\u4E95": _2, "xn--4it168d": _2, "\u798F\u5CA1": _2, "xn--klt787d": _2, "\u798F\u5CF6": _2, "xn--rny31h": _2, "\u79CB\u7530": _2, "xn--7t0a264c": _2, "\u7FA4\u99AC": _2, "xn--uist22h": _2, "\u8328\u57CE": _2, "xn--8ltr62k": _2, "\u9577\u5D0E": _2, "xn--2m4a15e": _2, "\u9577\u91CE": _2, "xn--32vp30h": _2, "\u9752\u68EE": _2, "xn--4it797k": _2, "\u9759\u5CA1": _2, "xn--5rtq34k": _2, "\u9999\u5DDD": _2, "xn--k7yn95e": _2, "\u9AD8\u77E5": _2, "xn--tor131o": _2, "\u9CE5\u53D6": _2, "xn--d5qv7z876c": _2, "\u9E7F\u5150\u5CF6": _2, kawasaki: _21, kitakyushu: _21, kobe: _21, nagoya: _21, sapporo: _21, sendai: _21, yokohama: _21, buyshop: _3, fashionstore: _3, handcrafted: _3, kawaiishop: _3, supersale: _3, theshop: _3, "0am": _3, "0g0": _3, "0j0": _3, "0t0": _3, mydns: _3, pgw: _3, wjg: _3, usercontent: _3, angry: _3, babyblue: _3, babymilk: _3, backdrop: _3, bambina: _3, bitter: _3, blush: _3, boo: _3, boy: _3, boyfriend: _3, but: _3, candypop: _3, capoo: _3, catfood: _3, cheap: _3, chicappa: _3, chillout: _3, chips: _3, chowder: _3, chu: _3, ciao: _3, cocotte: _3, coolblog: _3, cranky: _3, cutegirl: _3, daa: _3, deca: _3, deci: _3, digick: _3, egoism: _3, fakefur: _3, fem: _3, flier: _3, floppy: _3, fool: _3, frenchkiss: _3, girlfriend: _3, girly: _3, gloomy: _3, gonna: _3, greater: _3, hacca: _3, heavy: _3, her: _3, hiho: _3, hippy: _3, holy: _3, hungry: _3, icurus: _3, itigo: _3, jellybean: _3, kikirara: _3, kill: _3, kilo: _3, kuron: _3, littlestar: _3, lolipopmc: _3, lolitapunk: _3, lomo: _3, lovepop: _3, lovesick: _3, main: _3, mods: _3, mond: _3, mongolian: _3, moo: _3, namaste: _3, nikita: _3, nobushi: _3, noor: _3, oops: _3, parallel: _3, parasite: _3, pecori: _3, peewee: _3, penne: _3, pepper: _3, perma: _3, pigboat: _3, pinoko: _3, punyu: _3, pupu: _3, pussycat: _3, pya: _3, raindrop: _3, readymade: _3, sadist: _3, schoolbus: _3, secret: _3, staba: _3, stripper: _3, sub: _3, sunnyday: _3, thick: _3, tonkotsu: _3, under: _3, upper: _3, velvet: _3, verse: _3, versus: _3, vivian: _3, watson: _3, weblike: _3, whitesnow: _3, zombie: _3, hateblo: _3, hatenablog: _3, hatenadiary: _3, "2-d": _3, bona: _3, crap: _3, daynight: _3, eek: _3, flop: _3, halfmoon: _3, jeez: _3, matrix: _3, mimoza: _3, netgamers: _3, nyanta: _3, o0o0: _3, rdy: _3, rgr: _3, rulez: _3, sakurastorage: [0, { isk01: _60, isk02: _60 }], saloon: _3, sblo: _3, skr: _3, tank: _3, "uh-oh": _3, undo: _3, webaccel: [0, { rs: _3, user: _3 }], websozai: _3, xii: _3 }], ke: [1, { ac: _2, co: _2, go: _2, info: _2, me: _2, mobi: _2, ne: _2, or: _2, sc: _2 }], kg: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, us: _3, xx: _3, ae: _3 }], kh: _4, ki: _61, km: [1, { ass: _2, com: _2, edu: _2, gov: _2, mil: _2, nom: _2, org: _2, prd: _2, tm: _2, asso: _2, coop: _2, gouv: _2, medecin: _2, notaires: _2, pharmaciens: _2, presse: _2, veterinaire: _2 }], kn: [1, { edu: _2, gov: _2, net: _2, org: _2 }], kp: [1, { com: _2, edu: _2, gov: _2, org: _2, rep: _2, tra: _2 }], kr: [1, { ac: _2, ai: _2, co: _2, es: _2, go: _2, hs: _2, io: _2, it: _2, kg: _2, me: _2, mil: _2, ms: _2, ne: _2, or: _2, pe: _2, re: _2, sc: _2, busan: _2, chungbuk: _2, chungnam: _2, daegu: _2, daejeon: _2, gangwon: _2, gwangju: _2, gyeongbuk: _2, gyeonggi: _2, gyeongnam: _2, incheon: _2, jeju: _2, jeonbuk: _2, jeonnam: _2, seoul: _2, ulsan: _2, c01: _3, "eliv-api": _3, "eliv-cdn": _3, "eliv-dns": _3, mmv: _3, vki: _3 }], kw: [1, { com: _2, edu: _2, emb: _2, gov: _2, ind: _2, net: _2, org: _2 }], ky: _48, kz: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, jcloud: _3 }], la: [1, { com: _2, edu: _2, gov: _2, info: _2, int: _2, net: _2, org: _2, per: _2, bnr: _3 }], lb: _4, lc: [1, { co: _2, com: _2, edu: _2, gov: _2, net: _2, org: _2, oy: _3 }], li: _2, lk: [1, { ac: _2, assn: _2, com: _2, edu: _2, gov: _2, grp: _2, hotel: _2, int: _2, ltd: _2, net: _2, ngo: _2, org: _2, sch: _2, soc: _2, web: _2 }], lr: _4, ls: [1, { ac: _2, biz: _2, co: _2, edu: _2, gov: _2, info: _2, net: _2, org: _2, sc: _2 }], lt: _10, lu: [1, { "123website": _3 }], lv: [1, { asn: _2, com: _2, conf: _2, edu: _2, gov: _2, id: _2, mil: _2, net: _2, org: _2 }], ly: [1, { com: _2, edu: _2, gov: _2, id: _2, med: _2, net: _2, org: _2, plc: _2, sch: _2 }], ma: [1, { ac: _2, co: _2, gov: _2, net: _2, org: _2, press: _2 }], mc: [1, { asso: _2, tm: _2 }], md: [1, { ir: _3 }], me: [1, { ac: _2, co: _2, edu: _2, gov: _2, its: _2, net: _2, org: _2, priv: _2, c66: _3, craft: _3, edgestack: _3, mybox: _3, filegear: _3, "filegear-sg": _3, lohmus: _3, barsy: _3, mcdir: _3, brasilia: _3, ddns: _3, dnsfor: _3, hopto: _3, loginto: _3, noip: _3, webhop: _3, soundcast: _3, tcp4: _3, vp4: _3, diskstation: _3, dscloud: _3, i234: _3, myds: _3, synology: _3, transip: _47, nohost: _3 }], mg: [1, { co: _2, com: _2, edu: _2, gov: _2, mil: _2, nom: _2, org: _2, prd: _2 }], mh: _2, mil: _2, mk: [1, { com: _2, edu: _2, gov: _2, inf: _2, name: _2, net: _2, org: _2 }], ml: [1, { ac: _2, art: _2, asso: _2, com: _2, edu: _2, gouv: _2, gov: _2, info: _2, inst: _2, net: _2, org: _2, pr: _2, presse: _2 }], mm: _21, mn: [1, { edu: _2, gov: _2, org: _2, nyc: _3 }], mo: _4, mobi: [1, { barsy: _3, dscloud: _3 }], mp: [1, { ju: _3 }], mq: _2, mr: _10, ms: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, minisite: _3 }], mt: _48, mu: [1, { ac: _2, co: _2, com: _2, gov: _2, net: _2, or: _2, org: _2 }], museum: _2, mv: [1, { aero: _2, biz: _2, com: _2, coop: _2, edu: _2, gov: _2, info: _2, int: _2, mil: _2, museum: _2, name: _2, net: _2, org: _2, pro: _2 }], mw: [1, { ac: _2, biz: _2, co: _2, com: _2, coop: _2, edu: _2, gov: _2, int: _2, net: _2, org: _2 }], mx: [1, { com: _2, edu: _2, gob: _2, net: _2, org: _2 }], my: [1, { biz: _2, com: _2, edu: _2, gov: _2, mil: _2, name: _2, net: _2, org: _2 }], mz: [1, { ac: _2, adv: _2, co: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2 }], na: [1, { alt: _2, co: _2, com: _2, gov: _2, net: _2, org: _2 }], name: [1, { her: _64, his: _64, ispmanager: _3, keenetic: _3 }], nc: [1, { asso: _2, nom: _2 }], ne: _2, net: [1, { adobeaemcloud: _3, "adobeio-static": _3, adobeioruntime: _3, akadns: _3, akamai: _3, "akamai-staging": _3, akamaiedge: _3, "akamaiedge-staging": _3, akamaihd: _3, "akamaihd-staging": _3, akamaiorigin: _3, "akamaiorigin-staging": _3, akamaized: _3, "akamaized-staging": _3, edgekey: _3, "edgekey-staging": _3, edgesuite: _3, "edgesuite-staging": _3, alwaysdata: _3, myamaze: _3, cloudfront: _3, appudo: _3, "atlassian-dev": [0, { prod: _56 }], myfritz: _3, shopselect: _3, blackbaudcdn: _3, boomla: _3, bplaced: _3, square7: _3, cdn77: [0, { r: _3 }], "cdn77-ssl": _3, gb: _3, hu: _3, jp: _3, se: _3, uk: _3, clickrising: _3, "ddns-ip": _3, "dns-cloud": _3, "dns-dynamic": _3, cloudaccess: _3, cloudflare: [2, { cdn: _3 }], cloudflareanycast: _56, cloudflarecn: _56, cloudflareglobal: _56, ctfcloud: _3, "feste-ip": _3, "knx-server": _3, "static-access": _3, cryptonomic: _6, dattolocal: _3, mydatto: _3, debian: _3, definima: _3, deno: [2, { sandbox: _3 }], icp: _6, de5: _3, "at-band-camp": _3, blogdns: _3, "broke-it": _3, buyshouses: _3, dnsalias: _3, dnsdojo: _3, "does-it": _3, dontexist: _3, dynalias: _3, dynathome: _3, endofinternet: _3, "from-az": _3, "from-co": _3, "from-la": _3, "from-ny": _3, "gets-it": _3, "ham-radio-op": _3, homeftp: _3, homeip: _3, homelinux: _3, homeunix: _3, "in-the-band": _3, "is-a-chef": _3, "is-a-geek": _3, "isa-geek": _3, "kicks-ass": _3, "office-on-the": _3, podzone: _3, "scrapper-site": _3, selfip: _3, "sells-it": _3, servebbs: _3, serveftp: _3, thruhere: _3, webhop: _3, casacam: _3, dynu: _3, dynuddns: _3, mysynology: _3, opik: _3, spryt: _3, dynv6: _3, twmail: _3, ru: _3, channelsdvr: [2, { u: _3 }], fastly: [0, { freetls: _3, map: _3, prod: [0, { a: _3, global: _3 }], ssl: [0, { a: _3, b: _3, global: _3 }] }], fastlylb: [2, { map: _3 }], "keyword-on": _3, "live-on": _3, "server-on": _3, "cdn-edges": _3, heteml: _3, cloudfunctions: _3, "grafana-dev": _3, iobb: _3, moonscale: _3, "in-dsl": _3, "in-vpn": _3, oninferno: _3, botdash: _3, "apps-1and1": _3, ipifony: _3, cloudjiffy: [2, { "fra1-de": _3, "west1-us": _3 }], elastx: [0, { "jls-sto1": _3, "jls-sto2": _3, "jls-sto3": _3 }], massivegrid: [0, { paas: [0, { "fr-1": _3, "lon-1": _3, "lon-2": _3, "ny-1": _3, "ny-2": _3, "sg-1": _3 }] }], saveincloud: [0, { jelastic: _3, "nordeste-idc": _3 }], scaleforce: _49, kinghost: _3, uni5: _3, krellian: _3, ggff: _3, localto: _6, barsy: _3, luyani: _3, memset: _3, "azure-api": _3, "azure-mobile": _3, azureedge: _3, azurefd: _3, azurestaticapps: [2, { "1": _3, "2": _3, "3": _3, "4": _3, "5": _3, "6": _3, "7": _3, centralus: _3, eastasia: _3, eastus2: _3, westeurope: _3, westus2: _3 }], azurewebsites: _3, cloudapp: _3, trafficmanager: _3, usgovcloudapi: _66, usgovcloudapp: _3, usgovtrafficmanager: _3, windows: _66, mynetname: [0, { sn: _3 }], routingthecloud: _3, bounceme: _3, ddns: _3, "eating-organic": _3, mydissent: _3, myeffect: _3, mymediapc: _3, mypsx: _3, mysecuritycamera: _3, nhlfan: _3, "no-ip": _3, pgafan: _3, privatizehealthinsurance: _3, redirectme: _3, serveblog: _3, serveminecraft: _3, sytes: _3, dnsup: _3, hicam: _3, "now-dns": _3, ownip: _3, vpndns: _3, cloudycluster: _3, ovh: [0, { hosting: _6, webpaas: _6 }], rackmaze: _3, myradweb: _3, in: _3, "subsc-pay": _3, squares: _3, schokokeks: _3, "firewall-gateway": _3, seidat: _3, senseering: _3, siteleaf: _3, mafelo: _3, myspreadshop: _3, "vps-host": [2, { jelastic: [0, { atl: _3, njs: _3, ric: _3 }] }], srcf: [0, { soc: _3, user: _3 }], supabase: _3, dsmynas: _3, familyds: _3, ts: [2, { c: _6 }], torproject: [2, { pages: _3 }], tunnelmole: _3, vusercontent: _3, "reserve-online": _3, localcert: _3, "community-pro": _3, meinforum: _3, yandexcloud: [2, { storage: _3, website: _3 }], za: _3, zabc: _3 }], nf: [1, { arts: _2, com: _2, firm: _2, info: _2, net: _2, other: _2, per: _2, rec: _2, store: _2, web: _2 }], ng: [1, { com: _2, edu: _2, gov: _2, i: _2, mil: _2, mobi: _2, name: _2, net: _2, org: _2, sch: _2, biz: [2, { co: _3, dl: _3, go: _3, lg: _3, on: _3 }], col: _3, firm: _3, gen: _3, ltd: _3, ngo: _3, plc: _3 }], ni: [1, { ac: _2, biz: _2, co: _2, com: _2, edu: _2, gob: _2, in: _2, info: _2, int: _2, mil: _2, net: _2, nom: _2, org: _2, web: _2 }], nl: [1, { co: _3, "hosting-cluster": _3, gov: _3, khplay: _3, "123website": _3, myspreadshop: _3, transurl: _6, cistron: _3, demon: _3 }], no: [1, { fhs: _2, folkebibl: _2, fylkesbibl: _2, idrett: _2, museum: _2, priv: _2, vgs: _2, dep: _2, herad: _2, kommune: _2, mil: _2, stat: _2, aa: _67, ah: _67, bu: _67, fm: _67, hl: _67, hm: _67, "jan-mayen": _67, mr: _67, nl: _67, nt: _67, of: _67, ol: _67, oslo: _67, rl: _67, sf: _67, st: _67, svalbard: _67, tm: _67, tr: _67, va: _67, vf: _67, akrehamn: _2, "xn--krehamn-dxa": _2, "\xE5krehamn": _2, algard: _2, "xn--lgrd-poac": _2, "\xE5lg\xE5rd": _2, arna: _2, bronnoysund: _2, "xn--brnnysund-m8ac": _2, "br\xF8nn\xF8ysund": _2, brumunddal: _2, bryne: _2, drobak: _2, "xn--drbak-wua": _2, "dr\xF8bak": _2, egersund: _2, fetsund: _2, floro: _2, "xn--flor-jra": _2, "flor\xF8": _2, fredrikstad: _2, hokksund: _2, honefoss: _2, "xn--hnefoss-q1a": _2, "h\xF8nefoss": _2, jessheim: _2, jorpeland: _2, "xn--jrpeland-54a": _2, "j\xF8rpeland": _2, kirkenes: _2, kopervik: _2, krokstadelva: _2, langevag: _2, "xn--langevg-jxa": _2, "langev\xE5g": _2, leirvik: _2, mjondalen: _2, "xn--mjndalen-64a": _2, "mj\xF8ndalen": _2, "mo-i-rana": _2, mosjoen: _2, "xn--mosjen-eya": _2, "mosj\xF8en": _2, nesoddtangen: _2, orkanger: _2, osoyro: _2, "xn--osyro-wua": _2, "os\xF8yro": _2, raholt: _2, "xn--rholt-mra": _2, "r\xE5holt": _2, sandnessjoen: _2, "xn--sandnessjen-ogb": _2, "sandnessj\xF8en": _2, skedsmokorset: _2, slattum: _2, spjelkavik: _2, stathelle: _2, stavern: _2, stjordalshalsen: _2, "xn--stjrdalshalsen-sqb": _2, "stj\xF8rdalshalsen": _2, tananger: _2, tranby: _2, vossevangen: _2, aarborte: _2, aejrie: _2, afjord: _2, "xn--fjord-lra": _2, "\xE5fjord": _2, agdenes: _2, akershus: _68, aknoluokta: _2, "xn--koluokta-7ya57h": _2, "\xE1k\u014Boluokta": _2, al: _2, "xn--l-1fa": _2, "\xE5l": _2, alaheadju: _2, "xn--laheadju-7ya": _2, "\xE1laheadju": _2, alesund: _2, "xn--lesund-hua": _2, "\xE5lesund": _2, alstahaug: _2, alta: _2, "xn--lt-liac": _2, "\xE1lt\xE1": _2, alvdal: _2, amli: _2, "xn--mli-tla": _2, "\xE5mli": _2, amot: _2, "xn--mot-tla": _2, "\xE5mot": _2, andasuolo: _2, andebu: _2, andoy: _2, "xn--andy-ira": _2, "and\xF8y": _2, ardal: _2, "xn--rdal-poa": _2, "\xE5rdal": _2, aremark: _2, arendal: _2, "xn--s-1fa": _2, "\xE5s": _2, aseral: _2, "xn--seral-lra": _2, "\xE5seral": _2, asker: _2, askim: _2, askoy: _2, "xn--asky-ira": _2, "ask\xF8y": _2, askvoll: _2, asnes: _2, "xn--snes-poa": _2, "\xE5snes": _2, audnedaln: _2, aukra: _2, aure: _2, aurland: _2, "aurskog-holand": _2, "xn--aurskog-hland-jnb": _2, "aurskog-h\xF8land": _2, austevoll: _2, austrheim: _2, averoy: _2, "xn--avery-yua": _2, "aver\xF8y": _2, badaddja: _2, "xn--bdddj-mrabd": _2, "b\xE5d\xE5ddj\xE5": _2, "xn--brum-voa": _2, "b\xE6rum": _2, bahcavuotna: _2, "xn--bhcavuotna-s4a": _2, "b\xE1hcavuotna": _2, bahccavuotna: _2, "xn--bhccavuotna-k7a": _2, "b\xE1hccavuotna": _2, baidar: _2, "xn--bidr-5nac": _2, "b\xE1id\xE1r": _2, bajddar: _2, "xn--bjddar-pta": _2, "b\xE1jddar": _2, balat: _2, "xn--blt-elab": _2, "b\xE1l\xE1t": _2, balestrand: _2, ballangen: _2, balsfjord: _2, bamble: _2, bardu: _2, barum: _2, batsfjord: _2, "xn--btsfjord-9za": _2, "b\xE5tsfjord": _2, bearalvahki: _2, "xn--bearalvhki-y4a": _2, "bearalv\xE1hki": _2, beardu: _2, beiarn: _2, berg: _2, bergen: _2, berlevag: _2, "xn--berlevg-jxa": _2, "berlev\xE5g": _2, bievat: _2, "xn--bievt-0qa": _2, "biev\xE1t": _2, bindal: _2, birkenes: _2, bjerkreim: _2, bjugn: _2, bodo: _2, "xn--bod-2na": _2, "bod\xF8": _2, bokn: _2, bomlo: _2, "xn--bmlo-gra": _2, "b\xF8mlo": _2, bremanger: _2, bronnoy: _2, "xn--brnny-wuac": _2, "br\xF8nn\xF8y": _2, budejju: _2, buskerud: _68, bygland: _2, bykle: _2, cahcesuolo: _2, "xn--hcesuolo-7ya35b": _2, "\u010D\xE1hcesuolo": _2, davvenjarga: _2, "xn--davvenjrga-y4a": _2, "davvenj\xE1rga": _2, davvesiida: _2, deatnu: _2, dielddanuorri: _2, divtasvuodna: _2, divttasvuotna: _2, donna: _2, "xn--dnna-gra": _2, "d\xF8nna": _2, dovre: _2, drammen: _2, drangedal: _2, dyroy: _2, "xn--dyry-ira": _2, "dyr\xF8y": _2, eid: _2, eidfjord: _2, eidsberg: _2, eidskog: _2, eidsvoll: _2, eigersund: _2, elverum: _2, enebakk: _2, engerdal: _2, etne: _2, etnedal: _2, evenassi: _2, "xn--eveni-0qa01ga": _2, "even\xE1\u0161\u0161i": _2, evenes: _2, "evje-og-hornnes": _2, farsund: _2, fauske: _2, fedje: _2, fet: _2, finnoy: _2, "xn--finny-yua": _2, "finn\xF8y": _2, fitjar: _2, fjaler: _2, fjell: _2, fla: _2, "xn--fl-zia": _2, "fl\xE5": _2, flakstad: _2, flatanger: _2, flekkefjord: _2, flesberg: _2, flora: _2, folldal: _2, forde: _2, "xn--frde-gra": _2, "f\xF8rde": _2, forsand: _2, fosnes: _2, "xn--frna-woa": _2, "fr\xE6na": _2, frana: _2, frei: _2, frogn: _2, froland: _2, frosta: _2, froya: _2, "xn--frya-hra": _2, "fr\xF8ya": _2, fuoisku: _2, fuossko: _2, fusa: _2, fyresdal: _2, gaivuotna: _2, "xn--givuotna-8ya": _2, "g\xE1ivuotna": _2, galsa: _2, "xn--gls-elac": _2, "g\xE1ls\xE1": _2, gamvik: _2, gangaviika: _2, "xn--ggaviika-8ya47h": _2, "g\xE1\u014Bgaviika": _2, gaular: _2, gausdal: _2, giehtavuoatna: _2, gildeskal: _2, "xn--gildeskl-g0a": _2, "gildesk\xE5l": _2, giske: _2, gjemnes: _2, gjerdrum: _2, gjerstad: _2, gjesdal: _2, gjovik: _2, "xn--gjvik-wua": _2, "gj\xF8vik": _2, gloppen: _2, gol: _2, gran: _2, grane: _2, granvin: _2, gratangen: _2, grimstad: _2, grong: _2, grue: _2, gulen: _2, guovdageaidnu: _2, ha: _2, "xn--h-2fa": _2, "h\xE5": _2, habmer: _2, "xn--hbmer-xqa": _2, "h\xE1bmer": _2, hadsel: _2, "xn--hgebostad-g3a": _2, "h\xE6gebostad": _2, hagebostad: _2, halden: _2, halsa: _2, hamar: _2, hamaroy: _2, hammarfeasta: _2, "xn--hmmrfeasta-s4ac": _2, "h\xE1mm\xE1rfeasta": _2, hammerfest: _2, hapmir: _2, "xn--hpmir-xqa": _2, "h\xE1pmir": _2, haram: _2, hareid: _2, harstad: _2, hasvik: _2, hattfjelldal: _2, haugesund: _2, hedmark: [0, { os: _2, valer: _2, "xn--vler-qoa": _2, "v\xE5ler": _2 }], hemne: _2, hemnes: _2, hemsedal: _2, hitra: _2, hjartdal: _2, hjelmeland: _2, hobol: _2, "xn--hobl-ira": _2, "hob\xF8l": _2, hof: _2, hol: _2, hole: _2, holmestrand: _2, holtalen: _2, "xn--holtlen-hxa": _2, "holt\xE5len": _2, hordaland: [0, { os: _2 }], hornindal: _2, horten: _2, hoyanger: _2, "xn--hyanger-q1a": _2, "h\xF8yanger": _2, hoylandet: _2, "xn--hylandet-54a": _2, "h\xF8ylandet": _2, hurdal: _2, hurum: _2, hvaler: _2, hyllestad: _2, ibestad: _2, inderoy: _2, "xn--indery-fya": _2, "inder\xF8y": _2, iveland: _2, ivgu: _2, jevnaker: _2, jolster: _2, "xn--jlster-bya": _2, "j\xF8lster": _2, jondal: _2, kafjord: _2, "xn--kfjord-iua": _2, "k\xE5fjord": _2, karasjohka: _2, "xn--krjohka-hwab49j": _2, "k\xE1r\xE1\u0161johka": _2, karasjok: _2, karlsoy: _2, karmoy: _2, "xn--karmy-yua": _2, "karm\xF8y": _2, kautokeino: _2, klabu: _2, "xn--klbu-woa": _2, "kl\xE6bu": _2, klepp: _2, kongsberg: _2, kongsvinger: _2, kraanghke: _2, "xn--kranghke-b0a": _2, "kr\xE5anghke": _2, kragero: _2, "xn--krager-gya": _2, "krager\xF8": _2, kristiansand: _2, kristiansund: _2, krodsherad: _2, "xn--krdsherad-m8a": _2, "kr\xF8dsherad": _2, "xn--kvfjord-nxa": _2, "kv\xE6fjord": _2, "xn--kvnangen-k0a": _2, "kv\xE6nangen": _2, kvafjord: _2, kvalsund: _2, kvam: _2, kvanangen: _2, kvinesdal: _2, kvinnherad: _2, kviteseid: _2, kvitsoy: _2, "xn--kvitsy-fya": _2, "kvits\xF8y": _2, laakesvuemie: _2, "xn--lrdal-sra": _2, "l\xE6rdal": _2, lahppi: _2, "xn--lhppi-xqa": _2, "l\xE1hppi": _2, lardal: _2, larvik: _2, lavagis: _2, lavangen: _2, leangaviika: _2, "xn--leagaviika-52b": _2, "lea\u014Bgaviika": _2, lebesby: _2, leikanger: _2, leirfjord: _2, leka: _2, leksvik: _2, lenvik: _2, lerdal: _2, lesja: _2, levanger: _2, lier: _2, lierne: _2, lillehammer: _2, lillesand: _2, lindas: _2, "xn--linds-pra": _2, "lind\xE5s": _2, lindesnes: _2, loabat: _2, "xn--loabt-0qa": _2, "loab\xE1t": _2, lodingen: _2, "xn--ldingen-q1a": _2, "l\xF8dingen": _2, lom: _2, loppa: _2, lorenskog: _2, "xn--lrenskog-54a": _2, "l\xF8renskog": _2, loten: _2, "xn--lten-gra": _2, "l\xF8ten": _2, lund: _2, lunner: _2, luroy: _2, "xn--lury-ira": _2, "lur\xF8y": _2, luster: _2, lyngdal: _2, lyngen: _2, malatvuopmi: _2, "xn--mlatvuopmi-s4a": _2, "m\xE1latvuopmi": _2, malselv: _2, "xn--mlselv-iua": _2, "m\xE5lselv": _2, malvik: _2, mandal: _2, marker: _2, marnardal: _2, masfjorden: _2, masoy: _2, "xn--msy-ula0h": _2, "m\xE5s\xF8y": _2, "matta-varjjat": _2, "xn--mtta-vrjjat-k7af": _2, "m\xE1tta-v\xE1rjjat": _2, meland: _2, meldal: _2, melhus: _2, meloy: _2, "xn--mely-ira": _2, "mel\xF8y": _2, meraker: _2, "xn--merker-kua": _2, "mer\xE5ker": _2, midsund: _2, "midtre-gauldal": _2, moareke: _2, "xn--moreke-jua": _2, "mo\xE5reke": _2, modalen: _2, modum: _2, molde: _2, "more-og-romsdal": [0, { heroy: _2, sande: _2 }], "xn--mre-og-romsdal-qqb": [0, { "xn--hery-ira": _2, sande: _2 }], "m\xF8re-og-romsdal": [0, { "her\xF8y": _2, sande: _2 }], moskenes: _2, moss: _2, muosat: _2, "xn--muost-0qa": _2, "muos\xE1t": _2, naamesjevuemie: _2, "xn--nmesjevuemie-tcba": _2, "n\xE5\xE5mesjevuemie": _2, "xn--nry-yla5g": _2, "n\xE6r\xF8y": _2, namdalseid: _2, namsos: _2, namsskogan: _2, nannestad: _2, naroy: _2, narviika: _2, narvik: _2, naustdal: _2, navuotna: _2, "xn--nvuotna-hwa": _2, "n\xE1vuotna": _2, "nedre-eiker": _2, nesna: _2, nesodden: _2, nesseby: _2, nesset: _2, nissedal: _2, nittedal: _2, "nord-aurdal": _2, "nord-fron": _2, "nord-odal": _2, norddal: _2, nordkapp: _2, nordland: [0, { bo: _2, "xn--b-5ga": _2, "b\xF8": _2, heroy: _2, "xn--hery-ira": _2, "her\xF8y": _2 }], "nordre-land": _2, nordreisa: _2, "nore-og-uvdal": _2, notodden: _2, notteroy: _2, "xn--nttery-byae": _2, "n\xF8tter\xF8y": _2, odda: _2, oksnes: _2, "xn--ksnes-uua": _2, "\xF8ksnes": _2, omasvuotna: _2, oppdal: _2, oppegard: _2, "xn--oppegrd-ixa": _2, "oppeg\xE5rd": _2, orkdal: _2, orland: _2, "xn--rland-uua": _2, "\xF8rland": _2, orskog: _2, "xn--rskog-uua": _2, "\xF8rskog": _2, orsta: _2, "xn--rsta-fra": _2, "\xF8rsta": _2, osen: _2, osteroy: _2, "xn--ostery-fya": _2, "oster\xF8y": _2, ostfold: [0, { valer: _2 }], "xn--stfold-9xa": [0, { "xn--vler-qoa": _2 }], "\xF8stfold": [0, { "v\xE5ler": _2 }], "ostre-toten": _2, "xn--stre-toten-zcb": _2, "\xF8stre-toten": _2, overhalla: _2, "ovre-eiker": _2, "xn--vre-eiker-k8a": _2, "\xF8vre-eiker": _2, oyer: _2, "xn--yer-zna": _2, "\xF8yer": _2, oygarden: _2, "xn--ygarden-p1a": _2, "\xF8ygarden": _2, "oystre-slidre": _2, "xn--ystre-slidre-ujb": _2, "\xF8ystre-slidre": _2, porsanger: _2, porsangu: _2, "xn--porsgu-sta26f": _2, "pors\xE1\u014Bgu": _2, porsgrunn: _2, rade: _2, "xn--rde-ula": _2, "r\xE5de": _2, radoy: _2, "xn--rady-ira": _2, "rad\xF8y": _2, "xn--rlingen-mxa": _2, "r\xE6lingen": _2, rahkkeravju: _2, "xn--rhkkervju-01af": _2, "r\xE1hkker\xE1vju": _2, raisa: _2, "xn--risa-5na": _2, "r\xE1isa": _2, rakkestad: _2, ralingen: _2, rana: _2, randaberg: _2, rauma: _2, rendalen: _2, rennebu: _2, rennesoy: _2, "xn--rennesy-v1a": _2, "rennes\xF8y": _2, rindal: _2, ringebu: _2, ringerike: _2, ringsaker: _2, risor: _2, "xn--risr-ira": _2, "ris\xF8r": _2, rissa: _2, roan: _2, rodoy: _2, "xn--rdy-0nab": _2, "r\xF8d\xF8y": _2, rollag: _2, romsa: _2, romskog: _2, "xn--rmskog-bya": _2, "r\xF8mskog": _2, roros: _2, "xn--rros-gra": _2, "r\xF8ros": _2, rost: _2, "xn--rst-0na": _2, "r\xF8st": _2, royken: _2, "xn--ryken-vua": _2, "r\xF8yken": _2, royrvik: _2, "xn--ryrvik-bya": _2, "r\xF8yrvik": _2, ruovat: _2, rygge: _2, salangen: _2, salat: _2, "xn--slat-5na": _2, "s\xE1lat": _2, "xn--slt-elab": _2, "s\xE1l\xE1t": _2, saltdal: _2, samnanger: _2, sandefjord: _2, sandnes: _2, sandoy: _2, "xn--sandy-yua": _2, "sand\xF8y": _2, sarpsborg: _2, sauda: _2, sauherad: _2, sel: _2, selbu: _2, selje: _2, seljord: _2, siellak: _2, sigdal: _2, siljan: _2, sirdal: _2, skanit: _2, "xn--sknit-yqa": _2, "sk\xE1nit": _2, skanland: _2, "xn--sknland-fxa": _2, "sk\xE5nland": _2, skaun: _2, skedsmo: _2, ski: _2, skien: _2, skierva: _2, "xn--skierv-uta": _2, "skierv\xE1": _2, skiptvet: _2, skjak: _2, "xn--skjk-soa": _2, "skj\xE5k": _2, skjervoy: _2, "xn--skjervy-v1a": _2, "skjerv\xF8y": _2, skodje: _2, smola: _2, "xn--smla-hra": _2, "sm\xF8la": _2, snaase: _2, "xn--snase-nra": _2, "sn\xE5ase": _2, snasa: _2, "xn--snsa-roa": _2, "sn\xE5sa": _2, snillfjord: _2, snoasa: _2, sogndal: _2, sogne: _2, "xn--sgne-gra": _2, "s\xF8gne": _2, sokndal: _2, sola: _2, solund: _2, somna: _2, "xn--smna-gra": _2, "s\xF8mna": _2, "sondre-land": _2, "xn--sndre-land-0cb": _2, "s\xF8ndre-land": _2, songdalen: _2, "sor-aurdal": _2, "xn--sr-aurdal-l8a": _2, "s\xF8r-aurdal": _2, "sor-fron": _2, "xn--sr-fron-q1a": _2, "s\xF8r-fron": _2, "sor-odal": _2, "xn--sr-odal-q1a": _2, "s\xF8r-odal": _2, "sor-varanger": _2, "xn--sr-varanger-ggb": _2, "s\xF8r-varanger": _2, sorfold: _2, "xn--srfold-bya": _2, "s\xF8rfold": _2, sorreisa: _2, "xn--srreisa-q1a": _2, "s\xF8rreisa": _2, sortland: _2, sorum: _2, "xn--srum-gra": _2, "s\xF8rum": _2, spydeberg: _2, stange: _2, stavanger: _2, steigen: _2, steinkjer: _2, stjordal: _2, "xn--stjrdal-s1a": _2, "stj\xF8rdal": _2, stokke: _2, "stor-elvdal": _2, stord: _2, stordal: _2, storfjord: _2, strand: _2, stranda: _2, stryn: _2, sula: _2, suldal: _2, sund: _2, sunndal: _2, surnadal: _2, sveio: _2, svelvik: _2, sykkylven: _2, tana: _2, telemark: [0, { bo: _2, "xn--b-5ga": _2, "b\xF8": _2 }], time: _2, tingvoll: _2, tinn: _2, tjeldsund: _2, tjome: _2, "xn--tjme-hra": _2, "tj\xF8me": _2, tokke: _2, tolga: _2, tonsberg: _2, "xn--tnsberg-q1a": _2, "t\xF8nsberg": _2, torsken: _2, "xn--trna-woa": _2, "tr\xE6na": _2, trana: _2, tranoy: _2, "xn--trany-yua": _2, "tran\xF8y": _2, troandin: _2, trogstad: _2, "xn--trgstad-r1a": _2, "tr\xF8gstad": _2, tromsa: _2, tromso: _2, "xn--troms-zua": _2, "troms\xF8": _2, trondheim: _2, trysil: _2, tvedestrand: _2, tydal: _2, tynset: _2, tysfjord: _2, tysnes: _2, "xn--tysvr-vra": _2, "tysv\xE6r": _2, tysvar: _2, ullensaker: _2, ullensvang: _2, ulvik: _2, unjarga: _2, "xn--unjrga-rta": _2, "unj\xE1rga": _2, utsira: _2, vaapste: _2, vadso: _2, "xn--vads-jra": _2, "vads\xF8": _2, "xn--vry-yla5g": _2, "v\xE6r\xF8y": _2, vaga: _2, "xn--vg-yiab": _2, "v\xE5g\xE5": _2, vagan: _2, "xn--vgan-qoa": _2, "v\xE5gan": _2, vagsoy: _2, "xn--vgsy-qoa0j": _2, "v\xE5gs\xF8y": _2, vaksdal: _2, valle: _2, vang: _2, vanylven: _2, vardo: _2, "xn--vard-jra": _2, "vard\xF8": _2, varggat: _2, "xn--vrggt-xqad": _2, "v\xE1rgg\xE1t": _2, varoy: _2, vefsn: _2, vega: _2, vegarshei: _2, "xn--vegrshei-c0a": _2, "veg\xE5rshei": _2, vennesla: _2, verdal: _2, verran: _2, vestby: _2, vestfold: [0, { sande: _2 }], vestnes: _2, "vestre-slidre": _2, "vestre-toten": _2, vestvagoy: _2, "xn--vestvgy-ixa6o": _2, "vestv\xE5g\xF8y": _2, vevelstad: _2, vik: _2, vikna: _2, vindafjord: _2, voagat: _2, volda: _2, voss: _2, co: _3, "123hjemmeside": _3, myspreadshop: _3 }], np: _21, nr: _61, nu: [1, { merseine: _3, mine: _3, shacknet: _3, enterprisecloud: _3 }], nz: [1, { ac: _2, co: _2, cri: _2, geek: _2, gen: _2, govt: _2, health: _2, iwi: _2, kiwi: _2, maori: _2, "xn--mori-qsa": _2, "m\u0101ori": _2, mil: _2, net: _2, org: _2, parliament: _2, school: _2, cloudns: _3 }], om: [1, { co: _2, com: _2, edu: _2, gov: _2, med: _2, museum: _2, net: _2, org: _2, pro: _2 }], onion: _2, org: [1, { altervista: _3, pimienta: _3, poivron: _3, potager: _3, sweetpepper: _3, cdn77: [0, { c: _3, rsc: _3 }], "cdn77-secure": [0, { origin: [0, { ssl: _3 }] }], ae: _3, cloudns: _3, "ip-dynamic": _3, ddnss: _3, dpdns: _3, duckdns: _3, tunk: _3, blogdns: _3, blogsite: _3, boldlygoingnowhere: _3, dnsalias: _3, dnsdojo: _3, doesntexist: _3, dontexist: _3, doomdns: _3, dvrdns: _3, dynalias: _3, dyndns: [2, { go: _3, home: _3 }], endofinternet: _3, endoftheinternet: _3, "from-me": _3, "game-host": _3, gotdns: _3, "hobby-site": _3, homedns: _3, homeftp: _3, homelinux: _3, homeunix: _3, "is-a-bruinsfan": _3, "is-a-candidate": _3, "is-a-celticsfan": _3, "is-a-chef": _3, "is-a-geek": _3, "is-a-knight": _3, "is-a-linux-user": _3, "is-a-patsfan": _3, "is-a-soxfan": _3, "is-found": _3, "is-lost": _3, "is-saved": _3, "is-very-bad": _3, "is-very-evil": _3, "is-very-good": _3, "is-very-nice": _3, "is-very-sweet": _3, "isa-geek": _3, "kicks-ass": _3, misconfused: _3, podzone: _3, readmyblog: _3, selfip: _3, sellsyourhome: _3, servebbs: _3, serveftp: _3, servegame: _3, "stuff-4-sale": _3, webhop: _3, accesscam: _3, camdvr: _3, freeddns: _3, mywire: _3, roxa: _3, webredirect: _3, twmail: _3, eu: [2, { al: _3, asso: _3, at: _3, au: _3, be: _3, bg: _3, ca: _3, cd: _3, ch: _3, cn: _3, cy: _3, cz: _3, de: _3, dk: _3, edu: _3, ee: _3, es: _3, fi: _3, fr: _3, gr: _3, hr: _3, hu: _3, ie: _3, il: _3, in: _3, int: _3, is: _3, it: _3, jp: _3, kr: _3, lt: _3, lu: _3, lv: _3, me: _3, mk: _3, mt: _3, my: _3, net: _3, ng: _3, nl: _3, no: _3, nz: _3, pl: _3, pt: _3, ro: _3, ru: _3, se: _3, si: _3, sk: _3, tr: _3, uk: _3, us: _3 }], fedorainfracloud: _3, fedorapeople: _3, fedoraproject: [0, { cloud: _3, os: _46, stg: [0, { os: _46 }] }], freedesktop: _3, hatenadiary: _3, hepforge: _3, "in-dsl": _3, "in-vpn": _3, js: _3, barsy: _3, mayfirst: _3, routingthecloud: _3, bmoattachments: _3, "cable-modem": _3, collegefan: _3, couchpotatofries: _3, hopto: _3, mlbfan: _3, myftp: _3, mysecuritycamera: _3, nflfan: _3, "no-ip": _3, "read-books": _3, ufcfan: _3, zapto: _3, dynserv: _3, "now-dns": _3, "is-local": _3, httpbin: _3, pubtls: _3, jpn: _3, "my-firewall": _3, myfirewall: _3, spdns: _3, "small-web": _3, dsmynas: _3, familyds: _3, teckids: _60, tuxfamily: _3, hk: _3, us: _3, toolforge: _3, wmcloud: [2, { beta: _3 }], wmflabs: _3, za: _3 }], pa: [1, { abo: _2, ac: _2, com: _2, edu: _2, gob: _2, ing: _2, med: _2, net: _2, nom: _2, org: _2, sld: _2 }], pe: [1, { com: _2, edu: _2, gob: _2, mil: _2, net: _2, nom: _2, org: _2 }], pf: [1, { com: _2, edu: _2, org: _2 }], pg: _21, ph: [1, { com: _2, edu: _2, gov: _2, i: _2, mil: _2, net: _2, ngo: _2, org: _2, cloudns: _3 }], pk: [1, { ac: _2, biz: _2, com: _2, edu: _2, fam: _2, gkp: _2, gob: _2, gog: _2, gok: _2, gop: _2, gos: _2, gov: _2, net: _2, org: _2, web: _2 }], pl: [1, { com: _2, net: _2, org: _2, agro: _2, aid: _2, atm: _2, auto: _2, biz: _2, edu: _2, gmina: _2, gsm: _2, info: _2, mail: _2, media: _2, miasta: _2, mil: _2, nieruchomosci: _2, nom: _2, pc: _2, powiat: _2, priv: _2, realestate: _2, rel: _2, sex: _2, shop: _2, sklep: _2, sos: _2, szkola: _2, targi: _2, tm: _2, tourism: _2, travel: _2, turystyka: _2, gov: [1, { ap: _2, griw: _2, ic: _2, is: _2, kmpsp: _2, konsulat: _2, kppsp: _2, kwp: _2, kwpsp: _2, mup: _2, mw: _2, oia: _2, oirm: _2, oke: _2, oow: _2, oschr: _2, oum: _2, pa: _2, pinb: _2, piw: _2, po: _2, pr: _2, psp: _2, psse: _2, pup: _2, rzgw: _2, sa: _2, sdn: _2, sko: _2, so: _2, sr: _2, starostwo: _2, ug: _2, ugim: _2, um: _2, umig: _2, upow: _2, uppo: _2, us: _2, uw: _2, uzs: _2, wif: _2, wiih: _2, winb: _2, wios: _2, witd: _2, wiw: _2, wkz: _2, wsa: _2, wskr: _2, wsse: _2, wuoz: _2, wzmiuw: _2, zp: _2, zpisdn: _2 }], augustow: _2, "babia-gora": _2, bedzin: _2, beskidy: _2, bialowieza: _2, bialystok: _2, bielawa: _2, bieszczady: _2, boleslawiec: _2, bydgoszcz: _2, bytom: _2, cieszyn: _2, czeladz: _2, czest: _2, dlugoleka: _2, elblag: _2, elk: _2, glogow: _2, gniezno: _2, gorlice: _2, grajewo: _2, ilawa: _2, jaworzno: _2, "jelenia-gora": _2, jgora: _2, kalisz: _2, karpacz: _2, kartuzy: _2, kaszuby: _2, katowice: _2, "kazimierz-dolny": _2, kepno: _2, ketrzyn: _2, klodzko: _2, kobierzyce: _2, kolobrzeg: _2, konin: _2, konskowola: _2, kutno: _2, lapy: _2, lebork: _2, legnica: _2, lezajsk: _2, limanowa: _2, lomza: _2, lowicz: _2, lubin: _2, lukow: _2, malbork: _2, malopolska: _2, mazowsze: _2, mazury: _2, mielec: _2, mielno: _2, mragowo: _2, naklo: _2, nowaruda: _2, nysa: _2, olawa: _2, olecko: _2, olkusz: _2, olsztyn: _2, opoczno: _2, opole: _2, ostroda: _2, ostroleka: _2, ostrowiec: _2, ostrowwlkp: _2, pila: _2, pisz: _2, podhale: _2, podlasie: _2, polkowice: _2, pomorskie: _2, pomorze: _2, prochowice: _2, pruszkow: _2, przeworsk: _2, pulawy: _2, radom: _2, "rawa-maz": _2, rybnik: _2, rzeszow: _2, sanok: _2, sejny: _2, skoczow: _2, slask: _2, slupsk: _2, sosnowiec: _2, "stalowa-wola": _2, starachowice: _2, stargard: _2, suwalki: _2, swidnica: _2, swiebodzin: _2, swinoujscie: _2, szczecin: _2, szczytno: _2, tarnobrzeg: _2, tgory: _2, turek: _2, tychy: _2, ustka: _2, walbrzych: _2, warmia: _2, warszawa: _2, waw: _2, wegrow: _2, wielun: _2, wlocl: _2, wloclawek: _2, wodzislaw: _2, wolomin: _2, wroclaw: _2, zachpomor: _2, zagan: _2, zarow: _2, zgora: _2, zgorzelec: _2, art: _3, gliwice: _3, krakow: _3, poznan: _3, wroc: _3, zakopane: _3, beep: _3, "ecommerce-shop": _3, cfolks: _3, dfirma: _3, dkonto: _3, you2: _3, shoparena: _3, homesklep: _3, sdscloud: _3, unicloud: _3, lodz: _3, pabianice: _3, plock: _3, sieradz: _3, skierniewice: _3, zgierz: _3, krasnik: _3, leczna: _3, lubartow: _3, lublin: _3, poniatowa: _3, swidnik: _3, co: _3, torun: _3, simplesite: _3, myspreadshop: _3, gda: _3, gdansk: _3, gdynia: _3, med: _3, sopot: _3, bielsko: _3 }], pm: [1, { own: _3, name: _3 }], pn: [1, { co: _2, edu: _2, gov: _2, net: _2, org: _2 }], post: _2, pr: [1, { biz: _2, com: _2, edu: _2, gov: _2, info: _2, isla: _2, name: _2, net: _2, org: _2, pro: _2, ac: _2, est: _2, prof: _2 }], pro: [1, { aaa: _2, aca: _2, acct: _2, avocat: _2, bar: _2, cpa: _2, eng: _2, jur: _2, law: _2, med: _2, recht: _2, cloudns: _3, keenetic: _3, barsy: _3, ngrok: _3 }], ps: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, plo: _2, sec: _2 }], pt: [1, { com: _2, edu: _2, gov: _2, int: _2, net: _2, nome: _2, org: _2, publ: _2, "123paginaweb": _3 }], pw: [1, { gov: _2, cloudns: _3, x443: _3 }], py: [1, { com: _2, coop: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2 }], qa: [1, { com: _2, edu: _2, gov: _2, mil: _2, name: _2, net: _2, org: _2, sch: _2 }], re: [1, { asso: _2, com: _2, netlib: _3, can: _3 }], ro: [1, { arts: _2, com: _2, firm: _2, info: _2, nom: _2, nt: _2, org: _2, rec: _2, store: _2, tm: _2, www: _2, co: _3, shop: _3, barsy: _3 }], rs: [1, { ac: _2, co: _2, edu: _2, gov: _2, in: _2, org: _2, brendly: _20, barsy: _3, ox: _3 }], ru: [1, { ac: _3, edu: _3, gov: _3, int: _3, mil: _3, eurodir: _3, adygeya: _3, bashkiria: _3, bir: _3, cbg: _3, com: _3, dagestan: _3, grozny: _3, kalmykia: _3, kustanai: _3, marine: _3, mordovia: _3, msk: _3, mytis: _3, nalchik: _3, nov: _3, pyatigorsk: _3, spb: _3, vladikavkaz: _3, vladimir: _3, na4u: _3, mircloud: _3, myjino: [2, { hosting: _6, landing: _6, spectrum: _6, vps: _6 }], cldmail: [0, { hb: _3 }], mcdir: [2, { vps: _3 }], mcpre: _3, net: _3, org: _3, pp: _3, ras: _3 }], rw: [1, { ac: _2, co: _2, coop: _2, gov: _2, mil: _2, net: _2, org: _2 }], sa: [1, { com: _2, edu: _2, gov: _2, med: _2, net: _2, org: _2, pub: _2, sch: _2 }], sb: _4, sc: _4, sd: [1, { com: _2, edu: _2, gov: _2, info: _2, med: _2, net: _2, org: _2, tv: _2 }], se: [1, { a: _2, ac: _2, b: _2, bd: _2, brand: _2, c: _2, d: _2, e: _2, f: _2, fh: _2, fhsk: _2, fhv: _2, g: _2, h: _2, i: _2, k: _2, komforb: _2, kommunalforbund: _2, komvux: _2, l: _2, lanbib: _2, m: _2, n: _2, naturbruksgymn: _2, o: _2, org: _2, p: _2, parti: _2, pp: _2, press: _2, r: _2, s: _2, t: _2, tm: _2, u: _2, w: _2, x: _2, y: _2, z: _2, com: _3, iopsys: _3, "123minsida": _3, itcouldbewor: _3, myspreadshop: _3 }], sg: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, enscaled: _3 }], sh: [1, { com: _2, gov: _2, mil: _2, net: _2, org: _2, hashbang: _3, botda: _3, lovable: _3, platform: [0, { ent: _3, eu: _3, us: _3 }], teleport: _3, now: _3 }], si: [1, { f5: _3, gitapp: _3, gitpage: _3 }], sj: _2, sk: [1, { org: _2 }], sl: _4, sm: _2, sn: [1, { art: _2, com: _2, edu: _2, gouv: _2, org: _2, univ: _2 }], so: [1, { com: _2, edu: _2, gov: _2, me: _2, net: _2, org: _2, surveys: _3 }], sr: _2, ss: [1, { biz: _2, co: _2, com: _2, edu: _2, gov: _2, me: _2, net: _2, org: _2, sch: _2 }], st: [1, { co: _2, com: _2, consulado: _2, edu: _2, embaixada: _2, mil: _2, net: _2, org: _2, principe: _2, saotome: _2, store: _2, helioho: _3, cn: _6, kirara: _3, noho: _3 }], su: [1, { abkhazia: _3, adygeya: _3, aktyubinsk: _3, arkhangelsk: _3, armenia: _3, ashgabad: _3, azerbaijan: _3, balashov: _3, bashkiria: _3, bryansk: _3, bukhara: _3, chimkent: _3, dagestan: _3, "east-kazakhstan": _3, exnet: _3, georgia: _3, grozny: _3, ivanovo: _3, jambyl: _3, kalmykia: _3, kaluga: _3, karacol: _3, karaganda: _3, karelia: _3, khakassia: _3, krasnodar: _3, kurgan: _3, kustanai: _3, lenug: _3, mangyshlak: _3, mordovia: _3, msk: _3, murmansk: _3, nalchik: _3, navoi: _3, "north-kazakhstan": _3, nov: _3, obninsk: _3, penza: _3, pokrovsk: _3, sochi: _3, spb: _3, tashkent: _3, termez: _3, togliatti: _3, troitsk: _3, tselinograd: _3, tula: _3, tuva: _3, vladikavkaz: _3, vladimir: _3, vologda: _3 }], sv: [1, { com: _2, edu: _2, gob: _2, org: _2, red: _2 }], sx: _10, sy: _5, sz: [1, { ac: _2, co: _2, org: _2 }], tc: _2, td: _2, tel: _2, tf: [1, { sch: _3 }], tg: _2, th: [1, { ac: _2, co: _2, go: _2, in: _2, mi: _2, net: _2, or: _2, online: _3, shop: _3 }], tj: [1, { ac: _2, biz: _2, co: _2, com: _2, edu: _2, go: _2, gov: _2, int: _2, mil: _2, name: _2, net: _2, nic: _2, org: _2, test: _2, web: _2 }], tk: _2, tl: _10, tm: [1, { co: _2, com: _2, edu: _2, gov: _2, mil: _2, net: _2, nom: _2, org: _2 }], tn: [1, { com: _2, ens: _2, fin: _2, gov: _2, ind: _2, info: _2, intl: _2, mincom: _2, nat: _2, net: _2, org: _2, perso: _2, tourism: _2, orangecloud: _3 }], to: [1, { "611": _3, com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, oya: _3, x0: _3, quickconnect: _29, vpnplus: _3, nett: _3 }], tr: [1, { av: _2, bbs: _2, bel: _2, biz: _2, com: _2, dr: _2, edu: _2, gen: _2, gov: _2, info: _2, k12: _2, kep: _2, mil: _2, name: _2, net: _2, org: _2, pol: _2, tel: _2, tsk: _2, tv: _2, web: _2, nc: _10 }], tt: [1, { biz: _2, co: _2, com: _2, edu: _2, gov: _2, info: _2, mil: _2, name: _2, net: _2, org: _2, pro: _2 }], tv: [1, { "better-than": _3, dyndns: _3, "on-the-web": _3, "worse-than": _3, from: _3, sakura: _3 }], tw: [1, { club: _2, com: [1, { mymailer: _3 }], ebiz: _2, edu: _2, game: _2, gov: _2, idv: _2, mil: _2, net: _2, org: _2, url: _3, mydns: _3 }], tz: [1, { ac: _2, co: _2, go: _2, hotel: _2, info: _2, me: _2, mil: _2, mobi: _2, ne: _2, or: _2, sc: _2, tv: _2 }], ua: [1, { com: _2, edu: _2, gov: _2, in: _2, net: _2, org: _2, cherkassy: _2, cherkasy: _2, chernigov: _2, chernihiv: _2, chernivtsi: _2, chernovtsy: _2, ck: _2, cn: _2, cr: _2, crimea: _2, cv: _2, dn: _2, dnepropetrovsk: _2, dnipropetrovsk: _2, donetsk: _2, dp: _2, if: _2, "ivano-frankivsk": _2, kh: _2, kharkiv: _2, kharkov: _2, kherson: _2, khmelnitskiy: _2, khmelnytskyi: _2, kiev: _2, kirovograd: _2, km: _2, kr: _2, kropyvnytskyi: _2, krym: _2, ks: _2, kv: _2, kyiv: _2, lg: _2, lt: _2, lugansk: _2, luhansk: _2, lutsk: _2, lv: _2, lviv: _2, mk: _2, mykolaiv: _2, nikolaev: _2, od: _2, odesa: _2, odessa: _2, pl: _2, poltava: _2, rivne: _2, rovno: _2, rv: _2, sb: _2, sebastopol: _2, sevastopol: _2, sm: _2, sumy: _2, te: _2, ternopil: _2, uz: _2, uzhgorod: _2, uzhhorod: _2, vinnica: _2, vinnytsia: _2, vn: _2, volyn: _2, yalta: _2, zakarpattia: _2, zaporizhzhe: _2, zaporizhzhia: _2, zhitomir: _2, zhytomyr: _2, zp: _2, zt: _2, cc: _3, inf: _3, ltd: _3, cx: _3, biz: _3, co: _3, pp: _3, v: _3 }], ug: [1, { ac: _2, co: _2, com: _2, edu: _2, go: _2, gov: _2, mil: _2, ne: _2, or: _2, org: _2, sc: _2, us: _2 }], uk: [1, { ac: _2, co: [1, { bytemark: [0, { dh: _3, vm: _3 }], layershift: _49, barsy: _3, barsyonline: _3, retrosnub: _59, "nh-serv": _3, "no-ip": _3, adimo: _3, myspreadshop: _3 }], gov: [1, { api: _3, campaign: _3, service: _3 }], ltd: _2, me: _2, net: _2, nhs: _2, org: [1, { glug: _3, lug: _3, lugs: _3, affinitylottery: _3, raffleentry: _3, weeklylottery: _3 }], plc: _2, police: _2, sch: _21, conn: _3, copro: _3, hosp: _3, "independent-commission": _3, "independent-inquest": _3, "independent-inquiry": _3, "independent-panel": _3, "independent-review": _3, "public-inquiry": _3, "royal-commission": _3, pymnt: _3, barsy: _3, nimsite: _3, oraclegovcloudapps: _6 }], us: [1, { dni: _2, isa: _2, nsn: _2, ak: _69, al: _69, ar: _69, as: _69, az: _69, ca: _69, co: _69, ct: _69, dc: _69, de: _70, fl: _69, ga: _69, gu: _69, hi: _71, ia: _69, id: _69, il: _69, in: _69, ks: _69, ky: _69, la: _69, ma: [1, { k12: [1, { chtr: _2, paroch: _2, pvt: _2 }], cc: _2, lib: _2 }], md: _69, me: _69, mi: [1, { k12: _2, cc: _2, lib: _2, "ann-arbor": _2, cog: _2, dst: _2, eaton: _2, gen: _2, mus: _2, tec: _2, washtenaw: _2 }], mn: _69, mo: _69, ms: [1, { k12: _2, cc: _2 }], mt: _69, nc: _69, nd: _71, ne: _69, nh: _69, nj: _69, nm: _69, nv: _69, ny: _69, oh: _69, ok: _69, or: _69, pa: _69, pr: _69, ri: _71, sc: _69, sd: _71, tn: _69, tx: _69, ut: _69, va: _69, vi: _69, vt: _69, wa: _69, wi: _69, wv: _70, wy: _69, cloudns: _3, "is-by": _3, "land-4-sale": _3, "stuff-4-sale": _3, heliohost: _3, enscaled: [0, { phx: _3 }], mircloud: _3, "azure-api": _3, azurewebsites: _3, ngo: _3, golffan: _3, noip: _3, pointto: _3, freeddns: _3, srv: [2, { gh: _3, gl: _3 }], servername: _3 }], uy: [1, { com: _2, edu: _2, gub: _2, mil: _2, net: _2, org: _2, gv: _3 }], uz: [1, { co: _2, com: _2, net: _2, org: _2 }], va: _2, vc: [1, { com: _2, edu: _2, gov: _2, mil: _2, net: _2, org: _2, gv: [2, { d: _3 }], "0e": _6, mydns: _3 }], ve: [1, { arts: _2, bib: _2, co: _2, com: _2, e12: _2, edu: _2, emprende: _2, firm: _2, gob: _2, gov: _2, ia: _2, info: _2, int: _2, mil: _2, net: _2, nom: _2, org: _2, rar: _2, rec: _2, store: _2, tec: _2, web: _2 }], vg: [1, { edu: _2 }], vi: [1, { co: _2, com: _2, k12: _2, net: _2, org: _2 }], vn: [1, { ac: _2, ai: _2, biz: _2, com: _2, edu: _2, gov: _2, health: _2, id: _2, info: _2, int: _2, io: _2, name: _2, net: _2, org: _2, pro: _2, angiang: _2, bacgiang: _2, backan: _2, baclieu: _2, bacninh: _2, "baria-vungtau": _2, bentre: _2, binhdinh: _2, binhduong: _2, binhphuoc: _2, binhthuan: _2, camau: _2, cantho: _2, caobang: _2, daklak: _2, daknong: _2, danang: _2, dienbien: _2, dongnai: _2, dongthap: _2, gialai: _2, hagiang: _2, haiduong: _2, haiphong: _2, hanam: _2, hanoi: _2, hatinh: _2, haugiang: _2, hoabinh: _2, hue: _2, hungyen: _2, khanhhoa: _2, kiengiang: _2, kontum: _2, laichau: _2, lamdong: _2, langson: _2, laocai: _2, longan: _2, namdinh: _2, nghean: _2, ninhbinh: _2, ninhthuan: _2, phutho: _2, phuyen: _2, quangbinh: _2, quangnam: _2, quangngai: _2, quangninh: _2, quangtri: _2, soctrang: _2, sonla: _2, tayninh: _2, thaibinh: _2, thainguyen: _2, thanhhoa: _2, thanhphohochiminh: _2, thuathienhue: _2, tiengiang: _2, travinh: _2, tuyenquang: _2, vinhlong: _2, vinhphuc: _2, yenbai: _2 }], vu: _48, wf: [1, { biz: _3, sch: _3 }], ws: [1, { com: _2, edu: _2, gov: _2, net: _2, org: _2, advisor: _6, cloud66: _3, dyndns: _3, mypets: _3 }], yt: [1, { org: _3 }], "xn--mgbaam7a8h": _2, "\u0627\u0645\u0627\u0631\u0627\u062A": _2, "xn--y9a3aq": _2, "\u0570\u0561\u0575": _2, "xn--54b7fta0cc": _2, "\u09AC\u09BE\u0982\u09B2\u09BE": _2, "xn--90ae": _2, "\u0431\u0433": _2, "xn--mgbcpq6gpa1a": _2, "\u0627\u0644\u0628\u062D\u0631\u064A\u0646": _2, "xn--90ais": _2, "\u0431\u0435\u043B": _2, "xn--fiqs8s": _2, "\u4E2D\u56FD": _2, "xn--fiqz9s": _2, "\u4E2D\u570B": _2, "xn--lgbbat1ad8j": _2, "\u0627\u0644\u062C\u0632\u0627\u0626\u0631": _2, "xn--wgbh1c": _2, "\u0645\u0635\u0631": _2, "xn--e1a4c": _2, "\u0435\u044E": _2, "xn--qxa6a": _2, "\u03B5\u03C5": _2, "xn--mgbah1a3hjkrd": _2, "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627": _2, "xn--node": _2, "\u10D2\u10D4": _2, "xn--qxam": _2, "\u03B5\u03BB": _2, "xn--j6w193g": [1, { "xn--gmqw5a": _2, "xn--55qx5d": _2, "xn--mxtq1m": _2, "xn--wcvs22d": _2, "xn--uc0atv": _2, "xn--od0alg": _2 }], "\u9999\u6E2F": [1, { "\u500B\u4EBA": _2, "\u516C\u53F8": _2, "\u653F\u5E9C": _2, "\u6559\u80B2": _2, "\u7D44\u7E54": _2, "\u7DB2\u7D61": _2 }], "xn--2scrj9c": _2, "\u0CAD\u0CBE\u0CB0\u0CA4": _2, "xn--3hcrj9c": _2, "\u0B2D\u0B3E\u0B30\u0B24": _2, "xn--45br5cyl": _2, "\u09AD\u09BE\u09F0\u09A4": _2, "xn--h2breg3eve": _2, "\u092D\u093E\u0930\u0924\u092E\u094D": _2, "xn--h2brj9c8c": _2, "\u092D\u093E\u0930\u094B\u0924": _2, "xn--mgbgu82a": _2, "\u0680\u0627\u0631\u062A": _2, "xn--rvc1e0am3e": _2, "\u0D2D\u0D3E\u0D30\u0D24\u0D02": _2, "xn--h2brj9c": _2, "\u092D\u093E\u0930\u0924": _2, "xn--mgbbh1a": _2, "\u0628\u0627\u0631\u062A": _2, "xn--mgbbh1a71e": _2, "\u0628\u06BE\u0627\u0631\u062A": _2, "xn--fpcrj9c3d": _2, "\u0C2D\u0C3E\u0C30\u0C24\u0C4D": _2, "xn--gecrj9c": _2, "\u0AAD\u0ABE\u0AB0\u0AA4": _2, "xn--s9brj9c": _2, "\u0A2D\u0A3E\u0A30\u0A24": _2, "xn--45brj9c": _2, "\u09AD\u09BE\u09B0\u09A4": _2, "xn--xkc2dl3a5ee0h": _2, "\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE": _2, "xn--mgba3a4f16a": _2, "\u0627\u06CC\u0631\u0627\u0646": _2, "xn--mgba3a4fra": _2, "\u0627\u064A\u0631\u0627\u0646": _2, "xn--mgbtx2b": _2, "\u0639\u0631\u0627\u0642": _2, "xn--mgbayh7gpa": _2, "\u0627\u0644\u0627\u0631\u062F\u0646": _2, "xn--3e0b707e": _2, "\uD55C\uAD6D": _2, "xn--80ao21a": _2, "\u049B\u0430\u0437": _2, "xn--q7ce6a": _2, "\u0EA5\u0EB2\u0EA7": _2, "xn--fzc2c9e2c": _2, "\u0DBD\u0D82\u0D9A\u0DCF": _2, "xn--xkc2al3hye2a": _2, "\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8": _2, "xn--mgbc0a9azcg": _2, "\u0627\u0644\u0645\u063A\u0631\u0628": _2, "xn--d1alf": _2, "\u043C\u043A\u0434": _2, "xn--l1acc": _2, "\u043C\u043E\u043D": _2, "xn--mix891f": _2, "\u6FB3\u9580": _2, "xn--mix082f": _2, "\u6FB3\u95E8": _2, "xn--mgbx4cd0ab": _2, "\u0645\u0644\u064A\u0633\u064A\u0627": _2, "xn--mgb9awbf": _2, "\u0639\u0645\u0627\u0646": _2, "xn--mgbai9azgqp6j": _2, "\u067E\u0627\u06A9\u0633\u062A\u0627\u0646": _2, "xn--mgbai9a5eva00b": _2, "\u067E\u0627\u0643\u0633\u062A\u0627\u0646": _2, "xn--ygbi2ammx": _2, "\u0641\u0644\u0633\u0637\u064A\u0646": _2, "xn--90a3ac": [1, { "xn--80au": _2, "xn--90azh": _2, "xn--d1at": _2, "xn--c1avg": _2, "xn--o1ac": _2, "xn--o1ach": _2 }], "\u0441\u0440\u0431": [1, { "\u0430\u043A": _2, "\u043E\u0431\u0440": _2, "\u043E\u0434": _2, "\u043E\u0440\u0433": _2, "\u043F\u0440": _2, "\u0443\u043F\u0440": _2 }], "xn--p1ai": _2, "\u0440\u0444": _2, "xn--wgbl6a": _2, "\u0642\u0637\u0631": _2, "xn--mgberp4a5d4ar": _2, "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629": _2, "xn--mgberp4a5d4a87g": _2, "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u0629": _2, "xn--mgbqly7c0a67fbc": _2, "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u06C3": _2, "xn--mgbqly7cvafr": _2, "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647": _2, "xn--mgbpl2fh": _2, "\u0633\u0648\u062F\u0627\u0646": _2, "xn--yfro4i67o": _2, "\u65B0\u52A0\u5761": _2, "xn--clchc0ea0b2g2a9gcd": _2, "\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD": _2, "xn--ogbpf8fl": _2, "\u0633\u0648\u0631\u064A\u0629": _2, "xn--mgbtf8fl": _2, "\u0633\u0648\u0631\u064A\u0627": _2, "xn--o3cw4h": [1, { "xn--o3cyx2a": _2, "xn--12co0c3b4eva": _2, "xn--m3ch0j3a": _2, "xn--h3cuzk1di": _2, "xn--12c1fe0br": _2, "xn--12cfi8ixb8l": _2 }], "\u0E44\u0E17\u0E22": [1, { "\u0E17\u0E2B\u0E32\u0E23": _2, "\u0E18\u0E38\u0E23\u0E01\u0E34\u0E08": _2, "\u0E40\u0E19\u0E47\u0E15": _2, "\u0E23\u0E31\u0E10\u0E1A\u0E32\u0E25": _2, "\u0E28\u0E36\u0E01\u0E29\u0E32": _2, "\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23": _2 }], "xn--pgbs0dh": _2, "\u062A\u0648\u0646\u0633": _2, "xn--kpry57d": _2, "\u53F0\u7063": _2, "xn--kprw13d": _2, "\u53F0\u6E7E": _2, "xn--nnx388a": _2, "\u81FA\u7063": _2, "xn--j1amh": _2, "\u0443\u043A\u0440": _2, "xn--mgb2ddes": _2, "\u0627\u0644\u064A\u0645\u0646": _2, xxx: _2, ye: _5, za: [0, { ac: _2, agric: _2, alt: _2, co: _2, edu: _2, gov: _2, grondar: _2, law: _2, mil: _2, net: _2, ngo: _2, nic: _2, nis: _2, nom: _2, org: _2, school: _2, tm: _2, web: _2 }], zm: [1, { ac: _2, biz: _2, co: _2, com: _2, edu: _2, gov: _2, info: _2, mil: _2, net: _2, org: _2, sch: _2 }], zw: [1, { ac: _2, co: _2, gov: _2, mil: _2, org: _2 }], aaa: _2, aarp: _2, abb: _2, abbott: _2, abbvie: _2, abc: _2, able: _2, abogado: _2, abudhabi: _2, academy: [1, { official: _3 }], accenture: _2, accountant: _2, accountants: _2, aco: _2, actor: _2, ads: _2, adult: _2, aeg: _2, aetna: _2, afl: _2, africa: _2, agakhan: _2, agency: _2, aig: _2, airbus: _2, airforce: _2, airtel: _2, akdn: _2, alibaba: _2, alipay: _2, allfinanz: _2, allstate: _2, ally: _2, alsace: _2, alstom: _2, amazon: _2, americanexpress: _2, americanfamily: _2, amex: _2, amfam: _2, amica: _2, amsterdam: _2, analytics: _2, android: _2, anquan: _2, anz: _2, aol: _2, apartments: _2, app: [1, { adaptable: _3, aiven: _3, beget: _6, brave: _7, clerk: _3, clerkstage: _3, cloudflare: _3, wnext: _3, csb: [2, { preview: _3 }], convex: _3, corespeed: _3, deta: _3, ondigitalocean: _3, easypanel: _3, encr: [2, { frontend: _3 }], evervault: _8, expo: [2, { staging: _3 }], edgecompute: _3, "on-fleek": _3, flutterflow: _3, sprites: _3, e2b: _3, framer: _3, gadget: _3, github: _3, hosted: _6, run: [0, { "*": _3, mtls: _6 }], web: _3, hackclub: _3, hasura: _3, onhercules: _3, botdash: _3, shiptoday: _3, leapcell: _3, loginline: _3, lovable: _3, luyani: _3, magicpatterns: _3, medusajs: _3, messerli: _3, miren: _3, mocha: _3, netlify: _3, ngrok: _3, "ngrok-free": _3, developer: _6, noop: _3, northflank: _6, upsun: _6, railway: [0, { up: _3 }], replit: _9, nyat: _3, snowflake: [0, { "*": _3, privatelink: _6 }], streamlit: _3, spawnbase: _3, telebit: _3, typedream: _3, vercel: _3, wal: _3, wasmer: _3, bookonline: _3, windsurf: _3, base44: _3, zeabur: _3, zerops: _6 }], apple: [1, { int: [2, { cloud: [0, { "*": _3, r: [0, { "*": _3, "ap-north-1": _6, "ap-south-1": _6, "ap-south-2": _6, "eu-central-1": _6, "eu-north-1": _6, "us-central-1": _6, "us-central-2": _6, "us-east-1": _6, "us-east-2": _6, "us-west-1": _6, "us-west-2": _6, "us-west-3": _6 }] }] }] }], aquarelle: _2, arab: _2, aramco: _2, archi: _2, army: _2, art: _2, arte: _2, asda: _2, associates: _2, athleta: _2, attorney: _2, auction: _2, audi: _2, audible: _2, audio: _2, auspost: _2, author: _2, auto: _2, autos: _2, aws: [1, { on: [0, { "af-south-1": _11, "ap-east-1": _11, "ap-northeast-1": _11, "ap-northeast-2": _11, "ap-northeast-3": _11, "ap-south-1": _11, "ap-south-2": _12, "ap-southeast-1": _11, "ap-southeast-2": _11, "ap-southeast-3": _11, "ap-southeast-4": _12, "ap-southeast-5": _12, "ca-central-1": _11, "ca-west-1": _12, "eu-central-1": _11, "eu-central-2": _12, "eu-north-1": _11, "eu-south-1": _11, "eu-south-2": _12, "eu-west-1": _11, "eu-west-2": _11, "eu-west-3": _11, "il-central-1": _12, "me-central-1": _12, "me-south-1": _11, "sa-east-1": _11, "us-east-1": _11, "us-east-2": _11, "us-west-1": _11, "us-west-2": _11, "ap-southeast-7": _13, "mx-central-1": _13, "us-gov-east-1": _14, "us-gov-west-1": _14 }], sagemaker: [0, { "ap-northeast-1": _16, "ap-northeast-2": _16, "ap-south-1": _16, "ap-southeast-1": _16, "ap-southeast-2": _16, "ca-central-1": _18, "eu-central-1": _16, "eu-west-1": _16, "eu-west-2": _16, "us-east-1": _18, "us-east-2": _18, "us-west-2": _18, "af-south-1": _15, "ap-east-1": _15, "ap-northeast-3": _15, "ap-south-2": _17, "ap-southeast-3": _15, "ap-southeast-4": _17, "ca-west-1": [0, { notebook: _3, "notebook-fips": _3 }], "eu-central-2": _15, "eu-north-1": _15, "eu-south-1": _15, "eu-south-2": _15, "eu-west-3": _15, "il-central-1": _15, "me-central-1": _15, "me-south-1": _15, "sa-east-1": _15, "us-gov-east-1": _19, "us-gov-west-1": _19, "us-west-1": [0, { notebook: _3, "notebook-fips": _3, studio: _3 }], experiments: _6 }], repost: [0, { private: _6 }] }], axa: _2, azure: _2, baby: _2, baidu: _2, banamex: _2, band: _2, bank: _2, bar: _2, barcelona: _2, barclaycard: _2, barclays: _2, barefoot: _2, bargains: _2, baseball: _2, basketball: [1, { aus: _3, nz: _3 }], bauhaus: _2, bayern: _2, bbc: _2, bbt: _2, bbva: _2, bcg: _2, bcn: _2, beats: _2, beauty: _2, beer: _2, berlin: _2, best: _2, bestbuy: _2, bet: _2, bharti: _2, bible: _2, bid: _2, bike: _2, bing: _2, bingo: _2, bio: _2, black: _2, blackfriday: _2, blockbuster: _2, blog: _2, bloomberg: _2, blue: _2, bms: _2, bmw: _2, bnpparibas: _2, boats: _2, boehringer: _2, bofa: _2, bom: _2, bond: _2, boo: _2, book: _2, booking: _2, bosch: _2, bostik: _2, boston: _2, bot: _2, boutique: _2, box: _2, bradesco: _2, bridgestone: _2, broadway: _2, broker: _2, brother: _2, brussels: _2, build: [1, { shiptoday: _3, v0: _3, windsurf: _3 }], builders: [1, { cloudsite: _3 }], business: _22, buy: _2, buzz: _2, bzh: _2, cab: _2, cafe: _2, cal: _2, call: _2, calvinklein: _2, cam: _2, camera: _2, camp: [1, { emf: [0, { at: _3 }] }], canon: _2, capetown: _2, capital: _2, capitalone: _2, car: _2, caravan: _2, cards: _2, care: _2, career: _2, careers: _2, cars: _2, casa: [1, { nabu: [0, { ui: _3 }] }], case: [1, { sav: _3 }], cash: _2, casino: _2, catering: _2, catholic: _2, cba: _2, cbn: _2, cbre: _2, center: _2, ceo: _2, cern: _2, cfa: _2, cfd: _2, chanel: _2, channel: _2, charity: _2, chase: _2, chat: _2, cheap: _2, chintai: _2, christmas: _2, chrome: _2, church: _2, cipriani: _2, circle: _2, cisco: _2, citadel: _2, citi: _2, citic: _2, city: _2, claims: _2, cleaning: _2, click: _2, clinic: _2, clinique: _2, clothing: _2, cloud: [1, { antagonist: _3, begetcdn: _6, convex: _24, elementor: _3, emergent: _3, encoway: [0, { eu: _3 }], statics: _6, ravendb: _3, axarnet: [0, { "es-1": _3 }], diadem: _3, jelastic: [0, { vip: _3 }], jele: _3, "jenv-aruba": [0, { aruba: [0, { eur: [0, { it1: _3 }] }], it1: _3 }], keliweb: [2, { cs: _3 }], oxa: [2, { tn: _3, uk: _3 }], primetel: [2, { uk: _3 }], reclaim: [0, { ca: _3, uk: _3, us: _3 }], trendhosting: [0, { ch: _3, de: _3 }], jote: _3, jotelulu: _3, kuleuven: _3, laravel: _3, linkyard: _3, magentosite: _6, matlab: _3, observablehq: _3, perspecta: _3, vapor: _3, "on-rancher": _6, scw: [0, { baremetal: [0, { "fr-par-1": _3, "fr-par-2": _3, "nl-ams-1": _3 }], "fr-par": [0, { cockpit: _3, ddl: _3, dtwh: _3, fnc: [2, { functions: _3 }], ifr: _3, k8s: _25, kafk: _3, mgdb: _3, rdb: _3, s3: _3, "s3-website": _3, scbl: _3, whm: _3 }], instances: [0, { priv: _3, pub: _3 }], k8s: _3, "nl-ams": [0, { cockpit: _3, ddl: _3, dtwh: _3, ifr: _3, k8s: _25, kafk: _3, mgdb: _3, rdb: _3, s3: _3, "s3-website": _3, scbl: _3, whm: _3 }], "pl-waw": [0, { cockpit: _3, ddl: _3, dtwh: _3, ifr: _3, k8s: _25, kafk: _3, mgdb: _3, rdb: _3, s3: _3, "s3-website": _3, scbl: _3 }], scalebook: _3, smartlabeling: _3 }], servebolt: _3, onstackit: [0, { runs: _3 }], trafficplex: _3, "unison-services": _3, urown: _3, voorloper: _3, zap: _3 }], club: [1, { cloudns: _3, jele: _3, barsy: _3 }], clubmed: _2, coach: _2, codes: [1, { owo: _6 }], coffee: _2, college: _2, cologne: _2, commbank: _2, community: [1, { nog: _3, ravendb: _3, myforum: _3 }], company: [1, { mybox: _3 }], compare: _2, computer: _2, comsec: _2, condos: _2, construction: _2, consulting: _2, contact: _2, contractors: _2, cooking: _2, cool: [1, { elementor: _3, de: _3 }], corsica: _2, country: _2, coupon: _2, coupons: _2, courses: _2, cpa: _2, credit: _2, creditcard: _2, creditunion: _2, cricket: _2, crown: _2, crs: _2, cruise: _2, cruises: _2, cuisinella: _2, cymru: _2, cyou: _2, dad: _2, dance: _2, data: _2, date: _2, dating: _2, datsun: _2, day: _2, dclk: _2, dds: _2, deal: _2, dealer: _2, deals: _2, degree: _2, delivery: _2, dell: _2, deloitte: _2, delta: _2, democrat: _2, dental: _2, dentist: _2, desi: _2, design: [1, { graphic: _3, bss: _3 }], dev: [1, { myaddr: _3, panel: _3, bearblog: _3, brave: _7, lcl: _6, lclstage: _6, stg: _6, stgstage: _6, pages: _3, r2: _3, workers: _3, deno: _3, "deno-staging": _3, deta: _3, lp: [2, { api: _3, objects: _3 }], evervault: _8, fly: _3, githubpreview: _3, gateway: _6, grebedoc: _3, botdash: _3, inbrowser: _6, "is-a-good": _3, iserv: _3, leapcell: _3, runcontainers: _3, localcert: [0, { user: _6 }], loginline: _3, barsy: _3, mediatech: _3, "mocha-sandbox": _3, modx: _3, ngrok: _3, "ngrok-free": _3, "is-a-fullstack": _3, "is-cool": _3, "is-not-a": _3, localplayer: _3, xmit: _3, "platter-app": _3, replit: [2, { archer: _3, bones: _3, canary: _3, global: _3, hacker: _3, id: _3, janeway: _3, kim: _3, kira: _3, kirk: _3, odo: _3, paris: _3, picard: _3, pike: _3, prerelease: _3, reed: _3, riker: _3, sisko: _3, spock: _3, staging: _3, sulu: _3, tarpit: _3, teams: _3, tucker: _3, wesley: _3, worf: _3 }], crm: [0, { aa: _6, ab: _6, ac: _6, ad: _6, ae: _6, af: _6, ci: _6, d: _6, pa: _6, pb: _6, pc: _6, pd: _6, pe: _6, pf: _6, w: _6, wa: _6, wb: _6, wc: _6, wd: _6, we: _6, wf: _6 }], erp: _51, vercel: _3, webhare: _6, hrsn: _3, "is-a": _3 }], dhl: _2, diamonds: _2, diet: _2, digital: [1, { cloudapps: [2, { london: _3 }] }], direct: [1, { libp2p: _3 }], directory: _2, discount: _2, discover: _2, dish: _2, diy: [1, { discourse: _3, imagine: _3 }], dnp: _2, docs: _2, doctor: _2, dog: _2, domains: _2, dot: _2, download: _2, drive: _2, dtv: _2, dubai: _2, dupont: _2, durban: _2, dvag: _2, dvr: _2, earth: _2, eat: _2, eco: _2, edeka: _2, education: _22, email: [1, { crisp: [0, { on: _3 }], intouch: _3, tawk: _53, tawkto: _53 }], emerck: _2, energy: _2, engineer: _2, engineering: _2, enterprises: _2, epson: _2, equipment: _2, ericsson: _2, erni: _2, esq: _2, estate: [1, { compute: _6 }], eurovision: _2, eus: [1, { party: _54 }], events: [1, { koobin: _3, co: _3 }], exchange: _2, expert: _2, exposed: _2, express: _2, extraspace: _2, fage: _2, fail: _2, fairwinds: _2, faith: _2, family: _2, fan: _2, fans: _2, farm: [1, { storj: _3 }], farmers: _2, fashion: _2, fast: _2, fedex: _2, feedback: _2, ferrari: _2, ferrero: _2, fidelity: _2, fido: _2, film: _2, final: _2, finance: _2, financial: _22, fire: _2, firestone: _2, firmdale: _2, fish: _2, fishing: _2, fit: _2, fitness: _2, flickr: _2, flights: _2, flir: _2, florist: _2, flowers: _2, fly: _2, foo: _2, food: _2, football: _2, ford: _2, forex: _2, forsale: _2, forum: _2, foundation: _2, fox: _2, free: _2, fresenius: _2, frl: _2, frogans: _2, frontier: _2, ftr: _2, fujitsu: _2, fun: _55, fund: _2, furniture: _2, futbol: _2, fyi: _2, gal: _2, gallery: _2, gallo: _2, gallup: _2, game: _2, games: [1, { pley: _3, sheezy: _3 }], gap: _2, garden: _2, gay: [1, { pages: _3 }], gbiz: _2, gdn: [1, { cnpy: _3 }], gea: _2, gent: _2, genting: _2, george: _2, ggee: _2, gift: _2, gifts: _2, gives: _2, giving: _2, glass: _2, gle: _2, global: [1, { appwrite: _3 }], globo: _2, gmail: _2, gmbh: _2, gmo: _2, gmx: _2, godaddy: _2, gold: _2, goldpoint: _2, golf: _2, goodyear: _2, goog: [1, { cloud: _3, translate: _3, usercontent: _6 }], google: _2, gop: _2, got: _2, grainger: _2, graphics: _2, gratis: _2, green: _2, gripe: _2, grocery: _2, group: [1, { discourse: _3 }], gucci: _2, guge: _2, guide: _2, guitars: _2, guru: _2, hair: _2, hamburg: _2, hangout: _2, haus: _2, hbo: _2, hdfc: _2, hdfcbank: _2, health: [1, { hra: _3 }], healthcare: _2, help: _2, helsinki: _2, here: _2, hermes: _2, hiphop: _2, hisamitsu: _2, hitachi: _2, hiv: _2, hkt: _2, hockey: _2, holdings: _2, holiday: _2, homedepot: _2, homegoods: _2, homes: _2, homesense: _2, honda: _2, horse: _2, hospital: _2, host: [1, { cloudaccess: _3, freesite: _3, easypanel: _3, emergent: _3, fastvps: _3, myfast: _3, gadget: _3, tempurl: _3, wpmudev: _3, iserv: _3, jele: _3, mircloud: _3, bolt: _3, wp2: _3, half: _3 }], hosting: [1, { opencraft: _3 }], hot: _2, hotel: _2, hotels: _2, hotmail: _2, house: _2, how: _2, hsbc: _2, hughes: _2, hyatt: _2, hyundai: _2, ibm: _2, icbc: _2, ice: _2, icu: _2, ieee: _2, ifm: _2, ikano: _2, imamat: _2, imdb: _2, immo: _2, immobilien: _2, inc: _2, industries: _2, infiniti: _2, ing: _2, ink: _2, institute: _2, insurance: _2, insure: _2, international: _2, intuit: _2, investments: _2, ipiranga: _2, irish: _2, ismaili: _2, ist: _2, istanbul: _2, itau: _2, itv: _2, jaguar: _2, java: _2, jcb: _2, jeep: _2, jetzt: _2, jewelry: _2, jio: _2, jll: _2, jmp: _2, jnj: _2, joburg: _2, jot: _2, joy: _2, jpmorgan: _2, jprs: _2, juegos: _2, juniper: _2, kaufen: _2, kddi: _2, kerryhotels: _2, kerryproperties: _2, kfh: _2, kia: _2, kids: _2, kim: _2, kindle: _2, kitchen: _2, kiwi: _2, koeln: _2, komatsu: _2, kosher: _2, kpmg: _2, kpn: _2, krd: [1, { co: _3, edu: _3 }], kred: _2, kuokgroup: _2, kyoto: _2, lacaixa: _2, lamborghini: _2, lamer: _2, land: _2, landrover: _2, lanxess: _2, lasalle: _2, lat: _2, latino: _2, latrobe: _2, law: _2, lawyer: _2, lds: _2, lease: _2, leclerc: _2, lefrak: _2, legal: _2, lego: _2, lexus: _2, lgbt: _2, lidl: _2, life: _2, lifeinsurance: _2, lifestyle: _2, lighting: _2, like: _2, lilly: _2, limited: _2, limo: _2, lincoln: _2, link: [1, { myfritz: _3, cyon: _3, joinmc: _3, dweb: _6, inbrowser: _6, keenetic: _3, nftstorage: _62, mypep: _3, storacha: _62, w3s: _62 }], live: [1, { aem: _3, hlx: _3, ewp: _6 }], living: _2, llc: _2, llp: _2, loan: _2, loans: _2, locker: _2, locus: _2, lol: [1, { omg: _3 }], london: _2, lotte: _2, lotto: _2, love: _2, lpl: _2, lplfinancial: _2, ltd: _2, ltda: _2, lundbeck: _2, luxe: _2, luxury: _2, madrid: _2, maif: _2, maison: _2, makeup: _2, man: _2, management: _2, mango: _2, map: _2, market: _2, marketing: _2, markets: _2, marriott: _2, marshalls: _2, mattel: _2, mba: _2, mckinsey: _2, med: _2, media: _63, meet: _2, melbourne: _2, meme: _2, memorial: _2, men: _2, menu: [1, { barsy: _3, barsyonline: _3 }], merck: _2, merckmsd: _2, miami: _2, microsoft: _2, mini: _2, mint: _2, mit: _2, mitsubishi: _2, mlb: _2, mls: _2, mma: _2, mobile: _2, moda: _2, moe: _2, moi: _2, mom: _2, monash: _2, money: _2, monster: _2, mormon: _2, mortgage: _2, moscow: _2, moto: _2, motorcycles: _2, mov: _2, movie: _2, msd: _2, mtn: _2, mtr: _2, music: _2, nab: _2, nagoya: _2, navy: _2, nba: _2, nec: _2, netbank: _2, netflix: _2, network: [1, { aem: _3, alces: _6, appwrite: _3, co: _3, arvo: _3, azimuth: _3, tlon: _3 }], neustar: _2, new: _2, news: [1, { noticeable: _3 }], next: _2, nextdirect: _2, nexus: _2, nfl: _2, ngo: _2, nhk: _2, nico: _2, nike: _2, nikon: _2, ninja: _2, nissan: _2, nissay: _2, nokia: _2, norton: _2, now: _2, nowruz: _2, nowtv: _2, nra: _2, nrw: _2, ntt: _2, nyc: _2, obi: _2, observer: _2, office: _2, okinawa: _2, olayan: _2, olayangroup: _2, ollo: _2, omega: _2, one: [1, { kin: _6, service: _3, website: _3 }], ong: _2, onl: _2, online: [1, { eero: _3, "eero-stage": _3, websitebuilder: _3, leapcell: _3, barsy: _3 }], ooo: _2, open: _2, oracle: _2, orange: [1, { tech: _3 }], organic: _2, origins: _2, osaka: _2, otsuka: _2, ott: _2, ovh: [1, { nerdpol: _3 }], page: [1, { aem: _3, hlx: _3, codeberg: _3, deuxfleurs: _3, mybox: _3, heyflow: _3, prvcy: _3, rocky: _3, statichost: _3, pdns: _3, plesk: _3 }], panasonic: _2, paris: _2, pars: _2, partners: _2, parts: _2, party: _2, pay: _2, pccw: _2, pet: _2, pfizer: _2, pharmacy: _2, phd: _2, philips: _2, phone: _2, photo: _2, photography: _2, photos: _63, physio: _2, pics: _2, pictet: _2, pictures: [1, { "1337": _3 }], pid: _2, pin: _2, ping: _2, pink: _2, pioneer: _2, pizza: [1, { ngrok: _3 }], place: _22, play: _2, playstation: _2, plumbing: _2, plus: [1, { playit: [2, { at: _6, with: _3 }] }], pnc: _2, pohl: _2, poker: _2, politie: _2, porn: _2, praxi: _2, press: _2, prime: _2, prod: _2, productions: _2, prof: _2, progressive: _2, promo: _2, properties: _2, property: _2, protection: _2, pru: _2, prudential: _2, pub: [1, { id: _6, kin: _6, barsy: _3 }], pwc: _2, qpon: _2, quebec: _2, quest: _2, racing: _2, radio: _2, read: _2, realestate: _2, realtor: _2, realty: _2, recipes: _2, red: _2, redumbrella: _2, rehab: _2, reise: _2, reisen: _2, reit: _2, reliance: _2, ren: _2, rent: _2, rentals: _2, repair: _2, report: _2, republican: _2, rest: _2, restaurant: _2, review: _2, reviews: [1, { aem: _3 }], rexroth: _2, rich: _2, richardli: _2, ricoh: _2, ril: _2, rio: _2, rip: [1, { clan: _3 }], rocks: [1, { myddns: _3, stackit: _3, "lima-city": _3, webspace: _3 }], rodeo: _2, rogers: _2, room: _2, rsvp: _2, rugby: _2, ruhr: _2, run: [1, { appwrite: _6, canva: _3, development: _3, ravendb: _3, liara: [2, { iran: _3 }], lovable: _3, needle: _3, build: _6, code: _6, database: _6, migration: _6, onporter: _3, repl: _3, stackit: _3, val: _51, vercel: _3, wix: _3 }], rwe: _2, ryukyu: _2, saarland: _2, safe: _2, safety: _2, sakura: _2, sale: _2, salon: _2, samsclub: _2, samsung: _2, sandvik: _2, sandvikcoromant: _2, sanofi: _2, sap: _2, sarl: _2, sas: _2, save: _2, saxo: _2, sbi: _2, sbs: _2, scb: _2, schaeffler: _2, schmidt: _2, scholarships: _2, school: _2, schule: _2, schwarz: _2, science: _2, scot: [1, { co: _3, me: _3, org: _3, gov: [2, { service: _3 }] }], search: _2, seat: _2, secure: _2, security: _2, seek: _2, select: _2, sener: _2, services: [1, { loginline: _3 }], seven: _2, sew: _2, sex: _2, sexy: _2, sfr: _2, shangrila: _2, sharp: _2, shell: _2, shia: _2, shiksha: _2, shoes: _2, shop: [1, { base: _3, hoplix: _3, barsy: _3, barsyonline: _3, shopware: _3 }], shopping: _2, shouji: _2, show: _55, silk: _2, sina: _2, singles: _2, site: [1, { square: _3, canva: _26, cloudera: _6, convex: _24, cyon: _3, caffeine: _3, fastvps: _3, figma: _3, "figma-gov": _3, preview: _3, heyflow: _3, jele: _3, jouwweb: _3, loginline: _3, barsy: _3, co: _3, notion: _3, omniwe: _3, opensocial: _3, madethis: _3, support: _3, platformsh: _6, tst: _6, byen: _3, sol: _3, srht: _3, novecore: _3, cpanel: _3, wpsquared: _3, sourcecraft: _3 }], ski: _2, skin: _2, sky: _2, skype: _2, sling: _2, smart: _2, smile: _2, sncf: _2, soccer: _2, social: _2, softbank: _2, software: _2, sohu: _2, solar: _2, solutions: _2, song: _2, sony: _2, soy: _2, spa: _2, space: [1, { myfast: _3, heiyu: _3, hf: [2, { static: _3 }], "app-ionos": _3, project: _3, uber: _3, xs4all: _3 }], sport: _2, spot: _2, srl: _2, stada: _2, staples: _2, star: _2, statebank: _2, statefarm: _2, stc: _2, stcgroup: _2, stockholm: _2, storage: _2, store: [1, { barsy: _3, sellfy: _3, shopware: _3, storebase: _3 }], stream: _2, studio: _2, study: _2, style: _2, sucks: _2, supplies: _2, supply: _2, support: [1, { barsy: _3 }], surf: _2, surgery: _2, suzuki: _2, swatch: _2, swiss: _2, sydney: _2, systems: [1, { knightpoint: _3, miren: _3 }], tab: _2, taipei: _2, talk: _2, taobao: _2, target: _2, tatamotors: _2, tatar: _2, tattoo: _2, tax: _2, taxi: _2, tci: _2, tdk: _2, team: [1, { discourse: _3, jelastic: _3 }], tech: [1, { cleverapps: _3 }], technology: _22, temasek: _2, tennis: _2, teva: _2, thd: _2, theater: _2, theatre: _2, tiaa: _2, tickets: _2, tienda: _2, tips: _2, tires: _2, tirol: _2, tjmaxx: _2, tjx: _2, tkmaxx: _2, tmall: _2, today: [1, { prequalifyme: _3 }], tokyo: _2, tools: [1, { addr: _50, myaddr: _3 }], top: [1, { ntdll: _3, wadl: _6 }], toray: _2, toshiba: _2, total: _2, tours: _2, town: _2, toyota: _2, toys: _2, trade: _2, trading: _2, training: _2, travel: _2, travelers: _2, travelersinsurance: _2, trust: _2, trv: _2, tube: _2, tui: _2, tunes: _2, tushu: _2, tvs: _2, ubank: _2, ubs: _2, unicom: _2, university: _2, uno: _2, uol: _2, ups: _2, vacations: _2, vana: _2, vanguard: _2, vegas: _2, ventures: _2, verisign: _2, versicherung: _2, vet: _2, viajes: _2, video: _2, vig: _2, viking: _2, villas: _2, vin: _2, vip: [1, { hidns: _3 }], virgin: _2, visa: _2, vision: _2, viva: _2, vivo: _2, vlaanderen: _2, vodka: _2, volvo: _2, vote: _2, voting: _2, voto: _2, voyage: _2, wales: _2, walmart: _2, walter: _2, wang: _2, wanggou: _2, watch: _2, watches: _2, weather: _2, weatherchannel: _2, webcam: _2, weber: _2, website: _63, wed: _2, wedding: _2, weibo: _2, weir: _2, whoswho: _2, wien: _2, wiki: _63, williamhill: _2, win: _2, windows: _2, wine: _2, winners: _2, wme: _2, woodside: _2, work: [1, { "imagine-proxy": _3 }], works: _2, world: _2, wow: _2, wtc: _2, wtf: _2, xbox: _2, xerox: _2, xihuan: _2, xin: _2, "xn--11b4c3d": _2, "\u0915\u0949\u092E": _2, "xn--1ck2e1b": _2, "\u30BB\u30FC\u30EB": _2, "xn--1qqw23a": _2, "\u4F5B\u5C71": _2, "xn--30rr7y": _2, "\u6148\u5584": _2, "xn--3bst00m": _2, "\u96C6\u56E2": _2, "xn--3ds443g": _2, "\u5728\u7EBF": _2, "xn--3pxu8k": _2, "\u70B9\u770B": _2, "xn--42c2d9a": _2, "\u0E04\u0E2D\u0E21": _2, "xn--45q11c": _2, "\u516B\u5366": _2, "xn--4gbrim": _2, "\u0645\u0648\u0642\u0639": _2, "xn--55qw42g": _2, "\u516C\u76CA": _2, "xn--55qx5d": _2, "\u516C\u53F8": _2, "xn--5su34j936bgsg": _2, "\u9999\u683C\u91CC\u62C9": _2, "xn--5tzm5g": _2, "\u7F51\u7AD9": _2, "xn--6frz82g": _2, "\u79FB\u52A8": _2, "xn--6qq986b3xl": _2, "\u6211\u7231\u4F60": _2, "xn--80adxhks": _2, "\u043C\u043E\u0441\u043A\u0432\u0430": _2, "xn--80aqecdr1a": _2, "\u043A\u0430\u0442\u043E\u043B\u0438\u043A": _2, "xn--80asehdb": _2, "\u043E\u043D\u043B\u0430\u0439\u043D": _2, "xn--80aswg": _2, "\u0441\u0430\u0439\u0442": _2, "xn--8y0a063a": _2, "\u8054\u901A": _2, "xn--9dbq2a": _2, "\u05E7\u05D5\u05DD": _2, "xn--9et52u": _2, "\u65F6\u5C1A": _2, "xn--9krt00a": _2, "\u5FAE\u535A": _2, "xn--b4w605ferd": _2, "\u6DE1\u9A6C\u9521": _2, "xn--bck1b9a5dre4c": _2, "\u30D5\u30A1\u30C3\u30B7\u30E7\u30F3": _2, "xn--c1avg": _2, "\u043E\u0440\u0433": _2, "xn--c2br7g": _2, "\u0928\u0947\u091F": _2, "xn--cck2b3b": _2, "\u30B9\u30C8\u30A2": _2, "xn--cckwcxetd": _2, "\u30A2\u30DE\u30BE\u30F3": _2, "xn--cg4bki": _2, "\uC0BC\uC131": _2, "xn--czr694b": _2, "\u5546\u6807": _2, "xn--czrs0t": _2, "\u5546\u5E97": _2, "xn--czru2d": _2, "\u5546\u57CE": _2, "xn--d1acj3b": _2, "\u0434\u0435\u0442\u0438": _2, "xn--eckvdtc9d": _2, "\u30DD\u30A4\u30F3\u30C8": _2, "xn--efvy88h": _2, "\u65B0\u95FB": _2, "xn--fct429k": _2, "\u5BB6\u96FB": _2, "xn--fhbei": _2, "\u0643\u0648\u0645": _2, "xn--fiq228c5hs": _2, "\u4E2D\u6587\u7F51": _2, "xn--fiq64b": _2, "\u4E2D\u4FE1": _2, "xn--fjq720a": _2, "\u5A31\u4E50": _2, "xn--flw351e": _2, "\u8C37\u6B4C": _2, "xn--fzys8d69uvgm": _2, "\u96FB\u8A0A\u76C8\u79D1": _2, "xn--g2xx48c": _2, "\u8D2D\u7269": _2, "xn--gckr3f0f": _2, "\u30AF\u30E9\u30A6\u30C9": _2, "xn--gk3at1e": _2, "\u901A\u8CA9": _2, "xn--hxt814e": _2, "\u7F51\u5E97": _2, "xn--i1b6b1a6a2e": _2, "\u0938\u0902\u0917\u0920\u0928": _2, "xn--imr513n": _2, "\u9910\u5385": _2, "xn--io0a7i": _2, "\u7F51\u7EDC": _2, "xn--j1aef": _2, "\u043A\u043E\u043C": _2, "xn--jlq480n2rg": _2, "\u4E9A\u9A6C\u900A": _2, "xn--jvr189m": _2, "\u98DF\u54C1": _2, "xn--kcrx77d1x4a": _2, "\u98DE\u5229\u6D66": _2, "xn--kput3i": _2, "\u624B\u673A": _2, "xn--mgba3a3ejt": _2, "\u0627\u0631\u0627\u0645\u0643\u0648": _2, "xn--mgba7c0bbn0a": _2, "\u0627\u0644\u0639\u0644\u064A\u0627\u0646": _2, "xn--mgbab2bd": _2, "\u0628\u0627\u0632\u0627\u0631": _2, "xn--mgbca7dzdo": _2, "\u0627\u0628\u0648\u0638\u0628\u064A": _2, "xn--mgbi4ecexp": _2, "\u0643\u0627\u062B\u0648\u0644\u064A\u0643": _2, "xn--mgbt3dhd": _2, "\u0647\u0645\u0631\u0627\u0647": _2, "xn--mk1bu44c": _2, "\uB2F7\uCEF4": _2, "xn--mxtq1m": _2, "\u653F\u5E9C": _2, "xn--ngbc5azd": _2, "\u0634\u0628\u0643\u0629": _2, "xn--ngbe9e0a": _2, "\u0628\u064A\u062A\u0643": _2, "xn--ngbrx": _2, "\u0639\u0631\u0628": _2, "xn--nqv7f": _2, "\u673A\u6784": _2, "xn--nqv7fs00ema": _2, "\u7EC4\u7EC7\u673A\u6784": _2, "xn--nyqy26a": _2, "\u5065\u5EB7": _2, "xn--otu796d": _2, "\u62DB\u8058": _2, "xn--p1acf": [1, { "xn--90amc": _3, "xn--j1aef": _3, "xn--j1ael8b": _3, "xn--h1ahn": _3, "xn--j1adp": _3, "xn--c1avg": _3, "xn--80aaa0cvac": _3, "xn--h1aliz": _3, "xn--90a1af": _3, "xn--41a": _3 }], "\u0440\u0443\u0441": [1, { "\u0431\u0438\u0437": _3, "\u043A\u043E\u043C": _3, "\u043A\u0440\u044B\u043C": _3, "\u043C\u0438\u0440": _3, "\u043C\u0441\u043A": _3, "\u043E\u0440\u0433": _3, "\u0441\u0430\u043C\u0430\u0440\u0430": _3, "\u0441\u043E\u0447\u0438": _3, "\u0441\u043F\u0431": _3, "\u044F": _3 }], "xn--pssy2u": _2, "\u5927\u62FF": _2, "xn--q9jyb4c": _2, "\u307F\u3093\u306A": _2, "xn--qcka1pmc": _2, "\u30B0\u30FC\u30B0\u30EB": _2, "xn--rhqv96g": _2, "\u4E16\u754C": _2, "xn--rovu88b": _2, "\u66F8\u7C4D": _2, "xn--ses554g": _2, "\u7F51\u5740": _2, "xn--t60b56a": _2, "\uB2F7\uB137": _2, "xn--tckwe": _2, "\u30B3\u30E0": _2, "xn--tiq49xqyj": _2, "\u5929\u4E3B\u6559": _2, "xn--unup4y": _2, "\u6E38\u620F": _2, "xn--vermgensberater-ctb": _2, "verm\xF6gensberater": _2, "xn--vermgensberatung-pwb": _2, "verm\xF6gensberatung": _2, "xn--vhquv": _2, "\u4F01\u4E1A": _2, "xn--vuq861b": _2, "\u4FE1\u606F": _2, "xn--w4r85el8fhu5dnra": _2, "\u5609\u91CC\u5927\u9152\u5E97": _2, "xn--w4rs40l": _2, "\u5609\u91CC": _2, "xn--xhq521b": _2, "\u5E7F\u4E1C": _2, "xn--zfr164b": _2, "\u653F\u52A1": _2, xyz: [1, { caffeine: _3, botdash: _3, telebit: _6 }], yachts: _2, yahoo: _2, yamaxun: _2, yandex: _2, yodobashi: _2, yoga: _2, yokohama: _2, you: _2, youtube: _2, yun: _2, zappos: _2, zara: _2, zero: _2, zip: _2, zone: [1, { triton: _6, stackit: _3, lima: _3 }], zuerich: _2 }]; - return rules2; - }(); - var RESULT = getEmptyResult(); - exports.getDomain = getDomain; - exports.getDomainWithoutSuffix = getDomainWithoutSuffix; - exports.getHostname = getHostname; - exports.getPublicSuffix = getPublicSuffix; - exports.getSubdomain = getSubdomain; - exports.parse = parse; -}); - -// node_modules/fetch-cookie/node_modules/tough-cookie/dist/index.cjs -var require_dist2 = __commonJS((exports, module) => { - function pathMatch(reqPath, cookiePath) { - if (cookiePath === reqPath) { - return true; - } - const idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - if (cookiePath[cookiePath.length - 1] === "/") { - return true; - } - if (reqPath.startsWith(cookiePath) && reqPath[cookiePath.length] === "/") { - return true; - } - } - return false; - } - function getPublicSuffix(domain, options = {}) { - options = { ...defaultGetPublicSuffixOptions, ...options }; - const domainParts = domain.split("."); - const topLevelDomain = domainParts[domainParts.length - 1]; - const allowSpecialUseDomain = !!options.allowSpecialUseDomain; - const ignoreError = !!options.ignoreError; - if (allowSpecialUseDomain && topLevelDomain !== undefined && SPECIAL_USE_DOMAINS.includes(topLevelDomain)) { - if (domainParts.length > 1) { - const secondLevelDomain = domainParts[domainParts.length - 2]; - return `${secondLevelDomain}.${topLevelDomain}`; - } else if (SPECIAL_TREATMENT_DOMAINS.includes(topLevelDomain)) { - return topLevelDomain; - } - } - if (!ignoreError && topLevelDomain !== undefined && SPECIAL_USE_DOMAINS.includes(topLevelDomain)) { - throw new Error(`Cookie has domain set to the public suffix "${topLevelDomain}" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain: true, rejectPublicSuffixes: false}.`); - } - const publicSuffix = (0, import_tldts.getDomain)(domain, { - allowIcannDomains: true, - allowPrivateDomains: true - }); - if (publicSuffix) - return publicSuffix; - } - function permuteDomain(domain, allowSpecialUseDomain) { - const pubSuf = getPublicSuffix(domain, { - allowSpecialUseDomain - }); - if (!pubSuf) { - return; - } - if (pubSuf == domain) { - return [domain]; - } - if (domain.slice(-1) == ".") { - domain = domain.slice(0, -1); - } - const prefix = domain.slice(0, -(pubSuf.length + 1)); - const parts = prefix.split(".").reverse(); - let cur = pubSuf; - const permutations = [cur]; - while (parts.length) { - const part = parts.shift(); - cur = `${part}.${cur}`; - permutations.push(cur); - } - return permutations; - } - function createPromiseCallback(cb) { - let callback; - let resolve; - let reject; - const promise = new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - }); - if (typeof cb === "function") { - callback = (err, result) => { - try { - if (err) - cb(err); - else - cb(null, result); - } catch (e) { - reject(e instanceof Error ? e : new Error); - } - }; - } else { - callback = (err, result) => { - try { - if (err) - reject(err); - else - resolve(result); - } catch (e) { - reject(e instanceof Error ? e : new Error); - } - }; - } - return { - promise, - callback, - resolve: (value) => { - callback(null, value); - return promise; - }, - reject: (error) => { - callback(error); - return promise; - } - }; - } - function inOperator(k, o) { - return k in o; - } - function isNonEmptyString(data) { - return isString(data) && data !== ""; - } - function isEmptyString(data) { - return data === "" || data instanceof String && data.toString() === ""; - } - function isString(data) { - return typeof data === "string" || data instanceof String; - } - function isObject(data) { - return objectToString(data) === "[object Object]"; - } - function validate(bool, cbOrMessage, message) { - if (bool) - return; - const cb = typeof cbOrMessage === "function" ? cbOrMessage : undefined; - let options = typeof cbOrMessage === "function" ? message : cbOrMessage; - if (!isObject(options)) - options = "[object Object]"; - const err = new ParameterError(safeToString(options)); - if (cb) - cb(err); - else - throw err; - } - function domainToASCII(domain) { - return new URL(`http://${domain}`).hostname; - } - function canonicalDomain(domainName) { - if (domainName == null) { - return; - } - let str = domainName.trim().replace(/^\./, ""); - if (IP_V6_REGEX_OBJECT.test(str)) { - if (!str.startsWith("[")) { - str = "[" + str; - } - if (!str.endsWith("]")) { - str = str + "]"; - } - return domainToASCII(str).slice(1, -1); - } - if (/[^\u0001-\u007f]/.test(str)) { - return domainToASCII(str); - } - return str.toLowerCase(); - } - function formatDate(date) { - return date.toUTCString(); - } - function parseDate(cookieDate) { - if (!cookieDate) { - return; - } - const flags = { - foundTime: undefined, - foundDayOfMonth: undefined, - foundMonth: undefined, - foundYear: undefined - }; - const dateTokens = cookieDate.split(DELIMITER).filter((token) => token.length > 0); - for (const dateToken of dateTokens) { - if (flags.foundTime === undefined) { - const [, hours, minutes, seconds] = TIME.exec(dateToken) || []; - if (hours != null && minutes != null && seconds != null) { - const parsedHours = parseInt(hours, 10); - const parsedMinutes = parseInt(minutes, 10); - const parsedSeconds = parseInt(seconds, 10); - if (!isNaN(parsedHours) && !isNaN(parsedMinutes) && !isNaN(parsedSeconds)) { - flags.foundTime = { - hours: parsedHours, - minutes: parsedMinutes, - seconds: parsedSeconds - }; - continue; - } - } - } - if (flags.foundDayOfMonth === undefined && DAY_OF_MONTH.test(dateToken)) { - const dayOfMonth = parseInt(dateToken, 10); - if (!isNaN(dayOfMonth)) { - flags.foundDayOfMonth = dayOfMonth; - continue; - } - } - if (flags.foundMonth === undefined && MONTH.test(dateToken)) { - const month = months.indexOf(dateToken.substring(0, 3).toLowerCase()); - if (month >= 0 && month <= 11) { - flags.foundMonth = month; - continue; - } - } - if (flags.foundYear === undefined && YEAR.test(dateToken)) { - const parsedYear = parseInt(dateToken, 10); - if (!isNaN(parsedYear)) { - flags.foundYear = parsedYear; - continue; - } - } - } - if (flags.foundYear !== undefined && flags.foundYear >= 70 && flags.foundYear <= 99) { - flags.foundYear += 1900; - } - if (flags.foundYear !== undefined && flags.foundYear >= 0 && flags.foundYear <= 69) { - flags.foundYear += 2000; - } - if (flags.foundDayOfMonth === undefined || flags.foundMonth === undefined || flags.foundYear === undefined || flags.foundTime === undefined) { - return; - } - if (flags.foundDayOfMonth < 1 || flags.foundDayOfMonth > 31) { - return; - } - if (flags.foundYear < 1601) { - return; - } - if (flags.foundTime.hours > 23) { - return; - } - if (flags.foundTime.minutes > 59) { - return; - } - if (flags.foundTime.seconds > 59) { - return; - } - const date = new Date(Date.UTC(flags.foundYear, flags.foundMonth, flags.foundDayOfMonth, flags.foundTime.hours, flags.foundTime.minutes, flags.foundTime.seconds)); - if (date.getUTCFullYear() !== flags.foundYear || date.getUTCMonth() !== flags.foundMonth || date.getUTCDate() !== flags.foundDayOfMonth) { - return; - } - return date; - } - function trimTerminator(str) { - if (isEmptyString(str)) - return str; - for (let t = 0;t < TERMINATORS.length; t++) { - const terminator = TERMINATORS[t]; - const terminatorIdx = terminator ? str.indexOf(terminator) : -1; - if (terminatorIdx !== -1) { - str = str.slice(0, terminatorIdx); - } - } - return str; - } - function parseCookiePair(cookiePair, looseMode) { - cookiePair = trimTerminator(cookiePair); - let firstEq = cookiePair.indexOf("="); - if (looseMode) { - if (firstEq === 0) { - cookiePair = cookiePair.substring(1); - firstEq = cookiePair.indexOf("="); - } - } else { - if (firstEq <= 0) { - return; - } - } - let cookieName, cookieValue; - if (firstEq <= 0) { - cookieName = ""; - cookieValue = cookiePair.trim(); - } else { - cookieName = cookiePair.slice(0, firstEq).trim(); - cookieValue = cookiePair.slice(firstEq + 1).trim(); - } - if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { - return; - } - const c = new Cookie; - c.key = cookieName; - c.value = cookieValue; - return c; - } - function parse(str, options) { - if (isEmptyString(str) || !isString(str)) { - return; - } - str = str.trim(); - const firstSemi = str.indexOf(";"); - const cookiePair = firstSemi === -1 ? str : str.slice(0, firstSemi); - const c = parseCookiePair(cookiePair, options?.loose ?? false); - if (!c) { - return; - } - if (firstSemi === -1) { - return c; - } - const unparsed = str.slice(firstSemi + 1).trim(); - if (unparsed.length === 0) { - return c; - } - const cookie_avs = unparsed.split(";"); - while (cookie_avs.length) { - const av = (cookie_avs.shift() ?? "").trim(); - if (av.length === 0) { - continue; - } - const av_sep = av.indexOf("="); - let av_key, av_value; - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.slice(0, av_sep); - av_value = av.slice(av_sep + 1); - } - av_key = av_key.trim().toLowerCase(); - if (av_value) { - av_value = av_value.trim(); - } - switch (av_key) { - case "expires": - if (av_value) { - const exp = parseDate(av_value); - if (exp) { - c.expires = exp; - } - } - break; - case "max-age": - if (av_value) { - if (/^-?[0-9]+$/.test(av_value)) { - const delta = parseInt(av_value, 10); - c.setMaxAge(delta); - } - } - break; - case "domain": - if (av_value) { - const domain = av_value.trim().replace(/^\./, ""); - if (domain) { - c.domain = domain.toLowerCase(); - } - } - break; - case "path": - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - case "secure": - c.secure = true; - break; - case "httponly": - c.httpOnly = true; - break; - case "samesite": - switch (av_value ? av_value.toLowerCase() : "") { - case "strict": - c.sameSite = "strict"; - break; - case "lax": - c.sameSite = "lax"; - break; - case "none": - c.sameSite = "none"; - break; - default: - c.sameSite = undefined; - break; - } - break; - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - return c; - } - function fromJSON(str) { - if (!str || isEmptyString(str)) { - return; - } - let obj; - if (typeof str === "string") { - try { - obj = JSON.parse(str); - } catch { - return; - } - } else { - obj = str; - } - const c = new Cookie; - Cookie.serializableProperties.forEach((prop) => { - if (obj && typeof obj === "object" && inOperator(prop, obj)) { - const val = obj[prop]; - if (val === undefined) { - return; - } - if (inOperator(prop, cookieDefaults) && val === cookieDefaults[prop]) { - return; - } - switch (prop) { - case "key": - case "value": - case "sameSite": - if (typeof val === "string") { - c[prop] = val; - } - break; - case "expires": - case "creation": - case "lastAccessed": - if (typeof val === "number" || typeof val === "string" || val instanceof Date) { - c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(val); - } else if (val === null) { - c[prop] = null; - } - break; - case "maxAge": - if (typeof val === "number" || val === "Infinity" || val === "-Infinity") { - c[prop] = val; - } - break; - case "domain": - case "path": - if (typeof val === "string" || val === null) { - c[prop] = val; - } - break; - case "secure": - case "httpOnly": - if (typeof val === "boolean") { - c[prop] = val; - } - break; - case "extensions": - if (Array.isArray(val) && val.every((item) => typeof item === "string")) { - c[prop] = val; - } - break; - case "hostOnly": - case "pathIsDefault": - if (typeof val === "boolean" || val === null) { - c[prop] = val; - } - break; - } - } - }); - return c; - } - function cookieCompare(a, b) { - let cmp; - const aPathLen = a.path ? a.path.length : 0; - const bPathLen = b.path ? b.path.length : 0; - cmp = bPathLen - aPathLen; - if (cmp !== 0) { - return cmp; - } - const aTime = a.creation && a.creation instanceof Date ? a.creation.getTime() : MAX_TIME; - const bTime = b.creation && b.creation instanceof Date ? b.creation.getTime() : MAX_TIME; - cmp = aTime - bTime; - if (cmp !== 0) { - return cmp; - } - cmp = (a.creationIndex || 0) - (b.creationIndex || 0); - return cmp; - } - function defaultPath(path) { - if (!path || path.slice(0, 1) !== "/") { - return "/"; - } - if (path === "/") { - return path; - } - const rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - return path.slice(0, rightSlash); - } - function domainMatch(domain, cookieDomain, canonicalize) { - if (domain == null || cookieDomain == null) { - return; - } - let _str; - let _domStr; - if (canonicalize !== false) { - _str = canonicalDomain(domain); - _domStr = canonicalDomain(cookieDomain); - } else { - _str = domain; - _domStr = cookieDomain; - } - if (_str == null || _domStr == null) { - return; - } - if (_str == _domStr) { - return true; - } - const idx = _str.lastIndexOf(_domStr); - if (idx <= 0) { - return false; - } - if (_str.length !== _domStr.length + idx) { - return false; - } - if (_str.substring(idx - 1, idx) !== ".") { - return false; - } - return !IP_REGEX_LOWERCASE.test(_str); - } - function isLoopbackV4(address) { - const octets = address.split("."); - return octets.length === 4 && octets[0] !== undefined && parseInt(octets[0], 10) === 127; - } - function isLoopbackV6(address) { - return address === "::1"; - } - function isNormalizedLocalhostTLD(lowerHost) { - return lowerHost.endsWith(".localhost"); - } - function isLocalHostname(host) { - const lowerHost = host.toLowerCase(); - return lowerHost === "localhost" || isNormalizedLocalhostTLD(lowerHost); - } - function hostNoBrackets(host) { - if (host.length >= 2 && host.startsWith("[") && host.endsWith("]")) { - return host.substring(1, host.length - 1); - } - return host; - } - function isPotentiallyTrustworthy(inputUrl, allowSecureOnLocal = true) { - let url; - if (typeof inputUrl === "string") { - try { - url = new URL(inputUrl); - } catch { - return false; - } - } else { - url = inputUrl; - } - const scheme = url.protocol.replace(":", "").toLowerCase(); - const hostname = hostNoBrackets(url.hostname).replace(/\.+$/, ""); - if (scheme === "https" || scheme === "wss") { - return true; - } - if (!allowSecureOnLocal) { - return false; - } - if (IP_V4_REGEX_OBJECT.test(hostname)) { - return isLoopbackV4(hostname); - } - if (IP_V6_REGEX_OBJECT.test(hostname)) { - return isLoopbackV6(hostname); - } - return isLocalHostname(hostname); - } - function getCookieContext(url) { - if (url && typeof url === "object" && "hostname" in url && typeof url.hostname === "string" && "pathname" in url && typeof url.pathname === "string" && "protocol" in url && typeof url.protocol === "string") { - return { - hostname: url.hostname, - pathname: url.pathname, - protocol: url.protocol - }; - } else if (typeof url === "string") { - try { - return new URL(decodeURI(url)); - } catch { - return new URL(url); - } - } else { - throw new ParameterError("`url` argument is not a string or URL."); - } - } - function checkSameSiteContext(value) { - const context = String(value).toLowerCase(); - if (context === "none" || context === "lax" || context === "strict") { - return context; - } else { - return; - } - } - function isSecurePrefixConditionMet(cookie) { - const startsWithSecurePrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Secure-"); - return !startsWithSecurePrefix || cookie.secure; - } - function isHostPrefixConditionMet(cookie) { - const startsWithHostPrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Host-"); - return !startsWithHostPrefix || Boolean(cookie.secure && cookie.hostOnly && cookie.path != null && cookie.path === "/"); - } - function getNormalizedPrefixSecurity(prefixSecurity) { - const normalizedPrefixSecurity = prefixSecurity.toLowerCase(); - switch (normalizedPrefixSecurity) { - case PrefixSecurityEnum.STRICT: - case PrefixSecurityEnum.SILENT: - case PrefixSecurityEnum.DISABLED: - return normalizedPrefixSecurity; - default: - return PrefixSecurityEnum.SILENT; - } - } - function permutePath(path) { - if (path === "/") { - return ["/"]; - } - const permutations = [path]; - while (path.length > 1) { - const lindex = path.lastIndexOf("/"); - if (lindex === 0) { - break; - } - path = path.slice(0, lindex); - permutations.push(path); - } - permutations.push("/"); - return permutations; - } - function parse2(str, options) { - return Cookie.parse(str, options); - } - function fromJSON2(str) { - return Cookie.fromJSON(str); - } - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod); - var index_exports = {}; - __export(index_exports, { - Cookie: () => Cookie, - CookieJar: () => CookieJar, - MemoryCookieStore: () => MemoryCookieStore, - ParameterError: () => ParameterError, - PrefixSecurityEnum: () => PrefixSecurityEnum, - Store: () => Store, - canonicalDomain: () => canonicalDomain, - cookieCompare: () => cookieCompare, - defaultPath: () => defaultPath, - domainMatch: () => domainMatch, - formatDate: () => formatDate, - fromJSON: () => fromJSON2, - getPublicSuffix: () => getPublicSuffix, - parse: () => parse2, - parseDate: () => parseDate, - pathMatch: () => pathMatch, - permuteDomain: () => permuteDomain, - permutePath: () => permutePath, - version: () => version - }); - module.exports = __toCommonJS2(index_exports); - var import_tldts = require_cjs(); - var SPECIAL_USE_DOMAINS = ["local", "example", "invalid", "localhost", "test"]; - var SPECIAL_TREATMENT_DOMAINS = ["localhost", "invalid"]; - var defaultGetPublicSuffixOptions = { - allowSpecialUseDomain: false, - ignoreError: false - }; - var Store = class { - constructor() { - this.synchronous = false; - } - findCookie(_domain, _path, _key, _callback) { - throw new Error("findCookie is not implemented"); - } - findCookies(_domain, _path, _allowSpecialUseDomain = false, _callback) { - throw new Error("findCookies is not implemented"); - } - putCookie(_cookie, _callback) { - throw new Error("putCookie is not implemented"); - } - updateCookie(_oldCookie, _newCookie, _callback) { - throw new Error("updateCookie is not implemented"); - } - removeCookie(_domain, _path, _key, _callback) { - throw new Error("removeCookie is not implemented"); - } - removeCookies(_domain, _path, _callback) { - throw new Error("removeCookies is not implemented"); - } - removeAllCookies(_callback) { - throw new Error("removeAllCookies is not implemented"); - } - getAllCookies(_callback) { - throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)"); - } - }; - var objectToString = (obj) => Object.prototype.toString.call(obj); - var safeArrayToString = (arr, seenArrays) => { - if (typeof arr.join !== "function") - return objectToString(arr); - seenArrays.add(arr); - const mapped = arr.map((val) => val === null || val === undefined || seenArrays.has(val) ? "" : safeToStringImpl(val, seenArrays)); - return mapped.join(); - }; - var safeToStringImpl = (val, seenArrays = /* @__PURE__ */ new WeakSet) => { - if (typeof val !== "object" || val === null) { - return String(val); - } else if (typeof val.toString === "function") { - return Array.isArray(val) ? safeArrayToString(val, seenArrays) : String(val); - } else { - return objectToString(val); - } - }; - var safeToString = (val) => safeToStringImpl(val); - var MemoryCookieStore = class extends Store { - constructor() { - super(); - this.synchronous = true; - this.idx = /* @__PURE__ */ Object.create(null); - } - findCookie(domain, path, key, callback) { - const promiseCallback = createPromiseCallback(callback); - if (domain == null || path == null || key == null) { - return promiseCallback.resolve(undefined); - } - const result = this.idx[domain]?.[path]?.[key]; - return promiseCallback.resolve(result); - } - findCookies(domain, path, allowSpecialUseDomain = false, callback) { - if (typeof allowSpecialUseDomain === "function") { - callback = allowSpecialUseDomain; - allowSpecialUseDomain = true; - } - const results = []; - const promiseCallback = createPromiseCallback(callback); - if (!domain) { - return promiseCallback.resolve([]); - } - let pathMatcher; - if (!path) { - pathMatcher = function matchAll(domainIndex) { - for (const curPath in domainIndex) { - const pathIndex = domainIndex[curPath]; - for (const key in pathIndex) { - const value = pathIndex[key]; - if (value) { - results.push(value); - } - } - } - }; - } else { - pathMatcher = function matchRFC(domainIndex) { - for (const cookiePath in domainIndex) { - if (pathMatch(path, cookiePath)) { - const pathIndex = domainIndex[cookiePath]; - for (const key in pathIndex) { - const value = pathIndex[key]; - if (value) { - results.push(value); - } - } - } - } - }; - } - const domains = permuteDomain(domain, allowSpecialUseDomain) || [domain]; - const idx = this.idx; - domains.forEach((curDomain) => { - const domainIndex = idx[curDomain]; - if (!domainIndex) { - return; - } - pathMatcher(domainIndex); - }); - return promiseCallback.resolve(results); - } - putCookie(cookie, callback) { - const promiseCallback = createPromiseCallback(callback); - const { domain, path, key } = cookie; - if (domain == null || path == null || key == null) { - return promiseCallback.resolve(undefined); - } - const domainEntry = this.idx[domain] ?? /* @__PURE__ */ Object.create(null); - this.idx[domain] = domainEntry; - const pathEntry = domainEntry[path] ?? /* @__PURE__ */ Object.create(null); - domainEntry[path] = pathEntry; - pathEntry[key] = cookie; - return promiseCallback.resolve(undefined); - } - updateCookie(_oldCookie, newCookie, callback) { - if (callback) - this.putCookie(newCookie, callback); - else - return this.putCookie(newCookie); - } - removeCookie(domain, path, key, callback) { - const promiseCallback = createPromiseCallback(callback); - delete this.idx[domain]?.[path]?.[key]; - return promiseCallback.resolve(undefined); - } - removeCookies(domain, path, callback) { - const promiseCallback = createPromiseCallback(callback); - const domainEntry = this.idx[domain]; - if (domainEntry) { - if (path) { - delete domainEntry[path]; - } else { - delete this.idx[domain]; - } - } - return promiseCallback.resolve(undefined); - } - removeAllCookies(callback) { - const promiseCallback = createPromiseCallback(callback); - this.idx = /* @__PURE__ */ Object.create(null); - return promiseCallback.resolve(undefined); - } - getAllCookies(callback) { - const promiseCallback = createPromiseCallback(callback); - const cookies = []; - const idx = this.idx; - const domains = Object.keys(idx); - domains.forEach((domain) => { - const domainEntry = idx[domain] ?? {}; - const paths = Object.keys(domainEntry); - paths.forEach((path) => { - const pathEntry = domainEntry[path] ?? {}; - const keys = Object.keys(pathEntry); - keys.forEach((key) => { - const keyEntry = pathEntry[key]; - if (keyEntry != null) { - cookies.push(keyEntry); - } - }); - }); - }); - cookies.sort((a, b) => { - return (a.creationIndex || 0) - (b.creationIndex || 0); - }); - return promiseCallback.resolve(cookies); - } - }; - var ParameterError = class extends Error { - }; - var version = "6.0.1"; - var PrefixSecurityEnum = { - SILENT: "silent", - STRICT: "strict", - DISABLED: "unsafe-disabled" - }; - Object.freeze(PrefixSecurityEnum); - var IP_V6_REGEX = ` -\\[?(?: -(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)| -(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)| -(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)| -(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)| -(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)) -)(?:%[0-9a-zA-Z]{1,})?\\]? -`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(); - var IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}\$`); - var IP_V4_REGEX = `(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])`; - var IP_V4_REGEX_OBJECT = new RegExp(`^${IP_V4_REGEX}\$`); - var months = [ - "jan", - "feb", - "mar", - "apr", - "may", - "jun", - "jul", - "aug", - "sep", - "oct", - "nov", - "dec" - ]; - var DELIMITER = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - var TIME = /^(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/; - var DAY_OF_MONTH = /^[0-9]{1,2}(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/; - var MONTH = /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[\x00-\xFF]*$/i; - var YEAR = /^[\x30-\x39]{2,4}(?:[\x00-\x2F\x3A-\xFF][\x00-\xFF]*)?$/; - var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - var CONTROL_CHARS = /[\x00-\x1F]/; - var TERMINATORS = ["\n", "\r", "\0"]; - var cookieDefaults = { - key: "", - value: "", - expires: "Infinity", - maxAge: null, - domain: null, - path: null, - secure: false, - httpOnly: false, - extensions: null, - hostOnly: null, - pathIsDefault: null, - creation: null, - lastAccessed: null, - sameSite: undefined - }; - var _Cookie = class _Cookie2 { - constructor(options = {}) { - this.key = options.key ?? cookieDefaults.key; - this.value = options.value ?? cookieDefaults.value; - this.expires = options.expires ?? cookieDefaults.expires; - this.maxAge = options.maxAge ?? cookieDefaults.maxAge; - this.domain = options.domain ?? cookieDefaults.domain; - this.path = options.path ?? cookieDefaults.path; - this.secure = options.secure ?? cookieDefaults.secure; - this.httpOnly = options.httpOnly ?? cookieDefaults.httpOnly; - this.extensions = options.extensions ?? cookieDefaults.extensions; - this.creation = options.creation ?? cookieDefaults.creation; - this.hostOnly = options.hostOnly ?? cookieDefaults.hostOnly; - this.pathIsDefault = options.pathIsDefault ?? cookieDefaults.pathIsDefault; - this.lastAccessed = options.lastAccessed ?? cookieDefaults.lastAccessed; - this.sameSite = options.sameSite ?? cookieDefaults.sameSite; - this.creation = options.creation ?? /* @__PURE__ */ new Date; - Object.defineProperty(this, "creationIndex", { - configurable: false, - enumerable: false, - writable: true, - value: ++_Cookie2.cookiesCreated - }); - this.creationIndex = _Cookie2.cookiesCreated; - } - [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() { - const now = Date.now(); - const hostOnly = this.hostOnly != null ? this.hostOnly.toString() : "?"; - const createAge = this.creation && this.creation !== "Infinity" ? `${String(now - this.creation.getTime())}ms` : "?"; - const accessAge = this.lastAccessed && this.lastAccessed !== "Infinity" ? `${String(now - this.lastAccessed.getTime())}ms` : "?"; - return `Cookie="${this.toString()}; hostOnly=${hostOnly}; aAge=${accessAge}; cAge=${createAge}"`; - } - toJSON() { - const obj = {}; - for (const prop of _Cookie2.serializableProperties) { - const val = this[prop]; - if (val === cookieDefaults[prop]) { - continue; - } - switch (prop) { - case "key": - case "value": - case "sameSite": - if (typeof val === "string") { - obj[prop] = val; - } - break; - case "expires": - case "creation": - case "lastAccessed": - if (typeof val === "number" || typeof val === "string" || val instanceof Date) { - obj[prop] = val == "Infinity" ? "Infinity" : new Date(val).toISOString(); - } else if (val === null) { - obj[prop] = null; - } - break; - case "maxAge": - if (typeof val === "number" || val === "Infinity" || val === "-Infinity") { - obj[prop] = val; - } - break; - case "domain": - case "path": - if (typeof val === "string" || val === null) { - obj[prop] = val; - } - break; - case "secure": - case "httpOnly": - if (typeof val === "boolean") { - obj[prop] = val; - } - break; - case "extensions": - if (Array.isArray(val)) { - obj[prop] = val; - } - break; - case "hostOnly": - case "pathIsDefault": - if (typeof val === "boolean" || val === null) { - obj[prop] = val; - } - break; - } - } - return obj; - } - clone() { - return fromJSON(this.toJSON()); - } - validate() { - if (!this.value || !COOKIE_OCTETS.test(this.value)) { - return false; - } - if (this.expires != "Infinity" && !(this.expires instanceof Date) && !parseDate(this.expires)) { - return false; - } - if (this.maxAge != null && this.maxAge !== "Infinity" && (this.maxAge === "-Infinity" || this.maxAge <= 0)) { - return false; - } - if (this.path != null && !PATH_VALUE.test(this.path)) { - return false; - } - const cdomain = this.cdomain(); - if (cdomain) { - if (cdomain.match(/\.$/)) { - return false; - } - const suffix = getPublicSuffix(cdomain); - if (suffix == null) { - return false; - } - } - return true; - } - setExpires(exp) { - if (exp instanceof Date) { - this.expires = exp; - } else { - this.expires = parseDate(exp) || "Infinity"; - } - } - setMaxAge(age) { - if (age === Infinity) { - this.maxAge = "Infinity"; - } else if (age === -Infinity) { - this.maxAge = "-Infinity"; - } else { - this.maxAge = age; - } - } - cookieString() { - const val = this.value || ""; - if (this.key) { - return `${this.key}=${val}`; - } - return val; - } - toString() { - let str = this.cookieString(); - if (this.expires != "Infinity") { - if (this.expires instanceof Date) { - str += `; Expires=${formatDate(this.expires)}`; - } - } - if (this.maxAge != null && this.maxAge != Infinity) { - str += `; Max-Age=${String(this.maxAge)}`; - } - if (this.domain && !this.hostOnly) { - str += `; Domain=${this.domain}`; - } - if (this.path) { - str += `; Path=${this.path}`; - } - if (this.secure) { - str += "; Secure"; - } - if (this.httpOnly) { - str += "; HttpOnly"; - } - if (this.sameSite && this.sameSite !== "none") { - if (this.sameSite.toLowerCase() === _Cookie2.sameSiteCanonical.lax.toLowerCase()) { - str += `; SameSite=${_Cookie2.sameSiteCanonical.lax}`; - } else if (this.sameSite.toLowerCase() === _Cookie2.sameSiteCanonical.strict.toLowerCase()) { - str += `; SameSite=${_Cookie2.sameSiteCanonical.strict}`; - } else { - str += `; SameSite=${this.sameSite}`; - } - } - if (this.extensions) { - this.extensions.forEach((ext) => { - str += `; ${ext}`; - }); - } - return str; - } - TTL(now = Date.now()) { - if (this.maxAge != null && typeof this.maxAge === "number") { - return this.maxAge <= 0 ? 0 : this.maxAge * 1000; - } - const expires = this.expires; - if (expires === "Infinity") { - return Infinity; - } - return (expires?.getTime() ?? now) - (now || Date.now()); - } - expiryTime(now) { - if (this.maxAge != null) { - const relativeTo = now || this.lastAccessed || /* @__PURE__ */ new Date; - const maxAge = typeof this.maxAge === "number" ? this.maxAge : -Infinity; - const age = maxAge <= 0 ? -Infinity : maxAge * 1000; - if (relativeTo === "Infinity") { - return Infinity; - } - return relativeTo.getTime() + age; - } - if (this.expires == "Infinity") { - return Infinity; - } - return this.expires ? this.expires.getTime() : undefined; - } - expiryDate(now) { - const millisec = this.expiryTime(now); - if (millisec == Infinity) { - return /* @__PURE__ */ new Date(2147483647000); - } else if (millisec == -Infinity) { - return /* @__PURE__ */ new Date(0); - } else { - return millisec == undefined ? undefined : new Date(millisec); - } - } - isPersistent() { - return this.maxAge != null || this.expires != "Infinity"; - } - canonicalizedDomain() { - return canonicalDomain(this.domain); - } - cdomain() { - return canonicalDomain(this.domain); - } - static parse(str, options) { - return parse(str, options); - } - static fromJSON(str) { - return fromJSON(str); - } - }; - _Cookie.cookiesCreated = 0; - _Cookie.sameSiteLevel = { - strict: 3, - lax: 2, - none: 1 - }; - _Cookie.sameSiteCanonical = { - strict: "Strict", - lax: "Lax" - }; - _Cookie.serializableProperties = [ - "key", - "value", - "expires", - "maxAge", - "domain", - "path", - "secure", - "httpOnly", - "extensions", - "hostOnly", - "pathIsDefault", - "creation", - "lastAccessed", - "sameSite" - ]; - var Cookie = _Cookie; - var MAX_TIME = 2147483647000; - var IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/; - var defaultSetCookieOptions = { - loose: false, - sameSiteContext: undefined, - ignoreError: false, - http: true - }; - var defaultGetCookieOptions = { - http: true, - expire: true, - allPaths: false, - sameSiteContext: undefined, - sort: undefined - }; - var SAME_SITE_CONTEXT_VAL_ERR = 'Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"'; - var CookieJar = class _CookieJar { - constructor(store, options) { - if (typeof options === "boolean") { - options = { rejectPublicSuffixes: options }; - } - this.rejectPublicSuffixes = options?.rejectPublicSuffixes ?? true; - this.enableLooseMode = options?.looseMode ?? false; - this.allowSpecialUseDomain = options?.allowSpecialUseDomain ?? true; - this.allowSecureOnLocal = options?.allowSecureOnLocal ?? true; - this.prefixSecurity = getNormalizedPrefixSecurity(options?.prefixSecurity ?? "silent"); - this.store = store ?? new MemoryCookieStore; - } - callSync(fn) { - if (!this.store.synchronous) { - throw new Error("CookieJar store is not synchronous; use async API instead."); - } - let syncErr = null; - let syncResult = undefined; - try { - fn.call(this, (error, result) => { - syncErr = error; - syncResult = result; - }); - } catch (err) { - syncErr = err; - } - if (syncErr) - throw syncErr; - return syncResult; - } - setCookie(cookie, url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = createPromiseCallback(callback); - const cb = promiseCallback.callback; - let context; - try { - if (typeof url === "string") { - validate(isNonEmptyString(url), callback, safeToString(options)); - } - context = getCookieContext(url); - if (typeof url === "function") { - return promiseCallback.reject(new Error("No URL was specified")); - } - if (typeof options === "function") { - options = defaultSetCookieOptions; - } - validate(typeof cb === "function", cb); - if (!isNonEmptyString(cookie) && !isObject(cookie) && cookie instanceof String && cookie.length == 0) { - return promiseCallback.resolve(undefined); - } - } catch (err) { - return promiseCallback.reject(err); - } - const host = canonicalDomain(context.hostname) ?? null; - const loose = options?.loose || this.enableLooseMode; - let sameSiteContext = null; - if (options?.sameSiteContext) { - sameSiteContext = checkSameSiteContext(options.sameSiteContext); - if (!sameSiteContext) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - } - if (typeof cookie === "string" || cookie instanceof String) { - const parsedCookie = Cookie.parse(cookie.toString(), { loose }); - if (!parsedCookie) { - const err = new Error("Cookie failed to parse"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - cookie = parsedCookie; - } else if (!(cookie instanceof Cookie)) { - const err = new Error("First argument to setCookie must be a Cookie object or string"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - const now = options?.now || /* @__PURE__ */ new Date; - if (this.rejectPublicSuffixes && cookie.domain) { - try { - const cdomain = cookie.cdomain(); - const suffix = typeof cdomain === "string" ? getPublicSuffix(cdomain, { - allowSpecialUseDomain: this.allowSpecialUseDomain, - ignoreError: options?.ignoreError - }) : null; - if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie.domain)) { - const err = new Error("Cookie has domain set to a public suffix"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } catch (err) { - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } - if (cookie.domain) { - if (!domainMatch(host ?? undefined, cookie.cdomain() ?? undefined, false)) { - const err = new Error(`Cookie not in this host's domain. Cookie:${cookie.cdomain() ?? "null"} Request:${host ?? "null"}`); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - if (cookie.hostOnly == null) { - cookie.hostOnly = false; - } - } else { - cookie.hostOnly = true; - cookie.domain = host; - } - if (!cookie.path || cookie.path[0] !== "/") { - cookie.path = defaultPath(context.pathname); - cookie.pathIsDefault = true; - } - if (options?.http === false && cookie.httpOnly) { - const err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); - return options.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - if (cookie.sameSite !== "none" && cookie.sameSite !== undefined && sameSiteContext) { - if (sameSiteContext === "none") { - const err = new Error("Cookie is SameSite but this is a cross-origin request"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } - const ignoreErrorForPrefixSecurity = this.prefixSecurity === PrefixSecurityEnum.SILENT; - const prefixSecurityDisabled = this.prefixSecurity === PrefixSecurityEnum.DISABLED; - if (!prefixSecurityDisabled) { - let errorFound = false; - let errorMsg; - if (!isSecurePrefixConditionMet(cookie)) { - errorFound = true; - errorMsg = "Cookie has __Secure prefix but Secure attribute is not set"; - } else if (!isHostPrefixConditionMet(cookie)) { - errorFound = true; - errorMsg = "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'"; - } - if (errorFound) { - return options?.ignoreError || ignoreErrorForPrefixSecurity ? promiseCallback.resolve(undefined) : promiseCallback.reject(new Error(errorMsg)); - } - } - const store = this.store; - if (!store.updateCookie) { - store.updateCookie = async function(_oldCookie, newCookie, cb2) { - return this.putCookie(newCookie).then(() => cb2?.(null), (error) => cb2?.(error)); - }; - } - const withCookie = function withCookie2(err, oldCookie) { - if (err) { - cb(err); - return; - } - const next = function(err2) { - if (err2) { - cb(err2); - } else if (typeof cookie === "string") { - cb(null, undefined); - } else { - cb(null, cookie); - } - }; - if (oldCookie) { - if (options && "http" in options && options.http === false && oldCookie.httpOnly) { - err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); - if (options.ignoreError) - cb(null, undefined); - else - cb(err); - return; - } - if (cookie instanceof Cookie) { - cookie.creation = oldCookie.creation; - cookie.creationIndex = oldCookie.creationIndex; - cookie.lastAccessed = now; - store.updateCookie(oldCookie, cookie, next); - } - } else { - if (cookie instanceof Cookie) { - cookie.creation = cookie.lastAccessed = now; - store.putCookie(cookie, next); - } - } - }; - store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie); - return promiseCallback.promise; - } - setCookieSync(cookie, url, options) { - const setCookieFn = options ? this.setCookie.bind(this, cookie, url, options) : this.setCookie.bind(this, cookie, url); - return this.callSync(setCookieFn); - } - getCookies(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = defaultGetCookieOptions; - } else if (options === undefined) { - options = defaultGetCookieOptions; - } - const promiseCallback = createPromiseCallback(callback); - const cb = promiseCallback.callback; - let context; - try { - if (typeof url === "string") { - validate(isNonEmptyString(url), cb, url); - } - context = getCookieContext(url); - validate(isObject(options), cb, safeToString(options)); - validate(typeof cb === "function", cb); - } catch (parameterError) { - return promiseCallback.reject(parameterError); - } - const host = canonicalDomain(context.hostname); - const path = context.pathname || "/"; - const potentiallyTrustworthy = isPotentiallyTrustworthy(url, this.allowSecureOnLocal); - let sameSiteLevel = 0; - if (options.sameSiteContext) { - const sameSiteContext = checkSameSiteContext(options.sameSiteContext); - if (sameSiteContext == null) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - sameSiteLevel = Cookie.sameSiteLevel[sameSiteContext]; - if (!sameSiteLevel) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - } - const http = options.http ?? true; - const now = Date.now(); - const expireCheck = options.expire ?? true; - const allPaths = options.allPaths ?? false; - const store = this.store; - function matchingCookie(c) { - if (c.hostOnly) { - if (c.domain != host) { - return false; - } - } else { - if (!domainMatch(host ?? undefined, c.domain ?? undefined, false)) { - return false; - } - } - if (!allPaths && typeof c.path === "string" && !pathMatch(path, c.path)) { - return false; - } - if (c.secure && !potentiallyTrustworthy) { - return false; - } - if (c.httpOnly && !http) { - return false; - } - if (sameSiteLevel) { - let cookieLevel; - if (c.sameSite === "lax") { - cookieLevel = Cookie.sameSiteLevel.lax; - } else if (c.sameSite === "strict") { - cookieLevel = Cookie.sameSiteLevel.strict; - } else { - cookieLevel = Cookie.sameSiteLevel.none; - } - if (cookieLevel > sameSiteLevel) { - return false; - } - } - const expiryTime = c.expiryTime(); - if (expireCheck && expiryTime != null && expiryTime <= now) { - store.removeCookie(c.domain, c.path, c.key, () => { - }); - return false; - } - return true; - } - store.findCookies(host, allPaths ? null : path, this.allowSpecialUseDomain, (err, cookies) => { - if (err) { - cb(err); - return; - } - if (cookies == null) { - cb(null, []); - return; - } - cookies = cookies.filter(matchingCookie); - if ("sort" in options && options.sort !== false) { - cookies = cookies.sort(cookieCompare); - } - const now2 = /* @__PURE__ */ new Date; - for (const cookie of cookies) { - cookie.lastAccessed = now2; - } - cb(null, cookies); - }); - return promiseCallback.promise; - } - getCookiesSync(url, options) { - return this.callSync(this.getCookies.bind(this, url, options)) ?? []; - } - getCookieString(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = createPromiseCallback(callback); - const next = function(err, cookies) { - if (err) { - promiseCallback.callback(err); - } else { - promiseCallback.callback(null, cookies?.sort(cookieCompare).map((c) => c.cookieString()).join("; ")); - } - }; - this.getCookies(url, options, next); - return promiseCallback.promise; - } - getCookieStringSync(url, options) { - return this.callSync(options ? this.getCookieString.bind(this, url, options) : this.getCookieString.bind(this, url)) ?? ""; - } - getSetCookieStrings(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = createPromiseCallback(callback); - const next = function(err, cookies) { - if (err) { - promiseCallback.callback(err); - } else { - promiseCallback.callback(null, cookies?.map((c) => { - return c.toString(); - })); - } - }; - this.getCookies(url, options, next); - return promiseCallback.promise; - } - getSetCookieStringsSync(url, options = {}) { - return this.callSync(this.getSetCookieStrings.bind(this, url, options)) ?? []; - } - serialize(callback) { - const promiseCallback = createPromiseCallback(callback); - let type = this.store.constructor.name; - if (isObject(type)) { - type = null; - } - const serialized = { - version: `tough-cookie@${version}`, - storeType: type, - rejectPublicSuffixes: this.rejectPublicSuffixes, - enableLooseMode: this.enableLooseMode, - allowSpecialUseDomain: this.allowSpecialUseDomain, - prefixSecurity: getNormalizedPrefixSecurity(this.prefixSecurity), - cookies: [] - }; - if (typeof this.store.getAllCookies !== "function") { - return promiseCallback.reject(new Error("store does not support getAllCookies and cannot be serialized")); - } - this.store.getAllCookies((err, cookies) => { - if (err) { - promiseCallback.callback(err); - return; - } - if (cookies == null) { - promiseCallback.callback(null, serialized); - return; - } - serialized.cookies = cookies.map((cookie) => { - const serializedCookie = cookie.toJSON(); - delete serializedCookie.creationIndex; - return serializedCookie; - }); - promiseCallback.callback(null, serialized); - }); - return promiseCallback.promise; - } - serializeSync() { - return this.callSync((callback) => { - this.serialize(callback); - }); - } - toJSON() { - return this.serializeSync(); - } - _importCookies(serialized, callback) { - let cookies = undefined; - if (serialized && typeof serialized === "object" && inOperator("cookies", serialized) && Array.isArray(serialized.cookies)) { - cookies = serialized.cookies; - } - if (!cookies) { - callback(new Error("serialized jar has no cookies array"), undefined); - return; - } - cookies = cookies.slice(); - const putNext = (err) => { - if (err) { - callback(err, undefined); - return; - } - if (Array.isArray(cookies)) { - if (!cookies.length) { - callback(err, this); - return; - } - let cookie; - try { - cookie = Cookie.fromJSON(cookies.shift()); - } catch (e) { - callback(e instanceof Error ? e : new Error, undefined); - return; - } - if (cookie === undefined) { - putNext(null); - return; - } - this.store.putCookie(cookie, putNext); - } - }; - putNext(null); - } - _importCookiesSync(serialized) { - this.callSync(this._importCookies.bind(this, serialized)); - } - clone(newStore, callback) { - if (typeof newStore === "function") { - callback = newStore; - newStore = undefined; - } - const promiseCallback = createPromiseCallback(callback); - const cb = promiseCallback.callback; - this.serialize((err, serialized) => { - if (err) { - return promiseCallback.reject(err); - } - return _CookieJar.deserialize(serialized ?? "", newStore, cb); - }); - return promiseCallback.promise; - } - _cloneSync(newStore) { - const cloneFn = newStore && typeof newStore !== "function" ? this.clone.bind(this, newStore) : this.clone.bind(this); - return this.callSync((callback) => { - cloneFn(callback); - }); - } - cloneSync(newStore) { - if (!newStore) { - return this._cloneSync(); - } - if (!newStore.synchronous) { - throw new Error("CookieJar clone destination store is not synchronous; use async API instead."); - } - return this._cloneSync(newStore); - } - removeAllCookies(callback) { - const promiseCallback = createPromiseCallback(callback); - const cb = promiseCallback.callback; - const store = this.store; - if (typeof store.removeAllCookies === "function" && store.removeAllCookies !== Store.prototype.removeAllCookies) { - store.removeAllCookies(cb); - return promiseCallback.promise; - } - store.getAllCookies((err, cookies) => { - if (err) { - cb(err); - return; - } - if (!cookies) { - cookies = []; - } - if (cookies.length === 0) { - cb(null, undefined); - return; - } - let completedCount = 0; - const removeErrors = []; - const removeCookieCb = function removeCookieCb2(removeErr) { - if (removeErr) { - removeErrors.push(removeErr); - } - completedCount++; - if (completedCount === cookies.length) { - if (removeErrors[0]) - cb(removeErrors[0]); - else - cb(null, undefined); - return; - } - }; - cookies.forEach((cookie) => { - store.removeCookie(cookie.domain, cookie.path, cookie.key, removeCookieCb); - }); - }); - return promiseCallback.promise; - } - removeAllCookiesSync() { - this.callSync((callback) => { - this.removeAllCookies(callback); - }); - } - static deserialize(strOrObj, store, callback) { - if (typeof store === "function") { - callback = store; - store = undefined; - } - const promiseCallback = createPromiseCallback(callback); - let serialized; - if (typeof strOrObj === "string") { - try { - serialized = JSON.parse(strOrObj); - } catch (e) { - return promiseCallback.reject(e instanceof Error ? e : new Error); - } - } else { - serialized = strOrObj; - } - const readSerializedProperty = (property) => { - return serialized && typeof serialized === "object" && inOperator(property, serialized) ? serialized[property] : undefined; - }; - const readSerializedBoolean = (property) => { - const value = readSerializedProperty(property); - return typeof value === "boolean" ? value : undefined; - }; - const readSerializedString = (property) => { - const value = readSerializedProperty(property); - return typeof value === "string" ? value : undefined; - }; - const jar = new _CookieJar(store, { - rejectPublicSuffixes: readSerializedBoolean("rejectPublicSuffixes"), - looseMode: readSerializedBoolean("enableLooseMode"), - allowSpecialUseDomain: readSerializedBoolean("allowSpecialUseDomain"), - prefixSecurity: getNormalizedPrefixSecurity(readSerializedString("prefixSecurity") ?? "silent") - }); - jar._importCookies(serialized, (err) => { - if (err) { - promiseCallback.callback(err); - return; - } - promiseCallback.callback(null, jar); - }); - return promiseCallback.promise; - } - static deserializeSync(strOrObj, store) { - const serialized = typeof strOrObj === "string" ? JSON.parse(strOrObj) : strOrObj; - const readSerializedProperty = (property) => { - return serialized && typeof serialized === "object" && inOperator(property, serialized) ? serialized[property] : undefined; - }; - const readSerializedBoolean = (property) => { - const value = readSerializedProperty(property); - return typeof value === "boolean" ? value : undefined; - }; - const readSerializedString = (property) => { - const value = readSerializedProperty(property); - return typeof value === "string" ? value : undefined; - }; - const jar = new _CookieJar(store, { - rejectPublicSuffixes: readSerializedBoolean("rejectPublicSuffixes"), - looseMode: readSerializedBoolean("enableLooseMode"), - allowSpecialUseDomain: readSerializedBoolean("allowSpecialUseDomain"), - prefixSecurity: getNormalizedPrefixSecurity(readSerializedString("prefixSecurity") ?? "silent") - }); - if (!jar.store.synchronous) { - throw new Error("CookieJar store is not synchronous; use async API instead."); - } - jar._importCookiesSync(serialized); - return jar; - } - static fromJSON(jsonString, store) { - return _CookieJar.deserializeSync(jsonString, store); - } - }; - /*! - * Copyright (c) 2015-2020, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -}); - -// node_modules/set-cookie-parser/lib/set-cookie.js -var require_set_cookie = __commonJS((exports, module) => { - function isForbiddenKey(key) { - return typeof key !== "string" || key in {}; - } - function createNullObj() { - return Object.create(null); - } - function isNonEmptyString(str) { - return typeof str === "string" && !!str.trim(); - } - function parseString(setCookieValue, options) { - var parts = setCookieValue.split(";").filter(isNonEmptyString); - var nameValuePairStr = parts.shift(); - var parsed = parseNameValuePair(nameValuePairStr); - var name = parsed.name; - var value = parsed.value; - options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; - if (isForbiddenKey(name)) { - return null; - } - try { - value = options.decodeValues ? decodeURIComponent(value) : value; - } catch (e) { - console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.", e); - } - var cookie = createNullObj(); - cookie.name = name; - cookie.value = value; - parts.forEach(function(part) { - var sides = part.split("="); - var key = sides.shift().trimLeft().toLowerCase(); - if (isForbiddenKey(key)) { - return; - } - var value2 = sides.join("="); - if (key === "expires") { - cookie.expires = new Date(value2); - } else if (key === "max-age") { - var n = parseInt(value2, 10); - if (!Number.isNaN(n)) - cookie.maxAge = n; - } else if (key === "secure") { - cookie.secure = true; - } else if (key === "httponly") { - cookie.httpOnly = true; - } else if (key === "samesite") { - cookie.sameSite = value2; - } else if (key === "partitioned") { - cookie.partitioned = true; - } else if (key) { - cookie[key] = value2; - } - }); - return cookie; - } - function parseNameValuePair(nameValuePairStr) { - var name = ""; - var value = ""; - var nameValueArr = nameValuePairStr.split("="); - if (nameValueArr.length > 1) { - name = nameValueArr.shift(); - value = nameValueArr.join("="); - } else { - value = nameValuePairStr; - } - return { name, value }; - } - function parse(input, options) { - options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions; - if (!input) { - if (!options.map) { - return []; - } else { - return createNullObj(); - } - } - if (input.headers) { - if (typeof input.headers.getSetCookie === "function") { - input = input.headers.getSetCookie(); - } else if (input.headers["set-cookie"]) { - input = input.headers["set-cookie"]; - } else { - var sch = input.headers[Object.keys(input.headers).find(function(key) { - return key.toLowerCase() === "set-cookie"; - })]; - if (!sch && input.headers.cookie && !options.silent) { - console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."); - } - input = sch; - } - } - if (!Array.isArray(input)) { - input = [input]; - } - if (!options.map) { - return input.filter(isNonEmptyString).map(function(str) { - return parseString(str, options); - }).filter(Boolean); - } else { - var cookies = createNullObj(); - return input.filter(isNonEmptyString).reduce(function(cookies2, str) { - var cookie = parseString(str, options); - if (cookie && !isForbiddenKey(cookie.name)) { - cookies2[cookie.name] = cookie; - } - return cookies2; - }, cookies); - } - } - function splitCookiesString(cookiesString) { - if (Array.isArray(cookiesString)) { - return cookiesString; - } - if (typeof cookiesString !== "string") { - return []; - } - var cookiesStrings = []; - var pos = 0; - var start; - var ch; - var lastComma; - var nextStart; - var cookiesSeparatorFound; - function skipWhitespace() { - while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) { - pos += 1; - } - return pos < cookiesString.length; - } - function notSpecialChar() { - ch = cookiesString.charAt(pos); - return ch !== "=" && ch !== ";" && ch !== ","; - } - while (pos < cookiesString.length) { - start = pos; - cookiesSeparatorFound = false; - while (skipWhitespace()) { - ch = cookiesString.charAt(pos); - if (ch === ",") { - lastComma = pos; - pos += 1; - skipWhitespace(); - nextStart = pos; - while (pos < cookiesString.length && notSpecialChar()) { - pos += 1; - } - if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") { - cookiesSeparatorFound = true; - pos = nextStart; - cookiesStrings.push(cookiesString.substring(start, lastComma)); - start = pos; - } else { - pos = lastComma + 1; - } - } else { - pos += 1; - } - } - if (!cookiesSeparatorFound || pos >= cookiesString.length) { - cookiesStrings.push(cookiesString.substring(start, cookiesString.length)); - } - } - return cookiesStrings; - } - var defaultParseOptions = { - decodeValues: true, - map: false, - silent: false - }; - module.exports = parse; - module.exports.parse = parse; - module.exports.parseString = parseString; - module.exports.splitCookiesString = splitCookiesString; -}); - -// node_modules/fetch-cookie/cjs/index.js -var require_cjs2 = __commonJS((exports, module) => { - function isDomainOrSubdomain(destination, original) { - const orig = new URL(original).hostname; - const dest = new URL(destination).hostname; - return orig === dest || orig.endsWith(`.${dest}`); - } - function parseReferrerPolicy(policyHeader) { - const policyTokens = policyHeader.split(/[,\s]+/); - let policy = ""; - for (const token of policyTokens) { - if (token !== "" && referrerPolicy.has(token)) { - policy = token; - } - } - return policy; - } - function doNothing(init, name) { - } - function callDeleteMethod(init, name) { - init.headers.delete(name); - } - function deleteFromObject(init, name) { - const headers = init.headers; - for (const key of Object.keys(headers)) { - if (key.toLowerCase() === name) { - delete headers[key]; - } - } - } - function identifyDeleteHeader(init) { - if (init.headers == null) { - return doNothing; - } - if (typeof init.headers.delete === "function") { - return callDeleteMethod; - } - return deleteFromObject; - } - function isRedirect(status) { - return redirectStatus.has(status); - } - async function handleRedirect(fetchImpl, init, response) { - switch (init.redirect ?? "follow") { - case "error": - throw new TypeError(`URI requested responded with a redirect and redirect mode is set to error: ${response.url}`); - case "manual": - return response; - case "follow": - break; - default: - throw new TypeError(`Invalid redirect option: ${init.redirect}`); - } - const locationUrl = response.headers.get("location"); - if (locationUrl === null) { - return response; - } - const requestUrl = response.url; - const redirectUrl = new URL(locationUrl, requestUrl).toString(); - const redirectCount = init.redirectCount ?? 0; - const maxRedirect = init.maxRedirect ?? 20; - if (redirectCount >= maxRedirect) { - throw new TypeError(`Reached maximum redirect of ${maxRedirect} for URL: ${requestUrl}`); - } - init = { - ...init, - redirectCount: redirectCount + 1 - }; - const deleteHeader = identifyDeleteHeader(init); - if (!isDomainOrSubdomain(requestUrl, redirectUrl)) { - for (const name of ["authorization", "www-authenticate", "cookie", "cookie2"]) { - deleteHeader(init, name); - } - } - const maybeNodeStreamBody = init.body; - const maybeStreamBody = init.body; - if (response.status !== 303 && init.body != null && (typeof maybeNodeStreamBody.pipe === "function" || typeof maybeStreamBody.pipeTo === "function")) { - throw new TypeError("Cannot follow redirect with body being a readable stream"); - } - if (response.status === 303 || (response.status === 301 || response.status === 302) && init.method === "POST") { - init.method = "GET"; - init.body = undefined; - deleteHeader(init, "content-length"); - } - if (response.headers.has("referrer-policy")) { - init.referrerPolicy = parseReferrerPolicy(response.headers.get("referrer-policy")); - } - deleteHeader(init, "host"); - return await fetchImpl(redirectUrl, init); - } - function addCookiesToRequest(input, init, cookie) { - if (cookie === "") { - return init; - } - const maybeRequest = input; - const maybeHeaders = init.headers; - if (maybeRequest.headers && typeof maybeRequest.headers.append === "function") { - maybeRequest.headers.append("cookie", cookie); - } else if (maybeHeaders && typeof maybeHeaders.append === "function") { - maybeHeaders.append("cookie", cookie); - } else if (Array.isArray(init.headers)) { - const headers = [...init.headers]; - const cookieHeaderIndex = headers.findIndex((header) => header[0].toLowerCase() === "cookie"); - if (cookieHeaderIndex === -1) { - headers.push(["cookie", cookie]); - } else { - headers[cookieHeaderIndex] = ["cookie", cookie]; - } - init = { ...init, headers }; - } else { - init = { ...init, headers: { ...init.headers, cookie } }; - } - return init; - } - function getCookiesFromResponse(response) { - const maybeNodeFetchHeaders = response.headers; - if (typeof maybeNodeFetchHeaders.getAll === "function") { - return maybeNodeFetchHeaders.getAll("set-cookie"); - } - if (typeof maybeNodeFetchHeaders.raw === "function") { - const headers = maybeNodeFetchHeaders.raw(); - if (Array.isArray(headers["set-cookie"])) { - return headers["set-cookie"]; - } - return []; - } - const cookieString = response.headers.get("set-cookie"); - if (cookieString !== null) { - return (0, import_set_cookie_parser.splitCookiesString)(cookieString); - } - return []; - } - function fetchCookie(fetch, jar, ignoreError = true) { - const actualFetch = fetch; - const actualJar = jar ?? new tough.CookieJar; - async function fetchCookieWrapper(input, init) { - const originalInit = init ?? {}; - init = { ...init, redirect: "manual" }; - const requestUrl = typeof input === "string" ? input : ("href" in input) ? input.href : input.url; - const cookie = await actualJar.getCookieString(requestUrl); - init = addCookiesToRequest(input, init, cookie); - const response = await actualFetch(input, init); - const cookies = getCookiesFromResponse(response); - await Promise.all(cookies.map(async (cookie2) => await actualJar.setCookie(cookie2, response.url, { ignoreError }))); - if ((init.redirectCount ?? 0) > 0) { - Object.defineProperty(response, "redirected", { value: true }); - } - if (!isRedirect(response.status)) { - return response; - } - return await handleRedirect(fetchCookieWrapper, originalInit, response); - } - fetchCookieWrapper.toughCookie = tough; - fetchCookieWrapper.cookieJar = actualJar; - return fetchCookieWrapper; - } - var __create2 = Object.create; - var __defProp2 = Object.defineProperty; - var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; - var __getOwnPropNames2 = Object.getOwnPropertyNames; - var __getProtoOf2 = Object.getPrototypeOf; - var __hasOwnProp2 = Object.prototype.hasOwnProperty; - var __export = (target, all) => { - for (var name in all) - __defProp2(target, name, { get: all[name], enumerable: true }); - }; - var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; - }; - var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod)); - var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod); - var src_exports = {}; - __export(src_exports, { - default: () => fetchCookie - }); - module.exports = __toCommonJS2(src_exports); - var tough = __toESM2(require_dist2(), 1); - var import_set_cookie_parser = require_set_cookie(); - var referrerPolicy = /* @__PURE__ */ new Set([ - "", - "no-referrer", - "no-referrer-when-downgrade", - "same-origin", - "origin", - "strict-origin", - "origin-when-cross-origin", - "strict-origin-when-cross-origin", - "unsafe-url" - ]); - var redirectStatus = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]); - fetchCookie.toughCookie = tough; -}); - -// node_modules/tough-cookie/dist/pathMatch.js -var require_pathMatch = __commonJS((exports) => { - function pathMatch(reqPath, cookiePath) { - if (cookiePath === reqPath) { - return true; - } - const idx = reqPath.indexOf(cookiePath); - if (idx === 0) { - if (cookiePath[cookiePath.length - 1] === "/") { - return true; - } - if (reqPath.startsWith(cookiePath) && reqPath[cookiePath.length] === "/") { - return true; - } - } - return false; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.pathMatch = pathMatch; -}); - -// node_modules/tldts/dist/cjs/index.js -var require_cjs3 = __commonJS((exports) => { - function shareSameDomainSuffix(hostname, vhost) { - if (hostname.endsWith(vhost)) { - return hostname.length === vhost.length || hostname[hostname.length - vhost.length - 1] === "."; - } - return false; - } - function extractDomainWithSuffix(hostname, publicSuffix) { - const publicSuffixIndex = hostname.length - publicSuffix.length - 2; - const lastDotBeforeSuffixIndex = hostname.lastIndexOf(".", publicSuffixIndex); - if (lastDotBeforeSuffixIndex === -1) { - return hostname; - } - return hostname.slice(lastDotBeforeSuffixIndex + 1); - } - function getDomain$1(suffix, hostname, options) { - if (options.validHosts !== null) { - const validHosts = options.validHosts; - for (const vhost of validHosts) { - if (shareSameDomainSuffix(hostname, vhost)) { - return vhost; - } - } - } - let numberOfLeadingDots = 0; - if (hostname.startsWith(".")) { - while (numberOfLeadingDots < hostname.length && hostname[numberOfLeadingDots] === ".") { - numberOfLeadingDots += 1; - } - } - if (suffix.length === hostname.length - numberOfLeadingDots) { - return null; - } - return extractDomainWithSuffix(hostname, suffix); - } - function getDomainWithoutSuffix$1(domain, suffix) { - return domain.slice(0, -suffix.length - 1); - } - function extractHostname(url, urlIsValidHostname) { - let start = 0; - let end = url.length; - let hasUpper = false; - if (!urlIsValidHostname) { - if (url.startsWith("data:")) { - return null; - } - while (start < url.length && url.charCodeAt(start) <= 32) { - start += 1; - } - while (end > start + 1 && url.charCodeAt(end - 1) <= 32) { - end -= 1; - } - if (url.charCodeAt(start) === 47 && url.charCodeAt(start + 1) === 47) { - start += 2; - } else { - const indexOfProtocol = url.indexOf(":/", start); - if (indexOfProtocol !== -1) { - const protocolSize = indexOfProtocol - start; - const c0 = url.charCodeAt(start); - const c1 = url.charCodeAt(start + 1); - const c2 = url.charCodeAt(start + 2); - const c3 = url.charCodeAt(start + 3); - const c4 = url.charCodeAt(start + 4); - if (protocolSize === 5 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112 && c4 === 115) - ; - else if (protocolSize === 4 && c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112) - ; - else if (protocolSize === 3 && c0 === 119 && c1 === 115 && c2 === 115) - ; - else if (protocolSize === 2 && c0 === 119 && c1 === 115) - ; - else { - for (let i = start;i < indexOfProtocol; i += 1) { - const lowerCaseCode = url.charCodeAt(i) | 32; - if (!(lowerCaseCode >= 97 && lowerCaseCode <= 122 || lowerCaseCode >= 48 && lowerCaseCode <= 57 || lowerCaseCode === 46 || lowerCaseCode === 45 || lowerCaseCode === 43)) { - return null; - } - } - } - start = indexOfProtocol + 2; - while (url.charCodeAt(start) === 47) { - start += 1; - } - } - } - let indexOfIdentifier = -1; - let indexOfClosingBracket = -1; - let indexOfPort = -1; - for (let i = start;i < end; i += 1) { - const code = url.charCodeAt(i); - if (code === 35 || code === 47 || code === 63) { - end = i; - break; - } else if (code === 64) { - indexOfIdentifier = i; - } else if (code === 93) { - indexOfClosingBracket = i; - } else if (code === 58) { - indexOfPort = i; - } else if (code >= 65 && code <= 90) { - hasUpper = true; - } - } - if (indexOfIdentifier !== -1 && indexOfIdentifier > start && indexOfIdentifier < end) { - start = indexOfIdentifier + 1; - } - if (url.charCodeAt(start) === 91) { - if (indexOfClosingBracket !== -1) { - return url.slice(start + 1, indexOfClosingBracket).toLowerCase(); - } - return null; - } else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) { - end = indexOfPort; - } - } - while (end > start + 1 && url.charCodeAt(end - 1) === 46) { - end -= 1; - } - const hostname = start !== 0 || end !== url.length ? url.slice(start, end) : url; - if (hasUpper) { - return hostname.toLowerCase(); - } - return hostname; - } - function isProbablyIpv4(hostname) { - if (hostname.length < 7) { - return false; - } - if (hostname.length > 15) { - return false; - } - let numberOfDots = 0; - for (let i = 0;i < hostname.length; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46) { - numberOfDots += 1; - } else if (code < 48 || code > 57) { - return false; - } - } - return numberOfDots === 3 && hostname.charCodeAt(0) !== 46 && hostname.charCodeAt(hostname.length - 1) !== 46; - } - function isProbablyIpv6(hostname) { - if (hostname.length < 3) { - return false; - } - let start = hostname.startsWith("[") ? 1 : 0; - let end = hostname.length; - if (hostname[end - 1] === "]") { - end -= 1; - } - if (end - start > 39) { - return false; - } - let hasColon = false; - for (;start < end; start += 1) { - const code = hostname.charCodeAt(start); - if (code === 58) { - hasColon = true; - } else if (!(code >= 48 && code <= 57 || code >= 97 && code <= 102 || code >= 65 && code <= 90)) { - return false; - } - } - return hasColon; - } - function isIp(hostname) { - return isProbablyIpv6(hostname) || isProbablyIpv4(hostname); - } - function isValidAscii(code) { - return code >= 97 && code <= 122 || code >= 48 && code <= 57 || code > 127; - } - function isValidHostname(hostname) { - if (hostname.length > 255) { - return false; - } - if (hostname.length === 0) { - return false; - } - if (!isValidAscii(hostname.charCodeAt(0)) && hostname.charCodeAt(0) !== 46 && hostname.charCodeAt(0) !== 95) { - return false; - } - let lastDotIndex = -1; - let lastCharCode = -1; - const len = hostname.length; - for (let i = 0;i < len; i += 1) { - const code = hostname.charCodeAt(i); - if (code === 46) { - if (i - lastDotIndex > 64 || lastCharCode === 46 || lastCharCode === 45 || lastCharCode === 95) { - return false; - } - lastDotIndex = i; - } else if (!(isValidAscii(code) || code === 45 || code === 95)) { - return false; - } - lastCharCode = code; - } - return len - lastDotIndex - 1 <= 63 && lastCharCode !== 45; - } - function setDefaultsImpl({ allowIcannDomains = true, allowPrivateDomains = false, detectIp = true, extractHostname: extractHostname2 = true, mixedInputs = true, validHosts = null, validateHostname = true }) { - return { - allowIcannDomains, - allowPrivateDomains, - detectIp, - extractHostname: extractHostname2, - mixedInputs, - validHosts, - validateHostname - }; - } - function setDefaults(options) { - if (options === undefined) { - return DEFAULT_OPTIONS; - } - return setDefaultsImpl(options); - } - function getSubdomain$1(hostname, domain) { - if (domain.length === hostname.length) { - return ""; - } - return hostname.slice(0, -domain.length - 1); - } - function getEmptyResult() { - return { - domain: null, - domainWithoutSuffix: null, - hostname: null, - isIcann: null, - isIp: null, - isPrivate: null, - publicSuffix: null, - subdomain: null - }; - } - function resetResult(result) { - result.domain = null; - result.domainWithoutSuffix = null; - result.hostname = null; - result.isIcann = null; - result.isIp = null; - result.isPrivate = null; - result.publicSuffix = null; - result.subdomain = null; - } - function parseImpl(url, step, suffixLookup2, partialOptions, result) { - const options = setDefaults(partialOptions); - if (typeof url !== "string") { - return result; - } - if (!options.extractHostname) { - result.hostname = url; - } else if (options.mixedInputs) { - result.hostname = extractHostname(url, isValidHostname(url)); - } else { - result.hostname = extractHostname(url, false); - } - if (step === 0 || result.hostname === null) { - return result; - } - if (options.detectIp) { - result.isIp = isIp(result.hostname); - if (result.isIp) { - return result; - } - } - if (options.validateHostname && options.extractHostname && !isValidHostname(result.hostname)) { - result.hostname = null; - return result; - } - suffixLookup2(result.hostname, options, result); - if (step === 2 || result.publicSuffix === null) { - return result; - } - result.domain = getDomain$1(result.publicSuffix, result.hostname, options); - if (step === 3 || result.domain === null) { - return result; - } - result.subdomain = getSubdomain$1(result.hostname, result.domain); - if (step === 4) { - return result; - } - result.domainWithoutSuffix = getDomainWithoutSuffix$1(result.domain, result.publicSuffix); - return result; - } - function fastPathLookup(hostname, options, out) { - if (!options.allowPrivateDomains && hostname.length > 3) { - const last = hostname.length - 1; - const c3 = hostname.charCodeAt(last); - const c2 = hostname.charCodeAt(last - 1); - const c1 = hostname.charCodeAt(last - 2); - const c0 = hostname.charCodeAt(last - 3); - if (c3 === 109 && c2 === 111 && c1 === 99 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "com"; - return true; - } else if (c3 === 103 && c2 === 114 && c1 === 111 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "org"; - return true; - } else if (c3 === 117 && c2 === 100 && c1 === 101 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "edu"; - return true; - } else if (c3 === 118 && c2 === 111 && c1 === 103 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "gov"; - return true; - } else if (c3 === 116 && c2 === 101 && c1 === 110 && c0 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "net"; - return true; - } else if (c3 === 101 && c2 === 100 && c1 === 46) { - out.isIcann = true; - out.isPrivate = false; - out.publicSuffix = "de"; - return true; - } - } - return false; - } - function lookupInTrie(parts, trie, index, allowedMask) { - let result = null; - let node = trie; - while (node !== undefined) { - if ((node[0] & allowedMask) !== 0) { - result = { - index: index + 1, - isIcann: node[0] === 1, - isPrivate: node[0] === 2 - }; - } - if (index === -1) { - break; - } - const succ = node[1]; - node = Object.prototype.hasOwnProperty.call(succ, parts[index]) ? succ[parts[index]] : succ["*"]; - index -= 1; - } - return result; - } - function suffixLookup(hostname, options, out) { - var _a; - if (fastPathLookup(hostname, options, out)) { - return; - } - const hostnameParts = hostname.split("."); - const allowedMask = (options.allowPrivateDomains ? 2 : 0) | (options.allowIcannDomains ? 1 : 0); - const exceptionMatch = lookupInTrie(hostnameParts, exceptions, hostnameParts.length - 1, allowedMask); - if (exceptionMatch !== null) { - out.isIcann = exceptionMatch.isIcann; - out.isPrivate = exceptionMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(exceptionMatch.index + 1).join("."); - return; - } - const rulesMatch = lookupInTrie(hostnameParts, rules, hostnameParts.length - 1, allowedMask); - if (rulesMatch !== null) { - out.isIcann = rulesMatch.isIcann; - out.isPrivate = rulesMatch.isPrivate; - out.publicSuffix = hostnameParts.slice(rulesMatch.index).join("."); - return; - } - out.isIcann = false; - out.isPrivate = false; - out.publicSuffix = (_a = hostnameParts[hostnameParts.length - 1]) !== null && _a !== undefined ? _a : null; - } - function parse(url, options = {}) { - return parseImpl(url, 5, suffixLookup, options, getEmptyResult()); - } - function getHostname(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 0, suffixLookup, options, RESULT).hostname; - } - function getPublicSuffix(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 2, suffixLookup, options, RESULT).publicSuffix; - } - function getDomain(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 3, suffixLookup, options, RESULT).domain; - } - function getSubdomain(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 4, suffixLookup, options, RESULT).subdomain; - } - function getDomainWithoutSuffix(url, options = {}) { - resetResult(RESULT); - return parseImpl(url, 5, suffixLookup, options, RESULT).domainWithoutSuffix; - } - var DEFAULT_OPTIONS = setDefaultsImpl({}); - var exceptions = function() { - const _0 = [1, {}], _1 = [2, {}], _2 = [0, { city: _0 }]; - const exceptions2 = [0, { ck: [0, { www: _0 }], jp: [0, { kawasaki: _2, kitakyushu: _2, kobe: _2, nagoya: _2, sapporo: _2, sendai: _2, yokohama: _2 }], dev: [0, { hrsn: [0, { psl: [0, { wc: [0, { ignored: _1, sub: [0, { ignored: _1 }] }] }] }] }] }]; - return exceptions2; - }(); - var rules = function() { - const _3 = [1, {}], _4 = [2, {}], _5 = [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3 }], _6 = [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3 }], _7 = [0, { "*": _4 }], _8 = [2, { s: _7 }], _9 = [0, { relay: _4 }], _10 = [2, { id: _4 }], _11 = [1, { gov: _3 }], _12 = [0, { "transfer-webapp": _4 }], _13 = [0, { notebook: _4, studio: _4 }], _14 = [0, { labeling: _4, notebook: _4, studio: _4 }], _15 = [0, { notebook: _4 }], _16 = [0, { labeling: _4, notebook: _4, "notebook-fips": _4, studio: _4 }], _17 = [0, { notebook: _4, "notebook-fips": _4, studio: _4, "studio-fips": _4 }], _18 = [0, { "*": _3 }], _19 = [1, { co: _4 }], _20 = [0, { objects: _4 }], _21 = [2, { nodes: _4 }], _22 = [0, { my: _7 }], _23 = [0, { s3: _4, "s3-accesspoint": _4, "s3-website": _4 }], _24 = [0, { s3: _4, "s3-accesspoint": _4 }], _25 = [0, { direct: _4 }], _26 = [0, { "webview-assets": _4 }], _27 = [0, { vfs: _4, "webview-assets": _4 }], _28 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4, "aws-cloud9": _26, cloud9: _27 }], _29 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _24, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4, "aws-cloud9": _26, cloud9: _27 }], _30 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4, "analytics-gateway": _4, "aws-cloud9": _26, cloud9: _27 }], _31 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4 }], _32 = [0, { s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-fips": _4, "s3-website": _4 }], _33 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _32, s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-fips": _4, "s3-object-lambda": _4, "s3-website": _4, "aws-cloud9": _26, cloud9: _27 }], _34 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _32, s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-deprecated": _4, "s3-fips": _4, "s3-object-lambda": _4, "s3-website": _4, "analytics-gateway": _4, "aws-cloud9": _26, cloud9: _27 }], _35 = [0, { s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-fips": _4 }], _36 = [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _35, s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-fips": _4, "s3-object-lambda": _4, "s3-website": _4 }], _37 = [0, { auth: _4 }], _38 = [0, { auth: _4, "auth-fips": _4 }], _39 = [0, { "auth-fips": _4 }], _40 = [0, { apps: _4 }], _41 = [0, { paas: _4 }], _42 = [2, { eu: _4 }], _43 = [0, { app: _4 }], _44 = [0, { site: _4 }], _45 = [1, { com: _3, edu: _3, net: _3, org: _3 }], _46 = [0, { j: _4 }], _47 = [0, { dyn: _4 }], _48 = [1, { co: _3, com: _3, edu: _3, gov: _3, net: _3, org: _3 }], _49 = [0, { p: _4 }], _50 = [0, { user: _4 }], _51 = [0, { shop: _4 }], _52 = [0, { cdn: _4 }], _53 = [0, { cust: _4, reservd: _4 }], _54 = [0, { cust: _4 }], _55 = [0, { s3: _4 }], _56 = [1, { biz: _3, com: _3, edu: _3, gov: _3, info: _3, net: _3, org: _3 }], _57 = [0, { ipfs: _4 }], _58 = [1, { framer: _4 }], _59 = [0, { forgot: _4 }], _60 = [1, { gs: _3 }], _61 = [0, { nes: _3 }], _62 = [1, { k12: _3, cc: _3, lib: _3 }], _63 = [1, { cc: _3, lib: _3 }]; - const rules2 = [0, { ac: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, drr: _4, feedback: _4, forms: _4 }], ad: _3, ae: [1, { ac: _3, co: _3, gov: _3, mil: _3, net: _3, org: _3, sch: _3 }], aero: [1, { airline: _3, airport: _3, "accident-investigation": _3, "accident-prevention": _3, aerobatic: _3, aeroclub: _3, aerodrome: _3, agents: _3, "air-surveillance": _3, "air-traffic-control": _3, aircraft: _3, airtraffic: _3, ambulance: _3, association: _3, author: _3, ballooning: _3, broker: _3, caa: _3, cargo: _3, catering: _3, certification: _3, championship: _3, charter: _3, civilaviation: _3, club: _3, conference: _3, consultant: _3, consulting: _3, control: _3, council: _3, crew: _3, design: _3, dgca: _3, educator: _3, emergency: _3, engine: _3, engineer: _3, entertainment: _3, equipment: _3, exchange: _3, express: _3, federation: _3, flight: _3, freight: _3, fuel: _3, gliding: _3, government: _3, groundhandling: _3, group: _3, hanggliding: _3, homebuilt: _3, insurance: _3, journal: _3, journalist: _3, leasing: _3, logistics: _3, magazine: _3, maintenance: _3, marketplace: _3, media: _3, microlight: _3, modelling: _3, navigation: _3, parachuting: _3, paragliding: _3, "passenger-association": _3, pilot: _3, press: _3, production: _3, recreation: _3, repbody: _3, res: _3, research: _3, rotorcraft: _3, safety: _3, scientist: _3, services: _3, show: _3, skydiving: _3, software: _3, student: _3, taxi: _3, trader: _3, trading: _3, trainer: _3, union: _3, workinggroup: _3, works: _3 }], af: _5, ag: [1, { co: _3, com: _3, net: _3, nom: _3, org: _3, obj: _4 }], ai: [1, { com: _3, net: _3, off: _3, org: _3, uwu: _4, framer: _4 }], al: _6, am: [1, { co: _3, com: _3, commune: _3, net: _3, org: _3, radio: _4 }], ao: [1, { co: _3, ed: _3, edu: _3, gov: _3, gv: _3, it: _3, og: _3, org: _3, pb: _3 }], aq: _3, ar: [1, { bet: _3, com: _3, coop: _3, edu: _3, gob: _3, gov: _3, int: _3, mil: _3, musica: _3, mutual: _3, net: _3, org: _3, seg: _3, senasa: _3, tur: _3 }], arpa: [1, { e164: _3, home: _3, "in-addr": _3, ip6: _3, iris: _3, uri: _3, urn: _3 }], as: _11, asia: [1, { cloudns: _4, daemon: _4, dix: _4 }], at: [1, { ac: [1, { sth: _3 }], co: _3, gv: _3, or: _3, funkfeuer: [0, { wien: _4 }], futurecms: [0, { "*": _4, ex: _7, in: _7 }], futurehosting: _4, futuremailing: _4, ortsinfo: [0, { ex: _7, kunden: _7 }], biz: _4, info: _4, "123webseite": _4, priv: _4, myspreadshop: _4, "12hp": _4, "2ix": _4, "4lima": _4, "lima-city": _4 }], au: [1, { asn: _3, com: [1, { cloudlets: [0, { mel: _4 }], myspreadshop: _4 }], edu: [1, { act: _3, catholic: _3, nsw: [1, { schools: _3 }], nt: _3, qld: _3, sa: _3, tas: _3, vic: _3, wa: _3 }], gov: [1, { qld: _3, sa: _3, tas: _3, vic: _3, wa: _3 }], id: _3, net: _3, org: _3, conf: _3, oz: _3, act: _3, nsw: _3, nt: _3, qld: _3, sa: _3, tas: _3, vic: _3, wa: _3 }], aw: [1, { com: _3 }], ax: _3, az: [1, { biz: _3, co: _3, com: _3, edu: _3, gov: _3, info: _3, int: _3, mil: _3, name: _3, net: _3, org: _3, pp: _3, pro: _3 }], ba: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, rs: _4 }], bb: [1, { biz: _3, co: _3, com: _3, edu: _3, gov: _3, info: _3, net: _3, org: _3, store: _3, tv: _3 }], bd: _18, be: [1, { ac: _3, cloudns: _4, webhosting: _4, interhostsolutions: [0, { cloud: _4 }], kuleuven: [0, { ezproxy: _4 }], "123website": _4, myspreadshop: _4, transurl: _7 }], bf: _11, bg: [1, { "0": _3, "1": _3, "2": _3, "3": _3, "4": _3, "5": _3, "6": _3, "7": _3, "8": _3, "9": _3, a: _3, b: _3, c: _3, d: _3, e: _3, f: _3, g: _3, h: _3, i: _3, j: _3, k: _3, l: _3, m: _3, n: _3, o: _3, p: _3, q: _3, r: _3, s: _3, t: _3, u: _3, v: _3, w: _3, x: _3, y: _3, z: _3, barsy: _4 }], bh: _5, bi: [1, { co: _3, com: _3, edu: _3, or: _3, org: _3 }], biz: [1, { activetrail: _4, "cloud-ip": _4, cloudns: _4, jozi: _4, dyndns: _4, "for-better": _4, "for-more": _4, "for-some": _4, "for-the": _4, selfip: _4, webhop: _4, orx: _4, mmafan: _4, myftp: _4, "no-ip": _4, dscloud: _4 }], bj: [1, { africa: _3, agro: _3, architectes: _3, assur: _3, avocats: _3, co: _3, com: _3, eco: _3, econo: _3, edu: _3, info: _3, loisirs: _3, money: _3, net: _3, org: _3, ote: _3, restaurant: _3, resto: _3, tourism: _3, univ: _3 }], bm: _5, bn: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, co: _4 }], bo: [1, { com: _3, edu: _3, gob: _3, int: _3, mil: _3, net: _3, org: _3, tv: _3, web: _3, academia: _3, agro: _3, arte: _3, blog: _3, bolivia: _3, ciencia: _3, cooperativa: _3, democracia: _3, deporte: _3, ecologia: _3, economia: _3, empresa: _3, indigena: _3, industria: _3, info: _3, medicina: _3, movimiento: _3, musica: _3, natural: _3, nombre: _3, noticias: _3, patria: _3, plurinacional: _3, politica: _3, profesional: _3, pueblo: _3, revista: _3, salud: _3, tecnologia: _3, tksat: _3, transporte: _3, wiki: _3 }], br: [1, { "9guacu": _3, abc: _3, adm: _3, adv: _3, agr: _3, aju: _3, am: _3, anani: _3, aparecida: _3, app: _3, arq: _3, art: _3, ato: _3, b: _3, barueri: _3, belem: _3, bet: _3, bhz: _3, bib: _3, bio: _3, blog: _3, bmd: _3, boavista: _3, bsb: _3, campinagrande: _3, campinas: _3, caxias: _3, cim: _3, cng: _3, cnt: _3, com: [1, { simplesite: _4 }], contagem: _3, coop: _3, coz: _3, cri: _3, cuiaba: _3, curitiba: _3, def: _3, des: _3, det: _3, dev: _3, ecn: _3, eco: _3, edu: _3, emp: _3, enf: _3, eng: _3, esp: _3, etc: _3, eti: _3, far: _3, feira: _3, flog: _3, floripa: _3, fm: _3, fnd: _3, fortal: _3, fot: _3, foz: _3, fst: _3, g12: _3, geo: _3, ggf: _3, goiania: _3, gov: [1, { ac: _3, al: _3, am: _3, ap: _3, ba: _3, ce: _3, df: _3, es: _3, go: _3, ma: _3, mg: _3, ms: _3, mt: _3, pa: _3, pb: _3, pe: _3, pi: _3, pr: _3, rj: _3, rn: _3, ro: _3, rr: _3, rs: _3, sc: _3, se: _3, sp: _3, to: _3 }], gru: _3, imb: _3, ind: _3, inf: _3, jab: _3, jampa: _3, jdf: _3, joinville: _3, jor: _3, jus: _3, leg: [1, { ac: _4, al: _4, am: _4, ap: _4, ba: _4, ce: _4, df: _4, es: _4, go: _4, ma: _4, mg: _4, ms: _4, mt: _4, pa: _4, pb: _4, pe: _4, pi: _4, pr: _4, rj: _4, rn: _4, ro: _4, rr: _4, rs: _4, sc: _4, se: _4, sp: _4, to: _4 }], leilao: _3, lel: _3, log: _3, londrina: _3, macapa: _3, maceio: _3, manaus: _3, maringa: _3, mat: _3, med: _3, mil: _3, morena: _3, mp: _3, mus: _3, natal: _3, net: _3, niteroi: _3, nom: _18, not: _3, ntr: _3, odo: _3, ong: _3, org: _3, osasco: _3, palmas: _3, poa: _3, ppg: _3, pro: _3, psc: _3, psi: _3, pvh: _3, qsl: _3, radio: _3, rec: _3, recife: _3, rep: _3, ribeirao: _3, rio: _3, riobranco: _3, riopreto: _3, salvador: _3, sampa: _3, santamaria: _3, santoandre: _3, saobernardo: _3, saogonca: _3, seg: _3, sjc: _3, slg: _3, slz: _3, sorocaba: _3, srv: _3, taxi: _3, tc: _3, tec: _3, teo: _3, the: _3, tmp: _3, trd: _3, tur: _3, tv: _3, udi: _3, vet: _3, vix: _3, vlog: _3, wiki: _3, zlg: _3 }], bs: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, we: _4 }], bt: _5, bv: _3, bw: [1, { ac: _3, co: _3, gov: _3, net: _3, org: _3 }], by: [1, { gov: _3, mil: _3, com: _3, of: _3, mediatech: _4 }], bz: [1, { co: _3, com: _3, edu: _3, gov: _3, net: _3, org: _3, za: _4, mydns: _4, gsj: _4 }], ca: [1, { ab: _3, bc: _3, mb: _3, nb: _3, nf: _3, nl: _3, ns: _3, nt: _3, nu: _3, on: _3, pe: _3, qc: _3, sk: _3, yk: _3, gc: _3, barsy: _4, awdev: _7, co: _4, "no-ip": _4, myspreadshop: _4, box: _4 }], cat: _3, cc: [1, { cleverapps: _4, cloudns: _4, ftpaccess: _4, "game-server": _4, myphotos: _4, scrapping: _4, twmail: _4, csx: _4, fantasyleague: _4, spawn: [0, { instances: _4 }] }], cd: _11, cf: _3, cg: _3, ch: [1, { square7: _4, cloudns: _4, cloudscale: [0, { cust: _4, lpg: _20, rma: _20 }], flow: [0, { ae: [0, { alp1: _4 }], appengine: _4 }], "linkyard-cloud": _4, gotdns: _4, dnsking: _4, "123website": _4, myspreadshop: _4, firenet: [0, { "*": _4, svc: _7 }], "12hp": _4, "2ix": _4, "4lima": _4, "lima-city": _4 }], ci: [1, { ac: _3, "xn--aroport-bya": _3, "a\xE9roport": _3, asso: _3, co: _3, com: _3, ed: _3, edu: _3, go: _3, gouv: _3, int: _3, net: _3, or: _3, org: _3 }], ck: _18, cl: [1, { co: _3, gob: _3, gov: _3, mil: _3, cloudns: _4 }], cm: [1, { co: _3, com: _3, gov: _3, net: _3 }], cn: [1, { ac: _3, com: [1, { amazonaws: [0, { "cn-north-1": [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-deprecated": _4, "s3-object-lambda": _4, "s3-website": _4 }], "cn-northwest-1": [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _24, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4 }], compute: _7, airflow: [0, { "cn-north-1": _7, "cn-northwest-1": _7 }], eb: [0, { "cn-north-1": _4, "cn-northwest-1": _4 }], elb: _7 }], sagemaker: [0, { "cn-north-1": _13, "cn-northwest-1": _13 }] }], edu: _3, gov: _3, mil: _3, net: _3, org: _3, "xn--55qx5d": _3, "\u516C\u53F8": _3, "xn--od0alg": _3, "\u7DB2\u7D61": _3, "xn--io0a7i": _3, "\u7F51\u7EDC": _3, ah: _3, bj: _3, cq: _3, fj: _3, gd: _3, gs: _3, gx: _3, gz: _3, ha: _3, hb: _3, he: _3, hi: _3, hk: _3, hl: _3, hn: _3, jl: _3, js: _3, jx: _3, ln: _3, mo: _3, nm: _3, nx: _3, qh: _3, sc: _3, sd: _3, sh: [1, { as: _4 }], sn: _3, sx: _3, tj: _3, tw: _3, xj: _3, xz: _3, yn: _3, zj: _3, "canva-apps": _4, canvasite: _22, myqnapcloud: _4, quickconnect: _25 }], co: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, nom: _3, org: _3, carrd: _4, crd: _4, otap: _7, leadpages: _4, lpages: _4, mypi: _4, xmit: _7, firewalledreplit: _10, repl: _10, supabase: _4 }], com: [1, { a2hosted: _4, cpserver: _4, adobeaemcloud: [2, { dev: _7 }], africa: _4, airkitapps: _4, "airkitapps-au": _4, aivencloud: _4, alibabacloudcs: _4, kasserver: _4, amazonaws: [0, { "af-south-1": _28, "ap-east-1": _29, "ap-northeast-1": _30, "ap-northeast-2": _30, "ap-northeast-3": _28, "ap-south-1": _30, "ap-south-2": _31, "ap-southeast-1": _30, "ap-southeast-2": _30, "ap-southeast-3": _31, "ap-southeast-4": _31, "ap-southeast-5": [0, { "execute-api": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-deprecated": _4, "s3-object-lambda": _4, "s3-website": _4 }], "ca-central-1": _33, "ca-west-1": [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _32, s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-fips": _4, "s3-object-lambda": _4, "s3-website": _4 }], "eu-central-1": _30, "eu-central-2": _31, "eu-north-1": _29, "eu-south-1": _28, "eu-south-2": _31, "eu-west-1": [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-deprecated": _4, "s3-object-lambda": _4, "s3-website": _4, "analytics-gateway": _4, "aws-cloud9": _26, cloud9: _27 }], "eu-west-2": _29, "eu-west-3": _28, "il-central-1": [0, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _23, s3: _4, "s3-accesspoint": _4, "s3-object-lambda": _4, "s3-website": _4, "aws-cloud9": _26, cloud9: [0, { vfs: _4 }] }], "me-central-1": _31, "me-south-1": _29, "sa-east-1": _28, "us-east-1": [2, { "execute-api": _4, "emrappui-prod": _4, "emrnotebooks-prod": _4, "emrstudio-prod": _4, dualstack: _32, s3: _4, "s3-accesspoint": _4, "s3-accesspoint-fips": _4, "s3-deprecated": _4, "s3-fips": _4, "s3-object-lambda": _4, "s3-website": _4, "analytics-gateway": _4, "aws-cloud9": _26, cloud9: _27 }], "us-east-2": _34, "us-gov-east-1": _36, "us-gov-west-1": _36, "us-west-1": _33, "us-west-2": _34, compute: _7, "compute-1": _7, airflow: [0, { "af-south-1": _7, "ap-east-1": _7, "ap-northeast-1": _7, "ap-northeast-2": _7, "ap-northeast-3": _7, "ap-south-1": _7, "ap-south-2": _7, "ap-southeast-1": _7, "ap-southeast-2": _7, "ap-southeast-3": _7, "ap-southeast-4": _7, "ca-central-1": _7, "ca-west-1": _7, "eu-central-1": _7, "eu-central-2": _7, "eu-north-1": _7, "eu-south-1": _7, "eu-south-2": _7, "eu-west-1": _7, "eu-west-2": _7, "eu-west-3": _7, "il-central-1": _7, "me-central-1": _7, "me-south-1": _7, "sa-east-1": _7, "us-east-1": _7, "us-east-2": _7, "us-west-1": _7, "us-west-2": _7 }], s3: _4, "s3-1": _4, "s3-ap-east-1": _4, "s3-ap-northeast-1": _4, "s3-ap-northeast-2": _4, "s3-ap-northeast-3": _4, "s3-ap-south-1": _4, "s3-ap-southeast-1": _4, "s3-ap-southeast-2": _4, "s3-ca-central-1": _4, "s3-eu-central-1": _4, "s3-eu-north-1": _4, "s3-eu-west-1": _4, "s3-eu-west-2": _4, "s3-eu-west-3": _4, "s3-external-1": _4, "s3-fips-us-gov-east-1": _4, "s3-fips-us-gov-west-1": _4, "s3-global": [0, { accesspoint: [0, { mrap: _4 }] }], "s3-me-south-1": _4, "s3-sa-east-1": _4, "s3-us-east-2": _4, "s3-us-gov-east-1": _4, "s3-us-gov-west-1": _4, "s3-us-west-1": _4, "s3-us-west-2": _4, "s3-website-ap-northeast-1": _4, "s3-website-ap-southeast-1": _4, "s3-website-ap-southeast-2": _4, "s3-website-eu-west-1": _4, "s3-website-sa-east-1": _4, "s3-website-us-east-1": _4, "s3-website-us-gov-west-1": _4, "s3-website-us-west-1": _4, "s3-website-us-west-2": _4, elb: _7 }], amazoncognito: [0, { "af-south-1": _37, "ap-east-1": _37, "ap-northeast-1": _37, "ap-northeast-2": _37, "ap-northeast-3": _37, "ap-south-1": _37, "ap-south-2": _37, "ap-southeast-1": _37, "ap-southeast-2": _37, "ap-southeast-3": _37, "ap-southeast-4": _37, "ap-southeast-5": _37, "ca-central-1": _37, "ca-west-1": _37, "eu-central-1": _37, "eu-central-2": _37, "eu-north-1": _37, "eu-south-1": _37, "eu-south-2": _37, "eu-west-1": _37, "eu-west-2": _37, "eu-west-3": _37, "il-central-1": _37, "me-central-1": _37, "me-south-1": _37, "sa-east-1": _37, "us-east-1": _38, "us-east-2": _38, "us-gov-east-1": _39, "us-gov-west-1": _39, "us-west-1": _38, "us-west-2": _38 }], amplifyapp: _4, awsapprunner: _7, awsapps: _4, elasticbeanstalk: [2, { "af-south-1": _4, "ap-east-1": _4, "ap-northeast-1": _4, "ap-northeast-2": _4, "ap-northeast-3": _4, "ap-south-1": _4, "ap-southeast-1": _4, "ap-southeast-2": _4, "ap-southeast-3": _4, "ca-central-1": _4, "eu-central-1": _4, "eu-north-1": _4, "eu-south-1": _4, "eu-west-1": _4, "eu-west-2": _4, "eu-west-3": _4, "il-central-1": _4, "me-south-1": _4, "sa-east-1": _4, "us-east-1": _4, "us-east-2": _4, "us-gov-east-1": _4, "us-gov-west-1": _4, "us-west-1": _4, "us-west-2": _4 }], awsglobalaccelerator: _4, siiites: _4, appspacehosted: _4, appspaceusercontent: _4, "on-aptible": _4, myasustor: _4, "balena-devices": _4, boutir: _4, bplaced: _4, cafjs: _4, "canva-apps": _4, "cdn77-storage": _4, br: _4, cn: _4, de: _4, eu: _4, jpn: _4, mex: _4, ru: _4, sa: _4, uk: _4, us: _4, za: _4, "clever-cloud": [0, { services: _7 }], dnsabr: _4, "ip-ddns": _4, jdevcloud: _4, wpdevcloud: _4, "cf-ipfs": _4, "cloudflare-ipfs": _4, trycloudflare: _4, co: _4, devinapps: _7, builtwithdark: _4, datadetect: [0, { demo: _4, instance: _4 }], dattolocal: _4, dattorelay: _4, dattoweb: _4, mydatto: _4, digitaloceanspaces: _7, discordsays: _4, discordsez: _4, drayddns: _4, dreamhosters: _4, durumis: _4, mydrobo: _4, blogdns: _4, cechire: _4, dnsalias: _4, dnsdojo: _4, doesntexist: _4, dontexist: _4, doomdns: _4, "dyn-o-saur": _4, dynalias: _4, "dyndns-at-home": _4, "dyndns-at-work": _4, "dyndns-blog": _4, "dyndns-free": _4, "dyndns-home": _4, "dyndns-ip": _4, "dyndns-mail": _4, "dyndns-office": _4, "dyndns-pics": _4, "dyndns-remote": _4, "dyndns-server": _4, "dyndns-web": _4, "dyndns-wiki": _4, "dyndns-work": _4, "est-a-la-maison": _4, "est-a-la-masion": _4, "est-le-patron": _4, "est-mon-blogueur": _4, "from-ak": _4, "from-al": _4, "from-ar": _4, "from-ca": _4, "from-ct": _4, "from-dc": _4, "from-de": _4, "from-fl": _4, "from-ga": _4, "from-hi": _4, "from-ia": _4, "from-id": _4, "from-il": _4, "from-in": _4, "from-ks": _4, "from-ky": _4, "from-ma": _4, "from-md": _4, "from-mi": _4, "from-mn": _4, "from-mo": _4, "from-ms": _4, "from-mt": _4, "from-nc": _4, "from-nd": _4, "from-ne": _4, "from-nh": _4, "from-nj": _4, "from-nm": _4, "from-nv": _4, "from-oh": _4, "from-ok": _4, "from-or": _4, "from-pa": _4, "from-pr": _4, "from-ri": _4, "from-sc": _4, "from-sd": _4, "from-tn": _4, "from-tx": _4, "from-ut": _4, "from-va": _4, "from-vt": _4, "from-wa": _4, "from-wi": _4, "from-wv": _4, "from-wy": _4, getmyip: _4, gotdns: _4, "hobby-site": _4, homelinux: _4, homeunix: _4, iamallama: _4, "is-a-anarchist": _4, "is-a-blogger": _4, "is-a-bookkeeper": _4, "is-a-bulls-fan": _4, "is-a-caterer": _4, "is-a-chef": _4, "is-a-conservative": _4, "is-a-cpa": _4, "is-a-cubicle-slave": _4, "is-a-democrat": _4, "is-a-designer": _4, "is-a-doctor": _4, "is-a-financialadvisor": _4, "is-a-geek": _4, "is-a-green": _4, "is-a-guru": _4, "is-a-hard-worker": _4, "is-a-hunter": _4, "is-a-landscaper": _4, "is-a-lawyer": _4, "is-a-liberal": _4, "is-a-libertarian": _4, "is-a-llama": _4, "is-a-musician": _4, "is-a-nascarfan": _4, "is-a-nurse": _4, "is-a-painter": _4, "is-a-personaltrainer": _4, "is-a-photographer": _4, "is-a-player": _4, "is-a-republican": _4, "is-a-rockstar": _4, "is-a-socialist": _4, "is-a-student": _4, "is-a-teacher": _4, "is-a-techie": _4, "is-a-therapist": _4, "is-an-accountant": _4, "is-an-actor": _4, "is-an-actress": _4, "is-an-anarchist": _4, "is-an-artist": _4, "is-an-engineer": _4, "is-an-entertainer": _4, "is-certified": _4, "is-gone": _4, "is-into-anime": _4, "is-into-cars": _4, "is-into-cartoons": _4, "is-into-games": _4, "is-leet": _4, "is-not-certified": _4, "is-slick": _4, "is-uberleet": _4, "is-with-theband": _4, "isa-geek": _4, "isa-hockeynut": _4, issmarterthanyou: _4, "likes-pie": _4, likescandy: _4, "neat-url": _4, "saves-the-whales": _4, selfip: _4, "sells-for-less": _4, "sells-for-u": _4, servebbs: _4, "simple-url": _4, "space-to-rent": _4, "teaches-yoga": _4, writesthisblog: _4, ddnsfree: _4, ddnsgeek: _4, giize: _4, gleeze: _4, kozow: _4, loseyourip: _4, ooguy: _4, theworkpc: _4, mytuleap: _4, "tuleap-partners": _4, encoreapi: _4, evennode: [0, { "eu-1": _4, "eu-2": _4, "eu-3": _4, "eu-4": _4, "us-1": _4, "us-2": _4, "us-3": _4, "us-4": _4 }], onfabrica: _4, "fastly-edge": _4, "fastly-terrarium": _4, "fastvps-server": _4, mydobiss: _4, firebaseapp: _4, fldrv: _4, forgeblocks: _4, framercanvas: _4, "freebox-os": _4, freeboxos: _4, freemyip: _4, aliases121: _4, gentapps: _4, gentlentapis: _4, githubusercontent: _4, "0emm": _7, appspot: [2, { r: _7 }], blogspot: _4, codespot: _4, googleapis: _4, googlecode: _4, pagespeedmobilizer: _4, withgoogle: _4, withyoutube: _4, grayjayleagues: _4, hatenablog: _4, hatenadiary: _4, herokuapp: _4, gr: _4, smushcdn: _4, wphostedmail: _4, wpmucdn: _4, pixolino: _4, "apps-1and1": _4, "live-website": _4, dopaas: _4, "hosted-by-previder": _41, hosteur: [0, { "rag-cloud": _4, "rag-cloud-ch": _4 }], "ik-server": [0, { jcloud: _4, "jcloud-ver-jpc": _4 }], jelastic: [0, { demo: _4 }], massivegrid: _41, wafaicloud: [0, { jed: _4, ryd: _4 }], webadorsite: _4, joyent: [0, { cns: _7 }], lpusercontent: _4, linode: [0, { members: _4, nodebalancer: _7 }], linodeobjects: _7, linodeusercontent: [0, { ip: _4 }], localtonet: _4, lovableproject: _4, barsycenter: _4, barsyonline: _4, modelscape: _4, mwcloudnonprod: _4, polyspace: _4, mazeplay: _4, miniserver: _4, atmeta: _4, fbsbx: _40, meteorapp: _42, routingthecloud: _4, mydbserver: _4, hostedpi: _4, "mythic-beasts": [0, { caracal: _4, customer: _4, fentiger: _4, lynx: _4, ocelot: _4, oncilla: _4, onza: _4, sphinx: _4, vs: _4, x: _4, yali: _4 }], nospamproxy: [0, { cloud: [2, { o365: _4 }] }], "4u": _4, nfshost: _4, "3utilities": _4, blogsyte: _4, ciscofreak: _4, damnserver: _4, ddnsking: _4, ditchyourip: _4, dnsiskinky: _4, dynns: _4, geekgalaxy: _4, "health-carereform": _4, homesecuritymac: _4, homesecuritypc: _4, myactivedirectory: _4, mysecuritycamera: _4, myvnc: _4, "net-freaks": _4, onthewifi: _4, point2this: _4, quicksytes: _4, securitytactics: _4, servebeer: _4, servecounterstrike: _4, serveexchange: _4, serveftp: _4, servegame: _4, servehalflife: _4, servehttp: _4, servehumour: _4, serveirc: _4, servemp3: _4, servep2p: _4, servepics: _4, servequake: _4, servesarcasm: _4, stufftoread: _4, unusualperson: _4, workisboring: _4, myiphost: _4, observableusercontent: [0, { static: _4 }], simplesite: _4, orsites: _4, operaunite: _4, "customer-oci": [0, { "*": _4, oci: _7, ocp: _7, ocs: _7 }], oraclecloudapps: _7, oraclegovcloudapps: _7, "authgear-staging": _4, authgearapps: _4, skygearapp: _4, outsystemscloud: _4, ownprovider: _4, pgfog: _4, pagexl: _4, gotpantheon: _4, paywhirl: _7, upsunapp: _4, "postman-echo": _4, prgmr: [0, { xen: _4 }], pythonanywhere: _42, qa2: _4, "alpha-myqnapcloud": _4, "dev-myqnapcloud": _4, mycloudnas: _4, mynascloud: _4, myqnapcloud: _4, qualifioapp: _4, ladesk: _4, qbuser: _4, quipelements: _7, rackmaze: _4, "readthedocs-hosted": _4, rhcloud: _4, onrender: _4, render: _43, "subsc-pay": _4, "180r": _4, dojin: _4, sakuratan: _4, sakuraweb: _4, x0: _4, code: [0, { builder: _7, "dev-builder": _7, "stg-builder": _7 }], salesforce: [0, { platform: [0, { "code-builder-stg": [0, { test: [0, { "001": _7 }] }] }] }], logoip: _4, scrysec: _4, "firewall-gateway": _4, myshopblocks: _4, myshopify: _4, shopitsite: _4, "1kapp": _4, appchizi: _4, applinzi: _4, sinaapp: _4, vipsinaapp: _4, streamlitapp: _4, "try-snowplow": _4, "playstation-cloud": _4, myspreadshop: _4, "w-corp-staticblitz": _4, "w-credentialless-staticblitz": _4, "w-staticblitz": _4, "stackhero-network": _4, stdlib: [0, { api: _4 }], strapiapp: [2, { media: _4 }], "streak-link": _4, streaklinks: _4, streakusercontent: _4, "temp-dns": _4, dsmynas: _4, familyds: _4, mytabit: _4, taveusercontent: _4, "tb-hosting": _44, reservd: _4, thingdustdata: _4, "townnews-staging": _4, typeform: [0, { pro: _4 }], hk: _4, it: _4, "deus-canvas": _4, vultrobjects: _7, wafflecell: _4, hotelwithflight: _4, "reserve-online": _4, cprapid: _4, pleskns: _4, remotewd: _4, wiardweb: [0, { pages: _4 }], wixsite: _4, wixstudio: _4, messwithdns: _4, "woltlab-demo": _4, wpenginepowered: [2, { js: _4 }], xnbay: [2, { u2: _4, "u2-local": _4 }], yolasite: _4 }], coop: _3, cr: [1, { ac: _3, co: _3, ed: _3, fi: _3, go: _3, or: _3, sa: _3 }], cu: [1, { com: _3, edu: _3, gob: _3, inf: _3, nat: _3, net: _3, org: _3 }], cv: [1, { com: _3, edu: _3, id: _3, int: _3, net: _3, nome: _3, org: _3, publ: _3 }], cw: _45, cx: [1, { gov: _3, cloudns: _4, ath: _4, info: _4, assessments: _4, calculators: _4, funnels: _4, paynow: _4, quizzes: _4, researched: _4, tests: _4 }], cy: [1, { ac: _3, biz: _3, com: [1, { scaleforce: _46 }], ekloges: _3, gov: _3, ltd: _3, mil: _3, net: _3, org: _3, press: _3, pro: _3, tm: _3 }], cz: [1, { contentproxy9: [0, { rsc: _4 }], realm: _4, e4: _4, co: _4, metacentrum: [0, { cloud: _7, custom: _4 }], muni: [0, { cloud: [0, { flt: _4, usr: _4 }] }] }], de: [1, { bplaced: _4, square7: _4, com: _4, cosidns: _47, dnsupdater: _4, "dynamisches-dns": _4, "internet-dns": _4, "l-o-g-i-n": _4, ddnss: [2, { dyn: _4, dyndns: _4 }], "dyn-ip24": _4, dyndns1: _4, "home-webserver": [2, { dyn: _4 }], "myhome-server": _4, dnshome: _4, fuettertdasnetz: _4, isteingeek: _4, istmein: _4, lebtimnetz: _4, leitungsen: _4, traeumtgerade: _4, frusky: _7, goip: _4, "xn--gnstigbestellen-zvb": _4, "g\xFCnstigbestellen": _4, "xn--gnstigliefern-wob": _4, "g\xFCnstigliefern": _4, "hs-heilbronn": [0, { it: [0, { pages: _4, "pages-research": _4 }] }], "dyn-berlin": _4, "in-berlin": _4, "in-brb": _4, "in-butter": _4, "in-dsl": _4, "in-vpn": _4, iservschule: _4, "mein-iserv": _4, schulplattform: _4, schulserver: _4, "test-iserv": _4, keymachine: _4, "git-repos": _4, "lcube-server": _4, "svn-repos": _4, barsy: _4, webspaceconfig: _4, "123webseite": _4, rub: _4, "ruhr-uni-bochum": [2, { noc: [0, { io: _4 }] }], logoip: _4, "firewall-gateway": _4, "my-gateway": _4, "my-router": _4, spdns: _4, speedpartner: [0, { customer: _4 }], myspreadshop: _4, "taifun-dns": _4, "12hp": _4, "2ix": _4, "4lima": _4, "lima-city": _4, "dd-dns": _4, "dray-dns": _4, draydns: _4, "dyn-vpn": _4, dynvpn: _4, "mein-vigor": _4, "my-vigor": _4, "my-wan": _4, "syno-ds": _4, "synology-diskstation": _4, "synology-ds": _4, uberspace: _7, "virtual-user": _4, virtualuser: _4, "community-pro": _4, diskussionsbereich: _4 }], dj: _3, dk: [1, { biz: _4, co: _4, firm: _4, reg: _4, store: _4, "123hjemmeside": _4, myspreadshop: _4 }], dm: _48, do: [1, { art: _3, com: _3, edu: _3, gob: _3, gov: _3, mil: _3, net: _3, org: _3, sld: _3, web: _3 }], dz: [1, { art: _3, asso: _3, com: _3, edu: _3, gov: _3, net: _3, org: _3, pol: _3, soc: _3, tm: _3 }], ec: [1, { com: _3, edu: _3, fin: _3, gob: _3, gov: _3, info: _3, k12: _3, med: _3, mil: _3, net: _3, org: _3, pro: _3, base: _4, official: _4 }], edu: [1, { rit: [0, { "git-pages": _4 }] }], ee: [1, { aip: _3, com: _3, edu: _3, fie: _3, gov: _3, lib: _3, med: _3, org: _3, pri: _3, riik: _3 }], eg: [1, { ac: _3, com: _3, edu: _3, eun: _3, gov: _3, info: _3, me: _3, mil: _3, name: _3, net: _3, org: _3, sci: _3, sport: _3, tv: _3 }], er: _18, es: [1, { com: _3, edu: _3, gob: _3, nom: _3, org: _3, "123miweb": _4, myspreadshop: _4 }], et: [1, { biz: _3, com: _3, edu: _3, gov: _3, info: _3, name: _3, net: _3, org: _3 }], eu: [1, { airkitapps: _4, cloudns: _4, dogado: [0, { jelastic: _4 }], barsy: _4, spdns: _4, transurl: _7, diskstation: _4 }], fi: [1, { aland: _3, dy: _4, "xn--hkkinen-5wa": _4, "h\xE4kkinen": _4, iki: _4, cloudplatform: [0, { fi: _4 }], datacenter: [0, { demo: _4, paas: _4 }], kapsi: _4, "123kotisivu": _4, myspreadshop: _4 }], fj: [1, { ac: _3, biz: _3, com: _3, gov: _3, info: _3, mil: _3, name: _3, net: _3, org: _3, pro: _3 }], fk: _18, fm: [1, { com: _3, edu: _3, net: _3, org: _3, radio: _4, user: _7 }], fo: _3, fr: [1, { asso: _3, com: _3, gouv: _3, nom: _3, prd: _3, tm: _3, avoues: _3, cci: _3, greta: _3, "huissier-justice": _3, "en-root": _4, "fbx-os": _4, fbxos: _4, "freebox-os": _4, freeboxos: _4, goupile: _4, "123siteweb": _4, "on-web": _4, "chirurgiens-dentistes-en-france": _4, dedibox: _4, aeroport: _4, avocat: _4, chambagri: _4, "chirurgiens-dentistes": _4, "experts-comptables": _4, medecin: _4, notaires: _4, pharmacien: _4, port: _4, veterinaire: _4, myspreadshop: _4, ynh: _4 }], ga: _3, gb: _3, gd: [1, { edu: _3, gov: _3 }], ge: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, pvt: _3, school: _3 }], gf: _3, gg: [1, { co: _3, net: _3, org: _3, botdash: _4, kaas: _4, stackit: _4, panel: [2, { daemon: _4 }] }], gh: [1, { com: _3, edu: _3, gov: _3, mil: _3, org: _3 }], gi: [1, { com: _3, edu: _3, gov: _3, ltd: _3, mod: _3, org: _3 }], gl: [1, { co: _3, com: _3, edu: _3, net: _3, org: _3, biz: _4 }], gm: _3, gn: [1, { ac: _3, com: _3, edu: _3, gov: _3, net: _3, org: _3 }], gov: _3, gp: [1, { asso: _3, com: _3, edu: _3, mobi: _3, net: _3, org: _3 }], gq: _3, gr: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, barsy: _4, simplesite: _4 }], gs: _3, gt: [1, { com: _3, edu: _3, gob: _3, ind: _3, mil: _3, net: _3, org: _3 }], gu: [1, { com: _3, edu: _3, gov: _3, guam: _3, info: _3, net: _3, org: _3, web: _3 }], gw: _3, gy: _48, hk: [1, { com: _3, edu: _3, gov: _3, idv: _3, net: _3, org: _3, "xn--ciqpn": _3, "\u4E2A\u4EBA": _3, "xn--gmqw5a": _3, "\u500B\u4EBA": _3, "xn--55qx5d": _3, "\u516C\u53F8": _3, "xn--mxtq1m": _3, "\u653F\u5E9C": _3, "xn--lcvr32d": _3, "\u654E\u80B2": _3, "xn--wcvs22d": _3, "\u6559\u80B2": _3, "xn--gmq050i": _3, "\u7B87\u4EBA": _3, "xn--uc0atv": _3, "\u7D44\u7E54": _3, "xn--uc0ay4a": _3, "\u7D44\u7EC7": _3, "xn--od0alg": _3, "\u7DB2\u7D61": _3, "xn--zf0avx": _3, "\u7DB2\u7EDC": _3, "xn--mk0axi": _3, "\u7EC4\u7E54": _3, "xn--tn0ag": _3, "\u7EC4\u7EC7": _3, "xn--od0aq3b": _3, "\u7F51\u7D61": _3, "xn--io0a7i": _3, "\u7F51\u7EDC": _3, inc: _4, ltd: _4 }], hm: _3, hn: [1, { com: _3, edu: _3, gob: _3, mil: _3, net: _3, org: _3 }], hr: [1, { com: _3, from: _3, iz: _3, name: _3, brendly: _51 }], ht: [1, { adult: _3, art: _3, asso: _3, com: _3, coop: _3, edu: _3, firm: _3, gouv: _3, info: _3, med: _3, net: _3, org: _3, perso: _3, pol: _3, pro: _3, rel: _3, shop: _3, rt: _4 }], hu: [1, { "2000": _3, agrar: _3, bolt: _3, casino: _3, city: _3, co: _3, erotica: _3, erotika: _3, film: _3, forum: _3, games: _3, hotel: _3, info: _3, ingatlan: _3, jogasz: _3, konyvelo: _3, lakas: _3, media: _3, news: _3, org: _3, priv: _3, reklam: _3, sex: _3, shop: _3, sport: _3, suli: _3, szex: _3, tm: _3, tozsde: _3, utazas: _3, video: _3 }], id: [1, { ac: _3, biz: _3, co: _3, desa: _3, go: _3, mil: _3, my: _3, net: _3, or: _3, ponpes: _3, sch: _3, web: _3, zone: _4 }], ie: [1, { gov: _3, myspreadshop: _4 }], il: [1, { ac: _3, co: [1, { ravpage: _4, mytabit: _4, tabitorder: _4 }], gov: _3, idf: _3, k12: _3, muni: _3, net: _3, org: _3 }], "xn--4dbrk0ce": [1, { "xn--4dbgdty6c": _3, "xn--5dbhl8d": _3, "xn--8dbq2a": _3, "xn--hebda8b": _3 }], "\u05D9\u05E9\u05E8\u05D0\u05DC": [1, { "\u05D0\u05E7\u05D3\u05DE\u05D9\u05D4": _3, "\u05D9\u05E9\u05D5\u05D1": _3, "\u05E6\u05D4\u05DC": _3, "\u05DE\u05DE\u05E9\u05DC": _3 }], im: [1, { ac: _3, co: [1, { ltd: _3, plc: _3 }], com: _3, net: _3, org: _3, tt: _3, tv: _3 }], in: [1, { "5g": _3, "6g": _3, ac: _3, ai: _3, am: _3, bihar: _3, biz: _3, business: _3, ca: _3, cn: _3, co: _3, com: _3, coop: _3, cs: _3, delhi: _3, dr: _3, edu: _3, er: _3, firm: _3, gen: _3, gov: _3, gujarat: _3, ind: _3, info: _3, int: _3, internet: _3, io: _3, me: _3, mil: _3, net: _3, nic: _3, org: _3, pg: _3, post: _3, pro: _3, res: _3, travel: _3, tv: _3, uk: _3, up: _3, us: _3, cloudns: _4, barsy: _4, web: _4, supabase: _4 }], info: [1, { cloudns: _4, "dynamic-dns": _4, "barrel-of-knowledge": _4, "barrell-of-knowledge": _4, dyndns: _4, "for-our": _4, "groks-the": _4, "groks-this": _4, "here-for-more": _4, knowsitall: _4, selfip: _4, webhop: _4, barsy: _4, mayfirst: _4, mittwald: _4, mittwaldserver: _4, typo3server: _4, dvrcam: _4, ilovecollege: _4, "no-ip": _4, forumz: _4, nsupdate: _4, dnsupdate: _4, "v-info": _4 }], int: [1, { eu: _3 }], io: [1, { "2038": _4, co: _3, com: _3, edu: _3, gov: _3, mil: _3, net: _3, nom: _3, org: _3, "on-acorn": _7, myaddr: _4, apigee: _4, "b-data": _4, beagleboard: _4, bitbucket: _4, bluebite: _4, boxfuse: _4, brave: _8, browsersafetymark: _4, bubble: _52, bubbleapps: _4, bigv: [0, { uk0: _4 }], cleverapps: _4, cloudbeesusercontent: _4, dappnode: [0, { dyndns: _4 }], darklang: _4, definima: _4, dedyn: _4, "fh-muenster": _4, shw: _4, forgerock: [0, { id: _4 }], github: _4, gitlab: _4, lolipop: _4, "hasura-app": _4, hostyhosting: _4, hypernode: _4, moonscale: _7, beebyte: _41, beebyteapp: [0, { sekd1: _4 }], jele: _4, webthings: _4, loginline: _4, barsy: _4, azurecontainer: _7, ngrok: [2, { ap: _4, au: _4, eu: _4, in: _4, jp: _4, sa: _4, us: _4 }], nodeart: [0, { stage: _4 }], pantheonsite: _4, pstmn: [2, { mock: _4 }], protonet: _4, qcx: [2, { sys: _7 }], qoto: _4, vaporcloud: _4, myrdbx: _4, "rb-hosting": _44, "on-k3s": _7, "on-rio": _7, readthedocs: _4, resindevice: _4, resinstaging: [0, { devices: _4 }], hzc: _4, sandcats: _4, scrypted: [0, { client: _4 }], "mo-siemens": _4, lair: _40, stolos: _7, musician: _4, utwente: _4, edugit: _4, telebit: _4, thingdust: [0, { dev: _53, disrec: _53, prod: _54, testing: _53 }], tickets: _4, webflow: _4, webflowtest: _4, editorx: _4, wixstudio: _4, basicserver: _4, virtualserver: _4 }], iq: _6, ir: [1, { ac: _3, co: _3, gov: _3, id: _3, net: _3, org: _3, sch: _3, "xn--mgba3a4f16a": _3, "\u0627\u06CC\u0631\u0627\u0646": _3, "xn--mgba3a4fra": _3, "\u0627\u064A\u0631\u0627\u0646": _3, arvanedge: _4 }], is: _3, it: [1, { edu: _3, gov: _3, abr: _3, abruzzo: _3, "aosta-valley": _3, aostavalley: _3, bas: _3, basilicata: _3, cal: _3, calabria: _3, cam: _3, campania: _3, "emilia-romagna": _3, emiliaromagna: _3, emr: _3, "friuli-v-giulia": _3, "friuli-ve-giulia": _3, "friuli-vegiulia": _3, "friuli-venezia-giulia": _3, "friuli-veneziagiulia": _3, "friuli-vgiulia": _3, "friuliv-giulia": _3, "friulive-giulia": _3, friulivegiulia: _3, "friulivenezia-giulia": _3, friuliveneziagiulia: _3, friulivgiulia: _3, fvg: _3, laz: _3, lazio: _3, lig: _3, liguria: _3, lom: _3, lombardia: _3, lombardy: _3, lucania: _3, mar: _3, marche: _3, mol: _3, molise: _3, piedmont: _3, piemonte: _3, pmn: _3, pug: _3, puglia: _3, sar: _3, sardegna: _3, sardinia: _3, sic: _3, sicilia: _3, sicily: _3, taa: _3, tos: _3, toscana: _3, "trentin-sud-tirol": _3, "xn--trentin-sd-tirol-rzb": _3, "trentin-s\xFCd-tirol": _3, "trentin-sudtirol": _3, "xn--trentin-sdtirol-7vb": _3, "trentin-s\xFCdtirol": _3, "trentin-sued-tirol": _3, "trentin-suedtirol": _3, trentino: _3, "trentino-a-adige": _3, "trentino-aadige": _3, "trentino-alto-adige": _3, "trentino-altoadige": _3, "trentino-s-tirol": _3, "trentino-stirol": _3, "trentino-sud-tirol": _3, "xn--trentino-sd-tirol-c3b": _3, "trentino-s\xFCd-tirol": _3, "trentino-sudtirol": _3, "xn--trentino-sdtirol-szb": _3, "trentino-s\xFCdtirol": _3, "trentino-sued-tirol": _3, "trentino-suedtirol": _3, "trentinoa-adige": _3, trentinoaadige: _3, "trentinoalto-adige": _3, trentinoaltoadige: _3, "trentinos-tirol": _3, trentinostirol: _3, "trentinosud-tirol": _3, "xn--trentinosd-tirol-rzb": _3, "trentinos\xFCd-tirol": _3, trentinosudtirol: _3, "xn--trentinosdtirol-7vb": _3, "trentinos\xFCdtirol": _3, "trentinosued-tirol": _3, trentinosuedtirol: _3, "trentinsud-tirol": _3, "xn--trentinsd-tirol-6vb": _3, "trentins\xFCd-tirol": _3, trentinsudtirol: _3, "xn--trentinsdtirol-nsb": _3, "trentins\xFCdtirol": _3, "trentinsued-tirol": _3, trentinsuedtirol: _3, tuscany: _3, umb: _3, umbria: _3, "val-d-aosta": _3, "val-daosta": _3, "vald-aosta": _3, valdaosta: _3, "valle-aosta": _3, "valle-d-aosta": _3, "valle-daosta": _3, valleaosta: _3, "valled-aosta": _3, valledaosta: _3, "vallee-aoste": _3, "xn--valle-aoste-ebb": _3, "vall\xE9e-aoste": _3, "vallee-d-aoste": _3, "xn--valle-d-aoste-ehb": _3, "vall\xE9e-d-aoste": _3, valleeaoste: _3, "xn--valleaoste-e7a": _3, "vall\xE9eaoste": _3, valleedaoste: _3, "xn--valledaoste-ebb": _3, "vall\xE9edaoste": _3, vao: _3, vda: _3, ven: _3, veneto: _3, ag: _3, agrigento: _3, al: _3, alessandria: _3, "alto-adige": _3, altoadige: _3, an: _3, ancona: _3, "andria-barletta-trani": _3, "andria-trani-barletta": _3, andriabarlettatrani: _3, andriatranibarletta: _3, ao: _3, aosta: _3, aoste: _3, ap: _3, aq: _3, aquila: _3, ar: _3, arezzo: _3, "ascoli-piceno": _3, ascolipiceno: _3, asti: _3, at: _3, av: _3, avellino: _3, ba: _3, balsan: _3, "balsan-sudtirol": _3, "xn--balsan-sdtirol-nsb": _3, "balsan-s\xFCdtirol": _3, "balsan-suedtirol": _3, bari: _3, "barletta-trani-andria": _3, barlettatraniandria: _3, belluno: _3, benevento: _3, bergamo: _3, bg: _3, bi: _3, biella: _3, bl: _3, bn: _3, bo: _3, bologna: _3, bolzano: _3, "bolzano-altoadige": _3, bozen: _3, "bozen-sudtirol": _3, "xn--bozen-sdtirol-2ob": _3, "bozen-s\xFCdtirol": _3, "bozen-suedtirol": _3, br: _3, brescia: _3, brindisi: _3, bs: _3, bt: _3, bulsan: _3, "bulsan-sudtirol": _3, "xn--bulsan-sdtirol-nsb": _3, "bulsan-s\xFCdtirol": _3, "bulsan-suedtirol": _3, bz: _3, ca: _3, cagliari: _3, caltanissetta: _3, "campidano-medio": _3, campidanomedio: _3, campobasso: _3, "carbonia-iglesias": _3, carboniaiglesias: _3, "carrara-massa": _3, carraramassa: _3, caserta: _3, catania: _3, catanzaro: _3, cb: _3, ce: _3, "cesena-forli": _3, "xn--cesena-forl-mcb": _3, "cesena-forl\xEC": _3, cesenaforli: _3, "xn--cesenaforl-i8a": _3, "cesenaforl\xEC": _3, ch: _3, chieti: _3, ci: _3, cl: _3, cn: _3, co: _3, como: _3, cosenza: _3, cr: _3, cremona: _3, crotone: _3, cs: _3, ct: _3, cuneo: _3, cz: _3, "dell-ogliastra": _3, dellogliastra: _3, en: _3, enna: _3, fc: _3, fe: _3, fermo: _3, ferrara: _3, fg: _3, fi: _3, firenze: _3, florence: _3, fm: _3, foggia: _3, "forli-cesena": _3, "xn--forl-cesena-fcb": _3, "forl\xEC-cesena": _3, forlicesena: _3, "xn--forlcesena-c8a": _3, "forl\xECcesena": _3, fr: _3, frosinone: _3, ge: _3, genoa: _3, genova: _3, go: _3, gorizia: _3, gr: _3, grosseto: _3, "iglesias-carbonia": _3, iglesiascarbonia: _3, im: _3, imperia: _3, is: _3, isernia: _3, kr: _3, "la-spezia": _3, laquila: _3, laspezia: _3, latina: _3, lc: _3, le: _3, lecce: _3, lecco: _3, li: _3, livorno: _3, lo: _3, lodi: _3, lt: _3, lu: _3, lucca: _3, macerata: _3, mantova: _3, "massa-carrara": _3, massacarrara: _3, matera: _3, mb: _3, mc: _3, me: _3, "medio-campidano": _3, mediocampidano: _3, messina: _3, mi: _3, milan: _3, milano: _3, mn: _3, mo: _3, modena: _3, monza: _3, "monza-brianza": _3, "monza-e-della-brianza": _3, monzabrianza: _3, monzaebrianza: _3, monzaedellabrianza: _3, ms: _3, mt: _3, na: _3, naples: _3, napoli: _3, no: _3, novara: _3, nu: _3, nuoro: _3, og: _3, ogliastra: _3, "olbia-tempio": _3, olbiatempio: _3, or: _3, oristano: _3, ot: _3, pa: _3, padova: _3, padua: _3, palermo: _3, parma: _3, pavia: _3, pc: _3, pd: _3, pe: _3, perugia: _3, "pesaro-urbino": _3, pesarourbino: _3, pescara: _3, pg: _3, pi: _3, piacenza: _3, pisa: _3, pistoia: _3, pn: _3, po: _3, pordenone: _3, potenza: _3, pr: _3, prato: _3, pt: _3, pu: _3, pv: _3, pz: _3, ra: _3, ragusa: _3, ravenna: _3, rc: _3, re: _3, "reggio-calabria": _3, "reggio-emilia": _3, reggiocalabria: _3, reggioemilia: _3, rg: _3, ri: _3, rieti: _3, rimini: _3, rm: _3, rn: _3, ro: _3, roma: _3, rome: _3, rovigo: _3, sa: _3, salerno: _3, sassari: _3, savona: _3, si: _3, siena: _3, siracusa: _3, so: _3, sondrio: _3, sp: _3, sr: _3, ss: _3, "xn--sdtirol-n2a": _3, "s\xFCdtirol": _3, suedtirol: _3, sv: _3, ta: _3, taranto: _3, te: _3, "tempio-olbia": _3, tempioolbia: _3, teramo: _3, terni: _3, tn: _3, to: _3, torino: _3, tp: _3, tr: _3, "trani-andria-barletta": _3, "trani-barletta-andria": _3, traniandriabarletta: _3, tranibarlettaandria: _3, trapani: _3, trento: _3, treviso: _3, trieste: _3, ts: _3, turin: _3, tv: _3, ud: _3, udine: _3, "urbino-pesaro": _3, urbinopesaro: _3, va: _3, varese: _3, vb: _3, vc: _3, ve: _3, venezia: _3, venice: _3, verbania: _3, vercelli: _3, verona: _3, vi: _3, "vibo-valentia": _3, vibovalentia: _3, vicenza: _3, viterbo: _3, vr: _3, vs: _3, vt: _3, vv: _3, "12chars": _4, ibxos: _4, iliadboxos: _4, neen: [0, { jc: _4 }], "123homepage": _4, "16-b": _4, "32-b": _4, "64-b": _4, myspreadshop: _4, syncloud: _4 }], je: [1, { co: _3, net: _3, org: _3, of: _4 }], jm: _18, jo: [1, { agri: _3, ai: _3, com: _3, edu: _3, eng: _3, fm: _3, gov: _3, mil: _3, net: _3, org: _3, per: _3, phd: _3, sch: _3, tv: _3 }], jobs: _3, jp: [1, { ac: _3, ad: _3, co: _3, ed: _3, go: _3, gr: _3, lg: _3, ne: [1, { aseinet: _50, gehirn: _4, ivory: _4, "mail-box": _4, mints: _4, mokuren: _4, opal: _4, sakura: _4, sumomo: _4, topaz: _4 }], or: _3, aichi: [1, { aisai: _3, ama: _3, anjo: _3, asuke: _3, chiryu: _3, chita: _3, fuso: _3, gamagori: _3, handa: _3, hazu: _3, hekinan: _3, higashiura: _3, ichinomiya: _3, inazawa: _3, inuyama: _3, isshiki: _3, iwakura: _3, kanie: _3, kariya: _3, kasugai: _3, kira: _3, kiyosu: _3, komaki: _3, konan: _3, kota: _3, mihama: _3, miyoshi: _3, nishio: _3, nisshin: _3, obu: _3, oguchi: _3, oharu: _3, okazaki: _3, owariasahi: _3, seto: _3, shikatsu: _3, shinshiro: _3, shitara: _3, tahara: _3, takahama: _3, tobishima: _3, toei: _3, togo: _3, tokai: _3, tokoname: _3, toyoake: _3, toyohashi: _3, toyokawa: _3, toyone: _3, toyota: _3, tsushima: _3, yatomi: _3 }], akita: [1, { akita: _3, daisen: _3, fujisato: _3, gojome: _3, hachirogata: _3, happou: _3, higashinaruse: _3, honjo: _3, honjyo: _3, ikawa: _3, kamikoani: _3, kamioka: _3, katagami: _3, kazuno: _3, kitaakita: _3, kosaka: _3, kyowa: _3, misato: _3, mitane: _3, moriyoshi: _3, nikaho: _3, noshiro: _3, odate: _3, oga: _3, ogata: _3, semboku: _3, yokote: _3, yurihonjo: _3 }], aomori: [1, { aomori: _3, gonohe: _3, hachinohe: _3, hashikami: _3, hiranai: _3, hirosaki: _3, itayanagi: _3, kuroishi: _3, misawa: _3, mutsu: _3, nakadomari: _3, noheji: _3, oirase: _3, owani: _3, rokunohe: _3, sannohe: _3, shichinohe: _3, shingo: _3, takko: _3, towada: _3, tsugaru: _3, tsuruta: _3 }], chiba: [1, { abiko: _3, asahi: _3, chonan: _3, chosei: _3, choshi: _3, chuo: _3, funabashi: _3, futtsu: _3, hanamigawa: _3, ichihara: _3, ichikawa: _3, ichinomiya: _3, inzai: _3, isumi: _3, kamagaya: _3, kamogawa: _3, kashiwa: _3, katori: _3, katsuura: _3, kimitsu: _3, kisarazu: _3, kozaki: _3, kujukuri: _3, kyonan: _3, matsudo: _3, midori: _3, mihama: _3, minamiboso: _3, mobara: _3, mutsuzawa: _3, nagara: _3, nagareyama: _3, narashino: _3, narita: _3, noda: _3, oamishirasato: _3, omigawa: _3, onjuku: _3, otaki: _3, sakae: _3, sakura: _3, shimofusa: _3, shirako: _3, shiroi: _3, shisui: _3, sodegaura: _3, sosa: _3, tako: _3, tateyama: _3, togane: _3, tohnosho: _3, tomisato: _3, urayasu: _3, yachimata: _3, yachiyo: _3, yokaichiba: _3, yokoshibahikari: _3, yotsukaido: _3 }], ehime: [1, { ainan: _3, honai: _3, ikata: _3, imabari: _3, iyo: _3, kamijima: _3, kihoku: _3, kumakogen: _3, masaki: _3, matsuno: _3, matsuyama: _3, namikata: _3, niihama: _3, ozu: _3, saijo: _3, seiyo: _3, shikokuchuo: _3, tobe: _3, toon: _3, uchiko: _3, uwajima: _3, yawatahama: _3 }], fukui: [1, { echizen: _3, eiheiji: _3, fukui: _3, ikeda: _3, katsuyama: _3, mihama: _3, minamiechizen: _3, obama: _3, ohi: _3, ono: _3, sabae: _3, sakai: _3, takahama: _3, tsuruga: _3, wakasa: _3 }], fukuoka: [1, { ashiya: _3, buzen: _3, chikugo: _3, chikuho: _3, chikujo: _3, chikushino: _3, chikuzen: _3, chuo: _3, dazaifu: _3, fukuchi: _3, hakata: _3, higashi: _3, hirokawa: _3, hisayama: _3, iizuka: _3, inatsuki: _3, kaho: _3, kasuga: _3, kasuya: _3, kawara: _3, keisen: _3, koga: _3, kurate: _3, kurogi: _3, kurume: _3, minami: _3, miyako: _3, miyama: _3, miyawaka: _3, mizumaki: _3, munakata: _3, nakagawa: _3, nakama: _3, nishi: _3, nogata: _3, ogori: _3, okagaki: _3, okawa: _3, oki: _3, omuta: _3, onga: _3, onojo: _3, oto: _3, saigawa: _3, sasaguri: _3, shingu: _3, shinyoshitomi: _3, shonai: _3, soeda: _3, sue: _3, tachiarai: _3, tagawa: _3, takata: _3, toho: _3, toyotsu: _3, tsuiki: _3, ukiha: _3, umi: _3, usui: _3, yamada: _3, yame: _3, yanagawa: _3, yukuhashi: _3 }], fukushima: [1, { aizubange: _3, aizumisato: _3, aizuwakamatsu: _3, asakawa: _3, bandai: _3, date: _3, fukushima: _3, furudono: _3, futaba: _3, hanawa: _3, higashi: _3, hirata: _3, hirono: _3, iitate: _3, inawashiro: _3, ishikawa: _3, iwaki: _3, izumizaki: _3, kagamiishi: _3, kaneyama: _3, kawamata: _3, kitakata: _3, kitashiobara: _3, koori: _3, koriyama: _3, kunimi: _3, miharu: _3, mishima: _3, namie: _3, nango: _3, nishiaizu: _3, nishigo: _3, okuma: _3, omotego: _3, ono: _3, otama: _3, samegawa: _3, shimogo: _3, shirakawa: _3, showa: _3, soma: _3, sukagawa: _3, taishin: _3, tamakawa: _3, tanagura: _3, tenei: _3, yabuki: _3, yamato: _3, yamatsuri: _3, yanaizu: _3, yugawa: _3 }], gifu: [1, { anpachi: _3, ena: _3, gifu: _3, ginan: _3, godo: _3, gujo: _3, hashima: _3, hichiso: _3, hida: _3, higashishirakawa: _3, ibigawa: _3, ikeda: _3, kakamigahara: _3, kani: _3, kasahara: _3, kasamatsu: _3, kawaue: _3, kitagata: _3, mino: _3, minokamo: _3, mitake: _3, mizunami: _3, motosu: _3, nakatsugawa: _3, ogaki: _3, sakahogi: _3, seki: _3, sekigahara: _3, shirakawa: _3, tajimi: _3, takayama: _3, tarui: _3, toki: _3, tomika: _3, wanouchi: _3, yamagata: _3, yaotsu: _3, yoro: _3 }], gunma: [1, { annaka: _3, chiyoda: _3, fujioka: _3, higashiagatsuma: _3, isesaki: _3, itakura: _3, kanna: _3, kanra: _3, katashina: _3, kawaba: _3, kiryu: _3, kusatsu: _3, maebashi: _3, meiwa: _3, midori: _3, minakami: _3, naganohara: _3, nakanojo: _3, nanmoku: _3, numata: _3, oizumi: _3, ora: _3, ota: _3, shibukawa: _3, shimonita: _3, shinto: _3, showa: _3, takasaki: _3, takayama: _3, tamamura: _3, tatebayashi: _3, tomioka: _3, tsukiyono: _3, tsumagoi: _3, ueno: _3, yoshioka: _3 }], hiroshima: [1, { asaminami: _3, daiwa: _3, etajima: _3, fuchu: _3, fukuyama: _3, hatsukaichi: _3, higashihiroshima: _3, hongo: _3, jinsekikogen: _3, kaita: _3, kui: _3, kumano: _3, kure: _3, mihara: _3, miyoshi: _3, naka: _3, onomichi: _3, osakikamijima: _3, otake: _3, saka: _3, sera: _3, seranishi: _3, shinichi: _3, shobara: _3, takehara: _3 }], hokkaido: [1, { abashiri: _3, abira: _3, aibetsu: _3, akabira: _3, akkeshi: _3, asahikawa: _3, ashibetsu: _3, ashoro: _3, assabu: _3, atsuma: _3, bibai: _3, biei: _3, bifuka: _3, bihoro: _3, biratori: _3, chippubetsu: _3, chitose: _3, date: _3, ebetsu: _3, embetsu: _3, eniwa: _3, erimo: _3, esan: _3, esashi: _3, fukagawa: _3, fukushima: _3, furano: _3, furubira: _3, haboro: _3, hakodate: _3, hamatonbetsu: _3, hidaka: _3, higashikagura: _3, higashikawa: _3, hiroo: _3, hokuryu: _3, hokuto: _3, honbetsu: _3, horokanai: _3, horonobe: _3, ikeda: _3, imakane: _3, ishikari: _3, iwamizawa: _3, iwanai: _3, kamifurano: _3, kamikawa: _3, kamishihoro: _3, kamisunagawa: _3, kamoenai: _3, kayabe: _3, kembuchi: _3, kikonai: _3, kimobetsu: _3, kitahiroshima: _3, kitami: _3, kiyosato: _3, koshimizu: _3, kunneppu: _3, kuriyama: _3, kuromatsunai: _3, kushiro: _3, kutchan: _3, kyowa: _3, mashike: _3, matsumae: _3, mikasa: _3, minamifurano: _3, mombetsu: _3, moseushi: _3, mukawa: _3, muroran: _3, naie: _3, nakagawa: _3, nakasatsunai: _3, nakatombetsu: _3, nanae: _3, nanporo: _3, nayoro: _3, nemuro: _3, niikappu: _3, niki: _3, nishiokoppe: _3, noboribetsu: _3, numata: _3, obihiro: _3, obira: _3, oketo: _3, okoppe: _3, otaru: _3, otobe: _3, otofuke: _3, otoineppu: _3, oumu: _3, ozora: _3, pippu: _3, rankoshi: _3, rebun: _3, rikubetsu: _3, rishiri: _3, rishirifuji: _3, saroma: _3, sarufutsu: _3, shakotan: _3, shari: _3, shibecha: _3, shibetsu: _3, shikabe: _3, shikaoi: _3, shimamaki: _3, shimizu: _3, shimokawa: _3, shinshinotsu: _3, shintoku: _3, shiranuka: _3, shiraoi: _3, shiriuchi: _3, sobetsu: _3, sunagawa: _3, taiki: _3, takasu: _3, takikawa: _3, takinoue: _3, teshikaga: _3, tobetsu: _3, tohma: _3, tomakomai: _3, tomari: _3, toya: _3, toyako: _3, toyotomi: _3, toyoura: _3, tsubetsu: _3, tsukigata: _3, urakawa: _3, urausu: _3, uryu: _3, utashinai: _3, wakkanai: _3, wassamu: _3, yakumo: _3, yoichi: _3 }], hyogo: [1, { aioi: _3, akashi: _3, ako: _3, amagasaki: _3, aogaki: _3, asago: _3, ashiya: _3, awaji: _3, fukusaki: _3, goshiki: _3, harima: _3, himeji: _3, ichikawa: _3, inagawa: _3, itami: _3, kakogawa: _3, kamigori: _3, kamikawa: _3, kasai: _3, kasuga: _3, kawanishi: _3, miki: _3, minamiawaji: _3, nishinomiya: _3, nishiwaki: _3, ono: _3, sanda: _3, sannan: _3, sasayama: _3, sayo: _3, shingu: _3, shinonsen: _3, shiso: _3, sumoto: _3, taishi: _3, taka: _3, takarazuka: _3, takasago: _3, takino: _3, tamba: _3, tatsuno: _3, toyooka: _3, yabu: _3, yashiro: _3, yoka: _3, yokawa: _3 }], ibaraki: [1, { ami: _3, asahi: _3, bando: _3, chikusei: _3, daigo: _3, fujishiro: _3, hitachi: _3, hitachinaka: _3, hitachiomiya: _3, hitachiota: _3, ibaraki: _3, ina: _3, inashiki: _3, itako: _3, iwama: _3, joso: _3, kamisu: _3, kasama: _3, kashima: _3, kasumigaura: _3, koga: _3, miho: _3, mito: _3, moriya: _3, naka: _3, namegata: _3, oarai: _3, ogawa: _3, omitama: _3, ryugasaki: _3, sakai: _3, sakuragawa: _3, shimodate: _3, shimotsuma: _3, shirosato: _3, sowa: _3, suifu: _3, takahagi: _3, tamatsukuri: _3, tokai: _3, tomobe: _3, tone: _3, toride: _3, tsuchiura: _3, tsukuba: _3, uchihara: _3, ushiku: _3, yachiyo: _3, yamagata: _3, yawara: _3, yuki: _3 }], ishikawa: [1, { anamizu: _3, hakui: _3, hakusan: _3, kaga: _3, kahoku: _3, kanazawa: _3, kawakita: _3, komatsu: _3, nakanoto: _3, nanao: _3, nomi: _3, nonoichi: _3, noto: _3, shika: _3, suzu: _3, tsubata: _3, tsurugi: _3, uchinada: _3, wajima: _3 }], iwate: [1, { fudai: _3, fujisawa: _3, hanamaki: _3, hiraizumi: _3, hirono: _3, ichinohe: _3, ichinoseki: _3, iwaizumi: _3, iwate: _3, joboji: _3, kamaishi: _3, kanegasaki: _3, karumai: _3, kawai: _3, kitakami: _3, kuji: _3, kunohe: _3, kuzumaki: _3, miyako: _3, mizusawa: _3, morioka: _3, ninohe: _3, noda: _3, ofunato: _3, oshu: _3, otsuchi: _3, rikuzentakata: _3, shiwa: _3, shizukuishi: _3, sumita: _3, tanohata: _3, tono: _3, yahaba: _3, yamada: _3 }], kagawa: [1, { ayagawa: _3, higashikagawa: _3, kanonji: _3, kotohira: _3, manno: _3, marugame: _3, mitoyo: _3, naoshima: _3, sanuki: _3, tadotsu: _3, takamatsu: _3, tonosho: _3, uchinomi: _3, utazu: _3, zentsuji: _3 }], kagoshima: [1, { akune: _3, amami: _3, hioki: _3, isa: _3, isen: _3, izumi: _3, kagoshima: _3, kanoya: _3, kawanabe: _3, kinko: _3, kouyama: _3, makurazaki: _3, matsumoto: _3, minamitane: _3, nakatane: _3, nishinoomote: _3, satsumasendai: _3, soo: _3, tarumizu: _3, yusui: _3 }], kanagawa: [1, { aikawa: _3, atsugi: _3, ayase: _3, chigasaki: _3, ebina: _3, fujisawa: _3, hadano: _3, hakone: _3, hiratsuka: _3, isehara: _3, kaisei: _3, kamakura: _3, kiyokawa: _3, matsuda: _3, minamiashigara: _3, miura: _3, nakai: _3, ninomiya: _3, odawara: _3, oi: _3, oiso: _3, sagamihara: _3, samukawa: _3, tsukui: _3, yamakita: _3, yamato: _3, yokosuka: _3, yugawara: _3, zama: _3, zushi: _3 }], kochi: [1, { aki: _3, geisei: _3, hidaka: _3, higashitsuno: _3, ino: _3, kagami: _3, kami: _3, kitagawa: _3, kochi: _3, mihara: _3, motoyama: _3, muroto: _3, nahari: _3, nakamura: _3, nankoku: _3, nishitosa: _3, niyodogawa: _3, ochi: _3, okawa: _3, otoyo: _3, otsuki: _3, sakawa: _3, sukumo: _3, susaki: _3, tosa: _3, tosashimizu: _3, toyo: _3, tsuno: _3, umaji: _3, yasuda: _3, yusuhara: _3 }], kumamoto: [1, { amakusa: _3, arao: _3, aso: _3, choyo: _3, gyokuto: _3, kamiamakusa: _3, kikuchi: _3, kumamoto: _3, mashiki: _3, mifune: _3, minamata: _3, minamioguni: _3, nagasu: _3, nishihara: _3, oguni: _3, ozu: _3, sumoto: _3, takamori: _3, uki: _3, uto: _3, yamaga: _3, yamato: _3, yatsushiro: _3 }], kyoto: [1, { ayabe: _3, fukuchiyama: _3, higashiyama: _3, ide: _3, ine: _3, joyo: _3, kameoka: _3, kamo: _3, kita: _3, kizu: _3, kumiyama: _3, kyotamba: _3, kyotanabe: _3, kyotango: _3, maizuru: _3, minami: _3, minamiyamashiro: _3, miyazu: _3, muko: _3, nagaokakyo: _3, nakagyo: _3, nantan: _3, oyamazaki: _3, sakyo: _3, seika: _3, tanabe: _3, uji: _3, ujitawara: _3, wazuka: _3, yamashina: _3, yawata: _3 }], mie: [1, { asahi: _3, inabe: _3, ise: _3, kameyama: _3, kawagoe: _3, kiho: _3, kisosaki: _3, kiwa: _3, komono: _3, kumano: _3, kuwana: _3, matsusaka: _3, meiwa: _3, mihama: _3, minamiise: _3, misugi: _3, miyama: _3, nabari: _3, shima: _3, suzuka: _3, tado: _3, taiki: _3, taki: _3, tamaki: _3, toba: _3, tsu: _3, udono: _3, ureshino: _3, watarai: _3, yokkaichi: _3 }], miyagi: [1, { furukawa: _3, higashimatsushima: _3, ishinomaki: _3, iwanuma: _3, kakuda: _3, kami: _3, kawasaki: _3, marumori: _3, matsushima: _3, minamisanriku: _3, misato: _3, murata: _3, natori: _3, ogawara: _3, ohira: _3, onagawa: _3, osaki: _3, rifu: _3, semine: _3, shibata: _3, shichikashuku: _3, shikama: _3, shiogama: _3, shiroishi: _3, tagajo: _3, taiwa: _3, tome: _3, tomiya: _3, wakuya: _3, watari: _3, yamamoto: _3, zao: _3 }], miyazaki: [1, { aya: _3, ebino: _3, gokase: _3, hyuga: _3, kadogawa: _3, kawaminami: _3, kijo: _3, kitagawa: _3, kitakata: _3, kitaura: _3, kobayashi: _3, kunitomi: _3, kushima: _3, mimata: _3, miyakonojo: _3, miyazaki: _3, morotsuka: _3, nichinan: _3, nishimera: _3, nobeoka: _3, saito: _3, shiiba: _3, shintomi: _3, takaharu: _3, takanabe: _3, takazaki: _3, tsuno: _3 }], nagano: [1, { achi: _3, agematsu: _3, anan: _3, aoki: _3, asahi: _3, azumino: _3, chikuhoku: _3, chikuma: _3, chino: _3, fujimi: _3, hakuba: _3, hara: _3, hiraya: _3, iida: _3, iijima: _3, iiyama: _3, iizuna: _3, ikeda: _3, ikusaka: _3, ina: _3, karuizawa: _3, kawakami: _3, kiso: _3, kisofukushima: _3, kitaaiki: _3, komagane: _3, komoro: _3, matsukawa: _3, matsumoto: _3, miasa: _3, minamiaiki: _3, minamimaki: _3, minamiminowa: _3, minowa: _3, miyada: _3, miyota: _3, mochizuki: _3, nagano: _3, nagawa: _3, nagiso: _3, nakagawa: _3, nakano: _3, nozawaonsen: _3, obuse: _3, ogawa: _3, okaya: _3, omachi: _3, omi: _3, ookuwa: _3, ooshika: _3, otaki: _3, otari: _3, sakae: _3, sakaki: _3, saku: _3, sakuho: _3, shimosuwa: _3, shinanomachi: _3, shiojiri: _3, suwa: _3, suzaka: _3, takagi: _3, takamori: _3, takayama: _3, tateshina: _3, tatsuno: _3, togakushi: _3, togura: _3, tomi: _3, ueda: _3, wada: _3, yamagata: _3, yamanouchi: _3, yasaka: _3, yasuoka: _3 }], nagasaki: [1, { chijiwa: _3, futsu: _3, goto: _3, hasami: _3, hirado: _3, iki: _3, isahaya: _3, kawatana: _3, kuchinotsu: _3, matsuura: _3, nagasaki: _3, obama: _3, omura: _3, oseto: _3, saikai: _3, sasebo: _3, seihi: _3, shimabara: _3, shinkamigoto: _3, togitsu: _3, tsushima: _3, unzen: _3 }], nara: [1, { ando: _3, gose: _3, heguri: _3, higashiyoshino: _3, ikaruga: _3, ikoma: _3, kamikitayama: _3, kanmaki: _3, kashiba: _3, kashihara: _3, katsuragi: _3, kawai: _3, kawakami: _3, kawanishi: _3, koryo: _3, kurotaki: _3, mitsue: _3, miyake: _3, nara: _3, nosegawa: _3, oji: _3, ouda: _3, oyodo: _3, sakurai: _3, sango: _3, shimoichi: _3, shimokitayama: _3, shinjo: _3, soni: _3, takatori: _3, tawaramoto: _3, tenkawa: _3, tenri: _3, uda: _3, yamatokoriyama: _3, yamatotakada: _3, yamazoe: _3, yoshino: _3 }], niigata: [1, { aga: _3, agano: _3, gosen: _3, itoigawa: _3, izumozaki: _3, joetsu: _3, kamo: _3, kariwa: _3, kashiwazaki: _3, minamiuonuma: _3, mitsuke: _3, muika: _3, murakami: _3, myoko: _3, nagaoka: _3, niigata: _3, ojiya: _3, omi: _3, sado: _3, sanjo: _3, seiro: _3, seirou: _3, sekikawa: _3, shibata: _3, tagami: _3, tainai: _3, tochio: _3, tokamachi: _3, tsubame: _3, tsunan: _3, uonuma: _3, yahiko: _3, yoita: _3, yuzawa: _3 }], oita: [1, { beppu: _3, bungoono: _3, bungotakada: _3, hasama: _3, hiji: _3, himeshima: _3, hita: _3, kamitsue: _3, kokonoe: _3, kuju: _3, kunisaki: _3, kusu: _3, oita: _3, saiki: _3, taketa: _3, tsukumi: _3, usa: _3, usuki: _3, yufu: _3 }], okayama: [1, { akaiwa: _3, asakuchi: _3, bizen: _3, hayashima: _3, ibara: _3, kagamino: _3, kasaoka: _3, kibichuo: _3, kumenan: _3, kurashiki: _3, maniwa: _3, misaki: _3, nagi: _3, niimi: _3, nishiawakura: _3, okayama: _3, satosho: _3, setouchi: _3, shinjo: _3, shoo: _3, soja: _3, takahashi: _3, tamano: _3, tsuyama: _3, wake: _3, yakage: _3 }], okinawa: [1, { aguni: _3, ginowan: _3, ginoza: _3, gushikami: _3, haebaru: _3, higashi: _3, hirara: _3, iheya: _3, ishigaki: _3, ishikawa: _3, itoman: _3, izena: _3, kadena: _3, kin: _3, kitadaito: _3, kitanakagusuku: _3, kumejima: _3, kunigami: _3, minamidaito: _3, motobu: _3, nago: _3, naha: _3, nakagusuku: _3, nakijin: _3, nanjo: _3, nishihara: _3, ogimi: _3, okinawa: _3, onna: _3, shimoji: _3, taketomi: _3, tarama: _3, tokashiki: _3, tomigusuku: _3, tonaki: _3, urasoe: _3, uruma: _3, yaese: _3, yomitan: _3, yonabaru: _3, yonaguni: _3, zamami: _3 }], osaka: [1, { abeno: _3, chihayaakasaka: _3, chuo: _3, daito: _3, fujiidera: _3, habikino: _3, hannan: _3, higashiosaka: _3, higashisumiyoshi: _3, higashiyodogawa: _3, hirakata: _3, ibaraki: _3, ikeda: _3, izumi: _3, izumiotsu: _3, izumisano: _3, kadoma: _3, kaizuka: _3, kanan: _3, kashiwara: _3, katano: _3, kawachinagano: _3, kishiwada: _3, kita: _3, kumatori: _3, matsubara: _3, minato: _3, minoh: _3, misaki: _3, moriguchi: _3, neyagawa: _3, nishi: _3, nose: _3, osakasayama: _3, sakai: _3, sayama: _3, sennan: _3, settsu: _3, shijonawate: _3, shimamoto: _3, suita: _3, tadaoka: _3, taishi: _3, tajiri: _3, takaishi: _3, takatsuki: _3, tondabayashi: _3, toyonaka: _3, toyono: _3, yao: _3 }], saga: [1, { ariake: _3, arita: _3, fukudomi: _3, genkai: _3, hamatama: _3, hizen: _3, imari: _3, kamimine: _3, kanzaki: _3, karatsu: _3, kashima: _3, kitagata: _3, kitahata: _3, kiyama: _3, kouhoku: _3, kyuragi: _3, nishiarita: _3, ogi: _3, omachi: _3, ouchi: _3, saga: _3, shiroishi: _3, taku: _3, tara: _3, tosu: _3, yoshinogari: _3 }], saitama: [1, { arakawa: _3, asaka: _3, chichibu: _3, fujimi: _3, fujimino: _3, fukaya: _3, hanno: _3, hanyu: _3, hasuda: _3, hatogaya: _3, hatoyama: _3, hidaka: _3, higashichichibu: _3, higashimatsuyama: _3, honjo: _3, ina: _3, iruma: _3, iwatsuki: _3, kamiizumi: _3, kamikawa: _3, kamisato: _3, kasukabe: _3, kawagoe: _3, kawaguchi: _3, kawajima: _3, kazo: _3, kitamoto: _3, koshigaya: _3, kounosu: _3, kuki: _3, kumagaya: _3, matsubushi: _3, minano: _3, misato: _3, miyashiro: _3, miyoshi: _3, moroyama: _3, nagatoro: _3, namegawa: _3, niiza: _3, ogano: _3, ogawa: _3, ogose: _3, okegawa: _3, omiya: _3, otaki: _3, ranzan: _3, ryokami: _3, saitama: _3, sakado: _3, satte: _3, sayama: _3, shiki: _3, shiraoka: _3, soka: _3, sugito: _3, toda: _3, tokigawa: _3, tokorozawa: _3, tsurugashima: _3, urawa: _3, warabi: _3, yashio: _3, yokoze: _3, yono: _3, yorii: _3, yoshida: _3, yoshikawa: _3, yoshimi: _3 }], shiga: [1, { aisho: _3, gamo: _3, higashiomi: _3, hikone: _3, koka: _3, konan: _3, kosei: _3, koto: _3, kusatsu: _3, maibara: _3, moriyama: _3, nagahama: _3, nishiazai: _3, notogawa: _3, omihachiman: _3, otsu: _3, ritto: _3, ryuoh: _3, takashima: _3, takatsuki: _3, torahime: _3, toyosato: _3, yasu: _3 }], shimane: [1, { akagi: _3, ama: _3, gotsu: _3, hamada: _3, higashiizumo: _3, hikawa: _3, hikimi: _3, izumo: _3, kakinoki: _3, masuda: _3, matsue: _3, misato: _3, nishinoshima: _3, ohda: _3, okinoshima: _3, okuizumo: _3, shimane: _3, tamayu: _3, tsuwano: _3, unnan: _3, yakumo: _3, yasugi: _3, yatsuka: _3 }], shizuoka: [1, { arai: _3, atami: _3, fuji: _3, fujieda: _3, fujikawa: _3, fujinomiya: _3, fukuroi: _3, gotemba: _3, haibara: _3, hamamatsu: _3, higashiizu: _3, ito: _3, iwata: _3, izu: _3, izunokuni: _3, kakegawa: _3, kannami: _3, kawanehon: _3, kawazu: _3, kikugawa: _3, kosai: _3, makinohara: _3, matsuzaki: _3, minamiizu: _3, mishima: _3, morimachi: _3, nishiizu: _3, numazu: _3, omaezaki: _3, shimada: _3, shimizu: _3, shimoda: _3, shizuoka: _3, susono: _3, yaizu: _3, yoshida: _3 }], tochigi: [1, { ashikaga: _3, bato: _3, haga: _3, ichikai: _3, iwafune: _3, kaminokawa: _3, kanuma: _3, karasuyama: _3, kuroiso: _3, mashiko: _3, mibu: _3, moka: _3, motegi: _3, nasu: _3, nasushiobara: _3, nikko: _3, nishikata: _3, nogi: _3, ohira: _3, ohtawara: _3, oyama: _3, sakura: _3, sano: _3, shimotsuke: _3, shioya: _3, takanezawa: _3, tochigi: _3, tsuga: _3, ujiie: _3, utsunomiya: _3, yaita: _3 }], tokushima: [1, { aizumi: _3, anan: _3, ichiba: _3, itano: _3, kainan: _3, komatsushima: _3, matsushige: _3, mima: _3, minami: _3, miyoshi: _3, mugi: _3, nakagawa: _3, naruto: _3, sanagochi: _3, shishikui: _3, tokushima: _3, wajiki: _3 }], tokyo: [1, { adachi: _3, akiruno: _3, akishima: _3, aogashima: _3, arakawa: _3, bunkyo: _3, chiyoda: _3, chofu: _3, chuo: _3, edogawa: _3, fuchu: _3, fussa: _3, hachijo: _3, hachioji: _3, hamura: _3, higashikurume: _3, higashimurayama: _3, higashiyamato: _3, hino: _3, hinode: _3, hinohara: _3, inagi: _3, itabashi: _3, katsushika: _3, kita: _3, kiyose: _3, kodaira: _3, koganei: _3, kokubunji: _3, komae: _3, koto: _3, kouzushima: _3, kunitachi: _3, machida: _3, meguro: _3, minato: _3, mitaka: _3, mizuho: _3, musashimurayama: _3, musashino: _3, nakano: _3, nerima: _3, ogasawara: _3, okutama: _3, ome: _3, oshima: _3, ota: _3, setagaya: _3, shibuya: _3, shinagawa: _3, shinjuku: _3, suginami: _3, sumida: _3, tachikawa: _3, taito: _3, tama: _3, toshima: _3 }], tottori: [1, { chizu: _3, hino: _3, kawahara: _3, koge: _3, kotoura: _3, misasa: _3, nanbu: _3, nichinan: _3, sakaiminato: _3, tottori: _3, wakasa: _3, yazu: _3, yonago: _3 }], toyama: [1, { asahi: _3, fuchu: _3, fukumitsu: _3, funahashi: _3, himi: _3, imizu: _3, inami: _3, johana: _3, kamiichi: _3, kurobe: _3, nakaniikawa: _3, namerikawa: _3, nanto: _3, nyuzen: _3, oyabe: _3, taira: _3, takaoka: _3, tateyama: _3, toga: _3, tonami: _3, toyama: _3, unazuki: _3, uozu: _3, yamada: _3 }], wakayama: [1, { arida: _3, aridagawa: _3, gobo: _3, hashimoto: _3, hidaka: _3, hirogawa: _3, inami: _3, iwade: _3, kainan: _3, kamitonda: _3, katsuragi: _3, kimino: _3, kinokawa: _3, kitayama: _3, koya: _3, koza: _3, kozagawa: _3, kudoyama: _3, kushimoto: _3, mihama: _3, misato: _3, nachikatsuura: _3, shingu: _3, shirahama: _3, taiji: _3, tanabe: _3, wakayama: _3, yuasa: _3, yura: _3 }], yamagata: [1, { asahi: _3, funagata: _3, higashine: _3, iide: _3, kahoku: _3, kaminoyama: _3, kaneyama: _3, kawanishi: _3, mamurogawa: _3, mikawa: _3, murayama: _3, nagai: _3, nakayama: _3, nanyo: _3, nishikawa: _3, obanazawa: _3, oe: _3, oguni: _3, ohkura: _3, oishida: _3, sagae: _3, sakata: _3, sakegawa: _3, shinjo: _3, shirataka: _3, shonai: _3, takahata: _3, tendo: _3, tozawa: _3, tsuruoka: _3, yamagata: _3, yamanobe: _3, yonezawa: _3, yuza: _3 }], yamaguchi: [1, { abu: _3, hagi: _3, hikari: _3, hofu: _3, iwakuni: _3, kudamatsu: _3, mitou: _3, nagato: _3, oshima: _3, shimonoseki: _3, shunan: _3, tabuse: _3, tokuyama: _3, toyota: _3, ube: _3, yuu: _3 }], yamanashi: [1, { chuo: _3, doshi: _3, fuefuki: _3, fujikawa: _3, fujikawaguchiko: _3, fujiyoshida: _3, hayakawa: _3, hokuto: _3, ichikawamisato: _3, kai: _3, kofu: _3, koshu: _3, kosuge: _3, "minami-alps": _3, minobu: _3, nakamichi: _3, nanbu: _3, narusawa: _3, nirasaki: _3, nishikatsura: _3, oshino: _3, otsuki: _3, showa: _3, tabayama: _3, tsuru: _3, uenohara: _3, yamanakako: _3, yamanashi: _3 }], "xn--ehqz56n": _3, "\u4E09\u91CD": _3, "xn--1lqs03n": _3, "\u4EAC\u90FD": _3, "xn--qqqt11m": _3, "\u4F50\u8CC0": _3, "xn--f6qx53a": _3, "\u5175\u5EAB": _3, "xn--djrs72d6uy": _3, "\u5317\u6D77\u9053": _3, "xn--mkru45i": _3, "\u5343\u8449": _3, "xn--0trq7p7nn": _3, "\u548C\u6B4C\u5C71": _3, "xn--5js045d": _3, "\u57FC\u7389": _3, "xn--kbrq7o": _3, "\u5927\u5206": _3, "xn--pssu33l": _3, "\u5927\u962A": _3, "xn--ntsq17g": _3, "\u5948\u826F": _3, "xn--uisz3g": _3, "\u5BAE\u57CE": _3, "xn--6btw5a": _3, "\u5BAE\u5D0E": _3, "xn--1ctwo": _3, "\u5BCC\u5C71": _3, "xn--6orx2r": _3, "\u5C71\u53E3": _3, "xn--rht61e": _3, "\u5C71\u5F62": _3, "xn--rht27z": _3, "\u5C71\u68A8": _3, "xn--nit225k": _3, "\u5C90\u961C": _3, "xn--rht3d": _3, "\u5CA1\u5C71": _3, "xn--djty4k": _3, "\u5CA9\u624B": _3, "xn--klty5x": _3, "\u5CF6\u6839": _3, "xn--kltx9a": _3, "\u5E83\u5CF6": _3, "xn--kltp7d": _3, "\u5FB3\u5CF6": _3, "xn--c3s14m": _3, "\u611B\u5A9B": _3, "xn--vgu402c": _3, "\u611B\u77E5": _3, "xn--efvn9s": _3, "\u65B0\u6F5F": _3, "xn--1lqs71d": _3, "\u6771\u4EAC": _3, "xn--4pvxs": _3, "\u6803\u6728": _3, "xn--uuwu58a": _3, "\u6C96\u7E04": _3, "xn--zbx025d": _3, "\u6ECB\u8CC0": _3, "xn--8pvr4u": _3, "\u718A\u672C": _3, "xn--5rtp49c": _3, "\u77F3\u5DDD": _3, "xn--ntso0iqx3a": _3, "\u795E\u5948\u5DDD": _3, "xn--elqq16h": _3, "\u798F\u4E95": _3, "xn--4it168d": _3, "\u798F\u5CA1": _3, "xn--klt787d": _3, "\u798F\u5CF6": _3, "xn--rny31h": _3, "\u79CB\u7530": _3, "xn--7t0a264c": _3, "\u7FA4\u99AC": _3, "xn--uist22h": _3, "\u8328\u57CE": _3, "xn--8ltr62k": _3, "\u9577\u5D0E": _3, "xn--2m4a15e": _3, "\u9577\u91CE": _3, "xn--32vp30h": _3, "\u9752\u68EE": _3, "xn--4it797k": _3, "\u9759\u5CA1": _3, "xn--5rtq34k": _3, "\u9999\u5DDD": _3, "xn--k7yn95e": _3, "\u9AD8\u77E5": _3, "xn--tor131o": _3, "\u9CE5\u53D6": _3, "xn--d5qv7z876c": _3, "\u9E7F\u5150\u5CF6": _3, kawasaki: _18, kitakyushu: _18, kobe: _18, nagoya: _18, sapporo: _18, sendai: _18, yokohama: _18, buyshop: _4, fashionstore: _4, handcrafted: _4, kawaiishop: _4, supersale: _4, theshop: _4, "0am": _4, "0g0": _4, "0j0": _4, "0t0": _4, mydns: _4, pgw: _4, wjg: _4, usercontent: _4, angry: _4, babyblue: _4, babymilk: _4, backdrop: _4, bambina: _4, bitter: _4, blush: _4, boo: _4, boy: _4, boyfriend: _4, but: _4, candypop: _4, capoo: _4, catfood: _4, cheap: _4, chicappa: _4, chillout: _4, chips: _4, chowder: _4, chu: _4, ciao: _4, cocotte: _4, coolblog: _4, cranky: _4, cutegirl: _4, daa: _4, deca: _4, deci: _4, digick: _4, egoism: _4, fakefur: _4, fem: _4, flier: _4, floppy: _4, fool: _4, frenchkiss: _4, girlfriend: _4, girly: _4, gloomy: _4, gonna: _4, greater: _4, hacca: _4, heavy: _4, her: _4, hiho: _4, hippy: _4, holy: _4, hungry: _4, icurus: _4, itigo: _4, jellybean: _4, kikirara: _4, kill: _4, kilo: _4, kuron: _4, littlestar: _4, lolipopmc: _4, lolitapunk: _4, lomo: _4, lovepop: _4, lovesick: _4, main: _4, mods: _4, mond: _4, mongolian: _4, moo: _4, namaste: _4, nikita: _4, nobushi: _4, noor: _4, oops: _4, parallel: _4, parasite: _4, pecori: _4, peewee: _4, penne: _4, pepper: _4, perma: _4, pigboat: _4, pinoko: _4, punyu: _4, pupu: _4, pussycat: _4, pya: _4, raindrop: _4, readymade: _4, sadist: _4, schoolbus: _4, secret: _4, staba: _4, stripper: _4, sub: _4, sunnyday: _4, thick: _4, tonkotsu: _4, under: _4, upper: _4, velvet: _4, verse: _4, versus: _4, vivian: _4, watson: _4, weblike: _4, whitesnow: _4, zombie: _4, hateblo: _4, hatenablog: _4, hatenadiary: _4, "2-d": _4, bona: _4, crap: _4, daynight: _4, eek: _4, flop: _4, halfmoon: _4, jeez: _4, matrix: _4, mimoza: _4, netgamers: _4, nyanta: _4, o0o0: _4, rdy: _4, rgr: _4, rulez: _4, sakurastorage: [0, { isk01: _55, isk02: _55 }], saloon: _4, sblo: _4, skr: _4, tank: _4, "uh-oh": _4, undo: _4, webaccel: [0, { rs: _4, user: _4 }], websozai: _4, xii: _4 }], ke: [1, { ac: _3, co: _3, go: _3, info: _3, me: _3, mobi: _3, ne: _3, or: _3, sc: _3 }], kg: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, us: _4 }], kh: _18, ki: _56, km: [1, { ass: _3, com: _3, edu: _3, gov: _3, mil: _3, nom: _3, org: _3, prd: _3, tm: _3, asso: _3, coop: _3, gouv: _3, medecin: _3, notaires: _3, pharmaciens: _3, presse: _3, veterinaire: _3 }], kn: [1, { edu: _3, gov: _3, net: _3, org: _3 }], kp: [1, { com: _3, edu: _3, gov: _3, org: _3, rep: _3, tra: _3 }], kr: [1, { ac: _3, ai: _3, co: _3, es: _3, go: _3, hs: _3, io: _3, it: _3, kg: _3, me: _3, mil: _3, ms: _3, ne: _3, or: _3, pe: _3, re: _3, sc: _3, busan: _3, chungbuk: _3, chungnam: _3, daegu: _3, daejeon: _3, gangwon: _3, gwangju: _3, gyeongbuk: _3, gyeonggi: _3, gyeongnam: _3, incheon: _3, jeju: _3, jeonbuk: _3, jeonnam: _3, seoul: _3, ulsan: _3, c01: _4, "eliv-dns": _4 }], kw: [1, { com: _3, edu: _3, emb: _3, gov: _3, ind: _3, net: _3, org: _3 }], ky: _45, kz: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, jcloud: _4 }], la: [1, { com: _3, edu: _3, gov: _3, info: _3, int: _3, net: _3, org: _3, per: _3, bnr: _4 }], lb: _5, lc: [1, { co: _3, com: _3, edu: _3, gov: _3, net: _3, org: _3, oy: _4 }], li: _3, lk: [1, { ac: _3, assn: _3, com: _3, edu: _3, gov: _3, grp: _3, hotel: _3, int: _3, ltd: _3, net: _3, ngo: _3, org: _3, sch: _3, soc: _3, web: _3 }], lr: _5, ls: [1, { ac: _3, biz: _3, co: _3, edu: _3, gov: _3, info: _3, net: _3, org: _3, sc: _3 }], lt: _11, lu: [1, { "123website": _4 }], lv: [1, { asn: _3, com: _3, conf: _3, edu: _3, gov: _3, id: _3, mil: _3, net: _3, org: _3 }], ly: [1, { com: _3, edu: _3, gov: _3, id: _3, med: _3, net: _3, org: _3, plc: _3, sch: _3 }], ma: [1, { ac: _3, co: _3, gov: _3, net: _3, org: _3, press: _3 }], mc: [1, { asso: _3, tm: _3 }], md: [1, { ir: _4 }], me: [1, { ac: _3, co: _3, edu: _3, gov: _3, its: _3, net: _3, org: _3, priv: _3, c66: _4, craft: _4, edgestack: _4, filegear: _4, glitch: _4, "filegear-sg": _4, lohmus: _4, barsy: _4, mcdir: _4, brasilia: _4, ddns: _4, dnsfor: _4, hopto: _4, loginto: _4, noip: _4, webhop: _4, soundcast: _4, tcp4: _4, vp4: _4, diskstation: _4, dscloud: _4, i234: _4, myds: _4, synology: _4, transip: _44, nohost: _4 }], mg: [1, { co: _3, com: _3, edu: _3, gov: _3, mil: _3, nom: _3, org: _3, prd: _3 }], mh: _3, mil: _3, mk: [1, { com: _3, edu: _3, gov: _3, inf: _3, name: _3, net: _3, org: _3 }], ml: [1, { ac: _3, art: _3, asso: _3, com: _3, edu: _3, gouv: _3, gov: _3, info: _3, inst: _3, net: _3, org: _3, pr: _3, presse: _3 }], mm: _18, mn: [1, { edu: _3, gov: _3, org: _3, nyc: _4 }], mo: _5, mobi: [1, { barsy: _4, dscloud: _4 }], mp: [1, { ju: _4 }], mq: _3, mr: _11, ms: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, minisite: _4 }], mt: _45, mu: [1, { ac: _3, co: _3, com: _3, gov: _3, net: _3, or: _3, org: _3 }], museum: _3, mv: [1, { aero: _3, biz: _3, com: _3, coop: _3, edu: _3, gov: _3, info: _3, int: _3, mil: _3, museum: _3, name: _3, net: _3, org: _3, pro: _3 }], mw: [1, { ac: _3, biz: _3, co: _3, com: _3, coop: _3, edu: _3, gov: _3, int: _3, net: _3, org: _3 }], mx: [1, { com: _3, edu: _3, gob: _3, net: _3, org: _3 }], my: [1, { biz: _3, com: _3, edu: _3, gov: _3, mil: _3, name: _3, net: _3, org: _3 }], mz: [1, { ac: _3, adv: _3, co: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3 }], na: [1, { alt: _3, co: _3, com: _3, gov: _3, net: _3, org: _3 }], name: [1, { her: _59, his: _59 }], nc: [1, { asso: _3, nom: _3 }], ne: _3, net: [1, { adobeaemcloud: _4, "adobeio-static": _4, adobeioruntime: _4, akadns: _4, akamai: _4, "akamai-staging": _4, akamaiedge: _4, "akamaiedge-staging": _4, akamaihd: _4, "akamaihd-staging": _4, akamaiorigin: _4, "akamaiorigin-staging": _4, akamaized: _4, "akamaized-staging": _4, edgekey: _4, "edgekey-staging": _4, edgesuite: _4, "edgesuite-staging": _4, alwaysdata: _4, myamaze: _4, cloudfront: _4, appudo: _4, "atlassian-dev": [0, { prod: _52 }], myfritz: _4, onavstack: _4, shopselect: _4, blackbaudcdn: _4, boomla: _4, bplaced: _4, square7: _4, cdn77: [0, { r: _4 }], "cdn77-ssl": _4, gb: _4, hu: _4, jp: _4, se: _4, uk: _4, clickrising: _4, "ddns-ip": _4, "dns-cloud": _4, "dns-dynamic": _4, cloudaccess: _4, cloudflare: [2, { cdn: _4 }], cloudflareanycast: _52, cloudflarecn: _52, cloudflareglobal: _52, ctfcloud: _4, "feste-ip": _4, "knx-server": _4, "static-access": _4, cryptonomic: _7, dattolocal: _4, mydatto: _4, debian: _4, definima: _4, deno: _4, "at-band-camp": _4, blogdns: _4, "broke-it": _4, buyshouses: _4, dnsalias: _4, dnsdojo: _4, "does-it": _4, dontexist: _4, dynalias: _4, dynathome: _4, endofinternet: _4, "from-az": _4, "from-co": _4, "from-la": _4, "from-ny": _4, "gets-it": _4, "ham-radio-op": _4, homeftp: _4, homeip: _4, homelinux: _4, homeunix: _4, "in-the-band": _4, "is-a-chef": _4, "is-a-geek": _4, "isa-geek": _4, "kicks-ass": _4, "office-on-the": _4, podzone: _4, "scrapper-site": _4, selfip: _4, "sells-it": _4, servebbs: _4, serveftp: _4, thruhere: _4, webhop: _4, casacam: _4, dynu: _4, dynv6: _4, twmail: _4, ru: _4, channelsdvr: [2, { u: _4 }], fastly: [0, { freetls: _4, map: _4, prod: [0, { a: _4, global: _4 }], ssl: [0, { a: _4, b: _4, global: _4 }] }], fastlylb: [2, { map: _4 }], edgeapp: _4, "keyword-on": _4, "live-on": _4, "server-on": _4, "cdn-edges": _4, heteml: _4, cloudfunctions: _4, "grafana-dev": _4, iobb: _4, moonscale: _4, "in-dsl": _4, "in-vpn": _4, oninferno: _4, botdash: _4, "apps-1and1": _4, ipifony: _4, cloudjiffy: [2, { "fra1-de": _4, "west1-us": _4 }], elastx: [0, { "jls-sto1": _4, "jls-sto2": _4, "jls-sto3": _4 }], massivegrid: [0, { paas: [0, { "fr-1": _4, "lon-1": _4, "lon-2": _4, "ny-1": _4, "ny-2": _4, "sg-1": _4 }] }], saveincloud: [0, { jelastic: _4, "nordeste-idc": _4 }], scaleforce: _46, kinghost: _4, uni5: _4, krellian: _4, ggff: _4, localcert: _4, localhostcert: _4, localto: _7, barsy: _4, memset: _4, "azure-api": _4, "azure-mobile": _4, azureedge: _4, azurefd: _4, azurestaticapps: [2, { "1": _4, "2": _4, "3": _4, "4": _4, "5": _4, "6": _4, "7": _4, centralus: _4, eastasia: _4, eastus2: _4, westeurope: _4, westus2: _4 }], azurewebsites: _4, cloudapp: _4, trafficmanager: _4, windows: [0, { core: [0, { blob: _4 }], servicebus: _4 }], mynetname: [0, { sn: _4 }], routingthecloud: _4, bounceme: _4, ddns: _4, "eating-organic": _4, mydissent: _4, myeffect: _4, mymediapc: _4, mypsx: _4, mysecuritycamera: _4, nhlfan: _4, "no-ip": _4, pgafan: _4, privatizehealthinsurance: _4, redirectme: _4, serveblog: _4, serveminecraft: _4, sytes: _4, dnsup: _4, hicam: _4, "now-dns": _4, ownip: _4, vpndns: _4, cloudycluster: _4, ovh: [0, { hosting: _7, webpaas: _7 }], rackmaze: _4, myradweb: _4, in: _4, "subsc-pay": _4, squares: _4, schokokeks: _4, "firewall-gateway": _4, seidat: _4, senseering: _4, siteleaf: _4, mafelo: _4, myspreadshop: _4, "vps-host": [2, { jelastic: [0, { atl: _4, njs: _4, ric: _4 }] }], srcf: [0, { soc: _4, user: _4 }], supabase: _4, dsmynas: _4, familyds: _4, ts: [2, { c: _7 }], torproject: [2, { pages: _4 }], vusercontent: _4, "reserve-online": _4, "community-pro": _4, meinforum: _4, yandexcloud: [2, { storage: _4, website: _4 }], za: _4 }], nf: [1, { arts: _3, com: _3, firm: _3, info: _3, net: _3, other: _3, per: _3, rec: _3, store: _3, web: _3 }], ng: [1, { com: _3, edu: _3, gov: _3, i: _3, mil: _3, mobi: _3, name: _3, net: _3, org: _3, sch: _3, biz: [2, { co: _4, dl: _4, go: _4, lg: _4, on: _4 }], col: _4, firm: _4, gen: _4, ltd: _4, ngo: _4, plc: _4 }], ni: [1, { ac: _3, biz: _3, co: _3, com: _3, edu: _3, gob: _3, in: _3, info: _3, int: _3, mil: _3, net: _3, nom: _3, org: _3, web: _3 }], nl: [1, { co: _4, "hosting-cluster": _4, gov: _4, khplay: _4, "123website": _4, myspreadshop: _4, transurl: _7, cistron: _4, demon: _4 }], no: [1, { fhs: _3, folkebibl: _3, fylkesbibl: _3, idrett: _3, museum: _3, priv: _3, vgs: _3, dep: _3, herad: _3, kommune: _3, mil: _3, stat: _3, aa: _60, ah: _60, bu: _60, fm: _60, hl: _60, hm: _60, "jan-mayen": _60, mr: _60, nl: _60, nt: _60, of: _60, ol: _60, oslo: _60, rl: _60, sf: _60, st: _60, svalbard: _60, tm: _60, tr: _60, va: _60, vf: _60, akrehamn: _3, "xn--krehamn-dxa": _3, "\xE5krehamn": _3, algard: _3, "xn--lgrd-poac": _3, "\xE5lg\xE5rd": _3, arna: _3, bronnoysund: _3, "xn--brnnysund-m8ac": _3, "br\xF8nn\xF8ysund": _3, brumunddal: _3, bryne: _3, drobak: _3, "xn--drbak-wua": _3, "dr\xF8bak": _3, egersund: _3, fetsund: _3, floro: _3, "xn--flor-jra": _3, "flor\xF8": _3, fredrikstad: _3, hokksund: _3, honefoss: _3, "xn--hnefoss-q1a": _3, "h\xF8nefoss": _3, jessheim: _3, jorpeland: _3, "xn--jrpeland-54a": _3, "j\xF8rpeland": _3, kirkenes: _3, kopervik: _3, krokstadelva: _3, langevag: _3, "xn--langevg-jxa": _3, "langev\xE5g": _3, leirvik: _3, mjondalen: _3, "xn--mjndalen-64a": _3, "mj\xF8ndalen": _3, "mo-i-rana": _3, mosjoen: _3, "xn--mosjen-eya": _3, "mosj\xF8en": _3, nesoddtangen: _3, orkanger: _3, osoyro: _3, "xn--osyro-wua": _3, "os\xF8yro": _3, raholt: _3, "xn--rholt-mra": _3, "r\xE5holt": _3, sandnessjoen: _3, "xn--sandnessjen-ogb": _3, "sandnessj\xF8en": _3, skedsmokorset: _3, slattum: _3, spjelkavik: _3, stathelle: _3, stavern: _3, stjordalshalsen: _3, "xn--stjrdalshalsen-sqb": _3, "stj\xF8rdalshalsen": _3, tananger: _3, tranby: _3, vossevangen: _3, aarborte: _3, aejrie: _3, afjord: _3, "xn--fjord-lra": _3, "\xE5fjord": _3, agdenes: _3, akershus: _61, aknoluokta: _3, "xn--koluokta-7ya57h": _3, "\xE1k\u014Boluokta": _3, al: _3, "xn--l-1fa": _3, "\xE5l": _3, alaheadju: _3, "xn--laheadju-7ya": _3, "\xE1laheadju": _3, alesund: _3, "xn--lesund-hua": _3, "\xE5lesund": _3, alstahaug: _3, alta: _3, "xn--lt-liac": _3, "\xE1lt\xE1": _3, alvdal: _3, amli: _3, "xn--mli-tla": _3, "\xE5mli": _3, amot: _3, "xn--mot-tla": _3, "\xE5mot": _3, andasuolo: _3, andebu: _3, andoy: _3, "xn--andy-ira": _3, "and\xF8y": _3, ardal: _3, "xn--rdal-poa": _3, "\xE5rdal": _3, aremark: _3, arendal: _3, "xn--s-1fa": _3, "\xE5s": _3, aseral: _3, "xn--seral-lra": _3, "\xE5seral": _3, asker: _3, askim: _3, askoy: _3, "xn--asky-ira": _3, "ask\xF8y": _3, askvoll: _3, asnes: _3, "xn--snes-poa": _3, "\xE5snes": _3, audnedaln: _3, aukra: _3, aure: _3, aurland: _3, "aurskog-holand": _3, "xn--aurskog-hland-jnb": _3, "aurskog-h\xF8land": _3, austevoll: _3, austrheim: _3, averoy: _3, "xn--avery-yua": _3, "aver\xF8y": _3, badaddja: _3, "xn--bdddj-mrabd": _3, "b\xE5d\xE5ddj\xE5": _3, "xn--brum-voa": _3, "b\xE6rum": _3, bahcavuotna: _3, "xn--bhcavuotna-s4a": _3, "b\xE1hcavuotna": _3, bahccavuotna: _3, "xn--bhccavuotna-k7a": _3, "b\xE1hccavuotna": _3, baidar: _3, "xn--bidr-5nac": _3, "b\xE1id\xE1r": _3, bajddar: _3, "xn--bjddar-pta": _3, "b\xE1jddar": _3, balat: _3, "xn--blt-elab": _3, "b\xE1l\xE1t": _3, balestrand: _3, ballangen: _3, balsfjord: _3, bamble: _3, bardu: _3, barum: _3, batsfjord: _3, "xn--btsfjord-9za": _3, "b\xE5tsfjord": _3, bearalvahki: _3, "xn--bearalvhki-y4a": _3, "bearalv\xE1hki": _3, beardu: _3, beiarn: _3, berg: _3, bergen: _3, berlevag: _3, "xn--berlevg-jxa": _3, "berlev\xE5g": _3, bievat: _3, "xn--bievt-0qa": _3, "biev\xE1t": _3, bindal: _3, birkenes: _3, bjarkoy: _3, "xn--bjarky-fya": _3, "bjark\xF8y": _3, bjerkreim: _3, bjugn: _3, bodo: _3, "xn--bod-2na": _3, "bod\xF8": _3, bokn: _3, bomlo: _3, "xn--bmlo-gra": _3, "b\xF8mlo": _3, bremanger: _3, bronnoy: _3, "xn--brnny-wuac": _3, "br\xF8nn\xF8y": _3, budejju: _3, buskerud: _61, bygland: _3, bykle: _3, cahcesuolo: _3, "xn--hcesuolo-7ya35b": _3, "\u010D\xE1hcesuolo": _3, davvenjarga: _3, "xn--davvenjrga-y4a": _3, "davvenj\xE1rga": _3, davvesiida: _3, deatnu: _3, dielddanuorri: _3, divtasvuodna: _3, divttasvuotna: _3, donna: _3, "xn--dnna-gra": _3, "d\xF8nna": _3, dovre: _3, drammen: _3, drangedal: _3, dyroy: _3, "xn--dyry-ira": _3, "dyr\xF8y": _3, eid: _3, eidfjord: _3, eidsberg: _3, eidskog: _3, eidsvoll: _3, eigersund: _3, elverum: _3, enebakk: _3, engerdal: _3, etne: _3, etnedal: _3, evenassi: _3, "xn--eveni-0qa01ga": _3, "even\xE1\u0161\u0161i": _3, evenes: _3, "evje-og-hornnes": _3, farsund: _3, fauske: _3, fedje: _3, fet: _3, finnoy: _3, "xn--finny-yua": _3, "finn\xF8y": _3, fitjar: _3, fjaler: _3, fjell: _3, fla: _3, "xn--fl-zia": _3, "fl\xE5": _3, flakstad: _3, flatanger: _3, flekkefjord: _3, flesberg: _3, flora: _3, folldal: _3, forde: _3, "xn--frde-gra": _3, "f\xF8rde": _3, forsand: _3, fosnes: _3, "xn--frna-woa": _3, "fr\xE6na": _3, frana: _3, frei: _3, frogn: _3, froland: _3, frosta: _3, froya: _3, "xn--frya-hra": _3, "fr\xF8ya": _3, fuoisku: _3, fuossko: _3, fusa: _3, fyresdal: _3, gaivuotna: _3, "xn--givuotna-8ya": _3, "g\xE1ivuotna": _3, galsa: _3, "xn--gls-elac": _3, "g\xE1ls\xE1": _3, gamvik: _3, gangaviika: _3, "xn--ggaviika-8ya47h": _3, "g\xE1\u014Bgaviika": _3, gaular: _3, gausdal: _3, giehtavuoatna: _3, gildeskal: _3, "xn--gildeskl-g0a": _3, "gildesk\xE5l": _3, giske: _3, gjemnes: _3, gjerdrum: _3, gjerstad: _3, gjesdal: _3, gjovik: _3, "xn--gjvik-wua": _3, "gj\xF8vik": _3, gloppen: _3, gol: _3, gran: _3, grane: _3, granvin: _3, gratangen: _3, grimstad: _3, grong: _3, grue: _3, gulen: _3, guovdageaidnu: _3, ha: _3, "xn--h-2fa": _3, "h\xE5": _3, habmer: _3, "xn--hbmer-xqa": _3, "h\xE1bmer": _3, hadsel: _3, "xn--hgebostad-g3a": _3, "h\xE6gebostad": _3, hagebostad: _3, halden: _3, halsa: _3, hamar: _3, hamaroy: _3, hammarfeasta: _3, "xn--hmmrfeasta-s4ac": _3, "h\xE1mm\xE1rfeasta": _3, hammerfest: _3, hapmir: _3, "xn--hpmir-xqa": _3, "h\xE1pmir": _3, haram: _3, hareid: _3, harstad: _3, hasvik: _3, hattfjelldal: _3, haugesund: _3, hedmark: [0, { os: _3, valer: _3, "xn--vler-qoa": _3, "v\xE5ler": _3 }], hemne: _3, hemnes: _3, hemsedal: _3, hitra: _3, hjartdal: _3, hjelmeland: _3, hobol: _3, "xn--hobl-ira": _3, "hob\xF8l": _3, hof: _3, hol: _3, hole: _3, holmestrand: _3, holtalen: _3, "xn--holtlen-hxa": _3, "holt\xE5len": _3, hordaland: [0, { os: _3 }], hornindal: _3, horten: _3, hoyanger: _3, "xn--hyanger-q1a": _3, "h\xF8yanger": _3, hoylandet: _3, "xn--hylandet-54a": _3, "h\xF8ylandet": _3, hurdal: _3, hurum: _3, hvaler: _3, hyllestad: _3, ibestad: _3, inderoy: _3, "xn--indery-fya": _3, "inder\xF8y": _3, iveland: _3, ivgu: _3, jevnaker: _3, jolster: _3, "xn--jlster-bya": _3, "j\xF8lster": _3, jondal: _3, kafjord: _3, "xn--kfjord-iua": _3, "k\xE5fjord": _3, karasjohka: _3, "xn--krjohka-hwab49j": _3, "k\xE1r\xE1\u0161johka": _3, karasjok: _3, karlsoy: _3, karmoy: _3, "xn--karmy-yua": _3, "karm\xF8y": _3, kautokeino: _3, klabu: _3, "xn--klbu-woa": _3, "kl\xE6bu": _3, klepp: _3, kongsberg: _3, kongsvinger: _3, kraanghke: _3, "xn--kranghke-b0a": _3, "kr\xE5anghke": _3, kragero: _3, "xn--krager-gya": _3, "krager\xF8": _3, kristiansand: _3, kristiansund: _3, krodsherad: _3, "xn--krdsherad-m8a": _3, "kr\xF8dsherad": _3, "xn--kvfjord-nxa": _3, "kv\xE6fjord": _3, "xn--kvnangen-k0a": _3, "kv\xE6nangen": _3, kvafjord: _3, kvalsund: _3, kvam: _3, kvanangen: _3, kvinesdal: _3, kvinnherad: _3, kviteseid: _3, kvitsoy: _3, "xn--kvitsy-fya": _3, "kvits\xF8y": _3, laakesvuemie: _3, "xn--lrdal-sra": _3, "l\xE6rdal": _3, lahppi: _3, "xn--lhppi-xqa": _3, "l\xE1hppi": _3, lardal: _3, larvik: _3, lavagis: _3, lavangen: _3, leangaviika: _3, "xn--leagaviika-52b": _3, "lea\u014Bgaviika": _3, lebesby: _3, leikanger: _3, leirfjord: _3, leka: _3, leksvik: _3, lenvik: _3, lerdal: _3, lesja: _3, levanger: _3, lier: _3, lierne: _3, lillehammer: _3, lillesand: _3, lindas: _3, "xn--linds-pra": _3, "lind\xE5s": _3, lindesnes: _3, loabat: _3, "xn--loabt-0qa": _3, "loab\xE1t": _3, lodingen: _3, "xn--ldingen-q1a": _3, "l\xF8dingen": _3, lom: _3, loppa: _3, lorenskog: _3, "xn--lrenskog-54a": _3, "l\xF8renskog": _3, loten: _3, "xn--lten-gra": _3, "l\xF8ten": _3, lund: _3, lunner: _3, luroy: _3, "xn--lury-ira": _3, "lur\xF8y": _3, luster: _3, lyngdal: _3, lyngen: _3, malatvuopmi: _3, "xn--mlatvuopmi-s4a": _3, "m\xE1latvuopmi": _3, malselv: _3, "xn--mlselv-iua": _3, "m\xE5lselv": _3, malvik: _3, mandal: _3, marker: _3, marnardal: _3, masfjorden: _3, masoy: _3, "xn--msy-ula0h": _3, "m\xE5s\xF8y": _3, "matta-varjjat": _3, "xn--mtta-vrjjat-k7af": _3, "m\xE1tta-v\xE1rjjat": _3, meland: _3, meldal: _3, melhus: _3, meloy: _3, "xn--mely-ira": _3, "mel\xF8y": _3, meraker: _3, "xn--merker-kua": _3, "mer\xE5ker": _3, midsund: _3, "midtre-gauldal": _3, moareke: _3, "xn--moreke-jua": _3, "mo\xE5reke": _3, modalen: _3, modum: _3, molde: _3, "more-og-romsdal": [0, { heroy: _3, sande: _3 }], "xn--mre-og-romsdal-qqb": [0, { "xn--hery-ira": _3, sande: _3 }], "m\xF8re-og-romsdal": [0, { "her\xF8y": _3, sande: _3 }], moskenes: _3, moss: _3, mosvik: _3, muosat: _3, "xn--muost-0qa": _3, "muos\xE1t": _3, naamesjevuemie: _3, "xn--nmesjevuemie-tcba": _3, "n\xE5\xE5mesjevuemie": _3, "xn--nry-yla5g": _3, "n\xE6r\xF8y": _3, namdalseid: _3, namsos: _3, namsskogan: _3, nannestad: _3, naroy: _3, narviika: _3, narvik: _3, naustdal: _3, navuotna: _3, "xn--nvuotna-hwa": _3, "n\xE1vuotna": _3, "nedre-eiker": _3, nesna: _3, nesodden: _3, nesseby: _3, nesset: _3, nissedal: _3, nittedal: _3, "nord-aurdal": _3, "nord-fron": _3, "nord-odal": _3, norddal: _3, nordkapp: _3, nordland: [0, { bo: _3, "xn--b-5ga": _3, "b\xF8": _3, heroy: _3, "xn--hery-ira": _3, "her\xF8y": _3 }], "nordre-land": _3, nordreisa: _3, "nore-og-uvdal": _3, notodden: _3, notteroy: _3, "xn--nttery-byae": _3, "n\xF8tter\xF8y": _3, odda: _3, oksnes: _3, "xn--ksnes-uua": _3, "\xF8ksnes": _3, omasvuotna: _3, oppdal: _3, oppegard: _3, "xn--oppegrd-ixa": _3, "oppeg\xE5rd": _3, orkdal: _3, orland: _3, "xn--rland-uua": _3, "\xF8rland": _3, orskog: _3, "xn--rskog-uua": _3, "\xF8rskog": _3, orsta: _3, "xn--rsta-fra": _3, "\xF8rsta": _3, osen: _3, osteroy: _3, "xn--ostery-fya": _3, "oster\xF8y": _3, ostfold: [0, { valer: _3 }], "xn--stfold-9xa": [0, { "xn--vler-qoa": _3 }], "\xF8stfold": [0, { "v\xE5ler": _3 }], "ostre-toten": _3, "xn--stre-toten-zcb": _3, "\xF8stre-toten": _3, overhalla: _3, "ovre-eiker": _3, "xn--vre-eiker-k8a": _3, "\xF8vre-eiker": _3, oyer: _3, "xn--yer-zna": _3, "\xF8yer": _3, oygarden: _3, "xn--ygarden-p1a": _3, "\xF8ygarden": _3, "oystre-slidre": _3, "xn--ystre-slidre-ujb": _3, "\xF8ystre-slidre": _3, porsanger: _3, porsangu: _3, "xn--porsgu-sta26f": _3, "pors\xE1\u014Bgu": _3, porsgrunn: _3, rade: _3, "xn--rde-ula": _3, "r\xE5de": _3, radoy: _3, "xn--rady-ira": _3, "rad\xF8y": _3, "xn--rlingen-mxa": _3, "r\xE6lingen": _3, rahkkeravju: _3, "xn--rhkkervju-01af": _3, "r\xE1hkker\xE1vju": _3, raisa: _3, "xn--risa-5na": _3, "r\xE1isa": _3, rakkestad: _3, ralingen: _3, rana: _3, randaberg: _3, rauma: _3, rendalen: _3, rennebu: _3, rennesoy: _3, "xn--rennesy-v1a": _3, "rennes\xF8y": _3, rindal: _3, ringebu: _3, ringerike: _3, ringsaker: _3, risor: _3, "xn--risr-ira": _3, "ris\xF8r": _3, rissa: _3, roan: _3, rodoy: _3, "xn--rdy-0nab": _3, "r\xF8d\xF8y": _3, rollag: _3, romsa: _3, romskog: _3, "xn--rmskog-bya": _3, "r\xF8mskog": _3, roros: _3, "xn--rros-gra": _3, "r\xF8ros": _3, rost: _3, "xn--rst-0na": _3, "r\xF8st": _3, royken: _3, "xn--ryken-vua": _3, "r\xF8yken": _3, royrvik: _3, "xn--ryrvik-bya": _3, "r\xF8yrvik": _3, ruovat: _3, rygge: _3, salangen: _3, salat: _3, "xn--slat-5na": _3, "s\xE1lat": _3, "xn--slt-elab": _3, "s\xE1l\xE1t": _3, saltdal: _3, samnanger: _3, sandefjord: _3, sandnes: _3, sandoy: _3, "xn--sandy-yua": _3, "sand\xF8y": _3, sarpsborg: _3, sauda: _3, sauherad: _3, sel: _3, selbu: _3, selje: _3, seljord: _3, siellak: _3, sigdal: _3, siljan: _3, sirdal: _3, skanit: _3, "xn--sknit-yqa": _3, "sk\xE1nit": _3, skanland: _3, "xn--sknland-fxa": _3, "sk\xE5nland": _3, skaun: _3, skedsmo: _3, ski: _3, skien: _3, skierva: _3, "xn--skierv-uta": _3, "skierv\xE1": _3, skiptvet: _3, skjak: _3, "xn--skjk-soa": _3, "skj\xE5k": _3, skjervoy: _3, "xn--skjervy-v1a": _3, "skjerv\xF8y": _3, skodje: _3, smola: _3, "xn--smla-hra": _3, "sm\xF8la": _3, snaase: _3, "xn--snase-nra": _3, "sn\xE5ase": _3, snasa: _3, "xn--snsa-roa": _3, "sn\xE5sa": _3, snillfjord: _3, snoasa: _3, sogndal: _3, sogne: _3, "xn--sgne-gra": _3, "s\xF8gne": _3, sokndal: _3, sola: _3, solund: _3, somna: _3, "xn--smna-gra": _3, "s\xF8mna": _3, "sondre-land": _3, "xn--sndre-land-0cb": _3, "s\xF8ndre-land": _3, songdalen: _3, "sor-aurdal": _3, "xn--sr-aurdal-l8a": _3, "s\xF8r-aurdal": _3, "sor-fron": _3, "xn--sr-fron-q1a": _3, "s\xF8r-fron": _3, "sor-odal": _3, "xn--sr-odal-q1a": _3, "s\xF8r-odal": _3, "sor-varanger": _3, "xn--sr-varanger-ggb": _3, "s\xF8r-varanger": _3, sorfold: _3, "xn--srfold-bya": _3, "s\xF8rfold": _3, sorreisa: _3, "xn--srreisa-q1a": _3, "s\xF8rreisa": _3, sortland: _3, sorum: _3, "xn--srum-gra": _3, "s\xF8rum": _3, spydeberg: _3, stange: _3, stavanger: _3, steigen: _3, steinkjer: _3, stjordal: _3, "xn--stjrdal-s1a": _3, "stj\xF8rdal": _3, stokke: _3, "stor-elvdal": _3, stord: _3, stordal: _3, storfjord: _3, strand: _3, stranda: _3, stryn: _3, sula: _3, suldal: _3, sund: _3, sunndal: _3, surnadal: _3, sveio: _3, svelvik: _3, sykkylven: _3, tana: _3, telemark: [0, { bo: _3, "xn--b-5ga": _3, "b\xF8": _3 }], time: _3, tingvoll: _3, tinn: _3, tjeldsund: _3, tjome: _3, "xn--tjme-hra": _3, "tj\xF8me": _3, tokke: _3, tolga: _3, tonsberg: _3, "xn--tnsberg-q1a": _3, "t\xF8nsberg": _3, torsken: _3, "xn--trna-woa": _3, "tr\xE6na": _3, trana: _3, tranoy: _3, "xn--trany-yua": _3, "tran\xF8y": _3, troandin: _3, trogstad: _3, "xn--trgstad-r1a": _3, "tr\xF8gstad": _3, tromsa: _3, tromso: _3, "xn--troms-zua": _3, "troms\xF8": _3, trondheim: _3, trysil: _3, tvedestrand: _3, tydal: _3, tynset: _3, tysfjord: _3, tysnes: _3, "xn--tysvr-vra": _3, "tysv\xE6r": _3, tysvar: _3, ullensaker: _3, ullensvang: _3, ulvik: _3, unjarga: _3, "xn--unjrga-rta": _3, "unj\xE1rga": _3, utsira: _3, vaapste: _3, vadso: _3, "xn--vads-jra": _3, "vads\xF8": _3, "xn--vry-yla5g": _3, "v\xE6r\xF8y": _3, vaga: _3, "xn--vg-yiab": _3, "v\xE5g\xE5": _3, vagan: _3, "xn--vgan-qoa": _3, "v\xE5gan": _3, vagsoy: _3, "xn--vgsy-qoa0j": _3, "v\xE5gs\xF8y": _3, vaksdal: _3, valle: _3, vang: _3, vanylven: _3, vardo: _3, "xn--vard-jra": _3, "vard\xF8": _3, varggat: _3, "xn--vrggt-xqad": _3, "v\xE1rgg\xE1t": _3, varoy: _3, vefsn: _3, vega: _3, vegarshei: _3, "xn--vegrshei-c0a": _3, "veg\xE5rshei": _3, vennesla: _3, verdal: _3, verran: _3, vestby: _3, vestfold: [0, { sande: _3 }], vestnes: _3, "vestre-slidre": _3, "vestre-toten": _3, vestvagoy: _3, "xn--vestvgy-ixa6o": _3, "vestv\xE5g\xF8y": _3, vevelstad: _3, vik: _3, vikna: _3, vindafjord: _3, voagat: _3, volda: _3, voss: _3, co: _4, "123hjemmeside": _4, myspreadshop: _4 }], np: _18, nr: _56, nu: [1, { merseine: _4, mine: _4, shacknet: _4, enterprisecloud: _4 }], nz: [1, { ac: _3, co: _3, cri: _3, geek: _3, gen: _3, govt: _3, health: _3, iwi: _3, kiwi: _3, maori: _3, "xn--mori-qsa": _3, "m\u0101ori": _3, mil: _3, net: _3, org: _3, parliament: _3, school: _3, cloudns: _4 }], om: [1, { co: _3, com: _3, edu: _3, gov: _3, med: _3, museum: _3, net: _3, org: _3, pro: _3 }], onion: _3, org: [1, { altervista: _4, pimienta: _4, poivron: _4, potager: _4, sweetpepper: _4, cdn77: [0, { c: _4, rsc: _4 }], "cdn77-secure": [0, { origin: [0, { ssl: _4 }] }], ae: _4, cloudns: _4, "ip-dynamic": _4, ddnss: _4, dpdns: _4, duckdns: _4, tunk: _4, blogdns: _4, blogsite: _4, boldlygoingnowhere: _4, dnsalias: _4, dnsdojo: _4, doesntexist: _4, dontexist: _4, doomdns: _4, dvrdns: _4, dynalias: _4, dyndns: [2, { go: _4, home: _4 }], endofinternet: _4, endoftheinternet: _4, "from-me": _4, "game-host": _4, gotdns: _4, "hobby-site": _4, homedns: _4, homeftp: _4, homelinux: _4, homeunix: _4, "is-a-bruinsfan": _4, "is-a-candidate": _4, "is-a-celticsfan": _4, "is-a-chef": _4, "is-a-geek": _4, "is-a-knight": _4, "is-a-linux-user": _4, "is-a-patsfan": _4, "is-a-soxfan": _4, "is-found": _4, "is-lost": _4, "is-saved": _4, "is-very-bad": _4, "is-very-evil": _4, "is-very-good": _4, "is-very-nice": _4, "is-very-sweet": _4, "isa-geek": _4, "kicks-ass": _4, misconfused: _4, podzone: _4, readmyblog: _4, selfip: _4, sellsyourhome: _4, servebbs: _4, serveftp: _4, servegame: _4, "stuff-4-sale": _4, webhop: _4, accesscam: _4, camdvr: _4, freeddns: _4, mywire: _4, webredirect: _4, twmail: _4, eu: [2, { al: _4, asso: _4, at: _4, au: _4, be: _4, bg: _4, ca: _4, cd: _4, ch: _4, cn: _4, cy: _4, cz: _4, de: _4, dk: _4, edu: _4, ee: _4, es: _4, fi: _4, fr: _4, gr: _4, hr: _4, hu: _4, ie: _4, il: _4, in: _4, int: _4, is: _4, it: _4, jp: _4, kr: _4, lt: _4, lu: _4, lv: _4, me: _4, mk: _4, mt: _4, my: _4, net: _4, ng: _4, nl: _4, no: _4, nz: _4, pl: _4, pt: _4, ro: _4, ru: _4, se: _4, si: _4, sk: _4, tr: _4, uk: _4, us: _4 }], fedorainfracloud: _4, fedorapeople: _4, fedoraproject: [0, { cloud: _4, os: _43, stg: [0, { os: _43 }] }], freedesktop: _4, hatenadiary: _4, hepforge: _4, "in-dsl": _4, "in-vpn": _4, js: _4, barsy: _4, mayfirst: _4, routingthecloud: _4, bmoattachments: _4, "cable-modem": _4, collegefan: _4, couchpotatofries: _4, hopto: _4, mlbfan: _4, myftp: _4, mysecuritycamera: _4, nflfan: _4, "no-ip": _4, "read-books": _4, ufcfan: _4, zapto: _4, dynserv: _4, "now-dns": _4, "is-local": _4, httpbin: _4, pubtls: _4, jpn: _4, "my-firewall": _4, myfirewall: _4, spdns: _4, "small-web": _4, dsmynas: _4, familyds: _4, teckids: _55, tuxfamily: _4, diskstation: _4, hk: _4, us: _4, toolforge: _4, wmcloud: _4, wmflabs: _4, za: _4 }], pa: [1, { abo: _3, ac: _3, com: _3, edu: _3, gob: _3, ing: _3, med: _3, net: _3, nom: _3, org: _3, sld: _3 }], pe: [1, { com: _3, edu: _3, gob: _3, mil: _3, net: _3, nom: _3, org: _3 }], pf: [1, { com: _3, edu: _3, org: _3 }], pg: _18, ph: [1, { com: _3, edu: _3, gov: _3, i: _3, mil: _3, net: _3, ngo: _3, org: _3, cloudns: _4 }], pk: [1, { ac: _3, biz: _3, com: _3, edu: _3, fam: _3, gkp: _3, gob: _3, gog: _3, gok: _3, gop: _3, gos: _3, gov: _3, net: _3, org: _3, web: _3 }], pl: [1, { com: _3, net: _3, org: _3, agro: _3, aid: _3, atm: _3, auto: _3, biz: _3, edu: _3, gmina: _3, gsm: _3, info: _3, mail: _3, media: _3, miasta: _3, mil: _3, nieruchomosci: _3, nom: _3, pc: _3, powiat: _3, priv: _3, realestate: _3, rel: _3, sex: _3, shop: _3, sklep: _3, sos: _3, szkola: _3, targi: _3, tm: _3, tourism: _3, travel: _3, turystyka: _3, gov: [1, { ap: _3, griw: _3, ic: _3, is: _3, kmpsp: _3, konsulat: _3, kppsp: _3, kwp: _3, kwpsp: _3, mup: _3, mw: _3, oia: _3, oirm: _3, oke: _3, oow: _3, oschr: _3, oum: _3, pa: _3, pinb: _3, piw: _3, po: _3, pr: _3, psp: _3, psse: _3, pup: _3, rzgw: _3, sa: _3, sdn: _3, sko: _3, so: _3, sr: _3, starostwo: _3, ug: _3, ugim: _3, um: _3, umig: _3, upow: _3, uppo: _3, us: _3, uw: _3, uzs: _3, wif: _3, wiih: _3, winb: _3, wios: _3, witd: _3, wiw: _3, wkz: _3, wsa: _3, wskr: _3, wsse: _3, wuoz: _3, wzmiuw: _3, zp: _3, zpisdn: _3 }], augustow: _3, "babia-gora": _3, bedzin: _3, beskidy: _3, bialowieza: _3, bialystok: _3, bielawa: _3, bieszczady: _3, boleslawiec: _3, bydgoszcz: _3, bytom: _3, cieszyn: _3, czeladz: _3, czest: _3, dlugoleka: _3, elblag: _3, elk: _3, glogow: _3, gniezno: _3, gorlice: _3, grajewo: _3, ilawa: _3, jaworzno: _3, "jelenia-gora": _3, jgora: _3, kalisz: _3, karpacz: _3, kartuzy: _3, kaszuby: _3, katowice: _3, "kazimierz-dolny": _3, kepno: _3, ketrzyn: _3, klodzko: _3, kobierzyce: _3, kolobrzeg: _3, konin: _3, konskowola: _3, kutno: _3, lapy: _3, lebork: _3, legnica: _3, lezajsk: _3, limanowa: _3, lomza: _3, lowicz: _3, lubin: _3, lukow: _3, malbork: _3, malopolska: _3, mazowsze: _3, mazury: _3, mielec: _3, mielno: _3, mragowo: _3, naklo: _3, nowaruda: _3, nysa: _3, olawa: _3, olecko: _3, olkusz: _3, olsztyn: _3, opoczno: _3, opole: _3, ostroda: _3, ostroleka: _3, ostrowiec: _3, ostrowwlkp: _3, pila: _3, pisz: _3, podhale: _3, podlasie: _3, polkowice: _3, pomorskie: _3, pomorze: _3, prochowice: _3, pruszkow: _3, przeworsk: _3, pulawy: _3, radom: _3, "rawa-maz": _3, rybnik: _3, rzeszow: _3, sanok: _3, sejny: _3, skoczow: _3, slask: _3, slupsk: _3, sosnowiec: _3, "stalowa-wola": _3, starachowice: _3, stargard: _3, suwalki: _3, swidnica: _3, swiebodzin: _3, swinoujscie: _3, szczecin: _3, szczytno: _3, tarnobrzeg: _3, tgory: _3, turek: _3, tychy: _3, ustka: _3, walbrzych: _3, warmia: _3, warszawa: _3, waw: _3, wegrow: _3, wielun: _3, wlocl: _3, wloclawek: _3, wodzislaw: _3, wolomin: _3, wroclaw: _3, zachpomor: _3, zagan: _3, zarow: _3, zgora: _3, zgorzelec: _3, art: _4, gliwice: _4, krakow: _4, poznan: _4, wroc: _4, zakopane: _4, beep: _4, "ecommerce-shop": _4, cfolks: _4, dfirma: _4, dkonto: _4, you2: _4, shoparena: _4, homesklep: _4, sdscloud: _4, unicloud: _4, lodz: _4, pabianice: _4, plock: _4, sieradz: _4, skierniewice: _4, zgierz: _4, krasnik: _4, leczna: _4, lubartow: _4, lublin: _4, poniatowa: _4, swidnik: _4, co: _4, torun: _4, simplesite: _4, myspreadshop: _4, gda: _4, gdansk: _4, gdynia: _4, med: _4, sopot: _4, bielsko: _4 }], pm: [1, { own: _4, name: _4 }], pn: [1, { co: _3, edu: _3, gov: _3, net: _3, org: _3 }], post: _3, pr: [1, { biz: _3, com: _3, edu: _3, gov: _3, info: _3, isla: _3, name: _3, net: _3, org: _3, pro: _3, ac: _3, est: _3, prof: _3 }], pro: [1, { aaa: _3, aca: _3, acct: _3, avocat: _3, bar: _3, cpa: _3, eng: _3, jur: _3, law: _3, med: _3, recht: _3, "12chars": _4, cloudns: _4, barsy: _4, ngrok: _4 }], ps: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, plo: _3, sec: _3 }], pt: [1, { com: _3, edu: _3, gov: _3, int: _3, net: _3, nome: _3, org: _3, publ: _3, "123paginaweb": _4 }], pw: [1, { gov: _3, cloudns: _4, x443: _4 }], py: [1, { com: _3, coop: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3 }], qa: [1, { com: _3, edu: _3, gov: _3, mil: _3, name: _3, net: _3, org: _3, sch: _3 }], re: [1, { asso: _3, com: _3, netlib: _4, can: _4 }], ro: [1, { arts: _3, com: _3, firm: _3, info: _3, nom: _3, nt: _3, org: _3, rec: _3, store: _3, tm: _3, www: _3, co: _4, shop: _4, barsy: _4 }], rs: [1, { ac: _3, co: _3, edu: _3, gov: _3, in: _3, org: _3, brendly: _51, barsy: _4, ox: _4 }], ru: [1, { ac: _4, edu: _4, gov: _4, int: _4, mil: _4, eurodir: _4, adygeya: _4, bashkiria: _4, bir: _4, cbg: _4, com: _4, dagestan: _4, grozny: _4, kalmykia: _4, kustanai: _4, marine: _4, mordovia: _4, msk: _4, mytis: _4, nalchik: _4, nov: _4, pyatigorsk: _4, spb: _4, vladikavkaz: _4, vladimir: _4, na4u: _4, mircloud: _4, myjino: [2, { hosting: _7, landing: _7, spectrum: _7, vps: _7 }], cldmail: [0, { hb: _4 }], mcdir: [2, { vps: _4 }], mcpre: _4, net: _4, org: _4, pp: _4, lk3: _4, ras: _4 }], rw: [1, { ac: _3, co: _3, coop: _3, gov: _3, mil: _3, net: _3, org: _3 }], sa: [1, { com: _3, edu: _3, gov: _3, med: _3, net: _3, org: _3, pub: _3, sch: _3 }], sb: _5, sc: _5, sd: [1, { com: _3, edu: _3, gov: _3, info: _3, med: _3, net: _3, org: _3, tv: _3 }], se: [1, { a: _3, ac: _3, b: _3, bd: _3, brand: _3, c: _3, d: _3, e: _3, f: _3, fh: _3, fhsk: _3, fhv: _3, g: _3, h: _3, i: _3, k: _3, komforb: _3, kommunalforbund: _3, komvux: _3, l: _3, lanbib: _3, m: _3, n: _3, naturbruksgymn: _3, o: _3, org: _3, p: _3, parti: _3, pp: _3, press: _3, r: _3, s: _3, t: _3, tm: _3, u: _3, w: _3, x: _3, y: _3, z: _3, com: _4, iopsys: _4, "123minsida": _4, itcouldbewor: _4, myspreadshop: _4 }], sg: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, enscaled: _4 }], sh: [1, { com: _3, gov: _3, mil: _3, net: _3, org: _3, hashbang: _4, botda: _4, platform: [0, { ent: _4, eu: _4, us: _4 }], now: _4 }], si: [1, { f5: _4, gitapp: _4, gitpage: _4 }], sj: _3, sk: _3, sl: _5, sm: _3, sn: [1, { art: _3, com: _3, edu: _3, gouv: _3, org: _3, perso: _3, univ: _3 }], so: [1, { com: _3, edu: _3, gov: _3, me: _3, net: _3, org: _3, surveys: _4 }], sr: _3, ss: [1, { biz: _3, co: _3, com: _3, edu: _3, gov: _3, me: _3, net: _3, org: _3, sch: _3 }], st: [1, { co: _3, com: _3, consulado: _3, edu: _3, embaixada: _3, mil: _3, net: _3, org: _3, principe: _3, saotome: _3, store: _3, helioho: _4, kirara: _4, noho: _4 }], su: [1, { abkhazia: _4, adygeya: _4, aktyubinsk: _4, arkhangelsk: _4, armenia: _4, ashgabad: _4, azerbaijan: _4, balashov: _4, bashkiria: _4, bryansk: _4, bukhara: _4, chimkent: _4, dagestan: _4, "east-kazakhstan": _4, exnet: _4, georgia: _4, grozny: _4, ivanovo: _4, jambyl: _4, kalmykia: _4, kaluga: _4, karacol: _4, karaganda: _4, karelia: _4, khakassia: _4, krasnodar: _4, kurgan: _4, kustanai: _4, lenug: _4, mangyshlak: _4, mordovia: _4, msk: _4, murmansk: _4, nalchik: _4, navoi: _4, "north-kazakhstan": _4, nov: _4, obninsk: _4, penza: _4, pokrovsk: _4, sochi: _4, spb: _4, tashkent: _4, termez: _4, togliatti: _4, troitsk: _4, tselinograd: _4, tula: _4, tuva: _4, vladikavkaz: _4, vladimir: _4, vologda: _4 }], sv: [1, { com: _3, edu: _3, gob: _3, org: _3, red: _3 }], sx: _11, sy: _6, sz: [1, { ac: _3, co: _3, org: _3 }], tc: _3, td: _3, tel: _3, tf: [1, { sch: _4 }], tg: _3, th: [1, { ac: _3, co: _3, go: _3, in: _3, mi: _3, net: _3, or: _3, online: _4, shop: _4 }], tj: [1, { ac: _3, biz: _3, co: _3, com: _3, edu: _3, go: _3, gov: _3, int: _3, mil: _3, name: _3, net: _3, nic: _3, org: _3, test: _3, web: _3 }], tk: _3, tl: _11, tm: [1, { co: _3, com: _3, edu: _3, gov: _3, mil: _3, net: _3, nom: _3, org: _3 }], tn: [1, { com: _3, ens: _3, fin: _3, gov: _3, ind: _3, info: _3, intl: _3, mincom: _3, nat: _3, net: _3, org: _3, perso: _3, tourism: _3, orangecloud: _4 }], to: [1, { "611": _4, com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, oya: _4, x0: _4, quickconnect: _25, vpnplus: _4 }], tr: [1, { av: _3, bbs: _3, bel: _3, biz: _3, com: _3, dr: _3, edu: _3, gen: _3, gov: _3, info: _3, k12: _3, kep: _3, mil: _3, name: _3, net: _3, org: _3, pol: _3, tel: _3, tsk: _3, tv: _3, web: _3, nc: _11 }], tt: [1, { biz: _3, co: _3, com: _3, edu: _3, gov: _3, info: _3, mil: _3, name: _3, net: _3, org: _3, pro: _3 }], tv: [1, { "better-than": _4, dyndns: _4, "on-the-web": _4, "worse-than": _4, from: _4, sakura: _4 }], tw: [1, { club: _3, com: [1, { mymailer: _4 }], ebiz: _3, edu: _3, game: _3, gov: _3, idv: _3, mil: _3, net: _3, org: _3, url: _4, mydns: _4 }], tz: [1, { ac: _3, co: _3, go: _3, hotel: _3, info: _3, me: _3, mil: _3, mobi: _3, ne: _3, or: _3, sc: _3, tv: _3 }], ua: [1, { com: _3, edu: _3, gov: _3, in: _3, net: _3, org: _3, cherkassy: _3, cherkasy: _3, chernigov: _3, chernihiv: _3, chernivtsi: _3, chernovtsy: _3, ck: _3, cn: _3, cr: _3, crimea: _3, cv: _3, dn: _3, dnepropetrovsk: _3, dnipropetrovsk: _3, donetsk: _3, dp: _3, if: _3, "ivano-frankivsk": _3, kh: _3, kharkiv: _3, kharkov: _3, kherson: _3, khmelnitskiy: _3, khmelnytskyi: _3, kiev: _3, kirovograd: _3, km: _3, kr: _3, kropyvnytskyi: _3, krym: _3, ks: _3, kv: _3, kyiv: _3, lg: _3, lt: _3, lugansk: _3, luhansk: _3, lutsk: _3, lv: _3, lviv: _3, mk: _3, mykolaiv: _3, nikolaev: _3, od: _3, odesa: _3, odessa: _3, pl: _3, poltava: _3, rivne: _3, rovno: _3, rv: _3, sb: _3, sebastopol: _3, sevastopol: _3, sm: _3, sumy: _3, te: _3, ternopil: _3, uz: _3, uzhgorod: _3, uzhhorod: _3, vinnica: _3, vinnytsia: _3, vn: _3, volyn: _3, yalta: _3, zakarpattia: _3, zaporizhzhe: _3, zaporizhzhia: _3, zhitomir: _3, zhytomyr: _3, zp: _3, zt: _3, cc: _4, inf: _4, ltd: _4, cx: _4, ie: _4, biz: _4, co: _4, pp: _4, v: _4 }], ug: [1, { ac: _3, co: _3, com: _3, edu: _3, go: _3, gov: _3, mil: _3, ne: _3, or: _3, org: _3, sc: _3, us: _3 }], uk: [1, { ac: _3, co: [1, { bytemark: [0, { dh: _4, vm: _4 }], layershift: _46, barsy: _4, barsyonline: _4, retrosnub: _54, "nh-serv": _4, "no-ip": _4, adimo: _4, myspreadshop: _4 }], gov: [1, { api: _4, campaign: _4, service: _4 }], ltd: _3, me: _3, net: _3, nhs: _3, org: [1, { glug: _4, lug: _4, lugs: _4, affinitylottery: _4, raffleentry: _4, weeklylottery: _4 }], plc: _3, police: _3, sch: _18, conn: _4, copro: _4, hosp: _4, "independent-commission": _4, "independent-inquest": _4, "independent-inquiry": _4, "independent-panel": _4, "independent-review": _4, "public-inquiry": _4, "royal-commission": _4, pymnt: _4, barsy: _4, nimsite: _4, oraclegovcloudapps: _7 }], us: [1, { dni: _3, isa: _3, nsn: _3, ak: _62, al: _62, ar: _62, as: _62, az: _62, ca: _62, co: _62, ct: _62, dc: _62, de: [1, { cc: _3, lib: _4 }], fl: _62, ga: _62, gu: _62, hi: _63, ia: _62, id: _62, il: _62, in: _62, ks: _62, ky: _62, la: _62, ma: [1, { k12: [1, { chtr: _3, paroch: _3, pvt: _3 }], cc: _3, lib: _3 }], md: _62, me: _62, mi: [1, { k12: _3, cc: _3, lib: _3, "ann-arbor": _3, cog: _3, dst: _3, eaton: _3, gen: _3, mus: _3, tec: _3, washtenaw: _3 }], mn: _62, mo: _62, ms: _62, mt: _62, nc: _62, nd: _63, ne: _62, nh: _62, nj: _62, nm: _62, nv: _62, ny: _62, oh: _62, ok: _62, or: _62, pa: _62, pr: _62, ri: _63, sc: _62, sd: _63, tn: _62, tx: _62, ut: _62, va: _62, vi: _62, vt: _62, wa: _62, wi: _62, wv: [1, { cc: _3 }], wy: _62, cloudns: _4, "is-by": _4, "land-4-sale": _4, "stuff-4-sale": _4, heliohost: _4, enscaled: [0, { phx: _4 }], mircloud: _4, ngo: _4, golffan: _4, noip: _4, pointto: _4, freeddns: _4, srv: [2, { gh: _4, gl: _4 }], platterp: _4, servername: _4 }], uy: [1, { com: _3, edu: _3, gub: _3, mil: _3, net: _3, org: _3 }], uz: [1, { co: _3, com: _3, net: _3, org: _3 }], va: _3, vc: [1, { com: _3, edu: _3, gov: _3, mil: _3, net: _3, org: _3, gv: [2, { d: _4 }], "0e": _7, mydns: _4 }], ve: [1, { arts: _3, bib: _3, co: _3, com: _3, e12: _3, edu: _3, emprende: _3, firm: _3, gob: _3, gov: _3, info: _3, int: _3, mil: _3, net: _3, nom: _3, org: _3, rar: _3, rec: _3, store: _3, tec: _3, web: _3 }], vg: [1, { edu: _3 }], vi: [1, { co: _3, com: _3, k12: _3, net: _3, org: _3 }], vn: [1, { ac: _3, ai: _3, biz: _3, com: _3, edu: _3, gov: _3, health: _3, id: _3, info: _3, int: _3, io: _3, name: _3, net: _3, org: _3, pro: _3, angiang: _3, bacgiang: _3, backan: _3, baclieu: _3, bacninh: _3, "baria-vungtau": _3, bentre: _3, binhdinh: _3, binhduong: _3, binhphuoc: _3, binhthuan: _3, camau: _3, cantho: _3, caobang: _3, daklak: _3, daknong: _3, danang: _3, dienbien: _3, dongnai: _3, dongthap: _3, gialai: _3, hagiang: _3, haiduong: _3, haiphong: _3, hanam: _3, hanoi: _3, hatinh: _3, haugiang: _3, hoabinh: _3, hungyen: _3, khanhhoa: _3, kiengiang: _3, kontum: _3, laichau: _3, lamdong: _3, langson: _3, laocai: _3, longan: _3, namdinh: _3, nghean: _3, ninhbinh: _3, ninhthuan: _3, phutho: _3, phuyen: _3, quangbinh: _3, quangnam: _3, quangngai: _3, quangninh: _3, quangtri: _3, soctrang: _3, sonla: _3, tayninh: _3, thaibinh: _3, thainguyen: _3, thanhhoa: _3, thanhphohochiminh: _3, thuathienhue: _3, tiengiang: _3, travinh: _3, tuyenquang: _3, vinhlong: _3, vinhphuc: _3, yenbai: _3 }], vu: _45, wf: [1, { biz: _4, sch: _4 }], ws: [1, { com: _3, edu: _3, gov: _3, net: _3, org: _3, advisor: _7, cloud66: _4, dyndns: _4, mypets: _4 }], yt: [1, { org: _4 }], "xn--mgbaam7a8h": _3, "\u0627\u0645\u0627\u0631\u0627\u062A": _3, "xn--y9a3aq": _3, "\u0570\u0561\u0575": _3, "xn--54b7fta0cc": _3, "\u09AC\u09BE\u0982\u09B2\u09BE": _3, "xn--90ae": _3, "\u0431\u0433": _3, "xn--mgbcpq6gpa1a": _3, "\u0627\u0644\u0628\u062D\u0631\u064A\u0646": _3, "xn--90ais": _3, "\u0431\u0435\u043B": _3, "xn--fiqs8s": _3, "\u4E2D\u56FD": _3, "xn--fiqz9s": _3, "\u4E2D\u570B": _3, "xn--lgbbat1ad8j": _3, "\u0627\u0644\u062C\u0632\u0627\u0626\u0631": _3, "xn--wgbh1c": _3, "\u0645\u0635\u0631": _3, "xn--e1a4c": _3, "\u0435\u044E": _3, "xn--qxa6a": _3, "\u03B5\u03C5": _3, "xn--mgbah1a3hjkrd": _3, "\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627": _3, "xn--node": _3, "\u10D2\u10D4": _3, "xn--qxam": _3, "\u03B5\u03BB": _3, "xn--j6w193g": [1, { "xn--gmqw5a": _3, "xn--55qx5d": _3, "xn--mxtq1m": _3, "xn--wcvs22d": _3, "xn--uc0atv": _3, "xn--od0alg": _3 }], "\u9999\u6E2F": [1, { "\u500B\u4EBA": _3, "\u516C\u53F8": _3, "\u653F\u5E9C": _3, "\u6559\u80B2": _3, "\u7D44\u7E54": _3, "\u7DB2\u7D61": _3 }], "xn--2scrj9c": _3, "\u0CAD\u0CBE\u0CB0\u0CA4": _3, "xn--3hcrj9c": _3, "\u0B2D\u0B3E\u0B30\u0B24": _3, "xn--45br5cyl": _3, "\u09AD\u09BE\u09F0\u09A4": _3, "xn--h2breg3eve": _3, "\u092D\u093E\u0930\u0924\u092E\u094D": _3, "xn--h2brj9c8c": _3, "\u092D\u093E\u0930\u094B\u0924": _3, "xn--mgbgu82a": _3, "\u0680\u0627\u0631\u062A": _3, "xn--rvc1e0am3e": _3, "\u0D2D\u0D3E\u0D30\u0D24\u0D02": _3, "xn--h2brj9c": _3, "\u092D\u093E\u0930\u0924": _3, "xn--mgbbh1a": _3, "\u0628\u0627\u0631\u062A": _3, "xn--mgbbh1a71e": _3, "\u0628\u06BE\u0627\u0631\u062A": _3, "xn--fpcrj9c3d": _3, "\u0C2D\u0C3E\u0C30\u0C24\u0C4D": _3, "xn--gecrj9c": _3, "\u0AAD\u0ABE\u0AB0\u0AA4": _3, "xn--s9brj9c": _3, "\u0A2D\u0A3E\u0A30\u0A24": _3, "xn--45brj9c": _3, "\u09AD\u09BE\u09B0\u09A4": _3, "xn--xkc2dl3a5ee0h": _3, "\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE": _3, "xn--mgba3a4f16a": _3, "\u0627\u06CC\u0631\u0627\u0646": _3, "xn--mgba3a4fra": _3, "\u0627\u064A\u0631\u0627\u0646": _3, "xn--mgbtx2b": _3, "\u0639\u0631\u0627\u0642": _3, "xn--mgbayh7gpa": _3, "\u0627\u0644\u0627\u0631\u062F\u0646": _3, "xn--3e0b707e": _3, "\uD55C\uAD6D": _3, "xn--80ao21a": _3, "\u049B\u0430\u0437": _3, "xn--q7ce6a": _3, "\u0EA5\u0EB2\u0EA7": _3, "xn--fzc2c9e2c": _3, "\u0DBD\u0D82\u0D9A\u0DCF": _3, "xn--xkc2al3hye2a": _3, "\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8": _3, "xn--mgbc0a9azcg": _3, "\u0627\u0644\u0645\u063A\u0631\u0628": _3, "xn--d1alf": _3, "\u043C\u043A\u0434": _3, "xn--l1acc": _3, "\u043C\u043E\u043D": _3, "xn--mix891f": _3, "\u6FB3\u9580": _3, "xn--mix082f": _3, "\u6FB3\u95E8": _3, "xn--mgbx4cd0ab": _3, "\u0645\u0644\u064A\u0633\u064A\u0627": _3, "xn--mgb9awbf": _3, "\u0639\u0645\u0627\u0646": _3, "xn--mgbai9azgqp6j": _3, "\u067E\u0627\u06A9\u0633\u062A\u0627\u0646": _3, "xn--mgbai9a5eva00b": _3, "\u067E\u0627\u0643\u0633\u062A\u0627\u0646": _3, "xn--ygbi2ammx": _3, "\u0641\u0644\u0633\u0637\u064A\u0646": _3, "xn--90a3ac": [1, { "xn--80au": _3, "xn--90azh": _3, "xn--d1at": _3, "xn--c1avg": _3, "xn--o1ac": _3, "xn--o1ach": _3 }], "\u0441\u0440\u0431": [1, { "\u0430\u043A": _3, "\u043E\u0431\u0440": _3, "\u043E\u0434": _3, "\u043E\u0440\u0433": _3, "\u043F\u0440": _3, "\u0443\u043F\u0440": _3 }], "xn--p1ai": _3, "\u0440\u0444": _3, "xn--wgbl6a": _3, "\u0642\u0637\u0631": _3, "xn--mgberp4a5d4ar": _3, "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629": _3, "xn--mgberp4a5d4a87g": _3, "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u0629": _3, "xn--mgbqly7c0a67fbc": _3, "\u0627\u0644\u0633\u0639\u0648\u062F\u06CC\u06C3": _3, "xn--mgbqly7cvafr": _3, "\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647": _3, "xn--mgbpl2fh": _3, "\u0633\u0648\u062F\u0627\u0646": _3, "xn--yfro4i67o": _3, "\u65B0\u52A0\u5761": _3, "xn--clchc0ea0b2g2a9gcd": _3, "\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD": _3, "xn--ogbpf8fl": _3, "\u0633\u0648\u0631\u064A\u0629": _3, "xn--mgbtf8fl": _3, "\u0633\u0648\u0631\u064A\u0627": _3, "xn--o3cw4h": [1, { "xn--o3cyx2a": _3, "xn--12co0c3b4eva": _3, "xn--m3ch0j3a": _3, "xn--h3cuzk1di": _3, "xn--12c1fe0br": _3, "xn--12cfi8ixb8l": _3 }], "\u0E44\u0E17\u0E22": [1, { "\u0E17\u0E2B\u0E32\u0E23": _3, "\u0E18\u0E38\u0E23\u0E01\u0E34\u0E08": _3, "\u0E40\u0E19\u0E47\u0E15": _3, "\u0E23\u0E31\u0E10\u0E1A\u0E32\u0E25": _3, "\u0E28\u0E36\u0E01\u0E29\u0E32": _3, "\u0E2D\u0E07\u0E04\u0E4C\u0E01\u0E23": _3 }], "xn--pgbs0dh": _3, "\u062A\u0648\u0646\u0633": _3, "xn--kpry57d": _3, "\u53F0\u7063": _3, "xn--kprw13d": _3, "\u53F0\u6E7E": _3, "xn--nnx388a": _3, "\u81FA\u7063": _3, "xn--j1amh": _3, "\u0443\u043A\u0440": _3, "xn--mgb2ddes": _3, "\u0627\u0644\u064A\u0645\u0646": _3, xxx: _3, ye: _6, za: [0, { ac: _3, agric: _3, alt: _3, co: _3, edu: _3, gov: _3, grondar: _3, law: _3, mil: _3, net: _3, ngo: _3, nic: _3, nis: _3, nom: _3, org: _3, school: _3, tm: _3, web: _3 }], zm: [1, { ac: _3, biz: _3, co: _3, com: _3, edu: _3, gov: _3, info: _3, mil: _3, net: _3, org: _3, sch: _3 }], zw: [1, { ac: _3, co: _3, gov: _3, mil: _3, org: _3 }], aaa: _3, aarp: _3, abb: _3, abbott: _3, abbvie: _3, abc: _3, able: _3, abogado: _3, abudhabi: _3, academy: [1, { official: _4 }], accenture: _3, accountant: _3, accountants: _3, aco: _3, actor: _3, ads: _3, adult: _3, aeg: _3, aetna: _3, afl: _3, africa: _3, agakhan: _3, agency: _3, aig: _3, airbus: _3, airforce: _3, airtel: _3, akdn: _3, alibaba: _3, alipay: _3, allfinanz: _3, allstate: _3, ally: _3, alsace: _3, alstom: _3, amazon: _3, americanexpress: _3, americanfamily: _3, amex: _3, amfam: _3, amica: _3, amsterdam: _3, analytics: _3, android: _3, anquan: _3, anz: _3, aol: _3, apartments: _3, app: [1, { adaptable: _4, aiven: _4, beget: _7, brave: _8, clerk: _4, clerkstage: _4, wnext: _4, csb: [2, { preview: _4 }], convex: _4, deta: _4, ondigitalocean: _4, easypanel: _4, encr: _4, evervault: _9, expo: [2, { staging: _4 }], edgecompute: _4, "on-fleek": _4, flutterflow: _4, e2b: _4, framer: _4, hosted: _7, run: _7, web: _4, hasura: _4, botdash: _4, loginline: _4, lovable: _4, medusajs: _4, messerli: _4, netfy: _4, netlify: _4, ngrok: _4, "ngrok-free": _4, developer: _7, noop: _4, northflank: _7, upsun: _7, replit: _10, nyat: _4, snowflake: [0, { "*": _4, privatelink: _7 }], streamlit: _4, storipress: _4, telebit: _4, typedream: _4, vercel: _4, bookonline: _4, wdh: _4, windsurf: _4, zeabur: _4, zerops: _7 }], apple: _3, aquarelle: _3, arab: _3, aramco: _3, archi: _3, army: _3, art: _3, arte: _3, asda: _3, associates: _3, athleta: _3, attorney: _3, auction: _3, audi: _3, audible: _3, audio: _3, auspost: _3, author: _3, auto: _3, autos: _3, aws: [1, { sagemaker: [0, { "ap-northeast-1": _14, "ap-northeast-2": _14, "ap-south-1": _14, "ap-southeast-1": _14, "ap-southeast-2": _14, "ca-central-1": _16, "eu-central-1": _14, "eu-west-1": _14, "eu-west-2": _14, "us-east-1": _16, "us-east-2": _16, "us-west-2": _16, "af-south-1": _13, "ap-east-1": _13, "ap-northeast-3": _13, "ap-south-2": _15, "ap-southeast-3": _13, "ap-southeast-4": _15, "ca-west-1": [0, { notebook: _4, "notebook-fips": _4 }], "eu-central-2": _13, "eu-north-1": _13, "eu-south-1": _13, "eu-south-2": _13, "eu-west-3": _13, "il-central-1": _13, "me-central-1": _13, "me-south-1": _13, "sa-east-1": _13, "us-gov-east-1": _17, "us-gov-west-1": _17, "us-west-1": [0, { notebook: _4, "notebook-fips": _4, studio: _4 }], experiments: _7 }], repost: [0, { private: _7 }], on: [0, { "ap-northeast-1": _12, "ap-southeast-1": _12, "ap-southeast-2": _12, "eu-central-1": _12, "eu-north-1": _12, "eu-west-1": _12, "us-east-1": _12, "us-east-2": _12, "us-west-2": _12 }] }], axa: _3, azure: _3, baby: _3, baidu: _3, banamex: _3, band: _3, bank: _3, bar: _3, barcelona: _3, barclaycard: _3, barclays: _3, barefoot: _3, bargains: _3, baseball: _3, basketball: [1, { aus: _4, nz: _4 }], bauhaus: _3, bayern: _3, bbc: _3, bbt: _3, bbva: _3, bcg: _3, bcn: _3, beats: _3, beauty: _3, beer: _3, bentley: _3, berlin: _3, best: _3, bestbuy: _3, bet: _3, bharti: _3, bible: _3, bid: _3, bike: _3, bing: _3, bingo: _3, bio: _3, black: _3, blackfriday: _3, blockbuster: _3, blog: _3, bloomberg: _3, blue: _3, bms: _3, bmw: _3, bnpparibas: _3, boats: _3, boehringer: _3, bofa: _3, bom: _3, bond: _3, boo: _3, book: _3, booking: _3, bosch: _3, bostik: _3, boston: _3, bot: _3, boutique: _3, box: _3, bradesco: _3, bridgestone: _3, broadway: _3, broker: _3, brother: _3, brussels: _3, build: [1, { v0: _4, windsurf: _4 }], builders: [1, { cloudsite: _4 }], business: _19, buy: _3, buzz: _3, bzh: _3, cab: _3, cafe: _3, cal: _3, call: _3, calvinklein: _3, cam: _3, camera: _3, camp: [1, { emf: [0, { at: _4 }] }], canon: _3, capetown: _3, capital: _3, capitalone: _3, car: _3, caravan: _3, cards: _3, care: _3, career: _3, careers: _3, cars: _3, casa: [1, { nabu: [0, { ui: _4 }] }], case: _3, cash: _3, casino: _3, catering: _3, catholic: _3, cba: _3, cbn: _3, cbre: _3, center: _3, ceo: _3, cern: _3, cfa: _3, cfd: _3, chanel: _3, channel: _3, charity: _3, chase: _3, chat: _3, cheap: _3, chintai: _3, christmas: _3, chrome: _3, church: _3, cipriani: _3, circle: _3, cisco: _3, citadel: _3, citi: _3, citic: _3, city: _3, claims: _3, cleaning: _3, click: _3, clinic: _3, clinique: _3, clothing: _3, cloud: [1, { convex: _4, elementor: _4, encoway: [0, { eu: _4 }], statics: _7, ravendb: _4, axarnet: [0, { "es-1": _4 }], diadem: _4, jelastic: [0, { vip: _4 }], jele: _4, "jenv-aruba": [0, { aruba: [0, { eur: [0, { it1: _4 }] }], it1: _4 }], keliweb: [2, { cs: _4 }], oxa: [2, { tn: _4, uk: _4 }], primetel: [2, { uk: _4 }], reclaim: [0, { ca: _4, uk: _4, us: _4 }], trendhosting: [0, { ch: _4, de: _4 }], jotelulu: _4, kuleuven: _4, laravel: _4, linkyard: _4, magentosite: _7, matlab: _4, observablehq: _4, perspecta: _4, vapor: _4, "on-rancher": _7, scw: [0, { baremetal: [0, { "fr-par-1": _4, "fr-par-2": _4, "nl-ams-1": _4 }], "fr-par": [0, { cockpit: _4, fnc: [2, { functions: _4 }], k8s: _21, s3: _4, "s3-website": _4, whm: _4 }], instances: [0, { priv: _4, pub: _4 }], k8s: _4, "nl-ams": [0, { cockpit: _4, k8s: _21, s3: _4, "s3-website": _4, whm: _4 }], "pl-waw": [0, { cockpit: _4, k8s: _21, s3: _4, "s3-website": _4 }], scalebook: _4, smartlabeling: _4 }], servebolt: _4, onstackit: [0, { runs: _4 }], trafficplex: _4, "unison-services": _4, urown: _4, voorloper: _4, zap: _4 }], club: [1, { cloudns: _4, jele: _4, barsy: _4 }], clubmed: _3, coach: _3, codes: [1, { owo: _7 }], coffee: _3, college: _3, cologne: _3, commbank: _3, community: [1, { nog: _4, ravendb: _4, myforum: _4 }], company: _3, compare: _3, computer: _3, comsec: _3, condos: _3, construction: _3, consulting: _3, contact: _3, contractors: _3, cooking: _3, cool: [1, { elementor: _4, de: _4 }], corsica: _3, country: _3, coupon: _3, coupons: _3, courses: _3, cpa: _3, credit: _3, creditcard: _3, creditunion: _3, cricket: _3, crown: _3, crs: _3, cruise: _3, cruises: _3, cuisinella: _3, cymru: _3, cyou: _3, dad: _3, dance: _3, data: _3, date: _3, dating: _3, datsun: _3, day: _3, dclk: _3, dds: _3, deal: _3, dealer: _3, deals: _3, degree: _3, delivery: _3, dell: _3, deloitte: _3, delta: _3, democrat: _3, dental: _3, dentist: _3, desi: _3, design: [1, { graphic: _4, bss: _4 }], dev: [1, { "12chars": _4, myaddr: _4, panel: _4, lcl: _7, lclstage: _7, stg: _7, stgstage: _7, pages: _4, r2: _4, workers: _4, deno: _4, "deno-staging": _4, deta: _4, evervault: _9, fly: _4, githubpreview: _4, gateway: _7, hrsn: [2, { psl: [0, { sub: _4, wc: [0, { "*": _4, sub: _7 }] }] }], botdash: _4, inbrowser: _7, "is-a-good": _4, "is-a": _4, iserv: _4, runcontainers: _4, localcert: [0, { user: _7 }], loginline: _4, barsy: _4, mediatech: _4, modx: _4, ngrok: _4, "ngrok-free": _4, "is-a-fullstack": _4, "is-cool": _4, "is-not-a": _4, localplayer: _4, xmit: _4, "platter-app": _4, replit: [2, { archer: _4, bones: _4, canary: _4, global: _4, hacker: _4, id: _4, janeway: _4, kim: _4, kira: _4, kirk: _4, odo: _4, paris: _4, picard: _4, pike: _4, prerelease: _4, reed: _4, riker: _4, sisko: _4, spock: _4, staging: _4, sulu: _4, tarpit: _4, teams: _4, tucker: _4, wesley: _4, worf: _4 }], crm: [0, { d: _7, w: _7, wa: _7, wb: _7, wc: _7, wd: _7, we: _7, wf: _7 }], vercel: _4, webhare: _7 }], dhl: _3, diamonds: _3, diet: _3, digital: [1, { cloudapps: [2, { london: _4 }] }], direct: [1, { libp2p: _4 }], directory: _3, discount: _3, discover: _3, dish: _3, diy: _3, dnp: _3, docs: _3, doctor: _3, dog: _3, domains: _3, dot: _3, download: _3, drive: _3, dtv: _3, dubai: _3, dunlop: _3, dupont: _3, durban: _3, dvag: _3, dvr: _3, earth: _3, eat: _3, eco: _3, edeka: _3, education: _19, email: [1, { crisp: [0, { on: _4 }], tawk: _49, tawkto: _49 }], emerck: _3, energy: _3, engineer: _3, engineering: _3, enterprises: _3, epson: _3, equipment: _3, ericsson: _3, erni: _3, esq: _3, estate: [1, { compute: _7 }], eurovision: _3, eus: [1, { party: _50 }], events: [1, { koobin: _4, co: _4 }], exchange: _3, expert: _3, exposed: _3, express: _3, extraspace: _3, fage: _3, fail: _3, fairwinds: _3, faith: _3, family: _3, fan: _3, fans: _3, farm: [1, { storj: _4 }], farmers: _3, fashion: _3, fast: _3, fedex: _3, feedback: _3, ferrari: _3, ferrero: _3, fidelity: _3, fido: _3, film: _3, final: _3, finance: _3, financial: _19, fire: _3, firestone: _3, firmdale: _3, fish: _3, fishing: _3, fit: _3, fitness: _3, flickr: _3, flights: _3, flir: _3, florist: _3, flowers: _3, fly: _3, foo: _3, food: _3, football: _3, ford: _3, forex: _3, forsale: _3, forum: _3, foundation: _3, fox: _3, free: _3, fresenius: _3, frl: _3, frogans: _3, frontier: _3, ftr: _3, fujitsu: _3, fun: _3, fund: _3, furniture: _3, futbol: _3, fyi: _3, gal: _3, gallery: _3, gallo: _3, gallup: _3, game: _3, games: [1, { pley: _4, sheezy: _4 }], gap: _3, garden: _3, gay: [1, { pages: _4 }], gbiz: _3, gdn: [1, { cnpy: _4 }], gea: _3, gent: _3, genting: _3, george: _3, ggee: _3, gift: _3, gifts: _3, gives: _3, giving: _3, glass: _3, gle: _3, global: [1, { appwrite: _4 }], globo: _3, gmail: _3, gmbh: _3, gmo: _3, gmx: _3, godaddy: _3, gold: _3, goldpoint: _3, golf: _3, goo: _3, goodyear: _3, goog: [1, { cloud: _4, translate: _4, usercontent: _7 }], google: _3, gop: _3, got: _3, grainger: _3, graphics: _3, gratis: _3, green: _3, gripe: _3, grocery: _3, group: [1, { discourse: _4 }], gucci: _3, guge: _3, guide: _3, guitars: _3, guru: _3, hair: _3, hamburg: _3, hangout: _3, haus: _3, hbo: _3, hdfc: _3, hdfcbank: _3, health: [1, { hra: _4 }], healthcare: _3, help: _3, helsinki: _3, here: _3, hermes: _3, hiphop: _3, hisamitsu: _3, hitachi: _3, hiv: _3, hkt: _3, hockey: _3, holdings: _3, holiday: _3, homedepot: _3, homegoods: _3, homes: _3, homesense: _3, honda: _3, horse: _3, hospital: _3, host: [1, { cloudaccess: _4, freesite: _4, easypanel: _4, fastvps: _4, myfast: _4, tempurl: _4, wpmudev: _4, jele: _4, mircloud: _4, wp2: _4, half: _4 }], hosting: [1, { opencraft: _4 }], hot: _3, hotels: _3, hotmail: _3, house: _3, how: _3, hsbc: _3, hughes: _3, hyatt: _3, hyundai: _3, ibm: _3, icbc: _3, ice: _3, icu: _3, ieee: _3, ifm: _3, ikano: _3, imamat: _3, imdb: _3, immo: _3, immobilien: _3, inc: _3, industries: _3, infiniti: _3, ing: _3, ink: _3, institute: _3, insurance: _3, insure: _3, international: _3, intuit: _3, investments: _3, ipiranga: _3, irish: _3, ismaili: _3, ist: _3, istanbul: _3, itau: _3, itv: _3, jaguar: _3, java: _3, jcb: _3, jeep: _3, jetzt: _3, jewelry: _3, jio: _3, jll: _3, jmp: _3, jnj: _3, joburg: _3, jot: _3, joy: _3, jpmorgan: _3, jprs: _3, juegos: _3, juniper: _3, kaufen: _3, kddi: _3, kerryhotels: _3, kerryproperties: _3, kfh: _3, kia: _3, kids: _3, kim: _3, kindle: _3, kitchen: _3, kiwi: _3, koeln: _3, komatsu: _3, kosher: _3, kpmg: _3, kpn: _3, krd: [1, { co: _4, edu: _4 }], kred: _3, kuokgroup: _3, kyoto: _3, lacaixa: _3, lamborghini: _3, lamer: _3, lancaster: _3, land: _3, landrover: _3, lanxess: _3, lasalle: _3, lat: _3, latino: _3, latrobe: _3, law: _3, lawyer: _3, lds: _3, lease: _3, leclerc: _3, lefrak: _3, legal: _3, lego: _3, lexus: _3, lgbt: _3, lidl: _3, life: _3, lifeinsurance: _3, lifestyle: _3, lighting: _3, like: _3, lilly: _3, limited: _3, limo: _3, lincoln: _3, link: [1, { myfritz: _4, cyon: _4, dweb: _7, inbrowser: _7, nftstorage: _57, mypep: _4, storacha: _57, w3s: _57 }], live: [1, { aem: _4, hlx: _4, ewp: _7 }], living: _3, llc: _3, llp: _3, loan: _3, loans: _3, locker: _3, locus: _3, lol: [1, { omg: _4 }], london: _3, lotte: _3, lotto: _3, love: _3, lpl: _3, lplfinancial: _3, ltd: _3, ltda: _3, lundbeck: _3, luxe: _3, luxury: _3, madrid: _3, maif: _3, maison: _3, makeup: _3, man: _3, management: _3, mango: _3, map: _3, market: _3, marketing: _3, markets: _3, marriott: _3, marshalls: _3, mattel: _3, mba: _3, mckinsey: _3, med: _3, media: _58, meet: _3, melbourne: _3, meme: _3, memorial: _3, men: _3, menu: [1, { barsy: _4, barsyonline: _4 }], merck: _3, merckmsd: _3, miami: _3, microsoft: _3, mini: _3, mint: _3, mit: _3, mitsubishi: _3, mlb: _3, mls: _3, mma: _3, mobile: _3, moda: _3, moe: _3, moi: _3, mom: [1, { ind: _4 }], monash: _3, money: _3, monster: _3, mormon: _3, mortgage: _3, moscow: _3, moto: _3, motorcycles: _3, mov: _3, movie: _3, msd: _3, mtn: _3, mtr: _3, music: _3, nab: _3, nagoya: _3, navy: _3, nba: _3, nec: _3, netbank: _3, netflix: _3, network: [1, { alces: _7, co: _4, arvo: _4, azimuth: _4, tlon: _4 }], neustar: _3, new: _3, news: [1, { noticeable: _4 }], next: _3, nextdirect: _3, nexus: _3, nfl: _3, ngo: _3, nhk: _3, nico: _3, nike: _3, nikon: _3, ninja: _3, nissan: _3, nissay: _3, nokia: _3, norton: _3, now: _3, nowruz: _3, nowtv: _3, nra: _3, nrw: _3, ntt: _3, nyc: _3, obi: _3, observer: _3, office: _3, okinawa: _3, olayan: _3, olayangroup: _3, ollo: _3, omega: _3, one: [1, { kin: _7, service: _4 }], ong: [1, { obl: _4 }], onl: _3, online: [1, { eero: _4, "eero-stage": _4, websitebuilder: _4, barsy: _4 }], ooo: _3, open: _3, oracle: _3, orange: [1, { tech: _4 }], organic: _3, origins: _3, osaka: _3, otsuka: _3, ott: _3, ovh: [1, { nerdpol: _4 }], page: [1, { aem: _4, hlx: _4, hlx3: _4, translated: _4, codeberg: _4, heyflow: _4, prvcy: _4, rocky: _4, pdns: _4, plesk: _4 }], panasonic: _3, paris: _3, pars: _3, partners: _3, parts: _3, party: _3, pay: _3, pccw: _3, pet: _3, pfizer: _3, pharmacy: _3, phd: _3, philips: _3, phone: _3, photo: _3, photography: _3, photos: _58, physio: _3, pics: _3, pictet: _3, pictures: [1, { "1337": _4 }], pid: _3, pin: _3, ping: _3, pink: _3, pioneer: _3, pizza: [1, { ngrok: _4 }], place: _19, play: _3, playstation: _3, plumbing: _3, plus: _3, pnc: _3, pohl: _3, poker: _3, politie: _3, porn: _3, pramerica: _3, praxi: _3, press: _3, prime: _3, prod: _3, productions: _3, prof: _3, progressive: _3, promo: _3, properties: _3, property: _3, protection: _3, pru: _3, prudential: _3, pub: [1, { id: _7, kin: _7, barsy: _4 }], pwc: _3, qpon: _3, quebec: _3, quest: _3, racing: _3, radio: _3, read: _3, realestate: _3, realtor: _3, realty: _3, recipes: _3, red: _3, redstone: _3, redumbrella: _3, rehab: _3, reise: _3, reisen: _3, reit: _3, reliance: _3, ren: _3, rent: _3, rentals: _3, repair: _3, report: _3, republican: _3, rest: _3, restaurant: _3, review: _3, reviews: _3, rexroth: _3, rich: _3, richardli: _3, ricoh: _3, ril: _3, rio: _3, rip: [1, { clan: _4 }], rocks: [1, { myddns: _4, stackit: _4, "lima-city": _4, webspace: _4 }], rodeo: _3, rogers: _3, room: _3, rsvp: _3, rugby: _3, ruhr: _3, run: [1, { appwrite: _7, development: _4, ravendb: _4, liara: [2, { iran: _4 }], servers: _4, build: _7, code: _7, database: _7, migration: _7, onporter: _4, repl: _4, stackit: _4, val: [0, { express: _4, web: _4 }], wix: _4 }], rwe: _3, ryukyu: _3, saarland: _3, safe: _3, safety: _3, sakura: _3, sale: _3, salon: _3, samsclub: _3, samsung: _3, sandvik: _3, sandvikcoromant: _3, sanofi: _3, sap: _3, sarl: _3, sas: _3, save: _3, saxo: _3, sbi: _3, sbs: _3, scb: _3, schaeffler: _3, schmidt: _3, scholarships: _3, school: _3, schule: _3, schwarz: _3, science: _3, scot: [1, { gov: [2, { service: _4 }] }], search: _3, seat: _3, secure: _3, security: _3, seek: _3, select: _3, sener: _3, services: [1, { loginline: _4 }], seven: _3, sew: _3, sex: _3, sexy: _3, sfr: _3, shangrila: _3, sharp: _3, shell: _3, shia: _3, shiksha: _3, shoes: _3, shop: [1, { base: _4, hoplix: _4, barsy: _4, barsyonline: _4, shopware: _4 }], shopping: _3, shouji: _3, show: _3, silk: _3, sina: _3, singles: _3, site: [1, { square: _4, canva: _22, cloudera: _7, convex: _4, cyon: _4, fastvps: _4, figma: _4, heyflow: _4, jele: _4, jouwweb: _4, loginline: _4, barsy: _4, notion: _4, omniwe: _4, opensocial: _4, madethis: _4, platformsh: _7, tst: _7, byen: _4, srht: _4, novecore: _4, cpanel: _4, wpsquared: _4 }], ski: _3, skin: _3, sky: _3, skype: _3, sling: _3, smart: _3, smile: _3, sncf: _3, soccer: _3, social: _3, softbank: _3, software: _3, sohu: _3, solar: _3, solutions: _3, song: _3, sony: _3, soy: _3, spa: _3, space: [1, { myfast: _4, heiyu: _4, hf: [2, { static: _4 }], "app-ionos": _4, project: _4, uber: _4, xs4all: _4 }], sport: _3, spot: _3, srl: _3, stada: _3, staples: _3, star: _3, statebank: _3, statefarm: _3, stc: _3, stcgroup: _3, stockholm: _3, storage: _3, store: [1, { barsy: _4, sellfy: _4, shopware: _4, storebase: _4 }], stream: _3, studio: _3, study: _3, style: _3, sucks: _3, supplies: _3, supply: _3, support: [1, { barsy: _4 }], surf: _3, surgery: _3, suzuki: _3, swatch: _3, swiss: _3, sydney: _3, systems: [1, { knightpoint: _4 }], tab: _3, taipei: _3, talk: _3, taobao: _3, target: _3, tatamotors: _3, tatar: _3, tattoo: _3, tax: _3, taxi: _3, tci: _3, tdk: _3, team: [1, { discourse: _4, jelastic: _4 }], tech: [1, { cleverapps: _4 }], technology: _19, temasek: _3, tennis: _3, teva: _3, thd: _3, theater: _3, theatre: _3, tiaa: _3, tickets: _3, tienda: _3, tips: _3, tires: _3, tirol: _3, tjmaxx: _3, tjx: _3, tkmaxx: _3, tmall: _3, today: [1, { prequalifyme: _4 }], tokyo: _3, tools: [1, { addr: _47, myaddr: _4 }], top: [1, { ntdll: _4, wadl: _7 }], toray: _3, toshiba: _3, total: _3, tours: _3, town: _3, toyota: _3, toys: _3, trade: _3, trading: _3, training: _3, travel: _3, travelers: _3, travelersinsurance: _3, trust: _3, trv: _3, tube: _3, tui: _3, tunes: _3, tushu: _3, tvs: _3, ubank: _3, ubs: _3, unicom: _3, university: _3, uno: _3, uol: _3, ups: _3, vacations: _3, vana: _3, vanguard: _3, vegas: _3, ventures: _3, verisign: _3, versicherung: _3, vet: _3, viajes: _3, video: _3, vig: _3, viking: _3, villas: _3, vin: _3, vip: _3, virgin: _3, visa: _3, vision: _3, viva: _3, vivo: _3, vlaanderen: _3, vodka: _3, volvo: _3, vote: _3, voting: _3, voto: _3, voyage: _3, wales: _3, walmart: _3, walter: _3, wang: _3, wanggou: _3, watch: _3, watches: _3, weather: _3, weatherchannel: _3, webcam: _3, weber: _3, website: _58, wed: _3, wedding: _3, weibo: _3, weir: _3, whoswho: _3, wien: _3, wiki: _58, williamhill: _3, win: _3, windows: _3, wine: _3, winners: _3, wme: _3, wolterskluwer: _3, woodside: _3, work: _3, works: _3, world: _3, wow: _3, wtc: _3, wtf: _3, xbox: _3, xerox: _3, xihuan: _3, xin: _3, "xn--11b4c3d": _3, "\u0915\u0949\u092E": _3, "xn--1ck2e1b": _3, "\u30BB\u30FC\u30EB": _3, "xn--1qqw23a": _3, "\u4F5B\u5C71": _3, "xn--30rr7y": _3, "\u6148\u5584": _3, "xn--3bst00m": _3, "\u96C6\u56E2": _3, "xn--3ds443g": _3, "\u5728\u7EBF": _3, "xn--3pxu8k": _3, "\u70B9\u770B": _3, "xn--42c2d9a": _3, "\u0E04\u0E2D\u0E21": _3, "xn--45q11c": _3, "\u516B\u5366": _3, "xn--4gbrim": _3, "\u0645\u0648\u0642\u0639": _3, "xn--55qw42g": _3, "\u516C\u76CA": _3, "xn--55qx5d": _3, "\u516C\u53F8": _3, "xn--5su34j936bgsg": _3, "\u9999\u683C\u91CC\u62C9": _3, "xn--5tzm5g": _3, "\u7F51\u7AD9": _3, "xn--6frz82g": _3, "\u79FB\u52A8": _3, "xn--6qq986b3xl": _3, "\u6211\u7231\u4F60": _3, "xn--80adxhks": _3, "\u043C\u043E\u0441\u043A\u0432\u0430": _3, "xn--80aqecdr1a": _3, "\u043A\u0430\u0442\u043E\u043B\u0438\u043A": _3, "xn--80asehdb": _3, "\u043E\u043D\u043B\u0430\u0439\u043D": _3, "xn--80aswg": _3, "\u0441\u0430\u0439\u0442": _3, "xn--8y0a063a": _3, "\u8054\u901A": _3, "xn--9dbq2a": _3, "\u05E7\u05D5\u05DD": _3, "xn--9et52u": _3, "\u65F6\u5C1A": _3, "xn--9krt00a": _3, "\u5FAE\u535A": _3, "xn--b4w605ferd": _3, "\u6DE1\u9A6C\u9521": _3, "xn--bck1b9a5dre4c": _3, "\u30D5\u30A1\u30C3\u30B7\u30E7\u30F3": _3, "xn--c1avg": _3, "\u043E\u0440\u0433": _3, "xn--c2br7g": _3, "\u0928\u0947\u091F": _3, "xn--cck2b3b": _3, "\u30B9\u30C8\u30A2": _3, "xn--cckwcxetd": _3, "\u30A2\u30DE\u30BE\u30F3": _3, "xn--cg4bki": _3, "\uC0BC\uC131": _3, "xn--czr694b": _3, "\u5546\u6807": _3, "xn--czrs0t": _3, "\u5546\u5E97": _3, "xn--czru2d": _3, "\u5546\u57CE": _3, "xn--d1acj3b": _3, "\u0434\u0435\u0442\u0438": _3, "xn--eckvdtc9d": _3, "\u30DD\u30A4\u30F3\u30C8": _3, "xn--efvy88h": _3, "\u65B0\u95FB": _3, "xn--fct429k": _3, "\u5BB6\u96FB": _3, "xn--fhbei": _3, "\u0643\u0648\u0645": _3, "xn--fiq228c5hs": _3, "\u4E2D\u6587\u7F51": _3, "xn--fiq64b": _3, "\u4E2D\u4FE1": _3, "xn--fjq720a": _3, "\u5A31\u4E50": _3, "xn--flw351e": _3, "\u8C37\u6B4C": _3, "xn--fzys8d69uvgm": _3, "\u96FB\u8A0A\u76C8\u79D1": _3, "xn--g2xx48c": _3, "\u8D2D\u7269": _3, "xn--gckr3f0f": _3, "\u30AF\u30E9\u30A6\u30C9": _3, "xn--gk3at1e": _3, "\u901A\u8CA9": _3, "xn--hxt814e": _3, "\u7F51\u5E97": _3, "xn--i1b6b1a6a2e": _3, "\u0938\u0902\u0917\u0920\u0928": _3, "xn--imr513n": _3, "\u9910\u5385": _3, "xn--io0a7i": _3, "\u7F51\u7EDC": _3, "xn--j1aef": _3, "\u043A\u043E\u043C": _3, "xn--jlq480n2rg": _3, "\u4E9A\u9A6C\u900A": _3, "xn--jvr189m": _3, "\u98DF\u54C1": _3, "xn--kcrx77d1x4a": _3, "\u98DE\u5229\u6D66": _3, "xn--kput3i": _3, "\u624B\u673A": _3, "xn--mgba3a3ejt": _3, "\u0627\u0631\u0627\u0645\u0643\u0648": _3, "xn--mgba7c0bbn0a": _3, "\u0627\u0644\u0639\u0644\u064A\u0627\u0646": _3, "xn--mgbab2bd": _3, "\u0628\u0627\u0632\u0627\u0631": _3, "xn--mgbca7dzdo": _3, "\u0627\u0628\u0648\u0638\u0628\u064A": _3, "xn--mgbi4ecexp": _3, "\u0643\u0627\u062B\u0648\u0644\u064A\u0643": _3, "xn--mgbt3dhd": _3, "\u0647\u0645\u0631\u0627\u0647": _3, "xn--mk1bu44c": _3, "\uB2F7\uCEF4": _3, "xn--mxtq1m": _3, "\u653F\u5E9C": _3, "xn--ngbc5azd": _3, "\u0634\u0628\u0643\u0629": _3, "xn--ngbe9e0a": _3, "\u0628\u064A\u062A\u0643": _3, "xn--ngbrx": _3, "\u0639\u0631\u0628": _3, "xn--nqv7f": _3, "\u673A\u6784": _3, "xn--nqv7fs00ema": _3, "\u7EC4\u7EC7\u673A\u6784": _3, "xn--nyqy26a": _3, "\u5065\u5EB7": _3, "xn--otu796d": _3, "\u62DB\u8058": _3, "xn--p1acf": [1, { "xn--90amc": _4, "xn--j1aef": _4, "xn--j1ael8b": _4, "xn--h1ahn": _4, "xn--j1adp": _4, "xn--c1avg": _4, "xn--80aaa0cvac": _4, "xn--h1aliz": _4, "xn--90a1af": _4, "xn--41a": _4 }], "\u0440\u0443\u0441": [1, { "\u0431\u0438\u0437": _4, "\u043A\u043E\u043C": _4, "\u043A\u0440\u044B\u043C": _4, "\u043C\u0438\u0440": _4, "\u043C\u0441\u043A": _4, "\u043E\u0440\u0433": _4, "\u0441\u0430\u043C\u0430\u0440\u0430": _4, "\u0441\u043E\u0447\u0438": _4, "\u0441\u043F\u0431": _4, "\u044F": _4 }], "xn--pssy2u": _3, "\u5927\u62FF": _3, "xn--q9jyb4c": _3, "\u307F\u3093\u306A": _3, "xn--qcka1pmc": _3, "\u30B0\u30FC\u30B0\u30EB": _3, "xn--rhqv96g": _3, "\u4E16\u754C": _3, "xn--rovu88b": _3, "\u66F8\u7C4D": _3, "xn--ses554g": _3, "\u7F51\u5740": _3, "xn--t60b56a": _3, "\uB2F7\uB137": _3, "xn--tckwe": _3, "\u30B3\u30E0": _3, "xn--tiq49xqyj": _3, "\u5929\u4E3B\u6559": _3, "xn--unup4y": _3, "\u6E38\u620F": _3, "xn--vermgensberater-ctb": _3, "verm\xF6gensberater": _3, "xn--vermgensberatung-pwb": _3, "verm\xF6gensberatung": _3, "xn--vhquv": _3, "\u4F01\u4E1A": _3, "xn--vuq861b": _3, "\u4FE1\u606F": _3, "xn--w4r85el8fhu5dnra": _3, "\u5609\u91CC\u5927\u9152\u5E97": _3, "xn--w4rs40l": _3, "\u5609\u91CC": _3, "xn--xhq521b": _3, "\u5E7F\u4E1C": _3, "xn--zfr164b": _3, "\u653F\u52A1": _3, xyz: [1, { botdash: _4, telebit: _7 }], yachts: _3, yahoo: _3, yamaxun: _3, yandex: _3, yodobashi: _3, yoga: _3, yokohama: _3, you: _3, youtube: _3, yun: _3, zappos: _3, zara: _3, zero: _3, zip: _3, zone: [1, { cloud66: _4, triton: _7, stackit: _4, lima: _4 }], zuerich: _3 }]; - return rules2; - }(); - var RESULT = getEmptyResult(); - exports.getDomain = getDomain; - exports.getDomainWithoutSuffix = getDomainWithoutSuffix; - exports.getHostname = getHostname; - exports.getPublicSuffix = getPublicSuffix; - exports.getSubdomain = getSubdomain; - exports.parse = parse; -}); - -// node_modules/tough-cookie/dist/getPublicSuffix.js -var require_getPublicSuffix = __commonJS((exports) => { - function getPublicSuffix(domain, options = {}) { - options = { ...defaultGetPublicSuffixOptions, ...options }; - const domainParts = domain.split("."); - const topLevelDomain = domainParts[domainParts.length - 1]; - const allowSpecialUseDomain = !!options.allowSpecialUseDomain; - const ignoreError = !!options.ignoreError; - if (allowSpecialUseDomain && topLevelDomain !== undefined && SPECIAL_USE_DOMAINS.includes(topLevelDomain)) { - if (domainParts.length > 1) { - const secondLevelDomain = domainParts[domainParts.length - 2]; - return `${secondLevelDomain}.${topLevelDomain}`; - } else if (SPECIAL_TREATMENT_DOMAINS.includes(topLevelDomain)) { - return topLevelDomain; - } - } - if (!ignoreError && topLevelDomain !== undefined && SPECIAL_USE_DOMAINS.includes(topLevelDomain)) { - throw new Error(`Cookie has domain set to the public suffix "${topLevelDomain}" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain: true, rejectPublicSuffixes: false}.`); - } - const publicSuffix = (0, tldts_1.getDomain)(domain, { - allowIcannDomains: true, - allowPrivateDomains: true - }); - if (publicSuffix) - return publicSuffix; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getPublicSuffix = getPublicSuffix; - var tldts_1 = require_cjs3(); - var SPECIAL_USE_DOMAINS = ["local", "example", "invalid", "localhost", "test"]; - var SPECIAL_TREATMENT_DOMAINS = ["localhost", "invalid"]; - var defaultGetPublicSuffixOptions = { - allowSpecialUseDomain: false, - ignoreError: false - }; -}); - -// node_modules/tough-cookie/dist/permuteDomain.js -var require_permuteDomain = __commonJS((exports) => { - function permuteDomain(domain, allowSpecialUseDomain) { - const pubSuf = (0, getPublicSuffix_1.getPublicSuffix)(domain, { - allowSpecialUseDomain - }); - if (!pubSuf) { - return; - } - if (pubSuf == domain) { - return [domain]; - } - if (domain.slice(-1) == ".") { - domain = domain.slice(0, -1); - } - const prefix = domain.slice(0, -(pubSuf.length + 1)); - const parts = prefix.split(".").reverse(); - let cur = pubSuf; - const permutations = [cur]; - while (parts.length) { - const part = parts.shift(); - cur = `${part}.${cur}`; - permutations.push(cur); - } - return permutations; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.permuteDomain = permuteDomain; - var getPublicSuffix_1 = require_getPublicSuffix(); -}); - -// node_modules/tough-cookie/dist/store.js -var require_store = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Store = undefined; - - class Store { - constructor() { - this.synchronous = false; - } - findCookie(_domain, _path, _key, _callback) { - throw new Error("findCookie is not implemented"); - } - findCookies(_domain, _path, _allowSpecialUseDomain = false, _callback) { - throw new Error("findCookies is not implemented"); - } - putCookie(_cookie, _callback) { - throw new Error("putCookie is not implemented"); - } - updateCookie(_oldCookie, _newCookie, _callback) { - throw new Error("updateCookie is not implemented"); - } - removeCookie(_domain, _path, _key, _callback) { - throw new Error("removeCookie is not implemented"); - } - removeCookies(_domain, _path, _callback) { - throw new Error("removeCookies is not implemented"); - } - removeAllCookies(_callback) { - throw new Error("removeAllCookies is not implemented"); - } - getAllCookies(_callback) { - throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)"); - } - } - exports.Store = Store; -}); - -// node_modules/tough-cookie/dist/utils.js -var require_utils = __commonJS((exports) => { - function createPromiseCallback(cb) { - let callback; - let resolve; - let reject; - const promise = new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - }); - if (typeof cb === "function") { - callback = (err, result) => { - try { - if (err) - cb(err); - else - cb(null, result); - } catch (e) { - reject(e instanceof Error ? e : new Error); - } - }; - } else { - callback = (err, result) => { - try { - if (err) - reject(err); - else - resolve(result); - } catch (e) { - reject(e instanceof Error ? e : new Error); - } - }; - } - return { - promise, - callback, - resolve: (value) => { - callback(null, value); - return promise; - }, - reject: (error) => { - callback(error); - return promise; - } - }; - } - function inOperator(k, o) { - return k in o; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.safeToString = exports.objectToString = undefined; - exports.createPromiseCallback = createPromiseCallback; - exports.inOperator = inOperator; - var objectToString = (obj) => Object.prototype.toString.call(obj); - exports.objectToString = objectToString; - var safeArrayToString = (arr, seenArrays) => { - if (typeof arr.join !== "function") - return (0, exports.objectToString)(arr); - seenArrays.add(arr); - const mapped = arr.map((val) => val === null || val === undefined || seenArrays.has(val) ? "" : safeToStringImpl(val, seenArrays)); - return mapped.join(); - }; - var safeToStringImpl = (val, seenArrays = new WeakSet) => { - if (typeof val !== "object" || val === null) { - return String(val); - } else if (typeof val.toString === "function") { - return Array.isArray(val) ? safeArrayToString(val, seenArrays) : String(val); - } else { - return (0, exports.objectToString)(val); - } - }; - var safeToString = (val) => safeToStringImpl(val); - exports.safeToString = safeToString; -}); - -// node_modules/tough-cookie/dist/memstore.js -var require_memstore = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.MemoryCookieStore = undefined; - var pathMatch_1 = require_pathMatch(); - var permuteDomain_1 = require_permuteDomain(); - var store_1 = require_store(); - var utils_1 = require_utils(); - - class MemoryCookieStore extends store_1.Store { - constructor() { - super(); - this.synchronous = true; - this.idx = Object.create(null); - } - findCookie(domain, path, key, callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - if (domain == null || path == null || key == null) { - return promiseCallback.resolve(undefined); - } - const result = this.idx[domain]?.[path]?.[key]; - return promiseCallback.resolve(result); - } - findCookies(domain, path, allowSpecialUseDomain = false, callback) { - if (typeof allowSpecialUseDomain === "function") { - callback = allowSpecialUseDomain; - allowSpecialUseDomain = true; - } - const results = []; - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - if (!domain) { - return promiseCallback.resolve([]); - } - let pathMatcher; - if (!path) { - pathMatcher = function matchAll(domainIndex) { - for (const curPath in domainIndex) { - const pathIndex = domainIndex[curPath]; - for (const key in pathIndex) { - const value = pathIndex[key]; - if (value) { - results.push(value); - } - } - } - }; - } else { - pathMatcher = function matchRFC(domainIndex) { - for (const cookiePath in domainIndex) { - if ((0, pathMatch_1.pathMatch)(path, cookiePath)) { - const pathIndex = domainIndex[cookiePath]; - for (const key in pathIndex) { - const value = pathIndex[key]; - if (value) { - results.push(value); - } - } - } - } - }; - } - const domains = (0, permuteDomain_1.permuteDomain)(domain, allowSpecialUseDomain) || [domain]; - const idx = this.idx; - domains.forEach((curDomain) => { - const domainIndex = idx[curDomain]; - if (!domainIndex) { - return; - } - pathMatcher(domainIndex); - }); - return promiseCallback.resolve(results); - } - putCookie(cookie, callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const { domain, path, key } = cookie; - if (domain == null || path == null || key == null) { - return promiseCallback.resolve(undefined); - } - const domainEntry = this.idx[domain] ?? Object.create(null); - this.idx[domain] = domainEntry; - const pathEntry = domainEntry[path] ?? Object.create(null); - domainEntry[path] = pathEntry; - pathEntry[key] = cookie; - return promiseCallback.resolve(undefined); - } - updateCookie(_oldCookie, newCookie, callback) { - if (callback) - this.putCookie(newCookie, callback); - else - return this.putCookie(newCookie); - } - removeCookie(domain, path, key, callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - delete this.idx[domain]?.[path]?.[key]; - return promiseCallback.resolve(undefined); - } - removeCookies(domain, path, callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const domainEntry = this.idx[domain]; - if (domainEntry) { - if (path) { - delete domainEntry[path]; - } else { - delete this.idx[domain]; - } - } - return promiseCallback.resolve(undefined); - } - removeAllCookies(callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - this.idx = Object.create(null); - return promiseCallback.resolve(undefined); - } - getAllCookies(callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const cookies = []; - const idx = this.idx; - const domains = Object.keys(idx); - domains.forEach((domain) => { - const domainEntry = idx[domain] ?? {}; - const paths = Object.keys(domainEntry); - paths.forEach((path) => { - const pathEntry = domainEntry[path] ?? {}; - const keys = Object.keys(pathEntry); - keys.forEach((key) => { - const keyEntry = pathEntry[key]; - if (keyEntry != null) { - cookies.push(keyEntry); - } - }); - }); - }); - cookies.sort((a, b) => { - return (a.creationIndex || 0) - (b.creationIndex || 0); - }); - return promiseCallback.resolve(cookies); - } - } - exports.MemoryCookieStore = MemoryCookieStore; -}); - -// node_modules/tough-cookie/dist/validators.js -var require_validators = __commonJS((exports) => { - function isNonEmptyString(data) { - return isString(data) && data !== ""; - } - function isDate(data) { - return data instanceof Date && isInteger(data.getTime()); - } - function isEmptyString(data) { - return data === "" || data instanceof String && data.toString() === ""; - } - function isString(data) { - return typeof data === "string" || data instanceof String; - } - function isObject(data) { - return (0, utils_1.objectToString)(data) === "[object Object]"; - } - function isInteger(data) { - return typeof data === "number" && data % 1 === 0; - } - function validate(bool, cbOrMessage, message) { - if (bool) - return; - const cb = typeof cbOrMessage === "function" ? cbOrMessage : undefined; - let options = typeof cbOrMessage === "function" ? message : cbOrMessage; - if (!isObject(options)) - options = "[object Object]"; - const err = new ParameterError((0, utils_1.safeToString)(options)); - if (cb) - cb(err); - else - throw err; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ParameterError = undefined; - exports.isNonEmptyString = isNonEmptyString; - exports.isDate = isDate; - exports.isEmptyString = isEmptyString; - exports.isString = isString; - exports.isObject = isObject; - exports.isInteger = isInteger; - exports.validate = validate; - var utils_1 = require_utils(); - - class ParameterError extends Error { - } - exports.ParameterError = ParameterError; -}); - -// node_modules/tough-cookie/dist/version.js -var require_version = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.version = undefined; - exports.version = "5.1.2"; -}); - -// node_modules/tough-cookie/dist/cookie/constants.js -var require_constants = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.IP_V6_REGEX_OBJECT = exports.PrefixSecurityEnum = undefined; - exports.PrefixSecurityEnum = { - SILENT: "silent", - STRICT: "strict", - DISABLED: "unsafe-disabled" - }; - Object.freeze(exports.PrefixSecurityEnum); - var IP_V6_REGEX = ` -\\[?(?: -(?:[a-fA-F\\d]{1,4}:){7}(?:[a-fA-F\\d]{1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|:[a-fA-F\\d]{1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,2}|:)| -(?:[a-fA-F\\d]{1,4}:){4}(?:(?::[a-fA-F\\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,3}|:)| -(?:[a-fA-F\\d]{1,4}:){3}(?:(?::[a-fA-F\\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,4}|:)| -(?:[a-fA-F\\d]{1,4}:){2}(?:(?::[a-fA-F\\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,5}|:)| -(?:[a-fA-F\\d]{1,4}:){1}(?:(?::[a-fA-F\\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,6}|:)| -(?::(?:(?::[a-fA-F\\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}|(?::[a-fA-F\\d]{1,4}){1,7}|:)) -)(?:%[0-9a-zA-Z]{1,})?\\]? -`.replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(); - exports.IP_V6_REGEX_OBJECT = new RegExp(`^${IP_V6_REGEX}\$`); -}); - -// node_modules/tough-cookie/dist/cookie/canonicalDomain.js -var require_canonicalDomain = __commonJS((exports) => { - function domainToASCII(domain) { - return new URL(`http://${domain}`).hostname; - } - function canonicalDomain(domainName) { - if (domainName == null) { - return; - } - let str = domainName.trim().replace(/^\./, ""); - if (constants_1.IP_V6_REGEX_OBJECT.test(str)) { - if (!str.startsWith("[")) { - str = "[" + str; - } - if (!str.endsWith("]")) { - str = str + "]"; - } - return domainToASCII(str).slice(1, -1); - } - if (/[^\u0001-\u007f]/.test(str)) { - return domainToASCII(str); - } - return str.toLowerCase(); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.canonicalDomain = canonicalDomain; - var constants_1 = require_constants(); -}); - -// node_modules/tough-cookie/dist/cookie/formatDate.js -var require_formatDate = __commonJS((exports) => { - function formatDate(date) { - return date.toUTCString(); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.formatDate = formatDate; -}); - -// node_modules/tough-cookie/dist/cookie/parseDate.js -var require_parseDate = __commonJS((exports) => { - function parseDigits(token, minDigits, maxDigits, trailingOK) { - let count = 0; - while (count < token.length) { - const c = token.charCodeAt(count); - if (c <= 47 || c >= 58) { - break; - } - count++; - } - if (count < minDigits || count > maxDigits) { - return; - } - if (!trailingOK && count != token.length) { - return; - } - return parseInt(token.slice(0, count), 10); - } - function parseTime(token) { - const parts = token.split(":"); - const result = [0, 0, 0]; - if (parts.length !== 3) { - return; - } - for (let i = 0;i < 3; i++) { - const trailingOK = i == 2; - const numPart = parts[i]; - if (numPart === undefined) { - return; - } - const num = parseDigits(numPart, 1, 2, trailingOK); - if (num === undefined) { - return; - } - result[i] = num; - } - return result; - } - function parseMonth(token) { - token = String(token).slice(0, 3).toLowerCase(); - switch (token) { - case "jan": - return MONTH_TO_NUM.jan; - case "feb": - return MONTH_TO_NUM.feb; - case "mar": - return MONTH_TO_NUM.mar; - case "apr": - return MONTH_TO_NUM.apr; - case "may": - return MONTH_TO_NUM.may; - case "jun": - return MONTH_TO_NUM.jun; - case "jul": - return MONTH_TO_NUM.jul; - case "aug": - return MONTH_TO_NUM.aug; - case "sep": - return MONTH_TO_NUM.sep; - case "oct": - return MONTH_TO_NUM.oct; - case "nov": - return MONTH_TO_NUM.nov; - case "dec": - return MONTH_TO_NUM.dec; - default: - return; - } - } - function parseDate(cookieDate) { - if (!cookieDate) { - return; - } - const tokens = cookieDate.split(DATE_DELIM); - let hour; - let minute; - let second; - let dayOfMonth; - let month; - let year; - for (let i = 0;i < tokens.length; i++) { - const token = (tokens[i] ?? "").trim(); - if (!token.length) { - continue; - } - if (second === undefined) { - const result = parseTime(token); - if (result) { - hour = result[0]; - minute = result[1]; - second = result[2]; - continue; - } - } - if (dayOfMonth === undefined) { - const result = parseDigits(token, 1, 2, true); - if (result !== undefined) { - dayOfMonth = result; - continue; - } - } - if (month === undefined) { - const result = parseMonth(token); - if (result !== undefined) { - month = result; - continue; - } - } - if (year === undefined) { - const result = parseDigits(token, 2, 4, true); - if (result !== undefined) { - year = result; - if (year >= 70 && year <= 99) { - year += 1900; - } else if (year >= 0 && year <= 69) { - year += 2000; - } - } - } - } - if (dayOfMonth === undefined || month === undefined || year === undefined || hour === undefined || minute === undefined || second === undefined || dayOfMonth < 1 || dayOfMonth > 31 || year < 1601 || hour > 23 || minute > 59 || second > 59) { - return; - } - return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.parseDate = parseDate; - var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; - var MONTH_TO_NUM = { - jan: 0, - feb: 1, - mar: 2, - apr: 3, - may: 4, - jun: 5, - jul: 6, - aug: 7, - sep: 8, - oct: 9, - nov: 10, - dec: 11 - }; -}); - -// node_modules/tough-cookie/dist/cookie/cookie.js -var require_cookie = __commonJS((exports) => { - function trimTerminator(str) { - if (validators.isEmptyString(str)) - return str; - for (let t = 0;t < TERMINATORS.length; t++) { - const terminator = TERMINATORS[t]; - const terminatorIdx = terminator ? str.indexOf(terminator) : -1; - if (terminatorIdx !== -1) { - str = str.slice(0, terminatorIdx); - } - } - return str; - } - function parseCookiePair(cookiePair, looseMode) { - cookiePair = trimTerminator(cookiePair); - let firstEq = cookiePair.indexOf("="); - if (looseMode) { - if (firstEq === 0) { - cookiePair = cookiePair.substring(1); - firstEq = cookiePair.indexOf("="); - } - } else { - if (firstEq <= 0) { - return; - } - } - let cookieName, cookieValue; - if (firstEq <= 0) { - cookieName = ""; - cookieValue = cookiePair.trim(); - } else { - cookieName = cookiePair.slice(0, firstEq).trim(); - cookieValue = cookiePair.slice(firstEq + 1).trim(); - } - if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { - return; - } - const c = new Cookie; - c.key = cookieName; - c.value = cookieValue; - return c; - } - function parse(str, options) { - if (validators.isEmptyString(str) || !validators.isString(str)) { - return; - } - str = str.trim(); - const firstSemi = str.indexOf(";"); - const cookiePair = firstSemi === -1 ? str : str.slice(0, firstSemi); - const c = parseCookiePair(cookiePair, options?.loose ?? false); - if (!c) { - return; - } - if (firstSemi === -1) { - return c; - } - const unparsed = str.slice(firstSemi + 1).trim(); - if (unparsed.length === 0) { - return c; - } - const cookie_avs = unparsed.split(";"); - while (cookie_avs.length) { - const av = (cookie_avs.shift() ?? "").trim(); - if (av.length === 0) { - continue; - } - const av_sep = av.indexOf("="); - let av_key, av_value; - if (av_sep === -1) { - av_key = av; - av_value = null; - } else { - av_key = av.slice(0, av_sep); - av_value = av.slice(av_sep + 1); - } - av_key = av_key.trim().toLowerCase(); - if (av_value) { - av_value = av_value.trim(); - } - switch (av_key) { - case "expires": - if (av_value) { - const exp = (0, parseDate_1.parseDate)(av_value); - if (exp) { - c.expires = exp; - } - } - break; - case "max-age": - if (av_value) { - if (/^-?[0-9]+$/.test(av_value)) { - const delta = parseInt(av_value, 10); - c.setMaxAge(delta); - } - } - break; - case "domain": - if (av_value) { - const domain = av_value.trim().replace(/^\./, ""); - if (domain) { - c.domain = domain.toLowerCase(); - } - } - break; - case "path": - c.path = av_value && av_value[0] === "/" ? av_value : null; - break; - case "secure": - c.secure = true; - break; - case "httponly": - c.httpOnly = true; - break; - case "samesite": - switch (av_value ? av_value.toLowerCase() : "") { - case "strict": - c.sameSite = "strict"; - break; - case "lax": - c.sameSite = "lax"; - break; - case "none": - c.sameSite = "none"; - break; - default: - c.sameSite = undefined; - break; - } - break; - default: - c.extensions = c.extensions || []; - c.extensions.push(av); - break; - } - } - return c; - } - function fromJSON(str) { - if (!str || validators.isEmptyString(str)) { - return; - } - let obj; - if (typeof str === "string") { - try { - obj = JSON.parse(str); - } catch { - return; - } - } else { - obj = str; - } - const c = new Cookie; - Cookie.serializableProperties.forEach((prop) => { - if (obj && typeof obj === "object" && (0, utils_1.inOperator)(prop, obj)) { - const val = obj[prop]; - if (val === undefined) { - return; - } - if ((0, utils_1.inOperator)(prop, cookieDefaults) && val === cookieDefaults[prop]) { - return; - } - switch (prop) { - case "key": - case "value": - case "sameSite": - if (typeof val === "string") { - c[prop] = val; - } - break; - case "expires": - case "creation": - case "lastAccessed": - if (typeof val === "number" || typeof val === "string" || val instanceof Date) { - c[prop] = obj[prop] == "Infinity" ? "Infinity" : new Date(val); - } else if (val === null) { - c[prop] = null; - } - break; - case "maxAge": - if (typeof val === "number" || val === "Infinity" || val === "-Infinity") { - c[prop] = val; - } - break; - case "domain": - case "path": - if (typeof val === "string" || val === null) { - c[prop] = val; - } - break; - case "secure": - case "httpOnly": - if (typeof val === "boolean") { - c[prop] = val; - } - break; - case "extensions": - if (Array.isArray(val) && val.every((item) => typeof item === "string")) { - c[prop] = val; - } - break; - case "hostOnly": - case "pathIsDefault": - if (typeof val === "boolean" || val === null) { - c[prop] = val; - } - break; - } - } - }); - return c; - } - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Cookie = undefined; - /*! - * Copyright (c) 2015-2020, Salesforce.com, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of Salesforce.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - var getPublicSuffix_1 = require_getPublicSuffix(); - var validators = __importStar(require_validators()); - var utils_1 = require_utils(); - var formatDate_1 = require_formatDate(); - var parseDate_1 = require_parseDate(); - var canonicalDomain_1 = require_canonicalDomain(); - var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - var CONTROL_CHARS = /[\x00-\x1F]/; - var TERMINATORS = ["\n", "\r", "\0"]; - var cookieDefaults = { - key: "", - value: "", - expires: "Infinity", - maxAge: null, - domain: null, - path: null, - secure: false, - httpOnly: false, - extensions: null, - hostOnly: null, - pathIsDefault: null, - creation: null, - lastAccessed: null, - sameSite: undefined - }; - - class Cookie { - constructor(options = {}) { - this.key = options.key ?? cookieDefaults.key; - this.value = options.value ?? cookieDefaults.value; - this.expires = options.expires ?? cookieDefaults.expires; - this.maxAge = options.maxAge ?? cookieDefaults.maxAge; - this.domain = options.domain ?? cookieDefaults.domain; - this.path = options.path ?? cookieDefaults.path; - this.secure = options.secure ?? cookieDefaults.secure; - this.httpOnly = options.httpOnly ?? cookieDefaults.httpOnly; - this.extensions = options.extensions ?? cookieDefaults.extensions; - this.creation = options.creation ?? cookieDefaults.creation; - this.hostOnly = options.hostOnly ?? cookieDefaults.hostOnly; - this.pathIsDefault = options.pathIsDefault ?? cookieDefaults.pathIsDefault; - this.lastAccessed = options.lastAccessed ?? cookieDefaults.lastAccessed; - this.sameSite = options.sameSite ?? cookieDefaults.sameSite; - this.creation = options.creation ?? new Date; - Object.defineProperty(this, "creationIndex", { - configurable: false, - enumerable: false, - writable: true, - value: ++Cookie.cookiesCreated - }); - this.creationIndex = Cookie.cookiesCreated; - } - [Symbol.for("nodejs.util.inspect.custom")]() { - const now = Date.now(); - const hostOnly = this.hostOnly != null ? this.hostOnly.toString() : "?"; - const createAge = this.creation && this.creation !== "Infinity" ? `${String(now - this.creation.getTime())}ms` : "?"; - const accessAge = this.lastAccessed && this.lastAccessed !== "Infinity" ? `${String(now - this.lastAccessed.getTime())}ms` : "?"; - return `Cookie="${this.toString()}; hostOnly=${hostOnly}; aAge=${accessAge}; cAge=${createAge}"`; - } - toJSON() { - const obj = {}; - for (const prop of Cookie.serializableProperties) { - const val = this[prop]; - if (val === cookieDefaults[prop]) { - continue; - } - switch (prop) { - case "key": - case "value": - case "sameSite": - if (typeof val === "string") { - obj[prop] = val; - } - break; - case "expires": - case "creation": - case "lastAccessed": - if (typeof val === "number" || typeof val === "string" || val instanceof Date) { - obj[prop] = val == "Infinity" ? "Infinity" : new Date(val).toISOString(); - } else if (val === null) { - obj[prop] = null; - } - break; - case "maxAge": - if (typeof val === "number" || val === "Infinity" || val === "-Infinity") { - obj[prop] = val; - } - break; - case "domain": - case "path": - if (typeof val === "string" || val === null) { - obj[prop] = val; - } - break; - case "secure": - case "httpOnly": - if (typeof val === "boolean") { - obj[prop] = val; - } - break; - case "extensions": - if (Array.isArray(val)) { - obj[prop] = val; - } - break; - case "hostOnly": - case "pathIsDefault": - if (typeof val === "boolean" || val === null) { - obj[prop] = val; - } - break; - } - } - return obj; - } - clone() { - return fromJSON(this.toJSON()); - } - validate() { - if (!this.value || !COOKIE_OCTETS.test(this.value)) { - return false; - } - if (this.expires != "Infinity" && !(this.expires instanceof Date) && !(0, parseDate_1.parseDate)(this.expires)) { - return false; - } - if (this.maxAge != null && this.maxAge !== "Infinity" && (this.maxAge === "-Infinity" || this.maxAge <= 0)) { - return false; - } - if (this.path != null && !PATH_VALUE.test(this.path)) { - return false; - } - const cdomain = this.cdomain(); - if (cdomain) { - if (cdomain.match(/\.$/)) { - return false; - } - const suffix = (0, getPublicSuffix_1.getPublicSuffix)(cdomain); - if (suffix == null) { - return false; - } - } - return true; - } - setExpires(exp) { - if (exp instanceof Date) { - this.expires = exp; - } else { - this.expires = (0, parseDate_1.parseDate)(exp) || "Infinity"; - } - } - setMaxAge(age) { - if (age === Infinity) { - this.maxAge = "Infinity"; - } else if (age === -Infinity) { - this.maxAge = "-Infinity"; - } else { - this.maxAge = age; - } - } - cookieString() { - const val = this.value || ""; - if (this.key) { - return `${this.key}=${val}`; - } - return val; - } - toString() { - let str = this.cookieString(); - if (this.expires != "Infinity") { - if (this.expires instanceof Date) { - str += `; Expires=${(0, formatDate_1.formatDate)(this.expires)}`; - } - } - if (this.maxAge != null && this.maxAge != Infinity) { - str += `; Max-Age=${String(this.maxAge)}`; - } - if (this.domain && !this.hostOnly) { - str += `; Domain=${this.domain}`; - } - if (this.path) { - str += `; Path=${this.path}`; - } - if (this.secure) { - str += "; Secure"; - } - if (this.httpOnly) { - str += "; HttpOnly"; - } - if (this.sameSite && this.sameSite !== "none") { - if (this.sameSite.toLowerCase() === Cookie.sameSiteCanonical.lax.toLowerCase()) { - str += `; SameSite=${Cookie.sameSiteCanonical.lax}`; - } else if (this.sameSite.toLowerCase() === Cookie.sameSiteCanonical.strict.toLowerCase()) { - str += `; SameSite=${Cookie.sameSiteCanonical.strict}`; - } else { - str += `; SameSite=${this.sameSite}`; - } - } - if (this.extensions) { - this.extensions.forEach((ext) => { - str += `; ${ext}`; - }); - } - return str; - } - TTL(now = Date.now()) { - if (this.maxAge != null && typeof this.maxAge === "number") { - return this.maxAge <= 0 ? 0 : this.maxAge * 1000; - } - const expires = this.expires; - if (expires === "Infinity") { - return Infinity; - } - return (expires?.getTime() ?? now) - (now || Date.now()); - } - expiryTime(now) { - if (this.maxAge != null) { - const relativeTo = now || this.lastAccessed || new Date; - const maxAge = typeof this.maxAge === "number" ? this.maxAge : -Infinity; - const age = maxAge <= 0 ? -Infinity : maxAge * 1000; - if (relativeTo === "Infinity") { - return Infinity; - } - return relativeTo.getTime() + age; - } - if (this.expires == "Infinity") { - return Infinity; - } - return this.expires ? this.expires.getTime() : undefined; - } - expiryDate(now) { - const millisec = this.expiryTime(now); - if (millisec == Infinity) { - return new Date(2147483647000); - } else if (millisec == -Infinity) { - return new Date(0); - } else { - return millisec == undefined ? undefined : new Date(millisec); - } - } - isPersistent() { - return this.maxAge != null || this.expires != "Infinity"; - } - canonicalizedDomain() { - return (0, canonicalDomain_1.canonicalDomain)(this.domain); - } - cdomain() { - return (0, canonicalDomain_1.canonicalDomain)(this.domain); - } - static parse(str, options) { - return parse(str, options); - } - static fromJSON(str) { - return fromJSON(str); - } - } - exports.Cookie = Cookie; - Cookie.cookiesCreated = 0; - Cookie.sameSiteLevel = { - strict: 3, - lax: 2, - none: 1 - }; - Cookie.sameSiteCanonical = { - strict: "Strict", - lax: "Lax" - }; - Cookie.serializableProperties = [ - "key", - "value", - "expires", - "maxAge", - "domain", - "path", - "secure", - "httpOnly", - "extensions", - "hostOnly", - "pathIsDefault", - "creation", - "lastAccessed", - "sameSite" - ]; -}); - -// node_modules/tough-cookie/dist/cookie/cookieCompare.js -var require_cookieCompare = __commonJS((exports) => { - function cookieCompare(a, b) { - let cmp; - const aPathLen = a.path ? a.path.length : 0; - const bPathLen = b.path ? b.path.length : 0; - cmp = bPathLen - aPathLen; - if (cmp !== 0) { - return cmp; - } - const aTime = a.creation && a.creation instanceof Date ? a.creation.getTime() : MAX_TIME; - const bTime = b.creation && b.creation instanceof Date ? b.creation.getTime() : MAX_TIME; - cmp = aTime - bTime; - if (cmp !== 0) { - return cmp; - } - cmp = (a.creationIndex || 0) - (b.creationIndex || 0); - return cmp; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.cookieCompare = cookieCompare; - var MAX_TIME = 2147483647000; -}); - -// node_modules/tough-cookie/dist/cookie/defaultPath.js -var require_defaultPath = __commonJS((exports) => { - function defaultPath(path) { - if (!path || path.slice(0, 1) !== "/") { - return "/"; - } - if (path === "/") { - return path; - } - const rightSlash = path.lastIndexOf("/"); - if (rightSlash === 0) { - return "/"; - } - return path.slice(0, rightSlash); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.defaultPath = defaultPath; -}); - -// node_modules/tough-cookie/dist/cookie/domainMatch.js -var require_domainMatch = __commonJS((exports) => { - function domainMatch(domain, cookieDomain, canonicalize) { - if (domain == null || cookieDomain == null) { - return; - } - let _str; - let _domStr; - if (canonicalize !== false) { - _str = (0, canonicalDomain_1.canonicalDomain)(domain); - _domStr = (0, canonicalDomain_1.canonicalDomain)(cookieDomain); - } else { - _str = domain; - _domStr = cookieDomain; - } - if (_str == null || _domStr == null) { - return; - } - if (_str == _domStr) { - return true; - } - const idx = _str.lastIndexOf(_domStr); - if (idx <= 0) { - return false; - } - if (_str.length !== _domStr.length + idx) { - return false; - } - if (_str.substring(idx - 1, idx) !== ".") { - return false; - } - return !IP_REGEX_LOWERCASE.test(_str); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.domainMatch = domainMatch; - var canonicalDomain_1 = require_canonicalDomain(); - var IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/; -}); - -// node_modules/tough-cookie/dist/cookie/cookieJar.js -var require_cookieJar = __commonJS((exports) => { - function getCookieContext(url) { - if (url && typeof url === "object" && "hostname" in url && typeof url.hostname === "string" && "pathname" in url && typeof url.pathname === "string" && "protocol" in url && typeof url.protocol === "string") { - return { - hostname: url.hostname, - pathname: url.pathname, - protocol: url.protocol - }; - } else if (typeof url === "string") { - try { - return new URL(decodeURI(url)); - } catch { - return new URL(url); - } - } else { - throw new validators_1.ParameterError("`url` argument is not a string or URL."); - } - } - function checkSameSiteContext(value) { - const context = String(value).toLowerCase(); - if (context === "none" || context === "lax" || context === "strict") { - return context; - } else { - return; - } - } - function isSecurePrefixConditionMet(cookie) { - const startsWithSecurePrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Secure-"); - return !startsWithSecurePrefix || cookie.secure; - } - function isHostPrefixConditionMet(cookie) { - const startsWithHostPrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Host-"); - return !startsWithHostPrefix || Boolean(cookie.secure && cookie.hostOnly && cookie.path != null && cookie.path === "/"); - } - function getNormalizedPrefixSecurity(prefixSecurity) { - const normalizedPrefixSecurity = prefixSecurity.toLowerCase(); - switch (normalizedPrefixSecurity) { - case constants_1.PrefixSecurityEnum.STRICT: - case constants_1.PrefixSecurityEnum.SILENT: - case constants_1.PrefixSecurityEnum.DISABLED: - return normalizedPrefixSecurity; - default: - return constants_1.PrefixSecurityEnum.SILENT; - } - } - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) - __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CookieJar = undefined; - var getPublicSuffix_1 = require_getPublicSuffix(); - var validators = __importStar(require_validators()); - var validators_1 = require_validators(); - var store_1 = require_store(); - var memstore_1 = require_memstore(); - var pathMatch_1 = require_pathMatch(); - var cookie_1 = require_cookie(); - var utils_1 = require_utils(); - var canonicalDomain_1 = require_canonicalDomain(); - var constants_1 = require_constants(); - var defaultPath_1 = require_defaultPath(); - var domainMatch_1 = require_domainMatch(); - var cookieCompare_1 = require_cookieCompare(); - var version_1 = require_version(); - var defaultSetCookieOptions = { - loose: false, - sameSiteContext: undefined, - ignoreError: false, - http: true - }; - var defaultGetCookieOptions = { - http: true, - expire: true, - allPaths: false, - sameSiteContext: undefined, - sort: undefined - }; - var SAME_SITE_CONTEXT_VAL_ERR = 'Invalid sameSiteContext option for getCookies(); expected one of "strict", "lax", or "none"'; - - class CookieJar { - constructor(store, options) { - if (typeof options === "boolean") { - options = { rejectPublicSuffixes: options }; - } - this.rejectPublicSuffixes = options?.rejectPublicSuffixes ?? true; - this.enableLooseMode = options?.looseMode ?? false; - this.allowSpecialUseDomain = options?.allowSpecialUseDomain ?? true; - this.prefixSecurity = getNormalizedPrefixSecurity(options?.prefixSecurity ?? "silent"); - this.store = store ?? new memstore_1.MemoryCookieStore; - } - callSync(fn) { - if (!this.store.synchronous) { - throw new Error("CookieJar store is not synchronous; use async API instead."); - } - let syncErr = null; - let syncResult = undefined; - try { - fn.call(this, (error, result) => { - syncErr = error; - syncResult = result; - }); - } catch (err) { - syncErr = err; - } - if (syncErr) - throw syncErr; - return syncResult; - } - setCookie(cookie, url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const cb = promiseCallback.callback; - let context; - try { - if (typeof url === "string") { - validators.validate(validators.isNonEmptyString(url), callback, (0, utils_1.safeToString)(options)); - } - context = getCookieContext(url); - if (typeof url === "function") { - return promiseCallback.reject(new Error("No URL was specified")); - } - if (typeof options === "function") { - options = defaultSetCookieOptions; - } - validators.validate(typeof cb === "function", cb); - if (!validators.isNonEmptyString(cookie) && !validators.isObject(cookie) && cookie instanceof String && cookie.length == 0) { - return promiseCallback.resolve(undefined); - } - } catch (err) { - return promiseCallback.reject(err); - } - const host = (0, canonicalDomain_1.canonicalDomain)(context.hostname) ?? null; - const loose = options?.loose || this.enableLooseMode; - let sameSiteContext = null; - if (options?.sameSiteContext) { - sameSiteContext = checkSameSiteContext(options.sameSiteContext); - if (!sameSiteContext) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - } - if (typeof cookie === "string" || cookie instanceof String) { - const parsedCookie = cookie_1.Cookie.parse(cookie.toString(), { loose }); - if (!parsedCookie) { - const err = new Error("Cookie failed to parse"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - cookie = parsedCookie; - } else if (!(cookie instanceof cookie_1.Cookie)) { - const err = new Error("First argument to setCookie must be a Cookie object or string"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - const now = options?.now || new Date; - if (this.rejectPublicSuffixes && cookie.domain) { - try { - const cdomain = cookie.cdomain(); - const suffix = typeof cdomain === "string" ? (0, getPublicSuffix_1.getPublicSuffix)(cdomain, { - allowSpecialUseDomain: this.allowSpecialUseDomain, - ignoreError: options?.ignoreError - }) : null; - if (suffix == null && !constants_1.IP_V6_REGEX_OBJECT.test(cookie.domain)) { - const err = new Error("Cookie has domain set to a public suffix"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } catch (err) { - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } - if (cookie.domain) { - if (!(0, domainMatch_1.domainMatch)(host ?? undefined, cookie.cdomain() ?? undefined, false)) { - const err = new Error(`Cookie not in this host's domain. Cookie:${cookie.cdomain() ?? "null"} Request:${host ?? "null"}`); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - if (cookie.hostOnly == null) { - cookie.hostOnly = false; - } - } else { - cookie.hostOnly = true; - cookie.domain = host; - } - if (!cookie.path || cookie.path[0] !== "/") { - cookie.path = (0, defaultPath_1.defaultPath)(context.pathname); - cookie.pathIsDefault = true; - } - if (options?.http === false && cookie.httpOnly) { - const err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); - return options.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - if (cookie.sameSite !== "none" && cookie.sameSite !== undefined && sameSiteContext) { - if (sameSiteContext === "none") { - const err = new Error("Cookie is SameSite but this is a cross-origin request"); - return options?.ignoreError ? promiseCallback.resolve(undefined) : promiseCallback.reject(err); - } - } - const ignoreErrorForPrefixSecurity = this.prefixSecurity === constants_1.PrefixSecurityEnum.SILENT; - const prefixSecurityDisabled = this.prefixSecurity === constants_1.PrefixSecurityEnum.DISABLED; - if (!prefixSecurityDisabled) { - let errorFound = false; - let errorMsg; - if (!isSecurePrefixConditionMet(cookie)) { - errorFound = true; - errorMsg = "Cookie has __Secure prefix but Secure attribute is not set"; - } else if (!isHostPrefixConditionMet(cookie)) { - errorFound = true; - errorMsg = "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'"; - } - if (errorFound) { - return options?.ignoreError || ignoreErrorForPrefixSecurity ? promiseCallback.resolve(undefined) : promiseCallback.reject(new Error(errorMsg)); - } - } - const store = this.store; - if (!store.updateCookie) { - store.updateCookie = async function(_oldCookie, newCookie, cb2) { - return this.putCookie(newCookie).then(() => cb2?.(null), (error) => cb2?.(error)); - }; - } - const withCookie = function withCookie(err, oldCookie) { - if (err) { - cb(err); - return; - } - const next = function(err2) { - if (err2) { - cb(err2); - } else if (typeof cookie === "string") { - cb(null, undefined); - } else { - cb(null, cookie); - } - }; - if (oldCookie) { - if (options && "http" in options && options.http === false && oldCookie.httpOnly) { - err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); - if (options.ignoreError) - cb(null, undefined); - else - cb(err); - return; - } - if (cookie instanceof cookie_1.Cookie) { - cookie.creation = oldCookie.creation; - cookie.creationIndex = oldCookie.creationIndex; - cookie.lastAccessed = now; - store.updateCookie(oldCookie, cookie, next); - } - } else { - if (cookie instanceof cookie_1.Cookie) { - cookie.creation = cookie.lastAccessed = now; - store.putCookie(cookie, next); - } - } - }; - store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie); - return promiseCallback.promise; - } - setCookieSync(cookie, url, options) { - const setCookieFn = options ? this.setCookie.bind(this, cookie, url, options) : this.setCookie.bind(this, cookie, url); - return this.callSync(setCookieFn); - } - getCookies(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = defaultGetCookieOptions; - } else if (options === undefined) { - options = defaultGetCookieOptions; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const cb = promiseCallback.callback; - let context; - try { - if (typeof url === "string") { - validators.validate(validators.isNonEmptyString(url), cb, url); - } - context = getCookieContext(url); - validators.validate(validators.isObject(options), cb, (0, utils_1.safeToString)(options)); - validators.validate(typeof cb === "function", cb); - } catch (parameterError) { - return promiseCallback.reject(parameterError); - } - const host = (0, canonicalDomain_1.canonicalDomain)(context.hostname); - const path = context.pathname || "/"; - const secure = context.protocol && (context.protocol == "https:" || context.protocol == "wss:"); - let sameSiteLevel = 0; - if (options.sameSiteContext) { - const sameSiteContext = checkSameSiteContext(options.sameSiteContext); - if (sameSiteContext == null) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - sameSiteLevel = cookie_1.Cookie.sameSiteLevel[sameSiteContext]; - if (!sameSiteLevel) { - return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR)); - } - } - const http = options.http ?? true; - const now = Date.now(); - const expireCheck = options.expire ?? true; - const allPaths = options.allPaths ?? false; - const store = this.store; - function matchingCookie(c) { - if (c.hostOnly) { - if (c.domain != host) { - return false; - } - } else { - if (!(0, domainMatch_1.domainMatch)(host ?? undefined, c.domain ?? undefined, false)) { - return false; - } - } - if (!allPaths && typeof c.path === "string" && !(0, pathMatch_1.pathMatch)(path, c.path)) { - return false; - } - if (c.secure && !secure) { - return false; - } - if (c.httpOnly && !http) { - return false; - } - if (sameSiteLevel) { - let cookieLevel; - if (c.sameSite === "lax") { - cookieLevel = cookie_1.Cookie.sameSiteLevel.lax; - } else if (c.sameSite === "strict") { - cookieLevel = cookie_1.Cookie.sameSiteLevel.strict; - } else { - cookieLevel = cookie_1.Cookie.sameSiteLevel.none; - } - if (cookieLevel > sameSiteLevel) { - return false; - } - } - const expiryTime = c.expiryTime(); - if (expireCheck && expiryTime != null && expiryTime <= now) { - store.removeCookie(c.domain, c.path, c.key, () => { - }); - return false; - } - return true; - } - store.findCookies(host, allPaths ? null : path, this.allowSpecialUseDomain, (err, cookies) => { - if (err) { - cb(err); - return; - } - if (cookies == null) { - cb(null, []); - return; - } - cookies = cookies.filter(matchingCookie); - if ("sort" in options && options.sort !== false) { - cookies = cookies.sort(cookieCompare_1.cookieCompare); - } - const now2 = new Date; - for (const cookie of cookies) { - cookie.lastAccessed = now2; - } - cb(null, cookies); - }); - return promiseCallback.promise; - } - getCookiesSync(url, options) { - return this.callSync(this.getCookies.bind(this, url, options)) ?? []; - } - getCookieString(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const next = function(err, cookies) { - if (err) { - promiseCallback.callback(err); - } else { - promiseCallback.callback(null, cookies?.sort(cookieCompare_1.cookieCompare).map((c) => c.cookieString()).join("; ")); - } - }; - this.getCookies(url, options, next); - return promiseCallback.promise; - } - getCookieStringSync(url, options) { - return this.callSync(options ? this.getCookieString.bind(this, url, options) : this.getCookieString.bind(this, url)) ?? ""; - } - getSetCookieStrings(url, options, callback) { - if (typeof options === "function") { - callback = options; - options = undefined; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const next = function(err, cookies) { - if (err) { - promiseCallback.callback(err); - } else { - promiseCallback.callback(null, cookies?.map((c) => { - return c.toString(); - })); - } - }; - this.getCookies(url, options, next); - return promiseCallback.promise; - } - getSetCookieStringsSync(url, options = {}) { - return this.callSync(this.getSetCookieStrings.bind(this, url, options)) ?? []; - } - serialize(callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - let type = this.store.constructor.name; - if (validators.isObject(type)) { - type = null; - } - const serialized = { - version: `tough-cookie@${version_1.version}`, - storeType: type, - rejectPublicSuffixes: this.rejectPublicSuffixes, - enableLooseMode: this.enableLooseMode, - allowSpecialUseDomain: this.allowSpecialUseDomain, - prefixSecurity: getNormalizedPrefixSecurity(this.prefixSecurity), - cookies: [] - }; - if (typeof this.store.getAllCookies !== "function") { - return promiseCallback.reject(new Error("store does not support getAllCookies and cannot be serialized")); - } - this.store.getAllCookies((err, cookies) => { - if (err) { - promiseCallback.callback(err); - return; - } - if (cookies == null) { - promiseCallback.callback(null, serialized); - return; - } - serialized.cookies = cookies.map((cookie) => { - const serializedCookie = cookie.toJSON(); - delete serializedCookie.creationIndex; - return serializedCookie; - }); - promiseCallback.callback(null, serialized); - }); - return promiseCallback.promise; - } - serializeSync() { - return this.callSync((callback) => { - this.serialize(callback); - }); - } - toJSON() { - return this.serializeSync(); - } - _importCookies(serialized, callback) { - let cookies = undefined; - if (serialized && typeof serialized === "object" && (0, utils_1.inOperator)("cookies", serialized) && Array.isArray(serialized.cookies)) { - cookies = serialized.cookies; - } - if (!cookies) { - callback(new Error("serialized jar has no cookies array"), undefined); - return; - } - cookies = cookies.slice(); - const putNext = (err) => { - if (err) { - callback(err, undefined); - return; - } - if (Array.isArray(cookies)) { - if (!cookies.length) { - callback(err, this); - return; - } - let cookie; - try { - cookie = cookie_1.Cookie.fromJSON(cookies.shift()); - } catch (e) { - callback(e instanceof Error ? e : new Error, undefined); - return; - } - if (cookie === undefined) { - putNext(null); - return; - } - this.store.putCookie(cookie, putNext); - } - }; - putNext(null); - } - _importCookiesSync(serialized) { - this.callSync(this._importCookies.bind(this, serialized)); - } - clone(newStore, callback) { - if (typeof newStore === "function") { - callback = newStore; - newStore = undefined; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const cb = promiseCallback.callback; - this.serialize((err, serialized) => { - if (err) { - return promiseCallback.reject(err); - } - return CookieJar.deserialize(serialized ?? "", newStore, cb); - }); - return promiseCallback.promise; - } - _cloneSync(newStore) { - const cloneFn = newStore && typeof newStore !== "function" ? this.clone.bind(this, newStore) : this.clone.bind(this); - return this.callSync((callback) => { - cloneFn(callback); - }); - } - cloneSync(newStore) { - if (!newStore) { - return this._cloneSync(); - } - if (!newStore.synchronous) { - throw new Error("CookieJar clone destination store is not synchronous; use async API instead."); - } - return this._cloneSync(newStore); - } - removeAllCookies(callback) { - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - const cb = promiseCallback.callback; - const store = this.store; - if (typeof store.removeAllCookies === "function" && store.removeAllCookies !== store_1.Store.prototype.removeAllCookies) { - store.removeAllCookies(cb); - return promiseCallback.promise; - } - store.getAllCookies((err, cookies) => { - if (err) { - cb(err); - return; - } - if (!cookies) { - cookies = []; - } - if (cookies.length === 0) { - cb(null, undefined); - return; - } - let completedCount = 0; - const removeErrors = []; - const removeCookieCb = function removeCookieCb(removeErr) { - if (removeErr) { - removeErrors.push(removeErr); - } - completedCount++; - if (completedCount === cookies.length) { - if (removeErrors[0]) - cb(removeErrors[0]); - else - cb(null, undefined); - return; - } - }; - cookies.forEach((cookie) => { - store.removeCookie(cookie.domain, cookie.path, cookie.key, removeCookieCb); - }); - }); - return promiseCallback.promise; - } - removeAllCookiesSync() { - this.callSync((callback) => { - this.removeAllCookies(callback); - }); - } - static deserialize(strOrObj, store, callback) { - if (typeof store === "function") { - callback = store; - store = undefined; - } - const promiseCallback = (0, utils_1.createPromiseCallback)(callback); - let serialized; - if (typeof strOrObj === "string") { - try { - serialized = JSON.parse(strOrObj); - } catch (e) { - return promiseCallback.reject(e instanceof Error ? e : new Error); - } - } else { - serialized = strOrObj; - } - const readSerializedProperty = (property) => { - return serialized && typeof serialized === "object" && (0, utils_1.inOperator)(property, serialized) ? serialized[property] : undefined; - }; - const readSerializedBoolean = (property) => { - const value = readSerializedProperty(property); - return typeof value === "boolean" ? value : undefined; - }; - const readSerializedString = (property) => { - const value = readSerializedProperty(property); - return typeof value === "string" ? value : undefined; - }; - const jar = new CookieJar(store, { - rejectPublicSuffixes: readSerializedBoolean("rejectPublicSuffixes"), - looseMode: readSerializedBoolean("enableLooseMode"), - allowSpecialUseDomain: readSerializedBoolean("allowSpecialUseDomain"), - prefixSecurity: getNormalizedPrefixSecurity(readSerializedString("prefixSecurity") ?? "silent") - }); - jar._importCookies(serialized, (err) => { - if (err) { - promiseCallback.callback(err); - return; - } - promiseCallback.callback(null, jar); - }); - return promiseCallback.promise; - } - static deserializeSync(strOrObj, store) { - const serialized = typeof strOrObj === "string" ? JSON.parse(strOrObj) : strOrObj; - const readSerializedProperty = (property) => { - return serialized && typeof serialized === "object" && (0, utils_1.inOperator)(property, serialized) ? serialized[property] : undefined; - }; - const readSerializedBoolean = (property) => { - const value = readSerializedProperty(property); - return typeof value === "boolean" ? value : undefined; - }; - const readSerializedString = (property) => { - const value = readSerializedProperty(property); - return typeof value === "string" ? value : undefined; - }; - const jar = new CookieJar(store, { - rejectPublicSuffixes: readSerializedBoolean("rejectPublicSuffixes"), - looseMode: readSerializedBoolean("enableLooseMode"), - allowSpecialUseDomain: readSerializedBoolean("allowSpecialUseDomain"), - prefixSecurity: getNormalizedPrefixSecurity(readSerializedString("prefixSecurity") ?? "silent") - }); - if (!jar.store.synchronous) { - throw new Error("CookieJar store is not synchronous; use async API instead."); - } - jar._importCookiesSync(serialized); - return jar; - } - static fromJSON(jsonString, store) { - return CookieJar.deserializeSync(jsonString, store); - } - } - exports.CookieJar = CookieJar; -}); - -// node_modules/tough-cookie/dist/cookie/permutePath.js -var require_permutePath = __commonJS((exports) => { - function permutePath(path) { - if (path === "/") { - return ["/"]; - } - const permutations = [path]; - while (path.length > 1) { - const lindex = path.lastIndexOf("/"); - if (lindex === 0) { - break; - } - path = path.slice(0, lindex); - permutations.push(path); - } - permutations.push("/"); - return permutations; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.permutePath = permutePath; -}); - -// node_modules/tough-cookie/dist/cookie/index.js -var require_cookie2 = __commonJS((exports) => { - function parse(str, options) { - return cookie_2.Cookie.parse(str, options); - } - function fromJSON(str) { - return cookie_2.Cookie.fromJSON(str); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.permutePath = exports.parseDate = exports.formatDate = exports.domainMatch = exports.defaultPath = exports.CookieJar = exports.cookieCompare = exports.Cookie = exports.PrefixSecurityEnum = exports.canonicalDomain = exports.version = exports.ParameterError = exports.Store = exports.getPublicSuffix = exports.permuteDomain = exports.pathMatch = exports.MemoryCookieStore = undefined; - exports.parse = parse; - exports.fromJSON = fromJSON; - var memstore_1 = require_memstore(); - Object.defineProperty(exports, "MemoryCookieStore", { enumerable: true, get: function() { - return memstore_1.MemoryCookieStore; - } }); - var pathMatch_1 = require_pathMatch(); - Object.defineProperty(exports, "pathMatch", { enumerable: true, get: function() { - return pathMatch_1.pathMatch; - } }); - var permuteDomain_1 = require_permuteDomain(); - Object.defineProperty(exports, "permuteDomain", { enumerable: true, get: function() { - return permuteDomain_1.permuteDomain; - } }); - var getPublicSuffix_1 = require_getPublicSuffix(); - Object.defineProperty(exports, "getPublicSuffix", { enumerable: true, get: function() { - return getPublicSuffix_1.getPublicSuffix; - } }); - var store_1 = require_store(); - Object.defineProperty(exports, "Store", { enumerable: true, get: function() { - return store_1.Store; - } }); - var validators_1 = require_validators(); - Object.defineProperty(exports, "ParameterError", { enumerable: true, get: function() { - return validators_1.ParameterError; - } }); - var version_1 = require_version(); - Object.defineProperty(exports, "version", { enumerable: true, get: function() { - return version_1.version; - } }); - var canonicalDomain_1 = require_canonicalDomain(); - Object.defineProperty(exports, "canonicalDomain", { enumerable: true, get: function() { - return canonicalDomain_1.canonicalDomain; - } }); - var constants_1 = require_constants(); - Object.defineProperty(exports, "PrefixSecurityEnum", { enumerable: true, get: function() { - return constants_1.PrefixSecurityEnum; - } }); - var cookie_1 = require_cookie(); - Object.defineProperty(exports, "Cookie", { enumerable: true, get: function() { - return cookie_1.Cookie; - } }); - var cookieCompare_1 = require_cookieCompare(); - Object.defineProperty(exports, "cookieCompare", { enumerable: true, get: function() { - return cookieCompare_1.cookieCompare; - } }); - var cookieJar_1 = require_cookieJar(); - Object.defineProperty(exports, "CookieJar", { enumerable: true, get: function() { - return cookieJar_1.CookieJar; - } }); - var defaultPath_1 = require_defaultPath(); - Object.defineProperty(exports, "defaultPath", { enumerable: true, get: function() { - return defaultPath_1.defaultPath; - } }); - var domainMatch_1 = require_domainMatch(); - Object.defineProperty(exports, "domainMatch", { enumerable: true, get: function() { - return domainMatch_1.domainMatch; - } }); - var formatDate_1 = require_formatDate(); - Object.defineProperty(exports, "formatDate", { enumerable: true, get: function() { - return formatDate_1.formatDate; - } }); - var parseDate_1 = require_parseDate(); - Object.defineProperty(exports, "parseDate", { enumerable: true, get: function() { - return parseDate_1.parseDate; - } }); - var permutePath_1 = require_permutePath(); - Object.defineProperty(exports, "permutePath", { enumerable: true, get: function() { - return permutePath_1.permutePath; - } }); - var cookie_2 = require_cookie(); -}); - -// node_modules/discord.js-selfbot-v13/src/errors/DJSError.js -var require_DJSError = __commonJS((exports, module) => { - function makeDiscordjsError(Base) { - return class DiscordjsError extends Base { - constructor(key, ...args) { - super(message(key, args)); - this[kCode] = key; - if (Error.captureStackTrace) - Error.captureStackTrace(this, DiscordjsError); - } - get name() { - return `${super.name} [${this[kCode]}]`; - } - get code() { - return this[kCode]; - } - }; - } - function message(key, args) { - if (typeof key !== "string") - throw new Error("Error message key must be a string"); - const msg = messages.get(key); - if (!msg) - throw new Error(`An invalid error message key was used: ${key}.`); - if (typeof msg === "function") - return msg(...args); - if (!args?.length) - return msg; - args.unshift(msg); - return String(...args); - } - function register(sym, val) { - messages.set(sym, typeof val === "function" ? val : String(val)); - } - var kCode = Symbol("code"); - var messages = new Map; - module.exports = { - register, - Error: makeDiscordjsError(Error), - TypeError: makeDiscordjsError(TypeError), - RangeError: makeDiscordjsError(RangeError) - }; -}); - -// node_modules/discord.js-selfbot-v13/src/errors/Messages.js -var require_Messages = __commonJS(() => { - var { register } = require_DJSError(); - var Messages = { - CLIENT_INVALID_OPTION: (prop, must) => `The ${prop} option must be ${must}`, - CLIENT_INVALID_PROVIDED_SHARDS: "None of the provided shards were valid.", - CLIENT_MISSING_INTENTS: "Valid intents must be provided for the Client.", - CLIENT_NOT_READY: (action) => `The client needs to be logged in to ${action}.`, - TOKEN_INVALID: "An invalid token was provided.", - TOKEN_MISSING: "Request to use token, but token was unavailable to the client.", - TOTPKEY_MISSING: "Request to use mfa, but TOTPKey was not set in client options.", - WS_CLOSE_REQUESTED: "WebSocket closed due to user request.", - WS_CONNECTION_EXISTS: "There is already an existing WebSocket connection.", - WS_NOT_OPEN: (data = "data") => `WebSocket not open to send ${data}`, - MANAGER_DESTROYED: "Manager was destroyed.", - BITFIELD_INVALID: (bit) => `Invalid bitfield flag or number: ${bit}.`, - SHARDING_INVALID: "[Bot Token] Invalid shard settings were provided.", - SHARDING_REQUIRED: "[Bot Token] This session would have handled too many guilds - Sharding is required.", - INVALID_INTENTS: "[Bot Token] Invalid intent provided for WebSocket intents.", - DISALLOWED_INTENTS: "[Bot Token] Privileged intent provided is not enabled or whitelisted.", - SHARDING_NO_SHARDS: "No shards have been spawned.", - SHARDING_IN_PROCESS: "Shards are still being spawned.", - SHARDING_INVALID_EVAL_BROADCAST: "Script to evaluate must be a function", - SHARDING_SHARD_NOT_FOUND: (id) => `Shard ${id} could not be found.`, - SHARDING_ALREADY_SPAWNED: (count) => `Already spawned ${count} shards.`, - SHARDING_PROCESS_EXISTS: (id) => `Shard ${id} already has an active process.`, - SHARDING_WORKER_EXISTS: (id) => `Shard ${id} already has an active worker.`, - SHARDING_READY_TIMEOUT: (id) => `Shard ${id}'s Client took too long to become ready.`, - SHARDING_READY_DISCONNECTED: (id) => `Shard ${id}'s Client disconnected before becoming ready.`, - SHARDING_READY_DIED: (id) => `Shard ${id}'s process exited before its Client became ready.`, - SHARDING_NO_CHILD_EXISTS: (id) => `Shard ${id} has no active process or worker.`, - SHARDING_SHARD_MISCALCULATION: (shard, guild, count) => `Calculated invalid shard ${shard} for guild ${guild} with ${count} shards.`, - COLOR_RANGE: "Color must be within the range 0 - 16777215 (0xFFFFFF).", - COLOR_CONVERT: "Unable to convert color to a number.", - INVITE_OPTIONS_MISSING_CHANNEL: "A valid guild channel must be provided when GuildScheduledEvent is EXTERNAL.", - EMBED_TITLE: "MessageEmbed title must be a string.", - EMBED_FIELD_NAME: "MessageEmbed field names must be non-empty strings.", - EMBED_FIELD_VALUE: "MessageEmbed field values must be non-empty strings.", - EMBED_FOOTER_TEXT: "MessageEmbed footer text must be a string.", - EMBED_DESCRIPTION: "MessageEmbed description must be a string.", - EMBED_AUTHOR_NAME: "MessageEmbed author name must be a string.", - BUTTON_LABEL: "MessageButton label must be a string", - BUTTON_URL: "MessageButton URL must be a string", - BUTTON_CUSTOM_ID: "MessageButton customId must be a string", - SELECT_MENU_CUSTOM_ID: "MessageSelectMenu customId must be a string", - SELECT_MENU_PLACEHOLDER: "MessageSelectMenu placeholder must be a string", - SELECT_OPTION_LABEL: "MessageSelectOption label must be a string", - SELECT_OPTION_VALUE: "MessageSelectOption value must be a string", - SELECT_OPTION_DESCRIPTION: "MessageSelectOption description must be a string", - TEXT_INPUT_CUSTOM_ID: "TextInputComponent customId must be a string", - TEXT_INPUT_LABEL: "TextInputComponent label must be a string", - TEXT_INPUT_PLACEHOLDER: "TextInputComponent placeholder must be a string", - TEXT_INPUT_VALUE: "TextInputComponent value must be a string", - MODAL_CUSTOM_ID: "Modal customId must be a string", - MODAL_TITLE: "Modal title must be a string", - INTERACTION_COLLECTOR_ERROR: (reason) => `Collector received no interactions before ending with reason: ${reason}`, - FILE_NOT_FOUND: (file) => `File could not be found: ${file}`, - USER_BANNER_NOT_FETCHED: "You must fetch this user's banner before trying to generate its URL!", - USER_NO_DM_CHANNEL: "No DM Channel exists!", - VOICE_NOT_STAGE_CHANNEL: "You are only allowed to do this in stage channels.", - VOICE_STATE_NOT_OWN: "You cannot self-deafen/mute/request to speak on VoiceStates that do not belong to the ClientUser.", - VOICE_STATE_INVALID_TYPE: (name) => `${name} must be a boolean.`, - REQ_RESOURCE_TYPE: "The resource must be a string, Buffer or a valid file stream.", - IMAGE_FORMAT: (format) => `Invalid image format: ${format}`, - IMAGE_SIZE: (size) => `Invalid image size: ${size}`, - MESSAGE_BULK_DELETE_TYPE: "The messages must be an Array, Collection, or number.", - MESSAGE_NONCE_TYPE: "Message nonce must be an integer or a string.", - MESSAGE_CONTENT_TYPE: "Message content must be a non-empty string.", - SPLIT_MAX_LEN: "Chunk exceeds the max length and contains no split characters.", - BAN_RESOLVE_ID: (ban = false) => `Couldn't resolve the user id to ${ban ? "ban" : "unban"}.`, - FETCH_BAN_RESOLVE_ID: "Couldn't resolve the user id to fetch the ban.", - PRUNE_DAYS_TYPE: "Days must be a number", - GUILD_CHANNEL_RESOLVE: "Could not resolve channel to a guild channel.", - GUILD_VOICE_CHANNEL_RESOLVE: "Could not resolve channel to a guild voice channel.", - GUILD_CHANNEL_ORPHAN: "Could not find a parent to this guild channel.", - GUILD_CHANNEL_UNOWNED: "The fetched channel does not belong to this manager's guild.", - GUILD_OWNED: "Guild is owned by the client.", - GUILD_MEMBERS_TIMEOUT: "Members didn't arrive in time.", - GUILD_UNCACHED_ME: "The client user as a member of this guild is uncached.", - CHANNEL_NOT_CACHED: "Could not find the channel where this message came from in the cache!", - STAGE_CHANNEL_RESOLVE: "Could not resolve channel to a stage channel.", - GUILD_SCHEDULED_EVENT_RESOLVE: "Could not resolve the guild scheduled event.", - INVALID_TYPE: (name, expected, an = false) => `Supplied ${name} is not a${an ? "n" : ""} ${expected}.`, - INVALID_ELEMENT: (type, name, elem) => `Supplied ${type} ${name} includes an invalid element: ${elem}`, - MESSAGE_THREAD_PARENT: "The message was not sent in a guild text or news channel", - MESSAGE_EXISTING_THREAD: "The message already has a thread", - THREAD_INVITABLE_TYPE: (type) => `Invitable cannot be edited on ${type}`, - WEBHOOK_MESSAGE: "The message was not sent by a webhook.", - WEBHOOK_TOKEN_UNAVAILABLE: "This action requires a webhook token, but none is available.", - WEBHOOK_URL_INVALID: "The provided webhook URL is not valid.", - WEBHOOK_APPLICATION: "This message webhook belongs to an application and cannot be fetched.", - MESSAGE_REFERENCE_MISSING: "The message does not reference another message", - EMOJI_TYPE: "Emoji must be a string or GuildEmoji/ReactionEmoji", - EMOJI_MANAGED: "Emoji is managed and has no Author.", - MISSING_MANAGE_EMOJIS_AND_STICKERS_PERMISSION: (guild) => `Client must have Manage Emojis and Stickers permission in guild ${guild} to see emoji authors.`, - NOT_GUILD_STICKER: "Sticker is a standard (non-guild) sticker and has no author.", - REACTION_RESOLVE_USER: "Couldn't resolve the user id to remove from the reaction.", - VANITY_URL: "This guild does not have the VANITY_URL feature enabled.", - INVITE_RESOLVE_CODE: "Could not resolve the code to fetch the invite.", - INVITE_NOT_FOUND: "Could not find the requested invite.", - DELETE_GROUP_DM_CHANNEL: "Bots don't have access to Group DM Channels and cannot delete them", - FETCH_GROUP_DM_CHANNEL: "Bots don't have access to Group DM Channels and cannot fetch them", - MEMBER_FETCH_NONCE_LENGTH: "Nonce length must not exceed 32 characters.", - GLOBAL_COMMAND_PERMISSIONS: "Permissions for global commands may only be fetched or modified by providing a GuildResolvable " + "or from a guild's application command manager.", - GUILD_UNCACHED_ROLE_RESOLVE: "Cannot resolve roles from an arbitrary guild, provide an id instead", - INTERACTION_ALREADY_REPLIED: "The reply to this interaction has already been sent or deferred.", - INTERACTION_NOT_REPLIED: "The reply to this interaction has not been sent or deferred.", - COMMAND_INTERACTION_OPTION_NOT_FOUND: (name) => `Required option "${name}" not found.`, - COMMAND_INTERACTION_OPTION_TYPE: (name, type, expected) => `Option "${name}" is of type: ${type}; expected ${expected}.`, - COMMAND_INTERACTION_OPTION_EMPTY: (name, type) => `Required option "${name}" is of type: ${type}; expected a non-empty value.`, - COMMAND_INTERACTION_OPTION_NO_SUB_COMMAND: "No subcommand specified for interaction.", - COMMAND_INTERACTION_OPTION_NO_SUB_COMMAND_GROUP: "No subcommand group specified for interaction.", - AUTOCOMPLETE_INTERACTION_OPTION_NO_FOCUSED_OPTION: "No focused option for autocomplete interaction.", - MODAL_SUBMIT_INTERACTION_FIELD_NOT_FOUND: (customId) => `Required field with custom id "${customId}" not found.`, - MODAL_SUBMIT_INTERACTION_FIELD_TYPE: (customId, type, expected) => `Field with custom id "${customId}" is of type: ${type}; expected ${expected}.`, - INVITE_MISSING_SCOPES: "At least one valid scope must be provided for the invite", - NOT_IMPLEMENTED: (what, name) => `Method ${what} not implemented on ${name}.`, - SWEEP_FILTER_RETURN: "The return value of the sweepFilter function was not false or a Function", - GUILD_FORUM_MESSAGE_REQUIRED: "You must provide a message to create a guild forum thread", - INVALID_USER_API: "User accounts cannot use this endpoint", - INVALID_APPLICATION_COMMAND: (id) => `Could not find a valid command for this bot: ${id}`, - INVALID_COMMAND_NAME: (allCMD) => `Could not parse subGroupCommand and subCommand due to too long: ${allCMD.join(" ")}`, - INVALID_SLASH_COMMAND_CHOICES: (parentOptions, value) => `${value} is not a valid choice for this option (${parentOptions})`, - SLASH_COMMAND_REQUIRED_OPTIONS_MISSING: (req, opt) => `Value required (${req}) missing (Options: ${opt})`, - SLASH_COMMAND_SUB_COMMAND_GROUP_INVALID: (n) => `${n} is not a valid sub command group`, - SLASH_COMMAND_SUB_COMMAND_INVALID: (n) => `${n} is not a valid sub command`, - INTERACTION_FAILED: "No responsed from Application", - USER_NOT_STREAMING: "User is not streaming", - BULK_BAN_USERS_OPTION_EMPTY: 'Option "users" array or collection is empty', - VOICE_INVALID_HEARTBEAT: "Tried to set voice heartbeat but no valid interval was specified.", - VOICE_USER_MISSING: "Couldn't resolve the user to create stream.", - VOICE_JOIN_CHANNEL: (full = false) => `You do not have permission to join this voice channel${full ? "; it is full." : "."}`, - VOICE_CONNECTION_TIMEOUT: "Connection not established within 15 seconds.", - VOICE_TOKEN_ABSENT: "Token not provided from voice server packet.", - VOICE_SESSION_ABSENT: "Session ID not supplied.", - VOICE_INVALID_ENDPOINT: "Invalid endpoint received.", - VOICE_NO_BROWSER: "Voice connections are not available in browsers.", - VOICE_CONNECTION_ATTEMPTS_EXCEEDED: (attempts) => `Too many connection attempts (${attempts}).`, - VOICE_JOIN_SOCKET_CLOSED: "Tried to send join packet, but the WebSocket is not open.", - VOICE_PLAY_INTERFACE_NO_BROADCAST: "A broadcast cannot be played in this context.", - VOICE_PLAY_INTERFACE_BAD_TYPE: "Unknown stream type", - VOICE_PRISM_DEMUXERS_NEED_STREAM: "To play a webm/ogg stream, you need to pass a ReadableStream.", - VOICE_STATE_UNCACHED_MEMBER: "The member of this voice state is uncached.", - UDP_SEND_FAIL: "Tried to send a UDP packet, but there is no socket available.", - UDP_ADDRESS_MALFORMED: "Malformed UDP address or port.", - UDP_CONNECTION_EXISTS: "There is already an existing UDP connection.", - UDP_WRONG_HANDSHAKE: "Wrong handshake packet for UDP", - INVALID_VIDEO_CODEC: (codecs) => `Only these codecs are supported: ${codecs.join(", ")}`, - STREAM_CONNECTION_READONLY: "Cannot send data to a read-only stream", - STREAM_CANNOT_JOIN: "Cannot join a stream to itself", - VOICE_USER_NOT_STREAMING: "User is not streaming", - POLL_ALREADY_EXPIRED: "This poll has already expired.", - METHOD_WARNING: "This method is flagged as it may lead to a temporary or permanent account ban. Do not use until further notice." - }; - for (const [name, message] of Object.entries(Messages)) - register(name, message); -}); - -// node_modules/discord.js-selfbot-v13/src/errors/index.js -var require_errors = __commonJS((exports, module) => { - module.exports = require_DJSError(); - module.exports.Messages = require_Messages(); -}); - -// node_modules/discord.js-selfbot-v13/src/util/Constants.js -var require_Constants = __commonJS((exports) => { - function makeImageUrl(root, { format = "webp", size } = {}) { - if (!["undefined", "number"].includes(typeof size)) - throw new TypeError2("INVALID_TYPE", "size", "number"); - if (format && !AllowedImageFormats.includes(format)) - throw new Error2("IMAGE_FORMAT", format); - if (size && !AllowedImageSizes.includes(size)) - throw new RangeError2("IMAGE_SIZE", size); - return `${root}.${format}${size ? `?size=${size}` : ""}`; - } - function keyMirror(arr) { - let tmp = Object.create(null); - for (const value of arr) - tmp[value] = value; - return tmp; - } - function createEnum(keys) { - const obj = {}; - for (const [index, key] of keys.entries()) { - if (key === null) - continue; - obj[key] = index; - obj[index] = key; - } - return obj; - } - var { Error: Error2, RangeError: RangeError2, TypeError: TypeError2 } = require_errors(); - exports.MaxBulkDeletableMessageAge = 1209600000; - exports.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9210 Chrome/134.0.6998.205 Electron/35.3.0 Safari/537.36"; - exports.ciphers = [ - "TLS_AES_128_GCM_SHA256", - "TLS_AES_256_GCM_SHA384", - "TLS_CHACHA20_POLY1305_SHA256", - "ECDHE-ECDSA-AES128-GCM-SHA256", - "ECDHE-RSA-AES128-GCM-SHA256", - "ECDHE-ECDSA-AES256-GCM-SHA384", - "ECDHE-RSA-AES256-GCM-SHA384", - "ECDHE-ECDSA-CHACHA20-POLY1305", - "ECDHE-RSA-CHACHA20-POLY1305", - "ECDHE-RSA-AES128-SHA", - "ECDHE-RSA-AES256-SHA", - "AES128-GCM-SHA256", - "AES256-GCM-SHA384", - "AES128-SHA", - "AES256-SHA" - ]; - exports.WSCodes = { - 1000: "WS_CLOSE_REQUESTED", - 1011: "INTERNAL_ERROR", - 4004: "TOKEN_INVALID", - 4010: "SHARDING_INVALID", - 4011: "SHARDING_REQUIRED", - 4013: "INVALID_INTENTS", - 4014: "DISALLOWED_INTENTS" - }; - var AllowedImageFormats = ["webp", "png", "jpg", "jpeg", "gif"]; - var AllowedImageSizes = [16, 32, 56, 64, 96, 128, 256, 300, 512, 600, 1024, 2048, 4096]; - exports.Endpoints = { - CDN(root) { - return { - Emoji: (emojiId, format = "webp") => `${root}/emojis/${emojiId}.${format}`, - Asset: (name) => `${root}/assets/${name}`, - DefaultAvatar: (index) => `${root}/embed/avatars/${index}.png`, - Avatar: (userId, hash, format, size, dynamic = false) => { - if (dynamic && hash.startsWith("a_")) - format = "gif"; - return makeImageUrl(`${root}/avatars/${userId}/${hash}`, { format, size }); - }, - AvatarDecoration: (hash) => makeImageUrl(`${root}/avatar-decoration-presets/${hash}`, { format: "png" }), - GuildTagBadge: (guildId, hash) => `${root}/guild-tag-badges/${guildId}/${hash}.png`, - GuildMemberAvatar: (guildId, memberId, hash, format = "webp", size, dynamic = false) => { - if (dynamic && hash.startsWith("a_")) - format = "gif"; - return makeImageUrl(`${root}/guilds/${guildId}/users/${memberId}/avatars/${hash}`, { format, size }); - }, - GuildMemberBanner: (guildId, memberId, hash, format = "webp", size, dynamic = false) => { - if (dynamic && hash.startsWith("a_")) - format = "gif"; - return makeImageUrl(`${root}/guilds/${guildId}/users/${memberId}/banners/${hash}`, { format, size }); - }, - Banner: (id, hash, format, size, dynamic = false) => { - if (dynamic && hash.startsWith("a_")) - format = "gif"; - return makeImageUrl(`${root}/banners/${id}/${hash}`, { format, size }); - }, - Icon: (guildId, hash, format, size, dynamic = false) => { - if (dynamic && hash.startsWith("a_")) - format = "gif"; - return makeImageUrl(`${root}/icons/${guildId}/${hash}`, { format, size }); - }, - AppIcon: (appId, hash, options) => makeImageUrl(`${root}/app-icons/${appId}/${hash}`, options), - AppAsset: (appId, hash, options) => makeImageUrl(`${root}/app-assets/${appId}/${hash}`, options), - StickerPackBanner: (bannerId, format, size) => makeImageUrl(`${root}/app-assets/710982414301790216/store/${bannerId}`, { size, format }), - GDMIcon: (channelId, hash, format, size) => makeImageUrl(`${root}/channel-icons/${channelId}/${hash}`, { size, format }), - Splash: (guildId, hash, format, size) => makeImageUrl(`${root}/splashes/${guildId}/${hash}`, { size, format }), - DiscoverySplash: (guildId, hash, format, size) => makeImageUrl(`${root}/discovery-splashes/${guildId}/${hash}`, { size, format }), - TeamIcon: (teamId, hash, options) => makeImageUrl(`${root}/team-icons/${teamId}/${hash}`, options), - Sticker: (stickerId, stickerFormat) => `${root}/stickers/${stickerId}.${stickerFormat === "LOTTIE" ? "json" : stickerFormat === "GIF" ? "gif" : "png"}`, - RoleIcon: (roleId, hash, format = "webp", size) => makeImageUrl(`${root}/role-icons/${roleId}/${hash}`, { size, format }), - GuildScheduledEventCover: (scheduledEventId, coverHash, format, size) => makeImageUrl(`${root}/guild-events/${scheduledEventId}/${coverHash}`, { size, format }) - }; - }, - invite: (root, code, eventId) => eventId ? `${root}/${code}?event=${eventId}` : `${root}/${code}`, - scheduledEvent: (root, guildId, eventId) => `${root}/${guildId}/${eventId}`, - botGateway: "/gateway" - }; - exports.Status = { - READY: 0, - CONNECTING: 1, - RECONNECTING: 2, - IDLE: 3, - NEARLY: 4, - DISCONNECTED: 5, - WAITING_FOR_GUILDS: 6, - IDENTIFYING: 7, - RESUMING: 8 - }; - exports.VoiceStatus = { - CONNECTED: 0, - CONNECTING: 1, - AUTHENTICATING: 2, - RECONNECTING: 3, - DISCONNECTED: 4 - }; - exports.Opcodes = { - DISPATCH: 0, - HEARTBEAT: 1, - IDENTIFY: 2, - STATUS_UPDATE: 3, - VOICE_STATE_UPDATE: 4, - VOICE_GUILD_PING: 5, - RESUME: 6, - RECONNECT: 7, - REQUEST_GUILD_MEMBERS: 8, - INVALID_SESSION: 9, - HELLO: 10, - HEARTBEAT_ACK: 11, - GUILD_SYNC: 12, - DM_UPDATE: 13, - GUILD_SUBSCRIPTIONS: 14, - LOBBY_CONNECT: 15, - LOBBY_DISCONNECT: 16, - LOBBY_VOICE_STATE_UPDATE: 17, - STREAM_CREATE: 18, - STREAM_DELETE: 19, - STREAM_WATCH: 20, - STREAM_PING: 21, - STREAM_SET_PAUSED: 22, - REQUEST_GUILD_APPLICATION_COMMANDS: 24, - EMBEDDED_ACTIVITY_LAUNCH: 25, - EMBEDDED_ACTIVITY_CLOSE: 26, - EMBEDDED_ACTIVITY_UPDATE: 27, - REQUEST_FORUM_UNREADS: 28, - REMOTE_COMMAND: 29, - GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH: 30, - REQUEST_SOUNDBOARD_SOUNDS: 31, - SPEED_TEST_CREATE: 32, - SPEED_TEST_DELETE: 33, - REQUEST_LAST_MESSAGES: 34, - SEARCH_RECENT_MEMBERS: 35, - REQUEST_CHANNEL_STATUSES: 36, - GUILD_SUBSCRIPTIONS_BULK: 37 - }; - exports.VoiceOpcodes = { - IDENTIFY: 0, - SELECT_PROTOCOL: 1, - READY: 2, - HEARTBEAT: 3, - SESSION_DESCRIPTION: 4, - SPEAKING: 5, - HEARTBEAT_ACK: 6, - RESUME: 7, - HELLO: 8, - RESUMED: 9, - SOURCES: 12, - CLIENT_DISCONNECT: 13, - SESSION_UPDATE: 14, - MEDIA_SINK_WANTS: 15, - VOICE_BACKEND_VERSION: 16, - CHANNEL_OPTIONS_UPDATE: 17 - }; - exports.Events = { - RATE_LIMIT: "rateLimit", - INVALID_REQUEST_WARNING: "invalidRequestWarning", - API_RESPONSE: "apiResponse", - API_REQUEST: "apiRequest", - CLIENT_READY: "ready", - APPLICATION_COMMAND_CREATE: "applicationCommandCreate", - APPLICATION_COMMAND_DELETE: "applicationCommandDelete", - APPLICATION_COMMAND_UPDATE: "applicationCommandUpdate", - APPLICATION_COMMAND_PERMISSIONS_UPDATE: "applicationCommandPermissionsUpdate", - AUTO_MODERATION_ACTION_EXECUTION: "autoModerationActionExecution", - AUTO_MODERATION_RULE_CREATE: "autoModerationRuleCreate", - AUTO_MODERATION_RULE_DELETE: "autoModerationRuleDelete", - AUTO_MODERATION_RULE_UPDATE: "autoModerationRuleUpdate", - GUILD_AVAILABLE: "guildAvailable", - GUILD_CREATE: "guildCreate", - GUILD_DELETE: "guildDelete", - GUILD_UPDATE: "guildUpdate", - GUILD_UNAVAILABLE: "guildUnavailable", - GUILD_MEMBER_ADD: "guildMemberAdd", - GUILD_MEMBER_REMOVE: "guildMemberRemove", - GUILD_MEMBER_UPDATE: "guildMemberUpdate", - GUILD_MEMBER_AVAILABLE: "guildMemberAvailable", - GUILD_MEMBERS_CHUNK: "guildMembersChunk", - GUILD_INTEGRATIONS_UPDATE: "guildIntegrationsUpdate", - GUILD_ROLE_CREATE: "roleCreate", - GUILD_ROLE_DELETE: "roleDelete", - INVITE_CREATE: "inviteCreate", - INVITE_DELETE: "inviteDelete", - GUILD_ROLE_UPDATE: "roleUpdate", - GUILD_EMOJI_CREATE: "emojiCreate", - GUILD_EMOJI_DELETE: "emojiDelete", - GUILD_EMOJI_UPDATE: "emojiUpdate", - GUILD_BAN_ADD: "guildBanAdd", - GUILD_BAN_REMOVE: "guildBanRemove", - CHANNEL_CREATE: "channelCreate", - CHANNEL_DELETE: "channelDelete", - CHANNEL_UPDATE: "channelUpdate", - CHANNEL_PINS_UPDATE: "channelPinsUpdate", - MESSAGE_CREATE: "messageCreate", - MESSAGE_DELETE: "messageDelete", - MESSAGE_UPDATE: "messageUpdate", - MESSAGE_BULK_DELETE: "messageDeleteBulk", - MESSAGE_REACTION_ADD: "messageReactionAdd", - MESSAGE_REACTION_REMOVE: "messageReactionRemove", - MESSAGE_REACTION_REMOVE_ALL: "messageReactionRemoveAll", - MESSAGE_REACTION_REMOVE_EMOJI: "messageReactionRemoveEmoji", - THREAD_CREATE: "threadCreate", - THREAD_DELETE: "threadDelete", - THREAD_UPDATE: "threadUpdate", - THREAD_LIST_SYNC: "threadListSync", - THREAD_MEMBER_UPDATE: "threadMemberUpdate", - THREAD_MEMBERS_UPDATE: "threadMembersUpdate", - USER_UPDATE: "userUpdate", - PRESENCE_UPDATE: "presenceUpdate", - VOICE_SERVER_UPDATE: "voiceServerUpdate", - VOICE_STATE_UPDATE: "voiceStateUpdate", - TYPING_START: "typingStart", - WEBHOOKS_UPDATE: "webhookUpdate", - ERROR: "error", - WARN: "warn", - DEBUG: "debug", - CACHE_SWEEP: "cacheSweep", - SHARD_DISCONNECT: "shardDisconnect", - SHARD_ERROR: "shardError", - SHARD_RECONNECTING: "shardReconnecting", - SHARD_READY: "shardReady", - SHARD_RESUME: "shardResume", - INVALIDATED: "invalidated", - RAW: "raw", - STAGE_INSTANCE_CREATE: "stageInstanceCreate", - STAGE_INSTANCE_UPDATE: "stageInstanceUpdate", - STAGE_INSTANCE_DELETE: "stageInstanceDelete", - GUILD_STICKER_CREATE: "stickerCreate", - GUILD_STICKER_DELETE: "stickerDelete", - GUILD_STICKER_UPDATE: "stickerUpdate", - GUILD_SCHEDULED_EVENT_CREATE: "guildScheduledEventCreate", - GUILD_SCHEDULED_EVENT_UPDATE: "guildScheduledEventUpdate", - GUILD_SCHEDULED_EVENT_DELETE: "guildScheduledEventDelete", - GUILD_SCHEDULED_EVENT_USER_ADD: "guildScheduledEventUserAdd", - GUILD_SCHEDULED_EVENT_USER_REMOVE: "guildScheduledEventUserRemove", - GUILD_AUDIT_LOG_ENTRY_CREATE: "guildAuditLogEntryCreate", - UNHANDLED_PACKET: "unhandledPacket", - RELATIONSHIP_ADD: "relationshipAdd", - RELATIONSHIP_UPDATE: "relationshipUpdate", - RELATIONSHIP_REMOVE: "relationshipRemove", - CHANNEL_RECIPIENT_ADD: "channelRecipientAdd", - CHANNEL_RECIPIENT_REMOVE: "channelRecipientRemove", - INTERACTION_MODAL_CREATE: "interactionModalCreate", - CALL_CREATE: "callCreate", - CALL_UPDATE: "callUpdate", - CALL_DELETE: "callDelete", - MESSAGE_POLL_VOTE_ADD: "messagePollVoteAdd", - MESSAGE_POLL_VOTE_REMOVE: "messagePollVoteRemove", - VOICE_CHANNEL_EFFECT_SEND: "voiceChannelEffectSend", - VOICE_BROADCAST_SUBSCRIBE: "subscribe", - VOICE_BROADCAST_UNSUBSCRIBE: "unsubscribe" - }; - exports.ShardEvents = { - CLOSE: "close", - DESTROYED: "destroyed", - INVALID_SESSION: "invalidSession", - READY: "ready", - RESUMED: "resumed", - ALL_READY: "allReady" - }; - exports.PartialTypes = keyMirror(["USER", "CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION", "GUILD_SCHEDULED_EVENT"]); - exports.WSEvents = keyMirror([ - "READY", - "RESUMED", - "APPLICATION_COMMAND_CREATE", - "APPLICATION_COMMAND_DELETE", - "APPLICATION_COMMAND_UPDATE", - "APPLICATION_COMMAND_PERMISSIONS_UPDATE", - "AUTO_MODERATION_ACTION_EXECUTION", - "AUTO_MODERATION_RULE_CREATE", - "AUTO_MODERATION_RULE_DELETE", - "AUTO_MODERATION_RULE_UPDATE", - "GUILD_CREATE", - "GUILD_DELETE", - "GUILD_UPDATE", - "INVITE_CREATE", - "INVITE_DELETE", - "GUILD_MEMBER_ADD", - "GUILD_MEMBER_REMOVE", - "GUILD_MEMBER_UPDATE", - "GUILD_MEMBERS_CHUNK", - "GUILD_INTEGRATIONS_UPDATE", - "GUILD_ROLE_CREATE", - "GUILD_ROLE_DELETE", - "GUILD_ROLE_UPDATE", - "GUILD_BAN_ADD", - "GUILD_BAN_REMOVE", - "GUILD_EMOJIS_UPDATE", - "CHANNEL_CREATE", - "CHANNEL_DELETE", - "CHANNEL_UPDATE", - "CHANNEL_PINS_UPDATE", - "MESSAGE_CREATE", - "MESSAGE_DELETE", - "MESSAGE_UPDATE", - "MESSAGE_DELETE_BULK", - "MESSAGE_REACTION_ADD", - "MESSAGE_REACTION_REMOVE", - "MESSAGE_REACTION_REMOVE_ALL", - "MESSAGE_REACTION_REMOVE_EMOJI", - "THREAD_CREATE", - "THREAD_UPDATE", - "THREAD_DELETE", - "THREAD_LIST_SYNC", - "THREAD_MEMBER_UPDATE", - "THREAD_MEMBERS_UPDATE", - "USER_UPDATE", - "PRESENCE_UPDATE", - "TYPING_START", - "VOICE_STATE_UPDATE", - "VOICE_SERVER_UPDATE", - "WEBHOOKS_UPDATE", - "STAGE_INSTANCE_CREATE", - "STAGE_INSTANCE_UPDATE", - "STAGE_INSTANCE_DELETE", - "GUILD_STICKERS_UPDATE", - "GUILD_SCHEDULED_EVENT_CREATE", - "GUILD_SCHEDULED_EVENT_UPDATE", - "GUILD_SCHEDULED_EVENT_DELETE", - "GUILD_SCHEDULED_EVENT_USER_ADD", - "GUILD_SCHEDULED_EVENT_USER_REMOVE", - "GUILD_AUDIT_LOG_ENTRY_CREATE" - ]); - exports.InviteScopes = [ - "applications.builds.read", - "applications.commands", - "applications.entitlements", - "applications.store.update", - "bot", - "connections", - "email", - "identify", - "guilds", - "guilds.join", - "gdm.join", - "webhook.incoming", - "role_connections.write" - ]; - exports.IntegrationExpireBehaviors = createEnum(["REMOVE_ROLE", "KICK"]); - exports.MessageTypes = [ - "DEFAULT", - "RECIPIENT_ADD", - "RECIPIENT_REMOVE", - "CALL", - "CHANNEL_NAME_CHANGE", - "CHANNEL_ICON_CHANGE", - "CHANNEL_PINNED_MESSAGE", - "GUILD_MEMBER_JOIN", - "USER_PREMIUM_GUILD_SUBSCRIPTION", - "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1", - "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2", - "USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3", - "CHANNEL_FOLLOW_ADD", - null, - "GUILD_DISCOVERY_DISQUALIFIED", - "GUILD_DISCOVERY_REQUALIFIED", - "GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING", - "GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING", - "THREAD_CREATED", - "REPLY", - "APPLICATION_COMMAND", - "THREAD_STARTER_MESSAGE", - "GUILD_INVITE_REMINDER", - "CONTEXT_MENU_COMMAND", - "AUTO_MODERATION_ACTION", - "ROLE_SUBSCRIPTION_PURCHASE", - "INTERACTION_PREMIUM_UPSELL", - "STAGE_START", - "STAGE_END", - "STAGE_SPEAKER", - "STAGE_RAISE_HAND", - "STAGE_TOPIC", - "GUILD_APPLICATION_PREMIUM_SUBSCRIPTION", - null, - null, - "PREMIUM_REFERRAL", - "GUILD_INCIDENT_ALERT_MODE_ENABLED", - "GUILD_INCIDENT_ALERT_MODE_DISABLED", - "GUILD_INCIDENT_REPORT_RAID", - "GUILD_INCIDENT_REPORT_FALSE_ALARM", - "GUILD_DEADCHAT_REVIVE_PROMPT", - "CUSTOM_GIFT", - "GUILD_GAMING_STATS_PROMPT", - null, - "PURCHASE_NOTIFICATION", - null, - "POLL_RESULT", - "CHANGELOG", - "NITRO_NOTIFICATION" - ]; - exports.MessageReferenceTypes = createEnum([ - "DEFAULT", - "FORWARD" - ]); - exports.SweeperKeys = [ - "applicationCommands", - "autoModerationRules", - "bans", - "emojis", - "invites", - "guildMembers", - "messages", - "presences", - "reactions", - "stageInstances", - "stickers", - "threadMembers", - "threads", - "users", - "voiceStates" - ]; - exports.SystemMessageTypes = exports.MessageTypes.filter((type) => type && !["DEFAULT", "REPLY", "APPLICATION_COMMAND", "CONTEXT_MENU_COMMAND"].includes(type)); - exports.ActivityTypes = createEnum(["PLAYING", "STREAMING", "LISTENING", "WATCHING", "CUSTOM", "COMPETING", "HANG"]); - exports.ChannelTypes = createEnum([ - "GUILD_TEXT", - "DM", - "GUILD_VOICE", - "GROUP_DM", - "GUILD_CATEGORY", - "GUILD_NEWS", - "GUILD_STORE", - ...Array(3).fill(null), - "GUILD_NEWS_THREAD", - "GUILD_PUBLIC_THREAD", - "GUILD_PRIVATE_THREAD", - "GUILD_STAGE_VOICE", - "GUILD_DIRECTORY", - "GUILD_FORUM", - "GUILD_MEDIA" - ]); - exports.TextBasedChannelTypes = [ - "DM", - "GUILD_TEXT", - "GUILD_NEWS", - "GUILD_NEWS_THREAD", - "GUILD_PUBLIC_THREAD", - "GUILD_PRIVATE_THREAD", - "GUILD_VOICE", - "GUILD_STAGE_VOICE" - ]; - exports.ThreadChannelTypes = ["GUILD_NEWS_THREAD", "GUILD_PUBLIC_THREAD", "GUILD_PRIVATE_THREAD"]; - exports.VoiceBasedChannelTypes = ["GUILD_VOICE", "GUILD_STAGE_VOICE"]; - exports.ClientApplicationAssetTypes = { - SMALL: 1, - BIG: 2 - }; - exports.Colors = { - DEFAULT: 0, - WHITE: 16777215, - AQUA: 1752220, - GREEN: 5763719, - BLUE: 3447003, - YELLOW: 16705372, - PURPLE: 10181046, - LUMINOUS_VIVID_PINK: 15277667, - FUCHSIA: 15418782, - GOLD: 15844367, - ORANGE: 15105570, - RED: 15548997, - GREY: 9807270, - NAVY: 3426654, - DARK_AQUA: 1146986, - DARK_GREEN: 2067276, - DARK_BLUE: 2123412, - DARK_PURPLE: 7419530, - DARK_VIVID_PINK: 11342935, - DARK_GOLD: 12745742, - DARK_ORANGE: 11027200, - DARK_RED: 10038562, - DARK_GREY: 9936031, - DARKER_GREY: 8359053, - LIGHT_GREY: 12370112, - DARK_NAVY: 2899536, - BLURPLE: 5793266, - GREYPLE: 10070709, - DARK_BUT_NOT_BLACK: 2895667, - NOT_QUITE_BLACK: 2303786 - }; - exports.HolographicStyles = { - PRIMARY: 11127295, - SECONDARY: 16759788, - TERTIARY: 16761760 - }; - exports.ExplicitContentFilterLevels = createEnum(["DISABLED", "MEMBERS_WITHOUT_ROLES", "ALL_MEMBERS"]); - exports.VerificationLevels = createEnum(["NONE", "LOW", "MEDIUM", "HIGH", "VERY_HIGH"]); - exports.APIErrors = { - UNKNOWN_ACCOUNT: 10001, - UNKNOWN_APPLICATION: 10002, - UNKNOWN_CHANNEL: 10003, - UNKNOWN_GUILD: 10004, - UNKNOWN_INTEGRATION: 10005, - UNKNOWN_INVITE: 10006, - UNKNOWN_MEMBER: 10007, - UNKNOWN_MESSAGE: 10008, - UNKNOWN_OVERWRITE: 10009, - UNKNOWN_PROVIDER: 10010, - UNKNOWN_ROLE: 10011, - UNKNOWN_TOKEN: 10012, - UNKNOWN_USER: 10013, - UNKNOWN_EMOJI: 10014, - UNKNOWN_WEBHOOK: 10015, - UNKNOWN_WEBHOOK_SERVICE: 10016, - UNKNOWN_SESSION: 10020, - UNKNOWN_BAN: 10026, - UNKNOWN_SKU: 10027, - UNKNOWN_STORE_LISTING: 10028, - UNKNOWN_ENTITLEMENT: 10029, - UNKNOWN_BUILD: 10030, - UNKNOWN_LOBBY: 10031, - UNKNOWN_BRANCH: 10032, - UNKNOWN_STORE_DIRECTORY_LAYOUT: 10033, - UNKNOWN_REDISTRIBUTABLE: 10036, - UNKNOWN_GIFT_CODE: 10038, - UNKNOWN_STREAM: 10049, - UNKNOWN_PREMIUM_SERVER_SUBSCRIBE_COOLDOWN: 10050, - UNKNOWN_GUILD_TEMPLATE: 10057, - UNKNOWN_DISCOVERABLE_SERVER_CATEGORY: 10059, - UNKNOWN_STICKER: 10060, - UNKNOWN_INTERACTION: 10062, - UNKNOWN_APPLICATION_COMMAND: 10063, - UNKNOWN_APPLICATION_COMMAND_PERMISSIONS: 10066, - UNKNOWN_STAGE_INSTANCE: 10067, - UNKNOWN_GUILD_MEMBER_VERIFICATION_FORM: 10068, - UNKNOWN_GUILD_WELCOME_SCREEN: 10069, - UNKNOWN_GUILD_SCHEDULED_EVENT: 10070, - UNKNOWN_GUILD_SCHEDULED_EVENT_USER: 10071, - BOT_PROHIBITED_ENDPOINT: 20001, - BOT_ONLY_ENDPOINT: 20002, - CANNOT_SEND_EXPLICIT_CONTENT: 20009, - NOT_AUTHORIZED: 20012, - SLOWMODE_RATE_LIMIT: 20016, - ACCOUNT_OWNER_ONLY: 20018, - ANNOUNCEMENT_EDIT_LIMIT_EXCEEDED: 20022, - CHANNEL_HIT_WRITE_RATELIMIT: 20028, - SERVER_HIT_WRITE_RATELIMIT: 20029, - CONTENT_NOT_ALLOWED: 20031, - GUILD_PREMIUM_LEVEL_TOO_LOW: 20035, - MAXIMUM_GUILDS: 30001, - MAXIMUM_FRIENDS: 30002, - MAXIMUM_PINS: 30003, - MAXIMUM_RECIPIENTS: 30004, - MAXIMUM_ROLES: 30005, - MAXIMUM_WEBHOOKS: 30007, - MAXIMUM_EMOJIS: 30008, - MAXIMUM_REACTIONS: 30010, - MAXIMUM_CHANNELS: 30013, - MAXIMUM_ATTACHMENTS: 30015, - MAXIMUM_INVITES: 30016, - MAXIMUM_ANIMATED_EMOJIS: 30018, - MAXIMUM_SERVER_MEMBERS: 30019, - MAXIMUM_NUMBER_OF_SERVER_CATEGORIES: 30030, - GUILD_ALREADY_HAS_TEMPLATE: 30031, - MAXIMUM_THREAD_PARTICIPANTS: 30033, - MAXIMUM_NON_GUILD_MEMBERS_BANS: 30035, - MAXIMUM_BAN_FETCHES: 30037, - MAXIMUM_NUMBER_OF_UNCOMPLETED_GUILD_SCHEDULED_EVENTS_REACHED: 30038, - MAXIMUM_NUMBER_OF_STICKERS_REACHED: 30039, - MAXIMUM_PRUNE_REQUESTS: 30040, - MAXIMUM_GUILD_WIDGET_SETTINGS_UPDATE: 30042, - MAXIMUM_NUMBER_OF_PREMIUM_EMOJIS: 30056, - UNAUTHORIZED: 40001, - ACCOUNT_VERIFICATION_REQUIRED: 40002, - DIRECT_MESSAGES_TOO_FAST: 40003, - REQUEST_ENTITY_TOO_LARGE: 40005, - FEATURE_TEMPORARILY_DISABLED: 40006, - USER_BANNED: 40007, - TARGET_USER_NOT_CONNECTED_TO_VOICE: 40032, - ALREADY_CROSSPOSTED: 40033, - MISSING_ACCESS: 50001, - INVALID_ACCOUNT_TYPE: 50002, - CANNOT_EXECUTE_ON_DM: 50003, - EMBED_DISABLED: 50004, - CANNOT_EDIT_MESSAGE_BY_OTHER: 50005, - CANNOT_SEND_EMPTY_MESSAGE: 50006, - CANNOT_MESSAGE_USER: 50007, - CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL: 50008, - CHANNEL_VERIFICATION_LEVEL_TOO_HIGH: 50009, - OAUTH2_APPLICATION_BOT_ABSENT: 50010, - MAXIMUM_OAUTH2_APPLICATIONS: 50011, - INVALID_OAUTH_STATE: 50012, - MISSING_PERMISSIONS: 50013, - INVALID_AUTHENTICATION_TOKEN: 50014, - NOTE_TOO_LONG: 50015, - INVALID_BULK_DELETE_QUANTITY: 50016, - CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019, - INVALID_OR_TAKEN_INVITE_CODE: 50020, - CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021, - CANNOT_EXECUTE_ON_CHANNEL_TYPE: 50024, - INVALID_OAUTH_TOKEN: 50025, - MISSING_OAUTH_SCOPE: 50026, - INVALID_WEBHOOK_TOKEN: 50027, - INVALID_ROLE: 50028, - INVALID_RECIPIENTS: 50033, - BULK_DELETE_MESSAGE_TOO_OLD: 50034, - INVALID_FORM_BODY: 50035, - INVITE_ACCEPTED_TO_GUILD_NOT_CONTAINING_BOT: 50036, - INVALID_API_VERSION: 50041, - FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE: 50045, - INVALID_FILE_UPLOADED: 50046, - CANNOT_SELF_REDEEM_GIFT: 50054, - INVALID_GUILD: 50055, - INVALID_MESSAGE_TYPE: 50068, - PAYMENT_SOURCE_REQUIRED: 50070, - CANNOT_DELETE_COMMUNITY_REQUIRED_CHANNEL: 50074, - INVALID_STICKER_SENT: 50081, - INVALID_OPERATION_ON_ARCHIVED_THREAD: 50083, - INVALID_THREAD_NOTIFICATION_SETTINGS: 50084, - PARAMETER_EARLIER_THAN_CREATION: 50085, - GUILD_NOT_AVAILABLE_IN_LOCATION: 50095, - GUILD_MONETIZATION_REQUIRED: 50097, - INSUFFICIENT_BOOSTS: 50101, - INVALID_JSON: 50109, - CANNOT_MIX_SUBSCRIPTION_AND_NON_SUBSCRIPTION_ROLES_FOR_EMOJI: 50144, - CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145, - VOICE_MESSAGES_DO_NOT_SUPPORT_ADDITIONAL_CONTENT: 50159, - VOICE_MESSAGES_MUST_HAVE_A_SINGLE_AUDIO_ATTACHMENT: 50160, - VOICE_MESSAGES_MUST_HAVE_SUPPORTING_METADATA: 50161, - VOICE_MESSAGES_CANNOT_BE_EDITED: 50162, - YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173, - TWO_FACTOR_REQUIRED: 60003, - NO_USERS_WITH_DISCORDTAG_EXIST: 80004, - REACTION_BLOCKED: 90001, - RESOURCE_OVERLOADED: 130000, - STAGE_ALREADY_OPEN: 150006, - CANNOT_REPLY_WITHOUT_READ_MESSAGE_HISTORY_PERMISSION: 160002, - MESSAGE_ALREADY_HAS_THREAD: 160004, - THREAD_LOCKED: 160005, - MAXIMUM_ACTIVE_THREADS: 160006, - MAXIMUM_ACTIVE_ANNOUNCEMENT_THREADS: 160007, - INVALID_JSON_FOR_UPLOADED_LOTTIE_FILE: 170001, - UPLOADED_LOTTIES_CANNOT_CONTAIN_RASTERIZED_IMAGES: 170002, - STICKER_MAXIMUM_FRAMERATE_EXCEEDED: 170003, - STICKER_FRAME_COUNT_EXCEEDS_MAXIMUM_OF_1000_FRAMES: 170004, - LOTTIE_ANIMATION_MAXIMUM_DIMENSIONS_EXCEEDED: 170005, - STICKER_FRAME_RATE_IS_TOO_SMALL_OR_TOO_LARGE: 170006, - STICKER_ANIMATION_DURATION_EXCEEDS_MAXIMUM_OF_5_SECONDS: 170007, - CANNOT_UPDATE_A_FINISHED_EVENT: 180000, - FAILED_TO_CREATE_STAGE_NEEDED_FOR_STAGE_EVENT: 180002 - }; - exports.DefaultMessageNotificationLevels = createEnum(["ALL_MESSAGES", "ONLY_MENTIONS"]); - exports.MembershipStates = createEnum([null, "INVITED", "ACCEPTED"]); - exports.WebhookTypes = createEnum([null, "Incoming", "Channel Follower", "Application"]); - exports.StickerTypes = createEnum([null, "STANDARD", "GUILD"]); - exports.StickerFormatTypes = createEnum([null, "PNG", "APNG", "LOTTIE", "GIF"]); - exports.OverwriteTypes = createEnum(["role", "member"]); - exports.ApplicationCommandTypes = createEnum([null, "CHAT_INPUT", "USER", "MESSAGE"]); - exports.ApplicationCommandOptionTypes = createEnum([ - null, - "SUB_COMMAND", - "SUB_COMMAND_GROUP", - "STRING", - "INTEGER", - "BOOLEAN", - "USER", - "CHANNEL", - "ROLE", - "MENTIONABLE", - "NUMBER", - "ATTACHMENT" - ]); - exports.ApplicationCommandPermissionTypes = createEnum([null, "ROLE", "USER"]); - exports.ApplicationRoleConnectionMetadataTypes = createEnum([ - null, - "INTEGER_LESS_THAN_OR_EQUAL", - "INTEGER_GREATER_THAN_OR_EQUAL", - "INTEGER_EQUAL", - "INTEGER_NOT_EQUAL", - "DATATIME_LESS_THAN_OR_EQUAL", - "DATATIME_GREATER_THAN_OR_EQUAL", - "BOOLEAN_EQUAL", - "BOOLEAN_NOT_EQUAL" - ]); - exports.AutoModerationRuleTriggerTypes = createEnum([null, "KEYWORD", null, "SPAM", "KEYWORD_PRESET", "MENTION_SPAM"]); - exports.AutoModerationRuleKeywordPresetTypes = createEnum([null, "PROFANITY", "SEXUAL_CONTENT", "SLURS"]); - exports.AutoModerationActionTypes = createEnum([null, "BLOCK_MESSAGE", "SEND_ALERT_MESSAGE", "TIMEOUT"]); - exports.AutoModerationRuleEventTypes = createEnum([null, "MESSAGE_SEND"]); - exports.InteractionTypes = createEnum([ - null, - "PING", - "APPLICATION_COMMAND", - "MESSAGE_COMPONENT", - "APPLICATION_COMMAND_AUTOCOMPLETE", - "MODAL_SUBMIT" - ]); - exports.InteractionResponseTypes = createEnum([ - null, - "PONG", - null, - null, - "CHANNEL_MESSAGE_WITH_SOURCE", - "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE", - "DEFERRED_MESSAGE_UPDATE", - "UPDATE_MESSAGE", - "APPLICATION_COMMAND_AUTOCOMPLETE_RESULT", - "MODAL" - ]); - exports.MessageComponentTypes = createEnum([ - null, - "ACTION_ROW", - "BUTTON", - "STRING_SELECT", - "TEXT_INPUT", - "USER_SELECT", - "ROLE_SELECT", - "MENTIONABLE_SELECT", - "CHANNEL_SELECT", - "SECTION", - "TEXT_DISPLAY", - "THUMBNAIL", - "MEDIA_GALLERY", - "FILE", - "SEPARATOR", - null, - null, - "CONTAINER" - ]); - exports.SelectMenuComponentTypes = createEnum([ - ...new Array(3).fill(null), - "STRING_MENU", - null, - "USER_SELECT", - "ROLE_SELECT", - "MENTIONABLE_SELECT", - "CHANNEL_SELECT" - ]); - exports.MessageButtonStyles = createEnum([null, "PRIMARY", "SECONDARY", "SUCCESS", "DANGER", "LINK"]); - exports.MFALevels = createEnum(["NONE", "ELEVATED"]); - exports.NSFWLevels = createEnum(["DEFAULT", "EXPLICIT", "SAFE", "AGE_RESTRICTED"]); - exports.PrivacyLevels = createEnum([null, "PUBLIC", "GUILD_ONLY"]); - exports.TextInputStyles = createEnum([null, "SHORT", "PARAGRAPH"]); - exports.GuildScheduledEventPrivacyLevels = createEnum([null, null, "GUILD_ONLY"]); - exports.PremiumTiers = createEnum(["NONE", "TIER_1", "TIER_2", "TIER_3"]); - exports.GuildScheduledEventStatuses = createEnum([null, "SCHEDULED", "ACTIVE", "COMPLETED", "CANCELED"]); - exports.GuildScheduledEventEntityTypes = createEnum([null, "STAGE_INSTANCE", "VOICE", "EXTERNAL"]); - exports.VideoQualityModes = createEnum([null, "AUTO", "FULL"]); - exports.ReactionTypes = createEnum(["NORMAL", "BURST"]); - exports.SortOrderTypes = createEnum([null, "LATEST_ACTIVITY", "CREATION_DATE"]); - exports.ForumLayoutTypes = createEnum(["NOT_SET", "LIST_VIEW", "GALLERY_VIEW"]); - exports.PollLayoutTypes = createEnum([null, "DEFAULT", "IMAGE_ONLY_ANSWERS"]); - exports.RelationshipTypes = createEnum([ - "NONE", - "FRIEND", - "BLOCKED", - "PENDING_INCOMING", - "PENDING_OUTGOING", - "IMPLICIT" - ]); - exports.SeparatorSpacingSizes = createEnum([null, "SMALL", "LARGE"]); - exports._cleanupSymbol = Symbol("djsCleanup"); -}); - -// node_modules/discord.js-selfbot-v13/src/util/Sweepers.js -var require_Sweepers = __commonJS((exports, module) => { - var { setInterval: setInterval2 } = import.meta.require("timers"); - var { Events, ThreadChannelTypes, SweeperKeys } = require_Constants(); - var { TypeError: TypeError2 } = require_DJSError(); - - class Sweepers { - constructor(client, options) { - Object.defineProperty(this, "client", { value: client }); - this.options = options; - this.intervals = Object.fromEntries(SweeperKeys.map((key) => [key, null])); - for (const key of SweeperKeys) { - if (!(key in options)) - continue; - this._validateProperties(key); - const clonedOptions = { ...this.options[key] }; - if (!("filter" in clonedOptions)) { - switch (key) { - case "invites": - clonedOptions.filter = this.constructor.expiredInviteSweepFilter(clonedOptions.lifetime); - break; - case "messages": - clonedOptions.filter = this.constructor.outdatedMessageSweepFilter(clonedOptions.lifetime); - break; - case "threads": - clonedOptions.filter = this.constructor.archivedThreadSweepFilter(clonedOptions.lifetime); - } - } - this._initInterval(key, `sweep${key[0].toUpperCase()}${key.slice(1)}`, clonedOptions); - } - } - sweepApplicationCommands(filter) { - const { guilds, items: guildCommands } = this._sweepGuildDirectProp("commands", filter, { emit: false }); - const globalCommands = this.client.application?.commands.cache.sweep(filter) ?? 0; - this.client.emit(Events.CACHE_SWEEP, `Swept ${globalCommands} global application commands and ${guildCommands} guild commands in ${guilds} guilds.`); - return guildCommands + globalCommands; - } - sweepAutoModerationRules(filter) { - return this._sweepGuildDirectProp("autoModerationRules", filter).items; - } - sweepBans(filter) { - return this._sweepGuildDirectProp("bans", filter).items; - } - sweepEmojis(filter) { - return this._sweepGuildDirectProp("emojis", filter).items; - } - sweepInvites(filter) { - return this._sweepGuildDirectProp("invites", filter).items; - } - sweepGuildMembers(filter) { - return this._sweepGuildDirectProp("members", filter, { outputName: "guild members" }).items; - } - sweepMessages(filter) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - let channels = 0; - let messages = 0; - for (const channel of this.client.channels.cache.values()) { - if (!channel.isText()) - continue; - channels++; - messages += channel.messages.cache.sweep(filter); - } - this.client.emit(Events.CACHE_SWEEP, `Swept ${messages} messages in ${channels} text-based channels.`); - return messages; - } - sweepPresences(filter) { - return this._sweepGuildDirectProp("presences", filter).items; - } - sweepReactions(filter) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - let channels = 0; - let messages = 0; - let reactions = 0; - for (const channel of this.client.channels.cache.values()) { - if (!channel.isText()) - continue; - channels++; - for (const message of channel.messages.cache.values()) { - messages++; - reactions += message.reactions.cache.sweep(filter); - } - } - this.client.emit(Events.CACHE_SWEEP, `Swept ${reactions} reactions on ${messages} messages in ${channels} text-based channels.`); - return reactions; - } - sweepStageInstances(filter) { - return this._sweepGuildDirectProp("stageInstances", filter, { outputName: "stage instances" }).items; - } - sweepStickers(filter) { - return this._sweepGuildDirectProp("stickers", filter).items; - } - sweepThreadMembers(filter) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - let threads = 0; - let members = 0; - for (const channel of this.client.channels.cache.values()) { - if (!ThreadChannelTypes.includes(channel.type)) - continue; - threads++; - members += channel.members.cache.sweep(filter); - } - this.client.emit(Events.CACHE_SWEEP, `Swept ${members} thread members in ${threads} threads.`); - return members; - } - sweepThreads(filter) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - let threads = 0; - for (const [key, val] of this.client.channels.cache.entries()) { - if (!ThreadChannelTypes.includes(val.type)) - continue; - if (filter(val, key, this.client.channels.cache)) { - threads++; - this.client.channels._remove(key); - } - } - this.client.emit(Events.CACHE_SWEEP, `Swept ${threads} threads.`); - return threads; - } - sweepUsers(filter) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - const users = this.client.users.cache.sweep(filter); - this.client.emit(Events.CACHE_SWEEP, `Swept ${users} users.`); - return users; - } - sweepVoiceStates(filter) { - return this._sweepGuildDirectProp("voiceStates", filter, { outputName: "voice states" }).items; - } - destroy() { - for (const key of SweeperKeys) { - if (this.intervals[key]) - clearInterval(this.intervals[key]); - } - } - static filterByLifetime({ - lifetime = 14400, - getComparisonTimestamp = (e) => e?.createdTimestamp, - excludeFromSweep = () => false - } = {}) { - if (typeof lifetime !== "number") { - throw new TypeError2("INVALID_TYPE", "lifetime", "number"); - } - if (typeof getComparisonTimestamp !== "function") { - throw new TypeError2("INVALID_TYPE", "getComparisonTimestamp", "function"); - } - if (typeof excludeFromSweep !== "function") { - throw new TypeError2("INVALID_TYPE", "excludeFromSweep", "function"); - } - return () => { - if (lifetime <= 0) - return null; - const lifetimeMs = lifetime * 1000; - const now = Date.now(); - return (entry, key, coll) => { - if (excludeFromSweep(entry, key, coll)) { - return false; - } - const comparisonTimestamp = getComparisonTimestamp(entry, key, coll); - if (!comparisonTimestamp || typeof comparisonTimestamp !== "number") - return false; - return now - comparisonTimestamp > lifetimeMs; - }; - }; - } - static archivedThreadSweepFilter(lifetime = 14400) { - return this.filterByLifetime({ - lifetime, - getComparisonTimestamp: (e) => e.archiveTimestamp, - excludeFromSweep: (e) => !e.archived - }); - } - static expiredInviteSweepFilter(lifetime = 14400) { - return this.filterByLifetime({ - lifetime, - getComparisonTimestamp: (i) => i.expiresTimestamp - }); - } - static outdatedMessageSweepFilter(lifetime = 3600) { - return this.filterByLifetime({ - lifetime, - getComparisonTimestamp: (m) => m.editedTimestamp ?? m.createdTimestamp - }); - } - _sweepGuildDirectProp(key, filter, { emit = true, outputName } = {}) { - if (typeof filter !== "function") { - throw new TypeError2("INVALID_TYPE", "filter", "function"); - } - let guilds = 0; - let items = 0; - for (const guild of this.client.guilds.cache.values()) { - const { cache } = guild[key]; - guilds++; - items += cache.sweep(filter); - } - if (emit) { - this.client.emit(Events.CACHE_SWEEP, `Swept ${items} ${outputName ?? key} in ${guilds} guilds.`); - } - return { guilds, items }; - } - _validateProperties(key) { - const props = this.options[key]; - if (typeof props !== "object") { - throw new TypeError2("INVALID_TYPE", `sweepers.${key}`, "object", true); - } - if (typeof props.interval !== "number") { - throw new TypeError2("INVALID_TYPE", `sweepers.${key}.interval`, "number"); - } - if (["invites", "messages", "threads"].includes(key) && !("filter" in props)) { - if (typeof props.lifetime !== "number") { - throw new TypeError2("INVALID_TYPE", `sweepers.${key}.lifetime`, "number"); - } - return; - } - if (typeof props.filter !== "function") { - throw new TypeError2("INVALID_TYPE", `sweepers.${key}.filter`, "function"); - } - } - _initInterval(intervalKey, sweepKey, opts) { - if (opts.interval <= 0 || opts.interval === Infinity) - return; - this.intervals[intervalKey] = setInterval2(() => { - const sweepFn = opts.filter(); - if (sweepFn === null) - return; - if (typeof sweepFn !== "function") - throw new TypeError2("SWEEP_FILTER_RETURN"); - this[sweepKey](sweepFn); - }, opts.interval * 1000).unref(); - } - } - module.exports = Sweepers; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Base.js -var require_Base = __commonJS((exports, module) => { - var Util = require_Util(); - - class Base { - constructor(client) { - Object.defineProperty(this, "client", { value: client }); - } - _clone() { - return Object.assign(Object.create(this), this); - } - _patch(data) { - return data; - } - _update(data) { - const clone = this._clone(); - this._patch(data); - return clone; - } - toJSON(...props) { - return Util.flatten(this, ...props); - } - valueOf() { - return this.id; - } - } - module.exports = Base; -}); - -// node_modules/discord.js-selfbot-v13/src/util/BitField.js -var require_BitField = __commonJS((exports, module) => { - var { RangeError: RangeError2 } = require_errors(); - - class BitField { - constructor(bits = this.constructor.defaultBit) { - this.bitfield = this.constructor.resolve(bits); - } - any(bit) { - return (this.bitfield & this.constructor.resolve(bit)) !== this.constructor.defaultBit; - } - equals(bit) { - return this.bitfield === this.constructor.resolve(bit); - } - has(bit) { - bit = this.constructor.resolve(bit); - return (this.bitfield & bit) === bit; - } - missing(bits, ...hasParams) { - return new this.constructor(bits).remove(this).toArray(...hasParams); - } - freeze() { - return Object.freeze(this); - } - add(...bits) { - let total = this.constructor.defaultBit; - for (const bit of bits) { - total |= this.constructor.resolve(bit); - } - if (Object.isFrozen(this)) - return new this.constructor(this.bitfield | total); - this.bitfield |= total; - return this; - } - remove(...bits) { - let total = this.constructor.defaultBit; - for (const bit of bits) { - total |= this.constructor.resolve(bit); - } - if (Object.isFrozen(this)) - return new this.constructor(this.bitfield & ~total); - this.bitfield &= ~total; - return this; - } - serialize(...hasParams) { - const serialized = {}; - for (const [flag, bit] of Object.entries(this.constructor.FLAGS)) - serialized[flag] = this.has(bit, ...hasParams); - return serialized; - } - toArray(...hasParams) { - return Object.keys(this.constructor.FLAGS).filter((bit) => this.has(bit, ...hasParams)); - } - toJSON() { - return typeof this.bitfield === "number" ? this.bitfield : this.bitfield.toString(); - } - valueOf() { - return this.bitfield; - } - *[Symbol.iterator]() { - yield* this.toArray(); - } - static resolve(bit) { - const { defaultBit } = this; - if (typeof defaultBit === typeof bit && bit >= defaultBit) - return bit; - if (bit instanceof BitField) - return bit.bitfield; - if (Array.isArray(bit)) - return bit.map((p) => this.resolve(p)).reduce((prev, p) => prev | p, defaultBit); - if (typeof bit === "string") { - if (!isNaN(bit)) - return typeof defaultBit === "bigint" ? BigInt(bit) : Number(bit); - if (this.FLAGS[bit] !== undefined) - return this.FLAGS[bit]; - } - throw new RangeError2("BITFIELD_INVALID", bit); - } - } - BitField.FLAGS = {}; - BitField.defaultBit = 0; - module.exports = BitField; -}); - -// node_modules/discord.js-selfbot-v13/src/util/ChannelFlags.js -var require_ChannelFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class ChannelFlags extends BitField { - } - ChannelFlags.FLAGS = { - PINNED: 1 << 1, - REQUIRE_TAG: 1 << 4 - }; - module.exports = ChannelFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/util/SnowflakeUtil.js -var require_SnowflakeUtil = __commonJS((exports, module) => { - var EPOCH = 1420070400000; - var INCREMENT = BigInt(0); - - class SnowflakeUtil extends null { - static generate(timestamp = Date.now()) { - if (timestamp instanceof Date) - timestamp = timestamp.getTime(); - if (typeof timestamp !== "number" || isNaN(timestamp)) { - throw new TypeError(`"timestamp" argument must be a number (received ${isNaN(timestamp) ? "NaN" : typeof timestamp})`); - } - if (INCREMENT >= 4095n) - INCREMENT = BigInt(0); - return (BigInt(timestamp - EPOCH) << 22n | 1n << 17n | INCREMENT++).toString(); - } - static deconstruct(snowflake) { - const bigIntSnowflake = BigInt(snowflake); - return { - timestamp: Number(bigIntSnowflake >> 22n) + EPOCH, - get date() { - return new Date(this.timestamp); - }, - workerId: Number(bigIntSnowflake >> 17n & 0b11111n), - processId: Number(bigIntSnowflake >> 12n & 0b11111n), - increment: Number(bigIntSnowflake & 0b111111111111n), - binary: bigIntSnowflake.toString(2).padStart(64, "0") - }; - } - static timestampFrom(snowflake) { - return Number(BigInt(snowflake) >> 22n) + EPOCH; - } - static get EPOCH() { - return EPOCH; - } - } - module.exports = SnowflakeUtil; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/CategoryChannel.js -var require_CategoryChannel = __commonJS((exports, module) => { - var GuildChannel = require_GuildChannel(); - - class CategoryChannel extends GuildChannel { - get children() { - return this.guild.channels.cache.filter((c) => c.parentId === this.id); - } - createChannel(name, options) { - return this.guild.channels.create(name, { - ...options, - parent: this.id - }); - } - } - module.exports = CategoryChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/interfaces/Collector.js -var require_Collector = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var { TypeError: TypeError2 } = require_errors(); - var Util = require_Util(); - - class Collector extends EventEmitter { - constructor(client, options = {}) { - super(); - Object.defineProperty(this, "client", { value: client }); - this.filter = options.filter ?? (() => true); - this.options = options; - this.collected = new Collection; - this.ended = false; - this._timeout = null; - this._idletimeout = null; - if (typeof this.filter !== "function") { - throw new TypeError2("INVALID_TYPE", "options.filter", "function"); - } - this.handleCollect = this.handleCollect.bind(this); - this.handleDispose = this.handleDispose.bind(this); - if (options.time) - this._timeout = setTimeout2(() => this.stop("time"), options.time).unref(); - if (options.idle) - this._idletimeout = setTimeout2(() => this.stop("idle"), options.idle).unref(); - } - async handleCollect(...args) { - const collect = await this.collect(...args); - if (collect && await this.filter(...args, this.collected)) { - this.collected.set(collect, args[0]); - this.emit("collect", ...args); - if (this._idletimeout) { - clearTimeout(this._idletimeout); - this._idletimeout = setTimeout2(() => this.stop("idle"), this.options.idle).unref(); - } - } - this.checkEnd(); - } - async handleDispose(...args) { - if (!this.options.dispose) - return; - const dispose = this.dispose(...args); - if (!dispose || !await this.filter(...args) || !this.collected.has(dispose)) - return; - this.collected.delete(dispose); - this.emit("dispose", ...args); - this.checkEnd(); - } - get next() { - return new Promise((resolve, reject) => { - if (this.ended) { - reject(this.collected); - return; - } - const cleanup = () => { - this.removeListener("collect", onCollect); - this.removeListener("end", onEnd); - }; - const onCollect = (item) => { - cleanup(); - resolve(item); - }; - const onEnd = () => { - cleanup(); - reject(this.collected); - }; - this.on("collect", onCollect); - this.on("end", onEnd); - }); - } - stop(reason = "user") { - if (this.ended) - return; - if (this._timeout) { - clearTimeout(this._timeout); - this._timeout = null; - } - if (this._idletimeout) { - clearTimeout(this._idletimeout); - this._idletimeout = null; - } - this.ended = true; - this.emit("end", this.collected, reason); - } - resetTimer({ time, idle } = {}) { - if (this._timeout) { - clearTimeout(this._timeout); - this._timeout = setTimeout2(() => this.stop("time"), time ?? this.options.time).unref(); - } - if (this._idletimeout) { - clearTimeout(this._idletimeout); - this._idletimeout = setTimeout2(() => this.stop("idle"), idle ?? this.options.idle).unref(); - } - } - checkEnd() { - const reason = this.endReason; - if (reason) - this.stop(reason); - return Boolean(reason); - } - async* [Symbol.asyncIterator]() { - const queue = []; - const onCollect = (item) => queue.push(item); - this.on("collect", onCollect); - try { - while (queue.length || !this.ended) { - if (queue.length) { - yield queue.shift(); - } else { - await new Promise((resolve) => { - const tick = () => { - this.removeListener("collect", tick); - this.removeListener("end", tick); - return resolve(); - }; - this.on("collect", tick); - this.on("end", tick); - }); - } - } - } finally { - this.removeListener("collect", onCollect); - } - } - toJSON() { - return Util.flatten(this); - } - get endReason() { - } - collect() { - } - dispose() { - } - } - module.exports = Collector; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageCollector.js -var require_MessageCollector = __commonJS((exports, module) => { - var Collector = require_Collector(); - var { Events } = require_Constants(); - - class MessageCollector extends Collector { - constructor(channel, options = {}) { - super(channel.client, options); - this.channel = channel; - this.received = 0; - const bulkDeleteListener = (messages) => { - for (const message of messages.values()) - this.handleDispose(message); - }; - this._handleChannelDeletion = this._handleChannelDeletion.bind(this); - this._handleThreadDeletion = this._handleThreadDeletion.bind(this); - this._handleGuildDeletion = this._handleGuildDeletion.bind(this); - this.client.incrementMaxListeners(); - this.client.on(Events.MESSAGE_CREATE, this.handleCollect); - this.client.on(Events.MESSAGE_DELETE, this.handleDispose); - this.client.on(Events.MESSAGE_BULK_DELETE, bulkDeleteListener); - this.client.on(Events.CHANNEL_DELETE, this._handleChannelDeletion); - this.client.on(Events.THREAD_DELETE, this._handleThreadDeletion); - this.client.on(Events.GUILD_DELETE, this._handleGuildDeletion); - this.once("end", () => { - this.client.removeListener(Events.MESSAGE_CREATE, this.handleCollect); - this.client.removeListener(Events.MESSAGE_DELETE, this.handleDispose); - this.client.removeListener(Events.MESSAGE_BULK_DELETE, bulkDeleteListener); - this.client.removeListener(Events.CHANNEL_DELETE, this._handleChannelDeletion); - this.client.removeListener(Events.THREAD_DELETE, this._handleThreadDeletion); - this.client.removeListener(Events.GUILD_DELETE, this._handleGuildDeletion); - this.client.decrementMaxListeners(); - }); - } - collect(message) { - if (message.channelId !== this.channel.id) - return null; - this.received++; - return message.id; - } - dispose(message) { - return message.channelId === this.channel.id ? message.id : null; - } - get endReason() { - if (this.options.max && this.collected.size >= this.options.max) - return "limit"; - if (this.options.maxProcessed && this.received === this.options.maxProcessed) - return "processedLimit"; - return null; - } - _handleChannelDeletion(channel) { - if (channel.id === this.channel.id || channel.id === this.channel.parentId) { - this.stop("channelDelete"); - } - } - _handleThreadDeletion(thread) { - if (thread.id === this.channel.id) { - this.stop("threadDelete"); - } - } - _handleGuildDeletion(guild) { - if (guild.id === this.channel.guild?.id) { - this.stop("guildDelete"); - } - } - } - module.exports = MessageCollector; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageActionRow.js -var require_MessageActionRow = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { MessageComponentTypes } = require_Constants(); - - class MessageActionRow extends BaseMessageComponent { - constructor(data = {}, client = null) { - super({ type: "ACTION_ROW" }); - this.components = data.components?.map((c) => BaseMessageComponent.create(c, client)) ?? []; - super.setup(data); - } - addComponents(...components) { - this.components.push(...components.flat(Infinity).map((c) => BaseMessageComponent.create(c))); - return this; - } - setComponents(...components) { - this.spliceComponents(0, this.components.length, components); - return this; - } - spliceComponents(index, deleteCount, ...components) { - this.components.splice(index, deleteCount, ...components.flat(Infinity).map((c) => BaseMessageComponent.create(c))); - return this; - } - toJSON() { - return { - components: this.components.map((c) => c.toJSON()), - type: MessageComponentTypes[this.type] - }; - } - } - module.exports = MessageActionRow; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageButton.js -var require_MessageButton = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { RangeError: RangeError2 } = require_errors(); - var { MessageButtonStyles, MessageComponentTypes } = require_Constants(); - var Util = require_Util(); - - class MessageButton extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "BUTTON" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.label = data.label ?? null; - this.customId = data.custom_id ?? data.customId ?? null; - this.style = data.style ? MessageButton.resolveStyle(data.style) : null; - this.emoji = data.emoji ? Util.resolvePartialEmoji(data.emoji) : null; - this.url = data.url ?? null; - this.disabled = data.disabled ?? false; - } - setCustomId(customId) { - this.customId = Util.verifyString(customId, RangeError2, "BUTTON_CUSTOM_ID"); - return this; - } - setDisabled(disabled = true) { - this.disabled = disabled; - return this; - } - setEmoji(emoji) { - this.emoji = Util.resolvePartialEmoji(emoji); - return this; - } - setLabel(label) { - this.label = Util.verifyString(label, RangeError2, "BUTTON_LABEL"); - return this; - } - setStyle(style) { - this.style = MessageButton.resolveStyle(style); - return this; - } - setURL(url) { - this.url = Util.verifyString(url, RangeError2, "BUTTON_URL"); - return this; - } - toJSON() { - return { - custom_id: this.customId, - disabled: this.disabled, - emoji: this.emoji, - label: this.label, - style: MessageButtonStyles[this.style], - type: MessageComponentTypes[this.type], - url: this.url - }; - } - static resolveStyle(style) { - return typeof style === "string" ? style : MessageButtonStyles[style]; - } - } - module.exports = MessageButton; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageSelectMenu.js -var require_MessageSelectMenu = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { ChannelTypes, MessageComponentTypes } = require_Constants(); - var Util = require_Util(); - - class MessageSelectMenu extends BaseMessageComponent { - constructor(data = {}) { - super({ type: BaseMessageComponent.resolveType(data.type) ?? "STRING_SELECT" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.customId = data.custom_id ?? data.customId ?? null; - this.placeholder = data.placeholder ?? null; - this.minValues = data.min_values ?? data.minValues ?? null; - this.maxValues = data.max_values ?? data.maxValues ?? null; - this.options = this.constructor.normalizeOptions(data.options ?? []); - this.disabled = data.disabled ?? false; - this.channelTypes = data.channel_types?.map((channelType) => typeof channelType === "string" ? channelType : ChannelTypes[channelType]) ?? []; - } - toJSON() { - return { - channel_types: this.channelTypes.map((type) => typeof type === "string" ? ChannelTypes[type] : type), - custom_id: this.customId, - disabled: this.disabled, - placeholder: this.placeholder, - min_values: this.minValues, - max_values: this.maxValues ?? (this.minValues ? this.options.length : undefined), - options: this.options, - type: typeof this.type === "string" ? MessageComponentTypes[this.type] : this.type - }; - } - static normalizeOption(option) { - let { label, value, description, emoji } = option; - label = Util.verifyString(label, RangeError, "SELECT_OPTION_LABEL"); - value = Util.verifyString(value, RangeError, "SELECT_OPTION_VALUE"); - emoji = emoji ? Util.resolvePartialEmoji(emoji) : null; - description = description ? Util.verifyString(description, RangeError, "SELECT_OPTION_DESCRIPTION", true) : null; - return { label, value, description, emoji, default: option.default ?? false }; - } - static normalizeOptions(...options) { - return options.flat(Infinity).map((option) => this.normalizeOption(option)); - } - } - module.exports = MessageSelectMenu; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/TextInputComponent.js -var require_TextInputComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { RangeError: RangeError2 } = require_errors(); - var { TextInputStyles, MessageComponentTypes } = require_Constants(); - var Util = require_Util(); - - class TextInputComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "TEXT_INPUT" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.customId = data.custom_id ?? data.customId ?? null; - this.label = data.label ?? null; - this.maxLength = data.max_length ?? data.maxLength ?? null; - this.minLength = data.min_length ?? data.minLength ?? null; - this.placeholder = data.placeholder ?? null; - this.required = data.required ?? false; - this.style = data.style ? TextInputComponent.resolveStyle(data.style) : null; - this.value = data.value ?? null; - } - setValue(value) { - this.value = Util.verifyString(value, RangeError2, "TEXT_INPUT_VALUE"); - return this; - } - toJSON() { - return { - custom_id: this.customId, - label: this.label, - max_length: this.maxLength, - min_length: this.minLength, - placeholder: this.placeholder, - required: this.required, - style: TextInputStyles[this.style], - type: MessageComponentTypes[this.type], - value: this.value - }; - } - static resolveStyle(style) { - return typeof style === "string" ? style : TextInputStyles[style]; - } - } - module.exports = TextInputComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/SectionComponent.js -var require_SectionComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { MessageComponentTypes } = require_Constants(); - - class SectionComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "SECTION" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.components = data.components?.map((c) => BaseMessageComponent.create(c)) ?? []; - this.accessory = BaseMessageComponent.create(data.accessory) ?? null; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - components: this.components.map((c) => c.toJSON()), - accessory: this.accessory.toJSON() - }; - } - } - module.exports = SectionComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/TextDisplayComponent.js -var require_TextDisplayComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { MessageComponentTypes } = require_Constants(); - - class TextDisplayComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "TEXT_DISPLAY" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.content = data.content ?? null; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - content: this.content - }; - } - } - module.exports = TextDisplayComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/UnfurledMediaItem.js -var require_UnfurledMediaItem = __commonJS((exports, module) => { - class UnfurledMediaItem { - constructor(data = {}) { - this.url = data.url ?? null; - this.data = data; - } - toJSON() { - return { ...this.data }; - } - } - module.exports = UnfurledMediaItem; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ThumbnailComponent.js -var require_ThumbnailComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var UnfurledMediaItem = require_UnfurledMediaItem(); - var { MessageComponentTypes } = require_Constants(); - - class ThumbnailComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "THUMBNAIL" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.media = new UnfurledMediaItem(data.media); - this.description = data.description ?? null; - this.spoiler = data.spoiler ?? false; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - media: this.media.toJSON(), - description: this.description, - spoiler: this.spoiler - }; - } - } - module.exports = ThumbnailComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MediaGalleryItem.js -var require_MediaGalleryItem = __commonJS((exports, module) => { - var UnfurledMediaItem = require_UnfurledMediaItem(); - - class MediaGalleryItem { - constructor(data = {}) { - this.media = new UnfurledMediaItem(data.media); - this.description = data.description ?? null; - this.spoiler = data.spoiler ?? false; - } - toJSON() { - return { - media: this.media.toJSON(), - description: this.description, - spoiler: this.spoiler - }; - } - } - module.exports = MediaGalleryItem; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MediaGalleryComponent.js -var require_MediaGalleryComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var MediaGalleryItem = require_MediaGalleryItem(); - var { MessageComponentTypes } = require_Constants(); - - class MediaGalleryComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "MEDIA_GALLERY" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.items = data.items?.map((item) => new MediaGalleryItem(item)) ?? []; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - items: this.items.map((c) => c.toJSON()) - }; - } - } - module.exports = MediaGalleryComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/FileComponent.js -var require_FileComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var UnfurledMediaItem = require_UnfurledMediaItem(); - var { MessageComponentTypes } = require_Constants(); - - class FileComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "FILE" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.file = new UnfurledMediaItem(data.file); - this.spoiler = data.spoiler ?? false; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - file: this.content, - spoiler: this.spoiler - }; - } - } - module.exports = FileComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/SeparatorComponent.js -var require_SeparatorComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { MessageComponentTypes, SeparatorSpacingSizes } = require_Constants(); - - class SeparatorComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "SEPARATOR" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.spacing = data.spacing ?? SeparatorSpacingSizes.SMALL; - this.divider = data.divider ?? true; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - spacing: this.spacing, - divider: this.divider - }; - } - } - module.exports = SeparatorComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ContainerComponent.js -var require_ContainerComponent = __commonJS((exports, module) => { - var BaseMessageComponent = require_BaseMessageComponent(); - var { MessageComponentTypes } = require_Constants(); - - class ContainerComponent extends BaseMessageComponent { - constructor(data = {}) { - super({ type: "CONTAINER" }); - this.setup(data); - } - setup(data) { - super.setup(data); - this.components = data.components?.map((c) => BaseMessageComponent.create(c)) ?? []; - this.accentColor = data.accent_color ?? null; - this.spoiler = data.spoiler ?? false; - } - get hexAccentColor() { - return typeof this.accentColor === "number" ? `#${this.accentColor.toString(16).padStart(6, "0")}` : this.accentColor ?? null; - } - toJSON() { - return { - type: MessageComponentTypes[this.type], - components: this.components.map((c) => c.toJSON()), - accent_color: this.accent_color, - spoiler: this.spoiler - }; - } - } - module.exports = ContainerComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/BaseMessageComponent.js -var require_BaseMessageComponent = __commonJS((exports, module) => { - var { TypeError: TypeError2 } = require_errors(); - var { MessageComponentTypes, Events } = require_Constants(); - - class BaseMessageComponent { - constructor(data) { - this.type = "type" in data ? BaseMessageComponent.resolveType(data.type) : null; - } - setup(data) { - this.data = data; - } - get id() { - return this.data.id; - } - static create(data, client) { - let component; - let type = data.type; - if (typeof type === "string") - type = MessageComponentTypes[type]; - switch (type) { - case MessageComponentTypes.ACTION_ROW: { - const MessageActionRow = require_MessageActionRow(); - component = data instanceof MessageActionRow ? data : new MessageActionRow(data, client); - break; - } - case MessageComponentTypes.BUTTON: { - const MessageButton = require_MessageButton(); - component = data instanceof MessageButton ? data : new MessageButton(data); - break; - } - case MessageComponentTypes.STRING_SELECT: - case MessageComponentTypes.USER_SELECT: - case MessageComponentTypes.ROLE_SELECT: - case MessageComponentTypes.MENTIONABLE_SELECT: - case MessageComponentTypes.CHANNEL_SELECT: { - const MessageSelectMenu = require_MessageSelectMenu(); - component = data instanceof MessageSelectMenu ? data : new MessageSelectMenu(data); - break; - } - case MessageComponentTypes.TEXT_INPUT: { - const TextInputComponent = require_TextInputComponent(); - component = data instanceof TextInputComponent ? data : new TextInputComponent(data); - break; - } - case MessageComponentTypes.SECTION: { - const SectionComponent = require_SectionComponent(); - component = data instanceof SectionComponent ? data : new SectionComponent(data); - break; - } - case MessageComponentTypes.TEXT_DISPLAY: { - const TextDisplayComponent = require_TextDisplayComponent(); - component = data instanceof TextDisplayComponent ? data : new TextDisplayComponent(data); - break; - } - case MessageComponentTypes.THUMBNAIL: { - const ThumbnailComponent = require_ThumbnailComponent(); - component = data instanceof ThumbnailComponent ? data : new ThumbnailComponent(data); - break; - } - case MessageComponentTypes.MEDIA_GALLERY: { - const MediaGalleryComponent = require_MediaGalleryComponent(); - component = data instanceof MediaGalleryComponent ? data : new MediaGalleryComponent(data); - break; - } - case MessageComponentTypes.FILE: { - const FileComponent = require_FileComponent(); - component = data instanceof FileComponent ? data : new FileComponent(data); - break; - } - case MessageComponentTypes.SEPARATOR: { - const SeparatorComponent = require_SeparatorComponent(); - component = data instanceof SeparatorComponent ? data : new SeparatorComponent(data); - break; - } - case MessageComponentTypes.CONTAINER: { - const ContainerComponent = require_ContainerComponent(); - component = data instanceof ContainerComponent ? data : new ContainerComponent(data); - break; - } - default: - if (client) { - client.emit(Events.DEBUG, `[BaseMessageComponent] Received component with unknown type: ${data.type}`); - } else { - throw new TypeError2("INVALID_TYPE", "data.type", "valid MessageComponentType"); - } - } - return component; - } - static resolveType(type) { - return typeof type === "string" ? type : MessageComponentTypes[type]; - } - static extractInteractiveComponents(component) { - let type = component.type; - if (typeof type === "string") - type = MessageComponentTypes[type]; - switch (type) { - case MessageComponentTypes.ACTION_ROW: - return component.components; - case MessageComponentTypes.SECTION: - return [...component.components, component.accessory]; - case MessageComponentTypes.CONTAINER: - return component.components.flatMap(BaseMessageComponent.extractInteractiveComponents); - default: - return [component]; - } - } - } - module.exports = BaseMessageComponent; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageEmbed.js -var require_MessageEmbed = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { RangeError: RangeError2 } = require_errors(); - var Util = require_Util(); - var deprecationEmittedForSetAuthor = false; - var deprecationEmittedForSetFooter = false; - var deprecationEmittedForAddField = false; - - class MessageEmbed { - constructor(data = {}, skipValidation = false) { - this.setup(data, skipValidation); - } - setup(data, skipValidation) { - this.type = data.type ?? "rich"; - this.title = data.title ?? null; - this.description = data.description ?? null; - this.url = data.url ?? null; - this.color = "color" in data ? Util.resolveColor(data.color) : null; - this.timestamp = "timestamp" in data ? new Date(data.timestamp).getTime() : null; - this.fields = []; - if (data.fields) { - this.fields = skipValidation ? data.fields.map(Util.cloneObject) : this.constructor.normalizeFields(data.fields); - } - this.thumbnail = data.thumbnail ? { - url: data.thumbnail.url, - proxyURL: data.thumbnail.proxyURL ?? data.thumbnail.proxy_url, - height: data.thumbnail.height, - width: data.thumbnail.width - } : null; - this.image = data.image ? { - url: data.image.url, - proxyURL: data.image.proxyURL ?? data.image.proxy_url, - height: data.image.height, - width: data.image.width - } : null; - this.video = data.video ? { - url: data.video.url, - proxyURL: data.video.proxyURL ?? data.video.proxy_url, - height: data.video.height, - width: data.video.width - } : null; - this.author = data.author ? { - name: data.author.name, - url: data.author.url, - iconURL: data.author.iconURL ?? data.author.icon_url, - proxyIconURL: data.author.proxyIconURL ?? data.author.proxy_icon_url - } : null; - this.provider = data.provider ? { - name: data.provider.name, - url: data.provider.url - } : null; - this.footer = data.footer ? { - text: data.footer.text, - iconURL: data.footer.iconURL ?? data.footer.icon_url, - proxyIconURL: data.footer.proxyIconURL ?? data.footer.proxy_icon_url - } : null; - } - get createdAt() { - return this.timestamp ? new Date(this.timestamp) : null; - } - get hexColor() { - return this.color ? `#${this.color.toString(16).padStart(6, "0")}` : null; - } - get length() { - return (this.title?.length ?? 0) + (this.description?.length ?? 0) + (this.fields.length >= 1 ? this.fields.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) : 0) + (this.footer?.text.length ?? 0) + (this.author?.name.length ?? 0); - } - equals(embed) { - return this.type === embed.type && this.author?.name === embed.author?.name && this.author?.url === embed.author?.url && this.author?.iconURL === (embed.author?.iconURL ?? embed.author?.icon_url) && this.color === embed.color && this.title === embed.title && this.description === embed.description && this.url === embed.url && this.timestamp === embed.timestamp && this.fields.length === embed.fields.length && this.fields.every((field, i) => this._fieldEquals(field, embed.fields[i])) && this.footer?.text === embed.footer?.text && this.footer?.iconURL === (embed.footer?.iconURL ?? embed.footer?.icon_url) && this.image?.url === embed.image?.url && this.thumbnail?.url === embed.thumbnail?.url && this.video?.url === embed.video?.url && this.provider?.name === embed.provider?.name && this.provider?.url === embed.provider?.url; - } - _fieldEquals(field, other) { - return field.name === other.name && field.value === other.value && field.inline === other.inline; - } - addField(name, value, inline) { - if (!deprecationEmittedForAddField) { - process2.emitWarning("MessageEmbed#addField is deprecated and will be removed in the next major update. Use MessageEmbed#addFields instead.", "DeprecationWarning"); - deprecationEmittedForAddField = true; - } - return this.addFields({ name, value, inline }); - } - addFields(...fields) { - this.fields.push(...this.constructor.normalizeFields(fields)); - return this; - } - spliceFields(index, deleteCount, ...fields) { - this.fields.splice(index, deleteCount, ...this.constructor.normalizeFields(...fields)); - return this; - } - setFields(...fields) { - this.spliceFields(0, this.fields.length, fields); - return this; - } - setAuthor(options, deprecatedIconURL, deprecatedURL) { - if (options === null) { - this.author = {}; - return this; - } - if (typeof options === "string") { - if (!deprecationEmittedForSetAuthor) { - process2.emitWarning("Passing strings for MessageEmbed#setAuthor is deprecated. Pass a sole object instead.", "DeprecationWarning"); - deprecationEmittedForSetAuthor = true; - } - options = { name: options, url: deprecatedURL, iconURL: deprecatedIconURL }; - } - const { name, url, iconURL } = options; - this.author = { name: Util.verifyString(name, RangeError2, "EMBED_AUTHOR_NAME"), url, iconURL }; - return this; - } - setColor(color) { - this.color = Util.resolveColor(color); - return this; - } - setDescription(description) { - this.description = Util.verifyString(description, RangeError2, "EMBED_DESCRIPTION"); - return this; - } - setFooter(options, deprecatedIconURL) { - if (options === null) { - this.footer = undefined; - return this; - } - if (typeof options === "string") { - if (!deprecationEmittedForSetFooter) { - process2.emitWarning("Passing strings for MessageEmbed#setFooter is deprecated. Pass a sole object instead.", "DeprecationWarning"); - deprecationEmittedForSetFooter = true; - } - options = { text: options, iconURL: deprecatedIconURL }; - } - const { text, iconURL } = options; - this.footer = { text: Util.verifyString(text, RangeError2, "EMBED_FOOTER_TEXT"), iconURL }; - return this; - } - setImage(url) { - this.image = { url }; - return this; - } - setThumbnail(url) { - this.thumbnail = { url }; - return this; - } - setTimestamp(timestamp = Date.now()) { - if (timestamp instanceof Date) - timestamp = timestamp.getTime(); - this.timestamp = timestamp; - return this; - } - setTitle(title) { - this.title = Util.verifyString(title, RangeError2, "EMBED_TITLE"); - return this; - } - setURL(url) { - this.url = url; - return this; - } - toJSON() { - return { - title: this.title, - type: this.type, - description: this.description, - url: this.url, - timestamp: this.timestamp && new Date(this.timestamp), - color: this.color, - fields: this.fields, - thumbnail: this.thumbnail, - image: this.image, - author: this.author && { - name: this.author.name, - url: this.author.url, - icon_url: this.author.iconURL - }, - video: this.video && { - url: this.video.url, - proxyURL: this.video.proxyURL, - height: this.video.height, - width: this.video.width - }, - provider: this.provider && { - name: this.provider.name, - url: this.provider.url - }, - footer: this.footer && { - text: this.footer.text, - icon_url: this.footer.iconURL - } - }; - } - static normalizeField(name, value, inline = false) { - return { - name: Util.verifyString(name, RangeError2, "EMBED_FIELD_NAME", false), - value: Util.verifyString(value, RangeError2, "EMBED_FIELD_VALUE", false), - inline - }; - } - static normalizeFields(...fields) { - return fields.flat(2).map((field) => this.normalizeField(field.name, field.value, typeof field.inline === "boolean" ? field.inline : false)); - } - } - module.exports = MessageEmbed; -}); - -// node_modules/discord.js-selfbot-v13/src/util/ActivityFlags.js -var require_ActivityFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class ActivityFlags extends BitField { - } - ActivityFlags.FLAGS = { - INSTANCE: 1 << 0, - JOIN: 1 << 1, - SPECTATE: 1 << 2, - JOIN_REQUEST: 1 << 3, - SYNC: 1 << 4, - PLAY: 1 << 5, - PARTY_PRIVACY_FRIENDS: 1 << 6, - PARTY_PRIVACY_VOICE_CHANNEL: 1 << 7, - EMBEDDED: 1 << 8 - }; - module.exports = ActivityFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildScheduledEvent.js -var require_GuildScheduledEvent = __commonJS((exports) => { - var Base = require_Base(); - var { Error: Error2 } = require_errors(); - var { - GuildScheduledEventEntityTypes, - GuildScheduledEventStatuses, - GuildScheduledEventPrivacyLevels, - Endpoints - } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class GuildScheduledEvent extends Base { - constructor(client, data) { - super(client); - this.id = data.id; - this.guildId = data.guild_id; - this._patch(data); - } - _patch(data) { - if ("channel_id" in data) { - this.channelId = data.channel_id; - } else { - this.channelId ??= null; - } - if ("creator_id" in data) { - this.creatorId = data.creator_id; - } else { - this.creatorId ??= null; - } - if ("name" in data) { - this.name = data.name; - } else { - this.name ??= null; - } - if ("description" in data) { - this.description = data.description; - } else { - this.description ??= null; - } - if ("scheduled_start_time" in data) { - this.scheduledStartTimestamp = Date.parse(data.scheduled_start_time); - } else { - this.scheduledStartTimestamp ??= null; - } - if ("scheduled_end_time" in data) { - this.scheduledEndTimestamp = data.scheduled_end_time ? Date.parse(data.scheduled_end_time) : null; - } else { - this.scheduledEndTimestamp ??= null; - } - if ("privacy_level" in data) { - this.privacyLevel = GuildScheduledEventPrivacyLevels[data.privacy_level]; - } else { - this.privacyLevel ??= null; - } - if ("status" in data) { - this.status = GuildScheduledEventStatuses[data.status]; - } else { - this.status ??= null; - } - if ("entity_type" in data) { - this.entityType = GuildScheduledEventEntityTypes[data.entity_type]; - } else { - this.entityType ??= null; - } - if ("entity_id" in data) { - this.entityId = data.entity_id; - } else { - this.entityId ??= null; - } - if ("user_count" in data) { - this.userCount = data.user_count; - } else { - this.userCount ??= null; - } - if ("creator" in data) { - this.creator = this.client.users._add(data.creator); - } else { - this.creator ??= this.client.users.resolve(this.creatorId); - } - if ("entity_metadata" in data) { - if (data.entity_metadata) { - this.entityMetadata = { - location: data.entity_metadata.location ?? this.entityMetadata?.location ?? null - }; - } else { - this.entityMetadata = null; - } - } else { - this.entityMetadata ??= null; - } - if ("image" in data) { - this.image = data.image; - } else { - this.image ??= null; - } - if ("recurrence_rule" in data) { - this.recurrenceRule = data.recurrence_rule && { - startTimestamp: Date.parse(data.recurrence_rule.start), - get startAt() { - return new Date(this.startTimestamp); - }, - endTimestamp: data.recurrence_rule.end && Date.parse(data.recurrence_rule.end), - get endAt() { - return this.endTimestamp && new Date(this.endTimestamp); - }, - frequency: data.recurrence_rule.frequency, - interval: data.recurrence_rule.interval, - byWeekday: data.recurrence_rule.by_weekday, - byNWeekday: data.recurrence_rule.by_n_weekday, - byMonth: data.recurrence_rule.by_month, - byMonthDay: data.recurrence_rule.by_month_day, - byYearDay: data.recurrence_rule.by_year_day, - count: data.recurrence_rule.count - }; - } else { - this.recurrenceRule ??= null; - } - } - coverImageURL({ format, size } = {}) { - return this.image && this.client.rest.cdn.GuildScheduledEventCover(this.id, this.image, format, size); - } - get partial() { - return this.name === null; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get scheduledStartAt() { - return new Date(this.scheduledStartTimestamp); - } - get scheduledEndAt() { - return this.scheduledEndTimestamp && new Date(this.scheduledEndTimestamp); - } - get channel() { - return this.client.channels.resolve(this.channelId); - } - get guild() { - return this.client.guilds.resolve(this.guildId); - } - get url() { - return Endpoints.scheduledEvent(this.client.options.http.scheduledEvent, this.guildId, this.id); - } - fetch(force = true) { - return this.guild.scheduledEvents.fetch({ guildScheduledEvent: this.id, force }); - } - async createInviteURL(options) { - let channelId = this.channelId; - if (this.entityType === "EXTERNAL") { - if (!options?.channel) - throw new Error2("INVITE_OPTIONS_MISSING_CHANNEL"); - channelId = this.guild.channels.resolveId(options.channel); - if (!channelId) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - } - const invite = await this.guild.invites.create(channelId, options); - return Endpoints.invite(this.client.options.http.invite, invite.code, this.id); - } - edit(options) { - return this.guild.scheduledEvents.edit(this.id, options); - } - async delete() { - await this.guild.scheduledEvents.delete(this.id); - return this; - } - setName(name, reason) { - return this.edit({ name, reason }); - } - setScheduledStartTime(scheduledStartTime, reason) { - return this.edit({ scheduledStartTime, reason }); - } - setScheduledEndTime(scheduledEndTime, reason) { - return this.edit({ scheduledEndTime, reason }); - } - setDescription(description, reason) { - return this.edit({ description, reason }); - } - setStatus(status, reason) { - return this.edit({ status, reason }); - } - setLocation(location, reason) { - return this.edit({ entityMetadata: { location }, reason }); - } - fetchSubscribers(options) { - return this.guild.scheduledEvents.fetchSubscribers(this.id, options); - } - toString() { - return this.url; - } - isActive() { - return GuildScheduledEventStatuses[this.status] === GuildScheduledEventStatuses.ACTIVE; - } - isCanceled() { - return GuildScheduledEventStatuses[this.status] === GuildScheduledEventStatuses.CANCELED; - } - isCompleted() { - return GuildScheduledEventStatuses[this.status] === GuildScheduledEventStatuses.COMPLETED; - } - isScheduled() { - return GuildScheduledEventStatuses[this.status] === GuildScheduledEventStatuses.SCHEDULED; - } - } - exports.GuildScheduledEvent = GuildScheduledEvent; -}); - -// node_modules/discord.js-selfbot-v13/src/util/ApplicationFlags.js -var require_ApplicationFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class ApplicationFlags extends BitField { - } - ApplicationFlags.FLAGS = { - EMBEDDED_RELEASED: 1 << 1, - MANAGED_EMOJI: 1 << 2, - EMBEDDED_IAP: 1 << 3, - GROUP_DM_CREATE: 1 << 4, - RPC_PRIVATE_BETA: 1 << 5, - APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE: 1 << 6, - ALLOW_ASSETS: 1 << 8, - ALLOW_ACTIVITY_ACTION_SPECTATE: 1 << 9, - ALLOW_ACTIVITY_ACTION_JOIN_REQUEST: 1 << 10, - RPC_HAS_CONNECTED: 1 << 11, - GATEWAY_PRESENCE: 1 << 12, - GATEWAY_PRESENCE_LIMITED: 1 << 13, - GATEWAY_GUILD_MEMBERS: 1 << 14, - GATEWAY_GUILD_MEMBERS_LIMITED: 1 << 15, - VERIFICATION_PENDING_GUILD_LIMIT: 1 << 16, - EMBEDDED: 1 << 17, - GATEWAY_MESSAGE_CONTENT: 1 << 18, - GATEWAY_MESSAGE_CONTENT_LIMITED: 1 << 19, - EMBEDDED_FIRST_PARTY: 1 << 20, - APPLICATION_COMMAND_BADGE: 1 << 23, - ACTIVE: 1 << 24, - IFRAME_MODAL: 1 << 26 - }; - module.exports = ApplicationFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/util/Permissions.js -var require_Permissions = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class Permissions extends BitField { - missing(bits, checkAdmin = true) { - return checkAdmin && this.has(this.constructor.FLAGS.ADMINISTRATOR) ? [] : super.missing(bits); - } - any(permission, checkAdmin = true) { - return checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR) || super.any(permission); - } - has(permission, checkAdmin = true) { - return checkAdmin && super.has(this.constructor.FLAGS.ADMINISTRATOR) || super.has(permission); - } - toArray() { - return super.toArray(false); - } - } - Permissions.FLAGS = { - CREATE_INSTANT_INVITE: 1n << 0n, - KICK_MEMBERS: 1n << 1n, - BAN_MEMBERS: 1n << 2n, - ADMINISTRATOR: 1n << 3n, - MANAGE_CHANNELS: 1n << 4n, - MANAGE_GUILD: 1n << 5n, - ADD_REACTIONS: 1n << 6n, - VIEW_AUDIT_LOG: 1n << 7n, - PRIORITY_SPEAKER: 1n << 8n, - STREAM: 1n << 9n, - VIEW_CHANNEL: 1n << 10n, - SEND_MESSAGES: 1n << 11n, - SEND_TTS_MESSAGES: 1n << 12n, - MANAGE_MESSAGES: 1n << 13n, - EMBED_LINKS: 1n << 14n, - ATTACH_FILES: 1n << 15n, - READ_MESSAGE_HISTORY: 1n << 16n, - MENTION_EVERYONE: 1n << 17n, - USE_EXTERNAL_EMOJIS: 1n << 18n, - VIEW_GUILD_INSIGHTS: 1n << 19n, - CONNECT: 1n << 20n, - SPEAK: 1n << 21n, - MUTE_MEMBERS: 1n << 22n, - DEAFEN_MEMBERS: 1n << 23n, - MOVE_MEMBERS: 1n << 24n, - USE_VAD: 1n << 25n, - CHANGE_NICKNAME: 1n << 26n, - MANAGE_NICKNAMES: 1n << 27n, - MANAGE_ROLES: 1n << 28n, - MANAGE_WEBHOOKS: 1n << 29n, - MANAGE_EMOJIS_AND_STICKERS: 1n << 30n, - USE_APPLICATION_COMMANDS: 1n << 31n, - REQUEST_TO_SPEAK: 1n << 32n, - MANAGE_EVENTS: 1n << 33n, - MANAGE_THREADS: 1n << 34n, - USE_PUBLIC_THREADS: 1n << 35n, - CREATE_PUBLIC_THREADS: 1n << 35n, - USE_PRIVATE_THREADS: 1n << 36n, - CREATE_PRIVATE_THREADS: 1n << 36n, - USE_EXTERNAL_STICKERS: 1n << 37n, - SEND_MESSAGES_IN_THREADS: 1n << 38n, - START_EMBEDDED_ACTIVITIES: 1n << 39n, - MODERATE_MEMBERS: 1n << 40n, - VIEW_CREATOR_MONETIZATION_ANALYTICS: 1n << 41n, - USE_SOUNDBOARD: 1n << 42n, - CREATE_GUILD_EXPRESSIONS: 1n << 43n, - CREATE_EVENTS: 1n << 44n, - USE_EXTERNAL_SOUNDS: 1n << 45n, - SEND_VOICE_MESSAGES: 1n << 46n, - USE_CLYDE_AI: 1n << 47n, - SET_VOICE_CHANNEL_STATUS: 1n << 48n, - SEND_POLLS: 1n << 49n, - USE_EXTERNAL_APPS: 1n << 50n - }; - Permissions.ALL = Object.values(Permissions.FLAGS).reduce((all, p) => all | p, 0n); - Permissions.DEFAULT = BigInt(104324673); - Permissions.STAGE_MODERATOR = Permissions.FLAGS.MANAGE_CHANNELS | Permissions.FLAGS.MUTE_MEMBERS | Permissions.FLAGS.MOVE_MEMBERS; - Permissions.defaultBit = BigInt(0); - module.exports = Permissions; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ApplicationRoleConnectionMetadata.js -var require_ApplicationRoleConnectionMetadata = __commonJS((exports) => { - var { ApplicationRoleConnectionMetadataTypes } = require_Constants(); - - class ApplicationRoleConnectionMetadata { - constructor(data) { - this.name = data.name; - this.nameLocalizations = data.name_localizations ?? null; - this.description = data.description; - this.descriptionLocalizations = data.description_localizations ?? null; - this.key = data.key; - this.type = typeof data.type === "number" ? ApplicationRoleConnectionMetadataTypes[data.type] : data.type; - } - } - exports.ApplicationRoleConnectionMetadata = ApplicationRoleConnectionMetadata; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/TeamMember.js -var require_TeamMember = __commonJS((exports, module) => { - var Base = require_Base(); - var { MembershipStates } = require_Constants(); - - class TeamMember extends Base { - constructor(team, data) { - super(team.client); - this.team = team; - this._patch(data); - } - _patch(data) { - if ("permissions" in data) { - this.permissions = data.permissions; - } - if ("role" in data) { - this.role = data.role; - } - if ("membership_state" in data) { - this.membershipState = MembershipStates[data.membership_state]; - } - if ("user" in data) { - this.user = this.client.users._add(data.user); - } - } - get id() { - return this.user.id; - } - toString() { - return this.user.toString(); - } - } - module.exports = TeamMember; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Team.js -var require_Team = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - var TeamMember = require_TeamMember(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class Team extends Base { - constructor(client, data) { - super(client); - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("name" in data) { - this.name = data.name; - } - if ("icon" in data) { - this.icon = data.icon; - } else { - this.icon ??= null; - } - if ("owner_user_id" in data) { - this.ownerId = data.owner_user_id; - } else { - this.ownerId ??= null; - } - this.members = new Collection; - for (const memberData of data.members) { - const member = new TeamMember(this, memberData); - this.members.set(member.id, member); - } - } - get owner() { - return this.members.get(this.ownerId) ?? null; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - iconURL({ format, size } = {}) { - if (!this.icon) - return null; - return this.client.rest.cdn.TeamIcon(this.id, this.icon, { format, size }); - } - toString() { - return this.name; - } - toJSON() { - return super.toJSON({ createdTimestamp: true }); - } - } - module.exports = Team; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/interfaces/Application.js -var require_Application = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var ApplicationFlags = require_ApplicationFlags(); - var { ClientApplicationAssetTypes, Endpoints } = require_Constants(); - var Permissions = require_Permissions(); - var SnowflakeUtil = require_SnowflakeUtil(); - var { ApplicationRoleConnectionMetadata } = require_ApplicationRoleConnectionMetadata(); - var Base = require_Base(); - var Team = require_Team(); - var AssetTypes = Object.keys(ClientApplicationAssetTypes); - var deprecationEmittedForFetchAssets = false; - - class Application extends Base { - constructor(client, data) { - super(client); - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("name" in data) { - this.name = data.name; - } else { - this.name ??= null; - } - if ("description" in data) { - this.description = data.description; - } else { - this.description ??= null; - } - if ("icon" in data) { - this.icon = data.icon; - } else { - this.icon ??= null; - } - if ("terms_of_service_url" in data) { - this.termsOfServiceURL = data.terms_of_service_url; - } else { - this.termsOfServiceURL ??= null; - } - if ("privacy_policy_url" in data) { - this.privacyPolicyURL = data.privacy_policy_url; - } else { - this.privacyPolicyURL ??= null; - } - if ("verify_key" in data) { - this.verifyKey = data.verify_key; - } else { - this.verifyKey ??= null; - } - if ("role_connections_verification_url" in data) { - this.roleConnectionsVerificationURL = data.role_connections_verification_url; - } else { - this.roleConnectionsVerificationURL ??= null; - } - this.tags = data.tags ?? []; - if ("install_params" in data) { - this.installParams = { - scopes: data.install_params.scopes, - permissions: new Permissions(data.install_params.permissions).freeze() - }; - } else { - this.installParams ??= null; - } - if ("custom_install_url" in data) { - this.customInstallURL = data.custom_install_url; - } else { - this.customInstallURL = null; - } - if ("flags" in data) { - this.flags = new ApplicationFlags(data.flags).freeze(); - } - if ("approximate_guild_count" in data) { - this.approximateGuildCount = data.approximate_guild_count; - } else { - this.approximateGuildCount ??= null; - } - if ("guild_id" in data) { - this.guildId = data.guild_id; - } else { - this.guildId ??= null; - } - if ("cover_image" in data) { - this.cover = data.cover_image; - } else { - this.cover ??= null; - } - if ("rpc_origins" in data) { - this.rpcOrigins = data.rpc_origins; - } else { - this.rpcOrigins ??= []; - } - if ("bot_require_code_grant" in data) { - this.botRequireCodeGrant = data.bot_require_code_grant; - } else { - this.botRequireCodeGrant ??= null; - } - if ("bot_public" in data) { - this.botPublic = data.bot_public; - } else { - this.botPublic ??= null; - } - this.owner = data.team ? new Team(this.client, data.team) : data.owner ? this.client.users._add(data.owner) : this.owner ?? null; - if ("splash" in data) { - this.splash = data.splash; - } else { - this.splash ??= null; - } - if ("type" in data) { - this.type = data.type; - } else { - this.type = null; - } - if ("primary_sku_id" in data) { - this.primarySkuId = data.primary_sku_id; - } else { - this.primarySkuId = null; - } - if ("eula_id" in data) { - this.eulaId = data.eula_id; - } else { - this.eulaId = null; - } - if ("slug" in data) { - this.slug = data.slug; - } else { - this.slug = null; - } - if ("aliases" in data) { - this.aliases = data.aliases; - } else { - this.aliases = []; - } - if ("executables" in data) { - this.executables = data.executables; - } else { - this.executables ??= null; - } - if ("third_party_skus" in data) { - this.thirdPartySkus = data.third_party_skus; - } else { - this.thirdPartySkus ??= null; - } - if ("hook" in data) { - this.hook = data.hook; - } else { - this.hook ??= null; - } - if ("overlay" in data) { - this.overlay = data.overlay; - } else { - this.overlay ??= null; - } - if ("overlay_methods" in data) { - this.overlayMethods = data.overlay_methods; - } else { - this.overlayMethods ??= null; - } - if ("overlay_warn" in data) { - this.overlayWarn = data.overlay_warn; - } else { - this.overlayWarn ??= null; - } - if ("overlay_compatibility_hook" in data) { - this.overlayCompatibilityHook = data.overlay_compatibility_hook; - } else { - this.overlayCompatibilityHook ??= null; - } - if ("bot" in data) { - this.bot = data.bot; - } else { - this.bot ??= null; - } - if ("developers" in data) { - this.developers = data.developers; - } else { - this.developers ??= null; - } - if ("publishers" in data) { - this.publishers = data.publishers; - } else { - this.publishers ??= null; - } - if ("redirect_uris" in data) { - this.redirectUris = data.redirect_uris; - } else { - this.redirectUris ??= null; - } - if ("deeplink_uri" in data) { - this.deeplinkUri = data.deeplink_uri; - } else { - this.deeplinkUri ??= null; - } - if ("integration_public" in data) { - this.integrationPublic = data.integration_public; - } else { - this.integrationPublic ??= null; - } - if ("integration_require_code_grant" in data) { - this.integrationRequireCodeGrant = data.integration_require_code_grant; - } else { - this.integrationRequireCodeGrant ??= null; - } - if ("bot_disabled" in data) { - this.botDisabled = data.bot_disabled; - } else { - this.botDisabled ??= null; - } - if ("bot_quarantined" in data) { - this.botQuarantined = data.bot_quarantined; - } else { - this.botQuarantined ??= null; - } - if ("approximate_user_install_count" in data) { - this.approximateUserInstallCount = data.approximate_user_install_count; - } else { - this.approximateUserInstallCount ??= null; - } - if ("approximate_user_authorization_count" in data) { - this.approximateUserAuthorizationCount = data.approximate_user_authorization_count; - } else { - this.approximateUserAuthorizationCount ??= null; - } - if ("internal_guild_restriction" in data) { - this.internalGuildRestriction = data.internal_guild_restriction; - } else { - this.internalGuildRestriction ??= null; - } - if ("interactions_endpoint_url" in data) { - this.interactionsEndpointUrl = data.interactions_endpoint_url; - } else { - this.interactionsEndpointUrl ??= null; - } - if ("interactions_version" in data) { - this.interactionsVersion = data.interactions_version; - } else { - this.interactionsVersion ??= null; - } - if ("interactions_event_types" in data) { - this.interactionsEventTypes = data.interactions_event_types; - } else { - this.interactionsEventTypes ??= null; - } - if ("event_webhooks_status" in data) { - this.eventWebhooksStatus = data.event_webhooks_status; - } else { - this.eventWebhooksStatus ??= null; - } - if ("event_webhooks_url" in data) { - this.eventWebhooksUrl = data.event_webhooks_url; - } else { - this.eventWebhooksUrl ??= null; - } - if ("event_webhooks_types" in data) { - this.eventWebhooksTypes = data.event_webhooks_types; - } else { - this.eventWebhooksTypes ??= null; - } - if ("explicit_content_filter" in data) { - this.explicitContentFilter = data.explicit_content_filter; - } else { - this.explicitContentFilter ??= null; - } - if ("integration_types_config" in data) { - this.integrationTypesConfig = data.integration_types_config; - } else { - this.integrationTypesConfig ??= null; - } - if ("is_verified" in data) { - this.isVerified = data.is_verified; - } else { - this.isVerified ??= null; - } - if ("verification_state" in data) { - this.verificationState = data.verification_state; - } else { - this.verificationState ??= null; - } - if ("store_application_state" in data) { - this.storeApplicationState = data.store_application_state; - } else { - this.storeApplicationState ??= null; - } - if ("rpc_application_state" in data) { - this.rpcApplicationState = data.rpc_application_state; - } else { - this.rpcApplicationState ??= null; - } - if ("creator_monetization_state" in data) { - this.creatorMonetizationState = data.creator_monetization_state; - } else { - this.creatorMonetizationState ??= null; - } - if ("is_discoverable" in data) { - this.isDiscoverable = data.is_discoverable; - } else { - this.isDiscoverable ??= null; - } - if ("discoverability_state" in data) { - this.discoverabilityState = data.discoverability_state; - } else { - this.discoverabilityState ??= null; - } - if ("discovery_eligibility_flags" in data) { - this.discoveryEligibilityFlags = data.discovery_eligibility_flags; - } else { - this.discoveryEligibilityFlags ??= null; - } - if ("is_monetized" in data) { - this.isMonetized = data.is_monetized; - } else { - this.isMonetized ??= null; - } - if ("storefront_available" in data) { - this.storefrontAvailable = data.storefront_available; - } else { - this.storefrontAvailable ??= null; - } - if ("monetization_state" in data) { - this.monetizationState = data.monetization_state; - } else { - this.monetizationState ??= null; - } - if ("monetization_eligibility_flags" in data) { - this.monetizationEligibilityFlags = data.monetization_eligibility_flags; - } else { - this.monetizationEligibilityFlags ??= null; - } - if ("max_participants" in data) { - this.maxParticipants = data.max_participants; - } else { - this.maxParticipants ??= null; - } - } - get guild() { - return this.client.guilds.cache.get(this.guildId) ?? null; - } - get partial() { - return !this.name; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - async fetch() { - const app = await this.client.api.oauth2.authorize.get({ - query: { - client_id: this.id, - scope: "bot applications.commands" - } - }); - const user = this.client.users._add(app.bot); - user._partial = false; - this._patch(app.application); - return this; - } - async fetchRoleConnectionMetadataRecords() { - const metadata = await this.client.api.applications(this.id)("role-connections").metadata.get(); - return metadata.map((data) => new ApplicationRoleConnectionMetadata(data)); - } - iconURL({ format, size } = {}) { - if (!this.icon) - return null; - return this.client.rest.cdn.AppIcon(this.id, this.icon, { format, size }); - } - coverURL({ format, size } = {}) { - if (!this.cover) - return null; - return Endpoints.CDN(this.client.options.http.cdn).AppIcon(this.id, this.cover, { format, size }); - } - async fetchAssets() { - if (!deprecationEmittedForFetchAssets) { - process2.emitWarning("Application#fetchAssets is deprecated as it is unsupported and will be removed in the next major version.", "DeprecationWarning"); - deprecationEmittedForFetchAssets = true; - } - const assets = await this.client.api.oauth2.applications(this.id).assets.get(); - return assets.map((a) => ({ - id: a.id, - name: a.name, - type: AssetTypes[a.type - 1] - })); - } - toString() { - return this.name; - } - toJSON() { - return super.toJSON({ createdTimestamp: true }); - } - } - module.exports = Application; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/IntegrationApplication.js -var require_IntegrationApplication = __commonJS((exports, module) => { - var Application = require_Application(); - - class IntegrationApplication extends Application { - _patch(data) { - super._patch(data); - if ("bot" in data) { - this.bot = this.client.users._add(data.bot); - } else { - this.bot ??= null; - } - if ("terms_of_service_url" in data) { - this.termsOfServiceURL = data.terms_of_service_url; - } else { - this.termsOfServiceURL ??= null; - } - if ("privacy_policy_url" in data) { - this.privacyPolicyURL = data.privacy_policy_url; - } else { - this.privacyPolicyURL ??= null; - } - if ("rpc_origins" in data) { - this.rpcOrigins = data.rpc_origins; - } else { - this.rpcOrigins ??= []; - } - if ("summary" in data) { - this.summary = data.summary; - } else { - this.summary ??= null; - } - if ("hook" in data) { - this.hook = data.hook; - } else { - this.hook ??= null; - } - if ("cover_image" in data) { - this.cover = data.cover_image; - } else { - this.cover ??= null; - } - if ("verify_key" in data) { - this.verifyKey = data.verify_key; - } else { - this.verifyKey ??= null; - } - } - } - module.exports = IntegrationApplication; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/InviteStageInstance.js -var require_InviteStageInstance = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - - class InviteStageInstance extends Base { - constructor(client, data, channelId, guildId) { - super(client); - this.channelId = channelId; - this.guildId = guildId; - this.members = new Collection; - this._patch(data); - } - _patch(data) { - if ("topic" in data) { - this.topic = data.topic; - } - if ("participant_count" in data) { - this.participantCount = data.participant_count; - } - if ("speaker_count" in data) { - this.speakerCount = data.speaker_count; - } - this.members.clear(); - for (const rawMember of data.members) { - const member = this.guild.members._add(rawMember); - this.members.set(member.id, member); - } - } - get channel() { - return this.client.channels.resolve(this.channelId); - } - get guild() { - return this.client.guilds.resolve(this.guildId); - } - } - module.exports = InviteStageInstance; -}); - -// node_modules/discord.js-selfbot-v13/src/util/InviteFlags.js -var require_InviteFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class InviteFlags extends BitField { - } - InviteFlags.FLAGS = { - IS_GUEST_INVITE: 1 << 0, - IS_VIEWED: 1 << 1, - IS_ENHANCED: 1 << 2, - IS_APPLICATION_BYPASS: 1 << 3 - }; - module.exports = InviteFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/BaseGuild.js -var require_BaseGuild = __commonJS((exports, module) => { - var Base = require_Base(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class BaseGuild extends Base { - constructor(client, data) { - super(client); - this.id = data.id; - this.name = data.name; - this.icon = data.icon ?? null; - this.features = data.features; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get nameAcronym() { - return this.name.replace(/'s /g, " ").replace(/\w+/g, (e) => e[0]).replace(/\s/g, ""); - } - get partnered() { - return this.features.includes("PARTNERED"); - } - get verified() { - return this.features.includes("VERIFIED"); - } - iconURL({ format, size, dynamic } = {}) { - if (!this.icon) - return null; - return this.client.rest.cdn.Icon(this.id, this.icon, format, size, dynamic); - } - async fetch() { - const data = await this.client.api.guilds(this.id).get({ query: { with_counts: true } }); - return this.client.guilds._add(data); - } - toString() { - return this.name; - } - } - module.exports = BaseGuild; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/AnonymousGuild.js -var require_AnonymousGuild = __commonJS((exports, module) => { - var BaseGuild = require_BaseGuild(); - var { VerificationLevels, NSFWLevels } = require_Constants(); - - class AnonymousGuild extends BaseGuild { - constructor(client, data, immediatePatch = true) { - super(client, data); - if (immediatePatch) - this._patch(data); - } - _patch(data) { - if ("features" in data) - this.features = data.features; - if ("splash" in data) { - this.splash = data.splash; - } - if ("banner" in data) { - this.banner = data.banner; - } - if ("description" in data) { - this.description = data.description; - } - if ("verification_level" in data) { - this.verificationLevel = VerificationLevels[data.verification_level]; - } - if ("vanity_url_code" in data) { - this.vanityURLCode = data.vanity_url_code; - } - if ("nsfw_level" in data) { - this.nsfwLevel = NSFWLevels[data.nsfw_level]; - } - if ("premium_subscription_count" in data) { - this.premiumSubscriptionCount = data.premium_subscription_count; - } else { - this.premiumSubscriptionCount ??= null; - } - } - bannerURL({ format, size } = {}) { - return this.banner && this.client.rest.cdn.Banner(this.id, this.banner, format, size); - } - splashURL({ format, size } = {}) { - return this.splash && this.client.rest.cdn.Splash(this.id, this.splash, format, size); - } - } - module.exports = AnonymousGuild; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Emoji.js -var require_Emoji = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deletedEmojis = new WeakSet; - var deprecationEmittedForDeleted = false; - - class Emoji extends Base { - constructor(client, emoji) { - super(client); - this.animated = emoji.animated ?? null; - this.name = emoji.name ?? null; - this.id = emoji.id ?? null; - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Emoji#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedEmojis.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Emoji#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedEmojis.add(this); - else - deletedEmojis.delete(this); - } - get identifier() { - if (this.id) - return `${this.animated ? "a:" : ""}${this.name}:${this.id}`; - return encodeURIComponent(this.name); - } - get url() { - return this.id && this.client.rest.cdn.Emoji(this.id, this.animated ? "gif" : "png"); - } - get createdTimestamp() { - return this.id && SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return this.id && new Date(this.createdTimestamp); - } - toString() { - return this.id ? `<${this.animated ? "a" : ""}:${this.name}:${this.id}>` : this.name; - } - toJSON() { - return super.toJSON({ - guild: "guildId", - createdTimestamp: true, - url: true, - identifier: true - }); - } - } - exports.Emoji = Emoji; - exports.deletedEmojis = deletedEmojis; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/WelcomeChannel.js -var require_WelcomeChannel = __commonJS((exports, module) => { - var Base = require_Base(); - var { Emoji } = require_Emoji(); - - class WelcomeChannel extends Base { - constructor(guild, data) { - super(guild.client); - this.guild = guild; - this.description = data.description; - this._emoji = { - name: data.emoji_name, - id: data.emoji_id - }; - this.channelId = data.channel_id; - } - get channel() { - return this.client.channels.cache.get(this.channelId) ?? null; - } - get emoji() { - return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); - } - } - module.exports = WelcomeChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/WelcomeScreen.js -var require_WelcomeScreen = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - var WelcomeChannel = require_WelcomeChannel(); - - class WelcomeScreen extends Base { - constructor(guild, data) { - super(guild.client); - this.guild = guild; - this.description = data.description ?? null; - this.welcomeChannels = new Collection; - for (const channel of data.welcome_channels) { - const welcomeChannel = new WelcomeChannel(this.guild, channel); - this.welcomeChannels.set(welcomeChannel.channelId, welcomeChannel); - } - } - get enabled() { - return this.guild.features.includes("WELCOME_SCREEN_ENABLED"); - } - } - module.exports = WelcomeScreen; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/InviteGuild.js -var require_InviteGuild = __commonJS((exports, module) => { - var AnonymousGuild = require_AnonymousGuild(); - var WelcomeScreen = require_WelcomeScreen(); - - class InviteGuild extends AnonymousGuild { - constructor(client, data) { - super(client, data); - this.welcomeScreen = typeof data.welcome_screen !== "undefined" ? new WelcomeScreen(this, data.welcome_screen) : null; - } - } - module.exports = InviteGuild; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Invite.js -var require_Invite = __commonJS((exports, module) => { - var Base = require_Base(); - var { GuildScheduledEvent } = require_GuildScheduledEvent(); - var IntegrationApplication = require_IntegrationApplication(); - var InviteStageInstance = require_InviteStageInstance(); - var { Error: Error2 } = require_errors(); - var { Endpoints } = require_Constants(); - var InviteFlags = require_InviteFlags(); - var Permissions = require_Permissions(); - - class Invite extends Base { - constructor(client, data) { - super(client); - this._patch(data); - } - _patch(data) { - const InviteGuild = require_InviteGuild(); - this.guild ??= null; - if (data.guild) { - this.guild = this.client.guilds.cache.get(data.guild.id) ?? new InviteGuild(this.client, data.guild); - } - if ("code" in data) { - this.code = data.code; - } - if ("approximate_presence_count" in data) { - this.presenceCount = data.approximate_presence_count; - } else { - this.presenceCount ??= null; - } - if ("approximate_member_count" in data) { - this.memberCount = data.approximate_member_count; - } else { - this.memberCount ??= null; - } - if ("temporary" in data) { - this.temporary = data.temporary ?? null; - } else { - this.temporary ??= null; - } - if ("max_age" in data) { - this.maxAge = data.max_age; - } else { - this.maxAge ??= null; - } - if ("uses" in data) { - this.uses = data.uses; - } else { - this.uses ??= null; - } - if ("max_uses" in data) { - this.maxUses = data.max_uses; - } else { - this.maxUses ??= null; - } - if ("inviter_id" in data) { - this.inviterId = data.inviter_id; - this.inviter = this.client.users.resolve(data.inviter_id); - } else { - this.inviterId ??= null; - } - if ("inviter" in data) { - this.inviter ??= this.client.users._add(data.inviter); - this.inviterId = data.inviter.id; - } else { - this.inviter ??= null; - } - if ("target_user" in data) { - this.targetUser = this.client.users._add(data.target_user); - } else { - this.targetUser ??= null; - } - if ("target_application" in data) { - this.targetApplication = new IntegrationApplication(this.client, data.target_application); - } else { - this.targetApplication ??= null; - } - if ("target_type" in data) { - this.targetType = data.target_type; - } else { - this.targetType ??= null; - } - if ("type" in data) { - this.type = data.type; - } else { - this.type ??= null; - } - if ("channel_id" in data) { - this.channelId = data.channel_id; - this.channel = this.client.channels.cache.get(data.channel_id); - } - if ("channel" in data && data.channel !== null) { - this.channel ??= this.client.channels._add(data.channel, this.guild, { cache: false }); - this.channelId ??= data.channel.id; - } - if ("created_at" in data) { - this.createdTimestamp = new Date(data.created_at).getTime(); - } else { - this.createdTimestamp ??= null; - } - if ("expires_at" in data) { - this._expiresTimestamp = data.expires_at && Date.parse(data.expires_at); - } else { - this._expiresTimestamp ??= null; - } - if ("stage_instance" in data) { - this.stageInstance = new InviteStageInstance(this.client, data.stage_instance, this.channel.id, this.guild.id); - } else { - this.stageInstance ??= null; - } - if ("guild_scheduled_event" in data) { - this.guildScheduledEvent = new GuildScheduledEvent(this.client, data.guild_scheduled_event); - } else { - this.guildScheduledEvent ??= null; - } - if ("flags" in data) { - this.flags = new InviteFlags(data.flags).freeze(); - } else { - this.flags ??= new InviteFlags().freeze(); - } - } - get createdAt() { - return this.createdTimestamp ? new Date(this.createdTimestamp) : null; - } - get deletable() { - const guild = this.guild; - if (!guild || !this.client.guilds.cache.has(guild.id)) - return false; - if (!guild.members.me) - throw new Error2("GUILD_UNCACHED_ME"); - return this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false) || guild.members.me.permissions.has(Permissions.FLAGS.MANAGE_GUILD); - } - get expiresTimestamp() { - return this._expiresTimestamp ?? (this.createdTimestamp && this.maxAge ? this.createdTimestamp + this.maxAge * 1000 : null); - } - get expiresAt() { - const { expiresTimestamp } = this; - return expiresTimestamp ? new Date(expiresTimestamp) : null; - } - get url() { - return Endpoints.invite(this.client.options.http.invite, this.code); - } - async delete(reason) { - await this.client.api.invites[this.code].delete({ reason }); - return this; - } - toString() { - return this.url; - } - toJSON() { - return super.toJSON({ - url: true, - expiresTimestamp: true, - presenceCount: false, - memberCount: false, - uses: false, - channel: "channelId", - inviter: "inviterId", - guild: "guildId" - }); - } - valueOf() { - return this.code; - } - } - Invite.INVITES_PATTERN = /discord(?:(?:app)?\.com\/invite|\.gg(?:\/invite)?)\/([\w-]{2,255})/gi; - module.exports = Invite; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildTemplate.js -var require_GuildTemplate = __commonJS((exports, module) => { - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var Base = require_Base(); - var { Events } = require_Constants(); - var DataResolver = require_DataResolver(); - - class GuildTemplate extends Base { - constructor(client, data) { - super(client); - this._patch(data); - } - _patch(data) { - if ("code" in data) { - this.code = data.code; - } - if ("name" in data) { - this.name = data.name; - } - if ("description" in data) { - this.description = data.description; - } - if ("usage_count" in data) { - this.usageCount = data.usage_count; - } - if ("creator_id" in data) { - this.creatorId = data.creator_id; - } - if ("creator" in data) { - this.creator = this.client.users._add(data.creator); - } - if ("created_at" in data) { - this.createdAt = new Date(data.created_at); - } - if ("updated_at" in data) { - this.updatedAt = new Date(data.updated_at); - } - if ("source_guild_id" in data) { - this.guildId = data.source_guild_id; - } - if ("serialized_source_guild" in data) { - this.serializedGuild = data.serialized_source_guild; - } - this.unSynced = "is_dirty" in data ? Boolean(data.is_dirty) : null; - return this; - } - async createGuild(name, icon) { - const { client } = this; - const data = await client.api.guilds.templates(this.code).post({ - data: { - name, - icon: await DataResolver.resolveImage(icon) - } - }); - if (client.guilds.cache.has(data.id)) - return client.guilds.cache.get(data.id); - return new Promise((resolve) => { - const resolveGuild = (guild) => { - client.off(Events.GUILD_CREATE, handleGuild); - client.decrementMaxListeners(); - resolve(guild); - }; - const handleGuild = (guild) => { - if (guild.id === data.id) { - clearTimeout(timeout); - resolveGuild(guild); - } - }; - client.incrementMaxListeners(); - client.on(Events.GUILD_CREATE, handleGuild); - const timeout = setTimeout2(() => resolveGuild(client.guilds._add(data)), 1e4).unref(); - }); - } - async edit({ name, description } = {}) { - const data = await this.client.api.guilds(this.guildId).templates(this.code).patch({ data: { name, description } }); - return this._patch(data); - } - async delete() { - await this.client.api.guilds(this.guildId).templates(this.code).delete(); - return this; - } - async sync() { - const data = await this.client.api.guilds(this.guildId).templates(this.code).put(); - return this._patch(data); - } - get createdTimestamp() { - return this.createdAt.getTime(); - } - get updatedTimestamp() { - return this.updatedAt.getTime(); - } - get guild() { - return this.client.guilds.resolve(this.guildId); - } - get url() { - return `${this.client.options.http.template}/${this.code}`; - } - toString() { - return this.code; - } - } - GuildTemplate.GUILD_TEMPLATES_PATTERN = /discord(?:app)?\.(?:com\/template|new)\/([\w-]{2,255})/gi; - module.exports = GuildTemplate; -}); - -// node_modules/discord.js-selfbot-v13/src/util/DataResolver.js -var require_DataResolver = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var fs = import.meta.require("fs"); - var path = import.meta.require("path"); - var stream = import.meta.require("stream"); - var { fetch } = import.meta.require("undici"); - var { Error: DiscordError, TypeError: TypeError2 } = require_errors(); - var Invite = require_Invite(); - - class DataResolver extends null { - static resolveCode(data, regex) { - return new RegExp(regex.source).exec(data)?.[1] ?? data; - } - static resolveInviteCode(data) { - return this.resolveCode(data, Invite.INVITES_PATTERN); - } - static resolveGuildTemplateCode(data) { - const GuildTemplate = require_GuildTemplate(); - return this.resolveCode(data, GuildTemplate.GUILD_TEMPLATES_PATTERN); - } - static async resolveImage(image) { - if (!image) - return null; - if (typeof image === "string" && image.startsWith("data:")) { - return image; - } - const file = await this.resolveFileAsBuffer(image); - return DataResolver.resolveBase64(file); - } - static resolveBase64(data) { - if (Buffer2.isBuffer(data)) - return `data:image/jpg;base64,${data.toString("base64")}`; - return data; - } - static async resolveFile(resource) { - if (Buffer2.isBuffer(resource) || resource instanceof stream.Readable) - return resource; - if (typeof resource === "string") { - if (/^https?:\/\//.test(resource)) { - const res = await fetch(resource); - if (res.ok) - return res.body; - else - throw new DiscordError("FILE_NOT_FOUND", resource); - } - return new Promise((resolve, reject) => { - const file = path.resolve(resource); - fs.stat(file, (err, stats) => { - if (err) - return reject(err); - if (!stats.isFile()) - return reject(new DiscordError("FILE_NOT_FOUND", file)); - return resolve(fs.createReadStream(file)); - }); - }); - } - throw new TypeError2("REQ_RESOURCE_TYPE"); - } - static async resolveFileAsBuffer(resource) { - const file = await this.resolveFile(resource); - if (Buffer2.isBuffer(file)) - return file; - const buffers = []; - for await (const data of file) - buffers.push(data); - return Buffer2.concat(buffers); - } - } - module.exports = DataResolver; -}); - -// node_modules/discord.js-selfbot-v13/src/util/MessageFlags.js -var require_MessageFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class MessageFlags extends BitField { - } - MessageFlags.FLAGS = { - CROSSPOSTED: 1 << 0, - IS_CROSSPOST: 1 << 1, - SUPPRESS_EMBEDS: 1 << 2, - SOURCE_MESSAGE_DELETED: 1 << 3, - URGENT: 1 << 4, - HAS_THREAD: 1 << 5, - EPHEMERAL: 1 << 6, - LOADING: 1 << 7, - FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: 1 << 8, - GUILD_FEED_HIDDEN: 1 << 9, - SHOULD_SHOW_LINK_NOT_DISCORD_WARNING: 1 << 10, - SUPPRESS_NOTIFICATIONS: 1 << 12, - IS_VOICE_MESSAGE: 1 << 13, - HAS_SNAPSHOT: 1 << 14, - IS_COMPONENTS_V2: 1 << 15 - }; - module.exports = MessageFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Webhook.js -var require_Webhook = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var MessagePayload = require_MessagePayload(); - var { Error: Error2 } = require_errors(); - var { WebhookTypes } = require_Constants(); - var DataResolver = require_DataResolver(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deprecationEmittedForFetchMessage = false; - - class Webhook { - constructor(client, data) { - Object.defineProperty(this, "client", { value: client }); - if (data) - this._patch(data); - } - _patch(data) { - if ("name" in data) { - this.name = data.name; - } - Object.defineProperty(this, "token", { value: data.token ?? null, writable: true, configurable: true }); - if ("avatar" in data) { - this.avatar = data.avatar; - } - this.id = data.id; - if ("type" in data) { - this.type = WebhookTypes[data.type]; - } - if ("guild_id" in data) { - this.guildId = data.guild_id; - } - if ("channel_id" in data) { - this.channelId = data.channel_id; - } - if ("user" in data) { - this.owner = this.client.users?._add(data.user) ?? data.user; - } else { - this.owner ??= null; - } - if ("source_guild" in data) { - this.sourceGuild = this.client.guilds?.cache.get(data.source_guild.id) ?? data.source_guild; - } else { - this.sourceGuild ??= null; - } - if ("source_channel" in data) { - this.sourceChannel = this.client.channels?.cache.get(data.source_channel?.id) ?? data.source_channel; - } else { - this.sourceChannel ??= null; - } - } - async send(options) { - if (!this.token) - throw new Error2("WEBHOOK_TOKEN_UNAVAILABLE"); - let messagePayload; - if (options instanceof MessagePayload) { - messagePayload = options.resolveData(); - } else { - messagePayload = MessagePayload.create(this, options).resolveData(); - } - const { data, files } = await messagePayload.resolveFiles(); - const d = await this.client.api.webhooks(this.id, this.token).post({ - data, - files, - query: { - thread_id: messagePayload.options.threadId, - wait: true, - with_components: messagePayload.options.withComponents - }, - auth: false, - webhook: true - }); - return this.client.channels?.cache.get(d.channel_id)?.messages._add(d, false) ?? d; - } - async sendSlackMessage(body) { - if (!this.token) - throw new Error2("WEBHOOK_TOKEN_UNAVAILABLE"); - const data = await this.client.api.webhooks(this.id, this.token).slack.post({ - query: { wait: true }, - auth: false, - data: body, - webhook: true - }); - return data.toString() === "ok"; - } - async edit({ name = this.name, avatar, channel }, reason) { - if (avatar && !(typeof avatar === "string" && avatar.startsWith("data:"))) { - avatar = await DataResolver.resolveImage(avatar); - } - channel &&= channel.id ?? channel; - const data = await this.client.api.webhooks(this.id, channel ? undefined : this.token).patch({ - data: { name, avatar, channel_id: channel }, - reason, - auth: !this.token || Boolean(channel), - webhook: true - }); - this.name = data.name; - this.avatar = data.avatar; - this.channelId = data.channel_id; - return this; - } - async fetchMessage(message, cacheOrOptions = { cache: true }) { - if (typeof cacheOrOptions === "boolean") { - if (!deprecationEmittedForFetchMessage) { - process2.emitWarning("Passing a boolean to cache the message in Webhook#fetchMessage is deprecated. Pass an object instead.", "DeprecationWarning"); - deprecationEmittedForFetchMessage = true; - } - cacheOrOptions = { cache: cacheOrOptions }; - } - if (!this.token) - throw new Error2("WEBHOOK_TOKEN_UNAVAILABLE"); - const data = await this.client.api.webhooks(this.id, this.token).messages(message).get({ - query: { - thread_id: cacheOrOptions.threadId - }, - auth: false, - webhook: true - }); - return this.client.channels?.cache.get(data.channel_id)?.messages._add(data, cacheOrOptions.cache) ?? data; - } - async editMessage(message, options) { - if (!this.token) - throw new Error2("WEBHOOK_TOKEN_UNAVAILABLE"); - let messagePayload; - if (options instanceof MessagePayload) - messagePayload = options; - else - messagePayload = MessagePayload.create(this, options); - const { data, files } = await messagePayload.resolveData().resolveFiles(); - const d = await this.client.api.webhooks(this.id, this.token).messages(typeof message === "string" ? message : message.id).patch({ - data, - files, - query: { - thread_id: messagePayload.options.threadId, - with_components: messagePayload.options.withComponents - }, - auth: false, - webhook: true - }); - const messageManager = this.client.channels?.cache.get(d.channel_id)?.messages; - if (!messageManager) - return d; - const existing = messageManager.cache.get(d.id); - if (!existing) - return messageManager._add(d); - const clone = existing._clone(); - clone._patch(d); - return clone; - } - async delete(reason) { - await this.client.api.webhooks(this.id, this.token).delete({ reason, auth: !this.token, webhook: true }); - } - async deleteMessage(message, threadId) { - if (!this.token) - throw new Error2("WEBHOOK_TOKEN_UNAVAILABLE"); - await this.client.api.webhooks(this.id, this.token).messages(typeof message === "string" ? message : message.id).delete({ - query: { - thread_id: threadId - }, - auth: false, - webhook: true - }); - } - get channel() { - return this.client.channels.resolve(this.channelId); - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get url() { - return this.client.options.http.api + this.client.api.webhooks(this.id, this.token); - } - avatarURL({ format, size } = {}) { - if (!this.avatar) - return null; - return this.client.rest.cdn.Avatar(this.id, this.avatar, format, size); - } - isChannelFollower() { - return this.type === "Channel Follower"; - } - isIncoming() { - return this.type === "Incoming"; - } - static applyToClass(structure, ignore = []) { - for (const prop of [ - "send", - "sendSlackMessage", - "fetchMessage", - "edit", - "editMessage", - "delete", - "deleteMessage", - "createdTimestamp", - "createdAt", - "url" - ]) { - if (ignore.includes(prop)) - continue; - Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(Webhook.prototype, prop)); - } - } - } - module.exports = Webhook; -}); - -// node_modules/discord.js-selfbot-v13/src/client/WebhookClient.js -var require_WebhookClient = __commonJS((exports, module) => { - var BaseClient = require_BaseClient(); - var { Error: Error2 } = require_errors(); - var Webhook = require_Webhook(); - - class WebhookClient extends BaseClient { - constructor(data, options) { - super(options); - Object.defineProperty(this, "client", { value: this }); - let { id, token } = data; - if ("url" in data) { - const url = data.url.match(/^https?:\/\/(?:canary|ptb)?\.?discord\.com\/api\/webhooks(?:\/v[0-9]\d*)?\/([^\/]+)\/([^\/]+)/i); - if (!url || url.length <= 1) - throw new Error2("WEBHOOK_URL_INVALID"); - [, id, token] = url; - } - this.id = id; - Object.defineProperty(this, "token", { value: token, writable: true, configurable: true }); - } - send() { - } - sendSlackMessage() { - } - fetchMessage() { - } - edit() { - } - editMessage() { - } - delete() { - } - deleteMessage() { - } - get createdTimestamp() { - } - get createdAt() { - } - get url() { - } - } - Webhook.applyToClass(WebhookClient); - module.exports = WebhookClient; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/VoiceState.js -var require_VoiceState = __commonJS((exports, module) => { - var Base = require_Base(); - var { Error: Error2, TypeError: TypeError2 } = require_errors(); - - class VoiceState extends Base { - constructor(guild, data) { - super(guild.client); - this.guild = guild; - this.id = data.user_id; - this._patch(data); - } - _patch(data) { - if ("deaf" in data) { - this.serverDeaf = data.deaf; - } else { - this.serverDeaf ??= null; - } - if ("mute" in data) { - this.serverMute = data.mute; - } else { - this.serverMute ??= null; - } - if ("self_deaf" in data) { - this.selfDeaf = data.self_deaf; - } else { - this.selfDeaf ??= null; - } - if ("self_mute" in data) { - this.selfMute = data.self_mute; - } else { - this.selfMute ??= null; - } - if ("self_video" in data) { - this.selfVideo = data.self_video; - } else { - this.selfVideo ??= null; - } - if ("session_id" in data) { - this.sessionId = data.session_id; - } else { - this.sessionId ??= null; - } - if ("self_video" in data) { - this.streaming = data.self_stream ?? false; - } else { - this.streaming ??= null; - } - if ("channel_id" in data) { - this.channelId = data.channel_id; - } else { - this.channelId ??= null; - } - if ("suppress" in data) { - this.suppress = data.suppress; - } - if ("request_to_speak_timestamp" in data) { - this.requestToSpeakTimestamp = data.request_to_speak_timestamp && Date.parse(data.request_to_speak_timestamp); - } else { - this.requestToSpeakTimestamp ??= null; - } - return this; - } - get member() { - if (!this.guild?.id) - return null; - return this.guild.members.cache.get(this.id) ?? null; - } - get user() { - return this.guild.client.users.cache.get(this.id) ?? null; - } - get channel() { - return (this.guild?.id ? this.guild : this.client)?.channels?.cache.get(this.channelId) ?? null; - } - get deaf() { - return this.serverDeaf || this.selfDeaf; - } - get mute() { - return this.serverMute || this.selfMute; - } - setMute(mute = true, reason) { - if (!this.guild?.id) - return null; - return this.guild.members.edit(this.id, { mute }, reason); - } - setDeaf(deaf = true, reason) { - if (!this.guild?.id) - return null; - return this.guild.members.edit(this.id, { deaf }, reason); - } - disconnect(reason) { - return this.setChannel(null, reason); - } - setChannel(channel, reason) { - if (!this.guild?.id) - return null; - return this.guild.members.edit(this.id, { channel }, reason); - } - async setRequestToSpeak(request = true) { - if (this.channel?.type !== "GUILD_STAGE_VOICE") - throw new Error2("VOICE_NOT_STAGE_CHANNEL"); - if (this.client.user.id !== this.id) - throw new Error2("VOICE_STATE_NOT_OWN"); - await this.client.api.guilds(this.guild.id, "voice-states", "@me").patch({ - data: { - channel_id: this.channelId, - request_to_speak_timestamp: request ? new Date().toISOString() : null - } - }); - } - async setSuppressed(suppressed = true) { - if (typeof suppressed !== "boolean") - throw new TypeError2("VOICE_STATE_INVALID_TYPE", "suppressed"); - if (this.channel?.type !== "GUILD_STAGE_VOICE") - throw new Error2("VOICE_NOT_STAGE_CHANNEL"); - const target = this.client.user.id === this.id ? "@me" : this.id; - await this.client.api.guilds(this.guild.id, "voice-states", target).patch({ - data: { - channel_id: this.channelId, - suppress: suppressed, - request_to_speak_timestamp: null - } - }); - } - setStatus(status = "") { - return this.client.api.channels(this.channel.id, "voice-status").put({ - data: { - status - } - }); - } - async getPreview() { - if (!this.streaming) - throw new Error2("USER_NOT_STREAMING"); - const streamKey = this.guild?.id ? `guild:${this.guild.id}:${this.channelId}:${this.id}` : `call:${this.channelId}:${this.id}`; - const data = await this.client.api.streams[encodeURIComponent(streamKey)].preview.get(); - return data.url; - } - postPreview(base64Image) { - if (!this.client.user.id === this.id || !this.streaming) - throw new Error2("USER_NOT_STREAMING"); - const streamKey = this.guild?.id ? `guild:${this.guild.id}:${this.channelId}:${this.id}` : `call:${this.channelId}:${this.id}`; - return this.client.api.streams[encodeURIComponent(streamKey)].preview.post({ - data: { - thumbnail: base64Image - } - }); - } - fetch(force = true) { - return this.guild?.voiceStates?.fetch(this.id, { force }); - } - toJSON() { - return super.toJSON({ - id: true, - serverDeaf: true, - serverMute: true, - selfDeaf: true, - selfMute: true, - selfVideo: true, - sessionId: true, - channelId: "channel" - }); - } - } - module.exports = VoiceState; -}); - -// node_modules/discord.js-selfbot-v13/src/util/UserFlags.js -var require_UserFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class UserFlags extends BitField { - } - UserFlags.FLAGS = { - DISCORD_EMPLOYEE: 1 << 0, - PARTNERED_SERVER_OWNER: 1 << 1, - HYPESQUAD_EVENTS: 1 << 2, - BUGHUNTER_LEVEL_1: 1 << 3, - MFA_SMS: 1 << 4, - PREMIUM_PROMO_DISMISSED: 1 << 5, - HOUSE_BRAVERY: 1 << 6, - HOUSE_BRILLIANCE: 1 << 7, - HOUSE_BALANCE: 1 << 8, - EARLY_SUPPORTER: 1 << 9, - TEAM_USER: 1 << 10, - INTERNAL_APPLICATION: 1 << 11, - SYSTEM: 1 << 12, - HAS_UNREAD_URGENT_MESSAGES: 1 << 13, - BUGHUNTER_LEVEL_2: 1 << 14, - UNDERAGE_DELETED: 1 << 15, - VERIFIED_BOT: 1 << 16, - EARLY_VERIFIED_BOT_DEVELOPER: 1 << 17, - DISCORD_CERTIFIED_MODERATOR: 1 << 18, - BOT_HTTP_INTERACTIONS: 1 << 19, - SPAMMER: 1 << 20, - DISABLE_PREMIUM: 1 << 21, - ACTIVE_DEVELOPER: 1 << 22, - HIGH_GLOBAL_RATE_LIMIT: Math.pow(2, 33), - DELETED: Math.pow(2, 34), - DISABLED_SUSPICIOUS_ACTIVITY: Math.pow(2, 35), - SELF_DELETED: Math.pow(2, 36), - PREMIUM_DISCRIMINATOR: Math.pow(2, 37), - USED_DESKTOP_CLIENT: Math.pow(2, 38), - USED_WEB_CLIENT: Math.pow(2, 39), - USED_MOBILE_CLIENT: Math.pow(2, 40), - DISABLED: Math.pow(2, 41), - VERIFIED_EMAIL: Math.pow(2, 43), - QUARANTINED: Math.pow(2, 44), - COLLABORATOR: Math.pow(2, 50), - RESTRICTED_COLLABORATOR: Math.pow(2, 51) - }; - module.exports = UserFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/User.js -var require_User = __commonJS((exports, module) => { - var Base = require_Base(); - var VoiceState = require_VoiceState(); - var TextBasedChannel = require_TextBasedChannel(); - var { Error: Error2 } = require_errors(); - var { RelationshipTypes } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - var UserFlags = require_UserFlags(); - var Util = require_Util(); - - class User extends Base { - constructor(client, data) { - super(client); - this.id = data.id; - this.bot = null; - this.system = null; - this.flags = null; - this._patch(data); - } - _patch(data) { - if ("username" in data) { - this.username = data.username; - } else { - this.username ??= null; - } - if ("global_name" in data) { - this.globalName = data.global_name; - } else { - this.globalName ??= null; - } - if ("bot" in data) { - this.bot = Boolean(data.bot); - } else if (!this.partial && typeof this.bot !== "boolean") { - this.bot = false; - } - if ("discriminator" in data) { - this.discriminator = data.discriminator; - } else { - this.discriminator ??= null; - } - if ("avatar" in data) { - this.avatar = data.avatar; - } else { - this.avatar ??= null; - } - if ("banner" in data) { - this.banner = data.banner; - } else if (this.banner !== null) { - this.banner ??= undefined; - } - if ("banner_color" in data) { - this.bannerColor = data.banner_color; - } else if (this.bannerColor !== null) { - this.bannerColor ??= undefined; - } - if ("accent_color" in data) { - this.accentColor = data.accent_color; - } else if (this.accentColor !== null) { - this.accentColor ??= undefined; - } - if ("system" in data) { - this.system = Boolean(data.system); - } else if (!this.partial && typeof this.system !== "boolean") { - this.system = false; - } - if ("public_flags" in data) { - this.flags = new UserFlags(data.public_flags); - } - if (data.avatar_decoration_data) { - if (data.avatar_decoration_data) { - this.avatarDecorationData = { - asset: data.avatar_decoration_data.asset, - skuId: data.avatar_decoration_data.sku_id - }; - } else { - this.avatarDecorationData = null; - } - } else { - this.avatarDecorationData ??= null; - } - if ("primary_guild" in data) { - if (data.primary_guild) { - this.primaryGuild = { - identityGuildId: data.primary_guild.identity_guild_id, - identityEnabled: data.primary_guild.identity_enabled, - tag: data.primary_guild.tag, - badge: data.primary_guild.badge - }; - } else { - this.primaryGuild = null; - } - } else { - this.primaryGuild ??= null; - } - if (data.collectibles) { - if (data.collectibles.nameplate) { - this.collectibles = { - nameplate: { - skuId: data.collectibles.nameplate.sku_id, - asset: data.collectibles.nameplate.asset, - label: data.collectibles.nameplate.label, - palette: data.collectibles.nameplate.palette - } - }; - } else { - this.collectibles = { nameplate: null }; - } - } else { - this.collectibles ??= null; - } - } - get clan() { - return this.primaryGuild; - } - get avatarDecoration() { - return this.avatarDecorationData?.asset || null; - } - get partial() { - return typeof this.username !== "string"; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - avatarURL({ format, size, dynamic } = {}) { - if (!this.avatar) - return null; - return this.client.rest.cdn.Avatar(this.id, this.avatar, format, size, dynamic); - } - avatarDecorationURL() { - if (!this.avatarDecorationData) - return null; - return this.client.rest.cdn.AvatarDecoration(this.avatarDecorationData.asset); - } - clanBadgeURL() { - return this.guildTagBadgeURL(); - } - guildTagBadgeURL() { - if (!this.primaryGuild || !this.primaryGuild.identityGuildId || !this.primaryGuild.badge) - return null; - return this.client.rest.cdn.GuildTagBadge(this.primaryGuild.identityGuildId, this.primaryGuild.badge); - } - get defaultAvatarURL() { - const index = this.discriminator === "0" || this.discriminator === "0000" ? Util.calculateUserDefaultAvatarIndex(this.id) : this.discriminator % 5; - return this.client.rest.cdn.DefaultAvatar(index); - } - displayAvatarURL(options) { - return this.avatarURL(options) ?? this.defaultAvatarURL; - } - get hexAccentColor() { - if (typeof this.accentColor !== "number") - return this.accentColor; - return `#${this.accentColor.toString(16).padStart(6, "0")}`; - } - bannerURL({ format, size, dynamic } = {}) { - if (typeof this.banner === "undefined") - throw new Error2("USER_BANNER_NOT_FETCHED"); - if (!this.banner) - return null; - return this.client.rest.cdn.Banner(this.id, this.banner, format, size, dynamic); - } - get tag() { - return typeof this.username === "string" ? this.discriminator === "0" || this.discriminator === "0000" ? this.username : `${this.username}#${this.discriminator}` : null; - } - get displayName() { - return this.globalName ?? this.username; - } - get dmChannel() { - return this.client.users.dmChannel(this.id); - } - createDM(force = false) { - return this.client.users.createDM(this.id, force); - } - deleteDM() { - return this.client.users.deleteDM(this.id); - } - equals(user) { - return user && this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && this.globalName === user.globalName && this.avatar === user.avatar && this.flags?.bitfield === user.flags?.bitfield && this.banner === user.banner && this.accentColor === user.accentColor && this.avatarDecorationData?.asset === user.avatarDecorationData?.asset && this.avatarDecorationData?.skuId === user.avatarDecorationData?.skuId && this.collectibles?.nameplate?.skuId === user.collectibles?.nameplate?.skuId && this.collectibles?.nameplate?.asset === user.collectibles?.nameplate?.asset && this.collectibles?.nameplate?.label === user.collectibles?.nameplate?.label && this.collectibles?.nameplate?.palette === user.collectibles?.nameplate?.palette && this.primaryGuild?.identityGuildId === user.primaryGuild?.identityGuildId && this.primaryGuild?.identityEnabled === user.primaryGuild?.identityEnabled && this.primaryGuild?.tag === user.primaryGuild?.tag && this.primaryGuild?.badge === user.primaryGuild?.badge; - } - _equals(user) { - return user && this.id === user.id && this.username === user.username && this.discriminator === user.discriminator && this.globalName === user.global_name && this.avatar === user.avatar && this.flags?.bitfield === user.public_flags && ("banner" in user ? this.banner === user.banner : true) && ("accent_color" in user ? this.accentColor === user.accent_color : true) && ("avatar_decoration_data" in user ? this.avatarDecorationData?.asset === user.avatar_decoration_data?.asset && this.avatarDecorationData?.skuId === user.avatar_decoration_data?.sku_id : true) && ("collectibles" in user ? this.collectibles?.nameplate?.skuId === user.collectibles?.nameplate?.sku_id && this.collectibles?.nameplate?.asset === user.collectibles?.nameplate?.asset && this.collectibles?.nameplate?.label === user.collectibles?.nameplate?.label && this.collectibles?.nameplate?.palette === user.collectibles?.nameplate?.palette : true) && ("primary_guild" in user ? this.primaryGuild?.identityGuildId === user.primary_guild?.identity_guild_id && this.primaryGuild?.identityEnabled === user.primary_guild?.identity_enabled && this.primaryGuild?.tag === user.primary_guild?.tag && this.primaryGuild?.badge === user.primary_guild?.badge : true); - } - fetch(force = true) { - return this.client.users.fetch(this.id, { force }); - } - getProfile(guildId) { - return this.client.api.users(this.id).profile.get({ - query: { - with_mutual_guilds: true, - with_mutual_friends: true, - with_mutual_friends_count: true, - guild_id: guildId - } - }); - } - toString() { - return `<@${this.id}>`; - } - toJSON(...props) { - const json = super.toJSON({ - createdTimestamp: true, - defaultAvatarURL: true, - hexAccentColor: true, - tag: true - }, ...props); - json.avatarURL = this.avatarURL(); - json.displayAvatarURL = this.displayAvatarURL(); - json.bannerURL = this.banner ? this.bannerURL() : this.banner; - json.guildTagBadgeURL = this.guildTagBadgeURL(); - return json; - } - async setNote(note = null) { - await this.client.notes.updateNote(this.id, note); - return this; - } - get note() { - return this.client.notes.cache.get(this.id); - } - get voice() { - return this.client.voiceStates.cache.get(this.id) ?? this.client.guilds.cache.find((g) => g?.voiceStates?.cache?.get(this.id))?.voiceStates?.cache?.get(this.id) ?? new VoiceState({ client: this.client }, { user_id: this.id }); - } - sendFriendRequest() { - return this.client.relationships.sendFriendRequest(this); - } - deleteRelationship() { - return this.client.relationships.deleteRelationship(this); - } - get relationship() { - const i = this.client.relationships.cache.get(this.id) ?? 0; - return RelationshipTypes[parseInt(i)]; - } - get friendNickname() { - return this.client.relationships.friendNicknames.get(this.id); - } - } - TextBasedChannel.applyToClass(User); - module.exports = User; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/BaseManager.js -var require_BaseManager = __commonJS((exports, module) => { - class BaseManager { - constructor(client) { - Object.defineProperty(this, "client", { value: client }); - } - } - module.exports = BaseManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/DataManager.js -var require_DataManager = __commonJS((exports, module) => { - var BaseManager = require_BaseManager(); - var { Error: Error2 } = require_errors(); - - class DataManager extends BaseManager { - constructor(client, holds) { - super(client); - Object.defineProperty(this, "holds", { value: holds }); - } - get cache() { - throw new Error2("NOT_IMPLEMENTED", "get cache", this.constructor.name); - } - resolve(idOrInstance) { - if (idOrInstance instanceof this.holds) - return idOrInstance; - if (typeof idOrInstance === "string") - return this.cache.get(idOrInstance) ?? null; - return null; - } - resolveId(idOrInstance) { - if (idOrInstance instanceof this.holds) - return idOrInstance.id; - if (typeof idOrInstance === "string") - return idOrInstance; - return null; - } - valueOf() { - return this.cache; - } - } - module.exports = DataManager; -}); - -// node_modules/discord.js-selfbot-v13/src/util/RoleFlags.js -var require_RoleFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class RoleFlags extends BitField { - } - RoleFlags.FLAGS = { - IN_PROMPT: 1 << 0 - }; - module.exports = RoleFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Role.js -var require_Role = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var { Error: Error2 } = require_errors(); - var Permissions = require_Permissions(); - var RoleFlags = require_RoleFlags(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deprecationEmittedForComparePositions = false; - var deletedRoles = new WeakSet; - var deprecationEmittedForDeleted = false; - - class Role extends Base { - constructor(client, data, guild) { - super(client); - this.guild = guild; - this.icon = null; - this.unicodeEmoji = null; - if (data) - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("name" in data) { - this.name = data.name; - } - if ("color" in data) { - this.color = data.color; - } - if ("colors" in data) { - this.colors = { - primaryColor: data.colors.primary_color, - secondaryColor: data.colors.secondary_color, - tertiaryColor: data.colors.tertiary_color - }; - } - if ("hoist" in data) { - this.hoist = data.hoist; - } - if ("position" in data) { - this.rawPosition = data.position; - } - if ("permissions" in data) { - this.permissions = new Permissions(BigInt(data.permissions)).freeze(); - } - if ("managed" in data) { - this.managed = data.managed; - } - if ("mentionable" in data) { - this.mentionable = data.mentionable; - } - if ("icon" in data) - this.icon = data.icon; - if ("unicode_emoji" in data) - this.unicodeEmoji = data.unicode_emoji; - this.tags = data.tags ? {} : null; - if (data.tags) { - if ("bot_id" in data.tags) { - this.tags.botId = data.tags.bot_id; - } - if ("integration_id" in data.tags) { - this.tags.integrationId = data.tags.integration_id; - } - if ("premium_subscriber" in data.tags) { - this.tags.premiumSubscriberRole = true; - } - if ("subscription_listing_id" in data.tags) { - this.tags.subscriptionListingId = data.tags.subscription_listing_id; - } - if ("available_for_purchase" in data.tags) { - this.tags.availableForPurchase = true; - } - if ("guild_connections" in data.tags) { - this.tags.guildConnections = true; - } - } - if ("flags" in data) { - this.flags = new RoleFlags(data.flags).freeze(); - } else { - this.flags ??= new RoleFlags().freeze(); - } - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Role#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedRoles.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Role#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedRoles.add(this); - else - deletedRoles.delete(this); - } - get hexColor() { - return `#${this.colors.primaryColor.toString(16).padStart(6, "0")}`; - } - get members() { - return this.guild.members.cache.filter((m) => m.roles.cache.has(this.id)); - } - get editable() { - if (this.managed) - return false; - const clientMember = this.guild.members.resolve(this.client.user); - if (!clientMember.permissions.has(Permissions.FLAGS.MANAGE_ROLES)) - return false; - return clientMember.roles.highest.comparePositionTo(this) > 0; - } - get position() { - let count = 0; - for (const role of this.guild.roles.cache.values()) { - if (this.rawPosition > role.rawPosition) - count++; - else if (this.rawPosition === role.rawPosition && BigInt(this.id) < BigInt(role.id)) - count++; - } - return count; - } - comparePositionTo(role) { - return this.guild.roles.comparePositions(this, role); - } - edit(data, reason) { - return this.guild.roles.edit(this, data, reason); - } - permissionsIn(channel, checkAdmin = true) { - channel = this.guild.channels.resolve(channel); - if (!channel) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - return channel.rolePermissions(this, checkAdmin); - } - setName(name, reason) { - return this.edit({ name }, reason); - } - setColor(color, reason) { - return this.edit({ color }, reason); - } - setColors(colors, reason) { - return this.edit({ colors, reason }); - } - setHoist(hoist = true, reason) { - return this.edit({ hoist }, reason); - } - setPermissions(permissions, reason) { - return this.edit({ permissions }, reason); - } - setMentionable(mentionable = true, reason) { - return this.edit({ mentionable }, reason); - } - setIcon(icon, reason) { - return this.edit({ icon }, reason); - } - setUnicodeEmoji(unicodeEmoji, reason) { - return this.edit({ unicodeEmoji }, reason); - } - setPosition(position, options = {}) { - return this.guild.roles.setPosition(this, position, options); - } - async delete(reason) { - await this.guild.roles.delete(this.id, reason); - return this; - } - fetchMemberIds() { - return this.guild.roles.fetchMemberIds(this.id); - } - iconURL({ format, size } = {}) { - if (!this.icon) - return null; - return this.client.rest.cdn.RoleIcon(this.id, this.icon, format, size); - } - equals(role) { - return role && this.id === role.id && this.name === role.name && this.colors.primaryColor === role.colors.primaryColor && this.colors.secondaryColor === role.colors.secondaryColor && this.colors.tertiaryColor === role.colors.tertiaryColor && this.hoist === role.hoist && this.position === role.position && this.permissions.bitfield === role.permissions.bitfield && this.managed === role.managed && this.icon === role.icon && this.unicodeEmoji === role.unicodeEmoji; - } - toString() { - if (this.id === this.guild.id) - return "@everyone"; - return `<@&${this.id}>`; - } - toJSON() { - return { - ...super.toJSON({ createdTimestamp: true }), - permissions: this.permissions.toJSON() - }; - } - static comparePositions(role1, role2) { - if (!deprecationEmittedForComparePositions) { - process2.emitWarning("The Role.comparePositions method is deprecated. Use RoleManager#comparePositions instead.", "DeprecationWarning"); - deprecationEmittedForComparePositions = true; - } - return role1.guild.roles.comparePositions(role1, role2); - } - } - exports.Role = Role; - exports.deletedRoles = deletedRoles; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildMemberRoleManager.js -var require_GuildMemberRoleManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var DataManager = require_DataManager(); - var { TypeError: TypeError2 } = require_errors(); - var { Role } = require_Role(); - - class GuildMemberRoleManager extends DataManager { - constructor(member) { - super(member.client, Role); - this.member = member; - this.guild = member.guild; - } - get cache() { - const everyone = this.guild.roles.everyone; - return this.guild.roles.cache.filter((role) => this.member._roles.includes(role.id)).set(everyone.id, everyone); - } - get hoist() { - const hoistedRoles = this.cache.filter((role) => role.hoist); - if (!hoistedRoles.size) - return null; - return hoistedRoles.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev); - } - get icon() { - const iconRoles = this.cache.filter((role) => role.icon || role.unicodeEmoji); - if (!iconRoles.size) - return null; - return iconRoles.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev); - } - get color() { - const coloredRoles = this.cache.filter((role) => role.colors.primaryColor); - if (!coloredRoles.size) - return null; - return coloredRoles.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev); - } - get highest() { - return this.cache.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev, this.cache.first()); - } - get premiumSubscriberRole() { - return this.cache.find((role) => role.tags?.premiumSubscriberRole) ?? null; - } - get botRole() { - if (!this.member.user.bot) - return null; - return this.cache.find((role) => role.tags?.botId === this.member.user.id) ?? null; - } - async add(roleOrRoles, reason) { - if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) { - const resolvedRoles = []; - for (const role of roleOrRoles.values()) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "roles", role); - resolvedRoles.push(resolvedRole); - } - const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))]; - return this.set(newRoles, reason); - } else { - roleOrRoles = this.guild.roles.resolveId(roleOrRoles); - if (roleOrRoles === null) { - throw new TypeError2("INVALID_TYPE", "roles", "Role, Snowflake or Array or Collection of Roles or Snowflakes"); - } - await this.client.api.guilds[this.guild.id].members[this.member.id].roles[roleOrRoles].put({ reason }); - const clone = this.member._clone(); - clone._roles = [...this.cache.keys(), roleOrRoles]; - return clone; - } - } - async remove(roleOrRoles, reason) { - if (roleOrRoles instanceof Collection || Array.isArray(roleOrRoles)) { - const resolvedRoles = []; - for (const role of roleOrRoles.values()) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "roles", role); - resolvedRoles.push(resolvedRole); - } - const newRoles = this.cache.filter((role) => !resolvedRoles.includes(role.id)); - return this.set(newRoles, reason); - } else { - roleOrRoles = this.guild.roles.resolveId(roleOrRoles); - if (roleOrRoles === null) { - throw new TypeError2("INVALID_TYPE", "roles", "Role, Snowflake or Array or Collection of Roles or Snowflakes"); - } - await this.client.api.guilds[this.guild.id].members[this.member.id].roles[roleOrRoles].delete({ reason }); - const clone = this.member._clone(); - const newRoles = this.cache.filter((role) => role.id !== roleOrRoles); - clone._roles = [...newRoles.keys()]; - return clone; - } - } - set(roles, reason) { - return this.member.edit({ roles }, reason); - } - clone() { - const clone = new this.constructor(this.member); - clone.member._roles = [...this.cache.keys()]; - return clone; - } - } - module.exports = GuildMemberRoleManager; -}); - -// node_modules/discord.js-selfbot-v13/src/util/GuildMemberFlags.js -var require_GuildMemberFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class GuildMemberFlags extends BitField { - } - GuildMemberFlags.FLAGS = { - DID_REJOIN: 1 << 0, - COMPLETED_ONBOARDING: 1 << 1, - BYPASSES_VERIFICATION: 1 << 2, - STARTED_ONBOARDING: 1 << 3 - }; - module.exports = GuildMemberFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildMember.js -var require_GuildMember = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var VoiceState = require_VoiceState(); - var TextBasedChannel = require_TextBasedChannel(); - var { Error: Error2 } = require_errors(); - var GuildMemberRoleManager = require_GuildMemberRoleManager(); - var GuildMemberFlags = require_GuildMemberFlags(); - var Permissions = require_Permissions(); - var deletedGuildMembers = new WeakSet; - var deprecationEmittedForDeleted = false; - - class GuildMember extends Base { - constructor(client, data, guild) { - super(client); - this.guild = guild; - this.joinedTimestamp = null; - this.premiumSinceTimestamp = null; - this.nickname = null; - this.pending = false; - this.communicationDisabledUntilTimestamp = null; - this._roles = []; - if (data) - this._patch(data); - } - _patch(data) { - if ("user" in data) { - this.user = this.client.users._add(data.user, true); - } - if ("nick" in data) - this.nickname = data.nick; - if ("avatar" in data) { - this.avatar = data.avatar; - } else if (typeof this.avatar !== "string") { - this.avatar = null; - } - if ("banner" in data) { - this.banner = data.banner; - } else { - this.banner ??= null; - } - if ("joined_at" in data) - this.joinedTimestamp = new Date(data.joined_at).getTime(); - if ("premium_since" in data) { - this.premiumSinceTimestamp = data.premium_since ? new Date(data.premium_since).getTime() : null; - } - if ("roles" in data) - this._roles = data.roles; - this.pending = data.pending ?? false; - if ("communication_disabled_until" in data) { - this.communicationDisabledUntilTimestamp = data.communication_disabled_until && Date.parse(data.communication_disabled_until); - } - if ("flags" in data) { - this.flags = new GuildMemberFlags(data.flags).freeze(); - } else { - this.flags ??= new GuildMemberFlags().freeze(); - } - if (data.avatar_decoration_data) { - this.avatarDecorationData = { - asset: data.avatar_decoration_data.asset, - skuId: data.avatar_decoration_data.sku_id - }; - } else { - this.avatarDecorationData = null; - } - } - _clone() { - const clone = super._clone(); - clone._roles = this._roles.slice(); - return clone; - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("GuildMember#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedGuildMembers.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("GuildMember#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedGuildMembers.add(this); - else - deletedGuildMembers.delete(this); - } - get partial() { - return this.joinedTimestamp === null; - } - get roles() { - return new GuildMemberRoleManager(this); - } - get voice() { - return this.guild.voiceStates.cache.get(this.id) ?? new VoiceState(this.guild, { user_id: this.id }); - } - avatarDecorationURL() { - if (!this.avatarDecorationData) - return null; - return this.client.rest.cdn.AvatarDecoration(this.avatarDecorationData.asset); - } - avatarURL({ format, size, dynamic } = {}) { - if (!this.avatar) - return null; - return this.client.rest.cdn.GuildMemberAvatar(this.guild.id, this.id, this.avatar, format, size, dynamic); - } - bannerURL({ format, size, dynamic } = {}) { - return this.banner && this.client.rest.cdn.GuildMemberBanner(this.guild.id, this.id, this.banner, format, size, dynamic); - } - displayAvatarDecorationURL() { - return this.avatarDecorationURL() ?? this.user.avatarDecorationURL(); - } - displayAvatarURL(options) { - return this.avatarURL(options) ?? this.user.displayAvatarURL(options); - } - displayBannerURL(options) { - return this.bannerURL(options) ?? this.user.bannerURL(options); - } - get joinedAt() { - return this.joinedTimestamp ? new Date(this.joinedTimestamp) : null; - } - get communicationDisabledUntil() { - return this.communicationDisabledUntilTimestamp && new Date(this.communicationDisabledUntilTimestamp); - } - get premiumSince() { - return this.premiumSinceTimestamp ? new Date(this.premiumSinceTimestamp) : null; - } - get presence() { - return this.guild.presences.cache.get(this.id) ?? null; - } - get displayColor() { - return this.roles.color?.colors.primaryColor ?? 0; - } - get displayHexColor() { - return this.roles.color?.hexColor ?? "#000000"; - } - get id() { - return this.user.id; - } - get displayName() { - return this.nickname ?? this.user.displayName; - } - get permissions() { - if (this.user.id === this.guild.ownerId) - return new Permissions(Permissions.ALL).freeze(); - return new Permissions(this.roles.cache.map((role) => role.permissions)).freeze(); - } - get manageable() { - if (this.user.id === this.guild.ownerId) - return false; - if (this.user.id === this.client.user.id) - return false; - if (this.client.user.id === this.guild.ownerId) - return true; - if (!this.guild.members.me) - throw new Error2("GUILD_UNCACHED_ME"); - return this.guild.members.me.roles.highest.comparePositionTo(this.roles.highest) > 0; - } - get kickable() { - return this.manageable && this.guild.members.me.permissions.has(Permissions.FLAGS.KICK_MEMBERS); - } - get bannable() { - return this.manageable && this.guild.members.me.permissions.has(Permissions.FLAGS.BAN_MEMBERS); - } - get moderatable() { - return !this.permissions.has(Permissions.FLAGS.ADMINISTRATOR) && this.manageable && (this.guild.members.me?.permissions.has(Permissions.FLAGS.MODERATE_MEMBERS) ?? false); - } - isCommunicationDisabled() { - return this.communicationDisabledUntilTimestamp > Date.now(); - } - permissionsIn(channel) { - channel = this.guild.channels.resolve(channel); - if (!channel) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - return channel.permissionsFor(this); - } - edit(data, reason) { - return this.guild.members.edit(this, data, reason); - } - setNickname(nick, reason) { - return this.edit({ nick }, reason); - } - setFlags(flags, reason) { - return this.edit({ flags, reason }); - } - createDM(force = false) { - return this.user.createDM(force); - } - deleteDM() { - return this.user.deleteDM(); - } - kick(reason) { - return this.guild.members.kick(this, reason); - } - ban(options) { - return this.guild.bans.create(this, options); - } - disableCommunicationUntil(communicationDisabledUntil, reason) { - return this.edit({ communicationDisabledUntil }, reason); - } - timeout(timeout, reason) { - return this.disableCommunicationUntil(timeout && Date.now() + timeout, reason); - } - fetch(force = true) { - return this.guild.members.fetch({ user: this.id, cache: true, force }); - } - equals(member) { - return member instanceof this.constructor && this.id === member.id && this.partial === member.partial && this.guild.id === member.guild.id && this.joinedTimestamp === member.joinedTimestamp && this.nickname === member.nickname && this.avatar === member.avatar && this.banner === member.banner && this.pending === member.pending && this.communicationDisabledUntilTimestamp === member.communicationDisabledUntilTimestamp && this.flags.equals(member.flags) && (this._roles === member._roles || this._roles.length === member._roles.length && this._roles.every((role, i) => role === member._roles[i])) && this.avatarDecorationData?.asset === member.avatarDecorationData?.asset && this.avatarDecorationData?.skuId === member.avatarDecorationData?.skuId; - } - toString() { - return `<@${this.nickname ? "!" : ""}${this.user.id}>`; - } - toJSON() { - const json = super.toJSON({ - guild: "guildId", - user: "userId", - displayName: true, - roles: true - }); - json.avatarURL = this.avatarURL(); - json.bannerURL = this.bannerURL(); - json.displayAvatarURL = this.displayAvatarURL(); - json.displayBannerURL = this.displayBannerURL(); - json.avatarDecorationURL = this.avatarDecorationURL(); - return json; - } - setAvatar(avatar) { - return this.edit({ avatar }); - } - setBanner(banner) { - return this.edit({ banner }); - } - setAboutMe(bio = null) { - return this.edit({ bio }); - } - } - TextBasedChannel.applyToClass(GuildMember); - exports.GuildMember = GuildMember; - exports.deletedGuildMembers = deletedGuildMembers; -}); - -// node_modules/discord.js-selfbot-v13/src/util/AttachmentFlags.js -var require_AttachmentFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class AttachmentFlags extends BitField { - } - AttachmentFlags.FLAGS = { - IS_REMIX: 1 << 2 - }; - module.exports = AttachmentFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageAttachment.js -var require_MessageAttachment = __commonJS((exports, module) => { - var AttachmentFlags = require_AttachmentFlags(); - var Util = require_Util(); - - class MessageAttachment { - constructor(attachment, name = null, data) { - this.attachment = attachment; - this.name = name; - if (data) - this._patch(data); - } - setDescription(description) { - this.description = description; - return this; - } - setFile(attachment, name = null) { - this.attachment = attachment; - this.name = name; - return this; - } - setName(name) { - this.name = name; - return this; - } - setSpoiler(spoiler = true) { - if (spoiler === this.spoiler) - return this; - if (!spoiler) { - while (this.spoiler) { - this.name = this.name.slice("SPOILER_".length); - } - return this; - } - this.name = `SPOILER_${this.name}`; - return this; - } - _patch(data) { - this.id = data.id; - if ("size" in data) { - this.size = data.size; - } - if ("url" in data) { - this.url = data.url; - } - if ("proxy_url" in data) { - this.proxyURL = data.proxy_url; - } - if ("height" in data) { - this.height = data.height; - } else { - this.height ??= null; - } - if ("width" in data) { - this.width = data.width; - } else { - this.width ??= null; - } - if ("content_type" in data) { - this.contentType = data.content_type; - } else { - this.contentType ??= null; - } - if ("description" in data) { - this.description = data.description; - } else { - this.description ??= null; - } - this.ephemeral = data.ephemeral ?? false; - if ("duration_secs" in data) { - this.duration = data.duration_secs; - } else { - this.duration ??= null; - } - if ("waveform" in data) { - this.waveform = data.waveform; - } else { - this.waveform ??= null; - } - if ("flags" in data) { - this.flags = new AttachmentFlags(data.flags).freeze(); - } else { - this.flags ??= new AttachmentFlags().freeze(); - } - if ("title" in data) { - this.title = data.title; - } else { - this.title ??= null; - } - } - get spoiler() { - return Util.basename(this.url ?? this.name).startsWith("SPOILER_"); - } - toJSON() { - return Util.flatten(this); - } - } - module.exports = MessageAttachment; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageMentions.js -var require_MessageMentions = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var { ChannelTypes } = require_Constants(); - var Util = require_Util(); - - class MessageMentions { - constructor(message, users, roles, everyone, crosspostedChannels, repliedUser) { - Object.defineProperty(this, "client", { value: message.client }); - Object.defineProperty(this, "guild", { value: message.guild }); - Object.defineProperty(this, "_content", { value: message.content }); - this.everyone = Boolean(everyone); - if (users) { - if (users instanceof Collection) { - this.users = new Collection(users); - } else { - this.users = new Collection; - for (const mention of users) { - if (mention.member && message.guild) { - message.guild.members._add(Object.assign(mention.member, { user: mention })); - } - const user = message.client.users._add(mention); - this.users.set(user.id, user); - } - } - } else { - this.users = new Collection; - } - if (roles instanceof Collection) { - this.roles = new Collection(roles); - } else if (roles) { - this.roles = new Collection; - const guild = message.guild; - if (guild) { - for (const mention of roles) { - const role = guild.roles.cache.get(mention); - if (role) - this.roles.set(role.id, role); - } - } - } else { - this.roles = new Collection; - } - this._members = null; - this._channels = null; - this._parsedUsers = null; - if (crosspostedChannels) { - if (crosspostedChannels instanceof Collection) { - this.crosspostedChannels = new Collection(crosspostedChannels); - } else { - this.crosspostedChannels = new Collection; - const channelTypes = Object.keys(ChannelTypes); - for (const d of crosspostedChannels) { - const type = channelTypes[d.type]; - this.crosspostedChannels.set(d.id, { - channelId: d.id, - guildId: d.guild_id, - type: type ?? "UNKNOWN", - name: d.name - }); - } - } - } else { - this.crosspostedChannels = new Collection; - } - this.repliedUser = repliedUser ? this.client.users._add(repliedUser) : null; - } - get members() { - if (this._members) - return this._members; - if (!this.guild) - return null; - this._members = new Collection; - this.users.forEach((user) => { - const member = this.guild.members.resolve(user); - if (member) - this._members.set(member.user.id, member); - }); - return this._members; - } - get channels() { - if (this._channels) - return this._channels; - this._channels = new Collection; - let matches; - while ((matches = this.constructor.CHANNELS_PATTERN.exec(this._content)) !== null) { - const chan = this.client.channels.cache.get(matches[1]); - if (chan) - this._channels.set(chan.id, chan); - } - return this._channels; - } - get parsedUsers() { - if (this._parsedUsers) - return this._parsedUsers; - this._parsedUsers = new Collection; - let matches; - while ((matches = this.constructor.USERS_PATTERN.exec(this._content)) !== null) { - const user = this.client.users.cache.get(matches[1]); - if (user) - this._parsedUsers.set(user.id, user); - } - return this._parsedUsers; - } - has(data, { ignoreDirect = false, ignoreRoles = false, ignoreRepliedUser = false, ignoreEveryone = false } = {}) { - const user = this.client.users.resolve(data); - if (!ignoreEveryone && user && this.everyone) - return true; - const userWasRepliedTo = user && this.repliedUser?.id === user.id; - if (!ignoreRepliedUser && userWasRepliedTo && this.users.has(user.id)) - return true; - if (!ignoreDirect) { - if (user && (!ignoreRepliedUser || this.parsedUsers.has(user.id)) && this.users.has(user.id)) - return true; - const role = this.guild?.roles.resolve(data); - if (role && this.roles.has(role.id)) - return true; - const channel = this.client.channels.resolve(data); - if (channel && this.channels.has(channel.id)) - return true; - } - if (!ignoreRoles) { - const member = this.guild?.members.resolve(data); - if (member) { - for (const mentionedRole of this.roles.values()) - if (member.roles.cache.has(mentionedRole.id)) - return true; - } - } - return false; - } - toJSON() { - return Util.flatten(this, { - members: true, - channels: true - }); - } - } - MessageMentions.EVERYONE_PATTERN = /@(everyone|here)/g; - MessageMentions.USERS_PATTERN = /<@!?(\d{17,19})>/g; - MessageMentions.ROLES_PATTERN = /<@&(\d{17,19})>/g; - MessageMentions.CHANNELS_PATTERN = /<#(\d{17,19})>/g; - module.exports = MessageMentions; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/PollAnswer.js -var require_PollAnswer = __commonJS((exports, module) => { - var Base = require_Base(); - var { Emoji } = require_Emoji(); - - class PollAnswer extends Base { - constructor(client, data, poll) { - super(client); - Object.defineProperty(this, "poll", { value: poll }); - this.id = data.answer_id; - this.text = data.poll_media.text ?? null; - Object.defineProperty(this, "_emoji", { value: data.poll_media.emoji ?? null }); - this._patch(data); - } - _patch(data) { - if ("count" in data) { - this.voteCount = data.count; - } else { - this.voteCount ??= 0; - } - } - get emoji() { - if (!this._emoji || !this._emoji.id && !this._emoji.name) - return null; - return this.client.emojis.cache.get(this._emoji.id) ?? new Emoji(this.client, this._emoji); - } - fetchVoters({ after, limit } = {}) { - return this.poll.message.channel.messages.fetchPollAnswerVoters({ - messageId: this.poll.message.id, - answerId: this.id, - after, - limit - }); - } - } - module.exports = { PollAnswer }; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Poll.js -var require_Poll = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - var { PollAnswer } = require_PollAnswer(); - var { Error: Error2 } = require_errors(); - var { PollLayoutTypes } = require_Constants(); - - class Poll extends Base { - constructor(client, data, message) { - super(client); - Object.defineProperty(this, "message", { value: message }); - this.question = { - text: data.question.text - }; - this.answers = data.answers.reduce((acc, answer) => acc.set(answer.answer_id, new PollAnswer(this.client, answer, this)), new Collection); - this.expiresTimestamp = Date.parse(data.expiry); - this.allowMultiselect = data.allow_multiselect; - this.layoutType = PollLayoutTypes[data.layout_type]; - this._patch(data); - } - _patch(data) { - if (data.results) { - this.resultsFinalized = data.results.is_finalized; - for (const answerResult of data.results.answer_counts) { - const answer = this.answers.get(answerResult.id); - answer?._patch(answerResult); - } - } else { - this.resultsFinalized ??= false; - } - } - get expiresAt() { - return new Date(this.expiresTimestamp); - } - async end() { - if (Date.now() > this.expiresTimestamp) { - throw new Error2("POLL_ALREADY_EXPIRED"); - } - return this.message.channel.messages.endPoll(this.message.id); - } - } - module.exports = { Poll }; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ReactionCollector.js -var require_ReactionCollector = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Collector = require_Collector(); - var { Events } = require_Constants(); - - class ReactionCollector extends Collector { - constructor(message, options = {}) { - super(message.client, options); - this.message = message; - this.users = new Collection; - this.total = 0; - this.empty = this.empty.bind(this); - this._handleChannelDeletion = this._handleChannelDeletion.bind(this); - this._handleThreadDeletion = this._handleThreadDeletion.bind(this); - this._handleGuildDeletion = this._handleGuildDeletion.bind(this); - this._handleMessageDeletion = this._handleMessageDeletion.bind(this); - const bulkDeleteListener = (messages) => { - if (messages.has(this.message.id)) - this.stop("messageDelete"); - }; - this.client.incrementMaxListeners(); - this.client.on(Events.MESSAGE_REACTION_ADD, this.handleCollect); - this.client.on(Events.MESSAGE_REACTION_REMOVE, this.handleDispose); - this.client.on(Events.MESSAGE_REACTION_REMOVE_ALL, this.empty); - this.client.on(Events.MESSAGE_DELETE, this._handleMessageDeletion); - this.client.on(Events.MESSAGE_BULK_DELETE, bulkDeleteListener); - this.client.on(Events.CHANNEL_DELETE, this._handleChannelDeletion); - this.client.on(Events.THREAD_DELETE, this._handleThreadDeletion); - this.client.on(Events.GUILD_DELETE, this._handleGuildDeletion); - this.once("end", () => { - this.client.removeListener(Events.MESSAGE_REACTION_ADD, this.handleCollect); - this.client.removeListener(Events.MESSAGE_REACTION_REMOVE, this.handleDispose); - this.client.removeListener(Events.MESSAGE_REACTION_REMOVE_ALL, this.empty); - this.client.removeListener(Events.MESSAGE_DELETE, this._handleMessageDeletion); - this.client.removeListener(Events.MESSAGE_BULK_DELETE, bulkDeleteListener); - this.client.removeListener(Events.CHANNEL_DELETE, this._handleChannelDeletion); - this.client.removeListener(Events.THREAD_DELETE, this._handleThreadDeletion); - this.client.removeListener(Events.GUILD_DELETE, this._handleGuildDeletion); - this.client.decrementMaxListeners(); - }); - this.on("collect", (reaction, user) => { - if (reaction.count === 1) { - this.emit("create", reaction, user); - } - this.total++; - this.users.set(user.id, user); - }); - this.on("remove", (reaction, user) => { - this.total--; - if (!this.collected.some((r) => r.users.cache.has(user.id))) - this.users.delete(user.id); - }); - } - collect(reaction) { - if (reaction.message.id !== this.message.id) - return null; - return ReactionCollector.key(reaction); - } - dispose(reaction, user) { - if (reaction.message.id !== this.message.id) - return null; - if (this.collected.has(ReactionCollector.key(reaction)) && this.users.has(user.id)) { - this.emit("remove", reaction, user); - } - return reaction.count ? null : ReactionCollector.key(reaction); - } - empty() { - this.total = 0; - this.collected.clear(); - this.users.clear(); - this.checkEnd(); - } - get endReason() { - if (this.options.max && this.total >= this.options.max) - return "limit"; - if (this.options.maxEmojis && this.collected.size >= this.options.maxEmojis) - return "emojiLimit"; - if (this.options.maxUsers && this.users.size >= this.options.maxUsers) - return "userLimit"; - return null; - } - _handleMessageDeletion(message) { - if (message.id === this.message.id) { - this.stop("messageDelete"); - } - } - _handleChannelDeletion(channel) { - if (channel.id === this.message.channelId || channel.threads?.cache.has(this.message.channelId)) { - this.stop("channelDelete"); - } - } - _handleThreadDeletion(thread) { - if (thread.id === this.message.channelId) { - this.stop("threadDelete"); - } - } - _handleGuildDeletion(guild) { - if (guild.id === this.message.guild?.id) { - this.stop("guildDelete"); - } - } - static key(reaction) { - return reaction.emoji.id ?? reaction.emoji.name; - } - } - module.exports = ReactionCollector; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Sticker.js -var require_Sticker = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var { Error: Error2 } = require_errors(); - var { StickerFormatTypes, StickerTypes } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deletedStickers = new WeakSet; - var deprecationEmittedForDeleted = false; - - class Sticker extends Base { - constructor(client, sticker) { - super(client); - this._patch(sticker); - } - _patch(sticker) { - this.id = sticker.id; - if ("description" in sticker) { - this.description = sticker.description; - } else { - this.description ??= null; - } - if ("type" in sticker) { - this.type = StickerTypes[sticker.type]; - } else { - this.type ??= null; - } - if ("format_type" in sticker) { - this.format = StickerFormatTypes[sticker.format_type]; - } - if ("name" in sticker) { - this.name = sticker.name; - } - if ("pack_id" in sticker) { - this.packId = sticker.pack_id; - } else { - this.packId ??= null; - } - if ("tags" in sticker) { - this.tags = sticker.tags.split(", "); - } else { - this.tags ??= null; - } - if ("available" in sticker) { - this.available = sticker.available; - } else { - this.available ??= null; - } - if ("guild_id" in sticker) { - this.guildId = sticker.guild_id; - } else { - this.guildId ??= null; - } - if ("user" in sticker) { - this.user = this.client.users._add(sticker.user); - } else { - this.user ??= null; - } - if ("sort_value" in sticker) { - this.sortValue = sticker.sort_value; - } else { - this.sortValue ??= null; - } - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Sticker#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedStickers.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Sticker#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedStickers.add(this); - else - deletedStickers.delete(this); - } - get partial() { - return !this.type; - } - get guild() { - return this.client.guilds.resolve(this.guildId); - } - get url() { - return this.client.rest.cdn.Sticker(this.id, this.format); - } - async fetch() { - const data = await this.client.api.stickers(this.id).get(); - this._patch(data); - return this; - } - async fetchPack() { - return (this.packId && (await this.client.fetchPremiumStickerPacks()).get(this.packId)) ?? null; - } - async fetchUser() { - if (this.partial) - await this.fetch(); - if (!this.guildId) - throw new Error2("NOT_GUILD_STICKER"); - return this.guild.stickers.fetchUser(this); - } - edit(data, reason) { - return this.guild.stickers.edit(this, data, reason); - } - async delete(reason) { - await this.guild.stickers.delete(this, reason); - return this; - } - equals(other) { - if (other instanceof Sticker) { - return other.id === this.id && other.description === this.description && other.type === this.type && other.format === this.format && other.name === this.name && other.packId === this.packId && other.tags.length === this.tags.length && other.tags.every((tag) => this.tags.includes(tag)) && other.available === this.available && other.guildId === this.guildId && other.sortValue === this.sortValue; - } else { - return other.id === this.id && other.description === this.description && other.name === this.name && other.tags === this.tags.join(", "); - } - } - } - exports.Sticker = Sticker; - exports.deletedStickers = deletedStickers; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/CachedManager.js -var require_CachedManager = __commonJS((exports, module) => { - var DataManager = require_DataManager(); - var { _cleanupSymbol } = require_Constants(); - - class CachedManager extends DataManager { - constructor(client, holds, iterable) { - super(client, holds); - Object.defineProperty(this, "_cache", { value: this.client.options.makeCache(this.constructor, this.holds) }); - let cleanup = this._cache[_cleanupSymbol]?.(); - if (cleanup) { - cleanup = cleanup.bind(this._cache); - client._cleanups.add(cleanup); - client._finalizers.register(this, { - cleanup, - message: `Garbage collection completed on ${this.constructor.name}, ` + `which had a ${this._cache.constructor.name} of ${this.holds.name}.`, - name: this.constructor.name - }); - } - if (iterable) { - for (const item of iterable) { - this._add(item); - } - } - } - get cache() { - return this._cache; - } - _add(data, cache = true, { id, extras = [] } = {}) { - const existing = this.cache.get(id ?? data.id); - if (existing) { - if (cache) { - existing._patch(data); - return existing; - } - const clone = existing._clone(); - clone._patch(data); - return clone; - } - const entry = this.holds ? new this.holds(this.client, data, ...extras) : data; - if (cache) - this.cache.set(id ?? entry.id, entry); - return entry; - } - } - module.exports = CachedManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/BaseGuildEmoji.js -var require_BaseGuildEmoji = __commonJS((exports, module) => { - var { Emoji } = require_Emoji(); - - class BaseGuildEmoji extends Emoji { - constructor(client, data, guild) { - super(client, data); - this.guild = guild; - this.requiresColons = null; - this.managed = null; - this.available = null; - this._patch(data); - } - _patch(data) { - if ("name" in data) - this.name = data.name; - if ("require_colons" in data) { - this.requiresColons = data.require_colons; - } - if ("managed" in data) { - this.managed = data.managed; - } - if ("available" in data) { - this.available = data.available; - } - } - } - module.exports = BaseGuildEmoji; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildEmojiRoleManager.js -var require_GuildEmojiRoleManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var DataManager = require_DataManager(); - var { TypeError: TypeError2 } = require_errors(); - var { Role } = require_Role(); - - class GuildEmojiRoleManager extends DataManager { - constructor(emoji) { - super(emoji.client, Role); - this.emoji = emoji; - this.guild = emoji.guild; - } - get cache() { - return this.guild.roles.cache.filter((role) => this.emoji._roles.includes(role.id)); - } - async add(roleOrRoles) { - if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) - roleOrRoles = [roleOrRoles]; - const resolvedRoles = []; - for (const role of roleOrRoles.values()) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) { - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "roles", role); - } - resolvedRoles.push(resolvedRole); - } - const newRoles = [...new Set(resolvedRoles.concat(...this.cache.keys()))]; - return this.set(newRoles); - } - async remove(roleOrRoles) { - if (!Array.isArray(roleOrRoles) && !(roleOrRoles instanceof Collection)) - roleOrRoles = [roleOrRoles]; - const resolvedRoleIds = []; - for (const role of roleOrRoles.values()) { - const roleId = this.guild.roles.resolveId(role); - if (!roleId) { - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "roles", role); - } - resolvedRoleIds.push(roleId); - } - const newRoles = [...this.cache.keys()].filter((id) => !resolvedRoleIds.includes(id)); - return this.set(newRoles); - } - set(roles) { - return this.emoji.edit({ roles }); - } - clone() { - const clone = new this.constructor(this.emoji); - clone._patch([...this.cache.keys()]); - return clone; - } - _patch(roles) { - this.emoji._roles = roles; - } - valueOf() { - return this.cache; - } - } - module.exports = GuildEmojiRoleManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildEmoji.js -var require_GuildEmoji = __commonJS((exports, module) => { - var BaseGuildEmoji = require_BaseGuildEmoji(); - var { Error: Error2 } = require_errors(); - var GuildEmojiRoleManager = require_GuildEmojiRoleManager(); - var Permissions = require_Permissions(); - - class GuildEmoji extends BaseGuildEmoji { - constructor(client, data, guild) { - super(client, data, guild); - this.author = null; - Object.defineProperty(this, "_roles", { value: [], writable: true }); - this._patch(data); - } - _clone() { - const clone = super._clone(); - clone._roles = this._roles.slice(); - return clone; - } - _patch(data) { - super._patch(data); - if (data.user) - this.author = this.client.users._add(data.user); - if (data.roles) - this._roles = data.roles; - } - get deletable() { - if (!this.guild.members.me) - throw new Error2("GUILD_UNCACHED_ME"); - return !this.managed && this.guild.members.me.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS); - } - get roles() { - return new GuildEmojiRoleManager(this); - } - fetchAuthor() { - return this.guild.emojis.fetchAuthor(this); - } - async edit(data, reason) { - const roles = data.roles?.map((r) => r.id ?? r); - const newData = await this.client.api.guilds(this.guild.id).emojis(this.id).patch({ - data: { - name: data.name, - roles - }, - reason - }); - const clone = this._clone(); - clone._patch(newData); - return clone; - } - setName(name, reason) { - return this.edit({ name }, reason); - } - async delete(reason) { - await this.guild.emojis.delete(this, reason); - return this; - } - equals(other) { - if (other instanceof GuildEmoji) { - return other.id === this.id && other.name === this.name && other.managed === this.managed && other.available === this.available && other.requiresColons === this.requiresColons && other.roles.cache.size === this.roles.cache.size && other.roles.cache.every((role) => this.roles.cache.has(role.id)); - } else { - return other.id === this.id && other.name === this.name && other.roles.length === this.roles.cache.size && other.roles.every((role) => this.roles.cache.has(role)); - } - } - } - module.exports = GuildEmoji; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ReactionEmoji.js -var require_ReactionEmoji = __commonJS((exports, module) => { - var { Emoji } = require_Emoji(); - var Util = require_Util(); - - class ReactionEmoji extends Emoji { - constructor(reaction, emoji) { - super(reaction.message.client, emoji); - this.reaction = reaction; - } - toJSON() { - return Util.flatten(this, { identifier: true }); - } - valueOf() { - return this.id; - } - } - module.exports = ReactionEmoji; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/ReactionUserManager.js -var require_ReactionUserManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { Error: Error2 } = require_errors(); - var User = require_User(); - var { ReactionTypes } = require_Constants(); - - class ReactionUserManager extends CachedManager { - constructor(reaction, iterable) { - super(reaction.client, User, iterable); - this.reaction = reaction; - } - async fetch({ limit = 100, after, type = "NORMAL" } = {}) { - const message = this.reaction.message; - const data = await this.client.api.channels[message.channelId].messages[message.id].reactions[this.reaction.emoji.identifier].get({ query: { limit, after, type: typeof type == "number" ? type : ReactionTypes[type] } }); - const users = new Collection; - for (const rawUser of data) { - const user = this.client.users._add(rawUser); - this.cache.set(user.id, user); - users.set(user.id, user); - } - return users; - } - async remove(user = this.client.user) { - const userId = this.client.users.resolveId(user); - if (!userId) - throw new Error2("REACTION_RESOLVE_USER"); - const message = this.reaction.message; - await this.client.api.channels[message.channelId].messages[message.id].reactions[this.reaction.emoji.identifier][userId === this.client.user.id ? "@me" : userId].delete(); - return this.reaction; - } - } - module.exports = ReactionUserManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessageReaction.js -var require_MessageReaction = __commonJS((exports, module) => { - var GuildEmoji = require_GuildEmoji(); - var ReactionEmoji = require_ReactionEmoji(); - var ReactionUserManager = require_ReactionUserManager(); - var Util = require_Util(); - - class MessageReaction { - constructor(client, data, message) { - Object.defineProperty(this, "client", { value: client }); - this.message = message; - this.me = data.me; - this.meBurst = Boolean(data.me_burst); - this.users = new ReactionUserManager(this, this.me ? [client.user] : []); - this._emoji = new ReactionEmoji(this, data.emoji); - this.burstColors = null; - this._patch(data); - } - _patch(data) { - if (data.burst_colors) { - this.burstColors = data.burst_colors; - } - if ("count" in data) { - this.count ??= data.count; - } - if ("count_details" in data) { - this.countDetails = { - burst: data.count_details.burst, - normal: data.count_details.normal - }; - } else { - this.countDetails ??= { burst: 0, normal: 0 }; - } - } - async remove() { - await this.client.api.channels(this.message.channelId).messages(this.message.id).reactions(this._emoji.identifier).delete(); - return this; - } - get emoji() { - if (this._emoji instanceof GuildEmoji) - return this._emoji; - if (this._emoji.id) { - const emojis = this.message.client.emojis.cache; - if (emojis.has(this._emoji.id)) { - const emoji = emojis.get(this._emoji.id); - this._emoji = emoji; - return emoji; - } - } - return this._emoji; - } - get partial() { - return this.count === null; - } - async fetch() { - const message = await this.message.fetch(); - const existing = message.reactions.cache.get(this.emoji.id ?? this.emoji.name); - this._patch(existing ?? { count: 0 }); - return this; - } - toJSON() { - return Util.flatten(this, { emoji: "emojiId", message: "messageId" }); - } - _add(user, burst) { - if (this.partial) - return; - this.users.cache.set(user.id, user); - if (!this.me || user.id !== this.message.client.user.id || this.count === 0) { - this.count++; - if (burst) - this.countDetails.burst++; - else - this.countDetails.normal++; - } - if (user.id === this.message.client.user.id) { - if (burst) - this.meBurst = true; - else - this.me = true; - } - } - _remove(user, burst) { - if (this.partial) - return; - this.users.cache.delete(user.id); - if (!this.me || user.id !== this.message.client.user.id) { - this.count--; - if (burst) - this.countDetails.burst--; - else - this.countDetails.normal--; - } - if (user.id === this.message.client.user.id) { - if (burst) - this.meBurst = false; - else - this.me = false; - } - if (this.count <= 0 && this.users.cache.size === 0) { - this.message.reactions.cache.delete(this.emoji.id ?? this.emoji.name); - } - } - } - module.exports = MessageReaction; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/ReactionManager.js -var require_ReactionManager = __commonJS((exports, module) => { - var CachedManager = require_CachedManager(); - var MessageReaction = require_MessageReaction(); - - class ReactionManager extends CachedManager { - constructor(message, iterable) { - super(message.client, MessageReaction, iterable); - this.message = message; - } - _add(data, cache) { - return super._add(data, cache, { id: data.emoji.id ?? data.emoji.name, extras: [this.message] }); - } - async removeAll() { - await this.client.api.channels(this.message.channelId).messages(this.message.id).reactions.delete(); - return this.message; - } - } - module.exports = ReactionManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Message.js -var require_Message = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var Base = require_Base(); - var BaseMessageComponent = require_BaseMessageComponent(); - var MessageAttachment = require_MessageAttachment(); - var Embed = require_MessageEmbed(); - var Mentions = require_MessageMentions(); - var MessagePayload = require_MessagePayload(); - var { Poll } = require_Poll(); - var ReactionCollector = require_ReactionCollector(); - var { Sticker } = require_Sticker(); - var Application = require_Application(); - var { Error: Error2 } = require_errors(); - var ReactionManager = require_ReactionManager(); - var { - InteractionTypes, - MessageTypes, - SystemMessageTypes, - MessageComponentTypes, - MessageReferenceTypes - } = require_Constants(); - var MessageFlags = require_MessageFlags(); - var Permissions = require_Permissions(); - var SnowflakeUtil = require_SnowflakeUtil(); - var Util = require_Util(); - var deletedMessages = new WeakSet; - var deprecationEmittedForDeleted = false; - - class Message extends Base { - constructor(client, data) { - super(client); - this.channelId = data.channel_id; - this.guildId = data.guild_id ?? this.channel?.guild?.id ?? null; - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("position" in data) { - this.position = data.position; - } else { - this.position ??= null; - } - this.createdTimestamp = this.id ? SnowflakeUtil.timestampFrom(this.id) : new Date(data.timestamp).getTime(); - if ("type" in data) { - this.type = MessageTypes[data.type]; - this.system = SystemMessageTypes.includes(this.type); - } else { - this.system ??= null; - this.type ??= null; - } - if ("content" in data) { - this.content = data.content; - } else { - this.content ??= null; - } - if ("author" in data) { - this.author = this.client.users._add(data.author, !data.webhook_id); - } else { - this.author ??= null; - } - if ("pinned" in data) { - this.pinned = Boolean(data.pinned); - } else { - this.pinned ??= null; - } - if ("tts" in data) { - this.tts = data.tts; - } else { - this.tts ??= null; - } - if ("nonce" in data) { - this.nonce = data.nonce; - } else { - this.nonce ??= null; - } - if ("embeds" in data) { - this.embeds = data.embeds.map((e) => new Embed(e, true)); - } else { - this.embeds = this.embeds?.slice() ?? []; - } - if ("components" in data) { - this.components = data.components.map((c) => BaseMessageComponent.create(c, this.client)); - } else { - this.components = this.components?.slice() ?? []; - } - if ("attachments" in data) { - this.attachments = new Collection; - if (data.attachments) { - for (const attachment of data.attachments) { - this.attachments.set(attachment.id, new MessageAttachment(attachment.url, attachment.filename, attachment)); - } - } - } else { - this.attachments = new Collection(this.attachments); - } - if ("sticker_items" in data || "stickers" in data) { - this.stickers = new Collection((data.sticker_items ?? data.stickers)?.map((s) => [s.id, new Sticker(this.client, s)])); - } else { - this.stickers = new Collection(this.stickers); - } - if (data.edited_timestamp) { - this.editedTimestamp = data.edited_timestamp ? Date.parse(data.edited_timestamp) : null; - } else { - this.editedTimestamp ??= null; - } - if ("reactions" in data) { - this.reactions = new ReactionManager(this); - if (data.reactions?.length > 0) { - for (const reaction of data.reactions) { - this.reactions._add(reaction); - } - } - } else { - this.reactions ??= new ReactionManager(this); - } - if (!this.mentions) { - this.mentions = new Mentions(this, data.mentions, data.mention_roles, data.mention_everyone, data.mention_channels, data.referenced_message?.author); - } else { - this.mentions = new Mentions(this, data.mentions ?? this.mentions.users, data.mention_roles ?? this.mentions.roles, data.mention_everyone ?? this.mentions.everyone, data.mention_channels ?? this.mentions.crosspostedChannels, data.referenced_message?.author ?? this.mentions.repliedUser); - } - if ("webhook_id" in data) { - this.webhookId = data.webhook_id; - } else { - this.webhookId ??= null; - } - if (data.poll) { - this.poll = new Poll(this.client, data.poll, this); - } else { - this.poll ??= null; - } - if ("application" in data) { - this.groupActivityApplication = new Application(this.client, data.application); - } else { - this.groupActivityApplication ??= null; - } - if ("application_id" in data) { - this.applicationId = data.application_id; - } else { - this.applicationId ??= null; - } - if ("activity" in data) { - this.activity = { - partyId: data.activity.party_id, - type: data.activity.type - }; - } else { - this.activity ??= null; - } - if ("thread" in data) { - this.client.channels._add(data.thread, this.guild); - } - if (this.member && data.member) { - this.member._patch(data.member); - } else if (data.member && this.guild && this.author) { - this.guild.members._add(Object.assign(data.member, { user: this.author })); - } - if ("flags" in data) { - this.flags = new MessageFlags(data.flags).freeze(); - } else { - this.flags = new MessageFlags(this.flags).freeze(); - } - if ("message_reference" in data) { - this.reference = { - channelId: data.message_reference.channel_id, - guildId: data.message_reference.guild_id, - messageId: data.message_reference.message_id, - type: MessageReferenceTypes[data.message_reference.type ?? 0] - }; - } else { - this.reference ??= null; - } - if (data.referenced_message) { - this.channel?.messages._add({ guild_id: data.message_reference?.guild_id, ...data.referenced_message }); - } - if (data.interaction) { - this.interaction = { - id: data.interaction.id, - type: InteractionTypes[data.interaction.type], - commandName: data.interaction.name, - user: this.client.users._add(data.interaction.user) - }; - } else { - this.interaction ??= null; - } - if (data.message_snapshots) { - this.messageSnapshots = data.message_snapshots.reduce((coll, snapshot) => { - const channel = this.client.channels.cache.get(this.reference.channelId); - const snapshotData = { - ...snapshot.message, - id: this.reference.messageId, - channel_id: this.reference.channelId, - guild_id: this.reference.guildId - }; - return coll.set(this.reference.messageId, channel ? channel.messages._add(snapshotData) : new this.constructor(this.client, snapshotData)); - }, new Collection); - } else { - this.messageSnapshots ??= new Collection; - } - if (data.call) { - this.call = { - endedTimestamp: data.call.ended_timestamp ? Date.parse(data.call.ended_timestamp) : null, - participants: data.call.participants, - get endedAt() { - return this.endedTimestamp && new Date(this.endedTimestamp); - } - }; - } else { - this.call ??= null; - } - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Message#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedMessages.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Message#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedMessages.add(this); - else - deletedMessages.delete(this); - } - get channel() { - return this.client.channels.cache.get(this.channelId) ?? null; - } - get partial() { - return typeof this.content !== "string" || !this.author; - } - get member() { - return this.guild?.members.resolve(this.author) ?? null; - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get editedAt() { - return this.editedTimestamp ? new Date(this.editedTimestamp) : null; - } - get guild() { - return this.client.guilds.cache.get(this.guildId) ?? this.channel?.guild ?? null; - } - get hasThread() { - return this.flags.has(MessageFlags.FLAGS.HAS_THREAD); - } - get thread() { - return this.channel?.threads?.cache.get(this.id) ?? null; - } - get url() { - return `https://discord.com/channels/${this.guildId ?? "@me"}/${this.channelId}/${this.id}`; - } - get cleanContent() { - return this.content != null && this.channel ? Util.cleanContent(this.content, this.channel) : null; - } - createReactionCollector(options = {}) { - return new ReactionCollector(this, options); - } - awaitReactions(options = {}) { - return new Promise((resolve, reject) => { - const collector = this.createReactionCollector(options); - collector.once("end", (reactions, reason) => { - if (options.errors?.includes(reason)) - reject(reactions); - else - resolve(reactions); - }); - }); - } - get editable() { - const precheck = Boolean(this.author.id === this.client.user.id && !deletedMessages.has(this) && (!this.guild || this.channel?.viewable) && this.reference?.type !== "FORWARD"); - if (this.channel?.isThread()) { - if (this.channel.archived) - return false; - if (this.channel.locked) { - const permissions = this.channel.permissionsFor(this.client.user); - if (!permissions?.has(Permissions.FLAGS.MANAGE_THREADS, true)) - return false; - } - } - return precheck; - } - get deletable() { - if (deletedMessages.has(this)) { - return false; - } - if (!this.guild) { - return this.author.id === this.client.user.id; - } - if (!this.channel?.viewable) { - return false; - } - const permissions = this.channel?.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - return Boolean(this.author.id === this.client.user.id || permissions.has(Permissions.FLAGS.MANAGE_MESSAGES, false) && this.guild.members.me.communicationDisabledUntilTimestamp < Date.now()); - } - get bulkDeletable() { - return false; - } - get pinnable() { - const { channel } = this; - return Boolean(!this.system && !deletedMessages.has(this) && (!this.guild || channel?.viewable && channel?.permissionsFor(this.client.user)?.has(Permissions.FLAGS.MANAGE_MESSAGES, false))); - } - async fetchReference() { - if (!this.reference) - throw new Error2("MESSAGE_REFERENCE_MISSING"); - const { channelId, messageId } = this.reference; - if (!messageId) - throw new Error2("MESSAGE_REFERENCE_MISSING"); - const channel = this.client.channels.resolve(channelId); - if (!channel) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - const message = await channel.messages.fetch(messageId); - return message; - } - get crosspostable() { - const bitfield = Permissions.FLAGS.SEND_MESSAGES | (this.author.id === this.client.user.id ? Permissions.defaultBit : Permissions.FLAGS.MANAGE_MESSAGES); - const { channel } = this; - return Boolean(channel?.type === "GUILD_NEWS" && !this.flags.has(MessageFlags.FLAGS.CROSSPOSTED) && this.reference?.type !== "FORWARD" && this.type === "DEFAULT" && !this.poll && channel.viewable && channel.permissionsFor(this.client.user)?.has(bitfield, false) && !deletedMessages.has(this)); - } - async edit(options) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - return this.channel.messages.edit(this, options); - } - async crosspost() { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - return this.channel.messages.crosspost(this.id); - } - async pin(reason) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - await this.channel.messages.pin(this.id, reason); - return this; - } - async unpin(reason) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - await this.channel.messages.unpin(this.id, reason); - return this; - } - async react(emoji, burst = false) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - await this.channel.messages.react(this.id, emoji, burst); - return this.client.actions.MessageReactionAdd.handle({ - [this.client.actions.injectedUser]: this.client.user, - [this.client.actions.injectedChannel]: this.channel, - [this.client.actions.injectedMessage]: this, - emoji: Util.resolvePartialEmoji(emoji), - me_burst: burst - }, true).reaction; - } - async delete() { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - await this.channel.messages.delete(this.id); - return this; - } - async reply(options) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - let data; - if (options instanceof MessagePayload) { - data = options; - } else { - data = MessagePayload.create(this, options, { - reply: { - messageReference: this, - failIfNotExists: options?.failIfNotExists ?? this.client.options.failIfNotExists - } - }); - } - return this.channel.send(data); - } - forward(channel) { - const resolvedChannel = this.client.channels.resolve(channel); - if (!resolvedChannel) - throw new Error2("INVALID_TYPE", "channel", "TextBasedChannelResolvable"); - return resolvedChannel.send({ - forward: { - message: this.id, - channel: this.channelId, - guild: this.guildId - } - }); - } - async startThread(options = {}) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - if (!["GUILD_TEXT", "GUILD_NEWS"].includes(this.channel.type)) { - throw new Error2("MESSAGE_THREAD_PARENT"); - } - if (this.hasThread) - throw new Error2("MESSAGE_EXISTING_THREAD"); - return this.channel.threads.create({ ...options, startMessage: this }); - } - vote(...ids) { - return this.client.api.channels(this.channel.id).polls(this.id).answers["@me"].put({ - data: { - answer_ids: ids.flat(1).map((value) => value.toString()) - } - }); - } - async fetch(force = true) { - if (!this.channel) - throw new Error2("CHANNEL_NOT_CACHED"); - return this.channel.messages.fetch(this.id, { force }); - } - async fetchWebhook() { - if (!this.webhookId) - throw new Error2("WEBHOOK_MESSAGE"); - if (this.webhookId === this.applicationId) - throw new Error2("WEBHOOK_APPLICATION"); - return this.client.fetchWebhook(this.webhookId); - } - suppressEmbeds(suppress = true) { - const flags = new MessageFlags(this.flags.bitfield); - if (suppress) { - flags.add(MessageFlags.FLAGS.SUPPRESS_EMBEDS); - } else { - flags.remove(MessageFlags.FLAGS.SUPPRESS_EMBEDS); - } - return this.edit({ flags }); - } - removeAttachments() { - return this.edit({ attachments: [] }); - } - resolveComponent(customId) { - return this.components.flatMap(BaseMessageComponent.extractInteractiveComponents).find((component) => (component.customId ?? component.custom_id) === customId) ?? null; - } - equals(message, rawData) { - if (!message) - return false; - const embedUpdate = !message.author && !message.attachments; - if (embedUpdate) - return this.id === message.id && this.embeds.length === message.embeds.length; - let equal = this.id === message.id && this.author.id === message.author.id && this.content === message.content && this.tts === message.tts && this.nonce === message.nonce && this.embeds.length === message.embeds.length && this.attachments.size === message.attachments.size && this.attachments.every((attachment) => message.attachments.has(attachment.id)) && this.embeds.every((embed, index) => embed.equals(message.embeds[index])); - if (equal && rawData) { - equal = this.mentions.everyone === message.mentions.everyone && this.createdTimestamp === new Date(rawData.timestamp).getTime() && this.editedTimestamp === new Date(rawData.edited_timestamp).getTime(); - } - return equal; - } - inGuild() { - return Boolean(this.guildId); - } - toString() { - return this.content; - } - toJSON() { - return super.toJSON({ - channel: "channelId", - author: "authorId", - groupActivityApplication: "groupActivityApplicationId", - guild: "guildId", - cleanContent: true, - member: false, - reactions: false - }); - } - get isMessage() { - return true; - } - clickButton(buttonid) { - const button = this.resolveComponent(buttonid); - if (!button || button.type !== "BUTTON") - throw new TypeError("BUTTON_NOT_FOUND"); - if (button.disabled) - throw new TypeError("BUTTON_CANNOT_CLICK"); - const nonce = SnowflakeUtil.generate(); - const data = { - type: InteractionTypes.MESSAGE_COMPONENT, - nonce, - guild_id: this.guildId, - channel_id: this.channelId, - message_id: this.id, - application_id: this.applicationId ?? this.author.id, - session_id: this.client.sessionId, - message_flags: this.flags.bitfield, - data: { - component_type: MessageComponentTypes.BUTTON, - custom_id: button.customId - } - }; - this.client.api.interactions.post({ - data - }); - return Util.createPromiseInteraction(this.client, nonce, 5000, true, this); - } - selectMenu(menu, values = []) { - let selectMenu = menu; - if (/[0-4]/.test(menu)) { - selectMenu = this.components[menu]?.components[0]; - } else if (typeof menu == "string") { - selectMenu = this.components.flatMap((row) => row.components).find((b) => ["STRING_SELECT", "USER_SELECT", "ROLE_SELECT", "MENTIONABLE_SELECT", "CHANNEL_SELECT"].includes(b.type) && b.customId == menu && !b.disabled); - } - if (values.length < selectMenu.minValues) { - throw new RangeError(`[SELECT_MENU_MIN_VALUES] The minimum number of values is ${selectMenu.minValues}`); - } - if (values.length > selectMenu?.maxValues) { - throw new RangeError(`[SELECT_MENU_MAX_VALUES] The maximum number of values is ${selectMenu.maxValues}`); - } - values = values.map((value) => { - switch (selectMenu.type) { - case "STRING_SELECT": { - return selectMenu.options.find((obj) => obj.value === value || obj.label === value).value; - } - case "USER_SELECT": { - return this.client.users.resolveId(value); - } - case "ROLE_SELECT": { - return this.guild.roles.resolveId(value); - } - case "MENTIONABLE_SELECT": { - return this.client.users.resolveId(value) || this.guild.roles.resolveId(value); - } - case "CHANNEL_SELECT": { - return this.client.channels.resolveId(value); - } - default: { - return value; - } - } - }); - const nonce = SnowflakeUtil.generate(); - const data = { - type: InteractionTypes.MESSAGE_COMPONENT, - guild_id: this.guildId, - channel_id: this.channelId, - message_id: this.id, - application_id: this.applicationId ?? this.author.id, - session_id: this.client.sessionId, - message_flags: this.flags.bitfield, - data: { - component_type: MessageComponentTypes[selectMenu.type], - custom_id: selectMenu.customId, - type: MessageComponentTypes[selectMenu.type], - values - }, - nonce - }; - this.client.api.interactions.post({ - data - }); - return Util.createPromiseInteraction(this.client, nonce, 5000, true, this); - } - markUnread() { - return this.client.api.channels[this.channelId].messages[this.id].ack.post({ - data: { - manual: true, - mention_count: 1 - } - }); - } - markRead() { - return this.client.api.channels[this.channelId].messages[this.id].ack.post({ - data: { - token: null - } - }); - } - report(breadcrumbs, elements = {}) { - return this.client.api.reporting.message.post({ - data: { - version: "1.0", - variant: "4", - language: "en", - breadcrumbs, - elements, - channel_id: this.channelId, - message_id: this.id, - name: "message" - } - }); - } - } - exports.Message = Message; - exports.deletedMessages = deletedMessages; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/MessageManager.js -var require_MessageManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2 } = require_errors(); - var { Message } = require_Message(); - var MessagePayload = require_MessagePayload(); - var Util = require_Util(); - - class MessageManager extends CachedManager { - constructor(channel, iterable) { - super(channel.client, Message, iterable); - this.channel = channel; - } - _add(data, cache) { - return super._add(data, cache); - } - fetch(message, { cache = true, force = false } = {}) { - return typeof message === "string" ? this._fetchId(message, cache, force) : this._fetchMany(message, cache); - } - async fetchPinned(cache = true) { - const data = await this.client.api.channels[this.channel.id].messages.pins.get({ - query: { limit: 50 } - }); - const messages = new Collection; - for (const message of data?.items || []) - messages.set(message.id, this._add(message, cache)); - return messages; - } - async edit(message, options) { - const messageId = this.resolveId(message); - if (!messageId) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - const { data, files } = await (options instanceof MessagePayload ? options : MessagePayload.create(message instanceof Message ? message : this, options)).resolveData().resolveFiles(); - const attachments = await Util.getUploadURL(this.client, this.channel.id, files); - const requestPromises = attachments.map(async (attachment) => { - await Util.uploadFile(files[attachment.id].file, attachment.upload_url); - return { - id: attachment.id, - filename: files[attachment.id].name, - uploaded_filename: attachment.upload_filename, - description: files[attachment.id].description, - duration_secs: files[attachment.id].duration_secs, - waveform: files[attachment.id].waveform - }; - }); - const attachmentsData = await Promise.all(requestPromises); - attachmentsData.sort((a, b) => parseInt(a.id) - parseInt(b.id)); - data.attachments = attachmentsData; - const d = await this.client.api.channels[this.channel.id].messages[messageId].patch({ data }); - const existing = this.cache.get(messageId); - if (existing) { - const clone = existing._clone(); - clone._patch(d); - return clone; - } - return this._add(d); - } - async crosspost(message) { - message = this.resolveId(message); - if (!message) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - const data = await this.client.api.channels(this.channel.id).messages(message).crosspost.post(); - return this.cache.get(data.id) ?? this._add(data); - } - async pin(message, reason) { - message = this.resolveId(message); - if (!message) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - await this.client.api.channels(this.channel.id).messages.pins(message).put({ reason }); - } - async unpin(message, reason) { - message = this.resolveId(message); - if (!message) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - await this.client.api.channels(this.channel.id).messages.pins(message).delete({ reason }); - } - async react(message, emoji, burst = false) { - message = this.resolveId(message); - if (!message) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - emoji = Util.resolvePartialEmoji(emoji); - if (!emoji) - throw new TypeError2("EMOJI_TYPE", "emoji", "EmojiIdentifierResolvable"); - const emojiId = emoji.id ? `${emoji.animated ? "a:" : ""}${emoji.name}:${emoji.id}` : encodeURIComponent(emoji.name); - await this.client.api.channels(this.channel.id).messages(message).reactions(emojiId, "@me").put({ - query: { - type: burst ? 1 : 0 - } - }); - } - async delete(message) { - message = this.resolveId(message); - if (!message) - throw new TypeError2("INVALID_TYPE", "message", "MessageResolvable"); - await this.client.api.channels(this.channel.id).messages(message).delete(); - } - _fetchId(messageId, cache, force) { - if (!force) { - const existing = this.cache.get(messageId); - if (existing && !existing.partial) - return existing; - } - return new Promise((resolve, reject) => { - this._fetchMany({ - around: messageId, - limit: 50 - }, cache).then((data_) => data_.has(messageId) ? resolve(data_.get(messageId)) : reject(new Error("MESSAGE_ID_NOT_FOUND"))).catch(reject); - }); - } - async search(options = {}) { - let { authors, content, mentions, has, maxId, minId, channels, pinned, nsfw, offset, limit, sortBy, sortOrder } = Object.assign({ - authors: [], - content: "", - mentions: [], - has: [], - maxId: null, - minId: null, - channels: [], - pinned: false, - nsfw: false, - offset: 0, - limit: 25, - sortBy: "timestamp", - sortOrder: "desc" - }, options); - if (authors.length > 0) - authors = authors.map((u) => this.client.users.resolveId(u)); - if (mentions.length > 0) - mentions = mentions.map((u) => this.client.users.resolveId(u)); - if (channels.length > 0) { - channels = channels.map((c) => this.client.channels.resolveId(c)).filter((id) => { - if (this.channel.guildId) { - const c = this.channel.guild.channels.cache.get(id); - if (!c || !c.messages) - return false; - const perm = c.permissionsFor(this.client.user); - if (!perm.has("READ_MESSAGE_HISTORY") || !perm.has("VIEW_CHANNEL")) - return false; - return true; - } else { - return true; - } - }); - } - if (limit && limit > 25) - throw new RangeError("MESSAGE_SEARCH_LIMIT"); - let stringQuery = []; - const result = new Collection; - let data; - if (authors.length > 0) - stringQuery.push(authors.map((id) => `author_id=${id}`).join("&")); - if (content && content.length) - stringQuery.push(`content=${encodeURIComponent(content)}`); - if (mentions.length > 0) - stringQuery.push(mentions.map((id) => `mentions=${id}`).join("&")); - has = has.filter((v) => ["link", "embed", "file", "video", "image", "sound", "sticker"].includes(v)); - if (has.length > 0) - stringQuery.push(has.map((v) => `has=${v}`).join("&")); - if (maxId) - stringQuery.push(`max_id=${maxId}`); - if (minId) - stringQuery.push(`min_id=${minId}`); - if (nsfw) - stringQuery.push("include_nsfw=true"); - if (offset !== 0) - stringQuery.push(`offset=${offset}`); - if (limit !== 25) - stringQuery.push(`limit=${limit}`); - if (["timestamp", "relevance"].includes(options.sortBy)) { - stringQuery.push(`sort_by=${options.sortBy}`); - } else { - stringQuery.push("sort_by=timestamp"); - } - if (["asc", "desc"].includes(options.sortOrder)) { - stringQuery.push(`sort_order=${options.sortOrder}`); - } else { - stringQuery.push("sort_order=desc"); - } - if (this.channel.guildId && channels.length > 0) { - stringQuery.push(channels.map((id) => `channel_id=${id}`).join("&")); - } - if (typeof pinned == "boolean") - stringQuery.push(`pinned=${pinned}`); - if (!stringQuery.length) { - return { - messages: result, - total: 0 - }; - } - if (this.channel.guildId) { - data = await this.client.api.guilds[this.channel.guildId].messages[`search?${stringQuery.join("&")}`].get(); - } else { - stringQuery = stringQuery.filter((v) => !v.startsWith("channel_id") && !v.startsWith("include_nsfw")); - data = await this.client.api.channels[this.channel.id].messages[`search?${stringQuery.join("&")}`].get(); - } - for await (const message of data.messages) - result.set(message[0].id, new Message(this.client, message[0])); - return { - messages: result, - total: data.total_results - }; - } - async _fetchMany(options = {}, cache) { - const data = await this.client.api.channels[this.channel.id].messages.get({ query: options }); - const messages = new Collection; - for (const message of data) - messages.set(message.id, this._add(message, cache)); - return messages; - } - async endPoll(messageId) { - const message = await this.client.api.channels(this.channel.id).polls(messageId).expire.post(); - return this._add(message, false); - } - async fetchPollAnswerVoters({ messageId, answerId, after, limit }) { - const voters = await this.client.channels(this.channel.id).polls(messageId).answers(answerId).get({ - query: { limit, after } - }); - return voters.users.reduce((acc, user) => acc.set(user.id, this.client.users._add(user, false)), new Collection); - } - } - module.exports = MessageManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Interaction.js -var require_Interaction = __commonJS((exports, module) => { - var Base = require_Base(); - var { InteractionTypes, MessageComponentTypes, ApplicationCommandTypes } = require_Constants(); - var Permissions = require_Permissions(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class Interaction extends Base { - constructor(client, data) { - super(client); - this.type = InteractionTypes[data.type]; - this.id = data.id; - Object.defineProperty(this, "token", { value: data.token }); - this.applicationId = data.application_id; - this.channelId = data.channel_id ?? null; - this.guildId = data.guild_id ?? null; - this.user = this.client.users._add(data.user ?? data.member.user); - this.member = data.member ? this.guild?.members._add(data.member) ?? data.member : null; - this.version = data.version; - this.appPermissions = data.app_permissions ? new Permissions(data.app_permissions).freeze() : null; - this.memberPermissions = data.member?.permissions ? new Permissions(data.member.permissions).freeze() : null; - this.locale = data.locale; - this.guildLocale = data.guild_locale ?? null; - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get channel() { - return this.client.channels.cache.get(this.channelId) ?? null; - } - get guild() { - return this.client.guilds.cache.get(this.guildId) ?? null; - } - inGuild() { - return Boolean(this.guildId && this.member); - } - inCachedGuild() { - return Boolean(this.guild && this.member); - } - inRawGuild() { - return Boolean(this.guildId && !this.guild && this.member); - } - isApplicationCommand() { - return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND; - } - isCommand() { - return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND && typeof this.targetId === "undefined"; - } - isContextMenu() { - return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND && typeof this.targetId !== "undefined"; - } - isModalSubmit() { - return InteractionTypes[this.type] === InteractionTypes.MODAL_SUBMIT; - } - isUserContextMenu() { - return this.isContextMenu() && ApplicationCommandTypes[this.targetType] === ApplicationCommandTypes.USER; - } - isMessageContextMenu() { - return this.isContextMenu() && ApplicationCommandTypes[this.targetType] === ApplicationCommandTypes.MESSAGE; - } - isAutocomplete() { - return InteractionTypes[this.type] === InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE; - } - isMessageComponent() { - return InteractionTypes[this.type] === InteractionTypes.MESSAGE_COMPONENT; - } - isButton() { - return InteractionTypes[this.type] === InteractionTypes.MESSAGE_COMPONENT && MessageComponentTypes[this.componentType] === MessageComponentTypes.BUTTON; - } - isSelectMenu() { - return InteractionTypes[this.type] === InteractionTypes.MESSAGE_COMPONENT && MessageComponentTypes[this.componentType] === MessageComponentTypes.SELECT_MENU; - } - isRepliable() { - return ![InteractionTypes.PING, InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE].includes(InteractionTypes[this.type]); - } - } - module.exports = Interaction; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/InteractionWebhook.js -var require_InteractionWebhook = __commonJS((exports, module) => { - var Webhook = require_Webhook(); - - class InteractionWebhook { - constructor(client, id, token) { - Object.defineProperty(this, "client", { value: client }); - this.id = id; - Object.defineProperty(this, "token", { value: token, writable: true, configurable: true }); - } - send() { - } - fetchMessage() { - } - editMessage() { - } - deleteMessage() { - } - get url() { - } - } - Webhook.applyToClass(InteractionWebhook, ["sendSlackMessage", "edit", "delete", "createdTimestamp", "createdAt"]); - module.exports = InteractionWebhook; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MessagePayload.js -var require_MessagePayload = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var BaseMessageComponent = require_BaseMessageComponent(); - var MessageEmbed = require_MessageEmbed(); - var { RangeError: RangeError2, Error: DjsError } = require_errors(); - var ActivityFlags = require_ActivityFlags(); - var { PollLayoutTypes, MessageReferenceTypes } = require_Constants(); - var DataResolver = require_DataResolver(); - var MessageFlags = require_MessageFlags(); - var SnowflakeUtil = require_SnowflakeUtil(); - var Util = require_Util(); - - class MessagePayload { - constructor(target, options) { - this.target = target; - this.options = options; - this.data = null; - this.files = null; - } - get isWebhook() { - const Webhook = require_Webhook(); - const WebhookClient = require_WebhookClient(); - return this.target instanceof Webhook || this.target instanceof WebhookClient; - } - get isUser() { - const User = require_User(); - const { GuildMember } = require_GuildMember(); - return this.target instanceof User || this.target instanceof GuildMember; - } - get isMessage() { - const { Message } = require_Message(); - return this.target instanceof Message; - } - get isMessageManager() { - const MessageManager = require_MessageManager(); - return this.target instanceof MessageManager; - } - get isInteraction() { - const Interaction = require_Interaction(); - const InteractionWebhook = require_InteractionWebhook(); - return this.target instanceof Interaction || this.target instanceof InteractionWebhook; - } - makeContent() { - let content; - if (this.options.content === null) { - content = ""; - } else if (typeof this.options.content !== "undefined") { - content = Util.verifyString(this.options.content, RangeError2, "MESSAGE_CONTENT_TYPE", false); - } - return content; - } - resolveData() { - if (this.data) - return this; - const isInteraction = this.isInteraction; - const isWebhook = this.isWebhook; - const content = this.makeContent(); - const tts = Boolean(this.options.tts); - let nonce = SnowflakeUtil.generate(); - if (typeof this.options.nonce !== "undefined") { - nonce = this.options.nonce; - if (typeof nonce === "number" ? !Number.isInteger(nonce) : typeof nonce !== "string") { - throw new RangeError2("MESSAGE_NONCE_TYPE"); - } - } - const components = this.options.components?.map((c) => BaseMessageComponent.create(c).toJSON()); - let username; - let avatarURL; - let threadName; - let appliedTags; - if (isWebhook) { - username = this.options.username ?? this.target.name; - if (this.options.avatarURL) - avatarURL = this.options.avatarURL; - if (this.options.threadName) - threadName = this.options.threadName; - if (this.options.appliedTags) - appliedTags = this.options.appliedTags; - } - let flags; - if (this.options.flags != null) { - flags = new MessageFlags(this.options.flags).bitfield; - } - if (isInteraction && this.options.ephemeral) { - flags |= MessageFlags.FLAGS.EPHEMERAL; - } - let allowedMentions = typeof this.options.allowedMentions === "undefined" ? this.target.client.options.allowedMentions : this.options.allowedMentions; - if (allowedMentions) { - allowedMentions = Util.cloneObject(allowedMentions); - allowedMentions.replied_user = allowedMentions.repliedUser; - delete allowedMentions.repliedUser; - } - let message_reference; - if (typeof this.options.reply === "object") { - const reference = this.options.reply.messageReference; - const message_id = this.isMessage ? reference.id ?? reference : this.target.messages.resolveId(reference); - if (message_id) { - message_reference = { - message_id, - type: MessageReferenceTypes.DEFAULT, - fail_if_not_exists: this.options.reply.failIfNotExists ?? this.target.client.options.failIfNotExists - }; - } - } - if (typeof this.options.forward === "object") { - const reference = this.options.forward.message; - const channel_id = reference.channelId ?? this.target.client.channels.resolveId(this.options.forward.channel); - const guild_id = reference.guildId ?? this.target.client.guilds.resolveId(this.options.forward.guild); - const message_id = this.target.messages.resolveId(reference); - if (message_id) { - if (!channel_id) - throw new DjsError("INVALID_TYPE", "channelId", "TextBasedChannelResolvable"); - message_reference = { - type: MessageReferenceTypes.FORWARD, - message_id, - channel_id, - guild_id: guild_id ?? undefined - }; - } - } - const attachments = this.options.files?.map((file, index) => ({ - id: index.toString(), - description: file.description - })); - if (Array.isArray(this.options.attachments)) { - this.options.attachments.push(...attachments ?? []); - } else { - this.options.attachments = attachments; - } - let activity; - if (this.options.activity instanceof Object && typeof this.options.activity.partyId == "string" && this.options.activity.type) { - const type = ActivityFlags.resolve(this.options.activity.type); - const sessionId = this.target.client.sessionId; - const partyId = this.options.activity.partyId; - activity = { - type, - party_id: partyId, - session_id: sessionId - }; - } - let poll; - if (this.options.poll) { - poll = { - question: { - text: this.options.poll.question.text - }, - answers: this.options.poll.answers.map((answer) => ({ - poll_media: { text: answer.text, emoji: Util.resolvePartialEmoji(answer.emoji) } - })), - duration: this.options.poll.duration, - allow_multiselect: this.options.poll.allowMultiselect, - layout_type: typeof this.options.poll.layoutType == "number" ? this.options.poll.layoutType : PollLayoutTypes[this.options.poll.layoutType] - }; - } - this.data = { - activity, - content, - tts, - nonce, - embeds: this.options.embeds?.map((embed) => new MessageEmbed(embed).toJSON()), - components, - username, - avatar_url: avatarURL, - allowed_mentions: this.isMessage && message_reference === undefined && this.target?.author?.id !== this.target?.client?.user?.id ? undefined : allowedMentions, - flags, - message_reference, - attachments: this.options.attachments, - sticker_ids: this.options.stickers?.map((sticker) => sticker.id ?? sticker), - thread_name: threadName, - applied_tags: appliedTags, - poll - }; - return this; - } - async resolveFiles() { - if (this.files) - return this; - this.files = await Promise.all(this.options.files?.map((file) => this.constructor.resolveFile(file)) ?? []); - return this; - } - static async resolveFile(fileLike) { - let attachment; - let name; - const findName = (thing) => { - if (typeof thing === "string") { - return Util.basename(thing); - } - if (thing.path) { - return Util.basename(thing.path); - } - return "file.jpg"; - }; - const ownAttachment = typeof fileLike === "string" || fileLike instanceof Buffer2 || typeof fileLike.pipe === "function"; - if (ownAttachment) { - attachment = fileLike; - name = findName(attachment); - } else { - attachment = fileLike.attachment; - name = fileLike.name ?? findName(attachment); - } - const resource = await DataResolver.resolveFile(attachment); - return { - attachment, - name, - file: resource, - description: fileLike.description, - duration_secs: fileLike.duration, - waveform: fileLike.waveform - }; - } - static create(target, options, extra = {}) { - return new this(target, typeof options !== "object" || options === null ? { content: options, ...extra } : { ...options, ...extra }); - } - } - module.exports = MessagePayload; -}); - -// node_modules/lodash/isArray.js -var require_isArray = __commonJS((exports, module) => { - var isArray = Array.isArray; - module.exports = isArray; -}); - -// node_modules/lodash/_freeGlobal.js -var require__freeGlobal = __commonJS((exports, module) => { - var freeGlobal = typeof global == "object" && global && global.Object === Object && global; - module.exports = freeGlobal; -}); - -// node_modules/lodash/_root.js -var require__root = __commonJS((exports, module) => { - var freeGlobal = require__freeGlobal(); - var freeSelf = typeof self == "object" && self && self.Object === Object && self; - var root = freeGlobal || freeSelf || Function("return this")(); - module.exports = root; -}); - -// node_modules/lodash/_Symbol.js -var require__Symbol = __commonJS((exports, module) => { - var root = require__root(); - var Symbol2 = root.Symbol; - module.exports = Symbol2; -}); - -// node_modules/lodash/_getRawTag.js -var require__getRawTag = __commonJS((exports, module) => { - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) { - } - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; - } - var Symbol2 = require__Symbol(); - var objectProto = Object.prototype; - var hasOwnProperty = objectProto.hasOwnProperty; - var nativeObjectToString = objectProto.toString; - var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined; - module.exports = getRawTag; -}); - -// node_modules/lodash/_objectToString.js -var require__objectToString = __commonJS((exports, module) => { - function objectToString(value) { - return nativeObjectToString.call(value); - } - var objectProto = Object.prototype; - var nativeObjectToString = objectProto.toString; - module.exports = objectToString; -}); - -// node_modules/lodash/_baseGetTag.js -var require__baseGetTag = __commonJS((exports, module) => { - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); - } - var Symbol2 = require__Symbol(); - var getRawTag = require__getRawTag(); - var objectToString = require__objectToString(); - var nullTag = "[object Null]"; - var undefinedTag = "[object Undefined]"; - var symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined; - module.exports = baseGetTag; -}); - -// node_modules/lodash/isObjectLike.js -var require_isObjectLike = __commonJS((exports, module) => { - function isObjectLike(value) { - return value != null && typeof value == "object"; - } - module.exports = isObjectLike; -}); - -// node_modules/lodash/isSymbol.js -var require_isSymbol = __commonJS((exports, module) => { - function isSymbol(value) { - return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; - } - var baseGetTag = require__baseGetTag(); - var isObjectLike = require_isObjectLike(); - var symbolTag = "[object Symbol]"; - module.exports = isSymbol; -}); - -// node_modules/lodash/_isKey.js -var require__isKey = __commonJS((exports, module) => { - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); - } - var isArray = require_isArray(); - var isSymbol = require_isSymbol(); - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; - var reIsPlainProp = /^\w*$/; - module.exports = isKey; -}); - -// node_modules/lodash/isObject.js -var require_isObject = __commonJS((exports, module) => { - function isObject(value) { - var type = typeof value; - return value != null && (type == "object" || type == "function"); - } - module.exports = isObject; -}); - -// node_modules/lodash/isFunction.js -var require_isFunction = __commonJS((exports, module) => { - function isFunction(value) { - if (!isObject(value)) { - return false; - } - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; - } - var baseGetTag = require__baseGetTag(); - var isObject = require_isObject(); - var asyncTag = "[object AsyncFunction]"; - var funcTag = "[object Function]"; - var genTag = "[object GeneratorFunction]"; - var proxyTag = "[object Proxy]"; - module.exports = isFunction; -}); - -// node_modules/lodash/_coreJsData.js -var require__coreJsData = __commonJS((exports, module) => { - var root = require__root(); - var coreJsData = root["__core-js_shared__"]; - module.exports = coreJsData; -}); - -// node_modules/lodash/_isMasked.js -var require__isMasked = __commonJS((exports, module) => { - function isMasked(func) { - return !!maskSrcKey && maskSrcKey in func; - } - var coreJsData = require__coreJsData(); - var maskSrcKey = function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); - return uid ? "Symbol(src)_1." + uid : ""; - }(); - module.exports = isMasked; -}); - -// node_modules/lodash/_toSource.js -var require__toSource = __commonJS((exports, module) => { - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) { - } - try { - return func + ""; - } catch (e) { - } - } - return ""; - } - var funcProto = Function.prototype; - var funcToString = funcProto.toString; - module.exports = toSource; -}); - -// node_modules/lodash/_baseIsNative.js -var require__baseIsNative = __commonJS((exports, module) => { - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } - var isFunction = require_isFunction(); - var isMasked = require__isMasked(); - var isObject = require_isObject(); - var toSource = require__toSource(); - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - var reIsHostCtor = /^\[object .+?Constructor\]$/; - var funcProto = Function.prototype; - var objectProto = Object.prototype; - var funcToString = funcProto.toString; - var hasOwnProperty = objectProto.hasOwnProperty; - var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); - module.exports = baseIsNative; -}); - -// node_modules/lodash/_getValue.js -var require__getValue = __commonJS((exports, module) => { - function getValue(object, key) { - return object == null ? undefined : object[key]; - } - module.exports = getValue; -}); - -// node_modules/lodash/_getNative.js -var require__getNative = __commonJS((exports, module) => { - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } - var baseIsNative = require__baseIsNative(); - var getValue = require__getValue(); - module.exports = getNative; -}); - -// node_modules/lodash/_nativeCreate.js -var require__nativeCreate = __commonJS((exports, module) => { - var getNative = require__getNative(); - var nativeCreate = getNative(Object, "create"); - module.exports = nativeCreate; -}); - -// node_modules/lodash/_hashClear.js -var require__hashClear = __commonJS((exports, module) => { - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; - } - var nativeCreate = require__nativeCreate(); - module.exports = hashClear; -}); - -// node_modules/lodash/_hashDelete.js -var require__hashDelete = __commonJS((exports, module) => { - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } - module.exports = hashDelete; -}); - -// node_modules/lodash/_hashGet.js -var require__hashGet = __commonJS((exports, module) => { - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } - var nativeCreate = require__nativeCreate(); - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - var objectProto = Object.prototype; - var hasOwnProperty = objectProto.hasOwnProperty; - module.exports = hashGet; -}); - -// node_modules/lodash/_hashHas.js -var require__hashHas = __commonJS((exports, module) => { - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); - } - var nativeCreate = require__nativeCreate(); - var objectProto = Object.prototype; - var hasOwnProperty = objectProto.hasOwnProperty; - module.exports = hashHas; -}); - -// node_modules/lodash/_hashSet.js -var require__hashSet = __commonJS((exports, module) => { - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value; - return this; - } - var nativeCreate = require__nativeCreate(); - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - module.exports = hashSet; -}); - -// node_modules/lodash/_Hash.js -var require__Hash = __commonJS((exports, module) => { - function Hash(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - var hashClear = require__hashClear(); - var hashDelete = require__hashDelete(); - var hashGet = require__hashGet(); - var hashHas = require__hashHas(); - var hashSet = require__hashSet(); - Hash.prototype.clear = hashClear; - Hash.prototype["delete"] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; - module.exports = Hash; -}); - -// node_modules/lodash/_listCacheClear.js -var require__listCacheClear = __commonJS((exports, module) => { - function listCacheClear() { - this.__data__ = []; - this.size = 0; - } - module.exports = listCacheClear; -}); - -// node_modules/lodash/eq.js -var require_eq = __commonJS((exports, module) => { - function eq(value, other) { - return value === other || value !== value && other !== other; - } - module.exports = eq; -}); - -// node_modules/lodash/_assocIndexOf.js -var require__assocIndexOf = __commonJS((exports, module) => { - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; - } - var eq = require_eq(); - module.exports = assocIndexOf; -}); - -// node_modules/lodash/_listCacheDelete.js -var require__listCacheDelete = __commonJS((exports, module) => { - function listCacheDelete(key) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; - } - var assocIndexOf = require__assocIndexOf(); - var arrayProto = Array.prototype; - var splice = arrayProto.splice; - module.exports = listCacheDelete; -}); - -// node_modules/lodash/_listCacheGet.js -var require__listCacheGet = __commonJS((exports, module) => { - function listCacheGet(key) { - var data = this.__data__, index = assocIndexOf(data, key); - return index < 0 ? undefined : data[index][1]; - } - var assocIndexOf = require__assocIndexOf(); - module.exports = listCacheGet; -}); - -// node_modules/lodash/_listCacheHas.js -var require__listCacheHas = __commonJS((exports, module) => { - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } - var assocIndexOf = require__assocIndexOf(); - module.exports = listCacheHas; -}); - -// node_modules/lodash/_listCacheSet.js -var require__listCacheSet = __commonJS((exports, module) => { - function listCacheSet(key, value) { - var data = this.__data__, index = assocIndexOf(data, key); - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; - } - var assocIndexOf = require__assocIndexOf(); - module.exports = listCacheSet; -}); - -// node_modules/lodash/_ListCache.js -var require__ListCache = __commonJS((exports, module) => { - function ListCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - var listCacheClear = require__listCacheClear(); - var listCacheDelete = require__listCacheDelete(); - var listCacheGet = require__listCacheGet(); - var listCacheHas = require__listCacheHas(); - var listCacheSet = require__listCacheSet(); - ListCache.prototype.clear = listCacheClear; - ListCache.prototype["delete"] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - module.exports = ListCache; -}); - -// node_modules/lodash/_Map.js -var require__Map = __commonJS((exports, module) => { - var getNative = require__getNative(); - var root = require__root(); - var Map2 = getNative(root, "Map"); - module.exports = Map2; -}); - -// node_modules/lodash/_mapCacheClear.js -var require__mapCacheClear = __commonJS((exports, module) => { - function mapCacheClear() { - this.size = 0; - this.__data__ = { - hash: new Hash, - map: new (Map2 || ListCache), - string: new Hash - }; - } - var Hash = require__Hash(); - var ListCache = require__ListCache(); - var Map2 = require__Map(); - module.exports = mapCacheClear; -}); - -// node_modules/lodash/_isKeyable.js -var require__isKeyable = __commonJS((exports, module) => { - function isKeyable(value) { - var type = typeof value; - return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; - } - module.exports = isKeyable; -}); - -// node_modules/lodash/_getMapData.js -var require__getMapData = __commonJS((exports, module) => { - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; - } - var isKeyable = require__isKeyable(); - module.exports = getMapData; -}); - -// node_modules/lodash/_mapCacheDelete.js -var require__mapCacheDelete = __commonJS((exports, module) => { - function mapCacheDelete(key) { - var result = getMapData(this, key)["delete"](key); - this.size -= result ? 1 : 0; - return result; - } - var getMapData = require__getMapData(); - module.exports = mapCacheDelete; -}); - -// node_modules/lodash/_mapCacheGet.js -var require__mapCacheGet = __commonJS((exports, module) => { - function mapCacheGet(key) { - return getMapData(this, key).get(key); - } - var getMapData = require__getMapData(); - module.exports = mapCacheGet; -}); - -// node_modules/lodash/_mapCacheHas.js -var require__mapCacheHas = __commonJS((exports, module) => { - function mapCacheHas(key) { - return getMapData(this, key).has(key); - } - var getMapData = require__getMapData(); - module.exports = mapCacheHas; -}); - -// node_modules/lodash/_mapCacheSet.js -var require__mapCacheSet = __commonJS((exports, module) => { - function mapCacheSet(key, value) { - var data = getMapData(this, key), size = data.size; - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; - } - var getMapData = require__getMapData(); - module.exports = mapCacheSet; -}); - -// node_modules/lodash/_MapCache.js -var require__MapCache = __commonJS((exports, module) => { - function MapCache(entries) { - var index = -1, length = entries == null ? 0 : entries.length; - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } - var mapCacheClear = require__mapCacheClear(); - var mapCacheDelete = require__mapCacheDelete(); - var mapCacheGet = require__mapCacheGet(); - var mapCacheHas = require__mapCacheHas(); - var mapCacheSet = require__mapCacheSet(); - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype["delete"] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - module.exports = MapCache; -}); - -// node_modules/lodash/memoize.js -var require_memoize = __commonJS((exports, module) => { - function memoize(func, resolver) { - if (typeof func != "function" || resolver != null && typeof resolver != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; - } - var MapCache = require__MapCache(); - var FUNC_ERROR_TEXT = "Expected a function"; - memoize.Cache = MapCache; - module.exports = memoize; -}); - -// node_modules/lodash/_memoizeCapped.js -var require__memoizeCapped = __commonJS((exports, module) => { - function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - var cache = result.cache; - return result; - } - var memoize = require_memoize(); - var MAX_MEMOIZE_SIZE = 500; - module.exports = memoizeCapped; -}); - -// node_modules/lodash/_stringToPath.js -var require__stringToPath = __commonJS((exports, module) => { - var memoizeCapped = require__memoizeCapped(); - var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - var reEscapeChar = /\\(\\)?/g; - var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46) { - result.push(""); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); - }); - return result; - }); - module.exports = stringToPath; -}); - -// node_modules/lodash/_arrayMap.js -var require__arrayMap = __commonJS((exports, module) => { - function arrayMap(array, iteratee) { - var index = -1, length = array == null ? 0 : array.length, result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - module.exports = arrayMap; -}); - -// node_modules/lodash/_baseToString.js -var require__baseToString = __commonJS((exports, module) => { - function baseToString(value) { - if (typeof value == "string") { - return value; - } - if (isArray(value)) { - return arrayMap(value, baseToString) + ""; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ""; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } - var Symbol2 = require__Symbol(); - var arrayMap = require__arrayMap(); - var isArray = require_isArray(); - var isSymbol = require_isSymbol(); - var INFINITY = 1 / 0; - var symbolProto = Symbol2 ? Symbol2.prototype : undefined; - var symbolToString = symbolProto ? symbolProto.toString : undefined; - module.exports = baseToString; -}); - -// node_modules/lodash/toString.js -var require_toString = __commonJS((exports, module) => { - function toString(value) { - return value == null ? "" : baseToString(value); - } - var baseToString = require__baseToString(); - module.exports = toString; -}); - -// node_modules/lodash/_castPath.js -var require__castPath = __commonJS((exports, module) => { - function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); - } - var isArray = require_isArray(); - var isKey = require__isKey(); - var stringToPath = require__stringToPath(); - var toString = require_toString(); - module.exports = castPath; -}); - -// node_modules/lodash/_toKey.js -var require__toKey = __commonJS((exports, module) => { - function toKey(value) { - if (typeof value == "string" || isSymbol(value)) { - return value; - } - var result = value + ""; - return result == "0" && 1 / value == -INFINITY ? "-0" : result; - } - var isSymbol = require_isSymbol(); - var INFINITY = 1 / 0; - module.exports = toKey; -}); - -// node_modules/lodash/_baseGet.js -var require__baseGet = __commonJS((exports, module) => { - function baseGet(object, path) { - path = castPath(path, object); - var index = 0, length = path.length; - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return index && index == length ? object : undefined; - } - var castPath = require__castPath(); - var toKey = require__toKey(); - module.exports = baseGet; -}); - -// node_modules/lodash/get.js -var require_get = __commonJS((exports, module) => { - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } - var baseGet = require__baseGet(); - module.exports = get; -}); - -// node_modules/fast-deep-equal/es6/index.js -var require_es6 = __commonJS((exports, module) => { - module.exports = function equal(a, b) { - if (a === b) - return true; - if (a && b && typeof a == "object" && typeof b == "object") { - if (a.constructor !== b.constructor) - return false; - var length, i, keys; - if (Array.isArray(a)) { - length = a.length; - if (length != b.length) - return false; - for (i = length;i-- !== 0; ) - if (!equal(a[i], b[i])) - return false; - return true; - } - if (a instanceof Map && b instanceof Map) { - if (a.size !== b.size) - return false; - for (i of a.entries()) - if (!b.has(i[0])) - return false; - for (i of a.entries()) - if (!equal(i[1], b.get(i[0]))) - return false; - return true; - } - if (a instanceof Set && b instanceof Set) { - if (a.size !== b.size) - return false; - for (i of a.entries()) - if (!b.has(i[0])) - return false; - return true; - } - if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { - length = a.length; - if (length != b.length) - return false; - for (i = length;i-- !== 0; ) - if (a[i] !== b[i]) - return false; - return true; - } - if (a.constructor === RegExp) - return a.source === b.source && a.flags === b.flags; - if (a.valueOf !== Object.prototype.valueOf) - return a.valueOf() === b.valueOf(); - if (a.toString !== Object.prototype.toString) - return a.toString() === b.toString(); - keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) - return false; - for (i = length;i-- !== 0; ) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) - return false; - for (i = length;i-- !== 0; ) { - var key = keys[i]; - if (!equal(a[key], b[key])) - return false; - } - return true; - } - return a !== a && b !== b; - }; -}); - -// node_modules/lodash/_setCacheAdd.js -var require__setCacheAdd = __commonJS((exports, module) => { - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; - } - var HASH_UNDEFINED = "__lodash_hash_undefined__"; - module.exports = setCacheAdd; -}); - -// node_modules/lodash/_setCacheHas.js -var require__setCacheHas = __commonJS((exports, module) => { - function setCacheHas(value) { - return this.__data__.has(value); - } - module.exports = setCacheHas; -}); - -// node_modules/lodash/_SetCache.js -var require__SetCache = __commonJS((exports, module) => { - function SetCache(values) { - var index = -1, length = values == null ? 0 : values.length; - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } - } - var MapCache = require__MapCache(); - var setCacheAdd = require__setCacheAdd(); - var setCacheHas = require__setCacheHas(); - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - module.exports = SetCache; -}); - -// node_modules/lodash/_baseFindIndex.js -var require__baseFindIndex = __commonJS((exports, module) => { - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, index = fromIndex + (fromRight ? 1 : -1); - while (fromRight ? index-- : ++index < length) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - module.exports = baseFindIndex; -}); - -// node_modules/lodash/_baseIsNaN.js -var require__baseIsNaN = __commonJS((exports, module) => { - function baseIsNaN(value) { - return value !== value; - } - module.exports = baseIsNaN; -}); - -// node_modules/lodash/_strictIndexOf.js -var require__strictIndexOf = __commonJS((exports, module) => { - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - module.exports = strictIndexOf; -}); - -// node_modules/lodash/_baseIndexOf.js -var require__baseIndexOf = __commonJS((exports, module) => { - function baseIndexOf(array, value, fromIndex) { - return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); - } - var baseFindIndex = require__baseFindIndex(); - var baseIsNaN = require__baseIsNaN(); - var strictIndexOf = require__strictIndexOf(); - module.exports = baseIndexOf; -}); - -// node_modules/lodash/_arrayIncludes.js -var require__arrayIncludes = __commonJS((exports, module) => { - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } - var baseIndexOf = require__baseIndexOf(); - module.exports = arrayIncludes; -}); - -// node_modules/lodash/_arrayIncludesWith.js -var require__arrayIncludesWith = __commonJS((exports, module) => { - function arrayIncludesWith(array, value, comparator) { - var index = -1, length = array == null ? 0 : array.length; - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } - } - return false; - } - module.exports = arrayIncludesWith; -}); - -// node_modules/lodash/_cacheHas.js -var require__cacheHas = __commonJS((exports, module) => { - function cacheHas(cache, key) { - return cache.has(key); - } - module.exports = cacheHas; -}); - -// node_modules/lodash/_Set.js -var require__Set = __commonJS((exports, module) => { - var getNative = require__getNative(); - var root = require__root(); - var Set2 = getNative(root, "Set"); - module.exports = Set2; -}); - -// node_modules/lodash/noop.js -var require_noop = __commonJS((exports, module) => { - function noop() { - } - module.exports = noop; -}); - -// node_modules/lodash/_setToArray.js -var require__setToArray = __commonJS((exports, module) => { - function setToArray(set) { - var index = -1, result = Array(set.size); - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - module.exports = setToArray; -}); - -// node_modules/lodash/_createSet.js -var require__createSet = __commonJS((exports, module) => { - var Set2 = require__Set(); - var noop = require_noop(); - var setToArray = require__setToArray(); - var INFINITY = 1 / 0; - var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { - return new Set2(values); - }; - module.exports = createSet; -}); - -// node_modules/lodash/_baseUniq.js -var require__baseUniq = __commonJS((exports, module) => { - function baseUniq(array, iteratee, comparator) { - var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } else { - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], computed = iteratee ? iteratee(value) : value; - value = comparator || value !== 0 ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - var SetCache = require__SetCache(); - var arrayIncludes = require__arrayIncludes(); - var arrayIncludesWith = require__arrayIncludesWith(); - var cacheHas = require__cacheHas(); - var createSet = require__createSet(); - var setToArray = require__setToArray(); - var LARGE_ARRAY_SIZE = 200; - module.exports = baseUniq; -}); - -// node_modules/lodash/uniqWith.js -var require_uniqWith = __commonJS((exports, module) => { - function uniqWith(array, comparator) { - comparator = typeof comparator == "function" ? comparator : undefined; - return array && array.length ? baseUniq(array, undefined, comparator) : []; - } - var baseUniq = require__baseUniq(); - module.exports = uniqWith; -}); - -// node_modules/@sapphire/shapeshift/dist/cjs/index.cjs -var require_cjs4 = __commonJS((exports) => { - function _interopDefault(e3) { - return e3 && e3.__esModule ? e3 : { default: e3 }; - } - function i() { - throw new Error("setTimeout has not been defined"); - } - function u() { - throw new Error("clearTimeout has not been defined"); - } - function c(e3) { - if (t === setTimeout) - return setTimeout(e3, 0); - if ((t === i || !t) && setTimeout) - return t = setTimeout, setTimeout(e3, 0); - try { - return t(e3, 0); - } catch (n3) { - try { - return t.call(null, e3, 0); - } catch (n4) { - return t.call(this || r, e3, 0); - } - } - } - function h() { - f && l && (f = false, l.length ? s = l.concat(s) : a = -1, s.length && d()); - } - function d() { - if (!f) { - var e3 = c(h); - f = true; - for (var t3 = s.length;t3; ) { - for (l = s, s = [];++a < t3; ) - l && l[a].run(); - a = -1, t3 = s.length; - } - l = null, f = false, function(e4) { - if (n === clearTimeout) - return clearTimeout(e4); - if ((n === u || !n) && clearTimeout) - return n = clearTimeout, clearTimeout(e4); - try { - n(e4); - } catch (t4) { - try { - return n.call(null, e4); - } catch (t5) { - return n.call(this || r, e4); - } - } - }(e3); - } - } - function m(e3, t3) { - (this || r).fun = e3, (this || r).array = t3; - } - function p() { - } - function c$1(e3) { - return e3.call.bind(e3); - } - function O(e3, t3) { - if (typeof e3 != "object") - return false; - try { - return t3(e3), true; - } catch (e4) { - return false; - } - } - function S(e3) { - return l$1 && y ? b(e3) !== undefined : B(e3) || k(e3) || E(e3) || D(e3) || U(e3) || P(e3) || x(e3) || I(e3) || M(e3) || z(e3) || F(e3); - } - function B(e3) { - return l$1 && y ? b(e3) === "Uint8Array" : m2(e3) === "[object Uint8Array]" || u$1(e3) && e3.buffer !== undefined; - } - function k(e3) { - return l$1 && y ? b(e3) === "Uint8ClampedArray" : m2(e3) === "[object Uint8ClampedArray]"; - } - function E(e3) { - return l$1 && y ? b(e3) === "Uint16Array" : m2(e3) === "[object Uint16Array]"; - } - function D(e3) { - return l$1 && y ? b(e3) === "Uint32Array" : m2(e3) === "[object Uint32Array]"; - } - function U(e3) { - return l$1 && y ? b(e3) === "Int8Array" : m2(e3) === "[object Int8Array]"; - } - function P(e3) { - return l$1 && y ? b(e3) === "Int16Array" : m2(e3) === "[object Int16Array]"; - } - function x(e3) { - return l$1 && y ? b(e3) === "Int32Array" : m2(e3) === "[object Int32Array]"; - } - function I(e3) { - return l$1 && y ? b(e3) === "Float32Array" : m2(e3) === "[object Float32Array]"; - } - function M(e3) { - return l$1 && y ? b(e3) === "Float64Array" : m2(e3) === "[object Float64Array]"; - } - function z(e3) { - return l$1 && y ? b(e3) === "BigInt64Array" : m2(e3) === "[object BigInt64Array]"; - } - function F(e3) { - return l$1 && y ? b(e3) === "BigUint64Array" : m2(e3) === "[object BigUint64Array]"; - } - function T2(e3) { - return m2(e3) === "[object Map]"; - } - function N(e3) { - return m2(e3) === "[object Set]"; - } - function W(e3) { - return m2(e3) === "[object WeakMap]"; - } - function $(e3) { - return m2(e3) === "[object WeakSet]"; - } - function C(e3) { - return m2(e3) === "[object ArrayBuffer]"; - } - function V(e3) { - return typeof ArrayBuffer != "undefined" && (C.working ? C(e3) : e3 instanceof ArrayBuffer); - } - function G(e3) { - return m2(e3) === "[object DataView]"; - } - function R(e3) { - return typeof DataView != "undefined" && (G.working ? G(e3) : e3 instanceof DataView); - } - function J(e3) { - return m2(e3) === "[object SharedArrayBuffer]"; - } - function _(e3) { - return typeof SharedArrayBuffer != "undefined" && (J.working ? J(e3) : e3 instanceof SharedArrayBuffer); - } - function H(e3) { - return O(e3, h2); - } - function Z(e3) { - return O(e3, j); - } - function q(e3) { - return O(e3, A); - } - function K(e3) { - return s2 && O(e3, w); - } - function L(e3) { - return p2 && O(e3, v); - } - function oe(e3, t3) { - var r3 = { seen: [], stylize: fe }; - return arguments.length >= 3 && (r3.depth = arguments[2]), arguments.length >= 4 && (r3.colors = arguments[3]), ye(t3) ? r3.showHidden = t3 : t3 && X._extend(r3, t3), be(r3.showHidden) && (r3.showHidden = false), be(r3.depth) && (r3.depth = 2), be(r3.colors) && (r3.colors = false), be(r3.customInspect) && (r3.customInspect = true), r3.colors && (r3.stylize = ue), ae(r3, e3, r3.depth); - } - function ue(e3, t3) { - var r3 = oe.styles[t3]; - return r3 ? "\x1B[" + oe.colors[r3][0] + "m" + e3 + "\x1B[" + oe.colors[r3][1] + "m" : e3; - } - function fe(e3, t3) { - return e3; - } - function ae(e3, t3, r3) { - if (e3.customInspect && t3 && we(t3.inspect) && t3.inspect !== X.inspect && (!t3.constructor || t3.constructor.prototype !== t3)) { - var n3 = t3.inspect(r3, e3); - return ge(n3) || (n3 = ae(e3, n3, r3)), n3; - } - var i3 = function(e4, t4) { - if (be(t4)) - return e4.stylize("undefined", "undefined"); - if (ge(t4)) { - var r4 = "'" + JSON.stringify(t4).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return e4.stylize(r4, "string"); - } - if (de(t4)) - return e4.stylize("" + t4, "number"); - if (ye(t4)) - return e4.stylize("" + t4, "boolean"); - if (le(t4)) - return e4.stylize("null", "null"); - }(e3, t3); - if (i3) - return i3; - var o3 = Object.keys(t3), u3 = function(e4) { - var t4 = {}; - return e4.forEach(function(e5, r4) { - t4[e5] = true; - }), t4; - }(o3); - if (e3.showHidden && (o3 = Object.getOwnPropertyNames(t3)), Ae(t3) && (o3.indexOf("message") >= 0 || o3.indexOf("description") >= 0)) - return ce(t3); - if (o3.length === 0) { - if (we(t3)) { - var f3 = t3.name ? ": " + t3.name : ""; - return e3.stylize("[Function" + f3 + "]", "special"); - } - if (me(t3)) - return e3.stylize(RegExp.prototype.toString.call(t3), "regexp"); - if (je(t3)) - return e3.stylize(Date.prototype.toString.call(t3), "date"); - if (Ae(t3)) - return ce(t3); - } - var a3, c3 = "", s4 = false, p3 = ["{", "}"]; - (pe(t3) && (s4 = true, p3 = ["[", "]"]), we(t3)) && (c3 = " [Function" + (t3.name ? ": " + t3.name : "") + "]"); - return me(t3) && (c3 = " " + RegExp.prototype.toString.call(t3)), je(t3) && (c3 = " " + Date.prototype.toUTCString.call(t3)), Ae(t3) && (c3 = " " + ce(t3)), o3.length !== 0 || s4 && t3.length != 0 ? r3 < 0 ? me(t3) ? e3.stylize(RegExp.prototype.toString.call(t3), "regexp") : e3.stylize("[Object]", "special") : (e3.seen.push(t3), a3 = s4 ? function(e4, t4, r4, n4, i4) { - for (var o4 = [], u4 = 0, f4 = t4.length;u4 < f4; ++u4) - ke(t4, String(u4)) ? o4.push(se(e4, t4, r4, n4, String(u4), true)) : o4.push(""); - return i4.forEach(function(i5) { - i5.match(/^\d+$/) || o4.push(se(e4, t4, r4, n4, i5, true)); - }), o4; - }(e3, t3, r3, u3, o3) : o3.map(function(n4) { - return se(e3, t3, r3, u3, n4, s4); - }), e3.seen.pop(), function(e4, t4, r4) { - var n4 = 0; - if (e4.reduce(function(e5, t5) { - return n4++, t5.indexOf("\n") >= 0 && n4++, e5 + t5.replace(/\u001b\[\d\d?m/g, "").length + 1; - }, 0) > 60) - return r4[0] + (t4 === "" ? "" : t4 + "\n ") + " " + e4.join(",\n ") + " " + r4[1]; - return r4[0] + t4 + " " + e4.join(", ") + " " + r4[1]; - }(a3, c3, p3)) : p3[0] + c3 + p3[1]; - } - function ce(e3) { - return "[" + Error.prototype.toString.call(e3) + "]"; - } - function se(e3, t3, r3, n3, i3, o3) { - var u3, f3, a3; - if ((a3 = Object.getOwnPropertyDescriptor(t3, i3) || { value: t3[i3] }).get ? f3 = a3.set ? e3.stylize("[Getter/Setter]", "special") : e3.stylize("[Getter]", "special") : a3.set && (f3 = e3.stylize("[Setter]", "special")), ke(n3, i3) || (u3 = "[" + i3 + "]"), f3 || (e3.seen.indexOf(a3.value) < 0 ? (f3 = le(r3) ? ae(e3, a3.value, null) : ae(e3, a3.value, r3 - 1)).indexOf("\n") > -1 && (f3 = o3 ? f3.split("\n").map(function(e4) { - return " " + e4; - }).join("\n").substr(2) : "\n" + f3.split("\n").map(function(e4) { - return " " + e4; - }).join("\n")) : f3 = e3.stylize("[Circular]", "special")), be(u3)) { - if (o3 && i3.match(/^\d+$/)) - return f3; - (u3 = JSON.stringify("" + i3)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (u3 = u3.substr(1, u3.length - 2), u3 = e3.stylize(u3, "name")) : (u3 = u3.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), u3 = e3.stylize(u3, "string")); - } - return u3 + ": " + f3; - } - function pe(e3) { - return Array.isArray(e3); - } - function ye(e3) { - return typeof e3 == "boolean"; - } - function le(e3) { - return e3 === null; - } - function de(e3) { - return typeof e3 == "number"; - } - function ge(e3) { - return typeof e3 == "string"; - } - function be(e3) { - return e3 === undefined; - } - function me(e3) { - return he(e3) && ve(e3) === "[object RegExp]"; - } - function he(e3) { - return typeof e3 == "object" && e3 !== null; - } - function je(e3) { - return he(e3) && ve(e3) === "[object Date]"; - } - function Ae(e3) { - return he(e3) && (ve(e3) === "[object Error]" || e3 instanceof Error); - } - function we(e3) { - return typeof e3 == "function"; - } - function ve(e3) { - return Object.prototype.toString.call(e3); - } - function Oe(e3) { - return e3 < 10 ? "0" + e3.toString(10) : e3.toString(10); - } - function Be() { - var e3 = /* @__PURE__ */ new Date, t3 = [Oe(e3.getHours()), Oe(e3.getMinutes()), Oe(e3.getSeconds())].join(":"); - return [e3.getDate(), Se[e3.getMonth()], t3].join(" "); - } - function ke(e3, t3) { - return Object.prototype.hasOwnProperty.call(e3, t3); - } - function De(e3, t3) { - if (!e3) { - var r3 = new Error("Promise was rejected with a falsy value"); - r3.reason = e3, e3 = r3; - } - return t3(e3); - } - function whenConstraint(key, options, validator, validatorOptions) { - return { - run(input, parent) { - if (!parent) { - return Result.err(new ExpectedConstraintError("s.object(T.when)", validatorOptions?.message ?? "Validator has no parent", parent, "Validator to have a parent")); - } - const isKeyArray = Array.isArray(key); - const value = isKeyArray ? key.map((k2) => get__default.default(parent, k2)) : get__default.default(parent, key); - const predicate = resolveBooleanIs(options, value, isKeyArray) ? options.then : options.otherwise; - if (predicate) { - return predicate(validator).run(input); - } - return Result.ok(input); - } - }; - } - function resolveBooleanIs(options, value, isKeyArray) { - if (options.is === undefined) { - return isKeyArray ? !value.some((val) => !val) : Boolean(value); - } - if (typeof options.is === "function") { - return options.is(value); - } - return value === options.is; - } - function setGlobalValidationEnabled(enabled) { - validationEnabled = enabled; - } - function getGlobalValidationEnabled() { - return validationEnabled; - } - function getValue(valueOrFn) { - return typeof valueOrFn === "function" ? valueOrFn() : valueOrFn; - } - function isUnique(input) { - if (input.length < 2) - return true; - const uniqueArray2 = uniqWith__default.default(input, fastDeepEqual__default.default); - return uniqueArray2.length === input.length; - } - function lessThan(a3, b2) { - return a3 < b2; - } - function lessThanOrEqual(a3, b2) { - return a3 <= b2; - } - function greaterThan(a3, b2) { - return a3 > b2; - } - function greaterThanOrEqual(a3, b2) { - return a3 >= b2; - } - function equal(a3, b2) { - return a3 === b2; - } - function notEqual(a3, b2) { - return a3 !== b2; - } - function arrayLengthComparator(comparator, name, expected, length, options) { - return { - run(input) { - return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid Array length", input, expected)); - } - }; - } - function arrayLengthLessThan(value, options) { - const expected = `expected.length < ${value}`; - return arrayLengthComparator(lessThan, "s.array(T).lengthLessThan()", expected, value, options); - } - function arrayLengthLessThanOrEqual(value, options) { - const expected = `expected.length <= ${value}`; - return arrayLengthComparator(lessThanOrEqual, "s.array(T).lengthLessThanOrEqual()", expected, value, options); - } - function arrayLengthGreaterThan(value, options) { - const expected = `expected.length > ${value}`; - return arrayLengthComparator(greaterThan, "s.array(T).lengthGreaterThan()", expected, value, options); - } - function arrayLengthGreaterThanOrEqual(value, options) { - const expected = `expected.length >= ${value}`; - return arrayLengthComparator(greaterThanOrEqual, "s.array(T).lengthGreaterThanOrEqual()", expected, value, options); - } - function arrayLengthEqual(value, options) { - const expected = `expected.length === ${value}`; - return arrayLengthComparator(equal, "s.array(T).lengthEqual()", expected, value, options); - } - function arrayLengthNotEqual(value, options) { - const expected = `expected.length !== ${value}`; - return arrayLengthComparator(notEqual, "s.array(T).lengthNotEqual()", expected, value, options); - } - function arrayLengthRange(start, endBefore, options) { - const expected = `expected.length >= ${start} && expected.length < ${endBefore}`; - return { - run(input) { - return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRange()", options?.message ?? "Invalid Array length", input, expected)); - } - }; - } - function arrayLengthRangeInclusive(start, end, options) { - const expected = `expected.length >= ${start} && expected.length <= ${end}`; - return { - run(input) { - return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeInclusive()", options?.message ?? "Invalid Array length", input, expected)); - } - }; - } - function arrayLengthRangeExclusive(startAfter, endBefore, options) { - const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`; - return { - run(input) { - return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).lengthRangeExclusive()", options?.message ?? "Invalid Array length", input, expected)); - } - }; - } - function uniqueArray(options) { - return { - run(input) { - return isUnique(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.array(T).unique()", options?.message ?? "Array values are not unique", input, "Expected all values to be unique")); - } - }; - } - function bigintComparator(comparator, name, expected, number, options) { - return { - run(input) { - return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid bigint value", input, expected)); - } - }; - } - function bigintLessThan(value, options) { - const expected = `expected < ${value}n`; - return bigintComparator(lessThan, "s.bigint().lessThan()", expected, value, options); - } - function bigintLessThanOrEqual(value, options) { - const expected = `expected <= ${value}n`; - return bigintComparator(lessThanOrEqual, "s.bigint().lessThanOrEqual()", expected, value, options); - } - function bigintGreaterThan(value, options) { - const expected = `expected > ${value}n`; - return bigintComparator(greaterThan, "s.bigint().greaterThan()", expected, value, options); - } - function bigintGreaterThanOrEqual(value, options) { - const expected = `expected >= ${value}n`; - return bigintComparator(greaterThanOrEqual, "s.bigint().greaterThanOrEqual()", expected, value, options); - } - function bigintEqual(value, options) { - const expected = `expected === ${value}n`; - return bigintComparator(equal, "s.bigint().equal()", expected, value, options); - } - function bigintNotEqual(value, options) { - const expected = `expected !== ${value}n`; - return bigintComparator(notEqual, "s.bigint().notEqual()", expected, value, options); - } - function bigintDivisibleBy(divider, options) { - const expected = `expected % ${divider}n === 0n`; - return { - run(input) { - return input % divider === 0n ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.bigint().divisibleBy()", options?.message ?? "BigInt is not divisible", input, expected)); - } - }; - } - function booleanTrue(options) { - return { - run(input) { - return input ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.boolean().true()", options?.message ?? "Invalid boolean value", input, "true")); - } - }; - } - function booleanFalse(options) { - return { - run(input) { - return input ? Result.err(new ExpectedConstraintError("s.boolean().false()", options?.message ?? "Invalid boolean value", input, "false")) : Result.ok(input); - } - }; - } - function dateComparator(comparator, name, expected, number, options) { - return { - run(input) { - return comparator(input.getTime(), number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid Date value", input, expected)); - } - }; - } - function dateLessThan(value, options) { - const expected = `expected < ${value.toISOString()}`; - return dateComparator(lessThan, "s.date().lessThan()", expected, value.getTime(), options); - } - function dateLessThanOrEqual(value, options) { - const expected = `expected <= ${value.toISOString()}`; - return dateComparator(lessThanOrEqual, "s.date().lessThanOrEqual()", expected, value.getTime(), options); - } - function dateGreaterThan(value, options) { - const expected = `expected > ${value.toISOString()}`; - return dateComparator(greaterThan, "s.date().greaterThan()", expected, value.getTime(), options); - } - function dateGreaterThanOrEqual(value, options) { - const expected = `expected >= ${value.toISOString()}`; - return dateComparator(greaterThanOrEqual, "s.date().greaterThanOrEqual()", expected, value.getTime(), options); - } - function dateEqual(value, options) { - const expected = `expected === ${value.toISOString()}`; - return dateComparator(equal, "s.date().equal()", expected, value.getTime(), options); - } - function dateNotEqual(value, options) { - const expected = `expected !== ${value.toISOString()}`; - return dateComparator(notEqual, "s.date().notEqual()", expected, value.getTime(), options); - } - function dateInvalid(options) { - return { - run(input) { - return Number.isNaN(input.getTime()) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.date().invalid()", options?.message ?? "Invalid Date value", input, "expected === NaN")); - } - }; - } - function dateValid(options) { - return { - run(input) { - return Number.isNaN(input.getTime()) ? Result.err(new ExpectedConstraintError("s.date().valid()", options?.message ?? "Invalid Date value", input, "expected !== NaN")) : Result.ok(input); - } - }; - } - function numberComparator(comparator, name, expected, number, options) { - return { - run(input) { - return comparator(input, number) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid number value", input, expected)); - } - }; - } - function numberLessThan(value, options) { - const expected = `expected < ${value}`; - return numberComparator(lessThan, "s.number().lessThan()", expected, value, options); - } - function numberLessThanOrEqual(value, options) { - const expected = `expected <= ${value}`; - return numberComparator(lessThanOrEqual, "s.number().lessThanOrEqual()", expected, value, options); - } - function numberGreaterThan(value, options) { - const expected = `expected > ${value}`; - return numberComparator(greaterThan, "s.number().greaterThan()", expected, value, options); - } - function numberGreaterThanOrEqual(value, options) { - const expected = `expected >= ${value}`; - return numberComparator(greaterThanOrEqual, "s.number().greaterThanOrEqual()", expected, value, options); - } - function numberEqual(value, options) { - const expected = `expected === ${value}`; - return numberComparator(equal, "s.number().equal()", expected, value, options); - } - function numberNotEqual(value, options) { - const expected = `expected !== ${value}`; - return numberComparator(notEqual, "s.number().notEqual()", expected, value, options); - } - function numberInt(options) { - return { - run(input) { - return Number.isInteger(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number().int()", options?.message ?? "Given value is not an integer", input, "Number.isInteger(expected) to be true")); - } - }; - } - function numberSafeInt(options) { - return { - run(input) { - return Number.isSafeInteger(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number().safeInt()", options?.message ?? "Given value is not a safe integer", input, "Number.isSafeInteger(expected) to be true")); - } - }; - } - function numberFinite(options) { - return { - run(input) { - return Number.isFinite(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number().finite()", options?.message ?? "Given value is not finite", input, "Number.isFinite(expected) to be true")); - } - }; - } - function numberNaN(options) { - return { - run(input) { - return Number.isNaN(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number().equal(NaN)", options?.message ?? "Invalid number value", input, "expected === NaN")); - } - }; - } - function numberNotNaN(options) { - return { - run(input) { - return Number.isNaN(input) ? Result.err(new ExpectedConstraintError("s.number().notEqual(NaN)", options?.message ?? "Invalid number value", input, "expected !== NaN")) : Result.ok(input); - } - }; - } - function numberDivisibleBy(divider, options) { - const expected = `expected % ${divider} === 0`; - return { - run(input) { - return input % divider === 0 ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.number().divisibleBy()", options?.message ?? "Number is not divisible", input, expected)); - } - }; - } - function validateEmail(email) { - if (!email) - return false; - const atIndex = email.indexOf("@"); - if (atIndex === -1) - return false; - if (atIndex > 64) - return false; - const domainIndex = atIndex + 1; - if (email.includes("@", domainIndex)) - return false; - if (email.length - domainIndex > 255) - return false; - let dotIndex = email.indexOf(".", domainIndex); - if (dotIndex === -1) - return false; - let lastDotIndex = domainIndex; - do { - if (dotIndex - lastDotIndex > 63) - return false; - lastDotIndex = dotIndex + 1; - } while ((dotIndex = email.indexOf(".", lastDotIndex)) !== -1); - if (email.length - lastDotIndex > 63) - return false; - return accountRegex.test(email.slice(0, atIndex)) && validateEmailDomain(email.slice(domainIndex)); - } - function validateEmailDomain(domain) { - try { - return new URL(`http://${domain}`).hostname === domain; - } catch { - return false; - } - } - function isIPv4(s4) { - return IPv4Reg.test(s4); - } - function isIPv6(s4) { - return IPv6Reg.test(s4); - } - function isIP(s4) { - if (isIPv4(s4)) - return 4; - if (isIPv6(s4)) - return 6; - return 0; - } - function validatePhoneNumber(input) { - return phoneNumberRegex.test(input); - } - function combinedErrorFn(...fns) { - switch (fns.length) { - case 0: - return () => null; - case 1: - return fns[0]; - case 2: { - const [fn0, fn1] = fns; - return (...params) => fn0(...params) || fn1(...params); - } - default: { - return (...params) => { - for (const fn of fns) { - const result = fn(...params); - if (result) - return result; - } - return null; - }; - } - } - } - function createUrlValidators(options, validatorOptions) { - const fns = []; - if (options?.allowedProtocols?.length) - fns.push(allowedProtocolsFn(options.allowedProtocols, validatorOptions)); - if (options?.allowedDomains?.length) - fns.push(allowedDomainsFn(options.allowedDomains, validatorOptions)); - return combinedErrorFn(...fns); - } - function allowedProtocolsFn(allowedProtocols, options) { - return (input, url) => allowedProtocols.includes(url.protocol) ? null : new MultiplePossibilitiesConstraintError("s.string().url()", options?.message ?? "Invalid URL protocol", input, allowedProtocols); - } - function allowedDomainsFn(allowedDomains, options) { - return (input, url) => allowedDomains.includes(url.hostname) ? null : new MultiplePossibilitiesConstraintError("s.string().url()", options?.message ?? "Invalid URL domain", input, allowedDomains); - } - function stringLengthComparator(comparator, name, expected, length, options) { - return { - run(input) { - return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid string length", input, expected)); - } - }; - } - function stringLengthLessThan(length, options) { - const expected = `expected.length < ${length}`; - return stringLengthComparator(lessThan, "s.string().lengthLessThan()", expected, length, options); - } - function stringLengthLessThanOrEqual(length, options) { - const expected = `expected.length <= ${length}`; - return stringLengthComparator(lessThanOrEqual, "s.string().lengthLessThanOrEqual()", expected, length, options); - } - function stringLengthGreaterThan(length, options) { - const expected = `expected.length > ${length}`; - return stringLengthComparator(greaterThan, "s.string().lengthGreaterThan()", expected, length, options); - } - function stringLengthGreaterThanOrEqual(length, options) { - const expected = `expected.length >= ${length}`; - return stringLengthComparator(greaterThanOrEqual, "s.string().lengthGreaterThanOrEqual()", expected, length, options); - } - function stringLengthEqual(length, options) { - const expected = `expected.length === ${length}`; - return stringLengthComparator(equal, "s.string().lengthEqual()", expected, length, options); - } - function stringLengthNotEqual(length, options) { - const expected = `expected.length !== ${length}`; - return stringLengthComparator(notEqual, "s.string().lengthNotEqual()", expected, length, options); - } - function stringEmail(options) { - return { - run(input) { - return validateEmail(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string().email()", options?.message ?? "Invalid email address", input, "expected to be an email address")); - } - }; - } - function stringRegexValidator(type, expected, regex, options) { - return { - run(input) { - return regex.test(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(type, options?.message ?? "Invalid string format", input, expected)); - } - }; - } - function stringUrl(options, validatorOptions) { - const validatorFn = createUrlValidators(options, validatorOptions); - return { - run(input) { - let url; - try { - url = new URL(input); - } catch { - return Result.err(new ExpectedConstraintError("s.string().url()", validatorOptions?.message ?? "Invalid URL", input, "expected to match a URL")); - } - const validatorFnResult = validatorFn(input, url); - if (validatorFnResult === null) - return Result.ok(input); - return Result.err(validatorFnResult); - } - }; - } - function stringIp(version, options) { - const ipVersion = version ? `v${version}` : ""; - const validatorFn = version === 4 ? isIPv4 : version === 6 ? isIPv6 : isIP; - const name = `s.string().ip${ipVersion}()`; - const message = `Invalid IP${ipVersion} address`; - const expected = `expected to be an IP${ipVersion} address`; - return { - run(input) { - return validatorFn(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? message, input, expected)); - } - }; - } - function stringRegex(regex, options) { - return stringRegexValidator("s.string().regex()", `expected ${regex}.test(expected) to be true`, regex, options); - } - function stringUuid({ version = 4, nullable = false } = {}, options) { - version ?? (version = "1-5"); - const regex = new RegExp(`^(?:[0-9A-F]{8}-[0-9A-F]{4}-[${version}][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}${nullable ? "|00000000-0000-0000-0000-000000000000" : ""})\$`, "i"); - const expected = `expected to match UUID${typeof version === "number" ? `v${version}` : ` in range of ${version}`}`; - return stringRegexValidator("s.string().uuid()", expected, regex, options); - } - function stringDate(options) { - return { - run(input) { - const time = Date.parse(input); - return Number.isNaN(time) ? Result.err(new ExpectedConstraintError("s.string().date()", options?.message ?? "Invalid date string", input, "expected to be a valid date string (in the ISO 8601 or ECMA-262 format)")) : Result.ok(input); - } - }; - } - function stringPhone(options) { - return { - run(input) { - return validatePhoneNumber(input) ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.string().phone()", options?.message ?? "Invalid phone number", input, "expected to be a phone number")); - } - }; - } - function typedArrayByteLengthComparator(comparator, name, expected, length, options) { - return { - run(input) { - return comparator(input.byteLength, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid Typed Array byte length", input, expected)); - } - }; - } - function typedArrayByteLengthLessThan(value, options) { - const expected = `expected.byteLength < ${value}`; - return typedArrayByteLengthComparator(lessThan, "s.typedArray(T).byteLengthLessThan()", expected, value, options); - } - function typedArrayByteLengthLessThanOrEqual(value, options) { - const expected = `expected.byteLength <= ${value}`; - return typedArrayByteLengthComparator(lessThanOrEqual, "s.typedArray(T).byteLengthLessThanOrEqual()", expected, value, options); - } - function typedArrayByteLengthGreaterThan(value, options) { - const expected = `expected.byteLength > ${value}`; - return typedArrayByteLengthComparator(greaterThan, "s.typedArray(T).byteLengthGreaterThan()", expected, value, options); - } - function typedArrayByteLengthGreaterThanOrEqual(value, options) { - const expected = `expected.byteLength >= ${value}`; - return typedArrayByteLengthComparator(greaterThanOrEqual, "s.typedArray(T).byteLengthGreaterThanOrEqual()", expected, value, options); - } - function typedArrayByteLengthEqual(value, options) { - const expected = `expected.byteLength === ${value}`; - return typedArrayByteLengthComparator(equal, "s.typedArray(T).byteLengthEqual()", expected, value, options); - } - function typedArrayByteLengthNotEqual(value, options) { - const expected = `expected.byteLength !== ${value}`; - return typedArrayByteLengthComparator(notEqual, "s.typedArray(T).byteLengthNotEqual()", expected, value, options); - } - function typedArrayByteLengthRange(start, endBefore, options) { - const expected = `expected.byteLength >= ${start} && expected.byteLength < ${endBefore}`; - return { - run(input) { - return input.byteLength >= start && input.byteLength < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRange()", options?.message ?? "Invalid Typed Array byte length", input, expected)); - } - }; - } - function typedArrayByteLengthRangeInclusive(start, end, options) { - const expected = `expected.byteLength >= ${start} && expected.byteLength <= ${end}`; - return { - run(input) { - return input.byteLength >= start && input.byteLength <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRangeInclusive()", options?.message ?? "Invalid Typed Array byte length", input, expected)); - } - }; - } - function typedArrayByteLengthRangeExclusive(startAfter, endBefore, options) { - const expected = `expected.byteLength > ${startAfter} && expected.byteLength < ${endBefore}`; - return { - run(input) { - return input.byteLength > startAfter && input.byteLength < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).byteLengthRangeExclusive()", options?.message ?? "Invalid Typed Array byte length", input, expected)); - } - }; - } - function typedArrayLengthComparator(comparator, name, expected, length, options) { - return { - run(input) { - return comparator(input.length, length) ? Result.ok(input) : Result.err(new ExpectedConstraintError(name, options?.message ?? "Invalid Typed Array length", input, expected)); - } - }; - } - function typedArrayLengthLessThan(value, options) { - const expected = `expected.length < ${value}`; - return typedArrayLengthComparator(lessThan, "s.typedArray(T).lengthLessThan()", expected, value, options); - } - function typedArrayLengthLessThanOrEqual(value, options) { - const expected = `expected.length <= ${value}`; - return typedArrayLengthComparator(lessThanOrEqual, "s.typedArray(T).lengthLessThanOrEqual()", expected, value, options); - } - function typedArrayLengthGreaterThan(value, options) { - const expected = `expected.length > ${value}`; - return typedArrayLengthComparator(greaterThan, "s.typedArray(T).lengthGreaterThan()", expected, value, options); - } - function typedArrayLengthGreaterThanOrEqual(value, options) { - const expected = `expected.length >= ${value}`; - return typedArrayLengthComparator(greaterThanOrEqual, "s.typedArray(T).lengthGreaterThanOrEqual()", expected, value, options); - } - function typedArrayLengthEqual(value, options) { - const expected = `expected.length === ${value}`; - return typedArrayLengthComparator(equal, "s.typedArray(T).lengthEqual()", expected, value, options); - } - function typedArrayLengthNotEqual(value, options) { - const expected = `expected.length !== ${value}`; - return typedArrayLengthComparator(notEqual, "s.typedArray(T).lengthNotEqual()", expected, value, options); - } - function typedArrayLengthRange(start, endBefore, options) { - const expected = `expected.length >= ${start} && expected.length < ${endBefore}`; - return { - run(input) { - return input.length >= start && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRange()", options?.message ?? "Invalid Typed Array length", input, expected)); - } - }; - } - function typedArrayLengthRangeInclusive(start, end, options) { - const expected = `expected.length >= ${start} && expected.length <= ${end}`; - return { - run(input) { - return input.length >= start && input.length <= end ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeInclusive()", options?.message ?? "Invalid Typed Array length", input, expected)); - } - }; - } - function typedArrayLengthRangeExclusive(startAfter, endBefore, options) { - const expected = `expected.length > ${startAfter} && expected.length < ${endBefore}`; - return { - run(input) { - return input.length > startAfter && input.length < endBefore ? Result.ok(input) : Result.err(new ExpectedConstraintError("s.typedArray(T).lengthRangeExclusive()", options?.message ?? "Invalid Typed Array length", input, expected)); - } - }; - } - var get = require_get(); - var fastDeepEqual = require_es6(); - var uniqWith = require_uniqWith(); - var get__default = /* @__PURE__ */ _interopDefault(get); - var fastDeepEqual__default = /* @__PURE__ */ _interopDefault(fastDeepEqual); - var uniqWith__default = /* @__PURE__ */ _interopDefault(uniqWith); - var __defProp2 = Object.defineProperty; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var e; - var t; - var n; - var r = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : globalThis; - var o = e = {}; - __name(i, "i"); - __name(u, "u"); - __name(c, "c"); - (function() { - try { - t = typeof setTimeout == "function" ? setTimeout : i; - } catch (e3) { - t = i; - } - try { - n = typeof clearTimeout == "function" ? clearTimeout : u; - } catch (e3) { - n = u; - } - })(); - var l; - var s = []; - var f = false; - var a = -1; - __name(h, "h"); - __name(d, "d"); - __name(m, "m"); - __name(p, "p"); - o.nextTick = function(e3) { - var t3 = new Array(arguments.length - 1); - if (arguments.length > 1) - for (var n3 = 1;n3 < arguments.length; n3++) - t3[n3 - 1] = arguments[n3]; - s.push(new m(e3, t3)), s.length !== 1 || f || c(d); - }, m.prototype.run = function() { - (this || r).fun.apply(null, (this || r).array); - }, o.title = "browser", o.browser = true, o.env = {}, o.argv = [], o.version = "", o.versions = {}, o.on = p, o.addListener = p, o.once = p, o.off = p, o.removeListener = p, o.removeAllListeners = p, o.emit = p, o.prependListener = p, o.prependOnceListener = p, o.listeners = function(e3) { - return []; - }, o.binding = function(e3) { - throw new Error("process.binding is not supported"); - }, o.cwd = function() { - return "/"; - }, o.chdir = function(e3) { - throw new Error("process.chdir is not supported"); - }, o.umask = function() { - return 0; - }; - var T = e; - T.addListener; - T.argv; - T.binding; - T.browser; - T.chdir; - T.cwd; - T.emit; - T.env; - T.listeners; - T.nextTick; - T.off; - T.on; - T.once; - T.prependListener; - T.prependOnceListener; - T.removeAllListeners; - T.removeListener; - T.title; - T.umask; - T.version; - T.versions; - var t2 = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol"; - var e2 = Object.prototype.toString; - var o2 = /* @__PURE__ */ __name(function(o3) { - return !(t2 && o3 && typeof o3 == "object" && (Symbol.toStringTag in o3)) && e2.call(o3) === "[object Arguments]"; - }, "o"); - var n2 = /* @__PURE__ */ __name(function(t3) { - return !!o2(t3) || t3 !== null && typeof t3 == "object" && typeof t3.length == "number" && t3.length >= 0 && e2.call(t3) !== "[object Array]" && e2.call(t3.callee) === "[object Function]"; - }, "n"); - var r2 = function() { - return o2(arguments); - }(); - o2.isLegacyArguments = n2; - var l2 = r2 ? o2 : n2; - var t$1 = Object.prototype.toString; - var o$1 = Function.prototype.toString; - var n$1 = /^\s*(?:function)?\*/; - var e$1 = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol"; - var r$1 = Object.getPrototypeOf; - var c2 = function() { - if (!e$1) - return false; - try { - return Function("return function*() {}")(); - } catch (t3) { - } - }(); - var u2 = c2 ? r$1(c2) : {}; - var i2 = /* @__PURE__ */ __name(function(c3) { - return typeof c3 == "function" && (!!n$1.test(o$1.call(c3)) || (e$1 ? r$1(c3) === u2 : t$1.call(c3) === "[object GeneratorFunction]")); - }, "i"); - var t$2 = typeof Object.create == "function" ? function(t3, e3) { - e3 && (t3.super_ = e3, t3.prototype = Object.create(e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } })); - } : function(t3, e3) { - if (e3) { - t3.super_ = e3; - var o3 = /* @__PURE__ */ __name(function() { - }, "o"); - o3.prototype = e3.prototype, t3.prototype = new o3, t3.prototype.constructor = t3; - } - }; - var i$1 = /* @__PURE__ */ __name(function(e3) { - return e3 && typeof e3 == "object" && typeof e3.copy == "function" && typeof e3.fill == "function" && typeof e3.readUInt8 == "function"; - }, "i$1"); - var o$2 = {}; - var u$1 = i$1; - var f2 = l2; - var a2 = i2; - __name(c$1, "c$1"); - var s2 = typeof BigInt != "undefined"; - var p2 = typeof Symbol != "undefined"; - var y = p2 && Symbol.toStringTag !== undefined; - var l$1 = typeof Uint8Array != "undefined"; - var d2 = typeof ArrayBuffer != "undefined"; - if (l$1 && y) - var g = Object.getPrototypeOf(Uint8Array.prototype), b = c$1(Object.getOwnPropertyDescriptor(g, Symbol.toStringTag).get); - var m2 = c$1(Object.prototype.toString); - var h2 = c$1(Number.prototype.valueOf); - var j = c$1(String.prototype.valueOf); - var A = c$1(Boolean.prototype.valueOf); - if (s2) - var w = c$1(BigInt.prototype.valueOf); - if (p2) - var v = c$1(Symbol.prototype.valueOf); - __name(O, "O"); - __name(S, "S"); - __name(B, "B"); - __name(k, "k"); - __name(E, "E"); - __name(D, "D"); - __name(U, "U"); - __name(P, "P"); - __name(x, "x"); - __name(I, "I"); - __name(M, "M"); - __name(z, "z"); - __name(F, "F"); - __name(T2, "T"); - __name(N, "N"); - __name(W, "W"); - __name($, "$"); - __name(C, "C"); - __name(V, "V"); - __name(G, "G"); - __name(R, "R"); - __name(J, "J"); - __name(_, "_"); - __name(H, "H"); - __name(Z, "Z"); - __name(q, "q"); - __name(K, "K"); - __name(L, "L"); - o$2.isArgumentsObject = f2, o$2.isGeneratorFunction = a2, o$2.isPromise = function(e3) { - return typeof Promise != "undefined" && e3 instanceof Promise || e3 !== null && typeof e3 == "object" && typeof e3.then == "function" && typeof e3.catch == "function"; - }, o$2.isArrayBufferView = function(e3) { - return d2 && ArrayBuffer.isView ? ArrayBuffer.isView(e3) : S(e3) || R(e3); - }, o$2.isTypedArray = S, o$2.isUint8Array = B, o$2.isUint8ClampedArray = k, o$2.isUint16Array = E, o$2.isUint32Array = D, o$2.isInt8Array = U, o$2.isInt16Array = P, o$2.isInt32Array = x, o$2.isFloat32Array = I, o$2.isFloat64Array = M, o$2.isBigInt64Array = z, o$2.isBigUint64Array = F, T2.working = typeof Map != "undefined" && T2(/* @__PURE__ */ new Map), o$2.isMap = function(e3) { - return typeof Map != "undefined" && (T2.working ? T2(e3) : e3 instanceof Map); - }, N.working = typeof Set != "undefined" && N(/* @__PURE__ */ new Set), o$2.isSet = function(e3) { - return typeof Set != "undefined" && (N.working ? N(e3) : e3 instanceof Set); - }, W.working = typeof WeakMap != "undefined" && W(/* @__PURE__ */ new WeakMap), o$2.isWeakMap = function(e3) { - return typeof WeakMap != "undefined" && (W.working ? W(e3) : e3 instanceof WeakMap); - }, $.working = typeof WeakSet != "undefined" && $(/* @__PURE__ */ new WeakSet), o$2.isWeakSet = function(e3) { - return $(e3); - }, C.working = typeof ArrayBuffer != "undefined" && C(new ArrayBuffer), o$2.isArrayBuffer = V, G.working = typeof ArrayBuffer != "undefined" && typeof DataView != "undefined" && G(new DataView(new ArrayBuffer(1), 0, 1)), o$2.isDataView = R, J.working = typeof SharedArrayBuffer != "undefined" && J(new SharedArrayBuffer), o$2.isSharedArrayBuffer = _, o$2.isAsyncFunction = function(e3) { - return m2(e3) === "[object AsyncFunction]"; - }, o$2.isMapIterator = function(e3) { - return m2(e3) === "[object Map Iterator]"; - }, o$2.isSetIterator = function(e3) { - return m2(e3) === "[object Set Iterator]"; - }, o$2.isGeneratorObject = function(e3) { - return m2(e3) === "[object Generator]"; - }, o$2.isWebAssemblyCompiledModule = function(e3) { - return m2(e3) === "[object WebAssembly.Module]"; - }, o$2.isNumberObject = H, o$2.isStringObject = Z, o$2.isBooleanObject = q, o$2.isBigIntObject = K, o$2.isSymbolObject = L, o$2.isBoxedPrimitive = function(e3) { - return H(e3) || Z(e3) || q(e3) || K(e3) || L(e3); - }, o$2.isAnyArrayBuffer = function(e3) { - return l$1 && (V(e3) || _(e3)); - }, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(e3) { - Object.defineProperty(o$2, e3, { enumerable: false, value: function() { - throw new Error(e3 + " is not supported in userland"); - } }); - }); - var Q = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : globalThis; - var X = {}; - var Y = T; - var ee = Object.getOwnPropertyDescriptors || function(e3) { - for (var t3 = Object.keys(e3), r3 = {}, n3 = 0;n3 < t3.length; n3++) - r3[t3[n3]] = Object.getOwnPropertyDescriptor(e3, t3[n3]); - return r3; - }; - var te = /%[sdj%]/g; - X.format = function(e3) { - if (!ge(e3)) { - for (var t3 = [], r3 = 0;r3 < arguments.length; r3++) - t3.push(oe(arguments[r3])); - return t3.join(" "); - } - r3 = 1; - for (var n3 = arguments, i3 = n3.length, o3 = String(e3).replace(te, function(e4) { - if (e4 === "%%") - return "%"; - if (r3 >= i3) - return e4; - switch (e4) { - case "%s": - return String(n3[r3++]); - case "%d": - return Number(n3[r3++]); - case "%j": - try { - return JSON.stringify(n3[r3++]); - } catch (e5) { - return "[Circular]"; - } - default: - return e4; - } - }), u3 = n3[r3];r3 < i3; u3 = n3[++r3]) - le(u3) || !he(u3) ? o3 += " " + u3 : o3 += " " + oe(u3); - return o3; - }, X.deprecate = function(e3, t3) { - if (Y !== undefined && Y.noDeprecation === true) - return e3; - if (Y === undefined) - return function() { - return X.deprecate(e3, t3).apply(this || Q, arguments); - }; - var r3 = false; - return function() { - if (!r3) { - if (Y.throwDeprecation) - throw new Error(t3); - Y.traceDeprecation ? console.trace(t3) : console.error(t3), r3 = true; - } - return e3.apply(this || Q, arguments); - }; - }; - var re = {}; - var ne = /^$/; - if (Y.env.NODE_DEBUG) { - ie = Y.env.NODE_DEBUG; - ie = ie.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), ne = new RegExp("^" + ie + "$", "i"); - } - var ie; - __name(oe, "oe"); - __name(ue, "ue"); - __name(fe, "fe"); - __name(ae, "ae"); - __name(ce, "ce"); - __name(se, "se"); - __name(pe, "pe"); - __name(ye, "ye"); - __name(le, "le"); - __name(de, "de"); - __name(ge, "ge"); - __name(be, "be"); - __name(me, "me"); - __name(he, "he"); - __name(je, "je"); - __name(Ae, "Ae"); - __name(we, "we"); - __name(ve, "ve"); - __name(Oe, "Oe"); - X.debuglog = function(e3) { - if (e3 = e3.toUpperCase(), !re[e3]) - if (ne.test(e3)) { - var t3 = Y.pid; - re[e3] = function() { - var r3 = X.format.apply(X, arguments); - console.error("%s %d: %s", e3, t3, r3); - }; - } else - re[e3] = function() { - }; - return re[e3]; - }, X.inspect = oe, oe.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, oe.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, X.types = o$2, X.isArray = pe, X.isBoolean = ye, X.isNull = le, X.isNullOrUndefined = function(e3) { - return e3 == null; - }, X.isNumber = de, X.isString = ge, X.isSymbol = function(e3) { - return typeof e3 == "symbol"; - }, X.isUndefined = be, X.isRegExp = me, X.types.isRegExp = me, X.isObject = he, X.isDate = je, X.types.isDate = je, X.isError = Ae, X.types.isNativeError = Ae, X.isFunction = we, X.isPrimitive = function(e3) { - return e3 === null || typeof e3 == "boolean" || typeof e3 == "number" || typeof e3 == "string" || typeof e3 == "symbol" || e3 === undefined; - }, X.isBuffer = i$1; - var Se = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; - __name(Be, "Be"); - __name(ke, "ke"); - X.log = function() { - console.log("%s - %s", Be(), X.format.apply(X, arguments)); - }, X.inherits = t$2, X._extend = function(e3, t3) { - if (!t3 || !he(t3)) - return e3; - for (var r3 = Object.keys(t3), n3 = r3.length;n3--; ) - e3[r3[n3]] = t3[r3[n3]]; - return e3; - }; - var Ee = typeof Symbol != "undefined" ? Symbol("util.promisify.custom") : undefined; - __name(De, "De"); - X.promisify = function(e3) { - if (typeof e3 != "function") - throw new TypeError('The "original" argument must be of type Function'); - if (Ee && e3[Ee]) { - var t3; - if (typeof (t3 = e3[Ee]) != "function") - throw new TypeError('The "util.promisify.custom" argument must be of type Function'); - return Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), t3; - } - function t3() { - for (var t4, r3, n3 = new Promise(function(e4, n4) { - t4 = e4, r3 = n4; - }), i3 = [], o3 = 0;o3 < arguments.length; o3++) - i3.push(arguments[o3]); - i3.push(function(e4, n4) { - e4 ? r3(e4) : t4(n4); - }); - try { - e3.apply(this || Q, i3); - } catch (e4) { - r3(e4); - } - return n3; - } - __name(t3, "t"); - return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Ee && Object.defineProperty(t3, Ee, { value: t3, enumerable: false, writable: false, configurable: true }), Object.defineProperties(t3, ee(e3)); - }, X.promisify.custom = Ee, X.callbackify = function(e3) { - if (typeof e3 != "function") - throw new TypeError('The "original" argument must be of type Function'); - function t3() { - for (var t4 = [], r3 = 0;r3 < arguments.length; r3++) - t4.push(arguments[r3]); - var n3 = t4.pop(); - if (typeof n3 != "function") - throw new TypeError("The last argument must be of type Function"); - var i3 = this || Q, o3 = /* @__PURE__ */ __name(function() { - return n3.apply(i3, arguments); - }, "o"); - e3.apply(this || Q, t4).then(function(e4) { - Y.nextTick(o3.bind(null, null, e4)); - }, function(e4) { - Y.nextTick(De.bind(null, e4, o3)); - }); - } - __name(t3, "t"); - return Object.setPrototypeOf(t3, Object.getPrototypeOf(e3)), Object.defineProperties(t3, ee(e3)), t3; - }; - X._extend; - X.callbackify; - X.debuglog; - X.deprecate; - X.format; - X.inherits; - X.inspect; - X.isArray; - X.isBoolean; - X.isBuffer; - X.isDate; - X.isError; - X.isFunction; - X.isNull; - X.isNullOrUndefined; - X.isNumber; - X.isObject; - X.isPrimitive; - X.isRegExp; - X.isString; - X.isSymbol; - X.isUndefined; - X.log; - X.promisify; - X._extend; - X.callbackify; - X.debuglog; - X.deprecate; - X.format; - X.inherits; - X.inspect; - X.isArray; - X.isBoolean; - X.isBuffer; - X.isDate; - X.isError; - X.isFunction; - X.isNull; - X.isNullOrUndefined; - X.isNumber; - X.isObject; - X.isPrimitive; - X.isRegExp; - X.isString; - X.isSymbol; - X.isUndefined; - X.log; - X.promisify; - X.types; - X._extend; - X.callbackify; - X.debuglog; - X.deprecate; - X.format; - X.inherits; - var inspect2 = X.inspect; - X.isArray; - X.isBoolean; - X.isBuffer; - X.isDate; - X.isError; - X.isFunction; - X.isNull; - X.isNullOrUndefined; - X.isNumber; - X.isObject; - X.isPrimitive; - X.isRegExp; - X.isString; - X.isSymbol; - X.isUndefined; - X.log; - X.promisify; - X.types; - X.TextEncoder = globalThis.TextEncoder; - X.TextDecoder = globalThis.TextDecoder; - var customInspectSymbol = Symbol.for("nodejs.util.inspect.custom"); - var customInspectSymbolStackLess = Symbol.for("nodejs.util.inspect.custom.stack-less"); - var _BaseError = class _BaseError2 extends Error { - toJSON() { - return { - name: this.name, - message: this.message - }; - } - [customInspectSymbol](depth, options) { - return `${this[customInspectSymbolStackLess](depth, options)} -${this.stack.slice(this.stack.indexOf("\n"))}`; - } - }; - __name(_BaseError, "BaseError"); - var BaseError = _BaseError; - var _BaseConstraintError = class _BaseConstraintError2 extends BaseError { - constructor(constraint, message, given) { - super(message); - this.constraint = constraint; - this.given = given; - } - toJSON() { - return { - name: this.name, - constraint: this.constraint, - given: this.given, - message: this.message - }; - } - }; - __name(_BaseConstraintError, "BaseConstraintError"); - var BaseConstraintError = _BaseConstraintError; - var _ExpectedConstraintError = class _ExpectedConstraintError2 extends BaseConstraintError { - constructor(constraint, message, given, expected) { - super(constraint, message, given); - this.expected = expected; - } - toJSON() { - return { - name: this.name, - constraint: this.constraint, - given: this.given, - expected: this.expected, - message: this.message - }; - } - [customInspectSymbolStackLess](depth, options) { - const constraint = options.stylize(this.constraint, "string"); - if (depth < 0) { - return options.stylize(`[ExpectedConstraintError: ${constraint}]`, "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const given = inspect2(this.given, newOptions).replace(/\n/g, padding); - const header = `${options.stylize("ExpectedConstraintError", "special")} > ${constraint}`; - const message = options.stylize(this.message, "regexp"); - const expectedBlock = ` - ${options.stylize("Expected: ", "string")}${options.stylize(this.expected, "boolean")}`; - const givenBlock = ` - ${options.stylize("Received:", "regexp")}${padding}${given}`; - return `${header} - ${message} -${expectedBlock} -${givenBlock}`; - } - }; - __name(_ExpectedConstraintError, "ExpectedConstraintError"); - var ExpectedConstraintError = _ExpectedConstraintError; - var _Result = class _Result2 { - constructor(success, value, error) { - this.success = success; - if (success) { - this.value = value; - } else { - this.error = error; - } - } - isOk() { - return this.success; - } - isErr() { - return !this.success; - } - unwrap() { - if (this.isOk()) - return this.value; - throw this.error; - } - static ok(value) { - return new _Result2(true, value); - } - static err(error) { - return new _Result2(false, undefined, error); - } - }; - __name(_Result, "Result"); - var Result = _Result; - __name(whenConstraint, "whenConstraint"); - __name(resolveBooleanIs, "resolveBooleanIs"); - var validationEnabled = true; - __name(setGlobalValidationEnabled, "setGlobalValidationEnabled"); - __name(getGlobalValidationEnabled, "getGlobalValidationEnabled"); - __name(getValue, "getValue"); - var _BaseValidator = class _BaseValidator2 { - constructor(validatorOptions = {}, constraints = []) { - this.constraints = []; - this.isValidationEnabled = null; - this.constraints = constraints; - this.validatorOptions = validatorOptions; - } - setParent(parent) { - this.parent = parent; - return this; - } - optional(options = this.validatorOptions) { - return new UnionValidator([new LiteralValidator(undefined, options), this.clone()], options); - } - nullable(options = this.validatorOptions) { - return new UnionValidator([new LiteralValidator(null, options), this.clone()], options); - } - nullish(options = this.validatorOptions) { - return new UnionValidator([new NullishValidator(options), this.clone()], options); - } - array(options = this.validatorOptions) { - return new ArrayValidator(this.clone(), options); - } - set(options = this.validatorOptions) { - return new SetValidator(this.clone(), options); - } - or(...predicates) { - return new UnionValidator([this.clone(), ...predicates], this.validatorOptions); - } - transform(cb, options = this.validatorOptions) { - return this.addConstraint({ - run: (input) => Result.ok(cb(input)) - }, options); - } - reshape(cb, options = this.validatorOptions) { - return this.addConstraint({ - run: cb - }, options); - } - default(value, options = this.validatorOptions) { - return new DefaultValidator(this.clone(), value, options); - } - when(key, options, validatorOptions) { - return this.addConstraint(whenConstraint(key, options, this, validatorOptions)); - } - describe(description) { - const clone = this.clone(); - clone.description = description; - return clone; - } - run(value) { - let result = this.handle(value); - if (result.isErr()) - return result; - for (const constraint of this.constraints) { - result = constraint.run(result.value, this.parent); - if (result.isErr()) - break; - } - return result; - } - parse(value) { - if (!this.shouldRunConstraints) { - return this.handle(value).unwrap(); - } - return this.constraints.reduce((v2, constraint) => constraint.run(v2).unwrap(), this.handle(value).unwrap()); - } - is(value) { - return this.run(value).isOk(); - } - setValidationEnabled(isValidationEnabled) { - const clone = this.clone(); - clone.isValidationEnabled = isValidationEnabled; - return clone; - } - getValidationEnabled() { - return getValue(this.isValidationEnabled); - } - get shouldRunConstraints() { - return getValue(this.isValidationEnabled) ?? getGlobalValidationEnabled(); - } - clone() { - const clone = Reflect.construct(this.constructor, [this.validatorOptions, this.constraints]); - clone.isValidationEnabled = this.isValidationEnabled; - return clone; - } - addConstraint(constraint, validatorOptions = this.validatorOptions) { - const clone = this.clone(); - clone.validatorOptions = validatorOptions; - clone.constraints = clone.constraints.concat(constraint); - return clone; - } - }; - __name(_BaseValidator, "BaseValidator"); - var BaseValidator = _BaseValidator; - __name(isUnique, "isUnique"); - __name(lessThan, "lessThan"); - __name(lessThanOrEqual, "lessThanOrEqual"); - __name(greaterThan, "greaterThan"); - __name(greaterThanOrEqual, "greaterThanOrEqual"); - __name(equal, "equal"); - __name(notEqual, "notEqual"); - __name(arrayLengthComparator, "arrayLengthComparator"); - __name(arrayLengthLessThan, "arrayLengthLessThan"); - __name(arrayLengthLessThanOrEqual, "arrayLengthLessThanOrEqual"); - __name(arrayLengthGreaterThan, "arrayLengthGreaterThan"); - __name(arrayLengthGreaterThanOrEqual, "arrayLengthGreaterThanOrEqual"); - __name(arrayLengthEqual, "arrayLengthEqual"); - __name(arrayLengthNotEqual, "arrayLengthNotEqual"); - __name(arrayLengthRange, "arrayLengthRange"); - __name(arrayLengthRangeInclusive, "arrayLengthRangeInclusive"); - __name(arrayLengthRangeExclusive, "arrayLengthRangeExclusive"); - __name(uniqueArray, "uniqueArray"); - var _CombinedPropertyError = class _CombinedPropertyError2 extends BaseError { - constructor(errors, validatorOptions) { - super(validatorOptions?.message ?? "Received one or more errors"); - this.errors = errors; - } - [customInspectSymbolStackLess](depth, options) { - if (depth < 0) { - return options.stylize("[CombinedPropertyError]", "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const header = `${options.stylize("CombinedPropertyError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`; - const message = options.stylize(this.message, "regexp"); - const errors = this.errors.map(([key, error]) => { - const property = _CombinedPropertyError2.formatProperty(key, options); - const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding); - return ` input${property}${padding}${body}`; - }).join("\n\n"); - return `${header} - ${message} - -${errors}`; - } - static formatProperty(key, options) { - if (typeof key === "string") - return options.stylize(`.${key}`, "symbol"); - if (typeof key === "number") - return `[${options.stylize(key.toString(), "number")}]`; - return `[${options.stylize("Symbol", "symbol")}(${key.description})]`; - } - }; - __name(_CombinedPropertyError, "CombinedPropertyError"); - var CombinedPropertyError = _CombinedPropertyError; - var _ValidationError = class _ValidationError2 extends BaseError { - constructor(validator, message, given) { - super(message); - this.validator = validator; - this.given = given; - } - toJSON() { - return { - name: this.name, - message: "Unknown validation error occurred.", - validator: this.validator, - given: this.given - }; - } - [customInspectSymbolStackLess](depth, options) { - const validator = options.stylize(this.validator, "string"); - if (depth < 0) { - return options.stylize(`[ValidationError: ${validator}]`, "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const given = inspect2(this.given, newOptions).replace(/\n/g, padding); - const header = `${options.stylize("ValidationError", "special")} > ${validator}`; - const message = options.stylize(this.message, "regexp"); - const givenBlock = ` - ${options.stylize("Received:", "regexp")}${padding}${given}`; - return `${header} - ${message} -${givenBlock}`; - } - }; - __name(_ValidationError, "ValidationError"); - var ValidationError = _ValidationError; - var _ArrayValidator = class _ArrayValidator2 extends BaseValidator { - constructor(validator, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.validator = validator; - } - lengthLessThan(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthLessThan(length, options)); - } - lengthLessThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthLessThanOrEqual(length, options)); - } - lengthGreaterThan(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthGreaterThan(length, options)); - } - lengthGreaterThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthGreaterThanOrEqual(length, options)); - } - lengthEqual(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthEqual(length, options)); - } - lengthNotEqual(length, options = this.validatorOptions) { - return this.addConstraint(arrayLengthNotEqual(length, options)); - } - lengthRange(start, endBefore, options = this.validatorOptions) { - return this.addConstraint(arrayLengthRange(start, endBefore, options)); - } - lengthRangeInclusive(startAt, endAt, options = this.validatorOptions) { - return this.addConstraint(arrayLengthRangeInclusive(startAt, endAt, options)); - } - lengthRangeExclusive(startAfter, endBefore, options = this.validatorOptions) { - return this.addConstraint(arrayLengthRangeExclusive(startAfter, endBefore, options)); - } - unique(options = this.validatorOptions) { - return this.addConstraint(uniqueArray(options)); - } - clone() { - return Reflect.construct(this.constructor, [this.validator, this.validatorOptions, this.constraints]); - } - handle(values) { - if (!Array.isArray(values)) { - return Result.err(new ValidationError("s.array(T)", this.validatorOptions.message ?? "Expected an array", values)); - } - if (!this.shouldRunConstraints) { - return Result.ok(values); - } - const errors = []; - const transformed = []; - for (let i3 = 0;i3 < values.length; i3++) { - const result = this.validator.run(values[i3]); - if (result.isOk()) - transformed.push(result.value); - else - errors.push([i3, result.error]); - } - return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - }; - __name(_ArrayValidator, "ArrayValidator"); - var ArrayValidator = _ArrayValidator; - __name(bigintComparator, "bigintComparator"); - __name(bigintLessThan, "bigintLessThan"); - __name(bigintLessThanOrEqual, "bigintLessThanOrEqual"); - __name(bigintGreaterThan, "bigintGreaterThan"); - __name(bigintGreaterThanOrEqual, "bigintGreaterThanOrEqual"); - __name(bigintEqual, "bigintEqual"); - __name(bigintNotEqual, "bigintNotEqual"); - __name(bigintDivisibleBy, "bigintDivisibleBy"); - var _BigIntValidator = class _BigIntValidator2 extends BaseValidator { - lessThan(number, options = this.validatorOptions) { - return this.addConstraint(bigintLessThan(number, options)); - } - lessThanOrEqual(number, options = this.validatorOptions) { - return this.addConstraint(bigintLessThanOrEqual(number, options)); - } - greaterThan(number, options = this.validatorOptions) { - return this.addConstraint(bigintGreaterThan(number, options)); - } - greaterThanOrEqual(number, options = this.validatorOptions) { - return this.addConstraint(bigintGreaterThanOrEqual(number, options)); - } - equal(number, options = this.validatorOptions) { - return this.addConstraint(bigintEqual(number, options)); - } - notEqual(number, options = this.validatorOptions) { - return this.addConstraint(bigintNotEqual(number, options)); - } - positive(options = this.validatorOptions) { - return this.greaterThanOrEqual(0n, options); - } - negative(options = this.validatorOptions) { - return this.lessThan(0n, options); - } - divisibleBy(number, options = this.validatorOptions) { - return this.addConstraint(bigintDivisibleBy(number, options)); - } - abs(options = this.validatorOptions) { - return this.transform((value) => value < 0 ? -value : value, options); - } - intN(bits, options = this.validatorOptions) { - return this.transform((value) => BigInt.asIntN(bits, value), options); - } - uintN(bits, options = this.validatorOptions) { - return this.transform((value) => BigInt.asUintN(bits, value), options); - } - handle(value) { - return typeof value === "bigint" ? Result.ok(value) : Result.err(new ValidationError("s.bigint()", this.validatorOptions.message ?? "Expected a bigint primitive", value)); - } - }; - __name(_BigIntValidator, "BigIntValidator"); - var BigIntValidator = _BigIntValidator; - __name(booleanTrue, "booleanTrue"); - __name(booleanFalse, "booleanFalse"); - var _BooleanValidator = class _BooleanValidator2 extends BaseValidator { - true(options = this.validatorOptions) { - return this.addConstraint(booleanTrue(options)); - } - false(options = this.validatorOptions) { - return this.addConstraint(booleanFalse(options)); - } - equal(value, options = this.validatorOptions) { - return value ? this.true(options) : this.false(options); - } - notEqual(value, options = this.validatorOptions) { - return value ? this.false(options) : this.true(options); - } - handle(value) { - return typeof value === "boolean" ? Result.ok(value) : Result.err(new ValidationError("s.boolean()", this.validatorOptions.message ?? "Expected a boolean primitive", value)); - } - }; - __name(_BooleanValidator, "BooleanValidator"); - var BooleanValidator = _BooleanValidator; - __name(dateComparator, "dateComparator"); - __name(dateLessThan, "dateLessThan"); - __name(dateLessThanOrEqual, "dateLessThanOrEqual"); - __name(dateGreaterThan, "dateGreaterThan"); - __name(dateGreaterThanOrEqual, "dateGreaterThanOrEqual"); - __name(dateEqual, "dateEqual"); - __name(dateNotEqual, "dateNotEqual"); - __name(dateInvalid, "dateInvalid"); - __name(dateValid, "dateValid"); - var _DateValidator = class _DateValidator2 extends BaseValidator { - lessThan(date, options = this.validatorOptions) { - return this.addConstraint(dateLessThan(new Date(date), options)); - } - lessThanOrEqual(date, options = this.validatorOptions) { - return this.addConstraint(dateLessThanOrEqual(new Date(date), options)); - } - greaterThan(date, options = this.validatorOptions) { - return this.addConstraint(dateGreaterThan(new Date(date), options)); - } - greaterThanOrEqual(date, options = this.validatorOptions) { - return this.addConstraint(dateGreaterThanOrEqual(new Date(date), options)); - } - equal(date, options = this.validatorOptions) { - const resolved = new Date(date); - return Number.isNaN(resolved.getTime()) ? this.invalid(options) : this.addConstraint(dateEqual(resolved, options)); - } - notEqual(date, options = this.validatorOptions) { - const resolved = new Date(date); - return Number.isNaN(resolved.getTime()) ? this.valid(options) : this.addConstraint(dateNotEqual(resolved, options)); - } - valid(options = this.validatorOptions) { - return this.addConstraint(dateValid(options)); - } - invalid(options = this.validatorOptions) { - return this.addConstraint(dateInvalid(options)); - } - handle(value) { - return value instanceof Date ? Result.ok(value) : Result.err(new ValidationError("s.date()", this.validatorOptions.message ?? "Expected a Date", value)); - } - }; - __name(_DateValidator, "DateValidator"); - var DateValidator = _DateValidator; - var _ExpectedValidationError = class _ExpectedValidationError2 extends ValidationError { - constructor(validator, message, given, expected) { - super(validator, message, given); - this.expected = expected; - } - toJSON() { - return { - name: this.name, - validator: this.validator, - given: this.given, - expected: this.expected, - message: this.message - }; - } - [customInspectSymbolStackLess](depth, options) { - const validator = options.stylize(this.validator, "string"); - if (depth < 0) { - return options.stylize(`[ExpectedValidationError: ${validator}]`, "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const expected = inspect2(this.expected, newOptions).replace(/\n/g, padding); - const given = inspect2(this.given, newOptions).replace(/\n/g, padding); - const header = `${options.stylize("ExpectedValidationError", "special")} > ${validator}`; - const message = options.stylize(this.message, "regexp"); - const expectedBlock = ` - ${options.stylize("Expected:", "string")}${padding}${expected}`; - const givenBlock = ` - ${options.stylize("Received:", "regexp")}${padding}${given}`; - return `${header} - ${message} -${expectedBlock} -${givenBlock}`; - } - }; - __name(_ExpectedValidationError, "ExpectedValidationError"); - var ExpectedValidationError = _ExpectedValidationError; - var _InstanceValidator = class _InstanceValidator2 extends BaseValidator { - constructor(expected, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.expected = expected; - } - handle(value) { - return value instanceof this.expected ? Result.ok(value) : Result.err(new ExpectedValidationError("s.instance(V)", this.validatorOptions.message ?? "Expected", value, this.expected)); - } - clone() { - return Reflect.construct(this.constructor, [this.expected, this.validatorOptions, this.constraints]); - } - }; - __name(_InstanceValidator, "InstanceValidator"); - var InstanceValidator = _InstanceValidator; - var _LiteralValidator = class _LiteralValidator2 extends BaseValidator { - constructor(literal, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.expected = literal; - } - handle(value) { - return Object.is(value, this.expected) ? Result.ok(value) : Result.err(new ExpectedValidationError("s.literal(V)", this.validatorOptions.message ?? "Expected values to be equals", value, this.expected)); - } - clone() { - return Reflect.construct(this.constructor, [this.expected, this.validatorOptions, this.constraints]); - } - }; - __name(_LiteralValidator, "LiteralValidator"); - var LiteralValidator = _LiteralValidator; - var _NeverValidator = class _NeverValidator2 extends BaseValidator { - handle(value) { - return Result.err(new ValidationError("s.never()", this.validatorOptions.message ?? "Expected a value to not be passed", value)); - } - }; - __name(_NeverValidator, "NeverValidator"); - var NeverValidator = _NeverValidator; - var _NullishValidator = class _NullishValidator2 extends BaseValidator { - handle(value) { - return value === undefined || value === null ? Result.ok(value) : Result.err(new ValidationError("s.nullish()", this.validatorOptions.message ?? "Expected undefined or null", value)); - } - }; - __name(_NullishValidator, "NullishValidator"); - var NullishValidator = _NullishValidator; - __name(numberComparator, "numberComparator"); - __name(numberLessThan, "numberLessThan"); - __name(numberLessThanOrEqual, "numberLessThanOrEqual"); - __name(numberGreaterThan, "numberGreaterThan"); - __name(numberGreaterThanOrEqual, "numberGreaterThanOrEqual"); - __name(numberEqual, "numberEqual"); - __name(numberNotEqual, "numberNotEqual"); - __name(numberInt, "numberInt"); - __name(numberSafeInt, "numberSafeInt"); - __name(numberFinite, "numberFinite"); - __name(numberNaN, "numberNaN"); - __name(numberNotNaN, "numberNotNaN"); - __name(numberDivisibleBy, "numberDivisibleBy"); - var _NumberValidator = class _NumberValidator2 extends BaseValidator { - lessThan(number, options = this.validatorOptions) { - return this.addConstraint(numberLessThan(number, options)); - } - lessThanOrEqual(number, options = this.validatorOptions) { - return this.addConstraint(numberLessThanOrEqual(number, options)); - } - greaterThan(number, options = this.validatorOptions) { - return this.addConstraint(numberGreaterThan(number, options)); - } - greaterThanOrEqual(number, options = this.validatorOptions) { - return this.addConstraint(numberGreaterThanOrEqual(number, options)); - } - equal(number, options = this.validatorOptions) { - return Number.isNaN(number) ? this.addConstraint(numberNaN(options)) : this.addConstraint(numberEqual(number, options)); - } - notEqual(number, options = this.validatorOptions) { - return Number.isNaN(number) ? this.addConstraint(numberNotNaN(options)) : this.addConstraint(numberNotEqual(number, options)); - } - int(options = this.validatorOptions) { - return this.addConstraint(numberInt(options)); - } - safeInt(options = this.validatorOptions) { - return this.addConstraint(numberSafeInt(options)); - } - finite(options = this.validatorOptions) { - return this.addConstraint(numberFinite(options)); - } - positive(options = this.validatorOptions) { - return this.greaterThanOrEqual(0, options); - } - negative(options = this.validatorOptions) { - return this.lessThan(0, options); - } - divisibleBy(divider, options = this.validatorOptions) { - return this.addConstraint(numberDivisibleBy(divider, options)); - } - abs(options = this.validatorOptions) { - return this.transform(Math.abs, options); - } - sign(options = this.validatorOptions) { - return this.transform(Math.sign, options); - } - trunc(options = this.validatorOptions) { - return this.transform(Math.trunc, options); - } - floor(options = this.validatorOptions) { - return this.transform(Math.floor, options); - } - fround(options = this.validatorOptions) { - return this.transform(Math.fround, options); - } - round(options = this.validatorOptions) { - return this.transform(Math.round, options); - } - ceil(options = this.validatorOptions) { - return this.transform(Math.ceil, options); - } - handle(value) { - return typeof value === "number" ? Result.ok(value) : Result.err(new ValidationError("s.number()", this.validatorOptions.message ?? "Expected a number primitive", value)); - } - }; - __name(_NumberValidator, "NumberValidator"); - var NumberValidator = _NumberValidator; - var _MissingPropertyError = class _MissingPropertyError2 extends BaseError { - constructor(property, validatorOptions) { - super(validatorOptions?.message ?? "A required property is missing"); - this.property = property; - } - toJSON() { - return { - name: this.name, - message: this.message, - property: this.property - }; - } - [customInspectSymbolStackLess](depth, options) { - const property = options.stylize(this.property.toString(), "string"); - if (depth < 0) { - return options.stylize(`[MissingPropertyError: ${property}]`, "special"); - } - const header = `${options.stylize("MissingPropertyError", "special")} > ${property}`; - const message = options.stylize(this.message, "regexp"); - return `${header} - ${message}`; - } - }; - __name(_MissingPropertyError, "MissingPropertyError"); - var MissingPropertyError = _MissingPropertyError; - var _UnknownPropertyError = class _UnknownPropertyError2 extends BaseError { - constructor(property, value, options) { - super(options?.message ?? "Received unexpected property"); - this.property = property; - this.value = value; - } - toJSON() { - return { - name: this.name, - message: this.message, - property: this.property, - value: this.value - }; - } - [customInspectSymbolStackLess](depth, options) { - const property = options.stylize(this.property.toString(), "string"); - if (depth < 0) { - return options.stylize(`[UnknownPropertyError: ${property}]`, "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const given = inspect2(this.value, newOptions).replace(/\n/g, padding); - const header = `${options.stylize("UnknownPropertyError", "special")} > ${property}`; - const message = options.stylize(this.message, "regexp"); - const givenBlock = ` - ${options.stylize("Received:", "regexp")}${padding}${given}`; - return `${header} - ${message} -${givenBlock}`; - } - }; - __name(_UnknownPropertyError, "UnknownPropertyError"); - var UnknownPropertyError = _UnknownPropertyError; - var _DefaultValidator = class _DefaultValidator2 extends BaseValidator { - constructor(validator, value, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.validator = validator; - this.defaultValue = value; - } - default(value, options = this.validatorOptions) { - const clone = this.clone(); - clone.validatorOptions = options; - clone.defaultValue = value; - return clone; - } - handle(value) { - return typeof value === "undefined" ? Result.ok(getValue(this.defaultValue)) : this.validator["handle"](value); - } - clone() { - return Reflect.construct(this.constructor, [this.validator, this.defaultValue, this.validatorOptions, this.constraints]); - } - }; - __name(_DefaultValidator, "DefaultValidator"); - var DefaultValidator = _DefaultValidator; - var _CombinedError = class _CombinedError2 extends BaseError { - constructor(errors, validatorOptions) { - super(validatorOptions?.message ?? "Received one or more errors"); - this.errors = errors; - } - [customInspectSymbolStackLess](depth, options) { - if (depth < 0) { - return options.stylize("[CombinedError]", "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1, compact: true }; - const padding = ` - ${options.stylize("|", "undefined")} `; - const header = `${options.stylize("CombinedError", "special")} (${options.stylize(this.errors.length.toString(), "number")})`; - const message = options.stylize(this.message, "regexp"); - const errors = this.errors.map((error, i3) => { - const index = options.stylize((i3 + 1).toString(), "number"); - const body = error[customInspectSymbolStackLess](depth - 1, newOptions).replace(/\n/g, padding); - return ` ${index} ${body}`; - }).join("\n\n"); - return `${header} - ${message} - -${errors}`; - } - }; - __name(_CombinedError, "CombinedError"); - var CombinedError = _CombinedError; - var _UnionValidator = class _UnionValidator2 extends BaseValidator { - constructor(validators, validatorOptions, constraints = []) { - super(validatorOptions, constraints); - this.validators = validators; - } - optional(options = this.validatorOptions) { - if (this.validators.length === 0) - return new _UnionValidator2([new LiteralValidator(undefined, options)], this.validatorOptions, this.constraints); - const [validator] = this.validators; - if (validator instanceof LiteralValidator) { - if (validator.expected === undefined) - return this.clone(); - if (validator.expected === null) { - return new _UnionValidator2([new NullishValidator(options), ...this.validators.slice(1)], this.validatorOptions, this.constraints); - } - } else if (validator instanceof NullishValidator) { - return this.clone(); - } - return new _UnionValidator2([new LiteralValidator(undefined, options), ...this.validators], this.validatorOptions); - } - required(options = this.validatorOptions) { - if (this.validators.length === 0) - return this.clone(); - const [validator] = this.validators; - if (validator instanceof LiteralValidator) { - if (validator.expected === undefined) { - return new _UnionValidator2(this.validators.slice(1), this.validatorOptions, this.constraints); - } - } else if (validator instanceof NullishValidator) { - return new _UnionValidator2([new LiteralValidator(null, options), ...this.validators.slice(1)], this.validatorOptions, this.constraints); - } - return this.clone(); - } - nullable(options = this.validatorOptions) { - if (this.validators.length === 0) { - return new _UnionValidator2([new LiteralValidator(null, options)], this.validatorOptions, this.constraints); - } - const [validator] = this.validators; - if (validator instanceof LiteralValidator) { - if (validator.expected === null) - return this.clone(); - if (validator.expected === undefined) { - return new _UnionValidator2([new NullishValidator(options), ...this.validators.slice(1)], this.validatorOptions, this.constraints); - } - } else if (validator instanceof NullishValidator) { - return this.clone(); - } - return new _UnionValidator2([new LiteralValidator(null, options), ...this.validators], this.validatorOptions); - } - nullish(options = this.validatorOptions) { - if (this.validators.length === 0) { - return new _UnionValidator2([new NullishValidator(options)], options, this.constraints); - } - const [validator] = this.validators; - if (validator instanceof LiteralValidator) { - if (validator.expected === null || validator.expected === undefined) { - return new _UnionValidator2([new NullishValidator(options), ...this.validators.slice(1)], options, this.constraints); - } - } else if (validator instanceof NullishValidator) { - return this.clone(); - } - return new _UnionValidator2([new NullishValidator(options), ...this.validators], options); - } - or(...predicates) { - return new _UnionValidator2([...this.validators, ...predicates], this.validatorOptions); - } - clone() { - return Reflect.construct(this.constructor, [this.validators, this.validatorOptions, this.constraints]); - } - handle(value) { - const errors = []; - for (const validator of this.validators) { - const result = validator.run(value); - if (result.isOk()) - return result; - errors.push(result.error); - } - return Result.err(new CombinedError(errors, this.validatorOptions)); - } - }; - __name(_UnionValidator, "UnionValidator"); - var UnionValidator = _UnionValidator; - var _ObjectValidator = class _ObjectValidator2 extends BaseValidator { - constructor(shape, strategy = 0, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.keys = []; - this.requiredKeys = /* @__PURE__ */ new Map; - this.possiblyUndefinedKeys = /* @__PURE__ */ new Map; - this.possiblyUndefinedKeysWithDefaults = /* @__PURE__ */ new Map; - this.shape = shape; - this.strategy = strategy; - switch (this.strategy) { - case 0: - this.handleStrategy = (value) => this.handleIgnoreStrategy(value); - break; - case 1: { - this.handleStrategy = (value) => this.handleStrictStrategy(value); - break; - } - case 2: - this.handleStrategy = (value) => this.handlePassthroughStrategy(value); - break; - } - const shapeEntries = Object.entries(shape); - this.keys = shapeEntries.map(([key]) => key); - for (const [key, validator] of shapeEntries) { - if (validator instanceof UnionValidator) { - const [possiblyLiteralOrNullishPredicate] = validator["validators"]; - if (possiblyLiteralOrNullishPredicate instanceof NullishValidator) { - this.possiblyUndefinedKeys.set(key, validator); - } else if (possiblyLiteralOrNullishPredicate instanceof LiteralValidator) { - if (possiblyLiteralOrNullishPredicate.expected === undefined) { - this.possiblyUndefinedKeys.set(key, validator); - } else { - this.requiredKeys.set(key, validator); - } - } else if (validator instanceof DefaultValidator) { - this.possiblyUndefinedKeysWithDefaults.set(key, validator); - } else { - this.requiredKeys.set(key, validator); - } - } else if (validator instanceof NullishValidator) { - this.possiblyUndefinedKeys.set(key, validator); - } else if (validator instanceof LiteralValidator) { - if (validator.expected === undefined) { - this.possiblyUndefinedKeys.set(key, validator); - } else { - this.requiredKeys.set(key, validator); - } - } else if (validator instanceof DefaultValidator) { - this.possiblyUndefinedKeysWithDefaults.set(key, validator); - } else { - this.requiredKeys.set(key, validator); - } - } - } - strict(options = this.validatorOptions) { - return Reflect.construct(this.constructor, [this.shape, 1, options, this.constraints]); - } - ignore(options = this.validatorOptions) { - return Reflect.construct(this.constructor, [this.shape, 0, options, this.constraints]); - } - passthrough(options = this.validatorOptions) { - return Reflect.construct(this.constructor, [this.shape, 2, options, this.constraints]); - } - partial(options = this.validatorOptions) { - const shape = Object.fromEntries(this.keys.map((key) => [key, this.shape[key].optional(options)])); - return Reflect.construct(this.constructor, [shape, this.strategy, options, this.constraints]); - } - required(options = this.validatorOptions) { - const shape = Object.fromEntries(this.keys.map((key) => { - let validator = this.shape[key]; - if (validator instanceof UnionValidator) - validator = validator.required(options); - return [key, validator]; - })); - return Reflect.construct(this.constructor, [shape, this.strategy, options, this.constraints]); - } - extend(schema, options = this.validatorOptions) { - const shape = { ...this.shape, ...schema instanceof _ObjectValidator2 ? schema.shape : schema }; - return Reflect.construct(this.constructor, [shape, this.strategy, options, this.constraints]); - } - pick(keys, options = this.validatorOptions) { - const shape = Object.fromEntries(keys.filter((key) => this.keys.includes(key)).map((key) => [key, this.shape[key]])); - return Reflect.construct(this.constructor, [shape, this.strategy, options, this.constraints]); - } - omit(keys, options = this.validatorOptions) { - const shape = Object.fromEntries(this.keys.filter((key) => !keys.includes(key)).map((key) => [key, this.shape[key]])); - return Reflect.construct(this.constructor, [shape, this.strategy, options, this.constraints]); - } - handle(value) { - const typeOfValue = typeof value; - if (typeOfValue !== "object") { - return Result.err(new ValidationError("s.object(T)", this.validatorOptions.message ?? `Expected the value to be an object, but received ${typeOfValue} instead`, value)); - } - if (value === null) { - return Result.err(new ValidationError("s.object(T)", this.validatorOptions.message ?? "Expected the value to not be null", value)); - } - if (Array.isArray(value)) { - return Result.err(new ValidationError("s.object(T)", this.validatorOptions.message ?? "Expected the value to not be an array", value)); - } - if (!this.shouldRunConstraints) { - return Result.ok(value); - } - for (const predicate of Object.values(this.shape)) { - predicate.setParent(this.parent ?? value); - } - return this.handleStrategy(value); - } - clone() { - return Reflect.construct(this.constructor, [this.shape, this.strategy, this.validatorOptions, this.constraints]); - } - handleIgnoreStrategy(value) { - const errors = []; - const finalObject = {}; - const inputEntries = new Map(Object.entries(value)); - const runPredicate = /* @__PURE__ */ __name((key, predicate) => { - const result = predicate.run(value[key]); - if (result.isOk()) { - finalObject[key] = result.value; - } else { - const error = result.error; - errors.push([key, error]); - } - }, "runPredicate"); - for (const [key, predicate] of this.requiredKeys) { - if (inputEntries.delete(key)) { - runPredicate(key, predicate); - } else { - errors.push([key, new MissingPropertyError(key, this.validatorOptions)]); - } - } - for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) { - inputEntries.delete(key); - runPredicate(key, validator); - } - if (inputEntries.size === 0) { - return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - const checkInputEntriesInsteadOfSchemaKeys = this.possiblyUndefinedKeys.size > inputEntries.size; - if (checkInputEntriesInsteadOfSchemaKeys) { - for (const [key] of inputEntries) { - const predicate = this.possiblyUndefinedKeys.get(key); - if (predicate) { - runPredicate(key, predicate); - } - } - } else { - for (const [key, predicate] of this.possiblyUndefinedKeys) { - if (inputEntries.delete(key)) { - runPredicate(key, predicate); - } - } - } - return errors.length === 0 ? Result.ok(finalObject) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - handleStrictStrategy(value) { - const errors = []; - const finalResult = {}; - const inputEntries = new Map(Object.entries(value)); - const runPredicate = /* @__PURE__ */ __name((key, predicate) => { - const result = predicate.run(value[key]); - if (result.isOk()) { - finalResult[key] = result.value; - } else { - const error = result.error; - errors.push([key, error]); - } - }, "runPredicate"); - for (const [key, predicate] of this.requiredKeys) { - if (inputEntries.delete(key)) { - runPredicate(key, predicate); - } else { - errors.push([key, new MissingPropertyError(key, this.validatorOptions)]); - } - } - for (const [key, validator] of this.possiblyUndefinedKeysWithDefaults) { - inputEntries.delete(key); - runPredicate(key, validator); - } - for (const [key, predicate] of this.possiblyUndefinedKeys) { - if (inputEntries.size === 0) { - break; - } - if (inputEntries.delete(key)) { - runPredicate(key, predicate); - } - } - if (inputEntries.size !== 0) { - for (const [key, value2] of inputEntries.entries()) { - errors.push([key, new UnknownPropertyError(key, value2, this.validatorOptions)]); - } - } - return errors.length === 0 ? Result.ok(finalResult) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - handlePassthroughStrategy(value) { - const result = this.handleIgnoreStrategy(value); - return result.isErr() ? result : Result.ok({ ...value, ...result.value }); - } - }; - __name(_ObjectValidator, "ObjectValidator"); - var ObjectValidator = _ObjectValidator; - var _PassthroughValidator = class _PassthroughValidator2 extends BaseValidator { - handle(value) { - return Result.ok(value); - } - }; - __name(_PassthroughValidator, "PassthroughValidator"); - var PassthroughValidator = _PassthroughValidator; - var _RecordValidator = class _RecordValidator2 extends BaseValidator { - constructor(validator, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.validator = validator; - } - clone() { - return Reflect.construct(this.constructor, [this.validator, this.validatorOptions, this.constraints]); - } - handle(value) { - if (typeof value !== "object") { - return Result.err(new ValidationError("s.record(T)", this.validatorOptions.message ?? "Expected an object", value)); - } - if (value === null) { - return Result.err(new ValidationError("s.record(T)", this.validatorOptions.message ?? "Expected the value to not be null", value)); - } - if (Array.isArray(value)) { - return Result.err(new ValidationError("s.record(T)", this.validatorOptions.message ?? "Expected the value to not be an array", value)); - } - if (!this.shouldRunConstraints) { - return Result.ok(value); - } - const errors = []; - const transformed = {}; - for (const [key, val] of Object.entries(value)) { - const result = this.validator.run(val); - if (result.isOk()) - transformed[key] = result.value; - else - errors.push([key, result.error]); - } - return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - }; - __name(_RecordValidator, "RecordValidator"); - var RecordValidator = _RecordValidator; - var _SetValidator = class _SetValidator2 extends BaseValidator { - constructor(validator, validatorOptions, constraints = []) { - super(validatorOptions, constraints); - this.validator = validator; - } - clone() { - return Reflect.construct(this.constructor, [this.validator, this.validatorOptions, this.constraints]); - } - handle(values) { - if (!(values instanceof Set)) { - return Result.err(new ValidationError("s.set(T)", this.validatorOptions.message ?? "Expected a set", values)); - } - if (!this.shouldRunConstraints) { - return Result.ok(values); - } - const errors = []; - const transformed = /* @__PURE__ */ new Set; - for (const value of values) { - const result = this.validator.run(value); - if (result.isOk()) - transformed.add(result.value); - else - errors.push(result.error); - } - return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedError(errors, this.validatorOptions)); - } - }; - __name(_SetValidator, "SetValidator"); - var SetValidator = _SetValidator; - var accountRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]$/i; - __name(validateEmail, "validateEmail"); - __name(validateEmailDomain, "validateEmailDomain"); - var v4Seg = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])"; - var v4Str = `(${v4Seg}[.]){3}${v4Seg}`; - var IPv4Reg = new RegExp(`^${v4Str}\$`); - var v6Seg = "(?:[0-9a-fA-F]{1,4})"; - var IPv6Reg = new RegExp(`^((?:${v6Seg}:){7}(?:${v6Seg}|:)|(?:${v6Seg}:){6}(?:${v4Str}|:${v6Seg}|:)|(?:${v6Seg}:){5}(?::${v4Str}|(:${v6Seg}){1,2}|:)|(?:${v6Seg}:){4}(?:(:${v6Seg}){0,1}:${v4Str}|(:${v6Seg}){1,3}|:)|(?:${v6Seg}:){3}(?:(:${v6Seg}){0,2}:${v4Str}|(:${v6Seg}){1,4}|:)|(?:${v6Seg}:){2}(?:(:${v6Seg}){0,3}:${v4Str}|(:${v6Seg}){1,5}|:)|(?:${v6Seg}:){1}(?:(:${v6Seg}){0,4}:${v4Str}|(:${v6Seg}){1,6}|:)|(?::((?::${v6Seg}){0,5}:${v4Str}|(?::${v6Seg}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?\$`); - __name(isIPv4, "isIPv4"); - __name(isIPv6, "isIPv6"); - __name(isIP, "isIP"); - var phoneNumberRegex = /^((?:\+|0{0,2})\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/; - __name(validatePhoneNumber, "validatePhoneNumber"); - var _MultiplePossibilitiesConstraintError = class _MultiplePossibilitiesConstraintError2 extends BaseConstraintError { - constructor(constraint, message, given, expected) { - super(constraint, message, given); - this.expected = expected; - } - toJSON() { - return { - name: this.name, - message: this.message, - constraint: this.constraint, - given: this.given, - expected: this.expected - }; - } - [customInspectSymbolStackLess](depth, options) { - const constraint = options.stylize(this.constraint, "string"); - if (depth < 0) { - return options.stylize(`[MultiplePossibilitiesConstraintError: ${constraint}]`, "special"); - } - const newOptions = { ...options, depth: options.depth === null ? null : options.depth - 1 }; - const verticalLine = options.stylize("|", "undefined"); - const padding = ` - ${verticalLine} `; - const given = inspect2(this.given, newOptions).replace(/\n/g, padding); - const header = `${options.stylize("MultiplePossibilitiesConstraintError", "special")} > ${constraint}`; - const message = options.stylize(this.message, "regexp"); - const expectedPadding = ` - ${verticalLine} - `; - const expectedBlock = ` - ${options.stylize("Expected any of the following:", "string")}${expectedPadding}${this.expected.map((possible) => options.stylize(possible, "boolean")).join(expectedPadding)}`; - const givenBlock = ` - ${options.stylize("Received:", "regexp")}${padding}${given}`; - return `${header} - ${message} -${expectedBlock} -${givenBlock}`; - } - }; - __name(_MultiplePossibilitiesConstraintError, "MultiplePossibilitiesConstraintError"); - var MultiplePossibilitiesConstraintError = _MultiplePossibilitiesConstraintError; - __name(combinedErrorFn, "combinedErrorFn"); - __name(createUrlValidators, "createUrlValidators"); - __name(allowedProtocolsFn, "allowedProtocolsFn"); - __name(allowedDomainsFn, "allowedDomainsFn"); - __name(stringLengthComparator, "stringLengthComparator"); - __name(stringLengthLessThan, "stringLengthLessThan"); - __name(stringLengthLessThanOrEqual, "stringLengthLessThanOrEqual"); - __name(stringLengthGreaterThan, "stringLengthGreaterThan"); - __name(stringLengthGreaterThanOrEqual, "stringLengthGreaterThanOrEqual"); - __name(stringLengthEqual, "stringLengthEqual"); - __name(stringLengthNotEqual, "stringLengthNotEqual"); - __name(stringEmail, "stringEmail"); - __name(stringRegexValidator, "stringRegexValidator"); - __name(stringUrl, "stringUrl"); - __name(stringIp, "stringIp"); - __name(stringRegex, "stringRegex"); - __name(stringUuid, "stringUuid"); - __name(stringDate, "stringDate"); - __name(stringPhone, "stringPhone"); - var _StringValidator = class _StringValidator2 extends BaseValidator { - lengthLessThan(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthLessThan(length, options)); - } - lengthLessThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthLessThanOrEqual(length, options)); - } - lengthGreaterThan(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthGreaterThan(length, options)); - } - lengthGreaterThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthGreaterThanOrEqual(length, options)); - } - lengthEqual(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthEqual(length, options)); - } - lengthNotEqual(length, options = this.validatorOptions) { - return this.addConstraint(stringLengthNotEqual(length, options)); - } - email(options = this.validatorOptions) { - return this.addConstraint(stringEmail(options)); - } - url(options, validatorOptions = this.validatorOptions) { - const urlOptions = this.isUrlOptions(options); - if (urlOptions) { - return this.addConstraint(stringUrl(options, validatorOptions)); - } - return this.addConstraint(stringUrl(undefined, validatorOptions)); - } - uuid(options, validatorOptions = this.validatorOptions) { - const stringUuidOptions = this.isStringUuidOptions(options); - if (stringUuidOptions) { - return this.addConstraint(stringUuid(options, validatorOptions)); - } - return this.addConstraint(stringUuid(undefined, validatorOptions)); - } - regex(regex, options = this.validatorOptions) { - return this.addConstraint(stringRegex(regex, options)); - } - date(options = this.validatorOptions) { - return this.addConstraint(stringDate(options)); - } - ipv4(options = this.validatorOptions) { - return this.ip(4, options); - } - ipv6(options = this.validatorOptions) { - return this.ip(6, options); - } - ip(version, options = this.validatorOptions) { - return this.addConstraint(stringIp(version, options)); - } - phone(options = this.validatorOptions) { - return this.addConstraint(stringPhone(options)); - } - handle(value) { - return typeof value === "string" ? Result.ok(value) : Result.err(new ValidationError("s.string()", this.validatorOptions.message ?? "Expected a string primitive", value)); - } - isUrlOptions(options) { - return options?.message === undefined; - } - isStringUuidOptions(options) { - return options?.message === undefined; - } - }; - __name(_StringValidator, "StringValidator"); - var StringValidator = _StringValidator; - var _TupleValidator = class _TupleValidator2 extends BaseValidator { - constructor(validators, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.validators = []; - this.validators = validators; - } - clone() { - return Reflect.construct(this.constructor, [this.validators, this.validatorOptions, this.constraints]); - } - handle(values) { - if (!Array.isArray(values)) { - return Result.err(new ValidationError("s.tuple(T)", this.validatorOptions.message ?? "Expected an array", values)); - } - if (values.length !== this.validators.length) { - return Result.err(new ValidationError("s.tuple(T)", this.validatorOptions.message ?? `Expected an array of length ${this.validators.length}`, values)); - } - if (!this.shouldRunConstraints) { - return Result.ok(values); - } - const errors = []; - const transformed = []; - for (let i3 = 0;i3 < values.length; i3++) { - const result = this.validators[i3].run(values[i3]); - if (result.isOk()) - transformed.push(result.value); - else - errors.push([i3, result.error]); - } - return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - }; - __name(_TupleValidator, "TupleValidator"); - var TupleValidator = _TupleValidator; - var _MapValidator = class _MapValidator2 extends BaseValidator { - constructor(keyValidator, valueValidator, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.keyValidator = keyValidator; - this.valueValidator = valueValidator; - } - clone() { - return Reflect.construct(this.constructor, [this.keyValidator, this.valueValidator, this.validatorOptions, this.constraints]); - } - handle(value) { - if (!(value instanceof Map)) { - return Result.err(new ValidationError("s.map(K, V)", this.validatorOptions.message ?? "Expected a map", value)); - } - if (!this.shouldRunConstraints) { - return Result.ok(value); - } - const errors = []; - const transformed = /* @__PURE__ */ new Map; - for (const [key, val] of value.entries()) { - const keyResult = this.keyValidator.run(key); - const valueResult = this.valueValidator.run(val); - const { length } = errors; - if (keyResult.isErr()) - errors.push([key, keyResult.error]); - if (valueResult.isErr()) - errors.push([key, valueResult.error]); - if (errors.length === length) - transformed.set(keyResult.value, valueResult.value); - } - return errors.length === 0 ? Result.ok(transformed) : Result.err(new CombinedPropertyError(errors, this.validatorOptions)); - } - }; - __name(_MapValidator, "MapValidator"); - var MapValidator = _MapValidator; - var _LazyValidator = class _LazyValidator2 extends BaseValidator { - constructor(validator, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.validator = validator; - } - clone() { - return Reflect.construct(this.constructor, [this.validator, this.validatorOptions, this.constraints]); - } - handle(values) { - return this.validator(values).run(values); - } - }; - __name(_LazyValidator, "LazyValidator"); - var LazyValidator = _LazyValidator; - var _UnknownEnumValueError = class _UnknownEnumValueError2 extends BaseError { - constructor(value, keys, enumMappings, validatorOptions) { - super(validatorOptions?.message ?? "Expected the value to be one of the following enum values:"); - this.value = value; - this.enumKeys = keys; - this.enumMappings = enumMappings; - } - toJSON() { - return { - name: this.name, - message: this.message, - value: this.value, - enumKeys: this.enumKeys, - enumMappings: [...this.enumMappings.entries()] - }; - } - [customInspectSymbolStackLess](depth, options) { - const value = options.stylize(this.value.toString(), "string"); - if (depth < 0) { - return options.stylize(`[UnknownEnumValueError: ${value}]`, "special"); - } - const padding = ` - ${options.stylize("|", "undefined")} `; - const pairs = this.enumKeys.map((key) => { - const enumValue = this.enumMappings.get(key); - return `${options.stylize(key, "string")} or ${options.stylize(enumValue.toString(), typeof enumValue === "number" ? "number" : "string")}`; - }).join(padding); - const header = `${options.stylize("UnknownEnumValueError", "special")} > ${value}`; - const message = options.stylize(this.message, "regexp"); - const pairsBlock = `${padding}${pairs}`; - return `${header} - ${message} -${pairsBlock}`; - } - }; - __name(_UnknownEnumValueError, "UnknownEnumValueError"); - var UnknownEnumValueError = _UnknownEnumValueError; - var _NativeEnumValidator = class _NativeEnumValidator2 extends BaseValidator { - constructor(enumShape, validatorOptions = {}) { - super(validatorOptions); - this.hasNumericElements = false; - this.enumMapping = /* @__PURE__ */ new Map; - this.enumShape = enumShape; - this.enumKeys = Object.keys(enumShape).filter((key) => { - return typeof enumShape[enumShape[key]] !== "number"; - }); - for (const key of this.enumKeys) { - const enumValue = enumShape[key]; - this.enumMapping.set(key, enumValue); - this.enumMapping.set(enumValue, enumValue); - if (typeof enumValue === "number") { - this.hasNumericElements = true; - this.enumMapping.set(`${enumValue}`, enumValue); - } - } - } - handle(value) { - const typeOfValue = typeof value; - if (typeOfValue === "number") { - if (!this.hasNumericElements) { - return Result.err(new ValidationError("s.nativeEnum(T)", this.validatorOptions.message ?? "Expected the value to be a string", value)); - } - } else if (typeOfValue !== "string") { - return Result.err(new ValidationError("s.nativeEnum(T)", this.validatorOptions.message ?? "Expected the value to be a string or number", value)); - } - const casted = value; - const possibleEnumValue = this.enumMapping.get(casted); - return typeof possibleEnumValue === "undefined" ? Result.err(new UnknownEnumValueError(casted, this.enumKeys, this.enumMapping, this.validatorOptions)) : Result.ok(possibleEnumValue); - } - clone() { - return Reflect.construct(this.constructor, [this.enumShape, this.validatorOptions]); - } - }; - __name(_NativeEnumValidator, "NativeEnumValidator"); - var NativeEnumValidator = _NativeEnumValidator; - __name(typedArrayByteLengthComparator, "typedArrayByteLengthComparator"); - __name(typedArrayByteLengthLessThan, "typedArrayByteLengthLessThan"); - __name(typedArrayByteLengthLessThanOrEqual, "typedArrayByteLengthLessThanOrEqual"); - __name(typedArrayByteLengthGreaterThan, "typedArrayByteLengthGreaterThan"); - __name(typedArrayByteLengthGreaterThanOrEqual, "typedArrayByteLengthGreaterThanOrEqual"); - __name(typedArrayByteLengthEqual, "typedArrayByteLengthEqual"); - __name(typedArrayByteLengthNotEqual, "typedArrayByteLengthNotEqual"); - __name(typedArrayByteLengthRange, "typedArrayByteLengthRange"); - __name(typedArrayByteLengthRangeInclusive, "typedArrayByteLengthRangeInclusive"); - __name(typedArrayByteLengthRangeExclusive, "typedArrayByteLengthRangeExclusive"); - __name(typedArrayLengthComparator, "typedArrayLengthComparator"); - __name(typedArrayLengthLessThan, "typedArrayLengthLessThan"); - __name(typedArrayLengthLessThanOrEqual, "typedArrayLengthLessThanOrEqual"); - __name(typedArrayLengthGreaterThan, "typedArrayLengthGreaterThan"); - __name(typedArrayLengthGreaterThanOrEqual, "typedArrayLengthGreaterThanOrEqual"); - __name(typedArrayLengthEqual, "typedArrayLengthEqual"); - __name(typedArrayLengthNotEqual, "typedArrayLengthNotEqual"); - __name(typedArrayLengthRange, "typedArrayLengthRange"); - __name(typedArrayLengthRangeInclusive, "typedArrayLengthRangeInclusive"); - __name(typedArrayLengthRangeExclusive, "typedArrayLengthRangeExclusive"); - var vowels = ["a", "e", "i", "o", "u"]; - var aOrAn = /* @__PURE__ */ __name((word) => { - return `${vowels.includes(word[0].toLowerCase()) ? "an" : "a"} ${word}`; - }, "aOrAn"); - var TypedArrays = { - Int8Array: (x2) => x2 instanceof Int8Array, - Uint8Array: (x2) => x2 instanceof Uint8Array, - Uint8ClampedArray: (x2) => x2 instanceof Uint8ClampedArray, - Int16Array: (x2) => x2 instanceof Int16Array, - Uint16Array: (x2) => x2 instanceof Uint16Array, - Int32Array: (x2) => x2 instanceof Int32Array, - Uint32Array: (x2) => x2 instanceof Uint32Array, - Float32Array: (x2) => x2 instanceof Float32Array, - Float64Array: (x2) => x2 instanceof Float64Array, - BigInt64Array: (x2) => x2 instanceof BigInt64Array, - BigUint64Array: (x2) => x2 instanceof BigUint64Array, - TypedArray: (x2) => ArrayBuffer.isView(x2) && !(x2 instanceof DataView) - }; - var _TypedArrayValidator = class _TypedArrayValidator2 extends BaseValidator { - constructor(type, validatorOptions = {}, constraints = []) { - super(validatorOptions, constraints); - this.type = type; - } - byteLengthLessThan(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthLessThan(length, options)); - } - byteLengthLessThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthLessThanOrEqual(length, options)); - } - byteLengthGreaterThan(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthGreaterThan(length, options)); - } - byteLengthGreaterThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthGreaterThanOrEqual(length, options)); - } - byteLengthEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthEqual(length, options)); - } - byteLengthNotEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthNotEqual(length, options)); - } - byteLengthRange(start, endBefore, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthRange(start, endBefore, options)); - } - byteLengthRangeInclusive(startAt, endAt, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthRangeInclusive(startAt, endAt, options)); - } - byteLengthRangeExclusive(startAfter, endBefore, options = this.validatorOptions) { - return this.addConstraint(typedArrayByteLengthRangeExclusive(startAfter, endBefore, options)); - } - lengthLessThan(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthLessThan(length, options)); - } - lengthLessThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthLessThanOrEqual(length, options)); - } - lengthGreaterThan(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthGreaterThan(length, options)); - } - lengthGreaterThanOrEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthGreaterThanOrEqual(length, options)); - } - lengthEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthEqual(length, options)); - } - lengthNotEqual(length, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthNotEqual(length, options)); - } - lengthRange(start, endBefore, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthRange(start, endBefore, options)); - } - lengthRangeInclusive(startAt, endAt, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthRangeInclusive(startAt, endAt, options)); - } - lengthRangeExclusive(startAfter, endBefore, options = this.validatorOptions) { - return this.addConstraint(typedArrayLengthRangeExclusive(startAfter, endBefore, options)); - } - clone() { - return Reflect.construct(this.constructor, [this.type, this.validatorOptions, this.constraints]); - } - handle(value) { - return TypedArrays[this.type](value) ? Result.ok(value) : Result.err(new ValidationError("s.typedArray()", this.validatorOptions.message ?? `Expected ${aOrAn(this.type)}`, value)); - } - }; - __name(_TypedArrayValidator, "TypedArrayValidator"); - var TypedArrayValidator = _TypedArrayValidator; - var _Shapes = class _Shapes2 { - string(options) { - return new StringValidator(options); - } - number(options) { - return new NumberValidator(options); - } - bigint(options) { - return new BigIntValidator(options); - } - boolean(options) { - return new BooleanValidator(options); - } - date(options) { - return new DateValidator(options); - } - object(shape, options) { - return new ObjectValidator(shape, 0, options); - } - undefined(options) { - return this.literal(undefined, { equalsOptions: options }); - } - null(options) { - return this.literal(null, { equalsOptions: options }); - } - nullish(options) { - return new NullishValidator(options); - } - any(options) { - return new PassthroughValidator(options); - } - unknown(options) { - return new PassthroughValidator(options); - } - never(options) { - return new NeverValidator(options); - } - enum(values, options) { - return this.union(values.map((value) => this.literal(value, { equalsOptions: options })), options); - } - nativeEnum(enumShape, options) { - return new NativeEnumValidator(enumShape, options); - } - literal(value, options) { - if (value instanceof Date) { - return this.date(options?.dateOptions).equal(value, options?.equalsOptions); - } - return new LiteralValidator(value, options?.equalsOptions); - } - instance(expected, options) { - return new InstanceValidator(expected, options); - } - union(validators, options) { - return new UnionValidator(validators, options); - } - array(validator, options) { - return new ArrayValidator(validator, options); - } - typedArray(type = "TypedArray", options) { - return new TypedArrayValidator(type, options); - } - int8Array(options) { - return this.typedArray("Int8Array", options); - } - uint8Array(options) { - return this.typedArray("Uint8Array", options); - } - uint8ClampedArray(options) { - return this.typedArray("Uint8ClampedArray", options); - } - int16Array(options) { - return this.typedArray("Int16Array", options); - } - uint16Array(options) { - return this.typedArray("Uint16Array", options); - } - int32Array(options) { - return this.typedArray("Int32Array", options); - } - uint32Array(options) { - return this.typedArray("Uint32Array", options); - } - float32Array(options) { - return this.typedArray("Float32Array", options); - } - float64Array(options) { - return this.typedArray("Float64Array", options); - } - bigInt64Array(options) { - return this.typedArray("BigInt64Array", options); - } - bigUint64Array(options) { - return this.typedArray("BigUint64Array", options); - } - tuple(validators, options) { - return new TupleValidator(validators, options); - } - set(validator, options) { - return new SetValidator(validator, options); - } - record(validator, options) { - return new RecordValidator(validator, options); - } - map(keyValidator, valueValidator, options) { - return new MapValidator(keyValidator, valueValidator, options); - } - lazy(validator, options) { - return new LazyValidator(validator, options); - } - }; - __name(_Shapes, "Shapes"); - var Shapes = _Shapes; - var s3 = new Shapes; - exports.BaseError = BaseError; - exports.CombinedError = CombinedError; - exports.CombinedPropertyError = CombinedPropertyError; - exports.ExpectedConstraintError = ExpectedConstraintError; - exports.ExpectedValidationError = ExpectedValidationError; - exports.MissingPropertyError = MissingPropertyError; - exports.MultiplePossibilitiesConstraintError = MultiplePossibilitiesConstraintError; - exports.Result = Result; - exports.UnknownEnumValueError = UnknownEnumValueError; - exports.UnknownPropertyError = UnknownPropertyError; - exports.ValidationError = ValidationError; - exports.customInspectSymbol = customInspectSymbol; - exports.customInspectSymbolStackLess = customInspectSymbolStackLess; - exports.getGlobalValidationEnabled = getGlobalValidationEnabled; - exports.s = s3; - exports.setGlobalValidationEnabled = setGlobalValidationEnabled; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/interfaces/TextBasedChannel.js -var require_TextBasedChannel = __commonJS((exports, module) => { - function parseChoices(parent, list_choices, value) { - if (value !== undefined) { - if (Array.isArray(list_choices) && list_choices.length) { - const choice = list_choices.find((c) => [c.name, c.value].includes(value)); - if (choice) { - return choice.value; - } else { - throw new Error2("INVALID_SLASH_COMMAND_CHOICES", parent, value); - } - } else { - return value; - } - } else { - return; - } - } - async function addDataFromAttachment(value, client, channelId, attachments) { - value = await MessagePayload.resolveFile(value); - if (!value?.file) { - throw new TypeError("The attachment data must be a BufferResolvable or Stream or FileOptions of MessageAttachment"); - } - const data = await Util.getUploadURL(client, channelId, [value]); - await Util.uploadFile(value.file, data[0].upload_url); - const id = attachments.length; - attachments.push({ - id, - filename: value.name, - uploaded_filename: data[0].upload_filename - }); - return { - id, - attachments - }; - } - async function parseOption(client, optionCommand, value, optionFormat, attachments, command, applicationId, guildId, channelId, subGroup, subCommand) { - const data = { - type: optionCommand.type, - name: optionCommand.name - }; - if (value !== undefined) { - switch (optionCommand.type) { - case ApplicationCommandOptionTypes.BOOLEAN: - case "BOOLEAN": { - data.value = Boolean(value); - break; - } - case ApplicationCommandOptionTypes.INTEGER: - case "INTEGER": { - data.value = Number(value); - break; - } - case ApplicationCommandOptionTypes.ATTACHMENT: - case "ATTACHMENT": { - const parseData = await addDataFromAttachment(value, client, channelId, attachments); - data.value = parseData.id; - attachments = parseData.attachments; - break; - } - case ApplicationCommandOptionTypes.SUB_COMMAND_GROUP: - case "SUB_COMMAND_GROUP": { - break; - } - default: { - value = parseChoices(optionCommand.name, optionCommand.choices, value); - if (optionCommand.autocomplete) { - const nonce = SnowflakeUtil.generate(); - let postData; - if (subGroup) { - postData = [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND_GROUP, - name: subGroup.name, - options: [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND, - name: subCommand.name, - options: [ - { - type: optionCommand.type, - name: optionCommand.name, - value, - focused: true - } - ] - } - ] - } - ]; - } else if (subCommand) { - postData = [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND, - name: subCommand.name, - options: [ - { - type: optionCommand.type, - name: optionCommand.name, - value, - focused: true - } - ] - } - ]; - } else { - postData = [ - { - type: optionCommand.type, - name: optionCommand.name, - value, - focused: true - } - ]; - } - const body = createPostData(client, true, applicationId, nonce, guildId, Boolean(command.guild_id), channelId, command.version, command.id, command.name_default || command.name, command.type, postData, []); - await client.api.interactions.post({ - data: body - }); - data.value = await awaitAutocomplete(client, nonce, value); - } else { - data.value = value; - } - } - } - optionFormat.push(data); - } - return { - optionFormat, - attachments - }; - } - function awaitAutocomplete(client, nonce, defaultValue) { - return new Promise((resolve) => { - const handler = (data) => { - if (data.t !== "APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE") - return; - if (data.d?.nonce !== nonce) - return; - clearTimeout(timeout); - client.removeListener(Events.UNHANDLED_PACKET, handler); - client.decrementMaxListeners(); - if (data.d.choices.length >= 1) { - resolve(data.d.choices[0].value); - } else { - resolve(defaultValue); - } - }; - const timeout = setTimeout2(() => { - client.removeListener(Events.UNHANDLED_PACKET, handler); - client.decrementMaxListeners(); - resolve(defaultValue); - }, 5000).unref(); - client.incrementMaxListeners(); - client.on(Events.UNHANDLED_PACKET, handler); - }); - } - function createPostData(client, isAutocomplete = false, applicationId, nonce, guildId, isGuildCommand, channelId, commandVersion, commandId, commandName, commandType, postData, attachments = []) { - const data = { - type: isAutocomplete ? InteractionTypes.APPLICATION_COMMAND_AUTOCOMPLETE : InteractionTypes.APPLICATION_COMMAND, - application_id: applicationId, - guild_id: guildId, - channel_id: channelId, - session_id: client.sessionId, - data: { - version: commandVersion, - id: commandId, - name: commandName, - type: commandType, - options: postData, - attachments - }, - nonce - }; - if (isGuildCommand) { - data.data.guild_id = guildId; - } - return data; - } - var MessageCollector = require_MessageCollector(); - var MessagePayload = require_MessagePayload(); - var { InteractionTypes, ApplicationCommandOptionTypes, Events } = require_Constants(); - var { Error: Error2 } = require_errors(); - var SnowflakeUtil = require_SnowflakeUtil(); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { s } = require_cjs4(); - var Util = require_Util(); - var validateName = (stringName) => s.string().lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(true).parse(stringName); - - class TextBasedChannel { - constructor() { - this.messages = new MessageManager(this); - this.lastMessageId = null; - this.lastPinTimestamp = null; - } - get lastMessage() { - return this.messages.resolve(this.lastMessageId); - } - get lastPinAt() { - return this.lastPinTimestamp ? new Date(this.lastPinTimestamp) : null; - } - async send(options) { - const User = require_User(); - const { GuildMember } = require_GuildMember(); - if (this instanceof User || this instanceof GuildMember) { - const dm = await this.createDM(); - return dm.send(options); - } - let messagePayload; - if (options instanceof MessagePayload) { - messagePayload = options.resolveData(); - } else { - messagePayload = MessagePayload.create(this, options).resolveData(); - } - const { data, files } = await messagePayload.resolveFiles(); - const attachments = await Util.getUploadURL(this.client, this.id, files); - const requestPromises = attachments.map(async (attachment) => { - await Util.uploadFile(files[attachment.id].file, attachment.upload_url); - return { - id: attachment.id, - filename: files[attachment.id].name, - uploaded_filename: attachment.upload_filename, - description: files[attachment.id].description, - duration_secs: files[attachment.id].duration_secs, - waveform: files[attachment.id].waveform - }; - }); - const attachmentsData = await Promise.all(requestPromises); - attachmentsData.sort((a, b) => parseInt(a.id) - parseInt(b.id)); - data.attachments = attachmentsData; - const d = await this.client.api.channels[this.id].messages.post({ data }); - return this.messages.cache.get(d.id) ?? this.messages._add(d); - } - searchInteractionFromGuildAndPrivateChannel() { - return this.client.api[this.guild ? "guilds" : "channels"][this.guild?.id || this.id]["application-command-index"].get().catch(() => ({ - application_commands: [], - applications: [], - version: "" - })); - } - searchInteractionUserApps() { - return this.client.api.users["@me"]["application-command-index"].get().catch(() => ({ - application_commands: [], - applications: [], - version: "" - })); - } - searchInteraction() { - return Promise.all([this.searchInteractionFromGuildAndPrivateChannel(), this.searchInteractionUserApps()]).then(([dataA, dataB]) => ({ - applications: [...dataA.applications, ...dataB.applications], - application_commands: [...dataA.application_commands, ...dataB.application_commands] - })); - } - async sendSlash(botOrApplicationId, commandNameString, ...args) { - const cmd = commandNameString.trim().split(" "); - const commandName = validateName(cmd[0]); - const sub = cmd.slice(1); - for (let i = 0;i < sub.length; i++) { - if (sub.length > 2) { - throw new Error2("INVALID_COMMAND_NAME", cmd); - } - validateName(sub[i]); - } - const data = await this.searchInteraction(); - const filterCommand = data.application_commands.filter((obj) => [obj.name, obj.name_default].includes(commandName)); - botOrApplicationId = this.client.users.resolveId(botOrApplicationId); - const application = data.applications.find((obj) => obj.id == botOrApplicationId || obj.bot_id == botOrApplicationId); - if (!application) { - throw new Error2("INVALID_APPLICATION_COMMAND", "Bot/Application doesn't exist"); - } - const command = filterCommand.find((command2) => command2.application_id == application.id); - if (!command) { - throw new Error2("INVALID_APPLICATION_COMMAND", application.id); - } - args = args.flat(2); - let optionFormat = []; - let attachments = []; - let optionsMaxdepth, subGroup, subCommand; - if (sub.length == 2) { - subGroup = command.options.find((obj) => obj.type == ApplicationCommandOptionTypes.SUB_COMMAND_GROUP && [obj.name, obj.name_default].includes(sub[0])); - if (!subGroup) - throw new Error2("SLASH_COMMAND_SUB_COMMAND_GROUP_INVALID", sub[0]); - subCommand = subGroup.options.find((obj) => obj.type == ApplicationCommandOptionTypes.SUB_COMMAND && [obj.name, obj.name_default].includes(sub[1])); - if (!subCommand) - throw new Error2("SLASH_COMMAND_SUB_COMMAND_INVALID", sub[1]); - optionsMaxdepth = subCommand.options; - } else if (sub.length == 1) { - subCommand = command.options.find((obj) => obj.type == ApplicationCommandOptionTypes.SUB_COMMAND && [obj.name, obj.name_default].includes(sub[0])); - if (!subCommand) - throw new Error2("SLASH_COMMAND_SUB_COMMAND_INVALID", sub[0]); - optionsMaxdepth = subCommand.options; - } else { - optionsMaxdepth = command.options; - } - const valueRequired = optionsMaxdepth?.filter((o) => o.required).length || 0; - for (let i = 0;i < Math.min(args.length, optionsMaxdepth?.length || 0); i++) { - const optionInput = optionsMaxdepth[i]; - const value = args[i]; - const parseData = await parseOption(this.client, optionInput, value, optionFormat, attachments, command, application.id, this.guild?.id, this.id, subGroup, subCommand); - optionFormat = parseData.optionFormat; - attachments = parseData.attachments; - } - if (valueRequired > args.length) { - throw new Error2("SLASH_COMMAND_REQUIRED_OPTIONS_MISSING", valueRequired, optionFormat.length); - } - let postData; - if (subGroup) { - postData = [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND_GROUP, - name: subGroup.name, - options: [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND, - name: subCommand.name, - options: optionFormat - } - ] - } - ]; - } else if (subCommand) { - postData = [ - { - type: ApplicationCommandOptionTypes.SUB_COMMAND, - name: subCommand.name, - options: optionFormat - } - ]; - } else { - postData = optionFormat; - } - const nonce = SnowflakeUtil.generate(); - const body = createPostData(this.client, false, application.id, nonce, this.guild?.id, Boolean(command.guild_id), this.id, command.version, command.id, command.name_default || command.name, command.type, postData, attachments); - this.client.api.interactions.post({ - data: body, - usePayloadJSON: true - }); - return Util.createPromiseInteraction(this.client, nonce, 5000); - } - sendTyping() { - return this.client.api.channels(this.id).typing.post(); - } - createMessageCollector(options = {}) { - return new MessageCollector(this, options); - } - awaitMessages(options = {}) { - return new Promise((resolve, reject) => { - const collector = this.createMessageCollector(options); - collector.once("end", (collection, reason) => { - if (options.errors?.includes(reason)) { - reject(collection); - } else { - resolve(collection); - } - }); - }); - } - fetchWebhooks() { - return this.guild.channels.fetchWebhooks(this.id); - } - createWebhook(name, options = {}) { - return this.guild.channels.createWebhook(this.id, name, options); - } - setRateLimitPerUser(rateLimitPerUser, reason) { - return this.edit({ rateLimitPerUser }, reason); - } - setNSFW(nsfw = true, reason) { - return this.edit({ nsfw }, reason); - } - static applyToClass(structure, full = false, ignore = []) { - const props = ["send"]; - if (full) { - props.push("sendSlash", "searchInteraction", "searchInteractionFromGuildAndPrivateChannel", "searchInteractionUserApps", "lastMessage", "lastPinAt", "sendTyping", "createMessageCollector", "awaitMessages", "fetchWebhooks", "createWebhook", "setRateLimitPerUser", "setNSFW"); - } - for (const prop of props) { - if (ignore.includes(prop)) - continue; - Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop)); - } - } - } - module.exports = TextBasedChannel; - var MessageManager = require_MessageManager(); -}); - -// node_modules/discord.js-selfbot-v13/src/structures/DMChannel.js -var require_DMChannel = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var { Channel } = require_Channel(); - var TextBasedChannel = require_TextBasedChannel(); - var MessageManager = require_MessageManager(); - var { Opcodes, Status } = require_Constants(); - - class DMChannel extends Channel { - constructor(client, data) { - super(client, data); - this.type = "DM"; - this.messages = new MessageManager(this); - } - _patch(data) { - super._patch(data); - if (data.recipients) { - this.recipient = this.client.users._add(data.recipients[0]); - } - if ("last_message_id" in data) { - this.lastMessageId = data.last_message_id; - } - if ("last_pin_timestamp" in data) { - this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; - } else { - this.lastPinTimestamp ??= null; - } - if ("is_message_request" in data) { - this.messageRequest = data.is_message_request; - } - if ("is_message_request_timestamp" in data) { - this.messageRequestTimestamp = data.is_message_request_timestamp ? Date.parse(data.is_message_request_timestamp) : null; - } - } - async acceptMessageRequest() { - if (!this.messageRequest) { - throw new Error("NOT_MESSAGE_REQUEST", "This channel is not a message request"); - } - const c = await this.client.api.channels[this.id].recipients["@me"].put({ - data: { - consent_status: 2 - } - }); - this.messageRequest = false; - return this.client.channels._add(c); - } - async cancelMessageRequest() { - if (!this.messageRequest) { - throw new Error("NOT_MESSAGE_REQUEST", "This channel is not a message request"); - } - await this.client.api.channels[this.id].recipients["@me"].delete(); - return this; - } - get partial() { - return typeof this.lastMessageId === "undefined"; - } - fetch(force = true) { - return this.recipient.createDM(force); - } - toString() { - return this.recipient.toString(); - } - sync() { - this.client.ws.broadcast({ - op: Opcodes.DM_UPDATE, - d: { - channel_id: this.id - } - }); - } - ring() { - return this.client.api.channels(this.id).call.ring.post({ - data: { - recipients: null - } - }); - } - get voiceUsers() { - const coll = new Collection; - for (const state of this.client.voiceStates.cache.values()) { - if (state.channelId === this.id && state.user) { - coll.set(state.id, state.user); - } - } - return coll; - } - get shard() { - return this.client.ws.shards.first(); - } - get voiceAdapterCreator() { - return (methods) => { - this.client.voice.adapters.set(this.id, methods); - return { - sendPayload: (data) => { - if (this.shard.status !== Status.READY) - return false; - this.shard.send(data); - return true; - }, - destroy: () => { - this.client.voice.adapters.delete(this.id); - } - }; - }; - } - get lastMessage() { - } - get lastPinAt() { - } - send() { - } - sendTyping() { - } - createMessageCollector() { - } - awaitMessages() { - } - } - TextBasedChannel.applyToClass(DMChannel, true, ["fetchWebhooks", "createWebhook", "setRateLimitPerUser", "setNSFW"]); - module.exports = DMChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/util/ThreadMemberFlags.js -var require_ThreadMemberFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class ThreadMemberFlags extends BitField { - } - ThreadMemberFlags.FLAGS = {}; - module.exports = ThreadMemberFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ThreadMember.js -var require_ThreadMember = __commonJS((exports, module) => { - var Base = require_Base(); - var ThreadMemberFlags = require_ThreadMemberFlags(); - - class ThreadMember extends Base { - constructor(thread, data, extra = {}) { - super(thread.client); - this.thread = thread; - this.joinedTimestamp = null; - this.id = data.user_id; - this._patch(data, extra); - } - _patch(data, extra = {}) { - if ("join_timestamp" in data) - this.joinedTimestamp = new Date(data.join_timestamp).getTime(); - if ("flags" in data) { - this.flags = new ThreadMemberFlags(data.flags).freeze(); - } - if ("member" in data) { - this.member = this.thread.guild.members._add(data.member, extra.cache); - } else { - this.member ??= null; - } - } - get guildMember() { - return this.member ?? this.thread.guild.members.cache.get(this.id) ?? null; - } - get joinedAt() { - return this.joinedTimestamp ? new Date(this.joinedTimestamp) : null; - } - get user() { - return this.client.users.cache.get(this.id) ?? null; - } - get manageable() { - return !this.thread.archived && this.thread.editable; - } - async remove(reason) { - await this.thread.members.remove(this.id, reason); - return this; - } - } - module.exports = ThreadMember; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/ThreadMemberManager.js -var require_ThreadMemberManager = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2 } = require_errors(); - var ThreadMember = require_ThreadMember(); - var deprecationEmittedForPassingBoolean = false; - - class ThreadMemberManager extends CachedManager { - constructor(thread, iterable) { - super(thread.client, ThreadMember, iterable); - this.thread = thread; - } - _add(data, cache = true) { - const existing = this.cache.get(data.user_id); - if (cache) - existing?._patch(data, { cache }); - if (existing) - return existing; - const member = new ThreadMember(this.thread, data, { cache }); - if (cache) - this.cache.set(data.user_id, member); - return member; - } - fetchMe(options) { - return this.fetch(this.client.user.id, options); - } - get me() { - return this.cache.get(this.client.user.id) ?? null; - } - resolve(member) { - const memberResolvable = super.resolve(member); - if (memberResolvable) - return memberResolvable; - const userId = this.client.users.resolveId(member); - if (userId) - return this.cache.get(userId) ?? null; - return null; - } - resolveId(member) { - const memberResolvable = super.resolveId(member); - if (memberResolvable) - return memberResolvable; - const userResolvable = this.client.users.resolveId(member); - return this.cache.has(userResolvable) ? userResolvable : null; - } - async add(member, reason) { - const id = member === "@me" ? member : this.client.users.resolveId(member); - if (!id) - throw new TypeError2("INVALID_TYPE", "member", "UserResolvable"); - await this.client.api.channels(this.thread.id, "thread-members", id).put({ reason }); - return id; - } - async remove(id, reason) { - await this.client.api.channels(this.thread.id, "thread-members", id).delete({ reason }); - return id; - } - async _fetchOne(memberId, { cache, force = false, withMember }) { - if (!force) { - const existing = this.cache.get(memberId); - if (existing) - return existing; - } - const data = await this.client.api.channels(this.thread.id, "thread-members", memberId).get({ - query: { with_member: withMember } - }); - return this._add(data, cache); - } - async _fetchMany({ cache, limit, after, withMember } = {}) { - const raw = await this.client.api.channels(this.thread.id, "thread-members").get({ - query: { with_member: withMember, limit, after } - }); - return raw.reduce((col, member) => col.set(member.user_id, this._add(member, cache)), new Collection); - } - fetch(member, options = { cache: true, force: false }) { - if (typeof member === "boolean" && !deprecationEmittedForPassingBoolean) { - process2.emitWarning("Passing boolean to member option is deprecated, use cache property instead.", "DeprecationWarning"); - deprecationEmittedForPassingBoolean = true; - } - const id = this.resolveId(member); - return id ? this._fetchOne(id, options) : this._fetchMany(typeof member === "boolean" ? { ...options, cache: member } : options); - } - } - module.exports = ThreadMemberManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ThreadChannel.js -var require_ThreadChannel = __commonJS((exports, module) => { - var { Channel } = require_Channel(); - var TextBasedChannel = require_TextBasedChannel(); - var { RangeError: RangeError2 } = require_errors(); - var MessageManager = require_MessageManager(); - var ThreadMemberManager = require_ThreadMemberManager(); - var ChannelFlags = require_ChannelFlags(); - var Permissions = require_Permissions(); - var { resolveAutoArchiveMaxLimit } = require_Util(); - - class ThreadChannel extends Channel { - constructor(guild, data, client) { - super(guild?.client ?? client, data, false); - this.guild = guild; - this.ownerId = data.owner_id; - this.guildId = guild?.id ?? data.guild_id; - this.messages = new MessageManager(this); - this.members = new ThreadMemberManager(this); - if (data) - this._patch(data); - } - _patch(data, partial = false) { - super._patch(data); - if ("name" in data) { - this.name = data.name; - } - if ("guild_id" in data) { - this.guildId = data.guild_id; - } - if ("parent_id" in data) { - this.parentId = data.parent_id; - } else { - this.parentId ??= null; - } - if ("thread_metadata" in data) { - this.locked = data.thread_metadata.locked ?? false; - this.invitable = this.type === "GUILD_PRIVATE_THREAD" ? data.thread_metadata.invitable ?? false : null; - this.archived = data.thread_metadata.archived; - this.autoArchiveDuration = data.thread_metadata.auto_archive_duration; - this.archiveTimestamp = data.thread_metadata?.archive_timestamp ? Date.parse(data.thread_metadata.archive_timestamp) : null; - if ("create_timestamp" in data.thread_metadata) { - this._createdTimestamp = Date.parse(data.thread_metadata.create_timestamp); - } - } else { - this.locked ??= null; - this.archived ??= null; - this.autoArchiveDuration ??= null; - this.archiveTimestamp ??= null; - this.invitable ??= null; - } - this._createdTimestamp ??= this.type === "GUILD_PRIVATE_THREAD" ? super.createdTimestamp : null; - if ("last_message_id" in data) { - this.lastMessageId = data.last_message_id; - } else { - this.lastMessageId ??= null; - } - if ("last_pin_timestamp" in data) { - this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null; - } else { - this.lastPinTimestamp ??= null; - } - if ("rate_limit_per_user" in data || !partial) { - this.rateLimitPerUser = data.rate_limit_per_user ?? 0; - } else { - this.rateLimitPerUser ??= null; - } - if ("message_count" in data) { - this.messageCount = data.message_count; - } else { - this.messageCount ??= null; - } - if ("member_count" in data) { - this.memberCount = data.member_count; - } else { - this.memberCount ??= null; - } - if ("total_message_sent" in data) { - this.totalMessageSent = data.total_message_sent; - } else { - this.totalMessageSent ??= null; - } - if ("applied_tags" in data) { - this.appliedTags = data.applied_tags; - } else { - this.appliedTags ??= []; - } - if (data.member && this.client.user) - this.members._add({ user_id: this.client.user.id, ...data.member }); - if (data.messages) - for (const message of data.messages) - this.messages._add(message); - } - get createdTimestamp() { - return this._createdTimestamp; - } - get guildMembers() { - return this.members.cache.mapValues((member) => member.guildMember); - } - get archivedAt() { - if (!this.archiveTimestamp) - return null; - return new Date(this.archiveTimestamp); - } - get createdAt() { - return this.createdTimestamp && new Date(this.createdTimestamp); - } - get parent() { - return this.guild.channels.resolve(this.parentId); - } - async join() { - await this.members.add("@me"); - return this; - } - async leave() { - await this.members.remove("@me"); - return this; - } - permissionsFor(memberOrRole, checkAdmin) { - return this.parent?.permissionsFor(memberOrRole, checkAdmin) ?? null; - } - async fetchOwner({ cache = true, force = false } = {}) { - if (!force) { - const existing = this.members.cache.get(this.ownerId); - if (existing) - return existing; - } - const members = await this.members.fetch(cache); - return members.get(this.ownerId) ?? null; - } - async fetchStarterMessage(options) { - const channel = this.parent?.type === "GUILD_FORUM" ? this : this.parent; - return channel?.messages.fetch(this.id, options) ?? null; - } - async edit(data, reason) { - let autoArchiveDuration = data.autoArchiveDuration; - if (autoArchiveDuration === "MAX") - autoArchiveDuration = resolveAutoArchiveMaxLimit(this.guild); - const newData = await this.client.api.channels(this.id).patch({ - data: { - name: data.name, - archived: data.archived, - auto_archive_duration: autoArchiveDuration, - rate_limit_per_user: data.rateLimitPerUser, - locked: data.locked, - invitable: this.type === "GUILD_PRIVATE_THREAD" ? data.invitable : undefined, - applied_tags: data.appliedTags, - flags: "flags" in data ? ChannelFlags.resolve(data.flags) : undefined - }, - reason - }); - return this.client.actions.ChannelUpdate.handle(newData).updated; - } - setArchived(archived = true, reason) { - return this.edit({ archived }, reason); - } - setAutoArchiveDuration(autoArchiveDuration, reason) { - return this.edit({ autoArchiveDuration }, reason); - } - async setInvitable(invitable = true, reason) { - if (this.type !== "GUILD_PRIVATE_THREAD") - throw new RangeError2("THREAD_INVITABLE_TYPE", this.type); - return this.edit({ invitable }, reason); - } - setLocked(locked = true, reason) { - return this.edit({ locked }, reason); - } - setName(name, reason) { - return this.edit({ name }, reason); - } - setRateLimitPerUser(rateLimitPerUser, reason) { - return this.edit({ rateLimitPerUser }, reason); - } - pin(reason) { - return this.edit({ flags: this.flags.add(ChannelFlags.FLAGS.PINNED) }, reason); - } - unpin(reason) { - return this.edit({ flags: this.flags.remove(ChannelFlags.FLAGS.PINNED) }, reason); - } - setAppliedTags(appliedTags, reason) { - return this.edit({ appliedTags }, reason); - } - get joined() { - return this.members.cache.has(this.client.user?.id); - } - get editable() { - return this.ownerId === this.client.user.id && (this.type !== "GUILD_PRIVATE_THREAD" || this.joined) || this.manageable; - } - get joinable() { - return !this.archived && !this.joined && this.permissionsFor(this.client.user)?.has(this.type === "GUILD_PRIVATE_THREAD" ? Permissions.FLAGS.MANAGE_THREADS : Permissions.FLAGS.VIEW_CHANNEL, false); - } - get manageable() { - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - return this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(Permissions.FLAGS.MANAGE_THREADS, false); - } - get viewable() { - if (this.client.user.id === this.guild.ownerId) - return true; - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - return permissions.has(Permissions.FLAGS.VIEW_CHANNEL, false); - } - get sendable() { - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - return !(this.archived && this.locked && !this.manageable) && (this.type !== "GUILD_PRIVATE_THREAD" || this.joined || this.manageable) && permissions.has(Permissions.FLAGS.SEND_MESSAGES_IN_THREADS, false) && this.guild.members.me.communicationDisabledUntilTimestamp < Date.now(); - } - get unarchivable() { - return this.archived && this.sendable && (!this.locked || this.manageable); - } - isPrivate() { - return this.type === "GUILD_PRIVATE_THREAD"; - } - async delete(reason) { - await this.guild.channels.delete(this.id, reason); - return this; - } - get lastMessage() { - } - get lastPinAt() { - } - send() { - } - sendTyping() { - } - createMessageCollector() { - } - awaitMessages() { - } - } - TextBasedChannel.applyToClass(ThreadChannel, true, ["fetchWebhooks", "setRateLimitPerUser", "setNSFW"]); - module.exports = ThreadChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/ThreadManager.js -var require_ThreadManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var ThreadChannel = require_ThreadChannel(); - - class ThreadManager extends CachedManager { - constructor(channel, iterable) { - super(channel.client, ThreadChannel, iterable); - this.channel = channel; - } - _add(thread) { - const existing = this.cache.get(thread.id); - if (existing) - return existing; - this.cache.set(thread.id, thread); - return thread; - } - fetch(options, { cache, force } = {}) { - if (!options) - return this.fetchActive(cache); - const channel = this.client.channels.resolveId(options); - if (channel) - return this.client.channels.fetch(channel, { cache, force }); - if (options.archived) { - return this.fetchArchived(options.archived, cache); - } - return this.fetchActive(cache); - } - fetchArchived(options = {}, cache = true) { - return this.fetchActive(cache, { archived: true, ...options }); - } - async fetchActive(cache = true, options = {}) { - const raw = await this.client.api.channels(this.channel.id).threads.search.get({ - query: { - archived: options?.archived ?? false, - limit: options?.limit ?? 25, - offset: options?.offset ?? 0, - sort_by: options?.sortBy ?? "last_message_time", - sort_order: options?.sortOrder ?? "desc" - } - }); - return this.constructor._mapThreads(raw, this.client, { parent: this.channel, cache }); - } - static _mapThreads(rawThreads, client, { parent, guild, cache }) { - const threads = rawThreads.threads.reduce((coll, raw) => { - const thread = client.channels._add(raw, guild ?? parent?.guild, { cache }); - if (parent && thread.parentId !== parent.id) - return coll; - return coll.set(thread.id, thread); - }, new Collection); - for (const rawMember of rawThreads.members) - client.channels.cache.get(rawMember.id)?.members._add(rawMember); - for (const rawMessage of rawThreads?.first_messages || []) { - client.channels.cache.get(rawMessage.id)?.messages._add(rawMessage); - } - return { - threads, - hasMore: rawThreads.has_more ?? false - }; - } - } - module.exports = ThreadManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildTextThreadManager.js -var require_GuildTextThreadManager = __commonJS((exports, module) => { - var ThreadManager = require_ThreadManager(); - var { TypeError: TypeError2 } = require_errors(); - var { ChannelTypes } = require_Constants(); - var { resolveAutoArchiveMaxLimit } = require_Util(); - - class GuildTextThreadManager extends ThreadManager { - async create({ - name, - autoArchiveDuration = this.channel.defaultAutoArchiveDuration, - startMessage, - type, - invitable, - reason, - rateLimitPerUser - } = {}) { - let path = this.client.api.channels(this.channel.id); - if (type && typeof type !== "string" && typeof type !== "number") { - throw new TypeError2("INVALID_TYPE", "type", "ThreadChannelType or Number"); - } - let resolvedType = this.channel.type === "GUILD_NEWS" ? ChannelTypes.GUILD_NEWS_THREAD : ChannelTypes.GUILD_PUBLIC_THREAD; - if (startMessage) { - const startMessageId = this.channel.messages.resolveId(startMessage); - if (!startMessageId) - throw new TypeError2("INVALID_TYPE", "startMessage", "MessageResolvable"); - path = path.messages(startMessageId); - } else if (this.channel.type !== "GUILD_NEWS") { - resolvedType = typeof type === "string" ? ChannelTypes[type] : type ?? resolvedType; - } - if (autoArchiveDuration === "MAX") - autoArchiveDuration = resolveAutoArchiveMaxLimit(this.channel.guild); - const data = await path.threads.post({ - data: { - name, - auto_archive_duration: autoArchiveDuration, - type: resolvedType, - invitable: resolvedType === ChannelTypes.GUILD_PRIVATE_THREAD ? invitable : undefined, - rate_limit_per_user: rateLimitPerUser - }, - reason - }); - return this.client.actions.ThreadCreate.handle(data).thread; - } - } - module.exports = GuildTextThreadManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/BaseGuildTextChannel.js -var require_BaseGuildTextChannel = __commonJS((exports, module) => { - var GuildChannel = require_GuildChannel(); - var TextBasedChannel = require_TextBasedChannel(); - var GuildTextThreadManager = require_GuildTextThreadManager(); - var MessageManager = require_MessageManager(); - - class BaseGuildTextChannel extends GuildChannel { - constructor(guild, data, client) { - super(guild, data, client, false); - this.messages = new MessageManager(this); - this.threads = new GuildTextThreadManager(this); - this.nsfw = Boolean(data.nsfw); - this._patch(data); - } - _patch(data) { - super._patch(data); - if ("topic" in data) { - this.topic = data.topic; - } - if ("nsfw" in data) { - this.nsfw = Boolean(data.nsfw); - } - if ("last_message_id" in data) { - this.lastMessageId = data.last_message_id; - } - if ("last_pin_timestamp" in data) { - this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null; - } - if ("default_auto_archive_duration" in data) { - this.defaultAutoArchiveDuration = data.default_auto_archive_duration; - } - if ("default_thread_rate_limit_per_user" in data) { - this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user; - } else { - this.defaultThreadRateLimitPerUser ??= null; - } - if ("messages" in data) { - for (const message of data.messages) - this.messages._add(message); - } - } - setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) { - return this.edit({ defaultAutoArchiveDuration }, reason); - } - setType(type, reason) { - return this.edit({ type }, reason); - } - setTopic(topic, reason) { - return this.edit({ topic }, reason); - } - createInvite(options) { - return this.guild.invites.create(this.id, options); - } - fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelId: this.id, cache }); - } - get lastMessage() { - } - get lastPinAt() { - } - send() { - } - sendTyping() { - } - createMessageCollector() { - } - awaitMessages() { - } - fetchWebhooks() { - } - createWebhook() { - } - setRateLimitPerUser() { - } - setNSFW() { - } - } - TextBasedChannel.applyToClass(BaseGuildTextChannel, true); - module.exports = BaseGuildTextChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/NewsChannel.js -var require_NewsChannel = __commonJS((exports, module) => { - var BaseGuildTextChannel = require_BaseGuildTextChannel(); - var { Error: Error2 } = require_errors(); - - class NewsChannel extends BaseGuildTextChannel { - async addFollower(channel, reason) { - const channelId = this.guild.channels.resolveId(channel); - if (!channelId) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - await this.client.api.channels(this.id).followers.post({ data: { webhook_channel_id: channelId }, reason }); - return this; - } - } - module.exports = NewsChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/BaseGuildVoiceChannel.js -var require_BaseGuildVoiceChannel = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var GuildChannel = require_GuildChannel(); - var TextBasedChannel = require_TextBasedChannel(); - var MessageManager = require_MessageManager(); - var { VideoQualityModes } = require_Constants(); - var Permissions = require_Permissions(); - - class BaseGuildVoiceChannel extends GuildChannel { - constructor(guild, data, client) { - super(guild, data, client, false); - this.messages = new MessageManager(this); - this.nsfw = Boolean(data.nsfw); - this._patch(data); - } - _patch(data) { - super._patch(data); - if ("bitrate" in data) { - this.bitrate = data.bitrate; - } - if ("rtc_region" in data) { - this.rtcRegion = data.rtc_region; - } - if ("user_limit" in data) { - this.userLimit = data.user_limit; - } - if ("video_quality_mode" in data) { - this.videoQualityMode = VideoQualityModes[data.video_quality_mode]; - } else { - this.videoQualityMode ??= null; - } - if ("last_message_id" in data) { - this.lastMessageId = data.last_message_id; - } - if ("messages" in data) { - for (const message of data.messages) - this.messages._add(message); - } - if ("rate_limit_per_user" in data) { - this.rateLimitPerUser = data.rate_limit_per_user; - } - if ("nsfw" in data) { - this.nsfw = data.nsfw; - } - if ("status" in data) { - this.status = data.status; - } - } - get members() { - const coll = new Collection; - for (const state of this.guild.voiceStates.cache.values()) { - if (state.channelId === this.id && state.member) { - coll.set(state.id, state.member); - } - } - return coll; - } - get full() { - return this.userLimit > 0 && this.members.size >= this.userLimit; - } - get joinable() { - if (!this.viewable) - return false; - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - return this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(Permissions.FLAGS.CONNECT, false); - } - createInvite(options) { - return this.guild.invites.create(this.id, options); - } - fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelId: this.id, cache }); - } - setBitrate(bitrate, reason) { - return this.edit({ bitrate }, reason); - } - setRTCRegion(rtcRegion, reason) { - return this.edit({ rtcRegion }, reason); - } - setUserLimit(userLimit, reason) { - return this.edit({ userLimit }, reason); - } - setVideoQualityMode(videoQualityMode, reason) { - return this.edit({ videoQualityMode }, reason); - } - get lastMessage() { - } - send() { - } - sendTyping() { - } - createMessageCollector() { - } - awaitMessages() { - } - fetchWebhooks() { - } - createWebhook() { - } - setRateLimitPerUser() { - } - setNSFW() { - } - } - TextBasedChannel.applyToClass(BaseGuildVoiceChannel, true, ["lastPinAt"]); - module.exports = BaseGuildVoiceChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/StageChannel.js -var require_StageChannel = __commonJS((exports, module) => { - var BaseGuildVoiceChannel = require_BaseGuildVoiceChannel(); - - class StageChannel extends BaseGuildVoiceChannel { - _patch(data) { - super._patch(data); - if ("topic" in data) { - this.topic = data.topic; - } - } - get stageInstance() { - return this.guild.stageInstances.cache.find((stageInstance) => stageInstance.channelId === this.id) ?? null; - } - createStageInstance(options) { - return this.guild.stageInstances.create(this.id, options); - } - setTopic(topic, reason) { - return this.edit({ topic }, reason); - } - } - module.exports = StageChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/StoreChannel.js -var require_StoreChannel = __commonJS((exports, module) => { - var GuildChannel = require_GuildChannel(); - - class StoreChannel extends GuildChannel { - constructor(guild, data, client) { - super(guild, data, client); - this.nsfw = Boolean(data.nsfw); - } - _patch(data) { - super._patch(data); - if ("nsfw" in data) { - this.nsfw = Boolean(data.nsfw); - } - } - createInvite(options) { - return this.guild.invites.create(this.id, options); - } - fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelId: this.id, cache }); - } - } - module.exports = StoreChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/TextChannel.js -var require_TextChannel = __commonJS((exports, module) => { - var BaseGuildTextChannel = require_BaseGuildTextChannel(); - - class TextChannel extends BaseGuildTextChannel { - _patch(data) { - super._patch(data); - if ("rate_limit_per_user" in data) { - this.rateLimitPerUser = data.rate_limit_per_user; - } - } - setRateLimitPerUser(rateLimitPerUser, reason) { - return this.edit({ rateLimitPerUser }, reason); - } - } - module.exports = TextChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/VoiceChannel.js -var require_VoiceChannel = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var BaseGuildVoiceChannel = require_BaseGuildVoiceChannel(); - var Permissions = require_Permissions(); - var deprecationEmittedForEditable = false; - - class VoiceChannel extends BaseGuildVoiceChannel { - get editable() { - if (!deprecationEmittedForEditable) { - process2.emitWarning("The VoiceChannel#editable getter is deprecated. Use VoiceChannel#manageable instead.", "DeprecationWarning"); - deprecationEmittedForEditable = true; - } - return this.manageable; - } - get joinable() { - if (!super.joinable) - return false; - if (this.full && !this.permissionsFor(this.client.user).has(Permissions.FLAGS.MOVE_MEMBERS, false)) - return false; - return true; - } - get speakable() { - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - return this.guild.members.me.communicationDisabledUntilTimestamp < Date.now() && permissions.has(Permissions.FLAGS.SPEAK, false); - } - } - module.exports = VoiceChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/DirectoryChannel.js -var require_DirectoryChannel = __commonJS((exports, module) => { - var { Channel } = require_Channel(); - - class DirectoryChannel extends Channel { - _patch(data) { - super._patch(data); - this.name = data.name; - } - } - module.exports = DirectoryChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildForumThreadManager.js -var require_GuildForumThreadManager = __commonJS((exports, module) => { - var ThreadManager = require_ThreadManager(); - var { TypeError: TypeError2 } = require_errors(); - var MessagePayload = require_MessagePayload(); - var { resolveAutoArchiveMaxLimit, getUploadURL, uploadFile } = require_Util(); - - class GuildForumThreadManager extends ThreadManager { - async create({ - name, - autoArchiveDuration = this.channel.defaultAutoArchiveDuration, - message, - reason, - rateLimitPerUser, - appliedTags - } = {}) { - if (!message) { - throw new TypeError2("GUILD_FORUM_MESSAGE_REQUIRED"); - } - let messagePayload; - if (message instanceof MessagePayload) { - messagePayload = message.resolveData(); - } else { - messagePayload = MessagePayload.create(this, message).resolveData(); - } - const { data: body, files } = await messagePayload.resolveFiles(); - const attachments = await getUploadURL(this.client, this.channel.id, files); - const requestPromises = attachments.map(async (attachment) => { - await uploadFile(files[attachment.id].file, attachment.upload_url); - return { - id: attachment.id, - filename: files[attachment.id].name, - uploaded_filename: attachment.upload_filename, - description: files[attachment.id].description, - duration_secs: files[attachment.id].duration_secs, - waveform: files[attachment.id].waveform - }; - }); - const attachmentsData = await Promise.all(requestPromises); - attachmentsData.sort((a, b) => parseInt(a.id) - parseInt(b.id)); - if (autoArchiveDuration === "MAX") - autoArchiveDuration = resolveAutoArchiveMaxLimit(this.channel.guild); - const post_data = await this.client.api.channels(this.channel.id).threads.post({ - data: { - name, - auto_archive_duration: autoArchiveDuration, - rate_limit_per_user: rateLimitPerUser, - applied_tags: appliedTags, - message: body, - attachments: attachmentsData - }, - files: [], - reason - }); - return this.client.actions.ThreadCreate.handle(post_data).thread; - } - } - module.exports = GuildForumThreadManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ThreadOnlyChannel.js -var require_ThreadOnlyChannel = __commonJS((exports, module) => { - var GuildChannel = require_GuildChannel(); - var TextBasedChannel = require_TextBasedChannel(); - var GuildForumThreadManager = require_GuildForumThreadManager(); - var { SortOrderTypes } = require_Constants(); - var { transformAPIGuildForumTag, transformAPIGuildDefaultReaction } = require_Util(); - - class ThreadOnlyChannel extends GuildChannel { - constructor(guild, data, client) { - super(guild, data, client, false); - this.threads = new GuildForumThreadManager(this); - this._patch(data); - } - _patch(data) { - super._patch(data); - if ("available_tags" in data) { - this.availableTags = data.available_tags.map((tag) => transformAPIGuildForumTag(tag)); - } else { - this.availableTags ??= []; - } - if ("default_reaction_emoji" in data) { - this.defaultReactionEmoji = data.default_reaction_emoji && transformAPIGuildDefaultReaction(data.default_reaction_emoji); - } else { - this.defaultReactionEmoji ??= null; - } - if ("default_thread_rate_limit_per_user" in data) { - this.defaultThreadRateLimitPerUser = data.default_thread_rate_limit_per_user; - } else { - this.defaultThreadRateLimitPerUser ??= null; - } - if ("rate_limit_per_user" in data) { - this.rateLimitPerUser = data.rate_limit_per_user; - } else { - this.rateLimitPerUser ??= null; - } - if ("default_auto_archive_duration" in data) { - this.defaultAutoArchiveDuration = data.default_auto_archive_duration; - } else { - this.defaultAutoArchiveDuration ??= null; - } - if ("nsfw" in data) { - this.nsfw = data.nsfw; - } else { - this.nsfw ??= false; - } - if ("topic" in data) { - this.topic = data.topic; - } - if ("default_sort_order" in data) { - this.defaultSortOrder = SortOrderTypes[data.default_sort_order]; - } else { - this.defaultSortOrder ??= null; - } - } - setAvailableTags(availableTags, reason) { - return this.edit({ availableTags }, reason); - } - setDefaultReactionEmoji(defaultReactionEmoji, reason) { - return this.edit({ defaultReactionEmoji }, reason); - } - setDefaultThreadRateLimitPerUser(defaultThreadRateLimitPerUser, reason) { - return this.edit({ defaultThreadRateLimitPerUser }, reason); - } - setDefaultSortOrder(defaultSortOrder, reason) { - return this.edit({ defaultSortOrder }, reason); - } - createInvite(options) { - return this.guild.invites.create(this.id, options); - } - fetchInvites(cache = true) { - return this.guild.invites.fetch({ channelId: this.id, cache }); - } - setDefaultAutoArchiveDuration(defaultAutoArchiveDuration, reason) { - return this.edit({ defaultAutoArchiveDuration }, reason); - } - setTopic(topic, reason) { - return this.edit({ topic }, reason); - } - createWebhook() { - } - fetchWebhooks() { - } - setNSFW() { - } - setRateLimitPerUser() { - } - } - TextBasedChannel.applyToClass(ThreadOnlyChannel, true, [ - "send", - "lastMessage", - "lastPinAt", - "bulkDelete", - "sendTyping", - "createMessageCollector", - "awaitMessages", - "createMessageComponentCollector", - "awaitMessageComponent" - ]); - module.exports = ThreadOnlyChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ForumChannel.js -var require_ForumChannel = __commonJS((exports, module) => { - var ThreadOnlyChannel = require_ThreadOnlyChannel(); - var { ForumLayoutTypes } = require_Constants(); - - class ForumChannel extends ThreadOnlyChannel { - _patch(data) { - super._patch(data); - this.defaultForumLayout = ForumLayoutTypes[data.default_forum_layout]; - } - setDefaultForumLayout(defaultForumLayout, reason) { - return this.edit({ defaultForumLayout }, reason); - } - } - module.exports = ForumChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/MediaChannel.js -var require_MediaChannel = __commonJS((exports, module) => { - var ThreadOnlyChannel = require_ThreadOnlyChannel(); - - class MediaChannel extends ThreadOnlyChannel { - } - module.exports = MediaChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GroupDMChannel.js -var require_GroupDMChannel = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var { Channel } = require_Channel(); - var Invite = require_Invite(); - var TextBasedChannel = require_TextBasedChannel(); - var MessageManager = require_MessageManager(); - var { Status, Opcodes } = require_Constants(); - var DataResolver = require_DataResolver(); - - class GroupDMChannel extends Channel { - constructor(client, data) { - super(client, data); - this.type = "GROUP_DM"; - this.messages = new MessageManager(this); - } - _patch(data) { - super._patch(data); - if ("recipients" in data && Array.isArray(data.recipients)) { - this._recipients = data.recipients; - data.recipients.forEach((u) => this.client.users._add(u)); - } else { - this._recipients = []; - } - if ("owner_id" in data) { - this.ownerId = data.owner_id; - } else { - this.ownerId ??= null; - } - if ("last_message_id" in data) { - this.lastMessageId = data.last_message_id; - } else { - this.lastMessageId ??= null; - } - if ("last_pin_timestamp" in data) { - this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null; - } else { - this.lastPinTimestamp ??= null; - } - if ("name" in data) { - this.name = data.name; - } - if ("icon" in data) { - this.icon = data.icon ?? null; - } - } - iconURL({ format, size } = {}) { - return this.icon && this.client.rest.cdn.GDMIcon(this.id, this.icon, format, size); - } - get recipients() { - const collect = new Collection; - this._recipients.map((recipient) => collect.set(recipient.id, this.client.users.cache.get(recipient.id))); - collect.set(this.client.user.id, this.client.user); - return collect; - } - get owner() { - return this.client.users.cache.get(this.ownerId); - } - get partial() { - return typeof this.lastMessageId === "undefined"; - } - async delete(slient = false) { - if (typeof slient === "boolean" && slient) { - await this.client.api.channels[this.id].delete({ - query: { - silent: true - } - }); - } else { - await this.client.api.channels[this.id].delete(); - } - return this; - } - toString() { - return this.name ?? this._recipients.filter((user) => user.id !== this.client.user.id).map((user) => user.username).join(", "); - } - toJSON() { - const json = super.toJSON({ - createdTimestamp: true - }); - json.iconURL = this.iconURL(); - return json; - } - async edit(data) { - const _data = {}; - if ("name" in data) - _data.name = data.name?.trim() ?? null; - if (typeof data.icon !== "undefined") { - _data.icon = await DataResolver.resolveImage(data.icon); - } - if ("owner" in data) { - _data.owner = data.owner; - } - const newData = await this.client.api.channels[this.id].patch({ - data: _data - }); - return this.client.actions.ChannelUpdate.handle(newData).updated; - } - setName(name) { - return this.edit({ name }); - } - setIcon(icon) { - return this.edit({ icon }); - } - setOwner(user) { - const id = this.client.users.resolveId(user); - if (this.ownerId === id) { - return Promise.resolve(this); - } - return this.edit({ owner: id }); - } - async addUser(user) { - user = this.client.users.resolveId(user); - await this.client.api.channels[this.id].recipients[user].put(); - return this; - } - async removeUser(user) { - user = this.client.users.resolveId(user); - await this.client.api.channels[this.id].recipients[user].delete(); - return this; - } - async getInvite() { - const inviteCode = await this.client.api.channels(this.id).invites.post({ - data: { - max_age: 86400 - } - }); - return new Invite(this.client, inviteCode); - } - async fetchAllInvite() { - const invites = await this.client.api.channels(this.id).invites.get(); - return new Collection(invites.map((invite) => [invite.code, new Invite(this.client, invite)])); - } - async removeInvite(invite) { - let code = invite?.code; - if (!code && URL.canParse(invite)) - code = new URL(invite).pathname.slice(1); - else - code = invite; - await this.client.api.channels(this.id).invites[invite].delete(); - return this; - } - ring(recipients) { - if (!recipients || !Array.isArray(recipients) || recipients.length == 0) { - recipients = null; - } else { - recipients = recipients.map((r) => this.client.users.resolveId(r)).filter((r) => r && this.recipients.get(r)); - } - return this.client.api.channels(this.id).call.ring.post({ - data: { - recipients - } - }); - } - sync() { - this.client.ws.broadcast({ - op: Opcodes.DM_UPDATE, - d: { - channel_id: this.id - } - }); - } - get voiceUsers() { - const coll = new Collection; - for (const state of this.client.voiceStates.cache.values()) { - if (state.channelId === this.id && state.user) { - coll.set(state.id, state.user); - } - } - return coll; - } - get shard() { - return this.client.ws.shards.first(); - } - get voiceAdapterCreator() { - return (methods) => { - this.client.voice.adapters.set(this.id, methods); - return { - sendPayload: (data) => { - if (this.shard.status !== Status.READY) - return false; - this.shard.send(data); - return true; - }, - destroy: () => { - this.client.voice.adapters.delete(this.id); - } - }; - }; - } - get lastMessage() { - } - get lastPinAt() { - } - send() { - } - sendTyping() { - } - createMessageCollector() { - } - awaitMessages() { - } - } - TextBasedChannel.applyToClass(GroupDMChannel, true, [ - "fetchWebhooks", - "createWebhook", - "setRateLimitPerUser", - "setNSFW" - ]); - module.exports = GroupDMChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Channel.js -var require_Channel = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var CategoryChannel; - var DMChannel; - var NewsChannel; - var StageChannel; - var StoreChannel; - var TextChannel; - var ThreadChannel; - var VoiceChannel; - var DirectoryChannel; - var ForumChannel; - var MediaChannel; - var ChannelFlags = require_ChannelFlags(); - var { ChannelTypes, ThreadChannelTypes, VoiceBasedChannelTypes } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deletedChannels = new WeakSet; - var deprecationEmittedForDeleted = false; - - class Channel extends Base { - constructor(client, data, immediatePatch = true) { - super(client); - const type = ChannelTypes[data?.type]; - this.type = type ?? "UNKNOWN"; - if (data && immediatePatch) - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("flags" in data) { - this.flags = new ChannelFlags(data.flags).freeze(); - } else { - this.flags ??= new ChannelFlags().freeze(); - } - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Channel#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedChannels.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Channel#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedChannels.add(this); - else - deletedChannels.delete(this); - } - get partial() { - return false; - } - toString() { - return `<#${this.id}>`; - } - async delete() { - await this.client.api.channels(this.id).delete(); - return this; - } - fetch(force = true) { - return this.client.channels.fetch(this.id, { force }); - } - isText() { - return "messages" in this; - } - isVoice() { - return VoiceBasedChannelTypes.includes(this.type); - } - isThread() { - return ThreadChannelTypes.includes(this.type); - } - isThreadOnly() { - return "availableTags" in this; - } - isDirectory() { - return this.type === "GUILD_DIRECTORY"; - } - static create(client, data, guild, { allowUnknownGuild } = {}) { - CategoryChannel ??= require_CategoryChannel(); - DMChannel ??= require_DMChannel(); - NewsChannel ??= require_NewsChannel(); - StageChannel ??= require_StageChannel(); - StoreChannel ??= require_StoreChannel(); - TextChannel ??= require_TextChannel(); - ThreadChannel ??= require_ThreadChannel(); - VoiceChannel ??= require_VoiceChannel(); - DirectoryChannel ??= require_DirectoryChannel(); - ForumChannel ??= require_ForumChannel(); - MediaChannel ??= require_MediaChannel(); - let channel; - if (!data.guild_id && !guild) { - if (data.recipients && data.type !== ChannelTypes.GROUP_DM || data.type === ChannelTypes.DM) { - channel = new DMChannel(client, data); - } else if (data.type === ChannelTypes.GROUP_DM) { - const GroupDMChannel = require_GroupDMChannel(); - channel = new GroupDMChannel(client, data); - } - } else { - guild ??= client.guilds.cache.get(data.guild_id); - if (guild || allowUnknownGuild) { - switch (data.type) { - case ChannelTypes.GUILD_TEXT: { - channel = new TextChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_VOICE: { - channel = new VoiceChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_CATEGORY: { - channel = new CategoryChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_NEWS: { - channel = new NewsChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_STORE: { - channel = new StoreChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_STAGE_VOICE: { - channel = new StageChannel(guild, data, client); - break; - } - case ChannelTypes.GUILD_NEWS_THREAD: - case ChannelTypes.GUILD_PUBLIC_THREAD: - case ChannelTypes.GUILD_PRIVATE_THREAD: { - channel = new ThreadChannel(guild, data, client); - if (!allowUnknownGuild) - channel.parent?.threads.cache.set(channel.id, channel); - break; - } - case ChannelTypes.GUILD_DIRECTORY: - channel = new DirectoryChannel(client, data); - break; - case ChannelTypes.GUILD_FORUM: - channel = new ForumChannel(guild, data, client); - break; - case ChannelTypes.GUILD_MEDIA: - channel = new MediaChannel(guild, data, client); - break; - } - if (channel && !allowUnknownGuild) - guild.channels?.cache.set(channel.id, channel); - } - } - return channel; - } - toJSON(...props) { - return super.toJSON({ createdTimestamp: true }, ...props); - } - } - exports.Channel = Channel; - exports.deletedChannels = deletedChannels; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/PermissionOverwrites.js -var require_PermissionOverwrites = __commonJS((exports, module) => { - var Base = require_Base(); - var { Role } = require_Role(); - var { TypeError: TypeError2 } = require_errors(); - var { OverwriteTypes } = require_Constants(); - var Permissions = require_Permissions(); - - class PermissionOverwrites extends Base { - constructor(client, data, channel) { - super(client); - Object.defineProperty(this, "channel", { value: channel }); - if (data) - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("type" in data) { - this.type = typeof data.type === "number" ? OverwriteTypes[data.type] : data.type; - } - if ("deny" in data) { - this.deny = new Permissions(BigInt(data.deny)).freeze(); - } - if ("allow" in data) { - this.allow = new Permissions(BigInt(data.allow)).freeze(); - } - } - async edit(options, reason) { - await this.channel.permissionOverwrites.upsert(this.id, options, { type: OverwriteTypes[this.type], reason }, this); - return this; - } - async delete(reason) { - await this.channel.permissionOverwrites.delete(this.id, reason); - return this; - } - toJSON() { - return { - id: this.id, - type: OverwriteTypes[this.type], - allow: this.allow, - deny: this.deny - }; - } - static resolveOverwriteOptions(options, { allow, deny } = {}) { - allow = new Permissions(allow); - deny = new Permissions(deny); - for (const [perm, value] of Object.entries(options)) { - if (value === true) { - allow.add(perm); - deny.remove(perm); - } else if (value === false) { - allow.remove(perm); - deny.add(perm); - } else if (value === null) { - allow.remove(perm); - deny.remove(perm); - } - } - return { allow, deny }; - } - static resolve(overwrite, guild) { - if (overwrite instanceof this) - return overwrite.toJSON(); - if (typeof overwrite.id === "string" && overwrite.type in OverwriteTypes) { - return { - id: overwrite.id, - type: OverwriteTypes[overwrite.type], - allow: Permissions.resolve(overwrite.allow ?? Permissions.defaultBit).toString(), - deny: Permissions.resolve(overwrite.deny ?? Permissions.defaultBit).toString() - }; - } - const userOrRole = guild.roles.resolve(overwrite.id) ?? guild.client.users.resolve(overwrite.id); - if (!userOrRole) { - throw new TypeError2("INVALID_TYPE", "parameter", "cached User or Role"); - } - const type = userOrRole instanceof Role ? OverwriteTypes.role : OverwriteTypes.member; - return { - id: userOrRole.id, - type, - allow: Permissions.resolve(overwrite.allow ?? Permissions.defaultBit).toString(), - deny: Permissions.resolve(overwrite.deny ?? Permissions.defaultBit).toString() - }; - } - } - module.exports = PermissionOverwrites; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/PermissionOverwriteManager.js -var require_PermissionOverwriteManager = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2 } = require_errors(); - var PermissionOverwrites = require_PermissionOverwrites(); - var { Role } = require_Role(); - var { OverwriteTypes } = require_Constants(); - var cacheWarningEmitted = false; - - class PermissionOverwriteManager extends CachedManager { - constructor(channel, iterable) { - super(channel.client, PermissionOverwrites); - if (!cacheWarningEmitted && this._cache.constructor.name !== "Collection") { - cacheWarningEmitted = true; - process2.emitWarning(`Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, "UnsupportedCacheOverwriteWarning"); - } - this.channel = channel; - if (iterable) { - for (const item of iterable) { - this._add(item); - } - } - } - _add(data, cache) { - return super._add(data, cache, { extras: [this.channel] }); - } - async set(overwrites, reason) { - if (!Array.isArray(overwrites) && !(overwrites instanceof Collection)) { - throw new TypeError2("INVALID_TYPE", "overwrites", "Array or Collection of Permission Overwrites", true); - } - return this.channel.edit({ permissionOverwrites: overwrites, reason }); - } - async upsert(userOrRole, options, overwriteOptions = {}, existing) { - let userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole); - let { type, reason } = overwriteOptions; - if (typeof type !== "number") { - userOrRole = this.channel.guild.roles.resolve(userOrRole) ?? this.client.users.resolve(userOrRole); - if (!userOrRole) - throw new TypeError2("INVALID_TYPE", "parameter", "User nor a Role"); - type = userOrRole instanceof Role ? OverwriteTypes.role : OverwriteTypes.member; - } - const { allow, deny } = PermissionOverwrites.resolveOverwriteOptions(options, existing); - await this.client.api.channels(this.channel.id).permissions(userOrRoleId).put({ - data: { id: userOrRoleId, type, allow, deny }, - reason - }); - return this.channel; - } - create(userOrRole, options, overwriteOptions) { - return this.upsert(userOrRole, options, overwriteOptions); - } - edit(userOrRole, options, overwriteOptions) { - const existing = this.cache.get(this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole)); - return this.upsert(userOrRole, options, overwriteOptions, existing); - } - async delete(userOrRole, reason) { - const userOrRoleId = this.channel.guild.roles.resolveId(userOrRole) ?? this.client.users.resolveId(userOrRole); - if (!userOrRoleId) - throw new TypeError2("INVALID_TYPE", "parameter", "User nor a Role"); - await this.client.api.channels(this.channel.id).permissions(userOrRoleId).delete({ reason }); - return this.channel; - } - } - module.exports = PermissionOverwriteManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildChannel.js -var require_GuildChannel = __commonJS((exports, module) => { - var { Channel } = require_Channel(); - var { Error: Error2 } = require_errors(); - var PermissionOverwriteManager = require_PermissionOverwriteManager(); - var { VoiceBasedChannelTypes } = require_Constants(); - var Permissions = require_Permissions(); - var Util = require_Util(); - - class GuildChannel extends Channel { - constructor(guild, data, client, immediatePatch = true) { - super(guild?.client ?? client, data, false); - this.guild = guild; - this.guildId = guild?.id ?? data.guild_id; - this.parentId = this.parentId ?? null; - this.permissionOverwrites = new PermissionOverwriteManager(this); - if (data && immediatePatch) - this._patch(data); - } - _patch(data) { - super._patch(data); - if ("name" in data) { - this.name = data.name; - } - if ("position" in data) { - this.rawPosition = data.position; - } - if ("guild_id" in data) { - this.guildId = data.guild_id; - } - if ("parent_id" in data) { - this.parentId = data.parent_id; - } - if ("permission_overwrites" in data) { - this.permissionOverwrites.cache.clear(); - for (const overwrite of data.permission_overwrites) { - this.permissionOverwrites._add(overwrite); - } - } - } - _clone() { - const clone = super._clone(); - clone.permissionOverwrites = new PermissionOverwriteManager(clone, this.permissionOverwrites.cache.values()); - return clone; - } - get parent() { - return this.guild.channels.resolve(this.parentId); - } - get permissionsLocked() { - if (!this.parent) - return null; - const overwriteIds = new Set([ - ...this.permissionOverwrites.cache.keys(), - ...this.parent.permissionOverwrites.cache.keys() - ]); - return [...overwriteIds].every((key) => { - const channelVal = this.permissionOverwrites.cache.get(key); - const parentVal = this.parent.permissionOverwrites.cache.get(key); - if (!channelVal && parentVal.deny.bitfield === Permissions.defaultBit && parentVal.allow.bitfield === Permissions.defaultBit || !parentVal && channelVal.deny.bitfield === Permissions.defaultBit && channelVal.allow.bitfield === Permissions.defaultBit) { - return true; - } - return typeof channelVal !== "undefined" && typeof parentVal !== "undefined" && channelVal.deny.bitfield === parentVal.deny.bitfield && channelVal.allow.bitfield === parentVal.allow.bitfield; - }); - } - get position() { - const selfIsCategory = this.type === "GUILD_CATEGORY"; - const types = Util.getSortableGroupTypes(this.type); - let count = 0; - for (const channel of this.guild.channels.cache.values()) { - if (!types.includes(channel.type)) - continue; - if (!selfIsCategory && channel.parentId !== this.parentId) - continue; - if (this.rawPosition === channel.rawPosition) { - if (BigInt(channel.id) < BigInt(this.id)) - count++; - } else if (this.rawPosition > channel.rawPosition) { - count++; - } - } - return count; - } - permissionsFor(memberOrRole, checkAdmin = true) { - const member = this.guild.members.resolve(memberOrRole); - if (member) - return this.memberPermissions(member, checkAdmin); - const role = this.guild.roles.resolve(memberOrRole); - return role && this.rolePermissions(role, checkAdmin); - } - overwritesFor(member, verified = false, roles = null) { - if (!verified) - member = this.guild.members.resolve(member); - if (!member) - return []; - roles ??= member.roles.cache; - const roleOverwrites = []; - let memberOverwrites; - let everyoneOverwrites; - for (const overwrite of this.permissionOverwrites.cache.values()) { - if (overwrite.id === this.guild.id) { - everyoneOverwrites = overwrite; - } else if (roles.has(overwrite.id)) { - roleOverwrites.push(overwrite); - } else if (overwrite.id === member.id) { - memberOverwrites = overwrite; - } - } - return { - everyone: everyoneOverwrites, - roles: roleOverwrites, - member: memberOverwrites - }; - } - memberPermissions(member, checkAdmin) { - if (checkAdmin && member.id === this.guild.ownerId) - return new Permissions(Permissions.ALL).freeze(); - const roles = member.roles.cache; - const permissions = new Permissions(roles.map((role) => role.permissions)); - if (checkAdmin && permissions.has(Permissions.FLAGS.ADMINISTRATOR)) { - return new Permissions(Permissions.ALL).freeze(); - } - const overwrites = this.overwritesFor(member, true, roles); - return permissions.remove(overwrites.everyone?.deny ?? Permissions.defaultBit).add(overwrites.everyone?.allow ?? Permissions.defaultBit).remove(overwrites.roles.length > 0 ? overwrites.roles.map((role) => role.deny) : Permissions.defaultBit).add(overwrites.roles.length > 0 ? overwrites.roles.map((role) => role.allow) : Permissions.defaultBit).remove(overwrites.member?.deny ?? Permissions.defaultBit).add(overwrites.member?.allow ?? Permissions.defaultBit).freeze(); - } - rolePermissions(role, checkAdmin) { - if (checkAdmin && role.permissions.has(Permissions.FLAGS.ADMINISTRATOR)) { - return new Permissions(Permissions.ALL).freeze(); - } - const basePermissions = new Permissions([role.permissions, role.guild.roles.everyone.permissions]); - const everyoneOverwrites = this.permissionOverwrites.cache.get(this.guild.id); - const roleOverwrites = this.permissionOverwrites.cache.get(role.id); - return basePermissions.remove(everyoneOverwrites?.deny ?? Permissions.defaultBit).add(everyoneOverwrites?.allow ?? Permissions.defaultBit).remove(roleOverwrites?.deny ?? Permissions.defaultBit).add(roleOverwrites?.allow ?? Permissions.defaultBit).freeze(); - } - async lockPermissions() { - if (!this.parent) - throw new Error2("GUILD_CHANNEL_ORPHAN"); - const permissionOverwrites = this.parent.permissionOverwrites.cache.map((overwrite) => overwrite.toJSON()); - return this.edit({ permissionOverwrites }); - } - get members() { - return this.guild.members.cache.filter((m) => this.permissionsFor(m).has(Permissions.FLAGS.VIEW_CHANNEL, false)); - } - edit(data, reason) { - return this.guild.channels.edit(this, data, reason); - } - setName(name, reason) { - return this.edit({ name }, reason); - } - setParent(channel, { lockPermissions = true, reason } = {}) { - return this.edit({ - parent: channel ?? null, - lockPermissions - }, reason); - } - setPosition(position, options = {}) { - return this.guild.channels.setPosition(this, position, options); - } - clone(options = {}) { - return this.guild.channels.create(options.name ?? this.name, { - permissionOverwrites: this.permissionOverwrites.cache, - topic: this.topic, - type: this.type, - nsfw: this.nsfw, - parent: this.parent, - bitrate: this.bitrate, - userLimit: this.userLimit, - rateLimitPerUser: this.rateLimitPerUser, - position: this.rawPosition, - reason: null, - ...options - }); - } - equals(channel) { - let equal = channel && this.id === channel.id && this.type === channel.type && this.topic === channel.topic && this.position === channel.position && this.name === channel.name; - if (equal) { - if (this.permissionOverwrites && channel.permissionOverwrites) { - equal = this.permissionOverwrites.cache.equals(channel.permissionOverwrites.cache); - } else { - equal = !this.permissionOverwrites && !channel.permissionOverwrites; - } - } - return equal; - } - get deletable() { - return this.manageable && this.guild.rulesChannelId !== this.id && this.guild.publicUpdatesChannelId !== this.id; - } - get manageable() { - if (this.client.user.id === this.guild.ownerId) - return true; - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - if (permissions.has(Permissions.FLAGS.ADMINISTRATOR, false)) - return true; - if (this.guild.members.me.communicationDisabledUntilTimestamp > Date.now()) - return false; - const bitfield = VoiceBasedChannelTypes.includes(this.type) ? Permissions.FLAGS.MANAGE_CHANNELS | Permissions.FLAGS.CONNECT : Permissions.FLAGS.VIEW_CHANNEL | Permissions.FLAGS.MANAGE_CHANNELS; - return permissions.has(bitfield, false); - } - get viewable() { - if (this.client.user.id === this.guild.ownerId) - return true; - const permissions = this.permissionsFor(this.client.user); - if (!permissions) - return false; - return permissions.has(Permissions.FLAGS.VIEW_CHANNEL, false); - } - async delete(reason) { - await this.guild.channels.delete(this.id, reason); - return this; - } - } - module.exports = GuildChannel; -}); - -// node_modules/discord.js-selfbot-v13/src/util/Util.js -var require_Util = __commonJS((exports, module) => { - var { Agent } = import.meta.require("http"); - var { parse } = import.meta.require("path"); - var process2 = import.meta.require("process"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var { fetch } = import.meta.require("undici"); - var { Colors, Events } = require_Constants(); - var { Error: DiscordError, RangeError: RangeError2, TypeError: TypeError2 } = require_errors(); - var has = (o, k) => Object.prototype.hasOwnProperty.call(o, k); - var isObject = (d) => typeof d === "object" && d !== null; - var deprecationEmittedForSplitMessage = false; - var deprecationEmittedForRemoveMentions = false; - var deprecationEmittedForResolveAutoArchiveMaxLimit = false; - var TextSortableGroupTypes = ["GUILD_TEXT", "GUILD_ANNOUCMENT", "GUILD_FORUM"]; - var VoiceSortableGroupTypes = ["GUILD_VOICE", "GUILD_STAGE_VOICE"]; - var CategorySortableGroupTypes = ["GUILD_CATEGORY"]; - var payloadTypes = [ - { - name: "opus", - type: "audio", - priority: 1000, - payload_type: 120 - }, - { - name: "AV1", - type: "video", - priority: 1000, - payload_type: 101, - rtx_payload_type: 102, - encode: false, - decode: false - }, - { - name: "H265", - type: "video", - priority: 2000, - payload_type: 103, - rtx_payload_type: 104, - encode: false, - decode: false - }, - { - name: "H264", - type: "video", - priority: 3000, - payload_type: 105, - rtx_payload_type: 106, - encode: true, - decode: true - }, - { - name: "VP8", - type: "video", - priority: 4000, - payload_type: 107, - rtx_payload_type: 108, - encode: true, - decode: false - }, - { - name: "VP9", - type: "video", - priority: 5000, - payload_type: 109, - rtx_payload_type: 110, - encode: false, - decode: false - } - ]; - - class Util extends null { - static flatten(obj, ...props) { - if (!isObject(obj)) - return obj; - const objProps = Object.keys(obj).filter((k) => !k.startsWith("_")).map((k) => ({ [k]: true })); - props = objProps.length ? Object.assign(...objProps, ...props) : Object.assign({}, ...props); - const out = {}; - for (let [prop, newProp] of Object.entries(props)) { - if (!newProp) - continue; - newProp = newProp === true ? prop : newProp; - const element = obj[prop]; - const elemIsObj = isObject(element); - const valueOf = elemIsObj && typeof element.valueOf === "function" ? element.valueOf() : null; - const hasToJSON = elemIsObj && typeof element.toJSON === "function"; - if (element instanceof Collection) - out[newProp] = Array.from(element.keys()); - else if (valueOf instanceof Collection) - out[newProp] = Array.from(valueOf.keys()); - else if (Array.isArray(element)) - out[newProp] = element.map((e) => e.toJSON?.() ?? Util.flatten(e)); - else if (typeof valueOf !== "object") - out[newProp] = valueOf; - else if (hasToJSON) - out[newProp] = element.toJSON(); - else if (typeof element === "object") - out[newProp] = Util.flatten(element); - else if (!elemIsObj) - out[newProp] = element; - } - return out; - } - static splitMessage(text, { maxLength = 2000, char = "\n", prepend = "", append = "" } = {}) { - if (!deprecationEmittedForSplitMessage) { - process2.emitWarning("The Util.splitMessage method is deprecated and will be removed in the next major version.", "DeprecationWarning"); - deprecationEmittedForSplitMessage = true; - } - text = Util.verifyString(text); - if (text.length <= maxLength) - return [text]; - let splitText = [text]; - if (Array.isArray(char)) { - while (char.length > 0 && splitText.some((elem) => elem.length > maxLength)) { - const currentChar = char.shift(); - if (currentChar instanceof RegExp) { - splitText = splitText.flatMap((chunk) => chunk.match(currentChar)); - } else { - splitText = splitText.flatMap((chunk) => chunk.split(currentChar)); - } - } - } else { - splitText = text.split(char); - } - if (splitText.some((elem) => elem.length > maxLength)) - throw new RangeError2("SPLIT_MAX_LEN"); - const messages = []; - let msg = ""; - for (const chunk of splitText) { - if (msg && (msg + char + chunk + append).length > maxLength) { - messages.push(msg + append); - msg = prepend; - } - msg += (msg && msg !== prepend ? char : "") + chunk; - } - return messages.concat(msg).filter((m) => m); - } - static escapeMarkdown(text, { - codeBlock = true, - inlineCode = true, - bold = true, - italic = true, - underline = true, - strikethrough = true, - spoiler = true, - codeBlockContent = true, - inlineCodeContent = true, - escape = true, - heading = false, - bulletedList = false, - numberedList = false, - maskedLink = false - } = {}) { - if (!codeBlockContent) { - return text.split("```").map((subString, index, array) => { - if (index % 2 && index !== array.length - 1) - return subString; - return Util.escapeMarkdown(subString, { - inlineCode, - bold, - italic, - underline, - strikethrough, - spoiler, - inlineCodeContent, - escape, - heading, - bulletedList, - numberedList, - maskedLink - }); - }).join(codeBlock ? "\\`\\`\\`" : "```"); - } - if (!inlineCodeContent) { - return text.split(/(?<=^|[^`])`(?=[^`]|$)/g).map((subString, index, array) => { - if (index % 2 && index !== array.length - 1) - return subString; - return Util.escapeMarkdown(subString, { - codeBlock, - bold, - italic, - underline, - strikethrough, - spoiler, - escape, - heading, - bulletedList, - numberedList, - maskedLink - }); - }).join(inlineCode ? "\\`" : "`"); - } - if (escape) - text = Util.escapeEscape(text); - if (inlineCode) - text = Util.escapeInlineCode(text); - if (codeBlock) - text = Util.escapeCodeBlock(text); - if (italic) - text = Util.escapeItalic(text); - if (bold) - text = Util.escapeBold(text); - if (underline) - text = Util.escapeUnderline(text); - if (strikethrough) - text = Util.escapeStrikethrough(text); - if (spoiler) - text = Util.escapeSpoiler(text); - if (heading) - text = Util.escapeHeading(text); - if (bulletedList) - text = Util.escapeBulletedList(text); - if (numberedList) - text = Util.escapeNumberedList(text); - if (maskedLink) - text = Util.escapeMaskedLink(text); - return text; - } - static escapeCodeBlock(text) { - return text.replaceAll("```", "\\`\\`\\`"); - } - static escapeInlineCode(text) { - return text.replace(/(?<=^|[^`])``?(?=[^`]|$)/g, (match) => match.length === 2 ? "\\`\\`" : "\\`"); - } - static escapeItalic(text) { - let i = 0; - text = text.replace(/(?<=^|[^*])\*([^*]|\*\*|$)/g, (_, match) => { - if (match === "**") - return ++i % 2 ? `\\*${match}` : `${match}\\*`; - return `\\*${match}`; - }); - i = 0; - return text.replace(/(?<=^|[^_])_([^_]|__|$)/g, (_, match) => { - if (match === "__") - return ++i % 2 ? `\\_${match}` : `${match}\\_`; - return `\\_${match}`; - }); - } - static escapeBold(text) { - let i = 0; - return text.replace(/\*\*(\*)?/g, (_, match) => { - if (match) - return ++i % 2 ? `${match}\\*\\*` : `\\*\\*${match}`; - return "\\*\\*"; - }); - } - static escapeUnderline(text) { - let i = 0; - return text.replace(/__(_)?/g, (_, match) => { - if (match) - return ++i % 2 ? `${match}\\_\\_` : `\\_\\_${match}`; - return "\\_\\_"; - }); - } - static escapeStrikethrough(text) { - return text.replaceAll("~~", "\\~\\~"); - } - static escapeSpoiler(text) { - return text.replaceAll("||", "\\|\\|"); - } - static escapeEscape(text) { - return text.replaceAll("\\", "\\\\"); - } - static escapeHeading(text) { - return text.replaceAll(/^( {0,2}[*-] +)?(#{1,3} )/gm, "$1\\$2"); - } - static escapeBulletedList(text) { - return text.replaceAll(/^( *)[*-]( +)/gm, "$1\\-$2"); - } - static escapeNumberedList(text) { - return text.replaceAll(/^( *\d+)\./gm, "$1\\."); - } - static escapeMaskedLink(text) { - return text.replaceAll(/\[.+\]\(.+\)/gm, "\\$&"); - } - static fetchRecommendedShards() { - throw new DiscordError("INVALID_USER_API"); - } - static parseEmoji(text) { - if (text.includes("%")) - text = decodeURIComponent(text); - if (!text.includes(":")) - return { animated: false, name: text, id: null }; - const match = text.match(/?/); - return match && { animated: Boolean(match[1]), name: match[2], id: match[3] ?? null }; - } - static resolvePartialEmoji(emoji) { - if (!emoji) - return null; - if (typeof emoji === "string") - return /^\d{17,19}$/.test(emoji) ? { id: emoji } : Util.parseEmoji(emoji); - const { id, name, animated } = emoji; - if (!id && !name) - return null; - return { id, name, animated: Boolean(animated) }; - } - static cloneObject(obj) { - return Object.assign(Object.create(obj), obj); - } - static mergeDefault(def, given) { - if (!given) - return def; - for (const key in def) { - if (!has(given, key) || given[key] === undefined) { - given[key] = def[key]; - } else if (given[key] === Object(given[key])) { - given[key] = Util.mergeDefault(def[key], given[key]); - } - } - return given; - } - static makeError(obj) { - const err = new Error(obj.message); - err.name = obj.name; - err.stack = obj.stack; - return err; - } - static makePlainError(err) { - return { - name: err.name, - message: err.message, - stack: err.stack - }; - } - static moveElementInArray(array, element, newIndex, offset = false) { - const index = array.indexOf(element); - newIndex = (offset ? index : 0) + newIndex; - if (newIndex > -1 && newIndex < array.length) { - const removedElement = array.splice(index, 1)[0]; - array.splice(newIndex, 0, removedElement); - } - return array.indexOf(element); - } - static verifyString(data, error = Error, errorMessage = `Expected a string, got ${data} instead.`, allowEmpty = true) { - if (typeof data !== "string") - throw new error(errorMessage); - if (!allowEmpty && data.length === 0) - throw new error(errorMessage); - return data; - } - static resolveColor(color) { - if (typeof color === "string") { - if (color === "RANDOM") - return Math.floor(Math.random() * (16777215 + 1)); - if (color === "DEFAULT") - return 0; - color = Colors[color] ?? parseInt(color.replace("#", ""), 16); - } else if (Array.isArray(color)) { - color = (color[0] << 16) + (color[1] << 8) + color[2]; - } - if (color < 0 || color > 16777215) - throw new RangeError2("COLOR_RANGE"); - else if (Number.isNaN(color)) - throw new TypeError2("COLOR_CONVERT"); - return color; - } - static discordSort(collection) { - const isGuildChannel = collection.first() instanceof GuildChannel; - return collection.toSorted(isGuildChannel ? (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(a.id) - BigInt(b.id)) : (a, b) => a.rawPosition - b.rawPosition || Number(BigInt(b.id) - BigInt(a.id))); - } - static async setPosition(item, position, relative, sorted, route, reason) { - let updatedItems = [...sorted.values()]; - Util.moveElementInArray(updatedItems, item, position, relative); - updatedItems = updatedItems.map((r, i) => ({ id: r.id, position: i })); - await route.patch({ data: updatedItems, reason }); - return updatedItems; - } - static basename(path, ext) { - const res = parse(path); - return ext && res.ext.startsWith(ext) ? res.name : res.base.split("?")[0]; - } - static removeMentions(str) { - if (!deprecationEmittedForRemoveMentions) { - process2.emitWarning("The Util.removeMentions method is deprecated. Use MessageOptions#allowedMentions instead.", "DeprecationWarning"); - deprecationEmittedForRemoveMentions = true; - } - return Util._removeMentions(str); - } - static _removeMentions(str) { - return str.replaceAll("@", "@\u200B"); - } - static cleanContent(str, channel) { - str = str.replace(/<@!?[0-9]+>/g, (input) => { - const id = input.replace(/<|!|>|@/g, ""); - if (channel.type === "DM") { - const user = channel.client.users.cache.get(id); - return user ? Util._removeMentions(`@${user.username}`) : input; - } - const member = channel.guild?.members.cache.get(id); - if (member) { - return Util._removeMentions(`@${member.displayName}`); - } else { - const user = channel.client.users.cache.get(id); - return user ? Util._removeMentions(`@${user.username}`) : input; - } - }).replace(/<#[0-9]+>/g, (input) => { - const mentionedChannel = channel.client.channels.cache.get(input.replace(/<|#|>/g, "")); - return mentionedChannel ? `#${mentionedChannel.name}` : input; - }).replace(/<@&[0-9]+>/g, (input) => { - if (channel.type === "DM") - return input; - const role = channel.guild.roles.cache.get(input.replace(/<|@|>|&/g, "")); - return role ? `@${role.name}` : input; - }); - return str; - } - static cleanCodeBlockContent(text) { - return text.replaceAll("```", "`\u200B``"); - } - static archivedThreadSweepFilter(lifetime = 14400) { - const filter = require_Sweepers().archivedThreadSweepFilter(lifetime); - filter.isDefault = true; - return filter; - } - static resolveAutoArchiveMaxLimit() { - if (!deprecationEmittedForResolveAutoArchiveMaxLimit) { - process2.emitWarning("The Util.resolveAutoArchiveMaxLimit method and the 'MAX' option are deprecated and will be removed in the next major version.", "DeprecationWarning"); - deprecationEmittedForResolveAutoArchiveMaxLimit = true; - } - return 10080; - } - static transformAPIGuildForumTag(tag) { - return { - id: tag.id, - name: tag.name, - moderated: tag.moderated, - emoji: tag.emoji_id ?? tag.emoji_name ? { - id: tag.emoji_id, - name: tag.emoji_name - } : null - }; - } - static transformGuildForumTag(tag) { - return { - id: tag.id, - name: tag.name, - moderated: tag.moderated, - emoji_id: tag.emoji?.id ?? null, - emoji_name: tag.emoji?.name ?? null - }; - } - static transformAPIGuildDefaultReaction(defaultReaction) { - return { - id: defaultReaction.emoji_id, - name: defaultReaction.emoji_name - }; - } - static transformGuildDefaultReaction(defaultReaction) { - return { - emoji_id: defaultReaction.id, - emoji_name: defaultReaction.name - }; - } - static transformGuildScheduledEventRecurrenceRule(recurrenceRule) { - return { - start: new Date(recurrenceRule.startAt).toISOString(), - frequency: recurrenceRule.frequency, - interval: recurrenceRule.interval, - by_weekday: recurrenceRule.byWeekday, - by_n_weekday: recurrenceRule.byNWeekday, - by_month: recurrenceRule.byMonth, - by_month_day: recurrenceRule.byMonthDay - }; - } - static transformAPIIncidentsData(data) { - return { - invitesDisabledUntil: data.invites_disabled_until ? new Date(data.invites_disabled_until) : null, - dmsDisabledUntil: data.dms_disabled_until ? new Date(data.dms_disabled_until) : null, - dmSpamDetectedAt: data.dm_spam_detected_at ? new Date(data.dm_spam_detected_at) : null, - raidDetectedAt: data.raid_detected_at ? new Date(data.raid_detected_at) : null - }; - } - static getSortableGroupTypes(type) { - switch (type) { - case "GUILD_TEXT": - case "GUILD_ANNOUNCEMENT": - case "GUILD_FORUM": - return TextSortableGroupTypes; - case "GUILD_VOICE": - case "GUILD_STAGE_VOICE": - return VoiceSortableGroupTypes; - case "GUILD_CATEGORY": - return CategorySortableGroupTypes; - default: - return [type]; - } - } - static calculateUserDefaultAvatarIndex(userId) { - return Number(BigInt(userId) >> 22n) % 6; - } - static async getUploadURL(client, channelId, files) { - if (!files.length) - return []; - files = files.map((file, i) => ({ - filename: file.name, - file_size: Math.floor(26214400 / 10 * Math.random()), - id: `${i}` - })); - const { attachments } = await client.api.channels[channelId].attachments.post({ - data: { - files - } - }); - return attachments; - } - static uploadFile(data, url) { - return new Promise((resolve, reject) => { - fetch(url, { - method: "PUT", - body: data, - duplex: "half" - }).then((res) => { - if (res.ok) { - resolve(res); - } else { - reject(res); - } - }).catch(reject); - }); - } - static lazy(cb) { - let defaultValue; - return () => defaultValue ??= cb(); - } - static verifyProxyAgent(object) { - return typeof object == "object" && object.httpAgent instanceof Agent && object.httpsAgent instanceof Agent; - } - static checkUndiciProxyAgent(data) { - if (typeof data === "string") { - return { - uri: data - }; - } - if (data instanceof URL) { - return { - uri: data.toString() - }; - } - if (typeof data === "object" && typeof data.uri === "string") - return data; - return false; - } - static createPromiseInteraction(client, nonce, timeoutMs = 5000, isHandlerDeferUpdate = false, parent) { - return new Promise((resolve, reject) => { - let dataFromInteractionSuccess; - let dataFromNormalEvent; - const handler = (data) => { - if (isHandlerDeferUpdate && data.d?.nonce == nonce && data.t == "INTERACTION_SUCCESS") { - client.removeListener(Events.MESSAGE_CREATE, handler); - client.removeListener(Events.UNHANDLED_PACKET, handler); - client.removeListener(Events.INTERACTION_MODAL_CREATE, handler); - dataFromInteractionSuccess = parent; - } - if (data.nonce !== nonce) - return; - clearTimeout(timeout); - client.removeListener(Events.MESSAGE_CREATE, handler); - client.removeListener(Events.INTERACTION_MODAL_CREATE, handler); - if (isHandlerDeferUpdate) - client.removeListener(Events.UNHANDLED_PACKET, handler); - client.decrementMaxListeners(); - dataFromNormalEvent = data; - resolve(data); - }; - const timeout = setTimeout2(() => { - if (dataFromInteractionSuccess || dataFromNormalEvent) { - resolve(dataFromNormalEvent || dataFromInteractionSuccess); - return; - } - client.removeListener(Events.MESSAGE_CREATE, handler); - client.removeListener(Events.INTERACTION_MODAL_CREATE, handler); - if (isHandlerDeferUpdate) - client.removeListener(Events.UNHANDLED_PACKET, handler); - client.decrementMaxListeners(); - reject(new DiscordError("INTERACTION_FAILED")); - }, timeoutMs).unref(); - client.incrementMaxListeners(); - client.on(Events.MESSAGE_CREATE, handler); - client.on(Events.INTERACTION_MODAL_CREATE, handler); - if (isHandlerDeferUpdate) - client.on(Events.UNHANDLED_PACKET, handler); - }); - } - static clearNullOrUndefinedObject(object) { - const data = {}; - const keys = Object.keys(object); - for (const key of keys) { - const value = object[key]; - if (value === undefined || value === null || Array.isArray(value) && value.length === 0) { - continue; - } else if (!Array.isArray(value) && typeof value === "object") { - const cleanedValue = Util.clearNullOrUndefinedObject(value); - if (cleanedValue !== undefined) { - data[key] = cleanedValue; - } - } else { - data[key] = value; - } - } - return Object.keys(data).length > 0 ? data : undefined; - } - static getAllPayloadType() { - return payloadTypes; - } - static getPayloadType(codecName) { - return payloadTypes.find((p) => p.name === codecName).payload_type; - } - static getSDPCodecName(portUdpH264, portUdpH265, portUdpOpus) { - const payloadTypeH264 = Util.getPayloadType("H264"); - const payloadTypeH265 = Util.getPayloadType("H265"); - const payloadTypeOpus = Util.getPayloadType("opus"); - let sdpData = `v=0 -o=- 0 0 IN IP4 0.0.0.0 -s=- -c=IN IP4 0.0.0.0 -t=0 0 -a=tool:libavformat 61.1.100 -m=video ${portUdpH264} RTP/AVP ${payloadTypeH264} -c=IN IP4 127.0.0.1 -b=AS:1000 -a=rtpmap:${payloadTypeH264} H264/90000 -a=fmtp:${payloadTypeH264} profile-level-id=42e01f;sprop-parameter-sets=Z0IAH6tAoAt2AtwEBAaQeJEV,aM4JyA==;packetization-mode=1 -${portUdpH265 ? `m=video ${portUdpH265} RTP/AVP ${payloadTypeH265} -c=IN IP4 127.0.0.1 -b=AS:1000 -a=rtpmap:${payloadTypeH265} H265/90000` : ""} -m=audio ${portUdpOpus} RTP/AVP ${payloadTypeOpus} -c=IN IP4 127.0.0.1 -b=AS:96 -a=rtpmap:${payloadTypeOpus} opus/48000/2 -a=fmtp:${payloadTypeOpus} minptime=10;useinbandfec=1 -a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level -a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time -a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 -a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid -a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay -a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type -a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing -a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space -a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id -a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id -a=extmap:13 urn:3gpp:video-orientation -a=extmap:14 urn:ietf:params:rtp-hdrext:toffset -`; - return sdpData; - } - } - module.exports = Util; - var GuildChannel = require_GuildChannel(); -}); - -// node_modules/discord.js-selfbot-v13/src/rest/APIRequest.js -var require_APIRequest = __commonJS((exports, module) => { - var Buffer2 = import.meta.require("buffer").Buffer; - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { FormData, buildConnector, Client: Client2, ProxyAgent } = import.meta.require("undici"); - var { ciphers } = require_Constants(); - var Util = require_Util(); - var agent = null; - - class APIRequest { - constructor(rest, method, path, options) { - this.rest = rest; - this.client = rest.client; - this.method = method; - this.route = options.route; - this.options = options; - this.retries = 0; - this.fullUserAgent = this.client.options.http.headers["User-Agent"]; - this.client.options.ws.properties.browser_user_agent = this.fullUserAgent; - let queryString = ""; - if (options.query) { - const query = Object.entries(options.query).filter(([, value]) => value !== null && typeof value !== "undefined").flatMap(([key, value]) => Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]); - queryString = new URLSearchParams(query).toString(); - } - this.path = `${path}${queryString && `?${queryString}`}`; - } - make(captchaKey, captchaRqToken) { - if (!agent) { - const r_ = Util.checkUndiciProxyAgent(this.client.options.http.agent); - if (!r_) { - agent = new Client2("https://discord.com", { - connect: buildConnector({ ciphers: ciphers.join(":") }) - }); - } else { - agent = new ProxyAgent({ - ...r_, - ciphers: ciphers.join(":") - }); - } - } - const API = this.options.versioned === false ? this.client.options.http.api : `${this.client.options.http.api}/v${this.client.options.http.version}`; - const url = API + this.path; - let headers = { - accept: "*/*", - "accept-language": "en-US", - priority: "u=1, i", - referer: "https://discord.com/channels/@me", - "sec-ch-ua": '"Not:A-Brand";v="24", "Chromium";v="134"', - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": '"Windows"', - "sec-fetch-dest": "empty", - "sec-fetch-mode": "cors", - "sec-fetch-site": "same-origin", - "x-discord-locale": "en-US", - "x-discord-timezone": Intl.DateTimeFormat().resolvedOptions().timeZone, - "x-super-properties": `${Buffer2.from(JSON.stringify(this.client.options.ws.properties), "ascii").toString("base64")}`, - origin: "https://discord.com", - "x-debug-options": "bugReporterEnabled", - ...this.client.options.http.headers, - "User-Agent": this.fullUserAgent - }; - if (this.options.auth !== false) - headers.Authorization = this.rest.getAuth(); - if (this.options.reason) - headers["X-Audit-Log-Reason"] = encodeURIComponent(this.options.reason); - if (this.options.headers) - headers = Object.assign(headers, this.options.headers); - for (const [key, value] of Object.entries(headers)) { - if (value === undefined) - delete headers[key]; - } - if (this.options.webhook === true) { - headers = { - "User-Agent": this.client.options.http.headers["User-Agent"] - }; - } - if (this.options.DiscordContext) { - headers["X-Context-Properties"] = Buffer2.from(JSON.stringify(this.options.DiscordContext), "utf8").toString("base64"); - } - if (this.options.mfaToken) { - headers["X-Discord-Mfa-Authorization"] = this.options.mfaToken; - } - if (captchaKey && typeof captchaKey == "string") - headers["X-Captcha-Key"] = captchaKey; - if (captchaRqToken && typeof captchaRqToken == "string") - headers["X-Captcha-Rqtoken"] = captchaRqToken; - let body; - if (this.options.files?.length) { - body = new FormData; - for (const [index, file] of this.options.files.entries()) { - if (file?.file) { - body.set(file.key ?? `files[${index}]`, { - [Symbol.toStringTag]: "File", - name: file.name, - stream: () => file.file - }); - } - } - if (typeof this.options.data !== "undefined") { - if (this.options.dontUsePayloadJSON) { - for (const [key, value] of Object.entries(this.options.data)) - body.append(key, value); - } else { - body.append("payload_json", JSON.stringify(this.options.data)); - } - } - } else if (this.options.data != null) { - if (this.options.usePayloadJSON) { - body = new FormData; - body.append("payload_json", JSON.stringify(this.options.data)); - } else { - body = JSON.stringify(this.options.data); - headers["Content-Type"] = "application/json"; - } - } - const controller = new AbortController; - const timeout = setTimeout2(() => controller.abort(), this.client.options.restRequestTimeout).unref(); - return this.rest.fetch(url, { - method: this.method.toUpperCase(), - headers, - body, - signal: controller.signal, - redirect: "follow", - dispatcher: agent, - credentials: "include" - }).finally(() => clearTimeout(timeout)); - } - } - module.exports = APIRequest; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/APIRouter.js -var require_APIRouter = __commonJS((exports, module) => { - function buildRoute(manager) { - const route = [""]; - const handler = { - get(target, name) { - if (reflectors.includes(name)) - return () => route.join("/"); - if (methods.includes(name)) { - const routeBucket = []; - for (let i = 0;i < route.length; i++) { - if (route[i - 1] === "reactions") - break; - if (/\d{16,19}/g.test(route[i]) && !/channels|guilds/.test(route[i - 1])) - routeBucket.push(":id"); - else - routeBucket.push(route[i]); - } - return (options) => manager.request(name, route.join("/"), Object.assign({ - versioned: manager.versioned, - route: routeBucket.join("/") - }, options)); - } - route.push(name); - return new Proxy(noop, handler); - }, - apply(target, _, args) { - route.push(...args.filter((x) => x != null)); - return new Proxy(noop, handler); - } - }; - return new Proxy(noop, handler); - } - var noop = () => { - }; - var methods = ["get", "post", "delete", "patch", "put"]; - var reflectors = [ - "toString", - "valueOf", - "inspect", - "constructor", - Symbol.toPrimitive, - Symbol.for("nodejs.util.inspect.custom") - ]; - module.exports = buildRoute; -}); - -// node_modules/@sapphire/async-queue/dist/cjs/index.cjs -var require_cjs5 = __commonJS((exports) => { - var __defProp2 = Object.defineProperty; - var __defNormalProp = (obj, key, value) => (key in obj) ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; - var __name = (target, value) => __defProp2(target, "name", { value, configurable: true }); - var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - var _AsyncQueueEntry = class _AsyncQueueEntry2 { - constructor(queue) { - __publicField(this, "promise"); - __publicField(this, "resolve"); - __publicField(this, "reject"); - __publicField(this, "queue"); - __publicField(this, "signal", null); - __publicField(this, "signalListener", null); - this.queue = queue; - this.promise = new Promise((resolve, reject) => { - this.resolve = resolve; - this.reject = reject; - }); - } - setSignal(signal) { - if (signal.aborted) - return this; - this.signal = signal; - this.signalListener = () => { - const index = this.queue["promises"].indexOf(this); - if (index !== -1) - this.queue["promises"].splice(index, 1); - this.reject(new Error("Request aborted manually")); - }; - this.signal.addEventListener("abort", this.signalListener); - return this; - } - use() { - this.dispose(); - this.resolve(); - return this; - } - abort() { - this.dispose(); - this.reject(new Error("Request aborted manually")); - return this; - } - dispose() { - if (this.signal) { - this.signal.removeEventListener("abort", this.signalListener); - this.signal = null; - this.signalListener = null; - } - } - }; - __name(_AsyncQueueEntry, "AsyncQueueEntry"); - var AsyncQueueEntry = _AsyncQueueEntry; - var _AsyncQueue = class _AsyncQueue2 { - constructor() { - __publicField(this, "promises", []); - } - get remaining() { - return this.promises.length; - } - get queued() { - return this.remaining === 0 ? 0 : this.remaining - 1; - } - wait(options) { - const entry = new AsyncQueueEntry(this); - if (this.promises.length === 0) { - this.promises.push(entry); - return Promise.resolve(); - } - this.promises.push(entry); - if (options?.signal) - entry.setSignal(options.signal); - return entry.promise; - } - shift() { - if (this.promises.length === 0) - return; - if (this.promises.length === 1) { - this.promises.shift(); - return; - } - this.promises.shift(); - this.promises[0].use(); - } - abortAll() { - if (this.queued === 0) - return; - for (let i = 1;i < this.promises.length; ++i) { - this.promises[i].abort(); - } - this.promises.length = 1; - } - }; - __name(_AsyncQueue, "AsyncQueue"); - var AsyncQueue = _AsyncQueue; - exports.AsyncQueue = AsyncQueue; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/DiscordAPIError.js -var require_DiscordAPIError = __commonJS((exports, module) => { - class DiscordAPIError extends Error { - constructor(error, status, request) { - super(); - const flattened = this.constructor.flattenErrors(error.errors ?? error).join("\n"); - this.name = "DiscordAPIError"; - this.message = error.message && flattened ? `${error.message}\n${flattened}` : error.message ?? flattened; - this.method = request.method; - this.path = request.path; - this.code = error.code; - this.httpStatus = status; - this.requestData = { - json: request.options.data, - files: request.options.files ?? [], - headers: request.options.headers - }; - this.retries = request.retries; - this.captcha = error?.captcha_service ? error : null; - } - get isBlockedByCloudflare() { - return this.code === 40333; - } - static flattenErrors(obj, key = "") { - let messages = []; - for (const [k, v] of Object.entries(obj)) { - if (k === "message") - continue; - const newKey = key ? isNaN(k) ? `${key}.${k}` : `${key}[${k}]` : k; - if (v._errors) { - messages.push(`${newKey}: ${v._errors.map((e) => e.message).join(" ")}`); - } else if (v.code ?? v.message) { - messages.push(`${v.code ? `${v.code}: ` : ""}${v.message}`.trim()); - } else if (typeof v === "string") { - messages.push(v); - } else { - messages = messages.concat(this.flattenErrors(v, newKey)); - } - } - return messages; - } - } - module.exports = DiscordAPIError; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/HTTPError.js -var require_HTTPError = __commonJS((exports, module) => { - class HTTPError extends Error { - constructor(message, name, code, request) { - super(message); - this.name = name; - this.code = code ?? 500; - this.method = request.method; - this.path = request.path; - this.requestData = { - json: request.options.data, - files: request.options.files ?? [], - headers: request.options.headers - }; - } - } - module.exports = HTTPError; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/RateLimitError.js -var require_RateLimitError = __commonJS((exports, module) => { - class RateLimitError extends Error { - constructor({ timeout, limit, method, path, route, global: global2 }) { - super(`A ${global2 ? "global " : ""}rate limit was hit on route ${route}`); - this.name = "RateLimitError"; - this.timeout = timeout; - this.method = method; - this.path = path; - this.route = route; - this.global = global2; - this.limit = limit; - } - } - module.exports = RateLimitError; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/RequestHandler.js -var require_RequestHandler = __commonJS((exports, module) => { - function parseResponse(res) { - if (res.headers.get("content-type")?.startsWith("application/json")) - return res.json(); - return res.arrayBuffer(); - } - function getAPIOffset(serverDate) { - return new Date(serverDate).getTime() - Date.now(); - } - function calculateReset(reset, resetAfter, serverDate) { - if (resetAfter) { - return Date.now() + Number(resetAfter) * 1000; - } - return new Date(Number(reset) * 1000).getTime() - getAPIOffset(serverDate); - } - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { setTimeout: sleep } = import.meta.require("timers/promises"); - var { AsyncQueue } = require_cjs5(); - var DiscordAPIError = require_DiscordAPIError(); - var HTTPError = require_HTTPError(); - var RateLimitError = require_RateLimitError(); - var { - Events: { DEBUG, RATE_LIMIT, INVALID_REQUEST_WARNING, API_RESPONSE, API_REQUEST } - } = require_Constants(); - var captchaMessage = [ - "incorrect-captcha", - "response-already-used", - "captcha-required", - "invalid-input-response", - "invalid-response", - "You need to update your app", - "response-already-used-error", - "rqkey-mismatch", - "sitekey-secret-mismatch" - ]; - var invalidCount = 0; - var invalidCountResetTime = null; - - class RequestHandler { - constructor(manager) { - this.manager = manager; - this.queue = new AsyncQueue; - this.reset = -1; - this.remaining = -1; - this.limit = -1; - } - async push(request) { - await this.queue.wait(); - try { - return await this.execute(request); - } finally { - this.queue.shift(); - } - } - get globalLimited() { - return this.manager.globalRemaining <= 0 && Date.now() < this.manager.globalReset; - } - get localLimited() { - return this.remaining <= 0 && Date.now() < this.reset; - } - get limited() { - return this.globalLimited || this.localLimited; - } - get _inactive() { - return this.queue.remaining === 0 && !this.limited; - } - globalDelayFor(ms) { - return new Promise((resolve) => { - setTimeout2(() => { - this.manager.globalDelay = null; - resolve(); - }, ms).unref(); - }); - } - async onRateLimit(request, limit, timeout, isGlobal) { - const { options } = this.manager.client; - if (!options.rejectOnRateLimit) - return; - const rateLimitData = { - timeout, - limit, - method: request.method, - path: request.path, - route: request.route, - global: isGlobal - }; - const shouldThrow = typeof options.rejectOnRateLimit === "function" ? await options.rejectOnRateLimit(rateLimitData) : options.rejectOnRateLimit.some((route) => rateLimitData.route.startsWith(route.toLowerCase())); - if (shouldThrow) { - throw new RateLimitError(rateLimitData); - } - } - async execute(request, captchaKey, captchaToken) { - while (this.limited) { - const isGlobal = this.globalLimited; - let limit, timeout, delayPromise; - if (isGlobal) { - limit = this.manager.globalLimit; - timeout = this.manager.globalReset + this.manager.client.options.restTimeOffset - Date.now(); - } else { - limit = this.limit; - timeout = this.reset + this.manager.client.options.restTimeOffset - Date.now(); - } - if (this.manager.client.listenerCount(RATE_LIMIT)) { - this.manager.client.emit(RATE_LIMIT, { - timeout, - limit, - method: request.method, - path: request.path, - route: request.route, - global: isGlobal - }); - } - if (isGlobal) { - if (!this.manager.globalDelay) { - this.manager.globalDelay = this.globalDelayFor(timeout); - } - delayPromise = this.manager.globalDelay; - } else { - delayPromise = sleep(timeout); - } - await this.onRateLimit(request, limit, timeout, isGlobal); - await delayPromise; - } - if (!this.manager.globalReset || this.manager.globalReset < Date.now()) { - this.manager.globalReset = Date.now() + 1000; - this.manager.globalRemaining = this.manager.globalLimit; - } - this.manager.globalRemaining--; - if (this.manager.client.listenerCount(API_REQUEST)) { - this.manager.client.emit(API_REQUEST, { - method: request.method, - path: request.path, - route: request.route, - options: request.options, - retries: request.retries - }); - } - let res; - try { - res = await request.make(captchaKey, captchaToken); - } catch (error) { - if (request.retries === this.manager.client.options.retryLimit) { - throw new HTTPError(error.message, error.constructor.name, error.status, request); - } - request.retries++; - return this.execute(request); - } - if (this.manager.client.listenerCount(API_RESPONSE)) { - this.manager.client.emit(API_RESPONSE, { - method: request.method, - path: request.path, - route: request.route, - options: request.options, - retries: request.retries - }, res.clone()); - } - let sublimitTimeout; - if (res.headers) { - const serverDate = res.headers.get("date"); - const limit = res.headers.get("x-ratelimit-limit"); - const remaining = res.headers.get("x-ratelimit-remaining"); - const reset = res.headers.get("x-ratelimit-reset"); - const resetAfter = res.headers.get("x-ratelimit-reset-after"); - this.limit = limit ? Number(limit) : Infinity; - this.remaining = remaining ? Number(remaining) : 1; - this.reset = reset || resetAfter ? calculateReset(reset, resetAfter, serverDate) : Date.now(); - if (!resetAfter && request.route.includes("reactions")) { - this.reset = new Date(serverDate).getTime() - getAPIOffset(serverDate) + 250; - } - let retryAfter = res.headers.get("retry-after"); - retryAfter = retryAfter ? Number(retryAfter) * 1000 : -1; - if (retryAfter > 0) { - if (res.headers.get("x-ratelimit-global")) { - this.manager.globalRemaining = 0; - this.manager.globalReset = Date.now() + retryAfter; - } else if (!this.localLimited) { - sublimitTimeout = retryAfter; - } - } - } - if (res.status === 401 || res.status === 403 || res.status === 429) { - if (!invalidCountResetTime || invalidCountResetTime < Date.now()) { - invalidCountResetTime = Date.now() + 1000 * 60 * 10; - invalidCount = 0; - } - invalidCount++; - const emitInvalid = this.manager.client.listenerCount(INVALID_REQUEST_WARNING) && this.manager.client.options.invalidRequestWarningInterval > 0 && invalidCount % this.manager.client.options.invalidRequestWarningInterval === 0; - if (emitInvalid) { - this.manager.client.emit(INVALID_REQUEST_WARNING, { - count: invalidCount, - remainingTime: invalidCountResetTime - Date.now() - }); - } - } - if (res.ok) { - return parseResponse(res); - } - if (res.status >= 400 && res.status < 500) { - if (res.status === 429) { - const isGlobal = this.globalLimited; - let limit, timeout; - if (isGlobal) { - limit = this.manager.globalLimit; - timeout = this.manager.globalReset + this.manager.client.options.restTimeOffset - Date.now(); - } else { - limit = this.limit; - timeout = this.reset + this.manager.client.options.restTimeOffset - Date.now(); - } - this.manager.client.emit(DEBUG, `[Request Handler] Hit a 429 while executing a request. - Global : ${isGlobal} - Method : ${request.method} - Path : ${request.path} - Route : ${request.route} - Limit : ${limit} - Timeout : ${timeout}ms - Sublimit: ${sublimitTimeout ? `${sublimitTimeout}ms` : "None"}`); - await this.onRateLimit(request, limit, timeout, isGlobal); - if (sublimitTimeout) { - await sleep(sublimitTimeout); - } - return this.execute(request); - } - let data; - try { - data = await parseResponse(res); - if (data?.captcha_service && typeof this.manager.client.options.captchaSolver == "function" && request.retries < this.manager.client.options.captchaRetryLimit && captchaMessage.some((s) => data.captcha_key[0].includes(s))) { - this.manager.client.emit(DEBUG, `[Request Handler] Hit a captcha while executing a request (${data.captcha_key.join(", ")}) - Method : ${request.method} - Path : ${request.path} - Route : ${request.route} - Sitekey : ${data.captcha_sitekey} - rqToken : ${data.captcha_rqtoken}`); - const captcha = await this.manager.client.options.captchaSolver(data, request.fullUserAgent); - this.manager.client.emit(DEBUG, `[Request Handler] Captcha details: - Method : ${request.method} - Path : ${request.path} - Route : ${request.route} - Key : ${captcha ? `${captcha.slice(0, 120)}...` : "[Captcha not solved]"} - rqToken : ${data.captcha_rqtoken}`); - request.retries++; - return this.execute(request, captcha, data.captcha_rqtoken); - } - if (data?.code && data.code == 60003 && request.options.auth !== false && request.retries < 1) { - if (data.mfa.methods.find((o) => o.type === "totp") && typeof this.manager.client.options.TOTPKey === "string") { - const otp = this.manager.client.authenticator.generate(this.manager.client.options.TOTPKey); - this.manager.client.emit(DEBUG, `[Request Handler] ${data.message} - Method : ${request.method} - Path : ${request.path} - Route : ${request.route} - mfaCode : ${otp}`); - const mfaData = data.mfa; - const mfaPost = await this.manager.client.api.mfa.finish.post({ - data: { - ticket: mfaData.ticket, - data: otp, - mfa_type: "totp" - } - }); - request.options.mfaToken = mfaPost.token; - request.retries++; - return this.execute(request); - } - } - } catch (err) { - throw new HTTPError(err.message, err.constructor.name, err.status, request); - } - throw new DiscordAPIError(data, res.status, request); - } - if (res.status >= 500 && res.status < 600) { - if (request.retries === this.manager.client.options.retryLimit) { - throw new HTTPError(res.statusText, res.constructor.name, res.status, request); - } - request.retries++; - return this.execute(request); - } - return null; - } - } - module.exports = RequestHandler; -}); - -// node_modules/discord.js-selfbot-v13/src/rest/RESTManager.js -var require_RESTManager = __commonJS((exports, module) => { - var { setInterval: setInterval2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var makeFetchCookie = require_cjs2(); - var { CookieJar } = require_cookie2(); - var { fetch: fetchOriginal } = import.meta.require("undici"); - var APIRequest = require_APIRequest(); - var routeBuilder = require_APIRouter(); - var RequestHandler = require_RequestHandler(); - var { Error: Error2 } = require_errors(); - var { Endpoints } = require_Constants(); - - class RESTManager { - constructor(client) { - this.client = client; - this.handlers = new Collection; - this.versioned = true; - this.globalLimit = client.options.restGlobalRateLimit > 0 ? client.options.restGlobalRateLimit : Infinity; - this.globalRemaining = this.globalLimit; - this.globalReset = null; - this.globalDelay = null; - this.cookieJar = new CookieJar; - this.fetch = makeFetchCookie.default(fetchOriginal, this.cookieJar); - if (client.options.restSweepInterval > 0) { - this.sweepInterval = setInterval2(() => { - this.handlers.sweep((handler) => handler._inactive); - }, client.options.restSweepInterval * 1000).unref(); - } - } - get api() { - return routeBuilder(this); - } - getAuth() { - const token = this.client.token ?? this.client.accessToken; - if (token) - return token?.replace(/Bot /g, ""); - throw new Error2("TOKEN_MISSING"); - } - get cdn() { - return Endpoints.CDN(this.client.options.http.cdn); - } - request(method, url, options = {}) { - const apiRequest = new APIRequest(this, method, url, options); - let handler = this.handlers.get(apiRequest.route); - if (!handler) { - handler = new RequestHandler(this); - this.handlers.set(apiRequest.route, handler); - } - return handler.push(apiRequest); - } - get endpoint() { - return this.client.options.http.api; - } - set endpoint(endpoint) { - this.client.options.http.api = endpoint; - } - } - module.exports = RESTManager; -}); - -// node_modules/discord.js-selfbot-v13/src/util/Intents.js -var require_Intents = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class Intents extends BitField { - } - Intents.FLAGS = { - GUILDS: 1 << 0, - GUILD_MEMBERS: 1 << 1, - GUILD_BANS: 1 << 2, - GUILD_EMOJIS_AND_STICKERS: 1 << 3, - GUILD_INTEGRATIONS: 1 << 4, - GUILD_WEBHOOKS: 1 << 5, - GUILD_INVITES: 1 << 6, - GUILD_VOICE_STATES: 1 << 7, - GUILD_PRESENCES: 1 << 8, - GUILD_MESSAGES: 1 << 9, - GUILD_MESSAGE_REACTIONS: 1 << 10, - GUILD_MESSAGE_TYPING: 1 << 11, - DIRECT_MESSAGES: 1 << 12, - DIRECT_MESSAGE_REACTIONS: 1 << 13, - DIRECT_MESSAGE_TYPING: 1 << 14, - MESSAGE_CONTENT: 1 << 15, - GUILD_SCHEDULED_EVENTS: 1 << 16, - AUTO_MODERATION_CONFIGURATION: 1 << 20, - AUTO_MODERATION_EXECUTION: 1 << 21 - }; - Intents.ALL = Object.values(Intents.FLAGS).reduce((all, p) => all | p, 0); - module.exports = Intents; -}); - -// node_modules/discord.js-selfbot-v13/src/util/LimitedCollection.js -var require_LimitedCollection = __commonJS((exports, module) => { - var { setInterval: setInterval2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var { _cleanupSymbol } = require_Constants(); - var Sweepers = require_Sweepers(); - var { TypeError: TypeError2 } = require_DJSError(); - - class LimitedCollection extends Collection { - constructor(options = {}, iterable) { - if (typeof options !== "object" || options === null) { - throw new TypeError2("INVALID_TYPE", "options", "object", true); - } - const { maxSize = Infinity, keepOverLimit = null, sweepInterval = 0, sweepFilter = null } = options; - if (typeof maxSize !== "number") { - throw new TypeError2("INVALID_TYPE", "maxSize", "number"); - } - if (keepOverLimit !== null && typeof keepOverLimit !== "function") { - throw new TypeError2("INVALID_TYPE", "keepOverLimit", "function"); - } - if (typeof sweepInterval !== "number") { - throw new TypeError2("INVALID_TYPE", "sweepInterval", "number"); - } - if (sweepFilter !== null && typeof sweepFilter !== "function") { - throw new TypeError2("INVALID_TYPE", "sweepFilter", "function"); - } - super(iterable); - this.maxSize = maxSize; - this.keepOverLimit = keepOverLimit; - this.sweepFilter = sweepFilter; - this.interval = sweepInterval > 0 && sweepInterval !== Infinity && sweepFilter ? setInterval2(() => { - const sweepFn = this.sweepFilter(this); - if (sweepFn === null) - return; - if (typeof sweepFn !== "function") - throw new TypeError2("SWEEP_FILTER_RETURN"); - this.sweep(sweepFn); - }, sweepInterval * 1000).unref() : null; - } - set(key, value) { - if (this.maxSize === 0) - return this; - if (this.size >= this.maxSize && !this.has(key)) { - for (const [k, v] of this.entries()) { - const keep = this.keepOverLimit?.(v, k, this) ?? false; - if (!keep) { - this.delete(k); - break; - } - } - } - return super.set(key, value); - } - static filterByLifetime({ - lifetime = 14400, - getComparisonTimestamp = (e) => e?.createdTimestamp, - excludeFromSweep = () => false - } = {}) { - return Sweepers.filterByLifetime({ lifetime, getComparisonTimestamp, excludeFromSweep }); - } - [_cleanupSymbol]() { - return this.interval ? () => clearInterval(this.interval) : null; - } - static get [Symbol.species]() { - return Collection; - } - } - module.exports = LimitedCollection; -}); - -// node_modules/discord.js-selfbot-v13/src/util/Options.js -var require_Options = __commonJS((exports, module) => { - var { randomUUID } = import.meta.require("crypto"); - var { UserAgent } = require_Constants(); - var Intents = require_Intents(); - - class Options extends null { - static createDefault() { - return { - DMChannelVoiceStatusSync: 0, - captchaRetryLimit: 3, - captchaSolver: () => { - const err = new Error("CAPTCHA_SOLVER_NOT_IMPLEMENTED"); - err.cause = "You need to provide a captcha solver to use this feature\nExample: const client = new Client({ captchaSolver: yourAsyncFunction })"; - throw err; - }, - TOTPKey: null, - closeTimeout: 5000, - waitGuildTimeout: 15000, - shardCount: 1, - shards: [0], - makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings), - messageCacheLifetime: 0, - messageSweepInterval: 0, - invalidRequestWarningInterval: 0, - intents: Intents.ALL, - partials: ["USER", "CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION", "GUILD_SCHEDULED_EVENT"], - restWsBridgeTimeout: 5000, - restRequestTimeout: 15000, - restGlobalRateLimit: 0, - retryLimit: 1, - restTimeOffset: 500, - restSweepInterval: 60, - failIfNotExists: true, - presence: { status: "online", since: 0, activities: [], afk: true }, - sweepers: {}, - ws: { - capabilities: 0, - properties: { - os: "Windows", - browser: "Discord Client", - release_channel: "stable", - client_version: "1.0.9210", - os_version: "10.0.19044", - os_arch: "x64", - app_arch: "x64", - system_locale: "en-US", - has_client_mods: false, - client_launch_id: randomUUID(), - browser_user_agent: UserAgent, - browser_version: "35.3.0", - os_sdk_version: "19044", - client_build_number: 455964, - native_build_number: 69976, - client_event_source: null, - launch_signature: randomUUID(), - client_heartbeat_session_id: randomUUID(), - client_app_state: "focused" - }, - compress: false, - client_state: { - guild_versions: {} - }, - version: 9, - agent: {} - }, - http: { - agent: {}, - headers: { - "User-Agent": UserAgent - }, - version: 9, - api: "https://discord.com/api", - cdn: "https://cdn.discordapp.com", - invite: "https://discord.gg", - template: "https://discord.new", - scheduledEvent: "https://discord.com/events" - } - }; - } - static cacheWithLimits(settings = {}) { - const { Collection } = require_dist(); - const LimitedCollection = require_LimitedCollection(); - return (manager) => { - const setting = settings[manager.name]; - if (setting == null) { - return new Collection; - } - if (typeof setting === "number") { - if (setting === Infinity) { - return new Collection; - } - return new LimitedCollection({ maxSize: setting }); - } - const noSweeping = setting.sweepFilter == null || setting.sweepInterval == null || setting.sweepInterval <= 0 || setting.sweepInterval === Infinity; - const noLimit = setting.maxSize == null || setting.maxSize === Infinity; - if (noSweeping && noLimit) { - return new Collection; - } - return new LimitedCollection(setting); - }; - } - static cacheEverything() { - const { Collection } = require_dist(); - return () => new Collection; - } - static get defaultMakeCacheSettings() { - return { - MessageManager: 200, - ChannelManager: { - sweepInterval: 3600, - sweepFilter: require_Util().archivedThreadSweepFilter() - }, - GuildChannelManager: { - sweepInterval: 3600, - sweepFilter: require_Util().archivedThreadSweepFilter() - }, - ThreadManager: { - sweepInterval: 3600, - sweepFilter: require_Util().archivedThreadSweepFilter() - } - }; - } - } - Options.defaultSweeperSettings = { - threads: { - interval: 3600, - lifetime: 14400 - } - }; - module.exports = Options; -}); - -// node_modules/discord.js-selfbot-v13/src/client/BaseClient.js -var require_BaseClient = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var process2 = import.meta.require("process"); - var RESTManager = require_RESTManager(); - var Options = require_Options(); - var Util = require_Util(); - - class BaseClient extends EventEmitter { - constructor(options = {}) { - super({ captureRejections: true }); - if (options.intents) { - process2.emitWarning("Intents is not available.", "DeprecationWarning"); - } - this.options = Util.mergeDefault(Options.createDefault(), options); - this.rest = new RESTManager(this); - } - get api() { - return this.rest.api; - } - destroy() { - if (this.rest.sweepInterval) - clearInterval(this.rest.sweepInterval); - } - incrementMaxListeners() { - const maxListeners = this.getMaxListeners(); - if (maxListeners !== 0) { - this.setMaxListeners(maxListeners + 1); - } - } - decrementMaxListeners() { - const maxListeners = this.getMaxListeners(); - if (maxListeners !== 0) { - this.setMaxListeners(maxListeners - 1); - } - } - toJSON(...props) { - return Util.flatten(this, { domain: false }, ...props); - } - } - module.exports = BaseClient; -}); - -// node_modules/@otplib/plugin-crypto/index.js -var require_plugin_crypto = __commonJS((exports) => { - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; - } - Object.defineProperty(exports, "__esModule", { value: true }); - var crypto = _interopDefault(import.meta.require("crypto")); - var createDigest = (algorithm, hmacKey, counter) => { - const hmac = crypto.createHmac(algorithm, Buffer.from(hmacKey, "hex")); - const digest = hmac.update(Buffer.from(counter, "hex")).digest(); - return digest.toString("hex"); - }; - var createRandomBytes = (size, encoding) => { - return crypto.randomBytes(size).toString(encoding); - }; - exports.createDigest = createDigest; - exports.createRandomBytes = createRandomBytes; -}); - -// node_modules/thirty-two/lib/thirty-two/thirty-two.js -var require_thirty_two = __commonJS((exports) => { - function quintetCount(buff) { - var quintets = Math.floor(buff.length / 5); - return buff.length % 5 === 0 ? quintets : quintets + 1; - } - var charTable = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; - var byteTable = [ - 255, - 255, - 26, - 27, - 28, - 29, - 30, - 31, - 255, - 255, - 255, - 255, - 255, - 255, - 255, - 255, - 255, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 255, - 255, - 255, - 255, - 255, - 255, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 255, - 255, - 255, - 255, - 255 - ]; - exports.encode = function(plain) { - if (!Buffer.isBuffer(plain)) { - plain = new Buffer(plain); - } - var i = 0; - var j = 0; - var shiftIndex = 0; - var digit = 0; - var encoded = new Buffer(quintetCount(plain) * 8); - while (i < plain.length) { - var current = plain[i]; - if (shiftIndex > 3) { - digit = current & 255 >> shiftIndex; - shiftIndex = (shiftIndex + 5) % 8; - digit = digit << shiftIndex | (i + 1 < plain.length ? plain[i + 1] : 0) >> 8 - shiftIndex; - i++; - } else { - digit = current >> 8 - (shiftIndex + 5) & 31; - shiftIndex = (shiftIndex + 5) % 8; - if (shiftIndex === 0) - i++; - } - encoded[j] = charTable.charCodeAt(digit); - j++; - } - for (i = j;i < encoded.length; i++) { - encoded[i] = 61; - } - return encoded; - }; - exports.decode = function(encoded) { - var shiftIndex = 0; - var plainDigit = 0; - var plainChar; - var plainPos = 0; - if (!Buffer.isBuffer(encoded)) { - encoded = new Buffer(encoded); - } - var decoded = new Buffer(Math.ceil(encoded.length * 5 / 8)); - for (var i = 0;i < encoded.length; i++) { - if (encoded[i] === 61) { - break; - } - var encodedByte = encoded[i] - 48; - if (encodedByte < byteTable.length) { - plainDigit = byteTable[encodedByte]; - if (shiftIndex <= 3) { - shiftIndex = (shiftIndex + 5) % 8; - if (shiftIndex === 0) { - plainChar |= plainDigit; - decoded[plainPos] = plainChar; - plainPos++; - plainChar = 0; - } else { - plainChar |= 255 & plainDigit << 8 - shiftIndex; - } - } else { - shiftIndex = (shiftIndex + 5) % 8; - plainChar |= 255 & plainDigit >>> shiftIndex; - decoded[plainPos] = plainChar; - plainPos++; - plainChar = 255 & plainDigit << 8 - shiftIndex; - } - } else { - throw new Error("Invalid input - it is not base32 encoded string"); - } - } - return decoded.slice(0, plainPos); - }; -}); - -// node_modules/thirty-two/lib/thirty-two/index.js -var require_thirty_two2 = __commonJS((exports) => { - var base32 = require_thirty_two(); - exports.encode = base32.encode; - exports.decode = base32.decode; -}); - -// node_modules/@otplib/plugin-thirty-two/index.js -var require_plugin_thirty_two = __commonJS((exports) => { - function _interopDefault(ex) { - return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; - } - Object.defineProperty(exports, "__esModule", { value: true }); - var thirtyTwo = _interopDefault(require_thirty_two2()); - var keyDecoder = (encodedSecret, encoding) => { - return thirtyTwo.decode(encodedSecret).toString(encoding); - }; - var keyEncoder = (secret, encoding) => { - return thirtyTwo.encode(Buffer.from(secret, encoding).toString("ascii")).toString().replace(/=/g, ""); - }; - exports.keyDecoder = keyDecoder; - exports.keyEncoder = keyEncoder; -}); - -// node_modules/@otplib/core/index.js -var require_core = __commonJS((exports) => { - function objectValues(value) { - return Object.keys(value).map((key) => value[key]); - } - function isTokenValid(value) { - return /^(\d+)$/.test(value); - } - function padStart(value, maxLength, fillString) { - if (value.length >= maxLength) { - return value; - } - const padding = Array(maxLength + 1).join(fillString); - return `${padding}${value}`.slice(-1 * maxLength); - } - function keyuri(options) { - const tmpl = `otpauth://${options.type}/{labelPrefix}:{accountName}?secret={secret}{query}`; - const params = []; - if (STRATEGY.indexOf(options.type) < 0) { - throw new Error(`Expecting options.type to be one of ${STRATEGY.join(", ")}. Received ${options.type}.`); - } - if (options.type === "hotp") { - if (options.counter == null || typeof options.counter !== "number") { - throw new Error('Expecting options.counter to be a number when options.type is "hotp".'); - } - params.push(`&counter=${options.counter}`); - } - if (options.type === "totp" && options.step) { - params.push(`&period=${options.step}`); - } - if (options.digits) { - params.push(`&digits=${options.digits}`); - } - if (options.algorithm) { - params.push(`&algorithm=${options.algorithm.toUpperCase()}`); - } - if (options.issuer) { - params.push(`&issuer=${encodeURIComponent(options.issuer)}`); - } - return tmpl.replace("{labelPrefix}", encodeURIComponent(options.issuer || options.accountName)).replace("{accountName}", encodeURIComponent(options.accountName)).replace("{secret}", options.secret).replace("{query}", params.join("")); - } - function hotpOptionsValidator(options) { - if (typeof options.createDigest !== "function") { - throw new Error("Expecting options.createDigest to be a function."); - } - if (typeof options.createHmacKey !== "function") { - throw new Error("Expecting options.createHmacKey to be a function."); - } - if (typeof options.digits !== "number") { - throw new Error("Expecting options.digits to be a number."); - } - if (!options.algorithm || HASH_ALGORITHMS.indexOf(options.algorithm) < 0) { - throw new Error(`Expecting options.algorithm to be one of ${HASH_ALGORITHMS.join(", ")}. Received ${options.algorithm}.`); - } - if (!options.encoding || KEY_ENCODINGS.indexOf(options.encoding) < 0) { - throw new Error(`Expecting options.encoding to be one of ${KEY_ENCODINGS.join(", ")}. Received ${options.encoding}.`); - } - } - function hotpDefaultOptions() { - const options = { - algorithm: exports.HashAlgorithms.SHA1, - createHmacKey: hotpCreateHmacKey, - createDigest: createDigestPlaceholder, - digits: 6, - encoding: exports.KeyEncodings.ASCII - }; - return options; - } - function hotpOptions(opt) { - const options = { - ...hotpDefaultOptions(), - ...opt - }; - hotpOptionsValidator(options); - return Object.freeze(options); - } - function hotpCounter(counter) { - const hexCounter = counter.toString(16); - return padStart(hexCounter, 16, "0"); - } - function hotpDigestToToken(hexDigest, digits) { - const digest = Buffer.from(hexDigest, "hex"); - const offset = digest[digest.length - 1] & 15; - const binary = (digest[offset] & 127) << 24 | (digest[offset + 1] & 255) << 16 | (digest[offset + 2] & 255) << 8 | digest[offset + 3] & 255; - const token = binary % Math.pow(10, digits); - return padStart(String(token), digits, "0"); - } - function hotpDigest(secret, counter, options) { - const hexCounter = hotpCounter(counter); - const hmacKey = options.createHmacKey(options.algorithm, secret, options.encoding); - return options.createDigest(options.algorithm, hmacKey, hexCounter); - } - function hotpToken(secret, counter, options) { - const hexDigest = options.digest || hotpDigest(secret, counter, options); - return hotpDigestToToken(hexDigest, options.digits); - } - function hotpCheck(token, secret, counter, options) { - if (!isTokenValid(token)) { - return false; - } - const systemToken = hotpToken(secret, counter, options); - return token === systemToken; - } - function hotpKeyuri(accountName, issuer, secret, counter, options) { - return keyuri({ - algorithm: options.algorithm, - digits: options.digits, - type: exports.Strategy.HOTP, - accountName, - counter, - issuer, - secret - }); - } - function parseWindowBounds(win) { - if (typeof win === "number") { - return [Math.abs(win), Math.abs(win)]; - } - if (Array.isArray(win)) { - const [past, future] = win; - if (typeof past === "number" && typeof future === "number") { - return [Math.abs(past), Math.abs(future)]; - } - } - throw new Error("Expecting options.window to be an number or [number, number]."); - } - function totpOptionsValidator(options) { - hotpOptionsValidator(options); - parseWindowBounds(options.window); - if (typeof options.epoch !== "number") { - throw new Error("Expecting options.epoch to be a number."); - } - if (typeof options.step !== "number") { - throw new Error("Expecting options.step to be a number."); - } - } - function totpDefaultOptions() { - const options = { - algorithm: exports.HashAlgorithms.SHA1, - createDigest: createDigestPlaceholder, - createHmacKey: totpCreateHmacKey, - digits: 6, - encoding: exports.KeyEncodings.ASCII, - epoch: Date.now(), - step: 30, - window: 0 - }; - return options; - } - function totpOptions(opt) { - const options = { - ...totpDefaultOptions(), - ...opt - }; - totpOptionsValidator(options); - return Object.freeze(options); - } - function totpCounter(epoch, step) { - return Math.floor(epoch / step / 1000); - } - function totpToken(secret, options) { - const counter = totpCounter(options.epoch, options.step); - return hotpToken(secret, counter, options); - } - function totpEpochsInWindow(epoch, direction, deltaPerEpoch, numOfEpoches) { - const result = []; - if (numOfEpoches === 0) { - return result; - } - for (let i = 1;i <= numOfEpoches; i++) { - const delta = direction * i * deltaPerEpoch; - result.push(epoch + delta); - } - return result; - } - function totpEpochAvailable(epoch, step, win) { - const bounds = parseWindowBounds(win); - const delta = step * 1000; - return { - current: epoch, - past: totpEpochsInWindow(epoch, -1, delta, bounds[0]), - future: totpEpochsInWindow(epoch, 1, delta, bounds[1]) - }; - } - function totpCheck(token, secret, options) { - if (!isTokenValid(token)) { - return false; - } - const systemToken = totpToken(secret, options); - return token === systemToken; - } - function totpCheckByEpoch(epochs, token, secret, options) { - let position = null; - epochs.some((epoch, idx) => { - if (totpCheck(token, secret, { - ...options, - epoch - })) { - position = idx + 1; - return true; - } - return false; - }); - return position; - } - function totpCheckWithWindow(token, secret, options) { - if (totpCheck(token, secret, options)) { - return 0; - } - const epochs = totpEpochAvailable(options.epoch, options.step, options.window); - const backward = totpCheckByEpoch(epochs.past, token, secret, options); - if (backward !== null) { - return backward * -1; - } - return totpCheckByEpoch(epochs.future, token, secret, options); - } - function totpTimeUsed(epoch, step) { - return Math.floor(epoch / 1000) % step; - } - function totpTimeRemaining(epoch, step) { - return step - totpTimeUsed(epoch, step); - } - function totpKeyuri(accountName, issuer, secret, options) { - return keyuri({ - algorithm: options.algorithm, - digits: options.digits, - step: options.step, - type: exports.Strategy.TOTP, - accountName, - issuer, - secret - }); - } - function authenticatorOptionValidator(options) { - totpOptionsValidator(options); - if (typeof options.keyDecoder !== "function") { - throw new Error("Expecting options.keyDecoder to be a function."); - } - if (options.keyEncoder && typeof options.keyEncoder !== "function") { - throw new Error("Expecting options.keyEncoder to be a function."); - } - } - function authenticatorDefaultOptions() { - const options = { - algorithm: exports.HashAlgorithms.SHA1, - createDigest: createDigestPlaceholder, - createHmacKey: totpCreateHmacKey, - digits: 6, - encoding: exports.KeyEncodings.HEX, - epoch: Date.now(), - step: 30, - window: 0 - }; - return options; - } - function authenticatorOptions(opt) { - const options = { - ...authenticatorDefaultOptions(), - ...opt - }; - authenticatorOptionValidator(options); - return Object.freeze(options); - } - function authenticatorEncoder(secret, options) { - return options.keyEncoder(secret, options.encoding); - } - function authenticatorDecoder(secret, options) { - return options.keyDecoder(secret, options.encoding); - } - function authenticatorGenerateSecret(numberOfBytes, options) { - const key = options.createRandomBytes(numberOfBytes, options.encoding); - return authenticatorEncoder(key, options); - } - function authenticatorToken(secret, options) { - return totpToken(authenticatorDecoder(secret, options), options); - } - function authenticatorCheckWithWindow(token, secret, options) { - return totpCheckWithWindow(token, authenticatorDecoder(secret, options), options); - } - Object.defineProperty(exports, "__esModule", { value: true }); - (function(HashAlgorithms) { - HashAlgorithms["SHA1"] = "sha1"; - HashAlgorithms["SHA256"] = "sha256"; - HashAlgorithms["SHA512"] = "sha512"; - })(exports.HashAlgorithms || (exports.HashAlgorithms = {})); - var HASH_ALGORITHMS = objectValues(exports.HashAlgorithms); - (function(KeyEncodings) { - KeyEncodings["ASCII"] = "ascii"; - KeyEncodings["BASE64"] = "base64"; - KeyEncodings["HEX"] = "hex"; - KeyEncodings["LATIN1"] = "latin1"; - KeyEncodings["UTF8"] = "utf8"; - })(exports.KeyEncodings || (exports.KeyEncodings = {})); - var KEY_ENCODINGS = objectValues(exports.KeyEncodings); - (function(Strategy) { - Strategy["HOTP"] = "hotp"; - Strategy["TOTP"] = "totp"; - })(exports.Strategy || (exports.Strategy = {})); - var STRATEGY = objectValues(exports.Strategy); - var createDigestPlaceholder = () => { - throw new Error("Please provide an options.createDigest implementation."); - }; - - class OTP { - constructor(defaultOptions = {}) { - this._defaultOptions = Object.freeze({ - ...defaultOptions - }); - this._options = Object.freeze({}); - } - create(defaultOptions = {}) { - return new OTP(defaultOptions); - } - clone(defaultOptions = {}) { - const instance = this.create({ - ...this._defaultOptions, - ...defaultOptions - }); - instance.options = this._options; - return instance; - } - get options() { - return Object.freeze({ - ...this._defaultOptions, - ...this._options - }); - } - set options(options) { - this._options = Object.freeze({ - ...this._options, - ...options - }); - } - allOptions() { - return this.options; - } - resetOptions() { - this._options = Object.freeze({}); - } - } - var hotpCreateHmacKey = (algorithm, secret, encoding) => { - return Buffer.from(secret, encoding).toString("hex"); - }; - - class HOTP extends OTP { - create(defaultOptions = {}) { - return new HOTP(defaultOptions); - } - allOptions() { - return hotpOptions(this.options); - } - generate(secret, counter) { - return hotpToken(secret, counter, this.allOptions()); - } - check(token, secret, counter) { - return hotpCheck(token, secret, counter, this.allOptions()); - } - verify(opts) { - if (typeof opts !== "object") { - throw new Error("Expecting argument 0 of verify to be an object"); - } - return this.check(opts.token, opts.secret, opts.counter); - } - keyuri(accountName, issuer, secret, counter) { - return hotpKeyuri(accountName, issuer, secret, counter, this.allOptions()); - } - } - var totpPadSecret = (secret, encoding, minLength) => { - const currentLength = secret.length; - const hexSecret = Buffer.from(secret, encoding).toString("hex"); - if (currentLength < minLength) { - const newSecret = new Array(minLength - currentLength + 1).join(hexSecret); - return Buffer.from(newSecret, "hex").slice(0, minLength).toString("hex"); - } - return hexSecret; - }; - var totpCreateHmacKey = (algorithm, secret, encoding) => { - switch (algorithm) { - case exports.HashAlgorithms.SHA1: - return totpPadSecret(secret, encoding, 20); - case exports.HashAlgorithms.SHA256: - return totpPadSecret(secret, encoding, 32); - case exports.HashAlgorithms.SHA512: - return totpPadSecret(secret, encoding, 64); - default: - throw new Error(`Expecting algorithm to be one of ${HASH_ALGORITHMS.join(", ")}. Received ${algorithm}.`); - } - }; - - class TOTP extends HOTP { - create(defaultOptions = {}) { - return new TOTP(defaultOptions); - } - allOptions() { - return totpOptions(this.options); - } - generate(secret) { - return totpToken(secret, this.allOptions()); - } - checkDelta(token, secret) { - return totpCheckWithWindow(token, secret, this.allOptions()); - } - check(token, secret) { - const delta = this.checkDelta(token, secret); - return typeof delta === "number"; - } - verify(opts) { - if (typeof opts !== "object") { - throw new Error("Expecting argument 0 of verify to be an object"); - } - return this.check(opts.token, opts.secret); - } - timeRemaining() { - const options = this.allOptions(); - return totpTimeRemaining(options.epoch, options.step); - } - timeUsed() { - const options = this.allOptions(); - return totpTimeUsed(options.epoch, options.step); - } - keyuri(accountName, issuer, secret) { - return totpKeyuri(accountName, issuer, secret, this.allOptions()); - } - } - - class Authenticator extends TOTP { - create(defaultOptions = {}) { - return new Authenticator(defaultOptions); - } - allOptions() { - return authenticatorOptions(this.options); - } - generate(secret) { - return authenticatorToken(secret, this.allOptions()); - } - checkDelta(token, secret) { - return authenticatorCheckWithWindow(token, secret, this.allOptions()); - } - encode(secret) { - return authenticatorEncoder(secret, this.allOptions()); - } - decode(secret) { - return authenticatorDecoder(secret, this.allOptions()); - } - generateSecret(numberOfBytes = 10) { - return authenticatorGenerateSecret(numberOfBytes, this.allOptions()); - } - } - exports.Authenticator = Authenticator; - exports.HASH_ALGORITHMS = HASH_ALGORITHMS; - exports.HOTP = HOTP; - exports.KEY_ENCODINGS = KEY_ENCODINGS; - exports.OTP = OTP; - exports.STRATEGY = STRATEGY; - exports.TOTP = TOTP; - exports.authenticatorCheckWithWindow = authenticatorCheckWithWindow; - exports.authenticatorDecoder = authenticatorDecoder; - exports.authenticatorDefaultOptions = authenticatorDefaultOptions; - exports.authenticatorEncoder = authenticatorEncoder; - exports.authenticatorGenerateSecret = authenticatorGenerateSecret; - exports.authenticatorOptionValidator = authenticatorOptionValidator; - exports.authenticatorOptions = authenticatorOptions; - exports.authenticatorToken = authenticatorToken; - exports.createDigestPlaceholder = createDigestPlaceholder; - exports.hotpCheck = hotpCheck; - exports.hotpCounter = hotpCounter; - exports.hotpCreateHmacKey = hotpCreateHmacKey; - exports.hotpDefaultOptions = hotpDefaultOptions; - exports.hotpDigestToToken = hotpDigestToToken; - exports.hotpKeyuri = hotpKeyuri; - exports.hotpOptions = hotpOptions; - exports.hotpOptionsValidator = hotpOptionsValidator; - exports.hotpToken = hotpToken; - exports.isTokenValid = isTokenValid; - exports.keyuri = keyuri; - exports.objectValues = objectValues; - exports.padStart = padStart; - exports.totpCheck = totpCheck; - exports.totpCheckByEpoch = totpCheckByEpoch; - exports.totpCheckWithWindow = totpCheckWithWindow; - exports.totpCounter = totpCounter; - exports.totpCreateHmacKey = totpCreateHmacKey; - exports.totpDefaultOptions = totpDefaultOptions; - exports.totpEpochAvailable = totpEpochAvailable; - exports.totpKeyuri = totpKeyuri; - exports.totpOptions = totpOptions; - exports.totpOptionsValidator = totpOptionsValidator; - exports.totpPadSecret = totpPadSecret; - exports.totpTimeRemaining = totpTimeRemaining; - exports.totpTimeUsed = totpTimeUsed; - exports.totpToken = totpToken; -}); - -// node_modules/@otplib/preset-default/index.js -var require_preset_default = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - var pluginCrypto = require_plugin_crypto(); - var pluginThirtyTwo = require_plugin_thirty_two(); - var core = require_core(); - var hotp = new core.HOTP({ - createDigest: pluginCrypto.createDigest - }); - var totp = new core.TOTP({ - createDigest: pluginCrypto.createDigest - }); - var authenticator = new core.Authenticator({ - createDigest: pluginCrypto.createDigest, - createRandomBytes: pluginCrypto.createRandomBytes, - keyDecoder: pluginThirtyTwo.keyDecoder, - keyEncoder: pluginThirtyTwo.keyEncoder - }); - exports.authenticator = authenticator; - exports.hotp = hotp; - exports.totp = totp; -}); - -// node_modules/otplib/index.js -var require_otplib = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - var presetDefault = require_preset_default(); - Object.keys(presetDefault).forEach(function(k) { - if (k !== "default") - Object.defineProperty(exports, k, { - enumerable: true, - get: function() { - return presetDefault[k]; - } - }); - }); -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/Action.js -var require_Action = __commonJS((exports, module) => { - var { PartialTypes } = require_Constants(); - - class GenericAction { - constructor(client) { - this.client = client; - } - handle(data) { - return data; - } - getPayload(data, manager, id, partialType, cache) { - const existing = manager.cache.get(id); - if (!existing && this.client.options.partials.includes(partialType)) { - return manager._add(data, cache); - } - return existing; - } - getChannel(data) { - const payloadData = {}; - const id = data.channel_id ?? data.id; - if (!("recipients" in data)) { - const recipient = data.author ?? data.user ?? { id: data.user_id }; - if (recipient.id !== this.client.user.id) - payloadData.recipients = [recipient]; - } - if (id !== undefined) - payloadData.id = id; - return data[this.client.actions.injectedChannel] ?? this.getPayload({ ...data, ...payloadData }, this.client.channels, id, PartialTypes.CHANNEL); - } - getMessage(data, channel, cache) { - const id = data.message_id ?? data.id; - return data[this.client.actions.injectedMessage] ?? this.getPayload({ - id, - channel_id: channel.id, - guild_id: data.guild_id ?? channel.guild?.id - }, channel.messages, id, PartialTypes.MESSAGE, cache); - } - getReaction(data, message, user) { - const id = data.emoji.id ?? decodeURIComponent(data.emoji.name); - return this.getPayload({ - emoji: data.emoji, - count: message.partial ? null : 0, - me: user?.id === this.client.user.id - }, message.reactions, id, PartialTypes.REACTION); - } - getMember(data, guild) { - return this.getPayload(data, guild.members, data.user.id, PartialTypes.GUILD_MEMBER); - } - getUser(data) { - const id = data.user_id; - return data[this.client.actions.injectedUser] ?? this.getPayload({ id }, this.client.users, id, PartialTypes.USER); - } - getUserFromMember(data) { - if (data.guild_id && data.member?.user) { - const guild = this.client.guilds.cache.get(data.guild_id); - if (guild) { - return guild.members._add(data.member).user; - } else { - return this.client.users._add(data.member.user); - } - } - return this.getUser(data); - } - getScheduledEvent(data, guild) { - const id = data.guild_scheduled_event_id ?? data.id; - return this.getPayload({ id, guild_id: data.guild_id ?? guild.id }, guild.scheduledEvents, id, PartialTypes.GUILD_SCHEDULED_EVENT); - } - } - module.exports = GenericAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ApplicationCommandPermissionsUpdate.js -var require_ApplicationCommandPermissionsUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class ApplicationCommandPermissionsUpdateAction extends Action { - handle(data) { - const client = this.client; - client.emit(Events.APPLICATION_COMMAND_PERMISSIONS_UPDATE, { - permissions: data.permissions, - id: data.id, - guildId: data.guild_id, - applicationId: data.application_id - }); - } - } - module.exports = ApplicationCommandPermissionsUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/AutoModerationActionExecution.js -var require_AutoModerationActionExecution = __commonJS((exports, module) => { - var { AutoModerationRuleTriggerTypes } = require_Constants(); - - class AutoModerationActionExecution { - constructor(data, guild) { - this.guild = guild; - this.action = data.action; - this.ruleId = data.rule_id; - this.ruleTriggerType = AutoModerationRuleTriggerTypes[data.rule_trigger_type]; - this.userId = data.user_id; - this.channelId = data.channel_id ?? null; - this.messageId = data.message_id ?? null; - this.alertSystemMessageId = data.alert_system_message_id ?? null; - this.content = data.content; - this.matchedKeyword = data.matched_keyword ?? null; - this.matchedContent = data.matched_content ?? null; - } - get autoModerationRule() { - return this.guild.autoModerationRules.cache.get(this.ruleId) ?? null; - } - } - module.exports = AutoModerationActionExecution; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/AutoModerationActionExecution.js -var require_AutoModerationActionExecution2 = __commonJS((exports, module) => { - var Action = require_Action(); - var AutoModerationActionExecution = require_AutoModerationActionExecution(); - var { Events } = require_Constants(); - - class AutoModerationActionExecutionAction extends Action { - handle(data) { - const { client } = this; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - client.emit(Events.AUTO_MODERATION_ACTION_EXECUTION, new AutoModerationActionExecution(data, guild)); - } - return {}; - } - } - module.exports = AutoModerationActionExecutionAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/AutoModerationRuleCreate.js -var require_AutoModerationRuleCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class AutoModerationRuleCreateAction extends Action { - handle(data) { - const { client } = this; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const autoModerationRule = guild.autoModerationRules._add(data); - client.emit(Events.AUTO_MODERATION_RULE_CREATE, autoModerationRule); - } - return {}; - } - } - module.exports = AutoModerationRuleCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/AutoModerationRuleDelete.js -var require_AutoModerationRuleDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class AutoModerationRuleDeleteAction extends Action { - handle(data) { - const { client } = this; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const autoModerationRule = guild.autoModerationRules.cache.get(data.id); - if (autoModerationRule) { - guild.autoModerationRules.cache.delete(autoModerationRule.id); - client.emit(Events.AUTO_MODERATION_RULE_DELETE, autoModerationRule); - } - } - return {}; - } - } - module.exports = AutoModerationRuleDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/AutoModerationRuleUpdate.js -var require_AutoModerationRuleUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class AutoModerationRuleUpdateAction extends Action { - handle(data) { - const { client } = this; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const oldAutoModerationRule = guild.autoModerationRules.cache.get(data.id)?._clone() ?? null; - const newAutoModerationRule = guild.autoModerationRules._add(data); - client.emit(Events.AUTO_MODERATION_RULE_UPDATE, oldAutoModerationRule, newAutoModerationRule); - } - return {}; - } - } - module.exports = AutoModerationRuleUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ChannelCreate.js -var require_ChannelCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class ChannelCreateAction extends Action { - handle(data) { - const client = this.client; - const existing = client.channels.cache.has(data.id); - const channel = client.channels._add(data); - if (!existing && channel) { - client.emit(Events.CHANNEL_CREATE, channel); - } - return { channel }; - } - } - module.exports = ChannelCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ChannelDelete.js -var require_ChannelDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedChannels } = require_Channel(); - var DMChannel = require_DMChannel(); - var { deletedMessages } = require_Message(); - var { Events } = require_Constants(); - - class ChannelDeleteAction extends Action { - constructor(client) { - super(client); - this.deleted = new Map; - } - handle(data) { - const client = this.client; - const channel = client.channels.cache.get(data.id); - if (channel) { - client.channels._remove(channel.id); - deletedChannels.add(channel); - if (channel.messages && !(channel instanceof DMChannel)) { - for (const message of channel.messages.cache.values()) { - deletedMessages.add(message); - } - } - client.emit(Events.CHANNEL_DELETE, channel); - } - return { channel }; - } - } - module.exports = ChannelDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ChannelUpdate.js -var require_ChannelUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Channel } = require_Channel(); - var { ChannelTypes } = require_Constants(); - - class ChannelUpdateAction extends Action { - handle(data) { - const client = this.client; - let channel = client.channels.cache.get(data.id); - if (channel) { - const old = channel._update(data); - if (ChannelTypes[channel.type] !== data.type) { - const newChannel = Channel.create(this.client, data, channel.guild); - if (!newChannel) { - this.client.channels.cache.delete(channel.id); - return {}; - } - if (channel.isText() && newChannel.isText()) { - for (const [id, message] of channel.messages.cache) - newChannel.messages.cache.set(id, message); - } - channel = newChannel; - this.client.channels.cache.set(channel.id, channel); - } - return { - old, - updated: channel - }; - } else { - client.channels._add(data); - } - return {}; - } - } - module.exports = ChannelUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/ApplicationCommandPermissionsManager.js -var require_ApplicationCommandPermissionsManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var BaseManager = require_BaseManager(); - var { Error: Error2, TypeError: TypeError2 } = require_errors(); - var { ApplicationCommandPermissionTypes, APIErrors } = require_Constants(); - - class ApplicationCommandPermissionsManager extends BaseManager { - constructor(manager) { - super(manager.client); - this.manager = manager; - this.guild = manager.guild ?? null; - this.guildId = manager.guildId ?? manager.guild?.id ?? null; - this.commandId = manager.id ?? null; - } - permissionsPath(guildId, commandId) { - return this.client.api.applications(this.client.application.id).guilds(guildId).commands(commandId).permissions; - } - async fetch({ guild, command } = {}) { - const { guildId, commandId } = this._validateOptions(guild, command); - if (commandId) { - const data2 = await this.permissionsPath(guildId, commandId).get(); - return data2.permissions.map((perm) => this.constructor.transformPermissions(perm, true)); - } - const data = await this.permissionsPath(guildId).get(); - return data.reduce((coll, perm) => coll.set(perm.id, perm.permissions.map((p) => this.constructor.transformPermissions(p, true))), new Collection); - } - async set({ guild, command, permissions, fullPermissions } = {}) { - const { guildId, commandId } = this._validateOptions(guild, command); - if (commandId) { - if (!Array.isArray(permissions)) { - throw new TypeError2("INVALID_TYPE", "permissions", "Array of ApplicationCommandPermissionData", true); - } - const data2 = await this.permissionsPath(guildId, commandId).put({ - data: { permissions: permissions.map((perm) => this.constructor.transformPermissions(perm)) } - }); - return data2.permissions.map((perm) => this.constructor.transformPermissions(perm, true)); - } - if (!Array.isArray(fullPermissions)) { - throw new TypeError2("INVALID_TYPE", "fullPermissions", "Array of GuildApplicationCommandPermissionData", true); - } - const APIPermissions = []; - for (const perm of fullPermissions) { - if (!Array.isArray(perm.permissions)) - throw new TypeError2("INVALID_ELEMENT", "Array", "fullPermissions", perm); - APIPermissions.push({ - id: perm.id, - permissions: perm.permissions.map((p) => this.constructor.transformPermissions(p)) - }); - } - const data = await this.permissionsPath(guildId).put({ - data: APIPermissions - }); - return data.reduce((coll, perm) => coll.set(perm.id, perm.permissions.map((p) => this.constructor.transformPermissions(p, true))), new Collection); - } - async add({ guild, command, permissions }) { - const { guildId, commandId } = this._validateOptions(guild, command); - if (!commandId) - throw new TypeError2("INVALID_TYPE", "command", "ApplicationCommandResolvable"); - if (!Array.isArray(permissions)) { - throw new TypeError2("INVALID_TYPE", "permissions", "Array of ApplicationCommandPermissionData", true); - } - let existing = []; - try { - existing = await this.fetch({ guild: guildId, command: commandId }); - } catch (error) { - if (error.code !== APIErrors.UNKNOWN_APPLICATION_COMMAND_PERMISSIONS) - throw error; - } - const newPermissions = permissions.slice(); - for (const perm of existing) { - if (!newPermissions.some((x) => x.id === perm.id)) { - newPermissions.push(perm); - } - } - return this.set({ guild: guildId, command: commandId, permissions: newPermissions }); - } - async remove({ guild, command, users, roles }) { - const { guildId, commandId } = this._validateOptions(guild, command); - if (!commandId) - throw new TypeError2("INVALID_TYPE", "command", "ApplicationCommandResolvable"); - if (!users && !roles) - throw new TypeError2("INVALID_TYPE", "users OR roles", "Array or Resolvable", true); - let resolvedIds = []; - if (Array.isArray(users)) { - users.forEach((user) => { - const userId = this.client.users.resolveId(user); - if (!userId) - throw new TypeError2("INVALID_ELEMENT", "Array", "users", user); - resolvedIds.push(userId); - }); - } else if (users) { - const userId = this.client.users.resolveId(users); - if (!userId) { - throw new TypeError2("INVALID_TYPE", "users", "Array or UserResolvable"); - } - resolvedIds.push(userId); - } - if (Array.isArray(roles)) { - roles.forEach((role) => { - if (typeof role === "string") { - resolvedIds.push(role); - return; - } - if (!this.guild) - throw new Error2("GUILD_UNCACHED_ROLE_RESOLVE"); - const roleId = this.guild.roles.resolveId(role); - if (!roleId) - throw new TypeError2("INVALID_ELEMENT", "Array", "users", role); - resolvedIds.push(roleId); - }); - } else if (roles) { - if (typeof roles === "string") { - resolvedIds.push(roles); - } else { - if (!this.guild) - throw new Error2("GUILD_UNCACHED_ROLE_RESOLVE"); - const roleId = this.guild.roles.resolveId(roles); - if (!roleId) { - throw new TypeError2("INVALID_TYPE", "users", "Array or RoleResolvable"); - } - resolvedIds.push(roleId); - } - } - let existing = []; - try { - existing = await this.fetch({ guild: guildId, command: commandId }); - } catch (error) { - if (error.code !== APIErrors.UNKNOWN_APPLICATION_COMMAND_PERMISSIONS) - throw error; - } - const permissions = existing.filter((perm) => !resolvedIds.includes(perm.id)); - return this.set({ guild: guildId, command: commandId, permissions }); - } - async has({ guild, command, permissionId }) { - const { guildId, commandId } = this._validateOptions(guild, command); - if (!commandId) - throw new TypeError2("INVALID_TYPE", "command", "ApplicationCommandResolvable"); - if (!permissionId) - throw new TypeError2("INVALID_TYPE", "permissionId", "UserResolvable or RoleResolvable"); - let resolvedId = permissionId; - if (typeof permissionId !== "string") { - resolvedId = this.client.users.resolveId(permissionId); - if (!resolvedId) { - if (!this.guild) - throw new Error2("GUILD_UNCACHED_ROLE_RESOLVE"); - resolvedId = this.guild.roles.resolveId(permissionId); - } - if (!resolvedId) { - throw new TypeError2("INVALID_TYPE", "permissionId", "UserResolvable or RoleResolvable"); - } - } - let existing = []; - try { - existing = await this.fetch({ guild: guildId, command: commandId }); - } catch (error) { - if (error.code !== APIErrors.UNKNOWN_APPLICATION_COMMAND_PERMISSIONS) - throw error; - } - return existing.some((perm) => perm.id === resolvedId); - } - _validateOptions(guild, command) { - const guildId = this.guildId ?? this.client.guilds.resolveId(guild); - if (!guildId) - throw new Error2("GLOBAL_COMMAND_PERMISSIONS"); - let commandId = this.commandId; - if (command && !commandId) { - commandId = this.manager.resolveId?.(command); - if (!commandId && this.guild) { - commandId = this.guild.commands.resolveId(command); - } - commandId ??= this.client.application?.commands.resolveId(command); - if (!commandId) { - throw new TypeError2("INVALID_TYPE", "command", "ApplicationCommandResolvable", true); - } - } - return { guildId, commandId }; - } - static transformPermissions(permissions, received) { - return { - id: permissions.id, - permission: permissions.permission, - type: typeof permissions.type === "number" && !received ? permissions.type : ApplicationCommandPermissionTypes[permissions.type] - }; - } - } - module.exports = ApplicationCommandPermissionsManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/ApplicationCommand.js -var require_ApplicationCommand = __commonJS((exports, module) => { - var Base = require_Base(); - var ApplicationCommandPermissionsManager = require_ApplicationCommandPermissionsManager(); - var { ApplicationCommandOptionTypes, ApplicationCommandTypes, ChannelTypes } = require_Constants(); - var Permissions = require_Permissions(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class ApplicationCommand extends Base { - constructor(client, data, guild, guildId) { - super(client); - this.id = data.id; - this.applicationId = data.application_id; - this.guild = guild ?? null; - this.guildId = guild?.id ?? guildId ?? null; - this.permissions = new ApplicationCommandPermissionsManager(this); - this.type = ApplicationCommandTypes[data.type]; - this._patch(data); - } - _patch(data) { - if ("name" in data) { - this.name = data.name; - } - if ("name_localizations" in data) { - this.nameLocalizations = data.name_localizations; - } else { - this.nameLocalizations ??= null; - } - if ("name_localized" in data) { - this.nameLocalized = data.name_localized; - } else { - this.nameLocalized ??= null; - } - if ("description" in data) { - this.description = data.description; - } - if ("description_localizations" in data) { - this.descriptionLocalizations = data.description_localizations; - } else { - this.descriptionLocalizations ??= null; - } - if ("description_localized" in data) { - this.descriptionLocalized = data.description_localized; - } else { - this.descriptionLocalized ??= null; - } - if ("options" in data) { - this.options = data.options.map((o) => this.constructor.transformOption(o, true)); - } else { - this.options ??= []; - } - if ("default_permission" in data) { - this.defaultPermission = data.default_permission; - } - if ("default_member_permissions" in data) { - this.defaultMemberPermissions = data.default_member_permissions ? new Permissions(BigInt(data.default_member_permissions)).freeze() : null; - } else { - this.defaultMemberPermissions ??= null; - } - if ("dm_permission" in data) { - this.dmPermission = data.dm_permission; - } else { - this.dmPermission ??= null; - } - if ("version" in data) { - this.version = data.version; - } - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - get manager() { - return (this.guild ?? this.client.application).commands; - } - edit(data) { - return this.manager.edit(this, data, this.guildId); - } - setName(name) { - return this.edit({ name }); - } - setNameLocalizations(nameLocalizations) { - return this.edit({ nameLocalizations }); - } - setDescription(description) { - return this.edit({ description }); - } - setDescriptionLocalizations(descriptionLocalizations) { - return this.edit({ descriptionLocalizations }); - } - setDefaultPermission(defaultPermission = true) { - return this.edit({ defaultPermission }); - } - setDefaultMemberPermissions(defaultMemberPermissions) { - return this.edit({ defaultMemberPermissions }); - } - setDMPermission(dmPermission = true) { - return this.edit({ dmPermission }); - } - setOptions(options) { - return this.edit({ options }); - } - delete() { - return this.manager.delete(this, this.guildId); - } - equals(command, enforceOptionOrder = false) { - if (command.id && this.id !== command.id) - return false; - let defaultMemberPermissions = null; - let dmPermission = command.dmPermission ?? command.dm_permission; - if ("default_member_permissions" in command) { - defaultMemberPermissions = command.default_member_permissions ? new Permissions(BigInt(command.default_member_permissions)).bitfield : null; - } - if ("defaultMemberPermissions" in command) { - defaultMemberPermissions = command.defaultMemberPermissions !== null ? new Permissions(command.defaultMemberPermissions).bitfield : null; - } - const commandType = typeof command.type === "string" ? command.type : ApplicationCommandTypes[command.type]; - if (command.name !== this.name || "description" in command && command.description !== this.description || "version" in command && command.version !== this.version || "autocomplete" in command && command.autocomplete !== this.autocomplete || commandType && commandType !== this.type || defaultMemberPermissions !== (this.defaultMemberPermissions?.bitfield ?? null) || typeof dmPermission !== "undefined" && dmPermission !== this.dmPermission || (command.options?.length ?? 0) !== (this.options?.length ?? 0) || (command.defaultPermission ?? command.default_permission ?? true) !== this.defaultPermission) { - return false; - } - if (command.options) { - return this.constructor.optionsEqual(this.options, command.options, enforceOptionOrder); - } - return true; - } - static optionsEqual(existing, options, enforceOptionOrder = false) { - if (existing.length !== options.length) - return false; - if (enforceOptionOrder) { - return existing.every((option, index) => this._optionEquals(option, options[index], enforceOptionOrder)); - } - const newOptions = new Map(options.map((option) => [option.name, option])); - for (const option of existing) { - const foundOption = newOptions.get(option.name); - if (!foundOption || !this._optionEquals(option, foundOption)) - return false; - } - return true; - } - static _optionEquals(existing, option, enforceOptionOrder = false) { - const optionType = typeof option.type === "string" ? option.type : ApplicationCommandOptionTypes[option.type]; - if (option.name !== existing.name || optionType !== existing.type || option.description !== existing.description || option.autocomplete !== existing.autocomplete || (option.required ?? (["SUB_COMMAND", "SUB_COMMAND_GROUP"].includes(optionType) ? undefined : false)) !== existing.required || option.choices?.length !== existing.choices?.length || option.options?.length !== existing.options?.length || (option.channelTypes ?? option.channel_types)?.length !== existing.channelTypes?.length || (option.minValue ?? option.min_value) !== existing.minValue || (option.maxValue ?? option.max_value) !== existing.maxValue || (option.minLength ?? option.min_length) !== existing.minLength || (option.maxLength ?? option.max_length) !== existing.maxLength) { - return false; - } - if (existing.choices) { - if (enforceOptionOrder && !existing.choices.every((choice, index) => choice.name === option.choices[index].name && choice.value === option.choices[index].value)) { - return false; - } - if (!enforceOptionOrder) { - const newChoices = new Map(option.choices.map((choice) => [choice.name, choice])); - for (const choice of existing.choices) { - const foundChoice = newChoices.get(choice.name); - if (!foundChoice || foundChoice.value !== choice.value) - return false; - } - } - } - if (existing.channelTypes) { - const newTypes = (option.channelTypes ?? option.channel_types).map((type) => typeof type === "number" ? ChannelTypes[type] : type); - for (const type of existing.channelTypes) { - if (!newTypes.includes(type)) - return false; - } - } - if (existing.options) { - return this.optionsEqual(existing.options, option.options, enforceOptionOrder); - } - return true; - } - static transformOption(option, received) { - const stringType = typeof option.type === "string" ? option.type : ApplicationCommandOptionTypes[option.type]; - const channelTypesKey = received ? "channelTypes" : "channel_types"; - const minValueKey = received ? "minValue" : "min_value"; - const maxValueKey = received ? "maxValue" : "max_value"; - const minLengthKey = received ? "minLength" : "min_length"; - const maxLengthKey = received ? "maxLength" : "max_length"; - const nameLocalizationsKey = received ? "nameLocalizations" : "name_localizations"; - const nameLocalizedKey = received ? "nameLocalized" : "name_localized"; - const descriptionLocalizationsKey = received ? "descriptionLocalizations" : "description_localizations"; - const descriptionLocalizedKey = received ? "descriptionLocalized" : "description_localized"; - return { - type: typeof option.type === "number" && !received ? option.type : ApplicationCommandOptionTypes[option.type], - name: option.name, - [nameLocalizationsKey]: option.nameLocalizations ?? option.name_localizations, - [nameLocalizedKey]: option.nameLocalized ?? option.name_localized, - description: option.description, - [descriptionLocalizationsKey]: option.descriptionLocalizations ?? option.description_localizations, - [descriptionLocalizedKey]: option.descriptionLocalized ?? option.description_localized, - required: option.required ?? (stringType === "SUB_COMMAND" || stringType === "SUB_COMMAND_GROUP" ? undefined : false), - autocomplete: option.autocomplete, - choices: option.choices?.map((choice) => ({ - name: choice.name, - [nameLocalizedKey]: choice.nameLocalized ?? choice.name_localized, - [nameLocalizationsKey]: choice.nameLocalizations ?? choice.name_localizations, - value: choice.value - })), - options: option.options?.map((o) => this.transformOption(o, received)), - [channelTypesKey]: received ? option.channel_types?.map((type) => ChannelTypes[type]) : option.channelTypes?.map((type) => typeof type === "string" ? ChannelTypes[type] : type) ?? option.channel_types, - [minValueKey]: option.minValue ?? option.min_value, - [maxValueKey]: option.maxValue ?? option.max_value, - [minLengthKey]: option.minLength ?? option.min_length, - [maxLengthKey]: option.maxLength ?? option.max_length - }; - } - } - module.exports = ApplicationCommand; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/AutoModerationRule.js -var require_AutoModerationRule = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - var { - AutoModerationRuleKeywordPresetTypes, - AutoModerationRuleTriggerTypes, - AutoModerationRuleEventTypes, - AutoModerationActionTypes - } = require_Constants(); - - class AutoModerationRule extends Base { - constructor(client, data, guild) { - super(client); - this.id = data.id; - this.guild = guild; - this.creatorId = data.creator_id; - this.triggerType = AutoModerationRuleTriggerTypes[data.trigger_type]; - this._patch(data); - } - _patch(data) { - if ("name" in data) { - this.name = data.name; - } - if ("event_type" in data) { - this.eventType = AutoModerationRuleEventTypes[data.event_type]; - } - if ("trigger_metadata" in data) { - this.triggerMetadata = { - keywordFilter: data.trigger_metadata.keyword_filter ?? [], - regexPatterns: data.trigger_metadata.regex_patterns ?? [], - presets: data.trigger_metadata.presets?.map((preset) => AutoModerationRuleKeywordPresetTypes[preset]) ?? [], - allowList: data.trigger_metadata.allow_list ?? [], - mentionTotalLimit: data.trigger_metadata.mention_total_limit ?? null, - mentionRaidProtectionEnabled: data.trigger_metadata.mention_raid_protection_enabled ?? false - }; - } - if ("actions" in data) { - this.actions = data.actions.map((action) => ({ - type: AutoModerationActionTypes[action.type], - metadata: { - durationSeconds: action.metadata.duration_seconds ?? null, - channelId: action.metadata.channel_id ?? null, - customMessage: action.metadata.custom_message ?? null - } - })); - } - if ("enabled" in data) { - this.enabled = data.enabled; - } - if ("exempt_roles" in data) { - this.exemptRoles = new Collection(data.exempt_roles.map((exemptRole) => [exemptRole, this.guild.roles.cache.get(exemptRole)])); - } - if ("exempt_channels" in data) { - this.exemptChannels = new Collection(data.exempt_channels.map((exemptChannel) => [exemptChannel, this.guild.channels.cache.get(exemptChannel)])); - } - } - edit(options) { - return this.guild.autoModerationRules.edit(this.id, options); - } - delete(reason) { - return this.guild.autoModerationRules.delete(this.id, reason); - } - setName(name, reason) { - return this.edit({ name, reason }); - } - setEventType(eventType, reason) { - return this.edit({ eventType, reason }); - } - setKeywordFilter(keywordFilter, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, keywordFilter }, reason }); - } - setRegexPatterns(regexPatterns, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, regexPatterns }, reason }); - } - setPresets(presets, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, presets }, reason }); - } - setAllowList(allowList, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, allowList }, reason }); - } - setMentionTotalLimit(mentionTotalLimit, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionTotalLimit }, reason }); - } - setMentionRaidProtectionEnabled(mentionRaidProtectionEnabled, reason) { - return this.edit({ triggerMetadata: { ...this.triggerMetadata, mentionRaidProtectionEnabled }, reason }); - } - setActions(actions, reason) { - return this.edit({ actions, reason }); - } - setEnabled(enabled = true, reason) { - return this.edit({ enabled, reason }); - } - setExemptRoles(exemptRoles, reason) { - return this.edit({ exemptRoles, reason }); - } - setExemptChannels(exemptChannels, reason) { - return this.edit({ exemptChannels, reason }); - } - } - module.exports = AutoModerationRule; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Integration.js -var require_Integration = __commonJS((exports, module) => { - var Base = require_Base(); - var IntegrationApplication = require_IntegrationApplication(); - - class Integration extends Base { - constructor(client, data, guild) { - super(client); - this.guild = guild; - this.id = data.id; - this.name = data.name; - this.type = data.type; - this.enabled = data.enabled; - this.syncing = data.syncing; - this.role = this.guild.roles.cache.get(data.role_id); - if ("enable_emoticons" in data) { - this.enableEmoticons = data.enable_emoticons; - } else { - this.enableEmoticons ??= null; - } - if (data.user) { - this.user = this.client.users._add(data.user); - } else { - this.user = null; - } - this.account = data.account; - this.syncedAt = data.synced_at; - if ("subscriber_count" in data) { - this.subscriberCount = data.subscriber_count; - } else { - this.subscriberCount ??= null; - } - if ("revoked" in data) { - this.revoked = data.revoked; - } else { - this.revoked ??= null; - } - this._patch(data); - } - get roles() { - const roles = this.guild.roles.cache; - return roles.filter((role) => role.tags?.integrationId === this.id); - } - _patch(data) { - if ("expire_behavior" in data) { - this.expireBehavior = data.expire_behavior; - } - if ("expire_grace_period" in data) { - this.expireGracePeriod = data.expire_grace_period; - } - if ("application" in data) { - if (this.application) { - this.application._patch(data.application); - } else { - this.application = new IntegrationApplication(this.client, data.application); - } - } else { - this.application ??= null; - } - } - async delete(reason) { - await this.client.api.guilds(this.guild.id).integrations(this.id).delete({ reason }); - return this; - } - toJSON() { - return super.toJSON({ - role: "roleId", - guild: "guildId", - user: "userId" - }); - } - } - module.exports = Integration; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/StageInstance.js -var require_StageInstance = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var Base = require_Base(); - var { PrivacyLevels } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - var deletedStageInstances = new WeakSet; - var deprecationEmittedForDeleted = false; - - class StageInstance extends Base { - constructor(client, data) { - super(client); - this.id = data.id; - this._patch(data); - } - _patch(data) { - if ("guild_id" in data) { - this.guildId = data.guild_id; - } - if ("channel_id" in data) { - this.channelId = data.channel_id; - } - if ("topic" in data) { - this.topic = data.topic; - } - if ("privacy_level" in data) { - this.privacyLevel = PrivacyLevels[data.privacy_level]; - } - if ("discoverable_disabled" in data) { - this.discoverableDisabled = data.discoverable_disabled; - } else { - this.discoverableDisabled ??= null; - } - if ("guild_scheduled_event_id" in data) { - this.guildScheduledEventId = data.guild_scheduled_event_id; - } else { - this.guildScheduledEventId ??= null; - } - } - get channel() { - return this.client.channels.resolve(this.channelId); - } - get guildScheduledEvent() { - return this.guild?.scheduledEvents.resolve(this.guildScheduledEventId) ?? null; - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("StageInstance#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedStageInstances.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("StageInstance#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedStageInstances.add(this); - else - deletedStageInstances.delete(this); - } - get guild() { - return this.client.guilds.resolve(this.guildId); - } - edit(options) { - return this.guild.stageInstances.edit(this.channelId, options); - } - async delete() { - await this.guild.stageInstances.delete(this.channelId); - const clone = this._clone(); - deletedStageInstances.add(clone); - return clone; - } - setTopic(topic) { - return this.guild.stageInstances.edit(this.channelId, { topic }); - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - } - exports.StageInstance = StageInstance; - exports.deletedStageInstances = deletedStageInstances; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildAuditLogs.js -var require_GuildAuditLogs = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var ApplicationCommand = require_ApplicationCommand(); - var AutoModerationRule = require_AutoModerationRule(); - var { GuildScheduledEvent } = require_GuildScheduledEvent(); - var Integration = require_Integration(); - var Invite = require_Invite(); - var { StageInstance } = require_StageInstance(); - var { Sticker } = require_Sticker(); - var Webhook = require_Webhook(); - var { OverwriteTypes, PartialTypes, AutoModerationRuleTriggerTypes } = require_Constants(); - var SnowflakeUtil = require_SnowflakeUtil(); - var Util = require_Util(); - var Targets = { - ALL: "ALL", - GUILD: "GUILD", - GUILD_SCHEDULED_EVENT: "GUILD_SCHEDULED_EVENT", - CHANNEL: "CHANNEL", - USER: "USER", - ROLE: "ROLE", - INVITE: "INVITE", - WEBHOOK: "WEBHOOK", - EMOJI: "EMOJI", - MESSAGE: "MESSAGE", - INTEGRATION: "INTEGRATION", - STAGE_INSTANCE: "STAGE_INSTANCE", - STICKER: "STICKER", - THREAD: "THREAD", - APPLICATION_COMMAND: "APPLICATION_COMMAND", - AUTO_MODERATION: "AUTO_MODERATION", - SOUNDBOARD_SOUND: "SOUNDBOARD_SOUND", - GUILD_ONBOARDING_PROMPT: "GUILD_ONBOARDING_PROMPT", - GUILD_ONBOARDING: "GUILD_ONBOARDING", - UNKNOWN: "UNKNOWN" - }; - var Actions = { - ALL: null, - GUILD_UPDATE: 1, - CHANNEL_CREATE: 10, - CHANNEL_UPDATE: 11, - CHANNEL_DELETE: 12, - CHANNEL_OVERWRITE_CREATE: 13, - CHANNEL_OVERWRITE_UPDATE: 14, - CHANNEL_OVERWRITE_DELETE: 15, - MEMBER_KICK: 20, - MEMBER_PRUNE: 21, - MEMBER_BAN_ADD: 22, - MEMBER_BAN_REMOVE: 23, - MEMBER_UPDATE: 24, - MEMBER_ROLE_UPDATE: 25, - MEMBER_MOVE: 26, - MEMBER_DISCONNECT: 27, - BOT_ADD: 28, - ROLE_CREATE: 30, - ROLE_UPDATE: 31, - ROLE_DELETE: 32, - INVITE_CREATE: 40, - INVITE_UPDATE: 41, - INVITE_DELETE: 42, - WEBHOOK_CREATE: 50, - WEBHOOK_UPDATE: 51, - WEBHOOK_DELETE: 52, - EMOJI_CREATE: 60, - EMOJI_UPDATE: 61, - EMOJI_DELETE: 62, - MESSAGE_DELETE: 72, - MESSAGE_BULK_DELETE: 73, - MESSAGE_PIN: 74, - MESSAGE_UNPIN: 75, - INTEGRATION_CREATE: 80, - INTEGRATION_UPDATE: 81, - INTEGRATION_DELETE: 82, - STAGE_INSTANCE_CREATE: 83, - STAGE_INSTANCE_UPDATE: 84, - STAGE_INSTANCE_DELETE: 85, - STICKER_CREATE: 90, - STICKER_UPDATE: 91, - STICKER_DELETE: 92, - GUILD_SCHEDULED_EVENT_CREATE: 100, - GUILD_SCHEDULED_EVENT_UPDATE: 101, - GUILD_SCHEDULED_EVENT_DELETE: 102, - THREAD_CREATE: 110, - THREAD_UPDATE: 111, - THREAD_DELETE: 112, - APPLICATION_COMMAND_PERMISSION_UPDATE: 121, - AUTO_MODERATION_RULE_CREATE: 140, - AUTO_MODERATION_RULE_UPDATE: 141, - AUTO_MODERATION_RULE_DELETE: 142, - AUTO_MODERATION_BLOCK_MESSAGE: 143, - AUTO_MODERATION_FLAG_TO_CHANNEL: 144, - AUTO_MODERATION_USER_COMMUNICATION_DISABLED: 145 - }; - - class GuildAuditLogs { - constructor(guild, data) { - if (data.users) - for (const user of data.users) - guild.client.users._add(user); - if (data.threads) - for (const thread of data.threads) - guild.client.channels._add(thread, guild); - this.webhooks = new Collection; - if (data.webhooks) { - for (const hook of data.webhooks) { - this.webhooks.set(hook.id, new Webhook(guild.client, hook)); - } - } - this.integrations = new Collection; - if (data.integrations) { - for (const integration of data.integrations) { - this.integrations.set(integration.id, new Integration(guild.client, integration, guild)); - } - } - this.applicationCommands = new Collection; - if (data.application_commands) { - for (const command of data.application_commands) { - this.applicationCommands.set(command.id, new ApplicationCommand(guild.client, command, guild)); - } - } - this.autoModerationRules = data.auto_moderation_rules.reduce((autoModerationRules, autoModerationRule) => autoModerationRules.set(autoModerationRule.id, guild.autoModerationRules._add(autoModerationRule)), new Collection); - this.entries = new Collection; - for (const item of data.audit_log_entries) { - const entry = new GuildAuditLogsEntry(guild, item, this); - this.entries.set(entry.id, entry); - } - } - static async build(...args) { - const logs = new GuildAuditLogs(...args); - await Promise.all(logs.entries.map((e) => e.target)); - return logs; - } - static targetType(target) { - if (target < 10) - return Targets.GUILD; - if (target < 20) - return Targets.CHANNEL; - if (target < 30) - return Targets.USER; - if (target < 40) - return Targets.ROLE; - if (target < 50) - return Targets.INVITE; - if (target < 60) - return Targets.WEBHOOK; - if (target < 70) - return Targets.EMOJI; - if (target < 80) - return Targets.MESSAGE; - if (target < 83) - return Targets.INTEGRATION; - if (target < 86) - return Targets.STAGE_INSTANCE; - if (target < 100) - return Targets.STICKER; - if (target < 110) - return Targets.GUILD_SCHEDULED_EVENT; - if (target < 120) - return Targets.THREAD; - if (target < 130) - return Targets.APPLICATION_COMMAND; - if (target < 140) - return Targets.SOUNDBOARD_SOUND; - if (target < 143) - return Targets.AUTO_MODERATION; - if (target < 146) - return Targets.USER; - if (target >= 163 && target <= 165) - return Targets.GUILD_ONBOARDING_PROMPT; - if (target >= 160 && target < 170) - return Targets.GUILD_ONBOARDING; - return Targets.UNKNOWN; - } - static actionType(action) { - if ([ - Actions.CHANNEL_CREATE, - Actions.CHANNEL_OVERWRITE_CREATE, - Actions.MEMBER_BAN_REMOVE, - Actions.BOT_ADD, - Actions.ROLE_CREATE, - Actions.INVITE_CREATE, - Actions.WEBHOOK_CREATE, - Actions.EMOJI_CREATE, - Actions.MESSAGE_PIN, - Actions.INTEGRATION_CREATE, - Actions.STAGE_INSTANCE_CREATE, - Actions.STICKER_CREATE, - Actions.GUILD_SCHEDULED_EVENT_CREATE, - Actions.THREAD_CREATE, - Actions.AUTO_MODERATION_RULE_CREATE, - Actions.AUTO_MODERATION_BLOCK_MESSAGE - ].includes(action)) { - return "CREATE"; - } - if ([ - Actions.CHANNEL_DELETE, - Actions.CHANNEL_OVERWRITE_DELETE, - Actions.MEMBER_KICK, - Actions.MEMBER_PRUNE, - Actions.MEMBER_BAN_ADD, - Actions.MEMBER_DISCONNECT, - Actions.ROLE_DELETE, - Actions.INVITE_DELETE, - Actions.WEBHOOK_DELETE, - Actions.EMOJI_DELETE, - Actions.MESSAGE_DELETE, - Actions.MESSAGE_BULK_DELETE, - Actions.MESSAGE_UNPIN, - Actions.INTEGRATION_DELETE, - Actions.STAGE_INSTANCE_DELETE, - Actions.STICKER_DELETE, - Actions.GUILD_SCHEDULED_EVENT_DELETE, - Actions.THREAD_DELETE, - Actions.AUTO_MODERATION_RULE_DELETE - ].includes(action)) { - return "DELETE"; - } - if ([ - Actions.GUILD_UPDATE, - Actions.CHANNEL_UPDATE, - Actions.CHANNEL_OVERWRITE_UPDATE, - Actions.MEMBER_UPDATE, - Actions.MEMBER_ROLE_UPDATE, - Actions.MEMBER_MOVE, - Actions.ROLE_UPDATE, - Actions.INVITE_UPDATE, - Actions.WEBHOOK_UPDATE, - Actions.EMOJI_UPDATE, - Actions.INTEGRATION_UPDATE, - Actions.STAGE_INSTANCE_UPDATE, - Actions.STICKER_UPDATE, - Actions.GUILD_SCHEDULED_EVENT_UPDATE, - Actions.THREAD_UPDATE, - Actions.APPLICATION_COMMAND_PERMISSION_UPDATE, - Actions.AUTO_MODERATION_RULE_UPDATE - ].includes(action)) { - return "UPDATE"; - } - return "ALL"; - } - toJSON() { - return Util.flatten(this); - } - } - - class GuildAuditLogsEntry { - constructor(guild, data, logs) { - const targetType = GuildAuditLogs.targetType(data.action_type); - this.targetType = targetType; - this.actionType = GuildAuditLogs.actionType(data.action_type); - this.action = Object.keys(Actions).find((k) => Actions[k] === data.action_type); - this.reason = data.reason ?? null; - this.executorId = data.user_id; - this.executor = data.user_id ? guild.client.options.partials.includes(PartialTypes.USER) ? guild.client.users._add({ id: data.user_id }) : guild.client.users.cache.get(data.user_id) ?? null : null; - this.changes = data.changes?.map((change) => ({ - key: change.key, - ..."old_value" in change ? { old: change.old_value } : {}, - ..."new_value" in change ? { new: change.new_value } : {} - })) ?? []; - this.id = data.id; - this.extra = null; - switch (data.action_type) { - case Actions.MEMBER_PRUNE: - this.extra = { - removed: Number(data.options.members_removed), - days: Number(data.options.delete_member_days) - }; - break; - case Actions.MEMBER_MOVE: - case Actions.MESSAGE_DELETE: - this.extra = { - channel: guild.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id }, - count: Number(data.options.count) - }; - break; - case Actions.MESSAGE_PIN: - case Actions.MESSAGE_UNPIN: - this.extra = { - channel: guild.client.channels.cache.get(data.options.channel_id) ?? { id: data.options.channel_id }, - messageId: data.options.message_id - }; - break; - case Actions.MESSAGE_BULK_DELETE: - case Actions.MEMBER_DISCONNECT: - this.extra = { - count: Number(data.options.count) - }; - break; - case Actions.CHANNEL_OVERWRITE_CREATE: - case Actions.CHANNEL_OVERWRITE_UPDATE: - case Actions.CHANNEL_OVERWRITE_DELETE: - switch (Number(data.options.type)) { - case OverwriteTypes.role: - this.extra = guild.roles.cache.get(data.options.id) ?? { - id: data.options.id, - name: data.options.role_name, - type: OverwriteTypes[OverwriteTypes.role] - }; - break; - case OverwriteTypes.member: - this.extra = guild.members.cache.get(data.options.id) ?? { - id: data.options.id, - type: OverwriteTypes[OverwriteTypes.member] - }; - break; - default: - break; - } - break; - case Actions.STAGE_INSTANCE_CREATE: - case Actions.STAGE_INSTANCE_DELETE: - case Actions.STAGE_INSTANCE_UPDATE: - this.extra = { - channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id } - }; - break; - case Actions.APPLICATION_COMMAND_PERMISSION_UPDATE: - this.extra = { - applicationId: data.options.application_id - }; - break; - case Actions.AUTO_MODERATION_BLOCK_MESSAGE: - case Actions.AUTO_MODERATION_FLAG_TO_CHANNEL: - case Actions.AUTO_MODERATION_USER_COMMUNICATION_DISABLED: - this.extra = { - autoModerationRuleName: data.options.auto_moderation_rule_name, - autoModerationRuleTriggerType: AutoModerationRuleTriggerTypes[data.options.auto_moderation_rule_trigger_type], - channel: guild.client.channels.cache.get(data.options?.channel_id) ?? { id: data.options?.channel_id } - }; - break; - default: - break; - } - this.targetId = data.target_id; - this.target = null; - if (targetType === Targets.UNKNOWN) { - this.target = this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, {}); - this.target.id = data.target_id; - } else if (targetType === Targets.USER && data.target_id) { - this.target = guild.client.options.partials.includes(PartialTypes.USER) ? guild.client.users._add({ id: data.target_id }) : guild.client.users.cache.get(data.target_id) ?? null; - } else if (targetType === Targets.GUILD) { - this.target = guild.client.guilds.cache.get(data.target_id); - } else if (targetType === Targets.WEBHOOK) { - this.target = logs?.webhooks.get(data.target_id) ?? new Webhook(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { - id: data.target_id, - guild_id: guild.id - })); - } else if (targetType === Targets.INVITE) { - let change = this.changes.find((c) => c.key === "code"); - change = change.new ?? change.old; - this.target = guild.invites.cache.get(change) ?? new Invite(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { guild })); - } else if (targetType === Targets.MESSAGE) { - this.target = data.action_type === Actions.MESSAGE_BULK_DELETE ? guild.channels.cache.get(data.target_id) ?? { id: data.target_id } : guild.client.users.cache.get(data.target_id) ?? null; - } else if (targetType === Targets.INTEGRATION) { - this.target = logs?.integrations.get(data.target_id) ?? new Integration(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { id: data.target_id }), guild); - } else if (targetType === Targets.CHANNEL || targetType === Targets.THREAD) { - this.target = guild.channels.cache.get(data.target_id) ?? this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { id: data.target_id }); - } else if (targetType === Targets.STAGE_INSTANCE) { - this.target = guild.stageInstances.cache.get(data.target_id) ?? new StageInstance(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { - id: data.target_id, - channel_id: data.options?.channel_id, - guild_id: guild.id - })); - } else if (targetType === Targets.STICKER) { - this.target = guild.stickers.cache.get(data.target_id) ?? new Sticker(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { id: data.target_id })); - } else if (targetType === Targets.GUILD_SCHEDULED_EVENT) { - this.target = guild.scheduledEvents.cache.get(data.target_id) ?? new GuildScheduledEvent(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { id: data.target_id, guild_id: guild.id })); - } else if (targetType === Targets.APPLICATION_COMMAND) { - this.target = logs?.applicationCommands.get(data.target_id) ?? { id: data.target_id }; - } else if (targetType === Targets.AUTO_MODERATION) { - this.target = guild.autoModerationRules.cache.get(data.target_id) ?? new AutoModerationRule(guild.client, this.changes.reduce((o, c) => { - o[c.key] = c.new ?? c.old; - return o; - }, { id: data.target_id, guild_id: guild.id }), guild); - } else if (targetType === Targets.ROLE) { - this.target = guild.roles.cache.get(data.target_id) ?? { id: data.target_id }; - } else if (targetType === Targets.EMOJI) { - this.target = guild.emojis.cache.get(data.target_id) ?? { id: data.target_id }; - } else if (data.target_id) { - this.target = { id: data.target_id }; - } - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - toJSON() { - return Util.flatten(this, { createdTimestamp: true }); - } - } - GuildAuditLogs.Actions = Actions; - GuildAuditLogs.Targets = Targets; - GuildAuditLogs.Entry = GuildAuditLogsEntry; - module.exports = GuildAuditLogs; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildAuditLogEntryCreate.js -var require_GuildAuditLogEntryCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var GuildAuditLogsEntry = require_GuildAuditLogs().Entry; - var { Events } = require_Constants(); - - class GuildAuditLogEntryCreateAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - let auditLogEntry; - if (guild) { - auditLogEntry = new GuildAuditLogsEntry(guild, data); - client.emit(Events.GUILD_AUDIT_LOG_ENTRY_CREATE, auditLogEntry, guild); - } - return { auditLogEntry }; - } - } - module.exports = GuildAuditLogEntryCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildBanAdd.js -var require_GuildBanAdd = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildBanAdd extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) - client.emit(Events.GUILD_BAN_ADD, guild.bans._add(data)); - } - } - module.exports = GuildBanAdd; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildBan.js -var require_GuildBan = __commonJS((exports, module) => { - var Base = require_Base(); - - class GuildBan extends Base { - constructor(client, data, guild) { - super(client); - this.guild = guild; - this._patch(data); - } - _patch(data) { - if ("user" in data) { - this.user = this.client.users._add(data.user, true); - } - if ("reason" in data) { - this.reason = data.reason; - } - } - get partial() { - return !("reason" in this); - } - fetch(force = true) { - return this.guild.bans.fetch({ user: this.user, cache: true, force }); - } - } - module.exports = GuildBan; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildBanRemove.js -var require_GuildBanRemove = __commonJS((exports, module) => { - var Action = require_Action(); - var GuildBan = require_GuildBan(); - var { Events } = require_Constants(); - - class GuildBanRemove extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const ban = guild.bans.cache.get(data.user.id) ?? new GuildBan(client, data, guild); - guild.bans.cache.delete(ban.user.id); - client.emit(Events.GUILD_BAN_REMOVE, ban); - } - } - } - module.exports = GuildBanRemove; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildChannelsPositionUpdate.js -var require_GuildChannelsPositionUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - - class GuildChannelsPositionUpdate extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - for (const partialChannel of data.channels) { - const channel = guild.channels.cache.get(partialChannel.id); - if (channel) - channel.rawPosition = partialChannel.position; - } - } - return { guild }; - } - } - module.exports = GuildChannelsPositionUpdate; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildPreviewEmoji.js -var require_GuildPreviewEmoji = __commonJS((exports, module) => { - var BaseGuildEmoji = require_BaseGuildEmoji(); - - class GuildPreviewEmoji extends BaseGuildEmoji { - constructor(client, data, guild) { - super(client, data, guild); - this.roles = data.roles; - } - } - module.exports = GuildPreviewEmoji; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/GuildPreview.js -var require_GuildPreview = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Base = require_Base(); - var GuildPreviewEmoji = require_GuildPreviewEmoji(); - var { Sticker } = require_Sticker(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class GuildPreview extends Base { - constructor(client, data) { - super(client); - if (!data) - return; - this._patch(data); - } - _patch(data) { - this.id = data.id; - if ("name" in data) { - this.name = data.name; - } - if ("icon" in data) { - this.icon = data.icon; - } - if ("splash" in data) { - this.splash = data.splash; - } - if ("discovery_splash" in data) { - this.discoverySplash = data.discovery_splash; - } - if ("features" in data) { - this.features = data.features; - } - if ("approximate_member_count" in data) { - this.approximateMemberCount = data.approximate_member_count; - } - if ("approximate_presence_count" in data) { - this.approximatePresenceCount = data.approximate_presence_count; - } - if ("description" in data) { - this.description = data.description; - } else { - this.description ??= null; - } - if (!this.emojis) { - this.emojis = new Collection; - } else { - this.emojis.clear(); - } - for (const emoji of data.emojis) { - this.emojis.set(emoji.id, new GuildPreviewEmoji(this.client, emoji, this)); - } - this.stickers = data.stickers.reduce((stickers, sticker) => stickers.set(sticker.id, new Sticker(this.client, sticker)), new Collection); - } - get createdTimestamp() { - return SnowflakeUtil.timestampFrom(this.id); - } - get createdAt() { - return new Date(this.createdTimestamp); - } - splashURL({ format, size } = {}) { - return this.splash && this.client.rest.cdn.Splash(this.id, this.splash, format, size); - } - discoverySplashURL({ format, size } = {}) { - return this.discoverySplash && this.client.rest.cdn.DiscoverySplash(this.id, this.discoverySplash, format, size); - } - iconURL({ format, size, dynamic } = {}) { - return this.icon && this.client.rest.cdn.Icon(this.id, this.icon, format, size, dynamic); - } - async fetch() { - const data = await this.client.api.guilds(this.id).preview.get(); - this._patch(data); - return this; - } - toString() { - return this.name; - } - toJSON() { - const json = super.toJSON(); - json.iconURL = this.iconURL(); - json.splashURL = this.splashURL(); - return json; - } - } - module.exports = GuildPreview; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/AutoModerationRuleManager.js -var require_AutoModerationRuleManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var AutoModerationRule = require_AutoModerationRule(); - var { - AutoModerationRuleEventTypes, - AutoModerationRuleTriggerTypes, - AutoModerationActionTypes, - AutoModerationRuleKeywordPresetTypes - } = require_Constants(); - - class AutoModerationRuleManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, AutoModerationRule, iterable); - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { extras: [this.guild] }); - } - async create({ - name, - eventType, - triggerType, - triggerMetadata, - actions, - enabled, - exemptRoles, - exemptChannels, - reason - }) { - const data = await this.client.api.guilds(this.guild.id)["auto-moderation"].rules.post({ - data: { - name, - event_type: typeof eventType === "number" ? eventType : AutoModerationRuleEventTypes[eventType], - trigger_type: typeof triggerType === "number" ? triggerType : AutoModerationRuleTriggerTypes[triggerType], - trigger_metadata: triggerMetadata && { - keyword_filter: triggerMetadata.keywordFilter, - regex_patterns: triggerMetadata.regexPatterns, - presets: triggerMetadata.presets?.map((preset) => typeof preset === "number" ? preset : AutoModerationRuleKeywordPresetTypes[preset]), - allow_list: triggerMetadata.allowList, - mention_total_limit: triggerMetadata.mentionTotalLimit, - mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled - }, - actions: actions.map((action) => ({ - type: typeof action.type === "number" ? action.type : AutoModerationActionTypes[action.type], - metadata: { - duration_seconds: action.metadata?.durationSeconds, - channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), - custom_message: action.metadata?.customMessage - } - })), - enabled, - exempt_roles: exemptRoles?.map((exemptRole) => this.guild.roles.resolveId(exemptRole)), - exempt_channels: exemptChannels?.map((exemptChannel) => this.guild.channels.resolveId(exemptChannel)) - }, - reason - }); - return this._add(data); - } - async edit(autoModerationRule, { name, eventType, triggerMetadata, actions, enabled, exemptRoles, exemptChannels, reason }) { - const autoModerationRuleId = this.resolveId(autoModerationRule); - const data = await this.client.api.guilds(this.guild.id)("auto-moderation").rules(autoModerationRuleId).patch({ - data: { - name, - event_type: typeof eventType === "number" ? eventType : AutoModerationRuleEventTypes[eventType], - trigger_metadata: triggerMetadata && { - keyword_filter: triggerMetadata.keywordFilter, - regex_patterns: triggerMetadata.regexPatterns, - presets: triggerMetadata.presets?.map((preset) => typeof preset === "number" ? preset : AutoModerationRuleKeywordPresetTypes[preset]), - allow_list: triggerMetadata.allowList, - mention_total_limit: triggerMetadata.mentionTotalLimit, - mention_raid_protection_enabled: triggerMetadata.mentionRaidProtectionEnabled - }, - actions: actions?.map((action) => ({ - type: typeof action.type === "number" ? action.type : AutoModerationActionTypes[action.type], - metadata: { - duration_seconds: action.metadata?.durationSeconds, - channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel), - custom_message: action.metadata?.customMessage - } - })), - enabled, - exempt_roles: exemptRoles?.map((exemptRole) => this.guild.roles.resolveId(exemptRole)), - exempt_channels: exemptChannels?.map((exemptChannel) => this.guild.channels.resolveId(exemptChannel)) - }, - reason - }); - return this._add(data); - } - fetch(options) { - if (!options) - return this._fetchMany(); - const { autoModerationRule, cache, force } = options; - const resolvedAutoModerationRule = this.resolveId(autoModerationRule ?? options); - if (resolvedAutoModerationRule) { - return this._fetchSingle({ autoModerationRule: resolvedAutoModerationRule, cache, force }); - } - return this._fetchMany(options); - } - async _fetchSingle({ autoModerationRule, cache, force = false }) { - if (!force) { - const existing = this.cache.get(autoModerationRule); - if (existing) - return existing; - } - const data = await this.client.api.guilds(this.guild.id)("auto-moderation").rules(autoModerationRule).get(); - return this._add(data, cache); - } - async _fetchMany(options = {}) { - const data = await this.client.api.guilds(this.guild.id)("auto-moderation").rules.get(); - return data.reduce((col, autoModerationRule) => col.set(autoModerationRule.id, this._add(autoModerationRule, options.cache)), new Collection); - } - async delete(autoModerationRule, reason) { - const autoModerationRuleId = this.resolveId(autoModerationRule); - await this.client.api.guilds(this.guild.id)("auto-moderation").rules(autoModerationRuleId).delete({ reason }); - } - } - module.exports = AutoModerationRuleManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildBanManager.js -var require_GuildBanManager = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2, Error: Error2 } = require_errors(); - var GuildBan = require_GuildBan(); - var { GuildMember } = require_GuildMember(); - var deprecationEmittedForDays = false; - - class GuildBanManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, GuildBan, iterable); - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { id: data.user.id, extras: [this.guild] }); - } - resolve(ban) { - return super.resolve(ban) ?? super.resolve(this.client.users.resolveId(ban)); - } - async fetch(options) { - if (!options) - return this._fetchMany(); - const { user, cache, force, limit, before, after } = options; - const resolvedUser = this.client.users.resolveId(user ?? options); - if (resolvedUser) - return this._fetchSingle({ user: resolvedUser, cache, force }); - if (!before && !after && !limit && typeof cache === "undefined") { - throw new Error2("FETCH_BAN_RESOLVE_ID"); - } - return this._fetchMany(options); - } - async _fetchSingle({ user, cache, force = false }) { - if (!force) { - const existing = this.cache.get(user); - if (existing && !existing.partial) - return existing; - } - const data = await this.client.api.guilds(this.guild.id).bans(user).get(); - return this._add(data, cache); - } - async _fetchMany(options = {}) { - const data = await this.client.api.guilds(this.guild.id).bans.get({ - query: options - }); - return data.reduce((col, ban) => col.set(ban.user.id, this._add(ban, options.cache)), new Collection); - } - async create(user, options = {}) { - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - const id = this.client.users.resolveId(user); - if (!id) - throw new Error2("BAN_RESOLVE_ID", true); - if (typeof options.days !== "undefined" && !deprecationEmittedForDays) { - process2.emitWarning("The days option for GuildBanManager#create() is deprecated. Use the deleteMessageSeconds option instead.", "DeprecationWarning"); - deprecationEmittedForDays = true; - } - await this.client.api.guilds(this.guild.id).bans(id).put({ - data: { - delete_message_seconds: typeof options.deleteMessageSeconds !== "undefined" ? options.deleteMessageSeconds : (options.days ?? 0) * 24 * 60 * 60 - }, - reason: options.reason - }); - if (user instanceof GuildMember) - return user; - const _user = this.client.users.cache.get(id); - if (_user) { - return this.guild.members.resolve(_user) ?? _user; - } - return id; - } - async remove(user, reason) { - const id = this.client.users.resolveId(user); - if (!id) - throw new Error2("BAN_RESOLVE_ID"); - await this.client.api.guilds(this.guild.id).bans(id).delete({ reason }); - return this.client.users.resolve(user); - } - async bulkCreate(users, options = {}) { - if (!users || !(Array.isArray(users) || users instanceof Collection)) { - throw new TypeError2("INVALID_TYPE", "users", "Array or Collection of UserResolvable", true); - } - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - const userIds = users.map((user) => this.client.users.resolveId(user)); - if (userIds.length === 0) - throw new Error2("BULK_BAN_USERS_OPTION_EMPTY"); - const result = await this.client.api.guilds(this.guild.id)["bulk-ban"].post({ - data: { delete_message_days: options.deleteMessageSeconds, user_ids: userIds }, - reason: options.reason - }); - return { bannedUsers: result.banned_users, failedUsers: result.failed_users }; - } - } - module.exports = GuildBanManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildChannelManager.js -var require_GuildChannelManager = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { Error: Error2, TypeError: TypeError2 } = require_errors(); - var GuildChannel = require_GuildChannel(); - var PermissionOverwrites = require_PermissionOverwrites(); - var ThreadChannel = require_ThreadChannel(); - var Webhook = require_Webhook(); - var ChannelFlags = require_ChannelFlags(); - var { - ThreadChannelTypes, - ChannelTypes, - VideoQualityModes, - SortOrderTypes, - ForumLayoutTypes - } = require_Constants(); - var DataResolver = require_DataResolver(); - var Util = require_Util(); - var { resolveAutoArchiveMaxLimit, transformGuildForumTag, transformGuildDefaultReaction } = require_Util(); - var cacheWarningEmitted = false; - var storeChannelDeprecationEmitted = false; - - class GuildChannelManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, GuildChannel, iterable); - const defaultCaching = this._cache.constructor.name === "Collection" || (this._cache.maxSize === undefined || this._cache.maxSize === Infinity) && (this._cache.sweepFilter === undefined || this._cache.sweepFilter.isDefault); - if (!cacheWarningEmitted && !defaultCaching) { - cacheWarningEmitted = true; - process2.emitWarning(`Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, "UnsupportedCacheOverwriteWarning"); - } - this.guild = guild; - } - get channelCountWithoutThreads() { - return this.cache.reduce((acc, channel) => { - if (ThreadChannelTypes.includes(channel.type)) - return acc; - return ++acc; - }, 0); - } - _add(channel) { - const existing = this.cache.get(channel.id); - if (existing) - return existing; - this.cache.set(channel.id, channel); - return channel; - } - resolve(channel) { - if (channel instanceof ThreadChannel) - return this.cache.get(channel.id) ?? null; - return super.resolve(channel); - } - resolveId(channel) { - if (channel instanceof ThreadChannel) - return super.resolveId(channel.id); - return super.resolveId(channel); - } - async create(name, { - type, - topic, - nsfw, - bitrate, - userLimit, - parent, - permissionOverwrites, - position, - rateLimitPerUser, - rtcRegion, - videoQualityMode, - availableTags, - defaultReactionEmoji, - defaultSortOrder, - defaultForumLayout, - defaultThreadRateLimitPerUser, - reason - } = {}) { - parent &&= this.client.channels.resolveId(parent); - permissionOverwrites &&= permissionOverwrites.map((o) => PermissionOverwrites.resolve(o, this.guild)); - const intType = typeof type === "number" ? type : ChannelTypes[type] ?? ChannelTypes.GUILD_TEXT; - const videoMode = typeof videoQualityMode === "number" ? videoQualityMode : VideoQualityModes[videoQualityMode]; - const sortMode = typeof defaultSortOrder === "number" ? defaultSortOrder : SortOrderTypes[defaultSortOrder]; - const layoutMode = typeof defaultForumLayout === "number" ? defaultForumLayout : ForumLayoutTypes[defaultForumLayout]; - if (intType === ChannelTypes.GUILD_STORE && !storeChannelDeprecationEmitted) { - storeChannelDeprecationEmitted = true; - process2.emitWarning("Creating store channels is deprecated by Discord and will stop working in March 2022. Check the docs for more info.", "DeprecationWarning"); - } - const data = await this.client.api.guilds(this.guild.id).channels.post({ - data: { - name, - topic, - type: intType, - nsfw, - bitrate, - user_limit: userLimit, - parent_id: parent, - position, - permission_overwrites: permissionOverwrites, - rate_limit_per_user: rateLimitPerUser, - rtc_region: rtcRegion, - video_quality_mode: videoMode, - available_tags: availableTags?.map((availableTag) => transformGuildForumTag(availableTag)), - default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji), - default_sort_order: sortMode, - default_forum_layout: layoutMode, - default_thread_rate_limit_per_user: defaultThreadRateLimitPerUser - }, - reason - }); - return this.client.actions.ChannelCreate.handle(data).channel; - } - async createWebhook(channel, name, { avatar, reason } = {}) { - const id = this.resolveId(channel); - if (!id) - throw new TypeError2("INVALID_TYPE", "channel", "GuildChannelResolvable"); - const resolvedImage = await DataResolver.resolveImage(avatar); - const data = await this.client.api.channels[id].webhooks.post({ - data: { - name, - avatar: resolvedImage - }, - reason - }); - return new Webhook(this.client, data); - } - async addFollower(channel, targetChannel, reason) { - const channelId = this.resolveId(channel); - const targetChannelId = this.resolveId(targetChannel); - if (!channelId || !targetChannelId) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - const { webhook_id } = await this.client.api.channels[channelId].followers.post({ - data: { webhook_channel_id: targetChannelId }, - reason - }); - return webhook_id; - } - async edit(channel, data, reason) { - channel = this.resolve(channel); - if (!channel) - throw new TypeError2("INVALID_TYPE", "channel", "GuildChannelResolvable"); - const parentId = data.parent && this.client.channels.resolveId(data.parent); - if (typeof data.position !== "undefined") - await this.setPosition(channel, data.position, { reason }); - let permission_overwrites = data.permissionOverwrites?.map((o) => PermissionOverwrites.resolve(o, this.guild)); - if (data.lockPermissions) { - if (parentId) { - const newParent = this.cache.get(parentId); - if (newParent?.type === "GUILD_CATEGORY") { - permission_overwrites = newParent.permissionOverwrites.cache.map((o) => PermissionOverwrites.resolve(o, this.guild)); - } - } else if (channel.parent) { - permission_overwrites = channel.parent.permissionOverwrites.cache.map((o) => PermissionOverwrites.resolve(o, this.guild)); - } - } - let defaultAutoArchiveDuration = data.defaultAutoArchiveDuration; - if (defaultAutoArchiveDuration === "MAX") - defaultAutoArchiveDuration = resolveAutoArchiveMaxLimit(this.guild); - const newData = await this.client.api.channels(channel.id).patch({ - data: { - name: (data.name ?? channel.name).trim(), - type: data.type, - topic: data.topic, - nsfw: data.nsfw, - bitrate: data.bitrate ?? channel.bitrate, - user_limit: data.userLimit ?? channel.userLimit, - rtc_region: "rtcRegion" in data ? data.rtcRegion : channel.rtcRegion, - video_quality_mode: typeof data.videoQualityMode === "string" ? VideoQualityModes[data.videoQualityMode] : data.videoQualityMode, - parent_id: parentId, - lock_permissions: data.lockPermissions, - rate_limit_per_user: data.rateLimitPerUser, - default_auto_archive_duration: defaultAutoArchiveDuration, - permission_overwrites, - available_tags: data.availableTags?.map((availableTag) => transformGuildForumTag(availableTag)), - default_reaction_emoji: data.defaultReactionEmoji && transformGuildDefaultReaction(data.defaultReactionEmoji), - default_thread_rate_limit_per_user: data.defaultThreadRateLimitPerUser, - flags: "flags" in data ? ChannelFlags.resolve(data.flags) : undefined, - default_sort_order: typeof data.defaultSortOrder === "string" ? SortOrderTypes[data.defaultSortOrder] : data.defaultSortOrder - }, - reason - }); - return this.client.actions.ChannelUpdate.handle(newData).updated; - } - async setPosition(channel, position, { relative, reason } = {}) { - channel = this.resolve(channel); - if (!channel) - throw new TypeError2("INVALID_TYPE", "channel", "GuildChannelResolvable"); - const updatedChannels = await Util.setPosition(channel, position, relative, this.guild._sortedChannels(channel), this.client.api.guilds(this.guild.id).channels, reason); - this.client.actions.GuildChannelsPositionUpdate.handle({ - guild_id: this.guild.id, - channels: updatedChannels - }); - return channel; - } - async fetch(id, { cache = true, force = false } = {}) { - if (id && !force) { - const existing = this.cache.get(id); - if (existing) - return existing; - } - if (id) { - const data2 = await this.client.api.channels(id).get(); - if (this.guild.id !== data2.guild_id) - throw new Error2("GUILD_CHANNEL_UNOWNED"); - return this.client.channels._add(data2, this.guild, { cache }); - } - const data = await this.client.api.guilds(this.guild.id).channels.get(); - const channels = new Collection; - for (const channel of data) - channels.set(channel.id, this.client.channels._add(channel, this.guild, { cache })); - return channels; - } - async fetchWebhooks(channel) { - const id = this.resolveId(channel); - if (!id) - throw new TypeError2("INVALID_TYPE", "channel", "GuildChannelResolvable"); - const data = await this.client.api.channels[id].webhooks.get(); - return data.reduce((hooks, hook) => hooks.set(hook.id, new Webhook(this.client, hook)), new Collection); - } - async setPositions(channelPositions) { - channelPositions = channelPositions.map((r) => ({ - id: this.client.channels.resolveId(r.channel), - position: r.position, - lock_permissions: r.lockPermissions, - parent_id: typeof r.parent !== "undefined" ? this.resolveId(r.parent) : undefined - })); - await this.client.api.guilds(this.guild.id).channels.patch({ data: channelPositions }); - return this.client.actions.GuildChannelsPositionUpdate.handle({ - guild_id: this.guild.id, - channels: channelPositions - }).guild; - } - async delete(channel, reason) { - const id = this.resolveId(channel); - if (!id) - throw new TypeError2("INVALID_TYPE", "channel", "GuildChannelResolvable"); - await this.client.api.channels(id).delete({ reason }); - } - } - module.exports = GuildChannelManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/BaseGuildEmojiManager.js -var require_BaseGuildEmojiManager = __commonJS((exports, module) => { - var CachedManager = require_CachedManager(); - var GuildEmoji = require_GuildEmoji(); - var ReactionEmoji = require_ReactionEmoji(); - var { parseEmoji } = require_Util(); - - class BaseGuildEmojiManager extends CachedManager { - constructor(client, iterable) { - super(client, GuildEmoji, iterable); - } - resolve(emoji) { - if (emoji instanceof ReactionEmoji) - return this.cache.get(emoji.id) ?? null; - return super.resolve(emoji); - } - resolveId(emoji) { - if (emoji instanceof ReactionEmoji) - return emoji.id; - return super.resolveId(emoji); - } - resolveIdentifier(emoji) { - const emojiResolvable = this.resolve(emoji); - if (emojiResolvable) - return emojiResolvable.identifier; - if (emoji instanceof ReactionEmoji) - return emoji.identifier; - if (typeof emoji === "string") { - const res = parseEmoji(emoji); - if (res?.name.length) { - emoji = `${res.animated ? "a:" : ""}${res.name}${res.id ? `:${res.id}` : ""}`; - } - if (!emoji.includes("%")) - return encodeURIComponent(emoji); - return emoji; - } - return null; - } - } - module.exports = BaseGuildEmojiManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildEmojiManager.js -var require_GuildEmojiManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var BaseGuildEmojiManager = require_BaseGuildEmojiManager(); - var { Error: Error2, TypeError: TypeError2 } = require_errors(); - var DataResolver = require_DataResolver(); - var Permissions = require_Permissions(); - - class GuildEmojiManager extends BaseGuildEmojiManager { - constructor(guild, iterable) { - super(guild.client, iterable); - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { extras: [this.guild] }); - } - async create(attachment, name, { roles, reason } = {}) { - attachment = await DataResolver.resolveImage(attachment); - if (!attachment) - throw new TypeError2("REQ_RESOURCE_TYPE"); - const data = { image: attachment, name }; - if (roles) { - if (!Array.isArray(roles) && !(roles instanceof Collection)) { - throw new TypeError2("INVALID_TYPE", "options.roles", "Array or Collection of Roles or Snowflakes", true); - } - data.roles = []; - for (const role of roles.values()) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "options.roles", role); - data.roles.push(resolvedRole); - } - } - const emoji = await this.client.api.guilds(this.guild.id).emojis.post({ data, reason }); - return this.client.actions.GuildEmojiCreate.handle(this.guild, emoji).emoji; - } - async fetch(id, { cache = true, force = false } = {}) { - if (id) { - if (!force) { - const existing = this.cache.get(id); - if (existing) - return existing; - } - const emoji = await this.client.api.guilds(this.guild.id).emojis(id).get(); - return this._add(emoji, cache); - } - const data = await this.client.api.guilds(this.guild.id).emojis.get(); - const emojis = new Collection; - for (const emoji of data) - emojis.set(emoji.id, this._add(emoji, cache)); - return emojis; - } - async delete(emoji, reason) { - const id = this.resolveId(emoji); - if (!id) - throw new TypeError2("INVALID_TYPE", "emoji", "EmojiResolvable", true); - await this.client.api.guilds(this.guild.id).emojis(id).delete({ reason }); - } - async edit(emoji, data, reason) { - const id = this.resolveId(emoji); - if (!id) - throw new TypeError2("INVALID_TYPE", "emoji", "EmojiResolvable", true); - const roles = data.roles?.map((r) => this.guild.roles.resolveId(r)); - const newData = await this.client.api.guilds(this.guild.id).emojis(id).patch({ - data: { - name: data.name, - roles - }, - reason - }); - const existing = this.cache.get(id); - if (existing) { - const clone = existing._clone(); - clone._patch(newData); - return clone; - } - return this._add(newData); - } - async fetchAuthor(emoji) { - emoji = this.resolve(emoji); - if (!emoji) - throw new TypeError2("INVALID_TYPE", "emoji", "EmojiResolvable", true); - if (emoji.managed) { - throw new Error2("EMOJI_MANAGED"); - } - const { me } = this.guild.members; - if (!me) - throw new Error2("GUILD_UNCACHED_ME"); - if (!me.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS_AND_STICKERS)) { - throw new Error2("MISSING_MANAGE_EMOJIS_AND_STICKERS_PERMISSION", this.guild); - } - const data = await this.client.api.guilds(this.guild.id).emojis(emoji.id).get(); - emoji._patch(data); - return emoji.author; - } - } - module.exports = GuildEmojiManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildInviteManager.js -var require_GuildInviteManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { Error: Error2 } = require_errors(); - var Invite = require_Invite(); - var DataResolver = require_DataResolver(); - - class GuildInviteManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, Invite, iterable); - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { id: data.code, extras: [this.guild] }); - } - async fetch(options) { - if (!options) - return this._fetchMany(); - if (typeof options === "string") { - const code = DataResolver.resolveInviteCode(options); - if (!code) - throw new Error2("INVITE_RESOLVE_CODE"); - return this._fetchSingle({ code, cache: true }); - } - if (!options.code) { - if (options.channelId) { - const id = this.guild.channels.resolveId(options.channelId); - if (!id) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - return this._fetchChannelMany(id, options.cache); - } - if ("cache" in options) - return this._fetchMany(options.cache); - throw new Error2("INVITE_RESOLVE_CODE"); - } - return this._fetchSingle({ - ...options, - code: DataResolver.resolveInviteCode(options.code) - }); - } - async _fetchSingle({ code, cache, force = false }) { - if (!force) { - const existing = this.cache.get(code); - if (existing) - return existing; - } - const invites = await this._fetchMany(cache); - const invite = invites.get(code); - if (!invite) - throw new Error2("INVITE_NOT_FOUND"); - return invite; - } - async _fetchMany(cache) { - const data = await this.client.api.guilds(this.guild.id).invites.get(); - return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection); - } - async _fetchChannelMany(channelId, cache) { - const data = await this.client.api.channels(channelId).invites.get(); - return data.reduce((col, invite) => col.set(invite.code, this._add(invite, cache)), new Collection); - } - async create(channel, { temporary = false, maxAge = 86400, maxUses = 0, unique, targetUser, targetApplication, targetType, reason } = {}) { - const id = this.guild.channels.resolveId(channel); - if (!id) - throw new Error2("GUILD_CHANNEL_RESOLVE"); - const invite = await this.client.api.channels(id).invites.post({ - data: { - temporary, - max_age: maxAge, - max_uses: maxUses, - unique, - target_user_id: this.client.users.resolveId(targetUser), - target_application_id: targetApplication?.id ?? targetApplication?.applicationId ?? targetApplication, - target_type: targetType - }, - reason - }); - return new Invite(this.client, invite); - } - async delete(invite, reason) { - const code = DataResolver.resolveInviteCode(invite); - await this.client.api.invites(code).delete({ reason }); - } - } - module.exports = GuildInviteManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildMemberManager.js -var require_GuildMemberManager = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { Error: Error2, TypeError: TypeError2, RangeError: RangeError2 } = require_errors(); - var BaseGuildVoiceChannel = require_BaseGuildVoiceChannel(); - var { GuildMember } = require_GuildMember(); - var { Role } = require_Role(); - var { Events, Opcodes } = require_Constants(); - var { PartialTypes } = require_Constants(); - var DataResolver = require_DataResolver(); - var GuildMemberFlags = require_GuildMemberFlags(); - var SnowflakeUtil = require_SnowflakeUtil(); - - class GuildMemberManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, GuildMember, iterable); - this.guild = guild; - } - _add(data, cache = true) { - return super._add(data, cache, { id: data.user.id, extras: [this.guild] }); - } - resolve(member) { - const memberResolvable = super.resolve(member); - if (memberResolvable) - return memberResolvable; - const userId = this.client.users.resolveId(member); - if (userId) - return this.cache.get(userId) ?? null; - return null; - } - resolveId(member) { - const memberResolvable = super.resolveId(member); - if (memberResolvable) - return memberResolvable; - const userId = this.client.users.resolveId(member); - return this.cache.has(userId) ? userId : null; - } - async add(user, options) { - const userId = this.client.users.resolveId(user); - if (!userId) - throw new TypeError2("INVALID_TYPE", "user", "UserResolvable"); - if (!options.force) { - const cachedUser = this.cache.get(userId); - if (cachedUser) - return cachedUser; - } - const resolvedOptions = { - access_token: options.accessToken, - nick: options.nick, - mute: options.mute, - deaf: options.deaf - }; - if (options.roles) { - if (!Array.isArray(options.roles) && !(options.roles instanceof Collection)) { - throw new TypeError2("INVALID_TYPE", "options.roles", "Array or Collection of Roles or Snowflakes", true); - } - const resolvedRoles = []; - for (const role of options.roles.values()) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) - throw new TypeError2("INVALID_ELEMENT", "Array or Collection", "options.roles", role); - resolvedRoles.push(resolvedRole); - } - resolvedOptions.roles = resolvedRoles; - } - const data = await this.client.api.guilds(this.guild.id).members(userId).put({ data: resolvedOptions }); - return data instanceof Buffer2 ? options.fetchWhenExisting === false ? null : this.fetch(userId) : this._add(data); - } - get me() { - return this.cache.get(this.client.user.id) ?? (this.client.options.partials.includes(PartialTypes.GUILD_MEMBER) ? this._add({ user: { id: this.client.user.id } }, true) : null); - } - fetch(options) { - if (!options) { - if (this.me.permissions.has("KICK_MEMBERS") || this.me.permissions.has("BAN_MEMBERS") || this.me.permissions.has("MANAGE_ROLES")) { - return this._fetchMany(); - } else { - return this.fetchByMemberSafety(); - } - } - const user = this.client.users.resolveId(options); - if (user) - return this._fetchSingle({ user, cache: true }); - if (options.user) { - if (Array.isArray(options.user)) { - options.user = options.user.map((u) => this.client.users.resolveId(u)); - return this._fetchMany(options); - } else { - options.user = this.client.users.resolveId(options.user); - } - if (!options.limit && !options.withPresences) - return this._fetchSingle(options); - } - return this._fetchMany(options); - } - fetchMe(options) { - return this.fetch({ ...options, user: this.client.user.id }); - } - async search({ query, limit = 1, cache = true } = {}) { - const data = await this.client.api.guilds(this.guild.id).members.search.get({ query: { query, limit } }); - return data.reduce((col, member) => col.set(member.user.id, this._add(member, cache)), new Collection); - } - async edit(user, data, reason) { - const id = this.client.users.resolveId(user); - if (!id) - throw new TypeError2("INVALID_TYPE", "user", "UserResolvable"); - const _data = { ...data }; - if (_data.channel) { - _data.channel = this.guild.channels.resolve(_data.channel); - if (!(_data.channel instanceof BaseGuildVoiceChannel)) { - throw new Error2("GUILD_VOICE_CHANNEL_RESOLVE"); - } - _data.channel_id = _data.channel.id; - _data.channel = undefined; - } else if (_data.channel === null) { - _data.channel_id = null; - _data.channel = undefined; - } - _data.roles &&= _data.roles.map((role) => role instanceof Role ? role.id : role); - _data.communication_disabled_until = _data.communicationDisabledUntil && new Date(_data.communicationDisabledUntil).toISOString(); - _data.flags = _data.flags && GuildMemberFlags.resolve(_data.flags); - if (typeof _data.avatar !== "undefined") { - _data.avatar = await DataResolver.resolveImage(_data.avatar); - } - if (typeof _data.banner !== "undefined") { - _data.banner = await DataResolver.resolveImage(_data.banner); - } - let endpoint = this.client.api.guilds(this.guild.id); - if (id === this.client.user.id) { - const keys = Object.keys(data); - if (keys.length === 1 && ["nick", "avatar", "banner", "bio"].includes(keys[0])) { - endpoint = endpoint.members("@me"); - } else { - endpoint = endpoint.members(id); - } - } else { - endpoint = endpoint.members(id); - } - const d = await endpoint.patch({ data: _data, reason }); - const clone = this.cache.get(id)?._clone(); - clone?._patch(d); - return clone ?? this._add(d, false); - } - async prune({ days = 7, dry = false, count: compute_prune_count = true, roles = [], reason } = {}) { - if (typeof days !== "number") - throw new TypeError2("PRUNE_DAYS_TYPE"); - const query = { days }; - const resolvedRoles = []; - for (const role of roles) { - const resolvedRole = this.guild.roles.resolveId(role); - if (!resolvedRole) { - throw new TypeError2("INVALID_ELEMENT", "Array", "options.roles", role); - } - resolvedRoles.push(resolvedRole); - } - if (resolvedRoles.length) { - query.include_roles = dry ? resolvedRoles.join(",") : resolvedRoles; - } - const endpoint = this.client.api.guilds(this.guild.id).prune; - const { pruned } = await (dry ? endpoint.get({ query, reason }) : endpoint.post({ data: { ...query, compute_prune_count }, reason })); - return pruned; - } - async kick(user, reason) { - const id = this.client.users.resolveId(user); - if (!id) - throw new TypeError2("INVALID_TYPE", "user", "UserResolvable"); - await this.client.api.guilds(this.guild.id).members(id).delete({ reason }); - return this.resolve(user) ?? this.client.users.resolve(user) ?? id; - } - ban(user, options) { - return this.guild.bans.create(user, options); - } - unban(user, reason) { - return this.guild.bans.remove(user, reason); - } - async _fetchSingle({ user, cache, force = false }) { - if (!force) { - const existing = this.cache.get(user); - if (existing && !existing.partial) - return existing; - } - const data = await this.client.api.guilds(this.guild.id).members(user).get(); - return this._add(data, cache); - } - async addRole(user, role, reason) { - const userId = this.resolveId(user); - const roleId = this.guild.roles.resolveId(role); - await this.client.api.guilds(this.guild.id).members(userId).roles(roleId).put({ reason }); - return this.resolve(user) ?? this.client.users.resolve(user) ?? userId; - } - async removeRole(user, role, reason) { - const userId = this.resolveId(user); - const roleId = this.guild.roles.resolveId(role); - await this.client.api.guilds(this.guild.id).members(userId).roles(roleId).delete({ reason }); - return this.resolve(user) ?? this.client.users.resolve(user) ?? userId; - } - fetchByMemberSafety(timeout = 15000) { - return new Promise((resolve) => { - const nonce = SnowflakeUtil.generate(); - const fetchedMembers = new Collection; - let timeout_ = setTimeout2(() => { - this.client.removeListener(Events.GUILD_MEMBERS_CHUNK, handler); - resolve(fetchedMembers); - }, timeout).unref(); - const handler = (members, guild, chunk) => { - if (guild.id == this.guild.id && chunk.nonce == nonce) { - if (members.size > 0) { - for (const member of members.values()) { - fetchedMembers.set(member.id, member); - } - this.client.ws.broadcast({ - op: Opcodes.SEARCH_RECENT_MEMBERS, - d: { - guild_id: this.guild.id, - query: "", - continuation_token: members.first()?.id, - nonce - } - }); - } else { - clearTimeout(timeout_); - this.client.removeListener(Events.GUILD_MEMBERS_CHUNK, handler); - resolve(fetchedMembers); - } - } - }; - this.client.on(Events.GUILD_MEMBERS_CHUNK, handler); - this.client.ws.broadcast({ - op: Opcodes.SEARCH_RECENT_MEMBERS, - d: { - guild_id: this.guild.id, - query: "", - continuation_token: null, - nonce - } - }); - }); - } - _fetchMany({ - limit = 0, - withPresences: presences = true, - user: user_ids, - query, - time = 120000, - nonce = SnowflakeUtil.generate() - } = {}) { - return new Promise((resolve, reject) => { - if (!query && !user_ids) - query = ""; - if (nonce.length > 32) - throw new RangeError2("MEMBER_FETCH_NONCE_LENGTH"); - this.guild.shard.send({ - op: Opcodes.REQUEST_GUILD_MEMBERS, - d: { - guild_id: this.guild.id, - presences, - user_ids, - query, - nonce, - limit - } - }); - const fetchedMembers = new Collection; - let i = 0; - const handler = (members, _, chunk) => { - timeout.refresh(); - if (chunk.nonce !== nonce) - return; - i++; - for (const member of members.values()) { - fetchedMembers.set(member.id, member); - } - if (members.size < 1000 || limit && fetchedMembers.size >= limit || i === chunk.count) { - clearTimeout(timeout); - this.client.removeListener(Events.GUILD_MEMBERS_CHUNK, handler); - this.client.decrementMaxListeners(); - let fetched = fetchedMembers; - if (user_ids && !Array.isArray(user_ids) && fetched.size) - fetched = fetched.first(); - resolve(fetched); - } - }; - const timeout = setTimeout2(() => { - this.client.removeListener(Events.GUILD_MEMBERS_CHUNK, handler); - this.client.decrementMaxListeners(); - reject(new Error2("GUILD_MEMBERS_TIMEOUT")); - }, time).unref(); - this.client.incrementMaxListeners(); - this.client.on(Events.GUILD_MEMBERS_CHUNK, handler); - }); - } - bulkBan(users, options = {}) { - return this.guild.bans.bulkCreate(users, options); - } - } - module.exports = GuildMemberManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildScheduledEventManager.js -var require_GuildScheduledEventManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2, Error: Error2 } = require_errors(); - var { GuildScheduledEvent } = require_GuildScheduledEvent(); - var { PrivacyLevels, GuildScheduledEventEntityTypes, GuildScheduledEventStatuses } = require_Constants(); - var DataResolver = require_DataResolver(); - var Util = require_Util(); - - class GuildScheduledEventManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, GuildScheduledEvent, iterable); - this.guild = guild; - } - async create(options) { - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - let { - privacyLevel, - entityType, - channel, - name, - scheduledStartTime, - description, - scheduledEndTime, - entityMetadata, - reason, - image, - recurrenceRule - } = options; - if (typeof privacyLevel === "string") - privacyLevel = PrivacyLevels[privacyLevel]; - if (typeof entityType === "string") - entityType = GuildScheduledEventEntityTypes[entityType]; - let entity_metadata, channel_id; - if (entityType === GuildScheduledEventEntityTypes.EXTERNAL) { - channel_id = typeof channel === "undefined" ? channel : null; - entity_metadata = { location: entityMetadata?.location }; - } else { - channel_id = this.guild.channels.resolveId(channel); - if (!channel_id) - throw new Error2("GUILD_VOICE_CHANNEL_RESOLVE"); - entity_metadata = typeof entityMetadata === "undefined" ? entityMetadata : null; - } - const data = await this.client.api.guilds(this.guild.id, "scheduled-events").post({ - data: { - channel_id, - name, - privacy_level: privacyLevel, - scheduled_start_time: new Date(scheduledStartTime).toISOString(), - scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime, - description, - image: image && await DataResolver.resolveImage(image), - entity_type: entityType, - entity_metadata, - recurrence_rule: recurrenceRule && Util.transformGuildScheduledEventRecurrenceRule(recurrenceRule) - }, - reason - }); - return this._add(data); - } - async fetch(options = {}) { - const id = this.resolveId(options.guildScheduledEvent ?? options); - if (id) { - if (!options.force) { - const existing = this.cache.get(id); - if (existing) - return existing; - } - const data2 = await this.client.api.guilds(this.guild.id, "scheduled-events", id).get({ query: { with_user_count: options.withUserCount ?? true } }); - return this._add(data2, options.cache); - } - const data = await this.client.api.guilds(this.guild.id, "scheduled-events").get({ query: { with_user_count: options.withUserCount ?? true } }); - return data.reduce((coll, rawGuildScheduledEventData) => coll.set(rawGuildScheduledEventData.id, this._add(rawGuildScheduledEventData, options.cache)), new Collection); - } - async edit(guildScheduledEvent, options) { - const guildScheduledEventId = this.resolveId(guildScheduledEvent); - if (!guildScheduledEventId) - throw new Error2("GUILD_SCHEDULED_EVENT_RESOLVE"); - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - let { - privacyLevel, - entityType, - channel, - status, - name, - scheduledStartTime, - description, - scheduledEndTime, - entityMetadata, - reason, - image, - recurrenceRule - } = options; - if (typeof privacyLevel === "string") - privacyLevel = PrivacyLevels[privacyLevel]; - if (typeof entityType === "string") - entityType = GuildScheduledEventEntityTypes[entityType]; - if (typeof status === "string") - status = GuildScheduledEventStatuses[status]; - let entity_metadata; - if (entityMetadata) { - entity_metadata = { - location: entityMetadata.location - }; - } - const data = await this.client.api.guilds(this.guild.id, "scheduled-events", guildScheduledEventId).patch({ - data: { - channel_id: typeof channel === "undefined" ? channel : this.guild.channels.resolveId(channel), - name, - privacy_level: privacyLevel, - scheduled_start_time: scheduledStartTime ? new Date(scheduledStartTime).toISOString() : undefined, - scheduled_end_time: scheduledEndTime ? new Date(scheduledEndTime).toISOString() : scheduledEndTime, - description, - entity_type: entityType, - status, - image: image && await DataResolver.resolveImage(image), - entity_metadata, - recurrence_rule: recurrenceRule && Util.transformGuildScheduledEventRecurrenceRule(recurrenceRule) - }, - reason - }); - return this._add(data); - } - async delete(guildScheduledEvent) { - const guildScheduledEventId = this.resolveId(guildScheduledEvent); - if (!guildScheduledEventId) - throw new Error2("GUILD_SCHEDULED_EVENT_RESOLVE"); - await this.client.api.guilds(this.guild.id, "scheduled-events", guildScheduledEventId).delete(); - } - async fetchSubscribers(guildScheduledEvent, options = {}) { - const guildScheduledEventId = this.resolveId(guildScheduledEvent); - if (!guildScheduledEventId) - throw new Error2("GUILD_SCHEDULED_EVENT_RESOLVE"); - let { limit, withMember, before, after } = options; - const data = await this.client.api.guilds(this.guild.id, "scheduled-events", guildScheduledEventId).users.get({ - query: { limit, with_member: withMember, before, after } - }); - return data.reduce((coll, rawData) => coll.set(rawData.user.id, { - guildScheduledEventId: rawData.guild_scheduled_event_id, - user: this.client.users._add(rawData.user), - member: rawData.member ? this.guild.members._add({ ...rawData.member, user: rawData.user }) : null - }), new Collection); - } - } - module.exports = GuildScheduledEventManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildSettingManager.js -var require_GuildSettingManager = __commonJS((exports, module) => { - var BaseManager = require_BaseManager(); - - class GuildSettingManager extends BaseManager { - #rawSetting = {}; - constructor(guild) { - super(guild.client); - this.guildId = guild.id; - } - get raw() { - return this.#rawSetting; - } - get guild() { - return this.client.guilds.cache.get(this.guildId); - } - _patch(data = {}) { - this.#rawSetting = Object.assign(this.#rawSetting, data); - this.client.emit("debug", `[SETTING > Guild ${this.guildId}] Sync setting`); - if ("suppress_everyone" in data) { - this.suppressEveryone = data.suppress_everyone; - } - if ("suppress_roles" in data) { - this.suppressRoles = data.suppress_roles; - } - if ("mute_scheduled_events" in data) { - this.muteScheduledEvents = data.mute_scheduled_events; - } - if ("message_notifications" in data) { - this.messageNotifications = data.message_notifications; - } - if ("flags" in data) { - this.flags = data.flags; - } - if ("mobile_push" in data) { - this.mobilePush = data.mobile_push; - } - if ("muted" in data) { - this.muted = data.muted; - } - if ("mute_config" in data && data.mute_config !== null) { - this.muteConfig = { - endTime: new Date(data.mute_config.end_time), - selectedTimeWindow: data.mute_config.selected_time_window - }; - } else { - this.muteConfig = null; - } - if ("hide_muted_channels" in data) { - this.hideMutedChannels = data.hide_muted_channels; - } - if ("channel_overrides" in data) { - this.channelOverrides = data.channel_overrides; - } - if ("notify_highlights" in data) { - this.notifyHighlights = data.notify_highlights; - } - if ("version" in data) { - this.version = data.version; - } - } - async edit(data) { - const data_ = await this.client.api.users("@me").settings.patch(data); - this._patch(data_); - return this; - } - } - module.exports = GuildSettingManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/GuildStickerManager.js -var require_GuildStickerManager = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2 } = require_errors(); - var MessagePayload = require_MessagePayload(); - var { Sticker } = require_Sticker(); - - class GuildStickerManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, Sticker, iterable); - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { extras: [this.guild] }); - } - async create(file, name, tags, { description, reason } = {}) { - const resolvedFile = await MessagePayload.resolveFile(file); - if (!resolvedFile) - throw new TypeError2("REQ_RESOURCE_TYPE"); - file = { ...resolvedFile, key: "file" }; - const data = { name, tags, description: description ?? "" }; - const sticker = await this.client.api.guilds(this.guild.id).stickers.post({ data, files: [file], reason, dontUsePayloadJSON: true }); - return this.client.actions.GuildStickerCreate.handle(this.guild, sticker).sticker; - } - async edit(sticker, data, reason) { - const stickerId = this.resolveId(sticker); - if (!stickerId) - throw new TypeError2("INVALID_TYPE", "sticker", "StickerResolvable"); - const d = await this.client.api.guilds(this.guild.id).stickers(stickerId).patch({ - data, - reason - }); - const existing = this.cache.get(stickerId); - if (existing) { - const clone = existing._clone(); - clone._patch(d); - return clone; - } - return this._add(d); - } - async delete(sticker, reason) { - sticker = this.resolveId(sticker); - if (!sticker) - throw new TypeError2("INVALID_TYPE", "sticker", "StickerResolvable"); - await this.client.api.guilds(this.guild.id).stickers(sticker).delete({ reason }); - } - async fetch(id, { cache = true, force = false } = {}) { - if (id) { - if (!force) { - const existing = this.cache.get(id); - if (existing) - return existing; - } - const sticker = await this.client.api.guilds(this.guild.id).stickers(id).get(); - return this._add(sticker, cache); - } - const data = await this.client.api.guilds(this.guild.id).stickers.get(); - return new Collection(data.map((sticker) => [sticker.id, this._add(sticker, cache)])); - } - async fetchUser(sticker) { - sticker = this.resolve(sticker); - if (!sticker) - throw new TypeError2("INVALID_TYPE", "sticker", "StickerResolvable"); - const data = await this.client.api.guilds(this.guild.id).stickers(sticker.id).get(); - sticker._patch(data); - return sticker.user; - } - } - module.exports = GuildStickerManager; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Presence.js -var require_Presence = __commonJS((exports) => { - var { randomUUID } = import.meta.require("crypto"); - var Base = require_Base(); - var ActivityFlags = require_ActivityFlags(); - var { ActivityTypes } = require_Constants(); - var Util = require_Util(); - - class Presence extends Base { - constructor(client, data = {}) { - super(client); - this.userId = data.user.id; - this.guild = data.guild ?? null; - this._patch(data); - } - get user() { - return this.client.users.resolve(this.userId); - } - get member() { - return this.guild.members.resolve(this.userId); - } - _patch(data) { - if ("status" in data) { - this.status = data.status; - } else { - this.status ??= "offline"; - } - if ("activities" in data) { - this.activities = data.activities.map((activity) => { - if (this.userId == this.client.user.id) { - if ([ActivityTypes.CUSTOM, "CUSTOM"].includes(activity.type)) { - return new CustomStatus(this.client, activity); - } else if (activity.id == "spotify:1") { - return new SpotifyRPC(this.client, activity); - } else { - return new RichPresence(this.client, activity); - } - } else { - return new Activity(this, activity); - } - }); - } else { - this.activities ??= []; - } - if ("client_status" in data) { - this.clientStatus = data.client_status; - } else { - this.clientStatus ??= null; - } - if ("last_modified" in data) { - this.lastModified = data.last_modified; - } - if ("afk" in data) { - this.afk = data.afk; - } else { - this.afk ??= false; - } - if ("since" in data) { - this.since = data.since; - } else { - this.since ??= 0; - } - return this; - } - _clone() { - const clone = Object.assign(Object.create(this), this); - clone.activities = this.activities.map((activity) => activity._clone()); - return clone; - } - equals(presence) { - return this === presence || presence && this.status === presence.status && this.clientStatus?.web === presence.clientStatus?.web && this.clientStatus?.mobile === presence.clientStatus?.mobile && this.clientStatus?.desktop === presence.clientStatus?.desktop && this.activities.length === presence.activities.length && this.activities.every((activity, index) => activity.equals(presence.activities[index])); - } - toJSON() { - return Util.flatten(this); - } - } - - class Activity { - constructor(presence, data) { - if (!(presence instanceof Presence)) { - throw new Error("Class constructor Activity cannot be invoked without 'presence'"); - } - Object.defineProperty(this, "presence", { value: presence }); - this._patch(data); - } - _patch(data = {}) { - if ("id" in data) { - this.id = data.id; - } - if ("name" in data) { - this.name = data.name; - } - if ("type" in data) { - this.type = typeof data.type === "number" ? ActivityTypes[data.type] : data.type; - } - if ("url" in data) { - this.url = data.url; - } else { - this.url = null; - } - if ("created_at" in data || "createdTimestamp" in data) { - this.createdTimestamp = data.created_at || data.createdTimestamp; - } - if ("session_id" in data) { - this.sessionId = data.session_id; - } else { - this.sessionId = this.presence.client?.sessionId; - } - if ("platform" in data) { - this.platform = data.platform; - } else { - this.platform = null; - } - if ("timestamps" in data && data.timestamps) { - this.timestamps = { - start: data.timestamps.start ? new Date(data.timestamps.start).getTime() : null, - end: data.timestamps.end ? new Date(data.timestamps.end).getTime() : null - }; - } else { - this.timestamps = null; - } - if ("application_id" in data || "applicationId" in data) { - this.applicationId = data.application_id || data.applicationId; - } else { - this.applicationId = null; - } - if ("details" in data) { - this.details = data.details; - } else { - this.details = null; - } - if ("state" in data) { - this.state = data.state; - } else { - this.state = null; - } - if ("sync_id" in data || "syncId" in data) { - this.syncId = data.sync_id || data.syncId; - } else { - this.syncId = null; - } - if ("flags" in data) { - this.flags = new ActivityFlags(data.flags).freeze(); - } else { - this.flags = new ActivityFlags().freeze(); - } - if ("buttons" in data) { - this.buttons = data.buttons; - } else { - this.buttons = []; - } - if ("emoji" in data && data.emoji) { - this.emoji = Util.resolvePartialEmoji(data.emoji); - } else { - this.emoji = null; - } - if ("party" in data) { - this.party = data.party; - } else { - this.party = null; - } - this.assets = new RichPresenceAssets(this, data.assets); - } - equals(activity) { - return this === activity || activity && this.name === activity.name && this.type === activity.type && this.url === activity.url && this.state === activity.state && this.details === activity.details && this.emoji?.id === activity.emoji?.id && this.emoji?.name === activity.emoji?.name; - } - get createdAt() { - return new Date(this.createdTimestamp); - } - toString() { - return this.name; - } - _clone() { - return Object.assign(Object.create(this), this); - } - toJSON(...props) { - return Util.clearNullOrUndefinedObject({ - ...Util.flatten(this, ...props), - type: typeof this.type === "number" ? this.type : ActivityTypes[this.type] - }); - } - } - - class RichPresenceAssets { - constructor(activity, assets) { - Object.defineProperty(this, "activity", { value: activity }); - this._patch(assets); - } - _patch(assets = {}) { - if ("large_text" in assets || "largeText" in assets) { - this.largeText = assets.large_text || assets.largeText; - } else { - this.largeText = null; - } - if ("small_text" in assets || "smallText" in assets) { - this.smallText = assets.small_text || assets.smallText; - } else { - this.smallText = null; - } - if ("large_image" in assets || "largeImage" in assets) { - this.largeImage = assets.large_image || assets.largeImage; - } else { - this.largeImage = null; - } - if ("small_image" in assets || "smallImage" in assets) { - this.smallImage = assets.small_image || assets.smallImage; - } else { - this.smallImage = null; - } - } - smallImageURL({ format, size } = {}) { - if (!this.smallImage) - return null; - if (this.smallImage.includes(":")) { - const [platform, id] = this.smallImage.split(":"); - switch (platform) { - case "mp": - return `https://media.discordapp.net/${id}`; - case "spotify": - return `https://i.scdn.co/image/${id}`; - case "youtube": - return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`; - case "twitch": - return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`; - default: - return null; - } - } - return this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationId, this.smallImage, { - format, - size - }); - } - largeImageURL({ format, size } = {}) { - if (!this.largeImage) - return null; - if (this.largeImage.includes(":")) { - const [platform, id] = this.largeImage.split(":"); - switch (platform) { - case "mp": - return `https://media.discordapp.net/${id}`; - case "spotify": - return `https://i.scdn.co/image/${id}`; - case "youtube": - return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`; - case "twitch": - return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`; - default: - return null; - } - } - return this.activity.presence.client.rest.cdn.AppAsset(this.activity.applicationId, this.largeImage, { - format, - size - }); - } - static parseImage(image) { - if (typeof image != "string") { - image = null; - } else if (URL.canParse(image) && ["http:", "https:"].includes(new URL(image).protocol)) { - image = image.replace("https://cdn.discordapp.com/", "mp:").replace("http://cdn.discordapp.com/", "mp:").replace("https://media.discordapp.net/", "mp:").replace("http://media.discordapp.net/", "mp:"); - if (!image.startsWith("mp:")) { - throw new Error("INVALID_URL"); - } - } else if (/^[0-9]{17,19}$/.test(image)) { - } else if (["mp:", "youtube:", "spotify:", "twitch:"].some((v) => image.startsWith(v))) { - } else if (image.startsWith("external/")) { - image = `mp:${image}`; - } - return image; - } - toJSON() { - if (!this.largeImage && !this.largeText && !this.smallImage && !this.smallText) - return null; - return { - large_image: RichPresenceAssets.parseImage(this.largeImage), - large_text: this.largeText, - small_image: RichPresenceAssets.parseImage(this.smallImage), - small_text: this.smallText - }; - } - setLargeImage(image) { - image = RichPresenceAssets.parseImage(image); - this.largeImage = image; - return this; - } - setSmallImage(image) { - image = RichPresenceAssets.parseImage(image); - this.smallImage = image; - return this; - } - setLargeText(text) { - this.largeText = text; - return this; - } - setSmallText(text) { - this.smallText = text; - return this; - } - } - - class CustomStatus extends Activity { - constructor(client, data = {}) { - if (!client) - throw new Error("Class constructor CustomStatus cannot be invoked without 'client'"); - super("presence" in client ? client.presence : client, { - name: " ", - type: ActivityTypes.CUSTOM, - ...data - }); - } - setEmoji(emoji) { - this.emoji = Util.resolvePartialEmoji(emoji); - return this; - } - setState(state) { - if (typeof state == "string" && state.length > 128) - throw new Error("State must be less than 128 characters"); - this.state = state; - return this; - } - toJSON() { - if (!this.emoji & !this.state) - throw new Error("CustomStatus must have at least one of emoji or state"); - return { - name: this.name, - emoji: this.emoji, - type: ActivityTypes.CUSTOM, - state: this.state - }; - } - } - - class RichPresence extends Activity { - constructor(client, data = {}) { - if (!client) - throw new Error("Class constructor RichPresence cannot be invoked without 'client'"); - super("presence" in client ? client.presence : client, { type: 0, ...data }); - this.setup(data); - } - setup(data = {}) { - this.secrets = "secrets" in data ? data.secrets : {}; - this.metadata = "metadata" in data ? data.metadata : {}; - } - setAssetsLargeImage(image) { - this.assets.setLargeImage(image); - return this; - } - setAssetsSmallImage(image) { - this.assets.setSmallImage(image); - return this; - } - setAssetsLargeText(text) { - this.assets.setLargeText(text); - return this; - } - setAssetsSmallText(text) { - this.assets.setSmallText(text); - return this; - } - setName(name) { - this.name = name; - return this; - } - setURL(url) { - if (typeof url == "string" && !URL.canParse(url)) - throw new Error("URL must be a valid URL"); - this.url = url; - return this; - } - setType(type) { - this.type = typeof type == "number" ? type : ActivityTypes[type]; - return this; - } - setApplicationId(id) { - this.applicationId = id; - return this; - } - setState(state) { - this.state = state; - return this; - } - setDetails(details) { - this.details = details; - return this; - } - setParty(party) { - if (typeof party == "object") { - if (!party.max || typeof party.max != "number") - throw new Error("Party must have max number"); - if (!party.current || typeof party.current != "number") - throw new Error("Party must have current"); - if (party.current > party.max) - throw new Error("Party current must be less than max number"); - if (!party.id || typeof party.id != "string") - party.id = randomUUID(); - this.party = { - size: [party.current, party.max], - id: party.id - }; - } else { - this.party = null; - } - return this; - } - setStartTimestamp(timestamp) { - if (!this.timestamps) - this.timestamps = {}; - if (timestamp instanceof Date) - timestamp = timestamp.getTime(); - this.timestamps.start = timestamp; - return this; - } - setEndTimestamp(timestamp) { - if (!this.timestamps) - this.timestamps = {}; - if (timestamp instanceof Date) - timestamp = timestamp.getTime(); - this.timestamps.end = timestamp; - return this; - } - setButtons(...button) { - if (button.length == 0) { - this.buttons = []; - delete this.metadata.button_urls; - return this; - } else if (button.length > 2) { - throw new Error("RichPresence can only have up to 2 buttons"); - } - this.buttons = []; - this.metadata.button_urls = []; - button.flat(2).forEach((b) => { - if (b.name && b.url) { - this.buttons.push(b.name); - if (!URL.canParse(b.url)) - throw new Error("Button url must be a valid url"); - this.metadata.button_urls.push(b.url); - } else { - throw new Error("Button must have name and url"); - } - }); - return this; - } - setPlatform(platform) { - this.platform = platform; - return this; - } - setJoinSecret(join) { - this.secrets.join = join; - return this; - } - addButton(name, url) { - if (!name || !url) { - throw new Error("Button must have name and url"); - } - if (typeof name !== "string") - throw new Error("Button name must be a string"); - if (!URL.canParse(url)) - throw new Error("Button url must be a valid url"); - this.buttons.push(name); - if (Array.isArray(this.metadata.button_urls)) - this.metadata.button_urls.push(url); - else - this.metadata.button_urls = [url]; - return this; - } - toJSON(...props) { - return super.toJSON({ - applicationId: "application_id", - sessionId: "session_id", - syncId: "sync_id", - createdTimestamp: "created_at" - }, ...props); - } - static async getExternal(client, applicationId, ...images) { - if (!client || !client.token || !client.api) - throw new Error("Client must be set"); - if (!/^[0-9]{17,19}$/.test(applicationId)) { - throw new Error("Application id must be a Discord Snowflake"); - } - if (images.length > 2) { - throw new Error("RichPresence can only have up to 2 external images"); - } - if (images.some((image) => !URL.canParse(image))) { - throw new Error("Each image must be a valid URL."); - } - const res = await client.api.applications[applicationId]["external-assets"].post({ - data: { - urls: images - } - }); - return res; - } - toString() { - return this.name; - } - _clone() { - return Object.assign(Object.create(this), this); - } - } - - class SpotifyRPC extends RichPresence { - constructor(client, options = {}) { - if (!client) - throw new Error("Class constructor SpotifyRPC cannot be invoked without 'client'"); - super(client, { - name: "Spotify", - type: ActivityTypes.LISTENING, - party: { - id: `spotify:${client.user.id}` - }, - id: "spotify:1", - flags: 48, - ...options - }); - this.setup(options); - } - setup(options) { - this.metadata = { - album_id: options.metadata?.album_id || null, - artist_ids: options.metadata?.artist_ids || [], - context_uri: options.metadata?.context_uri || null - }; - } - setSongId(id) { - this.syncId = id; - return this; - } - addArtistId(id) { - if (!this.metadata.artist_ids) - this.metadata.artist_ids = []; - this.metadata.artist_ids.push(id); - return this; - } - setArtistIds(...ids) { - if (!ids?.length) { - this.metadata.artist_ids = []; - return this; - } - if (!this.metadata.artist_ids) - this.metadata.artist_ids = []; - ids.flat(2).forEach((id) => this.metadata.artist_ids.push(id)); - return this; - } - setAlbumId(id) { - this.metadata.album_id = id; - this.metadata.context_uri = `spotify:album:${id}`; - return this; - } - toJSON() { - return super.toJSON({ id: false, emoji: false, platform: false, buttons: false }); - } - } - exports.Presence = Presence; - exports.Activity = Activity; - exports.RichPresenceAssets = RichPresenceAssets; - exports.CustomStatus = CustomStatus; - exports.RichPresence = RichPresence; - exports.SpotifyRPC = SpotifyRPC; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/PresenceManager.js -var require_PresenceManager = __commonJS((exports, module) => { - var CachedManager = require_CachedManager(); - var { Presence } = require_Presence(); - - class PresenceManager extends CachedManager { - constructor(client, iterable) { - super(client, Presence, iterable); - } - _add(data, cache) { - return super._add(data, cache, { id: data.user.id }); - } - resolve(presence) { - const presenceResolvable = super.resolve(presence); - if (presenceResolvable) - return presenceResolvable; - const userId = this.client.users.resolveId(presence); - return this.cache.get(userId) ?? null; - } - resolveId(presence) { - const presenceResolvable = super.resolveId(presence); - if (presenceResolvable) - return presenceResolvable; - const userId = this.client.users.resolveId(presence); - return this.cache.has(userId) ? userId : null; - } - async fetch() { - const data = await this.client.api.presences.get(); - data.presences.forEach((presence) => { - this._add(presence, true); - }); - return this.cache; - } - } - module.exports = PresenceManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/RoleManager.js -var require_RoleManager = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2 } = require_errors(); - var { Role } = require_Role(); - var DataResolver = require_DataResolver(); - var Permissions = require_Permissions(); - var { resolveColor } = require_Util(); - var Util = require_Util(); - var cacheWarningEmitted = false; - var deprecationEmittedForCreate = false; - var deprecationEmittedForEdit = false; - - class RoleManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, Role, iterable); - if (!cacheWarningEmitted && this._cache.constructor.name !== "Collection") { - cacheWarningEmitted = true; - process2.emitWarning(`Overriding the cache handling for ${this.constructor.name} is unsupported and breaks functionality.`, "UnsupportedCacheOverwriteWarning"); - } - this.guild = guild; - } - _add(data, cache) { - return super._add(data, cache, { extras: [this.guild] }); - } - async fetch(id, { cache = true, force = false } = {}) { - if (id && !force) { - const existing = this.cache.get(id); - if (existing) - return existing; - } - const data = await this.client.api.guilds(this.guild.id).roles.get(); - const roles = new Collection; - for (const role of data) - roles.set(role.id, this._add(role, cache)); - return id ? roles.get(id) ?? null : roles; - } - async fetchMemberCounts() { - const data = await this.client.api.guilds(this.guild.id).roles("member-counts").get(); - return data; - } - async fetchMemberIds(role) { - const id = this.resolveId(role); - if (!id) - throw new TypeError2("INVALID_TYPE", "role", "RoleResolvable"); - const data = await this.client.api.guilds(this.guild.id).roles(id, "member-ids").get(); - return data; - } - async create(options = {}) { - let { permissions, icon } = options; - const { name, color, hoist, position, mentionable, reason, unicodeEmoji } = options; - if (typeof permissions !== "undefined") - permissions = new Permissions(permissions); - if (icon) { - const guildEmojiURL = this.guild.emojis.resolve(icon)?.url; - icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon); - if (typeof icon !== "string") - icon = undefined; - } - let colors = options.colors && { - primary_color: resolveColor(options.colors.primaryColor), - secondary_color: options.colors.secondaryColor && resolveColor(options.colors.secondaryColor), - tertiary_color: options.colors.tertiaryColor && resolveColor(options.colors.tertiaryColor) - }; - if (color !== undefined) { - if (!deprecationEmittedForCreate) { - process2.emitWarning(`Passing "color" to RoleManager#create() is deprecated. Use "colors" instead.`); - } - deprecationEmittedForCreate = true; - colors = { - primary_color: resolveColor(color), - secondary_color: null, - tertiary_color: null - }; - } - const data = await this.client.api.guilds(this.guild.id).roles.post({ - data: { - name, - colors, - hoist, - permissions, - mentionable, - icon, - unicode_emoji: unicodeEmoji - }, - reason - }); - const { role } = this.client.actions.GuildRoleCreate.handle({ - guild_id: this.guild.id, - role: data - }); - if (position) - return this.setPosition(role, position, { reason }); - return role; - } - async edit(role, data, reason) { - role = this.resolve(role); - if (!role) - throw new TypeError2("INVALID_TYPE", "role", "RoleResolvable"); - if (typeof data.position === "number") - await this.setPosition(role, data.position, { reason }); - let icon = data.icon; - if (icon) { - const guildEmojiURL = this.guild.emojis.resolve(icon)?.url; - icon = guildEmojiURL ? await DataResolver.resolveImage(guildEmojiURL) : await DataResolver.resolveImage(icon); - if (typeof icon !== "string") - icon = undefined; - } - let colors = data.colors && { - primary_color: resolveColor(data.colors.primaryColor), - secondary_color: data.colors.secondaryColor && resolveColor(data.colors.secondaryColor), - tertiary_color: data.colors.tertiaryColor && resolveColor(data.colors.tertiaryColor) - }; - if (data.color !== undefined) { - if (!deprecationEmittedForEdit) { - process2.emitWarning(`Passing "color" to RoleManager#edit() is deprecated. Use "colors" instead.`); - } - deprecationEmittedForEdit = true; - colors = { - primary_color: resolveColor(data.color), - secondary_color: null, - tertiary_color: null - }; - } - const _data = { - name: data.name, - colors, - hoist: data.hoist, - permissions: typeof data.permissions === "undefined" ? undefined : new Permissions(data.permissions), - mentionable: data.mentionable, - icon, - unicode_emoji: data.unicodeEmoji - }; - const d = await this.client.api.guilds(this.guild.id).roles(role.id).patch({ data: _data, reason }); - const clone = role._clone(); - clone._patch(d); - return clone; - } - async delete(role, reason) { - const id = this.resolveId(role); - await this.client.api.guilds[this.guild.id].roles[id].delete({ reason }); - this.client.actions.GuildRoleDelete.handle({ guild_id: this.guild.id, role_id: id }); - } - async setPosition(role, position, { relative, reason } = {}) { - role = this.resolve(role); - if (!role) - throw new TypeError2("INVALID_TYPE", "role", "RoleResolvable"); - const updatedRoles = await Util.setPosition(role, position, relative, this.guild._sortedRoles(), this.client.api.guilds(this.guild.id).roles, reason); - this.client.actions.GuildRolesPositionUpdate.handle({ - guild_id: this.guild.id, - roles: updatedRoles - }); - return role; - } - async setPositions(rolePositions) { - rolePositions = rolePositions.map((o) => ({ - id: this.resolveId(o.role), - position: o.position - })); - await this.client.api.guilds(this.guild.id).roles.patch({ - data: rolePositions - }); - return this.client.actions.GuildRolesPositionUpdate.handle({ - guild_id: this.guild.id, - roles: rolePositions - }).guild; - } - comparePositions(role1, role2) { - const resolvedRole1 = this.resolve(role1); - const resolvedRole2 = this.resolve(role2); - if (!resolvedRole1 || !resolvedRole2) - throw new TypeError2("INVALID_TYPE", "role", "Role nor a Snowflake"); - const role1Position = resolvedRole1.position; - const role2Position = resolvedRole2.position; - if (role1Position === role2Position) { - return Number(BigInt(resolvedRole2.id) - BigInt(resolvedRole1.id)); - } - return role1Position - role2Position; - } - botRoleFor(user) { - const userId = this.client.users.resolveId(user); - if (!userId) - return null; - return this.cache.find((role) => role.tags?.botId === userId) ?? null; - } - get everyone() { - return this.cache.get(this.guild.id); - } - get premiumSubscriberRole() { - return this.cache.find((role) => role.tags?.premiumSubscriberRole) ?? null; - } - get highest() { - return this.cache.reduce((prev, role) => role.comparePositionTo(prev) > 0 ? role : prev, this.cache.first()); - } - } - module.exports = RoleManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/StageInstanceManager.js -var require_StageInstanceManager = __commonJS((exports, module) => { - var CachedManager = require_CachedManager(); - var { TypeError: TypeError2, Error: Error2 } = require_errors(); - var { StageInstance } = require_StageInstance(); - var { PrivacyLevels } = require_Constants(); - - class StageInstanceManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, StageInstance, iterable); - this.guild = guild; - } - async create(channel, options) { - const channelId = this.guild.channels.resolveId(channel); - if (!channelId) - throw new Error2("STAGE_CHANNEL_RESOLVE"); - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - let { guildScheduledEvent, topic, privacyLevel, sendStartNotification } = options; - privacyLevel &&= typeof privacyLevel === "number" ? privacyLevel : PrivacyLevels[privacyLevel]; - const guildScheduledEventId = guildScheduledEvent && this.resolveId(guildScheduledEvent); - const data = await this.client.api["stage-instances"].post({ - data: { - channel_id: channelId, - topic, - privacy_level: privacyLevel, - send_start_notification: sendStartNotification, - guild_scheduled_event_id: guildScheduledEventId - } - }); - return this._add(data); - } - async fetch(channel, { cache = true, force = false } = {}) { - const channelId = this.guild.channels.resolveId(channel); - if (!channelId) - throw new Error2("STAGE_CHANNEL_RESOLVE"); - if (!force) { - const existing = this.cache.find((stageInstance) => stageInstance.channelId === channelId); - if (existing) - return existing; - } - const data = await this.client.api("stage-instances", channelId).get(); - return this._add(data, cache); - } - async edit(channel, options) { - if (typeof options !== "object") - throw new TypeError2("INVALID_TYPE", "options", "object", true); - const channelId = this.guild.channels.resolveId(channel); - if (!channelId) - throw new Error2("STAGE_CHANNEL_RESOLVE"); - let { topic, privacyLevel } = options; - privacyLevel &&= typeof privacyLevel === "number" ? privacyLevel : PrivacyLevels[privacyLevel]; - const data = await this.client.api("stage-instances", channelId).patch({ - data: { - topic, - privacy_level: privacyLevel - } - }); - if (this.cache.has(data.id)) { - const clone = this.cache.get(data.id)._clone(); - clone._patch(data); - return clone; - } - return this._add(data); - } - async delete(channel) { - const channelId = this.guild.channels.resolveId(channel); - if (!channelId) - throw new Error2("STAGE_CHANNEL_RESOLVE"); - await this.client.api("stage-instances", channelId).delete(); - } - } - module.exports = StageInstanceManager; -}); - -// node_modules/discord.js-selfbot-v13/src/managers/VoiceStateManager.js -var require_VoiceStateManager = __commonJS((exports, module) => { - var CachedManager = require_CachedManager(); - var VoiceState = require_VoiceState(); - - class VoiceStateManager extends CachedManager { - constructor(guild, iterable) { - super(guild.client, VoiceState, iterable); - this.guild = guild; - } - _add(data, cache = true) { - const existing = this.cache.get(data.user_id); - if (existing) - return existing._patch(data); - const entry = new this.holds(this.guild, data); - if (cache) - this.cache.set(data.user_id, entry); - return entry; - } - async fetch(member, { cache = true, force = false } = {}) { - if (!this.guild?.id) - throw new Error("Guild is not defined"); - const id = member === "@me" ? member : this.guild.members.resolveId(member); - if (!force) { - const existing = this.cache.get(id === "@me" ? this.client.user.id : id); - if (existing) - return existing; - } - const data = await this.client.api.guilds(this.guild.id)["voice-states"][id].get(); - return this._add(data, cache); - } - } - module.exports = VoiceStateManager; -}); - -// node_modules/discord.js-selfbot-v13/src/util/SystemChannelFlags.js -var require_SystemChannelFlags = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class SystemChannelFlags extends BitField { - } - SystemChannelFlags.FLAGS = { - SUPPRESS_JOIN_NOTIFICATIONS: 1 << 0, - SUPPRESS_PREMIUM_SUBSCRIPTIONS: 1 << 1, - SUPPRESS_GUILD_REMINDER_NOTIFICATIONS: 1 << 2, - SUPPRESS_JOIN_NOTIFICATION_REPLIES: 1 << 3, - SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS: 1 << 4, - SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES: 1 << 5 - }; - module.exports = SystemChannelFlags; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Guild.js -var require_Guild = __commonJS((exports) => { - var process2 = import.meta.require("process"); - var { Collection } = require_dist(); - var AnonymousGuild = require_AnonymousGuild(); - var GuildAuditLogs = require_GuildAuditLogs(); - var GuildPreview = require_GuildPreview(); - var GuildTemplate = require_GuildTemplate(); - var Integration = require_Integration(); - var Webhook = require_Webhook(); - var WelcomeScreen = require_WelcomeScreen(); - var { Error: Error2 } = require_errors(); - var AutoModerationRuleManager = require_AutoModerationRuleManager(); - var GuildBanManager = require_GuildBanManager(); - var GuildChannelManager = require_GuildChannelManager(); - var GuildEmojiManager = require_GuildEmojiManager(); - var GuildInviteManager = require_GuildInviteManager(); - var GuildMemberManager = require_GuildMemberManager(); - var GuildScheduledEventManager = require_GuildScheduledEventManager(); - var GuildSettingManager = require_GuildSettingManager(); - var GuildStickerManager = require_GuildStickerManager(); - var PresenceManager = require_PresenceManager(); - var RoleManager = require_RoleManager(); - var StageInstanceManager = require_StageInstanceManager(); - var VoiceStateManager = require_VoiceStateManager(); - var { - ChannelTypes, - DefaultMessageNotificationLevels, - VerificationLevels, - ExplicitContentFilterLevels, - Status, - MFALevels, - PremiumTiers - } = require_Constants(); - var DataResolver = require_DataResolver(); - var SystemChannelFlags = require_SystemChannelFlags(); - var Util = require_Util(); - var deprecationEmittedForSetChannelPositions = false; - var deprecationEmittedForSetRolePositions = false; - var deprecationEmittedForDeleted = false; - var deprecationEmittedForMe = false; - var deletedGuilds = new WeakSet; - - class Guild extends AnonymousGuild { - constructor(client, data) { - super(client, data, false); - this.members = new GuildMemberManager(this); - this.channels = new GuildChannelManager(this); - this.bans = new GuildBanManager(this); - this.roles = new RoleManager(this); - this.presences = new PresenceManager(this.client); - this.voiceStates = new VoiceStateManager(this); - this.stageInstances = new StageInstanceManager(this); - this.invites = new GuildInviteManager(this); - this.scheduledEvents = new GuildScheduledEventManager(this); - this.autoModerationRules = new AutoModerationRuleManager(this); - this.settings = new GuildSettingManager(this); - if (!data) - return; - if (data.unavailable) { - this.available = false; - } else { - this._patch(data); - if (!data.channels) - this.available = false; - } - this.shardId = data.shardId; - } - get deleted() { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Guild#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - return deletedGuilds.has(this); - } - set deleted(value) { - if (!deprecationEmittedForDeleted) { - deprecationEmittedForDeleted = true; - process2.emitWarning("Guild#deleted is deprecated, see https://github.com/discordjs/discord.js/issues/7091.", "DeprecationWarning"); - } - if (value) - deletedGuilds.add(this); - else - deletedGuilds.delete(this); - } - get shard() { - return this.client.ws.shards.get(this.shardId); - } - _patch(data) { - super._patch(data); - this.id = data.id; - if ("name" in data) - this.name = data.name; - if ("icon" in data) - this.icon = data.icon; - if ("unavailable" in data) { - this.available = !data.unavailable; - } else { - this.available ??= true; - } - if ("discovery_splash" in data) { - this.discoverySplash = data.discovery_splash; - } - if ("member_count" in data) { - this.memberCount = data.member_count; - } - if ("large" in data) { - this.large = Boolean(data.large); - } - if ("premium_progress_bar_enabled" in data) { - this.premiumProgressBarEnabled = data.premium_progress_bar_enabled; - } - if ("application_id" in data) { - this.applicationId = data.application_id; - } - if ("afk_timeout" in data) { - this.afkTimeout = data.afk_timeout; - } - if ("afk_channel_id" in data) { - this.afkChannelId = data.afk_channel_id; - } - if ("system_channel_id" in data) { - this.systemChannelId = data.system_channel_id; - } - if ("premium_tier" in data) { - this.premiumTier = PremiumTiers[data.premium_tier]; - } - if ("widget_enabled" in data) { - this.widgetEnabled = data.widget_enabled; - } - if ("widget_channel_id" in data) { - this.widgetChannelId = data.widget_channel_id; - } - if ("explicit_content_filter" in data) { - this.explicitContentFilter = ExplicitContentFilterLevels[data.explicit_content_filter]; - } - if ("mfa_level" in data) { - this.mfaLevel = MFALevels[data.mfa_level]; - } - if ("joined_at" in data) { - this.joinedTimestamp = new Date(data.joined_at).getTime(); - } - if ("default_message_notifications" in data) { - this.defaultMessageNotifications = DefaultMessageNotificationLevels[data.default_message_notifications]; - } - if ("system_channel_flags" in data) { - this.systemChannelFlags = new SystemChannelFlags(data.system_channel_flags).freeze(); - } - if ("max_members" in data) { - this.maximumMembers = data.max_members; - } else { - this.maximumMembers ??= null; - } - if ("max_presences" in data) { - this.maximumPresences = data.max_presences ?? 25000; - } else { - this.maximumPresences ??= null; - } - if ("max_video_channel_users" in data) { - this.maxVideoChannelUsers = data.max_video_channel_users; - } else { - this.maxVideoChannelUsers ??= null; - } - if ("max_stage_video_channel_users" in data) { - this.maxStageVideoChannelUsers = data.max_stage_video_channel_users; - } else { - this.maxStageVideoChannelUsers ??= null; - } - if ("approximate_member_count" in data) { - this.approximateMemberCount = data.approximate_member_count; - } else { - this.approximateMemberCount ??= null; - } - if ("approximate_presence_count" in data) { - this.approximatePresenceCount = data.approximate_presence_count; - } else { - this.approximatePresenceCount ??= null; - } - this.vanityURLUses ??= null; - if ("rules_channel_id" in data) { - this.rulesChannelId = data.rules_channel_id; - } - if ("public_updates_channel_id" in data) { - this.publicUpdatesChannelId = data.public_updates_channel_id; - } - if ("preferred_locale" in data) { - this.preferredLocale = data.preferred_locale; - } - if ("safety_alerts_channel_id" in data) { - this.safetyAlertsChannelId = data.safety_alerts_channel_id; - } else { - this.safetyAlertsChannelId ??= null; - } - if (data.channels) { - this.channels.cache.clear(); - for (const rawChannel of data.channels) { - this.client.channels._add(rawChannel, this); - } - } - if (data.threads) { - for (const rawThread of data.threads) { - this.client.channels._add(rawThread, this); - } - } - if (data.roles) { - this.roles.cache.clear(); - for (const role of data.roles) - this.roles._add(role); - } - if (data.members) { - this.members.cache.clear(); - for (const guildUser of data.members) - this.members._add(guildUser); - } - if ("owner_id" in data) { - this.ownerId = data.owner_id; - } - if (data.presences) { - for (const presence of data.presences) { - this.presences._add(Object.assign(presence, { guild: this })); - } - } - if (data.stage_instances) { - this.stageInstances.cache.clear(); - for (const stageInstance of data.stage_instances) { - this.stageInstances._add(stageInstance); - } - } - if (data.guild_scheduled_events) { - this.scheduledEvents.cache.clear(); - for (const scheduledEvent of data.guild_scheduled_events) { - this.scheduledEvents._add(scheduledEvent); - } - } - if (data.voice_states) { - this.voiceStates.cache.clear(); - for (const voiceState of data.voice_states) { - this.voiceStates._add(voiceState); - } - } - if (!this.emojis) { - this.emojis = new GuildEmojiManager(this); - if (data.emojis) - for (const emoji of data.emojis) - this.emojis._add(emoji); - } else if (data.emojis) { - this.client.actions.GuildEmojisUpdate.handle({ - guild_id: this.id, - emojis: data.emojis - }); - } - if (!this.stickers) { - this.stickers = new GuildStickerManager(this); - if (data.stickers) - for (const sticker of data.stickers) - this.stickers._add(sticker); - } else if (data.stickers) { - this.client.actions.GuildStickersUpdate.handle({ - guild_id: this.id, - stickers: data.stickers - }); - } - if ("incidents_data" in data) { - this.incidentsData = data.incidents_data && Util.transformAPIIncidentsData(data.incidents_data); - } else { - this.incidentsData ??= null; - } - } - get joinedAt() { - return new Date(this.joinedTimestamp); - } - discoverySplashURL({ format, size } = {}) { - return this.discoverySplash && this.client.rest.cdn.DiscoverySplash(this.id, this.discoverySplash, format, size); - } - fetchOwner(options) { - return this.members.fetch({ ...options, user: this.ownerId }); - } - get afkChannel() { - return this.client.channels.resolve(this.afkChannelId); - } - get systemChannel() { - return this.client.channels.resolve(this.systemChannelId); - } - get safetyAlertsChannel() { - return this.client.channels.resolve(this.safetyAlertsChannelId); - } - get widgetChannel() { - return this.client.channels.resolve(this.widgetChannelId); - } - get rulesChannel() { - return this.client.channels.resolve(this.rulesChannelId); - } - get publicUpdatesChannel() { - return this.client.channels.resolve(this.publicUpdatesChannelId); - } - get me() { - if (!deprecationEmittedForMe) { - process2.emitWarning("Guild#me is deprecated. Use Guild#members#me instead.", "DeprecationWarning"); - deprecationEmittedForMe = true; - } - return this.members.me; - } - get maximumBitrate() { - if (this.features.includes("VIP_REGIONS")) { - return 384000; - } - switch (PremiumTiers[this.premiumTier]) { - case PremiumTiers.TIER_1: - return 128000; - case PremiumTiers.TIER_2: - return 256000; - case PremiumTiers.TIER_3: - return 384000; - default: - return 96000; - } - } - async fetchIntegrations() { - const data = await this.client.api.guilds(this.id).integrations.get(); - return data.reduce((collection, integration) => collection.set(integration.id, new Integration(this.client, integration, this)), new Collection); - } - async fetchTemplates() { - const templates = await this.client.api.guilds(this.id).templates.get(); - return templates.reduce((col, data) => col.set(data.code, new GuildTemplate(this.client, data)), new Collection); - } - async fetchWelcomeScreen() { - const data = await this.client.api.guilds(this.id, "welcome-screen").get(); - return new WelcomeScreen(this, data); - } - async createTemplate(name, description) { - const data = await this.client.api.guilds(this.id).templates.post({ data: { name, description } }); - return new GuildTemplate(this.client, data); - } - async fetchPreview() { - const data = await this.client.api.guilds(this.id).preview.get(); - return new GuildPreview(this.client, data); - } - async fetchVanityData() { - const data = await this.client.api.guilds(this.id, "vanity-url").get(); - this.vanityURLCode = data.code; - this.vanityURLUses = data.uses; - return data; - } - async fetchWebhooks() { - const apiHooks = await this.client.api.guilds(this.id).webhooks.get(); - const hooks = new Collection; - for (const hook of apiHooks) - hooks.set(hook.id, new Webhook(this.client, hook)); - return hooks; - } - fetchWidget() { - return this.client.fetchGuildWidget(this.id); - } - async fetchWidgetSettings() { - const data = await this.client.api.guilds(this.id).widget.get(); - this.widgetEnabled = data.enabled; - this.widgetChannelId = data.channel_id; - return { - enabled: data.enabled, - channel: data.channel_id ? this.channels.cache.get(data.channel_id) : null - }; - } - async fetchAuditLogs({ before, after, limit, user, type } = {}) { - const data = await this.client.api.guilds(this.id)["audit-logs"].get({ - query: { - before: before?.id ?? before, - after: after?.id ?? after, - limit, - user_id: this.client.users.resolveId(user), - action_type: typeof type === "string" ? GuildAuditLogs.Actions[type] : type - } - }); - return GuildAuditLogs.build(this, data); - } - async edit(data, reason) { - const _data = {}; - if (data.name) - _data.name = data.name; - if (typeof data.verificationLevel !== "undefined") { - _data.verification_level = typeof data.verificationLevel === "number" ? data.verificationLevel : VerificationLevels[data.verificationLevel]; - } - if (typeof data.afkChannel !== "undefined") { - _data.afk_channel_id = this.client.channels.resolveId(data.afkChannel); - } - if (typeof data.systemChannel !== "undefined") { - _data.system_channel_id = this.client.channels.resolveId(data.systemChannel); - } - if (data.afkTimeout) - _data.afk_timeout = Number(data.afkTimeout); - if (typeof data.icon !== "undefined") - _data.icon = await DataResolver.resolveImage(data.icon); - if (data.owner) - _data.owner_id = this.client.users.resolveId(data.owner); - if (typeof data.splash !== "undefined") - _data.splash = await DataResolver.resolveImage(data.splash); - if (typeof data.discoverySplash !== "undefined") { - _data.discovery_splash = await DataResolver.resolveImage(data.discoverySplash); - } - if (typeof data.banner !== "undefined") - _data.banner = await DataResolver.resolveImage(data.banner); - if (typeof data.explicitContentFilter !== "undefined") { - _data.explicit_content_filter = typeof data.explicitContentFilter === "number" ? data.explicitContentFilter : ExplicitContentFilterLevels[data.explicitContentFilter]; - } - if (typeof data.defaultMessageNotifications !== "undefined") { - _data.default_message_notifications = typeof data.defaultMessageNotifications === "number" ? data.defaultMessageNotifications : DefaultMessageNotificationLevels[data.defaultMessageNotifications]; - } - if (typeof data.systemChannelFlags !== "undefined") { - _data.system_channel_flags = SystemChannelFlags.resolve(data.systemChannelFlags); - } - if (typeof data.rulesChannel !== "undefined") { - _data.rules_channel_id = this.client.channels.resolveId(data.rulesChannel); - } - if (typeof data.publicUpdatesChannel !== "undefined") { - _data.public_updates_channel_id = this.client.channels.resolveId(data.publicUpdatesChannel); - } - if (typeof data.features !== "undefined") { - _data.features = data.features; - } - if (typeof data.description !== "undefined") { - _data.description = data.description; - } - if (typeof data.preferredLocale !== "undefined") - _data.preferred_locale = data.preferredLocale; - if (typeof data.safetyAlertsChannel !== "undefined") { - _data.safety_alerts_channel_id = this.client.channels.resolveId(data.safetyAlertsChannel); - } - if ("premiumProgressBarEnabled" in data) - _data.premium_progress_bar_enabled = data.premiumProgressBarEnabled; - const newData = await this.client.api.guilds(this.id).patch({ data: _data, reason }); - return this.client.actions.GuildUpdate.handle(newData).updated; - } - async editWelcomeScreen(data) { - const { enabled, description, welcomeChannels } = data; - const welcome_channels = welcomeChannels?.map((welcomeChannelData) => { - const emoji = this.emojis.resolve(welcomeChannelData.emoji); - return { - emoji_id: emoji?.id, - emoji_name: emoji?.name ?? welcomeChannelData.emoji, - channel_id: this.channels.resolveId(welcomeChannelData.channel), - description: welcomeChannelData.description - }; - }); - const patchData = await this.client.api.guilds(this.id, "welcome-screen").patch({ - data: { - welcome_channels, - description, - enabled - } - }); - return new WelcomeScreen(this, patchData); - } - setExplicitContentFilter(explicitContentFilter, reason) { - return this.edit({ explicitContentFilter }, reason); - } - setDefaultMessageNotifications(defaultMessageNotifications, reason) { - return this.edit({ defaultMessageNotifications }, reason); - } - setSystemChannelFlags(systemChannelFlags, reason) { - return this.edit({ systemChannelFlags }, reason); - } - setName(name, reason) { - return this.edit({ name }, reason); - } - setVerificationLevel(verificationLevel, reason) { - return this.edit({ verificationLevel }, reason); - } - setAFKChannel(afkChannel, reason) { - return this.edit({ afkChannel }, reason); - } - setSystemChannel(systemChannel, reason) { - return this.edit({ systemChannel }, reason); - } - setAFKTimeout(afkTimeout, reason) { - return this.edit({ afkTimeout }, reason); - } - setIcon(icon, reason) { - return this.edit({ icon }, reason); - } - setOwner(owner, reason) { - return this.edit({ owner }, reason); - } - setSplash(splash, reason) { - return this.edit({ splash }, reason); - } - setDiscoverySplash(discoverySplash, reason) { - return this.edit({ discoverySplash }, reason); - } - setBanner(banner, reason) { - return this.edit({ banner }, reason); - } - setRulesChannel(rulesChannel, reason) { - return this.edit({ rulesChannel }, reason); - } - setPublicUpdatesChannel(publicUpdatesChannel, reason) { - return this.edit({ publicUpdatesChannel }, reason); - } - setPreferredLocale(preferredLocale, reason) { - return this.edit({ preferredLocale }, reason); - } - setSafetyAlertsChannel(safetyAlertsChannel, reason) { - return this.edit({ safetyAlertsChannel }, reason); - } - setPremiumProgressBarEnabled(enabled = true, reason) { - return this.edit({ premiumProgressBarEnabled: enabled }, reason); - } - setChannelPositions(channelPositions) { - if (!deprecationEmittedForSetChannelPositions) { - process2.emitWarning("The Guild#setChannelPositions method is deprecated. Use GuildChannelManager#setPositions instead.", "DeprecationWarning"); - deprecationEmittedForSetChannelPositions = true; - } - return this.channels.setPositions(channelPositions); - } - setRolePositions(rolePositions) { - if (!deprecationEmittedForSetRolePositions) { - process2.emitWarning("The Guild#setRolePositions method is deprecated. Use RoleManager#setPositions instead.", "DeprecationWarning"); - deprecationEmittedForSetRolePositions = true; - } - return this.roles.setPositions(rolePositions); - } - async setWidgetSettings(settings, reason) { - await this.client.api.guilds(this.id).widget.patch({ - data: { - enabled: settings.enabled, - channel_id: this.channels.resolveId(settings.channel) - }, - reason - }); - return this; - } - disableInvites(disabled = true) { - const features = this.features.filter((feature) => feature !== "INVITES_DISABLED"); - if (disabled) - features.push("INVITES_DISABLED"); - return this.edit({ features }); - } - setIncidentActions(incidentActions) { - return this.client.guilds.setIncidentActions(this.id, incidentActions); - } - async leave() { - if (this.ownerId === this.client.user.id) - throw new Error2("GUILD_OWNED"); - await this.client.api.users("@me").guilds(this.id).delete(); - return this.client.actions.GuildDelete.handle({ id: this.id }).guild; - } - async delete() { - await this.client.api.guilds(this.id).delete(); - return this.client.actions.GuildDelete.handle({ id: this.id }).guild; - } - equals(guild) { - return guild && guild instanceof this.constructor && this.id === guild.id && this.available === guild.available && this.splash === guild.splash && this.discoverySplash === guild.discoverySplash && this.name === guild.name && this.memberCount === guild.memberCount && this.large === guild.large && this.icon === guild.icon && this.ownerId === guild.ownerId && this.verificationLevel === guild.verificationLevel && (this.features === guild.features || this.features.length === guild.features.length && this.features.every((feat, i) => feat === guild.features[i])); - } - toJSON() { - const json = super.toJSON({ - available: false, - createdTimestamp: true, - nameAcronym: true, - presences: false, - voiceStates: false - }); - json.iconURL = this.iconURL(); - json.splashURL = this.splashURL(); - json.discoverySplashURL = this.discoverySplashURL(); - json.bannerURL = this.bannerURL(); - return json; - } - markAsRead() { - return this.client.api.guilds(this.id).ack.post(); - } - async setCommunity(stats = true, publicUpdatesChannel, rulesChannel, reason) { - if (stats) { - const everyoneRole = this.roles.everyone; - if (everyoneRole.mentionable) { - await everyoneRole.setMentionable(false, reason); - } - return this.edit({ - defaultMessageNotifications: "ONLY_MENTIONS", - explicitContentFilter: "ALL_MEMBERS", - features: [...this.features, "COMMUNITY"], - publicUpdatesChannel: this.channels.resolveId(publicUpdatesChannel) || "1", - rulesChannel: this.channels.resolveId(rulesChannel) || "1", - verificationLevel: VerificationLevels[this.verificationLevel] < 1 ? "LOW" : this.verificationLevel - }, reason); - } else { - return this.edit({ - publicUpdatesChannel: null, - rulesChannel: null, - features: this.features.filter((f) => f !== "COMMUNITY"), - preferredLocale: this.preferredLocale, - description: this.description - }, reason); - } - } - topEmojis() { - return new Promise((resolve, reject) => { - this.client.api.guilds(this.id)["top-emojis"].get().then((data) => { - const emojis = new Collection; - for (const emoji of data.items) { - emojis.set(emoji.emoji_rank, this.emojis.cache.get(emoji.emoji_id)); - } - resolve(emojis); - }).catch(reject); - }); - } - async setVanityCode(code = "") { - if (typeof code !== "string") - throw new TypeError("INVALID_VANITY_URL_CODE"); - const data = await this.client.api.guilds(this.id, "vanity-url").patch({ - data: { code } - }); - this.vanityURLCode = data.code; - this.vanityURLUses = data.uses; - return data; - } - get voiceAdapterCreator() { - return (methods) => { - this.client.voice.adapters.set(this.id, methods); - return { - sendPayload: (data) => { - if (this.shard.status !== Status.READY) - return false; - this.shard.send(data); - return true; - }, - destroy: () => { - this.client.voice.adapters.delete(this.id); - } - }; - }; - } - _sortedRoles() { - return Util.discordSort(this.roles.cache); - } - _sortedChannels(channel) { - const category = channel.type === ChannelTypes.GUILD_CATEGORY; - return Util.discordSort(this.channels.cache.filter((c) => (["GUILD_TEXT", "GUILD_NEWS", "GUILD_STORE"].includes(channel.type) ? ["GUILD_TEXT", "GUILD_NEWS", "GUILD_STORE"].includes(c.type) : c.type === channel.type) && (category || c.parent === channel.parent))); - } - } - exports.Guild = Guild; - exports.deletedGuilds = deletedGuilds; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildDelete.js -var require_GuildDelete = __commonJS((exports, module) => { - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var Action = require_Action(); - var { deletedGuilds } = require_Guild(); - var { Events } = require_Constants(); - - class GuildDeleteAction extends Action { - constructor(client) { - super(client); - this.deleted = new Map; - } - handle(data) { - const client = this.client; - let guild = client.guilds.cache.get(data.id); - if (guild) { - if (data.unavailable) { - guild.available = false; - client.emit(Events.GUILD_UNAVAILABLE, guild); - return { - guild: null - }; - } - for (const channel of guild.channels.cache.values()) - this.client.channels._remove(channel.id); - client.voice.adapters.get(data.id)?.destroy(); - client.guilds.cache.delete(guild.id); - deletedGuilds.add(guild); - client.emit(Events.GUILD_DELETE, guild); - this.deleted.set(guild.id, guild); - this.scheduleForDeletion(guild.id); - } else { - guild = this.deleted.get(data.id) ?? null; - } - return { guild }; - } - scheduleForDeletion(id) { - setTimeout2(() => this.deleted.delete(id), this.client.options.restWsBridgeTimeout).unref(); - } - } - module.exports = GuildDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildEmojiCreate.js -var require_GuildEmojiCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildEmojiCreateAction extends Action { - handle(guild, createdEmoji) { - const already = guild.emojis.cache.has(createdEmoji.id); - const emoji = guild.emojis._add(createdEmoji); - if (!already) - this.client.emit(Events.GUILD_EMOJI_CREATE, emoji); - return { emoji }; - } - } - module.exports = GuildEmojiCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildEmojiDelete.js -var require_GuildEmojiDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedEmojis } = require_Emoji(); - var { Events } = require_Constants(); - - class GuildEmojiDeleteAction extends Action { - handle(emoji) { - emoji.guild.emojis.cache.delete(emoji.id); - deletedEmojis.add(emoji); - this.client.emit(Events.GUILD_EMOJI_DELETE, emoji); - return { emoji }; - } - } - module.exports = GuildEmojiDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildEmojiUpdate.js -var require_GuildEmojiUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildEmojiUpdateAction extends Action { - handle(current, data) { - const old = current._update(data); - this.client.emit(Events.GUILD_EMOJI_UPDATE, old, current); - return { emoji: current }; - } - } - module.exports = GuildEmojiUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildEmojisUpdate.js -var require_GuildEmojisUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - - class GuildEmojisUpdateAction extends Action { - handle(data) { - const guild = this.client.guilds.cache.get(data.guild_id); - if (!guild?.emojis) - return; - const deletions = new Map(guild.emojis.cache); - for (const emoji of data.emojis) { - const cachedEmoji = guild.emojis.cache.get(emoji.id); - if (cachedEmoji) { - deletions.delete(emoji.id); - if (!cachedEmoji.equals(emoji)) { - this.client.actions.GuildEmojiUpdate.handle(cachedEmoji, emoji); - } - } else { - this.client.actions.GuildEmojiCreate.handle(guild, emoji); - } - } - for (const emoji of deletions.values()) { - this.client.actions.GuildEmojiDelete.handle(emoji); - } - } - } - module.exports = GuildEmojisUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildIntegrationsUpdate.js -var require_GuildIntegrationsUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildIntegrationsUpdate extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) - client.emit(Events.GUILD_INTEGRATIONS_UPDATE, guild); - } - } - module.exports = GuildIntegrationsUpdate; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildMemberRemove.js -var require_GuildMemberRemove = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedGuildMembers } = require_GuildMember(); - var { Events, Status } = require_Constants(); - - class GuildMemberRemoveAction extends Action { - handle(data, shard) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - let member = null; - if (guild) { - member = this.getMember({ user: data.user }, guild); - guild.memberCount--; - if (member) { - deletedGuildMembers.add(member); - guild.members.cache.delete(member.id); - if (shard.status === Status.READY) - client.emit(Events.GUILD_MEMBER_REMOVE, member); - } - guild.presences.cache.delete(data.user.id); - guild.voiceStates.cache.delete(data.user.id); - } - return { guild, member }; - } - } - module.exports = GuildMemberRemoveAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildMemberUpdate.js -var require_GuildMemberUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Status, Events } = require_Constants(); - - class GuildMemberUpdateAction extends Action { - handle(data, shard) { - const { client } = this; - if (data.user.username) { - const user = client.users.cache.get(data.user.id); - if (!user) { - client.users._add(data.user); - } else if (!user._equals(data.user)) { - client.actions.UserUpdate.handle(data.user); - } - } - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const member = this.getMember({ user: data.user }, guild); - if (member) { - const old = member._update(data); - if (shard.status === Status.READY && !member.equals(old)) - client.emit(Events.GUILD_MEMBER_UPDATE, old, member); - } else { - const newMember = guild.members._add(data); - this.client.emit(Events.GUILD_MEMBER_AVAILABLE, newMember); - } - } - } - } - module.exports = GuildMemberUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildRoleCreate.js -var require_GuildRoleCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildRoleCreate extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - let role; - if (guild) { - const already = guild.roles.cache.has(data.role.id); - role = guild.roles._add(data.role); - if (!already) - client.emit(Events.GUILD_ROLE_CREATE, role); - } - return { role }; - } - } - module.exports = GuildRoleCreate; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildRoleDelete.js -var require_GuildRoleDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedRoles } = require_Role(); - var { Events } = require_Constants(); - - class GuildRoleDeleteAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - let role; - if (guild) { - role = guild.roles.cache.get(data.role_id); - if (role) { - guild.roles.cache.delete(data.role_id); - deletedRoles.add(role); - client.emit(Events.GUILD_ROLE_DELETE, role); - } - } - return { role }; - } - } - module.exports = GuildRoleDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildRoleUpdate.js -var require_GuildRoleUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildRoleUpdateAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - let old = null; - const role = guild.roles.cache.get(data.role.id); - if (role) { - old = role._update(data.role); - client.emit(Events.GUILD_ROLE_UPDATE, old, role); - } - return { - old, - updated: role - }; - } - return { - old: null, - updated: null - }; - } - } - module.exports = GuildRoleUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildRolesPositionUpdate.js -var require_GuildRolesPositionUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - - class GuildRolesPositionUpdate extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - for (const partialRole of data.roles) { - const role = guild.roles.cache.get(partialRole.id); - if (role) - role.rawPosition = partialRole.position; - } - } - return { guild }; - } - } - module.exports = GuildRolesPositionUpdate; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildScheduledEventCreate.js -var require_GuildScheduledEventCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildScheduledEventCreateAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const guildScheduledEvent = guild.scheduledEvents._add(data); - client.emit(Events.GUILD_SCHEDULED_EVENT_CREATE, guildScheduledEvent); - return { guildScheduledEvent }; - } - return {}; - } - } - module.exports = GuildScheduledEventCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildScheduledEventDelete.js -var require_GuildScheduledEventDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildScheduledEventDeleteAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const guildScheduledEvent = this.getScheduledEvent(data, guild); - if (guildScheduledEvent) { - guild.scheduledEvents.cache.delete(guildScheduledEvent.id); - client.emit(Events.GUILD_SCHEDULED_EVENT_DELETE, guildScheduledEvent); - return { guildScheduledEvent }; - } - } - return {}; - } - } - module.exports = GuildScheduledEventDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildScheduledEventUpdate.js -var require_GuildScheduledEventUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildScheduledEventUpdateAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const oldGuildScheduledEvent = guild.scheduledEvents.cache.get(data.id)?._clone() ?? null; - const newGuildScheduledEvent = guild.scheduledEvents._add(data); - client.emit(Events.GUILD_SCHEDULED_EVENT_UPDATE, oldGuildScheduledEvent, newGuildScheduledEvent); - return { oldGuildScheduledEvent, newGuildScheduledEvent }; - } - return {}; - } - } - module.exports = GuildScheduledEventUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildScheduledEventUserAdd.js -var require_GuildScheduledEventUserAdd = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildScheduledEventUserAddAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const guildScheduledEvent = this.getScheduledEvent(data, guild); - const user = this.getUser(data); - if (guildScheduledEvent && user) { - client.emit(Events.GUILD_SCHEDULED_EVENT_USER_ADD, guildScheduledEvent, user); - return { guildScheduledEvent, user }; - } - } - return {}; - } - } - module.exports = GuildScheduledEventUserAddAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildScheduledEventUserRemove.js -var require_GuildScheduledEventUserRemove = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildScheduledEventUserRemoveAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const guildScheduledEvent = this.getScheduledEvent(data, guild); - const user = this.getUser(data); - if (guildScheduledEvent && user) { - client.emit(Events.GUILD_SCHEDULED_EVENT_USER_REMOVE, guildScheduledEvent, user); - return { guildScheduledEvent, user }; - } - } - return {}; - } - } - module.exports = GuildScheduledEventUserRemoveAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildStickerCreate.js -var require_GuildStickerCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildStickerCreateAction extends Action { - handle(guild, createdSticker) { - const already = guild.stickers.cache.has(createdSticker.id); - const sticker = guild.stickers._add(createdSticker); - if (!already) - this.client.emit(Events.GUILD_STICKER_CREATE, sticker); - return { sticker }; - } - } - module.exports = GuildStickerCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildStickerDelete.js -var require_GuildStickerDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedStickers } = require_Sticker(); - var { Events } = require_Constants(); - - class GuildStickerDeleteAction extends Action { - handle(sticker) { - sticker.guild.stickers.cache.delete(sticker.id); - deletedStickers.add(sticker); - this.client.emit(Events.GUILD_STICKER_DELETE, sticker); - return { sticker }; - } - } - module.exports = GuildStickerDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildStickerUpdate.js -var require_GuildStickerUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildStickerUpdateAction extends Action { - handle(current, data) { - const old = current._update(data); - this.client.emit(Events.GUILD_STICKER_UPDATE, old, current); - return { sticker: current }; - } - } - module.exports = GuildStickerUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildStickersUpdate.js -var require_GuildStickersUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - - class GuildStickersUpdateAction extends Action { - handle(data) { - const guild = this.client.guilds.cache.get(data.guild_id); - if (!guild?.stickers) - return; - const deletions = new Map(guild.stickers.cache); - for (const sticker of data.stickers) { - const cachedSticker = guild.stickers.cache.get(sticker.id); - if (cachedSticker) { - deletions.delete(sticker.id); - if (!cachedSticker.equals(sticker)) { - this.client.actions.GuildStickerUpdate.handle(cachedSticker, sticker); - } - } else { - this.client.actions.GuildStickerCreate.handle(guild, sticker); - } - } - for (const sticker of deletions.values()) { - this.client.actions.GuildStickerDelete.handle(sticker); - } - } - } - module.exports = GuildStickersUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/GuildUpdate.js -var require_GuildUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class GuildUpdateAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.id); - if (guild) { - const old = guild._update(data); - client.emit(Events.GUILD_UPDATE, old, guild); - return { - old, - updated: guild - }; - } - return { - old: null, - updated: null - }; - } - } - module.exports = GuildUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/InviteCreate.js -var require_InviteCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class InviteCreateAction extends Action { - handle(data) { - const client = this.client; - const channel = client.channels.cache.get(data.channel_id); - const guild = client.guilds.cache.get(data.guild_id); - if (!channel) - return false; - const inviteData = Object.assign(data, { channel, guild }); - const invite = guild.invites._add(inviteData); - client.emit(Events.INVITE_CREATE, invite); - return { invite }; - } - } - module.exports = InviteCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/InviteDelete.js -var require_InviteDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var Invite = require_Invite(); - var { Events } = require_Constants(); - - class InviteDeleteAction extends Action { - handle(data) { - const client = this.client; - const channel = client.channels.cache.get(data.channel_id); - const guild = client.guilds.cache.get(data.guild_id); - if (!channel) - return false; - const inviteData = Object.assign(data, { channel, guild }); - const invite = new Invite(client, inviteData); - guild.invites.cache.delete(invite.code); - client.emit(Events.INVITE_DELETE, invite); - return { invite }; - } - } - module.exports = InviteDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageCreate.js -var require_MessageCreate = __commonJS((exports, module) => { - var process2 = import.meta.require("process"); - var Action = require_Action(); - var { Events } = require_Constants(); - var deprecationEmitted = false; - - class MessageCreateAction extends Action { - handle(data) { - const client = this.client; - const channel = this.getChannel({ - id: data.channel_id, - author: data.author, - ..."guild_id" in data && { guild_id: data.guild_id } - }); - if (channel) { - if (!channel.isText()) - return {}; - const existing = channel.messages.cache.get(data.id); - if (existing && existing.author?.id !== this.client.user.id) - return { message: existing }; - const message = existing ?? channel.messages._add(data); - channel.lastMessageId = data.id; - client.emit(Events.MESSAGE_CREATE, message); - if (client.emit("message", message) && !deprecationEmitted) { - deprecationEmitted = true; - process2.emitWarning("The message event is deprecated. Use messageCreate instead", "DeprecationWarning"); - } - return { message }; - } - return {}; - } - } - module.exports = MessageCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageDelete.js -var require_MessageDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedMessages } = require_Message(); - var { Events } = require_Constants(); - - class MessageDeleteAction extends Action { - handle(data) { - const client = this.client; - const channel = this.getChannel({ id: data.channel_id, ..."guild_id" in data && { guild_id: data.guild_id } }); - let message; - if (channel) { - if (!channel.isText()) - return {}; - message = this.getMessage(data, channel); - if (message) { - channel.messages.cache.delete(message.id); - deletedMessages.add(message); - client.emit(Events.MESSAGE_DELETE, message); - } - } - return { message }; - } - } - module.exports = MessageDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageDeleteBulk.js -var require_MessageDeleteBulk = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Action = require_Action(); - var { deletedMessages } = require_Message(); - var { Events } = require_Constants(); - - class MessageDeleteBulkAction extends Action { - handle(data) { - const client = this.client; - const channel = client.channels.cache.get(data.channel_id); - if (channel) { - if (!channel.isText()) - return {}; - const ids = data.ids; - const messages = new Collection; - for (const id of ids) { - const message = this.getMessage({ - id, - guild_id: data.guild_id - }, channel, false); - if (message) { - deletedMessages.add(message); - messages.set(message.id, message); - channel.messages.cache.delete(id); - } - } - if (messages.size > 0) - client.emit(Events.MESSAGE_BULK_DELETE, messages); - return { messages }; - } - return {}; - } - } - module.exports = MessageDeleteBulkAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessagePollVoteAdd.js -var require_MessagePollVoteAdd = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class MessagePollVoteAddAction extends Action { - handle(data) { - const channel = this.getChannel(data); - if (!channel?.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const { poll } = message; - const answer = poll?.answers.get(data.answer_id); - if (!answer) - return false; - answer.voteCount++; - this.client.emit(Events.MESSAGE_POLL_VOTE_ADD, answer, data.user_id); - return { poll }; - } - } - module.exports = MessagePollVoteAddAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessagePollVoteRemove.js -var require_MessagePollVoteRemove = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class MessagePollVoteRemoveAction extends Action { - handle(data) { - const channel = this.getChannel(data); - if (!channel?.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const { poll } = message; - const answer = poll?.answers.get(data.answer_id); - if (!answer) - return false; - answer.voteCount--; - this.client.emit(Events.MESSAGE_POLL_VOTE_REMOVE, answer, data.user_id); - return { poll }; - } - } - module.exports = MessagePollVoteRemoveAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageReactionAdd.js -var require_MessageReactionAdd = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - var { PartialTypes } = require_Constants(); - - class MessageReactionAdd extends Action { - handle(data, fromStructure = false) { - if (!data.emoji) - return false; - const user = this.getUserFromMember(data); - if (!user) - return false; - const channel = this.getChannel({ - id: data.channel_id, - user_id: data.user_id, - ..."guild_id" in data && { guild_id: data.guild_id } - }); - if (!channel || !channel.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const includePartial = this.client.options.partials.includes(PartialTypes.REACTION); - if (message.partial && !includePartial) - return false; - const reaction = message.reactions._add({ - emoji: data.emoji, - count: message.partial ? null : 0, - me: user.id === this.client.user.id, - ...data - }); - if (!reaction) - return false; - reaction._add(user, data.burst); - if (fromStructure) - return { message, reaction, user }; - this.client.emit(Events.MESSAGE_REACTION_ADD, reaction, user, { type: data.type, burst: data.burst }); - return { message, reaction, user }; - } - } - module.exports = MessageReactionAdd; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageReactionRemove.js -var require_MessageReactionRemove = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class MessageReactionRemove extends Action { - handle(data) { - if (!data.emoji) - return false; - const user = this.getUser(data); - if (!user) - return false; - const channel = this.getChannel({ - id: data.channel_id, - user_id: data.user_id, - ..."guild_id" in data && { guild_id: data.guild_id } - }); - if (!channel || !channel.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const reaction = this.getReaction(data, message, user); - if (!reaction) - return false; - reaction._remove(user, data.burst); - this.client.emit(Events.MESSAGE_REACTION_REMOVE, reaction, user, { type: data.type, burst: data.burst }); - return { message, reaction, user }; - } - } - module.exports = MessageReactionRemove; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageReactionRemoveAll.js -var require_MessageReactionRemoveAll = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class MessageReactionRemoveAll extends Action { - handle(data) { - const channel = this.getChannel({ id: data.channel_id, ..."guild_id" in data && { guild_id: data.guild_id } }); - if (!channel || !channel.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const removed = message.reactions.cache.clone(); - message.reactions.cache.clear(); - this.client.emit(Events.MESSAGE_REACTION_REMOVE_ALL, message, removed); - return { message }; - } - } - module.exports = MessageReactionRemoveAll; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageReactionRemoveEmoji.js -var require_MessageReactionRemoveEmoji = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class MessageReactionRemoveEmoji extends Action { - handle(data) { - const channel = this.getChannel({ id: data.channel_id, ..."guild_id" in data && { guild_id: data.guild_id } }); - if (!channel || !channel.isText()) - return false; - const message = this.getMessage(data, channel); - if (!message) - return false; - const reaction = this.getReaction(data, message); - if (!reaction) - return false; - if (!message.partial) - message.reactions.cache.delete(reaction.emoji.id ?? reaction.emoji.name); - this.client.emit(Events.MESSAGE_REACTION_REMOVE_EMOJI, reaction); - return { reaction }; - } - } - module.exports = MessageReactionRemoveEmoji; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/MessageUpdate.js -var require_MessageUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - - class MessageUpdateAction extends Action { - handle(data) { - const channel = this.getChannel({ id: data.channel_id, ..."guild_id" in data && { guild_id: data.guild_id } }); - if (channel) { - if (!channel.isText()) - return {}; - const { id, channel_id, guild_id, author, timestamp, type } = data; - const message = this.getMessage({ id, channel_id, guild_id, author, timestamp, type }, channel); - if (message) { - const old = message._update(data); - return { - old, - updated: message - }; - } - } - return {}; - } - } - module.exports = MessageUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/PresenceUpdate.js -var require_PresenceUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - var { PartialTypes } = require_Constants(); - - class PresenceUpdateAction extends Action { - handle(data) { - let user = this.client.users.cache.get(data.user.id); - if (!user && data.user?.username) - user = this.client.users._add(data.user); - if (!user && (("username" in data.user) || this.client.options.partials.includes(PartialTypes.USER))) { - user = this.client.users._add(data.user); - } - if (!user) - return; - if (data.user?.username) { - if (!user._equals(data.user)) - this.client.actions.UserUpdate.handle(data.user); - } - const guild = this.client.guilds.cache.get(data.guild_id); - if (guild) { - let member = guild.members.cache.get(user.id); - if (!member && data.status !== "offline") { - member = guild.members._add({ - user, - deaf: false, - mute: false - }); - this.client.emit(Events.GUILD_MEMBER_AVAILABLE, member); - } - } - const oldPresence = (guild || this.client).presences.cache.get(user.id)?._clone() ?? null; - const newPresence = (guild || this.client).presences._add(Object.assign(data, { guild })); - if (this.client.listenerCount(Events.PRESENCE_UPDATE) && !newPresence.equals(oldPresence)) { - this.client.emit(Events.PRESENCE_UPDATE, oldPresence, newPresence); - } - } - } - module.exports = PresenceUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/StageInstanceCreate.js -var require_StageInstanceCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class StageInstanceCreateAction extends Action { - handle(data) { - const client = this.client; - const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); - if (channel) { - const stageInstance = channel.guild.stageInstances._add(data); - client.emit(Events.STAGE_INSTANCE_CREATE, stageInstance); - return { stageInstance }; - } - return {}; - } - } - module.exports = StageInstanceCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/StageInstanceDelete.js -var require_StageInstanceDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedStageInstances } = require_StageInstance(); - var { Events } = require_Constants(); - - class StageInstanceDeleteAction extends Action { - handle(data) { - const client = this.client; - const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); - if (channel) { - const stageInstance = channel.guild.stageInstances._add(data); - if (stageInstance) { - channel.guild.stageInstances.cache.delete(stageInstance.id); - deletedStageInstances.add(stageInstance); - client.emit(Events.STAGE_INSTANCE_DELETE, stageInstance); - return { stageInstance }; - } - } - return {}; - } - } - module.exports = StageInstanceDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/StageInstanceUpdate.js -var require_StageInstanceUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class StageInstanceUpdateAction extends Action { - handle(data) { - const client = this.client; - const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id }); - if (channel) { - const oldStageInstance = channel.guild.stageInstances.cache.get(data.id)?._clone() ?? null; - const newStageInstance = channel.guild.stageInstances._add(data); - client.emit(Events.STAGE_INSTANCE_UPDATE, oldStageInstance, newStageInstance); - return { oldStageInstance, newStageInstance }; - } - return {}; - } - } - module.exports = StageInstanceUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ThreadCreate.js -var require_ThreadCreate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class ThreadCreateAction extends Action { - handle(data) { - const client = this.client; - const existing = client.channels.cache.has(data.id); - const thread = client.channels._add(data); - if (!existing && thread) { - client.emit(Events.THREAD_CREATE, thread, data.newly_created ?? false); - } - return { thread }; - } - } - module.exports = ThreadCreateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ThreadDelete.js -var require_ThreadDelete = __commonJS((exports, module) => { - var Action = require_Action(); - var { deletedChannels } = require_Channel(); - var { deletedMessages } = require_Message(); - var { Events } = require_Constants(); - - class ThreadDeleteAction extends Action { - handle(data) { - const client = this.client; - const thread = client.channels.cache.get(data.id); - if (thread) { - client.channels._remove(thread.id); - deletedChannels.add(thread); - for (const message of thread.messages.cache.values()) { - deletedMessages.add(message); - } - client.emit(Events.THREAD_DELETE, thread); - } - return { thread }; - } - } - module.exports = ThreadDeleteAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ThreadListSync.js -var require_ThreadListSync = __commonJS((exports, module) => { - var { Collection } = require_dist(); - var Action = require_Action(); - var { Events } = require_Constants(); - - class ThreadListSyncAction extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (!guild) - return {}; - if (data.channel_ids) { - for (const id of data.channel_ids) { - const channel = client.channels.cache.get(id); - if (channel) - this.removeStale(channel); - } - } else { - for (const channel of guild.channels.cache.values()) { - this.removeStale(channel); - } - } - const syncedThreads = data.threads.reduce((coll, rawThread) => { - const thread = client.channels._add(rawThread); - return coll.set(thread.id, thread); - }, new Collection); - for (const rawMember of Object.values(data.members || {})) { - const thread = client.channels.cache.get(rawMember.id); - if (thread) { - thread.members._add(rawMember); - } - } - client.emit(Events.THREAD_LIST_SYNC, syncedThreads); - return { - syncedThreads - }; - } - removeStale(channel) { - channel.threads?.cache.forEach((thread) => { - if (!thread.archived) { - this.client.channels._remove(thread.id); - } - }); - } - } - module.exports = ThreadListSyncAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ThreadMemberUpdate.js -var require_ThreadMemberUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class ThreadMemberUpdateAction extends Action { - handle(data) { - const client = this.client; - const thread = client.channels.cache.get(data.id); - if (thread) { - const member = thread.members.cache.get(data.user_id); - if (!member) { - const newMember = thread.members._add(data); - return { newMember }; - } - const old = member._update(data); - client.emit(Events.THREAD_MEMBER_UPDATE, old, member); - } - return {}; - } - } - module.exports = ThreadMemberUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ThreadMembersUpdate.js -var require_ThreadMembersUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class ThreadMembersUpdateAction extends Action { - handle(data) { - const client = this.client; - const thread = client.channels.cache.get(data.id); - if (thread) { - const old = thread.members.cache.clone(); - thread.memberCount = data.member_count; - data.added_members?.forEach((rawMember) => { - thread.members._add(rawMember); - }); - data.removed_member_ids?.forEach((memberId) => { - thread.members.cache.delete(memberId); - }); - client.emit(Events.THREAD_MEMBERS_UPDATE, old, thread.members.cache); - } - return {}; - } - } - module.exports = ThreadMembersUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/structures/Typing.js -var require_Typing = __commonJS((exports, module) => { - var Base = require_Base(); - - class Typing extends Base { - constructor(channel, user, data) { - super(channel.client); - this.channel = channel; - this.user = user; - this._patch(data); - } - _patch(data) { - if ("timestamp" in data) { - this.startedTimestamp = data.timestamp * 1000; - } - } - inGuild() { - return this.guild !== null; - } - get startedAt() { - return new Date(this.startedTimestamp); - } - get guild() { - return this.channel.guild ?? null; - } - get member() { - return this.guild?.members.resolve(this.user) ?? null; - } - } - module.exports = Typing; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/TypingStart.js -var require_TypingStart = __commonJS((exports, module) => { - var Action = require_Action(); - var Typing = require_Typing(); - var { Events } = require_Constants(); - - class TypingStart extends Action { - handle(data) { - const channel = this.getChannel({ id: data.channel_id, ..."guild_id" in data && { guild_id: data.guild_id } }); - if (!channel) - return; - if (!channel.isText()) { - this.client.emit(Events.WARN, `Discord sent a typing packet to a ${channel.type} channel ${channel.id}`); - return; - } - const user = this.getUserFromMember(data); - if (user) { - this.client.emit(Events.TYPING_START, new Typing(channel, user, data)); - } - } - } - module.exports = TypingStart; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/UserUpdate.js -var require_UserUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class UserUpdateAction extends Action { - handle(data) { - const client = this.client; - const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id); - const oldUser = newUser._update(data); - if (!oldUser.equals(newUser)) { - client.emit(Events.USER_UPDATE, oldUser, newUser); - return { - old: oldUser, - updated: newUser - }; - } - return { - old: null, - updated: null - }; - } - } - module.exports = UserUpdateAction; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/VoiceStateUpdate.js -var require_VoiceStateUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var VoiceState = require_VoiceState(); - var { Events } = require_Constants(); - - class VoiceStateUpdate extends Action { - handle(data) { - const client = this.client; - const guild = client.guilds.cache.get(data.guild_id); - if (guild) { - const oldState = guild.voiceStates.cache.get(data.user_id)?._clone() ?? new VoiceState(guild, { user_id: data.user_id }); - const newState = guild.voiceStates._add(data); - let member = guild.members.cache.get(data.user_id); - if (member && data.member) { - member._patch(data.member); - } else if (data.member?.user && data.member.joined_at) { - member = guild.members._add(data.member); - } - client.emit(Events.VOICE_STATE_UPDATE, oldState, newState); - } else { - const oldState = client.voiceStates.cache.get(data.user_id)?._clone() ?? new VoiceState({ client }, { user_id: data.user_id }); - const newState = client.voiceStates._add(data); - client.emit(Events.VOICE_STATE_UPDATE, oldState, newState); - } - if (data.user_id === client.user?.id) { - client.emit("debug", `[VOICE] received voice state update: ${JSON.stringify(data)}`); - client.voice.onVoiceStateUpdate(data); - } - } - } - module.exports = VoiceStateUpdate; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/WebhooksUpdate.js -var require_WebhooksUpdate = __commonJS((exports, module) => { - var Action = require_Action(); - var { Events } = require_Constants(); - - class WebhooksUpdate extends Action { - handle(data) { - const client = this.client; - const channel = client.channels.cache.get(data.channel_id); - if (channel) - client.emit(Events.WEBHOOKS_UPDATE, channel); - } - } - module.exports = WebhooksUpdate; -}); - -// node_modules/discord.js-selfbot-v13/src/client/actions/ActionsManager.js -var require_ActionsManager = __commonJS((exports, module) => { - class ActionsManager { - constructor(client) { - this.client = client; - this.injectedUser = Symbol("djs.actions.injectedUser"); - this.injectedChannel = Symbol("djs.actions.injectedChannel"); - this.injectedMessage = Symbol("djs.actions.injectedMessage"); - this.register(require_ApplicationCommandPermissionsUpdate()); - this.register(require_AutoModerationActionExecution2()); - this.register(require_AutoModerationRuleCreate()); - this.register(require_AutoModerationRuleDelete()); - this.register(require_AutoModerationRuleUpdate()); - this.register(require_ChannelCreate()); - this.register(require_ChannelDelete()); - this.register(require_ChannelUpdate()); - this.register(require_GuildAuditLogEntryCreate()); - this.register(require_GuildBanAdd()); - this.register(require_GuildBanRemove()); - this.register(require_GuildChannelsPositionUpdate()); - this.register(require_GuildDelete()); - this.register(require_GuildEmojiCreate()); - this.register(require_GuildEmojiDelete()); - this.register(require_GuildEmojiUpdate()); - this.register(require_GuildEmojisUpdate()); - this.register(require_GuildIntegrationsUpdate()); - this.register(require_GuildMemberRemove()); - this.register(require_GuildMemberUpdate()); - this.register(require_GuildRoleCreate()); - this.register(require_GuildRoleDelete()); - this.register(require_GuildRoleUpdate()); - this.register(require_GuildRolesPositionUpdate()); - this.register(require_GuildScheduledEventCreate()); - this.register(require_GuildScheduledEventDelete()); - this.register(require_GuildScheduledEventUpdate()); - this.register(require_GuildScheduledEventUserAdd()); - this.register(require_GuildScheduledEventUserRemove()); - this.register(require_GuildStickerCreate()); - this.register(require_GuildStickerDelete()); - this.register(require_GuildStickerUpdate()); - this.register(require_GuildStickersUpdate()); - this.register(require_GuildUpdate()); - this.register(require_InviteCreate()); - this.register(require_InviteDelete()); - this.register(require_MessageCreate()); - this.register(require_MessageDelete()); - this.register(require_MessageDeleteBulk()); - this.register(require_MessagePollVoteAdd()); - this.register(require_MessagePollVoteRemove()); - this.register(require_MessageReactionAdd()); - this.register(require_MessageReactionRemove()); - this.register(require_MessageReactionRemoveAll()); - this.register(require_MessageReactionRemoveEmoji()); - this.register(require_MessageUpdate()); - this.register(require_PresenceUpdate()); - this.register(require_StageInstanceCreate()); - this.register(require_StageInstanceDelete()); - this.register(require_StageInstanceUpdate()); - this.register(require_ThreadCreate()); - this.register(require_ThreadDelete()); - this.register(require_ThreadListSync()); - this.register(require_ThreadMemberUpdate()); - this.register(require_ThreadMembersUpdate()); - this.register(require_TypingStart()); - this.register(require_UserUpdate()); - this.register(require_VoiceStateUpdate()); - this.register(require_WebhooksUpdate()); - } - register(Action) { - this[Action.name.replace(/Action$/, "")] = new Action(this.client); - } - } - module.exports = ActionsManager; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/networking/VoiceUDPClient.js -var require_VoiceUDPClient = __commonJS((exports, module) => { - function parseLocalPacket(message) { - try { - const packet = Buffer2.from(message); - const address = packet.subarray(8, packet.indexOf(0, 8)).toString("utf8"); - if (!isIP(address)) { - throw new Error2("UDP_ADDRESS_MALFORMED"); - } - const port = packet.readUInt16BE(packet.length - 2); - return { address, port }; - } catch (error) { - return { error }; - } - } - var udp = import.meta.require("dgram"); - var EventEmitter = import.meta.require("events"); - var { isIP } = import.meta.require("net"); - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Error: Error2 } = require_errors(); - var { VoiceOpcodes } = require_Constants(); - var Util = require_Util(); - - class VoiceConnectionUDPClient extends EventEmitter { - constructor(voiceConnection) { - super(); - this.voiceConnection = voiceConnection; - this.socket = null; - this.discordAddress = null; - this.localAddress = null; - this.localPort = null; - this.voiceConnection.on("closing", this.shutdown.bind(this)); - } - shutdown() { - this.emit("debug", `[UDP] shutdown requested`); - if (this.socket) { - this.socket.removeAllListeners("message"); - try { - this.socket.close(); - } finally { - this.socket = null; - } - } - } - get discordPort() { - return this.voiceConnection.authentication.port; - } - send(packet) { - return new Promise((resolve, reject) => { - if (!this.socket) - throw new Error2("UDP_SEND_FAIL"); - if (!this.discordAddress || !this.discordPort) - throw new Error2("UDP_ADDRESS_MALFORMED"); - this.socket.send(packet, 0, packet.length, this.discordPort, this.discordAddress, (error) => { - if (error) { - this.emit("debug", `[UDP] >> ERROR: ${error}`); - reject(error); - } else { - resolve(packet); - } - }); - }); - } - async createUDPSocket(address) { - this.discordAddress = address; - const socket = this.socket = udp.createSocket("udp4"); - socket.on("error", (e) => { - this.emit("debug", `[UDP] Error: ${e}`); - this.emit("error", e); - }); - socket.on("close", () => { - this.emit("debug", "[UDP] socket closed"); - }); - this.emit("debug", `[UDP] created socket`); - socket.once("message", (message) => { - this.emit("debug", `[UDP] message: [${[...message]}] (${message})`); - if (message.readUInt16BE(0) !== 2) { - throw new Error2("UDP_WRONG_HANDSHAKE"); - } - if (!this.voiceConnection.sockets.ws) - return; - const packet = parseLocalPacket(message); - if (packet.error) { - this.emit("debug", `[UDP] ERROR: ${packet.error}`); - this.emit("error", packet.error); - return; - } - this.emit("debug", `[UDP] Parse local packet: ${packet.address}:${packet.port}`); - this.localAddress = packet.address; - this.localPort = packet.port; - this.voiceConnection.sockets.ws.sendPacket({ - op: VoiceOpcodes.SELECT_PROTOCOL, - d: { - protocol: "udp", - codecs: Util.getAllPayloadType(), - data: { - address: packet.address, - port: packet.port, - mode: this.voiceConnection.authentication.mode - } - } - }); - Object.defineProperty(this.voiceConnection, "videoCodec", { - value: this.voiceConnection.videoCodec, - writable: false - }); - this.emit("debug", `[UDP] << ${JSON.stringify(packet)}`); - socket.on("message", (buffer) => this.voiceConnection.receiver.packets.push(buffer)); - }); - const blankMessage = Buffer2.alloc(74); - blankMessage.writeUInt16BE(1, 0); - blankMessage.writeUInt16BE(70, 2); - blankMessage.writeUInt32BE(this.voiceConnection.authentication.ssrc, 4); - this.emit("debug", `Sending IP discovery packet: [${[...blankMessage]}]`); - await this.send(blankMessage); - this.emit("debug", `Successfully sent IP discovery packet`); - } - } - module.exports = VoiceConnectionUDPClient; -}); - -// node_modules/discord.js-selfbot-v13/src/WebSocket.js -var require_WebSocket = __commonJS((exports) => { - var erlpack; - var { Buffer: Buffer2 } = import.meta.require("buffer"); - try { - erlpack = (()=>{throw new Error(`Cannot require module "erlpack"`);})(); - if (!erlpack.pack) - erlpack = null; - } catch { - } - exports.WebSocket = import.meta.require("ws"); - var ab = new TextDecoder; - exports.encoding = erlpack ? "etf" : "json"; - exports.pack = erlpack ? erlpack.pack : JSON.stringify; - exports.unpack = (data, type) => { - if (exports.encoding === "json" || type === "json") { - if (typeof data !== "string") { - data = ab.decode(data); - } - return JSON.parse(data); - } - if (!Buffer2.isBuffer(data)) - data = Buffer2.from(new Uint8Array(data)); - return erlpack.unpack(data); - }; - exports.create = (gateway, query = {}, ...args) => { - const [g, q] = gateway.split("?"); - query.encoding = exports.encoding; - query = new URLSearchParams(query); - if (q) - new URLSearchParams(q).forEach((v, k) => query.set(k, v)); - const ws = new exports.WebSocket(`${g}?${query}`, ...args); - return ws; - }; - for (const state of ["CONNECTING", "OPEN", "CLOSING", "CLOSED"]) - exports[state] = exports.WebSocket[state]; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/networking/VoiceWebSocket.js -var require_VoiceWebSocket = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var { setTimeout: setTimeout2, setInterval: setInterval2 } = import.meta.require("timers"); - var WebSocket = require_WebSocket(); - var { Error: Error2 } = require_errors(); - var { Opcodes, VoiceOpcodes } = require_Constants(); - - class VoiceWebSocket extends EventEmitter { - constructor(connection) { - super(); - this.connection = connection; - this.attempts = 0; - this._sequenceNumber = -1; - this.dead = false; - this.connection.on("closing", this.shutdown.bind(this)); - } - get client() { - return this.connection.client; - } - shutdown() { - this.emit("debug", `[WS] shutdown requested`); - this.dead = true; - this.reset(); - } - reset() { - this.emit("debug", `[WS] reset requested`); - if (this.ws) { - if (this.ws.readyState !== WebSocket.CLOSED) - this.ws.close(); - this.ws = null; - } - this.clearHeartbeat(); - } - connect() { - this.emit("debug", `[WS] connect requested`); - if (this.dead) - return; - if (this.ws) - this.reset(); - if (this.attempts >= 5) { - this.emit("debug", new Error2("VOICE_CONNECTION_ATTEMPTS_EXCEEDED", this.attempts)); - return; - } - this.attempts++; - this.ws = WebSocket.create(`wss://${this.connection.authentication.endpoint}/`, { v: 8 }); - this.emit("debug", `[WS] connecting, ${this.attempts} attempts, ${this.ws.url}`); - this.ws.onopen = this.onOpen.bind(this); - this.ws.onmessage = this.onMessage.bind(this); - this.ws.onclose = this.onClose.bind(this); - this.ws.onerror = this.onError.bind(this); - } - send(data) { - this.emit("debug", `[WS] >> ${data}`); - return new Promise((resolve, reject) => { - if (!this.ws || this.ws.readyState !== WebSocket.OPEN) - throw new Error2("WS_NOT_OPEN", data); - this.ws.send(data, null, (error) => { - if (error) - reject(error); - else - resolve(data); - }); - }); - } - async sendPacket(packet) { - packet = JSON.stringify(packet); - return this.send(packet); - } - onOpen() { - this.emit("debug", `[WS] opened at gateway ${this.connection.authentication.endpoint}`); - this.sendPacket({ - op: Opcodes.DISPATCH, - d: { - server_id: this.connection.serverId || this.connection.channel.guild?.id || this.connection.channel.id, - user_id: this.client.user.id, - token: this.connection.authentication.token, - session_id: this.connection.authentication.sessionId, - streams: [{ type: "screen", rid: "100", quality: 100 }], - video: true - } - }).catch(() => { - this.emit("error", new Error2("VOICE_JOIN_SOCKET_CLOSED")); - }); - } - onMessage(event) { - try { - return this.onPacket(WebSocket.unpack(event.data, "json")); - } catch (error) { - return this.onError(error); - } - } - onClose(event) { - this.emit("debug", `[WS] closed with code ${event.code} and reason: ${event.reason}`); - if (!this.dead) - setTimeout2(this.connect.bind(this), this.attempts * 1000).unref(); - } - onError(error) { - this.emit("debug", `[WS] Error: ${error}`); - this.emit("error", error); - } - onPacket(packet) { - this.emit("debug", `[WS] << ${JSON.stringify(packet)}`); - if (packet.seq) - this._sequenceNumber = packet.seq; - switch (packet.op) { - case VoiceOpcodes.HELLO: - this.setHeartbeat(packet.d.heartbeat_interval); - break; - case VoiceOpcodes.READY: - this.emit("ready", packet.d); - this.connection.setVideoStatus(false); - break; - case VoiceOpcodes.SESSION_DESCRIPTION: - packet.d.secret_key = new Uint8Array(packet.d.secret_key); - this.emit("sessionDescription", packet.d); - break; - case VoiceOpcodes.CLIENT_CONNECT: - this.connection.ssrcMap.set(+packet.d.audio_ssrc, { - userId: packet.d.user_id, - speaking: 0, - hasVideo: Boolean(packet.d.video_ssrc) - }); - break; - case VoiceOpcodes.CLIENT_DISCONNECT: - const streamInfo = this.connection.receiver && this.connection.receiver.packets.streams.get(packet.d.user_id); - if (streamInfo) { - this.connection.receiver.packets.streams.delete(packet.d.user_id); - streamInfo.stream.push(null); - } - break; - case VoiceOpcodes.SPEAKING: - this.emit("startSpeaking", packet.d); - break; - case VoiceOpcodes.SOURCES: - this.emit("startStreaming", packet.d); - break; - default: - this.emit("unknownPacket", packet); - break; - } - } - setHeartbeat(interval) { - if (!interval || isNaN(interval)) { - this.onError(new Error2("VOICE_INVALID_HEARTBEAT")); - return; - } - if (this.heartbeatInterval) { - this.emit("warn", "A voice heartbeat interval is being overwritten"); - clearInterval(this.heartbeatInterval); - } - this.heartbeatInterval = setInterval2(this.sendHeartbeat.bind(this), interval).unref(); - } - clearHeartbeat() { - if (!this.heartbeatInterval) { - this.emit("warn", "Tried to clear a heartbeat interval that does not exist"); - return; - } - clearInterval(this.heartbeatInterval); - this.heartbeatInterval = null; - } - sendHeartbeat() { - this.sendPacket({ - op: VoiceOpcodes.HEARTBEAT, - d: { - t: Date.now(), - seq_ack: this._sequenceNumber - } - }).catch(() => { - this.emit("warn", "Tried to send heartbeat, but connection is not open"); - this.clearHeartbeat(); - }); - } - } - module.exports = VoiceWebSocket; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/util/loader.js -var require_loader = __commonJS((exports) => { - exports.require = function loader(list) { - const errorLog = []; - for (const [name, fn] of list) { - try { - const data = fn(import.meta.require(name)); - data.name = name; - return data; - } catch (e) { - errorLog.push(e); - } - } - throw new Error(errorLog.join("\n")); - }; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/opus/Opus.js -var require_Opus = __commonJS((exports, module) => { - function loadOpus(refresh = false) { - if (Opus.Encoder && !refresh) - return Opus; - Opus = loader.require([ - ["@discordjs/opus", (opus) => ({ Encoder: opus.OpusEncoder })], - ["node-opus", (opus) => ({ Encoder: opus.OpusEncoder })], - ["opusscript", (opus) => ({ Encoder: opus })] - ]); - return Opus; - } - var { Transform } = import.meta.require("stream"); - var loader = require_loader(); - var CTL = { - BITRATE: 4002, - FEC: 4012, - PLP: 4014 - }; - var Opus = {}; - var charCode = (x) => x.charCodeAt(0); - var OPUS_HEAD = Buffer.from([..."OpusHead"].map(charCode)); - var OPUS_TAGS = Buffer.from([..."OpusTags"].map(charCode)); - - class OpusStream extends Transform { - constructor(options = {}) { - if (!loadOpus().Encoder) { - throw Error("Could not find an Opus module! Please install @discordjs/opus, node-opus, or opusscript."); - } - super(Object.assign({ readableObjectMode: true }, options)); - if (Opus.name === "opusscript") { - options.application = Opus.Encoder.Application[options.application]; - } - this.encoder = new Opus.Encoder(options.rate, options.channels, options.application); - this._options = options; - this._required = this._options.frameSize * this._options.channels * 2; - } - _encode(buffer) { - return this.encoder.encode(buffer, this._options.frameSize); - } - _decode(buffer) { - return this.encoder.decode(buffer, Opus.name === "opusscript" ? null : this._options.frameSize); - } - static get type() { - return Opus.name; - } - setBitrate(bitrate) { - (this.encoder.applyEncoderCTL || this.encoder.encoderCTL).apply(this.encoder, [CTL.BITRATE, Math.min(128000, Math.max(16000, bitrate))]); - } - setFEC(enabled) { - (this.encoder.applyEncoderCTL || this.encoder.encoderCTL).apply(this.encoder, [CTL.FEC, enabled ? 1 : 0]); - } - setPLP(percentage) { - (this.encoder.applyEncoderCTL || this.encoder.encoderCTL).apply(this.encoder, [CTL.PLP, Math.min(100, Math.max(0, percentage * 100))]); - } - _final(cb) { - this._cleanup(); - cb(); - } - _destroy(err, cb) { - this._cleanup(); - return cb ? cb(err) : undefined; - } - _cleanup() { - if (Opus.name === "opusscript" && this.encoder) - this.encoder.delete(); - this.encoder = null; - } - } - - class Encoder extends OpusStream { - constructor(options) { - super(options); - this._buffer = Buffer.alloc(0); - } - _transform(chunk, encoding, done) { - this._buffer = Buffer.concat([this._buffer, chunk]); - let n = 0; - while (this._buffer.length >= this._required * (n + 1)) { - const buf = this._encode(this._buffer.slice(n * this._required, (n + 1) * this._required)); - this.push(buf); - n++; - } - if (n > 0) - this._buffer = this._buffer.slice(n * this._required); - return done(); - } - _destroy(err, cb) { - super._destroy(err, cb); - this._buffer = null; - } - } - - class Decoder extends OpusStream { - _transform(chunk, encoding, done) { - const signature = chunk.slice(0, 8); - if (chunk.length >= 8 && signature.equals(OPUS_HEAD)) { - this.emit("format", { - channels: this._options.channels, - sampleRate: this._options.rate, - bitDepth: 16, - float: false, - signed: true, - version: chunk.readUInt8(8), - preSkip: chunk.readUInt16LE(10), - gain: chunk.readUInt16LE(16) - }); - return done(); - } - if (chunk.length >= 8 && signature.equals(OPUS_TAGS)) { - this.emit("tags", chunk); - return done(); - } - try { - this.push(this._decode(chunk)); - } catch (e) { - return done(e); - } - return done(); - } - } - module.exports = { Decoder, Encoder }; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/opus/OggDemuxer.js -var require_OggDemuxer = __commonJS((exports, module) => { - var { Transform } = import.meta.require("stream"); - var OGG_PAGE_HEADER_SIZE = 26; - var STREAM_STRUCTURE_VERSION = 0; - var charCode = (x) => x.charCodeAt(0); - var OGGS_HEADER = Buffer.from([..."OggS"].map(charCode)); - var OPUS_HEAD = Buffer.from([..."OpusHead"].map(charCode)); - var OPUS_TAGS = Buffer.from([..."OpusTags"].map(charCode)); - - class OggDemuxer extends Transform { - constructor(options = {}) { - super(Object.assign({ readableObjectMode: true }, options)); - this._remainder = null; - this._head = null; - this._bitstream = null; - } - _transform(chunk, encoding, done) { - if (this._remainder) { - chunk = Buffer.concat([this._remainder, chunk]); - this._remainder = null; - } - try { - while (chunk) { - const result = this._readPage(chunk); - if (result) - chunk = result; - else - break; - } - } catch (error) { - done(error); - return; - } - this._remainder = chunk; - done(); - } - _readPage(chunk) { - if (chunk.length < OGG_PAGE_HEADER_SIZE) { - return false; - } - if (!chunk.slice(0, 4).equals(OGGS_HEADER)) { - throw Error(`capture_pattern is not ${OGGS_HEADER}`); - } - if (chunk.readUInt8(4) !== STREAM_STRUCTURE_VERSION) { - throw Error(`stream_structure_version is not ${STREAM_STRUCTURE_VERSION}`); - } - if (chunk.length < 27) - return false; - const pageSegments = chunk.readUInt8(26); - if (chunk.length < 27 + pageSegments) - return false; - const table = chunk.slice(27, 27 + pageSegments); - const bitstream = chunk.readUInt32BE(14); - let sizes = [], totalSize = 0; - for (let i = 0;i < pageSegments; ) { - let size = 0, x = 255; - while (x === 255) { - if (i >= table.length) - return false; - x = table.readUInt8(i); - i++; - size += x; - } - sizes.push(size); - totalSize += size; - } - if (chunk.length < 27 + pageSegments + totalSize) - return false; - let start = 27 + pageSegments; - for (const size of sizes) { - const segment = chunk.slice(start, start + size); - const header = segment.slice(0, 8); - if (this._head) { - if (header.equals(OPUS_TAGS)) - this.emit("tags", segment); - else if (this._bitstream === bitstream) - this.push(segment); - } else if (header.equals(OPUS_HEAD)) { - this.emit("head", segment); - this._head = segment; - this._bitstream = bitstream; - } else { - this.emit("unknownSegment", segment); - } - start += size; - } - return chunk.slice(start); - } - _destroy(err, cb) { - this._cleanup(); - return cb ? cb(err) : undefined; - } - _final(cb) { - this._cleanup(); - cb(); - } - _cleanup() { - this._remainder = null; - this._head = null; - this._bitstream = null; - } - } - module.exports = OggDemuxer; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/core/WebmBase.js -var require_WebmBase = __commonJS((exports, module) => { - function vintLength(buffer, index) { - if (index < 0 || index > buffer.length - 1) { - return TOO_SHORT; - } - let i = 0; - for (;i < 8; i++) - if (1 << 7 - i & buffer[index]) - break; - i++; - if (index + i > buffer.length) { - return TOO_SHORT; - } - return i; - } - function expandVint(buffer, start, end) { - const length = vintLength(buffer, start); - if (end > buffer.length || length === TOO_SHORT) - return TOO_SHORT; - let mask = (1 << 8 - length) - 1; - let value = buffer[start] & mask; - for (let i = start + 1;i < end; i++) { - value = (value << 8) + buffer[i]; - } - return value; - } - var { Transform } = import.meta.require("stream"); - - class WebmBaseDemuxer extends Transform { - constructor(options = {}) { - super(Object.assign({ readableObjectMode: true }, options)); - this._remainder = null; - this._length = 0; - this._count = 0; - this._skipUntil = null; - this._track = null; - this._incompleteTrack = {}; - this._ebmlFound = false; - } - _transform(chunk, encoding, done) { - this._length += chunk.length; - if (this._remainder) { - chunk = Buffer.concat([this._remainder, chunk]); - this._remainder = null; - } - let offset = 0; - if (this._skipUntil && this._length > this._skipUntil) { - offset = this._skipUntil - this._count; - this._skipUntil = null; - } else if (this._skipUntil) { - this._count += chunk.length; - done(); - return; - } - let result; - while (result !== TOO_SHORT) { - try { - result = this._readTag(chunk, offset); - } catch (error) { - done(error); - return; - } - if (result === TOO_SHORT) - break; - if (result._skipUntil) { - this._skipUntil = result._skipUntil; - break; - } - if (result.offset) - offset = result.offset; - else - break; - } - this._count += offset; - this._remainder = chunk.slice(offset); - done(); - return; - } - _readEBMLId(chunk, offset) { - const idLength = vintLength(chunk, offset); - if (idLength === TOO_SHORT) - return TOO_SHORT; - return { - id: chunk.slice(offset, offset + idLength), - offset: offset + idLength - }; - } - _readTagDataSize(chunk, offset) { - const sizeLength = vintLength(chunk, offset); - if (sizeLength === TOO_SHORT) - return TOO_SHORT; - const dataLength = expandVint(chunk, offset, offset + sizeLength); - return { offset: offset + sizeLength, dataLength, sizeLength }; - } - _readTag(chunk, offset) { - const idData = this._readEBMLId(chunk, offset); - if (idData === TOO_SHORT) - return TOO_SHORT; - const ebmlID = idData.id.toString("hex"); - if (!this._ebmlFound) { - if (ebmlID === "1a45dfa3") - this._ebmlFound = true; - else - throw Error("Did not find the EBML tag at the start of the stream"); - } - offset = idData.offset; - const sizeData = this._readTagDataSize(chunk, offset); - if (sizeData === TOO_SHORT) - return TOO_SHORT; - const { dataLength } = sizeData; - offset = sizeData.offset; - if (typeof TAGS[ebmlID] === "undefined") { - if (chunk.length > offset + dataLength) { - return { offset: offset + dataLength }; - } - return { offset, _skipUntil: this._count + offset + dataLength }; - } - const tagHasChildren = TAGS[ebmlID]; - if (tagHasChildren) { - return { offset }; - } - if (offset + dataLength > chunk.length) - return TOO_SHORT; - const data = chunk.slice(offset, offset + dataLength); - if (!this._track) { - if (ebmlID === "ae") - this._incompleteTrack = {}; - if (ebmlID === "d7") - this._incompleteTrack.number = data[0]; - if (ebmlID === "83") - this._incompleteTrack.type = data[0]; - if (this._incompleteTrack.type === 2 && typeof this._incompleteTrack.number !== "undefined") { - this._track = this._incompleteTrack; - } - } - if (ebmlID === "63a2") { - this._checkHead(data); - this.emit("head", data); - } else if (ebmlID === "a3") { - if (!this._track) - throw Error("No audio track in this webm!"); - if ((data[0] & 15) === this._track.number) { - this.push(data.slice(4)); - } - } - return { offset: offset + dataLength }; - } - _destroy(err, cb) { - this._cleanup(); - return cb ? cb(err) : undefined; - } - _final(cb) { - this._cleanup(); - cb(); - } - _cleanup() { - this._remainder = null; - this._incompleteTrack = {}; - } - } - var TOO_SHORT = WebmBaseDemuxer.TOO_SHORT = Symbol("TOO_SHORT"); - var TAGS = WebmBaseDemuxer.TAGS = { - "1a45dfa3": true, - "18538067": true, - "1f43b675": true, - "1654ae6b": true, - ae: true, - d7: false, - "83": false, - a3: false, - "63a2": false - }; - module.exports = WebmBaseDemuxer; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/opus/WebmDemuxer.js -var require_WebmDemuxer = __commonJS((exports, module) => { - var WebmBaseDemuxer = require_WebmBase(); - var OPUS_HEAD = Buffer.from([..."OpusHead"].map((x) => x.charCodeAt(0))); - - class WebmDemuxer extends WebmBaseDemuxer { - _checkHead(data) { - if (!data.slice(0, 8).equals(OPUS_HEAD)) { - throw Error("Audio codec is not Opus!"); - } - } - } - module.exports = WebmDemuxer; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/opus/index.js -var require_opus = __commonJS((exports, module) => { - module.exports = { - ...require_Opus(), - OggDemuxer: require_OggDemuxer(), - WebmDemuxer: require_WebmDemuxer() - }; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/vorbis/WebmDemuxer.js -var require_WebmDemuxer2 = __commonJS((exports, module) => { - var WebmBaseDemuxer = require_WebmBase(); - var VORBIS_HEAD = Buffer.from([..."vorbis"].map((x) => x.charCodeAt(0))); - - class WebmDemuxer extends WebmBaseDemuxer { - _checkHead(data) { - if (data.readUInt8(0) !== 2 || !data.slice(4, 10).equals(VORBIS_HEAD)) { - throw Error("Audio codec is not Vorbis!"); - } - this.push(data.slice(3, 3 + data.readUInt8(1))); - this.push(data.slice(3 + data.readUInt8(1), 3 + data.readUInt8(1) + data.readUInt8(2))); - this.push(data.slice(3 + data.readUInt8(1) + data.readUInt8(2))); - } - } - module.exports = WebmDemuxer; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/vorbis/index.js -var require_vorbis = __commonJS((exports, module) => { - module.exports = { - WebmDemuxer: require_WebmDemuxer2() - }; -}); - -// node_modules/ffmpeg-static/package.json -var require_package = __commonJS((exports, module) => { - module.exports = { - name: "ffmpeg-static", - version: "5.3.0", - description: "ffmpeg binaries for macOS, Linux and Windows", - scripts: { - install: "node install.js", - prepublishOnly: "npm run install" - }, - "ffmpeg-static": { - "binary-path-env-var": "FFMPEG_BIN", - "binary-release-tag-env-var": "FFMPEG_BINARY_RELEASE", - "binary-release-tag": "b6.1.1", - "binaries-url-env-var": "FFMPEG_BINARIES_URL", - "executable-base-name": "ffmpeg" - }, - repository: { - type: "git", - url: "https://github.com/eugeneware/ffmpeg-static" - }, - keywords: [ - "ffmpeg", - "static", - "binary", - "binaries", - "mac", - "linux", - "windows" - ], - authors: [ - "Eugene Ware ", - "Jannis R " - ], - contributors: [ - "Thefrank (https://github.com/Thefrank)", - "Emil Sivervik " - ], - license: "GPL-3.0-or-later", - bugs: { - url: "https://github.com/eugeneware/ffmpeg-static/issues" - }, - engines: { - node: ">=16" - }, - dependencies: { - "@derhuerst/http-basic": "^8.2.0", - "env-paths": "^2.2.0", - "https-proxy-agent": "^5.0.0", - progress: "^2.0.3" - }, - devDependencies: { - "any-shell-escape": "^0.1.1" - }, - main: "index.js", - files: [ - "index.js", - "install.js", - "example.js", - "types" - ], - types: "types/index.d.ts" - }; -}); - -// node_modules/ffmpeg-static/index.js -var require_ffmpeg_static = __commonJS((exports, module) => { - var __dirname = "/home/baharsah/Documents/pro/bot/node_modules/ffmpeg-static"; - var pkg = require_package(); - var { - "binary-path-env-var": BINARY_PATH_ENV_VAR, - "executable-base-name": executableBaseName - } = pkg[pkg.name]; - if (typeof BINARY_PATH_ENV_VAR !== "string") { - throw new Error(`package.json: invalid/missing ${pkg.name}.binary-path-env-var entry`); - } - if (typeof executableBaseName !== "string") { - throw new Error(`package.json: invalid/missing ${pkg.name}.executable-base-name entry`); - } - if (process.env[BINARY_PATH_ENV_VAR]) { - module.exports = process.env[BINARY_PATH_ENV_VAR]; - } else { - os = import.meta.require("os"); - path = import.meta.require("path"); - binaries = Object.assign(Object.create(null), { - darwin: ["x64", "arm64"], - freebsd: ["x64"], - linux: ["x64", "ia32", "arm64", "arm"], - win32: ["x64", "ia32"] - }); - platform = process.env.npm_config_platform || os.platform(); - arch = process.env.npm_config_arch || os.arch(); - let binaryPath = path.join(__dirname, executableBaseName + (platform === "win32" ? ".exe" : "")); - if (!binaries[platform] || binaries[platform].indexOf(arch) === -1) { - binaryPath = null; - } - module.exports = binaryPath; - } - var os; - var path; - var binaries; - var platform; - var arch; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/core/FFmpeg.js -var require_FFmpeg = __commonJS((exports, module) => { - var ChildProcess = import.meta.require("child_process"); - var { Duplex } = import.meta.require("stream"); - var FFMPEG = { - command: null, - output: null - }; - var VERSION_REGEX = /version (.+) Copyright/mi; - Object.defineProperty(FFMPEG, "version", { - get() { - return VERSION_REGEX.exec(FFMPEG.output)[1]; - }, - enumerable: true - }); - - class FFmpeg extends Duplex { - constructor(options = {}) { - super(); - this.process = FFmpeg.create({ shell: false, ...options }); - const EVENTS = { - readable: this._reader, - data: this._reader, - end: this._reader, - unpipe: this._reader, - finish: this._writer, - drain: this._writer - }; - this._readableState = this._reader._readableState; - this._writableState = this._writer._writableState; - this._copy(["write", "end"], this._writer); - this._copy(["read", "setEncoding", "pipe", "unpipe"], this._reader); - for (const method of ["on", "once", "removeListener", "removeListeners", "listeners"]) { - this[method] = (ev, fn) => EVENTS[ev] ? EVENTS[ev][method](ev, fn) : Duplex.prototype[method].call(this, ev, fn); - } - const processError = (error) => this.emit("error", error); - this._reader.on("error", processError); - this._writer.on("error", processError); - } - get _reader() { - return this.process.stdout; - } - get _writer() { - return this.process.stdin; - } - _copy(methods, target) { - for (const method of methods) { - this[method] = target[method].bind(target); - } - } - _destroy(err, cb) { - this._cleanup(); - return cb ? cb(err) : undefined; - } - _final(cb) { - this._cleanup(); - cb(); - } - _cleanup() { - if (this.process) { - this.once("error", () => { - }); - this.process.kill("SIGKILL"); - this.process = null; - } - } - static getInfo(force = false) { - if (FFMPEG.command && !force) - return FFMPEG; - const sources = [() => { - const ffmpegStatic = require_ffmpeg_static(); - return ffmpegStatic.path || ffmpegStatic; - }, "ffmpeg", "avconv", "./ffmpeg", "./avconv"]; - for (let source of sources) { - try { - if (typeof source === "function") - source = source(); - const result = ChildProcess.spawnSync(source, ["-h"], { windowsHide: true }); - if (result.error) - throw result.error; - Object.assign(FFMPEG, { - command: source, - output: Buffer.concat(result.output.filter(Boolean)).toString() - }); - return FFMPEG; - } catch (error) { - } - } - throw new Error("FFmpeg/avconv not found!"); - } - static create({ args = [], shell = false } = {}) { - if (!args.includes("-i")) - args.unshift("-i", "-"); - return ChildProcess.spawn(FFmpeg.getInfo().command, args.concat(["pipe:1"]), { windowsHide: true, shell }); - } - } - module.exports = FFmpeg; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/core/VolumeTransformer.js -var require_VolumeTransformer = __commonJS((exports, module) => { - var { Transform } = import.meta.require("stream"); - - class VolumeTransformer extends Transform { - constructor(options = {}) { - super(options); - switch (options.type) { - case "s16le": - this._readInt = (buffer, index) => buffer.readInt16LE(index); - this._writeInt = (buffer, int, index) => buffer.writeInt16LE(int, index); - this._bits = 16; - break; - case "s16be": - this._readInt = (buffer, index) => buffer.readInt16BE(index); - this._writeInt = (buffer, int, index) => buffer.writeInt16BE(int, index); - this._bits = 16; - break; - case "s32le": - this._readInt = (buffer, index) => buffer.readInt32LE(index); - this._writeInt = (buffer, int, index) => buffer.writeInt32LE(int, index); - this._bits = 32; - break; - case "s32be": - this._readInt = (buffer, index) => buffer.readInt32BE(index); - this._writeInt = (buffer, int, index) => buffer.writeInt32BE(int, index); - this._bits = 32; - break; - default: - throw new Error("VolumeTransformer type should be one of s16le, s16be, s32le, s32be"); - } - this._bytes = this._bits / 8; - this._extremum = Math.pow(2, this._bits - 1); - this.volume = typeof options.volume === "undefined" ? 1 : options.volume; - this._chunk = Buffer.alloc(0); - } - _readInt(buffer, index) { - return index; - } - _writeInt(buffer, int, index) { - return index; - } - _transform(chunk, encoding, done) { - if (this.volume === 1) { - this.push(chunk); - return done(); - } - const { _bytes, _extremum } = this; - chunk = this._chunk = Buffer.concat([this._chunk, chunk]); - if (chunk.length < _bytes) - return done(); - const complete = Math.floor(chunk.length / _bytes) * _bytes; - for (let i = 0;i < complete; i += _bytes) { - const int = Math.min(_extremum - 1, Math.max(-_extremum, Math.floor(this.volume * this._readInt(chunk, i)))); - this._writeInt(chunk, int, i); - } - this._chunk = chunk.slice(complete); - this.push(chunk.slice(0, complete)); - return done(); - } - _destroy(err, cb) { - super._destroy(err, cb); - this._chunk = null; - } - setVolume(volume) { - this.volume = volume; - } - setVolumeDecibels(db) { - this.setVolume(Math.pow(10, db / 20)); - } - setVolumeLogarithmic(value) { - this.setVolume(Math.pow(value, 1.660964)); - } - get volumeDecibels() { - return Math.log10(this.volume) * 20; - } - get volumeLogarithmic() { - return Math.pow(this.volume, 1 / 1.660964); - } - } - module.exports = VolumeTransformer; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/core/index.js -var require_core2 = __commonJS((exports, module) => { - module.exports = { - FFmpeg: require_FFmpeg(), - VolumeTransformer: require_VolumeTransformer() - }; -}); - -// node_modules/discord.js-selfbot-v13/node_modules/prism-media/src/index.js -var require_src = __commonJS((exports, module) => { - module.exports = { - opus: require_opus(), - vorbis: require_vorbis(), - ...require_core2() - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/player/processing/AnnexBNalSplitter.js -var require_AnnexBNalSplitter = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Transform } = import.meta.require("stream"); - var H264NalUnitTypes = { - Unspecified: 0, - CodedSliceNonIDR: 1, - CodedSlicePartitionA: 2, - CodedSlicePartitionB: 3, - CodedSlicePartitionC: 4, - CodedSliceIdr: 5, - SEI: 6, - SPS: 7, - PPS: 8, - AccessUnitDelimiter: 9, - EndOfSequence: 10, - EndOfStream: 11, - FillerData: 12, - SEIExtenstion: 13, - PrefixNalUnit: 14, - SubsetSPS: 15 - }; - var H265NalUnitTypes = { - TRAIL_N: 0, - TRAIL_R: 1, - TSA_N: 2, - TSA_R: 3, - STSA_N: 4, - STSA_R: 5, - RADL_N: 6, - RADL_R: 7, - RASL_N: 8, - RASL_R: 9, - RSV_VCL_N10: 10, - RSV_VCL_R11: 11, - RSV_VCL_N12: 12, - RSV_VCL_R13: 13, - RSV_VCL_N14: 14, - RSV_VCL_R15: 15, - BLA_W_LP: 16, - BLA_W_RADL: 17, - BLA_N_LP: 18, - IDR_W_RADL: 19, - IDR_N_LP: 20, - CRA_NUT: 21, - RSV_IRAP_VCL22: 22, - RSV_IRAP_VCL23: 23, - RSV_VCL24: 24, - RSV_VCL25: 25, - RSV_VCL26: 26, - RSV_VCL27: 27, - RSV_VCL28: 28, - RSV_VCL29: 29, - RSV_VCL30: 30, - RSV_VCL31: 31, - VPS_NUT: 32, - SPS_NUT: 33, - PPS_NUT: 34, - AUD_NUT: 35, - EOS_NUT: 36, - EOB_NUT: 37, - FD_NUT: 38, - PREFIX_SEI_NUT: 39, - SUFFIX_SEI_NUT: 40, - RSV_NVCL41: 41, - RSV_NVCL42: 42, - RSV_NVCL43: 43, - RSV_NVCL44: 44, - RSV_NVCL45: 45, - RSV_NVCL46: 46, - RSV_NVCL47: 47, - UNSPEC48: 48, - UNSPEC49: 49, - UNSPEC50: 50, - UNSPEC51: 51, - UNSPEC52: 52, - UNSPEC53: 53, - UNSPEC54: 54, - UNSPEC55: 55, - UNSPEC56: 56, - UNSPEC57: 57, - UNSPEC58: 58, - UNSPEC59: 59, - UNSPEC60: 60, - UNSPEC61: 61, - UNSPEC62: 62, - UNSPEC63: 63 - }; - var H264Helpers = { - getUnitType(frame) { - return frame[0] & 31; - }, - splitHeader(frame) { - return [frame.subarray(0, 1), frame.subarray(1)]; - }, - isAUD(unitType) { - return unitType === H264NalUnitTypes.AccessUnitDelimiter; - } - }; - var H265Helpers = { - getUnitType(frame) { - return frame[0] >> 1 & 63; - }, - splitHeader(frame) { - return [frame.subarray(0, 2), frame.subarray(2)]; - }, - isAUD(unitType) { - return unitType === H265NalUnitTypes.AUD_NUT; - } - }; - var emptyBuffer = Buffer2.allocUnsafe(0); - var epbPrefix = Buffer2.from([0, 0, 3]); - var nalSuffix = Buffer2.from([0, 0, 1]); - - class AnnexBNalSplitter extends Transform { - constructor(nalFunctions) { - super(); - this._buffer = null; - this._accessUnit = []; - this._nalFunctions = nalFunctions; - } - rbsp(data) { - const newData = Buffer2.allocUnsafe(data.length); - let newLength = 0; - while (true) { - const epbsPos = data.indexOf(epbPrefix); - if (epbsPos === -1) { - data.copy(newData, newLength); - newLength += data.length; - break; - } - const copyRange = data[epbsPos + 3] <= 3 ? epbsPos + 2 : epbsPos + 3; - data.copy(newData, newLength, 0, copyRange); - newLength += copyRange; - data = data.subarray(epbsPos + 3); - } - return newData.subarray(0, newLength); - } - findNalStart(buf) { - const pos = buf.indexOf(nalSuffix); - if (pos === -1) - return null; - return pos > 0 && buf[pos - 1] === 0 ? { index: pos - 1, length: 4 } : { index: pos, length: 3 }; - } - processFrame(frame) { - if (frame.length === 0) - return; - const unitType = this._nalFunctions.getUnitType(frame); - if (this._nalFunctions.isAUD(unitType) && this._accessUnit.length > 0) { - const sizeOfAccessUnit = this._accessUnit.reduce((acc, nalu) => acc + nalu.length + 4, 0); - const accessUnitBuf = Buffer2.allocUnsafe(sizeOfAccessUnit); - let offset = 0; - this._accessUnit.forEach((nalu) => { - accessUnitBuf.writeUint32BE(nalu.length, offset); - offset += 4; - nalu.copy(accessUnitBuf, offset); - offset += nalu.length; - }); - this.push(accessUnitBuf); - this._accessUnit = []; - } else { - this._accessUnit.push(this.removeEpbs(frame, unitType)); - } - } - _transform(chunk, encoding, callback) { - let nalStart = this.findNalStart(chunk); - if (!this._buffer) { - if (!nalStart) { - callback(); - return; - } - chunk = chunk.subarray(nalStart.index + nalStart.length); - this._buffer = emptyBuffer; - } - chunk = Buffer2.concat([this._buffer, chunk]); - while (nalStart = this.findNalStart(chunk)) { - const frame = chunk.subarray(0, nalStart.index); - this.processFrame(frame); - chunk = chunk.subarray(nalStart.index + nalStart.length); - } - this._buffer = chunk; - callback(); - } - } - - class H264NalSplitter extends AnnexBNalSplitter { - constructor() { - super(H264Helpers); - } - removeEpbs(frame, unitType) { - return unitType === H264NalUnitTypes.SPS || unitType === H264NalUnitTypes.SEI ? this.rbsp(frame) : frame; - } - } - - class H265NalSplitter extends AnnexBNalSplitter { - constructor() { - super(H265Helpers); - } - removeEpbs(frame) { - return frame; - } - } - module.exports = { - H264NalUnitTypes, - H265NalUnitTypes, - H264Helpers, - H265Helpers, - H264NalSplitter, - H265NalSplitter - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/player/processing/IvfSplitter.js -var require_IvfSplitter = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Transform } = import.meta.require("stream"); - - class IvfTransformer extends Transform { - constructor(options) { - super(options); - this.headerSize = 32; - this.frameHeaderSize = 12; - this.header = null; - this.buf = null; - this.retFullFrame = options && options.fullframe ? options.fullframe : false; - } - _parseHeader(header) { - this.header = { - signature: header.subarray(0, 4).toString(), - version: header.readUIntLE(4, 2), - headerLength: header.readUIntLE(6, 2), - codec: header.subarray(8, 12).toString(), - width: header.readUIntLE(12, 2), - height: header.readUIntLE(14, 2), - timeDenominator: header.readUIntLE(16, 4), - timeNumerator: header.readUIntLE(20, 4), - frameCount: header.readUIntLE(24, 4) - }; - } - _getFrameSize(buf) { - return buf.readUIntLE(0, 4); - } - _parseFrame(frame) { - const size = this._getFrameSize(frame); - if (this.retFullFrame) - return this.push(frame.subarray(0, 12 + size)); - const out = { - size, - timestamp: frame.readBigUInt64LE(4), - data: frame.subarray(12, 12 + size) - }; - return this.push(out.data); - } - _appendChunkToBuf(chunk) { - if (this.buf) - this.buf = Buffer2.concat([this.buf, chunk]); - else - this.buf = chunk; - } - _updateBufLen(size) { - if (this.buf.length > size) - this.buf = this.buf.subarray(size, this.buf.length); - else - this.buf = null; - } - _transform(chunk, encoding, callback) { - this._appendChunkToBuf(chunk); - if (!this.header) { - if (this.buf.length >= this.headerSize) { - this._parseHeader(this.buf.subarray(0, this.headerSize)); - this._updateBufLen(this.headerSize); - } else { - callback(); - return; - } - } - while (this.buf && this.buf.length >= this.frameHeaderSize) { - const size = this._getFrameSize(this.buf) + this.frameHeaderSize; - if (this.buf.length >= size) { - this._parseFrame(this.buf.subarray(0, size)); - this._updateBufLen(size); - } else { - break; - } - } - callback(); - } - } - module.exports = { - IvfTransformer - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/Secretbox.js -var require_Secretbox = __commonJS((exports) => { - function NoLib() { - throw new Error("Cannot play audio as no valid encryption package is installed.\n- Install sodium, libsodium-wrappers, or @stablelib/xchacha20poly1305."); - } - async function importModule(name, usingImport = false) { - try { - if (usingImport) { - return await import(name); - } else { - return import.meta.require(name); - } - } catch (e) { - if (e.code == "ERR_REQUIRE_ESM") { - return importModule(name, true); - } else { - throw e; - } - } - } - var libs = { - sodium: (sodium) => ({ - crypto_aead_xchacha20poly1305_ietf_encrypt: (plaintext, additionalData, nonce, key) => sodium.api.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key), - crypto_aead_xchacha20poly1305_ietf_decrypt: (plaintext, additionalData, nonce, key) => sodium.api.crypto_aead_xchacha20poly1305_ietf_decrypt(plaintext, additionalData, null, nonce, key) - }), - "libsodium-wrappers": (sodium) => ({ - crypto_aead_xchacha20poly1305_ietf_encrypt: (plaintext, additionalData, nonce, key) => sodium.crypto_aead_xchacha20poly1305_ietf_encrypt(plaintext, additionalData, null, nonce, key), - crypto_aead_xchacha20poly1305_ietf_decrypt: (plaintext, additionalData, nonce, key) => sodium.crypto_aead_xchacha20poly1305_ietf_decrypt(null, plaintext, additionalData, nonce, key) - }), - "@stablelib/xchacha20poly1305": (stablelib) => ({ - crypto_aead_xchacha20poly1305_ietf_encrypt(cipherText, additionalData, nonce, key) { - const crypto = new stablelib.XChaCha20Poly1305(key); - return crypto.seal(nonce, cipherText, additionalData); - }, - crypto_aead_xchacha20poly1305_ietf_decrypt(plaintext, additionalData, nonce, key) { - const crypto = new stablelib.XChaCha20Poly1305(key); - return crypto.open(nonce, plaintext, additionalData); - } - }) - }; - exports.methods = { - crypto_aead_xchacha20poly1305_ietf_encrypt: NoLib, - crypto_aead_xchacha20poly1305_ietf_decrypt: NoLib - }; - (async () => { - for (const libName of Object.keys(libs)) { - try { - const lib = await importModule(libName); - if (libName === "libsodium-wrappers" && lib.ready) - await lib.ready; - exports.methods = libs[libName](lib); - break; - } catch { - } - } - })(); -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/dispatcher/BaseDispatcher.js -var require_BaseDispatcher = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var crypto = import.meta.require("crypto"); - var { Writable } = import.meta.require("stream"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var secretbox = require_Secretbox(); - var MAX_UINT_16 = 2 ** 16 - 1; - var MAX_UINT_32 = 2 ** 32 - 1; - var extensions = [{ id: 5, length: 2, value: 0 }]; - - class BaseDispatcher extends Writable { - constructor(player, highWaterMark = 12, payloadType, extensionEnabled, streams = {}) { - super({ - highWaterMark - }); - this.streams = streams; - this.player = player; - this.payloadType = payloadType; - this.extensionEnabled = extensionEnabled; - this._nonce = 0; - this._nonceBuffer = null; - this.pausedSince = null; - this._writeCallback = null; - this._pausedTime = 0; - this._silentPausedTime = 0; - this.count = 0; - this.sequence = 0; - this.timestamp = 0; - const streamError = (type, err) => { - if (type && err) { - err.message = `${type} stream: ${err.message}`; - this.emit(this.player.dispatcher === this ? "error" : "debug", err); - } - this.destroy(); - }; - this.on("error", () => streamError()); - if (this.streams.input) - this.streams.input.on("error", (err) => streamError("input", err)); - if (this.streams.ffmpeg) - this.streams.ffmpeg.on("error", (err) => streamError("ffmpeg", err)); - if (this.streams.opus) - this.streams.opus.on("error", (err) => streamError("opus", err)); - if (this.streams.volume) - this.streams.volume.on("error", (err) => streamError("volume", err)); - this.on("finish", () => { - this._cleanup(); - this._setSpeaking(0); - this._setVideoStatus(false); - this._setStreamStatus(true); - }); - } - getTypeDispatcher() { - return "base"; - } - resetNonceBuffer() { - this._nonceBuffer = this.player.voiceConnection.authentication.mode === "aead_aes256_gcm_rtpsize" ? Buffer2.alloc(12) : Buffer2.alloc(24); - } - getNewSequence() { - const currentSeq = this.sequence; - this.sequence++; - if (this.sequence > MAX_UINT_16) - this.sequence = 0; - return currentSeq; - } - _write(chunk, enc, done) { - if (!this.startTime) { - this.emit("start"); - this.startTime = performance.now(); - } - if (this._syncDispatcher && !this._syncDispatcher.startTime) { - this.pause(); - const cb = () => { - this.resume(); - clearTimeout(timeout); - }; - this._syncDispatcher.once("start", cb); - let timeout = setTimeout2(() => { - this.removeListener("start", cb); - this.resume(); - }, 1e4).unref(); - } - if (this.getTypeDispatcher() === "video") { - this._codecCallback(chunk); - } else { - this._playChunk(chunk); - } - this._step(done); - } - _destroy(err, cb) { - this._cleanup(); - super._destroy(err, cb); - } - _cleanup() { - if (this.player.dispatcher === this) { - this.player.dispatcher.destroy(); - this.player.dispatcher = null; - } - if (this.player.videoDispatcher === this) { - this.player.videoDispatcher.destroy(); - this.player.videoDispatcher = null; - } - const { streams } = this; - if (streams.opus) - streams.opus.destroy(); - streams.ffmpeg?.destroy(); - } - pause(silence = false) { - if (this.paused) - return; - if (this.streams.opus) - this.streams.opus.unpipe(this); - if (this.streams.video) { - this.streams.ffmpeg.pause(); - this.streams.video.unpipe(this); - } - if (this.getTypeDispatcher() === "audio") { - if (silence) { - this.streams.silence.pipe(this); - this._silence = true; - } else { - this._setSpeaking(0); - } - } - this.pausedSince = performance.now(); - } - get paused() { - return Boolean(this.pausedSince); - } - get pausedTime() { - return this._silentPausedTime + this._pausedTime + (this.paused ? performance.now() - this.pausedSince : 0); - } - resume() { - if (!this.pausedSince) - return; - if (this.getTypeDispatcher() === "audio") - this.streams.silence.unpipe(this); - if (this.streams.opus) - this.streams.opus.pipe(this); - if (this.streams.video) { - this.streams.ffmpeg.resume(); - this.streams.video.pipe(this); - } - if (this._silence) { - this._silentPausedTime += performance.now() - this.pausedSince; - this._silence = false; - } else { - this._pausedTime += performance.now() - this.pausedSince; - } - this.pausedSince = null; - if (typeof this._writeCallback === "function") - this._writeCallback(); - } - get totalStreamTime() { - return performance.now() - this.startTime; - } - _step(done) { - this._writeCallback = () => { - this._writeCallback = null; - done(); - }; - const next = (this.count + 1) * this.FRAME_LENGTH - (performance.now() - this.startTime - this._pausedTime); - setTimeout2(() => { - if ((!this.pausedSince || this._silence) && this._writeCallback) - this._writeCallback(); - }, next).unref(); - this.timestamp += this.TIMESTAMP_INC; - if (this.timestamp > MAX_UINT_32) - this.timestamp = 0; - this.count++; - if (this.count > MAX_UINT_16) - this.count = 0; - } - _final(callback) { - this._writeCallback = null; - callback(); - } - _playChunk(chunk, isLastPacket = false) { - if (this.player.dispatcher !== this && this.player.videoDispatcher !== this || !this.player.voiceConnection.authentication.secret_key) { - return; - } - const packet = this._createPacket(chunk, isLastPacket); - if (packet) - this._sendPacket(packet); - } - createHeaderExtension() { - const profile = Buffer2.alloc(4); - profile[0] = 190; - profile[1] = 222; - profile.writeInt16BE(extensions.length, 2); - return profile; - } - createPayloadExtension() { - const extensionsData = []; - for (let ext of extensions) { - const data = Buffer2.alloc(4); - if (ext.id === 5) { - data.writeUIntBE(ext.value, 1, 2); - } - extensionsData.push(data); - } - return Buffer2.concat(extensionsData); - } - _encrypt(buffer, additionalData) { - const { secret_key, mode } = this.player.voiceConnection.authentication; - this._nonce++; - if (this._nonce > MAX_UINT_32) - this._nonce = 0; - if (!this._nonceBuffer) { - this.resetNonceBuffer(); - } - this._nonceBuffer.writeUInt32BE(this._nonce, 0); - const noncePadding = this._nonceBuffer.slice(0, 4); - let encrypted; - switch (mode) { - case "aead_aes256_gcm_rtpsize": { - const cipher = crypto.createCipheriv("aes-256-gcm", secret_key, this._nonceBuffer); - cipher.setAAD(additionalData); - encrypted = Buffer2.concat([cipher.update(buffer), cipher.final(), cipher.getAuthTag()]); - return [encrypted, noncePadding]; - } - case "aead_xchacha20_poly1305_rtpsize": { - encrypted = secretbox.methods.crypto_aead_xchacha20poly1305_ietf_encrypt(buffer, additionalData, this._nonceBuffer, secret_key); - return [encrypted, noncePadding]; - } - default: { - throw new RangeError(`Unsupported encryption method: ${mode}`); - } - } - } - _createPacket(buffer, isLastPacket) { - let rtpHeader = Buffer2.alloc(12); - rtpHeader[0] = 128; - rtpHeader[1] = this.payloadType; - if (this.extensionEnabled) { - rtpHeader = Buffer2.concat([rtpHeader, this.createHeaderExtension()]); - rtpHeader[0] |= 1 << 4; - } - if (this.getTypeDispatcher() === "video" && isLastPacket) { - rtpHeader[1] |= 1 << 7; - } - rtpHeader.writeUIntBE(this.getNewSequence(), 2, 2); - rtpHeader.writeUIntBE(this.timestamp, 4, 4); - rtpHeader.writeUIntBE(this.player.voiceConnection.authentication.ssrc + Number(this.getTypeDispatcher() === "video"), 8, 4); - return Buffer2.concat([rtpHeader, ...this._encrypt(buffer, rtpHeader)]); - } - _sendPacket(packet) { - if (this.getTypeDispatcher() === "audio") { - this._setSpeaking(this.player.isScreenSharing ? 1 << 1 : 1 << 0); - } else if (this.getTypeDispatcher() === "video") { - this._setVideoStatus(true); - this._setStreamStatus(false); - } - if (!this.player.voiceConnection.sockets.udp) { - this.emit("debug", "Failed to send a packet - no UDP socket"); - return; - } - this.player.voiceConnection.sockets.udp.send(packet).catch((e) => { - if (this.getTypeDispatcher() === "audio") { - this._setSpeaking(this._setSpeaking(0)); - } else if (this.getTypeDispatcher() === "video") { - this._setVideoStatus(false); - this._setStreamStatus(true); - } - this.emit("debug", `Failed to send a packet - ${e}`); - }); - } - _setSpeaking(value) { - if (typeof this.player.voiceConnection !== "undefined") { - this.player.voiceConnection.setSpeaking(value); - } - this.emit("speaking", value); - } - _setVideoStatus(value) { - if (typeof this.player.voiceConnection !== "undefined") { - this.player.voiceConnection.setVideoStatus(value); - } - this.emit("videoStatus", value); - } - _setStreamStatus(value) { - if (typeof this.player.voiceConnection?.sendScreenshareState !== "undefined") { - this.player.voiceConnection.sendScreenshareState(value); - } - this.emit("streamStatus", value); - } - } - module.exports = BaseDispatcher; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/dispatcher/VideoDispatcher.js -var require_VideoDispatcher = __commonJS((exports, module) => { - var BaseDispatcher = require_BaseDispatcher(); - - class VideoDispatcher extends BaseDispatcher { - constructor(player, highWaterMark = 12, streams, fps, payloadType) { - super(player, highWaterMark, payloadType, true, streams); - this.fps = fps; - this.mtu = 1200; - } - get TIMESTAMP_INC() { - return 90000 / this.fps; - } - get FRAME_LENGTH() { - return 1000 / this.fps; - } - getTypeDispatcher() { - return "video"; - } - partitionMtu(data) { - const out = []; - const dataLength = data.length; - for (let i = 0;i < dataLength; i += this.mtu) { - out.push(data.slice(i, i + this.mtu)); - } - return out; - } - setFPSSource(value) { - this.fps = value; - } - _codecCallback() { - throw new Error("The _codecCallback method must be implemented"); - } - } - module.exports = VideoDispatcher; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/dispatcher/AnnexBDispatcher.js -var require_AnnexBDispatcher = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var VideoDispatcher = require_VideoDispatcher(); - var Util = require_Util(); - var { H264Helpers, H265Helpers } = require_AnnexBNalSplitter(); - - class AnnexBDispatcher extends VideoDispatcher { - constructor(player, highWaterMark = 12, streams, fps, nalFunctions, payloadType) { - super(player, highWaterMark, streams, fps, payloadType); - this._nalFunctions = nalFunctions; - } - _codecCallback(frame) { - let accessUnit = frame; - let offset = 0; - while (offset < accessUnit.length) { - const naluSize = accessUnit.readUInt32BE(offset); - offset += 4; - const nalu = accessUnit.subarray(offset, offset + naluSize); - const isLastNal = offset + naluSize >= accessUnit.length; - if (nalu.length <= this.mtu) { - this._playChunk(Buffer2.concat([this.createPayloadExtension(), nalu]), isLastNal); - } else { - const [naluHeader, naluData] = this._nalFunctions.splitHeader(nalu); - const dataFragments = this.partitionMtu(naluData); - for (let fragmentIndex = 0;fragmentIndex < dataFragments.length; fragmentIndex++) { - const data = dataFragments[fragmentIndex]; - const isFirstPacket = fragmentIndex === 0; - const isFinalPacket = fragmentIndex === dataFragments.length - 1; - this._playChunk(Buffer2.concat([ - this.createPayloadExtension(), - this.makeFragmentationUnitHeader(isFirstPacket, isFinalPacket, naluHeader), - data - ]), isLastNal && isFinalPacket); - } - } - offset += naluSize; - } - } - } - - class H264Dispatcher extends AnnexBDispatcher { - constructor(player, highWaterMark = 12, streams, fps) { - super(player, highWaterMark, streams, fps, H264Helpers, Util.getPayloadType("H264")); - } - makeFragmentationUnitHeader(isFirstPacket, isLastPacket, naluHeader) { - const nal0 = naluHeader[0]; - const fuPayloadHeader = Buffer2.alloc(2); - const nalType = H264Helpers.getUnitType(naluHeader); - const fnri = nal0 & 224; - fuPayloadHeader[0] = 28 | fnri; - if (isFirstPacket) { - fuPayloadHeader[1] = 128 | nalType; - } else if (isLastPacket) { - fuPayloadHeader[1] = 64 | nalType; - } else { - fuPayloadHeader[1] = nalType; - } - return fuPayloadHeader; - } - } - - class H265Dispatcher extends AnnexBDispatcher { - constructor(player, highWaterMark = 12, streams, fps) { - super(player, highWaterMark, streams, fps, H265Helpers, Util.getPayloadType("H265")); - } - makeFragmentationUnitHeader(isFirstPacket, isLastPacket, naluHeader) { - const fuIndicatorHeader = Buffer2.allocUnsafe(3); - naluHeader.copy(fuIndicatorHeader); - const nalType = H265Helpers.getUnitType(naluHeader); - fuIndicatorHeader[0] = fuIndicatorHeader[0] & 129 | 49 << 1; - if (isFirstPacket) { - fuIndicatorHeader[2] = 128 | nalType; - } else if (isLastPacket) { - fuIndicatorHeader[2] = 64 | nalType; - } else { - fuIndicatorHeader[2] = nalType; - } - return fuIndicatorHeader; - } - } - module.exports = { - H264Dispatcher, - H265Dispatcher - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/Silence.js -var require_Silence = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Readable } = import.meta.require("stream"); - var SILENCE_FRAME = Buffer2.from([248, 255, 254]); - - class Silence extends Readable { - _read() { - this.push(SILENCE_FRAME); - } - } - Silence.SILENCE_FRAME = SILENCE_FRAME; - module.exports = Silence; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/VolumeInterface.js -var require_VolumeInterface = __commonJS((exports) => { - var EventEmitter = import.meta.require("events"); - var { Buffer: Buffer2 } = import.meta.require("buffer"); - - class VolumeInterface extends EventEmitter { - constructor({ volume = 1 } = {}) { - super(); - this.setVolume(volume); - } - get volumeEditable() { - return true; - } - get volume() { - return this._volume; - } - get volumeDecibels() { - return Math.log10(this.volume) * 20; - } - get volumeLogarithmic() { - return Math.pow(this.volume, 1 / 1.660964); - } - applyVolume(buffer, volume) { - volume = volume || this._volume; - if (volume === 1) - return buffer; - const out = Buffer2.alloc(buffer.length); - for (let i = 0;i < buffer.length; i += 2) { - if (i >= buffer.length - 1) - break; - const uint = Math.min(32767, Math.max(-32767, Math.floor(volume * buffer.readInt16LE(i)))); - out.writeInt16LE(uint, i); - } - return out; - } - setVolume(volume) { - this.emit("volumeChange", this._volume, volume); - this._volume = volume; - } - setVolumeDecibels(db) { - this.setVolume(Math.pow(10, db / 20)); - } - setVolumeLogarithmic(value) { - this.setVolume(Math.pow(value, 1.660964)); - } - } - var props = ["volumeDecibels", "volumeLogarithmic", "setVolumeDecibels", "setVolumeLogarithmic"]; - exports.applyToClass = function applyToClass(structure) { - for (const prop of props) { - Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(VolumeInterface.prototype, prop)); - } - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/dispatcher/AudioDispatcher.js -var require_AudioDispatcher = __commonJS((exports, module) => { - var BaseDispatcher = require_BaseDispatcher(); - var Util = require_Util(); - var Silence = require_Silence(); - var VolumeInterface = require_VolumeInterface(); - var CHANNELS = 2; - - class AudioDispatcher extends BaseDispatcher { - constructor(player, { seek = 0, volume = 1, fec, plp, bitrate = 96, highWaterMark = 12 } = {}, streams) { - const streamOptions = { seek, volume, fec, plp, bitrate, highWaterMark }; - super(player, highWaterMark, Util.getPayloadType("opus"), false, streams); - this.streamOptions = streamOptions; - this.streams.silence = new Silence; - this.setVolume(volume); - this.setBitrate(bitrate); - if (typeof fec !== "undefined") - this.setFEC(fec); - if (typeof plp !== "undefined") - this.setPLP(plp); - } - get TIMESTAMP_INC() { - return 480 * CHANNELS; - } - get FRAME_LENGTH() { - return 20; - } - getTypeDispatcher() { - return "audio"; - } - setBitrate(value) { - if (!value || !this.bitrateEditable) - return false; - const bitrate = value === "auto" ? this.player.voiceConnection.channel.bitrate : value; - this.streams.opus.setBitrate(bitrate * 1000); - return true; - } - setPLP(value) { - if (!this.bitrateEditable) - return false; - this.streams.opus.setPLP(value); - return true; - } - setFEC(enabled) { - if (!this.bitrateEditable) - return false; - this.streams.opus.setFEC(enabled); - return true; - } - get volumeEditable() { - return Boolean(this.streams.volume); - } - get bitrateEditable() { - return this.streams.opus && this.streams.opus.setBitrate; - } - get volume() { - return this.streams.volume ? this.streams.volume.volume : 1; - } - setVolume(value) { - if (!this.streams.volume) - return false; - this.emit("volumeChange", this.volume, value); - this.streams.volume.setVolume(value); - return true; - } - setSyncVideoDispatcher(otherDispatcher) { - if (otherDispatcher.getTypeDispatcher() !== "video") { - throw new Error("Dispatcher must be a video dispatcher"); - } - this._syncDispatcher = otherDispatcher; - } - get volumeDecibels() { - } - get volumeLogarithmic() { - } - setVolumeDecibels() { - } - setVolumeLogarithmic() { - } - } - VolumeInterface.applyToClass(AudioDispatcher); - module.exports = AudioDispatcher; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/dispatcher/VPxDispatcher.js -var require_VPxDispatcher = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var VideoDispatcher = require_VideoDispatcher(); - var Util = require_Util(); - - class VP8Dispatcher extends VideoDispatcher { - constructor(player, highWaterMark = 12, streams, fps) { - super(player, highWaterMark, streams, fps, Util.getPayloadType("VP8")); - } - makeChunk(buffer, isFirstPacket) { - const payloadDescriptorBuf = Buffer2.alloc(2); - payloadDescriptorBuf[0] = 128; - payloadDescriptorBuf[1] = 128; - if (isFirstPacket) { - payloadDescriptorBuf[0] |= 1 << 4; - } - const pictureIdBuf = Buffer2.alloc(2); - pictureIdBuf.writeUintBE(this.count, 0, 2); - pictureIdBuf[0] |= 128; - return Buffer2.concat([this.createPayloadExtension(), payloadDescriptorBuf, pictureIdBuf, buffer]); - } - _codecCallback(chunk) { - const chunkSplit = this.partitionMtu(chunk).map((c, i) => this.makeChunk(c, i === 0)); - for (let i = 0;i < chunkSplit.length; i++) { - this._playChunk(chunkSplit[i], i + 1 === chunkSplit.length); - } - } - } - module.exports = { - VP8Dispatcher - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/player/MediaPlayer.js -var require_MediaPlayer = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var { Readable: ReadableStream } = import.meta.require("stream"); - var prism = require_src(); - var { H264NalSplitter, H265NalSplitter } = require_AnnexBNalSplitter(); - var { IvfTransformer } = require_IvfSplitter(); - var { H264Dispatcher } = require_AnnexBDispatcher(); - var AudioDispatcher = require_AudioDispatcher(); - var { VP8Dispatcher } = require_VPxDispatcher(); - var FFMPEG_OUTPUT_PREFIX = ["-use_wallclock_as_timestamps", "1", "-copyts", "-analyzeduration", "0"]; - var FFMPEG_INPUT_PREFIX = [ - "-reconnect", - "1", - "-reconnect_at_eof", - "1", - "-reconnect_streamed", - "1", - "-reconnect_delay_max", - "4294" - ]; - var FFMPEG_PCM_ARGUMENTS = ["-f", "s16le", "-ar", "48000", "-ac", "2"]; - var FFMPEG_VP8_ARGUMENTS = ["-f", "ivf", "-deadline", "realtime", "-c:v", "libvpx"]; - var FFMPEG_H264_ARGUMENTS = (options) => [ - "-c:v", - "libx264", - "-f", - "h264", - "-tune", - "zerolatency", - "-preset", - options?.presetH26x || "faster", - "-profile:v", - "baseline", - "-bf", - "0", - "-bsf:v", - "h264_metadata=aud=insert" - ]; - var FFMPEG_H265_ARGUMENTS = (options) => [ - "-c:v", - "libx265", - "-f", - "hevc", - "-preset", - options?.presetH265 || "faster", - "-profile:v", - "main", - "-bf", - "0" - ]; - - class MediaPlayer extends EventEmitter { - constructor(voiceConnection, isScreenSharing) { - super(); - this.dispatcher = null; - this.videoDispatcher = null; - this.voiceConnection = voiceConnection; - this.isScreenSharing = isScreenSharing; - } - destroy() { - this.destroyDispatcher(); - this.destroyVideoDispatcher(); - } - destroyDispatcher() { - if (this.dispatcher) { - this.dispatcher.destroy(); - this.dispatcher = null; - } - } - destroyVideoDispatcher() { - if (this.videoDispatcher) { - this.videoDispatcher.destroy(); - this.videoDispatcher = null; - } - } - playUnknown(input, options, streams = {}) { - this.destroyDispatcher(); - const isStream = input instanceof ReadableStream; - const args = [...FFMPEG_OUTPUT_PREFIX, ...FFMPEG_PCM_ARGUMENTS]; - if (!isStream) - args.unshift("-i", input); - if (options.seek) - args.unshift("-ss", String(options.seek)); - if (typeof input == "string" && input.startsWith("http")) { - args.unshift(...FFMPEG_INPUT_PREFIX); - } - const ffmpeg = new prism.FFmpeg({ args }); - this.emit("debug", `[ffmpeg-audio_process] Spawn process with args:\n${args.join(" ")}`); - ffmpeg.process.stderr.on("data", (data) => { - this.emit("debug", `[ffmpeg-audio_process]: ${data.toString()}`); - }); - streams.ffmpeg = ffmpeg; - if (isStream) { - streams.input = input; - input.pipe(ffmpeg); - } - return this.playPCMStream(ffmpeg, options, streams); - } - playPCMStream(stream, options, streams = {}) { - this.destroyDispatcher(); - const opus = streams.opus = new prism.opus.Encoder({ channels: 2, rate: 48000, frameSize: 960 }); - if (options && options.volume === false) { - stream.pipe(opus); - return this.playOpusStream(opus, options, streams); - } - streams.volume = new prism.VolumeTransformer({ type: "s16le", volume: options ? options.volume : 1 }); - stream.pipe(streams.volume).pipe(opus); - return this.playOpusStream(opus, options, streams); - } - playOpusStream(stream, options, streams = {}) { - this.destroyDispatcher(); - streams.opus = stream; - if (options.volume !== false && !streams.input) { - streams.input = stream; - const decoder = new prism.opus.Decoder({ channels: 2, rate: 48000, frameSize: 960 }); - streams.volume = new prism.VolumeTransformer({ type: "s16le", volume: options ? options.volume : 1 }); - streams.opus = stream.pipe(decoder).pipe(streams.volume).pipe(new prism.opus.Encoder({ channels: 2, rate: 48000, frameSize: 960 })); - } - const dispatcher = this.createDispatcher(options, streams); - streams.opus.pipe(dispatcher); - return dispatcher; - } - playUnknownVideo(input, options = {}) { - this.destroyVideoDispatcher(); - const isStream = input instanceof ReadableStream; - if (!options?.fps) - options.fps = 30; - const args = [ - "-i", - isStream ? "-" : input, - ...FFMPEG_OUTPUT_PREFIX, - "-flags", - "low_delay", - "-r", - `${options?.fps}` - ]; - if (options?.bitrate && typeof options?.bitrate === "number") { - args.push("-b:v", `${options?.bitrate}K`); - } - if (options?.hwAccel === true) { - args.unshift("-hwaccel", "auto"); - } - if (options.seek) - args.unshift("-ss", String(options.seek)); - if (typeof input == "string" && input.startsWith("http")) { - args.unshift(...FFMPEG_INPUT_PREFIX); - } - if (this.voiceConnection.videoCodec === "VP8") { - args.push(...FFMPEG_VP8_ARGUMENTS); - } - if (this.voiceConnection.videoCodec === "H264") { - args.push(...FFMPEG_H264_ARGUMENTS(options)); - } - if (this.voiceConnection.videoCodec === "H265") { - args.push(...FFMPEG_H265_ARGUMENTS(options)); - } - args.push("-force_key_frames", "00:02"); - if (options?.inputFFmpegArgs) { - args.unshift(...options.inputFFmpegArgs); - } - if (options?.outputFFmpegArgs) { - args.push(...options.outputFFmpegArgs); - } - const ffmpeg = new prism.FFmpeg({ args }); - const streams = { ffmpeg }; - if (isStream) { - streams.input = input; - input.pipe(ffmpeg); - } - this.emit("debug", `[ffmpeg-video_process] Spawn process with args:\n${args.join(" ")}`); - ffmpeg.process.stderr.on("data", (data) => { - this.emit("debug", `[ffmpeg-video_process]: ${data.toString()}`); - }); - switch (this.voiceConnection.videoCodec) { - case "VP8": { - return this.playIvfVideo(ffmpeg, options, streams); - } - case "H264": { - return this.playAnnexBVideo(ffmpeg, options, streams, "H264"); - } - default: { - throw new Error("Invalid codec (Supported: VP8, H264)"); - } - } - } - playIvfVideo(stream, options, streams) { - this.destroyVideoDispatcher(); - const videoStream = new IvfTransformer; - stream.pipe(videoStream); - streams.video = videoStream; - const dispatcher = this.createVideoDispatcher(options, streams); - videoStream.pipe(dispatcher); - return dispatcher; - } - playAnnexBVideo(stream, options, streams, type) { - this.destroyVideoDispatcher(); - let videoStream; - if (type === "H264") { - videoStream = new H264NalSplitter; - } else if (type === "H265") { - videoStream = new H265NalSplitter; - } - stream.pipe(videoStream); - streams.video = videoStream; - const dispatcher = this.createVideoDispatcher(options, streams); - videoStream.pipe(dispatcher); - return dispatcher; - } - createDispatcher(options, streams) { - this.destroyDispatcher(); - const dispatcher = this.dispatcher = new AudioDispatcher(this, options, streams); - return dispatcher; - } - createVideoDispatcher(options, streams) { - this.destroyVideoDispatcher(); - switch (this.voiceConnection.videoCodec) { - case "VP8": { - const dispatcher = this.videoDispatcher = new VP8Dispatcher(this, options?.highWaterMark, streams, options?.fps); - return dispatcher; - } - case "H264": { - const dispatcher = this.videoDispatcher = new H264Dispatcher(this, options?.highWaterMark, streams, options?.fps); - return dispatcher; - } - default: { - throw new Error("Invalid codec"); - } - } - } - } - module.exports = MediaPlayer; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/const.js -var require_const = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.saltLength = exports.keyLength = exports.Profiles = exports.ProtectionProfileAeadAes128Gcm = exports.ProtectionProfileAes128CmHmacSha1_80 = undefined; - exports.ProtectionProfileAes128CmHmacSha1_80 = 1; - exports.ProtectionProfileAeadAes128Gcm = 7; - exports.Profiles = [ - exports.ProtectionProfileAes128CmHmacSha1_80, - exports.ProtectionProfileAeadAes128Gcm - ]; - var keyLength = (profile) => { - switch (profile) { - case exports.ProtectionProfileAes128CmHmacSha1_80: - case exports.ProtectionProfileAeadAes128Gcm: - return 16; - } - }; - exports.keyLength = keyLength; - var saltLength = (profile) => { - switch (profile) { - case exports.ProtectionProfileAes128CmHmacSha1_80: - return 14; - case exports.ProtectionProfileAeadAes128Gcm: - return 12; - } - }; - exports.saltLength = saltLength; -}); - -// node_modules/@shinyoshiaki/jspack/jspack.js -var require_jspack = __commonJS((exports) => { - function JSPack() { - var el; - var bBE = false; - var m = this; - m._DeArray = function(a, p, l) { - return [a.slice(p, p + l)]; - }; - m._EnArray = function(a, p, l, v) { - for (var i = 0;i < l; a[p + i] = v[i] ? v[i] : 0, i++) { - } - }; - m._DeChar = function(a, p) { - return String.fromCharCode(a[p]); - }; - m._EnChar = function(a, p, v) { - a[p] = v.charCodeAt(0); - }; - m._DeInt = function(a, p) { - var lsb = bBE ? el.len - 1 : 0; - var nsb = bBE ? -1 : 1; - var stop = lsb + nsb * el.len; - var rv, i, f; - for (rv = 0, i = lsb, f = 1;i != stop; rv += a[p + i] * f, i += nsb, f *= 256) { - } - if (el.bSigned && rv & Math.pow(2, el.len * 8 - 1)) { - rv -= Math.pow(2, el.len * 8); - } - return rv; - }; - m._EnInt = function(a, p, v) { - var lsb = bBE ? el.len - 1 : 0; - var nsb = bBE ? -1 : 1; - var stop = lsb + nsb * el.len; - var i; - v = v < el.min ? el.min : v > el.max ? el.max : v; - for (i = lsb;i != stop; a[p + i] = v & 255, i += nsb, v >>= 8) { - } - }; - m._DeString = function(a, p, l) { - for (var rv = new Array(l), i = 0;i < l; rv[i] = String.fromCharCode(a[p + i]), i++) { - } - return rv.join(""); - }; - m._EnString = function(a, p, l, v) { - for (var t, i = 0;i < l; a[p + i] = (t = v.charCodeAt(i)) ? t : 0, i++) { - } - }; - m._De754 = function(a, p) { - var s, e, m2, i, d, nBits, mLen, eLen, eBias, eMax; - mLen = el.mLen, eLen = el.len * 8 - el.mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1; - i = bBE ? 0 : el.len - 1; - d = bBE ? 1 : -1; - s = a[p + i]; - i += d; - nBits = -7; - for (e = s & (1 << -nBits) - 1, s >>= -nBits, nBits += eLen;nBits > 0; e = e * 256 + a[p + i], i += d, nBits -= 8) { - } - for (m2 = e & (1 << -nBits) - 1, e >>= -nBits, nBits += mLen;nBits > 0; m2 = m2 * 256 + a[p + i], i += d, nBits -= 8) { - } - switch (e) { - case 0: - e = 1 - eBias; - break; - case eMax: - return m2 ? NaN : (s ? -1 : 1) * Infinity; - default: - m2 = m2 + Math.pow(2, mLen); - e = e - eBias; - break; - } - return (s ? -1 : 1) * m2 * Math.pow(2, e - mLen); - }; - m._En754 = function(a, p, v) { - var s, e, m2, i, d, c, mLen, eLen, eBias, eMax; - mLen = el.mLen, eLen = el.len * 8 - el.mLen - 1, eMax = (1 << eLen) - 1, eBias = eMax >> 1; - s = v < 0 ? 1 : 0; - v = Math.abs(v); - if (isNaN(v) || v == Infinity) { - m2 = isNaN(v) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(v) / Math.LN2); - if (v * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - v += el.rt / c; - } else { - v += el.rt * Math.pow(2, 1 - eBias); - } - if (v * c >= 2) { - e++; - c /= 2; - } - if (e + eBias >= eMax) { - m2 = 0; - e = eMax; - } else if (e + eBias >= 1) { - m2 = (v * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m2 = v * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - for (i = bBE ? el.len - 1 : 0, d = bBE ? -1 : 1;mLen >= 8; a[p + i] = m2 & 255, i += d, m2 /= 256, mLen -= 8) { - } - for (e = e << mLen | m2, eLen += mLen;eLen > 0; a[p + i] = e & 255, i += d, e /= 256, eLen -= 8) { - } - a[p + i - d] |= s * 128; - }; - m._DeInt64 = function(a, p) { - var start = bBE ? 0 : 7; - var nsb = bBE ? 1 : -1; - var stop = start + nsb * 8; - var rv = [0, 0, !el.bSigned]; - var i, f, rvi; - for (i = start, rvi = 1, f = 0;i != stop; rv[rvi] = (rv[rvi] << 8 >>> 0) + a[p + i], i += nsb, f++, rvi = f < 4 ? 1 : 0) { - } - return rv; - }; - m._EnInt64 = function(a, p, v) { - var start = bBE ? 0 : 7; - var nsb = bBE ? 1 : -1; - var stop = start + nsb * 8; - var i, f, rvi, s; - for (i = start, rvi = 1, f = 0, s = 24;i != stop; a[p + i] = v[rvi] >> s & 255, i += nsb, f++, rvi = f < 4 ? 1 : 0, s = 24 - 8 * (f % 4)) { - } - }; - m._sPattern = "(\\d + )?([AxcbBhHsfdiIlLqQ])"; - m._lenLut = { - A: 1, - x: 1, - c: 1, - b: 1, - B: 1, - h: 2, - H: 2, - s: 1, - f: 4, - d: 8, - i: 4, - I: 4, - l: 4, - L: 4, - q: 8, - Q: 8 - }; - m._elLut = { - A: { en: m._EnArray, de: m._DeArray }, - s: { en: m._EnString, de: m._DeString }, - c: { en: m._EnChar, de: m._DeChar }, - b: { en: m._EnInt, de: m._DeInt, len: 1, bSigned: true, min: -Math.pow(2, 7), max: Math.pow(2, 7) - 1 }, - B: { en: m._EnInt, de: m._DeInt, len: 1, bSigned: false, min: 0, max: Math.pow(2, 8) - 1 }, - h: { en: m._EnInt, de: m._DeInt, len: 2, bSigned: true, min: -Math.pow(2, 15), max: Math.pow(2, 15) - 1 }, - H: { en: m._EnInt, de: m._DeInt, len: 2, bSigned: false, min: 0, max: Math.pow(2, 16) - 1 }, - i: { en: m._EnInt, de: m._DeInt, len: 4, bSigned: true, min: -Math.pow(2, 31), max: Math.pow(2, 31) - 1 }, - I: { en: m._EnInt, de: m._DeInt, len: 4, bSigned: false, min: 0, max: Math.pow(2, 32) - 1 }, - l: { en: m._EnInt, de: m._DeInt, len: 4, bSigned: true, min: -Math.pow(2, 31), max: Math.pow(2, 31) - 1 }, - L: { en: m._EnInt, de: m._DeInt, len: 4, bSigned: false, min: 0, max: Math.pow(2, 32) - 1 }, - f: { en: m._En754, de: m._De754, len: 4, mLen: 23, rt: Math.pow(2, -24) - Math.pow(2, -77) }, - d: { en: m._En754, de: m._De754, len: 8, mLen: 52, rt: 0 }, - q: { en: m._EnInt64, de: m._DeInt64, bSigned: true }, - Q: { en: m._EnInt64, de: m._DeInt64, bSigned: false } - }; - m._UnpackSeries = function(n, s, a, p) { - for (var fxn = el.de, rv = [], i = 0;i < n; rv.push(fxn(a, p + i * s)), i++) { - } - return rv; - }; - m._PackSeries = function(n, s, a, p, v, i) { - for (var fxn = el.en, o = 0;o < n; fxn(a, p + o * s, v[i + o]), o++) { - } - }; - m.Unpack = function(fmt, a, p) { - bBE = fmt.charAt(0) != "<"; - p = p ? p : 0; - var re = new RegExp(this._sPattern, "g"); - var m2, n, s; - var rv = []; - while (m2 = re.exec(fmt)) { - n = m2[1] == undefined || m2[1] == "" ? 1 : parseInt(m2[1]); - s = this._lenLut[m2[2]]; - if (p + n * s > a.length) { - return; - } - switch (m2[2]) { - case "A": - case "s": - rv.push(this._elLut[m2[2]].de(a, p, n)); - break; - case "c": - case "b": - case "B": - case "h": - case "H": - case "i": - case "I": - case "l": - case "L": - case "f": - case "d": - case "q": - case "Q": - el = this._elLut[m2[2]]; - rv.push(this._UnpackSeries(n, s, a, p)); - break; - } - p += n * s; - } - return Array.prototype.concat.apply([], rv); - }; - m.PackTo = function(fmt, a, p, values) { - bBE = fmt.charAt(0) != "<"; - var re = new RegExp(this._sPattern, "g"); - var m2, n, s, j; - var i = 0; - while (m2 = re.exec(fmt)) { - n = m2[1] == undefined || m2[1] == "" ? 1 : parseInt(m2[1]); - s = this._lenLut[m2[2]]; - if (p + n * s > a.length) { - return false; - } - switch (m2[2]) { - case "A": - case "s": - if (i + 1 > values.length) { - return false; - } - this._elLut[m2[2]].en(a, p, n, values[i]); - i += 1; - break; - case "c": - case "b": - case "B": - case "h": - case "H": - case "i": - case "I": - case "l": - case "L": - case "f": - case "d": - case "q": - case "Q": - el = this._elLut[m2[2]]; - if (i + n > values.length) { - return false; - } - this._PackSeries(n, s, a, p, values, i); - i += n; - break; - case "x": - for (j = 0;j < n; j++) { - a[p + j] = 0; - } - break; - } - p += n * s; - } - return a; - }; - m.Pack = function(fmt, values) { - return this.PackTo(fmt, new Array(this.CalcLength(fmt)), 0, values); - }; - m.CalcLength = function(fmt) { - var re = new RegExp(this._sPattern, "g"); - var sum = 0; - var m2; - while (m2 = re.exec(fmt)) { - sum += (m2[1] == undefined || m2[1] == "" ? 1 : parseInt(m2[1])) * this._lenLut[m2[2]]; - } - return sum; - }; - } - exports.jspack = new JSPack; -}); - -// node_modules/werift-rtp/lib/common/src/binary.js -var require_binary = __commonJS((exports) => { - function random16() { - return jspack_1.jspack.Unpack("!H", (0, crypto_1.randomBytes)(2))[0]; - } - function random32() { - return jspack_1.jspack.Unpack("!L", (0, crypto_1.randomBytes)(4))[0]; - } - function bufferXor(a, b) { - if (a.length !== b.length) { - throw new TypeError("[webrtc-stun] You can not XOR buffers which length are different"); - } - const length = a.length; - const buffer = Buffer.allocUnsafe(length); - for (let i = 0;i < length; i++) { - buffer[i] = a[i] ^ b[i]; - } - return buffer; - } - function bufferArrayXor(arr) { - const length = [...arr].sort((a, b) => a.length - b.length).reverse()[0].length; - const xored = Buffer.allocUnsafe(length); - for (let i = 0;i < length; i++) { - xored[i] = 0; - arr.forEach((buffer) => { - xored[i] ^= buffer[i] ?? 0; - }); - } - return xored; - } - function getBit(bits, startIndex, length = 1) { - let bin = bits.toString(2).split(""); - bin = [...Array(8 - bin.length).fill("0"), ...bin]; - const s = bin.slice(startIndex, startIndex + length).join(""); - const v = Number.parseInt(s, 2); - return v; - } - function paddingByte(bits) { - const dec = bits.toString(2).split(""); - return [...[...Array(8 - dec.length)].map(() => "0"), ...dec].join(""); - } - function paddingBits(bits, expectLength) { - const dec = bits.toString(2); - return [...[...Array(expectLength - dec.length)].map(() => "0"), ...dec].join(""); - } - function bufferWriter(bytes, values) { - return createBufferWriter(bytes)(values); - } - function createBufferWriter(bytes, singleBuffer) { - const length = bytes.reduce((acc, cur) => acc + cur, 0); - const reuseBuffer = singleBuffer ? Buffer.alloc(length) : undefined; - return (values) => { - const buf = reuseBuffer || Buffer.alloc(length); - let offset = 0; - values.forEach((v, i) => { - const size = bytes[i]; - if (size === 8) - buf.writeBigUInt64BE(v, offset); - else - buf.writeUIntBE(v, offset, size); - offset += size; - }); - return buf; - }; - } - function bufferWriterLE(bytes, values) { - const length = bytes.reduce((acc, cur) => acc + cur, 0); - const buf = Buffer.alloc(length); - let offset = 0; - values.forEach((v, i) => { - const size = bytes[i]; - if (size === 8) - buf.writeBigUInt64LE(v, offset); - else - buf.writeUIntLE(v, offset, size); - offset += size; - }); - return buf; - } - function bufferReader(buf, bytes) { - let offset = 0; - return bytes.map((v) => { - let read; - if (v === 8) { - read = buf.readBigUInt64BE(offset); - } else { - read = buf.readUIntBE(offset, v); - } - offset += v; - return read; - }); - } - function buffer2ArrayBuffer(buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.BitStream = exports.dumpBuffer = exports.BufferChain = exports.BitWriter2 = exports.BitWriter = undefined; - exports.random16 = random16; - exports.random32 = random32; - exports.bufferXor = bufferXor; - exports.bufferArrayXor = bufferArrayXor; - exports.getBit = getBit; - exports.paddingByte = paddingByte; - exports.paddingBits = paddingBits; - exports.bufferWriter = bufferWriter; - exports.createBufferWriter = createBufferWriter; - exports.bufferWriterLE = bufferWriterLE; - exports.bufferReader = bufferReader; - exports.buffer2ArrayBuffer = buffer2ArrayBuffer; - var crypto_1 = import.meta.require("crypto"); - var jspack_1 = require_jspack(); - - class BitWriter { - constructor(bitLength) { - Object.defineProperty(this, "bitLength", { - enumerable: true, - configurable: true, - writable: true, - value: bitLength - }); - Object.defineProperty(this, "value", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - } - set(size, startIndex, value) { - value &= (1 << size) - 1; - this.value |= value << this.bitLength - size - startIndex; - return this; - } - get buffer() { - const length = Math.ceil(this.bitLength / 8); - const buf = Buffer.alloc(length); - buf.writeUIntBE(this.value, 0, length); - return buf; - } - } - exports.BitWriter = BitWriter; - - class BitWriter2 { - constructor(bitLength) { - Object.defineProperty(this, "bitLength", { - enumerable: true, - configurable: true, - writable: true, - value: bitLength - }); - Object.defineProperty(this, "_value", { - enumerable: true, - configurable: true, - writable: true, - value: 0n - }); - Object.defineProperty(this, "offset", { - enumerable: true, - configurable: true, - writable: true, - value: 0n - }); - if (bitLength > 32) { - throw new Error; - } - } - set(value, size = 1) { - let value_b = BigInt(value); - const size_b = BigInt(size); - value_b &= (1n << size_b) - 1n; - this._value |= value_b << BigInt(this.bitLength) - size_b - this.offset; - this.offset += size_b; - return this; - } - get value() { - return Number(this._value); - } - get buffer() { - const length = Math.ceil(this.bitLength / 8); - const buf = Buffer.alloc(length); - buf.writeUIntBE(this.value, 0, length); - return buf; - } - } - exports.BitWriter2 = BitWriter2; - - class BufferChain { - constructor(size) { - Object.defineProperty(this, "buffer", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - this.buffer = Buffer.alloc(size); - } - writeInt16BE(value, offset) { - this.buffer.writeInt16BE(value, offset); - return this; - } - writeUInt8(value, offset) { - this.buffer.writeUInt8(value, offset); - return this; - } - } - exports.BufferChain = BufferChain; - var dumpBuffer = (data) => "0x" + data.toString("hex").replace(/(.)(.)/g, "$1$2 ").split(" ").filter((s) => s != null && s.length > 0).join(",0x"); - exports.dumpBuffer = dumpBuffer; - - class BitStream { - constructor(uint8Array) { - Object.defineProperty(this, "uint8Array", { - enumerable: true, - configurable: true, - writable: true, - value: uint8Array - }); - Object.defineProperty(this, "position", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "bitsPending", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - } - writeBits(bits, value) { - if (bits == 0) { - return this; - } - value &= 4294967295 >>> 32 - bits; - let bitsConsumed; - if (this.bitsPending > 0) { - if (this.bitsPending > bits) { - this.uint8Array[this.position - 1] |= value << this.bitsPending - bits; - bitsConsumed = bits; - this.bitsPending -= bits; - } else if (this.bitsPending == bits) { - this.uint8Array[this.position - 1] |= value; - bitsConsumed = bits; - this.bitsPending = 0; - } else { - this.uint8Array[this.position - 1] |= value >> bits - this.bitsPending; - bitsConsumed = this.bitsPending; - this.bitsPending = 0; - } - } else { - bitsConsumed = Math.min(8, bits); - this.bitsPending = 8 - bitsConsumed; - this.uint8Array[this.position++] = value >> bits - bitsConsumed << this.bitsPending; - } - bits -= bitsConsumed; - if (bits > 0) { - this.writeBits(bits, value); - } - return this; - } - readBits(bits) { - return this._readBits(bits); - } - _readBits(bits, bitBuffer) { - if (typeof bitBuffer == "undefined") { - bitBuffer = 0; - } - if (bits == 0) { - return bitBuffer; - } - let partial; - let bitsConsumed; - if (this.bitsPending > 0) { - const byte = this.uint8Array[this.position - 1] & 255 >> 8 - this.bitsPending; - bitsConsumed = Math.min(this.bitsPending, bits); - this.bitsPending -= bitsConsumed; - partial = byte >> this.bitsPending; - } else { - bitsConsumed = Math.min(8, bits); - this.bitsPending = 8 - bitsConsumed; - partial = this.uint8Array[this.position++] >> this.bitsPending; - } - bits -= bitsConsumed; - bitBuffer = bitBuffer << bitsConsumed | partial; - return bits > 0 ? this._readBits(bits, bitBuffer) : bitBuffer; - } - seekTo(bitPos) { - this.position = bitPos / 8 | 0; - this.bitsPending = bitPos % 8; - if (this.bitsPending > 0) { - this.bitsPending = 8 - this.bitsPending; - this.position++; - } - } - } - exports.BitStream = BitStream; -}); - -// node_modules/werift-rtp/lib/common/src/number.js -var require_number = __commonJS((exports) => { - function uint8Add(a, b) { - return a + b & 255; - } - function uint16Add(a, b) { - return a + b & 65535; - } - function uint32Add(a, b) { - return Number(BigInt(a) + BigInt(b) & 0xffffffffn); - } - function uint24(v) { - return v & 16777215; - } - function uint16Gt(a, b) { - const halfMod = 32768; - return a < b && b - a > halfMod || a > b && a - b < halfMod; - } - function uint16Gte(a, b) { - return a === b || uint16Gt(a, b); - } - function uint32Gt(a, b) { - const halfMod = 2147483648; - return a < b && b - a > halfMod || a > b && a - b < halfMod; - } - function uint32Gte(a, b) { - return a === b || uint32Gt(a, b); - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.int = undefined; - exports.uint8Add = uint8Add; - exports.uint16Add = uint16Add; - exports.uint32Add = uint32Add; - exports.uint24 = uint24; - exports.uint16Gt = uint16Gt; - exports.uint16Gte = uint16Gte; - exports.uint32Gt = uint32Gt; - exports.uint32Gte = uint32Gte; - var int = (n) => Number.parseInt(n, 10); - exports.int = int; -}); - -// node_modules/werift-rtp/lib/common/src/promise.js -var require_promise = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PromiseQueue = undefined; - - class PromiseQueue { - constructor() { - Object.defineProperty(this, "queue", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "running", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "push", { - enumerable: true, - configurable: true, - writable: true, - value: (promise) => new Promise((r, f) => { - this.queue.push({ promise, done: r, failed: f }); - if (!this.running) { - this.run(); - } - }) - }); - } - async run() { - const task = this.queue.shift(); - if (task) { - this.running = true; - try { - const res = await task.promise(); - task.done(res); - } catch (error) { - task.failed(error); - } - this.run(); - } else { - this.running = false; - } - } - cancel() { - this.queue = []; - } - } - exports.PromiseQueue = PromiseQueue; -}); - -// node_modules/werift-rtp/lib/common/src/network.js -var require_network = __commonJS((exports) => { - async function randomPort(protocol = "udp4", interfaceAddresses) { - const socket = (0, dgram_1.createSocket)(protocol); - setImmediate(() => socket.bind({ - port: 0, - address: (0, exports.interfaceAddress)(protocol, interfaceAddresses) - })); - await new Promise((r) => { - socket.once("error", r); - socket.once("listening", r); - }); - const port = socket.address()?.port; - await new Promise((r) => socket.close(() => r())); - return port; - } - async function randomPorts(num, protocol = "udp4", interfaceAddresses) { - return Promise.all([...Array(num)].map(() => randomPort(protocol, interfaceAddresses))); - } - async function findPort(min, max, protocol = "udp4", interfaceAddresses) { - let port; - for (let i = min;i <= max; i++) { - const socket = (0, dgram_1.createSocket)(protocol); - setImmediate(() => socket.bind({ - port: i, - address: (0, exports.interfaceAddress)(protocol, interfaceAddresses) - })); - const err = await new Promise((r) => { - socket.once("error", (e) => r(e)); - socket.once("listening", () => r()); - }); - if (err) { - await new Promise((r) => socket.close(() => r())); - continue; - } - port = socket.address()?.port; - await new Promise((r) => socket.close(() => r())); - if (min <= port && port <= max) { - break; - } - } - if (!port) - throw new Error("port not found"); - return port; - } - function normalizeFamilyNodeV18(family) { - if (family === "IPv4") - return 4; - if (family === "IPv6") - return 6; - return family; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.interfaceAddress = undefined; - exports.randomPort = randomPort; - exports.randomPorts = randomPorts; - exports.findPort = findPort; - exports.normalizeFamilyNodeV18 = normalizeFamilyNodeV18; - var dgram_1 = import.meta.require("dgram"); - var interfaceAddress = (type, interfaceAddresses) => interfaceAddresses ? interfaceAddresses[type] : undefined; - exports.interfaceAddress = interfaceAddress; -}); - -// node_modules/werift-rtp/lib/common/src/type.js -var require_type = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); -}); - -// node_modules/ms/index.js -var require_ms = __commonJS((exports, module) => { - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || "ms").toLowerCase(); - switch (type) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n * y; - case "weeks": - case "week": - case "w": - return n * w; - case "days": - case "day": - case "d": - return n * d; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n * m; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n; - default: - return; - } - } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; - } - if (msAbs >= m) { - return Math.round(ms / m) + "m"; - } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; - } - return ms + "ms"; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, "day"); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, "hour"); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, "minute"); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, "second"); - } - return ms + " ms"; - } - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); - } - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === "string" && val.length > 0) { - return parse(val); - } else if (type === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); - }; -}); - -// node_modules/debug/src/common.js -var require_common = __commonJS((exports, module) => { - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env).forEach((key) => { - createDebug[key] = env[key]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash = 0; - for (let i = 0;i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug(...args) { - if (!debug.enabled) { - return; - } - const self2 = debug; - const curr = Number(new Date); - const ms = curr - (prevTime || curr); - self2.diff = ms; - self2.prev = prevTime; - self2.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self2, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self2, args); - const logFn = self2.log || createDebug.log; - logFn.apply(self2, args); - } - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; - Object.defineProperty(debug, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug); - } - return debug; - } - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean); - for (const ns of split) { - if (ns[0] === "-") { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) { - if (template[templateIndex] === "*") { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; - } - } - while (templateIndex < template.length && template[templateIndex] === "*") { - templateIndex++; - } - return templateIndex === template.length; - } - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - return false; - } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - createDebug.enable(createDebug.load()); - return createDebug; - } - module.exports = setup; -}); - -// node_modules/debug/src/browser.js -var require_browser = __commonJS((exports, module) => { - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { - return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - let m; - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); - } - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff); - if (!this.useColors) { - return; - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; - } - index++; - if (match === "%c") { - lastC = index; - } - }); - args.splice(lastC, 0, c); - } - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem("debug", namespaces); - } else { - exports.storage.removeItem("debug"); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG"); - } catch (error) { - } - if (!r && typeof process !== "undefined" && "env" in process) { - r = "release"; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - exports.log = console.debug || console.log || (() => { - }); - module.exports = require_common()(exports); - var { formatters } = module.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; - } - }; -}); - -// node_modules/has-flag/index.js -var require_has_flag = __commonJS((exports, module) => { - module.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); - }; -}); - -// node_modules/supports-color/index.js -var require_supports_color = __commonJS((exports, module) => { - function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - if (haveStream && !streamIsTTY && forceColor === undefined) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (process.platform === "win32") { - const osRelease = os.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") { - return 1; - } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; - } - function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); - } - var os = import.meta.require("os"); - var tty = import.meta.require("tty"); - var hasFlag = require_has_flag(); - var { env } = process; - var forceColor; - if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - forceColor = 0; - } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - forceColor = 1; - } - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - forceColor = 1; - } else if (env.FORCE_COLOR === "false") { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } - } - module.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) - }; -}); - -// node_modules/debug/src/node.js -var require_node = __commonJS((exports, module) => { - function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); - } - function formatArgs(args) { - const { namespace: name, useColors: useColors2 } = this; - if (useColors2) { - const c = this.color; - const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name} \x1B[0m`; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); - args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m"); - } else { - args[0] = getDate() + name + " " + args[0]; - } - } - function getDate() { - if (exports.inspectOpts.hideDate) { - return ""; - } - return new Date().toISOString() + " "; - } - function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + "\n"); - } - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete "release"; - } - } - function load() { - return "release"; - } - function init(debug) { - debug.inspectOpts = {}; - const keys = Object.keys(exports.inspectOpts); - for (let i = 0;i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } - } - var tty = import.meta.require("tty"); - var util = import.meta.require("util"); - exports.init = init; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util.deprecate(() => { - }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - exports.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor = require_supports_color(); - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error) { - } - exports.inspectOpts = Object.keys(process.env).filter((key) => { - return /^debug_/i.test(key); - }).reduce((obj, key) => { - const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === "null") { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; - }, {}); - module.exports = require_common()(exports); - var { formatters } = module.exports; - formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); - }; - formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); - }; -}); - -// node_modules/debug/src/index.js -var require_src2 = __commonJS((exports, module) => { - if (typeof process === "undefined" || process.type === "renderer" || false || process.__nwjs) { - module.exports = require_browser(); - } else { - module.exports = require_node(); - } -}); - -// node_modules/werift-rtp/lib/common/src/log.js -var require_log = __commonJS((exports) => { - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.debug = exports.WeriftError = undefined; - var debug_1 = __importDefault(require_src2()); - - class WeriftError extends Error { - constructor(props) { - super(props.message); - Object.defineProperty(this, "message", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "path", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - toJSON() { - return { - message: this.message, - payload: JSON.parse(JSON.stringify(this.payload)), - path: this.path - }; - } - } - exports.WeriftError = WeriftError; - exports.debug = debug_1.default.debug; -}); - -// node_modules/werift-rtp/lib/common/src/event.js -var require_event = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.EventDisposer = exports.Event = undefined; - - class Event { - constructor() { - Object.defineProperty(this, "event", { - enumerable: true, - configurable: true, - writable: true, - value: { - stack: [], - promiseStack: [], - eventId: 0 - } - }); - Object.defineProperty(this, "ended", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "onended", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "onerror", { - enumerable: true, - configurable: true, - writable: true, - value: (e) => { - } - }); - Object.defineProperty(this, "execute", { - enumerable: true, - configurable: true, - writable: true, - value: (...args) => { - if (this.ended) { - return; - } - for (const item of this.event.stack) { - item.execute(...args); - } - (async () => { - for (const item of this.event.promiseStack) { - await item.execute(...args); - } - })().catch((e) => { - this.onerror(e); - }); - } - }); - Object.defineProperty(this, "complete", { - enumerable: true, - configurable: true, - writable: true, - value: () => { - if (this.ended) { - return; - } - for (const item of this.event.stack) { - if (item.complete) { - item.complete(); - } - } - this.allUnsubscribe(); - this.ended = true; - if (this.onended) { - this.onended(); - this.onended = undefined; - } - } - }); - Object.defineProperty(this, "error", { - enumerable: true, - configurable: true, - writable: true, - value: (e) => { - if (this.ended) { - return; - } - for (const item of this.event.stack) { - if (item.error) { - item.error(e); - } - } - this.allUnsubscribe(); - } - }); - Object.defineProperty(this, "allUnsubscribe", { - enumerable: true, - configurable: true, - writable: true, - value: () => { - if (this.ended) { - throw new Error("event completed"); - } - this.event = { - stack: [], - promiseStack: [], - eventId: 0 - }; - } - }); - Object.defineProperty(this, "subscribe", { - enumerable: true, - configurable: true, - writable: true, - value: (execute, complete, error) => { - const id = this.event.eventId; - this.event.stack.push({ execute, id, complete, error }); - this.event.eventId++; - const unSubscribe = () => { - this.event.stack = this.event.stack.filter((item) => item.id !== id && item); - }; - const disposer = (disposer2) => { - disposer2.push(unSubscribe); - }; - return { unSubscribe, disposer }; - } - }); - Object.defineProperty(this, "queuingSubscribe", { - enumerable: true, - configurable: true, - writable: true, - value: (execute, complete, error) => { - if (this.ended) - throw new Error("event completed"); - const id = this.event.eventId; - this.event.promiseStack.push({ execute, id, complete, error }); - this.event.eventId++; - const unSubscribe = () => { - this.event.stack = this.event.stack.filter((item) => item.id !== id && item); - }; - const disposer = (disposer2) => { - disposer2.push(unSubscribe); - }; - return { unSubscribe, disposer }; - } - }); - Object.defineProperty(this, "once", { - enumerable: true, - configurable: true, - writable: true, - value: (execute, complete, error) => { - const off = this.subscribe((...args) => { - off.unSubscribe(); - execute(...args); - }, complete, error); - } - }); - Object.defineProperty(this, "watch", { - enumerable: true, - configurable: true, - writable: true, - value: (cb, timeLimit) => new Promise((resolve, reject) => { - const timeout = timeLimit && setTimeout(() => { - reject("Event watch timeout"); - }, timeLimit); - const { unSubscribe } = this.subscribe((...args) => { - const done = cb(...args); - if (done) { - if (timeout) - clearTimeout(timeout); - unSubscribe(); - resolve(args); - } - }); - }) - }); - Object.defineProperty(this, "asPromise", { - enumerable: true, - configurable: true, - writable: true, - value: (timeLimit) => new Promise((resolve, reject) => { - const timeout = timeLimit && setTimeout(() => { - reject("Event asPromise timeout"); - }, timeLimit); - this.once((...args) => { - if (timeout) - clearTimeout(timeout); - resolve(args); - }, () => { - if (timeout) - clearTimeout(timeout); - resolve([]); - }, (err) => { - if (timeout) - clearTimeout(timeout); - reject(err); - }); - }) - }); - } - pipe(e) { - this.subscribe((...args) => { - e.execute(...args); - }); - } - get returnTrigger() { - const { execute, error, complete } = this; - return { execute, error, complete }; - } - get returnListener() { - const { subscribe, once, asPromise } = this; - return { subscribe, once, asPromise }; - } - get length() { - return this.event.stack.length; - } - } - exports.Event = Event; - - class EventDisposer { - constructor() { - Object.defineProperty(this, "_disposer", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - } - push(disposer) { - this._disposer.push(disposer); - } - dispose() { - this._disposer.forEach((d) => d()); - this._disposer = []; - } - } - exports.EventDisposer = EventDisposer; -}); - -// node_modules/werift-rtp/lib/common/src/transport.js -var require_transport = __commonJS((exports) => { - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.TcpTransport = exports.UdpTransport = undefined; - var dgram_1 = import.meta.require("dgram"); - var net_1 = __importDefault(import.meta.require("net")); - var net_2 = import.meta.require("net"); - var log_1 = require_log(); - var network_1 = require_network(); - var log = (0, log_1.debug)("werift-ice:packages/ice/src/transport.ts"); - - class UdpTransport { - constructor(socketType, options = {}) { - Object.defineProperty(this, "socketType", { - enumerable: true, - configurable: true, - writable: true, - value: socketType - }); - Object.defineProperty(this, "options", { - enumerable: true, - configurable: true, - writable: true, - value: options - }); - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: "udp" - }); - Object.defineProperty(this, "socket", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "rinfo", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "onData", { - enumerable: true, - configurable: true, - writable: true, - value: () => { - } - }); - Object.defineProperty(this, "closed", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "send", { - enumerable: true, - configurable: true, - writable: true, - value: async (data, addr) => { - if (addr && !net_1.default.isIP(addr[0])) { - return new Promise((r, f) => { - this.socket.send(data, addr[1], addr[0], (error) => { - if (error) { - log("send error", addr, data); - f(error); - } else { - r(); - } - }); - }); - } else { - addr = addr ?? [this.rinfo?.address, this.rinfo?.port]; - this.socket.send(data, addr[1], addr[0]); - } - } - }); - Object.defineProperty(this, "close", { - enumerable: true, - configurable: true, - writable: true, - value: () => new Promise((r) => { - this.closed = true; - this.socket.once("close", r); - try { - this.socket.close(); - } catch (error) { - r(); - } - }) - }); - this.socket = (0, dgram_1.createSocket)(socketType); - this.socket.on("message", (data, info) => { - if ((0, network_1.normalizeFamilyNodeV18)(info.family) === 6) { - [info.address] = info.address.split("%"); - } - this.rinfo = info; - try { - this.onData(data, [info.address, info.port]); - } catch (error) { - log("onData error", error); - } - }); - } - static async init(type, options = {}) { - const transport = new UdpTransport(type, options); - await transport.init(); - return transport; - } - async init() { - const address = (0, network_1.interfaceAddress)(this.socketType, this.options.interfaceAddresses); - if (this.options.port) { - this.socket.bind({ port: this.options.port, address }); - } else if (this.options.portRange) { - const port = await (0, network_1.findPort)(this.options.portRange[0], this.options.portRange[1], this.socketType, this.options.interfaceAddresses); - this.socket.bind({ port, address }); - } else { - this.socket.bind({ address }); - } - await new Promise((r) => this.socket.once("listening", r)); - } - get address() { - return this.socket.address(); - } - get host() { - return this.socket.address().address; - } - get port() { - return this.socket.address().port; - } - } - exports.UdpTransport = UdpTransport; - - class TcpTransport { - constructor(addr) { - Object.defineProperty(this, "addr", { - enumerable: true, - configurable: true, - writable: true, - value: addr - }); - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: "tcp" - }); - Object.defineProperty(this, "connecting", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "client", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "onData", { - enumerable: true, - configurable: true, - writable: true, - value: () => { - } - }); - Object.defineProperty(this, "closed", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "send", { - enumerable: true, - configurable: true, - writable: true, - value: async (data, addr2) => { - await this.connecting; - this.client.write(data, (err) => { - if (err) { - console.log("err", err); - } - }); - } - }); - Object.defineProperty(this, "close", { - enumerable: true, - configurable: true, - writable: true, - value: async () => { - this.closed = true; - this.client.destroy(); - } - }); - this.connect(); - } - connect() { - if (this.closed) { - return; - } - if (this.client) { - this.client.destroy(); - } - this.connecting = new Promise((r, f) => { - try { - this.client = (0, net_2.connect)({ port: this.addr[1], host: this.addr[0] }, r); - } catch (error) { - f(error); - } - }); - this.client.on("data", (data) => { - const addr = [ - this.client.remoteAddress, - this.client.remotePort - ]; - this.onData(data, addr); - }); - this.client.on("end", () => { - this.connect(); - }); - this.client.on("error", (error) => { - console.log("error", error); - }); - } - async init() { - await this.connecting; - } - static async init(addr) { - const transport = new TcpTransport(addr); - await transport.init(); - return transport; - } - get address() { - return {}; - } - } - exports.TcpTransport = TcpTransport; -}); - -// node_modules/werift-rtp/lib/common/src/index.js -var require_src3 = __commonJS((exports) => { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - __exportStar(require_binary(), exports); - __exportStar(require_number(), exports); - __exportStar(require_promise(), exports); - __exportStar(require_network(), exports); - __exportStar(require_type(), exports); - __exportStar(require_log(), exports); - __exportStar(require_event(), exports); - __exportStar(require_transport(), exports); -}); - -// node_modules/@minhducsun2002/leb128/dist/index.js -var require_dist3 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.LEB128 = exports.SignedLEB128 = exports.UnsignedLEB128 = undefined; - var Mask; - (function(Mask2) { - Mask2[Mask2["LOWER_7"] = 127] = "LOWER_7"; - Mask2[Mask2["UPPER_1"] = 128] = "UPPER_1"; - })(Mask || (Mask = {})); - var int = (a) => Number.isSafeInteger(a); - - class UnsignedLEB128 { - static decode(buf, offset = 0) { - const mp = this.$scanForNullBytes(buf, offset); - let result = 0, shift = 0; - for (let d = 0;d <= mp - offset; d++) { - const a = buf[offset + d] & Mask.LOWER_7; - result |= a << shift; - shift += 8 - 1; - } - return result; - } - static encode(number) { - this.check(number); - if (number < 0) - throw new Error(`An unsigned number must NOT be negative, ${number} is!`); - let out = [], a = number; - do { - let byte = a & Mask.LOWER_7; - a >>= 8 - 1; - if (a) - byte = byte | Mask.UPPER_1; - out.push(byte); - } while (a); - return Uint8Array.from(out); - } - static check(n) { - if (!int(n)) - throw new Error(`${n} is not a safe integer!`); - } - static $scanForNullBytes(buf, offset = 0) { - let count = offset, tmp = 0; - do { - if (count >= buf.byteLength) - throw new Error("This is not a LEB128-encoded Uint8Array, no ending found!"); - tmp = buf.slice(count, count + 1)[0]; - count++; - } while (tmp & Mask.UPPER_1); - return count - 1; - } - static getLength(buf, offset = 0) { - return this.$scanForNullBytes(buf, offset) - offset; - } - } - exports.UnsignedLEB128 = UnsignedLEB128; - - class SignedLEB128 { - static $ceil7mul(n) { - let a = n; - while (a % 7) - a++; - return a; - } - static check(n) { - if (!int(n)) - throw new Error(`${n} is not a safe integer!`); - } - static encode(number) { - this.check(number); - if (number >= 0) - throw new Error(`A signed number must be negative, ${number} isn't!`); - const bitCount = Math.ceil(Math.log2(-number)); - return UnsignedLEB128.encode((1 << this.$ceil7mul(bitCount)) + number); - } - static decode(buf, offset = 0) { - const r = UnsignedLEB128.decode(buf, offset); - const bitCount = Math.ceil(Math.log2(r)); - const mask = 1 << bitCount; - return -(mask - r); - } - } - exports.SignedLEB128 = SignedLEB128; - - class LEB128 { - } - exports.LEB128 = LEB128; - LEB128.encode = (n) => (n >= 0 ? UnsignedLEB128 : SignedLEB128).encode(n); - LEB128.decode = (buf, offset = 0, s = false) => (s ? SignedLEB128 : UnsignedLEB128).decode(buf, offset); -}); - -// node_modules/werift-rtp/lib/rtp/src/imports/common.js -var require_common2 = __commonJS((exports) => { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - __exportStar(require_src3(), exports); -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/av1.js -var require_av1 = __commonJS((exports) => { - function leb128decode(buf) { - let value = 0; - let leb128bytes = 0; - for (let i = 0;i < 8; i++) { - const leb128byte = buf.readUInt8(i); - value |= (leb128byte & 127) << i * 7; - leb128bytes++; - if (!(leb128byte & 128)) { - break; - } - } - return [value, leb128bytes]; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.AV1Obu = exports.AV1RtpPayload = undefined; - exports.leb128decode = leb128decode; - var leb128_1 = require_dist3(); - var common_1 = require_common2(); - var log = (0, common_1.debug)("werift-rtp : packages/rtp/src/codec/av1.ts"); - - class AV1RtpPayload { - constructor() { - Object.defineProperty(this, "zBit_RtpStartsWithFragment", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "yBit_RtpEndsWithFragment", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "w_RtpNumObus", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "nBit_RtpStartsNewCodedVideoSequence", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "obu_or_fragment", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - } - static isDetectedFinalPacketInSequence(header) { - return header.marker; - } - get isKeyframe() { - return this.nBit_RtpStartsNewCodedVideoSequence === 1; - } - static getFrame(payloads) { - const frames = []; - const objects = payloads.flatMap((p) => p.obu_or_fragment).reduce((acc, cur, i) => { - acc[i] = cur; - return acc; - }, {}); - const length = Object.keys(objects).length; - for (const i of Object.keys(objects).map(Number)) { - const exist = objects[i]; - if (!exist) - continue; - const { data, isFragment } = exist; - if (isFragment) { - let fragments = []; - for (let head = i;head < length; head++) { - const target = objects[head]; - if (target.isFragment) { - fragments.push(target.data); - delete objects[head]; - } else { - break; - } - } - if (fragments.length <= 1) { - log("fragment lost, maybe packet lost"); - fragments = []; - } - frames.push(Buffer.concat(fragments)); - } else { - frames.push(data); - } - } - const obus = frames.map((f) => AV1Obu.deSerialize(f)); - const lastObu = obus.pop(); - return Buffer.concat([ - ...obus.map((o) => { - o.obu_has_size_field = 1; - return o.serialize(); - }), - lastObu.serialize() - ]); - } - } - exports.AV1RtpPayload = AV1RtpPayload; - Object.defineProperty(AV1RtpPayload, "deSerialize", { - enumerable: true, - configurable: true, - writable: true, - value: (buf) => { - const p = new AV1RtpPayload; - let offset = 0; - p.zBit_RtpStartsWithFragment = (0, common_1.getBit)(buf[offset], 0); - p.yBit_RtpEndsWithFragment = (0, common_1.getBit)(buf[offset], 1); - p.w_RtpNumObus = (0, common_1.getBit)(buf[offset], 2, 2); - p.nBit_RtpStartsNewCodedVideoSequence = (0, common_1.getBit)(buf[offset], 4); - offset++; - if (p.nBit_RtpStartsNewCodedVideoSequence && p.zBit_RtpStartsWithFragment) { - throw new Error; - } - [...Array(p.w_RtpNumObus - 1).keys()].forEach((i) => { - const [elementSize, bytes] = leb128decode(buf.subarray(offset)); - const start = offset + bytes; - const end = start + elementSize; - let isFragment2 = false; - if (p.zBit_RtpStartsWithFragment && i === 0) { - isFragment2 = true; - } - p.obu_or_fragment.push({ data: buf.subarray(start, end), isFragment: isFragment2 }); - offset += bytes + elementSize; - }); - let isFragment = false; - if (p.yBit_RtpEndsWithFragment || p.w_RtpNumObus === 1 && p.zBit_RtpStartsWithFragment) { - isFragment = true; - } - p.obu_or_fragment.push({ - data: buf.subarray(offset), - isFragment - }); - return p; - } - }); - - class AV1Obu { - constructor() { - Object.defineProperty(this, "obu_forbidden_bit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "obu_type", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "obu_extension_flag", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "obu_has_size_field", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "obu_reserved_1bit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - static deSerialize(buf) { - const obu = new AV1Obu; - let offset = 0; - obu.obu_forbidden_bit = (0, common_1.getBit)(buf[offset], 0); - obu.obu_type = OBU_TYPES[(0, common_1.getBit)(buf[offset], 1, 4)]; - obu.obu_extension_flag = (0, common_1.getBit)(buf[offset], 5); - obu.obu_has_size_field = (0, common_1.getBit)(buf[offset], 6); - obu.obu_reserved_1bit = (0, common_1.getBit)(buf[offset], 7); - offset++; - obu.payload = buf.subarray(offset); - return obu; - } - serialize() { - const header = new common_1.BitWriter2(8).set(this.obu_forbidden_bit).set(OBU_TYPE_IDS[this.obu_type], 4).set(this.obu_extension_flag).set(this.obu_has_size_field).set(this.obu_reserved_1bit).buffer; - let obuSize = Buffer.alloc(0); - if (this.obu_has_size_field) { - obuSize = leb128_1.LEB128.encode(this.payload.length); - } - return Buffer.concat([header, obuSize, this.payload]); - } - } - exports.AV1Obu = AV1Obu; - var OBU_TYPES = { - 0: "Reserved", - 1: "OBU_SEQUENCE_HEADER", - 2: "OBU_TEMPORAL_DELIMITER", - 3: "OBU_FRAME_HEADER", - 4: "OBU_TILE_GROUP", - 5: "OBU_METADATA", - 6: "OBU_FRAME", - 7: "OBU_REDUNDANT_FRAME_HEADER", - 8: "OBU_TILE_LIST", - 15: "OBU_PADDING" - }; - var OBU_TYPE_IDS = Object.entries(OBU_TYPES).reduce((acc, [key, value]) => { - acc[value] = Number(key); - return acc; - }, {}); -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/h264.js -var require_h264 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.NalUnitType = exports.H264RtpPayload = undefined; - var src_1 = require_src3(); - - class H264RtpPayload { - constructor() { - Object.defineProperty(this, "f", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "nri", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "nalUnitType", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "s", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "e", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "r", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "nalUnitPayloadType", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fragment", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - static deSerialize(buf, fragment) { - const h264 = new H264RtpPayload; - let offset = 0; - const naluHeader = buf[offset]; - h264.f = (0, src_1.getBit)(naluHeader, 0); - h264.nri = (0, src_1.getBit)(naluHeader, 1, 2); - h264.nalUnitType = (0, src_1.getBit)(naluHeader, 3, 5); - offset++; - h264.s = (0, src_1.getBit)(buf[offset], 0); - h264.e = (0, src_1.getBit)(buf[offset], 1); - h264.r = (0, src_1.getBit)(buf[offset], 2); - h264.nalUnitPayloadType = (0, src_1.getBit)(buf[offset], 3, 5); - offset++; - if (0 < h264.nalUnitType && h264.nalUnitType < exports.NalUnitType.stap_a) { - h264.payload = this.packaging(buf); - } else if (h264.nalUnitType === exports.NalUnitType.stap_a) { - let offset2 = stap_aHeaderSize; - let result = Buffer.alloc(0); - while (offset2 < buf.length) { - const naluSize = buf.readUInt16BE(offset2); - offset2 += stap_aNALULengthSize; - result = Buffer.concat([ - result, - this.packaging(buf.subarray(offset2, offset2 + naluSize)) - ]); - offset2 += naluSize; - } - h264.payload = result; - } else if (h264.nalUnitType === exports.NalUnitType.fu_a) { - if (!fragment) { - fragment = Buffer.alloc(0); - } - const fu = buf.subarray(offset); - h264.fragment = Buffer.concat([fragment, fu]); - if (h264.e) { - const bitStream = new src_1.BitStream(Buffer.alloc(1)).writeBits(1, 0).writeBits(2, h264.nri).writeBits(5, h264.nalUnitPayloadType); - const nalu = Buffer.concat([bitStream.uint8Array, h264.fragment]); - h264.fragment = undefined; - h264.payload = this.packaging(nalu); - } - } - return h264; - } - static packaging(buf) { - return Buffer.concat([annex_bNALUStartCode, buf]); - } - static isDetectedFinalPacketInSequence(header) { - return header.marker; - } - get isKeyframe() { - return this.nalUnitType === exports.NalUnitType.idrSlice || this.nalUnitPayloadType === exports.NalUnitType.idrSlice; - } - get isPartitionHead() { - if (this.nalUnitType === exports.NalUnitType.fu_a || this.nalUnitType === exports.NalUnitType.fu_b) { - return this.s !== 0; - } - return true; - } - } - exports.H264RtpPayload = H264RtpPayload; - exports.NalUnitType = { - idrSlice: 5, - stap_a: 24, - stap_b: 25, - mtap16: 26, - mtap24: 27, - fu_a: 28, - fu_b: 29 - }; - var annex_bNALUStartCode = Buffer.from([0, 0, 0, 1]); - var stap_aHeaderSize = 1; - var stap_aNALULengthSize = 2; -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/opus.js -var require_opus2 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.OpusRtpPayload = undefined; - var src_1 = require_src3(); - - class OpusRtpPayload { - constructor() { - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - static deSerialize(buf) { - const opus = new OpusRtpPayload; - opus.payload = buf; - return opus; - } - static isDetectedFinalPacketInSequence(header) { - return true; - } - get isKeyframe() { - return true; - } - static createCodecPrivate(samplingFrequency = 48000) { - return Buffer.concat([ - Buffer.from("OpusHead"), - (0, src_1.bufferWriter)([1, 1], [1, 2]), - (0, src_1.bufferWriterLE)([2, 4, 2, 1], [312, samplingFrequency, 0, 0]) - ]); - } - } - exports.OpusRtpPayload = OpusRtpPayload; -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/vp8.js -var require_vp8 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Vp8RtpPayload = undefined; - var src_1 = require_src3(); - - class Vp8RtpPayload { - constructor() { - Object.defineProperty(this, "xBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "nBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "sBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pid", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "iBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "lBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "tBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "kBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pictureId", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "size0", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "hBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "ver", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "size1", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "size2", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - } - static deSerialize(buf) { - const p = new Vp8RtpPayload; - let offset = 0; - p.xBit = (0, src_1.getBit)(buf[offset], 0); - p.nBit = (0, src_1.getBit)(buf[offset], 2); - p.sBit = (0, src_1.getBit)(buf[offset], 3); - p.pid = (0, src_1.getBit)(buf[offset], 5, 3); - offset++; - if (p.xBit) { - p.iBit = (0, src_1.getBit)(buf[offset], 0); - p.lBit = (0, src_1.getBit)(buf[offset], 1); - p.tBit = (0, src_1.getBit)(buf[offset], 2); - p.kBit = (0, src_1.getBit)(buf[offset], 3); - offset++; - } - if (p.iBit) { - p.mBit = (0, src_1.getBit)(buf[offset], 0); - if (p.mBit) { - const _7 = (0, src_1.paddingByte)((0, src_1.getBit)(buf[offset], 1, 7)); - const _8 = (0, src_1.paddingByte)(buf[offset + 1]); - p.pictureId = Number.parseInt(_7 + _8, 2); - offset += 2; - } else { - p.pictureId = (0, src_1.getBit)(buf[offset], 1, 7); - offset++; - } - } - if (p.lBit) { - offset++; - } - if (p.lBit || p.kBit) { - if (p.tBit) { - } - if (p.kBit) { - } - offset++; - } - p.payload = buf.subarray(offset); - if (p.payloadHeaderExist) { - p.size0 = (0, src_1.getBit)(buf[offset], 0, 3); - p.hBit = (0, src_1.getBit)(buf[offset], 3); - p.ver = (0, src_1.getBit)(buf[offset], 4, 3); - p.pBit = (0, src_1.getBit)(buf[offset], 7); - offset++; - p.size1 = buf[offset]; - offset++; - p.size2 = buf[offset]; - } - return p; - } - static isDetectedFinalPacketInSequence(header) { - return header.marker; - } - get isKeyframe() { - return this.pBit === 0; - } - get isPartitionHead() { - return this.sBit === 1; - } - get payloadHeaderExist() { - return this.sBit === 1 && this.pid === 0; - } - get size() { - if (this.payloadHeaderExist) { - const size = this.size0 + 8 * this.size1 + 2048 * this.size2; - return size; - } - return 0; - } - } - exports.Vp8RtpPayload = Vp8RtpPayload; -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/vp9.js -var require_vp9 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Vp9RtpPayload = undefined; - var src_1 = require_src3(); - - class Vp9RtpPayload { - constructor() { - Object.defineProperty(this, "iBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "lBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "bBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "eBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "vBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "zBit", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "m", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pictureId", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "tid", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "u", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "sid", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "d", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "tl0PicIdx", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "pDiff", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "n_s", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "y", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "g", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "width", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "height", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "n_g", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "pgT", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "pgU", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "pgP_Diff", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - static deSerialize(buf) { - const { p, offset } = this.parseRtpPayload(buf); - p.payload = buf.subarray(offset); - return p; - } - static parseRtpPayload(buf) { - const p = new Vp9RtpPayload; - let offset = 0; - p.iBit = (0, src_1.getBit)(buf[offset], 0); - p.pBit = (0, src_1.getBit)(buf[offset], 1); - p.lBit = (0, src_1.getBit)(buf[offset], 2); - p.fBit = (0, src_1.getBit)(buf[offset], 3); - p.bBit = (0, src_1.getBit)(buf[offset], 4); - p.eBit = (0, src_1.getBit)(buf[offset], 5); - p.vBit = (0, src_1.getBit)(buf[offset], 6); - p.zBit = (0, src_1.getBit)(buf[offset], 7); - offset++; - if (p.iBit) { - p.m = (0, src_1.getBit)(buf[offset], 0); - if (p.m) { - const _7 = (0, src_1.paddingByte)((0, src_1.getBit)(buf[offset], 1, 7)); - const _8 = (0, src_1.paddingByte)(buf[offset + 1]); - p.pictureId = Number.parseInt(_7 + _8, 2); - offset += 2; - } else { - p.pictureId = (0, src_1.getBit)(buf[offset], 1, 7); - offset++; - } - } - if (p.lBit) { - p.tid = (0, src_1.getBit)(buf[offset], 0, 3); - p.u = (0, src_1.getBit)(buf[offset], 3); - p.sid = (0, src_1.getBit)(buf[offset], 4, 3); - p.d = (0, src_1.getBit)(buf[offset], 7); - offset++; - if (p.fBit === 0) { - p.tl0PicIdx = buf[offset]; - offset++; - } - } - if (p.fBit && p.pBit) { - for (;; ) { - p.pDiff = [...p.pDiff, (0, src_1.getBit)(buf[offset], 0, 7)]; - const n = (0, src_1.getBit)(buf[offset], 7); - offset++; - if (n === 0) - break; - } - } - if (p.vBit) { - p.n_s = (0, src_1.getBit)(buf[offset], 0, 3); - p.y = (0, src_1.getBit)(buf[offset], 3); - p.g = (0, src_1.getBit)(buf[offset], 4); - offset++; - if (p.y) { - [...Array(p.n_s + 1)].forEach(() => { - p.width.push(buf.readUInt16BE(offset)); - offset += 2; - p.height.push(buf.readUInt16BE(offset)); - offset += 2; - }); - } - if (p.g) { - p.n_g = buf[offset]; - offset++; - } - if (p.n_g > 0) { - [...Array(p.n_g).keys()].forEach((i) => { - p.pgT.push((0, src_1.getBit)(buf[offset], 0, 3)); - p.pgU.push((0, src_1.getBit)(buf[offset], 3)); - const r = (0, src_1.getBit)(buf[offset], 4, 2); - offset++; - p.pgP_Diff[i] = []; - if (r > 0) { - [...Array(r)].forEach(() => { - p.pgP_Diff[i].push(buf[offset]); - offset++; - }); - } - }); - } - } - return { offset, p }; - } - static isDetectedFinalPacketInSequence(header) { - return header.marker; - } - get isKeyframe() { - return !!(!this.pBit && this.bBit && (!this.sid || !this.lBit)); - } - get isPartitionHead() { - return this.bBit && (!this.lBit || !this.d); - } - } - exports.Vp9RtpPayload = Vp9RtpPayload; -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/base.js -var require_base = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.DePacketizerBase = undefined; - - class DePacketizerBase { - constructor() { - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fragment", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - static deSerialize(buf, fragment) { - return {}; - } - static isDetectedFinalPacketInSequence(header) { - return true; - } - get isKeyframe() { - return true; - } - } - exports.DePacketizerBase = DePacketizerBase; -}); - -// node_modules/werift-rtp/lib/rtp/src/codec/index.js -var require_codec = __commonJS((exports) => { - function dePacketizeRtpPackets(codec, packets, frameFragmentBuffer) { - const basicCodecParser = (Depacketizer) => { - const partitions = []; - for (const p of packets) { - const codec2 = Depacketizer.deSerialize(p.payload, frameFragmentBuffer); - if (codec2.fragment) { - frameFragmentBuffer ?? (frameFragmentBuffer = Buffer.alloc(0)); - frameFragmentBuffer = codec2.fragment; - } else if (codec2.payload) { - frameFragmentBuffer = undefined; - } - partitions.push(codec2); - } - const isKeyframe = !!partitions.find((f) => f.isKeyframe); - const data = Buffer.concat(partitions.map((f) => f.payload).filter((p) => p)); - return { - isKeyframe, - data, - sequence: packets.at(-1)?.header.sequenceNumber ?? 0, - timestamp: packets.at(-1)?.header.timestamp ?? 0, - frameFragmentBuffer - }; - }; - switch (codec.toUpperCase()) { - case "AV1": { - const chunks = packets.map((p) => av1_1.AV1RtpPayload.deSerialize(p.payload)); - const isKeyframe = !!chunks.find((f) => f.isKeyframe); - const data = av1_1.AV1RtpPayload.getFrame(chunks); - return { - isKeyframe, - data, - sequence: packets.at(-1)?.header.sequenceNumber ?? 0, - timestamp: packets.at(-1)?.header.timestamp ?? 0 - }; - } - case "MPEG4/ISO/AVC": - return basicCodecParser(h264_1.H264RtpPayload); - case "VP8": - return basicCodecParser(vp8_1.Vp8RtpPayload); - case "VP9": - return basicCodecParser(vp9_1.Vp9RtpPayload); - case "OPUS": - return basicCodecParser(opus_1.OpusRtpPayload); - default: - throw new Error; - } - } - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.depacketizerCodecs = undefined; - exports.dePacketizeRtpPackets = dePacketizeRtpPackets; - var av1_1 = require_av1(); - var h264_1 = require_h264(); - var opus_1 = require_opus2(); - var vp8_1 = require_vp8(); - var vp9_1 = require_vp9(); - __exportStar(require_av1(), exports); - __exportStar(require_base(), exports); - __exportStar(require_h264(), exports); - __exportStar(require_opus2(), exports); - __exportStar(require_vp8(), exports); - __exportStar(require_vp9(), exports); - exports.depacketizerCodecs = [ - "MPEG4/ISO/AVC", - "VP8", - "VP9", - "OPUS", - "AV1" - ]; -}); - -// node_modules/werift-rtp/lib/rtp/src/helper.js -var require_helper = __commonJS((exports) => { - function enumerate(arr) { - return arr.map((v, i) => [i, v]); - } - function growBufferSize(buf, size) { - const glow = Buffer.alloc(size); - buf.copy(glow); - return glow; - } - function Int(v) { - return Number.parseInt(v.toString(), 10); - } - function isMedia(buf) { - const firstByte = buf[0]; - return firstByte > 127 && firstByte < 192; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.timer = undefined; - exports.enumerate = enumerate; - exports.growBufferSize = growBufferSize; - exports.Int = Int; - exports.isMedia = isMedia; - exports.timer = { - setTimeout: (...args) => { - const id = setTimeout(...args); - return () => clearTimeout(id); - }, - setInterval: (...args) => { - const id = setInterval(() => { - args[0](); - }, ...args.slice(1)); - return () => clearInterval(id); - } - }; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/header.js -var require_header = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtcpHeader = exports.RTCP_HEADER_SIZE = undefined; - var src_1 = require_src3(); - exports.RTCP_HEADER_SIZE = 4; - - class RtcpHeader { - constructor(props = {}) { - Object.defineProperty(this, "version", { - enumerable: true, - configurable: true, - writable: true, - value: 2 - }); - Object.defineProperty(this, "padding", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "length", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.assign(this, props); - } - serialize() { - const v_p_rc = new src_1.BitWriter(8); - v_p_rc.set(2, 0, this.version); - if (this.padding) - v_p_rc.set(1, 2, 1); - v_p_rc.set(5, 3, this.count); - const buf = (0, src_1.bufferWriter)([1, 1, 2], [v_p_rc.value, this.type, this.length]); - return buf; - } - static deSerialize(buf) { - const [v_p_rc, type, length] = (0, src_1.bufferReader)(buf, [1, 1, 2]); - const version = (0, src_1.getBit)(v_p_rc, 0, 2); - const padding = (0, src_1.getBit)(v_p_rc, 2, 1) > 0; - const count = (0, src_1.getBit)(v_p_rc, 3, 5); - return new RtcpHeader({ version, padding, count, type, length }); - } - } - exports.RtcpHeader = RtcpHeader; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/rr.js -var require_rr = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtcpReceiverInfo = exports.RtcpRrPacket = undefined; - var src_1 = require_src3(); - var rtcp_1 = require_rtcp(); - - class RtcpRrPacket { - constructor(props = {}) { - Object.defineProperty(this, "ssrc", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "reports", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: RtcpRrPacket.type - }); - Object.assign(this, props); - } - serialize() { - let payload = (0, src_1.bufferWriter)([4], [this.ssrc]); - payload = Buffer.concat([ - payload, - ...this.reports.map((report) => report.serialize()) - ]); - return rtcp_1.RtcpPacketConverter.serialize(RtcpRrPacket.type, this.reports.length, payload, Math.floor(payload.length / 4)); - } - static deSerialize(data, count) { - const [ssrc] = (0, src_1.bufferReader)(data, [4]); - let pos = 4; - const reports = []; - for (let _ = 0;_ < count; _++) { - reports.push(RtcpReceiverInfo.deSerialize(data.slice(pos, pos + 24))); - pos += 24; - } - return new RtcpRrPacket({ ssrc, reports }); - } - } - exports.RtcpRrPacket = RtcpRrPacket; - Object.defineProperty(RtcpRrPacket, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 201 - }); - - class RtcpReceiverInfo { - constructor(props = {}) { - Object.defineProperty(this, "ssrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fractionLost", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "packetsLost", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "highestSequence", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "jitter", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "lsr", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "dlsr", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - toJSON() { - return { - ssrc: this.ssrc, - fractionLost: this.fractionLost, - packetsLost: this.packetsLost, - highestSequence: this.highestSequence, - jitter: this.jitter, - lsr: this.lsr, - dlsr: this.dlsr - }; - } - serialize() { - return (0, src_1.bufferWriter)([4, 1, 3, 4, 4, 4, 4], [ - this.ssrc, - this.fractionLost, - this.packetsLost, - this.highestSequence, - this.jitter, - this.lsr, - this.dlsr - ]); - } - static deSerialize(data) { - const [ssrc, fractionLost, packetsLost, highestSequence, jitter, lsr, dlsr] = (0, src_1.bufferReader)(data, [4, 1, 3, 4, 4, 4, 4]); - return new RtcpReceiverInfo({ - ssrc, - fractionLost, - packetsLost, - highestSequence, - jitter, - lsr, - dlsr - }); - } - } - exports.RtcpReceiverInfo = RtcpReceiverInfo; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/rtpfb/nack.js -var require_nack = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.GenericNack = undefined; - var _1 = require_rtpfb(); - var src_1 = require_src3(); - var header_1 = require_header(); - - class GenericNack { - toJSON() { - return { - lost: this.lost, - senderSsrc: this.senderSsrc, - mediaSourceSsrc: this.mediaSourceSsrc - }; - } - constructor(props = {}) { - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: GenericNack.count - }); - Object.defineProperty(this, "header", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "senderSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mediaSourceSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "lost", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - if (!this.header) { - this.header = new header_1.RtcpHeader({ - type: _1.RtcpTransportLayerFeedback.type, - count: this.count, - version: 2 - }); - } - } - static deSerialize(data, header) { - const [senderSsrc, mediaSourceSsrc] = (0, src_1.bufferReader)(data, [4, 4]); - const lost = []; - for (let pos = 8;pos < data.length; pos += 4) { - const [pid, blp] = (0, src_1.bufferReader)(data.subarray(pos), [2, 2]); - lost.push(pid); - for (let diff = 0;diff < 16; diff++) { - if (blp >> diff & 1) { - lost.push(pid + diff + 1); - } - } - } - return new GenericNack({ - header, - senderSsrc, - mediaSourceSsrc, - lost - }); - } - serialize() { - const ssrcPair = (0, src_1.bufferWriter)([4, 4], [this.senderSsrc, this.mediaSourceSsrc]); - const fci = []; - if (this.lost.length > 0) { - let headPid = this.lost[0], blp = 0; - this.lost.slice(1).forEach((pid) => { - const diff = pid - headPid - 1; - if (diff >= 0 && diff < 16) { - blp |= 1 << diff; - } else { - fci.push((0, src_1.bufferWriter)([2, 2], [headPid, blp])); - headPid = pid; - blp = 0; - } - }); - fci.push((0, src_1.bufferWriter)([2, 2], [headPid, blp])); - } - const buf = Buffer.concat([ssrcPair, Buffer.concat(fci)]); - this.header.length = buf.length / 4; - return Buffer.concat([this.header.serialize(), buf]); - } - } - exports.GenericNack = GenericNack; - Object.defineProperty(GenericNack, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 1 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/rtpfb/twcc.js -var require_twcc = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PacketResult = exports.PacketStatus = exports.PacketChunk = exports.RecvDelta = exports.StatusVectorChunk = exports.RunLengthChunk = exports.TransportWideCC = undefined; - var common_1 = require_common2(); - var header_1 = require_header(); - var log = (0, common_1.debug)("werift/rtp/rtcp/rtpfb/twcc"); - - class TransportWideCC { - constructor(props = {}) { - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: TransportWideCC.count - }); - Object.defineProperty(this, "length", { - enumerable: true, - configurable: true, - writable: true, - value: 2 - }); - Object.defineProperty(this, "senderSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mediaSourceSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "baseSequenceNumber", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "packetStatusCount", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "referenceTime", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fbPktCount", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "packetChunks", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "recvDeltas", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "header", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - if (!this.header) { - this.header = new header_1.RtcpHeader({ - type: 205, - count: this.count, - version: 2 - }); - } - } - static deSerialize(data, header) { - const [senderSsrc, mediaSsrc, baseSequenceNumber, packetStatusCount, referenceTime, fbPktCount] = (0, common_1.bufferReader)(data, [4, 4, 2, 2, 3, 1]); - const packetChunks = []; - const recvDeltas = []; - let packetStatusPos = 16; - for (let processedPacketNum = 0;processedPacketNum < packetStatusCount; ) { - const type = (0, common_1.getBit)(data.slice(packetStatusPos, packetStatusPos + 1)[0], 0, 1); - let iPacketStatus; - switch (type) { - case PacketChunk.TypeTCCRunLengthChunk: - { - const packetStatus = RunLengthChunk.deSerialize(data.slice(packetStatusPos, packetStatusPos + 2)); - iPacketStatus = packetStatus; - const packetNumberToProcess = Math.min(packetStatusCount - processedPacketNum, packetStatus.runLength); - if (packetStatus.packetStatus === PacketStatus.TypeTCCPacketReceivedSmallDelta || packetStatus.packetStatus === PacketStatus.TypeTCCPacketReceivedLargeDelta) { - for (let _ = 0;_ < packetNumberToProcess; _++) { - recvDeltas.push(new RecvDelta({ type: packetStatus.packetStatus })); - } - } - processedPacketNum += packetNumberToProcess; - } - break; - case PacketChunk.TypeTCCStatusVectorChunk: - { - const packetStatus = StatusVectorChunk.deSerialize(data.slice(packetStatusPos, packetStatusPos + 2)); - iPacketStatus = packetStatus; - if (packetStatus.symbolSize === 0) { - packetStatus.symbolList.forEach((v) => { - if (v === PacketStatus.TypeTCCPacketReceivedSmallDelta) { - recvDeltas.push(new RecvDelta({ - type: PacketStatus.TypeTCCPacketReceivedSmallDelta - })); - } - }); - } - if (packetStatus.symbolSize === 1) { - packetStatus.symbolList.forEach((v) => { - if (v === PacketStatus.TypeTCCPacketReceivedSmallDelta || v === PacketStatus.TypeTCCPacketReceivedLargeDelta) { - recvDeltas.push(new RecvDelta({ - type: v - })); - } - }); - } - processedPacketNum += packetStatus.symbolList.length; - } - break; - } - if (!iPacketStatus) - throw new Error; - packetStatusPos += 2; - packetChunks.push(iPacketStatus); - } - let recvDeltaPos = packetStatusPos; - recvDeltas.forEach((delta) => { - if (delta.type === PacketStatus.TypeTCCPacketReceivedSmallDelta) { - delta.deSerialize(data.slice(recvDeltaPos, recvDeltaPos + 1)); - recvDeltaPos++; - } - if (delta.type === PacketStatus.TypeTCCPacketReceivedLargeDelta) { - delta.deSerialize(data.slice(recvDeltaPos, recvDeltaPos + 2)); - recvDeltaPos += 2; - } - }); - return new TransportWideCC({ - senderSsrc, - mediaSourceSsrc: mediaSsrc, - baseSequenceNumber, - packetStatusCount, - referenceTime, - fbPktCount, - recvDeltas, - packetChunks, - header - }); - } - serialize() { - const constBuf = (0, common_1.bufferWriter)([4, 4, 2, 2, 3, 1], [ - this.senderSsrc, - this.mediaSourceSsrc, - this.baseSequenceNumber, - this.packetStatusCount, - this.referenceTime, - this.fbPktCount - ]); - const chunks = Buffer.concat(this.packetChunks.map((chunk) => chunk.serialize())); - const deltas = Buffer.concat(this.recvDeltas.map((delta) => { - try { - return delta.serialize(); - } catch (error) { - log(error?.message); - return; - } - }).filter((v) => v)); - const buf = Buffer.concat([constBuf, chunks, deltas]); - if (this.header.padding && buf.length % 4 !== 0) { - const rest = 4 - buf.length % 4; - const padding = Buffer.alloc(rest); - padding[padding.length - 1] = padding.length; - this.header.length = Math.floor((buf.length + padding.length) / 4); - return Buffer.concat([this.header.serialize(), buf, padding]); - } - this.header.length = Math.floor(buf.length / 4); - return Buffer.concat([this.header.serialize(), buf]); - } - get packetResults() { - const currentSequenceNumber = this.baseSequenceNumber - 1; - const results = this.packetChunks.filter((v) => v instanceof RunLengthChunk).flatMap((chunk) => chunk.results(currentSequenceNumber)); - let deltaIdx = 0; - const referenceTime = BigInt(this.referenceTime) * 64n; - let currentReceivedAtMs = referenceTime; - for (const result of results) { - const recvDelta = this.recvDeltas[deltaIdx]; - if (!result.received || !recvDelta) { - continue; - } - currentReceivedAtMs += BigInt(recvDelta.delta) / 1000n; - result.delta = recvDelta.delta; - result.receivedAtMs = Number(currentReceivedAtMs); - deltaIdx++; - } - return results; - } - } - exports.TransportWideCC = TransportWideCC; - Object.defineProperty(TransportWideCC, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 15 - }); - - class RunLengthChunk { - constructor(props = {}) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "packetStatus", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "runLength", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - this.type = PacketChunk.TypeTCCRunLengthChunk; - } - static deSerialize(data) { - const packetStatus = (0, common_1.getBit)(data[0], 1, 2); - const runLength = ((0, common_1.getBit)(data[0], 3, 5) << 8) + data[1]; - return new RunLengthChunk({ type: 0, packetStatus, runLength }); - } - serialize() { - const buf = new common_1.BitWriter2(16).set(0).set(this.packetStatus, 2).set(this.runLength, 13).buffer; - return buf; - } - results(currentSequenceNumber) { - const received = this.packetStatus === PacketStatus.TypeTCCPacketReceivedSmallDelta || this.packetStatus === PacketStatus.TypeTCCPacketReceivedLargeDelta; - const results = []; - for (let i = 0;i <= this.runLength; ++i) { - results.push(new PacketResult({ sequenceNumber: ++currentSequenceNumber, received })); - } - return results; - } - } - exports.RunLengthChunk = RunLengthChunk; - - class StatusVectorChunk { - constructor(props = {}) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "symbolSize", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "symbolList", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - static deSerialize(data) { - const type = PacketChunk.TypeTCCStatusVectorChunk; - let symbolSize = (0, common_1.getBit)(data[0], 1, 1); - const symbolList = []; - function range(n, cb) { - for (let i = 0;i < n; i++) { - cb(i); - } - } - switch (symbolSize) { - case 0: - range(6, (i) => symbolList.push((0, common_1.getBit)(data[0], 2 + i, 1))); - range(8, (i) => symbolList.push((0, common_1.getBit)(data[1], i, 1))); - break; - case 1: - range(3, (i) => symbolList.push((0, common_1.getBit)(data[0], 2 + i * 2, 2))); - range(4, (i) => symbolList.push((0, common_1.getBit)(data[1], i * 2, 2))); - break; - default: - symbolSize = ((0, common_1.getBit)(data[0], 2, 6) << 8) + data[1]; - } - return new StatusVectorChunk({ type, symbolSize, symbolList }); - } - serialize() { - const buf = Buffer.alloc(2); - const writer = new common_1.BitWriter2(16).set(1).set(this.symbolSize); - const bits = this.symbolSize === 0 ? 1 : 2; - this.symbolList.forEach((v) => { - writer.set(v, bits); - }); - buf.writeUInt16BE(writer.value); - return buf; - } - } - exports.StatusVectorChunk = StatusVectorChunk; - - class RecvDelta { - constructor(props = {}) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "delta", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "parsed", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.assign(this, props); - } - static deSerialize(data) { - let type; - let delta; - if (data.length === 1) { - type = PacketStatus.TypeTCCPacketReceivedSmallDelta; - delta = 250 * data[0]; - } else if (data.length === 2) { - type = PacketStatus.TypeTCCPacketReceivedLargeDelta; - delta = 250 * data.readInt16BE(); - } - if (type === undefined || delta === undefined) - throw new Error; - return new RecvDelta({ type, delta }); - } - deSerialize(data) { - const res = RecvDelta.deSerialize(data); - this.delta = res.delta; - } - parseDelta() { - this.delta = Math.floor(this.delta / 250); - if (this.delta < 0 || this.delta > 255) { - if (this.delta > 32767) - this.delta = 32767; - if (this.delta < -32768) - this.delta = -32768; - if (!this.type) - this.type = PacketStatus.TypeTCCPacketReceivedLargeDelta; - } else { - if (!this.type) - this.type = PacketStatus.TypeTCCPacketReceivedSmallDelta; - } - this.parsed = true; - } - serialize() { - if (!this.parsed) - this.parseDelta(); - if (this.type === PacketStatus.TypeTCCPacketReceivedSmallDelta) { - const buf = Buffer.alloc(1); - buf.writeUInt8(this.delta); - return buf; - } else if (this.type === PacketStatus.TypeTCCPacketReceivedLargeDelta) { - const buf = Buffer.alloc(2); - buf.writeInt16BE(this.delta); - return buf; - } - throw new Error("errDeltaExceedLimit " + this.delta + " " + this.type); - } - } - exports.RecvDelta = RecvDelta; - var PacketChunk; - (function(PacketChunk2) { - PacketChunk2[PacketChunk2["TypeTCCRunLengthChunk"] = 0] = "TypeTCCRunLengthChunk"; - PacketChunk2[PacketChunk2["TypeTCCStatusVectorChunk"] = 1] = "TypeTCCStatusVectorChunk"; - PacketChunk2[PacketChunk2["packetStatusChunkLength"] = 2] = "packetStatusChunkLength"; - })(PacketChunk || (exports.PacketChunk = PacketChunk = {})); - var PacketStatus; - (function(PacketStatus2) { - PacketStatus2[PacketStatus2["TypeTCCPacketNotReceived"] = 0] = "TypeTCCPacketNotReceived"; - PacketStatus2[PacketStatus2["TypeTCCPacketReceivedSmallDelta"] = 1] = "TypeTCCPacketReceivedSmallDelta"; - PacketStatus2[PacketStatus2["TypeTCCPacketReceivedLargeDelta"] = 2] = "TypeTCCPacketReceivedLargeDelta"; - PacketStatus2[PacketStatus2["TypeTCCPacketReceivedWithoutDelta"] = 3] = "TypeTCCPacketReceivedWithoutDelta"; - })(PacketStatus || (exports.PacketStatus = PacketStatus = {})); - - class PacketResult { - constructor(props) { - Object.defineProperty(this, "sequenceNumber", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "delta", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "received", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "receivedAtMs", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.assign(this, props); - } - } - exports.PacketResult = PacketResult; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/rtpfb/index.js -var require_rtpfb = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtcpTransportLayerFeedback = undefined; - var common_1 = require_common2(); - var nack_1 = require_nack(); - var twcc_1 = require_twcc(); - var log = (0, common_1.debug)("werift-rtp:packages/rtp/rtcp/rtpfb/index"); - - class RtcpTransportLayerFeedback { - constructor(props = {}) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: RtcpTransportLayerFeedback.type - }); - Object.defineProperty(this, "feedback", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "header", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - serialize() { - const payload = this.feedback.serialize(); - return payload; - } - static deSerialize(data, header) { - let feedback; - switch (header.count) { - case nack_1.GenericNack.count: - feedback = nack_1.GenericNack.deSerialize(data, header); - break; - case twcc_1.TransportWideCC.count: - feedback = twcc_1.TransportWideCC.deSerialize(data, header); - break; - default: - log("unknown rtpfb packet", header.count); - break; - } - return new RtcpTransportLayerFeedback({ feedback, header }); - } - } - exports.RtcpTransportLayerFeedback = RtcpTransportLayerFeedback; - Object.defineProperty(RtcpTransportLayerFeedback, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 205 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/sdes.js -var require_sdes = __commonJS((exports) => { - function getPadding(len) { - if (len % 4 == 0) { - return 0; - } - return 4 - len % 4; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SourceDescriptionItem = exports.SourceDescriptionChunk = exports.RtcpSourceDescriptionPacket = undefined; - var src_1 = require_src3(); - var rtcp_1 = require_rtcp(); - - class RtcpSourceDescriptionPacket { - constructor(props) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: RtcpSourceDescriptionPacket.type - }); - Object.defineProperty(this, "chunks", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - get length() { - let length = 0; - this.chunks.forEach((chunk) => length += chunk.length); - return length; - } - serialize() { - let payload = Buffer.concat(this.chunks.map((chunk) => chunk.serialize())); - while (payload.length % 4) - payload = Buffer.concat([payload, Buffer.from([0])]); - return rtcp_1.RtcpPacketConverter.serialize(this.type, this.chunks.length, payload, payload.length / 4); - } - static deSerialize(payload, header) { - const chunks = []; - for (let i = 0;i < payload.length; ) { - const chunk = SourceDescriptionChunk.deSerialize(payload.slice(i)); - chunks.push(chunk); - i += chunk.length; - } - return new RtcpSourceDescriptionPacket({ chunks }); - } - } - exports.RtcpSourceDescriptionPacket = RtcpSourceDescriptionPacket; - Object.defineProperty(RtcpSourceDescriptionPacket, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 202 - }); - - class SourceDescriptionChunk { - constructor(props = {}) { - Object.defineProperty(this, "source", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "items", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - get length() { - let length = 4; - this.items.forEach((item) => length += item.length); - length += 1; - length += getPadding(length); - return length; - } - serialize() { - const data = Buffer.concat([ - (0, src_1.bufferWriter)([4], [this.source]), - Buffer.concat(this.items.map((item) => item.serialize())) - ]); - const res = Buffer.concat([data, Buffer.alloc(getPadding(data.length))]); - return res; - } - static deSerialize(data) { - const source = data.readUInt32BE(); - const items = []; - for (let i = 4;i < data.length; ) { - const type = data[i]; - if (type === 0) - break; - const item = SourceDescriptionItem.deSerialize(data.slice(i)); - items.push(item); - i += item.length; - } - return new SourceDescriptionChunk({ source, items }); - } - } - exports.SourceDescriptionChunk = SourceDescriptionChunk; - - class SourceDescriptionItem { - constructor(props) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "text", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - get length() { - return 1 + 1 + Buffer.from(this.text).length; - } - serialize() { - const text = Buffer.from(this.text); - return Buffer.concat([ - (0, src_1.bufferWriter)([1, 1], [this.type, text.length]), - text - ]); - } - static deSerialize(data) { - const type = data[0]; - const octetCount = data[1]; - const text = data.slice(2, 2 + octetCount).toString(); - return new SourceDescriptionItem({ type, text }); - } - } - exports.SourceDescriptionItem = SourceDescriptionItem; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/sr.js -var require_sr = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ntpTime2Sec = exports.RtcpSenderInfo = exports.RtcpSrPacket = undefined; - var src_1 = require_src3(); - var rr_1 = require_rr(); - var rtcp_1 = require_rtcp(); - - class RtcpSrPacket { - constructor(props) { - Object.defineProperty(this, "ssrc", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "senderInfo", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "reports", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: RtcpSrPacket.type - }); - Object.assign(this, props); - } - toJSON() { - return { - ssrc: this.ssrc, - senderInfo: this.senderInfo.toJSON(), - reports: this.reports.map((r) => r.toJSON()) - }; - } - serialize() { - let payload = Buffer.alloc(4); - payload.writeUInt32BE(this.ssrc); - payload = Buffer.concat([payload, this.senderInfo.serialize()]); - payload = Buffer.concat([ - payload, - ...this.reports.map((report) => report.serialize()) - ]); - return rtcp_1.RtcpPacketConverter.serialize(RtcpSrPacket.type, this.reports.length, payload, Math.floor(payload.length / 4)); - } - static deSerialize(payload, count) { - const ssrc = payload.readUInt32BE(); - const senderInfo = RtcpSenderInfo.deSerialize(payload.subarray(4, 24)); - let pos = 24; - const reports = []; - for (let _ = 0;_ < count; _++) { - reports.push(rr_1.RtcpReceiverInfo.deSerialize(payload.subarray(pos, pos + 24))); - pos += 24; - } - const packet = new RtcpSrPacket({ ssrc, senderInfo, reports }); - return packet; - } - } - exports.RtcpSrPacket = RtcpSrPacket; - Object.defineProperty(RtcpSrPacket, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 200 - }); - - class RtcpSenderInfo { - constructor(props = {}) { - Object.defineProperty(this, "ntpTimestamp", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "rtpTimestamp", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "packetCount", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "octetCount", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - toJSON() { - return { - ntpTimestamp: (0, exports.ntpTime2Sec)(this.ntpTimestamp), - rtpTimestamp: this.rtpTimestamp - }; - } - serialize() { - return (0, src_1.bufferWriter)([8, 4, 4, 4], [this.ntpTimestamp, this.rtpTimestamp, this.packetCount, this.octetCount]); - } - static deSerialize(data) { - const [ntpTimestamp, rtpTimestamp, packetCount, octetCount] = (0, src_1.bufferReader)(data, [8, 4, 4, 4]); - return new RtcpSenderInfo({ - ntpTimestamp, - rtpTimestamp, - packetCount, - octetCount - }); - } - } - exports.RtcpSenderInfo = RtcpSenderInfo; - var ntpTime2Sec = (ntp) => { - const [ntpSec, ntpMsec] = (0, src_1.bufferReader)((0, src_1.bufferWriter)([8], [ntp]), [4, 4]); - return Number(`${ntpSec}.${ntpMsec}`); - }; - exports.ntpTime2Sec = ntpTime2Sec; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/rtcp.js -var require_rtcp = __commonJS((exports) => { - function isRtcp(buf) { - return buf.length >= 2 && buf[1] >= 192 && buf[1] <= 208; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtcpPacketConverter = undefined; - exports.isRtcp = isRtcp; - var common_1 = require_common2(); - var header_1 = require_header(); - var psfb_1 = require_psfb(); - var rr_1 = require_rr(); - var rtpfb_1 = require_rtpfb(); - var sdes_1 = require_sdes(); - var sr_1 = require_sr(); - var log = (0, common_1.debug)("werift-rtp:packages/rtp/src/rtcp/rtcp.ts"); - - class RtcpPacketConverter { - static serialize(type, count, payload, length) { - const header = new header_1.RtcpHeader({ - type, - count, - version: 2, - length - }); - const buf = header.serialize(); - return Buffer.concat([buf, payload]); - } - static deSerialize(data) { - let pos = 0; - const packets = []; - while (pos < data.length) { - const header = header_1.RtcpHeader.deSerialize(data.subarray(pos, pos + header_1.RTCP_HEADER_SIZE)); - pos += header_1.RTCP_HEADER_SIZE; - let payload = data.subarray(pos); - pos += header.length * 4; - if (header.padding) { - payload = payload.subarray(0, payload.length - payload.subarray(-1)[0]); - } - try { - switch (header.type) { - case sr_1.RtcpSrPacket.type: - packets.push(sr_1.RtcpSrPacket.deSerialize(payload, header.count)); - break; - case rr_1.RtcpRrPacket.type: - packets.push(rr_1.RtcpRrPacket.deSerialize(payload, header.count)); - break; - case sdes_1.RtcpSourceDescriptionPacket.type: - packets.push(sdes_1.RtcpSourceDescriptionPacket.deSerialize(payload, header)); - break; - case rtpfb_1.RtcpTransportLayerFeedback.type: - packets.push(rtpfb_1.RtcpTransportLayerFeedback.deSerialize(payload, header)); - break; - case psfb_1.RtcpPayloadSpecificFeedback.type: - packets.push(psfb_1.RtcpPayloadSpecificFeedback.deSerialize(payload, header)); - break; - default: - break; - } - } catch (error) { - log("deSerialize RTCP", error); - } - } - return packets; - } - } - exports.RtcpPacketConverter = RtcpPacketConverter; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/psfb/fullIntraRequest.js -var require_fullIntraRequest = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.FullIntraRequest = undefined; - var src_1 = require_src3(); - - class FullIntraRequest { - constructor(props = {}) { - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: FullIntraRequest.count - }); - Object.defineProperty(this, "senderSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mediaSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "fir", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - get length() { - return Math.floor(this.serialize().length / 4 - 1); - } - static deSerialize(data) { - const [senderSsrc, mediaSsrc] = (0, src_1.bufferReader)(data, [4, 4]); - const fir = []; - for (let i = 8;i < data.length; i += 8) { - fir.push({ ssrc: data.readUInt32BE(i), sequenceNumber: data[i + 4] }); - } - return new FullIntraRequest({ senderSsrc, mediaSsrc, fir }); - } - serialize() { - const ssrcs = (0, src_1.bufferWriter)([4, 4], [this.senderSsrc, this.mediaSsrc]); - const fir = Buffer.alloc(this.fir.length * 8); - this.fir.forEach(({ ssrc, sequenceNumber }, i) => { - fir.writeUInt32BE(ssrc, i * 8); - fir[i * 8 + 4] = sequenceNumber; - }); - return Buffer.concat([ssrcs, fir]); - } - } - exports.FullIntraRequest = FullIntraRequest; - Object.defineProperty(FullIntraRequest, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 4 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/psfb/pictureLossIndication.js -var require_pictureLossIndication = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.PictureLossIndication = undefined; - var src_1 = require_src3(); - - class PictureLossIndication { - constructor(props = {}) { - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: PictureLossIndication.count - }); - Object.defineProperty(this, "length", { - enumerable: true, - configurable: true, - writable: true, - value: 2 - }); - Object.defineProperty(this, "senderSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mediaSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - static deSerialize(data) { - const [senderSsrc, mediaSsrc] = (0, src_1.bufferReader)(data, [4, 4]); - return new PictureLossIndication({ senderSsrc, mediaSsrc }); - } - serialize() { - return (0, src_1.bufferWriter)([4, 4], [this.senderSsrc, this.mediaSsrc]); - } - } - exports.PictureLossIndication = PictureLossIndication; - Object.defineProperty(PictureLossIndication, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 1 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/psfb/remb.js -var require_remb = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.ReceiverEstimatedMaxBitrate = undefined; - var src_1 = require_src3(); - - class ReceiverEstimatedMaxBitrate { - constructor(props = {}) { - Object.defineProperty(this, "length", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "count", { - enumerable: true, - configurable: true, - writable: true, - value: ReceiverEstimatedMaxBitrate.count - }); - Object.defineProperty(this, "senderSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "mediaSsrc", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "uniqueID", { - enumerable: true, - configurable: true, - writable: true, - value: "REMB" - }); - Object.defineProperty(this, "ssrcNum", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "brExp", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "brMantissa", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "bitrate", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "ssrcFeedbacks", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - static deSerialize(data) { - const [senderSsrc, mediaSsrc, uniqueID, ssrcNum, e_m] = (0, src_1.bufferReader)(data, [4, 4, 4, 1, 1]); - const brExp = (0, src_1.getBit)(e_m, 0, 6); - const brMantissa = ((0, src_1.getBit)(e_m, 6, 2) << 16) + (data[14] << 8) + data[15]; - const bitrate = brExp > 46 ? 18446744073709551615n : BigInt(brMantissa) << BigInt(brExp); - const ssrcFeedbacks = []; - for (let i = 16;i < data.length; i += 4) { - const feedback = data.slice(i).readUIntBE(0, 4); - ssrcFeedbacks.push(feedback); - } - return new ReceiverEstimatedMaxBitrate({ - senderSsrc, - mediaSsrc, - uniqueID: (0, src_1.bufferWriter)([4], [uniqueID]).toString(), - ssrcNum, - brExp, - brMantissa, - ssrcFeedbacks, - bitrate - }); - } - serialize() { - const constant = Buffer.concat([ - (0, src_1.bufferWriter)([4, 4], [this.senderSsrc, this.mediaSsrc]), - Buffer.from(this.uniqueID), - (0, src_1.bufferWriter)([1], [this.ssrcNum]) - ]); - const writer = new src_1.BitWriter(24); - writer.set(6, 0, this.brExp).set(18, 6, this.brMantissa); - const feedbacks = Buffer.concat(this.ssrcFeedbacks.map((feedback) => (0, src_1.bufferWriter)([4], [feedback]))); - const buf = Buffer.concat([ - constant, - (0, src_1.bufferWriter)([3], [writer.value]), - feedbacks - ]); - this.length = buf.length / 4; - return buf; - } - } - exports.ReceiverEstimatedMaxBitrate = ReceiverEstimatedMaxBitrate; - Object.defineProperty(ReceiverEstimatedMaxBitrate, "count", { - enumerable: true, - configurable: true, - writable: true, - value: 15 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtcp/psfb/index.js -var require_psfb = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtcpPayloadSpecificFeedback = undefined; - var common_1 = require_common2(); - var rtcp_1 = require_rtcp(); - var fullIntraRequest_1 = require_fullIntraRequest(); - var pictureLossIndication_1 = require_pictureLossIndication(); - var remb_1 = require_remb(); - var log = (0, common_1.debug)("werift-rtp: /rtcp/psfb/index"); - - class RtcpPayloadSpecificFeedback { - constructor(props = {}) { - Object.defineProperty(this, "type", { - enumerable: true, - configurable: true, - writable: true, - value: RtcpPayloadSpecificFeedback.type - }); - Object.defineProperty(this, "feedback", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.assign(this, props); - } - serialize() { - const payload = this.feedback.serialize(); - return rtcp_1.RtcpPacketConverter.serialize(this.type, this.feedback.count, payload, this.feedback.length); - } - static deSerialize(data, header) { - let feedback; - switch (header.count) { - case fullIntraRequest_1.FullIntraRequest.count: - feedback = fullIntraRequest_1.FullIntraRequest.deSerialize(data); - break; - case pictureLossIndication_1.PictureLossIndication.count: - feedback = pictureLossIndication_1.PictureLossIndication.deSerialize(data); - break; - case remb_1.ReceiverEstimatedMaxBitrate.count: - feedback = remb_1.ReceiverEstimatedMaxBitrate.deSerialize(data); - break; - default: - log("unknown psfb packet", header.count); - break; - } - return new RtcpPayloadSpecificFeedback({ feedback }); - } - } - exports.RtcpPayloadSpecificFeedback = RtcpPayloadSpecificFeedback; - Object.defineProperty(RtcpPayloadSpecificFeedback, "type", { - enumerable: true, - configurable: true, - writable: true, - value: 206 - }); -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/headerExtension.js -var require_headerExtension = __commonJS((exports) => { - function rtpHeaderExtensionsParser(extensions, extIdUriMap) { - return extensions.map((extension) => { - const uri = extIdUriMap[extension.id]; - if (!uri) { - return { uri: "unknown", value: extension.payload }; - } - switch (uri) { - case exports.RTP_EXTENSION_URI.sdesMid: - case exports.RTP_EXTENSION_URI.sdesRTPStreamID: - case exports.RTP_EXTENSION_URI.repairedRtpStreamId: - return { uri, value: deserializeString(extension.payload) }; - case exports.RTP_EXTENSION_URI.transportWideCC: - return { uri, value: deserializeUint16BE(extension.payload) }; - case exports.RTP_EXTENSION_URI.absSendTime: - return { - uri, - value: deserializeAbsSendTime(extension.payload) - }; - case exports.RTP_EXTENSION_URI.audioLevelIndication: { - return { - uri, - value: deserializeAudioLevelIndication(extension.payload) - }; - } - case exports.RTP_EXTENSION_URI.videoOrientation: - return { uri, value: deserializeVideoOrientation(extension.payload) }; - default: - return { uri, value: extension.payload }; - } - }).reduce((acc, cur) => { - if (cur) - acc[cur.uri] = cur.value; - return acc; - }, {}); - } - function serializeSdesMid(id) { - return Buffer.from(id); - } - function serializeSdesRTPStreamID(id) { - return Buffer.from(id); - } - function serializeRepairedRtpStreamId(id) { - return Buffer.from(id); - } - function serializeTransportWideCC(transportSequenceNumber) { - return (0, src_1.bufferWriter)([2], [transportSequenceNumber]); - } - function serializeAbsSendTime(ntpTime) { - const buf = Buffer.alloc(3); - const time = ntpTime >> 14n & 0x00ffffffn; - buf.writeUIntBE(Number(time), 0, 3); - return buf; - } - function serializeAudioLevelIndication(level) { - const stream = new src_1.BitStream(Buffer.alloc(1)); - stream.writeBits(1, 1); - stream.writeBits(7, level); - return stream.uint8Array; - } - function deserializeString(buf) { - return buf.toString(); - } - function deserializeUint16BE(buf) { - return buf.readUInt16BE(); - } - function deserializeAbsSendTime(buf) { - return (0, src_1.bufferReader)(buf, [3])[0]; - } - function deserializeAudioLevelIndication(buf) { - const stream = new src_1.BitStream(buf); - const value = { - v: stream.readBits(1) === 1, - level: stream.readBits(7) - }; - return value; - } - function deserializeVideoOrientation(payload) { - const stream = new src_1.BitStream(payload); - stream.readBits(4); - const value = { - c: stream.readBits(1), - f: stream.readBits(1), - r1: stream.readBits(1), - r0: stream.readBits(1) - }; - return value; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RTP_EXTENSION_URI = undefined; - exports.rtpHeaderExtensionsParser = rtpHeaderExtensionsParser; - exports.serializeSdesMid = serializeSdesMid; - exports.serializeSdesRTPStreamID = serializeSdesRTPStreamID; - exports.serializeRepairedRtpStreamId = serializeRepairedRtpStreamId; - exports.serializeTransportWideCC = serializeTransportWideCC; - exports.serializeAbsSendTime = serializeAbsSendTime; - exports.serializeAudioLevelIndication = serializeAudioLevelIndication; - exports.deserializeString = deserializeString; - exports.deserializeUint16BE = deserializeUint16BE; - exports.deserializeAbsSendTime = deserializeAbsSendTime; - exports.deserializeAudioLevelIndication = deserializeAudioLevelIndication; - exports.deserializeVideoOrientation = deserializeVideoOrientation; - var src_1 = require_src3(); - exports.RTP_EXTENSION_URI = { - sdesMid: "urn:ietf:params:rtp-hdrext:sdes:mid", - sdesRTPStreamID: "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id", - repairedRtpStreamId: "urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id", - transportWideCC: "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01", - absSendTime: "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time", - dependencyDescriptor: "https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension", - audioLevelIndication: "urn:ietf:params:rtp-hdrext:ssrc-audio-level", - videoOrientation: "urn:3gpp:video-orientation" - }; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/red/packet.js -var require_packet = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RedHeader = exports.Red = undefined; - var common_1 = require_common2(); - var log = (0, common_1.debug)("packages/rtp/src/rtp/red/packet.ts"); - - class Red { - constructor() { - Object.defineProperty(this, "header", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "blocks", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - } - static deSerialize(bufferOrArrayBuffer) { - const buf = bufferOrArrayBuffer instanceof ArrayBuffer ? Buffer.from(bufferOrArrayBuffer) : bufferOrArrayBuffer; - const red = new Red; - let offset = 0; - [red.header, offset] = RedHeader.deSerialize(buf); - red.header.fields.forEach(({ blockLength, timestampOffset, blockPT }) => { - if (blockLength && timestampOffset) { - const block = buf.subarray(offset, offset + blockLength); - red.blocks.push({ block, blockPT, timestampOffset }); - offset += blockLength; - } else { - const block = buf.subarray(offset); - red.blocks.push({ block, blockPT }); - } - }); - return red; - } - serialize() { - this.header = new RedHeader; - for (const { timestampOffset, blockPT, block } of this.blocks) { - if (timestampOffset) { - this.header.fields.push({ - fBit: 1, - blockPT, - blockLength: block.length, - timestampOffset - }); - } else { - this.header.fields.push({ fBit: 0, blockPT }); - } - } - let buf = this.header.serialize(); - for (const { block } of this.blocks) { - buf = Buffer.concat([buf, block]); - } - return buf; - } - } - exports.Red = Red; - - class RedHeader { - constructor() { - Object.defineProperty(this, "fields", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - } - static deSerialize(buf) { - let offset = 0; - const header = new RedHeader; - for (;; ) { - const field = {}; - header.fields.push(field); - const bitStream = new common_1.BitStream(buf.subarray(offset)); - field.fBit = bitStream.readBits(1); - field.blockPT = bitStream.readBits(7); - offset++; - if (field.fBit === 0) { - break; - } - field.timestampOffset = bitStream.readBits(14); - field.blockLength = bitStream.readBits(10); - offset += 3; - } - return [header, offset]; - } - serialize() { - let buf = Buffer.alloc(0); - for (const field of this.fields) { - try { - if (field.timestampOffset && field.blockLength) { - const bitStream = new common_1.BitStream(Buffer.alloc(4)).writeBits(1, field.fBit).writeBits(7, field.blockPT).writeBits(14, field.timestampOffset).writeBits(10, field.blockLength); - buf = Buffer.concat([buf, bitStream.uint8Array]); - } else { - const bitStream = new common_1.BitStream(Buffer.alloc(1)).writeBits(1, 0).writeBits(7, field.blockPT); - buf = Buffer.concat([buf, bitStream.uint8Array]); - } - } catch (error) { - log(error?.message); - } - } - return buf; - } - } - exports.RedHeader = RedHeader; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/red/encoder.js -var require_encoder = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RedEncoder = undefined; - var src_1 = require_src3(); - var packet_1 = require_packet(); - - class RedEncoder { - constructor(distance = 1) { - Object.defineProperty(this, "distance", { - enumerable: true, - configurable: true, - writable: true, - value: distance - }); - Object.defineProperty(this, "cache", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "cacheSize", { - enumerable: true, - configurable: true, - writable: true, - value: 10 - }); - } - push(payload) { - this.cache.push(payload); - if (this.cache.length > this.cacheSize) { - this.cache.shift(); - } - } - build() { - const red = new packet_1.Red; - const redundantPayloads = this.cache.slice(-(this.distance + 1)); - const presentPayload = redundantPayloads.pop(); - if (!presentPayload) { - return red; - } - redundantPayloads.forEach((redundant) => { - const timestampOffset = (0, src_1.uint32Add)(presentPayload.timestamp, -redundant.timestamp); - if (timestampOffset > Max14Uint) { - return; - } - red.blocks.push({ - block: redundant.block, - blockPT: redundant.blockPT, - timestampOffset - }); - }); - red.blocks.push({ - block: presentPayload.block, - blockPT: presentPayload.blockPT - }); - return red; - } - } - exports.RedEncoder = RedEncoder; - var Max14Uint = (1 << 14) - 1; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/red/handler.js -var require_handler = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RedHandler = undefined; - var __1 = require_src4(); - - class RedHandler { - constructor() { - Object.defineProperty(this, "size", { - enumerable: true, - configurable: true, - writable: true, - value: 150 - }); - Object.defineProperty(this, "sequenceNumbers", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - } - push(red, base) { - const packets = []; - red.blocks.forEach(({ blockPT, timestampOffset, block }, i) => { - const sequenceNumber = (0, __1.uint16Add)(base.header.sequenceNumber, -(red.blocks.length - (i + 1))); - if (timestampOffset) { - packets.push(new __1.RtpPacket(new __1.RtpHeader({ - timestamp: (0, __1.uint32Add)(base.header.timestamp, -timestampOffset), - payloadType: blockPT, - ssrc: base.header.ssrc, - sequenceNumber, - marker: true - }), block)); - } else { - packets.push(new __1.RtpPacket(new __1.RtpHeader({ - timestamp: base.header.timestamp, - payloadType: blockPT, - ssrc: base.header.ssrc, - sequenceNumber, - marker: true - }), block)); - } - }); - const filtered = packets.filter((p) => { - if (this.sequenceNumbers.includes(p.header.sequenceNumber)) { - return false; - } else { - if (this.sequenceNumbers.length > this.size) { - this.sequenceNumbers.shift(); - } - this.sequenceNumbers.push(p.header.sequenceNumber); - return true; - } - }); - return filtered; - } - } - exports.RedHandler = RedHandler; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/rtp.js -var require_rtp = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtpPacket = exports.RtpHeader = exports.ExtensionProfiles = undefined; - var src_1 = require_src3(); - exports.ExtensionProfiles = { - OneByte: 48862, - TwoByte: 4096 - }; - var seqNumOffset = 2; - var timestampOffset = 4; - var ssrcOffset = 8; - var csrcOffset = 12; - var csrcSize = 4; - - class RtpHeader { - constructor(props = {}) { - Object.defineProperty(this, "version", { - enumerable: true, - configurable: true, - writable: true, - value: 2 - }); - Object.defineProperty(this, "padding", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "paddingSize", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "extension", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "marker", { - enumerable: true, - configurable: true, - writable: true, - value: false - }); - Object.defineProperty(this, "payloadOffset", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "payloadType", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "sequenceNumber", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "timestamp", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "ssrc", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "csrcLength", { - enumerable: true, - configurable: true, - writable: true, - value: 0 - }); - Object.defineProperty(this, "csrc", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.defineProperty(this, "extensionProfile", { - enumerable: true, - configurable: true, - writable: true, - value: exports.ExtensionProfiles.OneByte - }); - Object.defineProperty(this, "extensionLength", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "extensions", { - enumerable: true, - configurable: true, - writable: true, - value: [] - }); - Object.assign(this, props); - } - static deSerialize(rawPacket) { - const h = new RtpHeader; - let currOffset = 0; - const v_p_x_cc = rawPacket[currOffset++]; - h.version = (0, src_1.getBit)(v_p_x_cc, 0, 2); - h.padding = (0, src_1.getBit)(v_p_x_cc, 2) > 0; - h.extension = (0, src_1.getBit)(v_p_x_cc, 3) > 0; - h.csrcLength = (0, src_1.getBit)(v_p_x_cc, 4, 4); - h.csrc = [...Array(h.csrcLength)].map(() => { - const csrc = rawPacket.readUInt32BE(currOffset); - currOffset += 4; - return csrc; - }); - currOffset += csrcOffset - 1; - const m_pt = rawPacket[1]; - h.marker = (0, src_1.getBit)(m_pt, 0) > 0; - h.payloadType = (0, src_1.getBit)(m_pt, 1, 7); - h.sequenceNumber = rawPacket.readUInt16BE(seqNumOffset); - h.timestamp = rawPacket.readUInt32BE(timestampOffset); - h.ssrc = rawPacket.readUInt32BE(ssrcOffset); - for (let i = 0;i < h.csrc.length; i++) { - const offset = csrcOffset + i * csrcSize; - h.csrc[i] = rawPacket.subarray(offset).readUInt32BE(); - } - if (h.extension) { - h.extensionProfile = rawPacket.subarray(currOffset).readUInt16BE(); - currOffset += 2; - const extensionLength = rawPacket.subarray(currOffset).readUInt16BE() * 4; - h.extensionLength = extensionLength; - currOffset += 2; - switch (h.extensionProfile) { - case exports.ExtensionProfiles.OneByte: - { - const end = currOffset + extensionLength; - while (currOffset < end) { - if (rawPacket[currOffset] === 0) { - currOffset++; - continue; - } - const extId = rawPacket[currOffset] >> 4; - const len = (rawPacket[currOffset] & (rawPacket[currOffset] ^ 240)) + 1; - currOffset++; - if (extId === 15) { - break; - } - const extension = { - id: extId, - payload: rawPacket.subarray(currOffset, currOffset + len) - }; - h.extensions = [...h.extensions, extension]; - currOffset += len; - } - } - break; - case exports.ExtensionProfiles.TwoByte: - { - const end = currOffset + extensionLength; - while (currOffset < end) { - if (rawPacket[currOffset] === 0) { - currOffset++; - continue; - } - const extId = rawPacket[currOffset]; - currOffset++; - const len = rawPacket[currOffset]; - currOffset++; - const extension = { - id: extId, - payload: rawPacket.subarray(currOffset, currOffset + len) - }; - h.extensions = [...h.extensions, extension]; - currOffset += len; - } - } - break; - default: - { - const extension = { - id: 0, - payload: rawPacket.subarray(currOffset, currOffset + extensionLength) - }; - h.extensions = [...h.extensions, extension]; - currOffset += h.extensions[0].payload.length; - } - break; - } - } - h.payloadOffset = currOffset; - if (h.padding) { - h.paddingSize = rawPacket[rawPacket.length - 1]; - } - return h; - } - get serializeSize() { - const { csrc, extensionProfile, extensions } = this; - let size = 12 + csrc.length * csrcSize; - if (extensions.length > 0 || this.extension === true) { - let extSize = 4; - switch (extensionProfile) { - case exports.ExtensionProfiles.OneByte: - for (const extension of extensions) { - extSize += 1 + extension.payload.length; - } - break; - case exports.ExtensionProfiles.TwoByte: - for (const extension of extensions) { - extSize += 2 + extension.payload.length; - } - break; - default: - extSize += extensions[0].payload.length; - } - size += Math.floor((extSize + 3) / 4) * 4; - } - return size; - } - serialize(size) { - const buf = Buffer.alloc(size); - let offset = 0; - const v_p_x_cc = new src_1.BitWriter(8); - v_p_x_cc.set(2, 0, this.version); - if (this.padding) - v_p_x_cc.set(1, 2, 1); - if (this.extensions.length > 0) - this.extension = true; - if (this.extension) - v_p_x_cc.set(1, 3, 1); - v_p_x_cc.set(4, 4, this.csrc.length); - buf.writeUInt8(v_p_x_cc.value, offset++); - const m_pt = new src_1.BitWriter(8); - if (this.marker) - m_pt.set(1, 0, 1); - m_pt.set(7, 1, this.payloadType); - buf.writeUInt8(m_pt.value, offset++); - buf.writeUInt16BE(this.sequenceNumber, seqNumOffset); - offset += 2; - buf.writeUInt32BE(this.timestamp, timestampOffset); - offset += 4; - buf.writeUInt32BE(this.ssrc, ssrcOffset); - offset += 4; - for (const csrc of this.csrc) { - buf.writeUInt32BE(csrc, offset); - offset += 4; - } - if (this.extension) { - const extHeaderPos = offset; - buf.writeUInt16BE(this.extensionProfile, offset); - offset += 4; - const startExtensionsPos = offset; - switch (this.extensionProfile) { - case exports.ExtensionProfiles.OneByte: - for (const extension of this.extensions) { - buf.writeUInt8(extension.id << 4 | extension.payload.length - 1, offset++); - extension.payload.copy(buf, offset); - offset += extension.payload.length; - } - break; - case exports.ExtensionProfiles.TwoByte: - for (const extension of this.extensions) { - buf.writeUInt8(extension.id, offset++); - buf.writeUInt8(extension.payload.length, offset++); - extension.payload.copy(buf, offset); - offset += extension.payload.length; - } - break; - default: { - const extLen = this.extensions[0].payload.length; - if (extLen % 4 != 0) { - throw new Error; - } - this.extensions[0].payload.copy(buf, offset); - offset += extLen; - } - } - const extSize = offset - startExtensionsPos; - const roundedExtSize = Math.trunc((extSize + 3) / 4) * 4; - buf.writeUInt16BE(Math.trunc(roundedExtSize / 4), extHeaderPos + 2); - for (let i = 0;i < roundedExtSize - extSize; i++) { - buf.writeUInt8(0, offset); - offset++; - } - } - this.payloadOffset = offset; - return buf; - } - } - exports.RtpHeader = RtpHeader; - - class RtpPacket { - constructor(header, payload) { - Object.defineProperty(this, "header", { - enumerable: true, - configurable: true, - writable: true, - value: header - }); - Object.defineProperty(this, "payload", { - enumerable: true, - configurable: true, - writable: true, - value: payload - }); - } - get serializeSize() { - return this.header.serializeSize + this.payload.length; - } - clone() { - return new RtpPacket(new RtpHeader({ ...this.header }), this.payload); - } - serialize() { - let buf = this.header.serialize(this.header.serializeSize + this.payload.length); - const { payloadOffset } = this.header; - this.payload.copy(buf, payloadOffset); - if (this.header.padding) { - const padding = Buffer.alloc(this.header.paddingSize); - padding.writeUInt8(this.header.paddingSize, this.header.paddingSize - 1); - buf = Buffer.concat([buf, padding]); - } - return buf; - } - static deSerialize(buf) { - const header = RtpHeader.deSerialize(buf); - const p = new RtpPacket(header, buf.subarray(header.payloadOffset, buf.length - header.paddingSize)); - return p; - } - clear() { - this.payload = null; - } - } - exports.RtpPacket = RtpPacket; -}); - -// node_modules/werift-rtp/lib/rtp/src/rtp/rtx.js -var require_rtx = __commonJS((exports) => { - function unwrapRtx(rtx, payloadType, ssrc) { - const packet = new rtp_1.RtpPacket(new rtp_1.RtpHeader({ - payloadType, - marker: rtx.header.marker, - sequenceNumber: jspack_1.jspack.Unpack("!H", rtx.payload.subarray(0, 2))[0], - timestamp: rtx.header.timestamp, - ssrc - }), rtx.payload.subarray(2)); - return packet; - } - function wrapRtx(packet, payloadType, sequenceNumber, ssrc) { - const rtx = new rtp_1.RtpPacket(new rtp_1.RtpHeader({ - payloadType, - marker: packet.header.marker, - sequenceNumber, - timestamp: packet.header.timestamp, - ssrc, - csrc: packet.header.csrc, - extensions: packet.header.extensions - }), Buffer.concat([ - Buffer.from(jspack_1.jspack.Pack("!H", [packet.header.sequenceNumber])), - packet.payload - ])); - return rtx; - } - Object.defineProperty(exports, "__esModule", { value: true }); - exports.unwrapRtx = unwrapRtx; - exports.wrapRtx = wrapRtx; - var jspack_1 = require_jspack(); - var rtp_1 = require_rtp(); -}); - -// node_modules/aes-js/index.js -var require_aes_js = __commonJS((exports, module) => { - /*! MIT License. Copyright 2015-2018 Richard Moore . See LICENSE.txt. */ - (function(root) { - function checkInt(value) { - return parseInt(value) === value; - } - function checkInts(arrayish) { - if (!checkInt(arrayish.length)) { - return false; - } - for (var i = 0;i < arrayish.length; i++) { - if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) { - return false; - } - } - return true; - } - function coerceArray(arg, copy) { - if (arg.buffer && arg.name === "Uint8Array") { - if (copy) { - if (arg.slice) { - arg = arg.slice(); - } else { - arg = Array.prototype.slice.call(arg); - } - } - return arg; - } - if (Array.isArray(arg)) { - if (!checkInts(arg)) { - throw new Error("Array contains invalid value: " + arg); - } - return new Uint8Array(arg); - } - if (checkInt(arg.length) && checkInts(arg)) { - return new Uint8Array(arg); - } - throw new Error("unsupported array-like object"); - } - function createArray(length) { - return new Uint8Array(length); - } - function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) { - if (sourceStart != null || sourceEnd != null) { - if (sourceArray.slice) { - sourceArray = sourceArray.slice(sourceStart, sourceEnd); - } else { - sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd); - } - } - targetArray.set(sourceArray, targetStart); - } - var convertUtf8 = function() { - function toBytes(text) { - var result = [], i = 0; - text = encodeURI(text); - while (i < text.length) { - var c = text.charCodeAt(i++); - if (c === 37) { - result.push(parseInt(text.substr(i, 2), 16)); - i += 2; - } else { - result.push(c); - } - } - return coerceArray(result); - } - function fromBytes(bytes) { - var result = [], i = 0; - while (i < bytes.length) { - var c = bytes[i]; - if (c < 128) { - result.push(String.fromCharCode(c)); - i++; - } else if (c > 191 && c < 224) { - result.push(String.fromCharCode((c & 31) << 6 | bytes[i + 1] & 63)); - i += 2; - } else { - result.push(String.fromCharCode((c & 15) << 12 | (bytes[i + 1] & 63) << 6 | bytes[i + 2] & 63)); - i += 3; - } - } - return result.join(""); - } - return { - toBytes, - fromBytes - }; - }(); - var convertHex = function() { - function toBytes(text) { - var result = []; - for (var i = 0;i < text.length; i += 2) { - result.push(parseInt(text.substr(i, 2), 16)); - } - return result; - } - var Hex = "0123456789abcdef"; - function fromBytes(bytes) { - var result = []; - for (var i = 0;i < bytes.length; i++) { - var v = bytes[i]; - result.push(Hex[(v & 240) >> 4] + Hex[v & 15]); - } - return result.join(""); - } - return { - toBytes, - fromBytes - }; - }(); - var numberOfRounds = { 16: 10, 24: 12, 32: 14 }; - var rcon = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145]; - var S = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22]; - var Si = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125]; - var T1 = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986]; - var T2 = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766]; - var T3 = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126]; - var T4 = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436]; - var T5 = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890]; - var T6 = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935]; - var T7 = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239000, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600]; - var T8 = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998000, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480]; - var U1 = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795]; - var U2 = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855]; - var U3 = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239000, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150]; - var U4 = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998000, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925]; - function convertToInt32(bytes) { - var result = []; - for (var i = 0;i < bytes.length; i += 4) { - result.push(bytes[i] << 24 | bytes[i + 1] << 16 | bytes[i + 2] << 8 | bytes[i + 3]); - } - return result; - } - var AES = function(key) { - if (!(this instanceof AES)) { - throw Error("AES must be instanitated with `new`"); - } - Object.defineProperty(this, "key", { - value: coerceArray(key, true) - }); - this._prepare(); - }; - AES.prototype._prepare = function() { - var rounds = numberOfRounds[this.key.length]; - if (rounds == null) { - throw new Error("invalid key size (must be 16, 24 or 32 bytes)"); - } - this._Ke = []; - this._Kd = []; - for (var i = 0;i <= rounds; i++) { - this._Ke.push([0, 0, 0, 0]); - this._Kd.push([0, 0, 0, 0]); - } - var roundKeyCount = (rounds + 1) * 4; - var KC = this.key.length / 4; - var tk = convertToInt32(this.key); - var index; - for (var i = 0;i < KC; i++) { - index = i >> 2; - this._Ke[index][i % 4] = tk[i]; - this._Kd[rounds - index][i % 4] = tk[i]; - } - var rconpointer = 0; - var t = KC, tt; - while (t < roundKeyCount) { - tt = tk[KC - 1]; - tk[0] ^= S[tt >> 16 & 255] << 24 ^ S[tt >> 8 & 255] << 16 ^ S[tt & 255] << 8 ^ S[tt >> 24 & 255] ^ rcon[rconpointer] << 24; - rconpointer += 1; - if (KC != 8) { - for (var i = 1;i < KC; i++) { - tk[i] ^= tk[i - 1]; - } - } else { - for (var i = 1;i < KC / 2; i++) { - tk[i] ^= tk[i - 1]; - } - tt = tk[KC / 2 - 1]; - tk[KC / 2] ^= S[tt & 255] ^ S[tt >> 8 & 255] << 8 ^ S[tt >> 16 & 255] << 16 ^ S[tt >> 24 & 255] << 24; - for (var i = KC / 2 + 1;i < KC; i++) { - tk[i] ^= tk[i - 1]; - } - } - var i = 0, r, c; - while (i < KC && t < roundKeyCount) { - r = t >> 2; - c = t % 4; - this._Ke[r][c] = tk[i]; - this._Kd[rounds - r][c] = tk[i++]; - t++; - } - } - for (var r = 1;r < rounds; r++) { - for (var c = 0;c < 4; c++) { - tt = this._Kd[r][c]; - this._Kd[r][c] = U1[tt >> 24 & 255] ^ U2[tt >> 16 & 255] ^ U3[tt >> 8 & 255] ^ U4[tt & 255]; - } - } - }; - AES.prototype.encrypt = function(plaintext) { - if (plaintext.length != 16) { - throw new Error("invalid plaintext size (must be 16 bytes)"); - } - var rounds = this._Ke.length - 1; - var a = [0, 0, 0, 0]; - var t = convertToInt32(plaintext); - for (var i = 0;i < 4; i++) { - t[i] ^= this._Ke[0][i]; - } - for (var r = 1;r < rounds; r++) { - for (var i = 0;i < 4; i++) { - a[i] = T1[t[i] >> 24 & 255] ^ T2[t[(i + 1) % 4] >> 16 & 255] ^ T3[t[(i + 2) % 4] >> 8 & 255] ^ T4[t[(i + 3) % 4] & 255] ^ this._Ke[r][i]; - } - t = a.slice(); - } - var result = createArray(16), tt; - for (var i = 0;i < 4; i++) { - tt = this._Ke[rounds][i]; - result[4 * i] = (S[t[i] >> 24 & 255] ^ tt >> 24) & 255; - result[4 * i + 1] = (S[t[(i + 1) % 4] >> 16 & 255] ^ tt >> 16) & 255; - result[4 * i + 2] = (S[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255; - result[4 * i + 3] = (S[t[(i + 3) % 4] & 255] ^ tt) & 255; - } - return result; - }; - AES.prototype.decrypt = function(ciphertext) { - if (ciphertext.length != 16) { - throw new Error("invalid ciphertext size (must be 16 bytes)"); - } - var rounds = this._Kd.length - 1; - var a = [0, 0, 0, 0]; - var t = convertToInt32(ciphertext); - for (var i = 0;i < 4; i++) { - t[i] ^= this._Kd[0][i]; - } - for (var r = 1;r < rounds; r++) { - for (var i = 0;i < 4; i++) { - a[i] = T5[t[i] >> 24 & 255] ^ T6[t[(i + 3) % 4] >> 16 & 255] ^ T7[t[(i + 2) % 4] >> 8 & 255] ^ T8[t[(i + 1) % 4] & 255] ^ this._Kd[r][i]; - } - t = a.slice(); - } - var result = createArray(16), tt; - for (var i = 0;i < 4; i++) { - tt = this._Kd[rounds][i]; - result[4 * i] = (Si[t[i] >> 24 & 255] ^ tt >> 24) & 255; - result[4 * i + 1] = (Si[t[(i + 3) % 4] >> 16 & 255] ^ tt >> 16) & 255; - result[4 * i + 2] = (Si[t[(i + 2) % 4] >> 8 & 255] ^ tt >> 8) & 255; - result[4 * i + 3] = (Si[t[(i + 1) % 4] & 255] ^ tt) & 255; - } - return result; - }; - var ModeOfOperationECB = function(key) { - if (!(this instanceof ModeOfOperationECB)) { - throw Error("AES must be instanitated with `new`"); - } - this.description = "Electronic Code Block"; - this.name = "ecb"; - this._aes = new AES(key); - }; - ModeOfOperationECB.prototype.encrypt = function(plaintext) { - plaintext = coerceArray(plaintext); - if (plaintext.length % 16 !== 0) { - throw new Error("invalid plaintext size (must be multiple of 16 bytes)"); - } - var ciphertext = createArray(plaintext.length); - var block = createArray(16); - for (var i = 0;i < plaintext.length; i += 16) { - copyArray(plaintext, block, 0, i, i + 16); - block = this._aes.encrypt(block); - copyArray(block, ciphertext, i); - } - return ciphertext; - }; - ModeOfOperationECB.prototype.decrypt = function(ciphertext) { - ciphertext = coerceArray(ciphertext); - if (ciphertext.length % 16 !== 0) { - throw new Error("invalid ciphertext size (must be multiple of 16 bytes)"); - } - var plaintext = createArray(ciphertext.length); - var block = createArray(16); - for (var i = 0;i < ciphertext.length; i += 16) { - copyArray(ciphertext, block, 0, i, i + 16); - block = this._aes.decrypt(block); - copyArray(block, plaintext, i); - } - return plaintext; - }; - var ModeOfOperationCBC = function(key, iv) { - if (!(this instanceof ModeOfOperationCBC)) { - throw Error("AES must be instanitated with `new`"); - } - this.description = "Cipher Block Chaining"; - this.name = "cbc"; - if (!iv) { - iv = createArray(16); - } else if (iv.length != 16) { - throw new Error("invalid initialation vector size (must be 16 bytes)"); - } - this._lastCipherblock = coerceArray(iv, true); - this._aes = new AES(key); - }; - ModeOfOperationCBC.prototype.encrypt = function(plaintext) { - plaintext = coerceArray(plaintext); - if (plaintext.length % 16 !== 0) { - throw new Error("invalid plaintext size (must be multiple of 16 bytes)"); - } - var ciphertext = createArray(plaintext.length); - var block = createArray(16); - for (var i = 0;i < plaintext.length; i += 16) { - copyArray(plaintext, block, 0, i, i + 16); - for (var j = 0;j < 16; j++) { - block[j] ^= this._lastCipherblock[j]; - } - this._lastCipherblock = this._aes.encrypt(block); - copyArray(this._lastCipherblock, ciphertext, i); - } - return ciphertext; - }; - ModeOfOperationCBC.prototype.decrypt = function(ciphertext) { - ciphertext = coerceArray(ciphertext); - if (ciphertext.length % 16 !== 0) { - throw new Error("invalid ciphertext size (must be multiple of 16 bytes)"); - } - var plaintext = createArray(ciphertext.length); - var block = createArray(16); - for (var i = 0;i < ciphertext.length; i += 16) { - copyArray(ciphertext, block, 0, i, i + 16); - block = this._aes.decrypt(block); - for (var j = 0;j < 16; j++) { - plaintext[i + j] = block[j] ^ this._lastCipherblock[j]; - } - copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16); - } - return plaintext; - }; - var ModeOfOperationCFB = function(key, iv, segmentSize) { - if (!(this instanceof ModeOfOperationCFB)) { - throw Error("AES must be instanitated with `new`"); - } - this.description = "Cipher Feedback"; - this.name = "cfb"; - if (!iv) { - iv = createArray(16); - } else if (iv.length != 16) { - throw new Error("invalid initialation vector size (must be 16 size)"); - } - if (!segmentSize) { - segmentSize = 1; - } - this.segmentSize = segmentSize; - this._shiftRegister = coerceArray(iv, true); - this._aes = new AES(key); - }; - ModeOfOperationCFB.prototype.encrypt = function(plaintext) { - if (plaintext.length % this.segmentSize != 0) { - throw new Error("invalid plaintext size (must be segmentSize bytes)"); - } - var encrypted = coerceArray(plaintext, true); - var xorSegment; - for (var i = 0;i < encrypted.length; i += this.segmentSize) { - xorSegment = this._aes.encrypt(this._shiftRegister); - for (var j = 0;j < this.segmentSize; j++) { - encrypted[i + j] ^= xorSegment[j]; - } - copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); - copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); - } - return encrypted; - }; - ModeOfOperationCFB.prototype.decrypt = function(ciphertext) { - if (ciphertext.length % this.segmentSize != 0) { - throw new Error("invalid ciphertext size (must be segmentSize bytes)"); - } - var plaintext = coerceArray(ciphertext, true); - var xorSegment; - for (var i = 0;i < plaintext.length; i += this.segmentSize) { - xorSegment = this._aes.encrypt(this._shiftRegister); - for (var j = 0;j < this.segmentSize; j++) { - plaintext[i + j] ^= xorSegment[j]; - } - copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize); - copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize); - } - return plaintext; - }; - var ModeOfOperationOFB = function(key, iv) { - if (!(this instanceof ModeOfOperationOFB)) { - throw Error("AES must be instanitated with `new`"); - } - this.description = "Output Feedback"; - this.name = "ofb"; - if (!iv) { - iv = createArray(16); - } else if (iv.length != 16) { - throw new Error("invalid initialation vector size (must be 16 bytes)"); - } - this._lastPrecipher = coerceArray(iv, true); - this._lastPrecipherIndex = 16; - this._aes = new AES(key); - }; - ModeOfOperationOFB.prototype.encrypt = function(plaintext) { - var encrypted = coerceArray(plaintext, true); - for (var i = 0;i < encrypted.length; i++) { - if (this._lastPrecipherIndex === 16) { - this._lastPrecipher = this._aes.encrypt(this._lastPrecipher); - this._lastPrecipherIndex = 0; - } - encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++]; - } - return encrypted; - }; - ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt; - var Counter = function(initialValue) { - if (!(this instanceof Counter)) { - throw Error("Counter must be instanitated with `new`"); - } - if (initialValue !== 0 && !initialValue) { - initialValue = 1; - } - if (typeof initialValue === "number") { - this._counter = createArray(16); - this.setValue(initialValue); - } else { - this.setBytes(initialValue); - } - }; - Counter.prototype.setValue = function(value) { - if (typeof value !== "number" || parseInt(value) != value) { - throw new Error("invalid counter value (must be an integer)"); - } - if (value > Number.MAX_SAFE_INTEGER) { - throw new Error("integer value out of safe range"); - } - for (var index = 15;index >= 0; --index) { - this._counter[index] = value % 256; - value = parseInt(value / 256); - } - }; - Counter.prototype.setBytes = function(bytes) { - bytes = coerceArray(bytes, true); - if (bytes.length != 16) { - throw new Error("invalid counter bytes size (must be 16 bytes)"); - } - this._counter = bytes; - }; - Counter.prototype.increment = function() { - for (var i = 15;i >= 0; i--) { - if (this._counter[i] === 255) { - this._counter[i] = 0; - } else { - this._counter[i]++; - break; - } - } - }; - var ModeOfOperationCTR = function(key, counter) { - if (!(this instanceof ModeOfOperationCTR)) { - throw Error("AES must be instanitated with `new`"); - } - this.description = "Counter"; - this.name = "ctr"; - if (!(counter instanceof Counter)) { - counter = new Counter(counter); - } - this._counter = counter; - this._remainingCounter = null; - this._remainingCounterIndex = 16; - this._aes = new AES(key); - }; - ModeOfOperationCTR.prototype.encrypt = function(plaintext) { - var encrypted = coerceArray(plaintext, true); - for (var i = 0;i < encrypted.length; i++) { - if (this._remainingCounterIndex === 16) { - this._remainingCounter = this._aes.encrypt(this._counter._counter); - this._remainingCounterIndex = 0; - this._counter.increment(); - } - encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++]; - } - return encrypted; - }; - ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt; - function pkcs7pad(data) { - data = coerceArray(data, true); - var padder = 16 - data.length % 16; - var result = createArray(data.length + padder); - copyArray(data, result); - for (var i = data.length;i < result.length; i++) { - result[i] = padder; - } - return result; - } - function pkcs7strip(data) { - data = coerceArray(data, true); - if (data.length < 16) { - throw new Error("PKCS#7 invalid length"); - } - var padder = data[data.length - 1]; - if (padder > 16) { - throw new Error("PKCS#7 padding byte out of range"); - } - var length = data.length - padder; - for (var i = 0;i < padder; i++) { - if (data[length + i] !== padder) { - throw new Error("PKCS#7 invalid padding byte"); - } - } - var result = createArray(length); - copyArray(data, result, 0, 0, length); - return result; - } - var aesjs = { - AES, - Counter, - ModeOfOperation: { - ecb: ModeOfOperationECB, - cbc: ModeOfOperationCBC, - cfb: ModeOfOperationCFB, - ofb: ModeOfOperationOFB, - ctr: ModeOfOperationCTR - }, - utils: { - hex: convertHex, - utf8: convertUtf8 - }, - padding: { - pkcs7: { - pad: pkcs7pad, - strip: pkcs7strip - } - }, - _arrayTest: { - coerceArray, - createArray, - copyArray - } - }; - if (typeof exports !== "undefined") { - module.exports = aesjs; - } else if (typeof define === "function" && define.amd) { - define([], function() { - return aesjs; - }); - } else { - if (root.aesjs) { - aesjs._aesjs = root.aesjs; - } - root.aesjs = aesjs; - } - })(exports); -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/cipher/index.js -var require_cipher = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CipherAesBase = undefined; - - class CipherAesBase { - constructor(srtpSessionKey, srtpSessionSalt, srtcpSessionKey, srtcpSessionSalt) { - Object.defineProperty(this, "srtpSessionKey", { - enumerable: true, - configurable: true, - writable: true, - value: srtpSessionKey - }); - Object.defineProperty(this, "srtpSessionSalt", { - enumerable: true, - configurable: true, - writable: true, - value: srtpSessionSalt - }); - Object.defineProperty(this, "srtcpSessionKey", { - enumerable: true, - configurable: true, - writable: true, - value: srtcpSessionKey - }); - Object.defineProperty(this, "srtcpSessionSalt", { - enumerable: true, - configurable: true, - writable: true, - value: srtcpSessionSalt - }); - } - encryptRtp(header, payload, rolloverCounter) { - return Buffer.from([]); - } - decryptRtp(cipherText, rolloverCounter) { - return []; - } - encryptRTCP(rawRtcp, srtcpIndex) { - return Buffer.from([]); - } - decryptRTCP(encrypted) { - return []; - } - } - exports.CipherAesBase = CipherAesBase; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/cipher/ctr.js -var require_ctr = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CipherAesCtr = undefined; - var crypto_1 = import.meta.require("crypto"); - var _1 = require_cipher(); - var header_1 = require_header(); - var rtp_1 = require_rtp(); - - class CipherAesCtr extends _1.CipherAesBase { - constructor(srtpSessionKey, srtpSessionSalt, srtcpSessionKey, srtcpSessionSalt, srtpSessionAuthTag, srtcpSessionAuthTag) { - super(srtpSessionKey, srtpSessionSalt, srtcpSessionKey, srtcpSessionSalt); - Object.defineProperty(this, "srtpSessionAuthTag", { - enumerable: true, - configurable: true, - writable: true, - value: srtpSessionAuthTag - }); - Object.defineProperty(this, "srtcpSessionAuthTag", { - enumerable: true, - configurable: true, - writable: true, - value: srtcpSessionAuthTag - }); - Object.defineProperty(this, "authTagLength", { - enumerable: true, - configurable: true, - writable: true, - value: 10 - }); - } - encryptRtp(header, payload, rolloverCounter) { - const headerBuffer = header.serialize(header.serializeSize); - const counter = this.generateCounter(header.sequenceNumber, rolloverCounter, header.ssrc, this.srtpSessionSalt); - const cipher = (0, crypto_1.createCipheriv)("aes-128-ctr", this.srtpSessionKey, counter); - const enc = cipher.update(payload); - const authTag = this.generateSrtpAuthTag(rolloverCounter, headerBuffer, enc); - return Buffer.concat([headerBuffer, enc, authTag]); - } - decryptRtp(cipherText, rolloverCounter) { - const header = rtp_1.RtpHeader.deSerialize(cipherText); - const size = cipherText.length - this.authTagLength; - cipherText = cipherText.subarray(0, cipherText.length - this.authTagLength); - const counter = this.generateCounter(header.sequenceNumber, rolloverCounter, header.ssrc, this.srtpSessionSalt); - const cipher = (0, crypto_1.createDecipheriv)("aes-128-ctr", this.srtpSessionKey, counter); - const payload = cipherText.subarray(header.payloadOffset); - const buf = cipher.update(payload); - const dst = Buffer.concat([ - cipherText.subarray(0, header.payloadOffset), - buf, - Buffer.alloc(size - header.payloadOffset - buf.length) - ]); - return [dst, header]; - } - encryptRTCP(rtcpPacket, srtcpIndex) { - let out = Buffer.from(rtcpPacket); - const ssrc = out.readUInt32BE(4); - const counter = this.generateCounter(srtcpIndex & 65535, srtcpIndex >> 16, ssrc, this.srtcpSessionSalt); - const cipher = (0, crypto_1.createCipheriv)("aes-128-ctr", this.srtcpSessionKey, counter); - const buf = cipher.update(out.slice(8)); - buf.copy(out, 8); - out = Buffer.concat([out, Buffer.alloc(4)]); - out.writeUInt32BE(srtcpIndex, out.length - 4); - out[out.length - 4] |= 128; - const authTag = this.generateSrtcpAuthTag(out); - out = Buffer.concat([out, authTag]); - return out; - } - decryptRTCP(encrypted) { - const header = header_1.RtcpHeader.deSerialize(encrypted); - const tailOffset = encrypted.length - (this.authTagLength + srtcpIndexSize); - const out = Buffer.from(encrypted).slice(0, tailOffset); - const isEncrypted = encrypted[tailOffset] >> 7; - if (isEncrypted === 0) - return [out, header]; - let srtcpIndex = encrypted.readUInt32BE(tailOffset); - srtcpIndex &= ~(1 << 31); - const ssrc = encrypted.readUInt32BE(4); - const actualTag = encrypted.subarray(encrypted.length - 10); - const counter = this.generateCounter(srtcpIndex & 65535, srtcpIndex >> 16, ssrc, this.srtcpSessionSalt); - const cipher = (0, crypto_1.createDecipheriv)("aes-128-ctr", this.srtcpSessionKey, counter); - const buf = cipher.update(out.subarray(8)); - buf.copy(out, 8); - return [out, header]; - } - generateSrtcpAuthTag(buf) { - const srtcpSessionAuth = (0, crypto_1.createHmac)("sha1", this.srtcpSessionAuthTag); - return srtcpSessionAuth.update(buf).digest().slice(0, 10); - } - generateCounter(sequenceNumber, rolloverCounter, ssrc, sessionSalt) { - const counter = Buffer.alloc(16); - counter.writeUInt32BE(ssrc, 4); - counter.writeUInt32BE(rolloverCounter, 8); - counter.writeUInt32BE(Number(BigInt(sequenceNumber) << 16n), 12); - for (let i = 0;i < sessionSalt.length; i++) { - counter[i] ^= sessionSalt[i]; - } - return counter; - } - generateSrtpAuthTag(roc, ...buffers) { - const srtpSessionAuth = (0, crypto_1.createHmac)("sha1", this.srtpSessionAuthTag); - const rocRaw = Buffer.alloc(4); - rocRaw.writeUInt32BE(roc); - for (const buf of buffers) { - srtpSessionAuth.update(buf); - } - return srtpSessionAuth.update(rocRaw).digest().subarray(0, 10); - } - } - exports.CipherAesCtr = CipherAesCtr; - var srtcpIndexSize = 4; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/cipher/gcm.js -var require_gcm = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.CipherAesGcm = undefined; - var crypto_1 = import.meta.require("crypto"); - var _1 = require_cipher(); - var src_1 = require_src3(); - var helper_1 = require_helper(); - var header_1 = require_header(); - var rtp_1 = require_rtp(); - - class CipherAesGcm extends _1.CipherAesBase { - constructor(srtpSessionKey, srtpSessionSalt, srtcpSessionKey, srtcpSessionSalt) { - super(srtpSessionKey, srtpSessionSalt, srtcpSessionKey, srtcpSessionSalt); - Object.defineProperty(this, "aeadAuthTagLen", { - enumerable: true, - configurable: true, - writable: true, - value: 16 - }); - Object.defineProperty(this, "rtpIvWriter", { - enumerable: true, - configurable: true, - writable: true, - value: (0, src_1.createBufferWriter)([2, 4, 4, 2], true) - }); - Object.defineProperty(this, "rtcpIvWriter", { - enumerable: true, - configurable: true, - writable: true, - value: (0, src_1.createBufferWriter)([2, 4, 2, 4], true) - }); - Object.defineProperty(this, "aadWriter", { - enumerable: true, - configurable: true, - writable: true, - value: (0, src_1.createBufferWriter)([4], true) - }); - } - encryptRtp(header, payload, rolloverCounter) { - const hdr = header.serialize(header.serializeSize); - const iv = this.rtpInitializationVector(header, rolloverCounter); - const cipher = (0, crypto_1.createCipheriv)("aes-128-gcm", this.srtpSessionKey, iv); - cipher.setAAD(hdr); - const enc = cipher.update(payload); - cipher.final(); - const authTag = cipher.getAuthTag(); - const dst = Buffer.concat([hdr, enc, authTag]); - return dst; - } - decryptRtp(cipherText, rolloverCounter) { - const header = rtp_1.RtpHeader.deSerialize(cipherText); - let dst = Buffer.from([]); - dst = (0, helper_1.growBufferSize)(dst, cipherText.length - this.aeadAuthTagLen); - cipherText.slice(0, header.payloadOffset).copy(dst); - const iv = this.rtpInitializationVector(header, rolloverCounter); - const enc = cipherText.slice(header.payloadOffset, cipherText.length - this.aeadAuthTagLen); - const cipher = (0, crypto_1.createDecipheriv)("aes-128-gcm", this.srtpSessionKey, iv); - const dec = cipher.update(enc); - dec.copy(dst, header.payloadOffset); - return [dst, header]; - } - encryptRTCP(rtcpPacket, srtcpIndex) { - const ssrc = rtcpPacket.readUInt32BE(4); - const addPos = rtcpPacket.length + this.aeadAuthTagLen; - let dst = Buffer.from([]); - dst = (0, helper_1.growBufferSize)(dst, addPos + srtcpIndexSize); - rtcpPacket.slice(0, 8).copy(dst); - const iv = this.rtcpInitializationVector(ssrc, srtcpIndex); - const aad = this.rtcpAdditionalAuthenticatedData(rtcpPacket, srtcpIndex); - const cipher = (0, crypto_1.createCipheriv)("aes-128-gcm", this.srtcpSessionKey, iv); - cipher.setAAD(aad); - const enc = cipher.update(rtcpPacket.slice(8)); - cipher.final(); - enc.copy(dst, 8); - const authTag = cipher.getAuthTag(); - authTag.copy(dst, 8 + enc.length); - aad.slice(8, 12).copy(dst, addPos); - return dst; - } - decryptRTCP(encrypted) { - const header = header_1.RtcpHeader.deSerialize(encrypted); - const aadPos = encrypted.length - srtcpIndexSize; - const dst = Buffer.alloc(aadPos - this.aeadAuthTagLen); - encrypted.slice(0, 8).copy(dst); - const ssrc = encrypted.readUInt32BE(4); - let srtcpIndex = encrypted.readUInt32BE(encrypted.length - 4); - srtcpIndex &= ~(rtcpEncryptionFlag << 24); - const iv = this.rtcpInitializationVector(ssrc, srtcpIndex); - const aad = this.rtcpAdditionalAuthenticatedData(encrypted, srtcpIndex); - const cipher = (0, crypto_1.createDecipheriv)("aes-128-gcm", this.srtcpSessionKey, iv); - cipher.setAAD(aad); - const dec = cipher.update(encrypted.slice(8, aadPos)); - dec.copy(dst, 8); - return [dst, header]; - } - rtpInitializationVector(header, rolloverCounter) { - const iv = this.rtpIvWriter([ - 0, - header.ssrc, - rolloverCounter, - header.sequenceNumber - ]); - for (let i = 0;i < iv.length; i++) { - iv[i] ^= this.srtpSessionSalt[i]; - } - return iv; - } - rtcpInitializationVector(ssrc, srtcpIndex) { - const iv = this.rtcpIvWriter([0, ssrc, 0, srtcpIndex]); - for (let i = 0;i < iv.length; i++) { - iv[i] ^= this.srtcpSessionSalt[i]; - } - return iv; - } - rtcpAdditionalAuthenticatedData(rtcpPacket, srtcpIndex) { - const aad = Buffer.concat([ - rtcpPacket.subarray(0, 8), - this.aadWriter([srtcpIndex]) - ]); - aad[8] |= rtcpEncryptionFlag; - return aad; - } - } - exports.CipherAesGcm = CipherAesGcm; - var srtcpIndexSize = 4; - var rtcpEncryptionFlag = 128; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/context/context.js -var require_context = __commonJS((exports) => { - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Context = undefined; - var crypto_1 = import.meta.require("crypto"); - var aes_js_1 = __importDefault(require_aes_js()); - var ctr_1 = require_ctr(); - var gcm_1 = require_gcm(); - var const_1 = require_const(); - - class Context { - constructor(masterKey, masterSalt, profile) { - Object.defineProperty(this, "masterKey", { - enumerable: true, - configurable: true, - writable: true, - value: masterKey - }); - Object.defineProperty(this, "masterSalt", { - enumerable: true, - configurable: true, - writable: true, - value: masterSalt - }); - Object.defineProperty(this, "profile", { - enumerable: true, - configurable: true, - writable: true, - value: profile - }); - Object.defineProperty(this, "srtpSSRCStates", { - enumerable: true, - configurable: true, - writable: true, - value: {} - }); - Object.defineProperty(this, "srtpSessionKey", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtpSessionSalt", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtpSessionAuthTag", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtpSessionAuth", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtcpSSRCStates", { - enumerable: true, - configurable: true, - writable: true, - value: {} - }); - Object.defineProperty(this, "srtcpSessionKey", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtcpSessionSalt", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtcpSessionAuthTag", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "srtcpSessionAuth", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "cipher", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - { - const diff = 14 - masterSalt.length; - if (diff > 0) { - this.masterSalt = Buffer.concat([masterSalt, Buffer.alloc(diff)]); - } - } - this.srtpSessionKey = this.generateSessionKey(0); - this.srtpSessionSalt = this.generateSessionSalt(2); - this.srtpSessionAuthTag = this.generateSessionAuthTag(1); - this.srtpSessionAuth = (0, crypto_1.createHmac)("sha1", this.srtpSessionAuthTag); - this.srtcpSessionKey = this.generateSessionKey(3); - this.srtcpSessionSalt = this.generateSessionSalt(5); - this.srtcpSessionAuthTag = this.generateSessionAuthTag(4); - this.srtcpSessionAuth = (0, crypto_1.createHmac)("sha1", this.srtcpSessionAuthTag); - switch (profile) { - case const_1.ProtectionProfileAes128CmHmacSha1_80: - this.cipher = new ctr_1.CipherAesCtr(this.srtpSessionKey, this.srtpSessionSalt, this.srtcpSessionKey, this.srtcpSessionSalt, this.srtpSessionAuthTag, this.srtcpSessionAuthTag); - break; - case const_1.ProtectionProfileAeadAes128Gcm: - this.cipher = new gcm_1.CipherAesGcm(this.srtpSessionKey, this.srtpSessionSalt, this.srtcpSessionKey, this.srtcpSessionSalt); - break; - } - } - generateSessionKey(label) { - let sessionKey = Buffer.from(this.masterSalt); - const labelAndIndexOverKdr = Buffer.from([ - label, - 0, - 0, - 0, - 0, - 0, - 0 - ]); - for (let i = labelAndIndexOverKdr.length - 1, j = sessionKey.length - 1;i >= 0; i--, j--) { - sessionKey[j] = sessionKey[j] ^ labelAndIndexOverKdr[i]; - } - sessionKey = Buffer.concat([sessionKey, Buffer.from([0, 0])]); - const block = new aes_js_1.default.AES(this.masterKey); - return Buffer.from(block.encrypt(sessionKey)); - } - generateSessionSalt(label) { - let sessionSalt = Buffer.from(this.masterSalt); - const labelAndIndexOverKdr = Buffer.from([ - label, - 0, - 0, - 0, - 0, - 0, - 0 - ]); - for (let i = labelAndIndexOverKdr.length - 1, j = sessionSalt.length - 1;i >= 0; i--, j--) { - sessionSalt[j] = sessionSalt[j] ^ labelAndIndexOverKdr[i]; - } - sessionSalt = Buffer.concat([sessionSalt, Buffer.from([0, 0])]); - const block = new aes_js_1.default.AES(this.masterKey); - sessionSalt = Buffer.from(block.encrypt(sessionSalt)); - return sessionSalt.subarray(0, 14); - } - generateSessionAuthTag(label) { - const sessionAuthTag = Buffer.from(this.masterSalt); - const labelAndIndexOverKdr = Buffer.from([ - label, - 0, - 0, - 0, - 0, - 0, - 0 - ]); - for (let i = labelAndIndexOverKdr.length - 1, j = sessionAuthTag.length - 1;i >= 0; i--, j--) { - sessionAuthTag[j] = sessionAuthTag[j] ^ labelAndIndexOverKdr[i]; - } - let firstRun = Buffer.concat([ - sessionAuthTag, - Buffer.from([0, 0]) - ]); - let secondRun = Buffer.concat([ - sessionAuthTag, - Buffer.from([0, 1]) - ]); - const block = new aes_js_1.default.AES(this.masterKey); - firstRun = Buffer.from(block.encrypt(firstRun)); - secondRun = Buffer.from(block.encrypt(secondRun)); - return Buffer.concat([firstRun, secondRun.subarray(0, 4)]); - } - getSrtpSsrcState(ssrc) { - let s = this.srtpSSRCStates[ssrc]; - if (s) - return s; - s = { - ssrc, - rolloverCounter: 0, - lastSequenceNumber: 0 - }; - this.srtpSSRCStates[ssrc] = s; - return s; - } - getSrtcpSsrcState(ssrc) { - let s = this.srtcpSSRCStates[ssrc]; - if (s) - return s; - s = { - srtcpIndex: 0, - ssrc - }; - this.srtcpSSRCStates[ssrc] = s; - return s; - } - updateRolloverCount(sequenceNumber, s) { - if (!s.rolloverHasProcessed) { - s.rolloverHasProcessed = true; - } else if (sequenceNumber === 0) { - if (s.lastSequenceNumber > MaxROCDisorder) { - s.rolloverCounter++; - } - } else if (s.lastSequenceNumber < MaxROCDisorder && sequenceNumber > MaxSequenceNumber - MaxROCDisorder) { - if (s.rolloverCounter > 0) { - s.rolloverCounter--; - } - } else if (sequenceNumber < MaxROCDisorder && s.lastSequenceNumber > MaxSequenceNumber - MaxROCDisorder) { - s.rolloverCounter++; - } - s.lastSequenceNumber = sequenceNumber; - } - generateSrtpAuthTag(buf, roc) { - this.srtpSessionAuth = (0, crypto_1.createHmac)("sha1", this.srtpSessionAuthTag); - const rocRaw = Buffer.alloc(4); - rocRaw.writeUInt32BE(roc); - return this.srtpSessionAuth.update(buf).update(rocRaw).digest().slice(0, 10); - } - index(ssrc) { - const s = this.srtcpSSRCStates[ssrc]; - if (!s) { - return 0; - } - return s.srtcpIndex; - } - setIndex(ssrc, index) { - const s = this.getSrtcpSsrcState(ssrc); - s.srtcpIndex = index % 2147483647; - } - } - exports.Context = Context; - var MaxROCDisorder = 100; - var MaxSequenceNumber = 65535; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/context/srtcp.js -var require_srtcp = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SrtcpContext = undefined; - var context_1 = require_context(); - - class SrtcpContext extends context_1.Context { - constructor(masterKey, masterSalt, profile) { - super(masterKey, masterSalt, profile); - } - encryptRTCP(rawRtcp) { - const ssrc = rawRtcp.readUInt32BE(4); - const s = this.getSrtcpSsrcState(ssrc); - s.srtcpIndex++; - if (s.srtcpIndex >> maxSRTCPIndex) { - s.srtcpIndex = 0; - } - const enc = this.cipher.encryptRTCP(rawRtcp, s.srtcpIndex); - return enc; - } - decryptRTCP(encrypted) { - const dec = this.cipher.decryptRTCP(encrypted); - return dec; - } - } - exports.SrtcpContext = SrtcpContext; - var maxSRTCPIndex = 2147483647; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/session.js -var require_session = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.Session = undefined; - - class Session { - constructor(ContextCls) { - Object.defineProperty(this, "ContextCls", { - enumerable: true, - configurable: true, - writable: true, - value: ContextCls - }); - Object.defineProperty(this, "localContext", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "remoteContext", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - Object.defineProperty(this, "onData", { - enumerable: true, - configurable: true, - writable: true, - value: undefined - }); - } - start(localMasterKey, localMasterSalt, remoteMasterKey, remoteMasterSalt, profile) { - this.localContext = new this.ContextCls(localMasterKey, localMasterSalt, profile); - this.remoteContext = new this.ContextCls(remoteMasterKey, remoteMasterSalt, profile); - } - } - exports.Session = Session; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/srtcp.js -var require_srtcp2 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SrtcpSession = undefined; - var srtcp_1 = require_srtcp(); - var session_1 = require_session(); - - class SrtcpSession extends session_1.Session { - constructor(config) { - super(srtcp_1.SrtcpContext); - Object.defineProperty(this, "config", { - enumerable: true, - configurable: true, - writable: true, - value: config - }); - Object.defineProperty(this, "decrypt", { - enumerable: true, - configurable: true, - writable: true, - value: (buf) => { - const [decrypted] = this.remoteContext.decryptRTCP(buf); - return decrypted; - } - }); - this.start(config.keys.localMasterKey, config.keys.localMasterSalt, config.keys.remoteMasterKey, config.keys.remoteMasterSalt, config.profile); - } - encrypt(rawRtcp) { - const enc = this.localContext.encryptRTCP(rawRtcp); - return enc; - } - } - exports.SrtcpSession = SrtcpSession; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/context/srtp.js -var require_srtp = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SrtpContext = undefined; - var rtp_1 = require_rtp(); - var context_1 = require_context(); - - class SrtpContext extends context_1.Context { - constructor(masterKey, masterSalt, profile) { - super(masterKey, masterSalt, profile); - } - encryptRtp(payload, header) { - const s = this.getSrtpSsrcState(header.ssrc); - this.updateRolloverCount(header.sequenceNumber, s); - const enc = this.cipher.encryptRtp(header, payload, s.rolloverCounter); - return enc; - } - decryptRtp(cipherText) { - const header = rtp_1.RtpHeader.deSerialize(cipherText); - const s = this.getSrtpSsrcState(header.ssrc); - this.updateRolloverCount(header.sequenceNumber, s); - const dec = this.cipher.decryptRtp(cipherText, s.rolloverCounter); - return dec; - } - } - exports.SrtpContext = SrtpContext; -}); - -// node_modules/werift-rtp/lib/rtp/src/srtp/srtp.js -var require_srtp2 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.SrtpSession = undefined; - var srtp_1 = require_srtp(); - var session_1 = require_session(); - - class SrtpSession extends session_1.Session { - constructor(config) { - super(srtp_1.SrtpContext); - Object.defineProperty(this, "config", { - enumerable: true, - configurable: true, - writable: true, - value: config - }); - Object.defineProperty(this, "decrypt", { - enumerable: true, - configurable: true, - writable: true, - value: (buf) => { - const [decrypted] = this.remoteContext.decryptRtp(buf); - return decrypted; - } - }); - this.start(config.keys.localMasterKey, config.keys.localMasterSalt, config.keys.remoteMasterKey, config.keys.remoteMasterSalt, config.profile); - } - encrypt(payload, header) { - return this.localContext.encryptRtp(payload, header); - } - } - exports.SrtpSession = SrtpSession; -}); - -// node_modules/werift-rtp/lib/rtp/src/util.js -var require_util = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.RtpBuilder = undefined; - var src_1 = require_src3(); - var rtp_1 = require_rtp(); - - class RtpBuilder { - constructor(props) { - Object.defineProperty(this, "props", { - enumerable: true, - configurable: true, - writable: true, - value: props - }); - Object.defineProperty(this, "sequenceNumber", { - enumerable: true, - configurable: true, - writable: true, - value: (0, src_1.random16)() - }); - Object.defineProperty(this, "timestamp", { - enumerable: true, - configurable: true, - writable: true, - value: (0, src_1.random32)() - }); - } - create(payload) { - this.sequenceNumber = (0, src_1.uint16Add)(this.sequenceNumber, 1); - const elapsed = this.props.between * this.props.clockRate / 1000; - this.timestamp = (0, src_1.uint32Add)(this.timestamp, elapsed); - const header = new rtp_1.RtpHeader({ - sequenceNumber: this.sequenceNumber, - timestamp: Number(this.timestamp), - payloadType: 96, - extension: true, - marker: false, - padding: false - }); - const rtp = new rtp_1.RtpPacket(header, payload); - return rtp; - } - } - exports.RtpBuilder = RtpBuilder; -}); - -// node_modules/werift-rtp/lib/rtp/src/index.js -var require_src4 = __commonJS((exports) => { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - import.meta.require("buffer"); - __exportStar(require_const(), exports); - __exportStar(require_src3(), exports); - __exportStar(require_codec(), exports); - __exportStar(require_helper(), exports); - __exportStar(require_header(), exports); - __exportStar(require_psfb(), exports); - __exportStar(require_pictureLossIndication(), exports); - __exportStar(require_remb(), exports); - __exportStar(require_rr(), exports); - __exportStar(require_rtcp(), exports); - __exportStar(require_rtpfb(), exports); - __exportStar(require_nack(), exports); - __exportStar(require_twcc(), exports); - __exportStar(require_sdes(), exports); - __exportStar(require_sr(), exports); - __exportStar(require_headerExtension(), exports); - __exportStar(require_encoder(), exports); - __exportStar(require_handler(), exports); - __exportStar(require_packet(), exports); - __exportStar(require_rtp(), exports); - __exportStar(require_rtx(), exports); - __exportStar(require_srtcp2(), exports); - __exportStar(require_srtp2(), exports); - __exportStar(require_util(), exports); -}); - -// node_modules/loglevel/lib/loglevel.js -var require_loglevel = __commonJS((exports, module) => { - (function(root, definition) { - if (typeof define === "function" && define.amd) { - define(definition); - } else if (typeof module === "object" && module.exports) { - module.exports = definition(); - } else { - root.log = definition(); - } - })(exports, function() { - var noop = function() { - }; - var undefinedType = "undefined"; - var isIE = typeof window !== undefinedType && typeof window.navigator !== undefinedType && /Trident\/|MSIE /.test(window.navigator.userAgent); - var logMethods = [ - "trace", - "debug", - "info", - "warn", - "error" - ]; - var _loggersByName = {}; - var defaultLogger = null; - function bindMethod(obj, methodName) { - var method = obj[methodName]; - if (typeof method.bind === "function") { - return method.bind(obj); - } else { - try { - return Function.prototype.bind.call(method, obj); - } catch (e) { - return function() { - return Function.prototype.apply.apply(method, [obj, arguments]); - }; - } - } - } - function traceForIE() { - if (console.log) { - if (console.log.apply) { - console.log.apply(console, arguments); - } else { - Function.prototype.apply.apply(console.log, [console, arguments]); - } - } - if (console.trace) - console.trace(); - } - function realMethod(methodName) { - if (methodName === "debug") { - methodName = "log"; - } - if (typeof console === undefinedType) { - return false; - } else if (methodName === "trace" && isIE) { - return traceForIE; - } else if (console[methodName] !== undefined) { - return bindMethod(console, methodName); - } else if (console.log !== undefined) { - return bindMethod(console, "log"); - } else { - return noop; - } - } - function replaceLoggingMethods() { - var level = this.getLevel(); - for (var i = 0;i < logMethods.length; i++) { - var methodName = logMethods[i]; - this[methodName] = i < level ? noop : this.methodFactory(methodName, level, this.name); - } - this.log = this.debug; - if (typeof console === undefinedType && level < this.levels.SILENT) { - return "No console available for logging"; - } - } - function enableLoggingWhenConsoleArrives(methodName) { - return function() { - if (typeof console !== undefinedType) { - replaceLoggingMethods.call(this); - this[methodName].apply(this, arguments); - } - }; - } - function defaultMethodFactory(methodName, _level, _loggerName) { - return realMethod(methodName) || enableLoggingWhenConsoleArrives.apply(this, arguments); - } - function Logger(name, factory) { - var self2 = this; - var inheritedLevel; - var defaultLevel; - var userLevel; - var storageKey = "loglevel"; - if (typeof name === "string") { - storageKey += ":" + name; - } else if (typeof name === "symbol") { - storageKey = undefined; - } - function persistLevelIfPossible(levelNum) { - var levelName = (logMethods[levelNum] || "silent").toUpperCase(); - if (typeof window === undefinedType || !storageKey) - return; - try { - window.localStorage[storageKey] = levelName; - return; - } catch (ignore) { - } - try { - window.document.cookie = encodeURIComponent(storageKey) + "=" + levelName + ";"; - } catch (ignore) { - } - } - function getPersistedLevel() { - var storedLevel; - if (typeof window === undefinedType || !storageKey) - return; - try { - storedLevel = window.localStorage[storageKey]; - } catch (ignore) { - } - if (typeof storedLevel === undefinedType) { - try { - var cookie = window.document.cookie; - var cookieName = encodeURIComponent(storageKey); - var location = cookie.indexOf(cookieName + "="); - if (location !== -1) { - storedLevel = /^([^;]+)/.exec(cookie.slice(location + cookieName.length + 1))[1]; - } - } catch (ignore) { - } - } - if (self2.levels[storedLevel] === undefined) { - storedLevel = undefined; - } - return storedLevel; - } - function clearPersistedLevel() { - if (typeof window === undefinedType || !storageKey) - return; - try { - window.localStorage.removeItem(storageKey); - } catch (ignore) { - } - try { - window.document.cookie = encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; - } catch (ignore) { - } - } - function normalizeLevel(input) { - var level = input; - if (typeof level === "string" && self2.levels[level.toUpperCase()] !== undefined) { - level = self2.levels[level.toUpperCase()]; - } - if (typeof level === "number" && level >= 0 && level <= self2.levels.SILENT) { - return level; - } else { - throw new TypeError("log.setLevel() called with invalid level: " + input); - } - } - self2.name = name; - self2.levels = { - TRACE: 0, - DEBUG: 1, - INFO: 2, - WARN: 3, - ERROR: 4, - SILENT: 5 - }; - self2.methodFactory = factory || defaultMethodFactory; - self2.getLevel = function() { - if (userLevel != null) { - return userLevel; - } else if (defaultLevel != null) { - return defaultLevel; - } else { - return inheritedLevel; - } - }; - self2.setLevel = function(level, persist) { - userLevel = normalizeLevel(level); - if (persist !== false) { - persistLevelIfPossible(userLevel); - } - return replaceLoggingMethods.call(self2); - }; - self2.setDefaultLevel = function(level) { - defaultLevel = normalizeLevel(level); - if (!getPersistedLevel()) { - self2.setLevel(level, false); - } - }; - self2.resetLevel = function() { - userLevel = null; - clearPersistedLevel(); - replaceLoggingMethods.call(self2); - }; - self2.enableAll = function(persist) { - self2.setLevel(self2.levels.TRACE, persist); - }; - self2.disableAll = function(persist) { - self2.setLevel(self2.levels.SILENT, persist); - }; - self2.rebuild = function() { - if (defaultLogger !== self2) { - inheritedLevel = normalizeLevel(defaultLogger.getLevel()); - } - replaceLoggingMethods.call(self2); - if (defaultLogger === self2) { - for (var childName in _loggersByName) { - _loggersByName[childName].rebuild(); - } - } - }; - inheritedLevel = normalizeLevel(defaultLogger ? defaultLogger.getLevel() : "WARN"); - var initialLevel = getPersistedLevel(); - if (initialLevel != null) { - userLevel = normalizeLevel(initialLevel); - } - replaceLoggingMethods.call(self2); - } - defaultLogger = new Logger; - defaultLogger.getLogger = function getLogger(name) { - if (typeof name !== "symbol" && typeof name !== "string" || name === "") { - throw new TypeError("You must supply a name when creating a logger."); - } - var logger = _loggersByName[name]; - if (!logger) { - logger = _loggersByName[name] = new Logger(name, defaultLogger.methodFactory); - } - return logger; - }; - var _log = typeof window !== undefinedType ? window.log : undefined; - defaultLogger.noConflict = function() { - if (typeof window !== undefinedType && window.log === defaultLogger) { - window.log = _log; - } - return defaultLogger; - }; - defaultLogger.getLoggers = function getLoggers() { - return _loggersByName; - }; - defaultLogger["default"] = defaultLogger; - return defaultLogger; - }); -}); - -// node_modules/find-process/dist/cjs/logger.js -var require_logger = __commonJS((exports) => { - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var loglevel_1 = __importDefault(require_loglevel()); - exports.default = loglevel_1.default; -}); - -// node_modules/color-name/index.js -var require_color_name = __commonJS((exports, module) => { - module.exports = { - aliceblue: [240, 248, 255], - antiquewhite: [250, 235, 215], - aqua: [0, 255, 255], - aquamarine: [127, 255, 212], - azure: [240, 255, 255], - beige: [245, 245, 220], - bisque: [255, 228, 196], - black: [0, 0, 0], - blanchedalmond: [255, 235, 205], - blue: [0, 0, 255], - blueviolet: [138, 43, 226], - brown: [165, 42, 42], - burlywood: [222, 184, 135], - cadetblue: [95, 158, 160], - chartreuse: [127, 255, 0], - chocolate: [210, 105, 30], - coral: [255, 127, 80], - cornflowerblue: [100, 149, 237], - cornsilk: [255, 248, 220], - crimson: [220, 20, 60], - cyan: [0, 255, 255], - darkblue: [0, 0, 139], - darkcyan: [0, 139, 139], - darkgoldenrod: [184, 134, 11], - darkgray: [169, 169, 169], - darkgreen: [0, 100, 0], - darkgrey: [169, 169, 169], - darkkhaki: [189, 183, 107], - darkmagenta: [139, 0, 139], - darkolivegreen: [85, 107, 47], - darkorange: [255, 140, 0], - darkorchid: [153, 50, 204], - darkred: [139, 0, 0], - darksalmon: [233, 150, 122], - darkseagreen: [143, 188, 143], - darkslateblue: [72, 61, 139], - darkslategray: [47, 79, 79], - darkslategrey: [47, 79, 79], - darkturquoise: [0, 206, 209], - darkviolet: [148, 0, 211], - deeppink: [255, 20, 147], - deepskyblue: [0, 191, 255], - dimgray: [105, 105, 105], - dimgrey: [105, 105, 105], - dodgerblue: [30, 144, 255], - firebrick: [178, 34, 34], - floralwhite: [255, 250, 240], - forestgreen: [34, 139, 34], - fuchsia: [255, 0, 255], - gainsboro: [220, 220, 220], - ghostwhite: [248, 248, 255], - gold: [255, 215, 0], - goldenrod: [218, 165, 32], - gray: [128, 128, 128], - green: [0, 128, 0], - greenyellow: [173, 255, 47], - grey: [128, 128, 128], - honeydew: [240, 255, 240], - hotpink: [255, 105, 180], - indianred: [205, 92, 92], - indigo: [75, 0, 130], - ivory: [255, 255, 240], - khaki: [240, 230, 140], - lavender: [230, 230, 250], - lavenderblush: [255, 240, 245], - lawngreen: [124, 252, 0], - lemonchiffon: [255, 250, 205], - lightblue: [173, 216, 230], - lightcoral: [240, 128, 128], - lightcyan: [224, 255, 255], - lightgoldenrodyellow: [250, 250, 210], - lightgray: [211, 211, 211], - lightgreen: [144, 238, 144], - lightgrey: [211, 211, 211], - lightpink: [255, 182, 193], - lightsalmon: [255, 160, 122], - lightseagreen: [32, 178, 170], - lightskyblue: [135, 206, 250], - lightslategray: [119, 136, 153], - lightslategrey: [119, 136, 153], - lightsteelblue: [176, 196, 222], - lightyellow: [255, 255, 224], - lime: [0, 255, 0], - limegreen: [50, 205, 50], - linen: [250, 240, 230], - magenta: [255, 0, 255], - maroon: [128, 0, 0], - mediumaquamarine: [102, 205, 170], - mediumblue: [0, 0, 205], - mediumorchid: [186, 85, 211], - mediumpurple: [147, 112, 219], - mediumseagreen: [60, 179, 113], - mediumslateblue: [123, 104, 238], - mediumspringgreen: [0, 250, 154], - mediumturquoise: [72, 209, 204], - mediumvioletred: [199, 21, 133], - midnightblue: [25, 25, 112], - mintcream: [245, 255, 250], - mistyrose: [255, 228, 225], - moccasin: [255, 228, 181], - navajowhite: [255, 222, 173], - navy: [0, 0, 128], - oldlace: [253, 245, 230], - olive: [128, 128, 0], - olivedrab: [107, 142, 35], - orange: [255, 165, 0], - orangered: [255, 69, 0], - orchid: [218, 112, 214], - palegoldenrod: [238, 232, 170], - palegreen: [152, 251, 152], - paleturquoise: [175, 238, 238], - palevioletred: [219, 112, 147], - papayawhip: [255, 239, 213], - peachpuff: [255, 218, 185], - peru: [205, 133, 63], - pink: [255, 192, 203], - plum: [221, 160, 221], - powderblue: [176, 224, 230], - purple: [128, 0, 128], - rebeccapurple: [102, 51, 153], - red: [255, 0, 0], - rosybrown: [188, 143, 143], - royalblue: [65, 105, 225], - saddlebrown: [139, 69, 19], - salmon: [250, 128, 114], - sandybrown: [244, 164, 96], - seagreen: [46, 139, 87], - seashell: [255, 245, 238], - sienna: [160, 82, 45], - silver: [192, 192, 192], - skyblue: [135, 206, 235], - slateblue: [106, 90, 205], - slategray: [112, 128, 144], - slategrey: [112, 128, 144], - snow: [255, 250, 250], - springgreen: [0, 255, 127], - steelblue: [70, 130, 180], - tan: [210, 180, 140], - teal: [0, 128, 128], - thistle: [216, 191, 216], - tomato: [255, 99, 71], - turquoise: [64, 224, 208], - violet: [238, 130, 238], - wheat: [245, 222, 179], - white: [255, 255, 255], - whitesmoke: [245, 245, 245], - yellow: [255, 255, 0], - yellowgreen: [154, 205, 50] - }; -}); - -// node_modules/color-convert/conversions.js -var require_conversions = __commonJS((exports, module) => { - function comparativeDistance(x, y) { - return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; - } - var cssKeywords = require_color_name(); - var reverseKeywords = {}; - for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; - } - var convert = { - rgb: { channels: 3, labels: "rgb" }, - hsl: { channels: 3, labels: "hsl" }, - hsv: { channels: 3, labels: "hsv" }, - hwb: { channels: 3, labels: "hwb" }, - cmyk: { channels: 4, labels: "cmyk" }, - xyz: { channels: 3, labels: "xyz" }, - lab: { channels: 3, labels: "lab" }, - lch: { channels: 3, labels: "lch" }, - hex: { channels: 1, labels: ["hex"] }, - keyword: { channels: 1, labels: ["keyword"] }, - ansi16: { channels: 1, labels: ["ansi16"] }, - ansi256: { channels: 1, labels: ["ansi256"] }, - hcg: { channels: 3, labels: ["h", "c", "g"] }, - apple: { channels: 3, labels: ["r16", "g16", "b16"] }, - gray: { channels: 1, labels: ["gray"] } - }; - module.exports = convert; - for (const model of Object.keys(convert)) { - if (!("channels" in convert[model])) { - throw new Error("missing channels property: " + model); - } - if (!("labels" in convert[model])) { - throw new Error("missing channel labels property: " + model); - } - if (convert[model].labels.length !== convert[model].channels) { - throw new Error("channel and label counts mismatch: " + model); - } - const { channels, labels } = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], "channels", { value: channels }); - Object.defineProperty(convert[model], "labels", { value: labels }); - } - convert.rgb.hsl = function(rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - h = Math.min(h * 60, 360); - if (h < 0) { - h += 360; - } - const l = (min + max) / 2; - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - return [h, s * 100, l * 100]; - }; - convert.rgb.hsv = function(rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function(c) { - return (v - c) / 6 / diff + 1 / 2; - }; - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = 1 / 3 + rdif - bdif; - } else if (b === v) { - h = 2 / 3 + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - return [ - h * 360, - s * 100, - v * 100 - ]; - }; - convert.rgb.hwb = function(rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - return [h, w * 100, b * 100]; - }; - convert.rgb.cmyk = function(rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - return [c * 100, m * 100, y * 100, k * 100]; - }; - convert.rgb.keyword = function(rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - let currentClosestDistance = Infinity; - let currentClosestKeyword; - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - const distance = comparativeDistance(rgb, value); - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - return currentClosestKeyword; - }; - convert.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; - }; - convert.rgb.xyz = function(rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92; - g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92; - b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; - const x = r * 0.4124 + g * 0.3576 + b * 0.1805; - const y = r * 0.2126 + g * 0.7152 + b * 0.0722; - const z = r * 0.0193 + g * 0.1192 + b * 0.9505; - return [x * 100, y * 100, z * 100]; - }; - convert.rgb.lab = function(rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116; - y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116; - const l = 116 * y - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - return [l, a, b]; - }; - convert.hsl.rgb = function(hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - const t1 = 2 * l - t2; - const rgb = [0, 0, 0]; - for (let i = 0;i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - rgb[i] = val * 255; - } - return rgb; - }; - convert.hsl.hsv = function(hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - l *= 2; - s *= l <= 1 ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); - return [h, sv * 100, v * 100]; - }; - convert.hsv.rgb = function(hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - s * f); - const t = 255 * v * (1 - s * (1 - f)); - v *= 255; - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } - }; - convert.hsv.hsl = function(hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= lmin <= 1 ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - return [h, sl * 100, l * 100]; - }; - convert.hwb.rgb = function(hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - if ((i & 1) !== 0) { - f = 1 - f; - } - const n = wh + f * (v - wh); - let r; - let g; - let b; - switch (i) { - default: - case 6: - case 0: - r = v; - g = n; - b = wh; - break; - case 1: - r = n; - g = v; - b = wh; - break; - case 2: - r = wh; - g = v; - b = n; - break; - case 3: - r = wh; - g = n; - b = v; - break; - case 4: - r = n; - g = wh; - b = v; - break; - case 5: - r = v; - g = wh; - b = n; - break; - } - return [r * 255, g * 255, b * 255]; - }; - convert.cmyk.rgb = function(cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.rgb = function(xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - r = x * 3.2406 + y * -1.5372 + z * -0.4986; - g = x * -0.9689 + y * 1.8758 + z * 0.0415; - b = x * 0.0557 + y * -0.204 + z * 1.057; - r = r > 0.0031308 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; - g = g > 0.0031308 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; - b = b > 0.0031308 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.lab = function(xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116; - y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116; - z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116; - const l = 116 * y - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - return [l, a, b]; - }; - convert.lab.xyz = function(lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - x *= 95.047; - y *= 100; - z *= 108.883; - return [x, y, z]; - }; - convert.lab.lch = function(lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; - } - const c = Math.sqrt(a * a + b * b); - return [l, c, h]; - }; - convert.lch.lab = function(lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - return [l, a, b]; - }; - convert.rgb.ansi16 = function(args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; - value = Math.round(value / 50); - if (value === 0) { - return 30; - } - let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); - if (value === 2) { - ansi += 60; - } - return ansi; - }; - convert.hsv.ansi16 = function(args) { - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); - }; - convert.rgb.ansi256 = function(args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - if (r === g && g === b) { - if (r < 8) { - return 16; - } - if (r > 248) { - return 231; - } - return Math.round((r - 8) / 247 * 24) + 232; - } - const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); - return ansi; - }; - convert.ansi16.rgb = function(args) { - let color = args % 10; - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - color = color / 10.5 * 255; - return [color, color, color]; - } - const mult = (~~(args > 50) + 1) * 0.5; - const r = (color & 1) * mult * 255; - const g = (color >> 1 & 1) * mult * 255; - const b = (color >> 2 & 1) * mult * 255; - return [r, g, b]; - }; - convert.ansi256.rgb = function(args) { - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - args -= 16; - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = rem % 6 / 5 * 255; - return [r, g, b]; - }; - convert.rgb.hex = function(args) { - const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.hex.rgb = function(args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - let colorString = match[0]; - if (match[0].length === 3) { - colorString = colorString.split("").map((char) => { - return char + char; - }).join(""); - } - const integer = parseInt(colorString, 16); - const r = integer >> 16 & 255; - const g = integer >> 8 & 255; - const b = integer & 255; - return [r, g, b]; - }; - convert.rgb.hcg = function(rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = max - min; - let grayscale; - let hue; - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - if (chroma <= 0) { - hue = 0; - } else if (max === r) { - hue = (g - b) / chroma % 6; - } else if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - hue /= 6; - hue %= 1; - return [hue * 360, chroma * 100, grayscale * 100]; - }; - convert.hsl.hcg = function(hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); - let f = 0; - if (c < 1) { - f = (l - 0.5 * c) / (1 - c); - } - return [hsl[0], c * 100, f * 100]; - }; - convert.hsv.hcg = function(hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const c = s * v; - let f = 0; - if (c < 1) { - f = (v - c) / (1 - c); - } - return [hsv[0], c * 100, f * 100]; - }; - convert.hcg.rgb = function(hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - if (c === 0) { - return [g * 255, g * 255, g * 255]; - } - const pure = [0, 0, 0]; - const hi = h % 1 * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; - pure[1] = v; - pure[2] = 0; - break; - case 1: - pure[0] = w; - pure[1] = 1; - pure[2] = 0; - break; - case 2: - pure[0] = 0; - pure[1] = 1; - pure[2] = v; - break; - case 3: - pure[0] = 0; - pure[1] = w; - pure[2] = 1; - break; - case 4: - pure[0] = v; - pure[1] = 0; - pure[2] = 1; - break; - default: - pure[0] = 1; - pure[1] = 0; - pure[2] = w; - } - mg = (1 - c) * g; - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; - }; - convert.hcg.hsv = function(hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1 - c); - let f = 0; - if (v > 0) { - f = c / v; - } - return [hcg[0], f * 100, v * 100]; - }; - convert.hcg.hsl = function(hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const l = g * (1 - c) + 0.5 * c; - let s = 0; - if (l > 0 && l < 0.5) { - s = c / (2 * l); - } else if (l >= 0.5 && l < 1) { - s = c / (2 * (1 - l)); - } - return [hcg[0], s * 100, l * 100]; - }; - convert.hcg.hwb = function(hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; - }; - convert.hwb.hcg = function(hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - if (c < 1) { - g = (v - c) / (1 - c); - } - return [hwb[0], c * 100, g * 100]; - }; - convert.apple.rgb = function(apple) { - return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; - }; - convert.rgb.apple = function(rgb) { - return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; - }; - convert.gray.rgb = function(args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; - }; - convert.gray.hsl = function(args) { - return [0, 0, args[0]]; - }; - convert.gray.hsv = convert.gray.hsl; - convert.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }; - convert.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }; - convert.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }; - convert.gray.hex = function(gray) { - const val = Math.round(gray[0] / 100 * 255) & 255; - const integer = (val << 16) + (val << 8) + val; - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.rgb.gray = function(rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; - }; -}); - -// node_modules/color-convert/route.js -var require_route = __commonJS((exports, module) => { - function buildGraph() { - const graph = {}; - const models = Object.keys(conversions); - for (let len = models.length, i = 0;i < len; i++) { - graph[models[i]] = { - distance: -1, - parent: null - }; - } - return graph; - } - function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; - graph[fromModel].distance = 0; - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - for (let len = adjacents.length, i = 0;i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - return graph; - } - function link(from, to) { - return function(args) { - return to(from(args)); - }; - } - function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - fn.conversion = path; - return fn; - } - var conversions = require_conversions(); - module.exports = function(fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - const models = Object.keys(graph); - for (let len = models.length, i = 0;i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - if (node.parent === null) { - continue; - } - conversion[toModel] = wrapConversion(toModel, graph); - } - return conversion; - }; -}); - -// node_modules/color-convert/index.js -var require_color_convert = __commonJS((exports, module) => { - function wrapRaw(fn) { - const wrappedFn = function(...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - if (arg0.length > 1) { - args = arg0; - } - return fn(args); - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - function wrapRounded(fn) { - const wrappedFn = function(...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - if (arg0.length > 1) { - args = arg0; - } - const result = fn(args); - if (typeof result === "object") { - for (let len = result.length, i = 0;i < len; i++) { - result[i] = Math.round(result[i]); - } - } - return result; - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - var conversions = require_conversions(); - var route = require_route(); - var convert = {}; - var models = Object.keys(conversions); - models.forEach((fromModel) => { - convert[fromModel] = {}; - Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); - Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); - const routes = route(fromModel); - const routeModels = Object.keys(routes); - routeModels.forEach((toModel) => { - const fn = routes[toModel]; - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); - }); - module.exports = convert; -}); - -// node_modules/ansi-styles/index.js -var require_ansi_styles = __commonJS((exports, module) => { - function assembleStyles() { - const codes = new Map; - const styles = { - modifier: { - reset: [0, 0], - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles[styleName]; - codes.set(style[0], style[1]); - } - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - Object.defineProperty(styles, "codes", { - value: codes, - enumerable: false - }); - styles.color.close = "\x1B[39m"; - styles.bgColor.close = "\x1B[49m"; - setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); - setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); - setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); - setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); - setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); - setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); - return styles; - } - var wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\x1B[${code + offset}m`; - }; - var wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\x1B[${38 + offset};5;${code}m`; - }; - var wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; - }; - var ansi2ansi = (n) => n; - var rgb2rgb = (r, g, b) => [r, g, b]; - var setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - return value; - }, - enumerable: true, - configurable: true - }); - }; - var colorConvert; - var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require_color_convert(); - } - const offset = isBackground ? 10 : 0; - const styles = {}; - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === "object") { - styles[name] = wrap(suite[targetSpace], offset); - } - } - return styles; - }; - Object.defineProperty(module, "exports", { - enumerable: true, - get: assembleStyles - }); -}); - -// node_modules/chalk/source/util.js -var require_util2 = __commonJS((exports, module) => { - var stringReplaceAll = (string, substring, replacer) => { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ""; - do { - returnValue += string.substr(endIndex, index - endIndex) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - returnValue += string.substr(endIndex); - return returnValue; - }; - var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => { - let endIndex = 0; - let returnValue = ""; - do { - const gotCR = string[index - 1] === "\r"; - returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix; - endIndex = index + 1; - index = string.indexOf("\n", endIndex); - } while (index !== -1); - returnValue += string.substr(endIndex); - return returnValue; - }; - module.exports = { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex - }; -}); - -// node_modules/chalk/source/templates.js -var require_templates = __commonJS((exports, module) => { - function unescape2(c) { - const u = c[0] === "u"; - const bracket = c[1] === "{"; - if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - if (u && bracket) { - return String.fromCodePoint(parseInt(c.slice(2, -1), 16)); - } - return ESCAPES.get(c) || c; - } - function parseArguments(name, arguments_) { - const results = []; - const chunks = arguments_.trim().split(/\s*,\s*/g); - let matches; - for (const chunk of chunks) { - const number = Number(chunk); - if (!Number.isNaN(number)) { - results.push(number); - } else if (matches = chunk.match(STRING_REGEX)) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape2(escape) : character)); - } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); - } - } - return results; - } - function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - const results = []; - let matches; - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - return results; - } - function buildStyle(chalk, styles) { - const enabled = {}; - for (const layer of styles) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } - let current = chalk; - for (const [styleName, styles2] of Object.entries(enabled)) { - if (!Array.isArray(styles2)) { - continue; - } - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName]; - } - return current; - } - var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; - var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; - var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; - var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi; - var ESCAPES = new Map([ - ["n", "\n"], - ["r", "\r"], - ["t", "\t"], - ["b", "\b"], - ["f", "\f"], - ["v", "\v"], - ["0", "\0"], - ["\\", "\\"], - ["e", "\x1B"], - ["a", "\x07"] - ]); - module.exports = (chalk, temporary) => { - const styles = []; - const chunks = []; - let chunk = []; - temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => { - if (escapeCharacter) { - chunk.push(unescape2(escapeCharacter)); - } else if (style) { - const string = chunk.join(""); - chunk = []; - chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string)); - styles.push({ inverse, styles: parseStyle(style) }); - } else if (close) { - if (styles.length === 0) { - throw new Error("Found extraneous } in Chalk template literal"); - } - chunks.push(buildStyle(chalk, styles)(chunk.join(""))); - chunk = []; - styles.pop(); - } else { - chunk.push(character); - } - }); - chunks.push(chunk.join("")); - if (styles.length > 0) { - const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; - throw new Error(errMessage); - } - return chunks.join(""); - }; -}); - -// node_modules/chalk/source/index.js -var require_source = __commonJS((exports, module) => { - function Chalk(options) { - return chalkFactory(options); - } - var ansiStyles = require_ansi_styles(); - var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color(); - var { - stringReplaceAll, - stringEncaseCRLFWithFirstIndex - } = require_util2(); - var { isArray } = Array; - var levelMapping = [ - "ansi", - "ansi", - "ansi256", - "ansi16m" - ]; - var styles = Object.create(null); - var applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error("The `level` option should be an integer from 0 to 3"); - } - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === undefined ? colorLevel : options.level; - }; - - class ChalkClass { - constructor(options) { - return chalkFactory(options); - } - } - var chalkFactory = (options) => { - const chalk2 = {}; - applyOptions(chalk2, options); - chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_); - Object.setPrototypeOf(chalk2, Chalk.prototype); - Object.setPrototypeOf(chalk2.template, chalk2); - chalk2.template.constructor = () => { - throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead."); - }; - chalk2.template.Instance = ChalkClass; - return chalk2.template; - }; - for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty); - Object.defineProperty(this, styleName, { value: builder }); - return builder; - } - }; - } - styles.visible = { - get() { - const builder = createBuilder(this, this._styler, true); - Object.defineProperty(this, "visible", { value: builder }); - return builder; - } - }; - var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"]; - for (const model of usedModels) { - styles[model] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; - } - for (const model of usedModels) { - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler); - return createBuilder(this, styler, this._isEmpty); - }; - } - }; - } - var proto = Object.defineProperties(() => { - }, { - ...styles, - level: { - enumerable: true, - get() { - return this._generator.level; - }, - set(level) { - this._generator.level = level; - } - } - }); - var createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === undefined) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - return { - open, - close, - openAll, - closeAll, - parent - }; - }; - var createBuilder = (self2, _styler, _isEmpty) => { - const builder = (...arguments_) => { - if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) { - return applyStyle(builder, chalkTag(builder, ...arguments_)); - } - return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); - }; - Object.setPrototypeOf(builder, proto); - builder._generator = self2; - builder._styler = _styler; - builder._isEmpty = _isEmpty; - return builder; - }; - var applyStyle = (self2, string) => { - if (self2.level <= 0 || !string) { - return self2._isEmpty ? "" : string; - } - let styler = self2._styler; - if (styler === undefined) { - return string; - } - const { openAll, closeAll } = styler; - if (string.indexOf("\x1B") !== -1) { - while (styler !== undefined) { - string = stringReplaceAll(string, styler.close, styler.open); - styler = styler.parent; - } - } - const lfIndex = string.indexOf("\n"); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - return openAll + string + closeAll; - }; - var template; - var chalkTag = (chalk2, ...strings) => { - const [firstString] = strings; - if (!isArray(firstString) || !isArray(firstString.raw)) { - return strings.join(" "); - } - const arguments_ = strings.slice(1); - const parts = [firstString.raw[0]]; - for (let i = 1;i < firstString.length; i++) { - parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i])); - } - if (template === undefined) { - template = require_templates(); - } - return template(chalk2, parts.join("")); - }; - Object.defineProperties(Chalk.prototype, styles); - var chalk = Chalk(); - chalk.supportsColor = stdoutColor; - chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 }); - chalk.stderr.supportsColor = stderrColor; - module.exports = chalk; -}); - -// node_modules/find-process/dist/cjs/utils.js -var require_utils2 = __commonJS((exports) => { - function debugLog(debug, cmd, stdout, stderr) { - if (!debug) - return; - const text = `[debug] Command: ${cmd}\n` + `[debug] stdout:\n${stdout.trim() || "(empty)"}\n` + `[debug] stderr:\n${stderr.trim() || "(empty)"}\n\n`; - process.stderr.write(chalk_1.default.gray(text)); - } - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.debugLog = debugLog; - var child_process_1 = import.meta.require("child_process"); - var chalk_1 = __importDefault(require_source()); - var UNIT_MB = 1024 * 1024; - var utils = { - exec(cmd, callback) { - const options = { - maxBuffer: 2 * UNIT_MB, - windowsHide: true, - encoding: "utf8" - }; - (0, child_process_1.exec)(cmd, options, callback); - }, - spawn(cmd, args, options) { - return (0, child_process_1.spawn)(cmd, args, options); - }, - stripLine(text, num) { - let idx = 0; - while (num-- > 0) { - const nIdx = text.indexOf("\n", idx); - if (nIdx >= 0) { - idx = nIdx + 1; - } - } - return idx > 0 ? text.substring(idx) : text; - }, - split(line, max) { - const cols = line.trim().split(/\s+/); - if (cols.length > max) { - cols[max - 1] = cols.slice(max - 1).join(" "); - } - return cols; - }, - extractColumns(text, idxes, max) { - const lines = text.split(/(\r\n|\n|\r)/); - const columns = []; - if (!max) { - max = Math.max.apply(null, idxes) + 1; - } - lines.forEach((line) => { - const cols = utils.split(line, max); - const column = []; - idxes.forEach((idx) => { - column.push(cols[idx] || ""); - }); - columns.push(column); - }); - return columns; - }, - parseTable(data) { - const lines = data.split(/(\r\n\r\n|\r\n\n|\n\r\n|\n\n)/).filter((line) => { - return line && line.trim().length > 0; - }).map((e) => e.split(/(\r\n|\n|\r)/).filter((line) => line.trim().length > 0)); - lines.forEach((line) => { - for (let index = 0;line[index]; ) { - const entry = line[index]; - if (entry.startsWith(" ")) { - line[index - 1] += entry.trimLeft(); - line.splice(index, 1); - } else { - index += 1; - } - } - }); - return lines.map((line) => { - const row = {}; - line.forEach((string) => { - const splitterIndex = string.indexOf(":"); - const key = string.slice(0, splitterIndex).trim(); - row[key] = string.slice(splitterIndex + 1).trim(); - }); - return row; - }); - } - }; - exports.default = utils; -}); - -// node_modules/find-process/dist/cjs/find_pid.js -var require_find_pid = __commonJS((exports) => { - function findPidByPort(port, config = {}) { - const platform = process.platform; - return new Promise((resolve, reject) => { - if (!(platform in finders)) { - return reject(new Error(`platform ${platform} is unsupported`)); - } - const finder = finders[platform]; - finder(port, config).then(resolve, reject); - }); - } - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) - if (Object.prototype.hasOwnProperty.call(o2, k)) - ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0;i < k.length; i++) - if (k[i] !== "default") - __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - }(); - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var fs = __importStar(import.meta.require("fs")); - var os = __importStar(import.meta.require("os")); - var logger_1 = __importDefault(require_logger()); - var utils_1 = __importStar(require_utils2()); - var ensureDir = (path) => new Promise((resolve, reject) => { - if (fs.existsSync(path)) { - resolve(); - } else { - fs.mkdir(path, (err) => { - err ? reject(err) : resolve(); - }); - } - }); - var finders = { - darwin(port, config) { - return new Promise((resolve, reject) => { - const cmd = "netstat -anv -p TCP && netstat -anv -p UDP"; - utils_1.default.exec(cmd, function(err, stdout, stderr) { - (0, utils_1.debugLog)(!!config.debug, cmd, stdout || "", stderr || ""); - if (err) { - reject(err); - } else { - const stderrStr = stderr.toString().trim(); - if (stderrStr) { - reject(new Error(stderrStr)); - return; - } - const table = utils_1.default.stripLine(stdout.toString(), 1); - const headers = table.slice(0, table.indexOf("\n")); - const body = utils_1.default.stripLine(table, 1); - const pidColumn = headers.indexOf("rxbytes") >= 0 ? 10 : 8; - const found = utils_1.default.extractColumns(body, [0, 3, pidColumn], 10).filter((row) => { - return !!String(row[0]).match(/^(udp|tcp)/); - }).find((row) => { - const matches = String(row[1]).match(/\.(\d+)$/); - if (matches && matches[1] === String(port)) { - return true; - } - return false; - }); - if (found && found[2].length) { - const pidCell = String(found[2]); - const pidMatch = pidCell.match(/:(\d+)$/); - const pid = pidMatch ? parseInt(pidMatch[1], 10) : parseInt(pidCell, 10); - if (!isNaN(pid)) { - resolve(pid); - } - } - reject(new Error(`pid of port (${port}) not found`)); - } - }); - }); - }, - linux(port, config) { - return new Promise((resolve, reject) => { - const cmd = "netstat -tunlp"; - utils_1.default.exec(cmd, function(err, stdout, stderr) { - (0, utils_1.debugLog)(!!config.debug, cmd, stdout || "", stderr || ""); - if (err) { - reject(err); - } else { - const warn = stderr.toString().trim(); - if (warn) { - logger_1.default.warn(warn); - } - const data = utils_1.default.stripLine(stdout.toString(), 2); - const columns = utils_1.default.extractColumns(data, [3, 6], 7).find((column) => { - const matches = String(column[0]).match(/:(\d+)$/); - if (matches && matches[1] === String(port)) { - return true; - } - return false; - }); - if (columns && columns[1]) { - const pid = columns[1].split("/", 1)[0]; - if (pid.length) { - resolve(parseInt(pid, 10)); - } else { - reject(new Error(`pid of port (${port}) not found`)); - } - } else { - reject(new Error(`pid of port (${port}) not found`)); - } - } - }); - }); - }, - win32(port, config) { - return new Promise((resolve, reject) => { - const cmd = "netstat -ano"; - utils_1.default.exec(cmd, function(err, stdout, stderr) { - (0, utils_1.debugLog)(!!config.debug, cmd, stdout || "", stderr || ""); - if (err) { - reject(err); - } else { - const stderrStr = stderr.toString().trim(); - if (stderrStr) { - reject(new Error(stderrStr)); - return; - } - const data = utils_1.default.stripLine(stdout.toString(), 4); - const columns = utils_1.default.extractColumns(data, [1, 4], 5).find((column) => { - const matches = String(column[0]).match(/:(\d+)$/); - if (matches && matches[1] === String(port)) { - return true; - } - return false; - }); - if (columns && columns[1].length && parseInt(columns[1], 10) > 0) { - resolve(parseInt(columns[1], 10)); - } else { - reject(new Error(`pid of port (${port}) not found`)); - } - } - }); - }); - }, - android(port, config) { - return new Promise((resolve, reject) => { - const dir = os.tmpdir() + "/.find-process"; - const file = dir + "/" + process.pid; - const cmd = 'netstat -tunp >> "' + file + '"'; - ensureDir(dir).then(() => { - utils_1.default.exec(cmd, (_execErr, execStdout, execStderr) => { - (0, utils_1.debugLog)(!!config.debug, cmd, execStdout || "", execStderr || ""); - fs.readFile(file, "utf8", (err, data) => { - fs.unlink(file, () => { - }); - if (err) { - reject(err); - } else { - data = utils_1.default.stripLine(data, 2); - const columns = utils_1.default.extractColumns(data, [3, 6], 7).find((column) => { - const matches = String(column[0]).match(/:(\d+)$/); - if (matches && matches[1] === String(port)) { - return true; - } - return false; - }); - if (columns && columns[1]) { - const pid = columns[1].split("/", 1)[0]; - if (pid.length) { - resolve(parseInt(pid, 10)); - } else { - reject(new Error(`pid of port (${port}) not found`)); - } - } else { - reject(new Error(`pid of port (${port}) not found`)); - } - } - }); - }); - }); - }); - } - }; - finders.freebsd = finders.darwin; - finders.sunos = finders.darwin; - exports.default = findPidByPort; -}); - -// node_modules/find-process/dist/cjs/find_process.js -var require_find_process = __commonJS((exports) => { - function matchName(text, name) { - if (!name) { - return true; - } - if (text && text.match) { - return text.match(name) !== null; - } - return false; - } - function fetchBin(cmd) { - const pieces = cmd.split(path.sep); - const last = pieces[pieces.length - 1]; - if (last) { - pieces[pieces.length - 1] = last.split(" ")[0]; - } - const fixed = []; - for (const part of pieces) { - const optIdx = part.indexOf(" -"); - if (optIdx >= 0) { - fixed.push(part.substring(0, optIdx).trim()); - break; - } else if (part.endsWith(" ")) { - fixed.push(part.trim()); - break; - } - fixed.push(part); - } - return fixed.join(path.sep); - } - function fetchName(fullpath) { - if (process.platform === "darwin") { - const idx = fullpath.indexOf(".app/"); - if (idx >= 0) { - return path.basename(fullpath.substring(0, idx)); - } - } - return path.basename(fullpath); - } - function findProcess(cond) { - const platform = process.platform; - const finder = finders[platform]; - if (!finder) { - return Promise.reject(new Error(`Platform "${platform}" is not supported`)); - } - return finder(cond); - } - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } : function(o, v) { - o["default"] = v; - }); - var __importStar = exports && exports.__importStar || function() { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function(o2) { - var ar = []; - for (var k in o2) - if (Object.prototype.hasOwnProperty.call(o2, k)) - ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k = ownKeys(mod), i = 0;i < k.length; i++) - if (k[i] !== "default") - __createBinding(result, mod, k[i]); - } - __setModuleDefault(result, mod); - return result; - }; - }(); - Object.defineProperty(exports, "__esModule", { value: true }); - var path = __importStar(import.meta.require("path")); - var utils_1 = __importStar(require_utils2()); - var finders = { - darwin(cond) { - return new Promise((resolve, reject) => { - let cmd; - if ("pid" in cond && cond.pid !== undefined) { - cmd = `ps -p ${cond.pid} -ww -o pid,ppid,uid,gid,args`; - } else { - cmd = "ps ax -ww -o pid,ppid,uid,gid,args"; - } - if (cond.config.verbose) { - console.info("Query command: " + cmd); - } - utils_1.default.exec(cmd, function(err, stdout, stderr) { - (0, utils_1.debugLog)(!!cond.config.debug, cmd, stdout || "", stderr || ""); - if (err) { - if ("pid" in cond && cond.pid !== undefined) { - resolve([]); - } else { - reject(err); - } - } else { - const stderrStr = stderr.toString().trim(); - if (stderrStr) { - reject(new Error(stderrStr)); - return; - } - const data = utils_1.default.stripLine(stdout.toString(), 1); - const columns = utils_1.default.extractColumns(data, [0, 1, 2, 3, 4], 5).filter((column) => { - if (column[0] && cond.pid !== undefined) { - return column[0] === String(cond.pid); - } else if (column[4] && cond.name) { - return matchName(column[4], cond.name); - } else { - return !!column[0]; - } - }); - let list = columns.map((column) => { - const cmd2 = String(column[4]); - const bin = fetchBin(cmd2); - return { - pid: parseInt(column[0], 10), - ppid: parseInt(column[1], 10), - uid: parseInt(column[2], 10), - gid: parseInt(column[3], 10), - name: fetchName(bin), - bin, - cmd: column[4] - }; - }); - if (cond.config.strict && cond.name) { - list = list.filter((item) => item.name === cond.name); - } - resolve(list); - } - }); - }); - }, - win32(cond) { - return new Promise((resolve, reject) => { - const cmd = "[Console]::OutputEncoding = [System.Text.Encoding]::UTF8; Get-CimInstance -className win32_process | select Name,ProcessId,ParentProcessId,CommandLine,ExecutablePath"; - const lines = []; - if (cond.config.verbose) { - console.info("Query command: " + cmd); - } - const proc = utils_1.default.spawn("powershell.exe", ["/c", cmd], { detached: false, windowsHide: true }); - proc.stdout.on("data", (data) => { - lines.push(data.toString()); - }); - proc.on("error", (err) => { - reject(new Error("Command \'" + cmd + "\' failed with reason: " + err.toString())); - }); - proc.on("close", (code) => { - (0, utils_1.debugLog)(!!cond.config.debug, cmd, lines.join(""), ""); - if (code !== 0) { - return reject(new Error("Command \'" + cmd + "\' terminated with code: " + code)); - } - const list = utils_1.default.parseTable(lines.join("")).filter((row) => { - if (cond.pid !== undefined) { - return row.ProcessId === String(cond.pid); - } else if (cond.name) { - const rowName = row.Name || ""; - if (cond.config.strict) { - return rowName === cond.name || rowName.endsWith(".exe") && rowName.slice(0, -4) === cond.name; - } else { - return matchName(row.CommandLine || rowName, cond.name); - } - } else { - return true; - } - }).map((row) => ({ - pid: parseInt(row.ProcessId, 10), - ppid: parseInt(row.ParentProcessId, 10), - bin: row.ExecutablePath, - name: row.Name || "", - cmd: row.CommandLine - })); - resolve(list); - }); - }); - }, - android(cond) { - return new Promise((resolve, reject) => { - const cmd = "ps"; - if (cond.config.verbose) { - console.info("Query command: " + cmd); - } - utils_1.default.exec(cmd, function(err, stdout, stderr) { - (0, utils_1.debugLog)(!!cond.config.debug, cmd, stdout || "", stderr || ""); - if (err) { - if (cond.pid !== undefined) { - resolve([]); - } else { - reject(err); - } - } else { - const stderrStr = stderr.toString().trim(); - if (stderrStr) { - reject(new Error(stderrStr)); - return; - } - const data = utils_1.default.stripLine(stdout.toString(), 1); - const columns = utils_1.default.extractColumns(data, [0, 3], 4).filter((column) => { - if (column[0] && cond.pid !== undefined) { - return column[0] === String(cond.pid); - } else if (column[1] && cond.name) { - return matchName(column[1], cond.name); - } else { - return !!column[0]; - } - }); - let list = columns.map((column) => { - const cmd2 = String(column[1]); - const bin = fetchBin(cmd2); - return { - pid: parseInt(column[0], 10), - ppid: 0, - name: fetchName(bin), - bin, - cmd: column[1] - }; - }); - if (cond.config.strict && cond.name) { - list = list.filter((item) => item.name === cond.name); - } - resolve(list); - } - }); - }); - } - }; - finders.linux = finders.darwin; - finders.sunos = finders.darwin; - finders.freebsd = finders.darwin; - exports.default = findProcess; -}); - -// node_modules/find-process/dist/cjs/find.js -var require_find = __commonJS((exports) => { - function find(by, value, options) { - const config = Object.assign({ - logLevel: "warn", - strict: typeof options === "boolean" ? options : false - }, typeof options === "object" ? options : {}); - if (by !== "name" || typeof value !== "string") { - config.strict = false; - } - if (config.logLevel) { - logger_1.default.setLevel(config.logLevel); - } - return new Promise((resolve, reject) => { - if (!(by in findBy)) { - reject(new Error(`do not support find by "${by}"`)); - } else { - const isNumber = /^\d+$/.test(String(value)); - if (by === "pid" && !isNumber) { - reject(new Error("pid must be a number")); - } else if (by === "port" && !isNumber) { - reject(new Error("port must be a number")); - } else { - findBy[by](value, config).then(resolve, reject); - } - } - }); - } - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var find_pid_1 = __importDefault(require_find_pid()); - var find_process_1 = __importDefault(require_find_process()); - var logger_1 = __importDefault(require_logger()); - var findBy = { - port(port, config) { - return (0, find_pid_1.default)(port, config).then((pid) => { - return findBy.pid(pid, config); - }, () => { - return []; - }); - }, - pid(pid, config) { - return (0, find_process_1.default)({ - pid, - config - }); - }, - name(name, config) { - return (0, find_process_1.default)({ - name, - config - }); - } - }; - exports.default = find; -}); - -// node_modules/find-process/dist/cjs/types.js -var require_types = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); -}); - -// node_modules/find-process/dist/cjs/index.js -var require_cjs6 = __commonJS((exports) => { - var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - } : function(o, m, k, k2) { - if (k2 === undefined) - k2 = k; - o[k2] = m[k]; - }); - var __exportStar = exports && exports.__exportStar || function(m, exports2) { - for (var p in m) - if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) - __createBinding(exports2, m, p); - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.default = undefined; - var find_1 = require_find(); - Object.defineProperty(exports, "default", { enumerable: true, get: function() { - return __importDefault(find_1).default; - } }); - __exportStar(require_types(), exports); -}); - -// node_modules/tree-kill/index.js -var require_tree_kill = __commonJS((exports, module) => { - function killAll(tree, signal, callback) { - var killed = {}; - try { - Object.keys(tree).forEach(function(pid) { - tree[pid].forEach(function(pidpid) { - if (!killed[pidpid]) { - killPid(pidpid, signal); - killed[pidpid] = 1; - } - }); - if (!killed[pid]) { - killPid(pid, signal); - killed[pid] = 1; - } - }); - } catch (err) { - if (callback) { - return callback(err); - } else { - throw err; - } - } - if (callback) { - return callback(); - } - } - function killPid(pid, signal) { - try { - process.kill(parseInt(pid, 10), signal); - } catch (err) { - if (err.code !== "ESRCH") - throw err; - } - } - function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) { - var ps = spawnChildProcessesList(parentPid); - var allData = ""; - ps.stdout.on("data", function(data) { - var data = data.toString("ascii"); - allData += data; - }); - var onClose = function(code) { - delete pidsToProcess[parentPid]; - if (code != 0) { - if (Object.keys(pidsToProcess).length == 0) { - cb(); - } - return; - } - allData.match(/\d+/g).forEach(function(pid) { - pid = parseInt(pid, 10); - tree[parentPid].push(pid); - tree[pid] = []; - pidsToProcess[pid] = 1; - buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb); - }); - }; - ps.on("close", onClose); - } - var childProcess = import.meta.require("child_process"); - var spawn = childProcess.spawn; - var exec = childProcess.exec; - module.exports = function(pid, signal, callback) { - if (typeof signal === "function" && callback === undefined) { - callback = signal; - signal = undefined; - } - pid = parseInt(pid); - if (Number.isNaN(pid)) { - if (callback) { - return callback(new Error("pid must be a number")); - } else { - throw new Error("pid must be a number"); - } - } - var tree = {}; - var pidsToProcess = {}; - tree[pid] = []; - pidsToProcess[pid] = 1; - switch (process.platform) { - case "win32": - exec("taskkill /pid " + pid + " /T /F", callback); - break; - case "darwin": - buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { - return spawn("pgrep", ["-P", parentPid]); - }, function() { - killAll(tree, signal, callback); - }); - break; - default: - buildProcessTree(pid, tree, pidsToProcess, function(parentPid) { - return spawn("ps", ["-o", "pid", "--no-headers", "--ppid", parentPid]); - }, function() { - killAll(tree, signal, callback); - }); - break; - } - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/Function.js -var require_Function = __commonJS((exports, module) => { - function interfaceAddress(type, interfaceAddresses) { - return interfaceAddresses ? interfaceAddresses[type] : undefined; - } - async function randomPort(protocol = "udp4", interfaceAddresses) { - const socket = dgram.createSocket(protocol); - setImmediate2(() => socket.bind({ - port: 0, - address: interfaceAddress(protocol, interfaceAddresses) - })); - await new Promise((resolve, reject) => { - socket.once("error", reject); - socket.once("listening", resolve); - }); - const port = socket.address()?.port; - await new Promise((resolve) => socket.close(resolve)); - return port; - } - async function randomPorts(num, protocol = "udp4", interfaceAddresses) { - return Promise.all(Array.from({ length: num }).map(() => randomPort(protocol, interfaceAddresses))); - } - async function findPort(min, max, protocol = "udp4", interfaceAddresses) { - let port; - for (let i = min;i <= max; i++) { - const socket = dgram.createSocket(protocol); - setImmediate2(() => socket.bind({ - port: i, - address: interfaceAddress(protocol, interfaceAddresses) - })); - const error = await new Promise((resolve) => { - socket.once("error", resolve); - socket.once("listening", () => resolve(null)); - }); - await new Promise((resolve) => socket.close(resolve)); - if (error) - continue; - const addressInfo = socket.address(); - if (addressInfo && addressInfo.port >= min && addressInfo.port <= max) { - port = addressInfo.port; - break; - } - } - if (!port) - throw new Error("port not found"); - return port; - } - function parseStreamKey(key) { - const Arr = key.split(":"); - const type = Arr[0]; - const guildId = type == "guild" ? Arr[1] : null; - const channelId = type == "guild" ? Arr[2] : Arr[1]; - const userId = type == "guild" ? Arr[3] : Arr[2]; - return { type, guildId, channelId, userId }; - } - var dgram = import.meta.require("dgram"); - var { setImmediate: setImmediate2 } = import.meta.require("timers"); - module.exports = { - randomPort, - randomPorts, - findPort, - interfaceAddress, - parseStreamKey - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/Socket.js -var require_Socket = __commonJS((exports, module) => { - function StreamInput(stream) { - return new UnixStream(stream, (socket) => stream.pipe(socket)); - } - function StreamOutput(stream) { - return new UnixStream(stream, (socket) => socket.pipe(stream)); - } - var fs = import.meta.require("fs"); - var net = import.meta.require("net"); - var path = import.meta.require("path"); - var process2 = import.meta.require("process"); - var counter = 0; - - class UnixStream { - constructor(stream, onSocket) { - if (process2.platform === "win32") { - const pipePrefix = "\\\\.\\pipe\\"; - const pipeName = `node-webrtc.${++counter}.sock`; - this.socketPath = path.join(pipePrefix, pipeName); - this.url = this.socketPath; - } else { - this.socketPath = `./${++counter}.sock`; - this.url = `unix:${this.socketPath}`; - } - try { - fs.statSync(this.socketPath); - fs.unlinkSync(this.socketPath); - } catch (err) { - } - const server = net.createServer(onSocket); - stream.on("finish", () => { - server.close(); - }); - server.listen(this.socketPath); - } - } - module.exports = { StreamOutput, StreamInput, UnixStream }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/receiver/Recorder.js -var require_Recorder = __commonJS((exports, module) => { - var { spawn } = import.meta.require("child_process"); - var { createSocket } = import.meta.require("dgram"); - var { EventEmitter } = import.meta.require("events"); - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Writable } = import.meta.require("stream"); - var find = require_cjs6(); - var kill = require_tree_kill(); - var { RtpPacket } = require_src4(); - var Util = require_Util(); - var { randomPorts } = require_Function(); - var { StreamOutput } = require_Socket(); - - class Recorder extends EventEmitter { - constructor(receiver, { userId, portUdpH264, portUdpOpus, output } = {}) { - super(); - Object.defineProperty(this, "receiver", { value: receiver }); - this.userId = userId; - this.portUdpH264 = portUdpH264; - this.portUdpH265 = null; - this.portUdpOpus = portUdpOpus; - this.promise = null; - if (!portUdpH264 || !portUdpOpus) { - this.promise = randomPorts(6, "udp4").then((ports) => { - ports = ports.filter((port) => port % 2 === 0); - this.portUdpH264 ??= ports[0]; - this.portUdpOpus ??= ports[1]; - }); - } - this.output = output; - this.ready = false; - this.socket = createSocket("udp4"); - this.init(output); - } - async init(output) { - await this.promise; - const sdpData = Util.getSDPCodecName(this.portUdpH264, this.portUdpH265, this.portUdpOpus); - const isStream = output instanceof Writable; - if (isStream) { - this.outputStream = StreamOutput(output); - } - const stream = spawn("ffmpeg", [ - "-reorder_queue_size", - "500", - "-thread_queue_size", - "500", - "-err_detect", - "ignore_err", - "-flags2", - "+export_mvs", - "-fflags", - "+genpts+discardcorrupt", - "-use_wallclock_as_timestamps", - "1", - "-f", - "sdp", - "-analyzeduration", - "1M", - "-probesize", - "1M", - "-protocol_whitelist", - "file,udp,rtp,pipe,fd", - "-i", - "-", - "-buffer_size", - "4M", - "-max_delay", - "500000", - "-rtbufsize", - "4M", - "-c", - "copy", - "-y", - "-f", - "matroska", - isStream ? this.outputStream.url : output - ]); - this.stream = stream; - this.stream.stdin.write(sdpData); - this.stream.stdin.end(); - this.stream.stderr.once("data", (data) => { - this.emit("debug", `stderr: ${data}`); - this.ready = true; - this.emit("ready"); - }); - } - feed(payload, callback = (e) => { - if (e) { - console.error("Error sending packet:", e); - } - }) { - if (!(payload instanceof RtpPacket)) { - payload = RtpPacket.deSerialize(Buffer2.isBuffer(payload) ? payload : Buffer2.from(payload)); - } - const message = payload.serialize(); - let port; - if (payload.header.payloadType === Util.getPayloadType("opus")) { - port = this.portUdpOpus; - } else if (payload.header.payloadType === Util.getPayloadType("H264")) { - port = this.portUdpH264; - } else if (payload.header.payloadType === Util.getPayloadType("H265")) { - port = this.portUdpH265; - } else { - return; - } - this.socket.send(message, 0, message.length, port, "127.0.0.1", callback); - } - destroy() { - const ffmpegPid = this.stream.pid; - const args = this.stream.spawnargs.slice(1).join(" "); - find("name", "ffmpeg", true).then((list) => { - let process2 = list.find((o) => o.pid === ffmpegPid || o.ppid === ffmpegPid || o.cmd.includes(args)); - if (process2) { - kill(process2.pid); - this.receiver?.videoStreams?.delete(this.userId); - this.emit("closed"); - } - }); - } - } - module.exports = Recorder; -}); - -// node_modules/discord.js-selfbot-v13/src/util/Speaking.js -var require_Speaking = __commonJS((exports, module) => { - var BitField = require_BitField(); - - class Speaking extends BitField { - } - Speaking.FLAGS = { - SPEAKING: 1 << 0, - SOUNDSHARE: 1 << 1, - PRIORITY_SPEAKING: 1 << 2 - }; - module.exports = Speaking; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/receiver/PacketHandler.js -var require_PacketHandler = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var crypto = import.meta.require("crypto"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { RtpPacket } = require_src4(); - var Recorder = require_Recorder(); - var Speaking = require_Speaking(); - var Util = require_Util(); - var secretbox = require_Secretbox(); - var { SILENCE_FRAME } = require_Silence(); - var DISCORD_SPEAKING_DELAY = 250; - var UNPADDED_NONCE_LENGTH = 4; - var AUTH_TAG_LENGTH = 16; - - class Readable extends import.meta.require("stream").Readable { - _read() { - } - } - - class PacketHandler extends EventEmitter { - constructor(receiver) { - super(); - this.receiver = receiver; - this.streams = new Map; - this.videoStreams = new Map; - this.speakingTimeouts = new Map; - } - getNonceBuffer() { - return this.receiver.connection.authentication.mode === "aead_aes256_gcm_rtpsize" ? Buffer2.alloc(12) : Buffer2.alloc(24); - } - get connection() { - return this.receiver.connection; - } - _stoppedSpeaking(userId) { - const streamInfo = this.streams.get(userId); - if (streamInfo && streamInfo.end === "silence") { - this.streams.delete(userId); - streamInfo.stream.push(null); - } - } - makeStream(user, end) { - if (this.streams.has(user)) - return this.streams.get(user).stream; - const stream = new Readable; - stream.on("end", () => this.streams.delete(user)); - this.streams.set(user, { stream, end }); - return stream; - } - makeVideoStream(user, output) { - if (this.videoStreams.has(user)) - return this.videoStreams.get(user); - const stream = new Recorder(this, { - userId: user, - output, - portUdpH264: 65506, - portUdpOpus: 65510 - }); - stream.on("ready", () => { - this.videoStreams.set(user, stream); - }); - return stream; - } - parseBuffer(buffer) { - const { secret_key, mode } = this.receiver.connection.authentication; - if (!secret_key) - return new Error("secret_key cannot be null or undefined"); - const nonce = this.getNonceBuffer(); - buffer.copy(nonce, 0, buffer.length - UNPADDED_NONCE_LENGTH); - let headerSize = 12; - const first = buffer.readUint8(); - if (first >> 4 & 1) - headerSize += 4; - const header = buffer.slice(0, headerSize); - const encrypted = buffer.slice(headerSize, buffer.length - AUTH_TAG_LENGTH - UNPADDED_NONCE_LENGTH); - const authTag = buffer.slice(buffer.length - AUTH_TAG_LENGTH - UNPADDED_NONCE_LENGTH, buffer.length - UNPADDED_NONCE_LENGTH); - let packet; - switch (mode) { - case "aead_aes256_gcm_rtpsize": { - const decipheriv = crypto.createDecipheriv("aes-256-gcm", secret_key, nonce); - decipheriv.setAAD(header); - decipheriv.setAuthTag(authTag); - packet = Buffer2.concat([decipheriv.update(encrypted), decipheriv.final()]); - break; - } - case "aead_xchacha20_poly1305_rtpsize": { - packet = secretbox.methods.crypto_aead_xchacha20poly1305_ietf_decrypt(Buffer2.concat([encrypted, authTag]), header, nonce, secret_key); - packet = Buffer2.from(packet); - break; - } - default: { - return new RangeError(`Unsupported decryption method: ${mode}`); - } - } - return RtpPacket.deSerialize(Buffer2.concat([header, packet])); - } - audioReceiver(ssrc, userStat, opusPacket) { - const streamInfo = this.streams.get(userStat.userId); - if (userStat.hasVideo) { - if (opusPacket instanceof Error) { - if (streamInfo) { - this.emit("error", opusPacket); - } - return; - } - if (opusPacket.header.payloadType !== Util.getPayloadType("opus")) { - return; - } - if (!opusPacket.payload) { - return; - } - if (SILENCE_FRAME.equals(opusPacket.payload)) { - return; - } - } - let speakingTimeout = this.speakingTimeouts.get(ssrc); - if (typeof speakingTimeout === "undefined") { - if (userStat.speaking === 0) { - userStat.speaking = Speaking.FLAGS.SPEAKING; - } - this.connection.onSpeaking({ user_id: userStat.userId, ssrc, speaking: userStat.speaking }); - speakingTimeout = setTimeout2(() => { - try { - this.connection.onSpeaking({ user_id: userStat.userId, ssrc, speaking: 0 }); - clearTimeout(speakingTimeout); - this.speakingTimeouts.delete(ssrc); - } catch { - } - }, DISCORD_SPEAKING_DELAY).unref(); - this.speakingTimeouts.set(ssrc, speakingTimeout); - } else { - speakingTimeout.refresh(); - } - if (streamInfo) { - const { stream } = streamInfo; - if (opusPacket instanceof Error) { - this.emit("error", opusPacket); - return; - } - if (opusPacket.header.payloadType !== Util.getPayloadType("opus")) { - return; - } - stream.push(opusPacket.payload); - } - } - audioReceiverForStream(ssrc, userStat, packet) { - const streamInfo = this.videoStreams.get(userStat.userId); - if (!streamInfo) - return; - if (packet instanceof Error) { - return; - } - if (packet.header.payloadType !== Util.getPayloadType("opus")) { - return; - } - streamInfo.feed(packet); - } - videoReceiver(ssrc, userStat, packet) { - const streamInfo = this.videoStreams.get(userStat.userId); - if (userStat.hasVideo) { - if (packet instanceof Error) { - return; - } - if (packet.header.payloadType === Util.getPayloadType("opus")) { - return; - } - if (streamInfo) { - streamInfo.feed(packet); - } - } - } - push(buffer) { - const ssrc = buffer.readUInt32BE(8); - let userStat, packet; - if (this.connection.ssrcMap.has(ssrc)) { - userStat = this.connection.ssrcMap.get(ssrc); - packet = this.parseBuffer(buffer); - this.audioReceiver(ssrc, userStat, packet); - this.audioReceiverForStream(ssrc, userStat, packet); - } else if (this.connection.ssrcMap.has(ssrc - 1)) { - userStat = this.connection.ssrcMap.get(ssrc - 1); - packet = this.parseBuffer(buffer); - this.videoReceiver(ssrc, userStat, packet); - } - if (userStat && !(packet instanceof Error)) - this.receiver.emit("receiverData", userStat, packet); - } - destroyAllStream() { - for (const stream of this.streams.values()) { - stream.stream.destroy(); - } - this.streams.clear(); - for (const stream of this.videoStreams.values()) { - stream.destroy(); - } - this.videoStreams.clear(); - } - } - module.exports = PacketHandler; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/player/processing/PCMInsertSilence.js -var require_PCMInsertSilence = __commonJS((exports, module) => { - var { Buffer: Buffer2 } = import.meta.require("buffer"); - var { Transform } = import.meta.require("stream"); - - class PCMInsertSilence extends Transform { - constructor(options) { - super(options); - this.sampleRate = 48000; - this.channels = 2; - this.bytesPerFrame = this.channels * 2; - this.lastChunkTime = Date.now(); - this.silenceThresholdMs = 50; - } - _transform(chunk, encoding, callback) { - const now = Date.now(); - const gap = now - this.lastChunkTime; - if (gap >= this.silenceThresholdMs) { - const missingFrames = Math.floor(gap / 1000 * this.sampleRate); - const silenceBuffer = Buffer2.alloc(missingFrames * this.bytesPerFrame, 0); - this.push(silenceBuffer); - } - this.lastChunkTime = now; - this.push(chunk); - callback(); - } - } - module.exports = { - PCMInsertSilence - }; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/receiver/Receiver.js -var require_Receiver = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var prism = require_src(); - var PacketHandler = require_PacketHandler(); - var { Error: Error2 } = require_errors(); - var { PCMInsertSilence } = require_PCMInsertSilence(); - - class VoiceReceiver extends EventEmitter { - constructor(connection) { - super(); - this.connection = connection; - this.packets = new PacketHandler(this); - this.packets.on("error", (err) => this.emit("debug", err)); - } - createStream(user, { mode = "opus", end = "silence", paddingSilence = false } = {}) { - user = this.connection.client.users.resolve(user); - if (end === "silence") - paddingSilence = false; - if (!user) - throw new Error2("VOICE_USER_MISSING"); - const stream = this.packets.makeStream(user.id, end); - if (paddingSilence) { - const decoder = new prism.opus.Decoder({ channels: 2, rate: 48000, frameSize: 960 }); - const pcmTransformer = new PCMInsertSilence; - stream.pipe(decoder).pipe(pcmTransformer); - if (mode === "opus") { - const encoder = new prism.opus.Encoder({ channels: 2, rate: 48000, frameSize: 960 }); - pcmTransformer.pipe(encoder); - return encoder; - } - return pcmTransformer; - } else { - if (mode === "pcm") { - const decoder = new prism.opus.Decoder({ channels: 2, rate: 48000, frameSize: 960 }); - stream.pipe(decoder); - return decoder; - } - return stream; - } - } - createVideoStream(user, output) { - user = this.connection.client.users.resolve(user); - if (!user) - throw new Error2("VOICE_USER_MISSING"); - const stream = this.packets.makeVideoStream(user.id, output); - return stream; - } - } - module.exports = VoiceReceiver; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/util/PlayInterface.js -var require_PlayInterface = __commonJS((exports, module) => { - var { Readable } = import.meta.require("stream"); - var prism = require_src(); - var { Error: Error2 } = require_errors(); - - class PlayInterface { - constructor(player) { - this.player = player; - } - playAudio(resource, options = {}) { - if (resource instanceof Readable || typeof resource === "string") { - const type = options.type || "unknown"; - if (type === "unknown") { - return this.player.playUnknown(resource, options); - } else if (type === "converted") { - return this.player.playPCMStream(resource, options); - } else if (type === "opus") { - return this.player.playOpusStream(resource, options); - } else if (type === "ogg/opus") { - if (!(resource instanceof Readable)) - throw new Error2("VOICE_PRISM_DEMUXERS_NEED_STREAM"); - return this.player.playOpusStream(resource.pipe(new prism.opus.OggDemuxer), options); - } else if (type === "webm/opus") { - if (!(resource instanceof Readable)) - throw new Error2("VOICE_PRISM_DEMUXERS_NEED_STREAM"); - return this.player.playOpusStream(resource.pipe(new prism.opus.WebmDemuxer), options); - } - } - throw new Error2("VOICE_PLAY_INTERFACE_BAD_TYPE"); - } - playVideo(resource, options = {}) { - if (resource instanceof Readable || typeof resource === "string") { - return this.player.playUnknownVideo(resource, options); - } - throw new Error2("VOICE_PLAY_INTERFACE_BAD_TYPE"); - } - static applyToClass(structure) { - for (const prop of ["playAudio", "playVideo"]) { - Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(PlayInterface.prototype, prop)); - } - } - } - module.exports = PlayInterface; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/VoiceConnection.js -var require_VoiceConnection = __commonJS((exports, module) => { - var EventEmitter = import.meta.require("events"); - var { getCiphers } = import.meta.require("crypto"); - var { setTimeout: setTimeout2 } = import.meta.require("timers"); - var { Collection } = require_dist(); - var VoiceUDP = require_VoiceUDPClient(); - var VoiceWebSocket = require_VoiceWebSocket(); - var MediaPlayer = require_MediaPlayer(); - var VoiceReceiver = require_Receiver(); - var { parseStreamKey } = require_Function(); - var PlayInterface = require_PlayInterface(); - var Silence = require_Silence(); - var { Error: Error2 } = require_errors(); - var { Opcodes, VoiceOpcodes, VoiceStatus, Events } = require_Constants(); - var Speaking = require_Speaking(); - var Util = require_Util(); - - class SingleSilence extends Silence { - _read() { - super._read(); - this.push(null); - } - } - var SUPPORTED_MODES = ["aead_xchacha20_poly1305_rtpsize"]; - if (getCiphers().includes("aes-256-gcm")) { - SUPPORTED_MODES.unshift("aead_aes256_gcm_rtpsize"); - } - var SUPPORTED_CODECS = ["VP8", "H264"]; - - class VoiceConnection extends EventEmitter { - constructor(voiceManager, channel) { - super(); - this.voiceManager = voiceManager; - this.channel = channel; - this.status = VoiceStatus.AUTHENTICATING; - this.speaking = new Speaking().freeze(); - this.videoStatus = null; - this.authentication = {}; - this.player = new MediaPlayer(this, this.constructor.name === "StreamConnection"); - this.player.on("debug", (m) => { - this.emit("debug", `media player - ${m}`); - }); - this.player.on("error", (e) => { - this.emit("warn", e); - }); - this.once("closing", () => this.player.destroy()); - this.ssrcMap = new Map; - this._speaking = new Map; - this.sockets = {}; - this.receiver = new VoiceReceiver(this); - this.videoCodec = "H264"; - this.streamConnection = null; - this.streamWatchConnection = new Collection; - } - get client() { - return this.voiceManager.client; - } - get dispatcher() { - return this.player.dispatcher; - } - get videoDispatcher() { - return this.player.videoDispatcher; - } - setSpeaking(value) { - if (this.speaking.equals(value)) - return; - if (this.status !== VoiceStatus.CONNECTED) - return; - this.speaking = new Speaking(value).freeze(); - this.sockets.ws.sendPacket({ - op: VoiceOpcodes.SPEAKING, - d: { - speaking: this.speaking.bitfield, - delay: 0, - ssrc: this.authentication.ssrc - } - }).catch((e) => { - this.emit("debug", e); - }); - } - setVideoCodec(value) { - if (!SUPPORTED_CODECS.includes(value)) - throw new Error2("INVALID_VIDEO_CODEC", SUPPORTED_CODECS); - this.videoCodec = value; - return this; - } - setVideoStatus(value) { - if (value === this.videoStatus) - return; - if (this.status !== VoiceStatus.CONNECTED) - return; - this.videoStatus = value; - if (!value) { - this.sockets.ws.sendPacket({ - op: VoiceOpcodes.SOURCES, - d: { - audio_ssrc: this.authentication.ssrc, - video_ssrc: 0, - rtx_ssrc: 0, - streams: [] - } - }).catch((e) => { - this.emit("debug", e); - }); - } else { - this.sockets.ws.sendPacket({ - op: VoiceOpcodes.SOURCES, - d: { - audio_ssrc: this.authentication.ssrc, - video_ssrc: this.authentication.ssrc + 1, - rtx_ssrc: this.authentication.ssrc + 2, - streams: [ - { - type: "video", - rid: "100", - ssrc: this.authentication.ssrc + 1, - active: true, - quality: 100, - rtx_ssrc: this.authentication.ssrc + 2, - max_bitrate: 8000000, - max_framerate: 60, - max_resolution: { - type: "source", - width: 0, - height: 0 - } - } - ] - } - }).catch((e) => { - this.emit("debug", e); - }); - } - } - get voice() { - return this.client.user.voice; - } - sendVoiceStateUpdate(options = {}) { - options = Util.mergeDefault({ - guild_id: this.channel.guild?.id || null, - channel_id: this.channel.id, - self_mute: this.voice ? this.voice.selfMute : false, - self_deaf: this.voice ? this.voice.selfDeaf : false, - self_video: this.voice ? this.voice.selfVideo : false, - flags: 2 - }, options); - this.emit("debug", `Sending voice state update: ${JSON.stringify(options)}`); - return this.channel.client.ws.broadcast({ - op: Opcodes.VOICE_STATE_UPDATE, - d: options - }); - } - setTokenAndEndpoint(token, endpoint) { - this.emit("debug", `Token "${token}" and endpoint "${endpoint}"`); - if (!endpoint) { - return; - } - if (!token) { - this.authenticateFailed("VOICE_TOKEN_ABSENT"); - return; - } - endpoint = endpoint.match(/([^:]*)/)[0]; - this.emit("debug", `Endpoint resolved as ${endpoint}`); - if (!endpoint) { - this.authenticateFailed("VOICE_INVALID_ENDPOINT"); - return; - } - if (this.status === VoiceStatus.AUTHENTICATING) { - this.authentication.token = token; - this.authentication.endpoint = endpoint; - this.checkAuthenticated(); - } else if (token !== this.authentication.token || endpoint !== this.authentication.endpoint) { - this.reconnect(token, endpoint); - } - } - setSessionId(sessionId) { - this.emit("debug", `Setting sessionId ${sessionId} (stored as "${this.authentication.sessionId}")`); - if (!sessionId) { - this.authenticateFailed("VOICE_SESSION_ABSENT"); - return; - } - if (this.status === VoiceStatus.AUTHENTICATING) { - this.authentication.sessionId = sessionId; - this.checkAuthenticated(); - } else if (sessionId !== this.authentication.sessionId) { - this.authentication.sessionId = sessionId; - this.emit("newSession", sessionId); - } - } - checkAuthenticated() { - const { token, endpoint, sessionId } = this.authentication; - this.emit("debug", `Authenticated with sessionId ${sessionId}`); - if (token && endpoint && sessionId) { - this.status = VoiceStatus.CONNECTING; - this.emit("authenticated"); - this.connect(); - } - } - authenticateFailed(reason) { - clearTimeout(this.connectTimeout); - this.emit("debug", `Authenticate failed - ${reason}`); - if (this.status === VoiceStatus.AUTHENTICATING) { - this.emit("failed", new Error2(reason)); - } else { - this.emit("error", new Error2(reason)); - } - this.status = VoiceStatus.DISCONNECTED; - } - updateChannel(channel) { - this.channel = channel; - this.sendVoiceStateUpdate(); - } - authenticate(options = {}) { - this.sendVoiceStateUpdate(options); - this.connectTimeout = setTimeout2(() => this.authenticateFailed("VOICE_CONNECTION_TIMEOUT"), 15000).unref(); - } - reconnect(token, endpoint) { - this.authentication.token = token; - this.authentication.endpoint = endpoint; - this.speaking = new Speaking().freeze(); - this.status = VoiceStatus.RECONNECTING; - this.emit("debug", `Reconnecting to ${endpoint}`); - this.emit("reconnecting"); - this.connect(); - } - disconnect() { - this.emit("closing"); - this.emit("debug", "disconnect() triggered"); - clearTimeout(this.connectTimeout); - const conn = this.voiceManager.connection; - if (conn === this) - this.voiceManager.connection = null; - this.sendVoiceStateUpdate({ - channel_id: null - }); - this._disconnect(); - } - _disconnect() { - this.cleanup(); - this.status = VoiceStatus.DISCONNECTED; - this.emit("disconnect"); - } - cleanup() { - this.player.destroy(); - this.speaking = new Speaking().freeze(); - const { ws, udp } = this.sockets; - this.emit("debug", "Connection clean up"); - if (ws) { - ws.removeAllListeners("error"); - ws.removeAllListeners("ready"); - ws.removeAllListeners("sessionDescription"); - ws.removeAllListeners("speaking"); - ws.shutdown(); - } - if (udp) - udp.removeAllListeners("error"); - this.sockets.ws = null; - this.sockets.udp = null; - } - connect() { - this.emit("debug", `Connect triggered`); - if (this.status !== VoiceStatus.RECONNECTING) { - if (this.sockets.ws) - throw new Error2("WS_CONNECTION_EXISTS"); - if (this.sockets.udp) - throw new Error2("UDP_CONNECTION_EXISTS"); - } - if (this.sockets.ws) - this.sockets.ws.shutdown(); - if (this.sockets.udp) - this.sockets.udp.shutdown(); - this.sockets.ws = new VoiceWebSocket(this); - this.sockets.udp = new VoiceUDP(this); - const { ws, udp } = this.sockets; - ws.on("debug", (msg) => this.emit("debug", msg)); - udp.on("debug", (msg) => this.emit("debug", msg)); - ws.on("error", (err) => this.emit("error", err)); - udp.on("error", (err) => this.emit("error", err)); - ws.on("ready", this.onReady.bind(this)); - ws.on("sessionDescription", this.onSessionDescription.bind(this)); - ws.on("startSpeaking", this.onStartSpeaking.bind(this)); - ws.on("startStreaming", this.onStartStreaming.bind(this)); - this.sockets.ws.connect(); - } - onReady(data) { - Object.assign(this.authentication, data); - for (let mode of data.modes) { - if (SUPPORTED_MODES.includes(mode)) { - this.authentication.mode = mode; - this.emit("debug", `Selecting the ${mode} mode`); - break; - } - } - this.sockets.udp.createUDPSocket(data.ip); - } - onSessionDescription(data) { - Object.assign(this.authentication, data); - this.status = VoiceStatus.CONNECTED; - const ready = () => { - clearTimeout(this.connectTimeout); - this.emit("debug", `Ready with authentication details: ${JSON.stringify(this.authentication)}`); - this.emit("ready"); - }; - if (this.dispatcher || this.videoDispatcher) { - ready(); - } else { - const dispatcher = this.playAudio(new SingleSilence, { type: "opus", volume: false }); - dispatcher.once("finish", ready); - } - } - onStartSpeaking({ user_id, ssrc, speaking }) { - this.ssrcMap.set(+ssrc, { - ...this.ssrcMap.get(+ssrc) || {}, - userId: user_id, - speaking - }); - } - onStartStreaming({ video_ssrc, user_id, audio_ssrc }) { - this.ssrcMap.set(+audio_ssrc, { - ...this.ssrcMap.get(+audio_ssrc) || {}, - userId: user_id, - hasVideo: Boolean(video_ssrc) - }); - } - onSpeaking({ user_id, speaking }) { - speaking = new Speaking(speaking).freeze(); - const guild = this.channel.guild; - const user = this.client.users.cache.get(user_id); - const old = this._speaking.get(user_id) || new Speaking(0).freeze(); - this._speaking.set(user_id, speaking); - if (this.status === VoiceStatus.CONNECTED) { - this.emit("speaking", user, speaking); - if (!speaking.has(Speaking.FLAGS.SPEAKING)) { - this.receiver.packets._stoppedSpeaking(user_id); - } - } - if (guild && user && !speaking.equals(old)) { - const member = guild.members.cache.get(user); - if (member) { - this.client.emit(Events.GUILD_MEMBER_SPEAKING, member, speaking); - } - } - } - playAudio() { - } - playVideo() { - } - createStreamConnection() { - return new Promise((resolve, reject) => { - if (this.streamConnection) { - return resolve(this.streamConnection); - } else { - const connection = this.streamConnection = new StreamConnection(this.voiceManager, this.channel, this); - connection.setVideoCodec(this.videoCodec); - if (!this.eventHook) { - this.eventHook = true; - this.channel.client.on("raw", (packet) => { - if (typeof packet !== "object" || !packet.t || !packet.d || !packet.d?.stream_key) { - return; - } - const { t: event, d: data } = packet; - const StreamKey = parseStreamKey(data.stream_key); - if (StreamKey.userId === this.channel.client.user.id && this.channel.id == StreamKey.channelId && this.streamConnection) { - switch (event) { - case "STREAM_CREATE": { - this.streamConnection.setSessionId(this.authentication.sessionId); - this.streamConnection.serverId = data.rtc_server_id; - break; - } - case "STREAM_SERVER_UPDATE": { - this.streamConnection.setTokenAndEndpoint(data.token, data.endpoint); - break; - } - case "STREAM_DELETE": { - this.streamConnection.disconnect(); - break; - } - case "STREAM_UPDATE": { - this.streamConnection.update(data); - break; - } - } - } - if (this.streamWatchConnection.has(StreamKey.userId) && this.channel.id == StreamKey.channelId) { - const streamConnection = this.streamWatchConnection.get(StreamKey.userId); - switch (event) { - case "STREAM_CREATE": { - streamConnection.setSessionId(this.authentication.sessionId); - streamConnection.serverId = data.rtc_server_id; - break; - } - case "STREAM_SERVER_UPDATE": { - streamConnection.setTokenAndEndpoint(data.token, data.endpoint); - break; - } - case "STREAM_DELETE": { - streamConnection.disconnect(); - streamConnection.receiver.packets.destroyAllStream(); - break; - } - case "STREAM_UPDATE": { - streamConnection.update(data); - break; - } - } - } - }); - } - connection.sendSignalScreenshare(); - connection.sendScreenshareState(true); - connection.on("debug", (msg) => this.channel.client.emit("debug", `[VOICE STREAM (${this.channel.guild?.id || this.channel.id}:${connection.status})]: ${msg}`)); - connection.once("failed", (reason) => { - this.streamConnection = null; - reject(reason); - }); - connection.on("error", reject); - connection.once("authenticated", () => { - connection.once("ready", () => { - resolve(connection); - connection.removeListener("error", reject); - }); - connection.once("disconnect", () => { - this.streamConnection = null; - }); - }); - } - }); - } - async joinStreamConnection(user) { - const userId = this.client.users.resolveId(user); - if (!userId) { - throw new Error2("VOICE_USER_MISSING"); - } - const voiceState = this.channel.guild?.voiceStates.cache.get(userId) || this.client.voiceStates.cache.get(userId); - if (!voiceState || !voiceState.streaming) { - throw new Error2("VOICE_USER_NOT_STREAMING"); - } - return new Promise((resolve, reject) => { - if (this.streamWatchConnection.has(userId)) { - return resolve(this.streamWatchConnection.get(userId)); - } else { - const connection = new StreamConnectionReadonly(this.voiceManager, this.channel, this, userId); - this.streamWatchConnection.set(userId, connection); - connection.setVideoCodec(this.videoCodec); - if (!this.eventHook) { - this.eventHook = true; - this.channel.client.on("raw", (packet) => { - if (typeof packet !== "object" || !packet.t || !packet.d || !packet.d?.stream_key) { - return; - } - const { t: event, d: data } = packet; - const StreamKey = parseStreamKey(data.stream_key); - if (StreamKey.userId === this.channel.client.user.id && this.channel.id == StreamKey.channelId && this.streamConnection) { - switch (event) { - case "STREAM_CREATE": { - this.streamConnection.setSessionId(this.authentication.sessionId); - this.streamConnection.serverId = data.rtc_server_id; - break; - } - case "STREAM_SERVER_UPDATE": { - this.streamConnection.setTokenAndEndpoint(data.token, data.endpoint); - break; - } - case "STREAM_DELETE": { - this.streamConnection.disconnect(); - break; - } - case "STREAM_UPDATE": { - this.streamConnection.update(data); - break; - } - } - } - if (this.streamWatchConnection.has(StreamKey.userId) && this.channel.id == StreamKey.channelId) { - const streamConnection = this.streamWatchConnection.get(StreamKey.userId); - switch (event) { - case "STREAM_CREATE": { - streamConnection.setSessionId(this.authentication.sessionId); - streamConnection.serverId = data.rtc_server_id; - break; - } - case "STREAM_SERVER_UPDATE": { - streamConnection.setTokenAndEndpoint(data.token, data.endpoint); - break; - } - case "STREAM_DELETE": { - streamConnection.disconnect(); - streamConnection.receiver.packets.destroyAllStream(); - break; - } - case "STREAM_UPDATE": { - streamConnection.update(data); - break; - } - } - } - }); - } - connection.sendSignalScreenshare(); - connection.on("debug", (msg) => this.channel.client.emit("debug", `[VOICE STREAM WATCH (${userId}>${this.channel.guild?.id || this.channel.id}:${connection.status})]: ${msg}`)); - connection.once("failed", (reason) => { - this.streamWatchConnection.delete(userId); - reject(reason); - }); - connection.on("error", reject); - connection.once("authenticated", () => { - connection.once("ready", () => { - resolve(connection); - connection.removeListener("error", reject); - }); - connection.once("disconnect", () => { - this.streamWatchConnection.delete(userId); - }); - }); - } - }); - } - } - - class StreamConnection extends VoiceConnection { - #requestDisconnect = false; - constructor(voiceManager, channel, voiceConnection) { - super(voiceManager, channel); - this.voiceConnection = voiceConnection; - Object.defineProperty(this, "voiceConnection", { - value: voiceConnection, - writable: false - }); - this.serverId = null; - this.isPaused = null; - this.viewerIds = []; - this.region = null; - } - createStreamConnection() { - return Promise.resolve(this); - } - joinStreamConnection() { - throw new Error2("STREAM_CANNOT_JOIN"); - } - get streamConnection() { - return this; - } - set streamConnection(value) { - } - get streamWatchConnection() { - return new Collection; - } - set streamWatchConnection(value) { - } - disconnect() { - if (this.#requestDisconnect) - return; - this.emit("closing"); - this.emit("debug", "Stream: disconnect() triggered"); - clearTimeout(this.connectTimeout); - if (this.voiceConnection.streamConnection === this) - this.voiceConnection.streamConnection = null; - this.sendStopScreenshare(); - this._disconnect(); - } - sendSignalScreenshare() { - const data = { - type: ["DM", "GROUP_DM"].includes(this.channel.type) ? "call" : "guild", - guild_id: this.channel.guild?.id || null, - channel_id: this.channel.id, - preferred_region: null - }; - this.emit("debug", `Signal Stream: ${JSON.stringify(data)}`); - return this.channel.client.ws.broadcast({ - op: Opcodes.STREAM_CREATE, - d: data - }); - } - sendScreenshareState(isPaused = false) { - if (isPaused == this.isPaused) - return; - this.emit("streamUpdate", { - isPaused: this.isPaused, - region: this.region, - viewerIds: this.viewerIds - }, { - isPaused, - region: this.region, - viewerIds: this.viewerIds - }); - this.isPaused = isPaused; - this.channel.client.ws.broadcast({ - op: Opcodes.STREAM_SET_PAUSED, - d: { - stream_key: this.streamKey, - paused: isPaused - } - }); - } - sendStopScreenshare() { - this.#requestDisconnect = true; - this.channel.client.ws.broadcast({ - op: Opcodes.STREAM_DELETE, - d: { - stream_key: this.streamKey - } - }); - } - update(data) { - this.emit("streamUpdate", { - isPaused: this.isPaused, - region: this.region, - viewerIds: this.viewerIds.slice() - }, { - isPaused: data.paused, - region: data.region, - viewerIds: data.viewer_ids - }); - this.viewerIds = data.viewer_ids; - this.region = data.region; - } - get streamKey() { - return `${["DM", "GROUP_DM"].includes(this.channel.type) ? "call" : `guild:${this.channel.guild.id}`}:${this.channel.id}:${this.channel.client.user.id}`; - } - } - - class StreamConnectionReadonly extends VoiceConnection { - #requestDisconnect = false; - constructor(voiceManager, channel, voiceConnection, userId) { - super(voiceManager, channel); - this.voiceConnection = voiceConnection; - this.userId = userId; - Object.defineProperty(this, "voiceConnection", { - value: voiceConnection, - writable: false - }); - this.serverId = null; - this.isPaused = false; - this.viewerIds = []; - this.region = null; - } - createStreamConnection() { - throw new Error2("STREAM_CONNECTION_READONLY"); - } - joinStreamConnection() { - return Promise.resolve(this); - } - get streamConnection() { - return null; - } - set streamConnection(value) { - } - get streamWatchConnection() { - return new Collection; - } - set streamWatchConnection(value) { - } - disconnect() { - if (this.#requestDisconnect) - return; - this.emit("closing"); - this.emit("debug", "Stream: disconnect() triggered"); - clearTimeout(this.connectTimeout); - this.voiceConnection.streamWatchConnection.delete(this.userId); - this.sendStopScreenshare(); - this._disconnect(); - } - sendSignalScreenshare() { - this.emit("debug", `Signal Stream Watch: ${this.streamKey}`); - return this.channel.client.ws.broadcast({ - op: Opcodes.STREAM_WATCH, - d: { - stream_key: this.streamKey - } - }); - } - sendStopScreenshare() { - this.#requestDisconnect = true; - this.channel.client.ws.broadcast({ - op: Opcodes.STREAM_DELETE, - d: { - stream_key: this.streamKey - } - }); - } - update(data) { - this.emit("streamUpdate", { - isPaused: this.isPaused, - region: this.region, - viewerIds: this.viewerIds.slice() - }, { - isPaused: data.paused, - region: data.region, - viewerIds: data.viewer_ids - }); - this.isPaused = data.paused; - this.viewerIds = data.viewer_ids; - this.region = data.region; - } - get streamKey() { - return `${["DM", "GROUP_DM"].includes(this.channel.type) ? "call" : `guild:${this.channel.guild.id}`}:${this.channel.id}:${this.userId}`; - } - } - PlayInterface.applyToClass(VoiceConnection); - PlayInterface.applyToClass(StreamConnection); - module.exports = VoiceConnection; -}); - -// node_modules/discord.js-selfbot-v13/src/client/voice/ClientVoiceManager.js -var require_ClientVoiceManager = __commonJS((exports, module) => { - var VoiceConnection = require_VoiceConnection(); - var { Error: Error2 } = require_errors(); - var { Events } = require_Constants(); - - class ClientVoiceManager { - constructor(client) { - Object.defineProperty(this, "client", { value: client }); - this.connection = null; - this.adapters = new Map; - client.on(Events.SHARD_DISCONNECT, (_, shardId) => { - for (const [guildId, adapter] of this.adapters.entries()) { - if (client.guilds.cache.get(guildId)?.shardId === shardId) { - } - adapter.destroy(); - } - }); - } - onVoiceServer(payload) { - const { guild_id, channel_id, token, endpoint } = payload; - this.client.emit("debug", `[VOICE] voiceServer ${channel_id ? "channel" : "guild"}: ${channel_id || guild_id} token: ${token} endpoint: ${endpoint}`); - const connection = this.connection; - if (connection) - connection.setTokenAndEndpoint(token, endpoint); - if (payload.guild_id) { - this.adapters.get(payload.guild_id)?.onVoiceServerUpdate(payload); - } else { - this.adapters.get(payload.channel_id)?.onVoiceServerUpdate(payload); - } - } - onVoiceStateUpdate(payload) { - const { guild_id, session_id, channel_id } = payload; - if (payload.guild_id && payload.session_id && payload.user_id === this.client.user?.id) { - this.adapters.get(payload.guild_id)?.onVoiceStateUpdate(payload); - } else if (payload.channel_id && payload.session_id && payload.user_id === this.client.user?.id) { - this.adapters.get(payload.channel_id)?.onVoiceStateUpdate(payload); - } - const connection = this.connection; - this.client.emit("debug", `[VOICE] connection? ${!!connection}, ${guild_id} ${session_id} ${channel_id}`); - if (!connection) - return; - if (!channel_id) { - connection._disconnect(); - this.connection = null; - return; - } - const channel = this.client.channels.cache.get(channel_id); - if (channel) { - connection.channel = channel; - connection.setSessionId(session_id); - } else { - this.client.emit("debug", `[VOICE] disconnecting from guild ${guild_id} as channel ${channel_id} is uncached`); - connection.disconnect(); - } - } - joinChannel(channel, config = {}) { - return new Promise((resolve, reject) => { - channel = this.client.channels.resolve(channel); - if (!["DM", "GROUP_DM"].includes(channel?.type) && !channel.joinable) { - throw new Error2("VOICE_JOIN_CHANNEL", channel.full); - } - let connection = this.connection; - if (connection) { - if (connection.channel.id !== channel.id) { - this.connection.updateChannel(channel); - } - resolve(connection); - return; - } else { - connection = new VoiceConnection(this, channel); - if (config?.videoCodec) - connection.setVideoCodec(config.videoCodec); - connection.on("debug", (msg) => this.client.emit("debug", `[VOICE (${channel.guild?.id || channel.id}:${connection.status})]: ${msg}`)); - connection.authenticate({ - self_mute: Boolean(config.selfMute), - self_deaf: Boolean(config.selfDeaf), - self_video: Boolean(config.selfVideo) - }); - this.connection = connection; - } - connection.once("failed", (reason) => { - this.connection = null; - reject(reason); - }); - connection.on("error", reject); - connection.once("authenticated", () => { - connection.once("ready", () => { - resolve(connection); - connection.removeListener("error", reject); - }); - connection.once("disconnect", () => { - this.connection = null; - }); - }); - }); - } - } - module.exports = ClientVoiceManager; -}); - -// node_modules/discord-api-types/gateway/v10.js -var require_v10 = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = undefined; - exports.GatewayVersion = "10"; - var GatewayOpcodes; - (function(GatewayOpcodes2) { - GatewayOpcodes2[GatewayOpcodes2["Dispatch"] = 0] = "Dispatch"; - GatewayOpcodes2[GatewayOpcodes2["Heartbeat"] = 1] = "Heartbeat"; - GatewayOpcodes2[GatewayOpcodes2["Identify"] = 2] = "Identify"; - GatewayOpcodes2[GatewayOpcodes2["PresenceUpdate"] = 3] = "PresenceUpdate"; - GatewayOpcodes2[GatewayOpcodes2["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; - GatewayOpcodes2[GatewayOpcodes2["Resume"] = 6] = "Resume"; - GatewayOpcodes2[GatewayOpcodes2["Reconnect"] = 7] = "Reconnect"; - GatewayOpcodes2[GatewayOpcodes2["RequestGuildMembers"] = 8] = "RequestGuildMembers"; - GatewayOpcodes2[GatewayOpcodes2["InvalidSession"] = 9] = "InvalidSession"; - GatewayOpcodes2[GatewayOpcodes2["Hello"] = 10] = "Hello"; - GatewayOpcodes2[GatewayOpcodes2["HeartbeatAck"] = 11] = "HeartbeatAck"; - GatewayOpcodes2[GatewayOpcodes2["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds"; - })(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); - var GatewayCloseCodes; - (function(GatewayCloseCodes2) { - GatewayCloseCodes2[GatewayCloseCodes2["UnknownError"] = 4000] = "UnknownError"; - GatewayCloseCodes2[GatewayCloseCodes2["UnknownOpcode"] = 4001] = "UnknownOpcode"; - GatewayCloseCodes2[GatewayCloseCodes2["DecodeError"] = 4002] = "DecodeError"; - GatewayCloseCodes2[GatewayCloseCodes2["NotAuthenticated"] = 4003] = "NotAuthenticated"; - GatewayCloseCodes2[GatewayCloseCodes2["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; - GatewayCloseCodes2[GatewayCloseCodes2["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; - GatewayCloseCodes2[GatewayCloseCodes2["InvalidSeq"] = 4007] = "InvalidSeq"; - GatewayCloseCodes2[GatewayCloseCodes2["RateLimited"] = 4008] = "RateLimited"; - GatewayCloseCodes2[GatewayCloseCodes2["SessionTimedOut"] = 4009] = "SessionTimedOut"; - GatewayCloseCodes2[GatewayCloseCodes2["InvalidShard"] = 4010] = "InvalidShard"; - GatewayCloseCodes2[GatewayCloseCodes2["ShardingRequired"] = 4011] = "ShardingRequired"; - GatewayCloseCodes2[GatewayCloseCodes2["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; - GatewayCloseCodes2[GatewayCloseCodes2["InvalidIntents"] = 4013] = "InvalidIntents"; - GatewayCloseCodes2[GatewayCloseCodes2["DisallowedIntents"] = 4014] = "DisallowedIntents"; - })(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); - var GatewayIntentBits; - (function(GatewayIntentBits2) { - GatewayIntentBits2[GatewayIntentBits2["Guilds"] = 1] = "Guilds"; - GatewayIntentBits2[GatewayIntentBits2["GuildMembers"] = 2] = "GuildMembers"; - GatewayIntentBits2[GatewayIntentBits2["GuildModeration"] = 4] = "GuildModeration"; - GatewayIntentBits2[GatewayIntentBits2["GuildBans"] = 4] = "GuildBans"; - GatewayIntentBits2[GatewayIntentBits2["GuildExpressions"] = 8] = "GuildExpressions"; - GatewayIntentBits2[GatewayIntentBits2["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; - GatewayIntentBits2[GatewayIntentBits2["GuildIntegrations"] = 16] = "GuildIntegrations"; - GatewayIntentBits2[GatewayIntentBits2["GuildWebhooks"] = 32] = "GuildWebhooks"; - GatewayIntentBits2[GatewayIntentBits2["GuildInvites"] = 64] = "GuildInvites"; - GatewayIntentBits2[GatewayIntentBits2["GuildVoiceStates"] = 128] = "GuildVoiceStates"; - GatewayIntentBits2[GatewayIntentBits2["GuildPresences"] = 256] = "GuildPresences"; - GatewayIntentBits2[GatewayIntentBits2["GuildMessages"] = 512] = "GuildMessages"; - GatewayIntentBits2[GatewayIntentBits2["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; - GatewayIntentBits2[GatewayIntentBits2["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; - GatewayIntentBits2[GatewayIntentBits2["DirectMessages"] = 4096] = "DirectMessages"; - GatewayIntentBits2[GatewayIntentBits2["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; - GatewayIntentBits2[GatewayIntentBits2["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; - GatewayIntentBits2[GatewayIntentBits2["MessageContent"] = 32768] = "MessageContent"; - GatewayIntentBits2[GatewayIntentBits2["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents"; - GatewayIntentBits2[GatewayIntentBits2["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration"; - GatewayIntentBits2[GatewayIntentBits2["AutoModerationExecution"] = 2097152] = "AutoModerationExecution"; - GatewayIntentBits2[GatewayIntentBits2["GuildMessagePolls"] = 16777216] = "GuildMessagePolls"; - GatewayIntentBits2[GatewayIntentBits2["DirectMessagePolls"] = 33554432] = "DirectMessagePolls"; - })(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); - var GatewayDispatchEvents; - (function(GatewayDispatchEvents2) { - GatewayDispatchEvents2["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"; - GatewayDispatchEvents2["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION"; - GatewayDispatchEvents2["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE"; - GatewayDispatchEvents2["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE"; - GatewayDispatchEvents2["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE"; - GatewayDispatchEvents2["ChannelCreate"] = "CHANNEL_CREATE"; - GatewayDispatchEvents2["ChannelDelete"] = "CHANNEL_DELETE"; - GatewayDispatchEvents2["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; - GatewayDispatchEvents2["ChannelUpdate"] = "CHANNEL_UPDATE"; - GatewayDispatchEvents2["EntitlementCreate"] = "ENTITLEMENT_CREATE"; - GatewayDispatchEvents2["EntitlementDelete"] = "ENTITLEMENT_DELETE"; - GatewayDispatchEvents2["EntitlementUpdate"] = "ENTITLEMENT_UPDATE"; - GatewayDispatchEvents2["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE"; - GatewayDispatchEvents2["GuildBanAdd"] = "GUILD_BAN_ADD"; - GatewayDispatchEvents2["GuildBanRemove"] = "GUILD_BAN_REMOVE"; - GatewayDispatchEvents2["GuildCreate"] = "GUILD_CREATE"; - GatewayDispatchEvents2["GuildDelete"] = "GUILD_DELETE"; - GatewayDispatchEvents2["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; - GatewayDispatchEvents2["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; - GatewayDispatchEvents2["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; - GatewayDispatchEvents2["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; - GatewayDispatchEvents2["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; - GatewayDispatchEvents2["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; - GatewayDispatchEvents2["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; - GatewayDispatchEvents2["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; - GatewayDispatchEvents2["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; - GatewayDispatchEvents2["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE"; - GatewayDispatchEvents2["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE"; - GatewayDispatchEvents2["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE"; - GatewayDispatchEvents2["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD"; - GatewayDispatchEvents2["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE"; - GatewayDispatchEvents2["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE"; - GatewayDispatchEvents2["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE"; - GatewayDispatchEvents2["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE"; - GatewayDispatchEvents2["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE"; - GatewayDispatchEvents2["SoundboardSounds"] = "SOUNDBOARD_SOUNDS"; - GatewayDispatchEvents2["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; - GatewayDispatchEvents2["GuildUpdate"] = "GUILD_UPDATE"; - GatewayDispatchEvents2["IntegrationCreate"] = "INTEGRATION_CREATE"; - GatewayDispatchEvents2["IntegrationDelete"] = "INTEGRATION_DELETE"; - GatewayDispatchEvents2["IntegrationUpdate"] = "INTEGRATION_UPDATE"; - GatewayDispatchEvents2["InteractionCreate"] = "INTERACTION_CREATE"; - GatewayDispatchEvents2["InviteCreate"] = "INVITE_CREATE"; - GatewayDispatchEvents2["InviteDelete"] = "INVITE_DELETE"; - GatewayDispatchEvents2["MessageCreate"] = "MESSAGE_CREATE"; - GatewayDispatchEvents2["MessageDelete"] = "MESSAGE_DELETE"; - GatewayDispatchEvents2["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; - GatewayDispatchEvents2["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD"; - GatewayDispatchEvents2["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE"; - GatewayDispatchEvents2["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; - GatewayDispatchEvents2["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; - GatewayDispatchEvents2["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; - GatewayDispatchEvents2["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; - GatewayDispatchEvents2["MessageUpdate"] = "MESSAGE_UPDATE"; - GatewayDispatchEvents2["PresenceUpdate"] = "PRESENCE_UPDATE"; - GatewayDispatchEvents2["RateLimited"] = "RATE_LIMITED"; - GatewayDispatchEvents2["Ready"] = "READY"; - GatewayDispatchEvents2["Resumed"] = "RESUMED"; - GatewayDispatchEvents2["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; - GatewayDispatchEvents2["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; - GatewayDispatchEvents2["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; - GatewayDispatchEvents2["SubscriptionCreate"] = "SUBSCRIPTION_CREATE"; - GatewayDispatchEvents2["SubscriptionDelete"] = "SUBSCRIPTION_DELETE"; - GatewayDispatchEvents2["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE"; - GatewayDispatchEvents2["ThreadCreate"] = "THREAD_CREATE"; - GatewayDispatchEvents2["ThreadDelete"] = "THREAD_DELETE"; - GatewayDispatchEvents2["ThreadListSync"] = "THREAD_LIST_SYNC"; - GatewayDispatchEvents2["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE"; - GatewayDispatchEvents2["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE"; - GatewayDispatchEvents2["ThreadUpdate"] = "THREAD_UPDATE"; - GatewayDispatchEvents2["TypingStart"] = "TYPING_START"; - GatewayDispatchEvents2["UserUpdate"] = "USER_UPDATE"; - GatewayDispatchEvents2["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND"; - GatewayDispatchEvents2["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; - GatewayDispatchEvents2["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; - GatewayDispatchEvents2["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; - })(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {})); - var VoiceChannelEffectSendAnimationType; - (function(VoiceChannelEffectSendAnimationType2) { - VoiceChannelEffectSendAnimationType2[VoiceChannelEffectSendAnimationType2["Premium"] = 0] = "Premium"; - VoiceChannelEffectSendAnimationType2[VoiceChannelEffectSendAnimationType2["Basic"] = 1] = "Basic"; - })(VoiceChannelEffectSendAnimationType || (exports.VoiceChannelEffectSendAnimationType = VoiceChannelEffectSendAnimationType = {})); -}); - -// node_modules/discord-api-types/globals.js -var require_globals = __commonJS((exports) => { - Object.defineProperty(exports, "__esModule", { value: true }); - exports.FormattingPatterns = undefined; - var timestampStyles = "DFRSTdfst"; - var timestampLength = 13; - exports.FormattingPatterns = { - User: /<@(?\d{17,20})>/, - UserWithNickname: /<@!(?\d{17,20})>/, - UserWithOptionalNickname: /<@!?(?\d{17,20})>/, - Channel: /<#(?\d{17,20})>/, - Role: /<@&(?\d{17,20})>/, - SlashCommand: /<\/(?(?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?\d{17,20})>/u, - Emoji: /<(?a)?:(?\w{2,32}):(?\d{17,20})>/, - AnimatedEmoji: /<(?a):(?\w{2,32}):(?\d{17,20})>/, - StaticEmoji: /<:(?\w{2,32}):(?\d{17,20})>/, - Timestamp: new RegExp(`-?\\d{1,${timestampLength}})(:(?