import p from "./index-classCallCheck.js";
import f from "./index-createClass.js";
import a from "./index-assertThisInitialized.js";
import c from "./index-inherits.js";
import l from "./index-createSuper.js";
import n from "./index-defineProperty.js";
import { Parser as h } from "./index-Parser4.js";
import { numericPatterns as T } from "./index-constants4.js";
import { parseNDigits as v, parseNumericPattern as P } from "./index-utils12.js";
var k = /* @__PURE__ */ (function(u) {
  c(i, u);
  var s = l(i);
  function i() {
    var o;
    p(this, i);
    for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
      e[t] = arguments[t];
    return o = s.call.apply(s, [this].concat(e)), n(a(o), "priority", 70), n(a(o), "incompatibleTokens", ["h", "H", "k", "t", "T"]), o;
  }
  return f(i, [{
    key: "parse",
    value: function(r, e, t) {
      switch (e) {
        case "K":
          return P(T.hour11h, r);
        case "Ko":
          return t.ordinalNumber(r, {
            unit: "hour"
          });
        default:
          return v(e.length, r);
      }
    }
  }, {
    key: "validate",
    value: function(r, e) {
      return e >= 0 && e <= 11;
    }
  }, {
    key: "set",
    value: function(r, e, t) {
      var m = r.getUTCHours() >= 12;
      return m && t < 12 ? r.setUTCHours(t + 12, 0, 0, 0) : r.setUTCHours(t, 0, 0, 0), r;
    }
  }]), i;
})(h);
export {
  k as Hour0To11Parser
};
