"use strict";

exports.__esModule = true;
exports.trimSpacesAndLeadingZeros = exports.limitNumericValueLength = void 0;
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};
var trimSpacesAndLeadingZeros = exports.trimSpacesAndLeadingZeros = function trimSpacesAndLeadingZeros(value, fallback) {
  if (fallback === void 0) {
    fallback = "";
  }
  if (!value || isNaN(value)) {
    return fallback;
  }
  var trimmed = value.trim();
  var isNegative = trimmed[0] === "-";
  if (isNegative) {
    trimmed = trimmed.substring(1, trimmed.length);
  }
  var withoutLeadingZeros = trimmed.replace(/^0+/, "");
  if (withoutLeadingZeros == "") {
    return "0";
  }
  var cleanNumber = "".concat(isNegative ? "-" : "").concat(withoutLeadingZeros);
  return limitNumericValueLength(cleanNumber);
};
var limitNumericValueLength = exports.limitNumericValueLength = function limitNumericValueLength(value, maximum) {
  if (maximum === void 0) {
    maximum = 9;
  }
  return value.substring(0, maximum);
};
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(trimSpacesAndLeadingZeros, "trimSpacesAndLeadingZeros", "/home/vsts/work/1/s/src/utils/inputHelper.js");
  reactHotLoader.register(limitNumericValueLength, "limitNumericValueLength", "/home/vsts/work/1/s/src/utils/inputHelper.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
;
(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
  if (!reactHotLoader) {
    return;
  }
  reactHotLoader.register(trimSpacesAndLeadingZeros, "trimSpacesAndLeadingZeros", "/home/vsts/work/1/s/src/utils/inputHelper.js");
  reactHotLoader.register(limitNumericValueLength, "limitNumericValueLength", "/home/vsts/work/1/s/src/utils/inputHelper.js");
})();
;
(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();