/*
Returns the matching locale-dependent error message for the type based on the constraints.

@param {sap.ui.model.odata.type.DateTimeBase} oType
The type
@returns {string}
The locale-dependent error message
433782
function getErrorMessage(oType) {
		return sap.ui.getCore().getLibraryResourceBundle().getText(
			isDateOnly(oType) ? "EnterDate" : "EnterDateTime",
				[oType.formatValue(isDateOnly(oType) ? oDemoDate : oDemoDateTime, "string")]);
	}
423312
function type(input) {

  //If the input value is null, undefined or NaN the toStringTypes object shouldn't be used
  if (input === null || input === undefined || (input !== input && String(input) === "NaN")) {
    return String(input);
  }

  // use the typeMap to detect the type and fallback to object if the type wasn't found
  return typeMap[Object.prototype.toString.call(input)] || "object";
}
687766
public String getRulesIdForLocale(ULocale locale, PluralType type) {
        Map<String, String> idMap = getLocaleIdToRulesIdMap(type);
        String localeId = ULocale.canonicalize(locale.getBaseName());
        String rulesId = null;
        while (null == (rulesId = idMap.get(localeId))) {
            int ix = localeId.lastIndexOf("_");
            if (ix == -1) {
                break;
            }
            localeId = localeId.substring(0, ix);
        }
        return rulesId;
    }
779408
function _getType (result) {
  let type = result.type;
  if (TYPES[type]) {
    if (type === 'Geography' && result.entityType) {
      type = type + ':' + result.entityType;
    }
    return TYPES[type];
  }

  return 'default';
}
586238
function getPreciseType(propValue) {
        var propType = getPropType(propValue);
        if (propType === 'object') {
            if (propValue instanceof Date) {
                return 'date';
            } else if (propValue instanceof RegExp) {
                return 'regexp';
            }
        }
        return propType;
    }
387984
function getLocalESLintVersion() {
    try {
        const eslintPath = relativeModuleResolver("eslint", path.join(process.cwd(), "__placeholder__.js"));
        const eslint = require(eslintPath);

        return eslint.linter.version || null;
    } catch (_err) {
        return null;
    }
}
876415
function getLocaleDayNames(locale, formStyle, width) {
    var /** @type {?} */ data = findLocaleData(locale);
    var /** @type {?} */ daysData = /** @type {?} */ ([data[3 /* DaysFormat */], data[4 /* DaysStandalone */]]);
    var /** @type {?} */ days = getLastDefinedValue(daysData, formStyle);
    return getLastDefinedValue(days, width);
}
571015
function toDate(str) {
  var millis = Date.parse(str);
  if (isNaN(millis)) {
    throw new Error(l10n.lookupFormat('typesDateNan', [ str ]));
  }
  return new Date(millis);
}
211358
@Override  // for covariant return type
    @SuppressWarnings("unchecked")
    public ChronoLocalDateTime<EthiopicDate> atTime(LocalTime localTime) {
        return (ChronoLocalDateTime<EthiopicDate>) super.atTime(localTime);
    }
760909
function getFormatter(oType) {
		var oFormatOptions;

		if (!oType.oFormat) {
			oFormatOptions = jQuery.extend({groupingEnabled : true}, oType.oFormatOptions);
			oType.oFormat = NumberFormat.getFloatInstance(oFormatOptions);
		}
		return oType.oFormat;
	}
