function ue(W) {
  function M(t, r, c, n, e) {
    for (var h = 0, a = 0, b = 0, u = 0, w, i, C = 0, z = 0, o, A = o = w = 0, l = 0, k = 0, S = 0, d = 0, L = c.length, D = L - 1, m, s = "", f = "", F = "", G = "", O; l < L; ) {
      if (i = c.charCodeAt(l), l === D && a + u + b + h !== 0 && (a !== 0 && (i = a === 47 ? 10 : 47), u = b = h = 0, L++, D++), a + u + b + h === 0) {
        if (l === D && (0 < k && (s = s.replace(R, "")), 0 < s.trim().length)) {
          switch (i) {
            case 32:
            case 9:
            case 59:
            case 13:
            case 10:
              break;
            default:
              s += c.charAt(l);
          }
          i = 59;
        }
        switch (i) {
          case 123:
            for (s = s.trim(), w = s.charCodeAt(0), o = 1, d = ++l; l < L; ) {
              switch (i = c.charCodeAt(l)) {
                case 123:
                  o++;
                  break;
                case 125:
                  o--;
                  break;
                case 47:
                  switch (i = c.charCodeAt(l + 1)) {
                    case 42:
                    case 47:
                      e: {
                        for (A = l + 1; A < D; ++A)
                          switch (c.charCodeAt(A)) {
                            case 47:
                              if (i === 42 && c.charCodeAt(A - 1) === 42 && l + 2 !== A) {
                                l = A + 1;
                                break e;
                              }
                              break;
                            case 10:
                              if (i === 47) {
                                l = A + 1;
                                break e;
                              }
                          }
                        l = A;
                      }
                  }
                  break;
                case 91:
                  i++;
                case 40:
                  i++;
                case 34:
                case 39:
                  for (; l++ < D && c.charCodeAt(l) !== i; )
                    ;
              }
              if (o === 0) break;
              l++;
            }
            switch (o = c.substring(d, l), w === 0 && (w = (s = s.replace(ee, "").trim()).charCodeAt(0)), w) {
              case 64:
                switch (0 < k && (s = s.replace(R, "")), i = s.charCodeAt(1), i) {
                  case 100:
                  case 109:
                  case 115:
                  case 45:
                    k = r;
                    break;
                  default:
                    k = X;
                }
                if (o = M(r, k, o, i, e + 1), d = o.length, 0 < g && (k = y(X, s, S), O = j(3, o, k, r, x, v, d, i, e, n), s = k.join(""), O !== void 0 && (d = (o = O.trim()).length) === 0 && (i = 0, o = "")), 0 < d) switch (i) {
                  case 115:
                    s = s.replace(ie, q);
                  case 100:
                  case 109:
                  case 45:
                    o = s + "{" + o + "}";
                    break;
                  case 107:
                    s = s.replace(ce, "$1 $2"), o = s + "{" + o + "}", o = p === 1 || p === 2 && E("@" + o, 3) ? "@-webkit-" + o + "@" + o : "@" + o;
                    break;
                  default:
                    o = s + o, n === 112 && (o = (f += o, ""));
                }
                else o = "";
                break;
              default:
                o = M(r, y(r, s, S), o, n, e + 1);
            }
            F += o, o = S = k = A = w = 0, s = "", i = c.charCodeAt(++l);
            break;
          case 125:
          case 59:
            if (s = (0 < k ? s.replace(R, "") : s).trim(), 1 < (d = s.length)) switch (A === 0 && (w = s.charCodeAt(0), w === 45 || 96 < w && 123 > w) && (d = (s = s.replace(" ", ":")).length), 0 < g && (O = j(1, s, r, t, x, v, f.length, n, e, n)) !== void 0 && (d = (s = O.trim()).length) === 0 && (s = "\0\0"), w = s.charCodeAt(0), i = s.charCodeAt(1), w) {
              case 0:
                break;
              case 64:
                if (i === 105 || i === 99) {
                  G += s + c.charAt(l);
                  break;
                }
              default:
                s.charCodeAt(d - 1) !== 58 && (f += N(s, w, i, s.charCodeAt(2)));
            }
            S = k = A = w = 0, s = "", i = c.charCodeAt(++l);
        }
      }
      switch (i) {
        case 13:
        case 10:
          a === 47 ? a = 0 : 1 + w === 0 && n !== 107 && 0 < s.length && (k = 1, s += "\0"), 0 < g * J && j(0, s, r, t, x, v, f.length, n, e, n), v = 1, x++;
          break;
        case 59:
        case 125:
          if (a + u + b + h === 0) {
            v++;
            break;
          }
        default:
          switch (v++, m = c.charAt(l), i) {
            case 9:
            case 32:
              if (u + h + a === 0) switch (C) {
                case 44:
                case 58:
                case 9:
                case 32:
                  m = "";
                  break;
                default:
                  i !== 32 && (m = " ");
              }
              break;
            case 0:
              m = "\\0";
              break;
            case 12:
              m = "\\f";
              break;
            case 11:
              m = "\\v";
              break;
            case 38:
              u + a + h === 0 && (k = S = 1, m = "\f" + m);
              break;
            case 108:
              if (u + a + h + $ === 0 && 0 < A) switch (l - A) {
                case 2:
                  C === 112 && c.charCodeAt(l - 3) === 58 && ($ = C);
                case 8:
                  z === 111 && ($ = z);
              }
              break;
            case 58:
              u + a + h === 0 && (A = l);
              break;
            case 44:
              a + b + u + h === 0 && (k = 1, m += "\r");
              break;
            case 34:
            case 39:
              a === 0 && (u = u === i ? 0 : u === 0 ? i : u);
              break;
            case 91:
              u + a + b === 0 && h++;
              break;
            case 93:
              u + a + b === 0 && h--;
              break;
            case 41:
              u + a + h === 0 && b--;
              break;
            case 40:
              if (u + a + h === 0) {
                if (w === 0) switch (2 * C + 3 * z) {
                  case 533:
                    break;
                  default:
                    w = 1;
                }
                b++;
              }
              break;
            case 64:
              a + b + u + h + A + o === 0 && (o = 1);
              break;
            case 42:
            case 47:
              if (!(0 < u + h + b)) switch (a) {
                case 0:
                  switch (2 * i + 3 * c.charCodeAt(l + 1)) {
                    case 235:
                      a = 47;
                      break;
                    case 220:
                      d = l, a = 42;
                  }
                  break;
                case 42:
                  i === 47 && C === 42 && d + 2 !== l && (c.charCodeAt(d + 2) === 33 && (f += c.substring(d, l + 1)), m = "", a = 0);
              }
          }
          a === 0 && (s += m);
      }
      z = C, C = i, l++;
    }
    if (d = f.length, 0 < d) {
      if (k = r, 0 < g && (O = j(2, f, k, t, x, v, d, n, e, n), O !== void 0 && (f = O).length === 0)) return G + f + F;
      if (f = k.join(",") + "{" + f + "}", p * $ !== 0) {
        switch (p !== 2 || E(f, 2) || ($ = 0), $) {
          case 111:
            f = f.replace(se, ":-moz-$1") + f;
            break;
          case 112:
            f = f.replace(U, "::-webkit-input-$1") + f.replace(U, "::-moz-$1") + f.replace(U, ":-ms-input-$1") + f;
        }
        $ = 0;
      }
    }
    return G + f + F;
  }
  function y(t, r, c) {
    var n = r.trim().split(te);
    r = n;
    var e = n.length, h = t.length;
    switch (h) {
      case 0:
      case 1:
        var a = 0;
        for (t = h === 0 ? "" : t[0] + " "; a < e; ++a)
          r[a] = B(t, r[a], c).trim();
        break;
      default:
        var b = a = 0;
        for (r = []; a < e; ++a)
          for (var u = 0; u < h; ++u)
            r[b++] = B(t[u] + " ", n[a], c).trim();
    }
    return r;
  }
  function B(t, r, c) {
    var n = r.charCodeAt(0);
    switch (33 > n && (n = (r = r.trim()).charCodeAt(0)), n) {
      case 38:
        return r.replace(T, "$1" + t.trim());
      case 58:
        return t.trim() + r.replace(T, "$1" + t.trim());
      default:
        if (0 < 1 * c && 0 < r.indexOf("\f")) return r.replace(T, (t.charCodeAt(0) === 58 ? "" : "$1") + t.trim());
    }
    return t + r;
  }
  function N(t, r, c, n) {
    var e = t + ";", h = 2 * r + 3 * c + 4 * n;
    if (h === 944) {
      t = e.indexOf(":", 9) + 1;
      var a = e.substring(t, e.length - 1).trim();
      return a = e.substring(0, t).trim() + a + ";", p === 1 || p === 2 && E(a, 1) ? "-webkit-" + a + a : a;
    }
    if (p === 0 || p === 2 && !E(e, 1)) return e;
    switch (h) {
      case 1015:
        return e.charCodeAt(10) === 97 ? "-webkit-" + e + e : e;
      case 951:
        return e.charCodeAt(3) === 116 ? "-webkit-" + e + e : e;
      case 963:
        return e.charCodeAt(5) === 110 ? "-webkit-" + e + e : e;
      case 1009:
        if (e.charCodeAt(4) !== 100) break;
      case 969:
      case 942:
        return "-webkit-" + e + e;
      case 978:
        return "-webkit-" + e + "-moz-" + e + e;
      case 1019:
      case 983:
        return "-webkit-" + e + "-moz-" + e + "-ms-" + e + e;
      case 883:
        if (e.charCodeAt(8) === 45) return "-webkit-" + e + e;
        if (0 < e.indexOf("image-set(", 11)) return e.replace(he, "$1-webkit-$2") + e;
        break;
      case 932:
        if (e.charCodeAt(4) === 45) switch (e.charCodeAt(5)) {
          case 103:
            return "-webkit-box-" + e.replace("-grow", "") + "-webkit-" + e + "-ms-" + e.replace("grow", "positive") + e;
          case 115:
            return "-webkit-" + e + "-ms-" + e.replace("shrink", "negative") + e;
          case 98:
            return "-webkit-" + e + "-ms-" + e.replace("basis", "preferred-size") + e;
        }
        return "-webkit-" + e + "-ms-" + e + e;
      case 964:
        return "-webkit-" + e + "-ms-flex-" + e + e;
      case 1023:
        if (e.charCodeAt(8) !== 99) break;
        return a = e.substring(e.indexOf(":", 15)).replace("flex-", "").replace("space-between", "justify"), "-webkit-box-pack" + a + "-webkit-" + e + "-ms-flex-pack" + a + e;
      case 1005:
        return ae.test(e) ? e.replace(K, ":-webkit-") + e.replace(K, ":-moz-") + e : e;
      case 1e3:
        switch (a = e.substring(13).trim(), r = a.indexOf("-") + 1, a.charCodeAt(0) + a.charCodeAt(r)) {
          case 226:
            a = e.replace(V, "tb");
            break;
          case 232:
            a = e.replace(V, "tb-rl");
            break;
          case 220:
            a = e.replace(V, "lr");
            break;
          default:
            return e;
        }
        return "-webkit-" + e + "-ms-" + a + e;
      case 1017:
        if (e.indexOf("sticky", 9) === -1) break;
      case 975:
        switch (r = (e = t).length - 10, a = (e.charCodeAt(r) === 33 ? e.substring(0, r) : e).substring(t.indexOf(":", 7) + 1).trim(), h = a.charCodeAt(0) + (a.charCodeAt(7) | 0)) {
          case 203:
            if (111 > a.charCodeAt(8)) break;
          case 115:
            e = e.replace(a, "-webkit-" + a) + ";" + e;
            break;
          case 207:
          case 102:
            e = e.replace(a, "-webkit-" + (102 < h ? "inline-" : "") + "box") + ";" + e.replace(a, "-webkit-" + a) + ";" + e.replace(a, "-ms-" + a + "box") + ";" + e;
        }
        return e + ";";
      case 938:
        if (e.charCodeAt(5) === 45) switch (e.charCodeAt(6)) {
          case 105:
            return a = e.replace("-items", ""), "-webkit-" + e + "-webkit-box-" + a + "-ms-flex-" + a + e;
          case 115:
            return "-webkit-" + e + "-ms-flex-item-" + e.replace(I, "") + e;
          default:
            return "-webkit-" + e + "-ms-flex-line-pack" + e.replace("align-content", "").replace(I, "") + e;
        }
        break;
      case 973:
      case 989:
        if (e.charCodeAt(3) !== 45 || e.charCodeAt(4) === 122) break;
      case 931:
      case 953:
        if (le.test(t) === !0) return (a = t.substring(t.indexOf(":") + 1)).charCodeAt(0) === 115 ? N(t.replace("stretch", "fill-available"), r, c, n).replace(":fill-available", ":stretch") : e.replace(a, "-webkit-" + a) + e.replace(a, "-moz-" + a.replace("fill-", "")) + e;
        break;
      case 962:
        if (e = "-webkit-" + e + (e.charCodeAt(5) === 102 ? "-ms-" + e : "") + e, c + n === 211 && e.charCodeAt(13) === 105 && 0 < e.indexOf("transform", 10)) return e.substring(0, e.indexOf(";", 27) + 1).replace(re, "$1-webkit-$2") + e;
    }
    return e;
  }
  function E(t, r) {
    var c = t.indexOf(r === 1 ? ":" : "{"), n = t.substring(0, r !== 3 ? c : 10);
    return c = t.substring(c + 1, t.length - 1), Z(r !== 2 ? n : n.replace(oe, "$1"), c, r);
  }
  function q(t, r) {
    var c = N(r, r.charCodeAt(0), r.charCodeAt(1), r.charCodeAt(2));
    return c !== r + ";" ? c.replace(ne, " or ($1)").substring(4) : "(" + r + ")";
  }
  function j(t, r, c, n, e, h, a, b, u, w) {
    for (var i = 0, C = r, z; i < g; ++i)
      switch (z = Y[i].call(H, t, C, c, n, e, h, a, b, u, w)) {
        case void 0:
        case !1:
        case !0:
        case null:
          break;
        default:
          C = z;
      }
    if (C !== r) return C;
  }
  function P(t) {
    switch (t) {
      case void 0:
      case null:
        g = Y.length = 0;
        break;
      default:
        if (typeof t == "function") Y[g++] = t;
        else if (typeof t == "object") for (var r = 0, c = t.length; r < c; ++r)
          P(t[r]);
        else J = !!t | 0;
    }
    return P;
  }
  function Q(t) {
    return t = t.prefix, t !== void 0 && (Z = null, t ? typeof t != "function" ? p = 1 : (p = 2, Z = t) : p = 0), Q;
  }
  function H(t, r) {
    var c = t;
    if (33 > c.charCodeAt(0) && (c = c.trim()), _ = c, c = [_], 0 < g) {
      var n = j(-1, r, c, c, x, v, 0, 0, 0, 0);
      n !== void 0 && typeof n == "string" && (r = n);
    }
    var e = M(X, c, r, 0, 0);
    return 0 < g && (n = j(-2, e, c, c, x, v, e.length, 0, 0, 0), n !== void 0 && (e = n)), _ = "", $ = 0, v = x = 1, e;
  }
  var ee = /^\0+/g, R = /[\0\r\f]/g, K = /: */g, ae = /zoo|gra/, re = /([,: ])(transform)/g, te = /,\r+?/g, T = /([\t\r\n ])*\f?&/g, ce = /@(k\w+)\s*(\S*)\s*/, U = /::(place)/g, se = /:(read-only)/g, V = /[svh]\w+-[tblr]{2}/, ie = /\(\s*(.*)\s*\)/g, ne = /([\s\S]*?);/g, I = /-self|flex-/g, oe = /[^]*?(:[rp][el]a[\w-]+)[^]*/, le = /stretch|:\s*\w+\-(?:conte|avail)/, he = /([^-])(image-set\()/, v = 1, x = 1, $ = 0, p = 1, X = [], Y = [], g = 0, Z = null, J = 0, _ = "";
  return H.use = P, H.set = Q, W !== void 0 && Q(W), H;
}
export {
  ue as default
};
