import { commonjsGlobal as o } from "../../_virtual/_commonjsHelpers.mjs";
import { __module as e } from "../../_virtual/css.escape.mjs";
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
(function(s, S) {
  (function(n, a) {
    s.exports = a(n);
  })(typeof o < "u" ? o : o, function(n) {
    if (n.CSS && n.CSS.escape)
      return n.CSS.escape;
    var a = function(u) {
      if (arguments.length == 0)
        throw new TypeError("`CSS.escape` requires an argument.");
      for (var t = String(u), x = t.length, r = -1, e2, i = "", f = t.charCodeAt(0); ++r < x; ) {
        if (e2 = t.charCodeAt(r), e2 == 0) {
          i += "�";
          continue;
        }
        if (
          // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
          // U+007F, […]
          e2 >= 1 && e2 <= 31 || e2 == 127 || // If the character is the first character and is in the range [0-9]
          // (U+0030 to U+0039), […]
          r == 0 && e2 >= 48 && e2 <= 57 || // If the character is the second character and is in the range [0-9]
          // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
          r == 1 && e2 >= 48 && e2 <= 57 && f == 45
        ) {
          i += "\\" + e2.toString(16) + " ";
          continue;
        }
        if (
          // If the character is the first character and is a `-` (U+002D), and
          // there is no second character, […]
          r == 0 && x == 1 && e2 == 45
        ) {
          i += "\\" + t.charAt(r);
          continue;
        }
        if (e2 >= 128 || e2 == 45 || e2 == 95 || e2 >= 48 && e2 <= 57 || e2 >= 65 && e2 <= 90 || e2 >= 97 && e2 <= 122) {
          i += t.charAt(r);
          continue;
        }
        i += "\\" + t.charAt(r);
      }
      return i;
    };
    return n.CSS || (n.CSS = {}), n.CSS.escape = a, a;
  });
})(e);