675257
function getErrorMessage (error) {
    // get schema from model
    var schema = this.model && this.model.schemaData && this.model.schemaData.properties
    // error message
    var message
    // get custom error message from schema if defined
    if (schema) {
        // if there is a base property get nested property
        if (error.baseProperty) {
            message = schema[error.baseProperty].items
                && schema[error.baseProperty].items.properties
                && schema[error.baseProperty].items.properties[error.property]
                && schema[error.baseProperty].items.properties[error.property].errors 
                && schema[error.baseProperty].items.properties[error.property].errors[error.keyword]
        }
        // get custom error message if any
        else {
            message = schema[error.property]
                && schema[error.property].errors
                && schema[error.property].errors[error.keyword]
        }
    }
    // if there is custom error message return it
    if (message) {
        return message
    }
    // default missing property error
    if (error.params && error.params.missingProperty) {
        return error.property+' required'
    }
    // default validation error
    else {
        return error.message
    }
}
1120271
public void validateFor(final int type) throws ValueFormatException
   {
      if (constraints == null || constraints.length <= 0)
      {
         return;
      }

      if (type == PropertyType.DATE)
      {
         for (String constrString : constraints)
         {
            try
            {
               MinMaxConstraint constraint = parseAsMinMax(constrString);
               if (constraint.getMin().getThreshold().length() > 0)
               {
                  JCRDateFormat.parse(constraint.getMin().getThreshold());
               }

               if (constraint.getMax().getThreshold().length() > 0)
               {
                  JCRDateFormat.parse(constraint.getMax().getThreshold());
               }
            }
            catch (ValueFormatException e)
            {
               throw new ValueFormatException("Wrong DATE constraint format " + constrString, e);
            }
            catch (ConstraintViolationException e)
            {
               throw new ValueFormatException("Wrong DATE constraint format " + constrString, e);
            }
         }
      }
      else if (type == PropertyType.DOUBLE)
      {
         for (String constrString : constraints)
         {
            try
            {
               MinMaxConstraint constraint = parseAsMinMax(constrString);
               if (constraint.getMin().getThreshold().length() > 0)
               {
                  Double.parseDouble(constraint.getMin().getThreshold());
               }
               if (constraint.getMax().getThreshold().length() > 0)
               {
                  Double.parseDouble(constraint.getMax().getThreshold());
               }
            }
            catch (NumberFormatException e)
            {
               throw new ValueFormatException("Wrong DOUBLE constraint format " + constrString, e);
            }
            catch (ConstraintViolationException e)
            {
               throw new ValueFormatException("Wrong DOUBLE constraint format " + constrString, e);
            }
         }
      }
      else if (type == PropertyType.LONG || type == PropertyType.BINARY)
      {
         for (String constrString : constraints)
         {
            try
            {
               MinMaxConstraint constraint = parseAsMinMax(constrString);
               if (constraint.getMin().getThreshold().length() > 0)
               {
                  Long.parseLong(constraint.getMin().getThreshold());
               }
               if (constraint.getMax().getThreshold().length() > 0)
               {
                  Long.parseLong(constraint.getMax().getThreshold());
               }
            }
            catch (NumberFormatException e)
            {
               throw new ValueFormatException("Wrong LONG (or BINARY size) constraint format " + constrString, e);
            }
            catch (ConstraintViolationException e)
            {
               throw new ValueFormatException("Wrong LONG (or BINARY size) constraint format " + constrString, e);
            }
         }
      }
      else if (type == PropertyType.BOOLEAN)
      {
         for (String constrString : constraints)
         {
            if (!constrString.equalsIgnoreCase("true") && !constrString.equalsIgnoreCase("false"))
            {
               throw new ValueFormatException("Wrong BOOLEAN constraint format: " + constrString);
            }
         }
      }
   }
1297345
function adjustConstraints(oType, oConstraints) {
		var oAdjustedConstraints = {};

		if (oConstraints) {
			switch (oConstraints.displayFormat) {
			case "Date":
				oAdjustedConstraints.isDateOnly = true;
				break;
			case undefined:
				break;
			default:
				Log.warning("Illegal displayFormat: " + oConstraints.displayFormat,
					null, oType.getName());
			}
			oAdjustedConstraints.nullable = oConstraints.nullable;
		}
		return oAdjustedConstraints;
	}
304063
function convertDateType (data) {
  switch (data.type) {
    case 'date-only':
      data['type'] = 'string'
      data['pattern'] = constants.dateOnlyPattern
      break
    case 'time-only':
      data['type'] = 'string'
      data['pattern'] = constants.timeOnlyPattern
      break
    case 'datetime-only':
      data['type'] = 'string'
      data['pattern'] = constants.dateTimeOnlyPattern
      break
    case 'datetime':
      data['type'] = 'string'
      if (data.format === undefined || data.format.toLowerCase() === constants.RFC3339) {
        data['pattern'] = constants.RFC3339DatetimePattern
      } else if (data.format.toLowerCase() === constants.RFC2616) {
        data['pattern'] = constants.RFC2616DatetimePattern
      }
      delete data.format
      break
  }
  return data
}
1065029
function (oData, sFileType) {
				// code extension and properties files do not need formation
				if ((sFileType === "js") || (sFileType === "properties")) {
					return oData;
				}
				// other files should be formatted to JSON
				try {
					oData = JSON.parse(oData);
					return JSON.stringify(oData, null, '\t');
				} catch (oError){
					var ErrorUtils = sap.ui.require("sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils");
					ErrorUtils.displayError("Error", oError.name, oError.message);
					return oData;
				}
			}
1101897
public com.google.javascript.jscomp.Requirement.Type getType() {
    com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_);
    return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result;
  }
702635
function getRegularTypeOfObjectLiteral(type) {
            if (!(type.flags & 16777216 /* FreshObjectLiteral */)) {
                return type;
            }
            var regularType = type.regularType;
            if (regularType) {
                return regularType;
            }
            var resolved = type;
            var members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);
            var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.stringIndexInfo, resolved.numberIndexInfo);
            regularNew.flags = resolved.flags & ~16777216 /* FreshObjectLiteral */;
            type.regularType = regularNew;
            return regularNew;
        }