'use strict';

require('clsx');
require('tailwind-merge');
const slug = require('slug');

function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }

const slug__default = /*#__PURE__*/_interopDefaultCompat(slug);

function slugify(text, locale = "en") {
  return slug__default(text, { lower: true, locale });
}
function extractIpAddress(headers) {
  if (!headers) return void 0;
  const forwardedFor = headers.get("x-forwarded-for");
  if (forwardedFor) {
    return forwardedFor.split(",")[0]?.trim();
  }
  const realIp = headers.get("x-real-ip");
  if (realIp) {
    return realIp.trim();
  }
  const cfConnectingIp = headers.get("cf-connecting-ip");
  if (cfConnectingIp) {
    return cfConnectingIp.trim();
  }
  return void 0;
}
function extractUserAgent(headers) {
  if (!headers) return void 0;
  return headers.get("user-agent") || void 0;
}

exports.extractIpAddress = extractIpAddress;
exports.extractUserAgent = extractUserAgent;
exports.slugify = slugify;
