"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Enum = require("./Enum.js");
const Utility = require("./Utility.js");
function prefix(value, length) {
  switch (Utility.hash(value, length)) {
    case 5103:
      return Enum.WEBKIT + "print-" + value + value;
    case 5737:
    case 4201:
    case 3177:
    case 3433:
    case 1641:
    case 4457:
    case 2921:
    case 5572:
    case 6356:
    case 5844:
    case 3191:
    case 6645:
    case 3005:
    case 6391:
    case 5879:
    case 5623:
    case 6135:
    case 4599:
    case 4855:
    case 4215:
    case 6389:
    case 5109:
    case 5365:
    case 5621:
    case 3829:
      return Enum.WEBKIT + value + value;
    case 5349:
    case 4246:
    case 4810:
    case 6968:
    case 2756:
      return Enum.WEBKIT + value + Enum.MOZ + value + Enum.MS + value + value;
    case 6828:
    case 4268:
      return Enum.WEBKIT + value + Enum.MS + value + value;
    case 6165:
      return Enum.WEBKIT + value + Enum.MS + "flex-" + value + value;
    case 5187:
      return Enum.WEBKIT + value + Utility.replace(value, /(\w+).+(:[^]+)/, Enum.WEBKIT + "box-$1$2" + Enum.MS + "flex-$1$2") + value;
    case 5443:
      return Enum.WEBKIT + value + Enum.MS + "flex-item-" + Utility.replace(value, /flex-|-self/, "") + value;
    case 4675:
      return Enum.WEBKIT + value + Enum.MS + "flex-line-pack" + Utility.replace(value, /align-content|flex-|-self/, "") + value;
    case 5548:
      return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, "shrink", "negative") + value;
    case 5292:
      return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, "basis", "preferred-size") + value;
    case 6060:
      return Enum.WEBKIT + "box-" + Utility.replace(value, "-grow", "") + Enum.WEBKIT + value + Enum.MS + Utility.replace(value, "grow", "positive") + value;
    case 4554:
      return Enum.WEBKIT + Utility.replace(value, /([^-])(transform)/g, "$1" + Enum.WEBKIT + "$2") + value;
    case 6187:
      return Utility.replace(Utility.replace(Utility.replace(value, /(zoom-|grab)/, Enum.WEBKIT + "$1"), /(image-set)/, Enum.WEBKIT + "$1"), value, "") + value;
    case 5495:
    case 3959:
      return Utility.replace(value, /(image-set\([^]*)/, Enum.WEBKIT + "$1$`$1");
    case 4968:
      return Utility.replace(Utility.replace(value, /(.+:)(flex-)?(.*)/, Enum.WEBKIT + "box-pack:$3" + Enum.MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + Enum.WEBKIT + value + value;
    case 4095:
    case 3583:
    case 4068:
    case 2532:
      return Utility.replace(value, /(.+)-inline(.+)/, Enum.WEBKIT + "$1$2") + value;
    case 8116:
    case 7059:
    case 5753:
    case 5535:
    case 5445:
    case 5701:
    case 4933:
    case 4677:
    case 5533:
    case 5789:
    case 5021:
    case 4765:
      if (Utility.strlen(value) - 1 - length > 6)
        switch (Utility.charat(value, length + 1)) {
          case 109:
            if (Utility.charat(value, length + 4) !== 45)
              break;
          case 102:
            return Utility.replace(value, /(.+:)(.+)-([^]+)/, "$1" + Enum.WEBKIT + "$2-$3$1" + Enum.MOZ + (Utility.charat(value, length + 3) == 108 ? "$3" : "$2-$3")) + value;
          case 115:
            return ~Utility.indexof(value, "stretch") ? prefix(Utility.replace(value, "stretch", "fill-available"), length) + value : value;
        }
      break;
    case 4949:
      if (Utility.charat(value, length + 1) !== 115)
        break;
    case 6444:
      switch (Utility.charat(value, Utility.strlen(value) - 3 - (~Utility.indexof(value, "!important") && 10))) {
        case 107:
          return Utility.replace(value, ":", ":" + Enum.WEBKIT) + value;
        case 101:
          return Utility.replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + Enum.WEBKIT + (Utility.charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + Enum.WEBKIT + "$2$3$1" + Enum.MS + "$2box$3") + value;
      }
      break;
    case 5936:
      switch (Utility.charat(value, length + 11)) {
        case 114:
          return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
        case 108:
          return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
        case 45:
          return Enum.WEBKIT + value + Enum.MS + Utility.replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
      }
      return Enum.WEBKIT + value + Enum.MS + value + value;
  }
  return value;
}
exports.prefix = prefix;
//# sourceMappingURL=Prefixer.js.map
