Initial commit

This commit is contained in:
mats committed 2026-09-22 08:41:20 +02:00
commit 89053153cc
8152 files changed
+2086461

No files matched your search

+1170
View File
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../tldts-core/src/domain.ts","../../../tldts-core/src/domain-without-suffix.ts","../../../tldts-core/src/extract-hostname.ts","../../../tldts-core/src/is-ip.ts","../../../tldts-core/src/is-special-use.ts","../../../tldts-core/src/is-valid.ts","../../../tldts-core/src/options.ts","../../../tldts-core/src/subdomain.ts","../../../tldts-core/src/factory.ts","../../../tldts-core/src/lookup/fast-path.ts","../../src/data/trie.ts","../../src/suffix-trie.ts","../../index.ts"],"sourcesContent":["import { IOptions } from './options';\n\n/**\n * Check if `vhost` is a valid suffix of `hostname` (top-domain)\n *\n * It means that `vhost` needs to be a suffix of `hostname` and we then need to\n * make sure that: either they are equal, or the character preceding `vhost` in\n * `hostname` is a '.' (it should not be a partial label).\n *\n * * hostname = 'not.evil.com' and vhost = 'vil.com' => not ok\n * * hostname = 'not.evil.com' and vhost = 'evil.com' => ok\n * * hostname = 'not.evil.com' and vhost = 'not.evil.com' => ok\n */\nfunction shareSameDomainSuffix(hostname: string, vhost: string): boolean {\n if (hostname.endsWith(vhost)) {\n return (\n hostname.length === vhost.length ||\n hostname[hostname.length - vhost.length - 1] === '.'\n );\n }\n\n return false;\n}\n\n/**\n * Given a hostname and its public suffix, extract the general domain.\n */\nfunction extractDomainWithSuffix(\n hostname: string,\n publicSuffix: string,\n): string {\n // Locate the index of the last '.' in the part of the `hostname` preceding\n // the public suffix.\n //\n // examples:\n // 1. not.evil.co.uk => evil.co.uk\n // ^ ^\n // | | start of public suffix\n // | index of the last dot\n //\n // 2. example.co.uk => example.co.uk\n // ^ ^\n // | | start of public suffix\n // |\n // | (-1) no dot found before the public suffix\n const publicSuffixIndex = hostname.length - publicSuffix.length - 2;\n const lastDotBeforeSuffixIndex = hostname.lastIndexOf('.', publicSuffixIndex);\n\n // No '.' found, then `hostname` is the general domain (no sub-domain)\n if (lastDotBeforeSuffixIndex === -1) {\n return hostname;\n }\n\n // Extract the part between the last '.'\n return hostname.slice(lastDotBeforeSuffixIndex + 1);\n}\n\n/**\n * Detects the domain based on rules and upon and a host string\n */\nexport default function getDomain(\n suffix: string,\n hostname: string,\n options: IOptions,\n): string | null {\n // Check if `hostname` ends with a member of `validHosts`.\n if (options.validHosts !== null) {\n const validHosts = options.validHosts;\n for (const vhost of validHosts) {\n if (/*@__INLINE__*/ shareSameDomainSuffix(hostname, vhost)) {\n return vhost;\n }\n }\n }\n\n let numberOfLeadingDots = 0;\n if (hostname.startsWith('.')) {\n while (\n numberOfLeadingDots < hostname.length &&\n hostname[numberOfLeadingDots] === '.'\n ) {\n numberOfLeadingDots += 1;\n }\n }\n\n // If `hostname` is a valid public suffix, then there is no domain to return.\n // Since we already know that `getPublicSuffix` returns a suffix of `hostname`\n // there is no need to perform a string comparison and we only compare the\n // size.\n if (suffix.length === hostname.length - numberOfLeadingDots) {\n return null;\n }\n\n // To extract the general domain, we start by identifying the public suffix\n // (if any), then consider the domain to be the public suffix with one added\n // level of depth. (e.g.: if hostname is `not.evil.co.uk` and public suffix:\n // `co.uk`, then we take one more level: `evil`, giving the final result:\n // `evil.co.uk`).\n return /*@__INLINE__*/ extractDomainWithSuffix(hostname, suffix);\n}\n","/**\n * Return the part of domain without suffix.\n *\n * Example: for domain 'foo.com', the result would be 'foo'.\n */\nexport default function getDomainWithoutSuffix(\n domain: string,\n suffix: string,\n): string {\n // Note: here `domain` and `suffix` cannot have the same length because in\n // this case we set `domain` to `null` instead. It is thus safe to assume\n // that `suffix` is shorter than `domain`.\n return domain.slice(0, -suffix.length - 1);\n}\n","/**\n * Matches an ASCII tab (U+0009) or newline (U+000A / U+000D). The WHATWG URL\n * parser strips these before parsing; we only allocate a cleaned copy (and\n * re-parse) on the rare input that actually contains one.\n */\nconst CONTROL_CHARS = /[\\t\\n\\r]/g;\n\n// Set by `extractHostname` (a module-scope flag, read synchronously by\n// `parseImpl` right after the call — same pattern as the reused RESULT object).\n// `true` ONLY when extraction validated the returned host inline (a confirmed-\n// valid, \"simple\" authority) so `parseImpl` can skip the separate\n// `isValidHostname` pass. `false` in every other case (validation disabled, a\n// compleLine truncated
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exceptionsRoot = exports.rulesRoot = exports.labelText = exports.edgeChild = exports.edgeLength = exports.edgeStart = exports.nodeFlags = void 0;
// Auto-generated flat public-suffix trie. Do not edit.
exports.nodeFlags = new Uint8Array([1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 0, 2, 2, 0, 2, 0, 0, 1, 0, 0, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 2, 0, 1, 1, 0, 2, 0, 2,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1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]);
exports.edgeStart = new Uint16Array([0, 0, 0, 10, 11, 18, 106, 111, 117, 124, 130, 136, 145, 146, 147, 148, 149, 150, 151, 153, 154, 155, 157, 159, 226, 239, 241, 242, 243, 258, 265, 266, 269, 270, 271, 274, 276, 295, 296, 298, 307, 312, 329, 330, 333, 335, 336, 338, 372, 373, 375, 378, 379, 383, 385, 389, 392, 424, 427, 440, 441, 449, 450, 452, 462, 476, 477, 478, 487, 488, 525, 530, 546, 566, 572, 614, 615, 642, 669, 670, 818, 824, 827, 828, 829, 834, 839, 848, 870, 871, 872, 873, 874, 875, 876, 894, 896, 897, 900, 902, 903, 905, 907, 922, 937, 942, 943, 945, 946, 947, 948, 949, 951, 954, 959, 960, 961, 963, 964, 967, 970, 971, 972, 985, 987, 999, 1010, 1018, 1020, 1061, 1064, 1068, 1069, 1071, 1074, 1085, 1087, 1097, 1099, 1105, 1107, 1108, 1110, 1113, 1114, 1115, 1168, 1170, 1172, 1192, 1193, 1194, 1195, 1197, 1208, 1239, 1250, 1262, 1271, 1278, 1283, 1296, 1307, 1320, 1321, 1332, 1366, 1367, 1368, 1383, 1398, 1470, 1471, 1473, 1474, 1508, 1509, 1510, 1511, 1514, 1518, 1520, 1549, 1550, 1558, 1559, 1560, 1562, 1564, 1565, 1567, 1568, 1569, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1595, 1596, 1597, 2051, 2054, 2055, 2057, 2064, 2071, 2081, 2085, 2096, 2097, 2098, 2110, 2111, 2113, 2115, 2116, 2123, 2124, 2126, 2127, 2129, 2130, 2131, 2132, 2133, 2207, 2209, 2230, 2231, 2232, 2234, 2260, 2261, 2312, 2313, 2315, 2322, 2328, 2338, 2348, 2401, 2402, 2403, 2413, 2427, 2428, 2431, 2438, 2439, 2447, 2448, 2449, 2450, 2451, 2462, 2463, 2464, 2466, 2467, 2468, 2477, 2489, 2495, 2527, 2531, 2533, 2534, 2536, 2537, 2548, 2549, 2551, 2559, 2566, 2572, 2577, 2578, 2584, 2587, 2593, 2600, 2601, 2608, 2616, 2617, 2618, 2656, 2662, 2677, 2678, 2683, 2701, 2732, 2750, 2752, 2755, 2763, 2765, 2772, 2824, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2861, 2862, 2863, 2864, 2865, 2866, 2868, 2869, 2873, 2953, 2966, 2967, 3404, 3408, 3422, 3474, 3502, 3524, 3582, 3604, 3619, 3682, 3733, 3771, 3807, 3832, 3974, 4020, 4071, 4090, 4124, 4139, 4159, 4189, 4220, 4243, 4274, 4304, 4336, 4363, 4438, 4460, 4498, 4508, 4542, 4561, 4587, 4629, 4679, 4705, 4774, 4775, 4777, 4800, 4823, 4859, 4890, 4907, 4964, 4977, 5001, 5030, 5032, 5066, 5082, 5110, 5415, 5424, 5433, 5440, 5457, 5461, 5467, 5506, 5508, 5515, 5522, 5531, 5538, 5539, 5540, 5552, 5555, 5570, 5571, 5580, 5581, 5590, 5599, 5605, 5607, 5608, 5609, 5646, 5647, 5649, 5657, 5664, 5677, 5681, 5683, 5684, 5690, 5697, 5711, 5721, 5726, 5734, 5742, 5748, 5749, 5753, 5755, 5756, 5768, 5840, 5841, 5842, 5843, 5845, 5846, 5849, 5851, 5854, 5858, 5859, 5860, 5866, 5867, 5868, 5870, 5872, 5874, 5875, 5876, 5879, 5881, 5884, 5885, 5887, 6085, 6092, 6093, 6094, 6104, 6109, 6126, 6140, 6149, 6150, 6151, 6155, 6156, 6158, 6160, 6166, 6167, 6170, 6171, 6173, 6174, 6175, 7075, 7078, 7082, 7100, 7109, 7112, 7119, 7120, 7122, 7123, 7124, 7126, 7178, 7179, 7182, 7183, 7300, 7301, 7312, 7323, 7330, 7333, 7342, 7343, 7344, 7359, 7414, 7605, 7607, 7608, 7610, 7615, 7628, 7643, 7650, 7659, 7662, 7665, 7672, 7680, 7684, 7685, 7686, 7700, 7704, 7713, 7714, 7715, 7719, 7754, 7755, 7772, 7779, 7787, 7788, 7793, 7801, 7845, 7846, 7852, 7855, 7866, 7871, 7872, 7875, 7877, 7912, 7913, 7919, 7926, 7927, 7936, 7945, 7960, 7964, 8016, 8017, 8022, 8024, 8027, 8029, 8030, 8031, 8040, 8054, 8062, 8076, 8088, 8089, 8091, 8093, 8115, 8126, 8132, 8133, 8145, 8157, 8244, 8256, 8264, 8267, 8273, 8298, 8301, 8302, 8303, 8305, 8308, 8311, 8322, 8324, 8326, 8354, 8428, 8435, 8439, 8440, 8449, 8471, 8472, 8477, 8478, 8557, 8559, 8561, 8570, 8574, 8580, 8586, 8592, 8602, 8607, 8608, 8626, 8637, 8642, 8647, 8657, 8663, 8667, 8673, 8679, 10288, 10289, 10290, 10297, 10299]);
exports.edgeLength = new Uint8Array([3, 3, 3, 3, 3, 3, 3, 3, 5, 8, 8, 2, 2, 3, 3, 3, 3, 3, 8, 5, 5, 5, 5, 5, 3, 3, 5, 5, 9, 12, 19, 8, 19, 8, 11, 9, 9, 8, 7, 7, 6, 8, 9, 16, 10, 7, 7, 11, 8, 6, 6, 9, 7, 11, 7, 14, 4, 4, 4, 4, 4, 4, 10, 7, 6, 6, 6, 6, 10, 10, 6, 10, 10, 22, 11, 9, 10, 10, 10, 9, 10, 8, 7, 7, 7, 8, 21, 13, 11, 11, 9, 10, 9, 13, 10, 8, 8, 9, 12, 9, 7, 10, 7, 7, 13, 7, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 6, 3, 3, 3, 3, 3, 3, 2, 5, 3, 3, 3, 7, 2, 2, 2, 2, 2, 2, 3, 3, 3, 1, 1, 7, 8, 5, 2, 2, 7, 2, 2, 1, 4, 1, 11, 9, 9, 5, 5, 8, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3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, 13, 10, 10, 14, 16, 17, 11, 6, 9, 10, 10, 12, 14, 14, 14, 12, 12, 12, 12, 14, 14, 10, 10, 10, 10, 14, 9, 9, 9, 10, 14, 14, 14, 9, 9, 9, 9, 9, 9, 2, 14, 9, 13, 10, 10, 14, 16, 17, 11, 6, 2, 14, 9, 17, 13, 10, 10, 14, 16, 17, 11, 6, 2, 14, 9, 13, 10, 14, 16, 17, 11, 2, 14, 9, 13, 10, 16, 11, 2, 14, 10, 19, 7, 2, 14, 9, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 14, 9, 13, 10, 19, 7, 14, 16, 17, 11, 2, 14, 9, 13, 17, 13, 10, 10, 14, 16, 17, 11, 6, 3, 2, 14, 9, 13, 10, 10, 14, 16, 17, 11, 6, 9, 10, 12, 14, 14, 14, 12, 12, 12, 12, 12, 14, 14, 14, 10, 10, 10, 14, 9, 9, 9, 9, 14, 14, 14, 13, 13, 14, 9, 9, 9, 9, 9, 9, 4, 11, 2, 14, 9, 13, 17, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 14, 9, 13, 17, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 9, 10, 10, 7, 17, 3, 3, 12, 12, 16, 15, 15, 12, 14, 14, 14, 20, 20, 13, 12, 12, 12, 12, 12, 12, 20, 25, 14, 14, 12, 12, 10, 10, 10, 10, 9, 9, 9, 25, 4, 9, 17, 10, 7, 14, 16, 21, 13, 13, 14, 20, 14, 13, 17, 24, 9, 12, 13, 25, 13, 21, 20, 17, 9, 9, 9, 9, 9, 9, 12, 17, 4, 4, 9, 9, 9, 10, 10, 12, 14, 14, 14, 12, 12, 12, 12, 12, 14, 14, 10, 10, 10, 10, 14, 9, 9, 9, 10, 14, 14, 14, 13, 13, 9, 9, 9, 9, 9, 9, 1, 5, 8, 7, 11, 11, 1, 3, Line truncated
exports.edgeChild = new Uint16Array([0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0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, 105, 1, 111, 1, 1, 1, 1, 1, 106, 114, 1, 12, 12, 12, 117, 115, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 12, 12, 1, 1, 1, 1, 1, 12, 133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 135, 1, 1, 1, 1, 1, 1, 1, 1, 136, 137, 12, 12, 134, 132, 44, 44, 139, 49, 49, 138, 141, 140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 1, 0, 143, 131, 1, 0, 1, 1, 12, 12, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 147, 146, 20, 1, 1, 12, 12, 1, 20, 12, 12, 1, 1, 1, 1, 1, 133, 1, 1, 151, 1, 1, 1, 1, 152, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 135, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 133, 1, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 133, 1, 1, 1, 1, 1, 1, 1, 1, 133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 159, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 1, 159, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 133, 1, 1, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 1, 133, 1, 1, 151, 1, 1, 1, 1, 163, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 166, 1, 1, 159, 1, 1, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 1, 159, 1, 1, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 153, 157, 157, 12, 1, 12, 165, 1, 1, 1, 1, 1, 157, 157, 157, 153, 1, 1, 1, 156, 157, 160, 164, 1, 1, 1, 1, 156, 156, 1, 1, 155, 153, 153, 156, 169, 155, 169, 1, 1, 167, 1, 155, 154, 156, 1, 1, 1, 1, 156, 1, 158, 1, 1, 1, 12, 1, 161, 1, 161, 1, 1, 1, 161, 160, 162, 168, 155, 153, 1, 1, 1, 1, 1, 1, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, Line truncated
exports.labelText = "orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageLine truncated
exports.rulesRoot = 620;
exports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,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,Line truncated
+170
View File
@@ -0,0 +1,170 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = suffixLookup;
// NOTE: kept (intentionally) near-identical to packages/tldts-icann/src/suffix-trie.ts.
// They are separate copies rather than a shared helper because the lookup is
// only fast when the typed arrays are module-scope monomorphic globals —
// closing over them (a shared factory) measured ~20% slower. The ICANN build
// also specializes (constant mask, no isIcann/isPrivate). Keep the two in sync.
const tldts_core_1 = require("tldts-core");
const trie_1 = require("./data/trie");
// `edgeOffset` (where each label starts in `labelText`), `edgeHash` (djb2 of
// each label) and `wildcardEdge` (each node's '*' edge, or -1) are derived once
// at load instead of being shipped: the bundle then carries only the
// compressible `labelText` + structure, while the lookup binary-searches
// integer hashes. The cost is a single ~1ms pass at first import — cheaper than
// the object trie it replaces. Kept at module scope (not captured in a closure)
// so V8 treats the typed arrays as fast monomorphic globals.
const numberOfNodes = trie_1.nodeFlags.length;
const numberOfEdges = trie_1.edgeLength.length;
const edgeOffset = new Uint32Array(numberOfEdges);
const edgeHash = new Uint32Array(numberOfEdges);
const wildcardEdge = new Int32Array(numberOfNodes).fill(-1);
for (let node = 0, offset = 0; node < numberOfNodes; node += 1) {
for (let edge = trie_1.edgeStart[node]; edge < trie_1.edgeStart[node + 1]; edge += 1) {
edgeOffset[edge] = offset;
const end = offset + trie_1.edgeLength[edge];
let hash = 5381;
for (let i = end - 1; i >= offset; i -= 1) {
hash = (hash * 33) ^ trie_1.labelText.charCodeAt(i);
}
edgeHash[edge] = hash >>> 0;
if (trie_1.edgeLength[edge] === 1 &&
trie_1.labelText.charCodeAt(offset) === 42 /* '*' */) {
wildcardEdge[node] = edge;
}
offset = end;
}
}
// Result of the last `walk`, kept in module scope to avoid allocating a match
// object. Safe because lookups are synchronous and read right after `walk`.
let matchNode = -1;
let matchStart = 0;
let matchEnd = 0;
/**
* True if edge `edge`'s label equals `hostname[start, start + length)`.
*/
function labelEquals(edge, hostname, start, length) {
if (trie_1.edgeLength[edge] !== length) {
return false;
}
const offset = edgeOffset[edge];
for (let i = 0; i < length; i += 1) {
if (trie_1.labelText.charCodeAt(offset + i) !== hostname.charCodeAt(start + i)) {
return false;
}
}
return true;
}
/**
* Find the child edge of `node` whose label is `hostname[start, start + length)`.
* Edges are sorted by hash, so binary-search the hash then verify the label
* (scanning the rare run of equal hashes). Returns the edge index or -1.
*/
function findEdge(node, hash, hostname, start, length) {
let lo = trie_1.edgeStart[node];
let hi = trie_1.edgeStart[node + 1];
while (lo < hi) {
const mid = (lo + hi) >>> 1;
const value = edgeHash[mid];
if (value < hash) {
lo = mid + 1;
}
else if (value > hash) {
hi = mid;
}
else {
for (let e = mid; e >= lo && edgeHash[e] === hash; e -= 1) {
if (labelEquals(e, hostname, start, length))
return e;
}
for (let e = mid + 1; e < hi && edgeHash[e] === hash; e += 1) {
if (labelEquals(e, hostname, start, length))
return e;
}
return -1;
}
}
return -1;
}
/**
* Walk `hostname`'s labels right-to-left from `root`, recording the deepest
* node whose flag passes `allowedMask` (with the label boundaries of that match
* in `matchStart`/`matchEnd`). Returns whether any match was found.
*/
function walk(hostname, root, allowedMask) {
let node = root;
let end = hostname.length;
let hash = 5381;
matchNode = -1;
for (let i = hostname.length - 1; i >= 0; i -= 1) {
const code = hostname.charCodeAt(i);
if (code === 46 /* '.' */) {
const start = i + 1;
let edge = findEdge(node, hash >>> 0, hostname, start, end - start);
if (edge === -1) {
edge = wildcardEdge[node];
}
if (edge === -1) {
return matchNode !== -1;
}
node = trie_1.edgeChild[edge];
if ((trie_1.nodeFlags[node] & allowedMask) !== 0) {
matchNode = node;
matchStart = start;
matchEnd = end;
}
end = i;
hash = 5381;
}
else {
hash = (hash * 33) ^ code;
}
}
// Left-most label: hostname[0, end). Same find/descend/record as the loop —
// duplicated rather than folded into the loop (via `i >= -1`) because that
// extra per-character branch measured slightly slower on the hot path.
let edge = findEdge(node, hash >>> 0, hostname, 0, end);
if (edge === -1) {
edge = wildcardEdge[node];
}
if (edge !== -1) {
node = trie_1.edgeChild[edge];
if ((trie_1.nodeFlags[node] & allowedMask) !== 0) {
matchNode = node;
matchStart = 0;
matchEnd = end;
}
}
return matchNode !== -1;
}
/**
* Check if `hostname` has a valid public suffix in the trie.
*/
function suffixLookup(hostname, options, out) {
if ((0, tldts_core_1.fastPathLookup)(hostname, options, out)) {
return;
}
const allowedMask = (options.allowPrivateDomains ? 2 /* RULE_TYPE.PRIVATE */ : 0) |
(options.allowIcannDomains ? 1 /* RULE_TYPE.ICANN */ : 0);
// Exceptions have priority and strip their own left-most label (e.g. the
// rule '!www.ck' makes the suffix of 'www.ck' be 'ck').
if (walk(hostname, trie_1.exceptionsRoot, allowedMask)) {
out.isIcann = (trie_1.nodeFlags[matchNode] & 1 /* RULE_TYPE.ICANN */) !== 0;
out.isPrivate = (trie_1.nodeFlags[matchNode] & 2 /* RULE_TYPE.PRIVATE */) !== 0;
out.publicSuffix = hostname.slice(matchEnd + 1);
return;
}
if (walk(hostname, trie_1.rulesRoot, allowedMask)) {
out.isIcann = (trie_1.nodeFlags[matchNode] & 1 /* RULE_TYPE.ICANN */) !== 0;
out.isPrivate = (trie_1.nodeFlags[matchNode] & 2 /* RULE_TYPE.PRIVATE */) !== 0;
out.publicSuffix = hostname.slice(matchStart);
return;
}
// No match: the prevailing '*' rule makes the right-most label the suffix.
out.isIcann = false;
out.isPrivate = false;
const lastDot = hostname.lastIndexOf('.');
out.publicSuffix = lastDot === -1 ? hostname : hostname.slice(lastDot + 1);
}
//# sourceMappingURL=suffix-trie.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"suffix-trie.js","sourceRoot":"","sources":["../../../src/suffix-trie.ts"],"names":[],"mappings":";;AA4KA,+BAkCC;AA9MD,wFAAwF;AACxF,6EAA6E;AAC7E,yEAAyE;AACzE,6EAA6E;AAC7E,gFAAgF;AAChF,2CAIoB;AACpB,sCAQqB;AAOrB,6EAA6E;AAC7E,gFAAgF;AAChF,qEAAqE;AACrE,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,6DAA6D;AAC7D,MAAM,aAAa,GAAG,gBAAS,CAAC,MAAM,CAAC;AACvC,MAAM,aAAa,GAAG,iBAAU,CAAC,MAAM,CAAC;AACxC,MAAM,UAAU,GAAG,IAAI,WAAW,C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AChB,OAA6B,EAC7B,GAAkB;IAElB,IAAI,IAAA,2BAAc,EAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;QAC3C,OAAO;IACT,CAAC;IAED,MAAM,WAAW,GACf,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,2BAAmB,CAAC,CAAC,CAAC,CAAC;QACrD,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,yBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEpD,yEAAyE;IACzE,wDAAwD;IACxD,IAAI,IAAI,CAAC,QAAQ,EAAE,qBAAc,EAAE,WAAW,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,OAAO,GAAG,CAAC,gBAAS,CAAC,SAAS,CAAE,0BAAkB,CLine truncated
+1
View File
@@ -0,0 +1 @@
{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../../tldts-core/dist/types/src/lookup/interface.d.ts","../../../tldts-core/dist/types/src/options.d.ts","../../../tldts-core/dist/types/src/factory.d.ts","../../../tldts-core/dist/types/src/lookup/fast-path.d.ts","../../../tldts-core/dist/types/index.d.ts","../../src/data/trie.ts","../../src/suffix-trie.ts","../../index.ts","../../../../node_modules/@types/deep-eql/index.d.ts","../../../../node_modules/assertion-error/index.d.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/@types/node/web-globals/blob.d.ts","../../../../node_modules/@types/node/web-globals/console.d.ts","../../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/@types/node/web-globals/encoding.d.ts","../../../../node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/undici-types/utility.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-Line truncated
+41
View File
@@ -0,0 +1,41 @@
import { getEmptyResult, parseImpl, resetResult, } from 'tldts-core';
import suffixLookup from './src/suffix-trie';
// For all methods but 'parse', it does not make sense to allocate an object
// every single time to only return the value of a specific attribute. To avoid
// this un-necessary allocation, we use a global object which is re-used.
const RESULT = getEmptyResult();
export function parse(url, options) {
return parseImpl(url, 5 /* FLAG.ALL */, suffixLookup, options, getEmptyResult());
}
export function getHostname(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
return parseImpl(url, 0 /* FLAG.HOSTNAME */, suffixLookup, options, RESULT).hostname;
}
export function getPublicSuffix(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
return parseImpl(url, 2 /* FLAG.PUBLIC_SUFFIX */, suffixLookup, options, RESULT)
.publicSuffix;
}
export function getDomain(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
return parseImpl(url, 3 /* FLAG.DOMAIN */, suffixLookup, options, RESULT).domain;
}
export function getFullDomain(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
const result = parseImpl(url, 3 /* FLAG.DOMAIN */, suffixLookup, options, RESULT);
// The hostname *is* the full domain (subdomain + domain) whenever a
// registrable domain exists; gate on `domain` so non-registrable inputs
// (IPs, suffix-less or invalid hostnames) return `null` like `getDomain`.
return result.domain === null ? null : result.hostname;
}
export function getSubdomain(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
return parseImpl(url, 4 /* FLAG.SUB_DOMAIN */, suffixLookup, options, RESULT)
.subdomain;
}
export function getDomainWithoutSuffix(url, options) {
/*@__INLINE__*/ resetResult(RESULT);
return parseImpl(url, 5 /* FLAG.ALL */, suffixLookup, options, RESULT)
.domainWithoutSuffix;
}
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAGd,SAAS,EACT,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,4EAA4E;AAC5E,+EAA+E;AAC/E,yEAAyE;AACzE,MAAM,MAAM,GAAY,cAAc,EAAE,CAAC;AAEzC,MAAM,UAAU,KAAK,CAAC,GAAW,EAAE,OAA2B;IAC5D,OAAO,SAAS,CAAC,GAAG,oBAAY,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,GAAW,EACX,OAA2B;IAE3B,eAAe,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,SAAS,CAAC,GAAG,yBAAiB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157, 159, 226, 239, 241, 242, 243, 258, 265, 266, 269, 270, 271, 274, 276, 295, 296, 298, 307, 312, 329, 330, 333, 335, 336, 338, 372, 373, 375, 378, 379, 383, 385, 389, 392, 424, 427, 440, 441, 449, 450, 452, 462, 476, 477, 478, 487, 488, 525, 530, 546, 566, 572, 614, 615, 642, 669, 670, 818, 824, 827, 828, 829, 834, 839, 848, 870, 871, 872, 873, 874, 875, 876, 894, 896, 897, 900, 902, 903, 905, 907, 922, 937, 942, 943, 945, 946, 947, 948, 949, 951, 954, 959, 960, 961, 963, 964, 967, 970, 971, 972, 985, 987, 999, 1010, 1018, 1020, 1061, 1064, 1068, 1069, 1071, 1074, 1085, 1087, 1097, 1099, 1105, 1107, 1108, 1110, 1113, 1114, 1115, 1168, 1170, 1172, 1192, 1193, 1194, 1195, 1197, 1208, 1239, 1250, 1262, 1271, 1278, 1283, 1296, 1307, 1320, 1321, 1332, 1366, 1367, 1368, 1383, 1398, 1470, 1471, 1473, 1474, 1508, 1509, 1510, 1511, 1514, 1518, 1520, 1549, 1550, 1558, 1559, 1560, 1562, 1564, 1565, 1567, 1568, 1569, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1595, 1596, 1597, 2051, 2054, 2055, 2057, 2064, 2071, 2081, 2085, 2096, 2097, 2098, 2110, 2111, 2113, 2115, 2116, 2123, 2124, 2126, 2127, 2129, 2130, 2131, 2132, 2133, 2207, 2209, 2230, 2231, 2232, 2234, 2260, 2261, 2312, 2313, 2315, 2322, 2328, 2338, 2348, 2401, 2402, 2403, 2413, 2427, 2428, 2431, 2438, 2439, 2447, 2448, 2449, 2450, 2451, 2462, 2463, 2464, 2466, 2467, 2468, 2477, 2489, 2495, 2527, 2531, 2533, 2534, 2536, 2537, 2548, 2549, 2551, 2559, 2566, 2572, 2577, 2578, 2584, 2587, 2593, 2600, 2601, 2608, 2616, 2617, 2618, 2656, 2662, 2677, 2678, 2683, 2701, 2732, 2750, 2752, 2755, 2763, 2765, 2772, 2824, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2861, 2862, 2863, 2864, 2865, 2866, 2868, 2869, 2873, 2953, 2966, 2967, 3404, 3408, 3422, 3474, 3502, 3524, 3582, 3604, 3619, 3682, 3733, 3771, 3807, 3832, 3974, 4020, 4071, 4090, 4124, 4139, 4159, 4189, 4220, 4243, 4274, 4304, 4336, 4363, 4438, 4460, 4498, 4508, 4542, 4561, 4587, 4629, 4679, 4705, 4774, 4775, 4777, 4800, 4823, 4859, 4890, 4907, 4964, 4977, 5001, 5030, 5032, 5066, 5082, 5110, 5415, 5424, 5433, 5440, 5457, 5461, 5467, 5506, 5508, 5515, 5522, 5531, 5538, 5539, 5540, 5552, 5555, 5570, 5571, 5580, 5581, 5590, 5599, 5605, 5607, 5608, 5609, 5646, 5647, 5649, 5657, 5664, 5677, 5681, 5683, 5684, 5690, 5697, 5711, 5721, 5726, 5734, 5742, 5748, 5749, 5753, 5755, 5756, 5768, 5840, 5841, 5842, 5843, 5845, 5846, 5849, 5851, 5854, 5858, 5859, 5860, 5866, 5867, 5868, 5870, 5872, 5874, 5875, 5876, 5879, 5881, 5884, 5885, 5887, 6085, 6092, 6093, 6094, 6104, 6109, 6126, 6140, 6149, 6150, 6151, 6155, 6156, 6158, 6160, 6166, 6167, 6170, 6171, 6173, 6174, 6175, 7075, 7078, 7082, 7100, 7109, 7112, 7119, 7120, 7122, 7123, 7124, 7126, 7178, 7179, 7182, 7183, 7300, 7301, 7312, 7323, 7330, 7333, 7342, 7343, 7344, 7359, 7414, 7605, 7607, 7608, 7610, 7615, 7628, 7643, 7650, 7659, 7662, 7665, 7672, 7680, 7684, 7685, 7686, 7700, 7704, 7713, 7714, 7715, 7719, 7754, 7755, 7772, 7779, 7787, 7788, 7793, 7801, 7845, 7846, 7852, 7855, 7866, 7871, 7872, 7875, 7877, 7912, 7913, 7919, 7926, 7927, 7936, 7945, 7960, 7964, 8016, 8017, 8022, 8024, 8027, 8029, 8030, 8031, 8040, 8054, 8062, 8076, 8088, 8089, 8091, 8093, 8115, 8126, 8132, 8133, 8145, 8157, 8244, 8256, 8264, 8267, 8273, 8298, 8301, 8302, 8303, 8305, 8308, 8311, 8322, 8324, 8326, 8354, 8428, 8435, 8439, 8440, 8449, 8471, 8472, 8477, 8478, 8557, 8559, 8561, 8570, 8574, 8580, 8586, 8592, 8602, 8607, 8608, 8626, 8637, 8642, 8647, 8657, 8663, 8667, 8673, 8679, 10288, 10289, 10290, 10297, 10299]);
export const edgeLength = /*#__PURE__*/ new Uint8Array([3, 3, 3, 3, 3, 3, 3, 3, 5, 8, 8, 2, 2, 3, 3, 3, 3, 3, 8, 5, 5, 5, 5, 5, 3, 3, 5, 5, 9, 12, 19, 8, 19, 8, 11, 9, 9, 8, 7, 7, 6, 8, 9, 16, 10, 7, 7, 11, 8, 6, 6, 9, 7, 11, 7, 14, 4, 4, 4, 4, 4, 4, 10, 7, 6, 6, 6, 6, 10, 10, 6, 10, 10, 22, 11, 9, 10, 10, 10, 9, 10, 8, 7, 7, 7, 8, 21, 13, 11, 11, 9, 10, 9, 13, 10, 8, 8, 9, 12, 9, 7, 10, 7, 7, 13, 7, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 6, 3, 3, 3, 3, 3, 3, 2, 5, 3, 3, 3, 7, 2, 2, 2, 2, 2, 2, 3, 3, 3, 1, 1, 7, 8, 5, 2, 2, 7, 2, 2, 1, 4, 1, 11, 9, 9, 5, 5, 8, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 5, 11, 9, 9, 13, 7, 14, 7, 6, 6, 6, 7, 6, 6, 6, 6, 6, 10, 7, 11, 9, 4, 4, 4, 4, 4, 6, 6, 6, 6, 13, 6, 8, 7, 10, 9, 9, 9, 8, 9, 8, 7, 10, 6, 9, 8, 10, 10, 7, 8, 1, 9, 10, 12, 12, 12, 10, 9, 9, 10, 10, 9, 9, 1, 1, 5, 3, 3, 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 2, 3, 3, 3, 3, 3, 8, 15, 4, 4, 2, 3, 3, 3, 7, 4, 9, 9, 2, 3, 3, 3, 5, 3, 2, 2, 7, 2, 7, 6, 6, 7, 2, 4, 2, 2, 2, 2, 2, 2, 8, 8, 8, 9, 5, 2, 3, 3, 3, 3, 3, 3, 10, 7, 4, 4, 4, 4, 3, 4, 2, 3, 3, 3, 3, 3, 10, 7, 4, 4, 4, 4, 2, 3, 3, 3, 3, 10, 7, 4, 4, 4, 4, 3, 9, 6, 6, 6, 9, 13, 9, 2, 2, 2, 8, 7, 9, 5, 3, 3, 3, 5, 5, 13, 12, 9, 10, 7, 8, 7, 6, 8, 6, 11, 12, 7, 9, 10, 4, 4, 7, 8, 11, 6, 7, 9, 8, 7, 10, 8, 9, 15, 7, 8, 5, 4, 7, 2, 3, 3, 3, 2, 14, 10, 2, 14, 10, 2, 14, 3, 9, 13, 13, 10, 14, 16, 17, 11, 2, 14, 2, 14, 3, 9, 13, 10, 14, 16, 17, 11, 14, 10, 14, 2, 7, 3, 10, 7, 14, 10, 2, 14, 10, 9, 9, 17, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 10, 10, 10, 12, 9, 4, 10, 10, 11, 8, 8, 8, 7, 9, 5, 3, 3, 3, 3, 3, 3, 3, 3, 5, 8, 4, 4, 4, 4, 4, 4, 6, 16, 3, 3, 14, 3, 14, 2, 14, 9, 13, 10, 10, 14, 16, 17, 11, 6, 9, 10, 10, 12, 14, 14, 14, 12, 12, 12, 12, 14, 14, 10, 10, 10, 10, 14, 9, 9, 9, 10, 14, 14, 14, 9, 9, 9, 9, 9, 9, 2, 14, 9, 13, 10, 10, 14, 16, 17, 11, 6, 2, 14, 9, 17, 13, 10, 10, 14, 16, 17, 11, 6, 2, 14, 9, 13, 10, 14, 16, 17, 11, 2, 14, 9, 13, 10, 16, 11, 2, 14, 10, 19, 7, 2, 14, 9, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 14, 9, 13, 10, 19, 7, 14, 16, 17, 11, 2, 14, 9, 13, 17, 13, 10, 10, 14, 16, 17, 11, 6, 3, 2, 14, 9, 13, 10, 10, 14, 16, 17, 11, 6, 9, 10, 12, 14, 14, 14, 12, 12, 12, 12, 12, 14, 14, 14, 10, 10, 10, 14, 9, 9, 9, 9, 14, 14, 14, 13, 13, 14, 9, 9, 9, 9, 9, 9, 4, 11, 2, 14, 9, 13, 17, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 14, 9, 13, 17, 13, 10, 19, 10, 7, 14, 16, 17, 11, 6, 2, 9, 10, 10, 7, 17, 3, 3, 12, 12, 16, 15, 15, 12, 14, 14, 14, 20, 20, 13, 12, 12, 12, 12, 12, 12, 20, 25, 14, 14, 12, 12, 10, 10, 10, 10, 9, 9, 9, 25, 4, 9, 17, 10, 7, 14, 16, 21, 13, 13, 14, 20, 14, 13, 17, 24, 9, 12, 13, 25, 13, 21, 20, 17, 9, 9, 9, 9, 9, 9, 12, 17, 4, 4, 9, 9, 9, 10, 10, 12, 14, 14, 14, 12, 12, 12, 12, 12, 14, 14, 10, 10, 10, 10, 14, 9, 9, 9, 10, 14, 14, 14, 13, 13, 9, 9, 9, 9, 9, 9, 1, 5, 8Line truncated
export const edgeChild = /*#__PURE__*/ new Uint16Array([0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 1, 1, 1, 1, 1, 17, 1, 1, 1, 12, 1, 12, 1, 12, 13, 1, 1, 1, 1, 12, 1, 12, 1, 1, 1, 1, 1, 14, 21, 1, 1, 1, 1, 1, 1, 1, 19, 12, 1, 1, 1, 1, 1, 1, 1, 20, 1, 1, 1, 16, 18, 1, 1, 15, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 22, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 24, 25, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 12, 12, 12, 12, 1, 32, 0, 0, 0, 1, 1, 1, 1, 35, 34, 1, 1, 1, 1, 1, 33, 1, 1, 1, 1, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 39, 40, 0, 0, 0, 0, 12, 1, 1, 12, 1, 1, 1, 1, 43, 44, 44, 44, 43, 44, 43, 43, 45, 44, 43, 44, 43, 43, 43, 43, 43, 43, 45, 43, 43, 43, 43, 43, 43, 44, 46, 46, 44, 43, 43, 43, 43, 43, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 49, 51, 49, 49, 49, 51, 49, 50, 49, 52, 49, 50, 50, 49, 49, 49, 50, 52, 50, 52, 49, 50, 50, 12, 54, 54, 53, 55, 50, 52, 49, 49, 47, 48, 56, 0, 0, 0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140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, 0, 0, 1, 0, 143, 131, 1, 0, 1, 1, 12, 12, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 147, 146, 20, 1, 1, 12, 12, 1, 20, 12, 12, 1, 1, 1, 1, 1, 133, 1, 1, 151, 1, 1, 1, 1, 152, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 135, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 133, 1, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 133, 1, 1, 1, 1, 1, 1, 1, 1, 133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 159, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 1, 159, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 133, 1, 1, 1, 1, 151, 1, 1, 1, 1, 152, 1, 1, 1, 133, 1, 1, 151, 1, 1, 1, 1, 163, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 166, 1, 1, 159, 1, 1, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 1, 159, 1, 1, 1, 1, 1, 151, 1, 1, 1, 1, 1, 152, 1, 153, 157, 157, 12, 1, 12, 165, 1, 1, 1, 1, 1, 157, 157, 157, 153, 1, 1, 1, 156, 157, 160, 164, 1, 1, 1, 1, 156, 156, 1, 1, 155, 153, 153, 156, 169, 155, 169, 1, 1, 167, 1, 155, 154, 156, 1, 1, 1, 1, 156, 1, 158, 1, 1, 1, 12, 1, 161, 1, 161, 1, 1, 1, 161, 160, 162, 168, 155, 153, 1, 1, 1, 1, 1, 1, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 1Line truncated
export const labelText = "orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstLine truncated
export const rulesRoot = 620;
export const exceptionsRoot = 624;
//# sourceMappingURL=trie.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"trie.js","sourceRoot":"","sources":["../../../../src/data/trie.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC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EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAACLine truncated
+167
View File
@@ -0,0 +1,167 @@
// NOTE: kept (intentionally) near-identical to packages/tldts-icann/src/suffix-trie.ts.
// They are separate copies rather than a shared helper because the lookup is
// only fast when the typed arrays are module-scope monomorphic globals —
// closing over them (a shared factory) measured ~20% slower. The ICANN build
// also specializes (constant mask, no isIcann/isPrivate). Keep the two in sync.
import { fastPathLookup, } from 'tldts-core';
import { edgeChild, edgeLength, edgeStart, exceptionsRoot, labelText, nodeFlags, rulesRoot, } from './data/trie';
// `edgeOffset` (where each label starts in `labelText`), `edgeHash` (djb2 of
// each label) and `wildcardEdge` (each node's '*' edge, or -1) are derived once
// at load instead of being shipped: the bundle then carries only the
// compressible `labelText` + structure, while the lookup binary-searches
// integer hashes. The cost is a single ~1ms pass at first import — cheaper than
// the object trie it replaces. Kept at module scope (not captured in a closure)
// so V8 treats the typed arrays as fast monomorphic globals.
const numberOfNodes = nodeFlags.length;
const numberOfEdges = edgeLength.length;
const edgeOffset = new Uint32Array(numberOfEdges);
const edgeHash = new Uint32Array(numberOfEdges);
const wildcardEdge = new Int32Array(numberOfNodes).fill(-1);
for (let node = 0, offset = 0; node < numberOfNodes; node += 1) {
for (let edge = edgeStart[node]; edge < edgeStart[node + 1]; edge += 1) {
edgeOffset[edge] = offset;
const end = offset + edgeLength[edge];
let hash = 5381;
for (let i = end - 1; i >= offset; i -= 1) {
hash = (hash * 33) ^ labelText.charCodeAt(i);
}
edgeHash[edge] = hash >>> 0;
if (edgeLength[edge] === 1 &&
labelText.charCodeAt(offset) === 42 /* '*' */) {
wildcardEdge[node] = edge;
}
offset = end;
}
}
// Result of the last `walk`, kept in module scope to avoid allocating a match
// object. Safe because lookups are synchronous and read right after `walk`.
let matchNode = -1;
let matchStart = 0;
let matchEnd = 0;
/**
* True if edge `edge`'s label equals `hostname[start, start + length)`.
*/
function labelEquals(edge, hostname, start, length) {
if (edgeLength[edge] !== length) {
return false;
}
const offset = edgeOffset[edge];
for (let i = 0; i < length; i += 1) {
if (labelText.charCodeAt(offset + i) !== hostname.charCodeAt(start + i)) {
return false;
}
}
return true;
}
/**
* Find the child edge of `node` whose label is `hostname[start, start + length)`.
* Edges are sorted by hash, so binary-search the hash then verify the label
* (scanning the rare run of equal hashes). Returns the edge index or -1.
*/
function findEdge(node, hash, hostname, start, length) {
let lo = edgeStart[node];
let hi = edgeStart[node + 1];
while (lo < hi) {
const mid = (lo + hi) >>> 1;
const value = edgeHash[mid];
if (value < hash) {
lo = mid + 1;
}
else if (value > hash) {
hi = mid;
}
else {
for (let e = mid; e >= lo && edgeHash[e] === hash; e -= 1) {
if (labelEquals(e, hostname, start, length))
return e;
}
for (let e = mid + 1; e < hi && edgeHash[e] === hash; e += 1) {
if (labelEquals(e, hostname, start, length))
return e;
}
return -1;
}
}
return -1;
}
/**
* Walk `hostname`'s labels right-to-left from `root`, recording the deepest
* node whose flag passes `allowedMask` (with the label boundaries of that match
* in `matchStart`/`matchEnd`). Returns whether any match was found.
*/
function walk(hostname, root, allowedMask) {
let node = root;
let end = hostname.length;
let hash = 5381;
matchNode = -1;
for (let i = hostname.length - 1; i >= 0; i -= 1) {
const code = hostname.charCodeAt(i);
if (code === 46 /* '.' */) {
const start = i + 1;
let edge = findEdge(node, hash >>> 0, hostname, start, end - start);
if (edge === -1) {
edge = wildcardEdge[node];
}
if (edge === -1) {
return matchNode !== -1;
}
node = edgeChild[edge];
if ((nodeFlags[node] & allowedMask) !== 0) {
matchNode = node;
matchStart = start;
matchEnd = end;
}
end = i;
hash = 5381;
}
else {
hash = (hash * 33) ^ code;
}
}
// Left-most label: hostname[0, end). Same find/descend/record as the loop —
// duplicated rather than folded into the loop (via `i >= -1`) because that
// extra per-character branch measured slightly slower on the hot path.
let edge = findEdge(node, hash >>> 0, hostname, 0, end);
if (edge === -1) {
edge = wildcardEdge[node];
}
if (edge !== -1) {
node = edgeChild[edge];
if ((nodeFlags[node] & allowedMask) !== 0) {
matchNode = node;
matchStart = 0;
matchEnd = end;
}
}
return matchNode !== -1;
}
/**
* Check if `hostname` has a valid public suffix in the trie.
*/
export default function suffixLookup(hostname, options, out) {
if (fastPathLookup(hostname, options, out)) {
return;
}
const allowedMask = (options.allowPrivateDomains ? 2 /* RULE_TYPE.PRIVATE */ : 0) |
(options.allowIcannDomains ? 1 /* RULE_TYPE.ICANN */ : 0);
// Exceptions have priority and strip their own left-most label (e.g. the
// rule '!www.ck' makes the suffix of 'www.ck' be 'ck').
if (walk(hostname, exceptionsRoot, allowedMask)) {
out.isIcann = (nodeFlags[matchNode] & 1 /* RULE_TYPE.ICANN */) !== 0;
out.isPrivate = (nodeFlags[matchNode] & 2 /* RULE_TYPE.PRIVATE */) !== 0;
out.publicSuffix = hostname.slice(matchEnd + 1);
return;
}
if (walk(hostname, rulesRoot, allowedMask)) {
out.isIcann = (nodeFlags[matchNode] & 1 /* RULE_TYPE.ICANN */) !== 0;
out.isPrivate = (nodeFlags[matchNode] & 2 /* RULE_TYPE.PRIVATE */) !== 0;
out.publicSuffix = hostname.slice(matchStart);
return;
}
// No match: the prevailing '*' rule makes the right-most label the suffix.
out.isIcann = false;
out.isPrivate = false;
const lastDot = hostname.lastIndexOf('.');
out.publicSuffix = lastDot === -1 ? hostname : hostname.slice(lastDot + 1);
}
//# sourceMappingURL=suffix-trie.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"suffix-trie.js","sourceRoot":"","sources":["../../../src/suffix-trie.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,6EAA6E;AAC7E,yEAAyE;AACzE,6EAA6E;AAC7E,gFAAgF;AAChF,OAAO,EACL,cAAc,GAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,SAAS,EACT,SAAS,GACV,MAAM,aAAa,CAAC;AAOrB,6EAA6E;AAC7E,gFAAgF;AAChF,qEAAqE;AACrE,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,6DAA6D;AAC7D,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC;AACvC,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC;AACxC,MAAM,UAAU,GAAG,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;AAClD,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC;AAChD,MAAM,YAAY,GAAG,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,IAAI,GAAG,aAAa,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;IAC/D,KA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yE;IACzE,wDAAwD;IACxD,IAAI,IAAI,CAAC,QAAQ,EAAELine truncated
+1
View File
@@ -0,0 +1 @@
{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../../node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../../tldts-core/dist/types/src/lookup/interface.d.ts","../../../tldts-core/dist/types/src/options.d.ts","../../../tldts-core/dist/types/src/factory.d.ts","../../../tldts-core/dist/types/src/lookup/fast-path.d.ts","../../../tldts-core/dist/types/index.d.ts","../../src/data/trie.ts","../../src/suffix-trie.ts","../../index.ts","../../../../node_modules/@types/deep-eql/index.d.ts","../../../../node_modules/assertion-error/index.d.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/@types/node/web-globals/blob.d.ts","../../../../node_modules/@types/node/web-globals/console.d.ts","../../../../node_modules/@types/node/web-globals/crypto.d.ts","../../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/@types/node/web-globals/encoding.d.ts","../../../../node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/undici-types/utility.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-Line truncated
+2
View File
@@ -0,0 +1,2 @@
"use strict";const a=/[\t\n\r]/g;let e=!1;function o(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}function i(a,e,o){const i=o-e,s=32|a.charCodeAt(e);if(2===i)return 119===s&&115==(32|a.charCodeAt(e+1))?1:0;if(3===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2);return 119===s&&115===o&&115===i||102===s&&116===o&&112===i?1:0}if(4===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2),n=32|a.charCodeAt(e+3);return 104===s&&116===o&&116===i&&112===n?1:102===s&&105===o&&108===i&&101===n?2:0}return 5===i&&104===s&&116==(32|a.charCodeAt(e+1))&&116==(32|a.charCodeAt(e+2))&&112==(32|a.charCodeAt(e+3))&&115==(32|a.charCodeAt(e+4))?1:0}function s(n,t,r=!1){let u=0,l=n.length,m=!1,c=!1;if(e=!1,!t){if(n.startsWith("data:"))return null;for(;u<n.length&&n.charCodeAt(u)<=32;)u+=1;for(;l>u+1&&n.charCodeAt(l-1)<=32;)l-=1;if(47===n.charCodeAt(u)&&47===n.charCodeAt(u+1))u+=2;else{const e=n.indexOf(":/",u);if(-1!==e){const o=i(n,u,e);if(1===o)for(c=!0,u=e+2;47===n.charCodeAt(u)||92===n.charCodeAt(u);)u+=1;else if(2===o){c=!0,u=e+1;let a=0;for(;(47===n.charCodeAt(u)||92===n.charCodeAt(u))&&a<2;)u+=1,a+=1;if(a<2)return null}else{for(let o=u;o<e;o+=1){const e=32|n.charCodeAt(o);if(!(e>=97&&e<=122||e>=48&&e<=57||46===e||45===e||43===e)){const e=n.charCodeAt(o);return 9===e||10===e||13===e?s(n.replace(a,""),t,r):null}}if(47!==n.charCodeAt(e+2))return null;u=e+3}}else if(91!==n.charCodeAt(u)){let e=-1;for(let o=u;o<l;o+=1){const i=n.charCodeAt(o);if(9===i||10===i||13===i)return s(n.replace(a,""),t,r);if(58===i){e=o;break}if(47===i||92===i||63===i||35===i)break}if(-1!==e){let a=!1;for(let o=e+1;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(64===e){a=!0;break}}if(!a){let a=!0,o=e+1;for(;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(e<48||e>57){a=!1;break}}if(o===e+1&&(a=!1),!a){const a=i(n,u,e);if(0===a){let a=!1;for(let o=e+1;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(58===e){a=!0;break}}if(!a)return null}else if(c=!0,u=e+1,2===a){let a=0;for(;(47===n.charCodeAt(u)||92===n.charCodeAt(u))&&a<2;)u+=1,a+=1;if(a<2)return null}else for(;47===n.charCodeAt(u)||92===n.charCodeAt(u);)u+=1}}}}}let d=-1,h=-1,g=-1,k=-1,p=!1,b=r,y=u-1,f=-1;if(r&&u<l){const a=n.charCodeAt(u);(!o(a)&&46!==a&&95!==a||45===a)&&(b=!1)}for(let a=u;a<l;a+=1){const e=n.charCodeAt(a);if(e<64){if(47===e||35===e||63===e){l=a;break}58===e?(-1===k&&(k=a),g=a):9===e||10===e||13===e?p=!0:r&&(46===e?((a-y>64||46===f||45===f)&&(b=!1),y=a):(e<48||e>57)&&(45===e&&46!==f||(b=!1)))}else{if(c&&92===e){l=a;break}64===e?(d=a,k=-1):93===e?h=a:e>=65&&e<=90?m=!0:r&&!function(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}(e)&&(b=!1)}r&&(f=e)}if(p)return s(n.replace(a,""),t,r);if(-1!==d&&d>=u&&d<l&&(u=d+1),91===n.charCodeAt(u))return-1!==h?n.slice(u+1,h).toLowerCase():null;if(-1!==g&&g>u&&g<l&&k===g&&(l=g),u>=l)return null;r&&b&&-1===d&&-1===g&&-1===h&&46!==n.charCodeAt(l-1)&&l-u<=255&&l-y-1<=63&&45!==f&&(e=!0)}for(;l>u+1&&46===n.charCodeAt(l-1);)l-=1;const d=0!==u||l!==n.length?n.slice(u,l):n;return m?d.toLowerCase():d}const n=["test","localhost","invalid","example","example.com","example.net","example.org","local","onion","alt","home.arpa","ipv4only.arpa","resolver.arpa","service.arpa","6tisch.arpa","eap.arpa"];function t(a){return a>=97&&a<=122||a>=48&&a<=57||a>127}function r(a){if(a.length>255)return!1;if(0===a.length)return!1;if(!t(a.charCodeAt(0))&&46!==a.charCodeAt(0)&&95!==a.charCodeAt(0))return!1;let e=-1,o=-1;const i=a.length;for(let s=0;s<i;s+=1){const i=a.charCodeAt(s);if(46===i){if(s-e>64||46===o||45===o)return!1;e=s}else if(!t(i)&&45!==i&&95!==i||45===i&&46===o)return!1;o=i}return i-e-1<=63&&45!==o}const u=function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:s=!0,mixedInputs:n=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:s,mixedInputs:n,validHosts:t,validateHostname:r}}({});function l(a,o,i,t,l){const m=function(a){return void 0===a?u:function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:s=!0,mixedInputs:n=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:s,mixedInputs:n,validHosts:t,validateHostname:r}}(a)}(t);if("string"!=typeof a)return l;let c=!1;return m.extractHostname?m.mixedInputs?(c=r(a),l.hostname=s(a,c,m.validateHostname)):l.hostname=s(a,!1,m.validateHostname):l.hostname=a,m.detectIp&&null!==l.hostname&&(l.isIp=function(a){if(a.length<3)return!1;let e=a.startsWith("[")?1:0,o=a.length;if("]"===a[o-1]&&(o-=1),o-e>39)return!1;let i=!1;for(;e<o;e+=1){const o=a.charCodeAt(e);if(58===o)i=!0;else if(!(o>=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70))return!1}return i}(d=l.hostname)||function(a){if(a.length<7)return!1;if(a.lengLine truncated
//# sourceMappingURL=index.cjs.min.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.cjs.min.js","sources":["../../tldts-core/src/extract-hostname.ts","../../tldts-core/src/is-special-use.ts","../../tldts-core/src/is-valid.ts","../../tldts-core/src/options.ts","../../tldts-core/src/factory.ts","../../tldts-core/src/is-ip.ts","../../tldts-core/src/domain.ts","../../tldts-core/src/subdomain.ts","../../tldts-core/src/domain-without-suffix.ts","../src/data/trie.ts","../src/suffix-trie.ts","../../tldts-core/src/lookup/fast-path.ts","../index.ts"],"sourcesContent":["/**\n * Matches an ASCII tab (U+0009) or newline (U+000A / U+000D). The WHATWG URL\n * parser strips these before parsing; we only allocate a cleaned copy (and\n * re-parse) on the rare input that actually contains one.\n */\nconst CONTROL_CHARS = /[\\t\\n\\r]/g;\n\n// Set by `extractHostname` (a module-scope flag, read synchronously by\n// `parseImpl` right after the call — same pattern as the reused RESULT object).\n// `true` ONLY when extraction validated the returned host inline (a confirmed-\n// valid, \"simple\" authority) so `parseImpl` can skip the separate\n// `isValidHostname` pass. `false` in every other case (validation disabled, a\n// complex authority — userinfo/port/brackets/trailing-dot/control — an invalid\n// host, or a non-main return path); `parseImpl` then validates as usual. The\n// fast path can only ever SKIP a redundant scan for hosts already known valid,\n// never accept an invalid one.\nexport let extractedHostnameValidated = false;\n\n/**\n * True if char `code` is a valid hostname character. This is the per-char half\n * of `is-valid.ts`'s `isValidAscii` (a-z, 0-9, > U+007F) PLUS three additions:\n * A-Z (the host is lowercased before validation, so uppercase ≡ a valid\n * lowercase letter) and '-' / '_' (valid inside a label). KEEP IN SYNC with\n * `is-valid.ts`: these rules are deliberately duplicated to validate during\n * extraction, so any change to the accepted character set there must be\n * mirrored here (and vice-versa).\n */\nfunction isValidHostnameChar(code: number): boolean {\n return (\n (code >= 97 && code <= 122) || // a-z\n (code >= 48 && code <= 57) || // 0-9\n code > 127 || // non-ASCII (accepted, not punycode-checked)\n (code >= 65 && code <= 90) || // A-Z (becomes valid once lowercased)\n code === 45 || // '-'\n code === 95 // '_'\n );\n}\n\n/**\n * Classify scheme `url.slice(schemeStart, colonIndex)` as a WHATWG special\n * scheme without allocating a substring (case-insensitive via `| 32`).\n * Special schemes: ftp, file, http, https, ws, wss\n * (https://url.spec.whatwg.org/#special-scheme).\n *\n * @returns 0 = not special, 1 = special, 2 = file (its host sits only between\n * \"//\" and the next slash).\n */\nfunction getSpecialScheme(\n url: string,\n schemeStart: number,\n colonIndex: number,\n): number {\n const length = colonIndex - schemeStart;\n const c0 = url.charCodeAt(schemeStart) | 32;\n if (length === 2) {\n return c0 === 119 && (url.charCodeAt(schemeStart + 1) | 32) === 115 ? 1 : 0; // ws\n } else if (length === 3) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n if (c0 === 119 && c1 === 115 && c2 === 115) return 1; // wss\n if (c0 === 102 && c1 === 116 && c2 === 112) return 1; // ftp\n return 0;\n } else if (length === 4) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n const c3 = url.charCodeAt(schemeStart + 3) | 32;\n if (c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112) return 1; // http\n if (c0 === 102 && c1 === 105 && c2 === 108 && c3 === 101) return 2; // file\n return 0;\n } else if (length === 5) {\n return c0 === 104 &&\n (url.charCodeAt(schemeStart + 1) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 2) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 3) | 32) === 112 &&\n (url.charCodeAt(schemeStart + 4) | 32) === 115\n ? 1\n : 0; // https\n }\n return 0;\n}\n\n/**\n * Extract a hostname from `url`, matching a WHATWG URL parser's host-boundary\n * behaviour (https://url.spec.whatwg.org/#concept-basic-url-parser) for tldts'\n * scope. It deliberately does NOT normalise the host (no IDNA/punycode or IPv4\n * canonicalisation; IPv6 brackets are stripped, not compressed), strips trailing\n * dots, and stays lenient where a strict parser rejects (bare host:port,\n * out-of-range port, user@host) — all documented deviations.\n *\n * @param urlIsValidHostname - when true, `url` is already a valid hostname and is\n * returned by the same reference (factory.ts skips re-validation on that\n * identity), keeping the common path allocation-free.\n * @param validate - when true, validate the host inline during the authority\n * scan and publish the verdict via `extractedHostnameValidated` so `parseImpl`\n * can skip the redundant `isValidHostname` pass for simple authorities.\n */\nexport default funLine truncated
+2
View File
@@ -0,0 +1,2 @@
const a=/[\t\n\r]/g;let e=!1;function o(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}function i(a,e,o){const i=o-e,s=32|a.charCodeAt(e);if(2===i)return 119===s&&115==(32|a.charCodeAt(e+1))?1:0;if(3===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2);return 119===s&&115===o&&115===i||102===s&&116===o&&112===i?1:0}if(4===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2),n=32|a.charCodeAt(e+3);return 104===s&&116===o&&116===i&&112===n?1:102===s&&105===o&&108===i&&101===n?2:0}return 5===i&&104===s&&116==(32|a.charCodeAt(e+1))&&116==(32|a.charCodeAt(e+2))&&112==(32|a.charCodeAt(e+3))&&115==(32|a.charCodeAt(e+4))?1:0}function s(n,t,r=!1){let u=0,l=n.length,m=!1,c=!1;if(e=!1,!t){if(n.startsWith("data:"))return null;for(;u<n.length&&n.charCodeAt(u)<=32;)u+=1;for(;l>u+1&&n.charCodeAt(l-1)<=32;)l-=1;if(47===n.charCodeAt(u)&&47===n.charCodeAt(u+1))u+=2;else{const e=n.indexOf(":/",u);if(-1!==e){const o=i(n,u,e);if(1===o)for(c=!0,u=e+2;47===n.charCodeAt(u)||92===n.charCodeAt(u);)u+=1;else if(2===o){c=!0,u=e+1;let a=0;for(;(47===n.charCodeAt(u)||92===n.charCodeAt(u))&&a<2;)u+=1,a+=1;if(a<2)return null}else{for(let o=u;o<e;o+=1){const e=32|n.charCodeAt(o);if(!(e>=97&&e<=122||e>=48&&e<=57||46===e||45===e||43===e)){const e=n.charCodeAt(o);return 9===e||10===e||13===e?s(n.replace(a,""),t,r):null}}if(47!==n.charCodeAt(e+2))return null;u=e+3}}else if(91!==n.charCodeAt(u)){let e=-1;for(let o=u;o<l;o+=1){const i=n.charCodeAt(o);if(9===i||10===i||13===i)return s(n.replace(a,""),t,r);if(58===i){e=o;break}if(47===i||92===i||63===i||35===i)break}if(-1!==e){let a=!1;for(let o=e+1;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(64===e){a=!0;break}}if(!a){let a=!0,o=e+1;for(;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(e<48||e>57){a=!1;break}}if(o===e+1&&(a=!1),!a){const a=i(n,u,e);if(0===a){let a=!1;for(let o=e+1;o<l;o+=1){const e=n.charCodeAt(o);if(47===e||92===e||63===e||35===e)break;if(58===e){a=!0;break}}if(!a)return null}else if(c=!0,u=e+1,2===a){let a=0;for(;(47===n.charCodeAt(u)||92===n.charCodeAt(u))&&a<2;)u+=1,a+=1;if(a<2)return null}else for(;47===n.charCodeAt(u)||92===n.charCodeAt(u);)u+=1}}}}}let d=-1,h=-1,g=-1,k=-1,p=!1,b=r,y=u-1,f=-1;if(r&&u<l){const a=n.charCodeAt(u);(!o(a)&&46!==a&&95!==a||45===a)&&(b=!1)}for(let a=u;a<l;a+=1){const e=n.charCodeAt(a);if(e<64){if(47===e||35===e||63===e){l=a;break}58===e?(-1===k&&(k=a),g=a):9===e||10===e||13===e?p=!0:r&&(46===e?((a-y>64||46===f||45===f)&&(b=!1),y=a):(e<48||e>57)&&(45===e&&46!==f||(b=!1)))}else{if(c&&92===e){l=a;break}64===e?(d=a,k=-1):93===e?h=a:e>=65&&e<=90?m=!0:r&&!function(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}(e)&&(b=!1)}r&&(f=e)}if(p)return s(n.replace(a,""),t,r);if(-1!==d&&d>=u&&d<l&&(u=d+1),91===n.charCodeAt(u))return-1!==h?n.slice(u+1,h).toLowerCase():null;if(-1!==g&&g>u&&g<l&&k===g&&(l=g),u>=l)return null;r&&b&&-1===d&&-1===g&&-1===h&&46!==n.charCodeAt(l-1)&&l-u<=255&&l-y-1<=63&&45!==f&&(e=!0)}for(;l>u+1&&46===n.charCodeAt(l-1);)l-=1;const d=0!==u||l!==n.length?n.slice(u,l):n;return m?d.toLowerCase():d}const n=["test","localhost","invalid","example","example.com","example.net","example.org","local","onion","alt","home.arpa","ipv4only.arpa","resolver.arpa","service.arpa","6tisch.arpa","eap.arpa"];function t(a){return a>=97&&a<=122||a>=48&&a<=57||a>127}function r(a){if(a.length>255)return!1;if(0===a.length)return!1;if(!t(a.charCodeAt(0))&&46!==a.charCodeAt(0)&&95!==a.charCodeAt(0))return!1;let e=-1,o=-1;const i=a.length;for(let s=0;s<i;s+=1){const i=a.charCodeAt(s);if(46===i){if(s-e>64||46===o||45===o)return!1;e=s}else if(!t(i)&&45!==i&&95!==i||45===i&&46===o)return!1;o=i}return i-e-1<=63&&45!==o}const u=function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:s=!0,mixedInputs:n=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:s,mixedInputs:n,validHosts:t,validateHostname:r}}({});function l(a,o,i,t,l){const m=function(a){return void 0===a?u:function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:s=!0,mixedInputs:n=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:s,mixedInputs:n,validHosts:t,validateHostname:r}}(a)}(t);if("string"!=typeof a)return l;let c=!1;return m.extractHostname?m.mixedInputs?(c=r(a),l.hostname=s(a,c,m.validateHostname)):l.hostname=s(a,!1,m.validateHostname):l.hostname=a,m.detectIp&&null!==l.hostname&&(l.isIp=function(a){if(a.length<3)return!1;let e=a.startsWith("[")?1:0,o=a.length;if("]"===a[o-1]&&(o-=1),o-e>39)return!1;let i=!1;for(;e<o;e+=1){const o=a.charCodeAt(e);if(58===o)i=!0;else if(!(o>=48&&o<=57||o>=97&&o<=102||o>=65&&o<=70))return!1}return i}(d=l.hostname)||function(a){if(a.length<7)return!1;if(a.length>15)return!Line truncated
//# sourceMappingURL=index.esm.min.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.esm.min.js","sources":["../../tldts-core/src/extract-hostname.ts","../../tldts-core/src/is-special-use.ts","../../tldts-core/src/is-valid.ts","../../tldts-core/src/options.ts","../../tldts-core/src/factory.ts","../../tldts-core/src/is-ip.ts","../../tldts-core/src/domain.ts","../../tldts-core/src/subdomain.ts","../../tldts-core/src/domain-without-suffix.ts","../src/data/trie.ts","../src/suffix-trie.ts","../../tldts-core/src/lookup/fast-path.ts","../index.ts"],"sourcesContent":["/**\n * Matches an ASCII tab (U+0009) or newline (U+000A / U+000D). The WHATWG URL\n * parser strips these before parsing; we only allocate a cleaned copy (and\n * re-parse) on the rare input that actually contains one.\n */\nconst CONTROL_CHARS = /[\\t\\n\\r]/g;\n\n// Set by `extractHostname` (a module-scope flag, read synchronously by\n// `parseImpl` right after the call — same pattern as the reused RESULT object).\n// `true` ONLY when extraction validated the returned host inline (a confirmed-\n// valid, \"simple\" authority) so `parseImpl` can skip the separate\n// `isValidHostname` pass. `false` in every other case (validation disabled, a\n// complex authority — userinfo/port/brackets/trailing-dot/control — an invalid\n// host, or a non-main return path); `parseImpl` then validates as usual. The\n// fast path can only ever SKIP a redundant scan for hosts already known valid,\n// never accept an invalid one.\nexport let extractedHostnameValidated = false;\n\n/**\n * True if char `code` is a valid hostname character. This is the per-char half\n * of `is-valid.ts`'s `isValidAscii` (a-z, 0-9, > U+007F) PLUS three additions:\n * A-Z (the host is lowercased before validation, so uppercase ≡ a valid\n * lowercase letter) and '-' / '_' (valid inside a label). KEEP IN SYNC with\n * `is-valid.ts`: these rules are deliberately duplicated to validate during\n * extraction, so any change to the accepted character set there must be\n * mirrored here (and vice-versa).\n */\nfunction isValidHostnameChar(code: number): boolean {\n return (\n (code >= 97 && code <= 122) || // a-z\n (code >= 48 && code <= 57) || // 0-9\n code > 127 || // non-ASCII (accepted, not punycode-checked)\n (code >= 65 && code <= 90) || // A-Z (becomes valid once lowercased)\n code === 45 || // '-'\n code === 95 // '_'\n );\n}\n\n/**\n * Classify scheme `url.slice(schemeStart, colonIndex)` as a WHATWG special\n * scheme without allocating a substring (case-insensitive via `| 32`).\n * Special schemes: ftp, file, http, https, ws, wss\n * (https://url.spec.whatwg.org/#special-scheme).\n *\n * @returns 0 = not special, 1 = special, 2 = file (its host sits only between\n * \"//\" and the next slash).\n */\nfunction getSpecialScheme(\n url: string,\n schemeStart: number,\n colonIndex: number,\n): number {\n const length = colonIndex - schemeStart;\n const c0 = url.charCodeAt(schemeStart) | 32;\n if (length === 2) {\n return c0 === 119 && (url.charCodeAt(schemeStart + 1) | 32) === 115 ? 1 : 0; // ws\n } else if (length === 3) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n if (c0 === 119 && c1 === 115 && c2 === 115) return 1; // wss\n if (c0 === 102 && c1 === 116 && c2 === 112) return 1; // ftp\n return 0;\n } else if (length === 4) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n const c3 = url.charCodeAt(schemeStart + 3) | 32;\n if (c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112) return 1; // http\n if (c0 === 102 && c1 === 105 && c2 === 108 && c3 === 101) return 2; // file\n return 0;\n } else if (length === 5) {\n return c0 === 104 &&\n (url.charCodeAt(schemeStart + 1) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 2) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 3) | 32) === 112 &&\n (url.charCodeAt(schemeStart + 4) | 32) === 115\n ? 1\n : 0; // https\n }\n return 0;\n}\n\n/**\n * Extract a hostname from `url`, matching a WHATWG URL parser's host-boundary\n * behaviour (https://url.spec.whatwg.org/#concept-basic-url-parser) for tldts'\n * scope. It deliberately does NOT normalise the host (no IDNA/punycode or IPv4\n * canonicalisation; IPv6 brackets are stripped, not compressed), strips trailing\n * dots, and stays lenient where a strict parser rejects (bare host:port,\n * out-of-range port, user@host) — all documented deviations.\n *\n * @param urlIsValidHostname - when true, `url` is already a valid hostname and is\n * returned by the same reference (factory.ts skips re-validation on that\n * identity), keeping the common path allocation-free.\n * @param validate - when true, validate the host inline during the authority\n * scan and publish the verdict via `extractedHostnameValidated` so `parseImpl`\n * can skip the redundant `isValidHostname` pass for simple authorities.\n */\nexport default funLine truncated
+2
View File
@@ -0,0 +1,2 @@
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((a="undefined"!=typeof globalThis?globalThis:a||self).tldts={})}(this,(function(a){"use strict";const e=/[\t\n\r]/g;let o=!1;function i(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}function n(a,e,o){const i=o-e,n=32|a.charCodeAt(e);if(2===i)return 119===n&&115==(32|a.charCodeAt(e+1))?1:0;if(3===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2);return 119===n&&115===o&&115===i||102===n&&116===o&&112===i?1:0}if(4===i){const o=32|a.charCodeAt(e+1),i=32|a.charCodeAt(e+2),s=32|a.charCodeAt(e+3);return 104===n&&116===o&&116===i&&112===s?1:102===n&&105===o&&108===i&&101===s?2:0}return 5===i&&104===n&&116==(32|a.charCodeAt(e+1))&&116==(32|a.charCodeAt(e+2))&&112==(32|a.charCodeAt(e+3))&&115==(32|a.charCodeAt(e+4))?1:0}function s(a,t,r=!1){let u=0,l=a.length,m=!1,c=!1;if(o=!1,!t){if(a.startsWith("data:"))return null;for(;u<a.length&&a.charCodeAt(u)<=32;)u+=1;for(;l>u+1&&a.charCodeAt(l-1)<=32;)l-=1;if(47===a.charCodeAt(u)&&47===a.charCodeAt(u+1))u+=2;else{const o=a.indexOf(":/",u);if(-1!==o){const i=n(a,u,o);if(1===i)for(c=!0,u=o+2;47===a.charCodeAt(u)||92===a.charCodeAt(u);)u+=1;else if(2===i){c=!0,u=o+1;let e=0;for(;(47===a.charCodeAt(u)||92===a.charCodeAt(u))&&e<2;)u+=1,e+=1;if(e<2)return null}else{for(let i=u;i<o;i+=1){const o=32|a.charCodeAt(i);if(!(o>=97&&o<=122||o>=48&&o<=57||46===o||45===o||43===o)){const o=a.charCodeAt(i);return 9===o||10===o||13===o?s(a.replace(e,""),t,r):null}}if(47!==a.charCodeAt(o+2))return null;u=o+3}}else if(91!==a.charCodeAt(u)){let o=-1;for(let i=u;i<l;i+=1){const n=a.charCodeAt(i);if(9===n||10===n||13===n)return s(a.replace(e,""),t,r);if(58===n){o=i;break}if(47===n||92===n||63===n||35===n)break}if(-1!==o){let e=!1;for(let i=o+1;i<l;i+=1){const o=a.charCodeAt(i);if(47===o||92===o||63===o||35===o)break;if(64===o){e=!0;break}}if(!e){let e=!0,i=o+1;for(;i<l;i+=1){const o=a.charCodeAt(i);if(47===o||92===o||63===o||35===o)break;if(o<48||o>57){e=!1;break}}if(i===o+1&&(e=!1),!e){const e=n(a,u,o);if(0===e){let e=!1;for(let i=o+1;i<l;i+=1){const o=a.charCodeAt(i);if(47===o||92===o||63===o||35===o)break;if(58===o){e=!0;break}}if(!e)return null}else if(c=!0,u=o+1,2===e){let e=0;for(;(47===a.charCodeAt(u)||92===a.charCodeAt(u))&&e<2;)u+=1,e+=1;if(e<2)return null}else for(;47===a.charCodeAt(u)||92===a.charCodeAt(u);)u+=1}}}}}let d=-1,h=-1,g=-1,k=-1,p=!1,b=r,y=u-1,f=-1;if(r&&u<l){const e=a.charCodeAt(u);(!i(e)&&46!==e&&95!==e||45===e)&&(b=!1)}for(let e=u;e<l;e+=1){const o=a.charCodeAt(e);if(o<64){if(47===o||35===o||63===o){l=e;break}58===o?(-1===k&&(k=e),g=e):9===o||10===o||13===o?p=!0:r&&(46===o?((e-y>64||46===f||45===f)&&(b=!1),y=e):(o<48||o>57)&&(45===o&&46!==f||(b=!1)))}else{if(c&&92===o){l=e;break}64===o?(d=e,k=-1):93===o?h=e:o>=65&&o<=90?m=!0:r&&!function(a){return a>=97&&a<=122||a>=48&&a<=57||a>127||a>=65&&a<=90||45===a||95===a}(o)&&(b=!1)}r&&(f=o)}if(p)return s(a.replace(e,""),t,r);if(-1!==d&&d>=u&&d<l&&(u=d+1),91===a.charCodeAt(u))return-1!==h?a.slice(u+1,h).toLowerCase():null;if(-1!==g&&g>u&&g<l&&k===g&&(l=g),u>=l)return null;r&&b&&-1===d&&-1===g&&-1===h&&46!==a.charCodeAt(l-1)&&l-u<=255&&l-y-1<=63&&45!==f&&(o=!0)}for(;l>u+1&&46===a.charCodeAt(l-1);)l-=1;const d=0!==u||l!==a.length?a.slice(u,l):a;return m?d.toLowerCase():d}const t=["test","localhost","invalid","example","example.com","example.net","example.org","local","onion","alt","home.arpa","ipv4only.arpa","resolver.arpa","service.arpa","6tisch.arpa","eap.arpa"];function r(a){return a>=97&&a<=122||a>=48&&a<=57||a>127}function u(a){if(a.length>255)return!1;if(0===a.length)return!1;if(!r(a.charCodeAt(0))&&46!==a.charCodeAt(0)&&95!==a.charCodeAt(0))return!1;let e=-1,o=-1;const i=a.length;for(let n=0;n<i;n+=1){const i=a.charCodeAt(n);if(46===i){if(n-e>64||46===o||45===o)return!1;e=n}else if(!r(i)&&45!==i&&95!==i||45===i&&46===o)return!1;o=i}return i-e-1<=63&&45!==o}const l=function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:n=!0,mixedInputs:s=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:n,mixedInputs:s,validHosts:t,validateHostname:r}}({});function m(a,e,i,n,r){const m=function(a){return void 0===a?l:function({allowIcannDomains:a=!0,allowPrivateDomains:e=!1,detectIp:o=!0,detectSpecialUse:i=!1,extractHostname:n=!0,mixedInputs:s=!0,validHosts:t=null,validateHostname:r=!0}){return{allowIcannDomains:a,allowPrivateDomains:e,detectIp:o,detectSpecialUse:i,extractHostname:n,mixedInputs:s,validHosts:t,validateHostname:r}}(a)}(n);if("string"!=typeof a)return r;let c=!1;return m.extractHostname?m.mixedInputs?(c=u(a),r.hostname=s(a,c,m.validateHostname)):r.hostname=s(a,!1,m.validateHostname):r.hostname=a,m.detectIp&&null!==r.hostname&&(r.isIp=function(a){if(a.length<3)return!1;let e=a.startsWith("[")?1:0,o=a.length;if("]"===aLine truncated
//# sourceMappingURL=index.umd.min.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.umd.min.js","sources":["../../tldts-core/src/extract-hostname.ts","../../tldts-core/src/is-special-use.ts","../../tldts-core/src/is-valid.ts","../../tldts-core/src/options.ts","../../tldts-core/src/factory.ts","../../tldts-core/src/is-ip.ts","../../tldts-core/src/domain.ts","../../tldts-core/src/subdomain.ts","../../tldts-core/src/domain-without-suffix.ts","../src/data/trie.ts","../src/suffix-trie.ts","../../tldts-core/src/lookup/fast-path.ts","../index.ts"],"sourcesContent":["/**\n * Matches an ASCII tab (U+0009) or newline (U+000A / U+000D). The WHATWG URL\n * parser strips these before parsing; we only allocate a cleaned copy (and\n * re-parse) on the rare input that actually contains one.\n */\nconst CONTROL_CHARS = /[\\t\\n\\r]/g;\n\n// Set by `extractHostname` (a module-scope flag, read synchronously by\n// `parseImpl` right after the call — same pattern as the reused RESULT object).\n// `true` ONLY when extraction validated the returned host inline (a confirmed-\n// valid, \"simple\" authority) so `parseImpl` can skip the separate\n// `isValidHostname` pass. `false` in every other case (validation disabled, a\n// complex authority — userinfo/port/brackets/trailing-dot/control — an invalid\n// host, or a non-main return path); `parseImpl` then validates as usual. The\n// fast path can only ever SKIP a redundant scan for hosts already known valid,\n// never accept an invalid one.\nexport let extractedHostnameValidated = false;\n\n/**\n * True if char `code` is a valid hostname character. This is the per-char half\n * of `is-valid.ts`'s `isValidAscii` (a-z, 0-9, > U+007F) PLUS three additions:\n * A-Z (the host is lowercased before validation, so uppercase ≡ a valid\n * lowercase letter) and '-' / '_' (valid inside a label). KEEP IN SYNC with\n * `is-valid.ts`: these rules are deliberately duplicated to validate during\n * extraction, so any change to the accepted character set there must be\n * mirrored here (and vice-versa).\n */\nfunction isValidHostnameChar(code: number): boolean {\n return (\n (code >= 97 && code <= 122) || // a-z\n (code >= 48 && code <= 57) || // 0-9\n code > 127 || // non-ASCII (accepted, not punycode-checked)\n (code >= 65 && code <= 90) || // A-Z (becomes valid once lowercased)\n code === 45 || // '-'\n code === 95 // '_'\n );\n}\n\n/**\n * Classify scheme `url.slice(schemeStart, colonIndex)` as a WHATWG special\n * scheme without allocating a substring (case-insensitive via `| 32`).\n * Special schemes: ftp, file, http, https, ws, wss\n * (https://url.spec.whatwg.org/#special-scheme).\n *\n * @returns 0 = not special, 1 = special, 2 = file (its host sits only between\n * \"//\" and the next slash).\n */\nfunction getSpecialScheme(\n url: string,\n schemeStart: number,\n colonIndex: number,\n): number {\n const length = colonIndex - schemeStart;\n const c0 = url.charCodeAt(schemeStart) | 32;\n if (length === 2) {\n return c0 === 119 && (url.charCodeAt(schemeStart + 1) | 32) === 115 ? 1 : 0; // ws\n } else if (length === 3) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n if (c0 === 119 && c1 === 115 && c2 === 115) return 1; // wss\n if (c0 === 102 && c1 === 116 && c2 === 112) return 1; // ftp\n return 0;\n } else if (length === 4) {\n const c1 = url.charCodeAt(schemeStart + 1) | 32;\n const c2 = url.charCodeAt(schemeStart + 2) | 32;\n const c3 = url.charCodeAt(schemeStart + 3) | 32;\n if (c0 === 104 && c1 === 116 && c2 === 116 && c3 === 112) return 1; // http\n if (c0 === 102 && c1 === 105 && c2 === 108 && c3 === 101) return 2; // file\n return 0;\n } else if (length === 5) {\n return c0 === 104 &&\n (url.charCodeAt(schemeStart + 1) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 2) | 32) === 116 &&\n (url.charCodeAt(schemeStart + 3) | 32) === 112 &&\n (url.charCodeAt(schemeStart + 4) | 32) === 115\n ? 1\n : 0; // https\n }\n return 0;\n}\n\n/**\n * Extract a hostname from `url`, matching a WHATWG URL parser's host-boundary\n * behaviour (https://url.spec.whatwg.org/#concept-basic-url-parser) for tldts'\n * scope. It deliberately does NOT normalise the host (no IDNA/punycode or IPv4\n * canonicalisation; IPv6 brackets are stripped, not compressed), strips trailing\n * dots, and stays lenient where a strict parser rejects (bare host:port,\n * out-of-range port, user@host) — all documented deviations.\n *\n * @param urlIsValidHostname - when true, `url` is already a valid hostname and is\n * returned by the same reference (factory.ts skips re-validation on that\n * identity), keeping the common path allocation-free.\n * @param validate - when true, validate the host inline during the authority\n * scan and publish the verdict via `extractedHostnameValidated` so `parseImpl`\n * can skip the redundant `isValidHostname` pass for simple authorities.\n */\nexport default funLine truncated
+8
View File
@@ -0,0 +1,8 @@
import { IOptions, IResult } from 'tldts-core';
export declare function parse(url: string, options?: Partial<IOptions>): IResult;
export declare function getHostname(url: string, options?: Partial<IOptions>): string | null;
export declare function getPublicSuffix(url: string, options?: Partial<IOptions>): string | null;
export declare function getDomain(url: string, options?: Partial<IOptions>): string | null;
export declare function getFullDomain(url: string, options?: Partial<IOptions>): string | null;
export declare function getSubdomain(url: string, options?: Partial<IOptions>): string | null;
export declare function getDomainWithoutSuffix(url: string, options?: Partial<IOptions>): string | null;
+7
View File
@@ -0,0 +1,7 @@
export declare const nodeFlags: Uint8Array<ArrayBuffer>;
export declare const edgeStart: Uint16Array<ArrayBuffer>;
export declare const edgeLength: Uint8Array<ArrayBuffer>;
export declare const edgeChild: Uint16Array<ArrayBuffer>;
export declare const labelText = "orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingLine truncated
export declare const rulesRoot = 620;
export declare const exceptionsRoot = 624;
+5
View File
@@ -0,0 +1,5 @@
import { IPublicSuffix, ISuffixLookupOptions } from 'tldts-core';
/**
* Check if `hostname` has a valid public suffix in the trie.
*/
export default function suffixLookup(hostname: string, options: ISuffixLookupOptions, out: IPublicSuffix): void;