@chainpatrol/sdk 0.9.0 → 1.0.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.js CHANGED
@@ -614,6 +614,32 @@ zod.z.object({
614
614
  email: zod.z.string().email(),
615
615
  description: zod.z.string().optional().default("")
616
616
  });
617
+ zod.z.object({
618
+ /** Canonicalization algorithm version the client computed its prefixes with. */
619
+ algoVersion: zod.z.number().int().positive(),
620
+ /** 4-byte (8-hex-char) prefixes that hit the client's local index. */
621
+ prefixes: zod.z.array(zod.z.string().regex(/^[0-9a-f]{8}$/)).min(1).max(200)
622
+ }).describe("Blocklist confirm request");
623
+ zod.z.object({
624
+ /** Full 64-char SHA-256 hashes of blocked expressions, grouped by prefix. */
625
+ fullHashes: zod.z.record(zod.z.string(), zod.z.array(zod.z.string()))
626
+ }).describe("Blocklist confirm response");
627
+ zod.z.void().describe("Blocklist version request");
628
+ zod.z.object({
629
+ /** Canonicalization algorithm version the artifacts + confirm are built with. */
630
+ algoVersion: zod.z.number().int().positive(),
631
+ snapshot: zod.z.object({
632
+ token: zod.z.string(),
633
+ url: zod.z.string().url(),
634
+ prefixBytes: zod.z.number().int().positive(),
635
+ count: zod.z.number().int().nonnegative()
636
+ }),
637
+ recent: zod.z.object({
638
+ token: zod.z.string(),
639
+ url: zod.z.string().url(),
640
+ windowSeconds: zod.z.number().int().positive()
641
+ })
642
+ }).describe("Blocklist version response");
617
643
 
618
644
  // ../../node_modules/luxon/src/errors.js
