var v, g;
function Y() {
  if (g) return v;
  g = 1;
  var E = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, I = /\n/g, P = /^\s*/, w = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, N = /^:\s*/, O = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, S = /^[;\s]*/, d = /^\s+|\s+$/g, G = `
`, f = "/", s = "*", t = "", X = "comment", L = "declaration";
  v = function(e, c) {
    if (typeof e != "string")
      throw new TypeError("First argument must be a string");
    if (!e) return [];
    c = c || {};
    var o = 1, i = 1;
    function l(n) {
      var r = n.match(I);
      r && (o += r.length);
      var a = n.lastIndexOf(G);
      i = ~a ? n.length - a : i + n.length;
    }
    function m() {
      var n = { line: o, column: i };
      return function(r) {
        return r.position = new p(n), _(), r;
      };
    }
    function p(n) {
      this.start = n, this.end = { line: o, column: i }, this.source = c.source;
    }
    p.prototype.content = e;
    function R(n) {
      var r = new Error(
        c.source + ":" + o + ":" + i + ": " + n
      );
      if (r.reason = n, r.filename = c.source, r.line = o, r.column = i, r.source = e, !c.silent) throw r;
    }
    function u(n) {
      var r = n.exec(e);
      if (r) {
        var a = r[0];
        return l(a), e = e.slice(a.length), r;
      }
    }
    function _() {
      u(P);
    }
    function A(n) {
      var r;
      for (n = n || []; r = T(); )
        r !== !1 && n.push(r);
      return n;
    }
    function T() {
      var n = m();
      if (!(f != e.charAt(0) || s != e.charAt(1))) {
        for (var r = 2; t != e.charAt(r) && (s != e.charAt(r) || f != e.charAt(r + 1)); )
          ++r;
        if (r += 2, t === e.charAt(r - 1))
          return R("End of comment missing");
        var a = e.slice(2, r - 2);
        return i += 2, l(a), e = e.slice(r), i += 2, n({
          type: X,
          comment: a
        });
      }
    }
    function M() {
      var n = m(), r = u(w);
      if (r) {
        if (T(), !u(N)) return R("property missing ':'");
        var a = u(O), W = n({
          type: L,
          property: h(r[0].replace(E, t)),
          value: a ? h(a[0].replace(E, t)) : t
        });
        return u(S), W;
      }
    }
    function C() {
      var n = [];
      A(n);
      for (var r; r = M(); )
        r !== !1 && (n.push(r), A(n));
      return n;
    }
    return _(), C();
  };
  function h(e) {
    return e ? e.replace(d, t) : t;
  }
  return v;
}
export {
  Y as __require
};
//# sourceMappingURL=index.js.map
