var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/utils/tagColor.ts
var tagColor_exports = {};
__export(tagColor_exports, {
  getDefaultTagColor: () => getDefaultTagColor
});
module.exports = __toCommonJS(tagColor_exports);
var PRESET_TAG_COLORS = [
  "blue",
  // #1677ff
  "green",
  // #52c41a
  "orange",
  // #fa8c16
  "purple",
  // #722ed1
  "cyan",
  // #13c2c2
  "magenta",
  // #eb2f96
  "gold",
  // #faad14
  "lime",
  // #a0d911
  "geekblue",
  // #2f54eb
  "volcano"
  // #fa541c
];
function getDefaultTagColor(value, index) {
  const key = value !== null && value !== void 0 && typeof value === "object" ? JSON.stringify(value) : String(value ?? "");
  let hash = 0;
  for (let i = 0; i < key.length; i++) {
    hash = (hash << 5) - hash + key.charCodeAt(i);
    hash |= 0;
  }
  const idx = Math.abs(hash) % PRESET_TAG_COLORS.length;
  return PRESET_TAG_COLORS[idx];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getDefaultTagColor
});
