import { commonjsRequire as z } from "../../../../../../_virtual/_commonjs-dynamic-modules.js";
import { __exports as ee } from "../../../../../../_virtual/parser.js";
import { __exports as se } from "../../../../../../_virtual/parser.js";
(function(H) {
  var J = function() {
    function M(o, a) {
      Object.defineProperty(this, "name", {
        enumerable: !1,
        writable: !1,
        value: "JisonParserError"
      }), o == null && (o = "???"), Object.defineProperty(this, "message", {
        enumerable: !1,
        writable: !0,
        value: o
      }), this.hash = a;
      var r;
      if (a && a.exception instanceof Error) {
        var e = a.exception;
        this.message = e.message || o, r = e.stack;
      }
      r || (Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, this.constructor) : r = new Error(o).stack), r && Object.defineProperty(this, "stack", {
        enumerable: !1,
        writable: !1,
        value: r
      });
    }
    typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(M.prototype, Error.prototype) : M.prototype = Object.create(Error.prototype), M.prototype.constructor = M, M.prototype.name = "JisonParserError";
    function B(o) {
      for (var a = [], r = o.pop, e = o.rule, n = 0, i = r.length; n < i; n++)
        a.push([
          r[n],
          e[n]
        ]);
      return a;
    }
    function W(o) {
      for (var a = {}, r = o.idx, e = o.goto, n = 0, i = r.length; n < i; n++) {
        var s = r[n];
        a[s] = e[n];
      }
      return a;
    }
    function Z(o) {
      for (var a = [], r = o.len, e = o.symbol, n = o.type, i = o.state, s = o.mode, t = o.goto, f = 0, _ = r.length; f < _; f++) {
        for (var y = r[f], l = {}, c = 0; c < y; c++) {
          var d = e.shift();
          switch (n.shift()) {
            case 2:
              l[d] = [
                s.shift(),
                t.shift()
              ];
              break;
            case 0:
              l[d] = i.shift();
              break;
            default:
              l[d] = [
                3
              ];
          }
        }
        a.push(l);
      }
      return a;
    }
    function u(o, a, r) {
      r = r || 0;
      for (var e = 0; e < a; e++)
        this.push(o), o += r;
    }
    function h(o, a) {
      for (o = this.length - o, a += o; o < a; o++)
        this.push(this[o]);
    }
    function P(o) {
      for (var a = [], r = 0, e = o.length; r < e; r++) {
        var n = o[r];
        typeof n == "function" ? (r++, n.apply(a, o[r])) : a.push(n);
      }
      return a;
    }
    var T = {
      trace: function() {
      },
      JisonParserError: M,
      yy: {},
      options: {
        type: "lalr",
        hasPartialLrUpgradeOnConflict: !0,
        errorRecoveryTokenDiscardCount: 3
      },
      symbols_: {
        $accept: 0,
        $end: 1,
        ADD: 3,
        ANGLE: 16,
        CHS: 22,
        COMMA: 14,
        CSS_CPROP: 13,
        CSS_VAR: 12,
        DIV: 6,
        EMS: 20,
        EOF: 1,
        EXS: 21,
        FREQ: 18,
        LENGTH: 15,
        LPAREN: 7,
        MUL: 5,
        NESTED_CALC: 9,
        NUMBER: 11,
        PERCENTAGE: 28,
        PREFIX: 10,
        REMS: 23,
        RES: 19,
        RPAREN: 8,
        SUB: 4,
        TIME: 17,
        VHS: 24,
        VMAXS: 27,
        VMINS: 26,
        VWS: 25,
        css_value: 33,
        css_variable: 32,
        error: 2,
        expression: 29,
        math_expression: 30,
        value: 31
      },
      terminals_: {
        1: "EOF",
        2: "error",
        3: "ADD",
        4: "SUB",
        5: "MUL",
        6: "DIV",
        7: "LPAREN",
        8: "RPAREN",
        9: "NESTED_CALC",
        10: "PREFIX",
        11: "NUMBER",
        12: "CSS_VAR",
        13: "CSS_CPROP",
        14: "COMMA",
        15: "LENGTH",
        16: "ANGLE",
        17: "TIME",
        18: "FREQ",
        19: "RES",
        20: "EMS",
        21: "EXS",
        22: "CHS",
        23: "REMS",
        24: "VHS",
        25: "VWS",
        26: "VMINS",
        27: "VMAXS",
        28: "PERCENTAGE"
      },
      TERROR: 2,
      EOF: 1,
      originalQuoteName: null,
      originalParseError: null,
      cleanupAfterParse: null,
      constructParseErrorInfo: null,
      yyMergeLocationInfo: null,
      __reentrant_call_depth: 0,
      __error_infos: [],
      __error_recovery_infos: [],
      quoteName: function(a) {
        return '"' + a + '"';
      },
      getSymbolName: function(a) {
        if (this.terminals_[a])
          return this.terminals_[a];
        var r = this.symbols_;
        for (var e in r)
          if (r[e] === a)
            return e;
        return null;
      },
      describeSymbol: function(a) {
        if (a !== this.EOF && this.terminal_descriptions_ && this.terminal_descriptions_[a])
          return this.terminal_descriptions_[a];
        if (a === this.EOF)
          return "end of input";
        var r = this.getSymbolName(a);
        return r ? this.quoteName(r) : null;
      },
      collect_expected_token_set: function(a, r) {
        var e = this.TERROR, n = [], i = {};
        if (!r && this.state_descriptions_ && this.state_descriptions_[a])
          return [
            this.state_descriptions_[a]
          ];
        for (var s in this.table[a])
          if (s = +s, s !== e) {
            var t = r ? s : this.describeSymbol(s);
            t && !i[t] && (n.push(t), i[t] = !0);
          }
        return n;
      },
      productions_: B({
        pop: P([
          29,
          u,
          [30, 10],
          31,
          31,
          32,
          32,
          u,
          [33, 15]
        ]),
        rule: P([
          2,
          u,
          [3, 5],
          4,
          7,
          u,
          [1, 4],
          2,
          4,
          6,
          u,
          [1, 14],
          2
        ])
      }),
      performAction: function(a, r, e) {
        var n = this.yy;
        switch (n.parser, n.lexer, a) {
          case 0:
            this.$ = e[r - 1];
            break;
          case 1:
            return this.$ = e[r - 1], e[r - 1];
          case 2:
          case 3:
          case 4:
          case 5:
            this.$ = { type: "MathExpression", operator: e[r - 1], left: e[r - 2], right: e[r] };
            break;
          case 6:
            this.$ = e[r - 1];
            break;
          case 7:
            this.$ = { type: "Calc", value: e[r - 1] };
            break;
          case 8:
            this.$ = { type: "Calc", value: e[r - 1], prefix: e[r - 5] };
            break;
          case 9:
          case 10:
          case 11:
            this.$ = e[r];
            break;
          case 12:
            this.$ = { type: "Value", value: parseFloat(e[r]) };
            break;
          case 13:
            this.$ = { type: "Value", value: parseFloat(e[r]) * -1 };
            break;
          case 14:
            this.$ = { type: "CssVariable", value: e[r - 1] };
            break;
          case 15:
            this.$ = { type: "CssVariable", value: e[r - 3], fallback: e[r - 1] };
            break;
          case 16:
            this.$ = { type: "LengthValue", value: parseFloat(e[r]), unit: /[a-z]+/.exec(e[r])[0] };
            break;
          case 17:
            this.$ = { type: "AngleValue", value: parseFloat(e[r]), unit: /[a-z]+/.exec(e[r])[0] };
            break;
          case 18:
            this.$ = { type: "TimeValue", value: parseFloat(e[r]), unit: /[a-z]+/.exec(e[r])[0] };
            break;
          case 19:
            this.$ = { type: "FrequencyValue", value: parseFloat(e[r]), unit: /[a-z]+/.exec(e[r])[0] };
            break;
          case 20:
            this.$ = { type: "ResolutionValue", value: parseFloat(e[r]), unit: /[a-z]+/.exec(e[r])[0] };
            break;
          case 21:
            this.$ = { type: "EmValue", value: parseFloat(e[r]), unit: "em" };
            break;
          case 22:
            this.$ = { type: "ExValue", value: parseFloat(e[r]), unit: "ex" };
            break;
          case 23:
            this.$ = { type: "ChValue", value: parseFloat(e[r]), unit: "ch" };
            break;
          case 24:
            this.$ = { type: "RemValue", value: parseFloat(e[r]), unit: "rem" };
            break;
          case 25:
            this.$ = { type: "VhValue", value: parseFloat(e[r]), unit: "vh" };
            break;
          case 26:
            this.$ = { type: "VwValue", value: parseFloat(e[r]), unit: "vw" };
            break;
          case 27:
            this.$ = { type: "VminValue", value: parseFloat(e[r]), unit: "vmin" };
            break;
          case 28:
            this.$ = { type: "VmaxValue", value: parseFloat(e[r]), unit: "vmax" };
            break;
          case 29:
            this.$ = { type: "PercentageValue", value: parseFloat(e[r]), unit: "%" };
            break;
          case 30:
            var i = e[r];
            i.value *= -1, this.$ = i;
            break;
        }
      },
      table: Z({
        len: P([
          24,
          1,
          5,
          23,
          1,
          18,
          u,
          [0, 3],
          1,
          u,
          [0, 16],
          u,
          [23, 4],
          h,
          [28, 3],
          0,
          0,
          16,
          1,
          6,
          6,
          u,
          [0, 3],
          5,
          1,
          2,
          h,
          [37, 3],
          h,
          [20, 3],
          5,
          0,
          0
        ]),
        symbol: P([
          4,
          7,
          9,
          11,
          12,
          u,
          [15, 19, 1],
          1,
          1,
          u,
          [3, 4, 1],
          h,
          [30, 19],
          h,
          [29, 4],
          7,
          4,
          10,
          11,
          h,
          [22, 14],
          h,
          [19, 3],
          h,
          [43, 22],
          h,
          [23, 69],
          h,
          [139, 4],
          8,
          h,
          [51, 24],
          4,
          h,
          [138, 15],
          13,
          h,
          [186, 5],
          8,
          h,
          [6, 6],
          h,
          [5, 5],
          9,
          8,
          14,
          h,
          [159, 47],
          h,
          [60, 10]
        ]),
        type: P([
          u,
          [2, 19],
          u,
          [0, 5],
          1,
          u,
          [2, 24],
          u,
          [0, 4],
          h,
          [22, 19],
          h,
          [43, 42],
          h,
          [23, 70],
          h,
          [28, 25],
          h,
          [45, 25],
          h,
          [113, 54]
        ]),
        state: P([
          1,
          2,
          8,
          6,
          7,
          30,
          h,
          [4, 3],
          33,
          37,
          h,
          [5, 3],
          38,
          h,
          [4, 3],
          39,
          h,
          [4, 3],
          40,
          h,
          [4, 3],
          42,
          h,
          [21, 4],
          50,
          h,
          [5, 3],
          51,
          h,
          [4, 3]
        ]),
        mode: P([
          u,
          [1, 179],
          u,
          [2, 3],
          h,
          [5, 5],
          h,
          [6, 4],
          u,
          [1, 57]
        ]),
        goto: P([
          5,
          3,
          4,
          24,
          u,
          [9, 15, 1],
          u,
          [25, 5, 1],
          h,
          [24, 19],
          31,
          35,
          32,
          34,
          h,
          [18, 14],
          36,
          h,
          [38, 19],
          h,
          [19, 57],
          h,
          [118, 4],
          41,
          h,
          [24, 19],
          43,
          35,
          h,
          [16, 14],
          44,
          u,
          [2, 3],
          28,
          29,
          2,
          u,
          [3, 3],
          28,
          29,
          3,
          h,
          [53, 4],
          u,
          [45, 5, 1],
          h,
          [100, 42],
          52,
          h,
          [5, 4],
          53
        ])
      }),
      defaultActions: W({
        idx: P([
          6,
          7,
          8,
          u,
          [10, 16, 1],
          33,
          34,
          39,
          40,
          41,
          45,
          47,
          52,
          53
        ]),
        goto: P([
          9,
          10,
          11,
          u,
          [16, 14, 1],
          12,
          1,
          30,
          13,
          u,
          [4, 4, 1],
          14,
          15,
          8
        ])
      }),
      parseError: function(a, r, e) {
        if (r.recoverable)
          typeof this.trace == "function" && this.trace(a), r.destroy();
        else
          throw typeof this.trace == "function" && this.trace(a), e || (e = this.JisonParserError), new e(a, r);
      },
      parse: function(a) {
        var r = this, e = new Array(128), n = new Array(128), i = new Array(128), s = this.table, t = 0, f = 0;
        this.TERROR;
        var _ = this.EOF;
        this.options.errorRecoveryTokenDiscardCount | 0;
        var y = [0, 54], l;
        this.__lexer__ ? l = this.__lexer__ : l = this.__lexer__ = Object.create(this.lexer);
        var c = {
          parseError: void 0,
          quoteName: void 0,
          lexer: void 0,
          parser: void 0,
          pre_parse: void 0,
          post_parse: void 0,
          pre_lex: void 0,
          post_lex: void 0
        };
        typeof assert != "function" || assert, this.yyGetSharedState = function() {
          return c;
        };
        function d(p, m) {
          for (var k in m)
            typeof p[k] > "u" && Object.prototype.hasOwnProperty.call(m, k) && (p[k] = m[k]);
        }
        d(c, this.yy), c.lexer = l, c.parser = this, typeof c.parseError == "function" ? this.parseError = function(m, k, N) {
          return N || (N = this.JisonParserError), c.parseError.call(this, m, k, N);
        } : this.parseError = this.originalParseError, typeof c.quoteName == "function" ? this.quoteName = function(m) {
          return c.quoteName.call(this, m);
        } : this.quoteName = this.originalQuoteName, this.cleanupAfterParse = function(m, k, N) {
          var w;
          if (k) {
            var I;
            (c.post_parse || this.post_parse) && (I = this.constructParseErrorInfo(null, null, null, !1)), c.post_parse && (w = c.post_parse.call(this, c, m, I), typeof w < "u" && (m = w)), this.post_parse && (w = this.post_parse.call(this, c, m, I), typeof w < "u" && (m = w)), I && I.destroy && I.destroy();
          }
          if (this.__reentrant_call_depth > 1)
            return m;
          if (l.cleanupAfterLex && l.cleanupAfterLex(N), c && (c.lexer = void 0, c.parser = void 0, l.yy === c && (l.yy = void 0)), c = void 0, this.parseError = this.originalParseError, this.quoteName = this.originalQuoteName, e.length = 0, n.length = 0, i.length = 0, t = 0, !N) {
            for (var G = this.__error_infos.length - 1; G >= 0; G--) {
              var C = this.__error_infos[G];
              C && typeof C.destroy == "function" && C.destroy();
            }
            this.__error_infos.length = 0;
          }
          return m;
        }, this.constructParseErrorInfo = function(m, k, N, w) {
          var I = {
            errStr: m,
            exception: k,
            text: l.match,
            value: l.yytext,
            token: this.describeSymbol(f) || f,
            token_id: f,
            line: l.yylineno,
            expected: N,
            recoverable: w,
            state: S,
            action: L,
            new_state: b,
            symbol_stack: e,
            state_stack: n,
            value_stack: i,
            stack_pointer: t,
            yy: c,
            lexer: l,
            parser: this,
            destroy: function() {
              var C = !!this.recoverable;
              for (var Y in this)
                this.hasOwnProperty(Y) && typeof Y == "object" && (this[Y] = void 0);
              this.recoverable = C;
            }
          };
          return this.__error_infos.push(I), I;
        };
        function O() {
          var p = l.lex();
          return typeof p != "number" && (p = r.symbols_[p] || p), p || _;
        }
        function x() {
          var p = l.fastLex();
          return typeof p != "number" && (p = r.symbols_[p] || p), p || _;
        }
        var $ = O, S, L, v, U, j = {
          $: !0,
          _$: void 0,
          yy: c
        }, g, A, F, b, E = !1;
        try {
          if (this.__reentrant_call_depth++, l.setInput(a, c), typeof l.canIUse == "function") {
            var q = l.canIUse();
            q.fastLex && typeof x == "function" && ($ = x);
          }
          for (i[t] = null, n[t] = 0, e[t] = 0, ++t, this.pre_parse && this.pre_parse.call(this, c), c.pre_parse && c.pre_parse.call(this, c), b = n[t - 1]; ; ) {
            if (S = b, this.defaultActions[S])
              L = 2, b = this.defaultActions[S];
            else if (f || (f = $()), U = s[S] && s[S][f] || y, b = U[1], L = U[0], !L) {
              var R, D = this.describeSymbol(f) || f, V = this.collect_expected_token_set(S);
              typeof l.yylineno == "number" ? R = "Parse error on line " + (l.yylineno + 1) + ": " : R = "Parse error: ", typeof l.showPosition == "function" && (R += `
` + l.showPosition(79 - 10, 10) + `
`), V.length ? R += "Expecting " + V.join(", ") + ", got unexpected " + D : R += "Unexpected " + D, g = this.constructParseErrorInfo(R, null, V, !1), v = this.parseError(g.errStr, g, this.JisonParserError), typeof v < "u" && (E = v);
              break;
            }
            switch (L) {
              default:
                if (L instanceof Array) {
                  g = this.constructParseErrorInfo("Parse Error: multiple actions possible at state: " + S + ", token: " + f, null, null, !1), v = this.parseError(g.errStr, g, this.JisonParserError), typeof v < "u" && (E = v);
                  break;
                }
                g = this.constructParseErrorInfo("Parsing halted. No viable error recovery approach available due to internal system failure.", null, null, !1), v = this.parseError(g.errStr, g, this.JisonParserError), typeof v < "u" && (E = v);
                break;
              case 1:
                e[t] = f, i[t] = l.yytext, n[t] = b, ++t, f = 0;
                continue;
              case 2:
                if (F = this.productions_[b - 1], A = F[1], v = this.performAction.call(j, b, t - 1, i), typeof v < "u") {
                  E = v;
                  break;
                }
                t -= A;
                var Q = F[0];
                e[t] = Q, i[t] = j.$, b = s[n[t - 1]][Q], n[t] = b, ++t;
                continue;
              case 3:
                t !== -2 && (E = !0, t--, typeof i[t] < "u" && (E = i[t]));
                break;
            }
            break;
          }
        } catch (p) {
          if (p instanceof this.JisonParserError)
            throw p;
          if (l && typeof l.JisonLexerError == "function" && p instanceof l.JisonLexerError)
            throw p;
          g = this.constructParseErrorInfo("Parsing aborted due to exception.", p, null, !1), E = !1, v = this.parseError(g.errStr, g, this.JisonParserError), typeof v < "u" && (E = v);
        } finally {
          E = this.cleanupAfterParse(E, !0, !0), this.__reentrant_call_depth--;
        }
        return E;
      }
    };
    T.originalParseError = T.parseError, T.originalQuoteName = T.quoteName;
    var K = function() {
      function o(r, e) {
        Object.defineProperty(this, "name", {
          enumerable: !1,
          writable: !1,
          value: "JisonLexerError"
        }), r == null && (r = "???"), Object.defineProperty(this, "message", {
          enumerable: !1,
          writable: !0,
          value: r
        }), this.hash = e;
        var n;
        if (e && e.exception instanceof Error) {
          var i = e.exception;
          this.message = i.message || r, n = i.stack;
        }
        n || (Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, this.constructor) : n = new Error(r).stack), n && Object.defineProperty(this, "stack", {
          enumerable: !1,
          writable: !1,
          value: n
        });
      }
      typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(o.prototype, Error.prototype) : o.prototype = Object.create(Error.prototype), o.prototype.constructor = o, o.prototype.name = "JisonLexerError";
      var a = {
        EOF: 1,
        ERROR: 2,
        __currentRuleSet__: null,
        __error_infos: [],
        __decompressed: !1,
        done: !1,
        _backtrack: !1,
        _input: "",
        _more: !1,
        _signaled_error_token: !1,
        conditionStack: [],
        match: "",
        matched: "",
        matches: !1,
        yytext: "",
        offset: 0,
        yyleng: 0,
        yylineno: 0,
        yylloc: null,
        constructLexErrorInfo: function(e, n, i) {
          if (e = "" + e, i == null && (i = !(e.indexOf(`
`) > 0 && e.indexOf("^") > 0)), this.yylloc && i) {
            if (typeof this.prettyPrintRange == "function")
              this.prettyPrintRange(this.yylloc), /\n\s*$/.test(e) || (e += `
`), e += `
  Erroneous area:
` + this.prettyPrintRange(this.yylloc);
            else if (typeof this.showPosition == "function") {
              var s = this.showPosition();
              s && (e.length && e[e.length - 1] !== `
` && s[0] !== `
` ? e += `
` + s : e += s);
            }
          }
          var t = {
            errStr: e,
            recoverable: !!n,
            text: this.match,
            token: null,
            line: this.yylineno,
            loc: this.yylloc,
            yy: this.yy,
            lexer: this,
            destroy: function() {
              var _ = !!this.recoverable;
              for (var y in this)
                this.hasOwnProperty(y) && typeof y == "object" && (this[y] = void 0);
              this.recoverable = _;
            }
          };
          return this.__error_infos.push(t), t;
        },
        parseError: function(e, n, i) {
          if (i || (i = this.JisonLexerError), this.yy) {
            if (this.yy.parser && typeof this.yy.parser.parseError == "function")
              return this.yy.parser.parseError.call(this, e, n, i) || this.ERROR;
            if (typeof this.yy.parseError == "function")
              return this.yy.parseError.call(this, e, n, i) || this.ERROR;
          }
          throw new i(e, n);
        },
        yyerror: function(e) {
          var n = "";
          this.yylloc && (n = " on line " + (this.yylineno + 1));
          var i = this.constructLexErrorInfo(
            "Lexical error" + n + ": " + e,
            this.options.lexerErrorsAreRecoverable
          ), s = Array.prototype.slice.call(arguments, 1);
          return s.length && (i.extra_error_attributes = s), this.parseError(i.errStr, i, this.JisonLexerError) || this.ERROR;
        },
        cleanupAfterLex: function(e) {
          if (this.setInput("", {}), !e) {
            for (var n = this.__error_infos.length - 1; n >= 0; n--) {
              var i = this.__error_infos[n];
              i && typeof i.destroy == "function" && i.destroy();
            }
            this.__error_infos.length = 0;
          }
          return this;
        },
        clear: function() {
          this.yytext = "", this.yyleng = 0, this.match = "", this.matches = !1, this._more = !1, this._backtrack = !1;
          var e = this.yylloc ? this.yylloc.last_column : 0;
          this.yylloc = {
            first_line: this.yylineno + 1,
            first_column: e,
            last_line: this.yylineno + 1,
            last_column: e,
            range: [this.offset, this.offset]
          };
        },
        setInput: function(e, n) {
          if (this.yy = n || this.yy || {}, !this.__decompressed) {
            for (var i = this.rules, s = 0, t = i.length; s < t; s++) {
              var f = i[s];
              typeof f == "number" && (i[s] = i[f]);
            }
            var _ = this.conditions;
            for (var y in _) {
              for (var l = _[y], c = l.rules, t = c.length, d = new Array(t + 1), O = new Array(t + 1), s = 0; s < t; s++) {
                var x = c[s], f = i[x];
                d[s + 1] = f, O[s + 1] = x;
              }
              l.rules = O, l.__rule_regexes = d, l.__rule_count = t;
            }
            this.__decompressed = !0;
          }
          return this._input = e || "", this.clear(), this._signaled_error_token = !1, this.done = !1, this.yylineno = 0, this.matched = "", this.conditionStack = ["INITIAL"], this.__currentRuleSet__ = null, this.yylloc = {
            first_line: 1,
            first_column: 0,
            last_line: 1,
            last_column: 0,
            range: [0, 0]
          }, this.offset = 0, this;
        },
        editRemainingInput: function(e, n) {
          var i = e.call(this, this._input, n);
          return typeof i != "string" ? i && (this._input = "" + i) : this._input = i, this;
        },
        input: function() {
          if (!this._input)
            return null;
          var e = this._input[0];
          this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e;
          var n = 1, i = !1;
          if (e === `
`)
            i = !0;
          else if (e === "\r") {
            i = !0;
            var s = this._input[1];
            s === `
` && (n++, e += s, this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s, this.yylloc.range[1]++);
          }
          return i ? (this.yylineno++, this.yylloc.last_line++, this.yylloc.last_column = 0) : this.yylloc.last_column++, this.yylloc.range[1]++, this._input = this._input.slice(n), e;
        },
        unput: function(e) {
          var n = e.length, i = e.split(/(?:\r\n?|\n)/g);
          if (this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.yyleng = this.yytext.length, this.offset -= n, this.match = this.match.substr(0, this.match.length - n), this.matched = this.matched.substr(0, this.matched.length - n), i.length > 1) {
            this.yylineno -= i.length - 1, this.yylloc.last_line = this.yylineno + 1;
            var s = this.match, t = s.split(/(?:\r\n?|\n)/g);
            t.length === 1 && (s = this.matched, t = s.split(/(?:\r\n?|\n)/g)), this.yylloc.last_column = t[t.length - 1].length;
          } else
            this.yylloc.last_column -= n;
          return this.yylloc.range[1] = this.yylloc.range[0] + this.yyleng, this.done = !1, this;
        },
        more: function() {
          return this._more = !0, this;
        },
        reject: function() {
          if (this.options.backtrack_lexer)
            this._backtrack = !0;
          else {
            var e = "";
            this.yylloc && (e = " on line " + (this.yylineno + 1));
            var n = this.constructLexErrorInfo(
              "Lexical error" + e + ": You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).",
              !1
            );
            this._signaled_error_token = this.parseError(n.errStr, n, this.JisonLexerError) || this.ERROR;
          }
          return this;
        },
        less: function(e) {
          return this.unput(this.match.slice(e));
        },
        pastInput: function(e, n) {
          var i = this.matched.substring(0, this.matched.length - this.match.length);
          e < 0 ? e = i.length : e || (e = 20), n < 0 ? n = i.length : n || (n = 1), i = i.substr(-e * 2 - 2);
          var s = i.replace(/\r\n|\r/g, `
`).split(`
`);
          return s = s.slice(-n), i = s.join(`
`), i.length > e && (i = "..." + i.substr(-e)), i;
        },
        upcomingInput: function(e, n) {
          var i = this.match;
          e < 0 ? e = i.length + this._input.length : e || (e = 20), n < 0 ? n = e : n || (n = 1), i.length < e * 2 + 2 && (i += this._input.substring(0, e * 2 + 2));
          var s = i.replace(/\r\n|\r/g, `
`).split(`
`);
          return s = s.slice(0, n), i = s.join(`
`), i.length > e && (i = i.substring(0, e) + "..."), i;
        },
        showPosition: function(e, n) {
          var i = this.pastInput(e).replace(/\s/g, " "), s = new Array(i.length + 1).join("-");
          return i + this.upcomingInput(n).replace(/\s/g, " ") + `
` + s + "^";
        },
        deriveLocationInfo: function(e, n, i, s) {
          var t = {
            first_line: 1,
            first_column: 0,
            last_line: 1,
            last_column: 0,
            range: [0, 0]
          };
          return e && (t.first_line = e.first_line | 0, t.last_line = e.last_line | 0, t.first_column = e.first_column | 0, t.last_column = e.last_column | 0, e.range && (t.range[0] = e.range[0] | 0, t.range[1] = e.range[1] | 0)), (t.first_line <= 0 || t.last_line < t.first_line) && (t.first_line <= 0 && n && (t.first_line = n.last_line | 0, t.first_column = n.last_column | 0, n.range && (t.range[0] = e.range[1] | 0)), (t.last_line <= 0 || t.last_line < t.first_line) && i && (t.last_line = i.first_line | 0, t.last_column = i.first_column | 0, i.range && (t.range[1] = e.range[0] | 0)), t.first_line <= 0 && s && (t.last_line <= 0 || s.last_line <= t.last_line) && (t.first_line = s.first_line | 0, t.first_column = s.first_column | 0, s.range && (t.range[0] = s.range[0] | 0)), t.last_line <= 0 && s && (t.first_line <= 0 || s.first_line >= t.first_line) && (t.last_line = s.last_line | 0, t.last_column = s.last_column | 0, s.range && (t.range[1] = s.range[1] | 0))), t.last_line <= 0 && (t.first_line <= 0 ? (t.first_line = this.yylloc.first_line, t.last_line = this.yylloc.last_line, t.first_column = this.yylloc.first_column, t.last_column = this.yylloc.last_column, t.range[0] = this.yylloc.range[0], t.range[1] = this.yylloc.range[1]) : (t.last_line = this.yylloc.last_line, t.last_column = this.yylloc.last_column, t.range[1] = this.yylloc.range[1])), t.first_line <= 0 && (t.first_line = t.last_line, t.first_column = 0, t.range[1] = t.range[0]), t.first_column < 0 && (t.first_column = 0), t.last_column < 0 && (t.last_column = t.first_column > 0 ? t.first_column : 80), t;
        },
        prettyPrintRange: function(e, n, i) {
          e = this.deriveLocationInfo(e, n, i);
          const s = 3, t = 1, f = 2;
          var _ = this.matched + this._input, y = _.split(`
`), l = Math.max(1, n ? n.first_line : e.first_line - s), c = Math.max(1, i ? i.last_line : e.last_line + t), d = 1 + Math.log10(c | 1) | 0, O = new Array(d).join(" "), x = [], $ = y.slice(l - 1, c + 1).map(function(j, g) {
            var A = g + l, F = (O + A).substr(-d), b = F + ": " + j, E = new Array(d + 1).join("^"), q = 2 + 1, R = 0;
            if (A === e.first_line ? (q += e.first_column, R = Math.max(
              2,
              (A === e.last_line ? e.last_column : j.length) - e.first_column + 1
            )) : A === e.last_line ? R = Math.max(2, e.last_column + 1) : A > e.first_line && A < e.last_line && (R = Math.max(2, j.length + 1)), R) {
              var D = new Array(q).join("."), V = new Array(R).join("^");
              b += `
` + E + D + V, j.trim().length > 0 && x.push(g);
            }
            return b = b.replace(/\t/g, " "), b;
          });
          if (x.length > 2 * f) {
            var S = x[f - 1] + 1, L = x[x.length - f] - 1, v = new Array(d + 1).join(" ") + "  (...continued...)";
            v += `
` + new Array(d + 1).join("-") + "  (---------------)", $.splice(S, L - S + 1, v);
          }
          return $.join(`
`);
        },
        describeYYLLOC: function(e, n) {
          var i = e.first_line, s = e.last_line, t = e.first_column, f = e.last_column, _ = s - i, y = f - t, l;
          if (_ === 0 ? (l = "line " + i + ", ", y <= 1 ? l += "column " + t : l += "columns " + t + " .. " + f) : l = "lines " + i + "(column " + t + ") .. " + s + "(column " + f + ")", e.range && n) {
            var c = e.range[0], d = e.range[1] - 1;
            d <= c ? l += " {String Offset: " + c + "}" : l += " {String Offset range: " + c + " .. " + d + "}";
          }
          return l;
        },
        test_match: function(e, n) {
          var i, s, t, f, _;
          if (this.options.backtrack_lexer && (t = {
            yylineno: this.yylineno,
            yylloc: {
              first_line: this.yylloc.first_line,
              last_line: this.yylloc.last_line,
              first_column: this.yylloc.first_column,
              last_column: this.yylloc.last_column,
              range: this.yylloc.range.slice(0)
            },
            yytext: this.yytext,
            match: this.match,
            matches: this.matches,
            matched: this.matched,
            yyleng: this.yyleng,
            offset: this.offset,
            _more: this._more,
            _input: this._input,
            yy: this.yy,
            conditionStack: this.conditionStack.slice(0),
            done: this.done
          }), f = e[0], _ = f.length, s = f.split(/(?:\r\n?|\n)/g), s.length > 1 ? (this.yylineno += s.length - 1, this.yylloc.last_line = this.yylineno + 1, this.yylloc.last_column = s[s.length - 1].length) : this.yylloc.last_column += _, this.yytext += f, this.match += f, this.matched += f, this.matches = e, this.yyleng = this.yytext.length, this.yylloc.range[1] += _, this.offset += _, this._more = !1, this._backtrack = !1, this._input = this._input.slice(_), i = this.performAction.call(
            this,
            this.yy,
            n,
            this.conditionStack[this.conditionStack.length - 1]
          ), this.done && this._input && (this.done = !1), i)
            return i;
          if (this._backtrack) {
            for (var y in t)
              this[y] = t[y];
            return this.__currentRuleSet__ = null, !1;
          } else if (this._signaled_error_token)
            return i = this._signaled_error_token, this._signaled_error_token = !1, i;
          return !1;
        },
        next: function() {
          if (this.done)
            return this.clear(), this.EOF;
          this._input || (this.done = !0);
          var e, n, i, s;
          this._more || this.clear();
          var t = this.__currentRuleSet__;
          if (!t && (t = this.__currentRuleSet__ = this._currentRules(), !t || !t.rules)) {
            var f = "";
            this.options.trackPosition && (f = " on line " + (this.yylineno + 1));
            var _ = this.constructLexErrorInfo(
              "Internal lexer engine error" + f + ': The lex grammar programmer pushed a non-existing condition name "' + this.topState() + '"; this is a fatal error and should be reported to the application programmer team!',
              !1
            );
            return this.parseError(_.errStr, _, this.JisonLexerError) || this.ERROR;
          }
          for (var y = t.rules, l = t.__rule_regexes, c = t.__rule_count, d = 1; d <= c; d++)
            if (i = this._input.match(l[d]), i && (!n || i[0].length > n[0].length)) {
              if (n = i, s = d, this.options.backtrack_lexer) {
                if (e = this.test_match(i, y[d]), e !== !1)
                  return e;
                if (this._backtrack) {
                  n = void 0;
                  continue;
                } else
                  return !1;
              } else if (!this.options.flex)
                break;
            }
          if (n)
            return e = this.test_match(n, y[s]), e !== !1 ? e : !1;
          if (this._input) {
            var f = "";
            this.options.trackPosition && (f = " on line " + (this.yylineno + 1));
            var _ = this.constructLexErrorInfo(
              "Lexical error" + f + ": Unrecognized text.",
              this.options.lexerErrorsAreRecoverable
            ), O = this._input, x = this.topState(), $ = this.conditionStack.length;
            return e = this.parseError(_.errStr, _, this.JisonLexerError) || this.ERROR, e === this.ERROR && !this.matches && O === this._input && x === this.topState() && $ === this.conditionStack.length && this.input(), e;
          } else
            return this.done = !0, this.clear(), this.EOF;
        },
        lex: function() {
          var e;
          for (typeof this.pre_lex == "function" && (e = this.pre_lex.call(this, 0)), typeof this.options.pre_lex == "function" && (e = this.options.pre_lex.call(this, e) || e), this.yy && typeof this.yy.pre_lex == "function" && (e = this.yy.pre_lex.call(this, e) || e); !e; )
            e = this.next();
          return this.yy && typeof this.yy.post_lex == "function" && (e = this.yy.post_lex.call(this, e) || e), typeof this.options.post_lex == "function" && (e = this.options.post_lex.call(this, e) || e), typeof this.post_lex == "function" && (e = this.post_lex.call(this, e) || e), e;
        },
        fastLex: function() {
          for (var e; !e; )
            e = this.next();
          return e;
        },
        canIUse: function() {
          var e = {
            fastLex: !(typeof this.pre_lex == "function" || typeof this.options.pre_lex == "function" || this.yy && typeof this.yy.pre_lex == "function" || this.yy && typeof this.yy.post_lex == "function" || typeof this.options.post_lex == "function" || typeof this.post_lex == "function") && typeof this.fastLex == "function"
          };
          return e;
        },
        begin: function(e) {
          return this.pushState(e);
        },
        pushState: function(e) {
          return this.conditionStack.push(e), this.__currentRuleSet__ = null, this;
        },
        popState: function() {
          var e = this.conditionStack.length - 1;
          return e > 0 ? (this.__currentRuleSet__ = null, this.conditionStack.pop()) : this.conditionStack[0];
        },
        topState: function(e) {
          return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
        },
        _currentRules: function() {
          return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]] : this.conditions.INITIAL;
        },
        stateStackSize: function() {
          return this.conditionStack.length;
        },
        options: {
          trackPosition: !0
        },
        JisonLexerError: o,
        performAction: function(e, n, i) {
          switch (n) {
            case 1:
              break;
            default:
              return this.simpleCaseActionClusters[n];
          }
        },
        simpleCaseActionClusters: {
          0: 13,
          2: 5,
          3: 6,
          4: 3,
          5: 4,
          6: 15,
          7: 15,
          8: 15,
          9: 15,
          10: 15,
          11: 15,
          12: 16,
          13: 16,
          14: 16,
          15: 16,
          16: 17,
          17: 17,
          18: 18,
          19: 18,
          20: 19,
          21: 19,
          22: 19,
          23: 20,
          24: 21,
          25: 22,
          26: 23,
          27: 25,
          28: 24,
          29: 26,
          30: 27,
          31: 28,
          32: 11,
          33: 9,
          34: 12,
          35: 10,
          36: 7,
          37: 8,
          38: 14,
          39: 1
        },
        rules: [
          /^(?:(--[\d\-A-Za-z]*))/,
          /^(?:\s+)/,
          /^(?:\*)/,
          /^(?:\/)/,
          /^(?:\+)/,
          /^(?:-)/,
          /^(?:(\d+(\.\d*)?|\.\d+)px\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)cm\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)mm\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)in\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)pt\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)pc\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)deg\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)grad\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)rad\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)turn\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)s\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)ms\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)Hz\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)kHz\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)dpi\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)dpcm\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)dppx\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)em\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)ex\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)ch\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)rem\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)vw\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)vh\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)vmin\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)vmax\b)/,
          /^(?:(\d+(\.\d*)?|\.\d+)%)/,
          /^(?:(\d+(\.\d*)?|\.\d+)\b)/,
          /^(?:(calc))/,
          /^(?:(var))/,
          /^(?:([a-z]+))/,
          /^(?:\()/,
          /^(?:\))/,
          /^(?:,)/,
          /^(?:$)/
        ],
        conditions: {
          INITIAL: {
            rules: [
              0,
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30,
              31,
              32,
              33,
              34,
              35,
              36,
              37,
              38,
              39
            ],
            inclusive: !0
          }
        }
      };
      return a;
    }();
    T.lexer = K;
    function X() {
      this.yy = {};
    }
    return X.prototype = T, T.Parser = X, new X();
  }();
  typeof z < "u" && (H.parser = J, H.Parser = J.Parser, H.parse = function() {
    return J.parse.apply(J, arguments);
  });
})(ee);
export {
  se as default
};
//# sourceMappingURL=parser.js.map
