import c from "./index-classCallCheck.js";
import u from "./index-createClass.js";
import s from "./index-assertThisInitialized.js";
import p from "./index-inherits.js";
import f from "./index-createSuper.js";
import n from "./index-defineProperty.js";
import { Parser as l } from "./index-Parser4.js";
import { numericPatterns as d } from "./index-constants4.js";
import { parseNDigits as h, parseNumericPattern as v } from "./index-utils12.js";
var S = /* @__PURE__ */ (function(m) {
  p(a, m);
  var i = f(a);
  function a() {
    var o;
    c(this, a);
    for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
      e[t] = arguments[t];
    return o = i.call.apply(i, [this].concat(e)), n(s(o), "priority", 50), n(s(o), "incompatibleTokens", ["t", "T"]), o;
  }
  return u(a, [{
    key: "parse",
    value: function(r, e, t) {
      switch (e) {
        case "s":
          return v(d.second, r);
        case "so":
          return t.ordinalNumber(r, {
            unit: "second"
          });
        default:
          return h(e.length, r);
      }
    }
  }, {
    key: "validate",
    value: function(r, e) {
      return e >= 0 && e <= 59;
    }
  }, {
    key: "set",
    value: function(r, e, t) {
      return r.setUTCSeconds(t, 0), r;
    }
  }]), a;
})(l);
export {
  S as SecondParser
};