619
645
  var LuxonError = class extends Error {
@@ -7035,7 +7061,7 @@ var BrandType = {
7035
7061
  ORGANIZATION: "ORGANIZATION"
7036
7062
  };
7037
7063
  var SubscriptionStatus = {
7038
- TRIAL: "TRIAL",
7064
+ POC: "POC",
7039
7065
  ACTIVE: "ACTIVE",
7040
7066
  PROSPECT: "PROSPECT",
7041
7067
  INTEGRATION: "INTEGRATION",
@@ -7131,7 +7157,8 @@ var AssetType = {
7131
7157
  BANDCAMP: "BANDCAMP",
7132
7158
  ARCHIVE_ORG: "ARCHIVE_ORG",
7133
7159
  FIVE_HUNDRED_PX: "FIVE_HUNDRED_PX",
7134
- LUMA: "LUMA"
7160
+ LUMA: "LUMA",
7161
+ SMARTMONEYMATCH: "SMARTMONEYMATCH"
7135
7162
  };
7136
7163
  var LivenessStatus = {
7137
7164
  UNKNOWN: "UNKNOWN",
@@ -7657,14 +7684,6 @@ zod.z.object({
7657
7684
  warnAgeHours: zod.z.number().int().positive().default(24 * 7),
7658
7685
  failAgeHours: zod.z.number().int().positive().default(24 * 14)
7659
7686
  });
7660
- zod.z.object({
7661
- slug: zod.z.string().min(1),
7662
- warnThreshold: zod.z.number().int().nonnegative().default(200)
7663
- });
7664
- zod.z.object({
7665
- slug: zod.z.string().min(1),
7666
- warnAgeHours: zod.z.number().int().nonnegative().default(24 * 30)
7667
- });
7668
7687
  zod.z.object({
7669
7688
  slug: zod.z.string().min(1),
7670
7689
  warnAgeHours: zod.z.number().int().nonnegative().default(24 * 30),
@@ -7900,6 +7919,26 @@ Returns all brands belonging to the organization associated with your API key,
7900
7919
  including sub-brands (\`ORGANIZATION\`) and individual / employee brands
7901
7920
  (\`INDIVIDUAL\`). Soft-deleted brands are excluded.`
7902
7921
  );
7922
+ var brandLegalDocumentSchema = zod.z.object({
7923
+ present: zod.z.boolean().describe("Whether the brand has this document attached"),
7924
+ fileName: zod.z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
7925
+ fileUrl: zod.z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
7926
+ });
7927
+ var brandTrademarkRegistrationSchema = zod.z.object({
7928
+ id: zod.z.number().describe("Trademark registration ID"),
7929
+ brandName: zod.z.string().describe("Trademarked brand name as it appears on the registration"),
7930
+ trademarkOffice: zod.z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
7931
+ registrationNumber: zod.z.string().describe("Registration number assigned by the office"),
7932
+ goodsAndServicesClass: zod.z.string().describe("Nice Classification class(es) the registration covers"),
7933
+ rightsOwnerName: zod.z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
7934
+ registrationPageUrl: zod.z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
7935
+ certificateFileName: zod.z.string().nullable().describe(
7936
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
7937
+ ),
7938
+ certificateFileUrl: zod.z.string().nullable().describe(
7939
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
7940
+ )
7941
+ });
7903
7942
  var brandItemSchema = zod.z.object({
7904
7943
  id: zod.z.number().describe("Brand ID"),
7905
7944
  slug: zod.z.string().describe("Brand slug (stable, URL-safe identifier)"),
@@ -7908,15 +7947,32 @@ var brandItemSchema = zod.z.object({
7908
7947
  "Brand type: `ORGANIZATION` for parent / product brands, `INDIVIDUAL` for employee or person brands"
7909
7948
  ),
7910
7949
  description: zod.z.string().nullable().describe("Free-form description, if set"),
7950
+ avatarUrl: zod.z.string().nullable().describe("URL of the brand's avatar / logo image"),
7951
+ websiteUrl: zod.z.string().nullable().describe("Official brand website URL"),
7952
+ twitterHandle: zod.z.string().nullable().describe("Official Twitter / X handle (without @)"),
7953
+ brandColors: zod.z.array(zod.z.string()).describe("HEX color strings associated with the brand (e.g. `#FF0000`)"),
7954
+ includedTerms: zod.z.array(zod.z.string()).describe("Terms that should be included when matching this brand"),
7955
+ excludedTerms: zod.z.array(zod.z.string()).describe("Terms that should be excluded when matching this brand"),
7956
+ tickers: zod.z.array(zod.z.string()).describe("Ticker symbols associated with the brand (e.g. `$JUP`)"),
7911
7957
  brandGroupId: zod.z.number().nullable().describe("Group this brand belongs to (only set for `INDIVIDUAL` brands)"),
7912
- createdAt: zod.z.date().describe("When the brand was created")
7958
+ createdAt: zod.z.date().describe("When the brand was created"),
7959
+ useOrganizationDocs: zod.z.boolean().describe(
7960
+ "When true, this brand inherits its Letter of Authorization and Power of Attorney from the organization rather than carrying its own. The `legalDocuments` block below always reflects the brand-level attachments \u2014 read `/user/orgs/{slug}` for the org-level fallbacks."
7961
+ ),
7962
+ legalDocuments: zod.z.object({
7963
+ letterOfAuthorization: brandLegalDocumentSchema,
7964
+ powerOfAttorney: brandLegalDocumentSchema
7965
+ }).describe("Brand-level Letter of Authorization and Power of Attorney attachments"),
7966
+ trademarkRegistrations: zod.z.array(brandTrademarkRegistrationSchema).describe(
7967
+ "Trademark registrations attached to this brand. An empty array means no trademarks are on file for the brand \u2014 use this to identify brands that still need them added."
7968
+ )
7913
7969
  });
7914
7970
  zod.z.object({
7915
7971
  brands: zod.z.array(brandItemSchema).describe("List of brands")
7916
7972
  }).describe("Successful operation");
7917
7973
  var FILTERABLE_SUBSCRIPTION_STATUSES = [
7918
7974
  SubscriptionStatus.PROSPECT,
7919
- SubscriptionStatus.TRIAL,
7975
+ SubscriptionStatus.POC,
7920
7976
  SubscriptionStatus.ACTIVE,
7921
7977
  SubscriptionStatus.INTEGRATION
7922
7978
  ];
@@ -7980,6 +8036,41 @@ var PendingServiceApprovalSchema = zod.z.object({
7980
8036
  // When the enable request was submitted (ISO 8601, UTC).
7981
8037
  requestedAt: zod.z.string()
7982
8038
  });
8039
+ var UserOrgIntegrationsSchema = zod.z.object({
8040
+ slack: zod.z.boolean(),
8041
+ discord: zod.z.boolean(),
8042
+ telegram: zod.z.object({
8043
+ connected: zod.z.boolean(),
8044
+ groupCount: zod.z.number()
8045
+ }),
8046
+ vercel: zod.z.boolean(),
8047
+ intercom: zod.z.boolean(),
8048
+ moderation: zod.z.boolean()
8049
+ });
8050
+ var UserOrgLegalDocumentSchema = zod.z.object({
8051
+ present: zod.z.boolean().describe("Whether the organization has this document attached"),
8052
+ fileName: zod.z.string().nullable().describe("Original filename of the uploaded document (null when not present)"),
8053
+ fileUrl: zod.z.string().nullable().describe("Direct URL to view or download the document (null when not present)")
8054
+ });
8055
+ var UserOrgLegalDocumentsSchema = zod.z.object({
8056
+ letterOfAuthorization: UserOrgLegalDocumentSchema,
8057
+ powerOfAttorney: UserOrgLegalDocumentSchema
8058
+ });
8059
+ var UserOrgTrademarkRegistrationSchema = zod.z.object({
8060
+ id: zod.z.number().describe("Trademark registration ID"),
8061
+ brandName: zod.z.string().describe("Trademarked brand name as it appears on the registration"),
8062
+ trademarkOffice: zod.z.string().describe("Issuing trademark office (e.g. `USPTO`, `EUIPO`)"),
8063
+ registrationNumber: zod.z.string().describe("Registration number assigned by the office"),
8064
+ goodsAndServicesClass: zod.z.string().describe("Nice Classification class(es) the registration covers"),
8065
+ rightsOwnerName: zod.z.string().nullable().describe("Legal entity the trademark is registered to, if recorded"),
8066
+ registrationPageUrl: zod.z.string().nullable().describe("Public URL on the trademark office's site, if recorded"),
8067
+ certificateFileName: zod.z.string().nullable().describe(
8068
+ "Original filename of the uploaded certificate PDF (null when no certificate is attached)"
8069
+ ),
8070
+ certificateFileUrl: zod.z.string().nullable().describe(
8071
+ "Direct URL to view or download the certificate PDF (null when no certificate is attached)"
8072
+ )
8073
+ });
7983
8074
  var UserOrgSchema = zod.z.object({
7984
8075
  id: zod.z.number(),
7985
8076
  name: zod.z.string(),
@@ -7995,8 +8086,15 @@ var UserOrgSchema = zod.z.object({
7995
8086
  detection: singleServiceSchema,
7996
8087
  darkWebMonitoring: singleServiceSchema
7997
8088
  }),
8089
+ integrations: UserOrgIntegrationsSchema,
7998
8090
  obligatoryAdminApproval: UserOrgObligatoryAdminApprovalSchema,
7999
- pendingServiceApprovals: zod.z.array(PendingServiceApprovalSchema)
8091
+ pendingServiceApprovals: zod.z.array(PendingServiceApprovalSchema),
8092
+ legalDocuments: UserOrgLegalDocumentsSchema.describe(
8093
+ "Org-level Letter of Authorization and Power of Attorney attachments"
8094
+ ),
8095
+ trademarkRegistrations: zod.z.array(UserOrgTrademarkRegistrationSchema).describe(
8096
+ "Org-level trademark registrations attached to the organization. An empty array means no trademarks are on file \u2014 use this to identify customers who still need to add them."
8097
+ )
8000
8098
  });
8001
8099
  zod.z.object({
8002
8100
  organizations: zod.z.array(UserOrgSchema)
@@ -8041,7 +8139,7 @@ zod.z.object({
8041
8139
  "Shortcut for 'every org the caller is authorized to read'. Reuses the same filter logic as `/user/orgs`: org-scoped API keys are rejected (they're pinned to one org \u2014 use the default form); user API keys / Bearer sessions resolve to the user's memberships (or every active org for staff). Combine with `subscriptionStatus` and `services` to narrow (e.g. only paying customers with takedowns enabled). The resolved org set is still capped at " + String(ORGANIZATION_METRICS_MAX_SLUGS) + " and a 413 is returned if exceeded. Mutually exclusive with `organizationSlug`, `slugs`, and `brandSlug`."
8042
8140
  ),
8043
8141
  subscriptionStatus: zod.z.array(UserOrgsSubscriptionStatusSchema).min(1).optional().describe(
8044
- "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/TRIAL/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8142
+ "Only meaningful with `allMyOrgs: true`. Defaults to the same set `/user/orgs` uses (ACTIVE/POC/PROSPECT/INTEGRATION \u2014 INACTIVE is always excluded)."
8045
8143
  ),
8046
8144
  services: organizationMetricsServicesFilterSchema.describe(
8047
8145
  "Only meaningful with `allMyOrgs: true`. Same shape as `/user/orgs`'s `services` filter \u2014 every service accepts `{ active }`, and **only `takedowns` additionally accepts `automated`** (the one service where manual-vs-automated changes real platform behavior). E.g. `{ takedowns: { active: true, automated: false } }` for 'orgs with takedowns enabled but automation off'."
@@ -8210,6 +8308,7 @@ var AssetScanEnrichmentSource = /* @__PURE__ */ ((AssetScanEnrichmentSource2) =>
8210
8308
  AssetScanEnrichmentSource2["REDDIT_API"] = "reddit_api";
8211
8309
  AssetScanEnrichmentSource2["MAILS_API"] = "mails_api";
8212
8310
  AssetScanEnrichmentSource2["TELNYX_LOOKUP"] = "telnyx_lookup";
8311
+ AssetScanEnrichmentSource2["TWILIO_LOOKUP"] = "twilio_lookup";
8213
8312
  AssetScanEnrichmentSource2["DAILYMOTION_API"] = "dailymotion_api";
8214
8313
  AssetScanEnrichmentSource2["VIMEO_API"] = "vimeo_api";
8215
8314
  AssetScanEnrichmentSource2["STACKBLITZ_API"] = "stackblitz_api";
@@ -8311,6 +8410,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_LABELS = {
8311
8410
  ["mails_api" /* MAILS_API */]: "Mails.so API",
8312
8411
  // Phone Number
8313
8412
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: "Telnyx Lookup",
8413
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: "Twilio Lookup",
8314
8414
  // DailyMotion
8315
8415
  ["dailymotion_api" /* DAILYMOTION_API */]: "DailyMotion API",
8316
8416
  // Vimeo
@@ -8402,6 +8502,7 @@ var ASSET_SCAN_ENRICHMENT_SOURCE_TO_TYPES = {
8402
8502
  ["mails_api" /* MAILS_API */]: ["email_validation" /* EMAIL_VALIDATION */],
8403
8503
  // Phone Number-related sources
8404
8504
  ["telnyx_lookup" /* TELNYX_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8505
+ ["twilio_lookup" /* TWILIO_LOOKUP */]: ["phone_lookup" /* PHONE_LOOKUP */],
8405
8506
  // DailyMotion-related sources
8406
8507
  ["dailymotion_api" /* DAILYMOTION_API */]: [
8407
8508
  "dailymotion_video" /* DAILYMOTION_VIDEO */
@@ -10795,124 +10896,34 @@ function slugify(string, options) {
10795
10896
  return string;
10796
10897
  }
10797
10898
 
10798
- // ../../internal/utils/src/punycode.ts
10799
- var maxInt = 2147483647;
10800
- var base = 36;
10801
- var tMin = 1;
10802
- var tMax = 26;
10803
- var skew = 38;
10804
- var damp = 700;
10805
- var initialBias = 72;
10806
- var initialN = 128;
10807
- var delimiter = "-";
10808
- var regexPunycode = /^xn--/;
10809
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
10810
- var errors = {
10811
- overflow: "Overflow: input needs wider integers to process",
10812
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
10813
- "invalid-input": "Invalid input"
10814
- };
10815
- var baseMinusTMin = base - tMin;
10816
- var floor = Math.floor;
10817
- function error(type) {
10818
- throw new RangeError(errors[type]);
10819
- }
10820
- function mapDomain(domain, callback) {
10821
- const parts = domain.split("@");
10822
- let result = "";
10823
- if (parts.length > 1) {
10824
- result = parts[0] + "@";
10825
- domain = parts[1];
10826
- }
10827
- domain = domain.replace(regexSeparators, ".");
10828
- const labels = domain.split(".");
10829
- const encoded = labels.map(callback).join(".");
10830
- return result + encoded;
10831
- }
10832
- function basicToDigit(codePoint) {
10833
- if (codePoint >= 48 && codePoint < 58) {
10834
- return 26 + (codePoint - 48);
10835
- }
10836
- if (codePoint >= 65 && codePoint < 91) {
10837
- return codePoint - 65;
10838
- }
10839
- if (codePoint >= 97 && codePoint < 123) {
10840
- return codePoint - 97;
10841
- }
10842
- return base;
10843
- }
10844
- function adapt(delta, numPoints, firstTime) {
10845
- let k4 = 0;
10846
- delta = firstTime ? floor(delta / damp) : delta >> 1;
10847
- delta += floor(delta / numPoints);
10848
- for (
10849
- ;
10850
- /* no initialization */
10851
- delta > baseMinusTMin * tMax >> 1;
10852
- k4 += base
10853
- ) {
10854
- delta = floor(delta / baseMinusTMin);
10855
- }
10856
- return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
10857
- }
10858
- function decode(input) {
10859
- const output = [];
10860
- const inputLength = input.length;
10861
- let i = 0;
10862
- let n2 = initialN;
10863
- let bias2 = initialBias;
10864
- let basic = input.lastIndexOf(delimiter);
10865
- if (basic < 0) {
10866
- basic = 0;
10867
- }
10868
- for (let j = 0; j < basic; ++j) {
10869
- if (input.charCodeAt(j) >= 128) {
10870
- error("not-basic");
10871
- }
10872
- output.push(input.charCodeAt(j));
10873
- }
10874
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
10875
- const oldi = i;
10876
- for (let w = 1, k4 = base; ; k4 += base) {
10877
- if (index >= inputLength) {
10878
- error("invalid-input");
10879
- }
10880
- const digit = basicToDigit(input.charCodeAt(index++));
10881
- if (digit >= base) {
10882
- error("invalid-input");
10883
- }
10884
- if (digit > floor((maxInt - i) / w)) {
10885
- error("overflow");
10886
- }
10887
- i += digit * w;
10888
- const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
10889
- if (digit < t) {
10890
- break;
10891
- }
10892
- const baseMinusT = base - t;
10893
- if (w > floor(maxInt / baseMinusT)) {
10894
- error("overflow");
10895
- }
10896
- w *= baseMinusT;
10897
- }
10898
- const out = output.length + 1;
10899
- bias2 = adapt(i - oldi, out, oldi == 0);
10900
- if (floor(i / out) > maxInt - n2) {
10901
- error("overflow");
10902
- }
10903
- n2 += floor(i / out);
10904
- i %= out;
10905
- output.splice(i++, 0, n2);
10906
- }
10907
- return String.fromCodePoint(...output);
10908
- }
10909
- function toUnicode(input) {
10910
- return mapDomain(input, function(string) {
10911
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
10912
- });
10913
- }
10914
-
10915
- // ../../internal/utils/src/url.ts
10899
+ // ../asset-parse/src/model.ts
10900
+ var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
10901
+ AssetModel2["Addon"] = "addon";
10902
+ AssetModel2["App"] = "app";
10903
+ AssetModel2["Bot"] = "bot";
10904
+ AssetModel2["BusinessProfile"] = "business-profile";
10905
+ AssetModel2["Catalog"] = "catalog";
10906
+ AssetModel2["Collection"] = "collection";
10907
+ AssetModel2["Channel"] = "channel";
10908
+ AssetModel2["Group"] = "group";
10909
+ AssetModel2["Post"] = "post";
10910
+ AssetModel2["Profile"] = "profile";
10911
+ AssetModel2["Short"] = "short";
10912
+ AssetModel2["Video"] = "video";
10913
+ AssetModel2["Space"] = "space";
10914
+ AssetModel2["Issue"] = "issue";
10915
+ AssetModel2["PullRequest"] = "pull-request";
10916
+ AssetModel2["Discussion"] = "discussion";
10917
+ AssetModel2["Repository"] = "repository";
10918
+ AssetModel2["Article"] = "Article";
10919
+ AssetModel2["Comment"] = "comment";
10920
+ AssetModel2["List"] = "list";
10921
+ AssetModel2["Subreddit"] = "subreddit";
10922
+ AssetModel2["Community"] = "community";
10923
+ AssetModel2["MiniApp"] = "mini-app";
10924
+ AssetModel2["Developer"] = "developer";
10925
+ return AssetModel2;
10926
+ })(AssetModel || {});
10916
10927
  function isUrl(input) {
10917
10928
  if (input.trim() === "") {
10918
10929
  return false;
@@ -10922,21 +10933,6 @@ function isUrl(input) {
10922
10933
  }
10923
10934
  return URL.canParse(input) || URL.canParse(`https://${input}`);
10924
10935
  }
10925
- function isEmail(input) {
10926
- if (input.trim() === "") {
10927
- return false;
10928
- }
10929
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
10930
- return emailRegex.test(input);
10931
- }
10932
- function removeHttpProtocol(input) {
10933
- return input.replace(/^https?:\/\//, "");
10934
- }
10935
- function stripDomainWildcardPrefix(domain) {
10936
- const trimmedDomain = domain.trim();
10937
- const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
10938
- return strippedDomain.length > 0 ? strippedDomain : null;
10939
- }
10940
10936
  function getNormalizedUrl(input) {
10941
10937
  if (!isUrl(input)) {
10942
10938
  throw new Error(`Invalid URL: ${input}`);
@@ -10960,20 +10956,15 @@ function getNormalizedUrl(input) {
10960
10956
  throw new Error(`Invalid URL: ${input}`);
10961
10957
  }
10962
10958
  }
10963
- function getDefangedUrl(input) {
10964
- if (!isUrl(input)) {
10965
- console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
10966
- return input;
10959
+ var ensureHttpsPrefix = (url) => {
10960
+ if (!url.startsWith("http")) {
10961
+ return `https://${url}`;
10967
10962
  }
10968
- return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
10969
- }
10970
- function getRefangedUrl(input) {
10971
- return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
10972
- }
10963
+ return url.replace(/^https?:\/{1,2}/, "https://");
10964
+ };
10973
10965
  function getHostname(input) {
10974
10966
  try {
10975
- const normalizedUrl = getNormalizedUrl(input);
10976
- return normalizedUrl.hostname;
10967
+ return getNormalizedUrl(input).hostname;
10977
10968
  } catch (e4) {
10978
10969
  return null;
10979
10970
  }
@@ -11010,62 +11001,8 @@ function trimDomainToLevels(domain, options = { levels: 4 }) {
11010
11001
  const trimmedSubdomains = subdomains.slice(Math.max(eTLDPlusOneIndex - (options.levels - 1), 0)).join(".");
11011
11002
  return trimmedSubdomains;
11012
11003
  }
11013
- var ensureHttpsPrefix = (url) => {
11014
- if (!url.startsWith("http")) {
11015
- return `https://${url}`;
11016
- }
11017
- return url.replace(/^https?:\/{1,2}/, "https://");
11018
- };
11019
- function containsPunycode(url) {
11020
- return url.indexOf("xn--") !== -1;
11021
- }
11022
- function toUnicode2(url) {
11023
- return toUnicode(url);
11024
- }
11025
- function convertHttpsToHttp(url) {
11026
- if (url.startsWith("https://")) {
11027
- const httpUrl = new URL(url);
11028
- httpUrl.protocol = "http:";
11029
- return httpUrl.toString();
11030
- }
11031
- throw new Error(`URL is not HTTPS: ${url}`);
11032
- }
11033
- function generateCanonicalIPFSUrl(content) {
11034
- if (!content) {
11035
- return content;
11036
- }
11037
- if (content.includes("ipfs.io")) {
11038
- return content;
11039
- }
11040
- if (content.startsWith("Qm") || content.startsWith("bafy")) {
11041
- return `ipfs.io/ipfs/${content}`;
11042
- }
11043
- return content;
11044
- }
11045
- function isWalrusSite(content) {
11046
- return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11047
- }
11048
- function getFaviconUrl(content) {
11049
- const normalizedUrl = getNormalizedUrl(content);
11050
- return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11051
- }
11052
- function sanitizeHttpUrl(value) {
11053
- if (typeof value !== "string" || value.length === 0) {
11054
- return null;
11055
- }
11056
- try {
11057
- const parsed = new URL(value);
11058
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11059
- return null;
11060
- }
11061
- return parsed.toString();
11062
- } catch (e4) {
11063
- return null;
11064
- }
11065
- }
11066
- var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11067
11004
 
11068
- // ../../internal/utils/src/phone.ts
11005
+ // ../asset-parse/src/phone.ts
11069
11006
  var phone_exports = {};
11070
11007
  __export(phone_exports, {
11071
11008
  PHONE_NUMBER_REGEX: () => PHONE_NUMBER_REGEX,
@@ -11192,8 +11129,200 @@ function normalizePhoneNumber(phone) {
11192
11129
  return hasPlus ? `+${digitsOnly}` : digitsOnly;
11193
11130
  }
11194
11131
 
11195
- // ../../internal/utils/src/email.ts
11196
- var email_exports = {};
11132
+ // ../../internal/utils/src/punycode.ts
11133
+ var maxInt = 2147483647;
11134
+ var base = 36;
11135
+ var tMin = 1;
11136
+ var tMax = 26;
11137
+ var skew = 38;
11138
+ var damp = 700;
11139
+ var initialBias = 72;
11140
+ var initialN = 128;
11141
+ var delimiter = "-";
11142
+ var regexPunycode = /^xn--/;
11143
+ var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
11144
+ var errors = {
11145
+ overflow: "Overflow: input needs wider integers to process",
11146
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
11147
+ "invalid-input": "Invalid input"
11148
+ };
11149
+ var baseMinusTMin = base - tMin;
11150
+ var floor = Math.floor;
11151
+ function error(type) {
11152
+ throw new RangeError(errors[type]);
11153
+ }
11154
+ function mapDomain(domain, callback) {
11155
+ const parts = domain.split("@");
11156
+ let result = "";
11157
+ if (parts.length > 1) {
11158
+ result = parts[0] + "@";
11159
+ domain = parts[1];
11160
+ }
11161
+ domain = domain.replace(regexSeparators, ".");
11162
+ const labels = domain.split(".");
11163
+ const encoded = labels.map(callback).join(".");
11164
+ return result + encoded;
11165
+ }
11166
+ function basicToDigit(codePoint) {
11167
+ if (codePoint >= 48 && codePoint < 58) {
11168
+ return 26 + (codePoint - 48);
11169
+ }
11170
+ if (codePoint >= 65 && codePoint < 91) {
11171
+ return codePoint - 65;
11172
+ }
11173
+ if (codePoint >= 97 && codePoint < 123) {
11174
+ return codePoint - 97;
11175
+ }
11176
+ return base;
11177
+ }
11178
+ function adapt(delta, numPoints, firstTime) {
11179
+ let k4 = 0;
11180
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
11181
+ delta += floor(delta / numPoints);
11182
+ for (
11183
+ ;
11184
+ /* no initialization */
11185
+ delta > baseMinusTMin * tMax >> 1;
11186
+ k4 += base
11187
+ ) {
11188
+ delta = floor(delta / baseMinusTMin);
11189
+ }
11190
+ return floor(k4 + (baseMinusTMin + 1) * delta / (delta + skew));
11191
+ }
11192
+ function decode(input) {
11193
+ const output = [];
11194
+ const inputLength = input.length;
11195
+ let i = 0;
11196
+ let n2 = initialN;
11197
+ let bias2 = initialBias;
11198
+ let basic = input.lastIndexOf(delimiter);
11199
+ if (basic < 0) {
11200
+ basic = 0;
11201
+ }
11202
+ for (let j = 0; j < basic; ++j) {
11203
+ if (input.charCodeAt(j) >= 128) {
11204
+ error("not-basic");
11205
+ }
11206
+ output.push(input.charCodeAt(j));
11207
+ }
11208
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
11209
+ const oldi = i;
11210
+ for (let w = 1, k4 = base; ; k4 += base) {
11211
+ if (index >= inputLength) {
11212
+ error("invalid-input");
11213
+ }
11214
+ const digit = basicToDigit(input.charCodeAt(index++));
11215
+ if (digit >= base) {
11216
+ error("invalid-input");
11217
+ }
11218
+ if (digit > floor((maxInt - i) / w)) {
11219
+ error("overflow");
11220
+ }
11221
+ i += digit * w;
11222
+ const t = k4 <= bias2 ? tMin : k4 >= bias2 + tMax ? tMax : k4 - bias2;
11223
+ if (digit < t) {
11224
+ break;
11225
+ }
11226
+ const baseMinusT = base - t;
11227
+ if (w > floor(maxInt / baseMinusT)) {
11228
+ error("overflow");
11229
+ }
11230
+ w *= baseMinusT;
11231
+ }
11232
+ const out = output.length + 1;
11233
+ bias2 = adapt(i - oldi, out, oldi == 0);
11234
+ if (floor(i / out) > maxInt - n2) {
11235
+ error("overflow");
11236
+ }
11237
+ n2 += floor(i / out);
11238
+ i %= out;
11239
+ output.splice(i++, 0, n2);
11240
+ }
11241
+ return String.fromCodePoint(...output);
11242
+ }
11243
+ function toUnicode(input) {
11244
+ return mapDomain(input, function(string) {
11245
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
11246
+ });
11247
+ }
11248
+
11249
+ // ../../internal/utils/src/url.ts
11250
+ function isEmail(input) {
11251
+ if (input.trim() === "") {
11252
+ return false;
11253
+ }
11254
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
11255
+ return emailRegex.test(input);
11256
+ }
11257
+ function removeHttpProtocol(input) {
11258
+ return input.replace(/^https?:\/\//, "");
11259
+ }
11260
+ function stripDomainWildcardPrefix(domain) {
11261
+ const trimmedDomain = domain.trim();
11262
+ const strippedDomain = trimmedDomain.startsWith("*.") ? trimmedDomain.slice(2) : trimmedDomain;
11263
+ return strippedDomain.length > 0 ? strippedDomain : null;
11264
+ }
11265
+ function getDefangedUrl(input) {
11266
+ if (!isUrl(input)) {
11267
+ console.warn(`[getDefangedUrl] Invalid URL: ${input}, returning input as-is`);
11268
+ return input;
11269
+ }
11270
+ return input.replace(/\./g, "[.]").replace(/(https:\/\/)/g, "hxxps://").replace(/(http:\/\/)/g, "hxxp://").replace(/:\/\//g, "[://]");
11271
+ }
11272
+ function getRefangedUrl(input) {
11273
+ return input.replace(/hxxps/gi, "https").replace(/hxxp/gi, "http").replace(/\[:\/{2}\]/g, "://").replace(/\[\.\]/g, ".");
11274
+ }
11275
+ function containsPunycode(url) {
11276
+ return url.indexOf("xn--") !== -1;
11277
+ }
11278
+ function toUnicode2(url) {
11279
+ return toUnicode(url);
11280
+ }
11281
+ function convertHttpsToHttp(url) {
11282
+ if (url.startsWith("https://")) {
11283
+ const httpUrl = new URL(url);
11284
+ httpUrl.protocol = "http:";
11285
+ return httpUrl.toString();
11286
+ }
11287
+ throw new Error(`URL is not HTTPS: ${url}`);
11288
+ }
11289
+ function generateCanonicalIPFSUrl(content) {
11290
+ if (!content) {
11291
+ return content;
11292
+ }
11293
+ if (content.includes("ipfs.io")) {
11294
+ return content;
11295
+ }
11296
+ if (content.startsWith("Qm") || content.startsWith("bafy")) {
11297
+ return `ipfs.io/ipfs/${content}`;
11298
+ }
11299
+ return content;
11300
+ }
11301
+ function isWalrusSite(content) {
11302
+ return content.includes(".walrus.site") || content.includes(".walrus.host") || content.includes(".wal.app") || content.includes(".wal.site");
11303
+ }
11304
+ function getFaviconUrl(content) {
11305
+ const normalizedUrl = getNormalizedUrl(content);
11306
+ return `https://icons.duckduckgo.com/ip3/${normalizedUrl.hostname}.ico`;
11307
+ }
11308
+ function sanitizeHttpUrl(value) {
11309
+ if (typeof value !== "string" || value.length === 0) {
11310
+ return null;
11311
+ }
11312
+ try {
11313
+ const parsed = new URL(value);
11314
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
11315
+ return null;
11316
+ }
11317
+ return parsed.toString();
11318
+ } catch (e4) {
11319
+ return null;
11320
+ }
11321
+ }
11322
+ var URL_REGEX = /https?:\/\/[^\s"'<>\])]*/g;
11323
+
11324
+ // ../../internal/utils/src/email.ts
11325
+ var email_exports = {};
11197
11326
  __export(email_exports, {
11198
11327
  extractTextFromGmailPayload: () => extractTextFromGmailPayload,
11199
11328
  getDomainFromEmail: () => getDomainFromEmail,
@@ -11438,816 +11567,6 @@ function countPatternMatches(content, pattern, maxMatches = DEFAULT_MAX_MATCHES)
11438
11567
  return count;
11439
11568
  }
11440
11569
 
11441
- // ../../internal/utils/src/itunes-api.ts
11442
- var itunes_api_exports = {};
11443
- __export(itunes_api_exports, {
11444
- APP_STORE_COUNTRIES: () => APP_STORE_COUNTRIES,
11445
- fetchItunesAppData: () => fetchItunesAppData,
11446
- fetchItunesSearchResults: () => fetchItunesSearchResults,
11447
- getAllAppStoreCountryCodes: () => getAllAppStoreCountryCodes,
11448
- getAppStoreCountryName: () => getAppStoreCountryName,
11449
- isValidAppStoreCountryCode: () => isValidAppStoreCountryCode,
11450
- selectBestArtworkUrl: () => selectBestArtworkUrl
11451
- });
11452
- var APP_STORE_COUNTRIES = [
11453
- { code: "al", name: "Albania" },
11454
- { code: "dz", name: "Algeria" },
11455
- { code: "ao", name: "Angola" },
11456
- { code: "ai", name: "Anguilla" },
11457
- { code: "ag", name: "Antigua and Barbuda" },
11458
- { code: "ar", name: "Argentina" },
11459
- { code: "am", name: "Armenia" },
11460
- { code: "au", name: "Australia" },
11461
- { code: "at", name: "Austria" },
11462
- { code: "az", name: "Azerbaijan" },
11463
- { code: "bs", name: "Bahamas" },
11464
- { code: "bh", name: "Bahrain" },
11465
- { code: "bb", name: "Barbados" },
11466
- { code: "by", name: "Belarus" },
11467
- { code: "be", name: "Belgium" },
11468
- { code: "bz", name: "Belize" },
11469
- { code: "bj", name: "Benin" },
11470
- { code: "bm", name: "Bermuda" },
11471
- { code: "bt", name: "Bhutan" },
11472
- { code: "bo", name: "Bolivia" },
11473
- { code: "bw", name: "Botswana" },
11474
- { code: "br", name: "Brazil" },
11475
- { code: "vg", name: "British Virgin Islands" },
11476
- { code: "bn", name: "Brunei" },
11477
- { code: "bg", name: "Bulgaria" },
11478
- { code: "bf", name: "Burkina Faso" },
11479
- { code: "kh", name: "Cambodia" },
11480
- { code: "ca", name: "Canada" },
11481
- { code: "cv", name: "Cape Verde" },
11482
- { code: "ky", name: "Cayman Islands" },
11483
- { code: "cl", name: "Chile" },
11484
- { code: "td", name: "Chad" },
11485
- { code: "cn", name: "China" },
11486
- { code: "co", name: "Colombia" },
11487
- { code: "cd", name: "Congo" },
11488
- { code: "cr", name: "Costa Rica" },
11489
- { code: "hr", name: "Croatia" },
11490
- { code: "cy", name: "Cyprus" },
11491
- { code: "cz", name: "Czechia" },
11492
- { code: "dk", name: "Denmark" },
11493
- { code: "dm", name: "Dominica" },
11494
- { code: "do", name: "Dominican Republic" },
11495
- { code: "ec", name: "Ecuador" },
11496
- { code: "eg", name: "Egypt" },
11497
- { code: "sv", name: "El Salvador" },
11498
- { code: "ee", name: "Estonia" },
11499
- { code: "fj", name: "Fiji" },
11500
- { code: "fi", name: "Finland" },
11501
- { code: "fr", name: "France" },
11502
- { code: "de", name: "Germany" },
11503
- { code: "gm", name: "Gambia" },
11504
- { code: "gb", name: "United Kingdom" },
11505
- { code: "gh", name: "Ghana" },
11506
- { code: "gr", name: "Greece" },
11507
- { code: "gd", name: "Grenada" },
11508
- { code: "gt", name: "Guatemala" },
11509
- { code: "gw", name: "Guinea-bissau" },
11510
- { code: "gy", name: "Guyana" },
11511
- { code: "hn", name: "Honduras" },
11512
- { code: "hk", name: "Hong Kong" },
11513
- { code: "hu", name: "Hungary" },
11514
- { code: "is", name: "Iceland" },
11515
- { code: "in", name: "India" },
11516
- { code: "id", name: "Indonesia" },
11517
- { code: "ie", name: "Ireland" },
11518
- { code: "il", name: "Israel" },
11519
- { code: "it", name: "Italy" },
11520
- { code: "jm", name: "Jamaica" },
11521
- { code: "jp", name: "Japan" },
11522
- { code: "jo", name: "Jordan" },
11523
- { code: "kz", name: "Kazakhstan" },
11524
- { code: "ke", name: "Kenya" },
11525
- { code: "kw", name: "Kuwait" },
11526
- { code: "kg", name: "Kyrgyzstan" },
11527
- { code: "la", name: "Lao Peoples Democratic Republic" },
11528
- { code: "lv", name: "Latvia" },
11529
- { code: "lb", name: "Lebanon" },
11530
- { code: "li", name: "Liberia" },
11531
- { code: "lt", name: "Lithuania" },
11532
- { code: "lu", name: "Luxembourg" },
11533
- { code: "mo", name: "Macao" },
11534
- { code: "mk", name: "North Macedonia" },
11535
- { code: "mg", name: "Madagascar" },
11536
- { code: "mw", name: "Malawi" },
11537
- { code: "my", name: "Malaysia" },
11538
- { code: "ml", name: "Mali" },
11539
- { code: "mt", name: "Malta" },
11540
- { code: "mr", name: "Mauritania" },
11541
- { code: "mu", name: "Mauritius" },
11542
- { code: "mx", name: "Mexico" },
11543
- { code: "fm", name: "Micronesia" },
11544
- { code: "md", name: "Moldova" },
11545
- { code: "mn", name: "Mongolia" },
11546
- { code: "ms", name: "Montserrat" },
11547
- { code: "mz", name: "Mozambique" },
11548
- { code: "na", name: "Namibia" },
11549
- { code: "np", name: "Nepal" },
11550
- { code: "nl", name: "Netherlands" },
11551
- { code: "nz", name: "New Zealand" },
11552
- { code: "ni", name: "Nicaragua" },
11553
- { code: "ne", name: "Niger" },
11554
- { code: "ng", name: "Nigeria" },
11555
- { code: "no", name: "Norway" },
11556
- { code: "om", name: "Oman" },
11557
- { code: "pk", name: "Pakistan" },
11558
- { code: "pw", name: "Palau" },
11559
- { code: "pa", name: "Panama" },
11560
- { code: "pg", name: "Papua New Guinea" },
11561
- { code: "py", name: "Paraguay" },
11562
- { code: "pe", name: "Peru" },
11563
- { code: "ph", name: "Philippines" },
11564
- { code: "pl", name: "Poland" },
11565
- { code: "pt", name: "Portugal" },
11566
- { code: "qa", name: "Qatar" },
11567
- { code: "ro", name: "Romania" },
11568
- { code: "ru", name: "Russia" },
11569
- { code: "st", name: "Sao Tome & Principe" },
11570
- { code: "sa", name: "Saudi Arabia" },
11571
- { code: "sn", name: "Senegal" },
11572
- { code: "sc", name: "Seychelles" },
11573
- { code: "sl", name: "Sierra Leone" },
11574
- { code: "sg", name: "Singapore" },
11575
- { code: "sk", name: "Slovakia" },
11576
- { code: "si", name: "Slovenia" },
11577
- { code: "sb", name: "Solomon Islands" },
11578
- { code: "za", name: "South Africa" },
11579
- { code: "kr", name: "South Korea" },
11580
- { code: "es", name: "Spain" },
11581
- { code: "lk", name: "Sri Lanka" },
11582
- { code: "kn", name: "St. Kitts and Nevis" },
11583
- { code: "lc", name: "St. Lucia" },
11584
- { code: "vc", name: "St. Vincent & The Grenadines" },
11585
- { code: "sr", name: "Suriname" },
11586
- { code: "sz", name: "Swaziland" },
11587
- { code: "se", name: "Sweden" },
11588
- { code: "ch", name: "Switzerland" },
11589
- { code: "tw", name: "Taiwan" },
11590
- { code: "tj", name: "Tajikistan" },
11591
- { code: "tz", name: "Tanzania" },
11592
- { code: "th", name: "Thailand" },
11593
- { code: "tt", name: "Trinidad and Tobago" },
11594
- { code: "tn", name: "Tunisia" },
11595
- { code: "tr", name: "Turkey" },
11596
- { code: "tm", name: "Turkmenistan" },
11597
- { code: "tc", name: "Turks and Caicos" },
11598
- { code: "ug", name: "Uganda" },
11599
- { code: "ua", name: "Ukraine" },
11600
- { code: "ae", name: "United Arab Emirates" },
11601
- { code: "us", name: "United States" },
11602
- { code: "uy", name: "Uruguay" },
11603
- { code: "uz", name: "Uzbekistan" },
11604
- { code: "ve", name: "Venezuela" },
11605
- { code: "vn", name: "Vietnam" },
11606
- { code: "ye", name: "Yemen" },
11607
- { code: "zw", name: "Zimbabwe" }
11608
- ];
11609
- var APP_STORE_COUNTRY_MAP = new Map(
11610
- APP_STORE_COUNTRIES.map((country) => [country.code, country.name])
11611
- );
11612
- var APP_STORE_CODES_SET = new Set(APP_STORE_COUNTRIES.map((country) => country.code));
11613
- var APP_STORE_CODES_ARRAY = Array.from(APP_STORE_CODES_SET).sort();
11614
- function getAppStoreCountryName(code) {
11615
- return APP_STORE_COUNTRY_MAP.get(code);
11616
- }
11617
- function getAllAppStoreCountryCodes() {
11618
- return APP_STORE_CODES_ARRAY;
11619
- }
11620
- function isValidAppStoreCountryCode(code) {
11621
- return APP_STORE_CODES_SET.has(code);
11622
- }
11623
- function selectBestArtworkUrl(appData) {
11624
- return appData.artworkUrl512 || appData.artworkUrl100 || appData.artworkUrl60;
11625
- }
11626
- function fetchItunesSearchResults(term, country = "us", limit = 10) {
11627
- return __async(this, null, function* () {
11628
- const params = new URLSearchParams({
11629
- media: "software",
11630
- term,
11631
- country,
11632
- lang: "en_us",
11633
- entity: "software",
11634
- explicit: "yes",
11635
- limit: String(limit)
11636
- });
11637
- const response = yield fetch(`https://itunes.apple.com/search?${params.toString()}`, {
11638
- headers: { "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)" }
11639
- });
11640
- if (!response.ok) {
11641
- throw new Error(`iTunes API returned ${response.status} ${response.statusText}`);
11642
- }
11643
- const data = yield response.json();
11644
- return data.results.map((r) => ({
11645
- trackId: r.trackId,
11646
- trackName: r.trackName,
11647
- trackViewUrl: r.trackViewUrl,
11648
- releaseDate: r.releaseDate,
11649
- artistName: r.artistName,
11650
- bundleId: r.bundleId
11651
- }));
11652
- });
11653
- }
11654
- function fetchItunesAppData(appId, country = "us") {
11655
- return __async(this, null, function* () {
11656
- try {
11657
- const apiUrl = `https://itunes.apple.com/lookup?id=${appId}&country=${country}&entity=software`;
11658
- const response = yield fetch(apiUrl, {
11659
- headers: {
11660
- "User-Agent": "ChainPatrol/1.0 (https://chainpatrol.io)"
11661
- }
11662
- });
11663
- if (!response.ok) {
11664
- throw new Error(
11665
- `iTunes API request failed: ${response.status} ${response.statusText}`
11666
- );
11667
- }
11668
- const data = yield response.json();
11669
- if (data.resultCount > 0 && data.results.length > 0) {
11670
- return data.results[0];
11671
- }
11672
- return null;
11673
- } catch (error2) {
11674
- console.error("Error fetching iTunes app data", { error: error2 });
11675
- return null;
11676
- }
11677
- });
11678
- }
11679
-
11680
- // ../../internal/utils/src/google-play-api.ts
11681
- var GOOGLE_PLAY_COUNTRIES = [
11682
- { code: "af", name: "Afghanistan" },
11683
- { code: "al", name: "Albania" },
11684
- { code: "dz", name: "Algeria" },
11685
- { code: "as", name: "American Samoa" },
11686
- { code: "ad", name: "Andorra" },
11687
- { code: "ao", name: "Angola" },
11688
- { code: "ai", name: "Anguilla" },
11689
- { code: "aq", name: "Antarctica" },
11690
- { code: "ag", name: "Antigua and Barbuda" },
11691
- { code: "ar", name: "Argentina" },
11692
- { code: "am", name: "Armenia" },
11693
- { code: "aw", name: "Aruba" },
11694
- { code: "au", name: "Australia" },
11695
- { code: "at", name: "Austria" },
11696
- { code: "az", name: "Azerbaijan" },
11697
- { code: "bs", name: "Bahamas" },
11698
- { code: "bh", name: "Bahrain" },
11699
- { code: "bd", name: "Bangladesh" },
11700
- { code: "bb", name: "Barbados" },
11701
- { code: "by", name: "Belarus" },
11702
- { code: "be", name: "Belgium" },
11703
- { code: "bz", name: "Belize" },
11704
- { code: "bj", name: "Benin" },
11705
- { code: "bm", name: "Bermuda" },
11706
- { code: "bt", name: "Bhutan" },
11707
- { code: "bo", name: "Bolivia" },
11708
- { code: "ba", name: "Bosnia and Herzegovina" },
11709
- { code: "bw", name: "Botswana" },
11710
- { code: "bv", name: "Bouvet Island" },
11711
- { code: "br", name: "Brazil" },
11712
- { code: "io", name: "British Indian Ocean Territory" },
11713
- { code: "bn", name: "Brunei Darussalam" },
11714
- { code: "bg", name: "Bulgaria" },
11715
- { code: "bf", name: "Burkina Faso" },
11716
- { code: "bi", name: "Burundi" },
11717
- { code: "kh", name: "Cambodia" },
11718
- { code: "cm", name: "Cameroon" },
11719
- { code: "ca", name: "Canada" },
11720
- { code: "cv", name: "Cape Verde" },
11721
- { code: "ky", name: "Cayman Islands" },
11722
- { code: "cf", name: "Central African Republic" },
11723
- { code: "td", name: "Chad" },
11724
- { code: "cl", name: "Chile" },
11725
- { code: "cn", name: "China" },
11726
- { code: "cx", name: "Christmas Island" },
11727
- { code: "cc", name: "Cocos (Keeling) Islands" },
11728
- { code: "co", name: "Colombia" },
11729
- { code: "km", name: "Comoros" },
11730
- { code: "cg", name: "Congo" },
11731
- { code: "cd", name: "Congo, the Democratic Republic of the" },
11732
- { code: "ck", name: "Cook Islands" },
11733
- { code: "cr", name: "Costa Rica" },
11734
- { code: "ci", name: "Cote D'ivoire" },
11735
- { code: "hr", name: "Croatia" },
11736
- { code: "cu", name: "Cuba" },
11737
- { code: "cy", name: "Cyprus" },
11738
- { code: "cz", name: "Czech Republic" },
11739
- { code: "dk", name: "Denmark" },
11740
- { code: "dj", name: "Djibouti" },
11741
- { code: "dm", name: "Dominica" },
11742
- { code: "do", name: "Dominican Republic" },
11743
- { code: "ec", name: "Ecuador" },
11744
- { code: "eg", name: "Egypt" },
11745
- { code: "sv", name: "El Salvador" },
11746
- { code: "gq", name: "Equatorial Guinea" },
11747
- { code: "er", name: "Eritrea" },
11748
- { code: "ee", name: "Estonia" },
11749
- { code: "et", name: "Ethiopia" },
11750
- { code: "fk", name: "Falkland Islands (Malvinas)" },
11751
- { code: "fo", name: "Faroe Islands" },
11752
- { code: "fj", name: "Fiji" },
11753
- { code: "fi", name: "Finland" },
11754
- { code: "fr", name: "France" },
11755
- { code: "gf", name: "French Guiana" },
11756
- { code: "pf", name: "French Polynesia" },
11757
- { code: "tf", name: "French Southern Territories" },
11758
- { code: "ga", name: "Gabon" },
11759
- { code: "gm", name: "Gambia" },
11760
- { code: "ge", name: "Georgia" },
11761
- { code: "de", name: "Germany" },
11762
- { code: "gh", name: "Ghana" },
11763
- { code: "gi", name: "Gibraltar" },
11764
- { code: "gr", name: "Greece" },
11765
- { code: "gl", name: "Greenland" },
11766
- { code: "gd", name: "Grenada" },
11767
- { code: "gp", name: "Guadeloupe" },
11768
- { code: "gu", name: "Guam" },
11769
- { code: "gt", name: "Guatemala" },
11770
- { code: "gg", name: "Guernsey" },
11771
- { code: "gn", name: "Guinea" },
11772
- { code: "gw", name: "Guinea-Bissau" },
11773
- { code: "gy", name: "Guyana" },
11774
- { code: "ht", name: "Haiti" },
11775
- { code: "hm", name: "Heard Island and Mcdonald Islands" },
11776
- { code: "va", name: "Holy See (Vatican City State)" },
11777
- { code: "hn", name: "Honduras" },
11778
- { code: "hk", name: "Hong Kong" },
11779
- { code: "hu", name: "Hungary" },
11780
- { code: "is", name: "Iceland" },
11781
- { code: "in", name: "India" },
11782
- { code: "id", name: "Indonesia" },
11783
- { code: "ir", name: "Iran, Islamic Republic of" },
11784
- { code: "iq", name: "Iraq" },
11785
- { code: "ie", name: "Ireland" },
11786
- { code: "im", name: "Isle of Man" },
11787
- { code: "il", name: "Israel" },
11788
- { code: "it", name: "Italy" },
11789
- { code: "je", name: "Jersey" },
11790
- { code: "jm", name: "Jamaica" },
11791
- { code: "jp", name: "Japan" },
11792
- { code: "jo", name: "Jordan" },
11793
- { code: "kz", name: "Kazakhstan" },
11794
- { code: "ke", name: "Kenya" },
11795
- { code: "ki", name: "Kiribati" },
11796
- { code: "kp", name: "Korea, Democratic People's Republic of" },
11797
- { code: "kr", name: "Korea, Republic of" },
11798
- { code: "kw", name: "Kuwait" },
11799
- { code: "kg", name: "Kyrgyzstan" },
11800
- { code: "la", name: "Lao People's Democratic Republic" },
11801
- { code: "lv", name: "Latvia" },
11802
- { code: "lb", name: "Lebanon" },
11803
- { code: "ls", name: "Lesotho" },
11804
- { code: "lr", name: "Liberia" },
11805
- { code: "ly", name: "Libyan Arab Jamahiriya" },
11806
- { code: "li", name: "Liechtenstein" },
11807
- { code: "lt", name: "Lithuania" },
11808
- { code: "lu", name: "Luxembourg" },
11809
- { code: "mo", name: "Macao" },
11810
- { code: "mk", name: "Macedonia, the Former Yugoslav Republic of" },
11811
- { code: "mg", name: "Madagascar" },
11812
- { code: "mw", name: "Malawi" },
11813
- { code: "my", name: "Malaysia" },
11814
- { code: "mv", name: "Maldives" },
11815
- { code: "ml", name: "Mali" },
11816
- { code: "mt", name: "Malta" },
11817
- { code: "mh", name: "Marshall Islands" },
11818
- { code: "mq", name: "Martinique" },
11819
- { code: "mr", name: "Mauritania" },
11820
- { code: "mu", name: "Mauritius" },
11821
- { code: "yt", name: "Mayotte" },
11822
- { code: "mx", name: "Mexico" },
11823
- { code: "fm", name: "Micronesia, Federated States of" },
11824
- { code: "md", name: "Moldova, Republic of" },
11825
- { code: "mc", name: "Monaco" },
11826
- { code: "mn", name: "Mongolia" },
11827
- { code: "me", name: "Montenegro" },
11828
- { code: "ms", name: "Montserrat" },
11829
- { code: "ma", name: "Morocco" },
11830
- { code: "mz", name: "Mozambique" },
11831
- { code: "mm", name: "Myanmar" },
11832
- { code: "na", name: "Namibia" },
11833
- { code: "nr", name: "Nauru" },
11834
- { code: "np", name: "Nepal" },
11835
- { code: "nl", name: "Netherlands" },
11836
- { code: "an", name: "Netherlands Antilles" },
11837
- { code: "nc", name: "New Caledonia" },
11838
- { code: "nz", name: "New Zealand" },
11839
- { code: "ni", name: "Nicaragua" },
11840
- { code: "ne", name: "Niger" },
11841
- { code: "ng", name: "Nigeria" },
11842
- { code: "nu", name: "Niue" },
11843
- { code: "nf", name: "Norfolk Island" },
11844
- { code: "mp", name: "Northern Mariana Islands" },
11845
- { code: "no", name: "Norway" },
11846
- { code: "om", name: "Oman" },
11847
- { code: "pk", name: "Pakistan" },
11848
- { code: "pw", name: "Palau" },
11849
- { code: "ps", name: "Palestinian Territory, Occupied" },
11850
- { code: "pa", name: "Panama" },
11851
- { code: "pg", name: "Papua New Guinea" },
11852
- { code: "py", name: "Paraguay" },
11853
- { code: "pe", name: "Peru" },
11854
- { code: "ph", name: "Philippines" },
11855
- { code: "pn", name: "Pitcairn" },
11856
- { code: "pl", name: "Poland" },
11857
- { code: "pt", name: "Portugal" },
11858
- { code: "pr", name: "Puerto Rico" },
11859
- { code: "qa", name: "Qatar" },
11860
- { code: "re", name: "Reunion" },
11861
- { code: "ro", name: "Romania" },
11862
- { code: "ru", name: "Russian Federation" },
11863
- { code: "rw", name: "Rwanda" },
11864
- { code: "sh", name: "Saint Helena" },
11865
- { code: "kn", name: "Saint Kitts and Nevis" },
11866
- { code: "lc", name: "Saint Lucia" },
11867
- { code: "pm", name: "Saint Pierre and Miquelon" },
11868
- { code: "vc", name: "Saint Vincent and the Grenadines" },
11869
- { code: "ws", name: "Samoa" },
11870
- { code: "sm", name: "San Marino" },
11871
- { code: "st", name: "Sao Tome and Principe" },
11872
- { code: "sa", name: "Saudi Arabia" },
11873
- { code: "sn", name: "Senegal" },
11874
- { code: "rs", name: "Serbia" },
11875
- { code: "sc", name: "Seychelles" },
11876
- { code: "sl", name: "Sierra Leone" },
11877
- { code: "sg", name: "Singapore" },
11878
- { code: "sk", name: "Slovakia" },
11879
- { code: "si", name: "Slovenia" },
11880
- { code: "sb", name: "Solomon Islands" },
11881
- { code: "so", name: "Somalia" },
11882
- { code: "za", name: "South Africa" },
11883
- { code: "gs", name: "South Georgia and the South Sandwich Islands" },
11884
- { code: "es", name: "Spain" },
11885
- { code: "lk", name: "Sri Lanka" },
11886
- { code: "sd", name: "Sudan" },
11887
- { code: "sr", name: "Suriname" },
11888
- { code: "sj", name: "Svalbard and Jan Mayen" },
11889
- { code: "sz", name: "Swaziland" },
11890
- { code: "se", name: "Sweden" },
11891
- { code: "ch", name: "Switzerland" },
11892
- { code: "sy", name: "Syrian Arab Republic" },
11893
- { code: "tw", name: "Taiwan, Province of China" },
11894
- { code: "tj", name: "Tajikistan" },
11895
- { code: "tz", name: "Tanzania, United Republic of" },
11896
- { code: "th", name: "Thailand" },
11897
- { code: "tl", name: "Timor-Leste" },
11898
- { code: "tg", name: "Togo" },
11899
- { code: "tk", name: "Tokelau" },
11900
- { code: "to", name: "Tonga" },
11901
- { code: "tt", name: "Trinidad and Tobago" },
11902
- { code: "tn", name: "Tunisia" },
11903
- { code: "tr", name: "Turkiye" },
11904
- { code: "tm", name: "Turkmenistan" },
11905
- { code: "tc", name: "Turks and Caicos Islands" },
11906
- { code: "tv", name: "Tuvalu" },
11907
- { code: "ug", name: "Uganda" },
11908
- { code: "ua", name: "Ukraine" },
11909
- { code: "ae", name: "United Arab Emirates" },
11910
- { code: "uk", name: "United Kingdom" },
11911
- { code: "gb", name: "United Kingdom" },
11912
- { code: "us", name: "United States" },
11913
- { code: "um", name: "United States Minor Outlying Islands" },
11914
- { code: "uy", name: "Uruguay" },
11915
- { code: "uz", name: "Uzbekistan" },
11916
- { code: "vu", name: "Vanuatu" },
11917
- { code: "ve", name: "Venezuela" },
11918
- { code: "vn", name: "Viet Nam" },
11919
- { code: "vg", name: "Virgin Islands, British" },
11920
- { code: "vi", name: "Virgin Islands, U.S." },
11921
- { code: "wf", name: "Wallis and Futuna" },
11922
- { code: "eh", name: "Western Sahara" },
11923
- { code: "ye", name: "Yemen" },
11924
- { code: "zm", name: "Zambia" },
11925
- { code: "zw", name: "Zimbabwe" }
11926
- ];
11927
- var GOOGLE_PLAY_COUNTRY_MAP = new Map(
11928
- GOOGLE_PLAY_COUNTRIES.map((country) => [country.code, country.name])
11929
- );
11930
- var GOOGLE_PLAY_CODES_SET = new Set(
11931
- GOOGLE_PLAY_COUNTRIES.map((country) => country.code)
11932
- );
11933
- Array.from(GOOGLE_PLAY_CODES_SET).sort();
11934
- function getGooglePlayCountryName(code) {
11935
- return GOOGLE_PLAY_COUNTRY_MAP.get(code);
11936
- }
11937
-
11938
- // ../../internal/utils/src/country-codes.ts
11939
- var country_codes_exports = {};
11940
- __export(country_codes_exports, {
11941
- APPLE_ONLY_COUNTRY_CODES: () => APPLE_ONLY_COUNTRY_CODES,
11942
- COUNTRY_NAMES: () => COUNTRY_NAMES,
11943
- GOOGLE_ONLY_COUNTRY_CODES: () => GOOGLE_ONLY_COUNTRY_CODES,
11944
- SHARED_COUNTRY_CODES: () => SHARED_COUNTRY_CODES,
11945
- countryCodeToFlag: () => countryCodeToFlag,
11946
- getAllCountryCodes: () => getAllCountryCodes,
11947
- getCountryName: () => getCountryName,
11948
- isValidAppleCountryCode: () => isValidAppleCountryCode,
11949
- isValidGoogleCountryCode: () => isValidGoogleCountryCode
11950
- });
11951
- function createCountryLists() {
11952
- const appleCodesSet = new Set(APP_STORE_COUNTRIES.map((c2) => c2.code));
11953
- const googleCodesSet = new Set(GOOGLE_PLAY_COUNTRIES.map((c2) => c2.code));
11954
- const shared2 = [];
11955
- const appleOnly2 = [];
11956
- const googleOnly2 = [];
11957
- appleCodesSet.forEach((code) => {
11958
- if (googleCodesSet.has(code)) {
11959
- shared2.push(code);
11960
- } else {
11961
- appleOnly2.push(code);
11962
- }
11963
- });
11964
- googleCodesSet.forEach((code) => {
11965
- if (!appleCodesSet.has(code)) {
11966
- googleOnly2.push(code);
11967
- }
11968
- });
11969
- return {
11970
- shared: shared2.sort(),
11971
- appleOnly: appleOnly2.sort(),
11972
- googleOnly: googleOnly2.sort()
11973
- };
11974
- }
11975
- var { shared, appleOnly, googleOnly } = createCountryLists();
11976
- var SHARED_COUNTRY_CODES = shared;
11977
- var APPLE_ONLY_COUNTRY_CODES = appleOnly;
11978
- var GOOGLE_ONLY_COUNTRY_CODES = googleOnly;
11979
- function isValidGoogleCountryCode(code) {
11980
- return SHARED_COUNTRY_CODES.includes(code) || GOOGLE_ONLY_COUNTRY_CODES.includes(code);
11981
- }
11982
- function isValidAppleCountryCode(code) {
11983
- return SHARED_COUNTRY_CODES.includes(code) || APPLE_ONLY_COUNTRY_CODES.includes(code);
11984
- }
11985
- function getCountryName(code) {
11986
- return getAppStoreCountryName(code) || getGooglePlayCountryName(code);
11987
- }
11988
- function getAllCountryCodes(platform) {
11989
- if (platform === "apple") {
11990
- return [...SHARED_COUNTRY_CODES, ...APPLE_ONLY_COUNTRY_CODES].sort();
11991
- } else {
11992
- return [...SHARED_COUNTRY_CODES, ...GOOGLE_ONLY_COUNTRY_CODES].sort();
11993
- }
11994
- }
11995
- var COUNTRY_NAMES = {
11996
- AD: "Andorra",
11997
- AE: "United Arab Emirates",
11998
- AF: "Afghanistan",
11999
- AG: "Antigua and Barbuda",
12000
- AI: "Anguilla",
12001
- AL: "Albania",
12002
- AM: "Armenia",
12003
- AO: "Angola",
12004
- AQ: "Antarctica",
12005
- AR: "Argentina",
12006
- AS: "American Samoa",
12007
- AT: "Austria",
12008
- AU: "Australia",
12009
- AW: "Aruba",
12010
- AX: "\xC5land Islands",
12011
- AZ: "Azerbaijan",
12012
- BA: "Bosnia and Herzegovina",
12013
- BB: "Barbados",
12014
- BD: "Bangladesh",
12015
- BE: "Belgium",
12016
- BF: "Burkina Faso",
12017
- BG: "Bulgaria",
12018
- BH: "Bahrain",
12019
- BI: "Burundi",
12020
- BJ: "Benin",
12021
- BL: "Saint Barth\xE9lemy",
12022
- BM: "Bermuda",
12023
- BN: "Brunei",
12024
- BO: "Bolivia",
12025
- BQ: "Caribbean Netherlands",
12026
- BR: "Brazil",
12027
- BS: "Bahamas",
12028
- BT: "Bhutan",
12029
- BV: "Bouvet Island",
12030
- BW: "Botswana",
12031
- BY: "Belarus",
12032
- BZ: "Belize",
12033
- CA: "Canada",
12034
- CC: "Cocos (Keeling) Islands",
12035
- CD: "DR Congo",
12036
- CF: "Central African Republic",
12037
- CG: "Republic of the Congo",
12038
- CH: "Switzerland",
12039
- CI: "C\xF4te d'Ivoire",
12040
- CK: "Cook Islands",
12041
- CL: "Chile",
12042
- CM: "Cameroon",
12043
- CN: "China",
12044
- CO: "Colombia",
12045
- CR: "Costa Rica",
12046
- CU: "Cuba",
12047
- CV: "Cape Verde",
12048
- CW: "Cura\xE7ao",
12049
- CX: "Christmas Island",
12050
- CY: "Cyprus",
12051
- CZ: "Czechia",
12052
- DE: "Germany",
12053
- DJ: "Djibouti",
12054
- DK: "Denmark",
12055
- DM: "Dominica",
12056
- DO: "Dominican Republic",
12057
- DZ: "Algeria",
12058
- EC: "Ecuador",
12059
- EE: "Estonia",
12060
- EG: "Egypt",
12061
- EH: "Western Sahara",
12062
- ER: "Eritrea",
12063
- ES: "Spain",
12064
- ET: "Ethiopia",
12065
- FI: "Finland",
12066
- FJ: "Fiji",
12067
- FK: "Falkland Islands",
12068
- FM: "Micronesia",
12069
- FO: "Faroe Islands",
12070
- FR: "France",
12071
- GA: "Gabon",
12072
- GB: "United Kingdom",
12073
- GD: "Grenada",
12074
- GE: "Georgia",
12075
- GF: "French Guiana",
12076
- GG: "Guernsey",
12077
- GH: "Ghana",
12078
- GI: "Gibraltar",
12079
- GL: "Greenland",
12080
- GM: "Gambia",
12081
- GN: "Guinea",
12082
- GP: "Guadeloupe",
12083
- GQ: "Equatorial Guinea",
12084
- GR: "Greece",
12085
- GS: "South Georgia",
12086
- GT: "Guatemala",
12087
- GU: "Guam",
12088
- GW: "Guinea-Bissau",
12089
- GY: "Guyana",
12090
- HK: "Hong Kong",
12091
- HM: "Heard Island and McDonald Islands",
12092
- HN: "Honduras",
12093
- HR: "Croatia",
12094
- HT: "Haiti",
12095
- HU: "Hungary",
12096
- ID: "Indonesia",
12097
- IE: "Ireland",
12098
- IL: "Israel",
12099
- IM: "Isle of Man",
12100
- IN: "India",
12101
- IO: "British Indian Ocean Territory",
12102
- IQ: "Iraq",
12103
- IR: "Iran",
12104
- IS: "Iceland",
12105
- IT: "Italy",
12106
- JE: "Jersey",
12107
- JM: "Jamaica",
12108
- JO: "Jordan",
12109
- JP: "Japan",
12110
- KE: "Kenya",
12111
- KG: "Kyrgyzstan",
12112
- KH: "Cambodia",
12113
- KI: "Kiribati",
12114
- KM: "Comoros",
12115
- KN: "Saint Kitts and Nevis",
12116
- KP: "North Korea",
12117
- KR: "South Korea",
12118
- KW: "Kuwait",
12119
- KY: "Cayman Islands",
12120
- KZ: "Kazakhstan",
12121
- LA: "Laos",
12122
- LB: "Lebanon",
12123
- LC: "Saint Lucia",
12124
- LI: "Liechtenstein",
12125
- LK: "Sri Lanka",
12126
- LR: "Liberia",
12127
- LS: "Lesotho",
12128
- LT: "Lithuania",
12129
- LU: "Luxembourg",
12130
- LV: "Latvia",
12131
- LY: "Libya",
12132
- MA: "Morocco",
12133
- MC: "Monaco",
12134
- MD: "Moldova",
12135
- ME: "Montenegro",
12136
- MF: "Saint Martin",
12137
- MG: "Madagascar",
12138
- MH: "Marshall Islands",
12139
- MK: "North Macedonia",
12140
- ML: "Mali",
12141
- MM: "Myanmar",
12142
- MN: "Mongolia",
12143
- MO: "Macau",
12144
- MP: "Northern Mariana Islands",
12145
- MQ: "Martinique",
12146
- MR: "Mauritania",
12147
- MS: "Montserrat",
12148
- MT: "Malta",
12149
- MU: "Mauritius",
12150
- MV: "Maldives",
12151
- MW: "Malawi",
12152
- MX: "Mexico",
12153
- MY: "Malaysia",
12154
- MZ: "Mozambique",
12155
- NA: "Namibia",
12156
- NC: "New Caledonia",
12157
- NE: "Niger",
12158
- NF: "Norfolk Island",
12159
- NG: "Nigeria",
12160
- NI: "Nicaragua",
12161
- NL: "Netherlands",
12162
- NO: "Norway",
12163
- NP: "Nepal",
12164
- NR: "Nauru",
12165
- NU: "Niue",
12166
- NZ: "New Zealand",
12167
- OM: "Oman",
12168
- PA: "Panama",
12169
- PE: "Peru",
12170
- PF: "French Polynesia",
12171
- PG: "Papua New Guinea",
12172
- PH: "Philippines",
12173
- PK: "Pakistan",
12174
- PL: "Poland",
12175
- PM: "Saint Pierre and Miquelon",
12176
- PN: "Pitcairn Islands",
12177
- PR: "Puerto Rico",
12178
- PS: "Palestine",
12179
- PT: "Portugal",
12180
- PW: "Palau",
12181
- PY: "Paraguay",
12182
- QA: "Qatar",
12183
- RE: "R\xE9union",
12184
- RO: "Romania",
12185
- RS: "Serbia",
12186
- RU: "Russia",
12187
- RW: "Rwanda",
12188
- SA: "Saudi Arabia",
12189
- SB: "Solomon Islands",
12190
- SC: "Seychelles",
12191
- SD: "Sudan",
12192
- SE: "Sweden",
12193
- SG: "Singapore",
12194
- SH: "Saint Helena",
12195
- SI: "Slovenia",
12196
- SJ: "Svalbard and Jan Mayen",
12197
- SK: "Slovakia",
12198
- SL: "Sierra Leone",
12199
- SM: "San Marino",
12200
- SN: "Senegal",
12201
- SO: "Somalia",
12202
- SR: "Suriname",
12203
- SS: "South Sudan",
12204
- ST: "S\xE3o Tom\xE9 and Pr\xEDncipe",
12205
- SV: "El Salvador",
12206
- SX: "Sint Maarten",
12207
- SY: "Syria",
12208
- SZ: "Eswatini",
12209
- TC: "Turks and Caicos Islands",
12210
- TD: "Chad",
12211
- TF: "French Southern Territories",
12212
- TG: "Togo",
12213
- TH: "Thailand",
12214
- TJ: "Tajikistan",
12215
- TK: "Tokelau",
12216
- TL: "Timor-Leste",
12217
- TM: "Turkmenistan",
12218
- TN: "Tunisia",
12219
- TO: "Tonga",
12220
- TR: "Turkey",
12221
- TT: "Trinidad and Tobago",
12222
- TV: "Tuvalu",
12223
- TW: "Taiwan",
12224
- TZ: "Tanzania",
12225
- UA: "Ukraine",
12226
- UG: "Uganda",
12227
- UM: "U.S. Minor Outlying Islands",
12228
- US: "United States",
12229
- UY: "Uruguay",
12230
- UZ: "Uzbekistan",
12231
- VA: "Vatican City",
12232
- VC: "Saint Vincent and the Grenadines",
12233
- VE: "Venezuela",
12234
- VG: "British Virgin Islands",
12235
- VI: "U.S. Virgin Islands",
12236
- VN: "Vietnam",
12237
- VU: "Vanuatu",
12238
- WF: "Wallis and Futuna",
12239
- WS: "Samoa",
12240
- XK: "Kosovo",
12241
- YE: "Yemen",
12242
- YT: "Mayotte",
12243
- ZA: "South Africa",
12244
- ZM: "Zambia",
12245
- ZW: "Zimbabwe"
12246
- };
12247
- function countryCodeToFlag(code) {
12248
- return code.toUpperCase().split("").map((c2) => String.fromCodePoint(127462 + c2.charCodeAt(0) - 65)).join("");
12249
- }
12250
-
12251
11570
  // ../../internal/utils/src/text.ts
12252
11571
  var text_exports = {};
12253
11572
  __export(text_exports, {
@@ -12801,241 +12120,6 @@ zod.z.object({
12801
12120
  })
12802
12121
  )
12803
12122
  });
12804
-
12805
- // ../../internal/asset/src/parse/caip2.ts
12806
- var SUPPORTED_CHAINS = {
12807
- // EIP155 chains (Ethereum Virtual Machine compatible)
12808
- ETHEREUM_MAINNET: {
12809
- chainId: "eip155:1",
12810
- namespace: "eip155",
12811
- reference: "1",
12812
- name: "Ethereum Mainnet",
12813
- shortName: "Ethereum",
12814
- explorerUrl: "https://etherscan.io",
12815
- explorerName: "Etherscan"
12816
- },
12817
- OPTIMISM: {
12818
- chainId: "eip155:10",
12819
- namespace: "eip155",
12820
- reference: "10",
12821
- name: "Optimism",
12822
- shortName: "Optimism",
12823
- explorerUrl: "https://optimistic.etherscan.io",
12824
- explorerName: "Optimism Explorer"
12825
- },
12826
- POLYGON: {
12827
- chainId: "eip155:137",
12828
- namespace: "eip155",
12829
- reference: "137",
12830
- name: "Polygon",
12831
- shortName: "Polygon",
12832
- explorerUrl: "https://polygonscan.com",
12833
- explorerName: "PolygonScan"
12834
- },
12835
- ARBITRUM: {
12836
- chainId: "eip155:42161",
12837
- namespace: "eip155",
12838
- reference: "42161",
12839
- name: "Arbitrum",
12840
- shortName: "Arbitrum",
12841
- explorerUrl: "https://arbiscan.io",
12842
- explorerName: "Arbiscan"
12843
- },
12844
- BASE: {
12845
- chainId: "eip155:8453",
12846
- namespace: "eip155",
12847
- reference: "8453",
12848
- name: "Base",
12849
- shortName: "Base",
12850
- explorerUrl: "https://basescan.org",
12851
- explorerName: "BaseScan"
12852
- },
12853
- CELO: {
12854
- chainId: "eip155:42220",
12855
- namespace: "eip155",
12856
- reference: "42220",
12857
- name: "Celo",
12858
- shortName: "Celo",
12859
- explorerUrl: "https://celoscan.io",
12860
- explorerName: "CeloScan"
12861
- },
12862
- PLASMA: {
12863
- chainId: "eip155:9745",
12864
- namespace: "eip155",
12865
- reference: "9745",
12866
- name: "Plasma",
12867
- shortName: "Plasma",
12868
- explorerUrl: "https://plasmascan.to",
12869
- explorerName: "PlasmaScan"
12870
- },
12871
- BSC: {
12872
- chainId: "eip155:56",
12873
- namespace: "eip155",
12874
- reference: "56",
12875
- name: "Binance Smart Chain",
12876
- shortName: "BSC",
12877
- explorerUrl: "https://bscscan.com",
12878
- explorerName: "BscScan"
12879
- },
12880
- LINEA: {
12881
- chainId: "eip155:59144",
12882
- namespace: "eip155",
12883
- reference: "59144",
12884
- name: "Linea",
12885
- shortName: "Linea",
12886
- explorerUrl: "https://lineascan.build",
12887
- explorerName: "LineaScan"
12888
- },
12889
- MONAD: {
12890
- chainId: "eip155:143",
12891
- namespace: "eip155",
12892
- reference: "143",
12893
- name: "Monad",
12894
- shortName: "Monad",
12895
- explorerUrl: "https://monadvision.com",
12896
- explorerName: "MonadVision"
12897
- },
12898
- INK: {
12899
- chainId: "eip155:57073",
12900
- namespace: "eip155",
12901
- reference: "57073",
12902
- name: "Ink",
12903
- shortName: "Ink",
12904
- explorerUrl: "https://explorer.inkonchain.com",
12905
- explorerName: "Ink Explorer"
12906
- },
12907
- SHAPE: {
12908
- chainId: "eip155:360",
12909
- namespace: "eip155",
12910
- reference: "360",
12911
- name: "Shape",
12912
- shortName: "Shape",
12913
- explorerUrl: "https://shapescan.xyz",
12914
- explorerName: "ShapeScan"
12915
- },
12916
- SONEIUM: {
12917
- chainId: "eip155:1868",
12918
- namespace: "eip155",
12919
- reference: "1868",
12920
- name: "Soneium",
12921
- shortName: "Soneium",
12922
- explorerUrl: "https://soneium.blockscout.com",
12923
- explorerName: "Soneium Blockscout"
12924
- },
12925
- UNICHAIN: {
12926
- chainId: "eip155:130",
12927
- namespace: "eip155",
12928
- reference: "130",
12929
- name: "Unichain",
12930
- shortName: "Unichain",
12931
- explorerUrl: "https://unichain.blockscout.com",
12932
- explorerName: "Unichain Blockscout"
12933
- },
12934
- WORLD_CHAIN: {
12935
- chainId: "eip155:480",
12936
- namespace: "eip155",
12937
- reference: "480",
12938
- name: "World Chain",
12939
- shortName: "World Chain",
12940
- explorerUrl: "https://worldscan.org",
12941
- explorerName: "WorldScan"
12942
- },
12943
- // Non-EVM chains
12944
- SOLANA_MAINNET: {
12945
- chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12946
- namespace: "solana",
12947
- reference: "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
12948
- name: "Solana Mainnet",
12949
- shortName: "Solana",
12950
- explorerUrl: "https://solscan.io",
12951
- explorerName: "Solscan"
12952
- },
12953
- STELLAR_PUBNET: {
12954
- chainId: "stellar:pubnet",
12955
- namespace: "stellar",
12956
- reference: "pubnet",
12957
- name: "Stellar",
12958
- shortName: "Stellar",
12959
- explorerUrl: "https://stellar.expert/explorer/public",
12960
- explorerName: "Stellar Expert"
12961
- },
12962
- TRON_MAINNET: {
12963
- chainId: "tron:mainnet",
12964
- namespace: "tron",
12965
- reference: "mainnet",
12966
- name: "Tron",
12967
- shortName: "Tron",
12968
- explorerUrl: "https://tronscan.org",
12969
- explorerName: "TronScan"
12970
- },
12971
- BITCOIN_MAINNET: {
12972
- chainId: "bip122:000000000019d6689c085ae165831e93-p2wpkh",
12973
- namespace: "bip122",
12974
- reference: "000000000019d6689c085ae165831e93-p2wpkh",
12975
- name: "Bitcoin (P2WPKH)",
12976
- shortName: "Bitcoin",
12977
- explorerUrl: "https://mempool.space",
12978
- explorerName: "Mempool"
12979
- },
12980
- CARDANO_MAINNET: {
12981
- chainId: "cip34:1-764824073",
12982
- namespace: "cip34",
12983
- reference: "1-764824073",
12984
- name: "Cardano",
12985
- shortName: "Cardano",
12986
- explorerUrl: "https://cardanoscan.io",
12987
- explorerName: "CardanoScan"
12988
- },
12989
- SUI_MAINNET: {
12990
- chainId: "sui:mainnet",
12991
- namespace: "sui",
12992
- reference: "mainnet",
12993
- name: "Sui Mainnet",
12994
- shortName: "Sui",
12995
- explorerUrl: "https://suiscan.xyz",
12996
- explorerName: "SuiScan"
12997
- }
12998
- };
12999
- Object.fromEntries(
13000
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.shortName, chain])
13001
- );
13002
- Object.fromEntries(
13003
- Object.values(SUPPORTED_CHAINS).map((chain) => [chain.chainId, chain])
13004
- );
13005
- Object.values(SUPPORTED_CHAINS).filter(
13006
- (chain) => chain.namespace === "eip155"
13007
- );
13008
-
13009
- // ../../internal/asset/src/parse/model.ts
13010
- var AssetModel = /* @__PURE__ */ ((AssetModel2) => {
13011
- AssetModel2["Addon"] = "addon";
13012
- AssetModel2["App"] = "app";
13013
- AssetModel2["Bot"] = "bot";
13014
- AssetModel2["BusinessProfile"] = "business-profile";
13015
- AssetModel2["Catalog"] = "catalog";
13016
- AssetModel2["Collection"] = "collection";
13017
- AssetModel2["Channel"] = "channel";
13018
- AssetModel2["Group"] = "group";
13019
- AssetModel2["Post"] = "post";
13020
- AssetModel2["Profile"] = "profile";
13021
- AssetModel2["Short"] = "short";
13022
- AssetModel2["Video"] = "video";
13023
- AssetModel2["Space"] = "space";
13024
- AssetModel2["Issue"] = "issue";
13025
- AssetModel2["PullRequest"] = "pull-request";
13026
- AssetModel2["Discussion"] = "discussion";
13027
- AssetModel2["Repository"] = "repository";
13028
- AssetModel2["Article"] = "Article";
13029
- AssetModel2["Comment"] = "comment";
13030
- AssetModel2["List"] = "list";
13031
- AssetModel2["Subreddit"] = "subreddit";
13032
- AssetModel2["Community"] = "community";
13033
- AssetModel2["MiniApp"] = "mini-app";
13034
- AssetModel2["Developer"] = "developer";
13035
- return AssetModel2;
13036
- })(AssetModel || {});
13037
-
13038
- // ../../internal/validation/src/assets/parse.ts
13039
12123
  zod.z.object({
13040
12124
  content: zod.z.string().min(1, "Input string is required").describe("The asset content to parse (URL, address, etc.)")
13041
12125
  }).describe("Parse asset request body");
@@ -13132,6 +12216,7 @@ zod.z.object({
13132
12216
  }).optional(),
13133
12217
  isOverviewManuallyEdited: zod.z.boolean().optional(),
13134
12218
  overviewDisplayLocation: zod.z.enum(["cover", "separate"]).default("cover"),
12219
+ coverVersion: zod.z.enum(["v1", "v2"]).default("v1"),
13135
12220
  showCaseStudyOrgNames: zod.z.boolean().default(true),
13136
12221
  showSimilarThreats: zod.z.boolean().default(true),
13137
12222
  threatAnalysisType: zod.z.enum(["threats_blocked", "takedowns_completed"]).default("threats_blocked"),
@@ -13422,11 +12507,11 @@ var parseNamed_default = parseNamed;
13422
12507
 
13423
12508
  // ../../node_modules/culori/src/rgb/parseHex.js
13424
12509
  var hex = /^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i;
13425
- var parseHex2 = (color) => {
12510
+ var parseHex = (color) => {
13426
12511
  let match2;
13427
12512
  return (match2 = color.match(hex)) ? parseNumber_default(parseInt(match2[1], 16), match2[1].length) : void 0;
13428
12513
  };
13429
- var parseHex_default = parseHex2;
12514
+ var parseHex_default = parseHex;
13430
12515
 
13431
12516
  // ../../node_modules/culori/src/util/regex.js
13432
12517
  var num = "([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)";