export { c as borderRadius, b as boxShadows, e as colorPalette, f as fontSizes, a as fontWeights, h as heights, j as hslColorMap, l as lineHeights, n as neutral1, g as neutral2, i as neutral3, s as scales, d as spacing } from './tailwind-config-e80c127f.js';
export { assets } from './assets/index.js';
export { cn } from './cn.js';
export { fonts } from './assets/fonts/index.js';
export { images } from './assets/images/index.js';

const sliceAddress = (address, startSliceBy = 6, endSliceBy) => {
  if (!address || typeof address !== "string") {
    return "";
  }
  let sliceAddress2 = "";
  const effectiveEndSliceBy = endSliceBy || startSliceBy;
  if (address.length < startSliceBy + effectiveEndSliceBy) {
    return address;
  }
  sliceAddress2 = address.length > startSliceBy + 2 ? `${address.slice(0, startSliceBy + 2)}...${address.slice(
    -effectiveEndSliceBy
  )}` : address;
  return sliceAddress2;
};

const SOCIAL_MEDIA = {
  facebook: ["facebook.com", "messenger.com", "fb.com", "fb.me"],
  x: ["x.com", "twitter.com", "t.co"],
  instagram: ["instagram.com"],
  medium: ["medium.com"],
  discord: ["discord.com", "discordapp.com", "discord.gg"],
  snapchat: ["snapchat.com"],
  whatsapp: ["whatsapp.com", "wa.me"],
  telegram: ["telegram.com", "t.me", "telegram.org"],
  linkedin: ["linkedin.com"],
  github: ["github.com"],
  "universal-page": ["universal.page"],
  youtube: ["youtube.com", "youtu.be", "youtube-nocookie.com"],
  spotify: ["spotify.com", "open.spotify.com"],
  soundcloud: ["soundcloud.com"],
  warpcast: ["warpcast.com"]
};
const detectSocialMedia = (url) => {
  if (!url) {
    return;
  }
  try {
    const hostname = new URL(url).hostname;
    for (const [key, domains] of Object.entries(SOCIAL_MEDIA)) {
      const hostnameFormatted = hostname.replace("www.", "");
      const match = domains.some(
        (domain) => new RegExp(`\\b${domain}\\b`, "i").test(hostnameFormatted)
      );
      if (match) {
        return key;
      }
    }
  } catch {
    return;
  }
};

export { detectSocialMedia, sliceAddress };
