import { __module as m } from "../../../../../../_virtual/parse-srcset.js";
var F = m.exports, q;
function k() {
  return q ? m.exports : (q = 1, function(L) {
    (function(f, c) {
      L.exports ? L.exports = c() : f.parseSrcset = c();
    })(F, function() {
      return function(f) {
        function c(r) {
          return r === " " || // space
          r === "	" || // horizontal tab
          r === `
` || // new line
          r === "\f" || // form feed
          r === "\r";
        }
        function w(r) {
          var s, i = r.exec(f.substring(u));
          if (i)
            return s = i[0], u += s.length, s;
        }
        for (var D = f.length, I = /^[ \t\n\r\u000c]+/, N = /^[, \t\n\r\u000c]+/, P = /^[^ \t\n\r\u000c]+/, b = /[,]+$/, _ = /^\d+$/, A = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, p, a, e, n, t, u = 0, $ = []; ; ) {
          if (w(N), u >= D)
            return $;
          p = w(P), a = [], p.slice(-1) === "," ? (p = p.replace(b, ""), g()) : E();
        }
        function E() {
          for (w(I), e = "", n = "in descriptor"; ; ) {
            if (t = f.charAt(u), n === "in descriptor")
              if (c(t))
                e && (a.push(e), e = "", n = "after descriptor");
              else if (t === ",") {
                u += 1, e && a.push(e), g();
                return;
              } else if (t === "(")
                e = e + t, n = "in parens";
              else if (t === "") {
                e && a.push(e), g();
                return;
              } else
                e = e + t;
            else if (n === "in parens")
              if (t === ")")
                e = e + t, n = "in descriptor";
              else if (t === "") {
                a.push(e), g();
                return;
              } else
                e = e + t;
            else if (n === "after descriptor" && !c(t))
              if (t === "") {
                g();
                return;
              } else
                n = "in descriptor", u -= 1;
            u += 1;
          }
        }
        function g() {
          var r = !1, s, i, d, S, h = {}, o, v, l, x, C;
          for (S = 0; S < a.length; S++)
            o = a[S], v = o[o.length - 1], l = o.substring(0, o.length - 1), x = parseInt(l, 10), C = parseFloat(l), _.test(l) && v === "w" ? ((s || i) && (r = !0), x === 0 ? r = !0 : s = x) : A.test(l) && v === "x" ? ((s || i || d) && (r = !0), C < 0 ? r = !0 : i = C) : _.test(l) && v === "h" ? ((d || i) && (r = !0), x === 0 ? r = !0 : d = x) : r = !0;
          r ? console && console.log && console.log("Invalid srcset descriptor found in '" + f + "' at '" + o + "'.") : (h.url = p, s && (h.w = s), i && (h.d = i), d && (h.h = d), $.push(h));
        }
      };
    });
  }(m), m.exports);
}
export {
  k as __require
};
//# sourceMappingURL=parse-srcset.js.map
