import { h as r } from "./p-9b9ccd0c.js";

const mapOptionsToComboBoxItemModel = r => r.map((r => {
  var t;
  return {
    value: r.id,
    caption: r.label,
    startImgSrc: (t = r.iconName) !== null && t !== void 0 ? t : ""
  };
}));

const escapeRegExp = r => r.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");

const hiChar = (t, n) => {
  if (!n) {
    return t;
  }
  const s = escapeRegExp(n);
  const c = t.split(new RegExp(`(${s})`, "gi"));
  return c.map(((t, s) => t.toLowerCase() === n.toLowerCase() ? r("span", {
    key: s,
    class: "hiChar"
  }, t) : t));
};

export { hiChar as h, mapOptionsToComboBoxItemModel as m };
//# sourceMappingURL=p-9663f418.js.map