@chainpatrol/sdk 1.11.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1216,17 +1216,17 @@ var PolyDateFormatter = class {
1216
1216
  constructor(dt, intl, opts) {
1217
1217
  this.opts = opts;
1218
1218
  this.originalZone = void 0;
1219
- let z64 = void 0;
1219
+ let z68 = void 0;
1220
1220
  if (this.opts.timeZone) {
1221
1221
  this.dt = dt;
1222
1222
  } else if (dt.zone.type === "fixed") {
1223
1223
  const gmtOffset = -1 * (dt.offset / 60);
1224
1224
  const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
1225
1225
  if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
1226
- z64 = offsetZ;
1226
+ z68 = offsetZ;
1227
1227
  this.dt = dt;
1228
1228
  } else {
1229
- z64 = "UTC";
1229
+ z68 = "UTC";
1230
1230
  this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
1231
1231
  this.originalZone = dt.zone;
1232
1232
  }
@@ -1234,14 +1234,14 @@ var PolyDateFormatter = class {
1234
1234
  this.dt = dt;
1235
1235
  } else if (dt.zone.type === "iana") {
1236
1236
  this.dt = dt;
1237
- z64 = dt.zone.name;
1237
+ z68 = dt.zone.name;
1238
1238
  } else {
1239
- z64 = "UTC";
1239
+ z68 = "UTC";
1240
1240
  this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
1241
1241
  this.originalZone = dt.zone;
1242
1242
  }
1243
1243
  const intlOpts = __spreadValues({}, this.opts);
1244
- intlOpts.timeZone = intlOpts.timeZone || z64;
1244
+ intlOpts.timeZone = intlOpts.timeZone || z68;
1245
1245
  this.dtf = getCachedDTF(intl, intlOpts);
1246
1246
  }
1247
1247
  format() {
@@ -6975,6 +6975,14 @@ z.object({
6975
6975
  z.object({
6976
6976
  noteId: z.number().int().positive()
6977
6977
  });
6978
+ var getAssetSubscriptionSchema = z.object({
6979
+ slug: z.string().min(1),
6980
+ assetId: z.number().int().positive()
6981
+ });
6982
+ getAssetSubscriptionSchema.extend({
6983
+ /** True to follow this asset, false to stop following it. */
6984
+ subscribed: z.boolean()
6985
+ });
6978
6986
  var ASSET_TAGS = {
6979
6987
  ENFORCEMENT_EXHAUSTED: {
6980
6988
  label: "Enforcement Exhausted",
@@ -7004,6 +7012,9 @@ z.object({
7004
7012
  email: z.string().email(),
7005
7013
  description: z.string().optional().default("")
7006
7014
  });
7015
+ z.object({
7016
+ slug: z.string().min(1)
7017
+ });
7007
7018
  z.object({
7008
7019
  /** Canonicalization algorithm version the client computed its prefixes with. */
7009
7020
  algoVersion: z.number().int().positive(),
@@ -7152,7 +7163,8 @@ var AssetType = {
7152
7163
  SMARTMONEYMATCH: "SMARTMONEYMATCH",
7153
7164
  APK_GOLD: "APK_GOLD",
7154
7165
  GLASSDOOR: "GLASSDOOR",
7155
- PUMP_FUN: "PUMP_FUN"
7166
+ PUMP_FUN: "PUMP_FUN",
7167
+ TUMBLR: "TUMBLR"
7156
7168
  };
7157
7169
  var LivenessStatus = {
7158
7170
  UNKNOWN: "UNKNOWN",
@@ -7481,6 +7493,7 @@ var ThreatDetectionSourceKey = /* @__PURE__ */ ((ThreatDetectionSourceKey2) => {
7481
7493
  ThreatDetectionSourceKey2["BLOCKLIST"] = "blocklist";
7482
7494
  ThreatDetectionSourceKey2["APPLE_APP_STORE"] = "apple_app_store";
7483
7495
  ThreatDetectionSourceKey2["GOOGLE_ADS_SEARCH"] = "google_ads_search";
7496
+ ThreatDetectionSourceKey2["GOOGLE_ADS_TRANSPARENCY_SEARCH"] = "google_ads_transparency_search";
7484
7497
  ThreatDetectionSourceKey2["MOZILLA_ADDON_SEARCH"] = "mozilla_addon_search";
7485
7498
  ThreatDetectionSourceKey2["REDDIT_SUBREDDIT_SEARCH"] = "reddit_subreddit_search";
7486
7499
  ThreatDetectionSourceKey2["ASSET_CHECK"] = "asset_check";
@@ -7527,638 +7540,47 @@ var ThreatDetectionScope = /* @__PURE__ */ ((ThreatDetectionScope2) => {
7527
7540
  return ThreatDetectionScope2;
7528
7541
  })(ThreatDetectionScope || {});
7529
7542
 
7530
- // ../../internal/utils/src/enrichments.ts
7531
- var enrichments_exports = {};
7532
- __export(enrichments_exports, {
7533
- ASSET_SCAN_ENRICHMENT_SOURCE_LABELS: () => ASSET_SCAN_ENRICHMENT_SOURCE_LABELS,
7534
- ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES: () => ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES,
7535
- ASSET_SCAN_ENRICHMENT_TYPE_LABELS: () => ASSET_SCAN_ENRICHMENT_TYPE_LABELS,
7536
- AssetScanEnrichmentSource: () => AssetScanEnrichmentSource,
7537
- AssetScanEnrichmentType: () => AssetScanEnrichmentType
7543
+ // ../../internal/utils/src/url.ts
7544
+ var url_exports = {};
7545
+ __export(url_exports, {
7546
+ URL_REGEX: () => URL_REGEX,
7547
+ containsPunycode: () => containsPunycode,
7548
+ convertHttpsToHttp: () => convertHttpsToHttp,
7549
+ ensureHttpsPrefix: () => ensureHttpsPrefix,
7550
+ generateCanonicalIPFSUrl: () => generateCanonicalIPFSUrl,
7551
+ getDefangedUrl: () => getDefangedUrl,
7552
+ getDomain: () => getDomain,
7553
+ getFaviconUrl: () => getFaviconUrl,
7554
+ getHostname: () => getHostname,
7555
+ getNormalizedUrl: () => getNormalizedUrl,
7556
+ getParentDomains: () => getParentDomains,
7557
+ getPublicHostname: () => getPublicHostname,
7558
+ getRefangedUrl: () => getRefangedUrl,
7559
+ isEmail: () => isEmail,
7560
+ isUrl: () => isUrl,
7561
+ isWalrusSite: () => isWalrusSite,
7562
+ removeHttpProtocol: () => removeHttpProtocol,
7563
+ sanitizeHttpUrl: () => sanitizeHttpUrl,
7564
+ slugify: () => slugify,
7565
+ stripDomainWildcardPrefix: () => stripDomainWildcardPrefix,
7566
+ toUnicode: () => toUnicode2,
7567
+ trimDomainToLevels: () => trimDomainToLevels
7538
7568
  });
7539
- var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
7540
- AssetScanEnrichmentType2["CONTENT_AND_METADATA"] = "content_and_metadata";
7541
- AssetScanEnrichmentType2["BROWSER_CAPTURE"] = "browser_capture";
7542
- AssetScanEnrichmentType2["OWNERSHIP_AND_REGISTRATION"] = "ownership_and_registration";
7543
- AssetScanEnrichmentType2["GEOLOCATION_AND_IP"] = "geolocation_and_ip";
7544
- AssetScanEnrichmentType2["DNS"] = "dns";
7545
- AssetScanEnrichmentType2["TLS"] = "tls";
7546
- AssetScanEnrichmentType2["TCP"] = "tcp";
7547
- AssetScanEnrichmentType2["HOSTNAME_FIRST_SEEN"] = "hostname_first_seen";
7548
- AssetScanEnrichmentType2["TWITTER_POST"] = "post";
7549
- AssetScanEnrichmentType2["TWITTER_PROFILE"] = "profile";
7550
- AssetScanEnrichmentType2["TWITTER_FOLLOWERS"] = "twitter_followers";
7551
- AssetScanEnrichmentType2["FARCASTER_CAST"] = "cast";
7552
- AssetScanEnrichmentType2["FARCASTER_PROFILE"] = "farcaster_profile";
7553
- AssetScanEnrichmentType2["FARCASTER_CHANNEL"] = "channel";
7554
- AssetScanEnrichmentType2["FARCASTER_MINIAPP"] = "miniapp";
7555
- AssetScanEnrichmentType2["TELEGRAM_PROFILE"] = "telegram_profile";
7556
- AssetScanEnrichmentType2["INSTAGRAM_PROFILE"] = "instagram_profile";
7557
- AssetScanEnrichmentType2["FACEBOOK_PROFILE"] = "facebook_profile";
7558
- AssetScanEnrichmentType2["YOUTUBE_VIDEO"] = "youtube_video";
7559
- AssetScanEnrichmentType2["YOUTUBE_CHANNEL"] = "youtube_channel";
7560
- AssetScanEnrichmentType2["APPLE_APP_STORE_LISTING"] = "apple_app_store_listing";
7561
- AssetScanEnrichmentType2["GOOGLE_PLAY_STORE_LISTING"] = "google_play_store_listing";
7562
- AssetScanEnrichmentType2["MOZILLA_ADDON"] = "mozilla_addon";
7563
- AssetScanEnrichmentType2["REDDIT_SUBREDDIT"] = "reddit_subreddit";
7564
- AssetScanEnrichmentType2["EMAIL_VALIDATION"] = "email_validation";
7565
- AssetScanEnrichmentType2["PHONE_LOOKUP"] = "phone_lookup";
7566
- AssetScanEnrichmentType2["BILIBILI_VIDEO"] = "bilibili_video";
7567
- AssetScanEnrichmentType2["BILIBILI_PROFILE"] = "bilibili_profile";
7568
- AssetScanEnrichmentType2["DAILYMOTION_VIDEO"] = "dailymotion_video";
7569
- AssetScanEnrichmentType2["VIMEO_VIDEO"] = "vimeo_video";
7570
- AssetScanEnrichmentType2["VIMEO_PROFILE"] = "vimeo_profile";
7571
- AssetScanEnrichmentType2["STACKBLITZ_PAGE"] = "stackblitz_page";
7572
- AssetScanEnrichmentType2["LEETCODE_PAGE"] = "leetcode_page";
7573
- AssetScanEnrichmentType2["TUMBLR_BLOG"] = "tumblr_blog";
7574
- AssetScanEnrichmentType2["TUMBLR_POST"] = "tumblr_post";
7575
- AssetScanEnrichmentType2["TUMBLR_COMMUNITY"] = "tumblr_community";
7576
- AssetScanEnrichmentType2["NPM_PACKAGE"] = "npm_package";
7577
- AssetScanEnrichmentType2["PYPI_PACKAGE"] = "pypi_package";
7578
- AssetScanEnrichmentType2["RUST_PACKAGE"] = "rust_package";
7579
- AssetScanEnrichmentType2["LINKEDIN_PROFILE"] = "linkedin_profile";
7580
- AssetScanEnrichmentType2["PUMP_FUN_TOKEN"] = "pump_fun_token";
7581
- AssetScanEnrichmentType2["META_AD"] = "meta_ad";
7582
- AssetScanEnrichmentType2["GOOGLE_AD"] = "google_ad";
7583
- AssetScanEnrichmentType2["ADLIBRARY_AD"] = "adlibrary_ad";
7584
- AssetScanEnrichmentType2["CONTRACT_DEPLOYER"] = "contract_deployer";
7585
- return AssetScanEnrichmentType2;
7586
- })(AssetScanEnrichmentType || {});
7587
- var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) => {
7588
- AssetScanEnrichmentSource2["URLSCAN"] = "urlscan";
7589
- AssetScanEnrichmentSource2["WHOIS"] = "whois";
7590
- AssetScanEnrichmentSource2["RDAP"] = "rdap";
7591
- AssetScanEnrichmentSource2["HTTP_CONTENT"] = "http_content";
7592
- AssetScanEnrichmentSource2["NETWORK"] = "node_js_network";
7593
- AssetScanEnrichmentSource2["EXTENSION"] = "extension";
7594
- AssetScanEnrichmentSource2["PLAYWRIGHT"] = "playwright";
7595
- AssetScanEnrichmentSource2["CHAINPATROL_BROWSER"] = "chainpatrol_browser";
7596
- AssetScanEnrichmentSource2["STEEL_BROWSER"] = "steel_browser";
7597
- AssetScanEnrichmentSource2["X_API"] = "x_api";
7598
- AssetScanEnrichmentSource2["SOCIALDATA_API"] = "socialdata_api";
7599
- AssetScanEnrichmentSource2["NEYNAR_API"] = "neynar_api";
7600
- AssetScanEnrichmentSource2["TELEGRAM_API"] = "telegram_api";
7601
- AssetScanEnrichmentSource2["INSTAGRAM_API"] = "instagram_api";
7602
- AssetScanEnrichmentSource2["FACEBOOK_API"] = "facebook_api";
7603
- AssetScanEnrichmentSource2["YOUTUBE_API"] = "youtube_api";
7604
- AssetScanEnrichmentSource2["APPLE_APP_STORE_API"] = "apple_app_store_api";
7605
- AssetScanEnrichmentSource2["GOOGLE_PLAY_STORE_API"] = "google_play_store_api";
7606
- AssetScanEnrichmentSource2["MOZILLA_ADDONS_API"] = "mozilla_addons_api";
7607
- AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
7608
- AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
7609
- AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
7610
- AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
7611
- AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
7612
- AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
7613
- AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
7614
- AssetScanEnrichmentSource2["LEETCODE_API"] = "leetcode_api";
7615
- AssetScanEnrichmentSource2["TUMBLR_API"] = "tumblr_api";
7616
- AssetScanEnrichmentSource2["NPM_REGISTRY_API"] = "npm_registry_api";
7617
- AssetScanEnrichmentSource2["PYPI_REGISTRY_API"] = "pypi_registry_api";
7618
- AssetScanEnrichmentSource2["CRATES_IO_API"] = "crates_io_api";
7619
- AssetScanEnrichmentSource2["APIFY_LINKEDIN_API"] = "apify_linkedin_api";
7620
- AssetScanEnrichmentSource2["PUMP_FUN_API"] = "pump_fun_api";
7621
- AssetScanEnrichmentSource2["META_ADS_LIBRARY"] = "meta_ads_library";
7622
- AssetScanEnrichmentSource2["STEEL_META_ADS_LIBRARY"] = "steel_meta_ads_library";
7623
- AssetScanEnrichmentSource2["GOOGLE_ADS_TRANSPARENCY_CENTER"] = "google_ads_transparency_center";
7624
- AssetScanEnrichmentSource2["ADLIBRARY"] = "adlibrary";
7625
- AssetScanEnrichmentSource2["ETHERSCAN_API"] = "etherscan_api";
7626
- return AssetScanEnrichmentSource2;
7627
- })(AssetScanEnrichmentSource || {});
7628
- var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
7629
- ["content_and_metadata" /* CONTENT_AND_METADATA */]: "Content and Metadata",
7630
- ["post" /* TWITTER_POST */]: "Post",
7631
- ["profile" /* TWITTER_PROFILE */]: "Profile",
7632
- ["twitter_followers" /* TWITTER_FOLLOWERS */]: "Twitter Followers",
7633
- ["browser_capture" /* BROWSER_CAPTURE */]: "Browser Capture",
7634
- ["geolocation_and_ip" /* GEOLOCATION_AND_IP */]: "Geolocation and IP",
7635
- ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */]: "Ownership and Registration",
7636
- ["dns" /* DNS */]: "DNS Lookup",
7637
- ["tls" /* TLS */]: "TLS Connection Info",
7638
- ["tcp" /* TCP */]: "TCP Connection Info",
7639
- ["hostname_first_seen" /* HOSTNAME_FIRST_SEEN */]: "Hostname First Seen",
7640
- // Farcaster
7641
- ["cast" /* FARCASTER_CAST */]: "Farcaster Cast",
7642
- ["farcaster_profile" /* FARCASTER_PROFILE */]: "Farcaster Profile",
7643
- ["channel" /* FARCASTER_CHANNEL */]: "Farcaster Channel",
7644
- ["miniapp" /* FARCASTER_MINIAPP */]: "Farcaster MiniApp",
7645
- // Telegram
7646
- ["telegram_profile" /* TELEGRAM_PROFILE */]: "Telegram Profile",
7647
- // Instagram
7648
- ["instagram_profile" /* INSTAGRAM_PROFILE */]: "Instagram Profile",
7649
- // Facebook
7650
- ["facebook_profile" /* FACEBOOK_PROFILE */]: "Facebook Profile",
7651
- // YouTube
7652
- ["youtube_video" /* YOUTUBE_VIDEO */]: "YouTube Video",
7653
- ["youtube_channel" /* YOUTUBE_CHANNEL */]: "YouTube Channel",
7654
- // Apple App Store
7655
- ["apple_app_store_listing" /* APPLE_APP_STORE_LISTING */]: "Apple App Store Listing",
7656
- // Google Play Store
7657
- ["google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */]: "Google Play Store Listing",
7658
- // Mozilla
7659
- ["mozilla_addon" /* MOZILLA_ADDON */]: "Mozilla Add-on",
7660
- // Reddit
7661
- ["reddit_subreddit" /* REDDIT_SUBREDDIT */]: "Reddit Subreddit",
7662
- // Email
7663
- ["email_validation" /* EMAIL_VALIDATION */]: "Email Validation",
7664
- // Phone Number
7665
- ["phone_lookup" /* PHONE_LOOKUP */]: "Phone Lookup",
7666
- // Bilibili
7667
- ["bilibili_video" /* BILIBILI_VIDEO */]: "Bilibili Video",
7668
- ["bilibili_profile" /* BILIBILI_PROFILE */]: "Bilibili Profile",
7669
- // DailyMotion
7670
- ["dailymotion_video" /* DAILYMOTION_VIDEO */]: "DailyMotion Video",
7671
- // Vimeo
7672
- ["vimeo_video" /* VIMEO_VIDEO */]: "Vimeo Video",
7673
- ["vimeo_profile" /* VIMEO_PROFILE */]: "Vimeo Profile",
7674
- // Stackblitz
7675
- ["stackblitz_page" /* STACKBLITZ_PAGE */]: "Stackblitz Page",
7676
- // Leetcode
7677
- ["leetcode_page" /* LEETCODE_PAGE */]: "Leetcode Page",
7678
- // Tumblr
7679
- ["tumblr_blog" /* TUMBLR_BLOG */]: "Tumblr Blog",
7680
- ["tumblr_post" /* TUMBLR_POST */]: "Tumblr Post",
7681
- ["tumblr_community" /* TUMBLR_COMMUNITY */]: "Tumblr Community",
7682
- // NPM
7683
- ["npm_package" /* NPM_PACKAGE */]: "NPM Package",
7684
- // PyPI
7685
- ["pypi_package" /* PYPI_PACKAGE */]: "PyPI Package",
7686
- // Rust Package
7687
- ["rust_package" /* RUST_PACKAGE */]: "Rust Package",
7688
- // LinkedIn
7689
- ["linkedin_profile" /* LINKEDIN_PROFILE */]: "LinkedIn Profile",
7690
- // Pump.fun
7691
- ["pump_fun_token" /* PUMP_FUN_TOKEN */]: "Pump.fun Token",
7692
- // Meta Ads
7693
- ["meta_ad" /* META_AD */]: "Meta Ad",
7694
- // Google Ads
7695
- ["google_ad" /* GOOGLE_AD */]: "Google Ad",
7696
- // Cross-platform ad intelligence
7697
- ["adlibrary_ad" /* ADLIBRARY_AD */]: "AdLibrary Ad",
7698
- // Crypto / Onchain
7699
- ["contract_deployer" /* CONTRACT_DEPLOYER */]: "Contract Deployer"
7700
- };
7701
- var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
7702
- // URL
7703
- ["urlscan" /* URLSCAN */]: "URLScan",
7704
- ["whois" /* WHOIS */]: "Whois",
7705
- ["rdap" /* RDAP */]: "RDAP",
7706
- ["http_content" /* HTTP_CONTENT */]: "HTTP Content",
7707
- ["node_js_network" /* NETWORK */]: "Network",
7708
- ["extension" /* EXTENSION */]: "Browser Extension",
7709
- ["playwright" /* PLAYWRIGHT */]: "Playwright",
7710
- ["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: "ChainPatrol Browser",
7711
- ["steel_browser" /* STEEL_BROWSER */]: "Steel Browser",
7712
- // Twitter
7713
- ["x_api" /* X_API */]: "X API",
7714
- ["socialdata_api" /* SOCIALDATA_API */]: "SocialData API",
7715
- // Farcaster
7716
- ["neynar_api" /* NEYNAR_API */]: "Neynar API",
7717
- // Telegram
7718
- ["telegram_api" /* TELEGRAM_API */]: "Telegram API",
7719
- // Instagram
7720
- ["instagram_api" /* INSTAGRAM_API */]: "Instagram API",
7721
- // Facebook
7722
- ["facebook_api" /* FACEBOOK_API */]: "Facebook API",
7723
- // YouTube
7724
- ["youtube_api" /* YOUTUBE_API */]: "YouTube API",
7725
- // Apple App Store
7726
- ["apple_app_store_api" /* APPLE_APP_STORE_API */]: "Apple App Store API",
7727
- // Google Play Store
7728
- ["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: "Google Play Store API",
7729
- // Mozilla
7730
- ["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: "Mozilla Add-ons API",
7731
- // Reddit
7732
- ["reddit_api" /* REDDIT_API */]: "Reddit API",
7733
- // Email
7734
- ["mails_api" /* MAILS_API */]: "Mails.so API",
7735
- // Phone Number
7736
- ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
7737
- ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
7738
- // DailyMotion
7739
- ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
7740
- // Vimeo
7741
- ["vimeo_api" /* VIMEO_API */]: "Vimeo API",
7742
- // Stackblitz
7743
- ["stackblitz_api" /* STACKBLITZ_API */]: "Stackblitz API",
7744
- // Leetcode
7745
- ["leetcode_api" /* LEETCODE_API */]: "Leetcode API",
7746
- // Tumblr
7747
- ["tumblr_api" /* TUMBLR_API */]: "Tumblr API",
7748
- // NPM
7749
- ["npm_registry_api" /* NPM_REGISTRY_API */]: "NPM Registry API",
7750
- // PyPI
7751
- ["pypi_registry_api" /* PYPI_REGISTRY_API */]: "PyPI Registry API",
7752
- // Rust Package
7753
- ["crates_io_api" /* CRATES_IO_API */]: "Crates.io API",
7754
- // LinkedIn
7755
- ["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: "Apify LinkedIn API",
7756
- // Pump.fun
7757
- ["pump_fun_api" /* PUMP_FUN_API */]: "Pump.fun API",
7758
- // Meta Ads
7759
- ["meta_ads_library" /* META_ADS_LIBRARY */]: "Meta Ads Library",
7760
- ["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: "Steel Meta Ads Library",
7761
- // Google Ads
7762
- ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: "Google Ads Transparency Center",
7763
- // Cross-platform ad intelligence
7764
- ["adlibrary" /* ADLIBRARY */]: "AdLibrary",
7765
- // Crypto / Onchain
7766
- ["etherscan_api" /* ETHERSCAN_API */]: "Etherscan"
7767
- };
7768
- var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
7769
- // URL-related sources
7770
- ["urlscan" /* URLSCAN */]: [
7771
- "browser_capture" /* BROWSER_CAPTURE */,
7772
- "geolocation_and_ip" /* GEOLOCATION_AND_IP */,
7773
- "hostname_first_seen" /* HOSTNAME_FIRST_SEEN */
7774
- ],
7775
- ["whois" /* WHOIS */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
7776
- ["rdap" /* RDAP */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
7777
- ["http_content" /* HTTP_CONTENT */]: [
7778
- "content_and_metadata" /* CONTENT_AND_METADATA */
7779
- ],
7780
- ["node_js_network" /* NETWORK */]: [
7781
- "dns" /* DNS */,
7782
- "tls" /* TLS */,
7783
- "tcp" /* TCP */
7784
- ],
7785
- ["extension" /* EXTENSION */]: [
7786
- "browser_capture" /* BROWSER_CAPTURE */,
7787
- "telegram_profile" /* TELEGRAM_PROFILE */,
7788
- "linkedin_profile" /* LINKEDIN_PROFILE */,
7789
- "instagram_profile" /* INSTAGRAM_PROFILE */,
7790
- "meta_ad" /* META_AD */
7791
- ],
7792
- ["playwright" /* PLAYWRIGHT */]: [
7793
- "browser_capture" /* BROWSER_CAPTURE */,
7794
- "bilibili_video" /* BILIBILI_VIDEO */,
7795
- "bilibili_profile" /* BILIBILI_PROFILE */,
7796
- "telegram_profile" /* TELEGRAM_PROFILE */
7797
- ],
7798
- // Only the generic page capture: the in-house browser does not (yet) run the
7799
- // platform-specific scrapes PLAYWRIGHT does above.
7800
- ["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: [
7801
- "browser_capture" /* BROWSER_CAPTURE */
7802
- ],
7803
- ["steel_browser" /* STEEL_BROWSER */]: ["browser_capture" /* BROWSER_CAPTURE */],
7804
- // Twitter-related sources
7805
- ["x_api" /* X_API */]: [
7806
- "post" /* TWITTER_POST */,
7807
- "profile" /* TWITTER_PROFILE */,
7808
- "twitter_followers" /* TWITTER_FOLLOWERS */
7809
- ],
7810
- ["socialdata_api" /* SOCIALDATA_API */]: [
7811
- "post" /* TWITTER_POST */,
7812
- "profile" /* TWITTER_PROFILE */,
7813
- "twitter_followers" /* TWITTER_FOLLOWERS */
7814
- ],
7815
- // Farcaster-related sources
7816
- ["neynar_api" /* NEYNAR_API */]: [
7817
- "cast" /* FARCASTER_CAST */,
7818
- "farcaster_profile" /* FARCASTER_PROFILE */,
7819
- "channel" /* FARCASTER_CHANNEL */,
7820
- "miniapp" /* FARCASTER_MINIAPP */
7821
- ],
7822
- // Telegram-related sources
7823
- ["telegram_api" /* TELEGRAM_API */]: ["telegram_profile" /* TELEGRAM_PROFILE */],
7824
- // Instagram-related sources
7825
- ["instagram_api" /* INSTAGRAM_API */]: ["instagram_profile" /* INSTAGRAM_PROFILE */],
7826
- // Facebook-related sources
7827
- ["facebook_api" /* FACEBOOK_API */]: ["facebook_profile" /* FACEBOOK_PROFILE */],
7828
- // YouTube-related sources
7829
- ["youtube_api" /* YOUTUBE_API */]: [
7830
- "youtube_video" /* YOUTUBE_VIDEO */,
7831
- "youtube_channel" /* YOUTUBE_CHANNEL */
7832
- ],
7833
- // Apple App Store-related sources
7834
- ["apple_app_store_api" /* APPLE_APP_STORE_API */]: [
7835
- "apple_app_store_listing" /* APPLE_APP_STORE_LISTING */
7836
- ],
7837
- // Google Play Store-related sources
7838
- ["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: [
7839
- "google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */
7840
- ],
7841
- // Mozilla-related sources
7842
- ["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: ["mozilla_addon" /* MOZILLA_ADDON */],
7843
- // Reddit-related sources
7844
- ["reddit_api" /* REDDIT_API */]: ["reddit_subreddit" /* REDDIT_SUBREDDIT */],
7845
- // Email-related sources
7846
- ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
7847
- // Phone Number-related sources
7848
- ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
7849
- ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
7850
- // DailyMotion-related sources
7851
- ["dailymotion_api" /* DAILYMOTION_API */]: [
7852
- "dailymotion_video" /* DAILYMOTION_VIDEO */
7853
- ],
7854
- // Vimeo-related sources
7855
- ["vimeo_api" /* VIMEO_API */]: [
7856
- "vimeo_video" /* VIMEO_VIDEO */,
7857
- "vimeo_profile" /* VIMEO_PROFILE */
7858
- ],
7859
- // Stackblitz-related sources
7860
- ["stackblitz_api" /* STACKBLITZ_API */]: ["stackblitz_page" /* STACKBLITZ_PAGE */],
7861
- // Leetcode-related sources
7862
- ["leetcode_api" /* LEETCODE_API */]: ["leetcode_page" /* LEETCODE_PAGE */],
7863
- // Tumblr-related sources
7864
- ["tumblr_api" /* TUMBLR_API */]: [
7865
- "tumblr_blog" /* TUMBLR_BLOG */,
7866
- "tumblr_post" /* TUMBLR_POST */,
7867
- "tumblr_community" /* TUMBLR_COMMUNITY */
7868
- ],
7869
- // NPM-related sources
7870
- ["npm_registry_api" /* NPM_REGISTRY_API */]: ["npm_package" /* NPM_PACKAGE */],
7871
- // PyPI-related sources
7872
- ["pypi_registry_api" /* PYPI_REGISTRY_API */]: ["pypi_package" /* PYPI_PACKAGE */],
7873
- // Rust Package-related sources
7874
- ["crates_io_api" /* CRATES_IO_API */]: ["rust_package" /* RUST_PACKAGE */],
7875
- // LinkedIn-related sources
7876
- ["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: [
7877
- "linkedin_profile" /* LINKEDIN_PROFILE */
7878
- ],
7879
- // Pump.fun
7880
- ["pump_fun_api" /* PUMP_FUN_API */]: ["pump_fun_token" /* PUMP_FUN_TOKEN */],
7881
- // Meta Ads-related sources
7882
- ["meta_ads_library" /* META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
7883
- ["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
7884
- // Google Ads-related sources
7885
- ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: [
7886
- "google_ad" /* GOOGLE_AD */
7887
- ],
7888
- // Cross-platform ad intelligence sources
7889
- ["adlibrary" /* ADLIBRARY */]: ["adlibrary_ad" /* ADLIBRARY_AD */],
7890
- // Crypto / Onchain sources
7891
- ["etherscan_api" /* ETHERSCAN_API */]: ["contract_deployer" /* CONTRACT_DEPLOYER */]
7892
- };
7893
7569
 
7894
- // ../../internal/utils/src/array.ts
7895
- var array_exports = {};
7896
- __export(array_exports, {
7897
- arraysEqual: () => arraysEqual,
7898
- chunkArray: () => chunkArray,
7899
- combineAndRemoveDuplicatesByKey: () => combineAndRemoveDuplicatesByKey,
7900
- isArray: () => isArray,
7901
- isEmptyArray: () => isEmptyArray,
7902
- isNonEmptyArray: () => isNonEmptyArray,
7903
- randomElement: () => randomElement,
7904
- randomIndex: () => randomIndex,
7905
- removeDuplicates: () => removeDuplicates,
7906
- shuffleInPlace: () => shuffleInPlace,
7907
- shuffled: () => shuffled
7908
- });
7909
- function isArray(value) {
7910
- return Array.isArray(value);
7911
- }
7912
- function isEmptyArray(value) {
7913
- return value.length === 0;
7914
- }
7915
- function isNonEmptyArray(value) {
7916
- return value.length > 0;
7917
- }
7918
- function randomIndex(array) {
7919
- return Math.floor(Math.random() * array.length);
7920
- }
7921
- function randomElement(array) {
7922
- return array[randomIndex(array)];
7923
- }
7924
- function removeDuplicates(array) {
7925
- return Array.from(new Set(array));
7926
- }
7927
- function combineAndRemoveDuplicatesByKey(arr1, arr2, uniqueKey) {
7928
- const combinedArray = [...arr1, ...arr2];
7929
- const uniqueObjects = new Map(
7930
- combinedArray.map((item) => [item[uniqueKey], item])
7931
- );
7932
- return Array.from(uniqueObjects.values());
7933
- }
7934
- function chunkArray(array, chunkSize) {
7935
- const chunks = [];
7936
- for (let i = 0; i < array.length; i += chunkSize) {
7937
- chunks.push(array.slice(i, i + chunkSize));
7570
+ // ../../node_modules/@sindresorhus/slugify/node_modules/escape-string-regexp/index.js
7571
+ function escapeStringRegexp(string) {
7572
+ if (typeof string !== "string") {
7573
+ throw new TypeError("Expected a string");
7938
7574
  }
7939
- return chunks;
7575
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
7940
7576
  }
7941
- function shuffleInPlace(array) {
7942
- for (let i = array.length - 1; i > 0; i--) {
7943
- const j = Math.floor(Math.random() * (i + 1));
7944
- [array[i], array[j]] = [array[j], array[i]];
7577
+
7578
+ // ../../node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp/index.js
7579
+ function escapeStringRegexp2(string) {
7580
+ if (typeof string !== "string") {
7581
+ throw new TypeError("Expected a string");
7945
7582
  }
7946
- }
7947
- function shuffled(array) {
7948
- const newArray = array.slice();
7949
- shuffleInPlace(newArray);
7950
- return newArray;
7951
- }
7952
- function arraysEqual(a, b) {
7953
- if (a.length !== b.length) return false;
7954
- const sortedA = [...a].sort();
7955
- const sortedB = [...b].sort();
7956
- return sortedA.every((val, idx) => val === sortedB[idx]);
7957
- }
7958
-
7959
- // ../../internal/utils/src/cron.ts
7960
- var cron_exports = {};
7961
- __export(cron_exports, {
7962
- cronToHumanReadable: () => cronToHumanReadable,
7963
- isValidCronExpression: () => isValidCronExpression
7964
- });
7965
- var WEEKDAYS = [
7966
- "Sunday",
7967
- "Monday",
7968
- "Tuesday",
7969
- "Wednesday",
7970
- "Thursday",
7971
- "Friday",
7972
- "Saturday"
7973
- ];
7974
- var MONTHS = [
7975
- "January",
7976
- "February",
7977
- "March",
7978
- "April",
7979
- "May",
7980
- "June",
7981
- "July",
7982
- "August",
7983
- "September",
7984
- "October",
7985
- "November",
7986
- "December"
7987
- ];
7988
- function cronToHumanReadable(cronExpression) {
7989
- const [minute, hour, dayOfMonth, month, dayOfWeek2] = cronExpression.split(" ");
7990
- let result = "Runs ";
7991
- if (minute === "*") {
7992
- result += "every minute ";
7993
- } else if (minute.includes("/")) {
7994
- const [, interval] = minute.split("/");
7995
- result += `every ${interval} minutes `;
7996
- } else {
7997
- result += `at minute ${minute} `;
7998
- }
7999
- if (hour !== "*") {
8000
- result += `past hour ${hour} `;
8001
- }
8002
- if (dayOfMonth !== "*") {
8003
- result += `on the ${dayOfMonth}${getDaySuffix(
8004
- parseInt(dayOfMonth)
8005
- )} day of the month `;
8006
- }
8007
- if (month !== "*") {
8008
- const monthNames = month.split(",").map((m) => MONTHS[parseInt(m) - 1]);
8009
- result += `in ${monthNames.join(", ")} `;
8010
- }
8011
- if (dayOfWeek2 !== "*") {
8012
- const dayNames = dayOfWeek2.split(",").map((d) => WEEKDAYS[parseInt(d)]);
8013
- result += `on ${dayNames.join(", ")}`;
8014
- }
8015
- return result.trim();
8016
- }
8017
- function getDaySuffix(day) {
8018
- if (day >= 11 && day <= 13) {
8019
- return "th";
8020
- }
8021
- switch (day % 10) {
8022
- case 1:
8023
- return "st";
8024
- case 2:
8025
- return "nd";
8026
- case 3:
8027
- return "rd";
8028
- default:
8029
- return "th";
8030
- }
8031
- }
8032
- function isValidCronExpression(cronExpression) {
8033
- if (!cronExpression || typeof cronExpression !== "string") {
8034
- return false;
8035
- }
8036
- const parts = cronExpression.trim().split(/\s+/);
8037
- if (parts.length !== 5) {
8038
- return false;
8039
- }
8040
- const [minute, hour, dayOfMonth, month, dayOfWeek2] = parts;
8041
- return isValidCronField(minute, 0, 59) && isValidCronField(hour, 0, 23) && isValidCronField(dayOfMonth, 1, 31) && isValidCronField(month, 1, 12) && isValidCronField(dayOfWeek2, 0, 7);
8042
- }
8043
- function isValidCronField(field, min, max) {
8044
- if (!field) return false;
8045
- if (field === "*") return true;
8046
- if (field.includes("/")) {
8047
- const [range, step] = field.split("/");
8048
- const stepNum = parseInt(step);
8049
- if (isNaN(stepNum) || stepNum <= 0) return false;
8050
- if (range === "*") return true;
8051
- return isValidCronField(range, min, max);
8052
- }
8053
- if (field.includes("-")) {
8054
- const [start, end] = field.split("-");
8055
- const startNum = parseInt(start);
8056
- const endNum = parseInt(end);
8057
- if (isNaN(startNum) || isNaN(endNum)) return false;
8058
- return startNum >= min && startNum <= max && endNum >= min && endNum <= max && startNum <= endNum;
8059
- }
8060
- if (field.includes(",")) {
8061
- const values = field.split(",");
8062
- return values.every((value) => isValidCronField(value.trim(), min, max));
8063
- }
8064
- const num3 = parseInt(field);
8065
- if (isNaN(num3)) return false;
8066
- if (max === 7 && num3 === 7) return true;
8067
- return num3 >= min && num3 <= max;
8068
- }
8069
-
8070
- // ../../internal/utils/src/object.ts
8071
- var object_exports = {};
8072
- __export(object_exports, {
8073
- isDefined: () => isDefined,
8074
- isDefinedAndNotNull: () => isDefinedAndNotNull,
8075
- isNotNull: () => isNotNull
8076
- });
8077
- function isDefined(value) {
8078
- return value !== void 0;
8079
- }
8080
- function isNotNull(value) {
8081
- return value !== null;
8082
- }
8083
- function isDefinedAndNotNull(value) {
8084
- return value !== null && value !== void 0;
8085
- }
8086
-
8087
- // ../../internal/utils/src/promise.ts
8088
- var promise_exports = {};
8089
- __export(promise_exports, {
8090
- allSettledWithConcurrency: () => allSettledWithConcurrency,
8091
- isPromiseSettledResultFulfilled: () => isPromiseSettledResultFulfilled,
8092
- isPromiseSettledResultRejected: () => isPromiseSettledResultRejected
8093
- });
8094
- function isPromiseSettledResultFulfilled(result) {
8095
- return result.status === "fulfilled";
8096
- }
8097
- function isPromiseSettledResultRejected(result) {
8098
- return result.status === "rejected";
8099
- }
8100
- function allSettledWithConcurrency(items, limit, fn5) {
8101
- return __async(this, null, function* () {
8102
- const results = new Array(items.length);
8103
- let next = 0;
8104
- const worker = () => __async(null, null, function* () {
8105
- for (; ; ) {
8106
- const index = next;
8107
- next += 1;
8108
- if (index >= items.length) return;
8109
- try {
8110
- results[index] = { status: "fulfilled", value: yield fn5(items[index], index) };
8111
- } catch (reason) {
8112
- results[index] = { status: "rejected", reason };
8113
- }
8114
- }
8115
- });
8116
- const workers = Math.max(1, Math.min(Math.floor(limit) || 1, items.length));
8117
- yield Promise.all(Array.from({ length: workers }, worker));
8118
- return results;
8119
- });
8120
- }
8121
-
8122
- // ../../internal/utils/src/url.ts
8123
- var url_exports = {};
8124
- __export(url_exports, {
8125
- URL_REGEX: () => URL_REGEX,
8126
- containsPunycode: () => containsPunycode,
8127
- convertHttpsToHttp: () => convertHttpsToHttp,
8128
- ensureHttpsPrefix: () => ensureHttpsPrefix,
8129
- generateCanonicalIPFSUrl: () => generateCanonicalIPFSUrl,
8130
- getDefangedUrl: () => getDefangedUrl,
8131
- getDomain: () => getDomain,
8132
- getFaviconUrl: () => getFaviconUrl,
8133
- getHostname: () => getHostname,
8134
- getNormalizedUrl: () => getNormalizedUrl,
8135
- getParentDomains: () => getParentDomains,
8136
- getRefangedUrl: () => getRefangedUrl,
8137
- isEmail: () => isEmail,
8138
- isUrl: () => isUrl,
8139
- isWalrusSite: () => isWalrusSite,
8140
- removeHttpProtocol: () => removeHttpProtocol,
8141
- sanitizeHttpUrl: () => sanitizeHttpUrl,
8142
- slugify: () => slugify,
8143
- stripDomainWildcardPrefix: () => stripDomainWildcardPrefix,
8144
- toUnicode: () => toUnicode2,
8145
- trimDomainToLevels: () => trimDomainToLevels
8146
- });
8147
-
8148
- // ../../node_modules/@sindresorhus/slugify/node_modules/escape-string-regexp/index.js
8149
- function escapeStringRegexp(string) {
8150
- if (typeof string !== "string") {
8151
- throw new TypeError("Expected a string");
8152
- }
8153
- return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
8154
- }
8155
-
8156
- // ../../node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp/index.js
8157
- function escapeStringRegexp2(string) {
8158
- if (typeof string !== "string") {
8159
- throw new TypeError("Expected a string");
8160
- }
8161
- return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
7583
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
8162
7584
  }
8163
7585
 
8164
7586
  // ../../node_modules/@sindresorhus/transliterate/replacements.js
@@ -10407,302 +9829,970 @@ function preparePhoneInput(input) {
10407
9829
  function isAllSameDigit(digits2) {
10408
9830
  return /^(\d)\1+$/.test(digits2);
10409
9831
  }
10410
- function isStrictlyMonotonicStep1(digits2) {
10411
- if (digits2.length < 8) {
10412
- return false;
10413
- }
10414
- let increasing = true;
10415
- let decreasing = true;
10416
- for (let i = 1; i < digits2.length; i++) {
10417
- const curr = digits2.charCodeAt(i) - 48;
10418
- const prev = digits2.charCodeAt(i - 1) - 48;
10419
- if (curr !== prev + 1) {
10420
- increasing = false;
10421
- }
10422
- if (curr !== prev - 1) {
10423
- decreasing = false;
10424
- }
10425
- }
10426
- return increasing || decreasing;
9832
+ function isStrictlyMonotonicStep1(digits2) {
9833
+ if (digits2.length < 8) {
9834
+ return false;
9835
+ }
9836
+ let increasing = true;
9837
+ let decreasing = true;
9838
+ for (let i = 1; i < digits2.length; i++) {
9839
+ const curr = digits2.charCodeAt(i) - 48;
9840
+ const prev = digits2.charCodeAt(i - 1) - 48;
9841
+ if (curr !== prev + 1) {
9842
+ increasing = false;
9843
+ }
9844
+ if (curr !== prev - 1) {
9845
+ decreasing = false;
9846
+ }
9847
+ }
9848
+ return increasing || decreasing;
9849
+ }
9850
+ function isValidNanpNational10(d10) {
9851
+ if (d10.length !== 10) {
9852
+ return false;
9853
+ }
9854
+ const npaFirst = d10.charCodeAt(0) - 48;
9855
+ const nxxFirst = d10.charCodeAt(3) - 48;
9856
+ if (npaFirst < 2 || npaFirst > 9) {
9857
+ return false;
9858
+ }
9859
+ if (nxxFirst < 2 || nxxFirst > 9) {
9860
+ return false;
9861
+ }
9862
+ return true;
9863
+ }
9864
+ function isPlausiblePhoneDigits(withoutExt) {
9865
+ const hasPlus = withoutExt.startsWith("+");
9866
+ const d = withoutExt.replace(/\D/g, "");
9867
+ if (d.length < 8 || d.length > 15) {
9868
+ return false;
9869
+ }
9870
+ if (isAllSameDigit(d) || isStrictlyMonotonicStep1(d)) {
9871
+ return false;
9872
+ }
9873
+ const onlyDigits = /^\d+$/.test(withoutExt);
9874
+ if (hasPlus) {
9875
+ if (d.length === 11 && d.startsWith("1")) {
9876
+ return isValidNanpNational10(d.slice(1));
9877
+ }
9878
+ return true;
9879
+ }
9880
+ if (onlyDigits) {
9881
+ if (d.length === 10) {
9882
+ return isValidNanpNational10(d);
9883
+ }
9884
+ if (d.length === 11 && d.startsWith("1")) {
9885
+ return isValidNanpNational10(d.slice(1));
9886
+ }
9887
+ if (d.length === 11 && d.startsWith("0")) {
9888
+ return true;
9889
+ }
9890
+ return false;
9891
+ }
9892
+ if (d.length === 10) {
9893
+ return isValidNanpNational10(d);
9894
+ }
9895
+ if (d.length === 11 && d.startsWith("1")) {
9896
+ return isValidNanpNational10(d.slice(1));
9897
+ }
9898
+ if (d.length === 11 && d.startsWith("0")) {
9899
+ return true;
9900
+ }
9901
+ if (d.length >= 12 && d.length <= 15) {
9902
+ return true;
9903
+ }
9904
+ return false;
9905
+ }
9906
+ function isPhoneNumber(input) {
9907
+ const trimmed = preparePhoneInput(input);
9908
+ if (trimmed === "") {
9909
+ return false;
9910
+ }
9911
+ if (!/^[+\d(]/.test(trimmed)) {
9912
+ return false;
9913
+ }
9914
+ const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
9915
+ if (/[a-zA-Z]/.test(withoutExt)) {
9916
+ return false;
9917
+ }
9918
+ const hasPhoneMarker = /[+()\s-]/.test(trimmed);
9919
+ const isPureDotSeparated = /^\d+(\.\d+)+$/.test(trimmed);
9920
+ if (isPureDotSeparated && !hasPhoneMarker) {
9921
+ return false;
9922
+ }
9923
+ const phoneRegex = /^(?:\+?\d{1,4}[\s.-]?)?(?:\(\d{1,4}\)|\d{1,4})[\s.-]?\d{1,4}[\s.-]?\d{1,4}[\s.-]?\d{0,4}(?:\s*(?:ext|x|extension)[\s.]*\d{1,6})?$/i;
9924
+ if (!phoneRegex.test(trimmed)) {
9925
+ return false;
9926
+ }
9927
+ return isPlausiblePhoneDigits(withoutExt);
9928
+ }
9929
+ function normalizePhoneNumber(phone) {
9930
+ const trimmed = preparePhoneInput(phone);
9931
+ const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
9932
+ const hasPlus = withoutExt.startsWith("+");
9933
+ const digitsOnly = withoutExt.replace(/\D/g, "");
9934
+ return hasPlus ? `+${digitsOnly}` : digitsOnly;
9935
+ }
9936
+
9937
+ // ../../internal/utils/src/punycode.ts
9938
+ var maxInt = 2147483647;
9939
+ var base = 36;
9940
+ var tMin = 1;
9941
+ var tMax = 26;
9942
+ var skew = 38;
9943
+ var damp = 700;
9944
+ var initialBias = 72;
9945
+ var initialN = 128;
9946
+ var delimiter = "-";
9947
+ var regexPunycode = /^xn--/;
9948
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
9949
+ var errors = {
9950
+ overflow: "Overflow: input needs wider integers to process",
9951
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
9952
+ "invalid-input": "Invalid input"
9953
+ };
9954
+ var baseMinusTMin = base - tMin;
9955
+ var floor = Math.floor;
9956
+ function error(type) {
9957
+ throw new RangeError(errors[type]);
9958
+ }
9959
+ function mapDomain(domain, callback) {
9960
+ const parts = domain.split("@");
9961
+ let result = "";
9962
+ if (parts.length > 1) {
9963
+ result = parts[0] + "@";
9964
+ domain = parts[1];
9965
+ }
9966
+ domain = domain.replace(regexSeparators, ".");
9967
+ const labels = domain.split(".");
9968
+ const encoded = labels.map(callback).join(".");
9969
+ return result + encoded;
9970
+ }
9971
+ function basicToDigit(codePoint) {
9972
+ if (codePoint >= 48 && codePoint < 58) {
9973
+ return 26 + (codePoint - 48);
9974
+ }
9975
+ if (codePoint >= 65 && codePoint < 91) {
9976
+ return codePoint - 65;
9977
+ }
9978
+ if (codePoint >= 97 && codePoint < 123) {
9979
+ return codePoint - 97;
9980
+ }
9981
+ return base;
9982
+ }
9983
+ function adapt(delta, numPoints, firstTime) {
9984
+ let k4 = 0;
9985
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
9986
+ delta += floor(delta / numPoints);
9987
+ for (
9988
+ ;
9989
+ /* no initialization */
9990
+ delta > baseMinusTMin * tMax >> 1;
9991
+ k4 += base
9992
+ ) {
9993
+ delta = floor(delta / baseMinusTMin);
9994
+ }
9995
+ return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
9996
+ }
9997
+ function decode(input) {
9998
+ const output = [];
9999
+ const inputLength = input.length;
10000
+ let i = 0;
10001
+ let n2 = initialN;
10002
+ let bias2 = initialBias;
10003
+ let basic = input.lastIndexOf(delimiter);
10004
+ if (basic < 0) {
10005
+ basic = 0;
10006
+ }
10007
+ for (let j = 0; j < basic; ++j) {
10008
+ if (input.charCodeAt(j) >= 128) {
10009
+ error("not-basic");
10010
+ }
10011
+ output.push(input.charCodeAt(j));
10012
+ }
10013
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10014
+ const oldi = i;
10015
+ for (let w = 1, k4 = base; ; k4 += base) {
10016
+ if (index >= inputLength) {
10017
+ error("invalid-input");
10018
+ }
10019
+ const digit = basicToDigit(input.charCodeAt(index++));
10020
+ if (digit >= base) {
10021
+ error("invalid-input");
10022
+ }
10023
+ if (digit > floor((maxInt - i) / w)) {
10024
+ error("overflow");
10025
+ }
10026
+ i += digit * w;
10027
+ const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10028
+ if (digit < t) {
10029
+ break;
10030
+ }
10031
+ const baseMinusT = base - t;
10032
+ if (w > floor(maxInt / baseMinusT)) {
10033
+ error("overflow");
10034
+ }
10035
+ w *= baseMinusT;
10036
+ }
10037
+ const out = output.length + 1;
10038
+ bias2 = adapt(i - oldi, out, oldi == 0);
10039
+ if (floor(i / out) > maxInt - n2) {
10040
+ error("overflow");
10041
+ }
10042
+ n2 += floor(i / out);
10043
+ i %= out;
10044
+ output.splice(i++, 0, n2);
10045
+ }
10046
+ return String.fromCodePoint(...output);
10047
+ }
10048
+ function toUnicode(input) {
10049
+ return mapDomain(input, function(string) {
10050
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10051
+ });
10052
+ }
10053
+
10054
+ // ../../internal/utils/src/url.ts
10055
+ function isEmail(input) {
10056
+ if (input.trim() === "") {
10057
+ return false;
10058
+ }
10059
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10060
+ return emailRegex.test(input);
10061
+ }
10062
+ function removeHttpProtocol(input) {
10063
+ return input.replace(/^https?:\/\//, "");
10064
+ }
10065
+ function stripDomainWildcardPrefix(domain) {
10066
+ const trimmedDomain = domain.trim();
10067
+ const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10068
+ return strippedDomain.length > 0 ? strippedDomain : null;
10069
+ }
10070
+ function getDefangedUrl(input) {
10071
+ if (!isUrl(input)) {
10072
+ console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10073
+ return input;
10074
+ }
10075
+ return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10076
+ }
10077
+ function getRefangedUrl(input) {
10078
+ return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10079
+ }
10080
+ function containsPunycode(url) {
10081
+ return url.indexOf("xn--") !== -1;
10082
+ }
10083
+ function toUnicode2(url) {
10084
+ return toUnicode(url);
10085
+ }
10086
+ function convertHttpsToHttp(url) {
10087
+ if (url.startsWith("https://")) {
10088
+ const httpUrl = new URL(url);
10089
+ httpUrl.protocol = "http:";
10090
+ return httpUrl.toString();
10091
+ }
10092
+ throw new Error(`URL is not HTTPS: ${url}`);
10093
+ }
10094
+ function generateCanonicalIPFSUrl(content) {
10095
+ if (!content) {
10096
+ return content;
10097
+ }
10098
+ if (content.includes("ipfs.io")) {
10099
+ return content;
10100
+ }
10101
+ if (content.startsWith("Qm") || content.startsWith("bafy")) {
10102
+ return `ipfs.io/ipfs/${content}`;
10103
+ }
10104
+ return content;
10105
+ }
10106
+ function isWalrusSite(content) {
10107
+ return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
10108
+ }
10109
+ function getFaviconUrl(content) {
10110
+ const normalizedUrl = getNormalizedUrl(content);
10111
+ return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
10112
+ }
10113
+ function sanitizeHttpUrl(value) {
10114
+ if (typeof value !== "string" || value.length === 0) {
10115
+ return null;
10116
+ }
10117
+ try {
10118
+ const parsed = new URL(value);
10119
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
10120
+ return null;
10121
+ }
10122
+ return parsed.toString();
10123
+ } catch (e4) {
10124
+ return null;
10125
+ }
10126
+ }
10127
+ var SCHEME_PREFIX_REGEX = /^[a-z][a-z0-9+.-]*:\/\//i;
10128
+ function getPublicHostname(input) {
10129
+ try {
10130
+ const trimmed = input.trim();
10131
+ const hasHttpScheme = /^https?:\/\//i.test(trimmed);
10132
+ if (!hasHttpScheme && SCHEME_PREFIX_REGEX.test(trimmed)) {
10133
+ return null;
10134
+ }
10135
+ const withScheme = hasHttpScheme ? trimmed : `https://${trimmed}`;
10136
+ const afterScheme = withScheme.replace(SCHEME_PREFIX_REGEX, "");
10137
+ const authority = afterScheme.split(/[/?#\\]/)[0];
10138
+ const remainder = afterScheme.slice(authority.length);
10139
+ if (remainder !== "" && remainder !== "/") {
10140
+ return null;
10141
+ }
10142
+ if (!/^[\p{L}\p{N}.-]+$/u.test(authority)) {
10143
+ return null;
10144
+ }
10145
+ const url = new URL(withScheme);
10146
+ const host = url.hostname.toLowerCase().replace(/\.$/, "");
10147
+ if (host.split(".").includes("")) {
10148
+ return null;
10149
+ }
10150
+ const parsed = parse$1(host);
10151
+ if (parsed.isIp || !parsed.isIcann || !parsed.domain) {
10152
+ return null;
10153
+ }
10154
+ return host;
10155
+ } catch (e4) {
10156
+ return null;
10157
+ }
10158
+ }
10159
+ var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
10160
+
10161
+ // ../../internal/utils/src/enrichments.ts
10162
+ var enrichments_exports = {};
10163
+ __export(enrichments_exports, {
10164
+ ASSET_SCAN_ENRICHMENT_SOURCE_LABELS: () => ASSET_SCAN_ENRICHMENT_SOURCE_LABELS,
10165
+ ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES: () => ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES,
10166
+ ASSET_SCAN_ENRICHMENT_TYPE_LABELS: () => ASSET_SCAN_ENRICHMENT_TYPE_LABELS,
10167
+ AssetScanEnrichmentSource: () => AssetScanEnrichmentSource,
10168
+ AssetScanEnrichmentType: () => AssetScanEnrichmentType
10169
+ });
10170
+ var AssetScanEnrichmentType = /* @__PURE__ */ ((AssetScanEnrichmentType2) => {
10171
+ AssetScanEnrichmentType2["CONTENT_AND_METADATA"] = "content_and_metadata";
10172
+ AssetScanEnrichmentType2["BROWSER_CAPTURE"] = "browser_capture";
10173
+ AssetScanEnrichmentType2["OWNERSHIP_AND_REGISTRATION"] = "ownership_and_registration";
10174
+ AssetScanEnrichmentType2["GEOLOCATION_AND_IP"] = "geolocation_and_ip";
10175
+ AssetScanEnrichmentType2["DNS"] = "dns";
10176
+ AssetScanEnrichmentType2["TLS"] = "tls";
10177
+ AssetScanEnrichmentType2["TCP"] = "tcp";
10178
+ AssetScanEnrichmentType2["HOSTNAME_FIRST_SEEN"] = "hostname_first_seen";
10179
+ AssetScanEnrichmentType2["TWITTER_POST"] = "post";
10180
+ AssetScanEnrichmentType2["TWITTER_PROFILE"] = "profile";
10181
+ AssetScanEnrichmentType2["TWITTER_FOLLOWERS"] = "twitter_followers";
10182
+ AssetScanEnrichmentType2["FARCASTER_CAST"] = "cast";
10183
+ AssetScanEnrichmentType2["FARCASTER_PROFILE"] = "farcaster_profile";
10184
+ AssetScanEnrichmentType2["FARCASTER_CHANNEL"] = "channel";
10185
+ AssetScanEnrichmentType2["FARCASTER_MINIAPP"] = "miniapp";
10186
+ AssetScanEnrichmentType2["TELEGRAM_PROFILE"] = "telegram_profile";
10187
+ AssetScanEnrichmentType2["INSTAGRAM_PROFILE"] = "instagram_profile";
10188
+ AssetScanEnrichmentType2["FACEBOOK_PROFILE"] = "facebook_profile";
10189
+ AssetScanEnrichmentType2["YOUTUBE_VIDEO"] = "youtube_video";
10190
+ AssetScanEnrichmentType2["YOUTUBE_CHANNEL"] = "youtube_channel";
10191
+ AssetScanEnrichmentType2["APPLE_APP_STORE_LISTING"] = "apple_app_store_listing";
10192
+ AssetScanEnrichmentType2["GOOGLE_PLAY_STORE_LISTING"] = "google_play_store_listing";
10193
+ AssetScanEnrichmentType2["MOZILLA_ADDON"] = "mozilla_addon";
10194
+ AssetScanEnrichmentType2["GITHUB_COMMENT"] = "github_comment";
10195
+ AssetScanEnrichmentType2["REDDIT_SUBREDDIT"] = "reddit_subreddit";
10196
+ AssetScanEnrichmentType2["EMAIL_VALIDATION"] = "email_validation";
10197
+ AssetScanEnrichmentType2["PHONE_LOOKUP"] = "phone_lookup";
10198
+ AssetScanEnrichmentType2["BILIBILI_VIDEO"] = "bilibili_video";
10199
+ AssetScanEnrichmentType2["BILIBILI_PROFILE"] = "bilibili_profile";
10200
+ AssetScanEnrichmentType2["DAILYMOTION_VIDEO"] = "dailymotion_video";
10201
+ AssetScanEnrichmentType2["VIMEO_VIDEO"] = "vimeo_video";
10202
+ AssetScanEnrichmentType2["VIMEO_PROFILE"] = "vimeo_profile";
10203
+ AssetScanEnrichmentType2["STACKBLITZ_PAGE"] = "stackblitz_page";
10204
+ AssetScanEnrichmentType2["LEETCODE_PAGE"] = "leetcode_page";
10205
+ AssetScanEnrichmentType2["TUMBLR_BLOG"] = "tumblr_blog";
10206
+ AssetScanEnrichmentType2["TUMBLR_POST"] = "tumblr_post";
10207
+ AssetScanEnrichmentType2["TUMBLR_COMMUNITY"] = "tumblr_community";
10208
+ AssetScanEnrichmentType2["NPM_PACKAGE"] = "npm_package";
10209
+ AssetScanEnrichmentType2["PYPI_PACKAGE"] = "pypi_package";
10210
+ AssetScanEnrichmentType2["RUST_PACKAGE"] = "rust_package";
10211
+ AssetScanEnrichmentType2["LINKEDIN_PROFILE"] = "linkedin_profile";
10212
+ AssetScanEnrichmentType2["PUMP_FUN_TOKEN"] = "pump_fun_token";
10213
+ AssetScanEnrichmentType2["META_AD"] = "meta_ad";
10214
+ AssetScanEnrichmentType2["GOOGLE_AD"] = "google_ad";
10215
+ AssetScanEnrichmentType2["ADLIBRARY_AD"] = "adlibrary_ad";
10216
+ AssetScanEnrichmentType2["CONTRACT_DEPLOYER"] = "contract_deployer";
10217
+ AssetScanEnrichmentType2["THREAT_INTEL"] = "threat_intel";
10218
+ AssetScanEnrichmentType2["LIST_MEMBERSHIP"] = "list_membership";
10219
+ AssetScanEnrichmentType2["THREAT_SCORE"] = "threat_score";
10220
+ return AssetScanEnrichmentType2;
10221
+ })(AssetScanEnrichmentType || {});
10222
+ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) => {
10223
+ AssetScanEnrichmentSource2["URLSCAN"] = "urlscan";
10224
+ AssetScanEnrichmentSource2["WHOIS"] = "whois";
10225
+ AssetScanEnrichmentSource2["RDAP"] = "rdap";
10226
+ AssetScanEnrichmentSource2["HTTP_CONTENT"] = "http_content";
10227
+ AssetScanEnrichmentSource2["NETWORK"] = "node_js_network";
10228
+ AssetScanEnrichmentSource2["EXTENSION"] = "extension";
10229
+ AssetScanEnrichmentSource2["PLAYWRIGHT"] = "playwright";
10230
+ AssetScanEnrichmentSource2["CHAINPATROL_BROWSER"] = "chainpatrol_browser";
10231
+ AssetScanEnrichmentSource2["STEEL_BROWSER"] = "steel_browser";
10232
+ AssetScanEnrichmentSource2["X_API"] = "x_api";
10233
+ AssetScanEnrichmentSource2["SOCIALDATA_API"] = "socialdata_api";
10234
+ AssetScanEnrichmentSource2["NEYNAR_API"] = "neynar_api";
10235
+ AssetScanEnrichmentSource2["TELEGRAM_API"] = "telegram_api";
10236
+ AssetScanEnrichmentSource2["INSTAGRAM_API"] = "instagram_api";
10237
+ AssetScanEnrichmentSource2["FACEBOOK_API"] = "facebook_api";
10238
+ AssetScanEnrichmentSource2["YOUTUBE_API"] = "youtube_api";
10239
+ AssetScanEnrichmentSource2["APPLE_APP_STORE_API"] = "apple_app_store_api";
10240
+ AssetScanEnrichmentSource2["GOOGLE_PLAY_STORE_API"] = "google_play_store_api";
10241
+ AssetScanEnrichmentSource2["MOZILLA_ADDONS_API"] = "mozilla_addons_api";
10242
+ AssetScanEnrichmentSource2["GITHUB_API"] = "github_api";
10243
+ AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
10244
+ AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
10245
+ AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
10246
+ AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
10247
+ AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
10248
+ AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
10249
+ AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
10250
+ AssetScanEnrichmentSource2["LEETCODE_API"] = "leetcode_api";
10251
+ AssetScanEnrichmentSource2["TUMBLR_API"] = "tumblr_api";
10252
+ AssetScanEnrichmentSource2["NPM_REGISTRY_API"] = "npm_registry_api";
10253
+ AssetScanEnrichmentSource2["PYPI_REGISTRY_API"] = "pypi_registry_api";
10254
+ AssetScanEnrichmentSource2["CRATES_IO_API"] = "crates_io_api";
10255
+ AssetScanEnrichmentSource2["APIFY_LINKEDIN_API"] = "apify_linkedin_api";
10256
+ AssetScanEnrichmentSource2["PUMP_FUN_API"] = "pump_fun_api";
10257
+ AssetScanEnrichmentSource2["META_ADS_LIBRARY"] = "meta_ads_library";
10258
+ AssetScanEnrichmentSource2["STEEL_META_ADS_LIBRARY"] = "steel_meta_ads_library";
10259
+ AssetScanEnrichmentSource2["GOOGLE_ADS_TRANSPARENCY_CENTER"] = "google_ads_transparency_center";
10260
+ AssetScanEnrichmentSource2["ADLIBRARY"] = "adlibrary";
10261
+ AssetScanEnrichmentSource2["ETHERSCAN_API"] = "etherscan_api";
10262
+ AssetScanEnrichmentSource2["GOOGLE_WEB_RISK"] = "google_web_risk";
10263
+ AssetScanEnrichmentSource2["SEAL_ISAC"] = "seal_isac";
10264
+ AssetScanEnrichmentSource2["ETH_PHISHING_DETECT"] = "eth_phishing_detect";
10265
+ AssetScanEnrichmentSource2["POLKADOT_PHISHING"] = "polkadot_phishing";
10266
+ AssetScanEnrichmentSource2["TRANCO"] = "tranco";
10267
+ AssetScanEnrichmentSource2["UMBRELLA"] = "umbrella";
10268
+ AssetScanEnrichmentSource2["OPEN_PAGE_RANK"] = "open_page_rank";
10269
+ AssetScanEnrichmentSource2["DEFILLAMA"] = "defillama";
10270
+ AssetScanEnrichmentSource2["VERCEL_DOMAINS"] = "vercel_domains";
10271
+ return AssetScanEnrichmentSource2;
10272
+ })(AssetScanEnrichmentSource || {});
10273
+ var ASSET_SCAN_ENRICHMENT_TYPE_LABELS = {
10274
+ ["content_and_metadata" /* CONTENT_AND_METADATA */]: "Content and Metadata",
10275
+ ["post" /* TWITTER_POST */]: "Post",
10276
+ ["profile" /* TWITTER_PROFILE */]: "Profile",
10277
+ ["twitter_followers" /* TWITTER_FOLLOWERS */]: "Twitter Followers",
10278
+ ["browser_capture" /* BROWSER_CAPTURE */]: "Browser Capture",
10279
+ ["geolocation_and_ip" /* GEOLOCATION_AND_IP */]: "Geolocation and IP",
10280
+ ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */]: "Ownership and Registration",
10281
+ ["dns" /* DNS */]: "DNS Lookup",
10282
+ ["tls" /* TLS */]: "TLS Connection Info",
10283
+ ["tcp" /* TCP */]: "TCP Connection Info",
10284
+ ["hostname_first_seen" /* HOSTNAME_FIRST_SEEN */]: "Hostname First Seen",
10285
+ // Farcaster
10286
+ ["cast" /* FARCASTER_CAST */]: "Farcaster Cast",
10287
+ ["farcaster_profile" /* FARCASTER_PROFILE */]: "Farcaster Profile",
10288
+ ["channel" /* FARCASTER_CHANNEL */]: "Farcaster Channel",
10289
+ ["miniapp" /* FARCASTER_MINIAPP */]: "Farcaster MiniApp",
10290
+ // Telegram
10291
+ ["telegram_profile" /* TELEGRAM_PROFILE */]: "Telegram Profile",
10292
+ // Instagram
10293
+ ["instagram_profile" /* INSTAGRAM_PROFILE */]: "Instagram Profile",
10294
+ // Facebook
10295
+ ["facebook_profile" /* FACEBOOK_PROFILE */]: "Facebook Profile",
10296
+ // YouTube
10297
+ ["youtube_video" /* YOUTUBE_VIDEO */]: "YouTube Video",
10298
+ ["youtube_channel" /* YOUTUBE_CHANNEL */]: "YouTube Channel",
10299
+ // Apple App Store
10300
+ ["apple_app_store_listing" /* APPLE_APP_STORE_LISTING */]: "Apple App Store Listing",
10301
+ // Google Play Store
10302
+ ["google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */]: "Google Play Store Listing",
10303
+ // Mozilla
10304
+ ["mozilla_addon" /* MOZILLA_ADDON */]: "Mozilla Add-on",
10305
+ // GitHub
10306
+ ["github_comment" /* GITHUB_COMMENT */]: "GitHub Comment",
10307
+ // Reddit
10308
+ ["reddit_subreddit" /* REDDIT_SUBREDDIT */]: "Reddit Subreddit",
10309
+ // Email
10310
+ ["email_validation" /* EMAIL_VALIDATION */]: "Email Validation",
10311
+ // Phone Number
10312
+ ["phone_lookup" /* PHONE_LOOKUP */]: "Phone Lookup",
10313
+ // Bilibili
10314
+ ["bilibili_video" /* BILIBILI_VIDEO */]: "Bilibili Video",
10315
+ ["bilibili_profile" /* BILIBILI_PROFILE */]: "Bilibili Profile",
10316
+ // DailyMotion
10317
+ ["dailymotion_video" /* DAILYMOTION_VIDEO */]: "DailyMotion Video",
10318
+ // Vimeo
10319
+ ["vimeo_video" /* VIMEO_VIDEO */]: "Vimeo Video",
10320
+ ["vimeo_profile" /* VIMEO_PROFILE */]: "Vimeo Profile",
10321
+ // Stackblitz
10322
+ ["stackblitz_page" /* STACKBLITZ_PAGE */]: "Stackblitz Page",
10323
+ // Leetcode
10324
+ ["leetcode_page" /* LEETCODE_PAGE */]: "Leetcode Page",
10325
+ // Tumblr
10326
+ ["tumblr_blog" /* TUMBLR_BLOG */]: "Tumblr Blog",
10327
+ ["tumblr_post" /* TUMBLR_POST */]: "Tumblr Post",
10328
+ ["tumblr_community" /* TUMBLR_COMMUNITY */]: "Tumblr Community",
10329
+ // NPM
10330
+ ["npm_package" /* NPM_PACKAGE */]: "NPM Package",
10331
+ // PyPI
10332
+ ["pypi_package" /* PYPI_PACKAGE */]: "PyPI Package",
10333
+ // Rust Package
10334
+ ["rust_package" /* RUST_PACKAGE */]: "Rust Package",
10335
+ // LinkedIn
10336
+ ["linkedin_profile" /* LINKEDIN_PROFILE */]: "LinkedIn Profile",
10337
+ // Pump.fun
10338
+ ["pump_fun_token" /* PUMP_FUN_TOKEN */]: "Pump.fun Token",
10339
+ // Meta Ads
10340
+ ["meta_ad" /* META_AD */]: "Meta Ad",
10341
+ // Google Ads
10342
+ ["google_ad" /* GOOGLE_AD */]: "Google Ad",
10343
+ // Cross-platform ad intelligence
10344
+ ["adlibrary_ad" /* ADLIBRARY_AD */]: "AdLibrary Ad",
10345
+ // Crypto / Onchain
10346
+ ["contract_deployer" /* CONTRACT_DEPLOYER */]: "Contract Deployer",
10347
+ // URL reputation
10348
+ ["threat_intel" /* THREAT_INTEL */]: "Threat Intelligence",
10349
+ ["list_membership" /* LIST_MEMBERSHIP */]: "List Membership",
10350
+ ["threat_score" /* THREAT_SCORE */]: "Threat Score"
10351
+ };
10352
+ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
10353
+ // URL
10354
+ ["urlscan" /* URLSCAN */]: "URLScan",
10355
+ ["whois" /* WHOIS */]: "Whois",
10356
+ ["rdap" /* RDAP */]: "RDAP",
10357
+ ["http_content" /* HTTP_CONTENT */]: "HTTP Content",
10358
+ ["node_js_network" /* NETWORK */]: "Network",
10359
+ ["extension" /* EXTENSION */]: "Browser Extension",
10360
+ ["playwright" /* PLAYWRIGHT */]: "Playwright",
10361
+ ["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: "ChainPatrol Browser",
10362
+ ["steel_browser" /* STEEL_BROWSER */]: "Steel Browser",
10363
+ // Twitter
10364
+ ["x_api" /* X_API */]: "X API",
10365
+ ["socialdata_api" /* SOCIALDATA_API */]: "SocialData API",
10366
+ // Farcaster
10367
+ ["neynar_api" /* NEYNAR_API */]: "Neynar API",
10368
+ // Telegram
10369
+ ["telegram_api" /* TELEGRAM_API */]: "Telegram API",
10370
+ // Instagram
10371
+ ["instagram_api" /* INSTAGRAM_API */]: "Instagram API",
10372
+ // Facebook
10373
+ ["facebook_api" /* FACEBOOK_API */]: "Facebook API",
10374
+ // YouTube
10375
+ ["youtube_api" /* YOUTUBE_API */]: "YouTube API",
10376
+ // Apple App Store
10377
+ ["apple_app_store_api" /* APPLE_APP_STORE_API */]: "Apple App Store API",
10378
+ // Google Play Store
10379
+ ["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: "Google Play Store API",
10380
+ // Mozilla
10381
+ ["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: "Mozilla Add-ons API",
10382
+ // GitHub
10383
+ ["github_api" /* GITHUB_API */]: "GitHub API",
10384
+ // Reddit
10385
+ ["reddit_api" /* REDDIT_API */]: "Reddit API",
10386
+ // Email
10387
+ ["mails_api" /* MAILS_API */]: "Mails.so API",
10388
+ // Phone Number
10389
+ ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
10390
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
10391
+ // DailyMotion
10392
+ ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
10393
+ // Vimeo
10394
+ ["vimeo_api" /* VIMEO_API */]: "Vimeo API",
10395
+ // Stackblitz
10396
+ ["stackblitz_api" /* STACKBLITZ_API */]: "Stackblitz API",
10397
+ // Leetcode
10398
+ ["leetcode_api" /* LEETCODE_API */]: "Leetcode API",
10399
+ // Tumblr
10400
+ ["tumblr_api" /* TUMBLR_API */]: "Tumblr API",
10401
+ // NPM
10402
+ ["npm_registry_api" /* NPM_REGISTRY_API */]: "NPM Registry API",
10403
+ // PyPI
10404
+ ["pypi_registry_api" /* PYPI_REGISTRY_API */]: "PyPI Registry API",
10405
+ // Rust Package
10406
+ ["crates_io_api" /* CRATES_IO_API */]: "Crates.io API",
10407
+ // LinkedIn
10408
+ ["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: "Apify LinkedIn API",
10409
+ // Pump.fun
10410
+ ["pump_fun_api" /* PUMP_FUN_API */]: "Pump.fun API",
10411
+ // Meta Ads
10412
+ ["meta_ads_library" /* META_ADS_LIBRARY */]: "Meta Ads Library",
10413
+ ["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: "Steel Meta Ads Library",
10414
+ // Google Ads
10415
+ ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: "Google Ads Transparency Center",
10416
+ // Cross-platform ad intelligence
10417
+ ["adlibrary" /* ADLIBRARY */]: "AdLibrary",
10418
+ // Crypto / Onchain
10419
+ ["etherscan_api" /* ETHERSCAN_API */]: "Etherscan",
10420
+ // URL reputation
10421
+ ["google_web_risk" /* GOOGLE_WEB_RISK */]: "Google Web Risk",
10422
+ ["seal_isac" /* SEAL_ISAC */]: "SEAL-ISAC",
10423
+ ["eth_phishing_detect" /* ETH_PHISHING_DETECT */]: "eth-phishing-detect",
10424
+ ["polkadot_phishing" /* POLKADOT_PHISHING */]: "Polkadot Phishing",
10425
+ ["tranco" /* TRANCO */]: "Tranco",
10426
+ ["umbrella" /* UMBRELLA */]: "Cisco Umbrella",
10427
+ ["open_page_rank" /* OPEN_PAGE_RANK */]: "Open Page Rank",
10428
+ ["defillama" /* DEFILLAMA */]: "DefiLlama",
10429
+ ["vercel_domains" /* VERCEL_DOMAINS */]: "Vercel Domains"
10430
+ };
10431
+ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
10432
+ // URL-related sources
10433
+ ["urlscan" /* URLSCAN */]: [
10434
+ "browser_capture" /* BROWSER_CAPTURE */,
10435
+ "geolocation_and_ip" /* GEOLOCATION_AND_IP */,
10436
+ "hostname_first_seen" /* HOSTNAME_FIRST_SEEN */
10437
+ ],
10438
+ ["whois" /* WHOIS */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
10439
+ ["rdap" /* RDAP */]: ["ownership_and_registration" /* OWNERSHIP_AND_REGISTRATION */],
10440
+ ["http_content" /* HTTP_CONTENT */]: [
10441
+ "content_and_metadata" /* CONTENT_AND_METADATA */
10442
+ ],
10443
+ ["node_js_network" /* NETWORK */]: [
10444
+ "dns" /* DNS */,
10445
+ "tls" /* TLS */,
10446
+ "tcp" /* TCP */
10447
+ ],
10448
+ ["extension" /* EXTENSION */]: [
10449
+ "browser_capture" /* BROWSER_CAPTURE */,
10450
+ "telegram_profile" /* TELEGRAM_PROFILE */,
10451
+ "linkedin_profile" /* LINKEDIN_PROFILE */,
10452
+ "instagram_profile" /* INSTAGRAM_PROFILE */,
10453
+ "meta_ad" /* META_AD */
10454
+ ],
10455
+ ["playwright" /* PLAYWRIGHT */]: [
10456
+ "browser_capture" /* BROWSER_CAPTURE */,
10457
+ "bilibili_video" /* BILIBILI_VIDEO */,
10458
+ "bilibili_profile" /* BILIBILI_PROFILE */,
10459
+ "telegram_profile" /* TELEGRAM_PROFILE */
10460
+ ],
10461
+ // Only the generic page capture: the in-house browser does not (yet) run the
10462
+ // platform-specific scrapes PLAYWRIGHT does above.
10463
+ ["chainpatrol_browser" /* CHAINPATROL_BROWSER */]: [
10464
+ "browser_capture" /* BROWSER_CAPTURE */
10465
+ ],
10466
+ ["steel_browser" /* STEEL_BROWSER */]: ["browser_capture" /* BROWSER_CAPTURE */],
10467
+ // Twitter-related sources
10468
+ ["x_api" /* X_API */]: [
10469
+ "post" /* TWITTER_POST */,
10470
+ "profile" /* TWITTER_PROFILE */,
10471
+ "twitter_followers" /* TWITTER_FOLLOWERS */
10472
+ ],
10473
+ ["socialdata_api" /* SOCIALDATA_API */]: [
10474
+ "post" /* TWITTER_POST */,
10475
+ "profile" /* TWITTER_PROFILE */,
10476
+ "twitter_followers" /* TWITTER_FOLLOWERS */
10477
+ ],
10478
+ // Farcaster-related sources
10479
+ ["neynar_api" /* NEYNAR_API */]: [
10480
+ "cast" /* FARCASTER_CAST */,
10481
+ "farcaster_profile" /* FARCASTER_PROFILE */,
10482
+ "channel" /* FARCASTER_CHANNEL */,
10483
+ "miniapp" /* FARCASTER_MINIAPP */
10484
+ ],
10485
+ // Telegram-related sources
10486
+ ["telegram_api" /* TELEGRAM_API */]: ["telegram_profile" /* TELEGRAM_PROFILE */],
10487
+ // Instagram-related sources
10488
+ ["instagram_api" /* INSTAGRAM_API */]: ["instagram_profile" /* INSTAGRAM_PROFILE */],
10489
+ // Facebook-related sources
10490
+ ["facebook_api" /* FACEBOOK_API */]: ["facebook_profile" /* FACEBOOK_PROFILE */],
10491
+ // YouTube-related sources
10492
+ ["youtube_api" /* YOUTUBE_API */]: [
10493
+ "youtube_video" /* YOUTUBE_VIDEO */,
10494
+ "youtube_channel" /* YOUTUBE_CHANNEL */
10495
+ ],
10496
+ // Apple App Store-related sources
10497
+ ["apple_app_store_api" /* APPLE_APP_STORE_API */]: [
10498
+ "apple_app_store_listing" /* APPLE_APP_STORE_LISTING */
10499
+ ],
10500
+ // Google Play Store-related sources
10501
+ ["google_play_store_api" /* GOOGLE_PLAY_STORE_API */]: [
10502
+ "google_play_store_listing" /* GOOGLE_PLAY_STORE_LISTING */
10503
+ ],
10504
+ // Mozilla-related sources
10505
+ ["mozilla_addons_api" /* MOZILLA_ADDONS_API */]: ["mozilla_addon" /* MOZILLA_ADDON */],
10506
+ // GitHub-related sources
10507
+ ["github_api" /* GITHUB_API */]: ["github_comment" /* GITHUB_COMMENT */],
10508
+ // Reddit-related sources
10509
+ ["reddit_api" /* REDDIT_API */]: ["reddit_subreddit" /* REDDIT_SUBREDDIT */],
10510
+ // Email-related sources
10511
+ ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
10512
+ // Phone Number-related sources
10513
+ ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
10514
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
10515
+ // DailyMotion-related sources
10516
+ ["dailymotion_api" /* DAILYMOTION_API */]: [
10517
+ "dailymotion_video" /* DAILYMOTION_VIDEO */
10518
+ ],
10519
+ // Vimeo-related sources
10520
+ ["vimeo_api" /* VIMEO_API */]: [
10521
+ "vimeo_video" /* VIMEO_VIDEO */,
10522
+ "vimeo_profile" /* VIMEO_PROFILE */
10523
+ ],
10524
+ // Stackblitz-related sources
10525
+ ["stackblitz_api" /* STACKBLITZ_API */]: ["stackblitz_page" /* STACKBLITZ_PAGE */],
10526
+ // Leetcode-related sources
10527
+ ["leetcode_api" /* LEETCODE_API */]: ["leetcode_page" /* LEETCODE_PAGE */],
10528
+ // Tumblr-related sources
10529
+ ["tumblr_api" /* TUMBLR_API */]: [
10530
+ "tumblr_blog" /* TUMBLR_BLOG */,
10531
+ "tumblr_post" /* TUMBLR_POST */,
10532
+ "tumblr_community" /* TUMBLR_COMMUNITY */
10533
+ ],
10534
+ // NPM-related sources
10535
+ ["npm_registry_api" /* NPM_REGISTRY_API */]: ["npm_package" /* NPM_PACKAGE */],
10536
+ // PyPI-related sources
10537
+ ["pypi_registry_api" /* PYPI_REGISTRY_API */]: ["pypi_package" /* PYPI_PACKAGE */],
10538
+ // Rust Package-related sources
10539
+ ["crates_io_api" /* CRATES_IO_API */]: ["rust_package" /* RUST_PACKAGE */],
10540
+ // LinkedIn-related sources
10541
+ ["apify_linkedin_api" /* APIFY_LINKEDIN_API */]: [
10542
+ "linkedin_profile" /* LINKEDIN_PROFILE */
10543
+ ],
10544
+ // Pump.fun
10545
+ ["pump_fun_api" /* PUMP_FUN_API */]: ["pump_fun_token" /* PUMP_FUN_TOKEN */],
10546
+ // Meta Ads-related sources
10547
+ ["meta_ads_library" /* META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
10548
+ ["steel_meta_ads_library" /* STEEL_META_ADS_LIBRARY */]: ["meta_ad" /* META_AD */],
10549
+ // Google Ads-related sources
10550
+ ["google_ads_transparency_center" /* GOOGLE_ADS_TRANSPARENCY_CENTER */]: [
10551
+ "google_ad" /* GOOGLE_AD */
10552
+ ],
10553
+ // Cross-platform ad intelligence sources
10554
+ ["adlibrary" /* ADLIBRARY */]: ["adlibrary_ad" /* ADLIBRARY_AD */],
10555
+ // Crypto / Onchain sources
10556
+ ["etherscan_api" /* ETHERSCAN_API */]: ["contract_deployer" /* CONTRACT_DEPLOYER */],
10557
+ // URL reputation
10558
+ ["google_web_risk" /* GOOGLE_WEB_RISK */]: ["threat_score" /* THREAT_SCORE */],
10559
+ ["seal_isac" /* SEAL_ISAC */]: ["threat_intel" /* THREAT_INTEL */],
10560
+ ["eth_phishing_detect" /* ETH_PHISHING_DETECT */]: ["threat_intel" /* THREAT_INTEL */],
10561
+ ["polkadot_phishing" /* POLKADOT_PHISHING */]: ["threat_intel" /* THREAT_INTEL */],
10562
+ ["tranco" /* TRANCO */]: ["list_membership" /* LIST_MEMBERSHIP */],
10563
+ ["umbrella" /* UMBRELLA */]: ["list_membership" /* LIST_MEMBERSHIP */],
10564
+ ["open_page_rank" /* OPEN_PAGE_RANK */]: ["list_membership" /* LIST_MEMBERSHIP */],
10565
+ ["defillama" /* DEFILLAMA */]: ["list_membership" /* LIST_MEMBERSHIP */],
10566
+ ["vercel_domains" /* VERCEL_DOMAINS */]: ["list_membership" /* LIST_MEMBERSHIP */]
10567
+ };
10568
+
10569
+ // ../../internal/utils/src/array.ts
10570
+ var array_exports = {};
10571
+ __export(array_exports, {
10572
+ arraysEqual: () => arraysEqual,
10573
+ chunkArray: () => chunkArray,
10574
+ combineAndRemoveDuplicatesByKey: () => combineAndRemoveDuplicatesByKey,
10575
+ isArray: () => isArray,
10576
+ isEmptyArray: () => isEmptyArray,
10577
+ isNonEmptyArray: () => isNonEmptyArray,
10578
+ randomElement: () => randomElement,
10579
+ randomIndex: () => randomIndex,
10580
+ removeDuplicates: () => removeDuplicates,
10581
+ shuffleInPlace: () => shuffleInPlace,
10582
+ shuffled: () => shuffled
10583
+ });
10584
+ function isArray(value) {
10585
+ return Array.isArray(value);
10586
+ }
10587
+ function isEmptyArray(value) {
10588
+ return value.length === 0;
10427
10589
  }
10428
- function isValidNanpNational10(d10) {
10429
- if (d10.length !== 10) {
10430
- return false;
10431
- }
10432
- const npaFirst = d10.charCodeAt(0) - 48;
10433
- const nxxFirst = d10.charCodeAt(3) - 48;
10434
- if (npaFirst < 2 || npaFirst > 9) {
10435
- return false;
10436
- }
10437
- if (nxxFirst < 2 || nxxFirst > 9) {
10438
- return false;
10439
- }
10440
- return true;
10590
+ function isNonEmptyArray(value) {
10591
+ return value.length > 0;
10441
10592
  }
10442
- function isPlausiblePhoneDigits(withoutExt) {
10443
- const hasPlus = withoutExt.startsWith("+");
10444
- const d = withoutExt.replace(/\D/g, "");
10445
- if (d.length < 8 || d.length > 15) {
10446
- return false;
10447
- }
10448
- if (isAllSameDigit(d) || isStrictlyMonotonicStep1(d)) {
10449
- return false;
10450
- }
10451
- const onlyDigits = /^\d+$/.test(withoutExt);
10452
- if (hasPlus) {
10453
- if (d.length === 11 && d.startsWith("1")) {
10454
- return isValidNanpNational10(d.slice(1));
10455
- }
10456
- return true;
10457
- }
10458
- if (onlyDigits) {
10459
- if (d.length === 10) {
10460
- return isValidNanpNational10(d);
10461
- }
10462
- if (d.length === 11 && d.startsWith("1")) {
10463
- return isValidNanpNational10(d.slice(1));
10464
- }
10465
- if (d.length === 11 && d.startsWith("0")) {
10466
- return true;
10467
- }
10468
- return false;
10469
- }
10470
- if (d.length === 10) {
10471
- return isValidNanpNational10(d);
10472
- }
10473
- if (d.length === 11 && d.startsWith("1")) {
10474
- return isValidNanpNational10(d.slice(1));
10475
- }
10476
- if (d.length === 11 && d.startsWith("0")) {
10477
- return true;
10478
- }
10479
- if (d.length >= 12 && d.length <= 15) {
10480
- return true;
10481
- }
10482
- return false;
10593
+ function randomIndex(array) {
10594
+ return Math.floor(Math.random() * array.length);
10483
10595
  }
10484
- function isPhoneNumber(input) {
10485
- const trimmed = preparePhoneInput(input);
10486
- if (trimmed === "") {
10487
- return false;
10488
- }
10489
- if (!/^[+\d(]/.test(trimmed)) {
10490
- return false;
10491
- }
10492
- const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
10493
- if (/[a-zA-Z]/.test(withoutExt)) {
10494
- return false;
10495
- }
10496
- const hasPhoneMarker = /[+()\s-]/.test(trimmed);
10497
- const isPureDotSeparated = /^\d+(\.\d+)+$/.test(trimmed);
10498
- if (isPureDotSeparated && !hasPhoneMarker) {
10499
- return false;
10500
- }
10501
- const phoneRegex = /^(?:\+?\d{1,4}[\s.-]?)?(?:\(\d{1,4}\)|\d{1,4})[\s.-]?\d{1,4}[\s.-]?\d{1,4}[\s.-]?\d{0,4}(?:\s*(?:ext|x|extension)[\s.]*\d{1,6})?$/i;
10502
- if (!phoneRegex.test(trimmed)) {
10503
- return false;
10504
- }
10505
- return isPlausiblePhoneDigits(withoutExt);
10596
+ function randomElement(array) {
10597
+ return array[randomIndex(array)];
10506
10598
  }
10507
- function normalizePhoneNumber(phone) {
10508
- const trimmed = preparePhoneInput(phone);
10509
- const withoutExt = trimmed.replace(/\s*(ext|extension|x)\s*\d+$/i, "");
10510
- const hasPlus = withoutExt.startsWith("+");
10511
- const digitsOnly = withoutExt.replace(/\D/g, "");
10512
- return hasPlus ? `+${digitsOnly}` : digitsOnly;
10599
+ function removeDuplicates(array) {
10600
+ return Array.from(new Set(array));
10513
10601
  }
10514
-
10515
- // ../../internal/utils/src/punycode.ts
10516
- var maxInt = 2147483647;
10517
- var base = 36;
10518
- var tMin = 1;
10519
- var tMax = 26;
10520
- var skew = 38;
10521
- var damp = 700;
10522
- var initialBias = 72;
10523
- var initialN = 128;
10524
- var delimiter = "-";
10525
- var regexPunycode = /^xn--/;
10526
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
10527
- var errors = {
10528
- overflow: "Overflow: input needs wider integers to process",
10529
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10530
- "invalid-input": "Invalid input"
10531
- };
10532
- var baseMinusTMin = base - tMin;
10533
- var floor = Math.floor;
10534
- function error(type) {
10535
- throw new RangeError(errors[type]);
10602
+ function combineAndRemoveDuplicatesByKey(arr1, arr2, uniqueKey) {
10603
+ const combinedArray = [...arr1, ...arr2];
10604
+ const uniqueObjects = new Map(
10605
+ combinedArray.map((item) => [item[uniqueKey], item])
10606
+ );
10607
+ return Array.from(uniqueObjects.values());
10536
10608
  }
10537
- function mapDomain(domain, callback) {
10538
- const parts = domain.split("@");
10539
- let result = "";
10540
- if (parts.length > 1) {
10541
- result = parts[0] + "@";
10542
- domain = parts[1];
10609
+ function chunkArray(array, chunkSize) {
10610
+ const chunks = [];
10611
+ for (let i = 0; i < array.length; i += chunkSize) {
10612
+ chunks.push(array.slice(i, i + chunkSize));
10543
10613
  }
10544
- domain = domain.replace(regexSeparators, ".");
10545
- const labels = domain.split(".");
10546
- const encoded = labels.map(callback).join(".");
10547
- return result + encoded;
10614
+ return chunks;
10548
10615
  }
10549
- function basicToDigit(codePoint) {
10550
- if (codePoint >= 48 && codePoint < 58) {
10551
- return 26 + (codePoint - 48);
10552
- }
10553
- if (codePoint >= 65 && codePoint < 91) {
10554
- return codePoint - 65;
10555
- }
10556
- if (codePoint >= 97 && codePoint < 123) {
10557
- return codePoint - 97;
10616
+ function shuffleInPlace(array) {
10617
+ for (let i = array.length - 1; i > 0; i--) {
10618
+ const j = Math.floor(Math.random() * (i + 1));
10619
+ [array[i], array[j]] = [array[j], array[i]];
10558
10620
  }
10559
- return base;
10560
10621
  }
10561
- function adapt(delta, numPoints, firstTime) {
10562
- let k4 = 0;
10563
- delta = firstTime ? floor(delta / damp) : delta >> 1;
10564
- delta += floor(delta / numPoints);
10565
- for (
10566
- ;
10567
- /* no initialization */
10568
- delta > baseMinusTMin * tMax >> 1;
10569
- k4 += base
10570
- ) {
10571
- delta = floor(delta / baseMinusTMin);
10572
- }
10573
- return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
10622
+ function shuffled(array) {
10623
+ const newArray = array.slice();
10624
+ shuffleInPlace(newArray);
10625
+ return newArray;
10574
10626
  }
10575
- function decode(input) {
10576
- const output = [];
10577
- const inputLength = input.length;
10578
- let i = 0;
10579
- let n2 = initialN;
10580
- let bias2 = initialBias;
10581
- let basic = input.lastIndexOf(delimiter);
10582
- if (basic < 0) {
10583
- basic = 0;
10627
+ function arraysEqual(a, b) {
10628
+ if (a.length !== b.length) return false;
10629
+ const sortedA = [...a].sort();
10630
+ const sortedB = [...b].sort();
10631
+ return sortedA.every((val, idx) => val === sortedB[idx]);
10632
+ }
10633
+
10634
+ // ../../internal/utils/src/cron.ts
10635
+ var cron_exports = {};
10636
+ __export(cron_exports, {
10637
+ cronToHumanReadable: () => cronToHumanReadable,
10638
+ isValidCronExpression: () => isValidCronExpression
10639
+ });
10640
+ var WEEKDAYS = [
10641
+ "Sunday",
10642
+ "Monday",
10643
+ "Tuesday",
10644
+ "Wednesday",
10645
+ "Thursday",
10646
+ "Friday",
10647
+ "Saturday"
10648
+ ];
10649
+ var MONTHS = [
10650
+ "January",
10651
+ "February",
10652
+ "March",
10653
+ "April",
10654
+ "May",
10655
+ "June",
10656
+ "July",
10657
+ "August",
10658
+ "September",
10659
+ "October",
10660
+ "November",
10661
+ "December"
10662
+ ];
10663
+ function cronToHumanReadable(cronExpression) {
10664
+ const [minute, hour, dayOfMonth, month, dayOfWeek2] = cronExpression.split(" ");
10665
+ let result = "Runs ";
10666
+ if (minute === "*") {
10667
+ result += "every minute ";
10668
+ } else if (minute.includes("/")) {
10669
+ const [, interval] = minute.split("/");
10670
+ result += `every ${interval} minutes `;
10671
+ } else {
10672
+ result += `at minute ${minute} `;
10584
10673
  }
10585
- for (let j = 0; j < basic; ++j) {
10586
- if (input.charCodeAt(j) >= 128) {
10587
- error("not-basic");
10588
- }
10589
- output.push(input.charCodeAt(j));
10674
+ if (hour !== "*") {
10675
+ result += `past hour ${hour} `;
10676
+ }
10677
+ if (dayOfMonth !== "*") {
10678
+ result += `on the ${dayOfMonth}${getDaySuffix(
10679
+ parseInt(dayOfMonth)
10680
+ )} day of the month `;
10590
10681
  }
10591
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10592
- const oldi = i;
10593
- for (let w = 1, k4 = base; ; k4 += base) {
10594
- if (index >= inputLength) {
10595
- error("invalid-input");
10596
- }
10597
- const digit = basicToDigit(input.charCodeAt(index++));
10598
- if (digit >= base) {
10599
- error("invalid-input");
10600
- }
10601
- if (digit > floor((maxInt - i) / w)) {
10602
- error("overflow");
10603
- }
10604
- i += digit * w;
10605
- const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10606
- if (digit < t) {
10607
- break;
10608
- }
10609
- const baseMinusT = base - t;
10610
- if (w > floor(maxInt / baseMinusT)) {
10611
- error("overflow");
10612
- }
10613
- w *= baseMinusT;
10614
- }
10615
- const out = output.length + 1;
10616
- bias2 = adapt(i - oldi, out, oldi == 0);
10617
- if (floor(i / out) > maxInt - n2) {
10618
- error("overflow");
10619
- }
10620
- n2 += floor(i / out);
10621
- i %= out;
10622
- output.splice(i++, 0, n2);
10682
+ if (month !== "*") {
10683
+ const monthNames = month.split(",").map((m) => MONTHS[parseInt(m) - 1]);
10684
+ result += `in ${monthNames.join(", ")} `;
10623
10685
  }
10624
- return String.fromCodePoint(...output);
10625
- }
10626
- function toUnicode(input) {
10627
- return mapDomain(input, function(string) {
10628
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10629
- });
10630
- }
10631
-
10632
- // ../../internal/utils/src/url.ts
10633
- function isEmail(input) {
10634
- if (input.trim() === "") {
10635
- return false;
10686
+ if (dayOfWeek2 !== "*") {
10687
+ const dayNames = dayOfWeek2.split(",").map((d) => WEEKDAYS[parseInt(d)]);
10688
+ result += `on ${dayNames.join(", ")}`;
10636
10689
  }
10637
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10638
- return emailRegex.test(input);
10639
- }
10640
- function removeHttpProtocol(input) {
10641
- return input.replace(/^https?:\/\//, "");
10642
- }
10643
- function stripDomainWildcardPrefix(domain) {
10644
- const trimmedDomain = domain.trim();
10645
- const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10646
- return strippedDomain.length > 0 ? strippedDomain : null;
10690
+ return result.trim();
10647
10691
  }
10648
- function getDefangedUrl(input) {
10649
- if (!isUrl(input)) {
10650
- console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10651
- return input;
10692
+ function getDaySuffix(day) {
10693
+ if (day >= 11 && day <= 13) {
10694
+ return "th";
10695
+ }
10696
+ switch (day % 10) {
10697
+ case 1:
10698
+ return "st";
10699
+ case 2:
10700
+ return "nd";
10701
+ case 3:
10702
+ return "rd";
10703
+ default:
10704
+ return "th";
10652
10705
  }
10653
- return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10654
- }
10655
- function getRefangedUrl(input) {
10656
- return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10657
- }
10658
- function containsPunycode(url) {
10659
- return url.indexOf("xn--") !== -1;
10660
- }
10661
- function toUnicode2(url) {
10662
- return toUnicode(url);
10663
10706
  }
10664
- function convertHttpsToHttp(url) {
10665
- if (url.startsWith("https://")) {
10666
- const httpUrl = new URL(url);
10667
- httpUrl.protocol = "http:";
10668
- return httpUrl.toString();
10707
+ function isValidCronExpression(cronExpression) {
10708
+ if (!cronExpression || typeof cronExpression !== "string") {
10709
+ return false;
10669
10710
  }
10670
- throw new Error(`URL is not HTTPS: ${url}`);
10711
+ const parts = cronExpression.trim().split(/\s+/);
10712
+ if (parts.length !== 5) {
10713
+ return false;
10714
+ }
10715
+ const [minute, hour, dayOfMonth, month, dayOfWeek2] = parts;
10716
+ return isValidCronField(minute, 0, 59) && isValidCronField(hour, 0, 23) && isValidCronField(dayOfMonth, 1, 31) && isValidCronField(month, 1, 12) && isValidCronField(dayOfWeek2, 0, 7);
10671
10717
  }
10672
- function generateCanonicalIPFSUrl(content) {
10673
- if (!content) {
10674
- return content;
10718
+ function isValidCronField(field, min, max) {
10719
+ if (!field) return false;
10720
+ if (field === "*") return true;
10721
+ if (field.includes("/")) {
10722
+ const [range, step] = field.split("/");
10723
+ const stepNum = parseInt(step);
10724
+ if (isNaN(stepNum) || stepNum <= 0) return false;
10725
+ if (range === "*") return true;
10726
+ return isValidCronField(range, min, max);
10675
10727
  }
10676
- if (content.includes("ipfs.io")) {
10677
- return content;
10728
+ if (field.includes("-")) {
10729
+ const [start, end] = field.split("-");
10730
+ const startNum = parseInt(start);
10731
+ const endNum = parseInt(end);
10732
+ if (isNaN(startNum) || isNaN(endNum)) return false;
10733
+ return startNum >= min && startNum <= max && endNum >= min && endNum <= max && startNum <= endNum;
10678
10734
  }
10679
- if (content.startsWith("Qm") || content.startsWith("bafy")) {
10680
- return `ipfs.io/ipfs/${content}`;
10735
+ if (field.includes(",")) {
10736
+ const values = field.split(",");
10737
+ return values.every((value) => isValidCronField(value.trim(), min, max));
10681
10738
  }
10682
- return content;
10739
+ const num3 = parseInt(field);
10740
+ if (isNaN(num3)) return false;
10741
+ if (max === 7 && num3 === 7) return true;
10742
+ return num3 >= min && num3 <= max;
10683
10743
  }
10684
- function isWalrusSite(content) {
10685
- return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
10744
+
10745
+ // ../../internal/utils/src/object.ts
10746
+ var object_exports = {};
10747
+ __export(object_exports, {
10748
+ isDefined: () => isDefined,
10749
+ isDefinedAndNotNull: () => isDefinedAndNotNull,
10750
+ isNotNull: () => isNotNull
10751
+ });
10752
+ function isDefined(value) {
10753
+ return value !== void 0;
10686
10754
  }
10687
- function getFaviconUrl(content) {
10688
- const normalizedUrl = getNormalizedUrl(content);
10689
- return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
10755
+ function isNotNull(value) {
10756
+ return value !== null;
10690
10757
  }
10691
- function sanitizeHttpUrl(value) {
10692
- if (typeof value !== "string" || value.length === 0) {
10693
- return null;
10694
- }
10695
- try {
10696
- const parsed = new URL(value);
10697
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
10698
- return null;
10699
- }
10700
- return parsed.toString();
10701
- } catch (e4) {
10702
- return null;
10703
- }
10758
+ function isDefinedAndNotNull(value) {
10759
+ return value !== null && value !== void 0;
10760
+ }
10761
+
10762
+ // ../../internal/utils/src/promise.ts
10763
+ var promise_exports = {};
10764
+ __export(promise_exports, {
10765
+ allSettledWithConcurrency: () => allSettledWithConcurrency,
10766
+ isPromiseSettledResultFulfilled: () => isPromiseSettledResultFulfilled,
10767
+ isPromiseSettledResultRejected: () => isPromiseSettledResultRejected
10768
+ });
10769
+ function isPromiseSettledResultFulfilled(result) {
10770
+ return result.status === "fulfilled";
10771
+ }
10772
+ function isPromiseSettledResultRejected(result) {
10773
+ return result.status === "rejected";
10774
+ }
10775
+ function allSettledWithConcurrency(items, limit, fn5) {
10776
+ return __async(this, null, function* () {
10777
+ const results = new Array(items.length);
10778
+ let next = 0;
10779
+ const worker = () => __async(null, null, function* () {
10780
+ for (; ; ) {
10781
+ const index = next;
10782
+ next += 1;
10783
+ if (index >= items.length) return;
10784
+ try {
10785
+ results[index] = { status: "fulfilled", value: yield fn5(items[index], index) };
10786
+ } catch (reason) {
10787
+ results[index] = { status: "rejected", reason };
10788
+ }
10789
+ }
10790
+ });
10791
+ const workers = Math.max(1, Math.min(Math.floor(limit) || 1, items.length));
10792
+ yield Promise.all(Array.from({ length: workers }, worker));
10793
+ return results;
10794
+ });
10704
10795
  }
10705
- var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
10706
10796
 
10707
10797
  // ../../internal/utils/src/email.ts
10708
10798
  var email_exports = {};
@@ -11185,6 +11275,65 @@ function parseLinkedInProfileUrl(url) {
11185
11275
  return { pathSegment, handle, name, profileUrl };
11186
11276
  }
11187
11277
 
11278
+ // ../../internal/utils/src/detection-sources.ts
11279
+ var UNKNOWN_DETECTION_SOURCE = "unknown";
11280
+ var WORD_OVERRIDES = {
11281
+ ads: "Ads",
11282
+ dns: "DNS",
11283
+ dnsdb: "DNSDB",
11284
+ duck: "Duck",
11285
+ go: "Go",
11286
+ ip: "IP",
11287
+ linkedin: "LinkedIn",
11288
+ rss: "RSS",
11289
+ serp: "SERP",
11290
+ tik: "Tik",
11291
+ tok: "Tok",
11292
+ urlscan: "URLScan",
11293
+ youtube: "YouTube"
11294
+ };
11295
+ var KEY_OVERRIDES = {
11296
+ ["duck_duck_go_search" /* DUCK_DUCK_GO_SEARCH */]: "DuckDuckGo Search",
11297
+ ["tik_tok_ads_search" /* TIK_TOK_ADS_SEARCH */]: "TikTok Ads Search",
11298
+ ["tik_tok_user_search" /* TIK_TOK_USER_SEARCH */]: "TikTok User Search",
11299
+ ["tik_tok_video_search" /* TIK_TOK_VIDEO_SEARCH */]: "TikTok Video Search",
11300
+ ["dns_twist" /* DNS_TWIST */]: "DNSTwist",
11301
+ // Keys carry the vendor for internal traceability; customers see neither.
11302
+ ["telegram_user_search_vetric" /* TELEGRAM_USER_SEARCH_VETRIC */]: "Telegram User Discovery",
11303
+ ["telegram_channels_search_vetric" /* TELEGRAM_CHANNELS_SEARCH_VETRIC */]: "Telegram Channel Discovery",
11304
+ ["facebook_page_search_vetric" /* FACEBOOK_PAGE_SEARCH_VETRIC */]: "Facebook Page Discovery",
11305
+ ["facebook_user_search_vetric" /* FACEBOOK_USER_SEARCH_VETRIC */]: "Facebook User Discovery",
11306
+ ["facebook_post_search_vetric" /* FACEBOOK_POST_SEARCH_VETRIC */]: "Facebook Post Discovery",
11307
+ ["instagram_account_search_vetric" /* INSTAGRAM_ACCOUNT_SEARCH_VETRIC */]: "Instagram Account Discovery",
11308
+ ["twitter_search_vetric" /* TWITTER_SEARCH_VETRIC */]: "Twitter People Discovery",
11309
+ ["linkedin_people_search_vetric" /* LINKEDIN_PEOPLE_SEARCH_VETRIC */]: "LinkedIn People Discovery",
11310
+ ["linkedin_company_search_vetric" /* LINKEDIN_COMPANY_SEARCH_VETRIC */]: "LinkedIn Company Discovery",
11311
+ ["meta_ads_search_vetric" /* META_ADS_SEARCH_VETRIC */]: "Meta Ads Discovery",
11312
+ ["tik_tok_user_search_vetric" /* TIK_TOK_USER_SEARCH_VETRIC */]: "TikTok User Discovery",
11313
+ ["tik_tok_video_search_vetric" /* TIK_TOK_VIDEO_SEARCH_VETRIC */]: "TikTok Post Discovery",
11314
+ [UNKNOWN_DETECTION_SOURCE]: "Unknown (no source recorded)"
11315
+ };
11316
+ function detectionSourceLabel(key) {
11317
+ const override = KEY_OVERRIDES[key];
11318
+ if (override) return override;
11319
+ return key.split("_").map((word2) => {
11320
+ var _a;
11321
+ return (_a = WORD_OVERRIDES[word2]) != null ? _a : word2.charAt(0).toUpperCase() + word2.slice(1);
11322
+ }).join(" ");
11323
+ }
11324
+ [
11325
+ ...Object.values(ThreatDetectionSourceKey).map((key) => ({
11326
+ value: key,
11327
+ label: detectionSourceLabel(key),
11328
+ searchText: `${key} ${detectionSourceLabel(key)}`
11329
+ })),
11330
+ {
11331
+ value: UNKNOWN_DETECTION_SOURCE,
11332
+ label: detectionSourceLabel(UNKNOWN_DETECTION_SOURCE),
11333
+ searchText: UNKNOWN_DETECTION_SOURCE
11334
+ }
11335
+ ].sort((a, b) => a.label.localeCompare(b.label));
11336
+
11188
11337
  // ../../internal/validation/src/public/detection/configs-create.ts
11189
11338
  z.object({
11190
11339
  slug: z.string().min(1).optional().describe(
@@ -11844,6 +11993,35 @@ z.object({
11844
11993
  "One series per requested asset type, in the order requested, or a single pooled series when no asset types were given"
11845
11994
  )
11846
11995
  });
11996
+ z.object({
11997
+ slug: z.string().min(1).describe("Organization slug"),
11998
+ startDate: utcDateSchema(false).optional().describe(
11999
+ "Only include assets blocked on or after this date. A date-only value (YYYY-MM-DD) starts at midnight UTC"
12000
+ ),
12001
+ endDate: utcDateSchema(true).optional().describe(
12002
+ "Only include assets blocked on or before this date. A date-only value (YYYY-MM-DD) covers the whole day in UTC; pass a full timestamp for a precise cut-off"
12003
+ ),
12004
+ brandIds: z.array(z.number().int().positive()).optional().describe("Only include assets belonging to these brands"),
12005
+ countryCodes: z.array(z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries")
12006
+ });
12007
+ z.object({
12008
+ byAssetType: z.array(
12009
+ z.object({
12010
+ assetType: z.nativeEnum(AssetType).describe("Asset type that was blocked"),
12011
+ blocked: z.number().describe(
12012
+ "Distinct assets of this type the organization blocked within the date range that are still blocked today"
12013
+ ),
12014
+ withEvidence: z.number().describe(
12015
+ "Of those, how many enter the median: an accepted live date and an automated detection after it. A live date with no detection result does not count, and a human report is not a detection"
12016
+ ),
12017
+ medianDaysAtLeast: z.number().nullable().describe(
12018
+ "Median days the asset was already live before the earliest automated detection of that asset, for any organization. Always a minimum, because the live date is the first time anyone saw the asset. Null when withEvidence is 0"
12019
+ )
12020
+ })
12021
+ ).describe(
12022
+ "Time to Detection, one entry per asset type this organization blocked in the range, descending by number blocked. The clock stops at the earliest automated detection of the asset for any organization, not at this organization's report. Assets that do not enter withEvidence are left out of the median. For URL and page assets only an observed-serving date counts, so a domain registration date never enters the number"
12023
+ )
12024
+ });
11847
12025
  z.object({
11848
12026
  slug: z.string().optional().describe(
11849
12027
  "Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
@@ -12049,6 +12227,79 @@ var brandItemSchema = z.object({
12049
12227
  z.object({
12050
12228
  brands: z.array(brandItemSchema).describe("List of brands")
12051
12229
  }).describe("Successful operation");
12230
+ var threatLifecycleStateSchema = z.enum(["investigating", "escalated", "blocked", "allowed", "closed"]).describe(
12231
+ "Lifecycle stage: `investigating` (a report is open and under review), `escalated` (an open report has been passed to the organization for a decision), `blocked` (confirmed malicious), `allowed` (confirmed benign / false positive), `closed` (every report reviewed, asset neither blocked nor allowed). `escalated` reflects an escalation that is still open, not one that was decided and followed by a new report."
12232
+ );
12233
+ z.object({
12234
+ slug: z.string().optional().describe(
12235
+ "Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
12236
+ ),
12237
+ /**
12238
+ * A poll watermark rather than a true event cursor: there is no single
12239
+ * change log behind these threats, so the filter is an OR across the
12240
+ * `updatedAt` of every table the projection reads. Set it a few minutes
12241
+ * behind the last successful sync so in-flight writes are not skipped.
12242
+ */
12243
+ updatedSince: z.string().refine((value) => DateTime.fromISO(value, { zone: "utc" }).isValid, {
12244
+ message: "updatedSince must be a valid ISO 8601 timestamp"
12245
+ }).transform((value) => DateTime.fromISO(value, { zone: "utc" }).toJSDate()).optional().describe(
12246
+ "Only return threats touched at or after this ISO 8601 timestamp. Compared against the most recent change to the asset, its reports, and its takedown \u2014 whichever is latest. Omit for a full backfill. Overlap your windows by a few minutes: writes that land mid-request can otherwise fall between two polls."
12247
+ ),
12248
+ assetType: z.nativeEnum(AssetType).optional().describe("Filter by asset type. Omit to return every type."),
12249
+ per_page: z.number().int().min(1).max(1e3).optional().default(100).describe("The number of threats to return per page (max 1000)"),
12250
+ next_page: z.string().optional().nullable().describe("Cursor for fetching the next page of results")
12251
+ }).describe(
12252
+ `List organization threats request body
12253
+
12254
+ Returns every asset this organization has filed a report against, together with
12255
+ the lifecycle state of that investigation \u2014 report opened, escalated, blocked,
12256
+ takedown submitted, takedown completed.
12257
+
12258
+ This is a projection of current state, not an event stream: each threat is
12259
+ returned with the facts as they stand right now, so a consumer that upserts on
12260
+ \`id\` converges regardless of which intermediate transitions it saw. Results are
12261
+ ordered by asset ID ascending and paginated with \`next_page\`.`
12262
+ );
12263
+ var organizationThreatBrandSchema = z.object({
12264
+ slug: z.string().describe("Brand slug"),
12265
+ name: z.string().describe("Brand name")
12266
+ });
12267
+ var organizationThreatTakedownSchema = z.object({
12268
+ status: z.nativeEnum(TakedownStatus).describe("Current takedown status"),
12269
+ submittedAt: z.date().nullable().describe(
12270
+ "When the first takedown request was submitted to a provider, or null if nothing has been submitted yet"
12271
+ ),
12272
+ completedAt: z.date().nullable().describe("When the takedown was marked completed, or null if it has not been")
12273
+ });
12274
+ var organizationThreatSchema = z.object({
12275
+ id: z.number().describe("Asset ID"),
12276
+ content: z.string().describe("Asset content (URL, handle, email, etc.)"),
12277
+ type: z.nativeEnum(AssetType).describe("Asset type"),
12278
+ status: z.nativeEnum(AssetStatus).describe("Raw asset status"),
12279
+ state: threatLifecycleStateSchema,
12280
+ livenessStatus: z.nativeEnum(LivenessStatus).describe(
12281
+ "Whether the threat is currently reachable (`ALIVE`), gone (`DEAD`), or unchecked (`UNKNOWN`)"
12282
+ ),
12283
+ brands: z.array(organizationThreatBrandSchema).describe(
12284
+ "The brands of yours this threat was reported against. Empty when no report named one."
12285
+ ),
12286
+ firstReportedAt: z.date().describe("When this organization first filed a report against the asset"),
12287
+ escalatedAt: z.date().nullable().describe(
12288
+ "When the asset was *first* escalated to this organization for a decision, or null if it never was. This is escalation history, not current state: an asset escalated once and later reported again reports `escalated_at` alongside a `state` of `investigating`. Read `state` to know whether anything is waiting on you right now."
12289
+ ),
12290
+ blockedAt: z.date().nullable().describe("When the asset was blocklisted, or null if it has not been"),
12291
+ takedown: organizationThreatTakedownSchema.nullable().describe("Takedown progress, or null if no takedown was opened"),
12292
+ detailsUrl: z.string().describe("Deep link to the asset's reports and takedowns in the ChainPatrol app"),
12293
+ updatedAt: z.date().describe(
12294
+ "The most recent change to anything in this record \u2014 the asset, its reports, its takedown or that takedown's tasks. Matches what `updatedSince` filters on. To derive your next watermark, drain every page until `next_page` is null and take the highest value across the whole sweep: results are ordered by asset ID, not by this field, so a later page can carry an earlier timestamp and a per-page watermark would skip it."
12295
+ )
12296
+ });
12297
+ z.object({
12298
+ threats: z.array(organizationThreatSchema),
12299
+ next_page: z.string().nullable().optional().describe(
12300
+ "Cursor for fetching the next page of results, or null on the last page. Drain it to null before advancing your `updatedSince` watermark \u2014 see `updatedAt`."
12301
+ )
12302
+ }).describe("Successful operation");
12052
12303
  var FILTERABLE_SUBSCRIPTION_STATUSES = [
12053
12304
  SubscriptionStatus.PROSPECT,
12054
12305
  SubscriptionStatus.POC,
@@ -13721,7 +13972,7 @@ function parseModernSyntax(tokens, includeHue) {
13721
13972
  coords.unshift(token.value);
13722
13973
  return coords;
13723
13974
  }
13724
- var parse3 = (color) => {
13975
+ var parse4 = (color) => {
13725
13976
  if (typeof color !== "string") {
13726
13977
  return void 0;
13727
13978
  }
@@ -13737,7 +13988,7 @@ var parse3 = (color) => {
13737
13988
  }
13738
13989
  return tokens ? parseColorSyntax(tokens) : void 0;
13739
13990
  };
13740
- var parse_default = parse3;
13991
+ var parse_default = parse4;
13741
13992
 
13742
13993
  // ../../node_modules/culori/src/rgb/parseRgb.js
13743
13994
  function parseRgb(color, parsed) {
@@ -13866,20 +14117,20 @@ var convertA98ToXyz65_default = convertA98ToXyz65;
13866
14117
 
13867
14118
  // ../../node_modules/culori/src/a98/convertXyz65ToA98.js
13868
14119
  var gamma = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
13869
- var convertXyz65ToA98 = ({ x, y, z: z64, alpha }) => {
14120
+ var convertXyz65ToA98 = ({ x, y, z: z68, alpha }) => {
13870
14121
  if (x === void 0) x = 0;
13871
14122
  if (y === void 0) y = 0;
13872
- if (z64 === void 0) z64 = 0;
14123
+ if (z68 === void 0) z68 = 0;
13873
14124
  let res = {
13874
14125
  mode: "a98",
13875
14126
  r: gamma(
13876
- x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z64
14127
+ x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z68
13877
14128
  ),
13878
14129
  g: gamma(
13879
- x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z64
14130
+ x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z68
13880
14131
  ),
13881
14132
  b: gamma(
13882
- x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z64
14133
+ x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z68
13883
14134
  )
13884
14135
  };
13885
14136
  if (alpha !== void 0) {
@@ -13946,14 +14197,14 @@ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
13946
14197
  var convertLrgbToRgb_default = convertLrgbToRgb;
13947
14198
 
13948
14199
  // ../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js
13949
- var convertXyz65ToRgb = ({ x, y, z: z64, alpha }) => {
14200
+ var convertXyz65ToRgb = ({ x, y, z: z68, alpha }) => {
13950
14201
  if (x === void 0) x = 0;
13951
14202
  if (y === void 0) y = 0;
13952
- if (z64 === void 0) z64 = 0;
14203
+ if (z68 === void 0) z68 = 0;
13953
14204
  let res = convertLrgbToRgb_default({
13954
- r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z64,
13955
- g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z64,
13956
- b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z64
14205
+ r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z68,
14206
+ g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z68,
14207
+ b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z68
13957
14208
  });
13958
14209
  if (alpha !== void 0) {
13959
14210
  res.alpha = alpha;
@@ -14203,13 +14454,13 @@ var convertLab65ToRgb_default = convertLab65ToRgb;
14203
14454
 
14204
14455
  // ../../node_modules/culori/src/lab65/convertXyz65ToLab65.js
14205
14456
  var f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
14206
- var convertXyz65ToLab65 = ({ x, y, z: z64, alpha }) => {
14457
+ var convertXyz65ToLab65 = ({ x, y, z: z68, alpha }) => {
14207
14458
  if (x === void 0) x = 0;
14208
14459
  if (y === void 0) y = 0;
14209
- if (z64 === void 0) z64 = 0;
14460
+ if (z68 === void 0) z68 = 0;
14210
14461
  let f0 = f(x / D65.X);
14211
14462
  let f1 = f(y / D65.Y);
14212
- let f22 = f(z64 / D65.Z);
14463
+ let f22 = f(z68 / D65.Z);
14213
14464
  let res = {
14214
14465
  mode: "lab65",
14215
14466
  l: 116 * f1 - 16,
@@ -14866,10 +15117,10 @@ var convertItpToXyz65_default = convertItpToXyz65;
14866
15117
 
14867
15118
  // ../../node_modules/culori/src/itp/convertXyz65ToItp.js
14868
15119
  var toAbs = (c2 = 0) => Math.max(c2 * YW, 0);
14869
- var convertXyz65ToItp = ({ x, y, z: z64, alpha }) => {
15120
+ var convertXyz65ToItp = ({ x, y, z: z68, alpha }) => {
14870
15121
  const absX = toAbs(x);
14871
15122
  const absY = toAbs(y);
14872
- const absZ = toAbs(z64);
15123
+ const absZ = toAbs(z68);
14873
15124
  const l2 = transferPqEncode(
14874
15125
  0.3592832590121217 * absX + 0.6976051147779502 * absY - 0.0358915932320289 * absZ
14875
15126
  );
@@ -14927,15 +15178,15 @@ var jabPqEncode = (v) => {
14927
15178
  return Math.pow((C1 + C2 * vn3) / (1 + C3 * vn3), p);
14928
15179
  };
14929
15180
  var abs = (v = 0) => Math.max(v * 203, 0);
14930
- var convertXyz65ToJab = ({ x, y, z: z64, alpha }) => {
15181
+ var convertXyz65ToJab = ({ x, y, z: z68, alpha }) => {
14931
15182
  x = abs(x);
14932
15183
  y = abs(y);
14933
- z64 = abs(z64);
14934
- let xp = 1.15 * x - 0.15 * z64;
15184
+ z68 = abs(z68);
15185
+ let xp = 1.15 * x - 0.15 * z68;
14935
15186
  let yp = 0.66 * y + 0.34 * x;
14936
- let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z64);
14937
- let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z64);
14938
- let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z64);
15187
+ let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z68);
15188
+ let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z68);
15189
+ let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z68);
14939
15190
  let i = (l2 + m) / 2;
14940
15191
  let res = {
14941
15192
  mode: "jab",
@@ -15121,14 +15372,14 @@ var convertLabToXyz50 = ({ l: l2, a, b, alpha }) => {
15121
15372
  var convertLabToXyz50_default = convertLabToXyz50;
15122
15373
 
15123
15374
  // ../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js
15124
- var convertXyz50ToRgb = ({ x, y, z: z64, alpha }) => {
15375
+ var convertXyz50ToRgb = ({ x, y, z: z68, alpha }) => {
15125
15376
  if (x === void 0) x = 0;
15126
15377
  if (y === void 0) y = 0;
15127
- if (z64 === void 0) z64 = 0;
15378
+ if (z68 === void 0) z68 = 0;
15128
15379
  let res = convertLrgbToRgb_default({
15129
- r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z64,
15130
- g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z64,
15131
- b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z64
15380
+ r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z68,
15381
+ g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z68,
15382
+ b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z68
15132
15383
  });
15133
15384
  if (alpha !== void 0) {
15134
15385
  res.alpha = alpha;
@@ -15159,13 +15410,13 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
15159
15410
 
15160
15411
  // ../../node_modules/culori/src/lab/convertXyz50ToLab.js
15161
15412
  var f2 = (value) => value > e3 ? Math.cbrt(value) : (k3 * value + 16) / 116;
15162
- var convertXyz50ToLab = ({ x, y, z: z64, alpha }) => {
15413
+ var convertXyz50ToLab = ({ x, y, z: z68, alpha }) => {
15163
15414
  if (x === void 0) x = 0;
15164
15415
  if (y === void 0) y = 0;
15165
- if (z64 === void 0) z64 = 0;
15416
+ if (z68 === void 0) z68 = 0;
15166
15417
  let f0 = f2(x / D50.X);
15167
15418
  let f1 = f2(y / D50.Y);
15168
- let f22 = f2(z64 / D50.Z);
15419
+ let f22 = f2(z68 / D50.Z);
15169
15420
  let res = {
15170
15421
  mode: "lab",
15171
15422
  l: 116 * f1 - 16,
@@ -15400,18 +15651,18 @@ var convertLchuvToLuv = ({ l: l2, c: c2, h, alpha }) => {
15400
15651
  var convertLchuvToLuv_default = convertLchuvToLuv;
15401
15652
 
15402
15653
  // ../../node_modules/culori/src/luv/convertXyz50ToLuv.js
15403
- var u_fn = (x, y, z64) => 4 * x / (x + 15 * y + 3 * z64);
15404
- var v_fn = (x, y, z64) => 9 * y / (x + 15 * y + 3 * z64);
15654
+ var u_fn = (x, y, z68) => 4 * x / (x + 15 * y + 3 * z68);
15655
+ var v_fn = (x, y, z68) => 9 * y / (x + 15 * y + 3 * z68);
15405
15656
  var un = u_fn(D50.X, D50.Y, D50.Z);
15406
15657
  var vn = v_fn(D50.X, D50.Y, D50.Z);
15407
15658
  var l_fn = (value) => value <= e3 ? k3 * value : 116 * Math.cbrt(value) - 16;
15408
- var convertXyz50ToLuv = ({ x, y, z: z64, alpha }) => {
15659
+ var convertXyz50ToLuv = ({ x, y, z: z68, alpha }) => {
15409
15660
  if (x === void 0) x = 0;
15410
15661
  if (y === void 0) y = 0;
15411
- if (z64 === void 0) z64 = 0;
15662
+ if (z68 === void 0) z68 = 0;
15412
15663
  let l2 = l_fn(y / D50.Y);
15413
- let u = u_fn(x, y, z64);
15414
- let v = v_fn(x, y, z64);
15664
+ let u = u_fn(x, y, z68);
15665
+ let v = v_fn(x, y, z68);
15415
15666
  if (!isFinite(u) || !isFinite(v)) {
15416
15667
  l2 = u = v = 0;
15417
15668
  } else {
@@ -15432,8 +15683,8 @@ var convertXyz50ToLuv = ({ x, y, z: z64, alpha }) => {
15432
15683
  var convertXyz50ToLuv_default = convertXyz50ToLuv;
15433
15684
 
15434
15685
  // ../../node_modules/culori/src/luv/convertLuvToXyz50.js
15435
- var u_fn2 = (x, y, z64) => 4 * x / (x + 15 * y + 3 * z64);
15436
- var v_fn2 = (x, y, z64) => 9 * y / (x + 15 * y + 3 * z64);
15686
+ var u_fn2 = (x, y, z68) => 4 * x / (x + 15 * y + 3 * z68);
15687
+ var v_fn2 = (x, y, z68) => 9 * y / (x + 15 * y + 3 * z68);
15437
15688
  var un2 = u_fn2(D50.X, D50.Y, D50.Z);
15438
15689
  var vn2 = v_fn2(D50.X, D50.Y, D50.Z);
15439
15690
  var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
@@ -15447,8 +15698,8 @@ var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
15447
15698
  let vp = v / (13 * l2) + vn2;
15448
15699
  let y = D50.Y * (l2 <= 8 ? l2 / k3 : Math.pow((l2 + 16) / 116, 3));
15449
15700
  let x = y * (9 * up) / (4 * vp);
15450
- let z64 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
15451
- let res = { mode: "xyz50", x, y, z: z64 };
15701
+ let z68 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
15702
+ let res = { mode: "xyz50", x, y, z: z68 };
15452
15703
  if (alpha !== void 0) {
15453
15704
  res.alpha = alpha;
15454
15705
  }
@@ -16065,15 +16316,15 @@ var convertP3ToXyz65 = (rgb2) => {
16065
16316
  var convertP3ToXyz65_default = convertP3ToXyz65;
16066
16317
 
16067
16318
  // ../../node_modules/culori/src/p3/convertXyz65ToP3.js
16068
- var convertXyz65ToP3 = ({ x, y, z: z64, alpha }) => {
16319
+ var convertXyz65ToP3 = ({ x, y, z: z68, alpha }) => {
16069
16320
  if (x === void 0) x = 0;
16070
16321
  if (y === void 0) y = 0;
16071
- if (z64 === void 0) z64 = 0;
16322
+ if (z68 === void 0) z68 = 0;
16072
16323
  let res = convertLrgbToRgb_default(
16073
16324
  {
16074
- r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z64,
16075
- g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z64,
16076
- b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z64
16325
+ r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z68,
16326
+ g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z68,
16327
+ b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z68
16077
16328
  },
16078
16329
  "p3"
16079
16330
  );
@@ -16108,19 +16359,19 @@ var gamma2 = (v) => {
16108
16359
  }
16109
16360
  return 16 * v;
16110
16361
  };
16111
- var convertXyz50ToProphoto = ({ x, y, z: z64, alpha }) => {
16362
+ var convertXyz50ToProphoto = ({ x, y, z: z68, alpha }) => {
16112
16363
  if (x === void 0) x = 0;
16113
16364
  if (y === void 0) y = 0;
16114
- if (z64 === void 0) z64 = 0;
16365
+ if (z68 === void 0) z68 = 0;
16115
16366
  let res = {
16116
16367
  mode: "prophoto",
16117
16368
  r: gamma2(
16118
- x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z64
16369
+ x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z68
16119
16370
  ),
16120
16371
  g: gamma2(
16121
- x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z64
16372
+ x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z68
16122
16373
  ),
16123
- b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z64)
16374
+ b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z68)
16124
16375
  };
16125
16376
  if (alpha !== void 0) {
16126
16377
  res.alpha = alpha;
@@ -16180,20 +16431,20 @@ var gamma3 = (v) => {
16180
16431
  }
16181
16432
  return 4.5 * v;
16182
16433
  };
16183
- var convertXyz65ToRec2020 = ({ x, y, z: z64, alpha }) => {
16434
+ var convertXyz65ToRec2020 = ({ x, y, z: z68, alpha }) => {
16184
16435
  if (x === void 0) x = 0;
16185
16436
  if (y === void 0) y = 0;
16186
- if (z64 === void 0) z64 = 0;
16437
+ if (z68 === void 0) z68 = 0;
16187
16438
  let res = {
16188
16439
  mode: "rec2020",
16189
16440
  r: gamma3(
16190
- x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z64
16441
+ x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z68
16191
16442
  ),
16192
16443
  g: gamma3(
16193
- x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z64
16444
+ x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z68
16194
16445
  ),
16195
16446
  b: gamma3(
16196
- x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z64
16447
+ x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z68
16197
16448
  )
16198
16449
  };
16199
16450
  if (alpha !== void 0) {
@@ -16346,15 +16597,15 @@ var definition_default26 = definition26;
16346
16597
 
16347
16598
  // ../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
16348
16599
  var convertXyz65ToXyz50 = (xyz652) => {
16349
- let { x, y, z: z64, alpha } = xyz652;
16600
+ let { x, y, z: z68, alpha } = xyz652;
16350
16601
  if (x === void 0) x = 0;
16351
16602
  if (y === void 0) y = 0;
16352
- if (z64 === void 0) z64 = 0;
16603
+ if (z68 === void 0) z68 = 0;
16353
16604
  let res = {
16354
16605
  mode: "xyz50",
16355
- x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z64,
16356
- y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z64,
16357
- z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z64
16606
+ x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z68,
16607
+ y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z68,
16608
+ z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z68
16358
16609
  };
16359
16610
  if (alpha !== void 0) {
16360
16611
  res.alpha = alpha;
@@ -16365,15 +16616,15 @@ var convertXyz65ToXyz50_default = convertXyz65ToXyz50;
16365
16616
 
16366
16617
  // ../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
16367
16618
  var convertXyz50ToXyz65 = (xyz502) => {
16368
- let { x, y, z: z64, alpha } = xyz502;
16619
+ let { x, y, z: z68, alpha } = xyz502;
16369
16620
  if (x === void 0) x = 0;
16370
16621
  if (y === void 0) y = 0;
16371
- if (z64 === void 0) z64 = 0;
16622
+ if (z68 === void 0) z68 = 0;
16372
16623
  let res = {
16373
16624
  mode: "xyz65",
16374
- x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z64,
16375
- y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z64,
16376
- z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z64
16625
+ x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z68,
16626
+ y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z68,
16627
+ z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z68
16377
16628
  };
16378
16629
  if (alpha !== void 0) {
16379
16630
  res.alpha = alpha;